From: Ferruccio Guidi Date: Fri, 17 Jan 2020 13:50:17 +0000 (+0100) Subject: update in lambdadelta X-Git-Tag: make_still_working~201 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d2545ffd201b1aa49887313791386add78fa8603;p=helm.git update in lambdadelta + sources for λδ-2A added (with a correction) + sources for λδ-1A moved + λδ-related binaries moved here from web site directory --- diff --git a/.gitignore b/.gitignore index 224bc1923..c0ab80566 100644 --- a/.gitignore +++ b/.gitignore @@ -76,9 +76,8 @@ helm/www/lambdadelta/xslt/chc_45.xsl helm/www/lambdadelta/xslt/xhtbl.xsl matita/matita/contribs/lambdadelta/.depend -matita/matita/contribs/lambdadelta/nodes -matita/matita/contribs/lambdadelta/token -matita/matita/contribs/lambdadelta/2A +matita/matita/contribs/lambdadelta/bin/nodes +matita/matita/contribs/lambdadelta/bin/token matita/matita/contribs/lambdadelta/*/probe.txt matita/matita/contribs/lambdadelta/*/deps.txt matita/matita/contribs/lambdadelta/*/web/*_sum.tbl diff --git a/helm/www/lambdadelta/Makefile b/helm/www/lambdadelta/Makefile index c58e3f597..1acebccc5 100644 --- a/helm/www/lambdadelta/Makefile +++ b/helm/www/lambdadelta/Makefile @@ -15,9 +15,9 @@ SITEDIR = html HTMLDIR = html/lddl SRCDIR = web/home LDDLDIR = web/lddl -XHTBLDIR = bin/xhtbl -INDEXDIR = bin/index ETCDIR = etc +XHTBLDIR = $(ETCDIR)/lambdadelta/bin/xhtbl +INDEXDIR = $(ETCDIR)/lambdadelta/bin/index DOWNDIR = download XSLTDIR = xslt XMLDIR = xml diff --git a/helm/www/lambdadelta/bin/Makefile.common b/helm/www/lambdadelta/bin/Makefile.common deleted file mode 100644 index 7f95f4a23..000000000 --- a/helm/www/lambdadelta/bin/Makefile.common +++ /dev/null @@ -1,36 +0,0 @@ -H=@ - -OCAMLOPTIONS = -linkpkg -package \"$(REQUIRES)\" $(CAMLOPTIONS) -OCAMLFIND = OCAMLPATH=$(OCAMLPATH) ocamlfind -OCAMLC = $(OCAMLFIND) ocamlc -g $(OCAMLOPTIONS) -OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) - -CAMLP_FEATURES = $(F:%=-D%) - -AMLS = $(wildcard *.aml) - -define BUILD_TEMPLATE -$(1).all: - @echo " OCAMLBUILD $(1)" - $(H)ocamlbuild $$(BUILDOPTIONS) -ocamlc "$$(OCAMLC)" -ocamlopt "$$(OCAMLOPT)" -yaccflags "-v" -pp "$$(CAMLP)" $(1) - -.PHONY: $(1).all -endef - -all:: $(AMLS:%.aml=%.ml) $(EXECS:%=%.native.all) - -byte:: $(AMLS:%.aml=%.ml) $(EXECS:%=%.byte.all) - -$(foreach EXEC, $(EXECS), $(eval $(call BUILD_TEMPLATE,$(EXEC:%=%.native)))) - -$(foreach EXEC, $(EXECS), $(eval $(call BUILD_TEMPLATE,$(EXEC:%=%.byte)))) - -clean:: - @echo " OCAMLBUILD -clean" - $(H)ocamlbuild -clean - $(H)$(RM) $(AMLS:%.aml=%.ml) *~ - -.PHONY: all clean - -%.ml: %.aml - $(H)$(ALPHA) < $< > $@ diff --git a/helm/www/lambdadelta/bin/a.ml b/helm/www/lambdadelta/bin/a.ml deleted file mode 100644 index 4f310c873..000000000 --- a/helm/www/lambdadelta/bin/a.ml +++ /dev/null @@ -1,17 +0,0 @@ -let f = "0123456789abcdef" - -let r, g, b = 1.0, 0.5, 0.0 - -let h = 1. /. 2. - -let mk_h x = x +. (1. -. x) *. h - -let rr, gg, bb = mk_h r, mk_h g, mk_h b - -let mk_f x = - let x = int_of_float x in - print_char f.[x / 16]; print_char f.[x mod 16] - -let _ = - mk_f (rr *. 255.); mk_f (gg *. 255.); mk_f (bb *. 255.); - print_newline () diff --git a/helm/www/lambdadelta/bin/index/Makefile b/helm/www/lambdadelta/bin/index/Makefile deleted file mode 100644 index faf88603f..000000000 --- a/helm/www/lambdadelta/bin/index/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -EXECS = index - -REQUIRES = unix - -include ../Makefile.common - -test: -# @$(MAKE) --no-print-directory -C ../../ www - -.PHONY: test diff --git a/helm/www/lambdadelta/bin/index/index.ml b/helm/www/lambdadelta/bin/index/index.ml deleted file mode 100644 index 9496cc7d2..000000000 --- a/helm/www/lambdadelta/bin/index/index.ml +++ /dev/null @@ -1,123 +0,0 @@ -module KF = Filename -module KP = Printf -module KU = Unix - -type status = { -(* base directory *) - bd: string; -(* input prefix *) - ip: string; -(* output prefix *) - op: string; -(* current path *) - cp: string list -} - -let initial_status = { - bd = ""; ip = ""; op = ""; - cp = []; -} - -let imp_st = ref initial_status - -let i_ext = ".ld.ldw.xml" -let o_ext = ".ld.html" - -let concats l = - List.fold_left KF.concat "" l - -let concat st dname = {st with - ip = KF.concat st.ip dname; op = KF.concat st.op dname; -} - -let normalize dname = - if dname = KF.current_dir_name then "" else dname - -let mk_rlink s_to s_body = - KP.sprintf "%s" s_to s_body - -let out_entry st dname och dirs name = - let iname = concats [st.bd; st.ip; dname; name] in - let stats = KU.lstat iname in - match stats.KU.st_kind with - | KU.S_REG when KF.check_suffix name i_ext -> - let base = KF.chop_suffix name i_ext in - let oname = concats [st.bd; st.op; dname; base^o_ext] in - KP.fprintf och " \n" oname base; - dirs - | KU.S_DIR -> - let oname = concats [st.bd; st.op; dname; name] in - KP.fprintf och " \n" oname name; - name :: dirs - | _ -> - dirs - -let mk_path st och = - let path = String.concat "/" (List.rev st.cp) in - KP.fprintf och " Contents of %s/\n" path - -let list_dir st dname och = - let iname = concats [st.bd; st.ip; dname] in - let dir = Sys.readdir iname in - Array.sort String.compare dir; - KP.fprintf och " \n"; - let dirs = Array.fold_left (out_entry st dname och) [] dir in - KP.fprintf och " \n"; - dirs - -let out_index st dname och = - KP.fprintf och "\n\n"; - KP.fprintf och "\n"; - KP.fprintf och " \n"; - KP.fprintf och " Index\n"; - KP.fprintf och " \n"; - mk_path st och; - KP.fprintf och " \n"; - KP.fprintf och " \n"; - let dirs = list_dir st dname och in - KP.fprintf och " \n"; - KP.fprintf och "
\n"; - KP.fprintf och "
\n"; - dirs - -let rec out_dir st dname = - let s_to, s_body = - if dname = "" - then concats [st.bd; st.op], "ld:" - else concats [st.bd; st.op; dname], dname - in - let st = {st with cp = mk_rlink s_to s_body :: st.cp} in - let oname = concats [st.bd; st.ip; dname; "index.ldw.xml"] in - let och = open_out oname in - let dirs = out_index st dname och in - close_out och; - let map st = out_dir (concat st dname) in - List.iter (map st) dirs - -let help_b = " Set this base directory" -let help_i = " Set this input prefix" -let help_o = " Set this output prefix" -let help = "Usage: index [ -bio | ]*" - -let set_b bd = - imp_st := {!imp_st with bd = normalize bd} - -let set_i ip = - imp_st := {!imp_st with ip = normalize ip} - -let set_o op = - imp_st := {!imp_st with op = normalize op} - -let process dname = - out_dir !imp_st (normalize dname) - -let main = - Arg.parse [ - "-b", Arg.String set_b, help_b; - "-i", Arg.String set_i, help_i; - "-o", Arg.String set_o, help_o; - ] process help diff --git a/helm/www/lambdadelta/bin/inline/Makefile b/helm/www/lambdadelta/bin/inline/Makefile deleted file mode 100644 index 60ad8b773..000000000 --- a/helm/www/lambdadelta/bin/inline/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -EXECS = inline - -REQUIRES = - -include ../Makefile.common - -test: - @./inline.native -p ../lambdadelta/*/deps.txt > deps.txt - @../matitadep/matitadep.native -c ../lambdadelta/.depend deps.txt > redundant.txt - @./inline.native -i -b ../lambdadelta redundant.txt ../lambdadelta/*/deps.txt - -.PHONY: test diff --git a/helm/www/lambdadelta/bin/inline/inline.ml b/helm/www/lambdadelta/bin/inline/inline.ml deleted file mode 100644 index 905f7ec4d..000000000 --- a/helm/www/lambdadelta/bin/inline/inline.ml +++ /dev/null @@ -1,162 +0,0 @@ -module Deps = Set.Make(String) -module Table = Map.Make(String) - -let opt_map f = function - | None -> None - | Some a -> Some (f a) - -let rec filename_split l s = - let dir, base = Filename.dirname s, Filename.basename s in - if dir = Filename.current_dir_name then base::l else filename_split (base::l) dir - -let filename_concat l = - String.concat Filename.dir_sep l - -let relative s = - match filename_split [] s with - | "cic:" :: "matita" :: "lambdadelta" :: tl -> List.rev tl - | _ -> [] - -let to_string l = - filename_concat (List.rev l) - -let table = ref (Table.empty: Deps.t Table.t) - -let add src dep = - let deps = match Table.find_opt src !table with - | None -> Deps.singleton dep - | Some deps -> Deps.add dep deps - in - table := Table.add src deps !table - -let split_or s = - let map m = Printf.sprintf "or_%u" m in - try Scanf.sscanf s "or%u" map - with Scanf.Scan_failure _ | End_of_file -> "" - -let split_and s = - let map m = Printf.sprintf "and_%u" m in - try Scanf.sscanf s "and%u" map - with Scanf.Scan_failure _ | End_of_file -> "" - -let split_ex s = - let map m n = Printf.sprintf "ex_%u_%u" m n in - try Scanf.sscanf s "ex%u=%u" map - with Scanf.Scan_failure _ | End_of_file -> "" - -let split_ex1 s = - let map m = Printf.sprintf "ex_%u_1" m in - try Scanf.sscanf s "ex%u" map - with Scanf.Scan_failure _ | End_of_file -> "" - -let map_deps s1 s2 = - match relative s2 with - | [b2;"xoa";"xoa";"ground_2"] -> - let r1 = List.tl (relative s1) in - let r1 = to_string r1 in - let b2 = Filename.remove_extension b2 in -(* '_' is accepted (and ignored) within integer literals *) - let b2 = String.concat "=" (String.split_on_char '_' b2) in - let r2 = - let cx = split_ex b2 in - let cy = split_ex1 b2 in - let ca = split_and b2 in - let co = split_or b2 in - if cx <> "" then cx else - if cy <> "" then cy else - if ca <> "" then ca else - if co <> "" then co else - failwith (Printf.sprintf "unrecognized xoa: %S\n" b2) - in - if r1 <> "ground_2/xoa/xoa" then add r1 r2 - | _ -> () - -let reds = ref [] - -let map_reds s1 s2 = - reds := (s1,s2) :: !reds - -let rec read map_deps map_reds ich = - let line = input_line ich in - begin try Scanf.sscanf line "%S: %S" map_deps - with Scanf.Scan_failure _ | End_of_file -> - begin try Scanf.sscanf line "%S: redundant %S" map_reds - with Scanf.Scan_failure _ | End_of_file -> - Printf.eprintf "unknown line: %s.\n" line - end - end; - read map_deps map_reds ich - -let xoadir = ref "ground_2/xoa" - -let print_deps () = - let map_d src dep = - let src = src^".ma" in - let dep = Filename.concat !xoadir (dep^".ma") in - if List.mem (src,dep) !reds then () - else Printf.printf "%S: %S\n" src dep - in - let map_t src deps = - Deps.iter (map_d src) deps - in - Table.iter map_t !table - -let rec copy xn ich och = - if xn = Some 0 then () - else begin - Printf.fprintf och "%s\n" (input_line ich); - copy (opt_map pred xn) ich och - end - -let base_dir = ref "" - -let preamble = ref 14 - -let insert_deps () = - let map_d src dep rdeps = - let dep = Filename.concat !xoadir (dep^".ma") in - if List.mem (src,dep) !reds then rdeps else dep::rdeps - in - let map_r och rdep = - Printf.fprintf och "include %S.\n" rdep; - in - let map_t src deps = - let src = src^".ma" in - let rdeps = Deps.fold (map_d src) deps [] in - if rdeps <> [] then begin - let ma = Filename.concat !base_dir src in - let old = ma^".old" in - Sys.rename ma old; - let och = open_out ma in - let ich = open_in old in - copy (Some !preamble) ich och; - List.iter (map_r och) (List.rev rdeps); - try copy None ich och - with End_of_file -> close_in ich; close_out och - end - in - Table.iter map_t !table - -let process fname = - let ich = open_in fname in - try read map_deps map_reds ich with - | End_of_file -> close_in ich - -let help_b = " Set this base directory (default: current directory)" -let help_i = " Insert the dependences (default: no)" -let help_l = " .ma preamble has theese lines (default: 14)" -let help_p = " Print the dependences to be inserted (default: no)" -let help = "inline [ -ip | -b | -l | ]*" - -let print = ref false -let insert = ref false - -let _ = - Arg.parse [ - "-b", Arg.String ((:=) base_dir), help_b; - "-l", Arg.Int ((:=) preamble), help_l; - "-i", Arg.Set insert, help_i; - "-p", Arg.Set print, help_p; - ] process help; - if !print then print_deps (); - if !insert then insert_deps () diff --git a/helm/www/lambdadelta/bin/xhtbl/Makefile b/helm/www/lambdadelta/bin/xhtbl/Makefile deleted file mode 100644 index c56f2d8d7..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -EXECS = xhtbl - -REQUIRES = str - -include ../Makefile.common - -test: - @$(MAKE) --no-print-directory -C ../../ www - -.PHONY: test diff --git a/helm/www/lambdadelta/bin/xhtbl/attr.ml b/helm/www/lambdadelta/bin/xhtbl/attr.ml deleted file mode 100644 index 36b3d0003..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/attr.ml +++ /dev/null @@ -1,20 +0,0 @@ -module L = List - -module T = Table - -(* true for a row specification *) -type 'a atom = 'a * bool * int option * int option - -type 'a atoms = 'a atom list - -let get_attr concat null a y x = - let map y x (c, b, x1, x2) = match b, x1, x2 with - | _ , None, None -> c - | false, None, Some c2 -> if x <= c2 then c else null - | false, Some c1, None -> if x >= c1 then c else null - | false, Some c1, Some c2 -> if x >= c1 && x <= c2 then c else null - | true , None, Some r2 -> if y <= r2 then c else null - | true , Some r1, None -> if y >= r1 then c else null - | true , Some r1, Some r2 -> if y >= r1 && y <= r2 then c else null - in - concat (L.map (map y x) a) diff --git a/helm/www/lambdadelta/bin/xhtbl/fold.ml b/helm/www/lambdadelta/bin/xhtbl/fold.ml deleted file mode 100644 index 752b06d77..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/fold.ml +++ /dev/null @@ -1,25 +0,0 @@ -module T = Table - -type 'a fold_cb = { - open_table : 'a -> T.table -> 'a; - close_table: 'a -> T.table -> 'a; - map_key : 'a -> T.key -> 'a; - open_line : bool -> 'a -> 'a; - close_line : bool -> 'a -> 'a; - open_entry : bool -> 'a -> 'a; - close_entry: bool -> 'a -> 'a -> 'a; -} - -let map h g f a b = h a (g (f a) b) - -let rec fold_table cb a t = - let a = cb.open_table a t in - let a = fold_entry cb a t.T.te in - cb.close_table a t - -and fold_entry cb a = function - | T.Key k -> cb.map_key a k - | T.Line (r, ts) -> - let a = cb.open_line r a in - let a = List.fold_left (map (cb.close_entry r) (fold_table cb) (cb.open_entry r)) a ts in - cb.close_line r a diff --git a/helm/www/lambdadelta/bin/xhtbl/matrix.ml b/helm/www/lambdadelta/bin/xhtbl/matrix.ml deleted file mode 100644 index 1c65c5004..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/matrix.ml +++ /dev/null @@ -1,63 +0,0 @@ -module A = Array -module N = Filename - -module T = Table - -type cell = { - ck: T.text list; (* contents *) - cc: T.css; (* css classes *) - cu: T.uri; (* uri *) - cx: T.ext; (* extension *) - cn: T.anchor; (* named anchor *) - cb: T.border; (* border *) -} - -type matrix = { - r: int; (* rows *) - c: int; (* columns *) - m: cell array array; (* matrix *) -} - -let strand a b = if a = "" then b else a - -let empty = { - ck = []; cc = []; cu = ""; cx = ""; cn = ""; cb = T.border false; -} - -let make ts = { - r = ts.T.rf; c = ts.T.cf; - m = A.make_matrix ts.T.rf ts.T.cf empty; -} - -let set_key m y x kl = - m.m.(y).(x) <- {m.m.(y).(x) with ck = kl} - -let set_attrs m y x c u e n = - m.m.(y).(x) <- {m.m.(y).(x) with - cc = c @ m.m.(y).(x).cc; - cu = u ^ m.m.(y).(x).cu; - cx = m.m.(y).(x).cx ^ e; - cn = strand m.m.(y).(x).cn n; - } - -let set_west m y x b = - let c = m.m.(y).(x) in - let cb = {c.cb with T.w = c.cb.T.w || b.T.w} in - m.m.(y).(x) <- {c with cb = cb} - -let set_north m y x b = - let c = m.m.(y).(x) in - let cb = {c.cb with T.n = c.cb.T.n || b.T.n} in - m.m.(y).(x) <- {c with cb = cb} - -let set_east m y x b = - if x < pred m.c then set_west m y (succ x) {b with T.w = b.T.e} else - let c = m.m.(y).(x) in - let cb = {c.cb with T.e = c.cb.T.e || b.T.e} in - m.m.(y).(x) <- {c with cb = cb} - -let set_south m y x b = - if y < pred m.r then set_north m (succ y) x {b with T.n = b.T.s} else - let c = m.m.(y).(x) in - let cb = {c.cb with T.s = c.cb.T.s || b.T.s} in - m.m.(y).(x) <- {c with cb = cb} diff --git a/helm/www/lambdadelta/bin/xhtbl/options.ml b/helm/www/lambdadelta/bin/xhtbl/options.ml deleted file mode 100644 index 21ebec1d9..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/options.ml +++ /dev/null @@ -1,39 +0,0 @@ -let output_dir_default = "" - -let baseuri_default = "" - -let debug_lexer_default = false - -let debug_pass_default = false - -let pass_default = false - -let output_dir = ref output_dir_default - -let baseuri = ref baseuri_default - -let debug_lexer = ref debug_lexer_default - -let d0 = ref debug_pass_default - -let d1 = ref debug_pass_default - -let d2 = ref debug_pass_default - -let e1 = ref debug_pass_default - -let e2 = ref debug_pass_default - -let p0 = ref pass_default - -let p1 = ref pass_default - -let p2 = ref pass_default - -let clear () = - output_dir := output_dir_default; - baseuri := baseuri_default; - debug_lexer := debug_lexer_default; - d0 := debug_pass_default; d1 := debug_pass_default; d2 := debug_pass_default; - e1 := debug_pass_default; e2 := debug_pass_default; - p0 := pass_default; p1 := pass_default; p2 := pass_default diff --git a/helm/www/lambdadelta/bin/xhtbl/pass1.ml b/helm/www/lambdadelta/bin/xhtbl/pass1.ml deleted file mode 100644 index bedd9619f..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/pass1.ml +++ /dev/null @@ -1,88 +0,0 @@ -module L = List - -module T = Table -module F = Fold - -type status = { - ts: T.size; (* current dimensions *) - tc: T.css; (* current class *) - tu: T.uri; (* current uri *) - tx: T.ext; (* current extension *) -} - -let empty = { - ts = T.no_size; tc = []; tu = ""; tx = "" -} - -let init b ts = - if b then - {ts with T.ri = max_int; T.ci = 0} - else - {ts with T.ri = 0; T.ci = max_int} - -let combine b ts1 ts2 = - if b then - {ts1 with - T.rf = max ts1.T.rf ts2.T.rf; T.ri = min ts1.T.ri ts2.T.ri; - T.cf = ts1.T.cf + ts2.T.cf; T.ci = ts1.T.ci + ts2.T.ci; - } - else - {ts1 with - T.cf = max ts1.T.cf ts2.T.cf; T.ci = min ts1.T.ci ts2.T.ci; - T.rf = ts1.T.rf + ts2.T.rf; T.ri = ts1.T.ri + ts2.T.ri; - } - -let deinit ts = {ts with - T.ri = if ts.T.ri = max_int then 0 else ts.T.ri; - T.ci = if ts.T.ci = max_int then 0 else ts.T.ci; -} - -(****************************************************************************) - -let open_table st t = - t.T.tc <- t.T.tc @ st.tc; t.T.tu <- st.tu ^ t.T.tu; t.T.tx <- st.tx ^ t.T.tx; - {st with tc = t.T.tc; tu = t.T.tu; tx = t.T.tx} - -let close_table st t = - t.T.ts <- st.ts; st - -let map_key st k = - let ts = match k, st.ts.T.p with - | T.Text _ , _ -> - {st.ts with T.rf = 1; T.cf = 1; T.ri = 0; T.ci = 0} - | T.Glue None , _ -> - {st.ts with T.rf = 0; T.cf = 0; T.ri = 1; T.ci = 1} - | T.Glue Some g, Some false -> - {st.ts with T.rf = g; T.cf = 0; T.ri = 0; T.ci = 1} - | T.Glue Some g, Some true -> - {st.ts with T.rf = 0; T.cf = g; T.ri = 1; T.ci = 0} - | T.Glue Some g, None -> - {st.ts with T.rf = g; T.cf = g; T.ri = 0; T.ci = 0} - in - {st with ts = ts} - -let open_line b st = - let ts = init b st.ts in - let ts = {ts with T.rf = 0; T.cf = 0} in - {st with ts = ts} - -let open_entry b st = - let ts = {st.ts with T.p = Some b} in - {st with ts = ts} - -let close_entry b st sst = - {st with ts = combine b st.ts sst.ts} - -let close_line b st = - {st with ts = deinit st.ts} - -let cb = { - F.open_table = open_table; F.close_table = close_table; - F.open_line = open_line; F.close_line = close_line; - F.open_entry = open_entry; F.close_entry = close_entry; - F.map_key = map_key; -} - -let process t = - let st = F.fold_table cb empty t in - st.ts diff --git a/helm/www/lambdadelta/bin/xhtbl/pass2.ml b/helm/www/lambdadelta/bin/xhtbl/pass2.ml deleted file mode 100644 index 549d7654e..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/pass2.ml +++ /dev/null @@ -1,139 +0,0 @@ -module O = Options -module T = Table -module M = Matrix -module F = Fold - -type status = { - ts: T.size; (* current dimensions *) - tm: M.matrix; (* current matrix *) -} - -let initial t m = { - ts = {t.T.ts with T.ri = 0; T.ci = 0}; - tm = m; -} - -let resize b sts tts = - if b then begin (* parent is a row *) - if tts.T.rf < sts.T.rf && tts.T.ri = 0 then - failwith "underful column"; - {tts with T.rf = sts.T.rf; T.cf = tts.T.cf + sts.T.ci * tts.T.ci} - end else begin (* parent is a column *) - if tts.T.cf < sts.T.cf && tts.T.ci = 0 then - failwith "underful row"; - {tts with T.cf = sts.T.cf; T.rf = tts.T.rf + sts.T.ri * tts.T.ri} - end - -let fill b sts tts = - if b then (* parent is a row *) - {sts with T.ri = - let rf, ri = sts.T.rf - tts.T.rf, tts.T.ri in - if ri = 0 then 0 else - if rf mod ri = 0 then rf / ri else - failwith "fracted column" - } - else (* parent is a column *) - {sts with T.ci = - let cf, ci = sts.T.cf - tts.T.cf, tts.T.ci in - if ci = 0 then 0 else - if cf mod ci = 0 then cf / ci else - failwith "fracted row" - } - -let place b sts tts = - if b then (* parent is a row *) - {sts with T.x = sts.T.x + tts.T.cf} - else (* parent is a column *) - {sts with T.y = sts.T.y + tts.T.rf} - -let set_key st t = match t.T.te with - | T.Key (T.Text sl) -> M.set_key st.tm t.T.ts.T.y t.T.ts.T.x sl - | _ -> () - -let set_attrs st t = - let rec aux y x = - if y >= t.T.ts.T.rf then () else - if x >= t.T.ts.T.cf then aux (succ y) 0 else begin - M.set_attrs st.tm (t.T.ts.T.y + y) (t.T.ts.T.x + x) t.T.tc t.T.tu t.T.tx t.T.tn; - aux y (succ x) - end - in - match t.T.te with - | T.Key _ -> aux 0 0 - | _ -> () - -let set_borders st t = - let rec aux_we y = - if y >= t.T.ts.T.rf then () else begin - M.set_west st.tm (t.T.ts.T.y + y) t.T.ts.T.x t.T.tb; - if t.T.ts.T.cf > 0 then - M.set_east st.tm (t.T.ts.T.y + y) (t.T.ts.T.x + pred t.T.ts.T.cf) t.T.tb; - aux_we (succ y) - end - in - let rec aux_ns x = - if x >= t.T.ts.T.cf then () else begin - M.set_north st.tm t.T.ts.T.y (t.T.ts.T.x + x) t.T.tb; - if t.T.ts.T.rf > 0 then - M.set_south st.tm (t.T.ts.T.y + pred t.T.ts.T.rf) (t.T.ts.T.x + x) t.T.tb; - aux_ns (succ x) - end - in - match t.T.te with - | T.Line (true, _) -> aux_we 0; aux_ns 0 - | _ -> () - -let print st t = - if !O.e2 then - Printf.printf "#%u: (%u+%u, %u+%u) - (%u+%u, %u+%u)\n" - t.T.ti - t.T.ts.T.rf t.T.ts.T.ri - t.T.ts.T.cf t.T.ts.T.ci - st.ts.T.rf st.ts.T.ri - st.ts.T.cf st.ts.T.ci - -(****************************************************************************) - -let open_table st t = - print st t; - let ts = match t.T.ts.T.p with - | None -> - let ts = fill false st.ts t.T.ts in - let ts = fill true ts t.T.ts in - t.T.ts <- resize false st.ts t.T.ts; - t.T.ts <- resize true st.ts t.T.ts; - ts - | Some b -> - let ts = fill b st.ts t.T.ts in - t.T.ts <- resize b st.ts t.T.ts; - ts - in - t.T.ts <- {t.T.ts with T.ri = 0; T.ci = 0; T.x = st.ts.T.x; T.y = st.ts.T.y}; - let ts = {ts with T.rf = t.T.ts.T.rf; T.cf = t.T.ts.T.cf} in - let st = {st with ts = ts} in - print st t; st - -let close_table st t = - set_key st t; set_attrs st t; set_borders st t; st - -let map_key st k = st - -let open_line b st = st - -let open_entry b st = st - -let close_entry b st sst = - let ts = place b st.ts sst.ts in - {st with ts = ts} - -let close_line b st = st - -let cb = { - F.open_table = open_table; F.close_table = close_table; - F.open_line = open_line; F.close_line = close_line; - F.open_entry = open_entry; F.close_entry = close_entry; - F.map_key = map_key; -} - -let process t m = - let _ = F.fold_table cb (initial t m) t in () diff --git a/helm/www/lambdadelta/bin/xhtbl/pass3.ml b/helm/www/lambdadelta/bin/xhtbl/pass3.ml deleted file mode 100644 index d2455a30a..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/pass3.ml +++ /dev/null @@ -1,32 +0,0 @@ -module L = List -module S = String -module V = Array - -module T = Table -module M = Matrix -module A = Attr - -type status = { - m: M.matrix; - c: T.css A.atoms; - u: T.uri A.atoms; - x: T.ext A.atoms; -} - -let initial c u x m = { - m = m; c = c; u = u; x = x -} - -let process_cell st y x c = - M.set_attrs st.m y x - (A.get_attr L.concat [] st.c y x) - (A.get_attr (S.concat "") "" st.u y x) - (A.get_attr (S.concat "") "" st.x y x) - "" - -let process_row st y row = - V.iteri (process_cell st y) row - -let process css uri ext matrix = - let st = initial css uri ext matrix in - V.iteri (process_row st) matrix.M.m diff --git a/helm/www/lambdadelta/bin/xhtbl/table.ml b/helm/www/lambdadelta/bin/xhtbl/table.ml deleted file mode 100644 index d3ee13bfa..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/table.ml +++ /dev/null @@ -1,70 +0,0 @@ -type css = string list - -type uri = string - -type ext = string - -type anchor = string - -type absolute = bool - -type size = { - y : int; (* first row *) - x : int; (* first column *) - rf: int; (* finite rows *) - cf: int; (* finite columns *) - ri: int; (* infinite rows *) - ci: int; (* infinite columns *) - p : bool option; (* parent kind *) -} - -type border = { - n: bool; (* north *) - s: bool; (* south *) - e: bool; (* east *) - w: bool; (* west *) -} - -type text = Plain of string - | Link of absolute * string * string - -type key = Text of text list - | Glue of int option - -type table = { - tn: anchor; (* named anchor *) - mutable tc: css; (* css classes *) - mutable tu: uri; (* uri *) - mutable tx: ext; (* uri extension *) - mutable ts: size; (* dimension *) - tb: border; (* border *) - te: entry; (* contents *) - ti: int; (* table identifier *) -} - -and entry = Key of key - | Line of bool * table list (* true for a row *) - -let id = - let current = ref 0 in - fun () -> incr current; !current - -let no_size = { - y = 0; x = 0; rf = 0; cf = 0; ri = 0; ci = 0; p = None; -} - -let border b = { - n = b; s = b; e = b; w = b; -} - -let mk_key k tc tu tx tn = { - ts = no_size; tb = border false; te = Key k; - tc = tc; tu = tu; tx = tx; tn = tn; - ti = id (); -} - -let mk_line b tl tc tu tx tn = { - ts = no_size; tb = border b; te = Line (b, tl); - tc = tc; tu = tu; tx = tx; tn = tn; - ti = id (); -} diff --git a/helm/www/lambdadelta/bin/xhtbl/textLexer.mll b/helm/www/lambdadelta/bin/xhtbl/textLexer.mll deleted file mode 100644 index 4b06e4c40..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/textLexer.mll +++ /dev/null @@ -1,47 +0,0 @@ -{ - module S = String - - module O = Options - module TP = TextParser - - let out s = if !O.debug_lexer then prerr_endline s -} - -let SPC = ['\r' '\n' '\t' ' ']+ -let QT = "\"" -let NUM = ['0'-'9']+ - -rule token = parse - | SPC { token lexbuf } - | QT { let s = str lexbuf in - out s; TP.TEXT s } - | NUM as s { out s; TP.NUM (int_of_string s) } - | "(*" { block lexbuf; token lexbuf } - | "{" { out "{"; TP.OC } - | "}" { out "}"; TP.CC } - | "[" { out "["; TP.OB } - | "]" { out "]"; TP.CB } - | "*" { out "*"; TP.SR } - | "^" { out "^"; TP.CF } - | "+" { out "+"; TP.PS } - | "(" { out "("; TP.OP } - | ")" { out ")"; TP.CP } - | "@" { out ")"; TP.AT } - | "space" { out "space"; TP.SPACE } - | "name" { out "name"; TP.NAME } - | "table" { out "table"; TP.TABLE } - | "class" { out "class"; TP.CSS } - | "uri" { out "uri"; TP.URI } - | "ext" { out "ext"; TP.EXT } - | eof { TP.EOF } -and str = parse - | QT { "" } - | "\\\\" { "\\" ^ str lexbuf } - | "\\\"" { "\"" ^ str lexbuf } - | _ as c { S.make 1 c ^ str lexbuf } -and block = parse - | "*)" { () } - | "(*" { block lexbuf; block lexbuf } - | QT { let _ = str lexbuf in - block lexbuf } - | _ { block lexbuf } diff --git a/helm/www/lambdadelta/bin/xhtbl/textParser.mly b/helm/www/lambdadelta/bin/xhtbl/textParser.mly deleted file mode 100644 index 9072c2b23..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/textParser.mly +++ /dev/null @@ -1,147 +0,0 @@ -%{ - -module S = Str -module L = List -module T = Table - -let split s = - S.split (S.regexp "[ \r\n\t]+") s - -let mk_css_atom s rs = - let cs = split s in - let map (b, (x1, x2)) = cs, b, x1, x2 in - L.map map rs - -let mk_string_atom s rs = - let map (b, (x1, x2)) = s, b, x1, x2 in - L.map map rs - -%} - -%token NUM -%token TEXT -%token SPACE NAME TABLE CSS URI EXT SR OC CC OB CB PS CF OP CP AT EOF - -%start script -%type <(string * string) list * (string * Table.table * Table.css Attr.atoms * Table.uri Attr.atoms * Table.ext Attr.atoms) list> script - -%% - -space: - | SPACE TEXT TEXT { $2, $3 } -; - -spaces: - | { [] } - | space spaces { $1 :: $2 } -; - -text: - | TEXT { T.Plain $1 } - | AT OP TEXT TEXT CP { T.Link (true, $3, $4) } - | AT AT OP TEXT TEXT CP { T.Link (false, $4, $5) } - | AT TEXT { T.Link (true, $2, $2) } - | AT AT TEXT { T.Link (false, $3, $3) } -; - -texts: - | text { [$1] } - | text PS texts { $1 :: T.Plain " " :: $3 } - | text CF texts { $1 :: $3 } -; - -key: - | texts { T.Text $1 } - | SR { T.Glue None } - | NUM { T.Glue (Some $1) } -; - -css: - | { [] } - | CSS TEXT { split $2 } -; - -uri: - | { "" } - | URI TEXT { $2 } -; - -ext: - | { "" } - | EXT TEXT { $2 } -; - -table: - | css uri ext name key { T.mk_key $5 $1 $2 $3 $4 } - | css uri ext OC tables CC { T.mk_line false $5 $1 $2 $3 "" } - | css uri ext OB tables CB { T.mk_line true $5 $1 $2 $3 "" } -; - -tables: - | { [] } - | table tables { $1 :: $2 } -; - -name: - | { "" } - | NAME TEXT { $2 } -; - -interval: - | NUM { Some $1, Some $1 } - | SR { None, None } - | NUM NUM { Some $1, Some $2 } - | NUM SR { Some $1, None } - | SR NUM { None, Some $2 } - | SR SR { None, None } -; - -range: - | OB interval CB { true, $2 } - | OC interval CC { false, $2 } -; - -ranges: - | { [] } - | range ranges { $1 :: $2 } -; - -catom: - | CSS TEXT ranges { mk_css_atom $2 $3 } -; - -catoms: - | { [] } - | catom catoms { $1 @ $2 } -; - -uatom: - | URI TEXT ranges { mk_string_atom $2 $3 } -; - -uatoms: - | { [] } - | uatom uatoms { $1 @ $2 } -; - -xatom: - | EXT TEXT ranges { mk_string_atom $2 $3 } -; - -xatoms: - | { [] } - | xatom xatoms { $1 @ $2 } -; - -directive: - | name TABLE table catoms uatoms xatoms { $1, $3, $4, $5, $6 } -; - -directives: - | { [] } - | directive directives { $1 :: $2 } -; - -script: - | spaces directives EOF { $1, $2 } -; diff --git a/helm/www/lambdadelta/bin/xhtbl/textUnparser.ml b/helm/www/lambdadelta/bin/xhtbl/textUnparser.ml deleted file mode 100644 index cf7724cdd..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/textUnparser.ml +++ /dev/null @@ -1,101 +0,0 @@ -module L = List -module P = Printf -module S = String - -module T = Table -module F = Fold - -type status = { - i: int; (* indentation *) - out: string -> unit; (* output function *) -} - -let home = { - i = 0; out = print_string -} - -let indent st = - S.make st.i ' ' - -let add st = {st with i = st.i + 3} - -let sub st = {st with i = st.i - 3} - -let parent = function - | None -> "key" - | Some false -> "col" - | Some true -> "row" - -let size ts = - P.sprintf "(%u, %u); (%u+%u, %u+%u); %s" - ts.T.y ts.T.x ts.T.rf ts.T.ri ts.T.cf ts.T.ci (parent ts.T.p) - -let border tb = - let str = S.make 4 ' ' in - if tb.T.w then str.[0] <- 'W'; - if tb.T.n then str.[1] <- 'N'; - if tb.T.e then str.[2] <- 'E'; - if tb.T.s then str.[3] <- 'S'; - str - -let css tc = - P.sprintf "\"%s\"" (S.concat " " tc) - -let uri tu tx = - P.sprintf "@\"%s\" \"%s\"" tu tx - -let name tn = - P.sprintf "$\"%s\"" tn - - -let text = function - | T.Plain s -> P.sprintf "\"%s\"" s - | T.Link (true, uri, s) -> P.sprintf "@(\"%s\" \"%s\")" uri s - | T.Link (false, uri, s) -> P.sprintf "@@(\"%s\" \"%s\")" uri s - -let key = function - | T.Text sl -> S.concat " ^ " (L.map text sl) - | T.Glue None -> "*" - | T.Glue (Some i) -> P.sprintf "%u" i - -let entry = function - | false -> "column" - | true -> "row" - -(****************************************************************************) - -let open_table st t = - let str = - P.sprintf "%s[{#%u: %s; %s; %s; %s; %s}\n" - (indent st) t.T.ti (size t.T.ts) (border t.T.tb) (css t.T.tc) (uri t.T.tu t.T.tx) (name t.T.tn) - in - st.out str; add st - -let close_table st t = - let st = sub st in - let str = P.sprintf "%s]\n" (indent st) in - st.out str; st - -let map_key st k = - let str = P.sprintf "%s%s\n" (indent st) (key k) in - st.out str; st - -let open_line b st = - let str = P.sprintf "%s%s\n" (indent st) (entry b) in - st.out str; st - -let close_line b st = st - -let open_entry b st = st - -let close_entry b st sst = st - -let cb = { - F.open_table = open_table; F.close_table = close_table; - F.open_line = open_line; F.close_line = close_line; - F.open_entry = open_entry; F.close_entry = close_entry; - F.map_key = map_key; -} - -let debug t = - let _ = F.fold_table cb home t in () diff --git a/helm/www/lambdadelta/bin/xhtbl/xhtbl.ml b/helm/www/lambdadelta/bin/xhtbl/xhtbl.ml deleted file mode 100644 index 6c5f8b01f..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/xhtbl.ml +++ /dev/null @@ -1,77 +0,0 @@ -module A = Arg -module F = Filename -module L = List - -module O = Options -module TP = TextParser -module TL = TextLexer -module TU = TextUnparser -module P1 = Pass1 -module P2 = Pass2 -module P3 = Pass3 -module M = Matrix -module XU = XmlUnparser - -let help = "Usage: xhtbl [ -LX | -O | -d0 | -d1 | -d2 | -e1 | -e2 | -p0 | -p1 | -p2 | ]*" -let help_L = " Output lexer tokens" -let help_O = " Set this output directory" -let help_X = " Clear all options" -let help_b = " Set this base uri for relative links" -let help_d0 = " Output table contents after phase zero (parsing)" -let help_d1 = " Output table contents after phase one (sizing)" -let help_d2 = " Output table contents after phase two (filling)" -let help_e1 = " Disabled" -let help_e2 = " Output debug information during phase two (filling)" -let help_p0 = " Process until phase zero (parsing)" -let help_p1 = " Process until phase one (sizing)" -let help_p2 = " Process until phase two (filling)" - -let hook = "xhtbl" - -let includes, tables = ref [], ref [] - -let process_directive och bname (name, table, css, uri, ext) = - tables := name :: !tables; - if !O.d0 then TU.debug table; - if not !O.p0 then begin - let size = P1.process table in - if !O.d1 then TU.debug table; - if not !O.p1 then begin - let matrix = M.make size in - let _ = P2.process table matrix in - if !O.d2 then TU.debug table; - if not !O.p2 then P3.process css uri ext matrix; - let name = if name = "" then bname else name in - XU.output och name matrix - end - end - -let process_file fname = - let bname = F.chop_extension (F.basename fname) in - let ich = open_in fname in - let lexbuf = Lexing.from_channel ich in - let ns, ds = TP.script TL.token lexbuf in - close_in ich; includes := bname :: !includes; - let ns = ("", "http://www.w3.org/1999/xhtml") :: ns in - let och = XU.open_out bname ns in - L.iter (process_directive och bname) ds; - XU.close_out och - -let main () = - A.parse [ - "-L", A.Set O.debug_lexer, help_L; - "-O", A.String ((:=) O.output_dir), help_O; - "-X", A.Unit O.clear, help_X; - "-b", A.String ((:=) O.baseuri), help_b; - "-d0", A.Set O.d0, help_d0; - "-d1", A.Set O.d1, help_d1; - "-d2", A.Set O.d2, help_d2; - "-e1", A.Set O.e1, help_e1; - "-e2", A.Set O.e2, help_e2; - "-p0", A.Set O.p0, help_p0; - "-p1", A.Set O.p1, help_p1; - "-p2", A.Set O.p2, help_p2; - ] process_file help; - XU.write_hook hook !includes !tables - -let _ = main () diff --git a/helm/www/lambdadelta/bin/xhtbl/xmlUnparser.ml b/helm/www/lambdadelta/bin/xhtbl/xmlUnparser.ml deleted file mode 100644 index 2f29e4bb7..000000000 --- a/helm/www/lambdadelta/bin/xhtbl/xmlUnparser.ml +++ /dev/null @@ -1,104 +0,0 @@ -module A = Array -module F = Filename -module L = List -module P = Printf -module S = String - -module O = Options -module T = Table -module M = Matrix - -let xhtbl = "xhtbl" - -let i = 0 - -let myself = F.basename (Sys.argv.(0)) - -let msg = P.sprintf "This file was generated by %s, do not edit" myself - -let compose uri ext = - if uri.[pred (S.length uri)] = '/' then uri else - try - let i = S.index uri '#' in - let uri, fragment = S.sub uri 0 i, S.sub uri i (S.length uri - i) in - uri ^ ext ^ fragment - with Not_found -> uri ^ ext - -let border cell = - let str = S.make 4 'n' in - if cell.M.cb.T.n then str.[0] <- 's'; - if cell.M.cb.T.e then str.[1] <- 's'; - if cell.M.cb.T.s then str.[2] <- 's'; - if cell.M.cb.T.w then str.[3] <- 's'; - str :: cell.M.cc - -let text baseuri ext = function - | T.Plain s -> s - | T.Link (true, uri, s) -> P.sprintf "%s" uri s - | T.Link (false, uri, s) -> - let uri = !O.baseuri ^ baseuri ^ compose uri ext in - P.sprintf "%s" uri s - -let name cell = - if cell.M.cn = "" then "" else P.sprintf " id=\"%s\"" cell.M.cn - -let key cell = - if cell.M.ck = [] then "
" else S.concat "" (L.map (text cell.M.cu cell.M.cx) cell.M.ck) - -let ind i = S.make (2 * i) ' ' - -let out_cell och cell = - let cc = xhtbl :: border cell in - P.fprintf och "%s%s\n" - (ind (i+3)) (S.concat " " cc) (name cell) (key cell) - -let out_row och row = - P.fprintf och "%s\n" (ind (i+2)) xhtbl; - A.iter (out_cell och) row; - P.fprintf och "%s\n" (ind (i+2)) - -let out_space och (name, uri) = - let name = if name = "" then name else ":" ^ name in - P.fprintf och " xmlns%s=\"%s\"\n" name uri - -(****************************************************************************) - -let open_out name spaces = - let fname = F.concat !O.output_dir (P.sprintf "%s.xsl" name) in - let spaces = ("xsl", "http://www.w3.org/1999/XSL/Transform") :: spaces in - let och = open_out fname in - P.fprintf och "\n\n"; - P.fprintf och "\n\n" msg; - P.fprintf och "\n\n"; - och - -let output och name matrix = - P.fprintf och "\n" name; - P.fprintf och "%s\n" (ind (i+1)) xhtbl; - A.iter (out_row och) matrix.M.m; - P.fprintf och "%s
\n" (ind (i+1)); - P.fprintf och "
\n\n" - -let close_out och = - P.fprintf och "
\n"; - close_out och - -let map_incs och name = - P.fprintf och "\n" name - -let map_tbls och name = - P.fprintf och "%s\n" (ind (i+2)) name; - P.fprintf och "%s\n" (ind (i+3)) name; - P.fprintf och "%s\n" (ind (i+2)) - -let write_hook name incs tbls = - let och = open_out name [] in - L.iter (map_incs och) incs; - P.fprintf och "\n\n" name; - P.fprintf och "%s\n" (ind (i+1)); - L.iter (map_tbls och) tbls; - P.fprintf och "%s\n" (ind (i+1)); - P.fprintf och "\n\n"; - close_out och diff --git a/matita/matita/contribs/lambdadelta/basic_1/A/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/A/defs.ma deleted file mode 100644 index dc435ca87..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/A/defs.ma +++ /dev/null @@ -1,22 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/preamble.ma". - -inductive A: Type[0] \def -| ASort: nat \to (nat \to A) -| AHead: A \to (A \to A). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/A/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/A/fwd.ma deleted file mode 100644 index 9e2eb7d8e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/A/fwd.ma +++ /dev/null @@ -1,31 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/A/defs.ma". - -implied rec lemma A_rect (P: (A \to Type[0])) (f: (\forall (n: nat).(\forall -(n0: nat).(P (ASort n n0))))) (f0: (\forall (a: A).((P a) \to (\forall (a0: -A).((P a0) \to (P (AHead a a0))))))) (a: A) on a: P a \def match a with -[(ASort n n0) \Rightarrow (f n n0) | (AHead a0 a1) \Rightarrow (f0 a0 -((A_rect P f f0) a0) a1 ((A_rect P f f0) a1))]. - -implied lemma A_ind: - \forall (P: ((A \to Prop))).(((\forall (n: nat).(\forall (n0: nat).(P (ASort -n n0))))) \to (((\forall (a: A).((P a) \to (\forall (a0: A).((P a0) \to (P -(AHead a a0))))))) \to (\forall (a: A).(P a)))) -\def - \lambda (P: ((A \to Prop))).(A_rect P). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/C/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/C/defs.ma deleted file mode 100644 index 9d41d8ce5..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/C/defs.ma +++ /dev/null @@ -1,39 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -inductive C: Type[0] \def -| CSort: nat \to C -| CHead: C \to (K \to (T \to C)). - -rec definition cweight (c: C) on c: nat \def match c with [(CSort _) -\Rightarrow O | (CHead c0 _ t) \Rightarrow (plus (cweight c0) (tweight t))]. - -definition clt: - C \to (C \to Prop) -\def - \lambda (c1: C).(\lambda (c2: C).(lt (cweight c1) (cweight c2))). - -definition cle: - C \to (C \to Prop) -\def - \lambda (c1: C).(\lambda (c2: C).(le (cweight c1) (cweight c2))). - -rec definition CTail (k: K) (t: T) (c: C) on c: C \def match c with [(CSort -n) \Rightarrow (CHead (CSort n) k t) | (CHead d h u) \Rightarrow (CHead -(CTail k t d) h u)]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/C/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/C/fwd.ma deleted file mode 100644 index 43d43fc71..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/C/fwd.ma +++ /dev/null @@ -1,58 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -implied rec lemma C_rect (P: (C \to Type[0])) (f: (\forall (n: nat).(P (CSort -n)))) (f0: (\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P -(CHead c k t))))))) (c: C) on c: P c \def match c with [(CSort n) \Rightarrow -(f n) | (CHead c0 k t) \Rightarrow (f0 c0 ((C_rect P f f0) c0) k t)]. - -implied lemma C_ind: - \forall (P: ((C \to Prop))).(((\forall (n: nat).(P (CSort n)))) \to -(((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CHead c k -t))))))) \to (\forall (c: C).(P c)))) -\def - \lambda (P: ((C \to Prop))).(C_rect P). - -fact clt_wf__q_ind: - \forall (P: ((C \to Prop))).(((\forall (n: nat).((\lambda (P0: ((C \to -Prop))).(\lambda (n0: nat).(\forall (c: C).((eq nat (cweight c) n0) \to (P0 -c))))) P n))) \to (\forall (c: C).(P c))) -\def - let Q \def (\lambda (P: ((C \to Prop))).(\lambda (n: nat).(\forall (c: -C).((eq nat (cweight c) n) \to (P c))))) in (\lambda (P: ((C \to -Prop))).(\lambda (H: ((\forall (n: nat).(\forall (c: C).((eq nat (cweight c) -n) \to (P c)))))).(\lambda (c: C).(H (cweight c) c (refl_equal nat (cweight -c)))))). - -lemma clt_wf_ind: - \forall (P: ((C \to Prop))).(((\forall (c: C).(((\forall (d: C).((clt d c) -\to (P d)))) \to (P c)))) \to (\forall (c: C).(P c))) -\def - let Q \def (\lambda (P: ((C \to Prop))).(\lambda (n: nat).(\forall (c: -C).((eq nat (cweight c) n) \to (P c))))) in (\lambda (P: ((C \to -Prop))).(\lambda (H: ((\forall (c: C).(((\forall (d: C).((lt (cweight d) -(cweight c)) \to (P d)))) \to (P c))))).(\lambda (c: C).(clt_wf__q_ind -(\lambda (c0: C).(P c0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (c0: -C).(P c0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) -\to (Q (\lambda (c0: C).(P c0)) m))))).(\lambda (c0: C).(\lambda (H1: (eq nat -(cweight c0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall -(m: nat).((lt m n1) \to (\forall (c1: C).((eq nat (cweight c1) m) \to (P -c1)))))) H0 (cweight c0) H1) in (H c0 (\lambda (d: C).(\lambda (H3: (lt -(cweight d) (cweight c0))).(H2 (cweight d) H3 d (refl_equal nat (cweight -d))))))))))))) c)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/C/props.ma b/matita/matita/contribs/lambdadelta/basic_1/C/props.ma deleted file mode 100644 index dacd5482b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/C/props.ma +++ /dev/null @@ -1,115 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/fwd.ma". - -include "basic_1/T/props.ma". - -lemma cle_r: - \forall (c: C).(cle c c) -\def - \lambda (c: C).(C_ind (\lambda (c0: C).(le (cweight c0) (cweight c0))) -(\lambda (_: nat).(le_O_n O)) (\lambda (c0: C).(\lambda (_: (le (cweight c0) -(cweight c0))).(\lambda (_: K).(\lambda (t: T).(le_n (plus (cweight c0) -(tweight t))))))) c). - -lemma cle_head: - \forall (c1: C).(\forall (c2: C).((cle c1 c2) \to (\forall (u1: T).(\forall -(u2: T).((tle u1 u2) \to (\forall (k: K).(cle (CHead c1 k u1) (CHead c2 k -u2)))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (le (cweight c1) (cweight -c2))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (le (tweight u1) -(tweight u2))).(\lambda (_: K).(le_plus_plus (cweight c1) (cweight c2) -(tweight u1) (tweight u2) H H0))))))). - -lemma cle_trans_head: - \forall (c1: C).(\forall (c2: C).((cle c1 c2) \to (\forall (k: K).(\forall -(u: T).(cle c1 (CHead c2 k u)))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (le (cweight c1) (cweight -c2))).(\lambda (_: K).(\lambda (u: T).(le_plus_trans (cweight c1) (cweight -c2) (tweight u) H))))). - -lemma clt_cong: - \forall (c: C).(\forall (d: C).((clt c d) \to (\forall (k: K).(\forall (t: -T).(clt (CHead c k t) (CHead d k t)))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (H: (lt (cweight c) (cweight -d))).(\lambda (_: K).(\lambda (t: T).(lt_reg_r (cweight c) (cweight d) -(tweight t) H))))). - -lemma clt_head: - \forall (k: K).(\forall (c: C).(\forall (u: T).(clt c (CHead c k u)))) -\def - \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(eq_ind_r nat (plus (cweight -c) O) (\lambda (n: nat).(lt n (plus (cweight c) (tweight u)))) (lt_reg_l O -(tweight u) (cweight c) (tweight_lt u)) (cweight c) (plus_n_O (cweight c))))). - -lemma chead_ctail: - \forall (c: C).(\forall (t: T).(\forall (k: K).(ex_3 K C T (\lambda (h: -K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c k t) (CTail h u d)))))))) -\def - \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (t: T).(\forall (k: K).(ex_3 -K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c0 k t) -(CTail h u d))))))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (k: -K).(ex_3_intro K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C -(CHead (CSort n) k t) (CTail h u d))))) k (CSort n) t (refl_equal C (CHead -(CSort n) k t)))))) (\lambda (c0: C).(\lambda (H: ((\forall (t: T).(\forall -(k: K).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C -(CHead c0 k t) (CTail h u d)))))))))).(\lambda (k: K).(\lambda (t: -T).(\lambda (t0: T).(\lambda (k0: K).(let H_x \def (H t k) in (let H0 \def -H_x in (ex_3_ind K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C -(CHead c0 k t) (CTail h u d))))) (ex_3 K C T (\lambda (h: K).(\lambda (d: -C).(\lambda (u: T).(eq C (CHead (CHead c0 k t) k0 t0) (CTail h u d)))))) -(\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H1: (eq C (CHead -c0 k t) (CTail x0 x2 x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c1: -C).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead -c1 k0 t0) (CTail h u d))))))) (ex_3_intro K C T (\lambda (h: K).(\lambda (d: -C).(\lambda (u: T).(eq C (CHead (CTail x0 x2 x1) k0 t0) (CTail h u d))))) x0 -(CHead x1 k0 t0) x2 (refl_equal C (CHead (CTail x0 x2 x1) k0 t0))) (CHead c0 -k t) H1))))) H0))))))))) c). - -lemma clt_thead: - \forall (k: K).(\forall (u: T).(\forall (c: C).(clt c (CTail k u c)))) -\def - \lambda (k: K).(\lambda (u: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(clt -c0 (CTail k u c0))) (\lambda (n: nat).(clt_head k (CSort n) u)) (\lambda (c0: -C).(\lambda (H: (clt c0 (CTail k u c0))).(\lambda (k0: K).(\lambda (t: -T).(clt_cong c0 (CTail k u c0) H k0 t))))) c))). - -lemma c_tail_ind: - \forall (P: ((C \to Prop))).(((\forall (n: nat).(P (CSort n)))) \to -(((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t -c))))))) \to (\forall (c: C).(P c)))) -\def - \lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (n: nat).(P (CSort -n))))).(\lambda (H0: ((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: -T).(P (CTail k t c)))))))).(\lambda (c: C).(clt_wf_ind (\lambda (c0: C).(P -c0)) (\lambda (c0: C).(C_ind (\lambda (c1: C).(((\forall (d: C).((clt d c1) -\to (P d)))) \to (P c1))) (\lambda (n: nat).(\lambda (_: ((\forall (d: -C).((clt d (CSort n)) \to (P d))))).(H n))) (\lambda (c1: C).(\lambda (_: -((((\forall (d: C).((clt d c1) \to (P d)))) \to (P c1)))).(\lambda (k: -K).(\lambda (t: T).(\lambda (H2: ((\forall (d: C).((clt d (CHead c1 k t)) \to -(P d))))).(let H_x \def (chead_ctail c1 t k) in (let H3 \def H_x in (ex_3_ind -K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k t) -(CTail h u d))))) (P (CHead c1 k t)) (\lambda (x0: K).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (H4: (eq C (CHead c1 k t) (CTail x0 x2 -x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c2: C).(P c2)) (let H5 \def -(eq_ind C (CHead c1 k t) (\lambda (c2: C).(\forall (d: C).((clt d c2) \to (P -d)))) H2 (CTail x0 x2 x1) H4) in (H0 x1 (H5 x1 (clt_thead x0 x2 x1)) x0 x2)) -(CHead c1 k t) H4))))) H3)))))))) c0)) c)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/G/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/G/defs.ma deleted file mode 100644 index ae81c7857..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/G/defs.ma +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/preamble.ma". - -record G : Type[0] \def { - next: (nat \to nat); - next_lt: (\forall (n: nat).(lt n (next n))) -}. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/T/dec.ma deleted file mode 100644 index ae783b822..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/T/dec.ma +++ /dev/null @@ -1,411 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/fwd.ma". - -fact terms_props__bind_dec: - \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) ((eq B b1 b2) \to (\forall -(P: Prop).P)))) -\def - \lambda (b1: B).(B_ind (\lambda (b: B).(\forall (b2: B).(or (eq B b b2) ((eq -B b b2) \to (\forall (P: Prop).P))))) (\lambda (b2: B).(B_ind (\lambda (b: -B).(or (eq B Abbr b) ((eq B Abbr b) \to (\forall (P: Prop).P)))) (or_introl -(eq B Abbr Abbr) ((eq B Abbr Abbr) \to (\forall (P: Prop).P)) (refl_equal B -Abbr)) (or_intror (eq B Abbr Abst) ((eq B Abbr Abst) \to (\forall (P: -Prop).P)) (\lambda (H: (eq B Abbr Abst)).(\lambda (P: Prop).(let H0 \def -(eq_ind B Abbr (\lambda (ee: B).(match ee with [Abbr \Rightarrow True | Abst -\Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind P -H0))))) (or_intror (eq B Abbr Void) ((eq B Abbr Void) \to (\forall (P: -Prop).P)) (\lambda (H: (eq B Abbr Void)).(\lambda (P: Prop).(let H0 \def -(eq_ind B Abbr (\lambda (ee: B).(match ee with [Abbr \Rightarrow True | Abst -\Rightarrow False | Void \Rightarrow False])) I Void H) in (False_ind P -H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abst b) ((eq B -Abst b) \to (\forall (P: Prop).P)))) (or_intror (eq B Abst Abbr) ((eq B Abst -Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Abbr)).(\lambda (P: -Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee with [Abbr -\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Abbr -H) in (False_ind P H0))))) (or_introl (eq B Abst Abst) ((eq B Abst Abst) \to -(\forall (P: Prop).P)) (refl_equal B Abst)) (or_intror (eq B Abst Void) ((eq -B Abst Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst -Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match -ee with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow -False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind -(\lambda (b: B).(or (eq B Void b) ((eq B Void b) \to (\forall (P: Prop).P)))) -(or_intror (eq B Void Abbr) ((eq B Void Abbr) \to (\forall (P: Prop).P)) -(\lambda (H: (eq B Void Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void -(\lambda (ee: B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow -False | Void \Rightarrow True])) I Abbr H) in (False_ind P H0))))) (or_intror -(eq B Void Abst) ((eq B Void Abst) \to (\forall (P: Prop).P)) (\lambda (H: -(eq B Void Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda -(ee: B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow False | -Void \Rightarrow True])) I Abst H) in (False_ind P H0))))) (or_introl (eq B -Void Void) ((eq B Void Void) \to (\forall (P: Prop).P)) (refl_equal B Void)) -b2)) b1). - -lemma bind_dec_not: - \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) (not (eq B b1 b2)))) -\def - \lambda (b1: B).(\lambda (b2: B).(let H_x \def (terms_props__bind_dec b1 b2) -in (let H \def H_x in (or_ind (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: -Prop).P)) (or (eq B b1 b2) ((eq B b1 b2) \to False)) (\lambda (H0: (eq B b1 -b2)).(or_introl (eq B b1 b2) ((eq B b1 b2) \to False) H0)) (\lambda (H0: -(((eq B b1 b2) \to (\forall (P: Prop).P)))).(or_intror (eq B b1 b2) ((eq B b1 -b2) \to False) (\lambda (H1: (eq B b1 b2)).(H0 H1 False)))) H)))). - -fact terms_props__flat_dec: - \forall (f1: F).(\forall (f2: F).(or (eq F f1 f2) ((eq F f1 f2) \to (\forall -(P: Prop).P)))) -\def - \lambda (f1: F).(F_ind (\lambda (f: F).(\forall (f2: F).(or (eq F f f2) ((eq -F f f2) \to (\forall (P: Prop).P))))) (\lambda (f2: F).(F_ind (\lambda (f: -F).(or (eq F Appl f) ((eq F Appl f) \to (\forall (P: Prop).P)))) (or_introl -(eq F Appl Appl) ((eq F Appl Appl) \to (\forall (P: Prop).P)) (refl_equal F -Appl)) (or_intror (eq F Appl Cast) ((eq F Appl Cast) \to (\forall (P: -Prop).P)) (\lambda (H: (eq F Appl Cast)).(\lambda (P: Prop).(let H0 \def -(eq_ind F Appl (\lambda (ee: F).(match ee with [Appl \Rightarrow True | Cast -\Rightarrow False])) I Cast H) in (False_ind P H0))))) f2)) (\lambda (f2: -F).(F_ind (\lambda (f: F).(or (eq F Cast f) ((eq F Cast f) \to (\forall (P: -Prop).P)))) (or_intror (eq F Cast Appl) ((eq F Cast Appl) \to (\forall (P: -Prop).P)) (\lambda (H: (eq F Cast Appl)).(\lambda (P: Prop).(let H0 \def -(eq_ind F Cast (\lambda (ee: F).(match ee with [Appl \Rightarrow False | Cast -\Rightarrow True])) I Appl H) in (False_ind P H0))))) (or_introl (eq F Cast -Cast) ((eq F Cast Cast) \to (\forall (P: Prop).P)) (refl_equal F Cast)) f2)) -f1). - -fact terms_props__kind_dec: - \forall (k1: K).(\forall (k2: K).(or (eq K k1 k2) ((eq K k1 k2) \to (\forall -(P: Prop).P)))) -\def - \lambda (k1: K).(K_ind (\lambda (k: K).(\forall (k2: K).(or (eq K k k2) ((eq -K k k2) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (k2: K).(K_ind -(\lambda (k: K).(or (eq K (Bind b) k) ((eq K (Bind b) k) \to (\forall (P: -Prop).P)))) (\lambda (b0: B).(let H_x \def (terms_props__bind_dec b b0) in -(let H \def H_x in (or_ind (eq B b b0) ((eq B b b0) \to (\forall (P: -Prop).P)) (or (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to -(\forall (P: Prop).P))) (\lambda (H0: (eq B b b0)).(eq_ind B b (\lambda (b1: -B).(or (eq K (Bind b) (Bind b1)) ((eq K (Bind b) (Bind b1)) \to (\forall (P: -Prop).P)))) (or_introl (eq K (Bind b) (Bind b)) ((eq K (Bind b) (Bind b)) \to -(\forall (P: Prop).P)) (refl_equal K (Bind b))) b0 H0)) (\lambda (H0: (((eq B -b b0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Bind b) (Bind b0)) ((eq -K (Bind b) (Bind b0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Bind b) -(Bind b0))).(\lambda (P: Prop).(let H2 \def (f_equal K B (\lambda (e: -K).(match e with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])) (Bind -b) (Bind b0) H1) in (let H3 \def (eq_ind_r B b0 (\lambda (b1: B).((eq B b b1) -\to (\forall (P0: Prop).P0))) H0 b H2) in (H3 (refl_equal B b) P))))))) H)))) -(\lambda (f: F).(or_intror (eq K (Bind b) (Flat f)) ((eq K (Bind b) (Flat f)) -\to (\forall (P: Prop).P)) (\lambda (H: (eq K (Bind b) (Flat f))).(\lambda -(P: Prop).(let H0 \def (eq_ind K (Bind b) (\lambda (ee: K).(match ee with -[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])) I (Flat f) H) in -(False_ind P H0)))))) k2))) (\lambda (f: F).(\lambda (k2: K).(K_ind (\lambda -(k: K).(or (eq K (Flat f) k) ((eq K (Flat f) k) \to (\forall (P: Prop).P)))) -(\lambda (b: B).(or_intror (eq K (Flat f) (Bind b)) ((eq K (Flat f) (Bind b)) -\to (\forall (P: Prop).P)) (\lambda (H: (eq K (Flat f) (Bind b))).(\lambda -(P: Prop).(let H0 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind b) H) in -(False_ind P H0)))))) (\lambda (f0: F).(let H_x \def (terms_props__flat_dec f -f0) in (let H \def H_x in (or_ind (eq F f f0) ((eq F f f0) \to (\forall (P: -Prop).P)) (or (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to -(\forall (P: Prop).P))) (\lambda (H0: (eq F f f0)).(eq_ind F f (\lambda (f1: -F).(or (eq K (Flat f) (Flat f1)) ((eq K (Flat f) (Flat f1)) \to (\forall (P: -Prop).P)))) (or_introl (eq K (Flat f) (Flat f)) ((eq K (Flat f) (Flat f)) \to -(\forall (P: Prop).P)) (refl_equal K (Flat f))) f0 H0)) (\lambda (H0: (((eq F -f f0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Flat f) (Flat f0)) ((eq -K (Flat f) (Flat f0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Flat f) -(Flat f0))).(\lambda (P: Prop).(let H2 \def (f_equal K F (\lambda (e: -K).(match e with [(Bind _) \Rightarrow f | (Flat f1) \Rightarrow f1])) (Flat -f) (Flat f0) H1) in (let H3 \def (eq_ind_r F f0 (\lambda (f1: F).((eq F f f1) -\to (\forall (P0: Prop).P0))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) -k2))) k1). - -lemma term_dec: - \forall (t1: T).(\forall (t2: T).(or (eq T t1 t2) ((eq T t1 t2) \to (\forall -(P: Prop).P)))) -\def - \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (t2: T).(or (eq T t t2) ((eq -T t t2) \to (\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (t2: -T).(T_ind (\lambda (t: T).(or (eq T (TSort n) t) ((eq T (TSort n) t) \to -(\forall (P: Prop).P)))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in -(let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: -Prop).P)) (or (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to -(\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda -(n1: nat).(or (eq T (TSort n) (TSort n1)) ((eq T (TSort n) (TSort n1)) \to -(\forall (P: Prop).P)))) (or_introl (eq T (TSort n) (TSort n)) ((eq T (TSort -n) (TSort n)) \to (\forall (P: Prop).P)) (refl_equal T (TSort n))) n0 H0)) -(\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T -(TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P)) -(\lambda (H1: (eq T (TSort n) (TSort n0))).(\lambda (P: Prop).(let H2 \def -(f_equal T nat (\lambda (e: T).(match e with [(TSort n1) \Rightarrow n1 | -(TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort n0) -H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n1: nat).((eq nat n n1) \to -(\forall (P0: Prop).P0))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) -(\lambda (n0: nat).(or_intror (eq T (TSort n) (TLRef n0)) ((eq T (TSort n) -(TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TSort n) (TLRef -n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow False])) I (TLRef n0) H) in (False_ind P H0)))))) -(\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TSort n) t) ((eq T -(TSort n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or -(eq T (TSort n) t0) ((eq T (TSort n) t0) \to (\forall (P: -Prop).P)))).(or_intror (eq T (TSort n) (THead k t t0)) ((eq T (TSort n) -(THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) -(THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TSort n) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow -False | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind -P H2)))))))))) t2))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: -T).(or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))) -(\lambda (n0: nat).(or_intror (eq T (TLRef n) (TSort n0)) ((eq T (TLRef n) -(TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TLRef n) (TSort -n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (TSort n0) H) in (False_ind P H0)))))) -(\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind -(eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TLRef n) -(TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P))) (\lambda -(H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TLRef n) -(TLRef n1)) ((eq T (TLRef n) (TLRef n1)) \to (\forall (P: Prop).P)))) -(or_introl (eq T (TLRef n) (TLRef n)) ((eq T (TLRef n) (TLRef n)) \to -(\forall (P: Prop).P)) (refl_equal T (TLRef n))) n0 H0)) (\lambda (H0: (((eq -nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (TLRef n0)) -((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T -(TLRef n) (TLRef n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat -(\lambda (e: T).(match e with [(TSort _) \Rightarrow n | (TLRef n1) -\Rightarrow n1 | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H1) in -(let H3 \def (eq_ind_r nat n0 (\lambda (n1: nat).((eq nat n n1) \to (\forall -(P0: Prop).P0))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda -(k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TLRef n) t) ((eq T (TLRef n) -t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T -(TLRef n) t0) ((eq T (TLRef n) t0) \to (\forall (P: Prop).P)))).(or_intror -(eq T (TLRef n) (THead k t t0)) ((eq T (TLRef n) (THead k t t0)) \to (\forall -(P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (THead k t t0))).(\lambda (P: -Prop).(let H2 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) -(\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).(or (eq T t -t2) ((eq T t t2) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda -(H0: ((\forall (t2: T).(or (eq T t0 t2) ((eq T t0 t2) \to (\forall (P: -Prop).P)))))).(\lambda (t2: T).(T_ind (\lambda (t3: T).(or (eq T (THead k t -t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (n: -nat).(or_intror (eq T (THead k t t0) (TSort n)) ((eq T (THead k t t0) (TSort -n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TSort -n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (TSort n) H1) in (False_ind P H2)))))) -(\lambda (n: nat).(or_intror (eq T (THead k t t0) (TLRef n)) ((eq T (THead k -t t0) (TLRef n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t -t0) (TLRef n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in -(False_ind P H2)))))) (\lambda (k0: K).(\lambda (t3: T).(\lambda (H1: (or (eq -T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: -Prop).P)))).(\lambda (t4: T).(\lambda (H2: (or (eq T (THead k t t0) t4) ((eq -T (THead k t t0) t4) \to (\forall (P: Prop).P)))).(let H_x \def (H t3) in -(let H3 \def H_x in (or_ind (eq T t t3) ((eq T t t3) \to (\forall (P: -Prop).P)) (or (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) -(THead k0 t3 t4)) \to (\forall (P: Prop).P))) (\lambda (H4: (eq T t t3)).(let -H5 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T -(THead k t t0) t5) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t -(\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t5 t4)) ((eq T (THead k t -t0) (THead k0 t5 t4)) \to (\forall (P: Prop).P)))) (let H_x0 \def (H0 t4) in -(let H6 \def H_x0 in (or_ind (eq T t0 t4) ((eq T t0 t4) \to (\forall (P: -Prop).P)) (or (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) -(THead k0 t t4)) \to (\forall (P: Prop).P))) (\lambda (H7: (eq T t0 t4)).(let -H8 \def (eq_ind_r T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T -(THead k t t0) t5) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 -(\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t t5)) ((eq T (THead k t -t0) (THead k0 t t5)) \to (\forall (P: Prop).P)))) (let H_x1 \def -(terms_props__kind_dec k k0) in (let H9 \def H_x1 in (or_ind (eq K k k0) ((eq -K k k0) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t0)) -((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P))) (\lambda -(H10: (eq K k k0)).(eq_ind K k (\lambda (k1: K).(or (eq T (THead k t t0) -(THead k1 t t0)) ((eq T (THead k t t0) (THead k1 t t0)) \to (\forall (P: -Prop).P)))) (or_introl (eq T (THead k t t0) (THead k t t0)) ((eq T (THead k t -t0) (THead k t t0)) \to (\forall (P: Prop).P)) (refl_equal T (THead k t t0))) -k0 H10)) (\lambda (H10: (((eq K k k0) \to (\forall (P: Prop).P)))).(or_intror -(eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) -\to (\forall (P: Prop).P)) (\lambda (H11: (eq T (THead k t t0) (THead k0 t -t0))).(\lambda (P: Prop).(let H12 \def (f_equal T K (\lambda (e: T).(match e -with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) -\Rightarrow k1])) (THead k t t0) (THead k0 t t0) H11) in (let H13 \def -(eq_ind_r K k0 (\lambda (k1: K).((eq K k k1) \to (\forall (P0: Prop).P0))) -H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) t4 H7))) (\lambda (H7: -(((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) -(THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: -Prop).P)) (\lambda (H8: (eq T (THead k t t0) (THead k0 t t4))).(\lambda (P: -Prop).(let H9 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) -(THead k t t0) (THead k0 t t4) H8) in ((let H10 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t t4) H8) in -(\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t5: T).((eq -T t0 t5) \to (\forall (P0: Prop).P0))) H7 t0 H10) in (let H13 \def (eq_ind_r -T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k t t0) t5) -\to (\forall (P0: Prop).P0)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) -H9)))))) H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: -Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k -t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P)) (\lambda (H5: (eq T (THead -k t t0) (THead k0 t3 t4))).(\lambda (P: Prop).(let H6 \def (f_equal T K -(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k t t0) (THead k0 t3 -t4) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t5 _) \Rightarrow t5])) -(THead k t t0) (THead k0 t3 t4) H5) in ((let H8 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t3 t4) H5) in -(\lambda (H9: (eq T t t3)).(\lambda (_: (eq K k k0)).(let H11 \def (eq_ind_r -T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k t t0) t5) -\to (\forall (P0: Prop).P0)))) H2 t0 H8) in (let H12 \def (eq_ind_r T t3 -(\lambda (t5: T).((eq T t t5) \to (\forall (P0: Prop).P0))) H4 t H9) in (let -H13 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T -(THead k t t0) t5) \to (\forall (P0: Prop).P0)))) H1 t H9) in (H12 -(refl_equal T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1). - -lemma binder_dec: - \forall (t: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: -T).(eq T t (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall -(u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(or (ex_3 B T T (\lambda (b: -B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) -(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w -u)) \to (\forall (P: Prop).P))))))) (\lambda (n: nat).(or_intror (ex_3 B T T -(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TSort n) (THead (Bind -b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TSort n) -(THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda -(w: T).(\lambda (u: T).(\lambda (H: (eq T (TSort n) (THead (Bind b) w -u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P -H0))))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda -(w: T).(\lambda (u: T).(eq T (TLRef n) (THead (Bind b) w u)))))) (\forall (b: -B).(\forall (w: T).(\forall (u: T).((eq T (TLRef n) (THead (Bind b) w u)) \to -(\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: -T).(\lambda (H: (eq T (TLRef n) (THead (Bind b) w u))).(\lambda (P: -Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) -(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t0: T).((or (ex_3 B T T -(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w -u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead -(Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: T).((or (ex_3 -B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind -b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead -(Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or (ex_3 B T T (\lambda -(b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 t0 t1) (THead (Bind b) -w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead k0 t0 -t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))))))) (\lambda (b: -B).(\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b0: B).(\lambda -(w: T).(\lambda (u: T).(eq T t0 (THead (Bind b0) w u)))))) (\forall (b0: -B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b0) w u)) \to -(\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T -(\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b0) w -u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead -(Bind b0) w u)) \to (\forall (P: Prop).P))))))).(or_introl (ex_3 B T T -(\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) -(THead (Bind b0) w u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: -T).((eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)) \to (\forall (P: -Prop).P))))) (ex_3_intro B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: -T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u))))) b t0 t1 (refl_equal -T (THead (Bind b) t0 t1))))))))) (\lambda (f: F).(\lambda (t0: T).(\lambda -(_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 -(THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: -T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda -(t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda -(u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: -T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: -Prop).P))))))).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: -T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)))))) -(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Flat f) t0 t1) -(THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda -(w: T).(\lambda (u: T).(\lambda (H1: (eq T (THead (Flat f) t0 t1) (THead -(Bind b) w u))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead (Flat f) t0 -t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) w u) H1) -in (False_ind P H2))))))))))))) k)) t). - -lemma abst_dec: - \forall (u: T).(\forall (v: T).(or (ex T (\lambda (t: T).(eq T u (THead -(Bind Abst) v t)))) (\forall (t: T).((eq T u (THead (Bind Abst) v t)) \to -(\forall (P: Prop).P))))) -\def - \lambda (u: T).(T_ind (\lambda (t: T).(\forall (v: T).(or (ex T (\lambda -(t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead -(Bind Abst) v t0)) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda -(v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) (THead (Bind Abst) v -t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind Abst) v t)) \to (\forall -(P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TSort n) (THead (Bind -Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow -False | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in -(False_ind P H0)))))))) (\lambda (n: nat).(\lambda (v: T).(or_intror (ex T -(\lambda (t: T).(eq T (TLRef n) (THead (Bind Abst) v t)))) (\forall (t: -T).((eq T (TLRef n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) -(\lambda (t: T).(\lambda (H: (eq T (TLRef n) (THead (Bind Abst) v -t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind -P H0)))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: ((\forall (v: -T).(or (ex T (\lambda (t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall -(t0: T).((eq T t (THead (Bind Abst) v t0)) \to (\forall (P: -Prop).P))))))).(\lambda (t0: T).(\lambda (_: ((\forall (v: T).(or (ex T -(\lambda (t1: T).(eq T t0 (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T -t0 (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))))))).(\lambda (v: -T).(let H_x \def (terms_props__kind_dec k (Bind Abst)) in (let H1 \def H_x in -(or_ind (eq K k (Bind Abst)) ((eq K k (Bind Abst)) \to (\forall (P: Prop).P)) -(or (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) -(\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall -(P: Prop).P)))) (\lambda (H2: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) -(\lambda (k0: K).(or (ex T (\lambda (t1: T).(eq T (THead k0 t t0) (THead -(Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k0 t t0) (THead (Bind -Abst) v t1)) \to (\forall (P: Prop).P))))) (let H_x0 \def (term_dec t v) in -(let H3 \def H_x0 in (or_ind (eq T t v) ((eq T t v) \to (\forall (P: -Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead -(Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead -(Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H4: (eq T t -v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq T (THead -(Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq T (THead -(Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: Prop).P))))) -(or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind -Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind -Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t1: T).(eq T -(THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 (refl_equal T (THead -(Bind Abst) t t0)))) v H4)) (\lambda (H4: (((eq T t v) \to (\forall (P: -Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) -(THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) -(THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: -T).(\lambda (H5: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v -t1))).(\lambda (P: Prop).(let H6 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t2 _) -\Rightarrow t2])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H5) in -((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) -(THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H5) in (\lambda (H8: (eq T -t v)).(H4 H8 P))) H6))))))) H3))) k H2)) (\lambda (H2: (((eq K k (Bind Abst)) -\to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k -t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) -(THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: -T).(\lambda (H3: (eq T (THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: -Prop).(let H4 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) -(THead k t t0) (THead (Bind Abst) v t1) H3) in ((let H5 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef _) -\Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead k t t0) (THead (Bind -Abst) v t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) -\Rightarrow t2])) (THead k t t0) (THead (Bind Abst) v t1) H3) in (\lambda (_: -(eq T t v)).(\lambda (H8: (eq K k (Bind Abst))).(H2 H8 P)))) H5)) H4))))))) -H1))))))))) u). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/T/defs.ma deleted file mode 100644 index 0eeff13ba..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/T/defs.ma +++ /dev/null @@ -1,45 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/preamble.ma". - -inductive B: Type[0] \def -| Abbr: B -| Abst: B -| Void: B. - -inductive F: Type[0] \def -| Appl: F -| Cast: F. - -inductive K: Type[0] \def -| Bind: B \to K -| Flat: F \to K. - -inductive T: Type[0] \def -| TSort: nat \to T -| TLRef: nat \to T -| THead: K \to (T \to (T \to T)). - -rec definition tweight (t: T) on t: nat \def match t with [(TSort _) -\Rightarrow (S O) | (TLRef _) \Rightarrow (S O) | (THead _ u t0) \Rightarrow -(S (plus (tweight u) (tweight t0)))]. - -definition tle: - T \to (T \to Prop) -\def - \lambda (t1: T).(\lambda (t2: T).(le (tweight t1) (tweight t2))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/T/fwd.ma deleted file mode 100644 index 5e1833cc1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/T/fwd.ma +++ /dev/null @@ -1,64 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -implied rec lemma T_rect (P: (T \to Type[0])) (f: (\forall (n: nat).(P (TSort -n)))) (f0: (\forall (n: nat).(P (TLRef n)))) (f1: (\forall (k: K).(\forall -(t: T).((P t) \to (\forall (t0: T).((P t0) \to (P (THead k t t0)))))))) (t: -T) on t: P t \def match t with [(TSort n) \Rightarrow (f n) | (TLRef n) -\Rightarrow (f0 n) | (THead k t0 t1) \Rightarrow (f1 k t0 ((T_rect P f f0 f1) -t0) t1 ((T_rect P f f0 f1) t1))]. - -implied lemma T_ind: - \forall (P: ((T \to Prop))).(((\forall (n: nat).(P (TSort n)))) \to -(((\forall (n: nat).(P (TLRef n)))) \to (((\forall (k: K).(\forall (t: T).((P -t) \to (\forall (t0: T).((P t0) \to (P (THead k t t0)))))))) \to (\forall (t: -T).(P t))))) -\def - \lambda (P: ((T \to Prop))).(T_rect P). - -lemma thead_x_y_y: - \forall (k: K).(\forall (v: T).(\forall (t: T).((eq T (THead k v t) t) \to -(\forall (P: Prop).P)))) -\def - \lambda (k: K).(\lambda (v: T).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq -T (THead k v t0) t0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda -(H: (eq T (THead k v (TSort n)) (TSort n))).(\lambda (P: Prop).(let H0 \def -(eq_ind T (THead k v (TSort n)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H) in (False_ind P H0))))) (\lambda (n: nat).(\lambda (H: -(eq T (THead k v (TLRef n)) (TLRef n))).(\lambda (P: Prop).(let H0 \def -(eq_ind T (THead k v (TLRef n)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H) in (False_ind P H0))))) (\lambda (k0: K).(\lambda (t0: -T).(\lambda (_: (((eq T (THead k v t0) t0) \to (\forall (P: -Prop).P)))).(\lambda (t1: T).(\lambda (H0: (((eq T (THead k v t1) t1) \to -(\forall (P: Prop).P)))).(\lambda (H1: (eq T (THead k v (THead k0 t0 t1)) -(THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: -T).(match e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead -k1 _ _) \Rightarrow k1])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) -in ((let H3 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t2 _) \Rightarrow t2])) -(THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T -T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead k0 t0 t1) | -(TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t2) \Rightarrow t2])) -(THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (H5: (eq T v -t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind T v (\lambda (t2: -T).((eq T (THead k t2 t1) t1) \to (\forall (P0: Prop).P0))) H0 t0 H5) in (let -H8 \def (eq_ind K k (\lambda (k1: K).((eq T (THead k1 t0 t1) t1) \to (\forall -(P0: Prop).P0))) H7 k0 H6) in (H8 H4 P)))))) H3)) H2))))))))) t))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/T/props.ma b/matita/matita/contribs/lambdadelta/basic_1/T/props.ma deleted file mode 100644 index 7b62a5a15..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/T/props.ma +++ /dev/null @@ -1,64 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/fwd.ma". - -lemma not_abbr_abst: - not (eq B Abbr Abst) -\def - \lambda (H: (eq B Abbr Abst)).(let H0 \def (eq_ind B Abbr (\lambda (ee: -B).(match ee with [Abbr \Rightarrow True | Abst \Rightarrow False | Void -\Rightarrow False])) I Abst H) in (False_ind False H0)). - -lemma not_void_abst: - not (eq B Void Abst) -\def - \lambda (H: (eq B Void Abst)).(let H0 \def (eq_ind B Void (\lambda (ee: -B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow False | Void -\Rightarrow True])) I Abst H) in (False_ind False H0)). - -lemma not_abbr_void: - not (eq B Abbr Void) -\def - \lambda (H: (eq B Abbr Void)).(let H0 \def (eq_ind B Abbr (\lambda (ee: -B).(match ee with [Abbr \Rightarrow True | Abst \Rightarrow False | Void -\Rightarrow False])) I Void H) in (False_ind False H0)). - -lemma not_abst_void: - not (eq B Abst Void) -\def - \lambda (H: (eq B Abst Void)).(let H0 \def (eq_ind B Abst (\lambda (ee: -B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow True | Void -\Rightarrow False])) I Void H) in (False_ind False H0)). - -lemma tweight_lt: - \forall (t: T).(lt O (tweight t)) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(lt O (tweight t0))) (\lambda (_: -nat).(le_n (S O))) (\lambda (_: nat).(le_n (S O))) (\lambda (_: K).(\lambda -(t0: T).(\lambda (H: (lt O (tweight t0))).(\lambda (t1: T).(\lambda (_: (lt O -(tweight t1))).(le_S (S O) (plus (tweight t0) (tweight t1)) (le_plus_trans (S -O) (tweight t0) (tweight t1) H))))))) t). - -lemma tle_r: - \forall (t: T).(tle t t) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(le (tweight t0) (tweight t0))) -(\lambda (_: nat).(le_n (S O))) (\lambda (_: nat).(le_n (S O))) (\lambda (_: -K).(\lambda (t0: T).(\lambda (_: (le (tweight t0) (tweight t0))).(\lambda -(t1: T).(\lambda (_: (le (tweight t1) (tweight t1))).(le_n (S (plus (tweight -t0) (tweight t1))))))))) t). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/aplus/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/aplus/defs.ma deleted file mode 100644 index f339331a6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/aplus/defs.ma +++ /dev/null @@ -1,21 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/asucc/defs.ma". - -rec definition aplus (g: G) (a: A) (n: nat) on n: A \def match n with [O -\Rightarrow a | (S n0) \Rightarrow (asucc g (aplus g a n0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/aplus/props.ma b/matita/matita/contribs/lambdadelta/basic_1/aplus/props.ma deleted file mode 100644 index 73ec98cfa..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/aplus/props.ma +++ /dev/null @@ -1,240 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/aplus/defs.ma". - -include "basic_1/A/fwd.ma". - -include "basic_1/next_plus/props.ma". - -lemma aplus_reg_r: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (h1: nat).(\forall -(h2: nat).((eq A (aplus g a1 h1) (aplus g a2 h2)) \to (\forall (h: nat).(eq A -(aplus g a1 (plus h h1)) (aplus g a2 (plus h h2))))))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (h1: nat).(\lambda -(h2: nat).(\lambda (H: (eq A (aplus g a1 h1) (aplus g a2 h2))).(\lambda (h: -nat).(nat_ind (\lambda (n: nat).(eq A (aplus g a1 (plus n h1)) (aplus g a2 -(plus n h2)))) H (\lambda (n: nat).(\lambda (H0: (eq A (aplus g a1 (plus n -h1)) (aplus g a2 (plus n h2)))).(f_equal2 G A A asucc g g (aplus g a1 (plus n -h1)) (aplus g a2 (plus n h2)) (refl_equal G g) H0))) h))))))). - -lemma aplus_assoc: - \forall (g: G).(\forall (a: A).(\forall (h1: nat).(\forall (h2: nat).(eq A -(aplus g (aplus g a h1) h2) (aplus g a (plus h1 h2)))))) -\def - \lambda (g: G).(\lambda (a: A).(\lambda (h1: nat).(nat_ind (\lambda (n: -nat).(\forall (h2: nat).(eq A (aplus g (aplus g a n) h2) (aplus g a (plus n -h2))))) (\lambda (h2: nat).(refl_equal A (aplus g a h2))) (\lambda (n: -nat).(\lambda (_: ((\forall (h2: nat).(eq A (aplus g (aplus g a n) h2) (aplus -g a (plus n h2)))))).(\lambda (h2: nat).(nat_ind (\lambda (n0: nat).(eq A -(aplus g (asucc g (aplus g a n)) n0) (asucc g (aplus g a (plus n n0))))) -(eq_ind nat n (\lambda (n0: nat).(eq A (asucc g (aplus g a n)) (asucc g -(aplus g a n0)))) (refl_equal A (asucc g (aplus g a n))) (plus n O) (plus_n_O -n)) (\lambda (n0: nat).(\lambda (H0: (eq A (aplus g (asucc g (aplus g a n)) -n0) (asucc g (aplus g a (plus n n0))))).(eq_ind nat (S (plus n n0)) (\lambda -(n1: nat).(eq A (asucc g (aplus g (asucc g (aplus g a n)) n0)) (asucc g -(aplus g a n1)))) (f_equal2 G A A asucc g g (aplus g (asucc g (aplus g a n)) -n0) (asucc g (aplus g a (plus n n0))) (refl_equal G g) H0) (plus n (S n0)) -(plus_n_Sm n n0)))) h2)))) h1))). - -lemma aplus_asucc: - \forall (g: G).(\forall (h: nat).(\forall (a: A).(eq A (aplus g (asucc g a) -h) (asucc g (aplus g a h))))) -\def - \lambda (g: G).(\lambda (h: nat).(\lambda (a: A).(eq_ind_r A (aplus g a -(plus (S O) h)) (\lambda (a0: A).(eq A a0 (asucc g (aplus g a h)))) -(refl_equal A (asucc g (aplus g a h))) (aplus g (aplus g a (S O)) h) -(aplus_assoc g a (S O) h)))). - -lemma aplus_sort_O_S_simpl: - \forall (g: G).(\forall (n: nat).(\forall (k: nat).(eq A (aplus g (ASort O -n) (S k)) (aplus g (ASort O (next g n)) k)))) -\def - \lambda (g: G).(\lambda (n: nat).(\lambda (k: nat).(eq_ind A (aplus g (asucc -g (ASort O n)) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n)) k))) -(refl_equal A (aplus g (ASort O (next g n)) k)) (asucc g (aplus g (ASort O n) -k)) (aplus_asucc g k (ASort O n))))). - -lemma aplus_sort_S_S_simpl: - \forall (g: G).(\forall (n: nat).(\forall (h: nat).(\forall (k: nat).(eq A -(aplus g (ASort (S h) n) (S k)) (aplus g (ASort h n) k))))) -\def - \lambda (g: G).(\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(eq_ind -A (aplus g (asucc g (ASort (S h) n)) k) (\lambda (a: A).(eq A a (aplus g -(ASort h n) k))) (refl_equal A (aplus g (ASort h n) k)) (asucc g (aplus g -(ASort (S h) n) k)) (aplus_asucc g k (ASort (S h) n)))))). - -lemma aplus_asort_O_simpl: - \forall (g: G).(\forall (h: nat).(\forall (n: nat).(eq A (aplus g (ASort O -n) h) (ASort O (next_plus g n h))))) -\def - \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (n0: -nat).(eq A (aplus g (ASort O n0) n) (ASort O (next_plus g n0 n))))) (\lambda -(n: nat).(refl_equal A (ASort O n))) (\lambda (n: nat).(\lambda (H: ((\forall -(n0: nat).(eq A (aplus g (ASort O n0) n) (ASort O (next_plus g n0 -n)))))).(\lambda (n0: nat).(eq_ind A (aplus g (asucc g (ASort O n0)) n) -(\lambda (a: A).(eq A a (ASort O (next g (next_plus g n0 n))))) (eq_ind nat -(next_plus g (next g n0) n) (\lambda (n1: nat).(eq A (aplus g (ASort O (next -g n0)) n) (ASort O n1))) (H (next g n0)) (next g (next_plus g n0 n)) -(next_plus_next g n0 n)) (asucc g (aplus g (ASort O n0) n)) (aplus_asucc g n -(ASort O n0)))))) h)). - -lemma aplus_asort_le_simpl: - \forall (g: G).(\forall (h: nat).(\forall (k: nat).(\forall (n: nat).((le h -k) \to (eq A (aplus g (ASort k n) h) (ASort (minus k h) n)))))) -\def - \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (k: -nat).(\forall (n0: nat).((le n k) \to (eq A (aplus g (ASort k n0) n) (ASort -(minus k n) n0)))))) (\lambda (k: nat).(\lambda (n: nat).(\lambda (_: (le O -k)).(eq_ind nat k (\lambda (n0: nat).(eq A (ASort k n) (ASort n0 n))) -(refl_equal A (ASort k n)) (minus k O) (minus_n_O k))))) (\lambda (h0: -nat).(\lambda (H: ((\forall (k: nat).(\forall (n: nat).((le h0 k) \to (eq A -(aplus g (ASort k n) h0) (ASort (minus k h0) n))))))).(\lambda (k: -nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le (S h0) n) \to (eq A -(asucc g (aplus g (ASort n n0) h0)) (ASort (minus n (S h0)) n0))))) (\lambda -(n: nat).(\lambda (H0: (le (S h0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat -O (S n0))) (\lambda (n0: nat).(le h0 n0)) (eq A (asucc g (aplus g (ASort O n) -h0)) (ASort (minus O (S h0)) n)) (\lambda (x: nat).(\lambda (H1: (eq nat O (S -x))).(\lambda (_: (le h0 x)).(let H3 \def (eq_ind nat O (\lambda (ee: -nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) -H1) in (False_ind (eq A (asucc g (aplus g (ASort O n) h0)) (ASort (minus O (S -h0)) n)) H3))))) (le_gen_S h0 O H0)))) (\lambda (n: nat).(\lambda (_: -((\forall (n0: nat).((le (S h0) n) \to (eq A (asucc g (aplus g (ASort n n0) -h0)) (ASort (minus n (S h0)) n0)))))).(\lambda (n0: nat).(\lambda (H1: (le (S -h0) (S n))).(eq_ind A (aplus g (asucc g (ASort (S n) n0)) h0) (\lambda (a: -A).(eq A a (ASort (minus (S n) (S h0)) n0))) (H n n0 (le_S_n h0 n H1)) (asucc -g (aplus g (ASort (S n) n0) h0)) (aplus_asucc g h0 (ASort (S n) n0))))))) -k)))) h)). - -lemma aplus_asort_simpl: - \forall (g: G).(\forall (h: nat).(\forall (k: nat).(\forall (n: nat).(eq A -(aplus g (ASort k n) h) (ASort (minus k h) (next_plus g n (minus h k))))))) -\def - \lambda (g: G).(\lambda (h: nat).(\lambda (k: nat).(\lambda (n: -nat).(lt_le_e k h (eq A (aplus g (ASort k n) h) (ASort (minus k h) (next_plus -g n (minus h k)))) (\lambda (H: (lt k h)).(eq_ind_r nat (plus k (minus h k)) -(\lambda (n0: nat).(eq A (aplus g (ASort k n) n0) (ASort (minus k h) -(next_plus g n (minus h k))))) (eq_ind A (aplus g (aplus g (ASort k n) k) -(minus h k)) (\lambda (a: A).(eq A a (ASort (minus k h) (next_plus g n (minus -h k))))) (eq_ind_r A (ASort (minus k k) n) (\lambda (a: A).(eq A (aplus g a -(minus h k)) (ASort (minus k h) (next_plus g n (minus h k))))) (eq_ind nat O -(\lambda (n0: nat).(eq A (aplus g (ASort n0 n) (minus h k)) (ASort (minus k -h) (next_plus g n (minus h k))))) (eq_ind_r nat O (\lambda (n0: nat).(eq A -(aplus g (ASort O n) (minus h k)) (ASort n0 (next_plus g n (minus h k))))) -(aplus_asort_O_simpl g (minus h k) n) (minus k h) (O_minus k h (le_S_n k h -(le_S_n (S k) (S h) (le_S (S (S k)) (S h) (le_n_S (S k) h H)))))) (minus k k) -(minus_n_n k)) (aplus g (ASort k n) k) (aplus_asort_le_simpl g k k n (le_n -k))) (aplus g (ASort k n) (plus k (minus h k))) (aplus_assoc g (ASort k n) k -(minus h k))) h (le_plus_minus k h (le_S_n k h (le_S_n (S k) (S h) (le_S (S -(S k)) (S h) (le_n_S (S k) h H))))))) (\lambda (H: (le h k)).(eq_ind_r A -(ASort (minus k h) n) (\lambda (a: A).(eq A a (ASort (minus k h) (next_plus g -n (minus h k))))) (eq_ind_r nat O (\lambda (n0: nat).(eq A (ASort (minus k h) -n) (ASort (minus k h) (next_plus g n n0)))) (refl_equal A (ASort (minus k h) -(next_plus g n O))) (minus h k) (O_minus h k H)) (aplus g (ASort k n) h) -(aplus_asort_le_simpl g h k n H))))))). - -lemma aplus_ahead_simpl: - \forall (g: G).(\forall (h: nat).(\forall (a1: A).(\forall (a2: A).(eq A -(aplus g (AHead a1 a2) h) (AHead a1 (aplus g a2 h)))))) -\def - \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (a1: -A).(\forall (a2: A).(eq A (aplus g (AHead a1 a2) n) (AHead a1 (aplus g a2 -n)))))) (\lambda (a1: A).(\lambda (a2: A).(refl_equal A (AHead a1 a2)))) -(\lambda (n: nat).(\lambda (H: ((\forall (a1: A).(\forall (a2: A).(eq A -(aplus g (AHead a1 a2) n) (AHead a1 (aplus g a2 n))))))).(\lambda (a1: -A).(\lambda (a2: A).(eq_ind A (aplus g (asucc g (AHead a1 a2)) n) (\lambda -(a: A).(eq A a (AHead a1 (asucc g (aplus g a2 n))))) (eq_ind A (aplus g -(asucc g a2) n) (\lambda (a: A).(eq A (aplus g (asucc g (AHead a1 a2)) n) -(AHead a1 a))) (H a1 (asucc g a2)) (asucc g (aplus g a2 n)) (aplus_asucc g n -a2)) (asucc g (aplus g (AHead a1 a2) n)) (aplus_asucc g n (AHead a1 a2))))))) -h)). - -lemma aplus_asucc_false: - \forall (g: G).(\forall (a: A).(\forall (h: nat).((eq A (aplus g (asucc g a) -h) a) \to (\forall (P: Prop).P)))) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (h: -nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: Prop).P)))) -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (h: nat).(\lambda (H: (eq A -(aplus g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h0) -\Rightarrow (ASort h0 n0)]) h) (ASort n n0))).(\lambda (P: Prop).(nat_ind -(\lambda (n1: nat).((eq A (aplus g (match n1 with [O \Rightarrow (ASort O -(next g n0)) | (S h0) \Rightarrow (ASort h0 n0)]) h) (ASort n1 n0)) \to P)) -(\lambda (H0: (eq A (aplus g (ASort O (next g n0)) h) (ASort O n0))).(let H1 -\def (eq_ind A (aplus g (ASort O (next g n0)) h) (\lambda (a0: A).(eq A a0 -(ASort O n0))) H0 (ASort (minus O h) (next_plus g (next g n0) (minus h O))) -(aplus_asort_simpl g h O (next g n0))) in (let H2 \def (f_equal A nat -(\lambda (e: A).(match e with [(ASort _ n1) \Rightarrow n1 | (AHead _ _) -\Rightarrow (next_plus g (next g n0) (minus h O))])) (ASort (minus O h) -(next_plus g (next g n0) (minus h O))) (ASort O n0) H1) in (let H3 \def -(eq_ind_r nat (minus h O) (\lambda (n1: nat).(eq nat (next_plus g (next g n0) -n1) n0)) H2 h (minus_n_O h)) in (le_lt_false n0 n0 (le_n n0) (eq_ind nat -(next_plus g (next g n0) h) (\lambda (n1: nat).(lt n0 n1)) (next_plus_lt g h -n0) n0 H3) P))))) (\lambda (n1: nat).(\lambda (_: (((eq A (aplus g (match n1 -with [O \Rightarrow (ASort O (next g n0)) | (S h0) \Rightarrow (ASort h0 -n0)]) h) (ASort n1 n0)) \to P))).(\lambda (H0: (eq A (aplus g (ASort n1 n0) -h) (ASort (S n1) n0))).(let H1 \def (eq_ind A (aplus g (ASort n1 n0) h) -(\lambda (a0: A).(eq A a0 (ASort (S n1) n0))) H0 (ASort (minus n1 h) -(next_plus g n0 (minus h n1))) (aplus_asort_simpl g h n1 n0)) in (let H2 \def -(f_equal A nat (\lambda (e: A).(match e with [(ASort n2 _) \Rightarrow n2 | -(AHead _ _) \Rightarrow (minus n1 h)])) (ASort (minus n1 h) (next_plus g n0 -(minus h n1))) (ASort (S n1) n0) H1) in ((let H3 \def (f_equal A nat (\lambda -(e: A).(match e with [(ASort _ n2) \Rightarrow n2 | (AHead _ _) \Rightarrow -(next_plus g n0 (minus h n1))])) (ASort (minus n1 h) (next_plus g n0 (minus h -n1))) (ASort (S n1) n0) H1) in (\lambda (H4: (eq nat (minus n1 h) (S -n1))).(le_Sx_x n1 (eq_ind nat (minus n1 h) (\lambda (n2: nat).(le n2 n1)) -(minus_le n1 h) (S n1) H4) P))) H2)))))) n H)))))) (\lambda (a0: A).(\lambda -(_: ((\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: -Prop).P))))).(\lambda (a1: A).(\lambda (H0: ((\forall (h: nat).((eq A (aplus -g (asucc g a1) h) a1) \to (\forall (P: Prop).P))))).(\lambda (h: -nat).(\lambda (H1: (eq A (aplus g (AHead a0 (asucc g a1)) h) (AHead a0 -a1))).(\lambda (P: Prop).(let H2 \def (eq_ind A (aplus g (AHead a0 (asucc g -a1)) h) (\lambda (a2: A).(eq A a2 (AHead a0 a1))) H1 (AHead a0 (aplus g -(asucc g a1) h)) (aplus_ahead_simpl g h a0 (asucc g a1))) in (let H3 \def -(f_equal A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow (aplus g -(asucc g a1) h) | (AHead _ a2) \Rightarrow a2])) (AHead a0 (aplus g (asucc g -a1) h)) (AHead a0 a1) H2) in (H0 h H3 P)))))))))) a)). - -lemma aplus_inj: - \forall (g: G).(\forall (h1: nat).(\forall (h2: nat).(\forall (a: A).((eq A -(aplus g a h1) (aplus g a h2)) \to (eq nat h1 h2))))) -\def - \lambda (g: G).(\lambda (h1: nat).(nat_ind (\lambda (n: nat).(\forall (h2: -nat).(\forall (a: A).((eq A (aplus g a n) (aplus g a h2)) \to (eq nat n -h2))))) (\lambda (h2: nat).(nat_ind (\lambda (n: nat).(\forall (a: A).((eq A -(aplus g a O) (aplus g a n)) \to (eq nat O n)))) (\lambda (a: A).(\lambda (_: -(eq A a a)).(refl_equal nat O))) (\lambda (n: nat).(\lambda (_: ((\forall (a: -A).((eq A a (aplus g a n)) \to (eq nat O n))))).(\lambda (a: A).(\lambda (H0: -(eq A a (asucc g (aplus g a n)))).(let H1 \def (eq_ind_r A (asucc g (aplus g -a n)) (\lambda (a0: A).(eq A a a0)) H0 (aplus g (asucc g a) n) (aplus_asucc g -n a)) in (aplus_asucc_false g a n (sym_eq A a (aplus g (asucc g a) n) H1) (eq -nat O (S n)))))))) h2)) (\lambda (n: nat).(\lambda (H: ((\forall (h2: -nat).(\forall (a: A).((eq A (aplus g a n) (aplus g a h2)) \to (eq nat n -h2)))))).(\lambda (h2: nat).(nat_ind (\lambda (n0: nat).(\forall (a: A).((eq -A (aplus g a (S n)) (aplus g a n0)) \to (eq nat (S n) n0)))) (\lambda (a: -A).(\lambda (H0: (eq A (asucc g (aplus g a n)) a)).(let H1 \def (eq_ind_r A -(asucc g (aplus g a n)) (\lambda (a0: A).(eq A a0 a)) H0 (aplus g (asucc g a) -n) (aplus_asucc g n a)) in (aplus_asucc_false g a n H1 (eq nat (S n) O))))) -(\lambda (n0: nat).(\lambda (_: ((\forall (a: A).((eq A (asucc g (aplus g a -n)) (aplus g a n0)) \to (eq nat (S n) n0))))).(\lambda (a: A).(\lambda (H1: -(eq A (asucc g (aplus g a n)) (asucc g (aplus g a n0)))).(let H2 \def -(eq_ind_r A (asucc g (aplus g a n)) (\lambda (a0: A).(eq A a0 (asucc g (aplus -g a n0)))) H1 (aplus g (asucc g a) n) (aplus_asucc g n a)) in (let H3 \def -(eq_ind_r A (asucc g (aplus g a n0)) (\lambda (a0: A).(eq A (aplus g (asucc g -a) n) a0)) H2 (aplus g (asucc g a) n0) (aplus_asucc g n0 a)) in (f_equal nat -nat S n n0 (H n0 (asucc g a) H3)))))))) h2)))) h1)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/app/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/app/defs.ma deleted file mode 100644 index 32ec12f51..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/app/defs.ma +++ /dev/null @@ -1,25 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -rec definition cbk (c: C) on c: nat \def match c with [(CSort m) \Rightarrow -m | (CHead c0 _ _) \Rightarrow (cbk c0)]. - -rec definition app1 (c: C) on c: T \to T \def \lambda (t: T).(match c with -[(CSort _) \Rightarrow t | (CHead c0 k u) \Rightarrow (app1 c0 (THead k u -t))]). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/aprem/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/aprem/defs.ma deleted file mode 100644 index e3ea6cc87..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/aprem/defs.ma +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/A/defs.ma". - -inductive aprem: nat \to (A \to (A \to Prop)) \def -| aprem_zero: \forall (a1: A).(\forall (a2: A).(aprem O (AHead a1 a2) a1)) -| aprem_succ: \forall (a2: A).(\forall (a: A).(\forall (i: nat).((aprem i a2 -a) \to (\forall (a1: A).(aprem (S i) (AHead a1 a2) a))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/aprem/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/aprem/fwd.ma deleted file mode 100644 index 3f415a4c1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/aprem/fwd.ma +++ /dev/null @@ -1,113 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/aprem/defs.ma". - -implied rec lemma aprem_ind (P: (nat \to (A \to (A \to Prop)))) (f: (\forall -(a1: A).(\forall (a2: A).(P O (AHead a1 a2) a1)))) (f0: (\forall (a2: -A).(\forall (a: A).(\forall (i: nat).((aprem i a2 a) \to ((P i a2 a) \to -(\forall (a1: A).(P (S i) (AHead a1 a2) a)))))))) (n: nat) (a: A) (a0: A) -(a1: aprem n a a0) on a1: P n a a0 \def match a1 with [(aprem_zero a2 a3) -\Rightarrow (f a2 a3) | (aprem_succ a2 a3 i a4 a5) \Rightarrow (f0 a2 a3 i a4 -((aprem_ind P f f0) i a2 a3 a4) a5)]. - -lemma aprem_gen_sort: - \forall (x: A).(\forall (i: nat).(\forall (h: nat).(\forall (n: nat).((aprem -i (ASort h n) x) \to False)))) -\def - \lambda (x: A).(\lambda (i: nat).(\lambda (h: nat).(\lambda (n: -nat).(\lambda (H: (aprem i (ASort h n) x)).(insert_eq A (ASort h n) (\lambda -(a: A).(aprem i a x)) (\lambda (_: A).False) (\lambda (y: A).(\lambda (H0: -(aprem i y x)).(aprem_ind (\lambda (_: nat).(\lambda (a: A).(\lambda (_: -A).((eq A a (ASort h n)) \to False)))) (\lambda (a1: A).(\lambda (a2: -A).(\lambda (H1: (eq A (AHead a1 a2) (ASort h n))).(let H2 \def (eq_ind A -(AHead a1 a2) (\lambda (ee: A).(match ee with [(ASort _ _) \Rightarrow False -| (AHead _ _) \Rightarrow True])) I (ASort h n) H1) in (False_ind False -H2))))) (\lambda (a2: A).(\lambda (a: A).(\lambda (i0: nat).(\lambda (_: -(aprem i0 a2 a)).(\lambda (_: (((eq A a2 (ASort h n)) \to False))).(\lambda -(a1: A).(\lambda (H3: (eq A (AHead a1 a2) (ASort h n))).(let H4 \def (eq_ind -A (AHead a1 a2) (\lambda (ee: A).(match ee with [(ASort _ _) \Rightarrow -False | (AHead _ _) \Rightarrow True])) I (ASort h n) H3) in (False_ind False -H4))))))))) i y x H0))) H))))). - -lemma aprem_gen_head_O: - \forall (a1: A).(\forall (a2: A).(\forall (x: A).((aprem O (AHead a1 a2) x) -\to (eq A x a1)))) -\def - \lambda (a1: A).(\lambda (a2: A).(\lambda (x: A).(\lambda (H: (aprem O -(AHead a1 a2) x)).(insert_eq A (AHead a1 a2) (\lambda (a: A).(aprem O a x)) -(\lambda (_: A).(eq A x a1)) (\lambda (y: A).(\lambda (H0: (aprem O y -x)).(insert_eq nat O (\lambda (n: nat).(aprem n y x)) (\lambda (_: nat).((eq -A y (AHead a1 a2)) \to (eq A x a1))) (\lambda (y0: nat).(\lambda (H1: (aprem -y0 y x)).(aprem_ind (\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).((eq -nat n O) \to ((eq A a (AHead a1 a2)) \to (eq A a0 a1)))))) (\lambda (a0: -A).(\lambda (a3: A).(\lambda (_: (eq nat O O)).(\lambda (H3: (eq A (AHead a0 -a3) (AHead a1 a2))).(let H4 \def (f_equal A A (\lambda (e: A).(match e with -[(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a3) -(AHead a1 a2) H3) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e with -[(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a0 a3) -(AHead a1 a2) H3) in (\lambda (H6: (eq A a0 a1)).H6)) H4)))))) (\lambda (a0: -A).(\lambda (a: A).(\lambda (i: nat).(\lambda (H2: (aprem i a0 a)).(\lambda -(H3: (((eq nat i O) \to ((eq A a0 (AHead a1 a2)) \to (eq A a a1))))).(\lambda -(a3: A).(\lambda (H4: (eq nat (S i) O)).(\lambda (H5: (eq A (AHead a3 a0) -(AHead a1 a2))).(let H6 \def (f_equal A A (\lambda (e: A).(match e with -[(ASort _ _) \Rightarrow a3 | (AHead a4 _) \Rightarrow a4])) (AHead a3 a0) -(AHead a1 a2) H5) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e with -[(ASort _ _) \Rightarrow a0 | (AHead _ a4) \Rightarrow a4])) (AHead a3 a0) -(AHead a1 a2) H5) in (\lambda (_: (eq A a3 a1)).(let H9 \def (eq_ind A a0 -(\lambda (a4: A).((eq nat i O) \to ((eq A a4 (AHead a1 a2)) \to (eq A a -a1)))) H3 a2 H7) in (let H10 \def (eq_ind A a0 (\lambda (a4: A).(aprem i a4 -a)) H2 a2 H7) in (let H11 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee -with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind -(eq A a a1) H11)))))) H6)))))))))) y0 y x H1))) H0))) H)))). - -lemma aprem_gen_head_S: - \forall (a1: A).(\forall (a2: A).(\forall (x: A).(\forall (i: nat).((aprem -(S i) (AHead a1 a2) x) \to (aprem i a2 x))))) -\def - \lambda (a1: A).(\lambda (a2: A).(\lambda (x: A).(\lambda (i: nat).(\lambda -(H: (aprem (S i) (AHead a1 a2) x)).(insert_eq A (AHead a1 a2) (\lambda (a: -A).(aprem (S i) a x)) (\lambda (_: A).(aprem i a2 x)) (\lambda (y: -A).(\lambda (H0: (aprem (S i) y x)).(insert_eq nat (S i) (\lambda (n: -nat).(aprem n y x)) (\lambda (_: nat).((eq A y (AHead a1 a2)) \to (aprem i a2 -x))) (\lambda (y0: nat).(\lambda (H1: (aprem y0 y x)).(aprem_ind (\lambda (n: -nat).(\lambda (a: A).(\lambda (a0: A).((eq nat n (S i)) \to ((eq A a (AHead -a1 a2)) \to (aprem i a2 a0)))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda -(H2: (eq nat O (S i))).(\lambda (H3: (eq A (AHead a0 a3) (AHead a1 a2))).(let -H4 \def (f_equal A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow -a0 | (AHead a _) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H3) in ((let H5 -\def (f_equal A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a3 | -(AHead _ a) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H3) in (\lambda (H6: -(eq A a0 a1)).(eq_ind_r A a1 (\lambda (a: A).(aprem i a2 a)) (let H7 \def -(eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True | (S _) -\Rightarrow False])) I (S i) H2) in (False_ind (aprem i a2 a1) H7)) a0 H6))) -H4)))))) (\lambda (a0: A).(\lambda (a: A).(\lambda (i0: nat).(\lambda (H2: -(aprem i0 a0 a)).(\lambda (H3: (((eq nat i0 (S i)) \to ((eq A a0 (AHead a1 -a2)) \to (aprem i a2 a))))).(\lambda (a3: A).(\lambda (H4: (eq nat (S i0) (S -i))).(\lambda (H5: (eq A (AHead a3 a0) (AHead a1 a2))).(let H6 \def (f_equal -A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a3 | (AHead a4 _) -\Rightarrow a4])) (AHead a3 a0) (AHead a1 a2) H5) in ((let H7 \def (f_equal A -A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a0 | (AHead _ a4) -\Rightarrow a4])) (AHead a3 a0) (AHead a1 a2) H5) in (\lambda (_: (eq A a3 -a1)).(let H9 \def (eq_ind A a0 (\lambda (a4: A).((eq nat i0 (S i)) \to ((eq A -a4 (AHead a1 a2)) \to (aprem i a2 a)))) H3 a2 H7) in (let H10 \def (eq_ind A -a0 (\lambda (a4: A).(aprem i0 a4 a)) H2 a2 H7) in (let H11 \def (f_equal nat -nat (\lambda (e: nat).(match e with [O \Rightarrow i0 | (S n) \Rightarrow -n])) (S i0) (S i) H4) in (let H12 \def (eq_ind nat i0 (\lambda (n: nat).((eq -nat n (S i)) \to ((eq A a2 (AHead a1 a2)) \to (aprem i a2 a)))) H9 i H11) in -(let H13 \def (eq_ind nat i0 (\lambda (n: nat).(aprem n a2 a)) H10 i H11) in -H13))))))) H6)))))))))) y0 y x H1))) H0))) H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/aprem/props.ma b/matita/matita/contribs/lambdadelta/basic_1/aprem/props.ma deleted file mode 100644 index 1932956b1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/aprem/props.ma +++ /dev/null @@ -1,70 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/aprem/fwd.ma". - -include "basic_1/leq/fwd.ma". - -lemma aprem_repl: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall -(i: nat).(\forall (b2: A).((aprem i a2 b2) \to (ex2 A (\lambda (b1: A).(leq g -b1 b2)) (\lambda (b1: A).(aprem i a1 b1))))))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 -a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (i: nat).(\forall -(b2: A).((aprem i a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda -(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 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 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 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)))). - -lemma aprem_asucc: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (i: nat).((aprem i -a1 a2) \to (aprem i (asucc g a1) a2))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (i: nat).(\lambda -(H: (aprem i a1 a2)).(aprem_ind (\lambda (n: nat).(\lambda (a: A).(\lambda -(a0: A).(aprem n (asucc g a) a0)))) (\lambda (a0: A).(\lambda (a3: -A).(aprem_zero a0 (asucc g a3)))) (\lambda (a0: A).(\lambda (a: A).(\lambda -(i0: nat).(\lambda (_: (aprem i0 a0 a)).(\lambda (H1: (aprem i0 (asucc g a0) -a)).(\lambda (a3: A).(aprem_succ (asucc g a0) a i0 H1 a3))))))) i a1 a2 -H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/aprem.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/aprem.ma deleted file mode 100644 index 442660739..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/aprem.ma +++ /dev/null @@ -1,257 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/arity/props.ma". - -include "basic_1/arity/cimp.ma". - -include "basic_1/aprem/props.ma". - -lemma 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 -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c)))) -(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g -b))))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda (a0: -A).(\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) -(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g -b)))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (i: nat).(\lambda -(b: A).(\lambda (H0: (aprem i (ASort O n) b)).(let H_x \def (aprem_gen_sort b -i O n H0) in (let H1 \def H_x in (False_ind (ex2_3 C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: -C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) H1)))))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: -(arity g d u a0)).(\lambda (H2: ((\forall (i0: nat).(\forall (b: A).((aprem -i0 a0 b) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d0 u0 (asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: -A).(\lambda (H3: (aprem i0 a0 b)).(let H_x \def (H2 i0 b H3) in (let H4 \def -H_x in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda -(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop -(plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x0 -\def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abbr c0 u i H0) in (let H7 \def -H_x0 in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda -(c1: C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda -(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) -(\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop -(S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus -i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) -H9))))) H7)))))))) H4)))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda -(u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) -u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: -((\forall (i0: nat).(\forall (b: A).((aprem i0 (asucc g a0) b) \to (ex2_3 C T -nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 -d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 -(asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: A).(\lambda (H3: (aprem -i0 a0 b)).(let H_y \def (H2 i0 b) in (let H4 \def (H_y (aprem_asucc g a0 b i0 -H3)) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda -(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop -(plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x -\def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abst c0 u i H0) in (let H7 \def -H_x in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda (c1: -C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) -(\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop -(S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus -i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) -H9))))) H7)))))))) H4)))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b -Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity -g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall (b0: A).((aprem i a1 b0) -\to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d u0 (asucc g b0))))))))))).(\lambda (t0: T).(\lambda (a2: -A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: -((\forall (i: nat).(\forall (b0: A).((aprem i a2 b0) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead -c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity -g d u0 (asucc g b0))))))))))).(\lambda (i: nat).(\lambda (b0: A).(\lambda -(H5: (aprem i a2 b0)).(let H_x \def (H4 i b0 H5) in (let H6 \def H_x in -(ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus i j) O d (CHead c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b0))))) (ex2_3 C T nat (\lambda -(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda -(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H7: (drop -(plus i x2) O x0 (CHead c0 (Bind b) u))).(\lambda (H8: (arity g x0 x1 (asucc -g b0))).(let H9 \def (eq_ind nat (S (plus i x2)) (\lambda (n: nat).(drop n O -x0 c0)) (drop_S b x0 c0 u (plus i x2) H7) (plus i (S x2)) (plus_n_Sm i x2)) -in (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d u0 (asucc g b0))))) x0 x1 (S x2) H9 H8))))))) -H6))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (H0: (arity g c0 u (asucc g a1))).(\lambda (_: ((\forall (i: -nat).(\forall (b: A).((aprem i (asucc g a1) b) \to (ex2_3 C T nat (\lambda -(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda -(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead -c0 (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (i: nat).(\forall (b: -A).((aprem i a2 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind Abst) u))))) -(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i (AHead -a1 a2) b)).(nat_ind (\lambda (n: nat).((aprem n (AHead a1 a2) b) \to (ex2_3 C -T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b)))))))) (\lambda (H5: (aprem O (AHead a1 a2) b)).(let H_y \def -(aprem_gen_head_O a1 a2 b H5) in (eq_ind_r A a1 (\lambda (a0: A).(ex2_3 C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g a0))))))) (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g a1))))) c0 u O (drop_refl -c0) H0) b H_y))) (\lambda (i0: nat).(\lambda (_: (((aprem i0 (AHead a1 a2) b) -\to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus i0 j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d u0 (asucc g b))))))))).(\lambda (H5: (aprem (S i0) (AHead a1 -a2) b)).(let H_y \def (aprem_gen_head_S a1 a2 b i0 H5) in (let H_x \def (H3 -i0 b H_y) in (let H6 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus i0 j) O d (CHead c0 (Bind Abst) u))))) -(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: nat).(\lambda (H7: (drop (plus i0 x2) O x0 (CHead c0 (Bind -Abst) u))).(\lambda (H8: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b))))) x0 x1 x2 (drop_S Abst x0 c0 u (plus i0 x2) H7) H8)))))) -H6))))))) i H4))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall -(b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (t0: -T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: -((\forall (i: nat).(\forall (b: A).((aprem i (AHead a1 a2) b) \to (ex2_3 C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem -i a2 b)).(let H_y \def (H3 (S i) b) in (let H5 \def (H_y (aprem_succ a2 b i -H4 a1)) in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (S (plus i j)) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda -(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda -(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: (drop (S -(plus i x2)) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g b))).(C_ind -(\lambda (c1: C).((drop (S (plus i x2)) O c1 c0) \to ((arity g c1 x1 (asucc g -b)) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d u0 (asucc g b))))))))) (\lambda (n: nat).(\lambda (H8: -(drop (S (plus i x2)) O (CSort n) c0)).(\lambda (_: (arity g (CSort n) x1 -(asucc g b))).(and3_ind (eq C c0 (CSort n)) (eq nat (S (plus i x2)) O) (eq -nat O O) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d u0 (asucc g b)))))) (\lambda (_: (eq C c0 (CSort -n))).(\lambda (H11: (eq nat (S (plus i x2)) O)).(\lambda (_: (eq nat O -O)).(let H13 \def (eq_ind nat (S (plus i x2)) (\lambda (ee: nat).(match ee -with [O \Rightarrow False | (S _) \Rightarrow True])) I O H11) in (False_ind -(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus -i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d -u0 (asucc g b)))))) H13))))) (drop_gen_sort n (S (plus i x2)) O c0 H8))))) -(\lambda (d: C).(\lambda (IHd: (((drop (S (plus i x2)) O d c0) \to ((arity g -d x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))))))).(\lambda (k: -K).(\lambda (t1: T).(\lambda (H8: (drop (S (plus i x2)) O (CHead d k t1) -c0)).(\lambda (H9: (arity g (CHead d k t1) x1 (asucc g b))).(K_ind (\lambda -(k0: K).((arity g (CHead d k0 t1) x1 (asucc g b)) \to ((drop (r k0 (plus i -x2)) O d c0) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d0 u0 (asucc g b))))))))) (\lambda (b0: B).(\lambda (H10: -(arity g (CHead d (Bind b0) t1) x1 (asucc g b))).(\lambda (H11: (drop (r -(Bind b0) (plus i x2)) O d c0)).(ex2_3_intro C T nat (\lambda (d0: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda -(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) -(CHead d (Bind b0) t1) x1 (S x2) (eq_ind nat (S (plus i x2)) (\lambda (n: -nat).(drop n O (CHead d (Bind b0) t1) c0)) (drop_drop (Bind b0) (plus i x2) d -c0 H11 t1) (plus i (S x2)) (plus_n_Sm i x2)) H10)))) (\lambda (f: F).(\lambda -(H10: (arity g (CHead d (Flat f) t1) x1 (asucc g b))).(\lambda (H11: (drop (r -(Flat f) (plus i x2)) O d c0)).(let H12 \def (IHd H11 (arity_cimp_conf g -(CHead d (Flat f) t1) x1 (asucc g b) H10 d (cimp_flat_sx f d t1))) in -(ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) -(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: nat).(\lambda (H13: (drop -(plus i x5) O x3 c0)).(\lambda (H14: (arity g x3 x4 (asucc g -b))).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d0 u0 (asucc g b))))) x3 x4 x5 H13 H14)))))) H12))))) k H9 -(drop_gen_drop k d c0 t1 (plus i x2) H8)))))))) x0 H6 H7)))))) -H5))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda -(_: (arity g c0 u (asucc g a0))).(\lambda (_: ((\forall (i: nat).(\forall (b: -A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (t0: -T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (i: nat).(\forall -(b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (i: -nat).(\lambda (b: A).(\lambda (H4: (aprem i a0 b)).(let H_x \def (H3 i b H4) -in (let H5 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) -(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: -(drop (plus i x2) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g -b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 H6 H7)))))) H5)))))))))))))) -(\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 -t0 a1)).(\lambda (H1: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to -(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus -i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d -u (asucc g b))))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 -a2)).(\lambda (i: nat).(\lambda (b: A).(\lambda (H3: (aprem i a2 b)).(let H_x -\def (aprem_repl g a1 a2 H2 i b H3) in (let H4 \def H_x in (ex2_ind A -(\lambda (b1: A).(leq g b1 b)) (\lambda (b1: A).(aprem i a1 b1)) (ex2_3 C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d -c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc -g b)))))) (\lambda (x: A).(\lambda (H5: (leq g x b)).(\lambda (H6: (aprem i -a1 x)).(let H_x0 \def (H1 i x H6) in (let H7 \def H_x0 in (ex2_3_ind C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) -(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g -x))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: -nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(x2: nat).(\lambda (H8: (drop (plus i x2) O x0 c0)).(\lambda (H9: (arity g x0 -x1 (asucc g x))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: -T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 H8 (arity_repl g -x0 x1 (asucc g x) H9 (asucc g b) (asucc_repl g x b H5)))))))) H7)))))) -H4))))))))))))) c t a H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/cimp.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/cimp.ma deleted file mode 100644 index e9222f5bb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/cimp.ma +++ /dev/null @@ -1,98 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/arity/fwd.ma". - -include "basic_1/cimp/props.ma". - -lemma arity_cimp_conf: - \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 -t a) \to (\forall (c2: C).((cimp c1 c2) \to (arity g c2 t a))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: -A).(\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a0)))))) (\lambda (c: -C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (cimp c c2)).(arity_sort g -c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: -A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (c2: C).((cimp d -c2) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda (H3: (cimp c -c2)).(let H_x \def (H3 Abbr d u i H0) in (let H4 \def H_x in (ex_ind C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (arity g c2 (TLRef i) -a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x (Bind Abbr) u))).(let -H_x0 \def (cimp_getl_conf c c2 H3 Abbr d u i H0) in (let H6 \def H_x0 in -(ex2_ind C (\lambda (d2: C).(cimp d d2)) (\lambda (d2: C).(getl i c2 (CHead -d2 (Bind Abbr) u))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (H7: -(cimp d x0)).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(let H9 \def -(eq_ind C (CHead x (Bind Abbr) u) (\lambda (c0: C).(getl i c2 c0)) H5 (CHead -x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 (CHead x0 (Bind -Abbr) u) H8)) in (let H10 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow x | (CHead c0 _ _) \Rightarrow c0])) (CHead x (Bind -Abbr) u) (CHead x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 -(CHead x0 (Bind Abbr) u) H8)) in (let H11 \def (eq_ind_r C x0 (\lambda (c0: -C).(getl i c2 (CHead c0 (Bind Abbr) u))) H9 x H10) in (let H12 \def (eq_ind_r -C x0 (\lambda (c0: C).(cimp d c0)) H7 x H10) in (arity_abbr g c2 x u i H11 a0 -(H2 x H12))))))))) H6))))) H4))))))))))))) (\lambda (c: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind -Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda -(H2: ((\forall (c2: C).((cimp d c2) \to (arity g c2 u (asucc g -a0)))))).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(let H_x \def (H3 Abst d -u i H0) in (let H4 \def H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead -d2 (Bind Abst) u))) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: -(getl i c2 (CHead x (Bind Abst) u))).(let H_x0 \def (cimp_getl_conf c c2 H3 -Abst d u i H0) in (let H6 \def H_x0 in (ex2_ind C (\lambda (d2: C).(cimp d -d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (arity g c2 -(TLRef i) a0) (\lambda (x0: C).(\lambda (H7: (cimp d x0)).(\lambda (H8: (getl -i c2 (CHead x0 (Bind Abst) u))).(let H9 \def (eq_ind C (CHead x (Bind Abst) -u) (\lambda (c0: C).(getl i c2 c0)) H5 (CHead x0 (Bind Abst) u) (getl_mono c2 -(CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in (let H10 \def -(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow x | (CHead -c0 _ _) \Rightarrow c0])) (CHead x (Bind Abst) u) (CHead x0 (Bind Abst) u) -(getl_mono c2 (CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in -(let H11 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c2 (CHead c0 (Bind -Abst) u))) H9 x H10) in (let H12 \def (eq_ind_r C x0 (\lambda (c0: C).(cimp d -c0)) H7 x H10) in (arity_abst g c2 x u i H11 a0 (H2 x H12))))))))) H6))))) -H4))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda -(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u -a1)).(\lambda (H2: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u -a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c -(Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((cimp (CHead c (Bind b) -u) c2) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H5: (cimp c -c2)).(arity_bind g b H0 c2 u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) u) -(cimp_bind c c2 H5 b u)))))))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: -((\forall (c2: C).((cimp c c2) \to (arity g c2 u (asucc g a1)))))).(\lambda -(t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 -a2)).(\lambda (H3: ((\forall (c2: C).((cimp (CHead c (Bind Abst) u) c2) \to -(arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: (cimp c -c2)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind Abst) u) -(cimp_bind c c2 H4 Abst u)))))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall -(c2: C).((cimp c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda (a2: -A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c2: -C).((cimp c c2) \to (arity g c2 t0 (AHead a1 a2)))))).(\lambda (c2: -C).(\lambda (H4: (cimp c c2)).(arity_appl g c2 u a1 (H1 c2 H4) t0 a2 (H3 c2 -H4))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: -(arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to -(arity g c2 u (asucc g a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 -a0)).(\lambda (H3: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 -a0))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_cast g c2 u a0 (H1 -c2 H4) t0 (H3 c2 H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda -(a1: A).(\lambda (_: (arity g c t0 a1)).(\lambda (H1: ((\forall (c2: -C).((cimp c c2) \to (arity g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: -(leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(arity_repl g c2 -t0 a1 (H1 c2 H3) a2 H2)))))))))) c1 t a H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/defs.ma deleted file mode 100644 index b193fac10..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/defs.ma +++ /dev/null @@ -1,45 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/leq/defs.ma". - -include "basic_1/getl/defs.ma". - -inductive arity (g: G): C \to (T \to (A \to Prop)) \def -| arity_sort: \forall (c: C).(\forall (n: nat).(arity g c (TSort n) (ASort O -n))) -| arity_abbr: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: -nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (a: A).((arity g d u a) -\to (arity g c (TLRef i) a))))))) -| arity_abst: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: -nat).((getl i c (CHead d (Bind Abst) u)) \to (\forall (a: A).((arity g d u -(asucc g a)) \to (arity g c (TLRef i) a))))))) -| arity_bind: \forall (b: B).((not (eq B b Abst)) \to (\forall (c: -C).(\forall (u: T).(\forall (a1: A).((arity g c u a1) \to (\forall (t: -T).(\forall (a2: A).((arity g (CHead c (Bind b) u) t a2) \to (arity g c -(THead (Bind b) u t) a2))))))))) -| arity_head: \forall (c: C).(\forall (u: T).(\forall (a1: A).((arity g c u -(asucc g a1)) \to (\forall (t: T).(\forall (a2: A).((arity g (CHead c (Bind -Abst) u) t a2) \to (arity g c (THead (Bind Abst) u t) (AHead a1 a2)))))))) -| arity_appl: \forall (c: C).(\forall (u: T).(\forall (a1: A).((arity g c u -a1) \to (\forall (t: T).(\forall (a2: A).((arity g c t (AHead a1 a2)) \to -(arity g c (THead (Flat Appl) u t) a2))))))) -| arity_cast: \forall (c: C).(\forall (u: T).(\forall (a: A).((arity g c u -(asucc g a)) \to (\forall (t: T).((arity g c t a) \to (arity g c (THead (Flat -Cast) u t) a)))))) -| arity_repl: \forall (c: C).(\forall (t: T).(\forall (a1: A).((arity g c t -a1) \to (\forall (a2: A).((leq g a1 a2) \to (arity g c t a2)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/fwd.ma deleted file mode 100644 index 78211905a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/fwd.ma +++ /dev/null @@ -1,1291 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/arity/defs.ma". - -include "basic_1/leq/asucc.ma". - -include "basic_1/getl/drop.ma". - -implied rec lemma arity_ind (g: G) (P: (C \to (T \to (A \to Prop)))) (f: -(\forall (c: C).(\forall (n: nat).(P c (TSort n) (ASort O n))))) (f0: -(\forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) u)) \to (\forall (a: A).((arity g d u a) \to ((P d u a) -\to (P c (TLRef i) a)))))))))) (f1: (\forall (c: C).(\forall (d: C).(\forall -(u: T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) u)) \to (\forall (a: -A).((arity g d u (asucc g a)) \to ((P d u (asucc g a)) \to (P c (TLRef i) -a)))))))))) (f2: (\forall (b: B).((not (eq B b Abst)) \to (\forall (c: -C).(\forall (u: T).(\forall (a1: A).((arity g c u a1) \to ((P c u a1) \to -(\forall (t: T).(\forall (a2: A).((arity g (CHead c (Bind b) u) t a2) \to ((P -(CHead c (Bind b) u) t a2) \to (P c (THead (Bind b) u t) a2))))))))))))) (f3: -(\forall (c: C).(\forall (u: T).(\forall (a1: A).((arity g c u (asucc g a1)) -\to ((P c u (asucc g a1)) \to (\forall (t: T).(\forall (a2: A).((arity g -(CHead c (Bind Abst) u) t a2) \to ((P (CHead c (Bind Abst) u) t a2) \to (P c -(THead (Bind Abst) u t) (AHead a1 a2)))))))))))) (f4: (\forall (c: -C).(\forall (u: T).(\forall (a1: A).((arity g c u a1) \to ((P c u a1) \to -(\forall (t: T).(\forall (a2: A).((arity g c t (AHead a1 a2)) \to ((P c t -(AHead a1 a2)) \to (P c (THead (Flat Appl) u t) a2))))))))))) (f5: (\forall -(c: C).(\forall (u: T).(\forall (a: A).((arity g c u (asucc g a)) \to ((P c u -(asucc g a)) \to (\forall (t: T).((arity g c t a) \to ((P c t a) \to (P c -(THead (Flat Cast) u t) a)))))))))) (f6: (\forall (c: C).(\forall (t: -T).(\forall (a1: A).((arity g c t a1) \to ((P c t a1) \to (\forall (a2: -A).((leq g a1 a2) \to (P c t a2))))))))) (c: C) (t: T) (a: A) (a0: arity g c -t a) on a0: P c t a \def match a0 with [(arity_sort c0 n) \Rightarrow (f c0 -n) | (arity_abbr c0 d u i g0 a1 a2) \Rightarrow (f0 c0 d u i g0 a1 a2 -((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) d u a1 a2)) | (arity_abst c0 d u i g0 -a1 a2) \Rightarrow (f1 c0 d u i g0 a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 -f6) d u (asucc g a1) a2)) | (arity_bind b n c0 u a1 a2 t0 a3 a4) \Rightarrow -(f2 b n c0 u a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 u a1 a2) t0 a3 -a4 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) (CHead c0 (Bind b) u) t0 a3 a4)) | -(arity_head c0 u a1 a2 t0 a3 a4) \Rightarrow (f3 c0 u a1 a2 ((arity_ind g P f -f0 f1 f2 f3 f4 f5 f6) c0 u (asucc g a1) a2) t0 a3 a4 ((arity_ind g P f f0 f1 -f2 f3 f4 f5 f6) (CHead c0 (Bind Abst) u) t0 a3 a4)) | (arity_appl c0 u a1 a2 -t0 a3 a4) \Rightarrow (f4 c0 u a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) -c0 u a1 a2) t0 a3 a4 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 t0 (AHead a1 -a3) a4)) | (arity_cast c0 u a1 a2 t0 a3) \Rightarrow (f5 c0 u a1 a2 -((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 u (asucc g a1) a2) t0 a3 -((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 t0 a1 a3)) | (arity_repl c0 t0 a1 -a2 a3 l) \Rightarrow (f6 c0 t0 a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) -c0 t0 a1 a2) a3 l)]. - -lemma arity_gen_sort: - \forall (g: G).(\forall (c: C).(\forall (n: nat).(\forall (a: A).((arity g c -(TSort n) a) \to (leq g a (ASort O n)))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (n: nat).(\lambda (a: A).(\lambda -(H: (arity g c (TSort n) a)).(insert_eq T (TSort n) (\lambda (t: T).(arity g -c t a)) (\lambda (_: T).(leq g a (ASort O n))) (\lambda (y: T).(\lambda (H0: -(arity g c y a)).(arity_ind g (\lambda (_: C).(\lambda (t: T).(\lambda (a0: -A).((eq T t (TSort n)) \to (leq g a0 (ASort O n)))))) (\lambda (_: -C).(\lambda (n0: nat).(\lambda (H1: (eq T (TSort n0) (TSort n))).(let H2 \def -(f_equal T nat (\lambda (e: T).(match e with [(TSort n1) \Rightarrow n1 | -(TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort -n) H1) in (eq_ind_r nat n (\lambda (n1: nat).(leq g (ASort O n1) (ASort O -n))) (leq_refl g (ASort O n)) n0 H2))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind -Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: (((eq -T u (TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H4: (eq T (TLRef i) -(TSort n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) -H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: -A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: (((eq T u (TSort n)) -\to (leq g (asucc g a0) (ASort O n))))).(\lambda (H4: (eq T (TLRef i) (TSort -n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) H5))))))))))) -(\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda -(u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T -u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: T).(\lambda (a2: -A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t -(TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H6: (eq T (THead (Bind b) -u t) (TSort n))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind (leq g a2 -(ASort O n)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (_: (((eq T u (TSort -n)) \to (leq g (asucc g a1) (ASort O n))))).(\lambda (t: T).(\lambda (a2: -A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t a2)).(\lambda (_: (((eq T -t (TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H5: (eq T (THead (Bind -Abst) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Bind Abst) u t) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in -(False_ind (leq g (AHead a1 a2) (ASort O n)) H6)))))))))))) (\lambda (c0: -C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda -(_: (((eq T u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: -T).(\lambda (a2: A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: -(((eq T t (TSort n)) \to (leq g (AHead a1 a2) (ASort O n))))).(\lambda (H5: -(eq T (THead (Flat Appl) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat -Appl) u t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) -H5) in (False_ind (leq g a2 (ASort O n)) H6)))))))))))) (\lambda (c0: -C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g -a0))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a0) (ASort O -n))))).(\lambda (t: T).(\lambda (_: (arity g c0 t a0)).(\lambda (_: (((eq T t -(TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H5: (eq T (THead (Flat -Cast) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) u t) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in -(False_ind (leq g a0 (ASort O n)) H6))))))))))) (\lambda (c0: C).(\lambda (t: -T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t a1)).(\lambda (H2: (((eq T t -(TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (a2: A).(\lambda (H3: (leq -g a1 a2)).(\lambda (H4: (eq T t (TSort n))).(let H5 \def (f_equal T T -(\lambda (e: T).e) t (TSort n) H4) in (let H6 \def (eq_ind T t (\lambda (t0: -T).((eq T t0 (TSort n)) \to (leq g a1 (ASort O n)))) H2 (TSort n) H5) in (let -H7 \def (eq_ind T t (\lambda (t0: T).(arity g c0 t0 a1)) H1 (TSort n) H5) in -(leq_trans g a2 a1 (leq_sym g a1 a2 H3) (ASort O n) (H6 (refl_equal T (TSort -n))))))))))))))) c y a H0))) H))))). - -lemma arity_gen_lref: - \forall (g: G).(\forall (c: C).(\forall (i: nat).(\forall (a: A).((arity g c -(TLRef i) a) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c -(CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a)))) -(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abst) -u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a)))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (i: nat).(\lambda (a: A).(\lambda -(H: (arity g c (TLRef i) a)).(insert_eq T (TLRef i) (\lambda (t: T).(arity g -c t a)) (\lambda (_: T).(or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl -i c (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u -a)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind -Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a))))))) -(\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: -C).(\lambda (t: T).(\lambda (a0: A).((eq T t (TLRef i)) \to (or (ex2_2 C T -(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) -(\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d: -C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: -C).(\lambda (u: T).(arity g d u (asucc g a0)))))))))) (\lambda (c0: -C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (TLRef i))).(let H2 \def -(eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I -(TLRef i) H1) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u: -T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: -T).(arity g d u (ASort O n))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: -T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: -T).(arity g d u (asucc g (ASort O n))))))) H2))))) (\lambda (c0: C).(\lambda -(d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d -(Bind Abbr) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u a0)).(\lambda -(_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: C).(\lambda (u0: -T).(getl i d (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: -T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i -d (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 -u0 (asucc g a0))))))))).(\lambda (H4: (eq T (TLRef i0) (TLRef i))).(let H5 -\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i0 | -(TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef -i) H4) in (let H6 \def (eq_ind nat i0 (\lambda (n: nat).(getl n c0 (CHead d -(Bind Abbr) u))) H1 i H5) in (or_introl (ex2_2 C T (\lambda (d0: C).(\lambda -(u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda -(u0: T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: -T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: -T).(arity g d0 u0 (asucc g a0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda -(u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda -(u0: T).(arity g d0 u0 a0))) d u H6 H2))))))))))))) (\lambda (c0: C).(\lambda -(d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d -(Bind Abst) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u (asucc g -a0))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: -C).(\lambda (u0: T).(getl i d (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: -C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) (ex2_2 C T (\lambda (d0: -C).(\lambda (u0: T).(getl i d (CHead d0 (Bind Abst) u0)))) (\lambda (d0: -C).(\lambda (u0: T).(arity g d0 u0 (asucc g (asucc g a0)))))))))).(\lambda -(H4: (eq T (TLRef i0) (TLRef i))).(let H5 \def (f_equal T nat (\lambda (e: -T).(match e with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead -_ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i) H4) in (let H6 \def (eq_ind nat -i0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abst) u))) H1 i H5) in -(or_intror (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 -(Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0)))) -(ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) -u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) -(ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind -Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0)))) -d u H6 H2))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b -Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity -g c0 u a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 a1)))) (ex2_2 C T (\lambda (d: C).(\lambda -(u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: -T).(arity g d u0 (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: -A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t -(TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead -c0 (Bind b) u) (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: -T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i -(CHead c0 (Bind b) u) (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda -(u0: T).(arity g d u0 (asucc g a2))))))))).(\lambda (H6: (eq T (THead (Bind -b) u t) (TLRef i))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (TLRef i) H6) in (False_ind (or (ex2_2 -C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) -(\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 (asucc g a2)))))) H7)))))))))))))) (\lambda -(c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g -a1))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 (asucc g a1))))) (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 (asucc g (asucc g a1)))))))))).(\lambda (t: -T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t -a2)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Abbr) -u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T -(\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d -(Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g -a2))))))))).(\lambda (H5: (eq T (THead (Bind Abst) u t) (TLRef i))).(let H6 -\def (eq_ind T (THead (Bind Abst) u t) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 (AHead a1 a2))))) (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 (asucc g (AHead a1 a2))))))) H6)))))))))))) -(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u -a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 a1)))) (ex2_2 C T (\lambda (d: C).(\lambda -(u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: -T).(arity g d u0 (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: -A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: (((eq T t (TLRef -i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d -(Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (AHead a1 -a2))))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind -Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g (AHead -a1 a2)))))))))).(\lambda (H5: (eq T (THead (Flat Appl) u t) (TLRef i))).(let -H6 \def (eq_ind T (THead (Flat Appl) u t) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda -(u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: -T).(arity g d u0 (asucc g a2)))))) H6)))))))))))) (\lambda (c0: C).(\lambda -(u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda -(_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: -T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: -T).(arity g d u0 (asucc g a0))))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: -T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: -T).(arity g d u0 (asucc g (asucc g a0)))))))))).(\lambda (t: T).(\lambda (_: -(arity g c0 t a0)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T -(\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) -(\lambda (d: C).(\lambda (u0: T).(arity g d u0 a0)))) (ex2_2 C T (\lambda (d: -C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: -C).(\lambda (u0: T).(arity g d u0 (asucc g a0))))))))).(\lambda (H5: (eq T -(THead (Flat Cast) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Flat Cast) -u t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in -(False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead -d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a0)))) -(ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) -u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a0)))))) -H6))))))))))) (\lambda (c0: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H1: -(arity g c0 t a1)).(\lambda (H2: (((eq T t (TLRef i)) \to (or (ex2_2 C T -(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) -(\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: -C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: -C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (a2: -A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t (TLRef i))).(let H5 -\def (f_equal T T (\lambda (e: T).e) t (TLRef i) H4) in (let H6 \def (eq_ind -T t (\lambda (t0: T).((eq T t0 (TLRef i)) \to (or (ex2_2 C T (\lambda (d: -C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: -C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda -(u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: -T).(arity g d u (asucc g a1)))))))) H2 (TLRef i) H5) in (let H7 \def (eq_ind -T t (\lambda (t0: T).(arity g c0 t0 a1)) H1 (TLRef i) H5) in (let H8 \def (H6 -(refl_equal T (TLRef i))) in (or_ind (ex2_2 C T (\lambda (d: C).(\lambda (u: -T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: -T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 -(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u -(asucc g a1))))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 -(CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u -a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind -Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) -(\lambda (H9: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d -(Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u -a1))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d -(Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1))) (or -(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) -u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda -(d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: -C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H11: -(arity g x0 x1 a1)).(or_introl (ex2_2 C T (\lambda (d: C).(\lambda (u: -T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: -T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 -(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u -(asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 -(CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))) -x0 x1 H10 (arity_repl g x0 x1 a1 H11 a2 H3))))))) H9)) (\lambda (H9: (ex2_2 C -T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) -(\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))))).(ex2_2_ind C T -(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) -(\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))) (or (ex2_2 C T -(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) -(\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: -C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: -C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H11: -(arity g x0 x1 (asucc g a1))).(or_intror (ex2_2 C T (\lambda (d: C).(\lambda -(u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: -T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 -(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u -(asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 -(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u -(asucc g a2)))) x0 x1 H10 (arity_repl g x0 x1 (asucc g a1) H11 (asucc g a2) -(asucc_repl g a1 a2 H3)))))))) H9)) H8))))))))))))) c y a H0))) H))))). - -lemma arity_gen_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (g: G).(\forall (c: -C).(\forall (u: T).(\forall (t: T).(\forall (a2: A).((arity g c (THead (Bind -b) u t) a2) \to (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (_: -A).(arity g (CHead c (Bind b) u) t a2)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (g: G).(\lambda -(c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: A).(\lambda (H0: (arity -g c (THead (Bind b) u t) a2)).(insert_eq T (THead (Bind b) u t) (\lambda (t0: -T).(arity g c t0 a2)) (\lambda (_: T).(ex2 A (\lambda (a1: A).(arity g c u -a1)) (\lambda (_: A).(arity g (CHead c (Bind b) u) t a2)))) (\lambda (y: -T).(\lambda (H1: (arity g c y a2)).(arity_ind g (\lambda (c0: C).(\lambda -(t0: T).(\lambda (a: A).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda -(a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t -a))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H2: (eq T (TSort n) -(THead (Bind b) u t))).(let H3 \def (eq_ind T (TSort n) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H2) in (False_ind -(ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 -(Bind b) u) t (ASort O n)))) H3))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind -Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq -T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) -(\lambda (_: A).(arity g (CHead d (Bind b) u) t a)))))).(\lambda (H5: (eq T -(TLRef i) (THead (Bind b) u t))).(let H6 \def (eq_ind T (TLRef i) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H5) in -(False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity -g (CHead c0 (Bind b) u) t a))) H6))))))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind -Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda -(_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u -a1)) (\lambda (_: A).(arity g (CHead d (Bind b) u) t (asucc g -a))))))).(\lambda (H5: (eq T (TLRef i) (THead (Bind b) u t))).(let H6 \def -(eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(THead (Bind b) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u -a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H6))))))))))) -(\lambda (b0: B).(\lambda (H2: (not (eq B b0 Abst))).(\lambda (c0: -C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H3: (arity g c0 u0 -a1)).(\lambda (H4: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: -A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t -a1)))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H5: (arity g (CHead c0 -(Bind b0) u0) t0 a0)).(\lambda (H6: (((eq T t0 (THead (Bind b) u t)) \to (ex2 -A (\lambda (a3: A).(arity g (CHead c0 (Bind b0) u0) u a3)) (\lambda (_: -A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t a0)))))).(\lambda -(H7: (eq T (THead (Bind b0) u0 t0) (THead (Bind b) u t))).(let H8 \def -(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 | (TLRef -_) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 t0) (THead -(Bind b) u t) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) -\Rightarrow t1])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in ((let -H10 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 -| (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) (THead (Bind -b0) u0 t0) (THead (Bind b) u t) H7) in (\lambda (H11: (eq T u0 u)).(\lambda -(H12: (eq B b0 b)).(let H13 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 -(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g (CHead c0 (Bind -b0) u0) u a3)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind -b) u) t a0))))) H6 t H10) in (let H14 \def (eq_ind T t0 (\lambda (t1: -T).(arity g (CHead c0 (Bind b0) u0) t1 a0)) H5 t H10) in (let H15 \def -(eq_ind T u0 (\lambda (t1: T).((eq T t (THead (Bind b) u t)) \to (ex2 A -(\lambda (a3: A).(arity g (CHead c0 (Bind b0) t1) u a3)) (\lambda (_: -A).(arity g (CHead (CHead c0 (Bind b0) t1) (Bind b) u) t a0))))) H13 u H11) -in (let H16 \def (eq_ind T u0 (\lambda (t1: T).(arity g (CHead c0 (Bind b0) -t1) t a0)) H14 u H11) in (let H17 \def (eq_ind T u0 (\lambda (t1: T).((eq T -t1 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) -(\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1))))) H4 u H11) in (let -H18 \def (eq_ind T u0 (\lambda (t1: T).(arity g c0 t1 a1)) H3 u H11) in (let -H19 \def (eq_ind B b0 (\lambda (b1: B).((eq T t (THead (Bind b) u t)) \to -(ex2 A (\lambda (a3: A).(arity g (CHead c0 (Bind b1) u) u a3)) (\lambda (_: -A).(arity g (CHead (CHead c0 (Bind b1) u) (Bind b) u) t a0))))) H15 b H12) in -(let H20 \def (eq_ind B b0 (\lambda (b1: B).(arity g (CHead c0 (Bind b1) u) t -a0)) H16 b H12) in (let H21 \def (eq_ind B b0 (\lambda (b1: B).(not (eq B b1 -Abst))) H2 b H12) in (ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) -(\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) a1 H18 H20))))))))))))) -H9)) H8)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: -A).(\lambda (H2: (arity g c0 u0 (asucc g a1))).(\lambda (H3: (((eq T u0 -(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda -(_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1))))))).(\lambda (t0: -T).(\lambda (a0: A).(\lambda (H4: (arity g (CHead c0 (Bind Abst) u0) t0 -a0)).(\lambda (H5: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: -A).(arity g (CHead c0 (Bind Abst) u0) u a3)) (\lambda (_: A).(arity g (CHead -(CHead c0 (Bind Abst) u0) (Bind b) u) t a0)))))).(\lambda (H6: (eq T (THead -(Bind Abst) u0 t0) (THead (Bind b) u t))).(let H7 \def (f_equal T B (\lambda -(e: T).(match e with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst -| (THead k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat -_) \Rightarrow Abst])])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) -in ((let H8 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) \Rightarrow t1])) -(THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in ((let H9 \def (f_equal -T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) -\Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) (THead (Bind Abst) u0 t0) -(THead (Bind b) u t) H6) in (\lambda (H10: (eq T u0 u)).(\lambda (H11: (eq B -Abst b)).(let H12 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Bind -b) u t)) \to (ex2 A (\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u0) u -a3)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind b) u) t -a0))))) H5 t H9) in (let H13 \def (eq_ind T t0 (\lambda (t1: T).(arity g -(CHead c0 (Bind Abst) u0) t1 a0)) H4 t H9) in (let H14 \def (eq_ind T u0 -(\lambda (t1: T).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: -A).(arity g (CHead c0 (Bind Abst) t1) u a3)) (\lambda (_: A).(arity g (CHead -(CHead c0 (Bind Abst) t1) (Bind b) u) t a0))))) H12 u H10) in (let H15 \def -(eq_ind T u0 (\lambda (t1: T).(arity g (CHead c0 (Bind Abst) t1) t a0)) H13 u -H10) in (let H16 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead (Bind b) -u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g -(CHead c0 (Bind b) u) t (asucc g a1)))))) H3 u H10) in (let H17 \def (eq_ind -T u0 (\lambda (t1: T).(arity g c0 t1 (asucc g a1))) H2 u H10) in (let H18 -\def (eq_ind_r B b (\lambda (b0: B).((eq T t (THead (Bind b0) u t)) \to (ex2 -A (\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) u a3)) (\lambda (_: -A).(arity g (CHead (CHead c0 (Bind Abst) u) (Bind b0) u) t a0))))) H14 Abst -H11) in (let H19 \def (eq_ind_r B b (\lambda (b0: B).((eq T u (THead (Bind -b0) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: -A).(arity g (CHead c0 (Bind b0) u) t (asucc g a1)))))) H16 Abst H11) in (let -H20 \def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H Abst H11) in -(eq_ind B Abst (\lambda (b0: B).(ex2 A (\lambda (a3: A).(arity g c0 u a3)) -(\lambda (_: A).(arity g (CHead c0 (Bind b0) u) t (AHead a1 a0))))) (let H21 -\def (match (H20 (refl_equal B Abst)) in False with []) in H21) b -H11))))))))))))) H8)) H7)))))))))))) (\lambda (c0: C).(\lambda (u0: -T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 -(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda -(_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (t0: T).(\lambda -(a0: A).(\lambda (_: (arity g c0 t0 (AHead a1 a0))).(\lambda (_: (((eq T t0 -(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda -(_: A).(arity g (CHead c0 (Bind b) u) t (AHead a1 a0))))))).(\lambda (H6: (eq -T (THead (Flat Appl) u0 t0) (THead (Bind b) u t))).(let H7 \def (eq_ind T -(THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind b) u t) H6) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u -a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0))) H7)))))))))))) -(\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: (arity g c0 u0 -(asucc g a))).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A -(\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind -b) u) t (asucc g a))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 -a)).(\lambda (_: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: -A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t -a)))))).(\lambda (H6: (eq T (THead (Flat Cast) u0 t0) (THead (Bind b) u -t))).(let H7 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k -_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])])) I (THead (Bind b) u t) H6) in (False_ind (ex2 A -(\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind -b) u) t a))) H7))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: -A).(\lambda (H2: (arity g c0 t0 a1)).(\lambda (H3: (((eq T t0 (THead (Bind b) -u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g -(CHead c0 (Bind b) u) t a1)))))).(\lambda (a0: A).(\lambda (H4: (leq g a1 -a0)).(\lambda (H5: (eq T t0 (THead (Bind b) u t))).(let H6 \def (f_equal T T -(\lambda (e: T).e) t0 (THead (Bind b) u t) H5) in (let H7 \def (eq_ind T t0 -(\lambda (t1: T).((eq T t1 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: -A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t -a1))))) H3 (THead (Bind b) u t) H6) in (let H8 \def (eq_ind T t0 (\lambda -(t1: T).(arity g c0 t1 a1)) H2 (THead (Bind b) u t) H6) in (let H9 \def (H7 -(refl_equal T (THead (Bind b) u t))) in (ex2_ind A (\lambda (a3: A).(arity g -c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)) (ex2 A -(\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind -b) u) t a0))) (\lambda (x: A).(\lambda (H10: (arity g c0 u x)).(\lambda (H11: -(arity g (CHead c0 (Bind b) u) t a1)).(ex_intro2 A (\lambda (a3: A).(arity g -c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) x H10 -(arity_repl g (CHead c0 (Bind b) u) t a1 H11 a0 H4))))) H9))))))))))))) c y -a2 H1))) H0)))))))). - -lemma arity_gen_abst: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a: -A).((arity g c (THead (Bind Abst) u t) a) \to (ex3_2 A A (\lambda (a1: -A).(\lambda (a2: A).(eq A a (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: -A).(arity g c u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g -(CHead c (Bind Abst) u) t a2))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: -A).(\lambda (H: (arity g c (THead (Bind Abst) u t) a)).(insert_eq T (THead -(Bind Abst) u t) (\lambda (t0: T).(arity g c t0 a)) (\lambda (_: T).(ex3_2 A -A (\lambda (a1: A).(\lambda (a2: A).(eq A a (AHead a1 a2)))) (\lambda (a1: -A).(\lambda (_: A).(arity g c u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: -A).(arity g (CHead c (Bind Abst) u) t a2))))) (\lambda (y: T).(\lambda (H0: -(arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: -A).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: -A).(\lambda (a2: A).(eq A a0 (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)))))))) (\lambda (c0: C).(\lambda (n: -nat).(\lambda (H1: (eq T (TSort n) (THead (Bind Abst) u t))).(let H2 \def -(eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I -(THead (Bind Abst) u t) H1) in (False_ind (ex3_2 A A (\lambda (a1: -A).(\lambda (a2: A).(eq A (ASort O n) (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)))) H2))))) (\lambda (c0: -C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 -(CHead d (Bind Abbr) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 -a0)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda -(a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda -(_: A).(arity g d u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g -(CHead d (Bind Abst) u) t a2))))))).(\lambda (H4: (eq T (TLRef i) (THead -(Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ -_ _) \Rightarrow False])) I (THead (Bind Abst) u t) H4) in (False_ind (ex3_2 -A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (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)))) H5))))))))))) (\lambda -(c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl -i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 -(asucc g a0))).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A -A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g a0) (AHead a1 a2)))) -(\lambda (a1: A).(\lambda (_: A).(arity g d u (asucc g a1)))) (\lambda (_: -A).(\lambda (a2: A).(arity g (CHead d (Bind Abst) u) t a2))))))).(\lambda -(H4: (eq T (TLRef i) (THead (Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef -i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u -t) H4) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 -(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)))) H5))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b -Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H2: -(arity g c0 u0 a1)).(\lambda (H3: (((eq T u0 (THead (Bind Abst) u t)) \to -(ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) -(\lambda (a2: A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: -A).(\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda -(t0: T).(\lambda (a2: A).(\lambda (H4: (arity g (CHead c0 (Bind b) u0) t0 -a2)).(\lambda (H5: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A -(\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: -A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u0) u (asucc g a3)))) (\lambda -(_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) -t a4))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Bind Abst) u -t))).(let H7 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) -\Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k -with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) -u0 t0) (THead (Bind Abst) u t) H6) in ((let H8 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | -(THead _ t1 _) \Rightarrow t1])) (THead (Bind b) u0 t0) (THead (Bind Abst) u -t) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) -(THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in (\lambda (H10: (eq T u0 -u)).(\lambda (H11: (eq B b Abst)).(let H12 \def (eq_ind T t0 (\lambda (t1: -T).((eq T t1 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: -A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: -A).(arity g (CHead c0 (Bind b) u0) u (asucc g a3)))) (\lambda (_: A).(\lambda -(a4: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) t a4)))))) H5 t -H9) in (let H13 \def (eq_ind T t0 (\lambda (t1: T).(arity g (CHead c0 (Bind -b) u0) t1 a2)) H4 t H9) in (let H14 \def (eq_ind T u0 (\lambda (t1: T).((eq T -t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: -A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g (CHead -c0 (Bind b) t1) u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g -(CHead (CHead c0 (Bind b) t1) (Bind Abst) u) t a4)))))) H12 u H10) in (let -H15 \def (eq_ind T u0 (\lambda (t1: T).(arity g (CHead c0 (Bind b) t1) t a2)) -H13 u H10) in (let H16 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead -(Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a1 -(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)))))) H3 u H10) in (let H17 \def (eq_ind T u0 (\lambda (t1: T).(arity g c0 -t1 a1)) H2 u H10) in (let H18 \def (eq_ind B b (\lambda (b0: B).((eq T t -(THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq -A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g (CHead c0 -(Bind b0) u) u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g -(CHead (CHead c0 (Bind b0) u) (Bind Abst) u) t a4)))))) H14 Abst H11) in (let -H19 \def (eq_ind B b (\lambda (b0: B).(arity g (CHead c0 (Bind b0) u) t a2)) -H15 Abst H11) in (let H20 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 -Abst))) H1 Abst H11) in (let H21 \def (match (H20 (refl_equal B Abst)) in -False with []) in H21))))))))))))) H8)) H7)))))))))))))) (\lambda (c0: -C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 (asucc g -a1))).(\lambda (H2: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A -(\lambda (a2: A).(\lambda (a3: A).(eq A (asucc g a1) (AHead a2 a3)))) -(\lambda (a2: A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: -A).(\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda -(t0: T).(\lambda (a2: A).(\lambda (H3: (arity g (CHead c0 (Bind Abst) u0) t0 -a2)).(\lambda (H4: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A -(\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: -A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) u (asucc g a3)))) -(\lambda (_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 (Bind Abst) u0) -(Bind Abst) u) t a4))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) -(THead (Bind Abst) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) -\Rightarrow t1])) (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in -((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) -(THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in (\lambda (H8: (eq T -u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Bind -Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead -a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) -u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 -(Bind Abst) u0) (Bind Abst) u) t a4)))))) H4 t H7) in (let H10 \def (eq_ind T -t0 (\lambda (t1: T).(arity g (CHead c0 (Bind Abst) u0) t1 a2)) H3 t H7) in -(let H11 \def (eq_ind T u0 (\lambda (t1: T).((eq T t (THead (Bind Abst) u t)) -\to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) -(\lambda (a3: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) t1) u (asucc -g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 (Bind -Abst) t1) (Bind Abst) u) t a4)))))) H9 u H8) in (let H12 \def (eq_ind T u0 -(\lambda (t1: T).(arity g (CHead c0 (Bind Abst) t1) t a2)) H10 u H8) in (let -H13 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead (Bind Abst) u t)) \to -(ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A (asucc g a1) (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)))))) -H2 u H8) in (let H14 \def (eq_ind T u0 (\lambda (t1: T).(arity g c0 t1 (asucc -g a1))) H1 u H8) in (ex3_2_intro A A (\lambda (a3: A).(\lambda (a4: A).(eq A -(AHead a1 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))) a1 a2 (refl_equal A (AHead a1 a2)) H14 H12))))))))) -H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda -(_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to -(ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) -(\lambda (a2: A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: -A).(\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda -(t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda -(_: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: -A).(\lambda (a4: A).(eq A (AHead a1 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 (H5: (eq T -(THead (Flat Appl) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (eq_ind T -(THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind Abst) u t) H5) in (False_ind (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)))) H6)))))))))))) (\lambda (c0: C).(\lambda -(u0: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u0 (asucc g a0))).(\lambda -(_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: -A).(\lambda (a2: A).(eq A (asucc g a0) (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))))))).(\lambda (t0: -T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (_: (((eq T t0 (THead (Bind -Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (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))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Bind Abst) u -t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k -_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])])) I (THead (Bind Abst) u t) H5) in (False_ind (ex3_2 A A -(\lambda (a1: A).(\lambda (a2: A).(eq A a0 (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)))) H6))))))))))) (\lambda -(c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 -a1)).(\lambda (H2: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A -(\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a2: -A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: A).(\lambda -(a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda (a2: -A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t0 (THead (Bind Abst) u -t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind Abst) u t) -H4) in (let H6 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Bind -Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a1 (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)))))) -H2 (THead (Bind Abst) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t1: -T).(arity g c0 t1 a1)) H1 (THead (Bind Abst) u t) H5) in (let H8 \def (H6 -(refl_equal T (THead (Bind Abst) u t))) in (ex3_2_ind A A (\lambda (a3: -A).(\lambda (a4: A).(eq A a1 (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 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 (x0: A).(\lambda (x1: A).(\lambda (H9: (eq A a1 -(AHead x0 x1))).(\lambda (H10: (arity g c0 u (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_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: (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: 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 H15)) -(arity_repl g (CHead c0 (Bind Abst) u) t x1 H11 x3 H16)) a2 H18))))))) -H14)))))))))) H8))))))))))))) c y a H0))) H)))))). - -lemma arity_gen_appl: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a2: -A).((arity g c (THead (Flat Appl) u t) a2) \to (ex2 A (\lambda (a1: A).(arity -g c u a1)) (\lambda (a1: A).(arity g c t (AHead a1 a2))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: -A).(\lambda (H: (arity g c (THead (Flat Appl) u t) a2)).(insert_eq T (THead -(Flat Appl) u t) (\lambda (t0: T).(arity g c t0 a2)) (\lambda (_: T).(ex2 A -(\lambda (a1: A).(arity g c u a1)) (\lambda (a1: A).(arity g c t (AHead a1 -a2))))) (\lambda (y: T).(\lambda (H0: (arity g c y a2)).(arity_ind g (\lambda -(c0: C).(\lambda (t0: T).(\lambda (a: A).((eq T t0 (THead (Flat Appl) u t)) -\to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t -(AHead a1 a)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T -(TSort n) (THead (Flat Appl) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow -False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H1) in -(False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity -g c0 t (AHead a1 (ASort O n))))) H2))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind -Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq -T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) -(\lambda (a1: A).(arity g d t (AHead a1 a))))))).(\lambda (H4: (eq T (TLRef -i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H4) in -(False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity -g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind -Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda -(_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g -d u a1)) (\lambda (a1: A).(arity g d t (AHead a1 (asucc g a)))))))).(\lambda -(H4: (eq T (TLRef i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef -i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u -t) H4) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: -A).(arity g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (b: B).(\lambda (_: -(not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat -Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: -A).(arity g c0 t (AHead a3 a1))))))).(\lambda (t0: T).(\lambda (a0: -A).(\lambda (_: (arity g (CHead c0 (Bind b) u0) t0 a0)).(\lambda (_: (((eq T -t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g (CHead c0 -(Bind b) u0) u a3)) (\lambda (a3: A).(arity g (CHead c0 (Bind b) u0) t (AHead -a3 a0))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Flat Appl) u -t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) -\Rightarrow False])])) I (THead (Flat Appl) u t) H6) in (False_ind (ex2 A -(\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 -a0)))) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead -(Flat Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda -(a3: A).(arity g c0 t (AHead a3 (asucc g a1)))))))).(\lambda (t0: T).(\lambda -(a0: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u0) t0 a0)).(\lambda (_: -(((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g -(CHead c0 (Bind Abst) u0) u a3)) (\lambda (a3: A).(arity g (CHead c0 (Bind -Abst) u0) t (AHead a3 a0))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) -(THead (Flat Appl) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) -H5) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: -A).(arity g c0 t (AHead a3 (AHead a1 a0))))) H6)))))))))))) (\lambda (c0: -C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 -a1)).(\lambda (H2: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda -(a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 -a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 -(AHead a1 a0))).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A -(\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 -(AHead a1 a0)))))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead -(Flat Appl) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) -\Rightarrow t1])) (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in -((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) -(THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in (\lambda (H8: (eq T -u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Flat -Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: -A).(arity g c0 t (AHead a3 (AHead a1 a0))))))) H4 t H7) in (let H10 \def -(eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a0))) H3 t H7) in (let -H11 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead (Flat Appl) u t)) \to -(ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t -(AHead a3 a1)))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t1: -T).(arity g c0 t1 a1)) H1 u H8) in (ex_intro2 A (\lambda (a3: A).(arity g c0 -u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0))) a1 H12 H10))))))) -H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: -(arity g c0 u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) -\to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t -(AHead a1 (asucc g a)))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 -a)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: -A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 -a))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Flat Appl) u -t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k -_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) -\Rightarrow (match f with [Appl \Rightarrow False | Cast \Rightarrow -True])])])) I (THead (Flat Appl) u t) H5) in (False_ind (ex2 A (\lambda (a1: -A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) -H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda -(H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Flat Appl) u t)) -\to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t -(AHead a3 a1))))))).(\lambda (a0: A).(\lambda (H3: (leq g a1 a0)).(\lambda -(H4: (eq T t0 (THead (Flat Appl) u t))).(let H5 \def (f_equal T T (\lambda -(e: T).e) t0 (THead (Flat Appl) u t) H4) in (let H6 \def (eq_ind T t0 -(\lambda (t1: T).((eq T t1 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a3: -A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a1)))))) H2 -(THead (Flat Appl) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t1: -T).(arity g c0 t1 a1)) H1 (THead (Flat Appl) u t) H5) in (let H8 \def (H6 -(refl_equal T (THead (Flat Appl) u t))) in (ex2_ind A (\lambda (a3: A).(arity -g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a1))) (ex2 A (\lambda -(a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0)))) -(\lambda (x: A).(\lambda (H9: (arity g c0 u x)).(\lambda (H10: (arity g c0 t -(AHead x a1))).(ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: -A).(arity g c0 t (AHead a3 a0))) x H9 (arity_repl g c0 t (AHead x a1) H10 -(AHead x a0) (leq_head g x x (leq_refl g x) a1 a0 H3)))))) H8))))))))))))) c -y a2 H0))) H)))))). - -lemma arity_gen_cast: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a: -A).((arity g c (THead (Flat Cast) u t) a) \to (land (arity g c u (asucc g a)) -(arity g c t a))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: -A).(\lambda (H: (arity g c (THead (Flat Cast) u t) a)).(insert_eq T (THead -(Flat Cast) u t) (\lambda (t0: T).(arity g c t0 a)) (\lambda (_: T).(land -(arity g c u (asucc g a)) (arity g c t a))) (\lambda (y: T).(\lambda (H0: -(arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: -A).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) -(arity g c0 t a0)))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T -(TSort n) (THead (Flat Cast) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow -False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H1) in -(False_ind (land (arity g c0 u (asucc g (ASort O n))) (arity g c0 t (ASort O -n))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: -nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a0: -A).(\lambda (_: (arity g d u0 a0)).(\lambda (_: (((eq T u0 (THead (Flat Cast) -u t)) \to (land (arity g d u (asucc g a0)) (arity g d t a0))))).(\lambda (H4: -(eq T (TLRef i) (THead (Flat Cast) u t))).(let H5 \def (eq_ind T (TLRef i) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u -t) H4) in (False_ind (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)) -H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: -nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: -A).(\lambda (_: (arity g d u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead -(Flat Cast) u t)) \to (land (arity g d u (asucc g (asucc g a0))) (arity g d t -(asucc g a0)))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) u -t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead (Flat Cast) u t) H4) in (False_ind (land (arity g c0 u -(asucc g a0)) (arity g c0 t a0)) H5))))))))))) (\lambda (b: B).(\lambda (_: -(not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat -Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t -a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 -(Bind b) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to -(land (arity g (CHead c0 (Bind b) u0) u (asucc g a2)) (arity g (CHead c0 -(Bind b) u0) t a2))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead -(Flat Cast) u t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | -(Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H6) in (False_ind -(land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) H7)))))))))))))) -(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 -u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land -(arity g c0 u (asucc g (asucc g a1))) (arity g c0 t (asucc g -a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 -(Bind Abst) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to -(land (arity g (CHead c0 (Bind Abst) u0) u (asucc g a2)) (arity g (CHead c0 -(Bind Abst) u0) t a2))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) -(THead (Flat Cast) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) -H5) in (False_ind (land (arity g c0 u (asucc g (AHead a1 a2))) (arity g c0 t -(AHead a1 a2))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda -(a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat -Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t -a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead -a1 a2))).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g -c0 u (asucc g (AHead a1 a2))) (arity g c0 t (AHead a1 a2)))))).(\lambda (H5: -(eq T (THead (Flat Appl) u0 t0) (THead (Flat Cast) u t))).(let H6 \def -(eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow -(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead -(Flat Cast) u t) H5) in (False_ind (land (arity g c0 u (asucc g a2)) (arity g -c0 t a2)) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a0: -A).(\lambda (H1: (arity g c0 u0 (asucc g a0))).(\lambda (H2: (((eq T u0 -(THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) -(arity g c0 t (asucc g a0)))))).(\lambda (t0: T).(\lambda (H3: (arity g c0 t0 -a0)).(\lambda (H4: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 -u (asucc g a0)) (arity g c0 t a0))))).(\lambda (H5: (eq T (THead (Flat Cast) -u0 t0) (THead (Flat Cast) u t))).(let H6 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | -(THead _ t1 _) \Rightarrow t1])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) -u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow -t1])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t) H5) in (\lambda (H8: -(eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead -(Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)))) -H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 a0)) -H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead -(Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) (arity g c0 -t (asucc g a0))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t1: -T).(arity g c0 t1 (asucc g a0))) H1 u H8) in (conj (arity g c0 u (asucc g -a0)) (arity g c0 t a0) H12 H10))))))) H6))))))))))) (\lambda (c0: C).(\lambda -(t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: -(((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) -(arity g c0 t a1))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda -(H4: (eq T t0 (THead (Flat Cast) u t))).(let H5 \def (f_equal T T (\lambda -(e: T).e) t0 (THead (Flat Cast) u t) H4) in (let H6 \def (eq_ind T t0 -(\lambda (t1: T).((eq T t1 (THead (Flat Cast) u t)) \to (land (arity g c0 u -(asucc g a1)) (arity g c0 t a1)))) H2 (THead (Flat Cast) u t) H5) in (let H7 -\def (eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 a1)) H1 (THead (Flat Cast) -u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Flat Cast) u t))) in -(land_ind (arity g c0 u (asucc g a1)) (arity g c0 t a1) (land (arity g c0 u -(asucc g a2)) (arity g c0 t a2)) (\lambda (H9: (arity g c0 u (asucc g -a1))).(\lambda (H10: (arity g c0 t a1)).(conj (arity g c0 u (asucc g a2)) -(arity g c0 t a2) (arity_repl g c0 u (asucc g a1) H9 (asucc g a2) (asucc_repl -g a1 a2 H3)) (arity_repl g c0 t a1 H10 a2 H3)))) H8))))))))))))) c y a H0))) -H)))))). - -lemma arity_gen_appls: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (vs: TList).(\forall -(a2: A).((arity g c (THeads (Flat Appl) vs t) a2) \to (ex A (\lambda (a: -A).(arity g c t a)))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (vs: -TList).(TList_ind (\lambda (t0: TList).(\forall (a2: A).((arity g c (THeads -(Flat Appl) t0 t) a2) \to (ex A (\lambda (a: A).(arity g c t a)))))) (\lambda -(a2: A).(\lambda (H: (arity g c t a2)).(ex_intro A (\lambda (a: A).(arity g c -t a)) a2 H))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: ((\forall -(a2: A).((arity g c (THeads (Flat Appl) t1 t) a2) \to (ex A (\lambda (a: -A).(arity g c t a))))))).(\lambda (a2: A).(\lambda (H0: (arity g c (THead -(Flat Appl) t0 (THeads (Flat Appl) t1 t)) a2)).(let H1 \def (arity_gen_appl g -c t0 (THeads (Flat Appl) t1 t) a2 H0) in (ex2_ind A (\lambda (a1: A).(arity g -c t0 a1)) (\lambda (a1: A).(arity g c (THeads (Flat Appl) t1 t) (AHead a1 -a2))) (ex A (\lambda (a: A).(arity g c t a))) (\lambda (x: A).(\lambda (_: -(arity g c t0 x)).(\lambda (H3: (arity g c (THeads (Flat Appl) t1 t) (AHead x -a2))).(let H_x \def (H (AHead x a2) H3) in (let H4 \def H_x in (ex_ind A -(\lambda (a: A).(arity g c t a)) (ex A (\lambda (a: A).(arity g c t a))) -(\lambda (x0: A).(\lambda (H5: (arity g c t x0)).(ex_intro A (\lambda (a: -A).(arity g c t a)) x0 H5))) H4)))))) H1))))))) vs)))). - -lemma arity_gen_lift: - \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).(\forall (h: -nat).(\forall (d: nat).((arity g c1 (lift h d t) a) \to (\forall (c2: -C).((drop h d c1 c2) \to (arity g c2 t a))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (arity g c1 (lift h d t) a)).(insert_eq T -(lift h d t) (\lambda (t0: T).(arity g c1 t0 a)) (\lambda (_: T).(\forall -(c2: C).((drop h d c1 c2) \to (arity g c2 t a)))) (\lambda (y: T).(\lambda -(H0: (arity g c1 y a)).(unintro T t (\lambda (t0: T).((eq T y (lift h d t0)) -\to (\forall (c2: C).((drop h d c1 c2) \to (arity g c2 t0 a))))) (unintro nat -d (\lambda (n: nat).(\forall (x: T).((eq T y (lift h n x)) \to (\forall (c2: -C).((drop h n c1 c2) \to (arity g c2 x a)))))) (arity_ind g (\lambda (c: -C).(\lambda (t0: T).(\lambda (a0: A).(\forall (x: nat).(\forall (x0: T).((eq -T t0 (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to (arity g c2 x0 -a0))))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (x: nat).(\lambda (x0: -T).(\lambda (H1: (eq T (TSort n) (lift h x x0))).(\lambda (c2: C).(\lambda -(_: (drop h x c c2)).(eq_ind_r T (TSort n) (\lambda (t0: T).(arity g c2 t0 -(ASort O n))) (arity_sort g c2 n) x0 (lift_gen_sort h x n x0 H1))))))))) -(\lambda (c: C).(\lambda (d0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H1: (getl i c (CHead d0 (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H2: -(arity g d0 u a0)).(\lambda (H3: ((\forall (x: nat).(\forall (x0: T).((eq T u -(lift h x x0)) \to (\forall (c2: C).((drop h x d0 c2) \to (arity g c2 x0 -a0)))))))).(\lambda (x: nat).(\lambda (x0: T).(\lambda (H4: (eq T (TLRef i) -(lift h x x0))).(\lambda (c2: C).(\lambda (H5: (drop h x c c2)).(let H_x \def -(lift_gen_lref x0 x h i H4) in (let H6 \def H_x in (or_ind (land (lt i x) (eq -T x0 (TLRef i))) (land (le (plus x h) i) (eq T x0 (TLRef (minus i h)))) -(arity g c2 x0 a0) (\lambda (H7: (land (lt i x) (eq T x0 (TLRef -i)))).(land_ind (lt i x) (eq T x0 (TLRef i)) (arity g c2 x0 a0) (\lambda (H8: -(lt i x)).(\lambda (H9: (eq T x0 (TLRef i))).(eq_ind_r T (TLRef i) (\lambda -(t0: T).(arity g c2 t0 a0)) (let H10 \def (eq_ind nat x (\lambda (n: -nat).(drop h n c c2)) H5 (S (plus i (minus x (S i)))) (lt_plus_minus i x H8)) -in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x (S -i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i c2 (CHead e0 (Bind Abbr) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (minus x (S i)) d0 e0))) -(arity g c2 (TLRef i) a0) (\lambda (x1: T).(\lambda (x2: C).(\lambda (H11: -(eq T u (lift h (minus x (S i)) x1))).(\lambda (H12: (getl i c2 (CHead x2 -(Bind Abbr) x1))).(\lambda (H13: (drop h (minus x (S i)) d0 x2)).(let H14 -\def (eq_ind T u (\lambda (t0: T).(\forall (x3: nat).(\forall (x4: T).((eq T -t0 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 d0 c3) \to (arity g c3 x4 -a0))))))) H3 (lift h (minus x (S i)) x1) H11) in (let H15 \def (eq_ind T u -(\lambda (t0: T).(arity g d0 t0 a0)) H2 (lift h (minus x (S i)) x1) H11) in -(arity_abbr g c2 x2 x1 i H12 a0 (H14 (minus x (S i)) x1 (refl_equal T (lift h -(minus x (S i)) x1)) x2 H13))))))))) (getl_drop_conf_lt Abbr c d0 u i H1 c2 h -(minus x (S i)) H10))) x0 H9))) H7)) (\lambda (H7: (land (le (plus x h) i) -(eq T x0 (TLRef (minus i h))))).(land_ind (le (plus x h) i) (eq T x0 (TLRef -(minus i h))) (arity g c2 x0 a0) (\lambda (H8: (le (plus x h) i)).(\lambda -(H9: (eq T x0 (TLRef (minus i h)))).(eq_ind_r T (TLRef (minus i h)) (\lambda -(t0: T).(arity g c2 t0 a0)) (arity_abbr g c2 d0 u (minus i h) -(getl_drop_conf_ge i (CHead d0 (Bind Abbr) u) c H1 c2 h x H5 H8) a0 H2) x0 -H9))) H7)) H6)))))))))))))))) (\lambda (c: C).(\lambda (d0: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H1: (getl i c (CHead d0 (Bind Abst) -u))).(\lambda (a0: A).(\lambda (H2: (arity g d0 u (asucc g a0))).(\lambda -(H3: ((\forall (x: nat).(\forall (x0: T).((eq T u (lift h x x0)) \to (\forall -(c2: C).((drop h x d0 c2) \to (arity g c2 x0 (asucc g a0))))))))).(\lambda -(x: nat).(\lambda (x0: T).(\lambda (H4: (eq T (TLRef i) (lift h x -x0))).(\lambda (c2: C).(\lambda (H5: (drop h x c c2)).(let H_x \def -(lift_gen_lref x0 x h i H4) in (let H6 \def H_x in (or_ind (land (lt i x) (eq -T x0 (TLRef i))) (land (le (plus x h) i) (eq T x0 (TLRef (minus i h)))) -(arity g c2 x0 a0) (\lambda (H7: (land (lt i x) (eq T x0 (TLRef -i)))).(land_ind (lt i x) (eq T x0 (TLRef i)) (arity g c2 x0 a0) (\lambda (H8: -(lt i x)).(\lambda (H9: (eq T x0 (TLRef i))).(eq_ind_r T (TLRef i) (\lambda -(t0: T).(arity g c2 t0 a0)) (let H10 \def (eq_ind nat x (\lambda (n: -nat).(drop h n c c2)) H5 (S (plus i (minus x (S i)))) (lt_plus_minus i x H8)) -in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x (S -i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i c2 (CHead e0 (Bind Abst) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (minus x (S i)) d0 e0))) -(arity g c2 (TLRef i) a0) (\lambda (x1: T).(\lambda (x2: C).(\lambda (H11: -(eq T u (lift h (minus x (S i)) x1))).(\lambda (H12: (getl i c2 (CHead x2 -(Bind Abst) x1))).(\lambda (H13: (drop h (minus x (S i)) d0 x2)).(let H14 -\def (eq_ind T u (\lambda (t0: T).(\forall (x3: nat).(\forall (x4: T).((eq T -t0 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 d0 c3) \to (arity g c3 x4 -(asucc g a0)))))))) H3 (lift h (minus x (S i)) x1) H11) in (let H15 \def -(eq_ind T u (\lambda (t0: T).(arity g d0 t0 (asucc g a0))) H2 (lift h (minus -x (S i)) x1) H11) in (arity_abst g c2 x2 x1 i H12 a0 (H14 (minus x (S i)) x1 -(refl_equal T (lift h (minus x (S i)) x1)) x2 H13))))))))) (getl_drop_conf_lt -Abst c d0 u i H1 c2 h (minus x (S i)) H10))) x0 H9))) H7)) (\lambda (H7: -(land (le (plus x h) i) (eq T x0 (TLRef (minus i h))))).(land_ind (le (plus x -h) i) (eq T x0 (TLRef (minus i h))) (arity g c2 x0 a0) (\lambda (H8: (le -(plus x h) i)).(\lambda (H9: (eq T x0 (TLRef (minus i h)))).(eq_ind_r T -(TLRef (minus i h)) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_abst g c2 d0 -u (minus i h) (getl_drop_conf_ge i (CHead d0 (Bind Abst) u) c H1 c2 h x H5 -H8) a0 H2) x0 H9))) H7)) H6)))))))))))))))) (\lambda (b: B).(\lambda (H1: -(not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (H2: (arity g c u a1)).(\lambda (H3: ((\forall (x: nat).(\forall -(x0: T).((eq T u (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to -(arity g c2 x0 a1)))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H4: -(arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H5: ((\forall (x: -nat).(\forall (x0: T).((eq T t0 (lift h x x0)) \to (\forall (c2: C).((drop h -x (CHead c (Bind b) u) c2) \to (arity g c2 x0 a2)))))))).(\lambda (x: -nat).(\lambda (x0: T).(\lambda (H6: (eq T (THead (Bind b) u t0) (lift h x -x0))).(\lambda (c2: C).(\lambda (H7: (drop h x c c2)).(ex3_2_ind T T (\lambda -(y0: T).(\lambda (z: T).(eq T x0 (THead (Bind b) y0 z)))) (\lambda (y0: -T).(\lambda (_: T).(eq T u (lift h x y0)))) (\lambda (_: T).(\lambda (z: -T).(eq T t0 (lift h (S x) z)))) (arity g c2 x0 a2) (\lambda (x1: T).(\lambda -(x2: T).(\lambda (H8: (eq T x0 (THead (Bind b) x1 x2))).(\lambda (H9: (eq T u -(lift h x x1))).(\lambda (H10: (eq T t0 (lift h (S x) x2))).(eq_ind_r T -(THead (Bind b) x1 x2) (\lambda (t1: T).(arity g c2 t1 a2)) (let H11 \def -(eq_ind T t0 (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T t1 -(lift h x3 x4)) \to (\forall (c3: C).((drop h x3 (CHead c (Bind b) u) c3) \to -(arity g c3 x4 a2))))))) H5 (lift h (S x) x2) H10) in (let H12 \def (eq_ind T -t0 (\lambda (t1: T).(arity g (CHead c (Bind b) u) t1 a2)) H4 (lift h (S x) -x2) H10) in (let H13 \def (eq_ind T u (\lambda (t1: T).(arity g (CHead c -(Bind b) t1) (lift h (S x) x2) a2)) H12 (lift h x x1) H9) in (let H14 \def -(eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T (lift -h (S x) x2) (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 (CHead c (Bind -b) t1) c3) \to (arity g c3 x4 a2))))))) H11 (lift h x x1) H9) in (let H15 -\def (eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T -t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to (arity g c3 x4 -a1))))))) H3 (lift h x x1) H9) in (let H16 \def (eq_ind T u (\lambda (t1: -T).(arity g c t1 a1)) H2 (lift h x x1) H9) in (arity_bind g b H1 c2 x1 a1 -(H15 x x1 (refl_equal T (lift h x x1)) c2 H7) x2 a2 (H14 (S x) x2 (refl_equal -T (lift h (S x) x2)) (CHead c2 (Bind b) x1) (drop_skip_bind h x c c2 H7 b -x1))))))))) x0 H8)))))) (lift_gen_bind b u t0 x0 h x H6)))))))))))))))))) -(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity g c u -(asucc g a1))).(\lambda (H2: ((\forall (x: nat).(\forall (x0: T).((eq T u -(lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to (arity g c2 x0 -(asucc g a1))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H3: (arity g -(CHead c (Bind Abst) u) t0 a2)).(\lambda (H4: ((\forall (x: nat).(\forall -(x0: T).((eq T t0 (lift h x x0)) \to (\forall (c2: C).((drop h x (CHead c -(Bind Abst) u) c2) \to (arity g c2 x0 a2)))))))).(\lambda (x: nat).(\lambda -(x0: T).(\lambda (H5: (eq T (THead (Bind Abst) u t0) (lift h x x0))).(\lambda -(c2: C).(\lambda (H6: (drop h x c c2)).(ex3_2_ind T T (\lambda (y0: -T).(\lambda (z: T).(eq T x0 (THead (Bind Abst) y0 z)))) (\lambda (y0: -T).(\lambda (_: T).(eq T u (lift h x y0)))) (\lambda (_: T).(\lambda (z: -T).(eq T t0 (lift h (S x) z)))) (arity g c2 x0 (AHead a1 a2)) (\lambda (x1: -T).(\lambda (x2: T).(\lambda (H7: (eq T x0 (THead (Bind Abst) x1 -x2))).(\lambda (H8: (eq T u (lift h x x1))).(\lambda (H9: (eq T t0 (lift h (S -x) x2))).(eq_ind_r T (THead (Bind Abst) x1 x2) (\lambda (t1: T).(arity g c2 -t1 (AHead a1 a2))) (let H10 \def (eq_ind T t0 (\lambda (t1: T).(\forall (x3: -nat).(\forall (x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h -x3 (CHead c (Bind Abst) u) c3) \to (arity g c3 x4 a2))))))) H4 (lift h (S x) -x2) H9) in (let H11 \def (eq_ind T t0 (\lambda (t1: T).(arity g (CHead c -(Bind Abst) u) t1 a2)) H3 (lift h (S x) x2) H9) in (let H12 \def (eq_ind T u -(\lambda (t1: T).(arity g (CHead c (Bind Abst) t1) (lift h (S x) x2) a2)) H11 -(lift h x x1) H8) in (let H13 \def (eq_ind T u (\lambda (t1: T).(\forall (x3: -nat).(\forall (x4: T).((eq T (lift h (S x) x2) (lift h x3 x4)) \to (\forall -(c3: C).((drop h x3 (CHead c (Bind Abst) t1) c3) \to (arity g c3 x4 a2))))))) -H10 (lift h x x1) H8) in (let H14 \def (eq_ind T u (\lambda (t1: T).(\forall -(x3: nat).(\forall (x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: -C).((drop h x3 c c3) \to (arity g c3 x4 (asucc g a1)))))))) H2 (lift h x x1) -H8) in (let H15 \def (eq_ind T u (\lambda (t1: T).(arity g c t1 (asucc g -a1))) H1 (lift h x x1) H8) in (arity_head g c2 x1 a1 (H14 x x1 (refl_equal T -(lift h x x1)) c2 H6) x2 a2 (H13 (S x) x2 (refl_equal T (lift h (S x) x2)) -(CHead c2 (Bind Abst) x1) (drop_skip_bind h x c c2 H6 Abst x1))))))))) x0 -H7)))))) (lift_gen_bind Abst u t0 x0 h x H5)))))))))))))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity g c u a1)).(\lambda -(H2: ((\forall (x: nat).(\forall (x0: T).((eq T u (lift h x x0)) \to (\forall -(c2: C).((drop h x c c2) \to (arity g c2 x0 a1)))))))).(\lambda (t0: -T).(\lambda (a2: A).(\lambda (H3: (arity g c t0 (AHead a1 a2))).(\lambda (H4: -((\forall (x: nat).(\forall (x0: T).((eq T t0 (lift h x x0)) \to (\forall -(c2: C).((drop h x c c2) \to (arity g c2 x0 (AHead a1 a2))))))))).(\lambda -(x: nat).(\lambda (x0: T).(\lambda (H5: (eq T (THead (Flat Appl) u t0) (lift -h x x0))).(\lambda (c2: C).(\lambda (H6: (drop h x c c2)).(ex3_2_ind T T -(\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat Appl) y0 z)))) -(\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x y0)))) (\lambda (_: -T).(\lambda (z: T).(eq T t0 (lift h x z)))) (arity g c2 x0 a2) (\lambda (x1: -T).(\lambda (x2: T).(\lambda (H7: (eq T x0 (THead (Flat Appl) x1 -x2))).(\lambda (H8: (eq T u (lift h x x1))).(\lambda (H9: (eq T t0 (lift h x -x2))).(eq_ind_r T (THead (Flat Appl) x1 x2) (\lambda (t1: T).(arity g c2 t1 -a2)) (let H10 \def (eq_ind T t0 (\lambda (t1: T).(\forall (x3: nat).(\forall -(x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to -(arity g c3 x4 (AHead a1 a2)))))))) H4 (lift h x x2) H9) in (let H11 \def -(eq_ind T t0 (\lambda (t1: T).(arity g c t1 (AHead a1 a2))) H3 (lift h x x2) -H9) in (let H12 \def (eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall -(x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to -(arity g c3 x4 a1))))))) H2 (lift h x x1) H8) in (let H13 \def (eq_ind T u -(\lambda (t1: T).(arity g c t1 a1)) H1 (lift h x x1) H8) in (arity_appl g c2 -x1 a1 (H12 x x1 (refl_equal T (lift h x x1)) c2 H6) x2 a2 (H10 x x2 -(refl_equal T (lift h x x2)) c2 H6)))))) x0 H7)))))) (lift_gen_flat Appl u t0 -x0 h x H5)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: -A).(\lambda (H1: (arity g c u (asucc g a0))).(\lambda (H2: ((\forall (x: -nat).(\forall (x0: T).((eq T u (lift h x x0)) \to (\forall (c2: C).((drop h x -c c2) \to (arity g c2 x0 (asucc g a0))))))))).(\lambda (t0: T).(\lambda (H3: -(arity g c t0 a0)).(\lambda (H4: ((\forall (x: nat).(\forall (x0: T).((eq T -t0 (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to (arity g c2 x0 -a0)))))))).(\lambda (x: nat).(\lambda (x0: T).(\lambda (H5: (eq T (THead -(Flat Cast) u t0) (lift h x x0))).(\lambda (c2: C).(\lambda (H6: (drop h x c -c2)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat -Cast) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x y0)))) -(\lambda (_: T).(\lambda (z: T).(eq T t0 (lift h x z)))) (arity g c2 x0 a0) -(\lambda (x1: T).(\lambda (x2: T).(\lambda (H7: (eq T x0 (THead (Flat Cast) -x1 x2))).(\lambda (H8: (eq T u (lift h x x1))).(\lambda (H9: (eq T t0 (lift h -x x2))).(eq_ind_r T (THead (Flat Cast) x1 x2) (\lambda (t1: T).(arity g c2 t1 -a0)) (let H10 \def (eq_ind T t0 (\lambda (t1: T).(\forall (x3: nat).(\forall -(x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to -(arity g c3 x4 a0))))))) H4 (lift h x x2) H9) in (let H11 \def (eq_ind T t0 -(\lambda (t1: T).(arity g c t1 a0)) H3 (lift h x x2) H9) in (let H12 \def -(eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T t1 -(lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to (arity g c3 x4 -(asucc g a0)))))))) H2 (lift h x x1) H8) in (let H13 \def (eq_ind T u -(\lambda (t1: T).(arity g c t1 (asucc g a0))) H1 (lift h x x1) H8) in -(arity_cast g c2 x1 a0 (H12 x x1 (refl_equal T (lift h x x1)) c2 H6) x2 (H10 -x x2 (refl_equal T (lift h x x2)) c2 H6)))))) x0 H7)))))) (lift_gen_flat Cast -u t0 x0 h x H5))))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: -A).(\lambda (_: (arity g c t0 a1)).(\lambda (H2: ((\forall (x: nat).(\forall -(x0: T).((eq T t0 (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to -(arity g c2 x0 a1)))))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 -a2)).(\lambda (x: nat).(\lambda (x0: T).(\lambda (H4: (eq T t0 (lift h x -x0))).(\lambda (c2: C).(\lambda (H5: (drop h x c c2)).(arity_repl g c2 x0 a1 -(H2 x x0 H4 c2 H5) a2 H3))))))))))))) c1 y a H0))))) H))))))). - -theorem arity_mono: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a1: A).((arity g c -t a1) \to (\forall (a2: A).((arity g c t a2) \to (leq g a1 a2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H: -(arity g c t a1)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: -A).(\forall (a2: A).((arity g c0 t0 a2) \to (leq g a a2)))))) (\lambda (c0: -C).(\lambda (n: nat).(\lambda (a2: A).(\lambda (H0: (arity g c0 (TSort n) -a2)).(leq_sym g a2 (ASort O n) (arity_gen_sort g c0 n a2 H0)))))) (\lambda -(c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl -i c0 (CHead d (Bind Abbr) u))).(\lambda (a: A).(\lambda (_: (arity g d u -a)).(\lambda (H2: ((\forall (a2: A).((arity g d u a2) \to (leq g a -a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 -\def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: -C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: -C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: -C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: -C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda -(H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind -Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 -a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 -(Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) -(leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 -(CHead x0 (Bind Abbr) x1))).(\lambda (H7: (arity g x0 x1 a2)).(let H8 \def -(eq_ind C (CHead d (Bind Abbr) u) (\lambda (c1: C).(getl i c0 c1)) H0 (CHead -x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind -Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind -Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 -(CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) -(CHead d (Bind Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d -(Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (\lambda (H11: (eq C d -x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t0: T).(getl i c0 (CHead x0 (Bind -Abbr) t0))) H8 u H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t0: T).(arity -g x0 t0 a2)) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c1: C).(getl -i c0 (CHead c1 (Bind Abbr) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 -(\lambda (c1: C).(arity g c1 u a2)) H13 d H11) in (H2 a2 H15))))))) H9))))))) -H5)) (\lambda (H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 -(CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 -(asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 -(CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 -(asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: -(getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (_: (arity g x0 x1 (asucc g -a2))).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c1: C).(getl i -c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i -H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind -Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with -[Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | -(Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 -(CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind -(leq g a a2) H9))))))) H5)) H4)))))))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind -Abst) u))).(\lambda (a: A).(\lambda (_: (arity g d u (asucc g a))).(\lambda -(H2: ((\forall (a2: A).((arity g d u a2) \to (leq g (asucc g a) -a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 -\def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: -C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: -C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: -C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: -C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda -(H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind -Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 -a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 -(Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) -(leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 -(CHead x0 (Bind Abbr) x1))).(\lambda (_: (arity g x0 x1 a2)).(let H8 \def -(eq_ind C (CHead d (Bind Abst) u) (\lambda (c1: C).(getl i c0 c1)) H0 (CHead -x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind -Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda -(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d -(Bind Abst) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (leq g a a2) -H9))))))) H5)) (\lambda (H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: -T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: -T).(arity g d0 u0 (asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda -(u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda -(u0: T).(arity g d0 u0 (asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: -(arity g x0 x1 (asucc g a2))).(let H8 \def (eq_ind C (CHead d (Bind Abst) u) -(\lambda (c1: C).(getl i c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 -(CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def -(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead -c1 _ _) \Rightarrow c1])) (CHead d (Bind Abst) u) (CHead x0 (Bind Abst) x1) -(getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in -((let H10 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abst) u) -(CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead -x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def -(eq_ind_r T x1 (\lambda (t0: T).(getl i c0 (CHead x0 (Bind Abst) t0))) H8 u -H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t0: T).(arity g x0 t0 (asucc g -a2))) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c1: C).(getl i c0 -(CHead c1 (Bind Abst) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 -(\lambda (c1: C).(arity g c1 u (asucc g a2))) H13 d H11) in (asucc_inj g a a2 -(H2 (asucc g a2) H15)))))))) H9))))))) H5)) H4)))))))))))) (\lambda (b: -B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: -T).(\lambda (a2: A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall -(a3: A).((arity g c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda -(a3: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a3)).(\lambda (H4: -((\forall (a4: A).((arity g (CHead c0 (Bind b) u) t0 a4) \to (leq g a3 -a4))))).(\lambda (a0: A).(\lambda (H5: (arity g c0 (THead (Bind b) u t0) -a0)).(let H6 \def (arity_gen_bind b H0 g c0 u t0 a0 H5) in (ex2_ind A -(\lambda (a4: A).(arity g c0 u a4)) (\lambda (_: A).(arity g (CHead c0 (Bind -b) u) t0 a0)) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g c0 u -x)).(\lambda (H8: (arity g (CHead c0 (Bind b) u) t0 a0)).(H4 a0 H8)))) -H6))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda -(_: (arity g c0 u (asucc g a2))).(\lambda (H1: ((\forall (a3: A).((arity g c0 -u a3) \to (leq g (asucc g a2) a3))))).(\lambda (t0: T).(\lambda (a3: -A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a3)).(\lambda (H3: -((\forall (a4: A).((arity g (CHead c0 (Bind Abst) u) t0 a4) \to (leq g a3 -a4))))).(\lambda (a0: A).(\lambda (H4: (arity g c0 (THead (Bind Abst) u t0) -a0)).(let H5 \def (arity_gen_abst g c0 u t0 a0 H4) in (ex3_2_ind A A (\lambda -(a4: A).(\lambda (a5: A).(eq A a0 (AHead a4 a5)))) (\lambda (a4: A).(\lambda -(_: A).(arity g c0 u (asucc g a4)))) (\lambda (_: A).(\lambda (a5: A).(arity -g (CHead c0 (Bind Abst) u) t0 a5))) (leq g (AHead a2 a3) a0) (\lambda (x0: -A).(\lambda (x1: A).(\lambda (H6: (eq A a0 (AHead x0 x1))).(\lambda (H7: -(arity g c0 u (asucc g x0))).(\lambda (H8: (arity g (CHead c0 (Bind Abst) u) -t0 x1)).(eq_ind_r A (AHead x0 x1) (\lambda (a: A).(leq g (AHead a2 a3) a)) -(leq_head g a2 x0 (asucc_inj g a2 x0 (H1 (asucc g x0) H7)) a3 x1 (H3 x1 H8)) -a0 H6)))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: -A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall (a3: A).((arity g -c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: -(arity g c0 t0 (AHead a2 a3))).(\lambda (H3: ((\forall (a4: A).((arity g c0 -t0 a4) \to (leq g (AHead a2 a3) a4))))).(\lambda (a0: A).(\lambda (H4: (arity -g c0 (THead (Flat Appl) u t0) a0)).(let H5 \def (arity_gen_appl g c0 u t0 a0 -H4) in (ex2_ind A (\lambda (a4: A).(arity g c0 u a4)) (\lambda (a4: A).(arity -g c0 t0 (AHead a4 a0))) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g -c0 u x)).(\lambda (H7: (arity g c0 t0 (AHead x a0))).(ahead_inj_snd g a2 a3 x -a0 (H3 (AHead x a0) H7))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: -T).(\lambda (a: A).(\lambda (_: (arity g c0 u (asucc g a))).(\lambda (_: -((\forall (a2: A).((arity g c0 u a2) \to (leq g (asucc g a) a2))))).(\lambda -(t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (H3: ((\forall (a2: -A).((arity g c0 t0 a2) \to (leq g a a2))))).(\lambda (a2: A).(\lambda (H4: -(arity g c0 (THead (Flat Cast) u t0) a2)).(let H5 \def (arity_gen_cast g c0 u -t0 a2 H4) in (land_ind (arity g c0 u (asucc g a2)) (arity g c0 t0 a2) (leq g -a a2) (\lambda (_: (arity g c0 u (asucc g a2))).(\lambda (H7: (arity g c0 t0 -a2)).(H3 a2 H7))) H5)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda -(a2: A).(\lambda (_: (arity g c0 t0 a2)).(\lambda (H1: ((\forall (a3: -A).((arity g c0 t0 a3) \to (leq g a2 a3))))).(\lambda (a3: A).(\lambda (H2: -(leq g a2 a3)).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 a0)).(leq_trans -g a3 a2 (leq_sym g a2 a3 H2) a0 (H1 a0 H3))))))))))) c t a1 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/lift1.ma deleted file mode 100644 index 7267b7817..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/lift1.ma +++ /dev/null @@ -1,41 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/arity/props.ma". - -include "basic_1/drop1/fwd.ma". - -lemma arity_lift1: - \forall (g: G).(\forall (a: A).(\forall (c2: C).(\forall (hds: -PList).(\forall (c1: C).(\forall (t: T).((drop1 hds c1 c2) \to ((arity g c2 t -a) \to (arity g c1 (lift1 hds t) a)))))))) -\def - \lambda (g: G).(\lambda (a: A).(\lambda (c2: C).(\lambda (hds: -PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (t: -T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a)))))) -(\lambda (c1: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c1 c2)).(\lambda -(H0: (arity g c2 t a)).(let H_y \def (drop1_gen_pnil c1 c2 H) in (eq_ind_r C -c2 (\lambda (c: C).(arity g c t a)) H0 c1 H_y)))))) (\lambda (n: -nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: -C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 -(lift1 p t) a))))))).(\lambda (c1: C).(\lambda (t: T).(\lambda (H0: (drop1 -(PCons n n0 p) c1 c2)).(\lambda (H1: (arity g c2 t a)).(let H_x \def -(drop1_gen_pcons c1 c2 p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda -(c3: C).(drop n n0 c1 c3)) (\lambda (c3: C).(drop1 p c3 c2)) (arity g c1 -(lift n n0 (lift1 p t)) a) (\lambda (x: C).(\lambda (H3: (drop n n0 c1 -x)).(\lambda (H4: (drop1 p x c2)).(arity_lift g x (lift1 p t) a (H x t H4 H1) -c1 n n0 H3)))) H2))))))))))) hds)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/pr3.ma deleted file mode 100644 index 69dfef63d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/pr3.ma +++ /dev/null @@ -1,579 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csuba/arity.ma". - -include "basic_1/pr3/fwd.ma". - -include "basic_1/pr1/fwd.ma". - -include "basic_1/wcpr0/getl.ma". - -include "basic_1/pr0/props.ma". - -include "basic_1/arity/subst0.ma". - -lemma arity_sred_wcpr0_pr0: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (a: A).((arity g -c1 t1 a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t2: T).((pr0 t1 -t2) \to (arity g c2 t2 a))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda -(H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda -(a0: A).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to -(arity g c2 t2 a0)))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: -C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort n) -t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) -(arity_sort g c2 n) t2 (pr0_gen_sort t2 n H1)))))))) (\lambda (c: C).(\lambda -(d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d -(Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda -(H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to -(arity g c2 t2 a0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c -c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) t2)).(eq_ind_r T (TLRef i) -(\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T (\lambda (e2: C).(\lambda -(u2: T).(getl i c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: -T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (arity g c2 -(TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c2 -(CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u -x1)).(arity_abbr g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 -H3 i d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 i H4)))))))))))))) (\lambda (c: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c -(CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g -a0))).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: -T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (c2: -C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) -t2)).(eq_ind_r T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T -(\lambda (e2: C).(\lambda (u2: T).(getl i c2 (CHead e2 (Bind Abst) u2)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: -T).(pr0 u u2))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H5: (getl i c2 (CHead x0 (Bind Abst) x1))).(\lambda (H6: (wcpr0 -d x0)).(\lambda (H7: (pr0 u x1)).(arity_abst g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 -H7))))))) (wcpr0_getl c c2 H3 i d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 i -H4)))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda -(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u -a1)).(\lambda (H2: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 -u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda -(H3: (arity g (CHead c (Bind b) u) t a2)).(\lambda (H4: ((\forall (c2: -C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to -(arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H5: (wcpr0 c -c2)).(\lambda (t2: T).(\lambda (H6: (pr0 (THead (Bind b) u t) t2)).(insert_eq -T (THead (Bind b) u t) (\lambda (t0: T).(pr0 t0 t2)) (\lambda (_: T).(arity g -c2 t2 a2)) (\lambda (y: T).(\lambda (H7: (pr0 y t2)).(pr0_ind (\lambda (t0: -T).(\lambda (t3: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t3 a2)))) -(\lambda (t0: T).(\lambda (H8: (eq T t0 (THead (Bind b) u t))).(let H9 \def -(f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u t) H8) in (eq_ind_r T -(THead (Bind b) u t) (\lambda (t3: T).(arity g c2 t3 a2)) (arity_bind g b H0 -c2 u a1 (H2 c2 H5 u (pr0_refl u)) t a2 (H4 (CHead c2 (Bind b) u) (wcpr0_comp -c c2 H5 u u (pr0_refl u) (Bind b)) t (pr0_refl t))) t0 H9)))) (\lambda (u1: -T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (((eq T u1 -(THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda -(t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda (H11: (((eq T t3 (THead (Bind b) -u t)) \to (arity g c2 t4 a2)))).(\lambda (k: K).(\lambda (H12: (eq T (THead k -u1 t3) (THead (Bind b) u t))).(let H13 \def (f_equal T K (\lambda (e: -T).(match e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead -k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Bind b) u t) H12) in ((let -H14 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 -| (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) (THead k u1 t3) -(THead (Bind b) u t) H12) in ((let H15 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | -(THead _ _ t0) \Rightarrow t0])) (THead k u1 t3) (THead (Bind b) u t) H12) in -(\lambda (H16: (eq T u1 u)).(\lambda (H17: (eq K k (Bind b))).(eq_ind_r K -(Bind b) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H18 \def -(eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 -t4 a2))) H11 t H15) in (let H19 \def (eq_ind T t3 (\lambda (t0: T).(pr0 t0 -t4)) H10 t H15) in (let H20 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 -(THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 u H16) in (let H21 \def -(eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H8 u H16) in (arity_bind g b H0 c2 -u2 a1 (H2 c2 H5 u2 H21) t4 a2 (H4 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H5 -u u2 H21 (Bind b)) t4 H19)))))) k H17)))) H14)) H13)))))))))))) (\lambda (u0: -T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: -(((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 a2)))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead -(Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H12: (eq T (THead (Flat -Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Bind b) u t))).(let H13 \def -(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind b) u t) H12) in (False_ind (arity g -c2 (THead (Bind Abbr) v2 t4) a2) H13)))))))))))) (\lambda (b0: B).(\lambda -(_: (not (eq B b0 Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 -v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 -a2)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda -(_: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead -(Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H15: (eq T (THead (Flat -Appl) v1 (THead (Bind b0) u1 t3)) (THead (Bind b) u t))).(let H16 \def -(eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t3)) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind b) u t) H15) in (False_ind (arity g -c2 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) -H16))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 -u2)).(\lambda (H9: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 -a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda -(H11: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (w: -T).(\lambda (H12: (subst0 O u2 t4 w)).(\lambda (H13: (eq T (THead (Bind Abbr) -u1 t3) (THead (Bind b) u t))).(let H14 \def (f_equal T B (\lambda (e: -T).(match e with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | -(THead k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abbr])])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in -((let H15 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) -(THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in ((let H16 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef -_) \Rightarrow t3 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) u1 -t3) (THead (Bind b) u t) H13) in (\lambda (H17: (eq T u1 u)).(\lambda (H18: -(eq B Abbr b)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead -(Bind b) u t)) \to (arity g c2 t4 a2))) H11 t H16) in (let H20 \def (eq_ind T -t3 (\lambda (t0: T).(pr0 t0 t4)) H10 t H16) in (let H21 \def (eq_ind T u1 -(\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 -u H17) in (let H22 \def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H8 u H17) -in (let H23 \def (eq_ind_r B b (\lambda (b0: B).((eq T t (THead (Bind b0) u -t)) \to (arity g c2 t4 a2))) H19 Abbr H18) in (let H24 \def (eq_ind_r B b -(\lambda (b0: B).((eq T u (THead (Bind b0) u t)) \to (arity g c2 u2 a2))) H21 -Abbr H18) in (let H25 \def (eq_ind_r B b (\lambda (b0: B).(\forall (c3: -C).((wcpr0 (CHead c (Bind b0) u) c3) \to (\forall (t5: T).((pr0 t t5) \to -(arity g c3 t5 a2)))))) H4 Abbr H18) in (let H26 \def (eq_ind_r B b (\lambda -(b0: B).(arity g (CHead c (Bind b0) u) t a2)) H3 Abbr H18) in (let H27 \def -(eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H0 Abbr H18) in -(arity_bind g Abbr H27 c2 u2 a1 (H2 c2 H5 u2 H22) w a2 (arity_subst0 g (CHead -c2 (Bind Abbr) u2) t4 a2 (H25 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H5 u -u2 H22 (Bind Abbr)) t4 H20) c2 u2 O (getl_refl Abbr c2 u2) w -H12)))))))))))))) H15)) H14))))))))))))) (\lambda (b0: B).(\lambda (H8: (not -(eq B b0 Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 -t4)).(\lambda (H10: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 -a2)))).(\lambda (u0: T).(\lambda (H11: (eq T (THead (Bind b0) u0 (lift (S O) -O t3)) (THead (Bind b) u t))).(let H12 \def (f_equal T B (\lambda (e: -T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | -(THead k _ _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) -\Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u -t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t0 _) \Rightarrow -t0])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in -((let H14 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) -\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ -t0) \Rightarrow t0])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) -u t) H11) in (\lambda (_: (eq T u0 u)).(\lambda (H16: (eq B b0 b)).(let H17 -\def (eq_ind B b0 (\lambda (b1: B).(not (eq B b1 Abst))) H8 b H16) in (let -H18 \def (eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead (Bind b) u t0)) \to -(arity g c2 t4 a2))) H10 (lift (S O) O t3) H14) in (let H19 \def (eq_ind_r T -t (\lambda (t0: T).(\forall (c3: C).((wcpr0 (CHead c (Bind b) u) c3) \to -(\forall (t5: T).((pr0 t0 t5) \to (arity g c3 t5 a2)))))) H4 (lift (S O) O -t3) H14) in (let H20 \def (eq_ind_r T t (\lambda (t0: T).(arity g (CHead c -(Bind b) u) t0 a2)) H3 (lift (S O) O t3) H14) in (arity_gen_lift g (CHead c2 -(Bind b) u) t4 a2 (S O) O (H19 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H5 u u -(pr0_refl u) (Bind b)) (lift (S O) O t4) (pr0_lift t3 t4 H9 (S O) O)) c2 -(drop_drop (Bind b) O c2 c2 (drop_refl c2) u))))))))) H13)) H12)))))))))) -(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: -(((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: -T).(\lambda (H10: (eq T (THead (Flat Cast) u0 t3) (THead (Bind b) u t))).(let -H11 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind b) u t) H10) in (False_ind (arity g c2 t4 a2) -H11)))))))) y t2 H7))) H6)))))))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: -((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g -c2 t2 (asucc g a1)))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: -(arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (c2: -C).((wcpr0 (CHead c (Bind Abst) u) c2) \to (\forall (t2: T).((pr0 t t2) \to -(arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c -c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) u t) -t2)).(insert_eq T (THead (Bind Abst) u t) (\lambda (t0: T).(pr0 t0 t2)) -(\lambda (_: T).(arity g c2 t2 (AHead a1 a2))) (\lambda (y: T).(\lambda (H6: -(pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Bind -Abst) u t)) \to (arity g c2 t3 (AHead a1 a2))))) (\lambda (t0: T).(\lambda -(H7: (eq T t0 (THead (Bind Abst) u t))).(let H8 \def (f_equal T T (\lambda -(e: T).e) t0 (THead (Bind Abst) u t) H7) in (eq_ind_r T (THead (Bind Abst) u -t) (\lambda (t3: T).(arity g c2 t3 (AHead a1 a2))) (arity_head g c2 u a1 (H1 -c2 H4 u (pr0_refl u)) t a2 (H3 (CHead c2 (Bind Abst) u) (wcpr0_comp c c2 H4 u -u (pr0_refl u) (Bind Abst)) t (pr0_refl t))) t0 H8)))) (\lambda (u1: -T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 -(THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 -(THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (k: -K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Bind Abst) u t))).(let H12 -\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | -(TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) -(THead (Bind Abst) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | -(THead _ t0 _) \Rightarrow t0])) (THead k u1 t3) (THead (Bind Abst) u t) H11) -in ((let H14 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t0) \Rightarrow t0])) -(THead k u1 t3) (THead (Bind Abst) u t) H11) in (\lambda (H15: (eq T u1 -u)).(\lambda (H16: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) (\lambda -(k0: K).(arity g c2 (THead k0 u2 t4) (AHead a1 a2))) (let H17 \def (eq_ind T -t3 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 t4 -(AHead a1 a2)))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t0: -T).(pr0 t0 t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq -T t0 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2)))) H8 u H15) -in (let H20 \def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H7 u H15) in -(arity_head g c2 u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 (CHead c2 (Bind Abst) u2) -(wcpr0_comp c c2 H4 u u2 H20 (Bind Abst)) t4 H18)))))) k H16)))) H13)) -H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda -(_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity -g c2 v2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 -t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 -(AHead a1 a2))))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u0 t3)) (THead (Bind Abst) u t))).(let H12 \def (eq_ind T (THead (Flat -Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abst) u t) H11) in (False_ind (arity g c2 (THead -(Bind Abbr) v2 t4) (AHead a1 a2)) H12)))))))))))) (\lambda (b: B).(\lambda -(_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 -v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity g c2 v2 -(AHead a1 a2))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 -u2)).(\lambda (_: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 -(AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 -t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 -(AHead a1 a2))))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) -u1 t3)) (THead (Bind Abst) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) -v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind Abst) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) (AHead a1 a2)) H15))))))))))))))))) -(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: -(((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 -a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda -(_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 -a2))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T -(THead (Bind Abbr) u1 t3) (THead (Bind Abst) u t))).(let H13 \def (eq_ind T -(THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | -Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow -False])])) I (THead (Bind Abst) u t) H12) in (False_ind (arity g c2 (THead -(Bind Abbr) u2 w) (AHead a1 a2)) H13))))))))))))) (\lambda (b: B).(\lambda -(H7: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 -t3 t4)).(\lambda (H9: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 -(AHead a1 a2))))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 -(lift (S O) O t3)) (THead (Bind Abst) u t))).(let H11 \def (f_equal T B -(\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef _) -\Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O -t3)) (THead (Bind Abst) u t) H10) in ((let H12 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | -(THead _ t0 _) \Rightarrow t0])) (THead (Bind b) u0 (lift (S O) O t3)) (THead -(Bind Abst) u t) H10) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) -| (TLRef _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind b) u0 (lift (S O) O t3)) (THead -(Bind Abst) u t) H10) in (\lambda (_: (eq T u0 u)).(\lambda (H15: (eq B b -Abst)).(let H16 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H7 -Abst H15) in (let H17 \def (eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead -(Bind Abst) u t0)) \to (arity g c2 t4 (AHead a1 a2)))) H9 (lift (S O) O t3) -H13) in (let H18 \def (eq_ind_r T t (\lambda (t0: T).(\forall (c3: C).((wcpr0 -(CHead c (Bind Abst) u) c3) \to (\forall (t5: T).((pr0 t0 t5) \to (arity g c3 -t5 a2)))))) H3 (lift (S O) O t3) H13) in (let H19 \def (eq_ind_r T t (\lambda -(t0: T).(arity g (CHead c (Bind Abst) u) t0 a2)) H2 (lift (S O) O t3) H13) in -(let H20 \def (match (H16 (refl_equal B Abst)) in False with []) in -H20)))))))) H12)) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda -(_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity -g c2 t4 (AHead a1 a2))))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat -Cast) u0 t3) (THead (Bind Abst) u t))).(let H10 \def (eq_ind T (THead (Flat -Cast) u0 t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind -_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u -t) H9) in (False_ind (arity g c2 t4 (AHead a1 a2)) H10)))))))) y t2 H6))) -H5)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda -(_: (arity g c u a1)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to -(\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: -T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: -((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g -c2 t2 (AHead a1 a2)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c -c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Appl) u t) -t2)).(insert_eq T (THead (Flat Appl) u t) (\lambda (t0: T).(pr0 t0 t2)) -(\lambda (_: T).(arity g c2 t2 a2)) (\lambda (y: T).(\lambda (H6: (pr0 y -t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Flat Appl) -u t)) \to (arity g c2 t3 a2)))) (\lambda (t0: T).(\lambda (H7: (eq T t0 -(THead (Flat Appl) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 -(THead (Flat Appl) u t) H7) in (eq_ind_r T (THead (Flat Appl) u t) (\lambda -(t3: T).(arity g c2 t3 a2)) (arity_appl g c2 u a1 (H1 c2 H4 u (pr0_refl u)) t -a2 (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: -T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Flat Appl) u -t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: -(pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g -c2 t4 a2)))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead -(Flat Appl) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e with -[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in ((let H13 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | -(TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) (THead k u1 t3) -(THead (Flat Appl) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | -(THead _ _ t0) \Rightarrow t0])) (THead k u1 t3) (THead (Flat Appl) u t) H11) -in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Flat Appl))).(eq_ind_r -K (Flat Appl) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H17 -\def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to -(arity g c2 t4 a2))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t0: -T).(pr0 t0 t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq -T t0 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2))) H8 u H15) in (let H20 -\def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H7 u H15) in (arity_appl g c2 -u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 c2 H4 t4 H18)))))) k H16)))) H13)) -H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda -(H7: (pr0 v1 v2)).(\lambda (H8: (((eq T v1 (THead (Flat Appl) u t)) \to -(arity g c2 v2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 -t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 -a2)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) -(THead (Flat Appl) u t))).(let H12 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t0 _) -\Rightarrow t0])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead -(Flat Appl) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow (THead (Bind Abst) u0 t3) | (TLRef _) \Rightarrow -(THead (Bind Abst) u0 t3) | (THead _ _ t0) \Rightarrow t0])) (THead (Flat -Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t) H11) in (\lambda -(H14: (eq T v1 u)).(let H15 \def (eq_ind T v1 (\lambda (t0: T).((eq T t0 -(THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H8 u H14) in (let H16 \def -(eq_ind T v1 (\lambda (t0: T).(pr0 t0 v2)) H7 u H14) in (let H17 \def -(eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead (Flat Appl) u t0)) \to (arity -g c2 t4 a2))) H10 (THead (Bind Abst) u0 t3) H13) in (let H18 \def (eq_ind_r T -t (\lambda (t0: T).((eq T u (THead (Flat Appl) u t0)) \to (arity g c2 v2 -a2))) H15 (THead (Bind Abst) u0 t3) H13) in (let H19 \def (eq_ind_r T t -(\lambda (t0: T).(\forall (c3: C).((wcpr0 c c3) \to (\forall (t5: T).((pr0 t0 -t5) \to (arity g c3 t5 (AHead a1 a2))))))) H3 (THead (Bind Abst) u0 t3) H13) -in (let H20 \def (eq_ind_r T t (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) -H2 (THead (Bind Abst) u0 t3) H13) in (let H21 \def (H1 c2 H4 v2 H16) in (let -H22 \def (H19 c2 H4 (THead (Bind Abst) u0 t4) (pr0_comp u0 u0 (pr0_refl u0) -t3 t4 H9 (Bind Abst))) in (let H23 \def (arity_gen_abst g c2 u0 t4 (AHead a1 -a2) H22) in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 -a2) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c2 u0 (asucc g -a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c2 (Bind Abst) u0) t4 -a4))) (arity g c2 (THead (Bind Abbr) v2 t4) a2) (\lambda (x0: A).(\lambda -(x1: A).(\lambda (H24: (eq A (AHead a1 a2) (AHead x0 x1))).(\lambda (H25: -(arity g c2 u0 (asucc g x0))).(\lambda (H26: (arity g (CHead c2 (Bind Abst) -u0) t4 x1)).(let H27 \def (f_equal A A (\lambda (e: A).(match e with [(ASort -_ _) \Rightarrow a1 | (AHead a0 _) \Rightarrow a0])) (AHead a1 a2) (AHead x0 -x1) H24) in ((let H28 \def (f_equal A A (\lambda (e: A).(match e with [(ASort -_ _) \Rightarrow a2 | (AHead _ a0) \Rightarrow a0])) (AHead a1 a2) (AHead x0 -x1) H24) in (\lambda (H29: (eq A a1 x0)).(let H30 \def (eq_ind_r A x1 -(\lambda (a0: A).(arity g (CHead c2 (Bind Abst) u0) t4 a0)) H26 a2 H28) in -(let H31 \def (eq_ind_r A x0 (\lambda (a0: A).(arity g c2 u0 (asucc g a0))) -H25 a1 H29) in (arity_bind g Abbr not_abbr_abst c2 v2 a1 H21 t4 a2 -(csuba_arity g (CHead c2 (Bind Abst) u0) t4 a2 H30 (CHead c2 (Bind Abbr) v2) -(csuba_abst g c2 c2 (csuba_refl g c2) u0 a1 H31 v2 H21))))))) H27))))))) -H23)))))))))))) H12)))))))))))) (\lambda (b: B).(\lambda (H7: (not (eq B b -Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H8: (pr0 v1 v2)).(\lambda -(H9: (((eq T v1 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2)))).(\lambda -(u1: T).(\lambda (u2: T).(\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (((eq T -u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H12: (pr0 t3 t4)).(\lambda (H13: (((eq T t3 -(THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (H14: (eq T -(THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t))).(let -H15 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 -| (TLRef _) \Rightarrow v1 | (THead _ t0 _) \Rightarrow t0])) (THead (Flat -Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t) H14) in ((let H16 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead -(Bind b) u1 t3) | (TLRef _) \Rightarrow (THead (Bind b) u1 t3) | (THead _ _ -t0) \Rightarrow t0])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead -(Flat Appl) u t) H14) in (\lambda (H17: (eq T v1 u)).(let H18 \def (eq_ind T -v1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 v2 -a2))) H9 u H17) in (let H19 \def (eq_ind T v1 (\lambda (t0: T).(pr0 t0 v2)) -H8 u H17) in (let H20 \def (eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead -(Flat Appl) u t0)) \to (arity g c2 t4 a2))) H13 (THead (Bind b) u1 t3) H16) -in (let H21 \def (eq_ind_r T t (\lambda (t0: T).((eq T u1 (THead (Flat Appl) -u t0)) \to (arity g c2 u2 a2))) H11 (THead (Bind b) u1 t3) H16) in (let H22 -\def (eq_ind_r T t (\lambda (t0: T).((eq T u (THead (Flat Appl) u t0)) \to -(arity g c2 v2 a2))) H18 (THead (Bind b) u1 t3) H16) in (let H23 \def -(eq_ind_r T t (\lambda (t0: T).(\forall (c3: C).((wcpr0 c c3) \to (\forall -(t5: T).((pr0 t0 t5) \to (arity g c3 t5 (AHead a1 a2))))))) H3 (THead (Bind -b) u1 t3) H16) in (let H24 \def (eq_ind_r T t (\lambda (t0: T).(arity g c t0 -(AHead a1 a2))) H2 (THead (Bind b) u1 t3) H16) in (let H25 \def (H1 c2 H4 v2 -H19) in (let H26 \def (H23 c2 H4 (THead (Bind b) u2 t4) (pr0_comp u1 u2 H10 -t3 t4 H12 (Bind b))) in (let H27 \def (arity_gen_bind b H7 g c2 u2 t4 (AHead -a1 a2) H26) in (ex2_ind A (\lambda (a3: A).(arity g c2 u2 a3)) (\lambda (_: -A).(arity g (CHead c2 (Bind b) u2) t4 (AHead a1 a2))) (arity g c2 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) (\lambda (x: -A).(\lambda (H28: (arity g c2 u2 x)).(\lambda (H29: (arity g (CHead c2 (Bind -b) u2) t4 (AHead a1 a2))).(arity_bind g b H7 c2 u2 x H28 (THead (Flat Appl) -(lift (S O) O v2) t4) a2 (arity_appl g (CHead c2 (Bind b) u2) (lift (S O) O -v2) a1 (arity_lift g c2 v2 a1 H25 (CHead c2 (Bind b) u2) (S O) O (drop_drop -(Bind b) O c2 c2 (drop_refl c2) u2)) t4 a2 H29))))) H27))))))))))))) -H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 -u2)).(\lambda (_: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 -a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda -(_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda -(w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind -Abbr) u1 t3) (THead (Flat Appl) u t))).(let H13 \def (eq_ind T (THead (Bind -Abbr) u1 t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind -_) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u -t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) a2) -H13))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda -(t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 -(THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda -(H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Flat Appl) u -t))).(let H11 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | -(Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H10) in (False_ind -(arity g c2 t4 a2) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda -(_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity -g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) -(THead (Flat Appl) u t))).(let H10 \def (eq_ind T (THead (Flat Cast) u0 t3) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow -False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u t) H9) in -(False_ind (arity g c2 t4 a2) H10)))))))) y t2 H6))) H5)))))))))))))) -(\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u -(asucc g a0))).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall -(t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (t: -T).(\lambda (_: (arity g c t a0)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c -c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a0))))))).(\lambda -(c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 -(THead (Flat Cast) u t) t2)).(insert_eq T (THead (Flat Cast) u t) (\lambda -(t0: T).(pr0 t0 t2)) (\lambda (_: T).(arity g c2 t2 a0)) (\lambda (y: -T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq -T t0 (THead (Flat Cast) u t)) \to (arity g c2 t3 a0)))) (\lambda (t0: -T).(\lambda (H7: (eq T t0 (THead (Flat Cast) u t))).(let H8 \def (f_equal T T -(\lambda (e: T).e) t0 (THead (Flat Cast) u t) H7) in (eq_ind_r T (THead (Flat -Cast) u t) (\lambda (t3: T).(arity g c2 t3 a0)) (arity_cast g c2 u a0 (H1 c2 -H4 u (pr0_refl u)) t (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: -T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 -(THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda -(t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat -Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (k: K).(\lambda (H11: (eq T -(THead k u1 t3) (THead (Flat Cast) u t))).(let H12 \def (f_equal T K (\lambda -(e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | -(THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Flat Cast) u t) H11) -in ((let H13 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) -(THead k u1 t3) (THead (Flat Cast) u t) H11) in ((let H14 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) -\Rightarrow t3 | (THead _ _ t0) \Rightarrow t0])) (THead k u1 t3) (THead -(Flat Cast) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k -(Flat Cast))).(eq_ind_r K (Flat Cast) (\lambda (k0: K).(arity g c2 (THead k0 -u2 t4) a0)) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead -(Flat Cast) u t)) \to (arity g c2 t4 a0))) H10 t H14) in (let H18 \def -(eq_ind T t3 (\lambda (t0: T).(pr0 t0 t4)) H9 t H14) in (let H19 \def (eq_ind -T u1 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 u2 -a0))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) -H7 u H15) in (arity_cast g c2 u2 a0 (H1 c2 H4 u2 H20) t4 (H3 c2 H4 t4 -H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: -T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead -(Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) -\to (arity g c2 t4 a0)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead -(Bind Abst) u0 t3)) (THead (Flat Cast) u t))).(let H12 \def (eq_ind T (THead -(Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow -(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead -(Flat Cast) u t) H11) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) a0) -H12)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda -(v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 -(THead (Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (u1: T).(\lambda -(u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Cast) -u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda -(_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity -g c2 t4 a0)))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 -t3)) (THead (Flat Cast) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f -with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat -Cast) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) a0) H15))))))))))))))))) (\lambda (u1: -T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead -(Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) -\to (arity g c2 t4 a0)))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 -w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Flat Cast) u -t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat -_) \Rightarrow False])])) I (THead (Flat Cast) u t) H12) in (False_ind (arity -g c2 (THead (Bind Abbr) u2 w) a0) H13))))))))))))) (\lambda (b: B).(\lambda -(_: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 -t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 -a0)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O -t3)) (THead (Flat Cast) u t))).(let H11 \def (eq_ind T (THead (Bind b) u0 -(lift (S O) O t3)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with -[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat -Cast) u t) H10) in (False_ind (arity g c2 t4 a0) H11)))))))))) (\lambda (t3: -T).(\lambda (t4: T).(\lambda (H7: (pr0 t3 t4)).(\lambda (H8: (((eq T t3 -(THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (u0: T).(\lambda -(H9: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t))).(let H10 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef -_) \Rightarrow u0 | (THead _ t0 _) \Rightarrow t0])) (THead (Flat Cast) u0 -t3) (THead (Flat Cast) u t) H9) in ((let H11 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | -(THead _ _ t0) \Rightarrow t0])) (THead (Flat Cast) u0 t3) (THead (Flat Cast) -u t) H9) in (\lambda (_: (eq T u0 u)).(let H13 \def (eq_ind T t3 (\lambda -(t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0))) H8 t H11) -in (let H14 \def (eq_ind T t3 (\lambda (t0: T).(pr0 t0 t4)) H7 t H11) in (H3 -c2 H4 t4 H14))))) H10)))))))) y t2 H6))) H5))))))))))))) (\lambda (c: -C).(\lambda (t: T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda -(H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to -(arity g c2 t2 a1))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 -a2)).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda -(H4: (pr0 t t2)).(arity_repl g c2 t2 a1 (H1 c2 H3 t2 H4) a2 H2)))))))))))) c1 -t1 a H))))). - -lemma arity_sred_wcpr0_pr1: - \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (g: G).(\forall -(c1: C).(\forall (a: A).((arity g c1 t1 a) \to (\forall (c2: C).((wcpr0 c1 -c2) \to (arity g c2 t2 a))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda -(t: T).(\lambda (t0: T).(\forall (g: G).(\forall (c1: C).(\forall (a: -A).((arity g c1 t a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (arity g c2 t0 -a))))))))) (\lambda (t: T).(\lambda (g: G).(\lambda (c1: C).(\lambda (a: -A).(\lambda (H0: (arity g c1 t a)).(\lambda (c2: C).(\lambda (H1: (wcpr0 c1 -c2)).(arity_sred_wcpr0_pr0 g c1 t a H0 c2 H1 t (pr0_refl t))))))))) (\lambda -(t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t4 t3)).(\lambda (t5: T).(\lambda -(_: (pr1 t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (c1: C).(\forall (a: -A).((arity g c1 t3 a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (arity g c2 t5 -a))))))))).(\lambda (g: G).(\lambda (c1: C).(\lambda (a: A).(\lambda (H3: -(arity g c1 t4 a)).(\lambda (c2: C).(\lambda (H4: (wcpr0 c1 c2)).(H2 g c2 a -(arity_sred_wcpr0_pr0 g c1 t4 a H3 c2 H4 t3 H0) c2 (wcpr0_refl -c2)))))))))))))) t1 t2 H))). - -lemma arity_sred_pr2: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(g: G).(\forall (a: A).((arity g c t1 a) \to (arity g c t2 a))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (g: -G).(\forall (a: A).((arity g c0 t a) \to (arity g c0 t0 a))))))) (\lambda -(c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda -(g: G).(\lambda (a: A).(\lambda (H1: (arity g c0 t3 a)).(arity_sred_wcpr0_pr0 -g c0 t3 a H1 c0 (wcpr0_refl c0) t4 H0)))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind -Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 -t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (g: -G).(\lambda (a: A).(\lambda (H3: (arity g c0 t3 a)).(arity_subst0 g c0 t4 a -(arity_sred_wcpr0_pr0 g c0 t3 a H3 c0 (wcpr0_refl c0) t4 H1) d u i H0 t -H2)))))))))))))) c t1 t2 H)))). - -lemma arity_sred_pr3: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall -(g: G).(\forall (a: A).((arity g c t1 a) \to (arity g c t2 a))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (g: G).(\forall (a: -A).((arity g c t a) \to (arity g c t0 a)))))) (\lambda (t: T).(\lambda (g: -G).(\lambda (a: A).(\lambda (H0: (arity g c t a)).H0)))) (\lambda (t3: -T).(\lambda (t4: T).(\lambda (H0: (pr2 c t4 t3)).(\lambda (t5: T).(\lambda -(_: (pr3 c t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (a: A).((arity g c -t3 a) \to (arity g c t5 a)))))).(\lambda (g: G).(\lambda (a: A).(\lambda (H3: -(arity g c t4 a)).(H2 g a (arity_sred_pr2 c t4 t3 H0 g a H3))))))))))) t1 t2 -H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/props.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/props.ma deleted file mode 100644 index fb8379af7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/props.ma +++ /dev/null @@ -1,266 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/arity/fwd.ma". - -lemma node_inh: - \forall (g: G).(\forall (n: nat).(\forall (k: nat).(ex_2 C T (\lambda (c: -C).(\lambda (t: T).(arity g c t (ASort k n))))))) -\def - \lambda (g: G).(\lambda (n: nat).(\lambda (k: nat).(nat_ind (\lambda (n0: -nat).(ex_2 C T (\lambda (c: C).(\lambda (t: T).(arity g c t (ASort n0 n)))))) -(ex_2_intro C T (\lambda (c: C).(\lambda (t: T).(arity g c t (ASort O n)))) -(CSort O) (TSort n) (arity_sort g (CSort O) n)) (\lambda (n0: nat).(\lambda -(H: (ex_2 C T (\lambda (c: C).(\lambda (t: T).(arity g c t (ASort n0 -n)))))).(let H0 \def H in (ex_2_ind C T (\lambda (c: C).(\lambda (t: -T).(arity g c t (ASort n0 n)))) (ex_2 C T (\lambda (c: C).(\lambda (t: -T).(arity g c t (ASort (S n0) n))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H1: (arity g x0 x1 (ASort n0 n))).(ex_2_intro C T (\lambda (c: -C).(\lambda (t: T).(arity g c t (ASort (S n0) n)))) (CHead x0 (Bind Abst) x1) -(TLRef O) (arity_abst g (CHead x0 (Bind Abst) x1) x0 x1 O (getl_refl Abst x0 -x1) (ASort (S n0) n) H1))))) H0)))) k))). - -lemma arity_lift: - \forall (g: G).(\forall (c2: C).(\forall (t: T).(\forall (a: A).((arity g c2 -t a) \to (\forall (c1: C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 -c2) \to (arity g c1 (lift h d t) a))))))))) -\def - \lambda (g: G).(\lambda (c2: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c2 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: -A).(\forall (c1: C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c) \to -(arity g c1 (lift h d t0) a0)))))))) (\lambda (c: C).(\lambda (n: -nat).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop -h d c1 c)).(eq_ind_r T (TSort n) (\lambda (t0: T).(arity g c1 t0 (ASort O -n))) (arity_sort g c1 n) (lift h d (TSort n)) (lift_sort n h d)))))))) -(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H1: -(arity g d u a0)).(\lambda (H2: ((\forall (c1: C).(\forall (h: nat).(\forall -(d0: nat).((drop h d0 c1 d) \to (arity g c1 (lift h d0 u) a0))))))).(\lambda -(c1: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda (H3: (drop h d0 c1 -c)).(lt_le_e i d0 (arity g c1 (lift h d0 (TLRef i)) a0) (\lambda (H4: (lt i -d0)).(eq_ind_r T (TLRef i) (\lambda (t0: T).(arity g c1 t0 a0)) (let H5 \def -(drop_getl_trans_le i d0 (le_S_n i d0 (le_S_n (S i) (S d0) (le_S (S (S i)) (S -d0) (le_n_S (S i) d0 H4)))) c1 c h H3 (CHead d (Bind Abbr) u) H0) in -(ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda -(e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) (\lambda (_: -C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abbr) u)))) (arity g c1 (TLRef -i) a0) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop i O c1 -x0)).(\lambda (H7: (drop h (minus d0 i) x0 x1)).(\lambda (H8: (clear x1 -(CHead d (Bind Abbr) u))).(let H9 \def (eq_ind nat (minus d0 i) (\lambda (n: -nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) (minus_x_Sy d0 i H4)) in (let -H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) H9 Abbr d u H8) in (ex2_ind C -(\lambda (c3: C).(clear x0 (CHead c3 (Bind Abbr) (lift h (minus d0 (S i)) -u)))) (\lambda (c3: C).(drop h (minus d0 (S i)) c3 d)) (arity g c1 (TLRef i) -a0) (\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abbr) (lift h -(minus d0 (S i)) u)))).(\lambda (H12: (drop h (minus d0 (S i)) x -d)).(arity_abbr g c1 x (lift h (minus d0 (S i)) u) i (getl_intro i c1 (CHead -x (Bind Abbr) (lift h (minus d0 (S i)) u)) x0 H6 H11) a0 (H2 x h (minus d0 (S -i)) H12))))) H10)))))))) H5)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 -H4))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i h)) (\lambda (t0: -T).(arity g c1 t0 a0)) (arity_abbr g c1 d u (plus i h) (drop_getl_trans_ge i -c1 c d0 h H3 (CHead d (Bind Abbr) u) H0 H4) a0 H1) (lift h d0 (TLRef i)) -(lift_lref_ge i h d0 H4)))))))))))))))) (\lambda (c: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind -Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc g -a0))).(\lambda (H2: ((\forall (c1: C).(\forall (h: nat).(\forall (d0: -nat).((drop h d0 c1 d) \to (arity g c1 (lift h d0 u) (asucc g -a0)))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda -(H3: (drop h d0 c1 c)).(lt_le_e i d0 (arity g c1 (lift h d0 (TLRef i)) a0) -(\lambda (H4: (lt i d0)).(eq_ind_r T (TLRef i) (\lambda (t0: T).(arity g c1 -t0 a0)) (let H5 \def (drop_getl_trans_le i d0 (le_S_n i d0 (le_S_n (S i) (S -d0) (le_S (S (S i)) (S d0) (le_n_S (S i) d0 H4)))) c1 c h H3 (CHead d (Bind -Abst) u) H0) in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 -e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) -(\lambda (_: C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abst) u)))) (arity -g c1 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop i O -c1 x0)).(\lambda (H7: (drop h (minus d0 i) x0 x1)).(\lambda (H8: (clear x1 -(CHead d (Bind Abst) u))).(let H9 \def (eq_ind nat (minus d0 i) (\lambda (n: -nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) (minus_x_Sy d0 i H4)) in (let -H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) H9 Abst d u H8) in (ex2_ind C -(\lambda (c3: C).(clear x0 (CHead c3 (Bind Abst) (lift h (minus d0 (S i)) -u)))) (\lambda (c3: C).(drop h (minus d0 (S i)) c3 d)) (arity g c1 (TLRef i) -a0) (\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abst) (lift h -(minus d0 (S i)) u)))).(\lambda (H12: (drop h (minus d0 (S i)) x -d)).(arity_abst g c1 x (lift h (minus d0 (S i)) u) i (getl_intro i c1 (CHead -x (Bind Abst) (lift h (minus d0 (S i)) u)) x0 H6 H11) a0 (H2 x h (minus d0 (S -i)) H12))))) H10)))))))) H5)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 -H4))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i h)) (\lambda (t0: -T).(arity g c1 t0 a0)) (arity_abst g c1 d u (plus i h) (drop_getl_trans_ge i -c1 c d0 h H3 (CHead d (Bind Abst) u) H0 H4) a0 H1) (lift h d0 (TLRef i)) -(lift_lref_ge i h d0 H4)))))))))))))))) (\lambda (b: B).(\lambda (H0: (not -(eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: -(arity g c u a1)).(\lambda (H2: ((\forall (c1: C).(\forall (h: nat).(\forall -(d: nat).((drop h d c1 c) \to (arity g c1 (lift h d u) a1))))))).(\lambda -(t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 -a2)).(\lambda (H4: ((\forall (c1: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c1 (CHead c (Bind b) u)) \to (arity g c1 (lift h d t0) -a2))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H5: -(drop h d c1 c)).(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s (Bind b) -d) t0)) (\lambda (t1: T).(arity g c1 t1 a2)) (arity_bind g b H0 c1 (lift h d -u) a1 (H2 c1 h d H5) (lift h (s (Bind b) d) t0) a2 (H4 (CHead c1 (Bind b) -(lift h d u)) h (s (Bind b) d) (drop_skip_bind h d c1 c H5 b u))) (lift h d -(THead (Bind b) u t0)) (lift_head (Bind b) u t0 h d))))))))))))))))) (\lambda -(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g -a1))).(\lambda (H1: ((\forall (c1: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c1 c) \to (arity g c1 (lift h d u) (asucc g -a1)))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c -(Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (c1: C).(\forall (h: -nat).(\forall (d: nat).((drop h d c1 (CHead c (Bind Abst) u)) \to (arity g c1 -(lift h d t0) a2))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H4: (drop h d c1 c)).(eq_ind_r T (THead (Bind Abst) (lift h d -u) (lift h (s (Bind Abst) d) t0)) (\lambda (t1: T).(arity g c1 t1 (AHead a1 -a2))) (arity_head g c1 (lift h d u) a1 (H1 c1 h d H4) (lift h (s (Bind Abst) -d) t0) a2 (H3 (CHead c1 (Bind Abst) (lift h d u)) h (s (Bind Abst) d) -(drop_skip_bind h d c1 c H4 Abst u))) (lift h d (THead (Bind Abst) u t0)) -(lift_head (Bind Abst) u t0 h d))))))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall -(c1: C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 -(lift h d u) a1))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity -g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c1: C).(\forall (h: -nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 (lift h d t0) (AHead -a1 a2)))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H4: (drop h d c1 c)).(eq_ind_r T (THead (Flat Appl) (lift h d u) (lift h (s -(Flat Appl) d) t0)) (\lambda (t1: T).(arity g c1 t1 a2)) (arity_appl g c1 -(lift h d u) a1 (H1 c1 h d H4) (lift h (s (Flat Appl) d) t0) a2 (H3 c1 h (s -(Flat Appl) d) H4)) (lift h d (THead (Flat Appl) u t0)) (lift_head (Flat -Appl) u t0 h d))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: -A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c1: -C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 (lift -h d u) (asucc g a0)))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 -a0)).(\lambda (H3: ((\forall (c1: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c1 c) \to (arity g c1 (lift h d t0) a0))))))).(\lambda (c1: -C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H4: (drop h d c1 -c)).(eq_ind_r T (THead (Flat Cast) (lift h d u) (lift h (s (Flat Cast) d) -t0)) (\lambda (t1: T).(arity g c1 t1 a0)) (arity_cast g c1 (lift h d u) a0 -(H1 c1 h d H4) (lift h (s (Flat Cast) d) t0) (H3 c1 h (s (Flat Cast) d) H4)) -(lift h d (THead (Flat Cast) u t0)) (lift_head (Flat Cast) u t0 h -d)))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda -(_: (arity g c t0 a1)).(\lambda (H1: ((\forall (c1: C).(\forall (h: -nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 (lift h d t0) -a1))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c1: -C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H3: (drop h d c1 -c)).(arity_repl g c1 (lift h d t0) a1 (H1 c1 h d H3) a2 H2)))))))))))) c2 t a -H))))). - -lemma arity_repellent: - \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (t: T).(\forall (a1: -A).((arity g (CHead c (Bind Abst) w) t a1) \to (\forall (a2: A).((arity g c -(THead (Bind Abst) w t) a2) \to ((leq g a1 a2) \to (\forall (P: -Prop).P))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (t: T).(\lambda (a1: -A).(\lambda (H: (arity g (CHead c (Bind Abst) w) t a1)).(\lambda (a2: -A).(\lambda (H0: (arity g c (THead (Bind Abst) w t) a2)).(\lambda (H1: (leq g -a1 a2)).(\lambda (P: Prop).(let H_y \def (arity_repl g (CHead c (Bind Abst) -w) t a1 H a2 H1) in (let H2 \def (arity_gen_abst g c w t a2 H0) in (ex3_2_ind -A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: -A).(\lambda (_: A).(arity g c w (asucc g a3)))) (\lambda (_: A).(\lambda (a4: -A).(arity g (CHead c (Bind Abst) w) t a4))) P (\lambda (x0: A).(\lambda (x1: -A).(\lambda (H3: (eq A a2 (AHead x0 x1))).(\lambda (_: (arity g c w (asucc g -x0))).(\lambda (H5: (arity g (CHead c (Bind Abst) w) t x1)).(let H6 \def -(eq_ind A a2 (\lambda (a: A).(arity g (CHead c (Bind Abst) w) t a)) H_y -(AHead x0 x1) H3) in (leq_ahead_false_2 g x1 x0 (arity_mono g (CHead c (Bind -Abst) w) t (AHead x0 x1) H6 x1 H5) P))))))) H2)))))))))))). - -theorem arity_appls_cast: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (vs: -TList).(\forall (a: A).((arity g c (THeads (Flat Appl) vs u) (asucc g a)) \to -((arity g c (THeads (Flat Appl) vs t) a) \to (arity g c (THeads (Flat Appl) -vs (THead (Flat Cast) u t)) a)))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (vs: -TList).(TList_ind (\lambda (t0: TList).(\forall (a: A).((arity g c (THeads -(Flat Appl) t0 u) (asucc g a)) \to ((arity g c (THeads (Flat Appl) t0 t) a) -\to (arity g c (THeads (Flat Appl) t0 (THead (Flat Cast) u t)) a))))) -(\lambda (a: A).(\lambda (H: (arity g c u (asucc g a))).(\lambda (H0: (arity -g c t a)).(arity_cast g c u a H t H0)))) (\lambda (t0: T).(\lambda (t1: -TList).(\lambda (H: ((\forall (a: A).((arity g c (THeads (Flat Appl) t1 u) -(asucc g a)) \to ((arity g c (THeads (Flat Appl) t1 t) a) \to (arity g c -(THeads (Flat Appl) t1 (THead (Flat Cast) u t)) a)))))).(\lambda (a: -A).(\lambda (H0: (arity g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 u)) -(asucc g a))).(\lambda (H1: (arity g c (THead (Flat Appl) t0 (THeads (Flat -Appl) t1 t)) a)).(let H2 \def (arity_gen_appl g c t0 (THeads (Flat Appl) t1 -t) a H1) in (ex2_ind A (\lambda (a1: A).(arity g c t0 a1)) (\lambda (a1: -A).(arity g c (THeads (Flat Appl) t1 t) (AHead a1 a))) (arity g c (THead -(Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Cast) u t))) a) (\lambda -(x: A).(\lambda (H3: (arity g c t0 x)).(\lambda (H4: (arity g c (THeads (Flat -Appl) t1 t) (AHead x a))).(let H5 \def (arity_gen_appl g c t0 (THeads (Flat -Appl) t1 u) (asucc g a) H0) in (ex2_ind A (\lambda (a1: A).(arity g c t0 a1)) -(\lambda (a1: A).(arity g c (THeads (Flat Appl) t1 u) (AHead a1 (asucc g -a)))) (arity g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat -Cast) u t))) a) (\lambda (x0: A).(\lambda (H6: (arity g c t0 x0)).(\lambda -(H7: (arity g c (THeads (Flat Appl) t1 u) (AHead x0 (asucc g -a)))).(arity_appl g c t0 x H3 (THeads (Flat Appl) t1 (THead (Flat Cast) u t)) -a (H (AHead x a) (arity_repl g c (THeads (Flat Appl) t1 u) (AHead x (asucc g -a)) (arity_repl g c (THeads (Flat Appl) t1 u) (AHead x0 (asucc g a)) H7 -(AHead x (asucc g a)) (leq_head g x0 x (arity_mono g c t0 x0 H6 x H3) (asucc -g a) (asucc g a) (leq_refl g (asucc g a)))) (asucc g (AHead x a)) (leq_refl g -(asucc g (AHead x a)))) H4))))) H5))))) H2)))))))) vs))))). - -lemma arity_appls_abbr: - \forall (g: G).(\forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: -nat).((getl i c (CHead d (Bind Abbr) v)) \to (\forall (vs: TList).(\forall -(a: A).((arity g c (THeads (Flat Appl) vs (lift (S i) O v)) a) \to (arity g c -(THeads (Flat Appl) vs (TLRef i)) a))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: -nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (vs: -TList).(TList_ind (\lambda (t: TList).(\forall (a: A).((arity g c (THeads -(Flat Appl) t (lift (S i) O v)) a) \to (arity g c (THeads (Flat Appl) t -(TLRef i)) a)))) (\lambda (a: A).(\lambda (H0: (arity g c (lift (S i) O v) -a)).(arity_abbr g c d v i H a (arity_gen_lift g c v a (S i) O H0 d (getl_drop -Abbr c d v i H))))) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H0: -((\forall (a: A).((arity g c (THeads (Flat Appl) t0 (lift (S i) O v)) a) \to -(arity g c (THeads (Flat Appl) t0 (TLRef i)) a))))).(\lambda (a: A).(\lambda -(H1: (arity g c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O -v))) a)).(let H2 \def (arity_gen_appl g c t (THeads (Flat Appl) t0 (lift (S -i) O v)) a H1) in (ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda (a1: -A).(arity g c (THeads (Flat Appl) t0 (lift (S i) O v)) (AHead a1 a))) (arity -g c (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) a) (\lambda (x: -A).(\lambda (H3: (arity g c t x)).(\lambda (H4: (arity g c (THeads (Flat -Appl) t0 (lift (S i) O v)) (AHead x a))).(arity_appl g c t x H3 (THeads (Flat -Appl) t0 (TLRef i)) a (H0 (AHead x a) H4))))) H2))))))) vs))))))). - -theorem arity_appls_bind: - \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (c: -C).(\forall (v: T).(\forall (a1: A).((arity g c v a1) \to (\forall (t: -T).(\forall (vs: TList).(\forall (a2: A).((arity g (CHead c (Bind b) v) -(THeads (Flat Appl) (lifts (S O) O vs) t) a2) \to (arity g c (THeads (Flat -Appl) vs (THead (Bind b) v t)) a2))))))))))) -\def - \lambda (g: G).(\lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda -(c: C).(\lambda (v: T).(\lambda (a1: A).(\lambda (H0: (arity g c v -a1)).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: -TList).(\forall (a2: A).((arity g (CHead c (Bind b) v) (THeads (Flat Appl) -(lifts (S O) O t0) t) a2) \to (arity g c (THeads (Flat Appl) t0 (THead (Bind -b) v t)) a2)))) (\lambda (a2: A).(\lambda (H1: (arity g (CHead c (Bind b) v) -t a2)).(arity_bind g b H c v a1 H0 t a2 H1))) (\lambda (t0: T).(\lambda (t1: -TList).(\lambda (H1: ((\forall (a2: A).((arity g (CHead c (Bind b) v) (THeads -(Flat Appl) (lifts (S O) O t1) t) a2) \to (arity g c (THeads (Flat Appl) t1 -(THead (Bind b) v t)) a2))))).(\lambda (a2: A).(\lambda (H2: (arity g (CHead -c (Bind b) v) (THead (Flat Appl) (lift (S O) O t0) (THeads (Flat Appl) (lifts -(S O) O t1) t)) a2)).(let H3 \def (arity_gen_appl g (CHead c (Bind b) v) -(lift (S O) O t0) (THeads (Flat Appl) (lifts (S O) O t1) t) a2 H2) in -(ex2_ind A (\lambda (a3: A).(arity g (CHead c (Bind b) v) (lift (S O) O t0) -a3)) (\lambda (a3: A).(arity g (CHead c (Bind b) v) (THeads (Flat Appl) -(lifts (S O) O t1) t) (AHead a3 a2))) (arity g c (THead (Flat Appl) t0 -(THeads (Flat Appl) t1 (THead (Bind b) v t))) a2) (\lambda (x: A).(\lambda -(H4: (arity g (CHead c (Bind b) v) (lift (S O) O t0) x)).(\lambda (H5: (arity -g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O t1) t) (AHead x -a2))).(arity_appl g c t0 x (arity_gen_lift g (CHead c (Bind b) v) t0 x (S O) -O H4 c (drop_drop (Bind b) O c c (drop_refl c) v)) (THeads (Flat Appl) t1 -(THead (Bind b) v t)) a2 (H1 (AHead x a2) H5))))) H3))))))) vs))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/arity/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1/arity/subst0.ma deleted file mode 100644 index 334505b50..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/arity/subst0.ma +++ /dev/null @@ -1,1115 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/arity/props.ma". - -include "basic_1/fsubst0/fwd.ma". - -include "basic_1/csubst0/getl.ma". - -include "basic_1/subst0/dec.ma". - -include "basic_1/subst0/fwd.ma". - -include "basic_1/getl/getl.ma". - -lemma arity_gen_cvoid_subst0: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t -a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d -(Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t v) \to -(\forall (P: Prop).P)))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: -A).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d -(Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to -(\forall (P: Prop).P))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda -(d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d -(Bind Void) u))).(\lambda (w: T).(\lambda (v: T).(\lambda (H1: (subst0 i w -(TSort n) v)).(\lambda (P: Prop).(subst0_gen_sort w v i n H1 P))))))))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: -(arity g d u a0)).(\lambda (_: ((\forall (d0: C).(\forall (u0: T).(\forall -(i0: nat).((getl i0 d (CHead d0 (Bind Void) u0)) \to (\forall (w: T).(\forall -(v: T).((subst0 i0 w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (d0: -C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 -(Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w -(TLRef i) v)).(\lambda (P: Prop).(land_ind (eq nat i i0) (eq T v (lift (S i) -O w)) P (\lambda (H5: (eq nat i i0)).(\lambda (_: (eq T v (lift (S i) O -w))).(let H7 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c0 (CHead d0 -(Bind Void) u0))) H3 i H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) -(\lambda (c1: C).(getl i c0 c1)) H0 (CHead d0 (Bind Void) u0) (getl_mono c0 -(CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (let H9 \def -(eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind -Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) -u0) H7)) in (False_ind P H9)))))) (subst0_gen_lref w v i0 i -H4)))))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) -u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: -((\forall (d0: C).(\forall (u0: T).(\forall (i0: nat).((getl i0 d (CHead d0 -(Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i0 w u v) \to -(\forall (P: Prop).P)))))))))).(\lambda (d0: C).(\lambda (u0: T).(\lambda -(i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 (Bind Void) u0))).(\lambda (w: -T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w (TLRef i) v)).(\lambda (P: -Prop).(land_ind (eq nat i i0) (eq T v (lift (S i) O w)) P (\lambda (H5: (eq -nat i i0)).(\lambda (_: (eq T v (lift (S i) O w))).(let H7 \def (eq_ind_r nat -i0 (\lambda (n: nat).(getl n c0 (CHead d0 (Bind Void) u0))) H3 i H5) in (let -H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c1: C).(getl i c0 c1)) H0 -(CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead -d0 (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d -(Bind Abst) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (False_ind P H9)))))) -(subst0_gen_lref w v i0 i H4)))))))))))))))))) (\lambda (b: B).(\lambda (_: -(not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u a1)).(\lambda (H2: ((\forall (d: C).(\forall -(u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall -(w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: -Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g -(CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (d: C).(\forall (u0: -T).(\forall (i: nat).((getl i (CHead c0 (Bind b) u) (CHead d (Bind Void) u0)) -\to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: -Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda -(H5: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: -T).(\lambda (H6: (subst0 i w (THead (Bind b) u t0) v)).(\lambda (P: -Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) -(\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead -(Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda -(t2: T).(subst0 (s (Bind b) i) w t0 t2)))) P (\lambda (H7: (ex2 T (\lambda -(u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u -u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda -(u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead -(Bind b) x t0))).(\lambda (H9: (subst0 i w u x)).(H2 d u0 i H5 w x H9 P)))) -H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) -(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)))).(ex2_ind T (\lambda (t2: -T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w -t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind b) u -x))).(\lambda (H9: (subst0 (s (Bind b) i) w t0 x)).(H4 d u0 (S i) -(getl_clear_bind b (CHead c0 (Bind b) u) c0 u (clear_bind b c0 u) (CHead d -(Bind Void) u0) i H5) w x H9 P)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s (Bind b) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s (Bind b) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: -T).(\lambda (_: (eq T v (THead (Bind b) x0 x1))).(\lambda (H9: (subst0 i w u -x0)).(\lambda (_: (subst0 (s (Bind b) i) w t0 x1)).(H2 d u0 i H5 w x0 H9 -P)))))) H7)) (subst0_gen_head (Bind b) w u t0 v i H6))))))))))))))))))))) -(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u -(asucc g a1))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: -nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: -T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: -T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 -a2)).(\lambda (H3: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl -i (CHead c0 (Bind Abst) u) (CHead d (Bind Void) u0)) \to (\forall (w: -T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: -Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda -(H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: -T).(\lambda (H5: (subst0 i w (THead (Bind Abst) u t0) v)).(\lambda (P: -Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) -(\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead -(Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)))) P (\lambda (H6: -(ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: -T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind -Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda -(_: (eq T v (THead (Bind Abst) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d -u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v -(THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 -t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) -(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)) P (\lambda (x: -T).(\lambda (_: (eq T v (THead (Bind Abst) u x))).(\lambda (H8: (subst0 (s -(Bind Abst) i) w t0 x)).(H3 d u0 (S i) (getl_clear_bind Abst (CHead c0 (Bind -Abst) u) c0 u (clear_bind Abst c0 u) (CHead d (Bind Void) u0) i H4) w x H8 -P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v -(THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u -u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 -t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind -Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda -(_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) P (\lambda (x0: -T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Bind Abst) x0 x1))).(\lambda -(H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Bind Abst) i) w t0 x1)).(H1 -d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Bind Abst) w u t0 v i -H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (_: (arity g c0 u a1)).(\lambda (H1: ((\forall (d: C).(\forall -(u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall -(w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: -Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 -t0 (AHead a1 a2))).(\lambda (H3: ((\forall (d: C).(\forall (u0: T).(\forall -(i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall -(v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind -Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead -(Flat Appl) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq -T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T -(\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 -(s (Flat Appl) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq -T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w -u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 -t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 -t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T -v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda -(x: T).(\lambda (_: (eq T v (THead (Flat Appl) x t0))).(\lambda (H8: (subst0 -i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: -T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) -i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) -(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)) P (\lambda (x: -T).(\lambda (_: (eq T v (THead (Flat Appl) u x))).(\lambda (H8: (subst0 (s -(Flat Appl) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 -T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda -(t2: T).(subst0 (s (Flat Appl) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s (Flat Appl) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: -T).(\lambda (_: (eq T v (THead (Flat Appl) x0 x1))).(\lambda (H8: (subst0 i w -u x0)).(\lambda (_: (subst0 (s (Flat Appl) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 -P)))))) H6)) (subst0_gen_head (Flat Appl) w u t0 v i H5))))))))))))))))))) -(\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u -(asucc g a0))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: -nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: -T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: -T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (d: C).(\forall -(u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall -(w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: -Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda -(H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: -T).(\lambda (H5: (subst0 i w (THead (Flat Cast) u t0) v)).(\lambda (P: -Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) -(\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead -(Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)))) P (\lambda (H6: -(ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: -T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Flat -Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda -(_: (eq T v (THead (Flat Cast) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d -u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v -(THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 -t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) -(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)) P (\lambda (x: -T).(\lambda (_: (eq T v (THead (Flat Cast) u x))).(\lambda (H8: (subst0 (s -(Flat Cast) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 -T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda -(t2: T).(subst0 (s (Flat Cast) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s (Flat Cast) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: -T).(\lambda (_: (eq T v (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i w -u x0)).(\lambda (_: (subst0 (s (Flat Cast) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 -P)))))) H6)) (subst0_gen_head (Flat Cast) w u t0 v i H5)))))))))))))))))) -(\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 -t0 a1)).(\lambda (H1: ((\forall (d: C).(\forall (u: T).(\forall (i: -nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: -T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (a2: -A).(\lambda (_: (leq g a1 a2)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H3: (getl i c0 (CHead d (Bind Void) u))).(\lambda (w: -T).(\lambda (v: T).(\lambda (H4: (subst0 i w t0 v)).(\lambda (P: Prop).(H1 d -u i H3 w v H4 P)))))))))))))))) c t a H))))). - -lemma arity_gen_cvoid: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t -a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d -(Bind Void) u)) \to (ex T (\lambda (v: T).(eq T t (lift (S O) i v)))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c t a)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c (CHead d (Bind Void) u))).(let H_x \def (dnf_dec u t i) in -(let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 i u t (lift (S O) i -v)) (eq T t (lift (S O) i v)))) (ex T (\lambda (v: T).(eq T t (lift (S O) i -v)))) (\lambda (x: T).(\lambda (H2: (or (subst0 i u t (lift (S O) i x)) (eq T -t (lift (S O) i x)))).(or_ind (subst0 i u t (lift (S O) i x)) (eq T t (lift -(S O) i x)) (ex T (\lambda (v: T).(eq T t (lift (S O) i v)))) (\lambda (H3: -(subst0 i u t (lift (S O) i x))).(arity_gen_cvoid_subst0 g c t a H d u i H0 u -(lift (S O) i x) H3 (ex T (\lambda (v: T).(eq T t (lift (S O) i v)))))) -(\lambda (H3: (eq T t (lift (S O) i x))).(let H4 \def (eq_ind T t (\lambda -(t0: T).(arity g c t0 a)) H (lift (S O) i x) H3) in (eq_ind_r T (lift (S O) i -x) (\lambda (t0: T).(ex T (\lambda (v: T).(eq T t0 (lift (S O) i v))))) -(ex_intro T (\lambda (v: T).(eq T (lift (S O) i x) (lift (S O) i v))) x -(refl_equal T (lift (S O) i x))) t H3))) H2))) H1))))))))))). - -lemma arity_fsubst0: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (a: A).((arity g -c1 t1 a) \to (\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c1 -(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u -c1 t1 c2 t2) \to (arity g c2 t2 a)))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda -(H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda -(a0: A).(\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead -d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 -t2) \to (arity g c2 t2 a0))))))))))) (\lambda (c: C).(\lambda (n: -nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i -c (CHead d1 (Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H1: -(fsubst0 i u c (TSort n) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (TSort -n) t2 u i H1) in (let H2 \def H_x in (or3_ind (land (eq C c c2) (subst0 i u -(TSort n) t2)) (land (eq T (TSort n) t2) (csubst0 i u c c2)) (land (subst0 i -u (TSort n) t2) (csubst0 i u c c2)) (arity g c2 t2 (ASort O n)) (\lambda (H3: -(land (eq C c c2) (subst0 i u (TSort n) t2))).(land_ind (eq C c c2) (subst0 i -u (TSort n) t2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq C c -c2)).(\lambda (H5: (subst0 i u (TSort n) t2)).(eq_ind C c (\lambda (c0: -C).(arity g c0 t2 (ASort O n))) (subst0_gen_sort u t2 i n H5 (arity g c t2 -(ASort O n))) c2 H4))) H3)) (\lambda (H3: (land (eq T (TSort n) t2) (csubst0 -i u c c2))).(land_ind (eq T (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 -(ASort O n)) (\lambda (H4: (eq T (TSort n) t2)).(\lambda (_: (csubst0 i u c -c2)).(eq_ind T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) -(arity_sort g c2 n) t2 H4))) H3)) (\lambda (H3: (land (subst0 i u (TSort n) -t2) (csubst0 i u c c2))).(land_ind (subst0 i u (TSort n) t2) (csubst0 i u c -c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (subst0 i u (TSort n) -t2)).(\lambda (_: (csubst0 i u c c2)).(subst0_gen_sort u t2 i n H4 (arity g -c2 t2 (ASort O n))))) H3)) H2)))))))))))) (\lambda (c: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind -Abbr) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u a0)).(\lambda (H2: -((\forall (d1: C).(\forall (u0: T).(\forall (i0: nat).((getl i0 d (CHead d1 -(Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i0 u0 d u c2 -t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: -T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) -u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef -i) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in -(let H5 \def H_x in (or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) -(land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) -t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) -(subst0 i0 u0 (TLRef i) t2))).(land_ind (eq C c c2) (subst0 i0 u0 (TLRef i) -t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 -(TLRef i) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (land_ind (eq -nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat -i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O -u0) (\lambda (t: T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda -(n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def -(eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead -d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind -Abbr) u0) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind -Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 -(CHead d1 (Bind Abbr) u0) H11)) in ((let H14 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) -(CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind -Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (\lambda (H15: (eq C d -d1)).(let H16 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind -Abbr) t))) H12 u H14) in (eq_ind T u (\lambda (t: T).(arity g c (lift (S i) O -t) a0)) (let H17 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c (CHead c0 -(Bind Abbr) u))) H16 d H15) in (arity_lift g d u a0 H1 c (S i) O (getl_drop -Abbr c d u i H17))) u0 H14)))) H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i -H8)) c2 H7))) H6)) (\lambda (H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c -c2))).(land_ind (eq T (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) -(\lambda (H7: (eq T (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c -c2)).(eq_ind T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (lt_le_e i i0 -(arity g c2 (TLRef i) a0) (\lambda (H9: (lt i i0)).(let H10 \def -(csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind Abbr) u) H0) in (or4_ind -(getl i c2 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (arity g c2 (TLRef i) a0) -(\lambda (H11: (getl i c2 (CHead d (Bind Abbr) u))).(let H12 \def (eq_ind nat -(minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 -(Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d -(Bind Abbr) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S i)) (S i0) -(le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in -(arity_abbr g c2 d u i H11 a0 H1))) (\lambda (H11: (ex3_4 B C T T (\lambda -(b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind -Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind -Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind -x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def -(eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) -(CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 -(CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S -i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i -H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) -\Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in -(\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let H21 \def -(eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) -in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(getl i c2 (CHead c0 (Bind -x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i -c2 (CHead d (Bind b) x3))) H22 Abbr H19) in (arity_abbr g c2 d x3 i H23 a0 -(H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead -d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abbr) -(minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda -(H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C -T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C -(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) -u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda -(x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq -C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 -(CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 -x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead -d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind -Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) -(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) -(minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d -(Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B -(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let -H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) -H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus -i0 (S i)) u0 c0 x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: -B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abbr H19) in (arity_abbr g c2 x2 u -i H23 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d -(CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind -Abbr) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) -(\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 -e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) -(arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind -Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind -x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: -(csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) -(\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) -(getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 -(le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S i)) (S i0) (le_n_S (S i) i0 -H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal -C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c0 _ _) -\Rightarrow c0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in -((let H18 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead -x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e -with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind -Abbr) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abbr -x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: -T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C -x1 (\lambda (c0: C).(csubst0 (minus i0 (S i)) u0 c0 x2)) H15 d H21) in (let -H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) -H13 Abbr H20) in (arity_abbr g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abbr) -(minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u -(minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abbr) (minus i0 (S i))) u0 -d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: -(le i0 i)).(arity_abbr g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead -d (Bind Abbr) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 -(TLRef i) t2) (csubst0 i0 u0 c c2))).(land_ind (subst0 i0 u0 (TLRef i) t2) -(csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) -t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(land_ind (eq nat i i0) (eq T t2 -(lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda -(H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: -T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: -nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda -(n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def -(eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead -d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind -Abbr) u0) H12)) in (let H14 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind -Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 -(CHead d1 (Bind Abbr) u0) H12)) in ((let H15 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) -(CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind -Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (\lambda (H16: (eq C d -d1)).(let H17 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind -Abbr) t))) H13 u H15) in (let H18 \def (eq_ind_r T u0 (\lambda (t: -T).(csubst0 i t c c2)) H11 u H15) in (eq_ind T u (\lambda (t: T).(arity g c2 -(lift (S i) O t) a0)) (let H19 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c -(CHead c0 (Bind Abbr) u))) H17 d H16) in (arity_lift g d u a0 H1 c2 (S i) O -(getl_drop Abbr c2 d u i (csubst0_getl_ge i i (le_n i) c c2 u H18 (CHead d -(Bind Abbr) u) H19)))) u0 H15))))) H14))))) t2 H10))) (subst0_gen_lref u0 t2 -i0 i H7)))) H6)) H5)))))))))))))))))) (\lambda (c: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind -Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc g -a0))).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i0: -nat).((getl i0 d (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall -(t2: T).((fsubst0 i0 u0 d u c2 t2) \to (arity g c2 t2 (asucc g -a0))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda -(H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: -T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H_x \def -(fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (let H5 \def H_x in (or3_ind -(land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) -(csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) -(arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) -t2))).(land_ind (eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) -(\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind -C c (\lambda (c0: C).(arity g c0 t2 a0)) (land_ind (eq nat i i0) (eq T t2 -(lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda -(H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: -T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n -c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d -(Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) -(getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in -(let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with -[(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst -\Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) -I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead -d1 (Bind Abbr) u0) H11)) in (False_ind (arity g c (lift (S i) O u0) a0) -H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) H6)) (\lambda -(H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2))).(land_ind (eq T (TLRef -i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq T (TLRef i) -t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) (\lambda (t: -T).(arity g c2 t a0)) (lt_le_e i i0 (arity g c2 (TLRef i) a0) (\lambda (H9: -(lt i i0)).(let H10 \def (csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind -Abst) u) H0) in (or4_ind (getl i c2 (CHead d (Bind Abst) u)) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 -(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) -u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) -(arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d (Bind Abst) -u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead -d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind -Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) -(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) -(minus_x_Sy i0 i H9)) in (arity_abst g c2 d u i H11 a0 H1))) (\lambda (H11: -(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda -(w: T).(subst0 (minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda -(b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind -Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C -(CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 -(CHead x1 (Bind x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 -x3)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead -d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind -Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) -(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) -(minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d -(Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B -(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) -x2) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let -H21 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) -H14 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(getl i c2 (CHead -c0 (Bind x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: -B).(getl i c2 (CHead d (Bind b) x3))) H22 Abst H19) in (arity_abst g c2 d x3 -i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d -(CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind -Abst) (minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) -(\lambda (H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C -T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C -(CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) -u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda -(x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq -C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 -(CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 -x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead -d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind -Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) -(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) -(minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d -(Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B -(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) -x3) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let -H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) -H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus -i0 (S i)) u0 c0 x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: -B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abst H19) in (arity_abst g c2 x2 u -i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d -(CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind -Abst) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) -(\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 -e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) -(arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind -Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind -x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: -(csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) -(\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) -(getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 -(le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S i)) (S i0) (le_n_S (S i) i0 -H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal -C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c0 _ _) -\Rightarrow c0])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in -((let H18 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead -x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e -with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind -Abst) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abst -x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: -T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C -x1 (\lambda (c0: C).(csubst0 (minus i0 (S i)) u0 c0 x2)) H15 d H21) in (let -H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) -H13 Abst H20) in (arity_abst g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abst) -(minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u -(minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abst) (minus i0 (S i))) u0 -d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: -(le i0 i)).(arity_abst g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead -d (Bind Abst) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 -(TLRef i) t2) (csubst0 i0 u0 c c2))).(land_ind (subst0 i0 u0 (TLRef i) t2) -(csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) -t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(land_ind (eq nat i i0) (eq T t2 -(lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda -(H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: -T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: -nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda -(n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def -(eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead -d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind -Abbr) u0) H12)) in (let H14 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda -(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d -(Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (False_ind (arity g c2 -(lift (S i) O u0) a0) H14))))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H7)))) -H6)) H5)))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b -Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity -g c u a1)).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: -nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: -T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: -T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t -a2)).(\lambda (H4: ((\forall (d1: C).(\forall (u0: T).(\forall (i: -nat).((getl i (CHead c (Bind b) u) (CHead d1 (Bind Abbr) u0)) \to (\forall -(c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind b) u) t c2 t2) \to -(arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: -nat).(\lambda (H5: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: -C).(\lambda (t2: T).(\lambda (H6: (fsubst0 i u0 c (THead (Bind b) u t) c2 -t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Bind b) u t) t2 u0 i H6) in -(let H7 \def H_x in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Bind b) u -t) t2)) (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (land -(subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a2) -(\lambda (H8: (land (eq C c c2) (subst0 i u0 (THead (Bind b) u t) -t2))).(land_ind (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2) (arity g c2 -t2 a2) (\lambda (H9: (eq C c c2)).(\lambda (H10: (subst0 i u0 (THead (Bind b) -u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i -u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda -(t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c t2 a2) (\lambda (H11: (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i -u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) -(\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a2) (\lambda (x: -T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 -u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c t0 a2)) -(arity_bind g b H0 c x a1 (H2 d1 u0 i H5 c x (fsubst0_snd i u0 c u x H13)) t -a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b -c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x) t (fsubst0_fst (S -i) u0 (CHead c (Bind b) u) t (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u -x H13 c)))) t2 H12)))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t2 -(THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda -(t3: T).(subst0 (s (Bind b) i) u0 t t3)) (arity g c t2 a2) (\lambda (x: -T).(\lambda (H12: (eq T t2 (THead (Bind b) u x))).(\lambda (H13: (subst0 (s -(Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t0: T).(arity -g c t0 a2)) (arity_bind g b H0 c u a1 H1 x a2 (H4 d1 u0 (S i) -(getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 -(Bind Abbr) u0) i H5) (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c -(Bind b) u) t x H13))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Bind b) i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Bind b) i) u0 t t3))) (arity g c t2 a2) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Bind b) x0 x1))).(\lambda -(H13: (subst0 i u0 u x0)).(\lambda (H14: (subst0 (s (Bind b) i) u0 t -x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: T).(arity g c t0 a2)) -(arity_bind g b H0 c x0 a1 (H2 d1 u0 i H5 c x0 (fsubst0_snd i u0 c u x0 H13)) -x1 a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind -b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x0) x1 (fsubst0_both -(S i) u0 (CHead c (Bind b) u) t x1 H14 (CHead c (Bind b) x0) -(csubst0_snd_bind b i u0 u x0 H13 c)))) t2 H12)))))) H11)) (subst0_gen_head -(Bind b) u0 u t t2 i H10)) c2 H9))) H8)) (\lambda (H8: (land (eq T (THead -(Bind b) u t) t2) (csubst0 i u0 c c2))).(land_ind (eq T (THead (Bind b) u t) -t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (eq T (THead (Bind -b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(eq_ind T (THead (Bind b) u -t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 d1 u0 -i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) t a2 (H4 d1 u0 (S i) -(getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 -(Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) t (fsubst0_fst (S i) u0 (CHead c -(Bind b) u) t (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 u)))) -t2 H9))) H8)) (\lambda (H8: (land (subst0 i u0 (THead (Bind b) u t) t2) -(csubst0 i u0 c c2))).(land_ind (subst0 i u0 (THead (Bind b) u t) t2) -(csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (subst0 i u0 (THead -(Bind b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(or3_ind (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i -u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda -(t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H11: (ex2 -T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 -i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) -(\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) (\lambda (x: -T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 -u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c2 t0 a2)) -(arity_bind g b H0 c2 x a1 (H2 d1 u0 i H5 c2 x (fsubst0_both i u0 c u x H13 -c2 H10)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u -(clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) x) t -(fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c2 (Bind b) x) -(csubst0_both_bind b i u0 u x H13 c c2 H10)))) t2 H12)))) H11)) (\lambda -(H11: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: -T).(subst0 (s (Bind b) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 -(THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)) -(arity g c2 t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) u -x))).(\lambda (H13: (subst0 (s (Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind -b) u x) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 -d1 u0 i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) x a2 (H4 d1 u0 (S i) -(getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 -(Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c -(Bind b) u) t x H13 (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 -u)))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) -i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u -u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) -(arity g c2 t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 -(THead (Bind b) x0 x1))).(\lambda (H13: (subst0 i u0 u x0)).(\lambda (H14: -(subst0 (s (Bind b) i) u0 t x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda -(t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 x0 a1 (H2 d1 u0 i H5 c2 x0 -(fsubst0_both i u0 c u x0 H13 c2 H10)) x1 a2 (H4 d1 u0 (S i) (getl_clear_bind -b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) -(CHead c2 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x1 -H14 (CHead c2 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H13 c c2 H10)))) t2 -H12)))))) H11)) (subst0_gen_head (Bind b) u0 u t t2 i H9)))) H8)) -H7))))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (H0: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (d1: -C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) -\to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g -c2 t2 (asucc g a1))))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: -(arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (d1: -C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c (Bind Abst) u) (CHead -d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 -(CHead c (Bind Abst) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda -(d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 -(Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i -u0 c (THead (Bind Abst) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 -(THead (Bind Abst) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq -C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2)) (land (eq T (THead (Bind -Abst) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Bind Abst) u -t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (H7: (land -(eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2))).(land_ind (eq C c c2) -(subst0 i u0 (THead (Bind Abst) u t) t2) (arity g c2 t2 (AHead a1 a2)) -(\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Bind Abst) u t) -t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 (AHead a1 a2))) (or3_ind -(ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: -T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u -t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))) (arity g c t2 -(AHead a1 a2)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind -Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: -T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) -(arity g c t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead -(Bind Abst) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind -Abst) x t) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x -a1 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 (H3 d1 u0 (S i) -(getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) -(CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x) t (fsubst0_fst (S i) -u0 (CHead c (Bind Abst) u) t (CHead c (Bind Abst) x) (csubst0_snd_bind Abst i -u0 u x H12 c)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq -T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 -t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) -(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c t2 (AHead a1 -a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u -x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead -(Bind Abst) u x) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g -c u a1 H0 x a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) -c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind -Abst) u) x (fsubst0_snd (S i) u0 (CHead c (Bind Abst) u) t x H12))) t2 -H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i -u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity -g c t2 (AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T -t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda -(H13: (subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 -x1) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x0 a1 (H1 -d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 (S i) -(getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) -(CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x0) x1 (fsubst0_both (S -i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c (Bind Abst) x0) -(csubst0_snd_bind Abst i u0 u x0 H12 c)))) t2 H11)))))) H10)) -(subst0_gen_head (Bind Abst) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: -(land (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2))).(land_ind (eq T -(THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 (AHead a1 a2)) -(\lambda (H8: (eq T (THead (Bind Abst) u t) t2)).(\lambda (H9: (csubst0 i u0 -c c2)).(eq_ind T (THead (Bind Abst) u t) (\lambda (t0: T).(arity g c2 t0 -(AHead a1 a2))) (arity_head g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c -u c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) -c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind -Abst) u) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c2 (Bind -Abst) u) (csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H8))) H7)) (\lambda -(H7: (land (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c -c2))).(land_ind (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) -(arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (subst0 i u0 (THead (Bind Abst) u -t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: -T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) -(ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: -T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind -Abst) i) u0 t t3)))) (arity g c2 t2 (AHead a1 a2)) (\lambda (H10: (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 -i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) -(\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 (AHead a1 a2)) (\lambda -(x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x t))).(\lambda (H12: -(subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) (\lambda (t0: -T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x a1 (H1 d1 u0 i H4 c2 x -(fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind -Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) -u0) i H4) (CHead c2 (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind -Abst) u) t (CHead c2 (Bind Abst) x) (csubst0_both_bind Abst i u0 u x H12 c c2 -H9)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 -(THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) -(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c2 t2 (AHead a1 -a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u -x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead -(Bind Abst) u x) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head -g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 (S -i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) -(CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) u) x (fsubst0_both (S -i) u0 (CHead c (Bind Abst) u) t x H12 (CHead c2 (Bind Abst) u) -(csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H11)))) H10)) (\lambda (H10: -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity g c2 t2 -(AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 -(THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: -(subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) -(\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x0 a1 (H1 d1 -u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 (S i) -(getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) -(CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) x0) x1 (fsubst0_both (S -i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c2 (Bind Abst) x0) -(csubst0_both_bind Abst i u0 u x0 H12 c c2 H9)))) t2 H11)))))) H10)) -(subst0_gen_head (Bind Abst) u0 u t t2 i H8)))) H7)) H6))))))))))))))))))) -(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u -a1)).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: -nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: -T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: -T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: -((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 -(Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c t c2 -t2) \to (arity g c2 t2 (AHead a1 a2))))))))))).(\lambda (d1: C).(\lambda (u0: -T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) -u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead -(Flat Appl) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Flat -Appl) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq C c c2) -(subst0 i u0 (THead (Flat Appl) u t) t2)) (land (eq T (THead (Flat Appl) u t) -t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Appl) u t) t2) -(csubst0 i u0 c c2)) (arity g c2 t2 a2) (\lambda (H7: (land (eq C c c2) -(subst0 i u0 (THead (Flat Appl) u t) t2))).(land_ind (eq C c c2) (subst0 i u0 -(THead (Flat Appl) u t) t2) (arity g c2 t2 a2) (\lambda (H8: (eq C c -c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Appl) u t) t2)).(eq_ind C c -(\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T (\lambda (u2: T).(eq T -t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T -(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 -(s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i -u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t -t3)))) (arity g c t2 a2) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 -(THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T -(\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 -i u0 u u2)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead -(Flat Appl) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat -Appl) x t) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x a1 (H1 d1 u0 -i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 H2) t2 H11)))) H10)) (\lambda -(H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda -(t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq -T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 -t t3)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat -Appl) u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T -(THead (Flat Appl) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c u -a1 H0 x a2 (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) -(\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity -g c t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead -(Flat Appl) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: -(subst0 (s (Flat Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) -(\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x0 a1 (H1 d1 u0 i H4 c x0 -(fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c -t x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Appl) u0 u t t2 i H9)) -c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Appl) u t) t2) (csubst0 -i u0 c c2))).(land_ind (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2) -(arity g c2 t2 a2) (\lambda (H8: (eq T (THead (Flat Appl) u t) t2)).(\lambda -(H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Appl) u t) (\lambda (t0: -T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst -i u0 c u c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 -H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Appl) u t) t2) -(csubst0 i u0 c c2))).(land_ind (subst0 i u0 (THead (Flat Appl) u t) t2) -(csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H8: (subst0 i u0 (THead -(Flat Appl) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 -i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) -(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Appl) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H10: -(ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: -T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat -Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) -(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x t))).(\lambda -(H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Appl) x t) (\lambda (t0: -T).(arity g c2 t0 a2)) (arity_appl g c2 x a1 (H1 d1 u0 i H4 c2 x -(fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i -u0 c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T -t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) -(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)) (arity g c2 t2 a2) -(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) u x))).(\lambda -(H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T (THead (Flat Appl) u x) -(\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 -u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c -t x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Appl) i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity g c2 t2 a2) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 -x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat -Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t0: -T).(arity g c2 t0 a2)) (arity_appl g c2 x0 a1 (H1 d1 u0 i H4 c2 x0 -(fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 i H4 c2 x1 -(fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head -(Flat Appl) u0 u t t2 i H8)))) H7)) H6))))))))))))))))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (a0: A).(\lambda (H0: (arity g c u (asucc g -a0))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: -nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: -T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 (asucc g -a0))))))))))).(\lambda (t: T).(\lambda (H2: (arity g c t a0)).(\lambda (H3: -((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 -(Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c t c2 -t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: -T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) -u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead -(Flat Cast) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Flat -Cast) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq C c c2) -(subst0 i u0 (THead (Flat Cast) u t) t2)) (land (eq T (THead (Flat Cast) u t) -t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Cast) u t) t2) -(csubst0 i u0 c c2)) (arity g c2 t2 a0) (\lambda (H7: (land (eq C c c2) -(subst0 i u0 (THead (Flat Cast) u t) t2))).(land_ind (eq C c c2) (subst0 i u0 -(THead (Flat Cast) u t) t2) (arity g c2 t2 a0) (\lambda (H8: (eq C c -c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Cast) u t) t2)).(eq_ind C c -(\lambda (c0: C).(arity g c0 t2 a0)) (or3_ind (ex2 T (\lambda (u2: T).(eq T -t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T -(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 -(s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i -u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t -t3)))) (arity g c t2 a0) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 -(THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T -(\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 -i u0 u u2)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead -(Flat Cast) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat -Cast) x t) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x a0 (H1 d1 u0 -i H4 c x (fsubst0_snd i u0 c u x H12)) t H2) t2 H11)))) H10)) (\lambda (H10: -(ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: -T).(subst0 (s (Flat Cast) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 -(THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t -t3)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat -Cast) u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T -(THead (Flat Cast) u x) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c u -a0 H0 x (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) -(\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity -g c t2 a0) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead -(Flat Cast) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: -(subst0 (s (Flat Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) -(\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x0 a0 (H1 d1 u0 i H4 c x0 -(fsubst0_snd i u0 c u x0 H12)) x1 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c t -x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t t2 i H9)) c2 -H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Cast) u t) t2) (csubst0 i -u0 c c2))).(land_ind (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2) -(arity g c2 t2 a0) (\lambda (H8: (eq T (THead (Flat Cast) u t) t2)).(\lambda -(H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Cast) u t) (\lambda (t0: -T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 u (fsubst0_fst -i u0 c u c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 -H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Cast) u t) t2) -(csubst0 i u0 c c2))).(land_ind (subst0 i u0 (THead (Flat Cast) u t) t2) -(csubst0 i u0 c c2) (arity g c2 t2 a0) (\lambda (H8: (subst0 i u0 (THead -(Flat Cast) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 -i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) -(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Cast) i) u0 t t3)))) (arity g c2 t2 a0) (\lambda (H10: -(ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: -T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat -Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a0) -(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x t))).(\lambda -(H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Cast) x t) (\lambda (t0: -T).(arity g c2 t0 a0)) (arity_cast g c2 x a0 (H1 d1 u0 i H4 c2 x -(fsubst0_both i u0 c u x H12 c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 -c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 -(THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) -(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)) (arity g c2 t2 a0) -(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) u x))).(\lambda -(H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T (THead (Flat Cast) u x) -(\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 -u (fsubst0_fst i u0 c u c2 H9)) x (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c t -x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Cast) i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity g c2 t2 a0) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x0 -x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat -Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: -T).(arity g c2 t0 a0)) (arity_cast g c2 x0 a0 (H1 d1 u0 i H4 c2 x0 -(fsubst0_both i u0 c u x0 H12 c2 H9)) x1 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i -u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t -t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: C).(\lambda (t: -T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall -(d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) -u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity -g c2 t2 a1)))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda -(d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c (CHead d1 -(Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u -c t c2 t2)).(let H_x \def (fsubst0_gen_base c c2 t t2 u i H4) in (let H5 \def -H_x in (or3_ind (land (eq C c c2) (subst0 i u t t2)) (land (eq T t t2) -(csubst0 i u c c2)) (land (subst0 i u t t2) (csubst0 i u c c2)) (arity g c2 -t2 a2) (\lambda (H6: (land (eq C c c2) (subst0 i u t t2))).(land_ind (eq C c -c2) (subst0 i u t t2) (arity g c2 t2 a2) (\lambda (H7: (eq C c c2)).(\lambda -(H8: (subst0 i u t t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) -(arity_repl g c t2 a1 (H1 d1 u i H3 c t2 (fsubst0_snd i u c t t2 H8)) a2 H2) -c2 H7))) H6)) (\lambda (H6: (land (eq T t t2) (csubst0 i u c c2))).(land_ind -(eq T t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (eq T t -t2)).(\lambda (H8: (csubst0 i u c c2)).(eq_ind T t (\lambda (t0: T).(arity g -c2 t0 a2)) (arity_repl g c2 t a1 (H1 d1 u i H3 c2 t (fsubst0_fst i u c t c2 -H8)) a2 H2) t2 H7))) H6)) (\lambda (H6: (land (subst0 i u t t2) (csubst0 i u -c c2))).(land_ind (subst0 i u t t2) (csubst0 i u c c2) (arity g c2 t2 a2) -(\lambda (H7: (subst0 i u t t2)).(\lambda (H8: (csubst0 i u c -c2)).(arity_repl g c2 t2 a1 (H1 d1 u i H3 c2 t2 (fsubst0_both i u c t t2 H7 -c2 H8)) a2 H2))) H6)) H5))))))))))))))))) c1 t1 a H))))). - -lemma arity_subst0: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (a: A).((arity g c -t1 a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead -d (Bind Abbr) u)) \to (\forall (t2: T).((subst0 i u t1 t2) \to (arity g c t2 -a))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (a: A).(\lambda (H: -(arity g c t1 a)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (H1: -(subst0 i u t1 t2)).(arity_fsubst0 g c t1 a H d u i H0 c t2 (fsubst0_snd i u -c t1 t2 H1)))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/asucc/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/asucc/defs.ma deleted file mode 100644 index 520f8e375..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/asucc/defs.ma +++ /dev/null @@ -1,25 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/A/defs.ma". - -include "basic_1/G/defs.ma". - -rec definition asucc (g: G) (l: A) on l: A \def match l with [(ASort n0 n) -\Rightarrow (match n0 with [O \Rightarrow (ASort O (next g n)) | (S h) -\Rightarrow (ASort h n)]) | (AHead a1 a2) \Rightarrow (AHead a1 (asucc g -a2))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/asucc/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/asucc/fwd.ma deleted file mode 100644 index e2edc783c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/asucc/fwd.ma +++ /dev/null @@ -1,92 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/asucc/defs.ma". - -include "basic_1/A/fwd.ma". - -lemma asucc_gen_sort: - \forall (g: G).(\forall (h: nat).(\forall (n: nat).(\forall (a: A).((eq A -(ASort h n) (asucc g a)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: -nat).(eq A a (ASort h0 n0))))))))) -\def - \lambda (g: G).(\lambda (h: nat).(\lambda (n: nat).(\lambda (a: A).(A_ind -(\lambda (a0: A).((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat nat (\lambda -(h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0))))))) (\lambda (n0: -nat).(\lambda (n1: nat).(\lambda (H: (eq A (ASort h n) (asucc g (ASort n0 -n1)))).(let H0 \def (f_equal A A (\lambda (e: A).e) (ASort h n) (match n0 -with [O \Rightarrow (ASort O (next g n1)) | (S h0) \Rightarrow (ASort h0 -n1)]) H) in (ex_2_intro nat nat (\lambda (h0: nat).(\lambda (n2: nat).(eq A -(ASort n0 n1) (ASort h0 n2)))) n0 n1 (refl_equal A (ASort n0 n1))))))) -(\lambda (a0: A).(\lambda (_: (((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat -nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 -n0)))))))).(\lambda (a1: A).(\lambda (_: (((eq A (ASort h n) (asucc g a1)) -\to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a1 (ASort h0 -n0)))))))).(\lambda (H1: (eq A (ASort h n) (asucc g (AHead a0 a1)))).(let H2 -\def (eq_ind A (ASort h n) (\lambda (ee: A).(match ee with [(ASort _ _) -\Rightarrow True | (AHead _ _) \Rightarrow False])) I (asucc g (AHead a0 a1)) -H1) in (False_ind (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A -(AHead a0 a1) (ASort h0 n0))))) H2))))))) a)))). - -lemma asucc_gen_head: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a: A).((eq A -(AHead a1 a2) (asucc g a)) \to (ex2 A (\lambda (a0: A).(eq A a (AHead a1 -a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(A_ind -(\lambda (a0: A).((eq A (AHead a1 a2) (asucc g a0)) \to (ex2 A (\lambda (a3: -A).(eq A a0 (AHead a1 a3))) (\lambda (a3: A).(eq A a2 (asucc g a3)))))) -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (H: (eq A (AHead a1 a2) (asucc -g (ASort n n0)))).(nat_ind (\lambda (n1: nat).((eq A (AHead a1 a2) (asucc g -(ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 -a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))) (\lambda (H0: (eq A (AHead -a1 a2) (asucc g (ASort O n0)))).(let H1 \def (eq_ind A (AHead a1 a2) (\lambda -(ee: A).(match ee with [(ASort _ _) \Rightarrow False | (AHead _ _) -\Rightarrow True])) I (ASort O (next g n0)) H0) in (False_ind (ex2 A (\lambda -(a0: A).(eq A (ASort O n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g -a0)))) H1))) (\lambda (n1: nat).(\lambda (_: (((eq A (AHead a1 a2) (asucc g -(ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 -a0))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (H0: (eq A (AHead -a1 a2) (asucc g (ASort (S n1) n0)))).(let H1 \def (eq_ind A (AHead a1 a2) -(\lambda (ee: A).(match ee with [(ASort _ _) \Rightarrow False | (AHead _ _) -\Rightarrow True])) I (ASort n1 n0) H0) in (False_ind (ex2 A (\lambda (a0: -A).(eq A (ASort (S n1) n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g -a0)))) H1))))) n H)))) (\lambda (a0: A).(\lambda (H: (((eq A (AHead a1 a2) -(asucc g a0)) \to (ex2 A (\lambda (a3: A).(eq A a0 (AHead a1 a3))) (\lambda -(a3: A).(eq A a2 (asucc g a3))))))).(\lambda (a3: A).(\lambda (H0: (((eq A -(AHead a1 a2) (asucc g a3)) \to (ex2 A (\lambda (a4: A).(eq A a3 (AHead a1 -a4))) (\lambda (a4: A).(eq A a2 (asucc g a4))))))).(\lambda (H1: (eq A (AHead -a1 a2) (asucc g (AHead a0 a3)))).(let H2 \def (f_equal A A (\lambda (e: -A).(match e with [(ASort _ _) \Rightarrow a1 | (AHead a4 _) \Rightarrow a4])) -(AHead a1 a2) (AHead a0 (asucc g a3)) H1) in ((let H3 \def (f_equal A A -(\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a2 | (AHead _ a4) -\Rightarrow a4])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in (\lambda (H4: -(eq A a1 a0)).(let H5 \def (eq_ind_r A a0 (\lambda (a4: A).((eq A (AHead a1 -a2) (asucc g a4)) \to (ex2 A (\lambda (a5: A).(eq A a4 (AHead a1 a5))) -(\lambda (a5: A).(eq A a2 (asucc g a5)))))) H a1 H4) in (eq_ind A a1 (\lambda -(a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a4 a3) (AHead a1 a5))) (\lambda -(a5: A).(eq A a2 (asucc g a5))))) (let H6 \def (eq_ind A a2 (\lambda (a4: -A).((eq A (AHead a1 a4) (asucc g a3)) \to (ex2 A (\lambda (a5: A).(eq A a3 -(AHead a1 a5))) (\lambda (a5: A).(eq A a4 (asucc g a5)))))) H0 (asucc g a3) -H3) in (let H7 \def (eq_ind A a2 (\lambda (a4: A).((eq A (AHead a1 a4) (asucc -g a1)) \to (ex2 A (\lambda (a5: A).(eq A a1 (AHead a1 a5))) (\lambda (a5: -A).(eq A a4 (asucc g a5)))))) H5 (asucc g a3) H3) in (eq_ind_r A (asucc g a3) -(\lambda (a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a1 a3) (AHead a1 a5))) -(\lambda (a5: A).(eq A a4 (asucc g a5))))) (ex_intro2 A (\lambda (a4: A).(eq -A (AHead a1 a3) (AHead a1 a4))) (\lambda (a4: A).(eq A (asucc g a3) (asucc g -a4))) a3 (refl_equal A (AHead a1 a3)) (refl_equal A (asucc g a3))) a2 H3))) -a0 H4)))) H2))))))) a)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/cimp/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/cimp/defs.ma deleted file mode 100644 index 5d53fcf57..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/cimp/defs.ma +++ /dev/null @@ -1,25 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/defs.ma". - -definition cimp: - C \to (C \to Prop) -\def - \lambda (c1: C).(\lambda (c2: C).(\forall (b: B).(\forall (d1: C).(\forall -(w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to (ex C -(\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/cimp/props.ma b/matita/matita/contribs/lambdadelta/basic_1/cimp/props.ma deleted file mode 100644 index d26ec1381..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/cimp/props.ma +++ /dev/null @@ -1,125 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/cimp/defs.ma". - -include "basic_1/getl/getl.ma". - -lemma cimp_flat_sx: - \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp (CHead c (Flat f) v) -c))) -\def - \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: -C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h (CHead c (Flat f) -v) (CHead d1 (Bind b) w))).(nat_ind (\lambda (n: nat).((getl n (CHead c (Flat -f) v) (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl n c (CHead d2 -(Bind b) w)))))) (\lambda (H0: (getl O (CHead c (Flat f) v) (CHead d1 (Bind -b) w))).(ex_intro C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) w))) d1 -(getl_intro O c (CHead d1 (Bind b) w) c (drop_refl c) (clear_gen_flat f c -(CHead d1 (Bind b) w) v (getl_gen_O (CHead c (Flat f) v) (CHead d1 (Bind b) -w) H0))))) (\lambda (h0: nat).(\lambda (_: (((getl h0 (CHead c (Flat f) v) -(CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h0 c (CHead d2 (Bind -b) w))))))).(\lambda (H0: (getl (S h0) (CHead c (Flat f) v) (CHead d1 (Bind -b) w))).(ex_intro C (\lambda (d2: C).(getl (S h0) c (CHead d2 (Bind b) w))) -d1 (getl_gen_S (Flat f) c (CHead d1 (Bind b) w) v h0 H0))))) h H)))))))). - -lemma cimp_flat_dx: - \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp c (CHead c (Flat f) -v)))) -\def - \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: -C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h c (CHead d1 (Bind -b) w))).(ex_intro C (\lambda (d2: C).(getl h (CHead c (Flat f) v) (CHead d2 -(Bind b) w))) d1 (getl_flat c (CHead d1 (Bind b) w) h H f v))))))))). - -lemma cimp_bind: - \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall -(v: T).(cimp (CHead c1 (Bind b) v) (CHead c2 (Bind b) v)))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: ((\forall (b: B).(\forall (d1: -C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to -(ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda -(b: B).(\lambda (v: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (w: -T).(\lambda (h: nat).(\lambda (H0: (getl h (CHead c1 (Bind b) v) (CHead d1 -(Bind b0) w))).(nat_ind (\lambda (n: nat).((getl n (CHead c1 (Bind b) v) -(CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl n (CHead c2 (Bind b) -v) (CHead d2 (Bind b0) w)))))) (\lambda (H1: (getl O (CHead c1 (Bind b) v) -(CHead d1 (Bind b0) w))).(let H2 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 -(Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) -w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let -H3 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 -| (CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat -_) \Rightarrow b0])])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) -(clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) -v) (CHead d1 (Bind b0) w) H1))) in ((let H4 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) -(CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 -(Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) -in (\lambda (H5: (eq B b0 b)).(\lambda (_: (eq C d1 c1)).(eq_ind_r T v -(\lambda (t: T).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead -d2 (Bind b0) t))))) (eq_ind_r B b (\lambda (b1: B).(ex C (\lambda (d2: -C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b1) v))))) (ex_intro C -(\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b) v))) c2 -(getl_refl b c2 v)) b0 H5) w H4)))) H3)) H2))) (\lambda (h0: nat).(\lambda -(_: (((getl h0 (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w)) \to (ex C -(\lambda (d2: C).(getl h0 (CHead c2 (Bind b) v) (CHead d2 (Bind b0) -w))))))).(\lambda (H1: (getl (S h0) (CHead c1 (Bind b) v) (CHead d1 (Bind b0) -w))).(let H_x \def (H b0 d1 w (r (Bind b) h0) (getl_gen_S (Bind b) c1 (CHead -d1 (Bind b0) w) v h0 H1)) in (let H2 \def H_x in (ex_ind C (\lambda (d2: -C).(getl h0 c2 (CHead d2 (Bind b0) w))) (ex C (\lambda (d2: C).(getl (S h0) -(CHead c2 (Bind b) v) (CHead d2 (Bind b0) w)))) (\lambda (x: C).(\lambda (H3: -(getl h0 c2 (CHead x (Bind b0) w))).(ex_intro C (\lambda (d2: C).(getl (S h0) -(CHead c2 (Bind b) v) (CHead d2 (Bind b0) w))) x (getl_head (Bind b) h0 c2 -(CHead x (Bind b0) w) H3 v)))) H2)))))) h H0)))))))))). - -lemma cimp_getl_conf: - \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall -(d1: C).(\forall (w: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind b) w)) -\to (ex2 C (\lambda (d2: C).(cimp d1 d2)) (\lambda (d2: C).(getl i c2 (CHead -d2 (Bind b) w))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: ((\forall (b: B).(\forall (d1: -C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to -(ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda -(b: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (i: nat).(\lambda (H0: (getl -i c1 (CHead d1 (Bind b) w))).(let H_x \def (H b d1 w i H0) in (let H1 \def -H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind b) w))) (ex2 C -(\lambda (d2: C).(\forall (b0: B).(\forall (d3: C).(\forall (w0: T).(\forall -(h: nat).((getl h d1 (CHead d3 (Bind b0) w0)) \to (ex C (\lambda (d4: -C).(getl h d2 (CHead d4 (Bind b0) w0)))))))))) (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind b) w)))) (\lambda (x: C).(\lambda (H2: (getl i c2 (CHead x -(Bind b) w))).(ex_intro2 C (\lambda (d2: C).(\forall (b0: B).(\forall (d3: -C).(\forall (w0: T).(\forall (h: nat).((getl h d1 (CHead d3 (Bind b0) w0)) -\to (ex C (\lambda (d4: C).(getl h d2 (CHead d4 (Bind b0) w0)))))))))) -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind b) w))) x (\lambda (b0: -B).(\lambda (d0: C).(\lambda (w0: T).(\lambda (h: nat).(\lambda (H3: (getl h -d1 (CHead d0 (Bind b0) w0))).(let H_y \def (getl_trans (S h) c1 (CHead d1 -(Bind b) w) i H0) in (let H_x0 \def (H b0 d0 w0 (plus (S h) i) (H_y (CHead d0 -(Bind b0) w0) (getl_head (Bind b) h d1 (CHead d0 (Bind b0) w0) H3 w))) in -(let H4 \def H_x0 in (ex_ind C (\lambda (d2: C).(getl (S (plus h i)) c2 -(CHead d2 (Bind b0) w0))) (ex C (\lambda (d2: C).(getl h x (CHead d2 (Bind -b0) w0)))) (\lambda (x0: C).(\lambda (H5: (getl (S (plus h i)) c2 (CHead x0 -(Bind b0) w0))).(let H_y0 \def (getl_conf_le (S (plus h i)) (CHead x0 (Bind -b0) w0) c2 H5 (CHead x (Bind b) w) i H2) in (let H6 \def (refl_equal nat -(plus (S h) i)) in (let H7 \def (eq_ind nat (S (plus h i)) (\lambda (n: -nat).(getl (minus n i) (CHead x (Bind b) w) (CHead x0 (Bind b0) w0))) (H_y0 -(le_S i (plus h i) (le_plus_r h i))) (plus (S h) i) H6) in (let H8 \def -(eq_ind nat (minus (plus (S h) i) i) (\lambda (n: nat).(getl n (CHead x (Bind -b) w) (CHead x0 (Bind b0) w0))) H7 (S h) (minus_plus_r (S h) i)) in (ex_intro -C (\lambda (d2: C).(getl h x (CHead d2 (Bind b0) w0))) x0 (getl_gen_S (Bind -b) x (CHead x0 (Bind b0) w0) w h H8)))))))) H4))))))))) H2))) H1)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/clear/defs.ma deleted file mode 100644 index 5428dde7d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/defs.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -inductive clear: C \to (C \to Prop) \def -| clear_bind: \forall (b: B).(\forall (e: C).(\forall (u: T).(clear (CHead e -(Bind b) u) (CHead e (Bind b) u)))) -| clear_flat: \forall (e: C).(\forall (c: C).((clear e c) \to (\forall (f: -F).(\forall (u: T).(clear (CHead e (Flat f) u) c))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/drop.ma b/matita/matita/contribs/lambdadelta/basic_1/clear/drop.ma deleted file mode 100644 index 4383e2650..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/drop.ma +++ /dev/null @@ -1,168 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/clear/fwd.ma". - -include "basic_1/drop/fwd.ma". - -lemma drop_clear: - \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c1 c2) \to -(ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c1 (CHead -e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e -c2)))))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (i: -nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: -C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda -(e: C).(\lambda (_: T).(drop i O e c2))))))))) (\lambda (n: nat).(\lambda -(c2: C).(\lambda (i: nat).(\lambda (H: (drop (S i) O (CSort n) c2)).(and3_ind -(eq C c2 (CSort n)) (eq nat (S i) O) (eq nat O O) (ex2_3 B C T (\lambda (b: -B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) -(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda -(_: (eq C c2 (CSort n))).(\lambda (H1: (eq nat (S i) O)).(\lambda (_: (eq nat -O O)).(let H3 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (ex2_3 B -C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e -(Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e -c2))))) H3))))) (drop_gen_sort n (S i) O c2 H)))))) (\lambda (c: C).(\lambda -(H: ((\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T -(\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) -v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e -c2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (i: -nat).(\lambda (H0: (drop (S i) O (CHead c k t) c2)).(K_ind (\lambda (k0: -K).((drop (r k0 i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: -C).(\lambda (v: T).(clear (CHead c k0 t) (CHead e (Bind b) v))))) (\lambda -(_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))))) (\lambda (b: -B).(\lambda (H1: (drop (r (Bind b) i) O c c2)).(ex2_3_intro B C T (\lambda -(b0: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Bind b) t) (CHead e -(Bind b0) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e -c2)))) b c t (clear_bind b c t) H1))) (\lambda (f: F).(\lambda (H1: (drop (r -(Flat f) i) O c c2)).(let H2 \def (H c2 i H1) in (ex2_3_ind B C T (\lambda -(b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) -(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) (ex2_3 B C -T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) -(CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: -T).(drop i O e c2))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (H3: (clear c (CHead x1 (Bind x0) x2))).(\lambda (H4: (drop i O -x1 c2)).(ex2_3_intro B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: -T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: -B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) x0 x1 x2 (clear_flat c -(CHead x1 (Bind x0) x2) H3 f t) H4)))))) H2)))) k (drop_gen_drop k c c2 t i -H0))))))))) c1). - -lemma drop_clear_O: - \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (u: T).((clear c -(CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 -e2) \to (drop (S i) O c e2)))))))) -\def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: -C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: -C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2)))))))) -(\lambda (n: nat).(\lambda (e1: C).(\lambda (u: T).(\lambda (H: (clear (CSort -n) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (_: -(drop i O e1 e2)).(clear_gen_sort (CHead e1 (Bind b) u) n H (drop (S i) O -(CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: -C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: -C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 -e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (u: -T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) u))).(\lambda (e2: -C).(\lambda (i: nat).(\lambda (H1: (drop i O e1 e2)).(K_ind (\lambda (k0: -K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) u)) \to (drop (S i) O (CHead c0 -k0 t) e2))) (\lambda (b0: B).(\lambda (H2: (clear (CHead c0 (Bind b0) t) -(CHead e1 (Bind b) u))).(let H3 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow e1 | (CHead c1 _ _) \Rightarrow c1])) (CHead e1 -(Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) -u) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e with [(CSort -_) \Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) u) (CHead c0 -(Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H5 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t0) \Rightarrow t0])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) -(clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in (\lambda (H6: (eq B b -b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c1: -C).(drop i O c1 e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(drop (S i) O -(CHead c0 (Bind b1) t) e2)) (drop_drop (Bind b) i c0 e2 H8 t) b0 H6))))) H4)) -H3)))) (\lambda (f: F).(\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 -(Bind b) u))).(drop_drop (Flat f) i c0 e2 (H e1 u (clear_gen_flat f c0 (CHead -e1 (Bind b) u) t H2) e2 i H1) t))) k H0))))))))))) c)). - -lemma drop_clear_S: - \forall (x2: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop -h (S d) x1 x2) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear -x2 (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 -(Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))) -\def - \lambda (x2: C).(C_ind (\lambda (c: C).(\forall (x1: C).(\forall (h: -nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: -C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: -C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 -c2)))))))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (_: (drop h (S d) x1 (CSort n))).(\lambda (b: B).(\lambda -(c2: C).(\lambda (u: T).(\lambda (H0: (clear (CSort n) (CHead c2 (Bind b) -u))).(clear_gen_sort (CHead c2 (Bind b) u) n H0 (ex2 C (\lambda (c1: -C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 -c2))))))))))))) (\lambda (c: C).(\lambda (H: ((\forall (x1: C).(\forall (h: -nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: -C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: -C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 -c2))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H0: (drop h (S d) x1 (CHead c k -t))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H1: (clear -(CHead c k t) (CHead c2 (Bind b) u))).(ex2_ind C (\lambda (e: C).(eq C x1 -(CHead e k (lift h (r k d) t)))) (\lambda (e: C).(drop h (r k d) e c)) (ex2 C -(\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: -C).(drop h d c1 c2))) (\lambda (x: C).(\lambda (H2: (eq C x1 (CHead x k (lift -h (r k d) t)))).(\lambda (H3: (drop h (r k d) x c)).(eq_ind_r C (CHead x k -(lift h (r k d) t)) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear c0 (CHead -c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))) (K_ind -(\lambda (k0: K).((clear (CHead c k0 t) (CHead c2 (Bind b) u)) \to ((drop h -(r k0 d) x c) \to (ex2 C (\lambda (c1: C).(clear (CHead x k0 (lift h (r k0 d) -t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))) -(\lambda (b0: B).(\lambda (H4: (clear (CHead c (Bind b0) t) (CHead c2 (Bind -b) u))).(\lambda (H5: (drop h (r (Bind b0) d) x c)).(let H6 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) -\Rightarrow c0])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind -b0 c (CHead c2 (Bind b) u) t H4)) in ((let H7 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow b | (CHead _ k0 _) \Rightarrow (match -k0 with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead c2 -(Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) -t H4)) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u) (CHead -c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in (\lambda -(H9: (eq B b b0)).(\lambda (H10: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: -T).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) -t)) (CHead c1 (Bind b) (lift h d t0)))) (\lambda (c1: C).(drop h d c1 c2)))) -(eq_ind_r C c (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind -b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t)))) (\lambda -(c1: C).(drop h d c1 c0)))) (eq_ind_r B b0 (\lambda (b1: B).(ex2 C (\lambda -(c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind -b1) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)))) (ex_intro2 C (\lambda -(c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind -b0) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)) x (clear_bind b0 x -(lift h d t)) H5) b H9) c2 H10) u H8)))) H7)) H6))))) (\lambda (f: -F).(\lambda (H4: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u))).(\lambda -(H5: (drop h (r (Flat f) d) x c)).(let H6 \def (H x h d H5 b c2 u -(clear_gen_flat f c (CHead c2 (Bind b) u) t H4)) in (ex2_ind C (\lambda (c1: -C).(clear x (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 -c2)) (ex2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) -t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) -(\lambda (x0: C).(\lambda (H7: (clear x (CHead x0 (Bind b) (lift h d -u)))).(\lambda (H8: (drop h d x0 c2)).(ex_intro2 C (\lambda (c1: C).(clear -(CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d -u)))) (\lambda (c1: C).(drop h d c1 c2)) x0 (clear_flat x (CHead x0 (Bind b) -(lift h d u)) H7 f (lift h (r (Flat f) d) t)) H8)))) H6))))) k H1 H3) x1 -H2)))) (drop_gen_skip_r c x1 t h d k H0)))))))))))))) x2). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/clear/fwd.ma deleted file mode 100644 index 1b05b45a8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/fwd.ma +++ /dev/null @@ -1,192 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/clear/defs.ma". - -include "basic_1/C/fwd.ma". - -implied rec lemma clear_ind (P: (C \to (C \to Prop))) (f: (\forall (b: -B).(\forall (e: C).(\forall (u: T).(P (CHead e (Bind b) u) (CHead e (Bind b) -u)))))) (f0: (\forall (e: C).(\forall (c: C).((clear e c) \to ((P e c) \to -(\forall (f0: F).(\forall (u: T).(P (CHead e (Flat f0) u) c)))))))) (c: C) -(c0: C) (c1: clear c c0) on c1: P c c0 \def match c1 with [(clear_bind b e u) -\Rightarrow (f b e u) | (clear_flat e c2 c3 f1 u) \Rightarrow (f0 e c2 c3 -((clear_ind P f f0) e c2 c3) f1 u)]. - -lemma clear_gen_sort: - \forall (x: C).(\forall (n: nat).((clear (CSort n) x) \to (\forall (P: -Prop).P))) -\def - \lambda (x: C).(\lambda (n: nat).(\lambda (H: (clear (CSort n) x)).(\lambda -(P: Prop).(insert_eq C (CSort n) (\lambda (c: C).(clear c x)) (\lambda (_: -C).P) (\lambda (y: C).(\lambda (H0: (clear y x)).(clear_ind (\lambda (c: -C).(\lambda (_: C).((eq C c (CSort n)) \to P))) (\lambda (b: B).(\lambda (e: -C).(\lambda (u: T).(\lambda (H1: (eq C (CHead e (Bind b) u) (CSort n))).(let -H2 \def (eq_ind C (CHead e (Bind b) u) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) -H1) in (False_ind P H2)))))) (\lambda (e: C).(\lambda (c: C).(\lambda (_: -(clear e c)).(\lambda (_: (((eq C e (CSort n)) \to P))).(\lambda (f: -F).(\lambda (u: T).(\lambda (H3: (eq C (CHead e (Flat f) u) (CSort n))).(let -H4 \def (eq_ind C (CHead e (Flat f) u) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) -H3) in (False_ind P H4))))))))) y x H0))) H)))). - -lemma clear_gen_bind: - \forall (b: B).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear -(CHead e (Bind b) u) x) \to (eq C x (CHead e (Bind b) u)))))) -\def - \lambda (b: B).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: -(clear (CHead e (Bind b) u) x)).(insert_eq C (CHead e (Bind b) u) (\lambda -(c: C).(clear c x)) (\lambda (c: C).(eq C x c)) (\lambda (y: C).(\lambda (H0: -(clear y x)).(clear_ind (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e -(Bind b) u)) \to (eq C c0 c)))) (\lambda (b0: B).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b0) u0) (CHead e (Bind b) -u))).(let H2 \def (f_equal C C (\lambda (e1: C).(match e1 with [(CSort _) -\Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Bind b0) u0) -(CHead e (Bind b) u) H1) in ((let H3 \def (f_equal C B (\lambda (e1: -C).(match e1 with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow -(match k with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (CHead -e0 (Bind b0) u0) (CHead e (Bind b) u) H1) in ((let H4 \def (f_equal C T -(\lambda (e1: C).(match e1 with [(CSort _) \Rightarrow u0 | (CHead _ _ t) -\Rightarrow t])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H1) in (\lambda -(H5: (eq B b0 b)).(\lambda (H6: (eq C e0 e)).(eq_ind_r T u (\lambda (t: -T).(eq C (CHead e0 (Bind b0) t) (CHead e0 (Bind b0) t))) (eq_ind_r C e -(\lambda (c: C).(eq C (CHead c (Bind b0) u) (CHead c (Bind b0) u))) (eq_ind_r -B b (\lambda (b1: B).(eq C (CHead e (Bind b1) u) (CHead e (Bind b1) u))) -(refl_equal C (CHead e (Bind b) u)) b0 H5) e0 H6) u0 H4)))) H3)) H2)))))) -(\lambda (e0: C).(\lambda (c: C).(\lambda (_: (clear e0 c)).(\lambda (_: -(((eq C e0 (CHead e (Bind b) u)) \to (eq C c e0)))).(\lambda (f: F).(\lambda -(u0: T).(\lambda (H3: (eq C (CHead e0 (Flat f) u0) (CHead e (Bind b) -u))).(let H4 \def (eq_ind C (CHead e0 (Flat f) u0) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead e (Bind -b) u) H3) in (False_ind (eq C c (CHead e0 (Flat f) u0)) H4))))))))) y x H0))) -H))))). - -lemma clear_gen_flat: - \forall (f: F).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear -(CHead e (Flat f) u) x) \to (clear e x))))) -\def - \lambda (f: F).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: -(clear (CHead e (Flat f) u) x)).(insert_eq C (CHead e (Flat f) u) (\lambda -(c: C).(clear c x)) (\lambda (_: C).(clear e x)) (\lambda (y: C).(\lambda -(H0: (clear y x)).(clear_ind (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead -e (Flat f) u)) \to (clear e c0)))) (\lambda (b: B).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) -u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with -[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat -f) u) H1) in (False_ind (clear e (CHead e0 (Bind b) u0)) H2)))))) (\lambda -(e0: C).(\lambda (c: C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C e0 -(CHead e (Flat f) u)) \to (clear e c)))).(\lambda (f0: F).(\lambda (u0: -T).(\lambda (H3: (eq C (CHead e0 (Flat f0) u0) (CHead e (Flat f) u))).(let H4 -\def (f_equal C C (\lambda (e1: C).(match e1 with [(CSort _) \Rightarrow e0 | -(CHead c0 _ _) \Rightarrow c0])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) -H3) in ((let H5 \def (f_equal C F (\lambda (e1: C).(match e1 with [(CSort _) -\Rightarrow f0 | (CHead _ k _) \Rightarrow (match k with [(Bind _) -\Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead e0 (Flat f0) u0) (CHead -e (Flat f) u) H3) in ((let H6 \def (f_equal C T (\lambda (e1: C).(match e1 -with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 -(Flat f0) u0) (CHead e (Flat f) u) H3) in (\lambda (_: (eq F f0 f)).(\lambda -(H8: (eq C e0 e)).(let H9 \def (eq_ind C e0 (\lambda (c0: C).((eq C c0 (CHead -e (Flat f) u)) \to (clear e c))) H2 e H8) in (let H10 \def (eq_ind C e0 -(\lambda (c0: C).(clear c0 c)) H1 e H8) in H10))))) H5)) H4))))))))) y x -H0))) H))))). - -lemma clear_gen_flat_r: - \forall (f: F).(\forall (x: C).(\forall (e: C).(\forall (u: T).((clear x -(CHead e (Flat f) u)) \to (\forall (P: Prop).P))))) -\def - \lambda (f: F).(\lambda (x: C).(\lambda (e: C).(\lambda (u: T).(\lambda (H: -(clear x (CHead e (Flat f) u))).(\lambda (P: Prop).(insert_eq C (CHead e -(Flat f) u) (\lambda (c: C).(clear x c)) (\lambda (_: C).P) (\lambda (y: -C).(\lambda (H0: (clear x y)).(clear_ind (\lambda (_: C).(\lambda (c0: -C).((eq C c0 (CHead e (Flat f) u)) \to P))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat -f) u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (ee: C).(match -ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k -with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e -(Flat f) u) H1) in (False_ind P H2)))))) (\lambda (e0: C).(\lambda (c: -C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C c (CHead e (Flat f) u)) -\to P))).(\lambda (_: F).(\lambda (_: T).(\lambda (H3: (eq C c (CHead e (Flat -f) u))).(let H4 \def (eq_ind C c (\lambda (c0: C).((eq C c0 (CHead e (Flat f) -u)) \to P)) H2 (CHead e (Flat f) u) H3) in (let H5 \def (eq_ind C c (\lambda -(c0: C).(clear e0 c0)) H1 (CHead e (Flat f) u) H3) in (H4 (refl_equal C -(CHead e (Flat f) u)))))))))))) x y H0))) H)))))). - -lemma clear_gen_all: - \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (ex_3 B C T (\lambda (b: -B).(\lambda (e: C).(\lambda (u: T).(eq C c2 (CHead e (Bind b) u)))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (clear c1 c2)).(clear_ind -(\lambda (_: C).(\lambda (c0: C).(ex_3 B C T (\lambda (b: B).(\lambda (e: -C).(\lambda (u: T).(eq C c0 (CHead e (Bind b) u)))))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (u: T).(ex_3_intro B C T (\lambda (b0: -B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead e (Bind b) u) (CHead e0 -(Bind b0) u0))))) b e u (refl_equal C (CHead e (Bind b) u)))))) (\lambda (e: -C).(\lambda (c: C).(\lambda (H0: (clear e c)).(\lambda (H1: (ex_3 B C T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(eq C c (CHead e0 (Bind b) -u))))))).(\lambda (_: F).(\lambda (_: T).(let H2 \def H1 in (ex_3_ind B C T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c (CHead e0 (Bind b) -u0))))) (ex_3 B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c -(CHead e0 (Bind b) u0)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (H3: (eq C c (CHead x1 (Bind x0) x2))).(let H4 \def (eq_ind C c -(\lambda (c0: C).(clear e c0)) H0 (CHead x1 (Bind x0) x2) H3) in (eq_ind_r C -(CHead x1 (Bind x0) x2) (\lambda (c0: C).(ex_3 B C T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u0: T).(eq C c0 (CHead e0 (Bind b) u0))))))) (ex_3_intro B -C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead x1 (Bind -x0) x2) (CHead e0 (Bind b) u0))))) x0 x1 x2 (refl_equal C (CHead x1 (Bind x0) -x2))) c H3)))))) H2)))))))) c1 c2 H))). - -theorem clear_mono: - \forall (c: C).(\forall (c1: C).((clear c c1) \to (\forall (c2: C).((clear c -c2) \to (eq C c1 c2))))) -\def - \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).((clear c0 c1) \to -(\forall (c2: C).((clear c0 c2) \to (eq C c1 c2)))))) (\lambda (n: -nat).(\lambda (c1: C).(\lambda (_: (clear (CSort n) c1)).(\lambda (c2: -C).(\lambda (H0: (clear (CSort n) c2)).(clear_gen_sort c2 n H0 (eq C c1 -c2))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).((clear c0 c1) \to -(\forall (c2: C).((clear c0 c2) \to (eq C c1 c2))))))).(\lambda (k: -K).(\lambda (t: T).(\lambda (c1: C).(\lambda (H0: (clear (CHead c0 k t) -c1)).(\lambda (c2: C).(\lambda (H1: (clear (CHead c0 k t) c2)).(K_ind -(\lambda (k0: K).((clear (CHead c0 k0 t) c1) \to ((clear (CHead c0 k0 t) c2) -\to (eq C c1 c2)))) (\lambda (b: B).(\lambda (H2: (clear (CHead c0 (Bind b) -t) c1)).(\lambda (H3: (clear (CHead c0 (Bind b) t) c2)).(eq_ind_r C (CHead c0 -(Bind b) t) (\lambda (c3: C).(eq C c1 c3)) (eq_ind_r C (CHead c0 (Bind b) t) -(\lambda (c3: C).(eq C c3 (CHead c0 (Bind b) t))) (refl_equal C (CHead c0 -(Bind b) t)) c1 (clear_gen_bind b c0 c1 t H2)) c2 (clear_gen_bind b c0 c2 t -H3))))) (\lambda (f: F).(\lambda (H2: (clear (CHead c0 (Flat f) t) -c1)).(\lambda (H3: (clear (CHead c0 (Flat f) t) c2)).(H c1 (clear_gen_flat f -c0 c1 t H2) c2 (clear_gen_flat f c0 c2 t H3))))) k H0 H1))))))))) c). - -lemma clear_cle: - \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (cle c2 c1))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to -(le (cweight c2) (cweight c))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda -(H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (le (cweight c2) O))))) -(\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (le (cweight -c2) (cweight c)))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: -C).(\lambda (H0: (clear (CHead c k t) c2)).(K_ind (\lambda (k0: K).((clear -(CHead c k0 t) c2) \to (le (cweight c2) (plus (cweight c) (tweight t))))) -(\lambda (b: B).(\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C -(CHead c (Bind b) t) (\lambda (c0: C).(le (cweight c0) (plus (cweight c) -(tweight t)))) (le_n (plus (cweight c) (tweight t))) c2 (clear_gen_bind b c -c2 t H1)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c (Flat f) t) -c2)).(le_plus_trans (cweight c2) (cweight c) (tweight t) (H c2 -(clear_gen_flat f c c2 t H1))))) k H0))))))) c1). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/clear/props.ma b/matita/matita/contribs/lambdadelta/basic_1/clear/props.ma deleted file mode 100644 index 07e59e05d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/clear/props.ma +++ /dev/null @@ -1,96 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/clear/fwd.ma". - -lemma clear_clear: - \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (clear c2 c2))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to -(clear c2 c2)))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear -(CSort n) c2)).(clear_gen_sort c2 n H (clear c2 c2))))) (\lambda (c: -C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (clear c2 -c2))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear -(CHead c k t) c2)).(K_ind (\lambda (k0: K).((clear (CHead c k0 t) c2) \to -(clear c2 c2))) (\lambda (b: B).(\lambda (H1: (clear (CHead c (Bind b) t) -c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(clear c0 c0)) -(clear_bind b c t) c2 (clear_gen_bind b c c2 t H1)))) (\lambda (f: -F).(\lambda (H1: (clear (CHead c (Flat f) t) c2)).(H c2 (clear_gen_flat f c -c2 t H1)))) k H0))))))) c1). - -theorem clear_trans: - \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (c2: C).((clear c -c2) \to (clear c1 c2))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c0: C).((clear c c0) \to -(\forall (c2: C).((clear c0 c2) \to (clear c c2)))))) (\lambda (n: -nat).(\lambda (c: C).(\lambda (H: (clear (CSort n) c)).(\lambda (c2: -C).(\lambda (_: (clear c c2)).(clear_gen_sort c n H (clear (CSort n) -c2))))))) (\lambda (c: C).(\lambda (H: ((\forall (c0: C).((clear c c0) \to -(\forall (c2: C).((clear c0 c2) \to (clear c c2))))))).(\lambda (k: -K).(\lambda (t: T).(\lambda (c0: C).(\lambda (H0: (clear (CHead c k t) -c0)).(\lambda (c2: C).(\lambda (H1: (clear c0 c2)).(K_ind (\lambda (k0: -K).((clear (CHead c k0 t) c0) \to (clear (CHead c k0 t) c2))) (\lambda (b: -B).(\lambda (H2: (clear (CHead c (Bind b) t) c0)).(let H3 \def (eq_ind C c0 -(\lambda (c3: C).(clear c3 c2)) H1 (CHead c (Bind b) t) (clear_gen_bind b c -c0 t H2)) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(clear (CHead -c (Bind b) t) c3)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H3))))) -(\lambda (f: F).(\lambda (H2: (clear (CHead c (Flat f) t) c0)).(clear_flat c -c2 (H c0 (clear_gen_flat f c c0 t H2) c2 H1) f t))) k H0))))))))) c1). - -lemma clear_ctail: - \forall (b: B).(\forall (c1: C).(\forall (c2: C).(\forall (u2: T).((clear c1 -(CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k -u1 c1) (CHead (CTail k u1 c2) (Bind b) u2)))))))) -\def - \lambda (b: B).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: -C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: -K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) -u2)))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H: -(clear (CSort n) (CHead c2 (Bind b) u2))).(\lambda (k: K).(\lambda (u1: -T).(K_ind (\lambda (k0: K).(clear (CHead (CSort n) k0 u1) (CHead (CTail k0 u1 -c2) (Bind b) u2))) (\lambda (b0: B).(clear_gen_sort (CHead c2 (Bind b) u2) n -H (clear (CHead (CSort n) (Bind b0) u1) (CHead (CTail (Bind b0) u1 c2) (Bind -b) u2)))) (\lambda (f: F).(clear_gen_sort (CHead c2 (Bind b) u2) n H (clear -(CHead (CSort n) (Flat f) u1) (CHead (CTail (Flat f) u1 c2) (Bind b) u2)))) -k))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (u2: -T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: -T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2))))))))).(\lambda -(k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H0: (clear -(CHead c k t) (CHead c2 (Bind b) u2))).(\lambda (k0: K).(\lambda (u1: -T).(K_ind (\lambda (k1: K).((clear (CHead c k1 t) (CHead c2 (Bind b) u2)) \to -(clear (CHead (CTail k0 u1 c) k1 t) (CHead (CTail k0 u1 c2) (Bind b) u2)))) -(\lambda (b0: B).(\lambda (H1: (clear (CHead c (Bind b0) t) (CHead c2 (Bind -b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) u2) -(CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in -((let H3 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow b | (CHead _ k1 _) \Rightarrow (match k1 with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead c -(Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H4 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | -(CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) -(clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b -b0)).(\lambda (H6: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(clear (CHead -(CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c2) (Bind b) t0))) (eq_ind_r -C c (\lambda (c0: C).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail -k0 u1 c0) (Bind b) t))) (eq_ind B b (\lambda (b1: B).(clear (CHead (CTail k0 -u1 c) (Bind b1) t) (CHead (CTail k0 u1 c) (Bind b) t))) (clear_bind b (CTail -k0 u1 c) t) b0 H5) c2 H6) u2 H4)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: -(clear (CHead c (Flat f) t) (CHead c2 (Bind b) u2))).(clear_flat (CTail k0 u1 -c) (CHead (CTail k0 u1 c2) (Bind b) u2) (H c2 u2 (clear_gen_flat f c (CHead -c2 (Bind b) u2) t H1) k0 u1) f t))) k H0)))))))))) c1)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/clen/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/clen/defs.ma deleted file mode 100644 index 64209a6f7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/clen/defs.ma +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -include "basic_1/s/defs.ma". - -rec definition clen (c: C) on c: nat \def match c with [(CSort _) \Rightarrow -O | (CHead c0 k _) \Rightarrow (s k (clen c0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/clen/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/clen/getl.ma deleted file mode 100644 index 55bad4ad9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/clen/getl.ma +++ /dev/null @@ -1,351 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/clen/defs.ma". - -include "basic_1/getl/props.ma". - -lemma getl_ctail_clen: - \forall (b: B).(\forall (t: T).(\forall (c: C).(ex nat (\lambda (n: -nat).(getl (clen c) (CTail (Bind b) t c) (CHead (CSort n) (Bind b) t)))))) -\def - \lambda (b: B).(\lambda (t: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(ex -nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) -(Bind b) t))))) (\lambda (n: nat).(ex_intro nat (\lambda (n0: nat).(getl O -(CHead (CSort n) (Bind b) t) (CHead (CSort n0) (Bind b) t))) n (getl_refl b -(CSort n) t))) (\lambda (c0: C).(\lambda (H: (ex nat (\lambda (n: nat).(getl -(clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))).(\lambda (k: -K).(\lambda (t0: T).(let H0 \def H in (ex_ind nat (\lambda (n: nat).(getl -(clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))) (ex nat -(\lambda (n: nat).(getl (s k (clen c0)) (CHead (CTail (Bind b) t c0) k t0) -(CHead (CSort n) (Bind b) t)))) (\lambda (x: nat).(\lambda (H1: (getl (clen -c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t))).(K_ind (\lambda (k0: -K).(ex nat (\lambda (n: nat).(getl (s k0 (clen c0)) (CHead (CTail (Bind b) t -c0) k0 t0) (CHead (CSort n) (Bind b) t))))) (\lambda (b0: B).(ex_intro nat -(\lambda (n: nat).(getl (S (clen c0)) (CHead (CTail (Bind b) t c0) (Bind b0) -t0) (CHead (CSort n) (Bind b) t))) x (getl_head (Bind b0) (clen c0) (CTail -(Bind b) t c0) (CHead (CSort x) (Bind b) t) H1 t0))) (\lambda (f: -F).(ex_intro nat (\lambda (n: nat).(getl (clen c0) (CHead (CTail (Bind b) t -c0) (Flat f) t0) (CHead (CSort n) (Bind b) t))) x (getl_flat (CTail (Bind b) -t c0) (CHead (CSort x) (Bind b) t) (clen c0) H1 f t0))) k))) H0)))))) c))). - -lemma getl_gen_tail: - \forall (k: K).(\forall (b: B).(\forall (u1: T).(\forall (u2: T).(\forall -(c2: C).(\forall (c1: C).(\forall (i: nat).((getl i (CTail k u1 c1) (CHead c2 -(Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) -(\lambda (e: C).(getl i c1 (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: -nat).(eq nat i (clen c1))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))))))) -\def - \lambda (k: K).(\lambda (b: B).(\lambda (u1: T).(\lambda (u2: T).(\lambda -(c2: C).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (i: nat).((getl i -(CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C -c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 -nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind -b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort -n)))))))) (\lambda (n: nat).(\lambda (i: nat).(nat_ind (\lambda (n0: -nat).((getl n0 (CTail k u1 (CSort n)) (CHead c2 (Bind b) u2)) \to (or (ex2 C -(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 (clen (CSort -n)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) -(\lambda (n1: nat).(eq C c2 (CSort n1))))))) (\lambda (H: (getl O (CHead -(CSort n) k u1) (CHead c2 (Bind b) u2))).(K_ind (\lambda (k0: K).((clear -(CHead (CSort n) k0 u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: -C).(eq C c2 (CTail k0 u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e -(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: -nat).(eq K k0 (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: -nat).(eq C c2 (CSort n0))))))) (\lambda (b0: B).(\lambda (H0: (clear (CHead -(CSort n) (Bind b0) u1) (CHead c2 (Bind b) u2))).(let H1 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c _ _) -\Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) -(clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H2 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead -_ k0 _) \Rightarrow (match k0 with [(Bind b1) \Rightarrow b1 | (Flat _) -\Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) -(clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H3 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | (CHead -_ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) -(clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in (\lambda (H4: -(eq B b b0)).(\lambda (H5: (eq C c2 (CSort n))).(eq_ind_r C (CSort n) -(\lambda (c: C).(or (ex2 C (\lambda (e: C).(eq C c (CTail (Bind b0) u1 e))) -(\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda -(_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda -(_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c (CSort n0)))))) (eq_ind_r T -u1 (\lambda (t: T).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind -b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) t)))) (ex4 -nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind -b))) (\lambda (_: nat).(eq T u1 t)) (\lambda (n0: nat).(eq C (CSort n) (CSort -n0)))))) (eq_ind_r B b0 (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C -(CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e -(Bind b1) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: -nat).(eq K (Bind b0) (Bind b1))) (\lambda (_: nat).(eq T u1 u1)) (\lambda -(n0: nat).(eq C (CSort n) (CSort n0)))))) (or_intror (ex2 C (\lambda (e: -C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) -(CHead e (Bind b0) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda -(_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda -(n0: nat).(eq C (CSort n) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq -nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq -T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0))) n (refl_equal nat -O) (refl_equal K (Bind b0)) (refl_equal T u1) (refl_equal C (CSort n)))) b -H4) u2 H3) c2 H5)))) H2)) H1)))) (\lambda (f: F).(\lambda (H0: (clear (CHead -(CSort n) (Flat f) u1) (CHead c2 (Bind b) u2))).(clear_gen_sort (CHead c2 -(Bind b) u2) n (clear_gen_flat f (CSort n) (CHead c2 (Bind b) u2) u1 H0) (or -(ex2 C (\lambda (e: C).(eq C c2 (CTail (Flat f) u1 e))) (\lambda (e: C).(getl -O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) -(\lambda (_: nat).(eq K (Flat f) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) -(\lambda (n0: nat).(eq C c2 (CSort n0)))))))) k (getl_gen_O (CHead (CSort n) -k u1) (CHead c2 (Bind b) u2) H))) (\lambda (n0: nat).(\lambda (_: (((getl n0 -(CHead (CSort n) k u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: -C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) (CHead e -(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 O)) (\lambda (_: -nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: -nat).(eq C c2 (CSort n1)))))))).(\lambda (H0: (getl (S n0) (CHead (CSort n) k -u1) (CHead c2 (Bind b) u2))).(getl_gen_sort n (r k n0) (CHead c2 (Bind b) u2) -(getl_gen_S k (CSort n) (CHead c2 (Bind b) u2) u1 n0 H0) (or (ex2 C (\lambda -(e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n0) (CSort n) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n0) O)) -(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n1: nat).(eq C c2 (CSort n1))))))))) i))) (\lambda (c: C).(\lambda (H: -((\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) -(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n: nat).(eq C c2 (CSort n))))))))).(\lambda (k0: K).(\lambda (t: T).(\lambda -(i: nat).(nat_ind (\lambda (n: nat).((getl n (CTail k u1 (CHead c k0 t)) -(CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 -e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat -(\lambda (_: nat).(eq nat n (clen (CHead c k0 t)))) (\lambda (_: nat).(eq K k -(Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort -n0))))))) (\lambda (H0: (getl O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind -b) u2))).(K_ind (\lambda (k1: K).((clear (CHead (CTail k u1 c) k1 t) (CHead -c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) -(\lambda (e: C).(getl O (CHead c k1 t) (CHead e (Bind b) u2)))) (ex4 nat -(\lambda (_: nat).(eq nat O (s k1 (clen c)))) (\lambda (_: nat).(eq K k (Bind -b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort -n))))))) (\lambda (b0: B).(\lambda (H1: (clear (CHead (CTail k u1 c) (Bind -b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) -(CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 -(CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B -(\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead _ k1 _) -\Rightarrow (match k1 with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow -b])])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) -(clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H4 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | -(CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) -(Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) -in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 (CTail k u1 c))).(eq_ind -T u2 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) -(\lambda (e: C).(getl O (CHead c (Bind b0) t0) (CHead e (Bind b) u2)))) (ex4 -nat (\lambda (_: nat).(eq nat O (s (Bind b0) (clen c)))) (\lambda (_: -nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq -C c2 (CSort n)))))) (eq_ind B b (\lambda (b1: B).(or (ex2 C (\lambda (e: -C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b1) u2) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b1) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (let H7 \def (eq_ind C c2 -(\lambda (c0: C).(\forall (i0: nat).((getl i0 (CTail k u1 c) (CHead c0 (Bind -b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: -C).(getl i0 c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i0 -(clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))))) H (CTail k u1 c) H6) in -(eq_ind_r C (CTail k u1 c) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C -c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e -(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) -(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C -(CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C (CTail k u1 c) (CSort n)))) (ex_intro2 C -(\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O -(CHead c (Bind b) u2) (CHead e (Bind b) u2))) c (refl_equal C (CTail k u1 c)) -(getl_refl b c u2))) c2 H6)) b0 H5) t H4)))) H3)) H2)))) (\lambda (f: -F).(\lambda (H1: (clear (CHead (CTail k u1 c) (Flat f) t) (CHead c2 (Bind b) -u2))).(let H2 \def (H O (getl_intro O (CTail k u1 c) (CHead c2 (Bind b) u2) -(CTail k u1 c) (drop_refl (CTail k u1 c)) (clear_gen_flat f (CTail k u1 c) -(CHead c2 (Bind b) u2) t H1))) in (or_ind (ex2 C (\lambda (e: C).(eq C c2 -(CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2)))) (ex4 nat -(\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) -(\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))) (or -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O -(CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq -nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda -(_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (H3: -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c -(CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 -e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))) (or (ex2 C (\lambda -(e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x: C).(\lambda (H4: -(eq C c2 (CTail k u1 x))).(\lambda (H5: (getl O c (CHead x (Bind b) -u2))).(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: -C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: -C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c -(Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s -(Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 x) (CSort n)))) -(ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda -(e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2))) x (refl_equal C -(CTail k u1 x)) (getl_flat c (CHead x (Bind b) u2) O H5 f t))) c2 H4)))) H3)) -(\lambda (H3: (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: -nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq -C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat O (clen c))) -(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n: nat).(eq C c2 (CSort n))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 -e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) -(ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: -nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq -C c2 (CSort n))))) (\lambda (x0: nat).(\lambda (H4: (eq nat O (clen -c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda -(H7: (eq C c2 (CSort x0))).(eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C -(\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c -(Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s -(Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (eq_ind T u1 -(\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) -(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) t0)))) (ex4 -nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq -K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n: nat).(eq C (CSort -x0) (CSort n)))))) (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda -(e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl O (CHead c -(Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s -(Flat f) (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: -nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) -(or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) -(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 -nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq -K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C -(CSort x0) (CSort n)))) (ex4_intro nat (\lambda (_: nat).(eq nat O (s (Flat -f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: -nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n))) x0 H4 -(refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) k H5) -u2 H6) c2 H7)))))) H3)) H2)))) k0 (getl_gen_O (CHead (CTail k u1 c) k0 t) -(CHead c2 (Bind b) u2) H0))) (\lambda (n: nat).(\lambda (H0: (((getl n (CHead -(CTail k u1 c) k0 t) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: -C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e -(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (s k0 (clen c)))) -(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n0: nat).(eq C c2 (CSort n0)))))))).(\lambda (H1: (getl (S n) (CHead (CTail -k u1 c) k0 t) (CHead c2 (Bind b) u2))).(let H_x \def (H (r k0 n) (getl_gen_S -k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H1)) in (let H2 \def H_x in -(or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: -C).(getl (r k0 n) c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq -nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))) (or (ex2 C -(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead -c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s -k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T -u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (H3: (ex2 C -(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c -(CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 -e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))) (or (ex2 C -(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead -c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s -k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T -u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x: C).(\lambda -(H4: (eq C c2 (CTail k u1 x))).(\lambda (H5: (getl (r k0 n) c (CHead x (Bind -b) u2))).(let H6 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k -u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind -b) u2) t n H1) (CTail k u1 x) H4) in (let H7 \def (eq_ind C c2 (\lambda (c0: -C).((getl n (CHead (CTail k u1 c) k0 t) (CHead c0 (Bind b) u2)) \to (or (ex2 -C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c -k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (s k0 -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n0: nat).(eq C c0 (CSort n0))))))) H0 (CTail k u1 x) H4) in -(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C -c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind -b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda -(_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: -nat).(eq C c0 (CSort n0)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail -k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e -(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) -(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n0: nat).(eq C (CTail k u1 x) (CSort n0)))) (ex_intro2 C (\lambda (e: C).(eq -C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) -(CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_head k0 n c -(CHead x (Bind b) u2) H5 t))) c2 H4)))))) H3)) (\lambda (H3: (ex4 nat -(\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind -b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort -n0))))).(ex4_ind nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda -(_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: -nat).(eq C c2 (CSort n0))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 -e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 -nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K -k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 -(CSort n0))))) (\lambda (x0: nat).(\lambda (H4: (eq nat (r k0 n) (clen -c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda -(H7: (eq C c2 (CSort x0))).(let H8 \def (eq_ind C c2 (\lambda (c0: C).(getl -(r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 -c) (CHead c2 (Bind b) u2) t n H1) (CSort x0) H7) in (let H9 \def (eq_ind C c2 -(\lambda (c0: C).((getl n (CHead (CTail k u1 c) k0 t) (CHead c0 (Bind b) u2)) -\to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: -C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: -nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) -(\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0))))))) -H0 (CSort x0) H7) in (eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C -(\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead -c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s -k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T -u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (let H10 \def (eq_ind_r T -u2 (\lambda (t0: T).((getl n (CHead (CTail k u1 c) k0 t) (CHead (CSort x0) -(Bind b) t0)) \to (or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 -e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) t0)))) (ex4 nat -(\lambda (_: nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind -b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n0: nat).(eq C (CSort x0) -(CSort n0))))))) H9 u1 H6) in (let H11 \def (eq_ind_r T u2 (\lambda (t0: -T).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) t0))) H8 u1 H6) -in (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) -(CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) -t0)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda -(_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n0: -nat).(eq C (CSort x0) (CSort n0)))))) (let H12 \def (eq_ind K k (\lambda (k1: -K).((getl n (CHead (CTail k1 u1 c) k0 t) (CHead (CSort x0) (Bind b) u1)) \to -(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: -C).(getl n (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: -nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) -(\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort -n0))))))) H10 (Bind b) H5) in (let H13 \def (eq_ind K k (\lambda (k1: -K).(getl (r k0 n) (CTail k1 u1 c) (CHead (CSort x0) (Bind b) u1))) H11 (Bind -b) H5) in (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: -C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 -t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 -(clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 -u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (eq_ind nat (r k0 n) -(\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind -b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) -u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 n0))) (\lambda (_: -nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: -nat).(eq C (CSort x0) (CSort n1)))))) (eq_ind_r nat (S n) (\lambda (n0: -nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) -(\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat -(\lambda (_: nat).(eq nat (S n) n0)) (\lambda (_: nat).(eq K (Bind b) (Bind -b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) -(CSort n1)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail -(Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) -u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq -K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq -C (CSort x0) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat (S n) (S -n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 -u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0))) x0 (refl_equal nat (S -n)) (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) (s -k0 (r k0 n)) (s_r k0 n)) (clen c) H4) k H5))) u2 H6))) c2 H7)))))))) H3)) -H2)))))) i)))))) c1)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/cnt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/cnt/defs.ma deleted file mode 100644 index 149d125f9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/cnt/defs.ma +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -inductive cnt: T \to Prop \def -| cnt_sort: \forall (n: nat).(cnt (TSort n)) -| cnt_head: \forall (t: T).((cnt t) \to (\forall (k: K).(\forall (v: T).(cnt -(THead k v t))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/cnt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/cnt/fwd.ma deleted file mode 100644 index 922737699..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/cnt/fwd.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/cnt/defs.ma". - -implied rec lemma cnt_ind (P: (T \to Prop)) (f: (\forall (n: nat).(P (TSort -n)))) (f0: (\forall (t: T).((cnt t) \to ((P t) \to (\forall (k: K).(\forall -(v: T).(P (THead k v t)))))))) (t: T) (c: cnt t) on c: P t \def match c with -[(cnt_sort n) \Rightarrow (f n) | (cnt_head t0 c0 k v) \Rightarrow (f0 t0 c0 -((cnt_ind P f f0) t0 c0) k v)]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/cnt/props.ma b/matita/matita/contribs/lambdadelta/basic_1/cnt/props.ma deleted file mode 100644 index e18a4788e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/cnt/props.ma +++ /dev/null @@ -1,34 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/cnt/fwd.ma". - -include "basic_1/lift/props.ma". - -lemma cnt_lift: - \forall (t: T).((cnt t) \to (\forall (i: nat).(\forall (d: nat).(cnt (lift i -d t))))) -\def - \lambda (t: T).(\lambda (H: (cnt t)).(cnt_ind (\lambda (t0: T).(\forall (i: -nat).(\forall (d: nat).(cnt (lift i d t0))))) (\lambda (n: nat).(\lambda (i: -nat).(\lambda (d: nat).(eq_ind_r T (TSort n) (\lambda (t0: T).(cnt t0)) -(cnt_sort n) (lift i d (TSort n)) (lift_sort n i d))))) (\lambda (t0: -T).(\lambda (_: (cnt t0)).(\lambda (H1: ((\forall (i: nat).(\forall (d: -nat).(cnt (lift i d t0)))))).(\lambda (k: K).(\lambda (v: T).(\lambda (i: -nat).(\lambda (d: nat).(eq_ind_r T (THead k (lift i d v) (lift i (s k d) t0)) -(\lambda (t1: T).(cnt t1)) (cnt_head (lift i (s k d) t0) (H1 i (s k d)) k -(lift i d v)) (lift i d (THead k v t0)) (lift_head k v t0 i d))))))))) t H)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/arity.ma b/matita/matita/contribs/lambdadelta/basic_1/csuba/arity.ma deleted file mode 100644 index 7b35a4381..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/arity.ma +++ /dev/null @@ -1,319 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csuba/getl.ma". - -include "basic_1/csuba/props.ma". - -include "basic_1/arity/fwd.ma". - -include "basic_1/csubv/getl.ma". - -lemma csuba_arity: - \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 -t a) \to (\forall (c2: C).((csuba g c1 c2) \to (arity g c2 t a))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: -A).(\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 a0)))))) (\lambda (c: -C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (csuba g c -c2)).(arity_sort g c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) -u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall -(c2: C).((csuba g d c2) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda -(H3: (csuba g c c2)).(let H4 \def (csuba_getl_abbr g c d u i H0 c2 H3) in -(ex2_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d d2)) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda -(H5: (getl i c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (csuba g d -x)).(arity_abbr g c2 x u i H5 a0 (H2 x H6))))) H4)))))))))))) (\lambda (c: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c -(CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc -g a0))).(\lambda (H2: ((\forall (c2: C).((csuba g d c2) \to (arity g c2 u -(asucc g a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c c2)).(let H4 \def -(csuba_getl_abst g c d u i H0 c2 H3) in (or_ind (ex2 C (\lambda (d2: C).(getl -i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u (asucc -g a1))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 -a1))))) (arity g c2 (TLRef i) a0) (\lambda (H5: (ex2 C (\lambda (d2: C).(getl -i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d d2)))).(ex2_ind C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d d2)) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H6: -(getl i c2 (CHead x (Bind Abst) u))).(\lambda (H7: (csuba g d x)).(arity_abst -g c2 x u i H6 a0 (H2 x H7))))) H5)) (\lambda (H5: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u (asucc g a1))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 -a1)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a1: A).(arity g d u (asucc g a1))))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a1: A).(arity g d2 u2 a1)))) (arity g c2 (TLRef i) a0) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H6: (getl i c2 (CHead x0 -(Bind Abbr) x1))).(\lambda (_: (csuba g d x0)).(\lambda (H8: (arity g d u -(asucc g x2))).(\lambda (H9: (arity g x0 x1 x2)).(arity_repl g c2 (TLRef i) -x2 (arity_abbr g c2 x0 x1 i H6 x2 H9) a0 (asucc_inj g x2 a0 (arity_mono g d u -(asucc g x2) H8 (asucc g a0) H1)))))))))) H5)) H4)))))))))))) (\lambda (b: -B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall -(c2: C).((csuba g c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda -(a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: -((\forall (c2: C).((csuba g (CHead c (Bind b) u) c2) \to (arity g c2 t0 -a2))))).(\lambda (c2: C).(\lambda (H5: (csuba g c c2)).(arity_bind g b H0 c2 -u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) u) (csuba_head g c c2 H5 (Bind -b) u)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: -A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: -C).((csuba g c c2) \to (arity g c2 u (asucc g a1)))))).(\lambda (t0: -T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 -a2)).(\lambda (H3: ((\forall (c2: C).((csuba g (CHead c (Bind Abst) u) c2) -\to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: (csuba g c -c2)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind Abst) u) -(csuba_head g c c2 H4 (Bind Abst) u)))))))))))))) (\lambda (c: C).(\lambda -(u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: -((\forall (c2: C).((csuba g c c2) \to (arity g c2 u a1))))).(\lambda (t0: -T).(\lambda (a2: A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: -((\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 (AHead a1 -a2)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c c2)).(arity_appl g c2 u a1 -(H1 c2 H4) t0 a2 (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: -((\forall (c2: C).((csuba g c c2) \to (arity g c2 u (asucc g -a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: -((\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 a0))))).(\lambda (c2: -C).(\lambda (H4: (csuba g c c2)).(arity_cast g c2 u a0 (H1 c2 H4) t0 (H3 c2 -H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: -(arity g c t0 a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c c2) \to (arity -g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: -C).(\lambda (H3: (csuba g c c2)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 -H2)))))))))) c1 t a H))))). - -lemma csuba_arity_rev: - \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 -t a) \to (\forall (c2: C).((csuba g c2 c1) \to ((csubv c2 c1) \to (arity g c2 -t a)))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: -A).(\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 t0 -a0))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: -(csuba g c2 c)).(\lambda (_: (csubv c2 c)).(arity_sort g c2 n)))))) (\lambda -(c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl -i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u -a0)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 d) \to ((csubv c2 d) \to -(arity g c2 u a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2 -c)).(\lambda (H4: (csubv c2 c)).(let H_x \def (csuba_getl_abbr_rev g c d u i -H0 c2 H3) in (let H5 \def H_x in (or3_ind (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 -(asucc g a1))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d -u a1))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d)))) (arity -g c2 (TLRef i) a0) (\lambda (H6: (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)) -(arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H7: (getl i c2 (CHead x -(Bind Abbr) u))).(\lambda (H8: (csuba g x d)).(let H_x0 \def (csubv_getl_conf -c2 c H4 Abbr x u i H7) in (let H9 \def H_x0 in (ex2_3_ind B C T (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csubv x d2)))) (\lambda (b2: B).(\lambda -(d2: C).(\lambda (v2: T).(getl i c (CHead d2 (Bind b2) v2))))) (arity g c2 -(TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda -(H10: (csubv x x1)).(\lambda (H11: (getl i c (CHead x1 (Bind x0) x2))).(let -H12 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 -(CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x1 -(Bind x0) x2) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d -(Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) i -H0 (CHead x1 (Bind x0) x2) H11)) in ((let H14 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) -i H0 (CHead x1 (Bind x0) x2) H11)) in ((let H15 \def (f_equal C T (\lambda -(e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow -t0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d -(Bind Abbr) u) i H0 (CHead x1 (Bind x0) x2) H11)) in (\lambda (H16: (eq B -Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda -(t0: T).(getl i c (CHead x1 (Bind x0) t0))) H12 u H15) in (let H19 \def -(eq_ind_r C x1 (\lambda (c0: C).(getl i c (CHead c0 (Bind x0) u))) H18 d H17) -in (let H20 \def (eq_ind_r C x1 (\lambda (c0: C).(csubv x c0)) H10 d H17) in -(let H21 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c (CHead d (Bind b) u))) -H19 Abbr H16) in (arity_abbr g c2 x u i H7 a0 (H2 x H8 H20))))))))) H14)) -H13)))))))) H9)))))) H6)) (\lambda (H6: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u -a1)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a1: A).(arity g d u a1)))) (arity g c2 (TLRef i) a0) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H7: (getl i c2 -(CHead x0 (Bind Abst) x1))).(\lambda (_: (csuba g x0 d)).(\lambda (H9: (arity -g x0 x1 (asucc g x2))).(\lambda (H10: (arity g d u x2)).(arity_repl g c2 -(TLRef i) x2 (arity_abst g c2 x0 x1 i H7 x2 H9) a0 (arity_mono g d u x2 H10 -a0 H1))))))))) H6)) (\lambda (H6: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl -i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(H7: (getl i c2 (CHead x0 (Bind Void) x1))).(\lambda (_: (csuba g x0 d)).(let -H_x0 \def (csubv_getl_conf_void c2 c H4 x0 x1 i H7) in (let H9 \def H_x0 in -(ex2_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubv x0 d2))) (\lambda (d2: -C).(\lambda (v2: T).(getl i c (CHead d2 (Bind Void) v2)))) (arity g c2 (TLRef -i) a0) (\lambda (x2: C).(\lambda (x3: T).(\lambda (_: (csubv x0 x2)).(\lambda -(H11: (getl i c (CHead x2 (Bind Void) x3))).(let H12 \def (eq_ind C (CHead d -(Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x2 (Bind Void) x3) -(getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x2 (Bind Void) x3) H11)) in -(let H13 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with -[(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow -False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead -x2 (Bind Void) x3) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x2 (Bind -Void) x3) H11)) in (False_ind (arity g c2 (TLRef i) a0) H13))))))) H9))))))) -H6)) H5)))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) -u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: -((\forall (c2: C).((csuba g c2 d) \to ((csubv c2 d) \to (arity g c2 u (asucc -g a0))))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(\lambda (H4: -(csubv c2 c)).(let H_x \def (csuba_getl_abst_rev g c d u i H0 c2 H3) in (let -H5 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d)))) (arity g c2 (TLRef i) a0) (\lambda (H6: -(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d)) (arity g c2 (TLRef i) a0) -(\lambda (x: C).(\lambda (H7: (getl i c2 (CHead x (Bind Abst) u))).(\lambda -(H8: (csuba g x d)).(let H_x0 \def (csubv_getl_conf c2 c H4 Abst x u i H7) in -(let H9 \def H_x0 in (ex2_3_ind B C T (\lambda (_: B).(\lambda (d2: -C).(\lambda (_: T).(csubv x d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda -(v2: T).(getl i c (CHead d2 (Bind b2) v2))))) (arity g c2 (TLRef i) a0) -(\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H10: (csubv x -x1)).(\lambda (H11: (getl i c (CHead x1 (Bind x0) x2))).(let H12 \def (eq_ind -C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x1 (Bind -x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x1 (Bind x0) x2) -H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abst) u) -(CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x1 -(Bind x0) x2) H11)) in ((let H14 \def (f_equal C B (\lambda (e: C).(match e -with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with -[(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) -u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead -x1 (Bind x0) x2) H11)) in ((let H15 \def (f_equal C T (\lambda (e: C).(match -e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d -(Bind Abst) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i -H0 (CHead x1 (Bind x0) x2) H11)) in (\lambda (H16: (eq B Abst x0)).(\lambda -(H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t0: T).(getl i c -(CHead x1 (Bind x0) t0))) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda -(c0: C).(getl i c (CHead c0 (Bind x0) u))) H18 d H17) in (let H20 \def -(eq_ind_r C x1 (\lambda (c0: C).(csubv x c0)) H10 d H17) in (let H21 \def -(eq_ind_r B x0 (\lambda (b: B).(getl i c (CHead d (Bind b) u))) H19 Abst H16) -in (arity_abst g c2 x u i H7 a0 (H2 x H8 H20))))))))) H14)) H13)))))))) -H9)))))) H6)) (\lambda (H6: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl -i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(H7: (getl i c2 (CHead x0 (Bind Void) x1))).(\lambda (_: (csuba g x0 d)).(let -H_x0 \def (csubv_getl_conf_void c2 c H4 x0 x1 i H7) in (let H9 \def H_x0 in -(ex2_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubv x0 d2))) (\lambda (d2: -C).(\lambda (v2: T).(getl i c (CHead d2 (Bind Void) v2)))) (arity g c2 (TLRef -i) a0) (\lambda (x2: C).(\lambda (x3: T).(\lambda (_: (csubv x0 x2)).(\lambda -(H11: (getl i c (CHead x2 (Bind Void) x3))).(let H12 \def (eq_ind C (CHead d -(Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x2 (Bind Void) x3) -(getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x2 (Bind Void) x3) H11)) in -(let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with -[(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst -\Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) -I (CHead x2 (Bind Void) x3) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead -x2 (Bind Void) x3) H11)) in (False_ind (arity g c2 (TLRef i) a0) H13))))))) -H9))))))) H6)) H5)))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b -Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity -g c u a1)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) -\to (arity g c2 u a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: -(arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((csuba -g c2 (CHead c (Bind b) u)) \to ((csubv c2 (CHead c (Bind b) u)) \to (arity g -c2 t0 a2)))))).(\lambda (c2: C).(\lambda (H5: (csuba g c2 c)).(\lambda (H6: -(csubv c2 c)).(arity_bind g b H0 c2 u a1 (H2 c2 H5 H6) t0 a2 (H4 (CHead c2 -(Bind b) u) (csuba_head g c2 c H5 (Bind b) u) (csubv_bind_same c2 c H6 b u -u))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda -(_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: C).((csuba g c2 -c) \to ((csubv c2 c) \to (arity g c2 u (asucc g a1))))))).(\lambda (t0: -T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 -a2)).(\lambda (H3: ((\forall (c2: C).((csuba g c2 (CHead c (Bind Abst) u)) -\to ((csubv c2 (CHead c (Bind Abst) u)) \to (arity g c2 t0 a2)))))).(\lambda -(c2: C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv c2 c)).(arity_head -g c2 u a1 (H1 c2 H4 H5) t0 a2 (H3 (CHead c2 (Bind Abst) u) (csuba_head g c2 c -H4 (Bind Abst) u) (csubv_bind_same c2 c H5 Abst u u))))))))))))))) (\lambda -(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u -a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to -(arity g c2 u a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity -g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c2: C).((csuba g c2 c) \to -((csubv c2 c) \to (arity g c2 t0 (AHead a1 a2))))))).(\lambda (c2: -C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv c2 c)).(arity_appl g c2 -u a1 (H1 c2 H4 H5) t0 a2 (H3 c2 H4 H5)))))))))))))) (\lambda (c: C).(\lambda -(u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda -(H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 u -(asucc g a0))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda -(H3: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 t0 -a0)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv -c2 c)).(arity_cast g c2 u a0 (H1 c2 H4 H5) t0 (H3 c2 H4 H5))))))))))))) -(\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c t0 -a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to -(arity g c2 t0 a1)))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 -a2)).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(\lambda (H4: (csubv c2 -c)).(arity_repl g c2 t0 a1 (H1 c2 H3 H4) a2 H2))))))))))) c1 t a H))))). - -theorem arity_appls_appl: - \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (a1: A).((arity g c -v a1) \to (\forall (u: T).((arity g c u (asucc g a1)) \to (\forall (t: -T).(\forall (vs: TList).(\forall (a2: A).((arity g c (THeads (Flat Appl) vs -(THead (Bind Abbr) v t)) a2) \to (arity g c (THeads (Flat Appl) vs (THead -(Flat Appl) v (THead (Bind Abst) u t))) a2))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (v: T).(\lambda (a1: A).(\lambda (H: -(arity g c v a1)).(\lambda (u: T).(\lambda (H0: (arity g c u (asucc g -a1))).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: -TList).(\forall (a2: A).((arity g c (THeads (Flat Appl) t0 (THead (Bind Abbr) -v t)) a2) \to (arity g c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead -(Bind Abst) u t))) a2)))) (\lambda (a2: A).(\lambda (H1: (arity g c (THead -(Bind Abbr) v t) a2)).(let H_x \def (arity_gen_bind Abbr not_abbr_abst g c v -t a2 H1) in (let H2 \def H_x in (ex2_ind A (\lambda (a3: A).(arity g c v a3)) -(\lambda (_: A).(arity g (CHead c (Bind Abbr) v) t a2)) (arity g c (THead -(Flat Appl) v (THead (Bind Abst) u t)) a2) (\lambda (x: A).(\lambda (_: -(arity g c v x)).(\lambda (H4: (arity g (CHead c (Bind Abbr) v) t -a2)).(arity_appl g c v a1 H (THead (Bind Abst) u t) a2 (arity_head g c u a1 -H0 t a2 (csuba_arity_rev g (CHead c (Bind Abbr) v) t a2 H4 (CHead c (Bind -Abst) u) (csuba_abst g c c (csuba_refl g c) u a1 H0 v H) (csubv_bind c c -(csubv_refl c) Abst not_abst_void Abbr u v))))))) H2))))) (\lambda (t0: -T).(\lambda (t1: TList).(\lambda (H1: ((\forall (a2: A).((arity g c (THeads -(Flat Appl) t1 (THead (Bind Abbr) v t)) a2) \to (arity g c (THeads (Flat -Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u t))) a2))))).(\lambda (a2: -A).(\lambda (H2: (arity g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(THead (Bind Abbr) v t))) a2)).(let H3 \def (arity_gen_appl g c t0 (THeads -(Flat Appl) t1 (THead (Bind Abbr) v t)) a2 H2) in (ex2_ind A (\lambda (a3: -A).(arity g c t0 a3)) (\lambda (a3: A).(arity g c (THeads (Flat Appl) t1 -(THead (Bind Abbr) v t)) (AHead a3 a2))) (arity g c (THead (Flat Appl) t0 -(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u t)))) a2) -(\lambda (x: A).(\lambda (H4: (arity g c t0 x)).(\lambda (H5: (arity g c -(THeads (Flat Appl) t1 (THead (Bind Abbr) v t)) (AHead x a2))).(arity_appl g -c t0 x H4 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u -t))) a2 (H1 (AHead x a2) H5))))) H3))))))) vs))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/clear.ma b/matita/matita/contribs/lambdadelta/basic_1/csuba/clear.ma deleted file mode 100644 index 06b1cc258..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/clear.ma +++ /dev/null @@ -1,122 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csuba/fwd.ma". - -include "basic_1/clear/fwd.ma". - -lemma csuba_clear_conf: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to -(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) -(\lambda (e2: C).(clear c2 e2)))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c1 -c2)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c -e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c0 -e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) -e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e1 e2)) -(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 -e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 -e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: -(clear (CHead c3 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c3 k0 u) -e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear -(CHead c4 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c3 (Bind -b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) -(ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind b) u) e2)) (\lambda -(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csuba_head g -c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3)))) -(\lambda (f: F).(\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def -(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g -e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csuba g e1 -e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: -C).(\lambda (H5: (csuba g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C -(\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) -u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: -C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall -(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda -(e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b -Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: -(clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) -(\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) (\lambda (e2: -C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba -g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) -u2) e2)) (CHead c4 (Bind b) u2) (csuba_void g c3 c4 H0 b H2 u1 u2) -(clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) -(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: -((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) -(\lambda (e2: C).(clear c4 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda -(H2: (arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u -a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c3 (Bind Abst) t) -e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) -e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind Abst) t) e2)) -(\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) -u) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abbr c4 u)) e1 -(clear_gen_bind Abst c3 e1 t H4))))))))))))) c1 c2 H)))). - -lemma csuba_clear_trans: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c2 c1) \to -(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) -(\lambda (e2: C).(clear c2 e2)))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c2 -c1)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear -c0 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c -e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) -e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e2 e1)) -(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c4 -e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c3 -e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: -(clear (CHead c4 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c4 k0 u) -e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear -(CHead c3 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c4 (Bind -b) u) e1)).(eq_ind_r C (CHead c4 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind b) u) e2)))) -(ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind b) u))) (\lambda -(e2: C).(clear (CHead c3 (Bind b) u) e2)) (CHead c3 (Bind b) u) (csuba_head g -c3 c4 H0 (Bind b) u) (clear_bind b c3 u)) e1 (clear_gen_bind b c4 e1 u H3)))) -(\lambda (f: F).(\lambda (H3: (clear (CHead c4 (Flat f) u) e1)).(let H4 \def -(H1 e1 (clear_gen_flat f c4 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g -e2 e1)) (\lambda (e2: C).(clear c3 e2)) (ex2 C (\lambda (e2: C).(csuba g e2 -e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) u) e2))) (\lambda (x: -C).(\lambda (H5: (csuba g x e1)).(\lambda (H6: (clear c3 x)).(ex_intro2 C -(\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) -u) e2)) x H5 (clear_flat c3 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: -C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall -(e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda -(e2: C).(clear c3 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b -Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: -(clear (CHead c4 (Bind b) u2) e1)).(eq_ind_r C (CHead c4 (Bind b) u2) -(\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g e2 c)) (\lambda (e2: -C).(clear (CHead c3 (Bind Void) u1) e2)))) (ex_intro2 C (\lambda (e2: -C).(csuba g e2 (CHead c4 (Bind b) u2))) (\lambda (e2: C).(clear (CHead c3 -(Bind Void) u1) e2)) (CHead c3 (Bind Void) u1) (csuba_void g c3 c4 H0 b H2 u1 -u2) (clear_bind Void c3 u1)) e1 (clear_gen_bind b c4 e1 u2 H3)))))))))))) -(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: -((\forall (e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) -(\lambda (e2: C).(clear c3 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda -(H2: (arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u -a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c4 (Bind Abbr) u) -e1)).(eq_ind_r C (CHead c4 (Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) -e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind Abbr) u))) -(\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) e2)) (CHead c3 (Bind Abst) -t) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abst c3 t)) e1 -(clear_gen_bind Abbr c4 e1 u H4))))))))))))) c2 c1 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/csuba/defs.ma deleted file mode 100644 index 948ee345d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/defs.ma +++ /dev/null @@ -1,30 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/arity/defs.ma". - -inductive csuba (g: G): C \to (C \to Prop) \def -| csuba_sort: \forall (n: nat).(csuba g (CSort n) (CSort n)) -| csuba_head: \forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall -(k: K).(\forall (u: T).(csuba g (CHead c1 k u) (CHead c2 k u)))))) -| csuba_void: \forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall -(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csuba g -(CHead c1 (Bind Void) u1) (CHead c2 (Bind b) u2)))))))) -| csuba_abst: \forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall -(t: T).(\forall (a: A).((arity g c1 t (asucc g a)) \to (\forall (u: -T).((arity g c2 u a) \to (csuba g (CHead c1 (Bind Abst) t) (CHead c2 (Bind -Abbr) u))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/drop.ma b/matita/matita/contribs/lambdadelta/basic_1/csuba/drop.ma deleted file mode 100644 index 5a92a8ecd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/drop.ma +++ /dev/null @@ -1,2453 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csuba/fwd.ma". - -include "basic_1/drop/fwd.ma". - -lemma csuba_drop_abbr: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i -O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g -c1 c2) \to (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))))) -(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 -(CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: -(csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 -(CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H)) in -(let H_x \def (csuba_gen_abbr g d1 c2 u H1) in (let H2 \def H_x in (ex2_ind C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba -g d1 d2)) (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H3: (eq C c2 -(CHead x (Bind Abbr) u))).(\lambda (H4: (csuba g d1 x)).(eq_ind_r C (CHead x -(Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (ex_intro2 C (\lambda -(d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abbr) u)) H4) c2 H3)))) -H2))))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: -C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2)))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: -C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: C).(drop (S -n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))) -(\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) -O (CSort n0) (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: -C).(\lambda (_: (csuba g (CSort n0) c2)).(and3_ind (eq C (CHead d1 (Bind -Abbr) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u) (CSort n0))).(\lambda (H3: -(eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n) -(\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H3) in (False_ind (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead -d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H5))))) (drop_gen_sort -n0 (S n) O (CHead d1 (Bind Abbr) u) H0))))))))) (\lambda (c: C).(\lambda (H0: -((\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) -\to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u: -T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abbr) -u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) -c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) -O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (b: -B).(\lambda (H3: (csuba g (CHead c (Bind b) t) c2)).(\lambda (H4: (drop (r -(Bind b) n) O c (CHead d1 (Bind Abbr) u))).(B_ind (\lambda (b0: B).((csuba g -(CHead c (Bind b0) t) c2) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind -Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) -u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H5: (csuba g (CHead c -(Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 (Bind -Abbr) u))).(let H_x \def (csuba_gen_abbr g c c2 t H5) in (let H7 \def H_x in -(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: -C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H8: -(eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C -(CHead x (Bind Abbr) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) -O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 -\def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead -d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead -x0 (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x0)).(let H13 \def (refl_equal -nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: -nat).(drop n0 O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) -n x (CHead x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) -(\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda (H6: (drop (r -(Bind Abst) n) O c (CHead d1 (Bind Abbr) u))).(let H_x \def (csuba_gen_abst g -c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 -(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq -C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba -g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H9: (eq C c2 -(CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x -(Bind Abst) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H11 \def -(H c d1 u H6 g x H10) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead -x0 (Bind Abbr) u))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal -nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: -nat).(drop n0 O x (CHead x0 (Bind Abbr) u))) H12 (r (Bind Abbr) n) H14) in -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) -n x (CHead x0 (Bind Abbr) u) H15 t) H13)))))) H11)) c2 H9)))) H8)) (\lambda -(H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g -c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity -g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 a)))) (ex2 C (\lambda (d2: C).(drop (S n) O -c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 -(Bind Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t -(asucc g x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind -Abbr) x1) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H13 \def (H c d1 u -H6 g x0 H10) in (ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S -n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H14: (drop n O x0 (CHead x -(Bind Abbr) u))).(\lambda (H15: (csuba g d1 x)).(let H16 \def (refl_equal nat -(r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 -O x0 (CHead x (Bind Abbr) u))) H14 (r (Bind Abbr) n) H16) in (ex_intro2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 -(CHead x (Bind Abbr) u) H17 x1) H15)))))) H13)) c2 H9)))))))) H8)) H7))))) -(\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r -(Bind Void) n) O c (CHead d1 (Bind Abbr) u))).(let H_x \def (csuba_gen_void g -c c2 t H5) in (let H7 \def H_x in (ex2_3_ind B C T (\lambda (b0: B).(\lambda -(d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b0) u2))))) (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csuba g c d2)))) (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H8: (eq C -c2 (CHead x1 (Bind x0) x2))).(\lambda (H9: (csuba g c x1)).(eq_ind_r C (CHead -x1 (Bind x0) x2) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def -(H c d1 u H6 g x1 H9) in (ex2_ind C (\lambda (d2: C).(drop n O x1 (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H11: (drop n O x1 (CHead -x (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x)).(let H13 \def (refl_equal -nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: -nat).(drop n0 O x1 (CHead x (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind x0) n -x1 (CHead x (Bind Abbr) u) H14 x2) H12)))))) H10)) c2 H8)))))) H7))))) b H3 -H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) -c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) u))).(let -H_x \def (csuba_gen_flat g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T -(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g c d2))) (ex2 C (\lambda (d2: C).(drop (S n) -O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) -x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) x1) -(\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H8 \def (H0 d1 u H4 g x0 -H7) in (ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) -u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O -(CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g -d1 d2))) (\lambda (x: C).(\lambda (H9: (drop (S n) O x0 (CHead x (Bind Abbr) -u))).(\lambda (H10: (csuba g d1 x)).(ex_intro2 C (\lambda (d2: C).(drop (S n) -O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g -d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abbr) u) H9 x1) H10)))) -H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u) t n -H1)))))))))))) c1)))) i). - -lemma csuba_drop_abst: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop i -O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba -g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop n -O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: -T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abst) u1))).(\lambda (g: -G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 -(\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abst) u1) (drop_gen_refl -c1 (CHead d1 (Bind Abst) u1) H)) in (let H_x \def (csuba_gen_abst g d1 c2 u1 -H1) in (let H2 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H3: -(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O -O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x -(Bind Abst) u1))).(\lambda (H5: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind -Abst) u1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) -u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind -Abst) u1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: -C).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abst) u1)) H5)) c2 -H4)))) H3)) (\lambda (H3: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind -Abbr) x1))).(\lambda (H5: (csuba g d1 x0)).(\lambda (H6: (arity g d1 u1 -(asucc g x2))).(\lambda (H7: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind -Abbr) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abbr) -x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind -Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))) x0 x1 x2 (drop_refl (CHead x0 (Bind Abbr) x1)) H5 H6 -H7)) c2 H4)))))))) H3)) H2))))))))))) (\lambda (n: nat).(\lambda (H: -((\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 -(Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to -(or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: -C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop -(S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a))))))))))))) (\lambda (n0: nat).(\lambda (d1: -C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind -Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g (CSort n0) -c2)).(and3_ind (eq C (CHead d1 (Bind Abst) u1) (CSort n0)) (eq nat (S n) O) -(eq nat O O) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (_: (eq C (CHead d1 (Bind Abst) u1) (CSort n0))).(\lambda -(H3: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S -n) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H3) in (False_ind (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))) H5))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u1) -H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u1: -T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall -(c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda -(u1: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abst) -u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) -c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) -O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O -c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))))))) (\lambda (b: B).(\lambda (H3: (csuba g (CHead c -(Bind b) t) c2)).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abst) -u1))).(B_ind (\lambda (b0: B).((csuba g (CHead c (Bind b0) t) c2) \to ((drop -(r (Bind b0) n) O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (H5: (csuba g -(CHead c (Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead -d1 (Bind Abst) u1))).(let H_x \def (csuba_gen_abbr g c c2 t H5) in (let H7 -\def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) -(\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) -t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) -(\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda (d2: -C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda -(H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead -x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def -(refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda -(n0: nat).(drop n0 O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) -in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abst) -u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: -(drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H13: (csuba g d1 -x0)).(\lambda (H14: (arity g d1 u1 (asucc g x2))).(\lambda (H15: (arity g x0 -x1 x2)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def -(eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) x1))) H12 -(r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O -(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g -d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop -(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abbr) -n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 -H8)))) H7))))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda -(H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) u1))).(let H_x \def -(csuba_gen_abst g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C (\lambda -(d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g -c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity -g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) -t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 -(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: -C).(\lambda (H9: (eq C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c -x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda -(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba -g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H11 \def (H c d1 u1 H6 g -x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C -(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind -Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: -C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H14: -(csuba g d1 x0)).(let H15 \def (refl_equal nat (r (Bind Abbr) n)) in (let H16 -\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) -u1))) H13 (r (Bind Abbr) n) H15) in (or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) -n x (CHead x0 (Bind Abst) u1) H16 t) H14))))))) H12)) (\lambda (H12: (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: -(drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H14: (csuba g d1 -x0)).(\lambda (H15: (arity g d1 u1 (asucc g x2))).(\lambda (H16: (arity g x0 -x1 x2)).(let H17 \def (refl_equal nat (r (Bind Abbr) n)) in (let H18 \def -(eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) x1))) H13 -(r (Bind Abbr) n) H17) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O -(CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g -d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop -(S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abst) -n x (CHead x0 (Bind Abbr) x1) H18 t) H14 H15 H16))))))))))) H12)) H11)) c2 -H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind -Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t (asucc g -x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) -(\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in (or_ind (ex2 C (\lambda -(d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda -(H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H15: (drop n O x0 (CHead -x (Bind Abst) u1))).(\lambda (H16: (csuba g d1 x)).(let H17 \def (refl_equal -nat (r (Bind Abbr) n)) in (let H18 \def (eq_ind nat n (\lambda (n0: -nat).(drop n0 O x0 (CHead x (Bind Abst) u1))) H15 (r (Bind Abbr) n) H17) in -(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 (CHead x -(Bind Abst) u1) H18 x1) H16))))))) H14)) (\lambda (H14: (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H15: -(drop n O x0 (CHead x3 (Bind Abbr) x4))).(\lambda (H16: (csuba g d1 -x3)).(\lambda (H17: (arity g d1 u1 (asucc g x5))).(\lambda (H18: (arity g x3 -x4 x5)).(let H19 \def (refl_equal nat (r (Bind Abbr) n)) in (let H20 \def -(eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x3 (Bind Abbr) x4))) -H15 (r (Bind Abbr) n) H19) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) -O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 -(drop_drop (Bind Abbr) n x0 (CHead x3 (Bind Abbr) x4) H20 x1) H16 H17 -H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g -(CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead -d1 (Bind Abst) u1))).(let H_x \def (csuba_gen_void g c c2 t H5) in (let H7 -\def H_x in (ex2_3_ind B C T (\lambda (b0: B).(\lambda (d2: C).(\lambda (u2: -T).(eq C c2 (CHead d2 (Bind b0) u2))))) (\lambda (_: B).(\lambda (d2: -C).(\lambda (_: T).(csuba g c d2)))) (or (ex2 C (\lambda (d2: C).(drop (S n) -O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (H8: (eq C c2 (CHead x1 (Bind x0) x2))).(\lambda (H9: (csuba g c -x1)).(eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c0: C).(or (ex2 C (\lambda -(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba -g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g -x1 H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x1 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x1 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x1 (Bind x0) x2) -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x1 -(Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H11: (ex2 C (\lambda -(d2: C).(drop n O x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x1 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O -(CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g -d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop -(S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: -C).(\lambda (H12: (drop n O x1 (CHead x (Bind Abst) u1))).(\lambda (H13: -(csuba g d1 x)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 -\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x1 (CHead x (Bind Abst) -u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind x0) n -x1 (CHead x (Bind Abst) u1) H15 x2) H13))))))) H11)) (\lambda (H11: (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x1 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H12: -(drop n O x1 (CHead x3 (Bind Abbr) x4))).(\lambda (H13: (csuba g d1 -x3)).(\lambda (H14: (arity g d1 u1 (asucc g x5))).(\lambda (H15: (arity g x3 -x4 x5)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def -(eq_ind nat n (\lambda (n0: nat).(drop n0 O x1 (CHead x3 (Bind Abbr) x4))) -H12 (r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) -O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba -g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 -(drop_drop (Bind x0) n x1 (CHead x3 (Bind Abbr) x4) H17 x2) H13 H14 -H15))))))))))) H11)) H10)) c2 H8)))))) H7))))) b H3 H4)))) (\lambda (f: -F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda (H4: (drop (r -(Flat f) n) O c (CHead d1 (Bind Abst) u1))).(let H_x \def (csuba_gen_flat g c -c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T (\lambda (d2: C).(\lambda -(u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g c d2))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 -(Flat f) x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) -x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))) (let H8 \def (H0 d1 u1 H4 g x0 H7) in (or_ind (ex2 C (\lambda (d2: -C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda -(d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba -g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H10: -(drop (S n) O x0 (CHead x (Bind Abst) u1))).(\lambda (H11: (csuba g d1 -x)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u1) -H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H10: -(drop (S n) O x0 (CHead x2 (Bind Abbr) x3))).(\lambda (H11: (csuba g d1 -x2)).(\lambda (H12: (arity g d1 u1 (asucc g x4))).(\lambda (H13: (arity g x2 -x3 x4)).(or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) -x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind -Abbr) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5)))))) k H2 -(drop_gen_drop k c (CHead d1 (Bind Abst) u1) t n H1)))))))))))) c1)))) i). - -lemma csuba_drop_abst_rev: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i -O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g -c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop n -O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop n O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))))) (\lambda (c1: -C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 (CHead d1 (Bind -Abst) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c2 -c1)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c2 c)) H0 (CHead d1 -(Bind Abst) u) (drop_gen_refl c1 (CHead d1 (Bind Abst) u) H)) in (let H_x -\def (csuba_gen_abst_rev g d1 c2 u H1) in (let H2 \def H_x in (or_ind (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba -g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or -(ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (H3: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C -(\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) -u))).(\lambda (H5: (csuba g x d1)).(eq_ind_r C (CHead x (Bind Abst) u) -(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O -(CHead x (Bind Abst) u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g -d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x -(Bind Abst) u) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind -Abst) u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x -(drop_refl (CHead x (Bind Abst) u)) H5)) c2 H4)))) H3)) (\lambda (H3: (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda -(d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop O O c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop O O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind Void) -x1))).(\lambda (H5: (csuba g x0 d1)).(eq_ind_r C (CHead x0 (Bind Void) x1) -(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O -(CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba -g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x0 -(Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop O O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_refl (CHead x0 (Bind -Void) x1)) H5)) c2 H4))))) H3)) H2))))))))))) (\lambda (n: nat).(\lambda (H: -((\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 -(Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c1) \to (or -(ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: -C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abst) u)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop -(S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) -(\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) -O (CSort n0) (CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: -C).(\lambda (_: (csuba g c2 (CSort n0))).(and3_ind (eq C (CHead d1 (Bind -Abst) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (or (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) -(\lambda (_: (eq C (CHead d1 (Bind Abst) u) (CSort n0))).(\lambda (H3: (eq -nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n) -(\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H3) in (False_ind (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) H5))))) -(drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u) H0))))))))) (\lambda (c: -C).(\lambda (H0: ((\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 -(Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c) \to (or -(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop -(S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: -C).(\lambda (u: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind -Abst) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g c2 (CHead -c k t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead c k0 t)) \to ((drop (r -k0 n) O c (CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(drop (S -n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (b: -B).(\lambda (H3: (csuba g c2 (CHead c (Bind b) t))).(\lambda (H4: (drop (r -(Bind b) n) O c (CHead d1 (Bind Abst) u))).(B_ind (\lambda (b0: B).((csuba g -c2 (CHead c (Bind b0) t)) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind -Abst) u)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (H5: (csuba g c2 -(CHead c (Bind Abbr) t))).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 -(Bind Abst) u))).(let H_x \def (csuba_gen_abbr_rev g c c2 t H5) in (let H7 -\def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) -t))) (\lambda (d2: C).(csuba g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 c)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) -(\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) -(\lambda (d2: C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 -(CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) -O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind Abbr) -t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C (CHead x (Bind Abbr) t) -(\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H11 \def (H c d1 u H6 g x -H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind -Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba -g d2 d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: -C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) -(or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x0: C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) u))).(\lambda (H14: -(csuba g x0 d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind -Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba -g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) -t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop -(Bind Abbr) n x (CHead x0 (Bind Abst) u) H13 t) H14))))) H12)) (\lambda (H12: -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind -C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or (ex2 C (\lambda -(d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead x0 (Bind Void) -x1))).(\lambda (H14: (csuba g x0 d1)).(or_intror (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop -(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 -(drop_drop (Bind Abbr) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) -H11)) c2 H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc -g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) -(or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: -A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g -x0 c)).(\lambda (_: (arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t -x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) (\lambda (c0: C).(or (ex2 C -(\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) -O c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1)))))) (let H13 \def (H c d1 u H6 g x0 H10) in (or_ind (ex2 C (\lambda -(d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x: C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H16: -(csuba g x d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 -(Bind Abst) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind -Abst) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 -(Bind Abst) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) -x (drop_drop (Bind Abst) n x0 (CHead x (Bind Abst) u) H15 x1) H16))))) H14)) -(\lambda (H14: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x3: C).(\lambda (x4: T).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Void) -x4))).(\lambda (H16: (csuba g x3 d1)).(or_intror (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda -(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x3 x4 -(drop_drop (Bind Abst) n x0 (CHead x3 (Bind Void) x4) H15 x1) H16)))))) H14)) -H13)) c2 H9)))))))) H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -c))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H9: -(eq C c2 (CHead x0 (Bind Void) x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r -C (CHead x0 (Bind Void) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: -C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let -H11 \def (H c d1 u H6 g x0 H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O -x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H12: (ex2 C -(\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda -(H13: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H14: (csuba g x -d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) -x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop -(Bind Void) n x0 (CHead x (Bind Abst) u) H13 x1) H14))))) H12)) (\lambda -(H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) -x3))).(\lambda (H14: (csuba g x2 d1)).(or_intror (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda -(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 -(drop_drop (Bind Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) -H11)) c2 H9))))) H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abst) -t))).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) -u))).(let H_x \def (csuba_gen_abst_rev g c c2 t H5) in (let H7 \def H_x in -(or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda -(d2: C).(csuba g d2 c))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -c)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 -(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g d2 c)))).(ex2_ind C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba -g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq C c2 -(CHead x (Bind Abst) t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C (CHead x -(Bind Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H11 \def (H -c d1 u H6 g x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) -O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba -g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C -(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind -Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x0: C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) -u))).(\lambda (H14: (csuba g x0 d1)).(or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) -O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S -n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abst) u) -H13 t) H14))))) H12)) (\lambda (H12: (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind -Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead -x0 (Bind Void) x1))).(\lambda (H14: (csuba g x0 d1)).(or_intror (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda -(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 -(drop_drop (Bind Abst) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) -H11)) c2 H9)))) H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -c))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H9: -(eq C c2 (CHead x0 (Bind Void) x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r -C (CHead x0 (Bind Void) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: -C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let -H11 \def (H c d1 u H6 g x0 H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O -x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H12: (ex2 C -(\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda -(H13: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H14: (csuba g x -d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) -x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop -(Bind Void) n x0 (CHead x (Bind Abst) u) H13 x1) H14))))) H12)) (\lambda -(H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) -x3))).(\lambda (H14: (csuba g x2 d1)).(or_intror (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda -(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 -(drop_drop (Bind Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) -H11)) c2 H9))))) H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Void) -t))).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abst) -u))).(let H_x \def (csuba_gen_void_rev g c c2 t H5) in (let H7 \def H_x in -(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: -C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H8: (eq -C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C -(CHead x (Bind Void) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S -n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H10 \def (H -c d1 u H6 g x H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) -O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba -g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x (Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C -(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind -Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) -u))).(\lambda (H13: (csuba g x0 d1)).(or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) -O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S -n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abst) u) -H12 t) H13))))) H11)) (\lambda (H11: (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind -Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H12: (drop n O x (CHead -x0 (Bind Void) x1))).(\lambda (H13: (csuba g x0 d1)).(or_intror (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda -(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 -(drop_drop (Bind Void) n x (CHead x0 (Bind Void) x1) H12 t) H13)))))) H11)) -H10)) c2 H8)))) H7))))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g c2 -(CHead c (Flat f) t))).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind -Abst) u))).(let H_x \def (csuba_gen_flat_rev g c c2 t f H3) in (let H5 \def -H_x in (ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 -(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) -O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 -(Flat f) x1))).(\lambda (H7: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Flat f) -x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H8 \def (H0 d1 u H4 g x0 -H7) in (or_ind (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) -O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g -d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 -(Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S n) O x0 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C -(\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat -f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C -T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abst) -u))).(\lambda (H11: (csuba g x d1)).(or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) -O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S -n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u) H10 -x1) H11))))) H9)) (\lambda (H9: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 -(Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) -x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (drop (S n) O x0 -(CHead x2 (Bind Void) x3))).(\lambda (H11: (csuba g x2 d1)).(or_intror (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda -(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 -(drop_drop (Flat f) n x0 (CHead x2 (Bind Void) x3) H10 x1) H11)))))) H9)) -H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u) t n -H1)))))))))))) c1)))) i). - -lemma csuba_drop_abbr_rev: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop i -O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba -g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(drop n -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda -(H: (drop O O c1 (CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: -C).(\lambda (H0: (csuba g c2 c1)).(let H1 \def (eq_ind C c1 (\lambda (c: -C).(csuba g c2 c)) H0 (CHead d1 (Bind Abbr) u1) (drop_gen_refl c1 (CHead d1 -(Bind Abbr) u1) H)) in (let H_x \def (csuba_gen_abbr_rev g d1 c2 u1 H1) in -(let H2 \def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O -O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop O O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H3: (ex2 C (\lambda (d2: C).(eq C c2 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda -(d2: C).(eq C c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1)) (or3 (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop O O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda -(H4: (eq C c2 (CHead x (Bind Abbr) u1))).(\lambda (H5: (csuba g x -d1)).(eq_ind_r C (CHead x (Bind Abbr) u1) (\lambda (c: C).(or3 (ex2 C -(\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop O O c (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))))) (or3_intro0 (ex2 C (\lambda (d2: -C).(drop O O (CHead x (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop O O (CHead x (Bind Abbr) u1) (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x (Bind Abbr) -u1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) u1) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_refl -(CHead x (Bind Abbr) u1)) H5)) c2 H4)))) H3)) (\lambda (H3: (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O -O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop O O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: -A).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abst) x1))).(\lambda (H5: (csuba g -x0 d1)).(\lambda (H6: (arity g x0 x1 (asucc g x2))).(\lambda (H7: (arity g d1 -u1 x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) (\lambda (c: C).(or3 (ex2 C -(\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop O O c (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))))) (or3_intro1 (ex2 C (\lambda (d2: -C).(drop O O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x0 (Bind Abst) -x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop O O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 -(drop_refl (CHead x0 (Bind Abst) x1)) H5 H6 H7)) c2 H4)))))))) H3)) (\lambda -(H3: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind -C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O -O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop O O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H4: (eq C -c2 (CHead x0 (Bind Void) x1))).(\lambda (H5: (csuba g x0 d1)).(eq_ind_r C -(CHead x0 (Bind Void) x1) (\lambda (c: C).(or3 (ex2 C (\lambda (d2: C).(drop -O O c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O c (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) -(or3_intro2 (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind -Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop O O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T -(\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x0 (Bind Void) x1) (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 -x1 (drop_refl (CHead x0 (Bind Void) x1)) H5)) c2 H4))))) H3)) H2))))))))))) -(\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).(\forall -(u1: T).((drop n O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: G).(\forall -(c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(drop n O c2 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: -C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c2 c) \to (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) (\lambda (n0: -nat).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) -(CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: -(csuba g c2 (CSort n0))).(and3_ind (eq C (CHead d1 (Bind Abbr) u1) (CSort -n0)) (eq nat (S n) O) (eq nat O O) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O -c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u1) -(CSort n0))).(\lambda (H3: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let -H5 \def (eq_ind nat (S n) (\lambda (ee: nat).(match ee with [O \Rightarrow -False | (S _) \Rightarrow True])) I O H3) in (False_ind (or3 (ex2 C (\lambda -(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) H5))))) (drop_gen_sort n0 (S n) O -(CHead d1 (Bind Abbr) u1) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall -(d1: C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to -(\forall (g: G).(\forall (c2: C).((csuba g c2 c) \to (or3 (ex2 C (\lambda -(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))))).(\lambda (k: K).(\lambda -(t: T).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H1: (drop (S n) O (CHead c -k t) (CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda -(H2: (csuba g c2 (CHead c k t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead -c k0 t)) \to ((drop (r k0 n) O c (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (b: -B).(\lambda (H3: (csuba g c2 (CHead c (Bind b) t))).(\lambda (H4: (drop (r -(Bind b) n) O c (CHead d1 (Bind Abbr) u1))).(B_ind (\lambda (b0: B).((csuba g -c2 (CHead c (Bind b0) t)) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind -Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda -(H5: (csuba g c2 (CHead c (Bind Abbr) t))).(\lambda (H6: (drop (r (Bind Abbr) -n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_abbr_rev g c c2 t -H5) in (let H7 \def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead -d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g d2 c))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c)))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H8: -(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: -C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind -Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq -C c2 (CHead x (Bind Abbr) t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C -(CHead x (Bind Abbr) t) (\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop -(S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))))) (let H11 \def (H c d1 u1 H6 g x H10) in (or3_ind -(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S -n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: -C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) -(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) -t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H14: -(csuba g x0 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop -(Bind Abbr) n x (CHead x0 (Bind Abbr) u1) H13 t) H14))))) H12)) (\lambda -(H12: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x (CHead x0 -(Bind Abst) x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: (arity g x0 -x1 (asucc g x2))).(\lambda (H16: (arity g d1 u1 x2)).(or3_intro1 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n -x (CHead x0 (Bind Abst) x1) H13 t) H14 H15 H16))))))))) H12)) (\lambda (H12: -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind -C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead x0 (Bind Void) -x1))).(\lambda (H14: (csuba g x0 d1)).(or3_intro2 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_drop (Bind -Abbr) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) H11)) c2 H9)))) -H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) (or3 (ex2 -C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind -Abst) x1))).(\lambda (H10: (csuba g x0 c)).(\lambda (_: (arity g x0 x1 (asucc -g x2))).(\lambda (_: (arity g c t x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) -(\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in (or3_ind (ex2 C (\lambda -(d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 -(Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: -C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) -(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) -x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda -(H15: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H16: (csuba g x -d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) -x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind Abst) n x0 -(CHead x (Bind Abbr) u1) H15 x1) H16))))) H14)) (\lambda (H14: (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: -A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abst) x4))).(\lambda (H16: -(csuba g x3 d1)).(\lambda (H17: (arity g x3 x4 (asucc g x5))).(\lambda (H18: -(arity g d1 u1 x5)).(or3_intro1 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x3 x4 x5 -(drop_drop (Bind Abst) n x0 (CHead x3 (Bind Abst) x4) H15 x1) H16 H17 -H18))))))))) H14)) (\lambda (H14: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop -n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x3: C).(\lambda (x4: T).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Void) -x4))).(\lambda (H16: (csuba g x3 d1)).(or3_intro2 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x3 x4 (drop_drop (Bind -Abst) n x0 (CHead x3 (Bind Void) x4) H15 x1) H16)))))) H14)) H13)) c2 -H9)))))))) H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -c))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (H9: (eq C c2 (CHead x0 (Bind Void) -x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Bind Void) x1) -(\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))) (let H11 \def (H c d1 u1 H6 g x0 H10) in (or3_ind (ex2 C (\lambda -(d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 -(Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: -C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) -(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) -x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda -(H13: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H14: (csuba g x -d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) -x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind Void) n x0 -(CHead x (Bind Abbr) u1) H13 x1) H14))))) H12)) (\lambda (H12: (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -A).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Abst) x3))).(\lambda (H14: -(csuba g x2 d1)).(\lambda (H15: (arity g x2 x3 (asucc g x4))).(\lambda (H16: -(arity g d1 u1 x4)).(or3_intro1 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x2 x3 x4 -(drop_drop (Bind Void) n x0 (CHead x2 (Bind Abst) x3) H13 x1) H14 H15 -H16))))))))) H12)) (\lambda (H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop -n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) -x3))).(\lambda (H14: (csuba g x2 d1)).(or3_intro2 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 (drop_drop (Bind -Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) H11)) c2 H9))))) -H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abst) t))).(\lambda -(H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def -(csuba_gen_abst_rev g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba -g d2 c))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c)))) (or3 -(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H8: -(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: -C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind -Abst) t))) (\lambda (d2: C).(csuba g d2 c)) (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq -C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C -(CHead x (Bind Abst) t) (\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop -(S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))))) (let H11 \def (H c d1 u1 H6 g x H10) in (or3_ind -(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S -n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: -C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) -(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) -t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H14: -(csuba g x0 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop -(Bind Abst) n x (CHead x0 (Bind Abbr) u1) H13 t) H14))))) H12)) (\lambda -(H12: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x (CHead x0 -(Bind Abst) x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: (arity g x0 -x1 (asucc g x2))).(\lambda (H16: (arity g d1 u1 x2)).(or3_intro1 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abst) n -x (CHead x0 (Bind Abst) x1) H13 t) H14 H15 H16))))))))) H12)) (\lambda (H12: -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind -C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead x0 (Bind Void) -x1))).(\lambda (H14: (csuba g x0 d1)).(or3_intro2 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x -(Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_drop (Bind -Abst) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) H11)) c2 H9)))) -H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c))) (or3 -(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H9: (eq C c2 (CHead x0 (Bind Void) -x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Bind Void) x1) -(\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))) (let H11 \def (H c d1 u1 H6 g x0 H10) in (or3_ind (ex2 C (\lambda -(d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 -(Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: -C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) -(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) -x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda -(H13: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H14: (csuba g x -d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) -x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind Void) n x0 -(CHead x (Bind Abbr) u1) H13 x1) H14))))) H12)) (\lambda (H12: (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -A).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Abst) x3))).(\lambda (H14: -(csuba g x2 d1)).(\lambda (H15: (arity g x2 x3 (asucc g x4))).(\lambda (H16: -(arity g d1 u1 x4)).(or3_intro1 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x2 x3 x4 -(drop_drop (Bind Void) n x0 (CHead x2 (Bind Abst) x3) H13 x1) H14 H15 -H16))))))))) H12)) (\lambda (H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop -n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 -(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) -x3))).(\lambda (H14: (csuba g x2 d1)).(or3_intro2 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 (drop_drop (Bind -Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) H11)) c2 H9))))) -H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Void) t))).(\lambda -(H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def -(csuba_gen_void_rev g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda -(d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g d2 c)) -(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: -C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g x -c)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(or3 (ex2 C (\lambda -(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H10 \def (H c d1 u1 H6 g x -H9) in (or3_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H11: (ex2 C -(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x -(Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 -(Bind Abbr) u1))).(\lambda (H13: (csuba g x0 d1)).(or3_intro0 (ex2 C (\lambda -(d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x -(Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) -x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) u1) H12 t) H13))))) H11)) -(\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 -(Bind Abst) x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 -x1 (asucc g x2))).(\lambda (H15: (arity g d1 u1 x2)).(or3_intro1 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Void) n -x (CHead x0 (Bind Abst) x1) H12 t) H13 H14 H15))))))))) H11)) (\lambda (H11: -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind -C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H12: (drop n O x (CHead x0 (Bind Void) -x1))).(\lambda (H13: (csuba g x0 d1)).(or3_intro2 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x -(Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_drop (Bind -Void) n x (CHead x0 (Bind Void) x1) H12 t) H13)))))) H11)) H10)) c2 H8)))) -H7))))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g c2 (CHead c (Flat -f) t))).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) -u1))).(let H_x \def (csuba_gen_flat_rev g c c2 t f H3) in (let H5 \def H_x in -(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c))) (or3 (ex2 C (\lambda -(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g x0 -c)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c0: C).(or3 (ex2 C (\lambda -(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H8 \def (H0 d1 u1 H4 g x0 -H7) in (or3_ind (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O x0 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H9: (ex2 C (\lambda -(d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) -x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abbr) -u1))).(\lambda (H11: (csuba g x d1)).(or3_intro0 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) -x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop -(Flat f) n x0 (CHead x (Bind Abbr) u1) H10 x1) H11))))) H9)) (\lambda (H9: -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x2: C).(\lambda (x3: -T).(\lambda (x4: A).(\lambda (H10: (drop (S n) O x0 (CHead x2 (Bind Abst) -x3))).(\lambda (H11: (csuba g x2 d1)).(\lambda (H12: (arity g x2 x3 (asucc g -x4))).(\lambda (H13: (arity g d1 u1 x4)).(or3_intro1 (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) -x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x2 x3 x4 -(drop_drop (Flat f) n x0 (CHead x2 (Bind Abst) x3) H10 x1) H11 H12 -H13))))))))) H9)) (\lambda (H9: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 -(Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) -(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (drop (S n) O x0 (CHead x2 -(Bind Void) x3))).(\lambda (H11: (csuba g x2 d1)).(or3_intro2 (ex2 C (\lambda -(d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead -x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 (drop_drop (Flat f) n x0 -(CHead x2 (Bind Void) x3) H10 x1) H11)))))) H9)) H8)) c2 H6))))) H5)))))) k -H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u1) t n H1)))))))))))) c1)))) i). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/csuba/fwd.ma deleted file mode 100644 index b94c9c8d4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/fwd.ma +++ /dev/null @@ -1,1024 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csuba/defs.ma". - -implied rec lemma csuba_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: -nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csuba -g c1 c2) \to ((P c1 c2) \to (\forall (k: K).(\forall (u: T).(P (CHead c1 k u) -(CHead c2 k u))))))))) (f1: (\forall (c1: C).(\forall (c2: C).((csuba g c1 -c2) \to ((P c1 c2) \to (\forall (b: B).((not (eq B b Void)) \to (\forall (u1: -T).(\forall (u2: T).(P (CHead c1 (Bind Void) u1) (CHead c2 (Bind b) -u2))))))))))) (f2: (\forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to ((P -c1 c2) \to (\forall (t: T).(\forall (a: A).((arity g c1 t (asucc g a)) \to -(\forall (u: T).((arity g c2 u a) \to (P (CHead c1 (Bind Abst) t) (CHead c2 -(Bind Abbr) u)))))))))))) (c: C) (c0: C) (c1: csuba g c c0) on c1: P c c0 -\def match c1 with [(csuba_sort n) \Rightarrow (f n) | (csuba_head c2 c3 c4 k -u) \Rightarrow (f0 c2 c3 c4 ((csuba_ind g P f f0 f1 f2) c2 c3 c4) k u) | -(csuba_void c2 c3 c4 b n u1 u2) \Rightarrow (f1 c2 c3 c4 ((csuba_ind g P f f0 -f1 f2) c2 c3 c4) b n u1 u2) | (csuba_abst c2 c3 c4 t a a0 u a1) \Rightarrow -(f2 c2 c3 c4 ((csuba_ind g P f f0 f1 f2) c2 c3 c4) t a a0 u a1)]. - -lemma csuba_gen_abbr: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g -(CHead d1 (Bind Abbr) u) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: -(csuba g (CHead d1 (Bind Abbr) u) c)).(insert_eq C (CHead d1 (Bind Abbr) u) -(\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2 C (\lambda (d2: C).(eq -C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (\lambda -(y: C).(\lambda (H0: (csuba g y c)).(csuba_ind g (\lambda (c0: C).(\lambda -(c1: C).((eq C c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C -c1 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda -(n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abbr) u))).(let H2 -\def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) -u) H1) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H2)))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1 -(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (k: -K).(\lambda (u0: T).(\lambda (H3: (eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) -u))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u0) (CHead d1 -(Bind Abbr) u) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e -with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k -u0) (CHead d1 (Bind Abbr) u) H3) in ((let H6 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) -(CHead c1 k u0) (CHead d1 (Bind Abbr) u) H3) in (\lambda (H7: (eq K k (Bind -Abbr))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u (\lambda (t: T).(ex2 C -(\lambda (d2: C).(eq C (CHead c2 k t) (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2)))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 C -(\lambda (d2: C).(eq C (CHead c2 k0 u) (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2)))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C -c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) H2 d1 H8) in (let H10 -\def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in (ex_intro2 C -(\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Abbr) u)) -H10))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind -Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (b: B).(\lambda (_: (not (eq B -b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 -(Bind Void) u1) (CHead d1 (Bind Abbr) u))).(let H5 \def (eq_ind C (CHead c1 -(Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False -| (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0 -with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow -True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H4) in -(False_ind (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind b) u2) (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H5))))))))))) (\lambda -(c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C -c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (t: -T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0: -T).(\lambda (_: (arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) -t) (CHead d1 (Bind Abbr) u))).(let H6 \def (eq_ind C (CHead c1 (Bind Abst) t) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H5) in (False_ind (ex2 C -(\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u0) (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2))) H6)))))))))))) y c H0))) H))))). - -lemma csuba_gen_void: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g -(CHead d1 (Bind Void) u1) c) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: -C).(\lambda (u2: T).(eq C c (CHead d2 (Bind b) u2))))) (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda -(H: (csuba g (CHead d1 (Bind Void) u1) c)).(insert_eq C (CHead d1 (Bind Void) -u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2_3 B C T (\lambda -(b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind b) u2))))) -(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))) -(\lambda (y: C).(\lambda (H0: (csuba g y c)).(csuba_ind g (\lambda (c0: -C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T -(\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind b) -u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 -d2)))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind -Void) u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 -(Bind Void) u1) H1) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (d2: -C).(\lambda (u2: T).(eq C (CSort n) (CHead d2 (Bind b) u2))))) (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) H2)))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1 -(CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: -C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))).(\lambda (k: -K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead d1 (Bind Void) -u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u) (CHead d1 -(Bind Void) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e -with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k -u) (CHead d1 (Bind Void) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) -(CHead c1 k u) (CHead d1 (Bind Void) u1) H3) in (\lambda (H7: (eq K k (Bind -Void))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_3 B C -T (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k t) -(CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: -T).(csuba g d1 d2)))))) (eq_ind_r K (Bind Void) (\lambda (k0: K).(ex2_3 B C T -(\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k0 u1) -(CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: -T).(csuba g d1 d2)))))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 -(CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: -C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))) H2 d1 H8) in (let -H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in -(ex2_3_intro B C T (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C -(CHead c2 (Bind Void) u1) (CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda -(d2: C).(\lambda (_: T).(csuba g d1 d2)))) Void c2 u1 (refl_equal C (CHead c2 -(Bind Void) u1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1 -(CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: -C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))).(\lambda (b: -B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u0) (CHead d1 (Bind Void) -u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind Void) u0) -(CHead d1 (Bind Void) u1) H4) in ((let H6 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) -(CHead c1 (Bind Void) u0) (CHead d1 (Bind Void) u1) H4) in (\lambda (H7: (eq -C c1 d1)).(let H8 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1 -(Bind Void) u1)) \to (ex2_3 B C T (\lambda (b0: B).(\lambda (d2: C).(\lambda -(u3: T).(eq C c2 (CHead d2 (Bind b0) u3))))) (\lambda (_: B).(\lambda (d2: -C).(\lambda (_: T).(csuba g d1 d2))))))) H2 d1 H7) in (let H9 \def (eq_ind C -c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H7) in (ex2_3_intro B C T (\lambda -(b0: B).(\lambda (d2: C).(\lambda (u3: T).(eq C (CHead c2 (Bind b) u2) (CHead -d2 (Bind b0) u3))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba -g d1 d2)))) b c2 u2 (refl_equal C (CHead c2 (Bind b) u2)) H9))))) -H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 -c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T -(\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) -u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 -d2)))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc -g a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C -(CHead c1 (Bind Abst) t) (CHead d1 (Bind Void) u1))).(let H6 \def (eq_ind C -(CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind -Void) u1) H5) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (d2: -C).(\lambda (u2: T).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind b) u2))))) -(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) -H6)))))))))))) y c H0))) H))))). - -lemma csuba_gen_abst: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g -(CHead d1 (Bind Abst) u1) c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead -d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda -(H: (csuba g (CHead d1 (Bind Abst) u1) c)).(insert_eq C (CHead d1 (Bind Abst) -u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(or (ex2 C (\lambda (d2: -C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead -d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))))) (\lambda (y: C).(\lambda (H0: (csuba g y -c)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind -Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) -(\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst) -u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 -(Bind Abst) u1) H1) in (False_ind (or (ex2 C (\lambda (d2: C).(eq C (CSort n) -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CSort n) (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 -c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba -g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a))))))))).(\lambda (k: K).(\lambda (u: T).(\lambda -(H3: (eq C (CHead c1 k u) (CHead d1 (Bind Abst) u1))).(let H4 \def (f_equal C -C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead c0 _ _) -\Rightarrow c0])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H3) in ((let H5 -\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k | -(CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H3) -in ((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead d1 (Bind -Abst) u1) H3) in (\lambda (H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C c1 -d1)).(eq_ind_r T u1 (\lambda (t: T).(or (ex2 C (\lambda (d2: C).(eq C (CHead -c2 k t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 -C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 k t) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))))) (eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2 -C (\lambda (d2: C).(eq C (CHead c2 k0 u1) (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(eq C (CHead c2 k0 u1) (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) -(let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abst) -u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) H2 d1 H8) -in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in -(or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abst) u1) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind -Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) c2 -(refl_equal C (CHead c2 (Bind Abst) u1)) H10)))) k H7) u H6)))) H5)) -H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 -c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba -g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b -Void))).(\lambda (u0: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 (Bind -Void) u0) (CHead d1 (Bind Abst) u1))).(let H5 \def (eq_ind C (CHead c1 (Bind -Void) u0) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | -(CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0 with -[Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | -(Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abst) u1) H4) in (False_ind -(or (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind b) u2) (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u3: T).(\lambda (_: A).(eq C (CHead c2 (Bind b) u2) (CHead d2 -(Bind Abbr) u3))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 -u3 a)))))) H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: -(csuba g c1 c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or -(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))).(\lambda (t: T).(\lambda -(a: A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: T).(\lambda -(H4: (arity g c2 u a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead d1 -(Bind Abst) u1))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind -Abst) t) (CHead d1 (Bind Abst) u1) H5) in ((let H7 \def (f_equal C T (\lambda -(e: C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0) \Rightarrow -t0])) (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1) H5) in (\lambda (H8: -(eq C c1 d1)).(let H9 \def (eq_ind T t (\lambda (t0: T).(arity g c1 t0 (asucc -g a))) H3 u1 H7) in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(arity g c0 -u1 (asucc g a))) H9 d1 H8) in (let H11 \def (eq_ind C c1 (\lambda (c0: -C).((eq C c0 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C -c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc -g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 -a0)))))))) H2 d1 H8) in (let H12 \def (eq_ind C c1 (\lambda (c0: C).(csuba g -c0 c2)) H1 d1 H8) in (or_intror (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind -Abbr) u) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead -c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a0: A).(arity g d2 u2 a0))))) (ex4_3_intro C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) u) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity -g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: -A).(arity g d2 u2 a0)))) c2 u a (refl_equal C (CHead c2 (Bind Abbr) u)) H12 -H10 H4)))))))) H6)))))))))))) y c H0))) H))))). - -lemma csuba_gen_flat: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall -(f: F).((csuba g (CHead d1 (Flat f) u1) c) \to (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d1 d2))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda -(f: F).(\lambda (H: (csuba g (CHead d1 (Flat f) u1) c)).(insert_eq C (CHead -d1 (Flat f) u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d1 d2))))) (\lambda (y: C).(\lambda (H0: -(csuba g y c)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c0 -(CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq -C c1 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 -d2))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Flat f) -u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 -(Flat f) u1) H1) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d1 d2)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: -(csuba g c1 c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))).(\lambda (k: -K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead d1 (Flat f) -u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u) (CHead d1 -(Flat f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e with -[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) -(CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) -(CHead c1 k u) (CHead d1 (Flat f) u1) H3) in (\lambda (H7: (eq K k (Flat -f))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k t) (CHead d2 (Flat f) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) (eq_ind_r K (Flat -f) (\lambda (k0: K).(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead -c2 k0 u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d1 d2))))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1 -(Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 -(CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 -d2)))))) H2 d1 H8) in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 -c2)) H1 d1 H8) in (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C -(CHead c2 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d1 d2))) c2 u1 (refl_equal C (CHead c2 (Flat f) u1)) H10))) k -H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: -(csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2 C -T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))).(\lambda (b: -B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u0) (CHead d1 (Flat f) -u1))).(let H5 \def (eq_ind C (CHead c1 (Bind Void) u0) (\lambda (ee: -C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow -(match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I -(CHead d1 (Flat f) u1) H4) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda -(u3: T).(eq C (CHead c2 (Bind b) u2) (CHead d2 (Flat f) u3)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d1 d2)))) H5))))))))))) (\lambda (c1: C).(\lambda -(c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Flat -f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 -(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 -d2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g -a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C -(CHead c1 (Bind Abst) t) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind C -(CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1) -H5) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead -c2 (Bind Abbr) u) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d1 d2)))) H6)))))))))))) y c H0))) H)))))). - -lemma csuba_gen_bind: - \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall -(v1: T).((csuba g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) -\def - \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda -(v1: T).(\lambda (H: (csuba g (CHead e1 (Bind b1) v1) c2)).(insert_eq C -(CHead e1 (Bind b1) v1) (\lambda (c: C).(csuba g c c2)) (\lambda (_: -C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csuba g e1 e2)))))) (\lambda (y: C).(\lambda (H0: (csuba g y -c2)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind -b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C c0 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e1 e2)))))))) (\lambda (n: nat).(\lambda (H1: (eq -C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) -\Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 -(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g -e1 e2))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 -c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 -e2)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) -(CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k -u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: -C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) -(CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) -\Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7: -(eq K k (Bind b1))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v1 (\lambda (t: -T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c3 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e1 e2)))))) (eq_ind_r K (Bind b1) (\lambda (k0: -K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c3 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e1 e2)))))) (let H9 \def (eq_ind C c1 (\lambda -(c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) H2 e1 -H8) in (let H10 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c3)) H1 e1 H8) -in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq -C (CHead c3 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) b1 c3 v1 (refl_equal C -(CHead c3 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: -C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c1 -(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))).(\lambda (b: -B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) -v1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1) -(CHead e1 (Bind b1) v1) H4) in ((let H6 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Void | (CHead _ k _) \Rightarrow -(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Void])])) -(CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) in ((let H7 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead -_ _ t) \Rightarrow t])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) -in (\lambda (H8: (eq B Void b1)).(\lambda (H9: (eq C c1 e1)).(let H10 \def -(eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C -T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 -e2))))))) H2 e1 H9) in (let H11 \def (eq_ind C c1 (\lambda (c: C).(csuba g c -c3)) H1 e1 H9) in (let H12 \def (eq_ind_r B b1 (\lambda (b0: B).((eq C e1 -(CHead e1 (Bind b0) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) H10 Void H8) in -(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c3 (Bind b) u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda -(e2: C).(\lambda (_: T).(csuba g e1 e2)))) b c3 u2 (refl_equal C (CHead c3 -(Bind b) u2)) H11))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c3: -C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind -b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e1 e2)))))))).(\lambda (t: T).(\lambda (a: -A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: T).(\lambda (_: -(arity g c3 u a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead e1 -(Bind b1) v1))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind -Abst) t) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def (f_equal C B (\lambda -(e: C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead -c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in ((let H8 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0) -\Rightarrow t0])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in -(\lambda (H9: (eq B Abst b1)).(\lambda (H10: (eq C c1 e1)).(let H11 \def -(eq_ind T t (\lambda (t0: T).(arity g c1 t0 (asucc g a))) H3 v1 H8) in (let -H12 \def (eq_ind C c1 (\lambda (c: C).(arity g c v1 (asucc g a))) H11 e1 H10) -in (let H13 \def (eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) -v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq -C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda -(_: T).(csuba g e1 e2))))))) H2 e1 H10) in (let H14 \def (eq_ind C c1 -(\lambda (c: C).(csuba g c c3)) H1 e1 H10) in (let H15 \def (eq_ind_r B b1 -(\lambda (b: B).((eq C e1 (CHead e1 (Bind b) v1)) \to (ex2_3 B C T (\lambda -(b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) -v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 -e2))))))) H13 Abst H9) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) (CHead e2 (Bind b2) -v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) -Abbr c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H14))))))))) H7)) -H6)))))))))))) y c2 H0))) H)))))). - -lemma csuba_gen_abst_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c -(CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: -(csuba g c (CHead d1 (Bind Abst) u))).(insert_eq C (CHead d1 (Bind Abst) u) -(\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(or (ex2 C (\lambda (d2: -C).(eq C c (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (\lambda (y: -C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: -C).((eq C c1 (CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C -c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C c0 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (n: -nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst) u))).(let H2 \def -(eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow -True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) u) H1) in -(False_ind (or (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(eq C (CSort n) (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))))) H2)))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind -Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))))))).(\lambda (k: K).(\lambda (u0: T).(\lambda (H3: (eq -C (CHead c2 k u0) (CHead d1 (Bind Abst) u))).(let H4 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) -\Rightarrow c0])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) in ((let H5 -\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k | -(CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) -in ((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c2 k u0) (CHead d1 -(Bind Abst) u) H3) in (\lambda (H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C -c2 d1)).(eq_ind_r T u (\lambda (t: T).(or (ex2 C (\lambda (d2: C).(eq C -(CHead c1 k t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) -(eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2 C (\lambda (d2: C).(eq C -(CHead c1 k0 u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k0 u) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let -H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abst) u)) \to -(or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba g -c1 c0)) H1 d1 H8) in (or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind -Abst) u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abst) u) (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) -(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) u) (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind -Abst) u)) H10)))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda -(c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 -(Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (b: B).(\lambda (H3: (not -(eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead -c2 (Bind b) u2) (CHead d1 (Bind Abst) u))).(let H5 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow -c0])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abst) u) H4) in ((let H6 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead -_ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abst) u) H4) in -((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead -d1 (Bind Abst) u) H4) in (\lambda (H8: (eq B b Abst)).(\lambda (H9: (eq C c2 -d1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Abst -H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind -Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: -T).(eq C c1 (CHead d2 (Bind Void) u3)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))))) H2 d1 H9) in (let H12 \def (eq_ind C c2 (\lambda -(c0: C).(csuba g c1 c0)) H1 d1 H9) in (or_intror (ex2 C (\lambda (d2: C).(eq -C (CHead c1 (Bind Void) u1) (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C -(CHead c1 (Bind Void) u1) (CHead d2 (Bind Void) u3)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: -C).(\lambda (u3: T).(eq C (CHead c1 (Bind Void) u1) (CHead d2 (Bind Void) -u3)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) c1 u1 (refl_equal C -(CHead c1 (Bind Void) u1)) H12)))))))) H6)) H5))))))))))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c2 -(CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (t: T).(\lambda (a: -A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0: T).(\lambda (_: -(arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 -(Bind Abst) u))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr) u0) (\lambda -(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead d1 (Bind Abst) u) H5) in (False_ind (or -(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) H6)))))))))))) c y H0))) H))))). - -lemma csuba_gen_void_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c -(CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind -Void) u))) (\lambda (d2: C).(csuba g d2 d1))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: -(csuba g c (CHead d1 (Bind Void) u))).(insert_eq C (CHead d1 (Bind Void) u) -(\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(ex2 C (\lambda (d2: C).(eq -C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))) (\lambda -(y: C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda -(c1: C).((eq C c1 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C -c0 (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))) (\lambda -(n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Void) u))).(let H2 -\def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Void) -u) H1) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind -Void) u))) (\lambda (d2: C).(csuba g d2 d1))) H2)))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 -(CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 -(Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (k: -K).(\lambda (u0: T).(\lambda (H3: (eq C (CHead c2 k u0) (CHead d1 (Bind Void) -u))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u0) (CHead d1 -(Bind Void) u) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e -with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 k -u0) (CHead d1 (Bind Void) u) H3) in ((let H6 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) -(CHead c2 k u0) (CHead d1 (Bind Void) u) H3) in (\lambda (H7: (eq K k (Bind -Void))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r T u (\lambda (t: T).(ex2 C -(\lambda (d2: C).(eq C (CHead c1 k t) (CHead d2 (Bind Void) u))) (\lambda -(d2: C).(csuba g d2 d1)))) (eq_ind_r K (Bind Void) (\lambda (k0: K).(ex2 C -(\lambda (d2: C).(eq C (CHead c1 k0 u) (CHead d2 (Bind Void) u))) (\lambda -(d2: C).(csuba g d2 d1)))) (let H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C -c0 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 -(Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1))))) H2 d1 H8) in (let H10 -\def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 H8) in (ex_intro2 C -(\lambda (d2: C).(eq C (CHead c1 (Bind Void) u) (CHead d2 (Bind Void) u))) -(\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind Void) u)) -H10))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind -Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Void) u))) -(\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (b: B).(\lambda (H3: (not (eq -B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c2 -(Bind b) u2) (CHead d1 (Bind Void) u))).(let H5 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow -c0])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Void) u) H4) in ((let H6 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead -_ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Void) u) H4) in -((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead -d1 (Bind Void) u) H4) in (\lambda (H8: (eq B b Void)).(\lambda (H9: (eq C c2 -d1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Void -H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind -Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Void) u))) -(\lambda (d2: C).(csuba g d2 d1))))) H2 d1 H9) in (let H12 \def (eq_ind C c2 -(\lambda (c0: C).(csuba g c1 c0)) H1 d1 H9) in (let H13 \def (match (H10 -(refl_equal B Void)) in False with []) in H13))))))) H6)) H5))))))))))) -(\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: -(((eq C c2 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 -(CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (t: -T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0: -T).(\lambda (_: (arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr) -u0) (CHead d1 (Bind Void) u))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr) -u0) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k -_) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead d1 (Bind Void) u) H5) in (False_ind (ex2 C -(\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u))) -(\lambda (d2: C).(csuba g d2 d1))) H6)))))))))))) c y H0))) H))))). - -lemma csuba_gen_abbr_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g c -(CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda -(H: (csuba g c (CHead d1 (Bind Abbr) u1))).(insert_eq C (CHead d1 (Bind Abbr) -u1) (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(or3 (ex2 C (\lambda -(d2: C).(eq C c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq -C c (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))) (\lambda (y: C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda -(c0: C).(\lambda (c1: C).((eq C c1 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C -(\lambda (d2: C).(eq C c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq -C c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1)))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind -Abbr) u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 -(Bind Abbr) u1) H1) in (False_ind (or3 (ex2 C (\lambda (d2: C).(eq C (CSort -n) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CSort n) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CSort n) (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) -H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 -c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C -(\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c1 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq -C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c2 k -u) (CHead d1 (Bind Abbr) u1))).(let H4 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) -(CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in ((let H5 \def (f_equal C K -(\lambda (e: C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) -\Rightarrow k0])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in ((let H6 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t) \Rightarrow t])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) -in (\lambda (H7: (eq K k (Bind Abbr))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r -T u1 (\lambda (t: T).(or3 (ex2 C (\lambda (d2: C).(eq C (CHead c1 k t) (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 k t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(or3 (ex2 C (\lambda (d2: -C).(eq C (CHead c1 k0 u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C (CHead c1 k0 u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C (CHead c1 k0 u1) (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H9 \def (eq_ind C -c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C -(\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c1 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq -C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba -g c1 c0)) H1 d1 H8) in (or3_intro0 (ex2 C (\lambda (d2: C).(eq C (CHead c1 -(Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C -(CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) -(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 -(Bind Abbr) u1)) H10)))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 -(CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (b: -B).(\lambda (H3: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c2 (Bind b) u2) (CHead d1 (Bind Abbr) -u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) u2) -(CHead d1 (Bind Abbr) u1) H4) in ((let H6 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match -k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c2 -(Bind b) u2) (CHead d1 (Bind Abbr) u1) H4) in ((let H7 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | (CHead _ _ t) -\Rightarrow t])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abbr) u1) H4) in -(\lambda (H8: (eq B b Abbr)).(\lambda (H9: (eq C c2 d1)).(let H10 \def -(eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Abbr H8) in (let H11 -\def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to -(or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u3: -T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) u3))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 u3 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u3: T).(eq C c1 (CHead d2 (Bind Void) u3)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H2 d1 H9) in (let H12 -\def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 H9) in (or3_intro2 -(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Void) u0) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u3: T).(\lambda (_: A).(eq C (CHead c1 (Bind Void) u0) (CHead d2 -(Bind Abst) u3))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 u3 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C (CHead c1 (Bind -Void) u0) (CHead d2 (Bind Void) u3)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u3: T).(eq -C (CHead c1 (Bind Void) u0) (CHead d2 (Bind Void) u3)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))) c1 u0 (refl_equal C (CHead c1 (Bind -Void) u0)) H12)))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind -Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (t: -T).(\lambda (a: A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: -T).(\lambda (H4: (arity g c2 u a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr) -u) (CHead d1 (Bind Abbr) u1))).(let H6 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) -(CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1) H5) in ((let H7 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead -_ _ t0) \Rightarrow t0])) (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1) -H5) in (\lambda (H8: (eq C c2 d1)).(let H9 \def (eq_ind T u (\lambda (t0: -T).(arity g c2 t0 a)) H4 u1 H7) in (let H10 \def (eq_ind C c2 (\lambda (c0: -C).(arity g c0 u1 a)) H9 d1 H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: -C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq -C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 -(asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 -u1 a0))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H2 -d1 H8) in (let H12 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 -H8) in (or3_intro1 (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) -t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: -A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a0: A).(arity g d1 u1 a0))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 -(asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 -u1 a0)))) c1 t a (refl_equal C (CHead c1 (Bind Abst) t)) H12 H3 H10)))))))) -H6)))))))))))) c y H0))) H))))). - -lemma csuba_gen_flat_rev: - \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall -(f: F).((csuba g c (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))))))))) -\def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda -(f: F).(\lambda (H: (csuba g c (CHead d1 (Flat f) u1))).(insert_eq C (CHead -d1 (Flat f) u1) (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (y: C).(\lambda (H0: -(csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c1 -(CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq -C c0 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Flat f) -u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 -(Flat f) u1) H1) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: -(csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Flat f) u1)) \to (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Flat f) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))).(\lambda (k: -K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c2 k u) (CHead d1 (Flat f) -u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u) (CHead d1 -(Flat f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e with -[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u) -(CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) -(CHead c2 k u) (CHead d1 (Flat f) u1) H3) in (\lambda (H7: (eq K k (Flat -f))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) (CHead d2 (Flat f) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (eq_ind_r K (Flat -f) (\lambda (k0: K).(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead -c1 k0 u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))))) (let H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 -(Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 -(CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 -c0)) H1 d1 H8) in (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C -(CHead c1 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))) c1 u1 (refl_equal C (CHead c1 (Flat f) u1)) H10))) k -H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: -(csuba g c1 c2)).(\lambda (_: (((eq C c2 (CHead d1 (Flat f) u1)) \to (ex2_2 C -T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Flat f) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))).(\lambda (b: -B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c2 (Bind b) u2) (CHead d1 (Flat f) u1))).(let -H5 \def (eq_ind C (CHead c2 (Bind b) u2) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind -_) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) -u1) H4) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C -(CHead c1 (Bind Void) u0) (CHead d2 (Flat f) u3)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))) H5))))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c2 (CHead d1 (Flat f) -u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 -(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g -a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C -(CHead c2 (Bind Abbr) u) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind C -(CHead c2 (Bind Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1) -H5) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead -c1 (Bind Abst) t) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) H6)))))))))))) c y H0))) H)))))). - -lemma csuba_gen_bind_rev: - \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall -(v1: T).((csuba g c2 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))))) -\def - \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda -(v1: T).(\lambda (H: (csuba g c2 (CHead e1 (Bind b1) v1))).(insert_eq C -(CHead e1 (Bind b1) v1) (\lambda (c: C).(csuba g c2 c)) (\lambda (_: -C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csuba g e2 e1)))))) (\lambda (y: C).(\lambda (H0: (csuba g c2 -y)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c0 (CHead e1 (Bind -b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e2 e1)))))))) (\lambda (n: nat).(\lambda (H1: (eq -C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) -\Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 -(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g -e2 e1))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 -c3)).(\lambda (H2: (((eq C c3 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 -e1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c3 k u) -(CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 k -u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: -C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) -(CHead c3 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) -\Rightarrow t])) (CHead c3 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7: -(eq K k (Bind b1))).(\lambda (H8: (eq C c3 e1)).(eq_ind_r T v1 (\lambda (t: -T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c1 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e2 e1)))))) (eq_ind_r K (Bind b1) (\lambda (k0: -K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c1 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e2 e1)))))) (let H9 \def (eq_ind C c3 (\lambda -(c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H2 e1 -H8) in (let H10 \def (eq_ind C c3 (\lambda (c: C).(csuba g c1 c)) H1 e1 H8) -in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq -C (CHead c1 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) b1 c1 v1 (refl_equal C -(CHead c1 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: -C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c3 -(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))).(\lambda (b: -B).(\lambda (H3: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c3 (Bind b) u2) (CHead e1 (Bind b1) v1))).(let -H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c3 -| (CHead c _ _) \Rightarrow c])) (CHead c3 (Bind b) u2) (CHead e1 (Bind b1) -v1) H4) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e with [(CSort -_) \Rightarrow b | (CHead _ k _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c3 (Bind b) u2) (CHead e1 -(Bind b1) v1) H4) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with -[(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c3 (Bind b) -u2) (CHead e1 (Bind b1) v1) H4) in (\lambda (H8: (eq B b b1)).(\lambda (H9: -(eq C c3 e1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 -Void))) H3 b1 H8) in (let H11 \def (eq_ind C c3 (\lambda (c: C).((eq C c -(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H2 e1 H9) in (let -H12 \def (eq_ind C c3 (\lambda (c: C).(csuba g c1 c)) H1 e1 H9) in -(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c1 (Bind Void) u1) (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) Void c1 u1 (refl_equal -C (CHead c1 (Bind Void) u1)) H12))))))) H6)) H5))))))))))) (\lambda (c1: -C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c3 -(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))).(\lambda (t: -T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u: -T).(\lambda (H4: (arity g c3 u a)).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) -u) (CHead e1 (Bind b1) v1))).(let H6 \def (f_equal C C (\lambda (e: C).(match -e with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 -(Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def (f_equal C B -(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -Abbr])])) (CHead c3 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H8 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t0) \Rightarrow t0])) (CHead c3 (Bind Abbr) u) (CHead e1 (Bind b1) -v1) H5) in (\lambda (H9: (eq B Abbr b1)).(\lambda (H10: (eq C c3 e1)).(let -H11 \def (eq_ind T u (\lambda (t0: T).(arity g c3 t0 a)) H4 v1 H8) in (let -H12 \def (eq_ind C c3 (\lambda (c: C).(arity g c v1 a)) H11 e1 H10) in (let -H13 \def (eq_ind C c3 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to -(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csuba g e2 e1))))))) H2 e1 H10) in (let H14 \def (eq_ind C c3 (\lambda -(c: C).(csuba g c1 c)) H1 e1 H10) in (let H15 \def (eq_ind_r B b1 (\lambda -(b: B).((eq C e1 (CHead e1 (Bind b) v1)) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H13 -Abbr H9) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda -(v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 (Bind b2) v2))))) (\lambda -(_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) Abst c1 t -(refl_equal C (CHead c1 (Bind Abst) t)) H14))))))))) H7)) H6)))))))))))) c2 y -H0))) H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/csuba/getl.ma deleted file mode 100644 index 039992420..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/getl.ma +++ /dev/null @@ -1,1160 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csuba/drop.ma". - -include "basic_1/csuba/clear.ma". - -include "basic_1/getl/clear.ma". - -lemma csuba_getl_abbr: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall -(i: nat).((getl i c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g -c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abbr) u) i H) in (ex2_ind C (\lambda (e: -C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) -(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (x: -C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind -Abbr) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 -(Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2)))))))) (\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda -(H4: (clear (CSort n) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 -(Bind Abbr) u) n H4 (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 -(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: -(drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 -(Bind Abbr) u))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to -((clear (CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: -C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (b: B).(\lambda -(H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 -(Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) -(CHead d1 (Bind Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 -(Bind Abbr) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e -with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with -[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind -Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) -t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abbr) u) -(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in -(\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: -C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: -T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def (eq_ind_r -B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u))) H13 Abbr H10) in -(let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind -Abbr) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abbr i c1 d1 u H15 g c2 -H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl i c2 (CHead -d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x1: -C).(\lambda (H17: (drop i O c2 (CHead x1 (Bind Abbr) u))).(\lambda (H18: -(csuba g d1 x1)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x1 (getl_intro i c2 (CHead x1 -(Bind Abbr) u) (CHead x1 (Bind Abbr) u) H17 (clear_bind Abbr x1 u)) H18)))) -H16)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead -x0 (Flat f) t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind -Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c -(CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c c2) \to (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop n -O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) \to (ex2 C -(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2)))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead -x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x1 c2)).(let H10 -\def (eq_ind C x1 (\lambda (c: C).(csuba g c c2)) H9 (CHead x0 (Flat f) t) -(drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def (clear_flat x0 -(CHead d1 (Bind Abbr) u) (clear_gen_flat f x0 (CHead d1 (Bind Abbr) u) t H6) -f t) in (let H11 \def (csuba_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead -d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 -(Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) -(\lambda (x2: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abbr) u) -x2)).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abbr g d1 x2 u -H12) in (let H14 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 -(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) -(\lambda (x3: C).(\lambda (H15: (eq C x2 (CHead x3 (Bind Abbr) u))).(\lambda -(H16: (csuba g d1 x3)).(let H17 \def (eq_ind C x2 (\lambda (c: C).(clear c2 -c)) H13 (CHead x3 (Bind Abbr) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl -O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x3 -(getl_intro O c2 (CHead x3 (Bind Abbr) u) c2 (drop_refl c2) H17) H16))))) -H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: -C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) -\to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O -x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x1 -c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B -C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind -b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead -x0 (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x2: B).(\lambda (x3: -C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) -x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 \def -(csuba_clear_conf g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind C -(\lambda (e2: C).(csuba g (CHead x3 (Bind x2) x4) e2)) (\lambda (e2: -C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x5: C).(\lambda (H15: -(csuba g (CHead x3 (Bind x2) x4) x5)).(\lambda (H16: (clear c2 x5)).(let H_x -\def (csuba_gen_bind g x2 x3 x5 x4 H15) in (let H17 \def H_x in (ex2_3_ind B -C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 -(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g -x3 e2)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x6: B).(\lambda (x7: C).(\lambda -(x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) x8))).(\lambda (H19: -(csuba g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 -(CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 x7 H19) in (ex2_ind -C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x9: C).(\lambda (H22: -(getl n x7 (CHead x9 (Bind Abbr) u))).(\lambda (H23: (csuba g d1 -x9)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead -x9 (Bind Abbr) u) n H22) H23)))) H21)))))))) H17)))))) H14))))))) H11)))))))) -i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). - -lemma csuba_getl_abst: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall -(i: nat).((getl i c1 (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba -g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda -(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u1))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abst) u1) i H) in (ex2_ind C (\lambda (e: -C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u1))) -(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear -x (CHead d1 (Bind Abst) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) \to -((clear c (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) -\to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda -(n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) -(CHead d1 (Bind Abst) u1))).(clear_gen_sort (CHead d1 (Bind Abst) u1) n H4 -(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 -(CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 -C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))).(\lambda (k: K).(\lambda -(t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear -(CHead x0 k t) (CHead d1 (Bind Abst) u1))).(K_ind (\lambda (k0: K).((drop i O -c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind Abst) u1)) -\to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i -c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a))))))))))) (\lambda (b: B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) -t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 (Bind Abst) -u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) u1) -(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u1) t H6)) -in ((let H8 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow Abst | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind Abst) u1) -(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u1) t H6)) -in ((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u1 | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abst) u1) -(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u1) t H6)) -in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: -C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: -T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r -B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abst H10) in -(let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind -Abst) u1))) H14 d1 H11) in (let H16 \def (csuba_drop_abst i c1 d1 u1 H15 g c2 -H12) in (or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda -(H17: (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: C).(\lambda -(H18: (drop i O c2 (CHead x1 (Bind Abst) u1))).(\lambda (H19: (csuba g d1 -x1)).(or_introl (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) -(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)) x1 (getl_intro i c2 (CHead x1 (Bind Abst) u1) (CHead -x1 (Bind Abst) u1) H18 (clear_bind Abst x1 u1)) H19))))) H17)) (\lambda (H17: -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: C).(\lambda (x2: -T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abbr) -x2))).(\lambda (H19: (csuba g d1 x1)).(\lambda (H20: (arity g d1 u1 (asucc g -x3))).(\lambda (H21: (arity g x1 x2 x3)).(or_intror (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x1 x2 x3 -(getl_intro i c2 (CHead x1 (Bind Abbr) x2) (CHead x1 (Bind Abbr) x2) H18 -(clear_bind Abbr x1 x2)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) -H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) -t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abst) -u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 -(Flat f) t)) \to (\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i -c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: -C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) -\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda -(x1: C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: -C).(\lambda (H9: (csuba g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: -C).(csuba g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat -f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abst) u1) -(clear_gen_flat f x0 (CHead d1 (Bind Abst) u1) t H6) f t) in (let H11 \def -(csuba_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abst) u1) -H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind Abst) u1) e2)) -(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead -d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x2: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abst) u1) -x2)).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst g d1 x2 u1 -H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 (CHead -d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda -(H15: (ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead x3 -(Bind Abst) u1))).(\lambda (H17: (csuba g d1 x3)).(let H18 \def (eq_ind C x2 -(\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) u1) H16) in -(or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2)) x3 (getl_intro O c2 (CHead x3 (Bind Abst) u1) c2 -(drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(eq C x2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: -A).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abbr) x4))).(\lambda (H17: (csuba -g d1 x3)).(\lambda (H18: (arity g d1 u1 (asucc g x5))).(\lambda (H19: (arity -g x3 x4 x5)).(let H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 -(CHead x3 (Bind Abbr) x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O -c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 (getl_intro O c2 (CHead -x3 (Bind Abbr) x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) -H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: -C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) -\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O x1 (CHead x0 (Flat -f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x1 c2)).(let H11 \def -(drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: -B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) -(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead x0 (Flat -f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: -(clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 -(Flat f) t))).(let H14 \def (csuba_clear_conf g x1 c2 H10 (CHead x3 (Bind x2) -x4) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead x3 (Bind x2) x4) e2)) -(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))) (\lambda (x5: C).(\lambda (H15: (csuba g (CHead x3 (Bind x2) x4) -x5)).(\lambda (H16: (clear c2 x5)).(let H_x \def (csuba_gen_bind g x2 x3 x5 -x4 H15) in (let H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda -(e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g x3 e2)))) (or (ex2 C (\lambda -(d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g -d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl -(S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x6: B).(\lambda (x7: -C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) -x8))).(\lambda (H19: (csuba g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: -C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 -x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or -(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda -(H22: (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S -n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a)))))) (\lambda (x9: C).(\lambda (H23: (getl n x7 -(CHead x9 (Bind Abst) u1))).(\lambda (H24: (csuba g d1 x9)).(or_introl (ex2 C -(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abst) u1) n H23) -H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: A).(\lambda (H23: -(getl n x7 (CHead x9 (Bind Abbr) x10))).(\lambda (H24: (csuba g d1 -x9)).(\lambda (H25: (arity g d1 u1 (asucc g x11))).(\lambda (H26: (arity g x9 -x10 x11)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x9 x10 x11 (getl_clear_bind x6 -c2 x7 x8 H20 (CHead x9 (Bind Abbr) x10) n H23) H24 H25 H26))))))))) H22)) -H21)))))))) H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) x H1 -H2)))) H0))))))). - -lemma csuba_getl_abst_rev: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall -(i: nat).((getl i c1 (CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g -c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abst) u) i H) in (ex2_ind C (\lambda (e: -C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u))) -(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) (\lambda (x: -C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind -Abst) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 -(Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))) -(\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear -(CSort n) (CHead d1 (Bind Abst) u))).(clear_gen_sort (CHead d1 (Bind Abst) u) -n H4 (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl -i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))) (\lambda (x0: -C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 (CHead d1 (Bind Abst) u)) -\to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i -c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))).(\lambda (k: -K).(\lambda (t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: -(clear (CHead x0 k t) (CHead d1 (Bind Abst) u))).(K_ind (\lambda (k0: -K).((drop i O c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind -Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (b: -B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear -(CHead x0 (Bind b) t) (CHead d1 (Bind Abst) u))).(let H7 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) -\Rightarrow c])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H8 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abst | -(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat -_) \Rightarrow Abst])])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H9 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead -_ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in (\lambda (H10: (eq B -Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba -g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 -(Bind b) t0))) H5 u H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: B).(drop -i O c1 (CHead x0 (Bind b0) u))) H13 Abst H10) in (let H15 \def (eq_ind_r C x0 -(\lambda (c: C).(drop i O c1 (CHead c (Bind Abst) u))) H14 d1 H11) in (let -H16 \def (csuba_drop_abst_rev i c1 d1 u H15 g c2 H12) in (or_ind (ex2 C -(\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop i O -c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H17: (ex2 C (\lambda (d2: C).(drop i O c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C -(\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x1: C).(\lambda (H18: (drop -i O c2 (CHead x1 (Bind Abst) u))).(\lambda (H19: (csuba g x1 d1)).(or_introl -(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 (CHead x1 (Bind Abst) -u) (CHead x1 (Bind Abst) u) H18 (clear_bind Abst x1 u)) H19))))) H17)) -(\lambda (H17: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop i O c2 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or -(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (H18: (drop i O c2 (CHead -x1 (Bind Void) x2))).(\lambda (H19: (csuba g x1 d1)).(or_intror (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x1 -x2 (getl_intro i c2 (CHead x1 (Bind Void) x2) (CHead x1 (Bind Void) x2) H18 -(clear_bind Void x1 x2)) H19)))))) H17)) H16)))))))))) H8)) H7))))) (\lambda -(f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) t))).(\lambda (H6: -(clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abst) u))).(let H7 \def H5 in -(unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 (Flat f) t)) \to -(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) (nat_ind (\lambda -(n: nat).(\forall (x1: C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall -(c2: C).((csuba g c2 x1) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl n c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (x1: C).(\lambda (H8: -(drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g -c2 x1)).(let H10 \def (eq_ind C x1 (\lambda (c: C).(csuba g c2 c)) H9 (CHead -x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def -(clear_flat x0 (CHead d1 (Bind Abst) u) (clear_gen_flat f x0 (CHead d1 (Bind -Abst) u) t H6) f t) in (let H11 \def (csuba_clear_trans g (CHead x0 (Flat f) -t) c2 H10 (CHead d1 (Bind Abst) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba -g e2 (CHead d1 (Bind Abst) u))) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 -(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))) (\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abst) -u))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst_rev g d1 x2 -u H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H15: -(ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x3: -C).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abst) u))).(\lambda (H17: (csuba g -x3 d1)).(let H18 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead -x3 (Bind Abst) u) H16) in (or_introl (ex2 C (\lambda (d2: C).(getl O c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda -(d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1)) x3 (getl_intro O c2 (CHead x3 (Bind Abst) u) c2 (drop_refl c2) H18) -H17)))))) H15)) (\lambda (H15: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(eq C x2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C -x2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C -x2 (CHead x3 (Bind Void) x4))).(\lambda (H17: (csuba g x3 d1)).(let H18 \def -(eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Void) x4) H16) -in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))) x3 x4 (getl_intro O c2 (CHead x3 (Bind Void) x4) c2 -(drop_refl c2) H18) H17))))))) H15)) H14)))))) H11)))))))) (\lambda (n: -nat).(\lambda (H8: ((\forall (x1: C).((drop n O x1 (CHead x0 (Flat f) t)) \to -(\forall (c2: C).((csuba g c2 x1) \to (or (ex2 C (\lambda (d2: C).(getl n c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl n c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))).(\lambda (x1: -C).(\lambda (H9: (drop (S n) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: -C).(\lambda (H10: (csuba g c2 x1)).(let H11 \def (drop_clear x1 (CHead x0 -(Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: -C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: -B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead x0 (Flat f) t))))) (or -(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl -(S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba -g d2 d1))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda -(H12: (clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead -x0 (Flat f) t))).(let H14 \def (csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind -x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) -x4))) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) -c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x5: -C).(\lambda (H15: (csuba g x5 (CHead x3 (Bind x2) x4))).(\lambda (H16: (clear -c2 x5)).(let H_x \def (csuba_gen_bind_rev g x2 x3 x5 x4 H15) in (let H17 \def -H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e2 x3)))) (or (ex2 C (\lambda (d2: C).(getl (S n) -c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x6: -B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind -x6) x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda -(c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 -H13 x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(getl (S n) -c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H22: (ex2 C -(\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) -(\lambda (x9: C).(\lambda (H23: (getl n x7 (CHead x9 (Bind Abst) -u))).(\lambda (H24: (csuba g x9 d1)).(or_introl (ex2 C (\lambda (d2: C).(getl -(S n) c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C -(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abst) -u) n H23) H24))))) H22)) (\lambda (H22: (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl -n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g -d2 d1))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (H23: -(getl n x7 (CHead x9 (Bind Void) x10))).(\lambda (H24: (csuba g x9 -d1)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) -u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda -(u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda -(_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))) x9 x10 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind -Void) x10) n H23) H24)))))) H22)) H21)))))))) H17)))))) H14))))))) -H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). - -lemma csuba_getl_abbr_rev: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall -(i: nat).((getl i c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba -g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda -(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u1))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abbr) u1) i H) in (ex2_ind C (\lambda (e: -C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u1))) -(\forall (c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) -(\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead -d1 (Bind Abbr) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c -(CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 c1) \to (or3 -(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (n: nat).(\lambda (_: -(drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abbr) -u1))).(clear_gen_sort (CHead d1 (Bind Abbr) u1) n H4 (\forall (c2: C).((csuba -g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))) (\lambda (x0: -C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 (CHead d1 (Bind Abbr) u1)) -\to (\forall (c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl -i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 -d1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: (drop i O c1 -(CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 (Bind Abbr) -u1))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to ((clear -(CHead x0 k0 t) (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 -c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (b: -B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear -(CHead x0 (Bind b) t) (CHead d1 (Bind Abbr) u1))).(let H7 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) -\Rightarrow c])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in ((let H8 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | -(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat -_) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in ((let H9 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead -_ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) -(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in (\lambda (H10: (eq B -Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba -g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 -(Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: -B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abbr H10) in (let H15 \def -(eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind Abbr) u1))) H14 d1 -H11) in (let H16 \def (csuba_drop_abbr_rev i c1 d1 u1 H15 g c2 H12) in -(or3_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H17: (ex2 C (\lambda (d2: C).(drop i O c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C -(\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x1: -C).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abbr) u1))).(\lambda (H19: -(csuba g x1 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) x1 (getl_intro i c2 (CHead x1 (Bind Abbr) u1) (CHead x1 -(Bind Abbr) u1) H18 (clear_bind Abbr x1 u1)) H19))))) H17)) (\lambda (H17: -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x1: C).(\lambda (x2: -T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abst) -x2))).(\lambda (H19: (csuba g x1 d1)).(\lambda (H20: (arity g x1 x2 (asucc g -x3))).(\lambda (H21: (arity g d1 u1 x3)).(or3_intro1 (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x1 x2 x3 -(getl_intro i c2 (CHead x1 (Bind Abst) x2) (CHead x1 (Bind Abst) x2) H18 -(clear_bind Abst x1 x2)) H19 H20 H21))))))))) H17)) (\lambda (H17: (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda -(d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: C).(getl -i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) -(\lambda (x1: C).(\lambda (x2: T).(\lambda (H18: (drop i O c2 (CHead x1 (Bind -Void) x2))).(\lambda (H19: (csuba g x1 d1)).(or3_intro2 (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))) x1 x2 (getl_intro i c2 (CHead x1 (Bind Void) x2) (CHead -x1 (Bind Void) x2) H18 (clear_bind Void x1 x2)) H19)))))) H17)) H16)))))))))) -H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) -t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) -u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 -(Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (or3 (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop -n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (or3 -(ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl n c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl n c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (x1: C).(\lambda (H8: -(drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g -c2 x1)).(let H10 \def (eq_ind C x1 (\lambda (c: C).(csuba g c2 c)) H9 (CHead -x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def -(clear_flat x0 (CHead d1 (Bind Abbr) u1) (clear_gen_flat f x0 (CHead d1 (Bind -Abbr) u1) t H6) f t) in (let H11 \def (csuba_clear_trans g (CHead x0 (Flat f) -t) c2 H10 (CHead d1 (Bind Abbr) u1) H_y) in (ex2_ind C (\lambda (e2: -C).(csuba g e2 (CHead d1 (Bind Abbr) u1))) (\lambda (e2: C).(clear c2 e2)) -(or3 (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x2: -C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abbr) u1))).(\lambda (H13: -(clear c2 x2)).(let H_x \def (csuba_gen_abbr_rev g d1 x2 u1 H12) in (let H14 -\def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H15: (ex2 C (\lambda (d2: C).(eq C x2 (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda -(d2: C).(eq C x2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1)) (or3 (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x3: -C).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abbr) u1))).(\lambda (H17: (csuba -g x3 d1)).(let H18 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead -x3 (Bind Abbr) u1) H16) in (or3_intro0 (ex2 C (\lambda (d2: C).(getl O c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) -(ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1)) x3 (getl_intro O c2 (CHead x3 (Bind Abbr) u1) c2 -(drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(eq C x2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: -A).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abst) x4))).(\lambda (H17: (csuba -g x3 d1)).(\lambda (H18: (arity g x3 x4 (asucc g x5))).(\lambda (H19: (arity -g d1 u1 x5)).(let H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 -(CHead x3 (Bind Abst) x4) H16) in (or3_intro1 (ex2 C (\lambda (d2: C).(getl O -c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x3 x4 x5 (getl_intro O c2 (CHead x3 (Bind Abst) -x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) (\lambda (H15: (ex2_2 -C T (\lambda (d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda -(d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: C).(getl O c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 -(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) -(\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C x2 (CHead x3 (Bind -Void) x4))).(\lambda (H17: (csuba g x3 d1)).(let H18 \def (eq_ind C x2 -(\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Void) x4) H16) in -(or3_intro2 (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T -(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda -(d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda -(d2: C).(\lambda (_: T).(csuba g d2 d1))) x3 x4 (getl_intro O c2 (CHead x3 -(Bind Void) x4) c2 (drop_refl c2) H18) H17))))))) H15)) H14)))))) H11)))))))) -(\lambda (n: nat).(\lambda (H8: ((\forall (x1: C).((drop n O x1 (CHead x0 -(Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (or3 (ex2 C (\lambda -(d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl n c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O x1 -(CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 x1)).(let -H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B C T -(\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) -v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead x0 -(Flat f) t))))) (or3 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 -(Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 -\def (csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind -C (\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) (\lambda (e2: -C).(clear c2 e2)) (or3 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x5: C).(\lambda (H15: (csuba g x5 (CHead x3 (Bind x2) x4))).(\lambda (H16: -(clear c2 x5)).(let H_x \def (csuba_gen_bind_rev g x2 x3 x5 x4 H15) in (let -H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda -(v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g e2 x3)))) (or3 (ex2 C (\lambda (d2: C).(getl (S -n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x6: B).(\lambda (x7: C).(\lambda (x8: -T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) x8))).(\lambda (H19: (csuba g -x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 (CHead -x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 x7 H19) in (or3_ind (ex2 C -(\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: -C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(getl (S -n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(getl n x7 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C -(\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda -(x9: C).(\lambda (H23: (getl n x7 (CHead x9 (Bind Abbr) u1))).(\lambda (H24: -(csuba g x9 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C -(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) -u1) n H23) H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S -n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: -A).(\lambda (H23: (getl n x7 (CHead x9 (Bind Abst) x10))).(\lambda (H24: -(csuba g x9 d1)).(\lambda (H25: (arity g x9 x10 (asucc g x11))).(\lambda -(H26: (arity g d1 u1 x11)).(or3_intro1 (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead -d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S -n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x9 x10 x11 (getl_clear_bind x6 c2 x7 x8 H20 -(CHead x9 (Bind Abst) x10) n H23) H24 H25 H26))))))))) H22)) (\lambda (H22: -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T -(\lambda (d2: C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) -(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S -n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: -T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: -T).(csuba g d2 d1))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (H23: -(getl n x7 (CHead x9 (Bind Void) x10))).(\lambda (H24: (csuba g x9 -d1)).(or3_intro2 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind -Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro -C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) -u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x9 x10 -(getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Void) x10) n H23) H24)))))) -H22)) H21)))))))) H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) -x H1 H2)))) H0))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csuba/props.ma b/matita/matita/contribs/lambdadelta/basic_1/csuba/props.ma deleted file mode 100644 index 0e60bfed5..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csuba/props.ma +++ /dev/null @@ -1,27 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csuba/defs.ma". - -include "basic_1/C/fwd.ma". - -lemma csuba_refl: - \forall (g: G).(\forall (c: C).(csuba g c c)) -\def - \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csuba g c0 c0)) -(\lambda (n: nat).(csuba_sort g n)) (\lambda (c0: C).(\lambda (H: (csuba g c0 -c0)).(\lambda (k: K).(\lambda (t: T).(csuba_head g c0 c0 H k t))))) c)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/arity.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/arity.ma deleted file mode 100644 index 63593633a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/arity.ma +++ /dev/null @@ -1,36 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/csuba.ma". - -lemma csubc_arity_conf: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to -(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (arity g c2 t a))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 -c2)).(\lambda (t: T).(\lambda (a: A).(\lambda (H0: (arity g c1 t -a)).(csuba_arity g c1 t a H0 c2 (csubc_csuba g c1 c2 H)))))))). - -lemma csubc_arity_trans: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to -((csubv c1 c2) \to (\forall (t: T).(\forall (a: A).((arity g c2 t a) \to -(arity g c1 t a)))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 -c2)).(\lambda (H0: (csubv c1 c2)).(\lambda (t: T).(\lambda (a: A).(\lambda -(H1: (arity g c2 t a)).(csuba_arity_rev g c2 t a H1 c1 (csubc_csuba g c1 c2 -H) H0)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/clear.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/clear.ma deleted file mode 100644 index eaef555fd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/clear.ma +++ /dev/null @@ -1,167 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/fwd.ma". - -include "basic_1/clear/fwd.ma". - -lemma csubc_clear_conf: - \forall (g: G).(\forall (c1: C).(\forall (e1: C).((clear c1 e1) \to (\forall -(c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda -(e2: C).(csubc g e1 e2)))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (e1: C).(\lambda (H: (clear c1 -e1)).(clear_ind (\lambda (c: C).(\lambda (c0: C).(\forall (c2: C).((csubc g c -c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c0 -e2))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (c2: -C).(\lambda (H0: (csubc g (CHead e (Bind b) u) c2)).(let H_x \def -(csubc_gen_head_l g e c2 u (Bind b) H0) in (let H1 \def H_x in (or3_ind (ex2 -C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind b) u))) (\lambda (c3: C).(csubc g -e c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K -(Bind b) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq -C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda -(_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 -g (asucc g a) e u)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g -a c3 w))))) (ex4_3 B C T (\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: -T).(eq C c2 (CHead c3 (Bind b0) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K (Bind b) (Bind Void))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g e c3))))) (ex2 C (\lambda (e2: C).(clear c2 e2)) -(\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2))) (\lambda (H2: (ex2 C -(\lambda (c3: C).(eq C c2 (CHead c3 (Bind b) u))) (\lambda (c3: C).(csubc g e -c3)))).(ex2_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind b) u))) (\lambda -(c3: C).(csubc g e c3)) (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: -C).(csubc g (CHead e (Bind b) u) e2))) (\lambda (x: C).(\lambda (H3: (eq C c2 -(CHead x (Bind b) u))).(\lambda (H4: (csubc g e x)).(eq_ind_r C (CHead x -(Bind b) u) (\lambda (c: C).(ex2 C (\lambda (e2: C).(clear c e2)) (\lambda -(e2: C).(csubc g (CHead e (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: -C).(clear (CHead x (Bind b) u) e2)) (\lambda (e2: C).(csubc g (CHead e (Bind -b) u) e2)) (CHead x (Bind b) u) (clear_bind b x u) (csubc_head g e x H4 (Bind -b) u)) c2 H3)))) H2)) (\lambda (H2: (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K (Bind b) (Bind Abst))))) (\lambda (c3: C).(\lambda -(w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: -C).(\lambda (_: T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda -(w: T).(\lambda (a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind b) (Bind Abst))))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g e c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) e u)))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))) (ex2 C (\lambda -(e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H3: (eq K (Bind -b) (Bind Abst))).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda -(H5: (csubc g e x0)).(\lambda (H6: (sc3 g (asucc g x2) e u)).(\lambda (H7: -(sc3 g x2 x0 x1)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c: C).(ex2 -C (\lambda (e2: C).(clear c e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) -u) e2)))) (let H8 \def (f_equal K B (\lambda (e0: K).(match e0 with [(Bind -b0) \Rightarrow b0 | (Flat _) \Rightarrow b])) (Bind b) (Bind Abst) H3) in -(eq_ind_r B Abst (\lambda (b0: B).(ex2 C (\lambda (e2: C).(clear (CHead x0 -(Bind Abbr) x1) e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b0) u) e2)))) -(ex_intro2 C (\lambda (e2: C).(clear (CHead x0 (Bind Abbr) x1) e2)) (\lambda -(e2: C).(csubc g (CHead e (Bind Abst) u) e2)) (CHead x0 (Bind Abbr) x1) -(clear_bind Abbr x0 x1) (csubc_abst g e x0 H5 u x2 H6 x1 H7)) b H8)) c2 -H4))))))))) H2)) (\lambda (H2: (ex4_3 B C T (\lambda (b0: B).(\lambda (c3: -C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b0) v2))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind b) (Bind Void))))) (\lambda -(b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3)))))).(ex4_3_ind B C T -(\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind -b0) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind b) -(Bind Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B -b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g e -c3)))) (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g -(CHead e (Bind b) u) e2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (H3: (eq C c2 (CHead x1 (Bind x0) x2))).(\lambda (H4: (eq K (Bind -b) (Bind Void))).(\lambda (H5: (not (eq B x0 Void))).(\lambda (H6: (csubc g e -x1)).(eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(ex2 C (\lambda (e2: -C).(clear c e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2)))) (let -H7 \def (f_equal K B (\lambda (e0: K).(match e0 with [(Bind b0) \Rightarrow -b0 | (Flat _) \Rightarrow b])) (Bind b) (Bind Void) H4) in (eq_ind_r B Void -(\lambda (b0: B).(ex2 C (\lambda (e2: C).(clear (CHead x1 (Bind x0) x2) e2)) -(\lambda (e2: C).(csubc g (CHead e (Bind b0) u) e2)))) (ex_intro2 C (\lambda -(e2: C).(clear (CHead x1 (Bind x0) x2) e2)) (\lambda (e2: C).(csubc g (CHead -e (Bind Void) u) e2)) (CHead x1 (Bind x0) x2) (clear_bind x0 x1 x2) -(csubc_void g e x1 H6 x0 H5 u x2)) b H7)) c2 H3)))))))) H2)) H1)))))))) -(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1: -((\forall (c2: C).((csubc g e c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) -(\lambda (e2: C).(csubc g c e2))))))).(\lambda (f: F).(\lambda (u: -T).(\lambda (c2: C).(\lambda (H2: (csubc g (CHead e (Flat f) u) c2)).(let H_x -\def (csubc_gen_head_l g e c2 u (Flat f) H2) in (let H3 \def H_x in (or3_ind -(ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 (Flat f) u))) (\lambda (c3: -C).(csubc g e c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: -A).(eq K (Flat f) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda -(_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda (w: T).(\lambda -(a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: -C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: T).(eq K (Flat f) (Bind Void))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3))))) (ex2 C (\lambda (e2: -C).(clear c2 e2)) (\lambda (e2: C).(csubc g c e2))) (\lambda (H4: (ex2 C -(\lambda (c3: C).(eq C c2 (CHead c3 (Flat f) u))) (\lambda (c3: C).(csubc g e -c3)))).(ex2_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Flat f) u))) (\lambda -(c3: C).(csubc g e c3)) (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: -C).(csubc g c e2))) (\lambda (x: C).(\lambda (H5: (eq C c2 (CHead x (Flat f) -u))).(\lambda (H6: (csubc g e x)).(eq_ind_r C (CHead x (Flat f) u) (\lambda -(c0: C).(ex2 C (\lambda (e2: C).(clear c0 e2)) (\lambda (e2: C).(csubc g c -e2)))) (let H_x0 \def (H1 x H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda -(e2: C).(clear x e2)) (\lambda (e2: C).(csubc g c e2)) (ex2 C (\lambda (e2: -C).(clear (CHead x (Flat f) u) e2)) (\lambda (e2: C).(csubc g c e2))) -(\lambda (x0: C).(\lambda (H8: (clear x x0)).(\lambda (H9: (csubc g c -x0)).(ex_intro2 C (\lambda (e2: C).(clear (CHead x (Flat f) u) e2)) (\lambda -(e2: C).(csubc g c e2)) x0 (clear_flat x x0 H8 f u) H9)))) H7))) c2 H5)))) -H4)) (\lambda (H4: (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: -A).(eq K (Flat f) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda -(_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda (w: T).(\lambda -(a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K (Flat f) (Bind Abst))))) (\lambda (c3: C).(\lambda -(w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: -C).(\lambda (_: T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda -(w: T).(\lambda (a: A).(sc3 g a c3 w)))) (ex2 C (\lambda (e2: C).(clear c2 -e2)) (\lambda (e2: C).(csubc g c e2))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: A).(\lambda (H5: (eq K (Flat f) (Bind Abst))).(\lambda (H6: -(eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (csubc g e x0)).(\lambda -(_: (sc3 g (asucc g x2) e u)).(\lambda (_: (sc3 g x2 x0 x1)).(eq_ind_r C -(CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(clear c0 -e2)) (\lambda (e2: C).(csubc g c e2)))) (let H10 \def (eq_ind K (Flat f) -(\lambda (ee: K).(match ee with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])) I (Bind Abst) H5) in (False_ind (ex2 C (\lambda (e2: -C).(clear (CHead x0 (Bind Abbr) x1) e2)) (\lambda (e2: C).(csubc g c e2))) -H10)) c2 H6))))))))) H4)) (\lambda (H4: (ex4_3 B C T (\lambda (b: B).(\lambda -(c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: T).(eq K (Flat f) (Bind Void))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3)))))).(ex4_3_ind B C T -(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) -v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Flat f) (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3)))) -(ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c e2))) -(\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H5: (eq C c2 -(CHead x1 (Bind x0) x2))).(\lambda (H6: (eq K (Flat f) (Bind Void))).(\lambda -(_: (not (eq B x0 Void))).(\lambda (_: (csubc g e x1)).(eq_ind_r C (CHead x1 -(Bind x0) x2) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(clear c0 e2)) -(\lambda (e2: C).(csubc g c e2)))) (let H9 \def (eq_ind K (Flat f) (\lambda -(ee: K).(match ee with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])) I (Bind Void) H6) in (False_ind (ex2 C (\lambda (e2: C).(clear (CHead -x1 (Bind x0) x2) e2)) (\lambda (e2: C).(csubc g c e2))) H9)) c2 H5)))))))) -H4)) H3))))))))))) c1 e1 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/csuba.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/csuba.ma deleted file mode 100644 index 9e1d3014e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/csuba.ma +++ /dev/null @@ -1,37 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/fwd.ma". - -include "basic_1/sc3/props.ma". - -lemma csubc_csuba: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csuba -g c1 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 -c2)).(csubc_ind g (\lambda (c: C).(\lambda (c0: C).(csuba g c c0))) (\lambda -(n: nat).(csuba_refl g (CSort n))) (\lambda (c3: C).(\lambda (c4: C).(\lambda -(_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (k: K).(\lambda -(v: T).(csuba_head g c3 c4 H1 k v))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (b: -B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: -T).(csuba_void g c3 c4 H1 b H2 u1 u2))))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (v: -T).(\lambda (a: A).(\lambda (H2: (sc3 g (asucc g a) c3 v)).(\lambda (w: -T).(\lambda (H3: (sc3 g a c4 w)).(csuba_abst g c3 c4 H1 v a (sc3_arity_gen g -c3 v (asucc g a) H2) w (sc3_arity_gen g c4 w a H3))))))))))) c1 c2 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/defs.ma deleted file mode 100644 index e1f71a30f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/defs.ma +++ /dev/null @@ -1,30 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sc3/defs.ma". - -inductive csubc (g: G): C \to (C \to Prop) \def -| csubc_sort: \forall (n: nat).(csubc g (CSort n) (CSort n)) -| csubc_head: \forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (\forall -(k: K).(\forall (v: T).(csubc g (CHead c1 k v) (CHead c2 k v)))))) -| csubc_void: \forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (\forall -(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csubc g -(CHead c1 (Bind Void) u1) (CHead c2 (Bind b) u2)))))))) -| csubc_abst: \forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (\forall -(v: T).(\forall (a: A).((sc3 g (asucc g a) c1 v) \to (\forall (w: T).((sc3 g -a c2 w) \to (csubc g (CHead c1 (Bind Abst) v) (CHead c2 (Bind Abbr) -w))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/drop.ma deleted file mode 100644 index a0bb37e96..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop.ma +++ /dev/null @@ -1,466 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/fwd.ma". - -include "basic_1/sc3/props.ma". - -lemma csubc_drop_conf_O: - \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (h: nat).((drop h -O c1 e1) \to (\forall (c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: -C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (e1: -C).(\forall (h: nat).((drop h O c e1) \to (\forall (c2: C).((csubc g c c2) -\to (ex2 C (\lambda (e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 -e2))))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (h: nat).(\lambda (H: -(drop h O (CSort n) e1)).(\lambda (c2: C).(\lambda (H0: (csubc g (CSort n) -c2)).(and3_ind (eq C e1 (CSort n)) (eq nat h O) (eq nat O O) (ex2 C (\lambda -(e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (H1: -(eq C e1 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (_: (eq nat O -O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (e2: C).(drop n0 O c2 -e2)) (\lambda (e2: C).(csubc g e1 e2)))) (eq_ind_r C (CSort n) (\lambda (c: -C).(ex2 C (\lambda (e2: C).(drop O O c2 e2)) (\lambda (e2: C).(csubc g c -e2)))) (ex_intro2 C (\lambda (e2: C).(drop O O c2 e2)) (\lambda (e2: -C).(csubc g (CSort n) e2)) c2 (drop_refl c2) H0) e1 H1) h H2)))) -(drop_gen_sort n h O e1 H)))))))) (\lambda (c: C).(\lambda (H: ((\forall (e1: -C).(\forall (h: nat).((drop h O c e1) \to (\forall (c2: C).((csubc g c c2) -\to (ex2 C (\lambda (e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 -e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (h: -nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e1) \to (\forall -(c2: C).((csubc g (CHead c k t) c2) \to (ex2 C (\lambda (e2: C).(drop n O c2 -e2)) (\lambda (e2: C).(csubc g e1 e2))))))) (\lambda (H0: (drop O O (CHead c -k t) e1)).(\lambda (c2: C).(\lambda (H1: (csubc g (CHead c k t) c2)).(eq_ind -C (CHead c k t) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop O O c2 e2)) -(\lambda (e2: C).(csubc g c0 e2)))) (ex_intro2 C (\lambda (e2: C).(drop O O -c2 e2)) (\lambda (e2: C).(csubc g (CHead c k t) e2)) c2 (drop_refl c2) H1) e1 -(drop_gen_refl (CHead c k t) e1 H0))))) (\lambda (n: nat).(\lambda (H0: -(((drop n O (CHead c k t) e1) \to (\forall (c2: C).((csubc g (CHead c k t) -c2) \to (ex2 C (\lambda (e2: C).(drop n O c2 e2)) (\lambda (e2: C).(csubc g -e1 e2)))))))).(\lambda (H1: (drop (S n) O (CHead c k t) e1)).(\lambda (c2: -C).(\lambda (H2: (csubc g (CHead c k t) c2)).(let H_x \def (csubc_gen_head_l -g c c2 t k H2) in (let H3 \def H_x in (or3_ind (ex2 C (\lambda (c3: C).(eq C -c2 (CHead c3 k t))) (\lambda (c3: C).(csubc g c c3))) (ex5_3 C T A (\lambda -(_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c t)))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T -(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) -v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c c3))))) -(ex2 C (\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 -e2))) (\lambda (H4: (ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 k t))) -(\lambda (c3: C).(csubc g c c3)))).(ex2_ind C (\lambda (c3: C).(eq C c2 -(CHead c3 k t))) (\lambda (c3: C).(csubc g c c3)) (ex2 C (\lambda (e2: -C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (x: -C).(\lambda (H5: (eq C c2 (CHead x k t))).(\lambda (H6: (csubc g c -x)).(eq_ind_r C (CHead x k t) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop -(S n) O c0 e2)) (\lambda (e2: C).(csubc g e1 e2)))) (let H_x0 \def (H e1 (r k -n) (drop_gen_drop k c e1 t n H1) x H6) in (let H7 \def H_x0 in (ex2_ind C -(\lambda (e2: C).(drop (r k n) O x e2)) (\lambda (e2: C).(csubc g e1 e2)) -(ex2 C (\lambda (e2: C).(drop (S n) O (CHead x k t) e2)) (\lambda (e2: -C).(csubc g e1 e2))) (\lambda (x0: C).(\lambda (H8: (drop (r k n) O x -x0)).(\lambda (H9: (csubc g e1 x0)).(ex_intro2 C (\lambda (e2: C).(drop (S n) -O (CHead x k t) e2)) (\lambda (e2: C).(csubc g e1 e2)) x0 (drop_drop k n x x0 -H8 t) H9)))) H7))) c2 H5)))) H4)) (\lambda (H4: (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c t)))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind -Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c -c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c -t)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))) (ex2 -C (\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H5: (eq K k -(Bind Abst))).(\lambda (H6: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda -(H7: (csubc g c x0)).(\lambda (_: (sc3 g (asucc g x2) c t)).(\lambda (_: (sc3 -g x2 x0 x1)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(ex2 C -(\lambda (e2: C).(drop (S n) O c0 e2)) (\lambda (e2: C).(csubc g e1 e2)))) -(let H10 \def (eq_ind K k (\lambda (k0: K).(drop (r k0 n) O c e1)) -(drop_gen_drop k c e1 t n H1) (Bind Abst) H5) in (let H11 \def (eq_ind K k -(\lambda (k0: K).((drop n O (CHead c k0 t) e1) \to (\forall (c3: C).((csubc g -(CHead c k0 t) c3) \to (ex2 C (\lambda (e2: C).(drop n O c3 e2)) (\lambda -(e2: C).(csubc g e1 e2))))))) H0 (Bind Abst) H5) in (let H_x0 \def (H e1 (r -(Bind Abst) n) H10 x0 H7) in (let H12 \def H_x0 in (ex2_ind C (\lambda (e2: -C).(drop n O x0 e2)) (\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: -C).(drop (S n) O (CHead x0 (Bind Abbr) x1) e2)) (\lambda (e2: C).(csubc g e1 -e2))) (\lambda (x: C).(\lambda (H13: (drop n O x0 x)).(\lambda (H14: (csubc g -e1 x)).(ex_intro2 C (\lambda (e2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) -e2)) (\lambda (e2: C).(csubc g e1 e2)) x (drop_drop (Bind Abbr) n x0 x H13 -x1) H14)))) H12))))) c2 H6))))))))) H4)) (\lambda (H4: (ex4_3 B C T (\lambda -(b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind Void))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) -(\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c -c3)))))).(ex4_3_ind B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: -T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c c3)))) (ex2 C (\lambda (e2: C).(drop (S n) O c2 -e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (x0: B).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (H5: (eq C c2 (CHead x1 (Bind x0) x2))).(\lambda -(H6: (eq K k (Bind Void))).(\lambda (_: (not (eq B x0 Void))).(\lambda (H8: -(csubc g c x1)).(eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c0: C).(ex2 C -(\lambda (e2: C).(drop (S n) O c0 e2)) (\lambda (e2: C).(csubc g e1 e2)))) -(let H9 \def (eq_ind K k (\lambda (k0: K).(drop (r k0 n) O c e1)) -(drop_gen_drop k c e1 t n H1) (Bind Void) H6) in (let H10 \def (eq_ind K k -(\lambda (k0: K).((drop n O (CHead c k0 t) e1) \to (\forall (c3: C).((csubc g -(CHead c k0 t) c3) \to (ex2 C (\lambda (e2: C).(drop n O c3 e2)) (\lambda -(e2: C).(csubc g e1 e2))))))) H0 (Bind Void) H6) in (let H_x0 \def (H e1 (r -(Bind Void) n) H9 x1 H8) in (let H11 \def H_x0 in (ex2_ind C (\lambda (e2: -C).(drop n O x1 e2)) (\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: -C).(drop (S n) O (CHead x1 (Bind x0) x2) e2)) (\lambda (e2: C).(csubc g e1 -e2))) (\lambda (x: C).(\lambda (H12: (drop n O x1 x)).(\lambda (H13: (csubc g -e1 x)).(ex_intro2 C (\lambda (e2: C).(drop (S n) O (CHead x1 (Bind x0) x2) -e2)) (\lambda (e2: C).(csubc g e1 e2)) x (drop_drop (Bind x0) n x1 x H12 x2) -H13)))) H11))))) c2 H5)))))))) H4)) H3)))))))) h))))))) c1)). - -lemma drop_csubc_trans: - \forall (g: G).(\forall (c2: C).(\forall (e2: C).(\forall (d: nat).(\forall -(h: nat).((drop h d c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C -(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))) -\def - \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: -C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: -C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda -(c1: C).(csubc g c c1)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda -(d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda -(e1: C).(\lambda (H0: (csubc g e2 e1)).(and3_ind (eq C e2 (CSort n)) (eq nat -h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: -C).(csubc g (CSort n) c1))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: -(eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: -nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g -(CSort n) c1)))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: -C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)))) (let H4 \def -(eq_ind C e2 (\lambda (c: C).(csubc g c e1)) H0 (CSort n) H1) in (ex_intro2 C -(\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)) -e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) -(\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: -nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C -(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c -c1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: -nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) -e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h -n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) (\lambda (h: -nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall -(e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) -(\lambda (c1: C).(csubc g (CHead c k t) c1))))))) (\lambda (H0: (drop O O -(CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 -\def (eq_ind_r C e2 (\lambda (c0: C).(csubc g c0 e1)) H1 (CHead c k t) -(drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O -O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)) e1 (drop_refl e1) -H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to -(\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 -e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))).(\lambda (H1: (drop -(S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 -e1)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in -(let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) -(\lambda (c1: C).(csubc g c c1)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 -e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))) (\lambda (x: C).(\lambda -(H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g c x)).(ex_intro2 C -(\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k -t) c1)) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g c x H5 k t))))) -H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n -(CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda -(c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) -c1))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) -e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 e1)).(ex3_2_ind C T (\lambda -(e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k -n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: -C).(csubc g (CHead c k t) c1))) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) -x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda -(c0: C).(csubc g c0 e1)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 -(\lambda (c0: C).(\forall (h0: nat).((drop h0 n (CHead c k t) c0) \to -(\forall (e3: C).((csubc g c0 e3) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 -e3)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) H0 (CHead x0 k x1) -H3) in (let H8 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: nat).((drop h0 -n (CHead c k t0) (CHead x0 k x1)) \to (\forall (e3: C).((csubc g (CHead x0 k -x1) e3) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda (c1: -C).(csubc g (CHead c k t0) c1)))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r -T (lift h (r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) -c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t0) c1)))) (let H_x \def -(csubc_gen_head_l g x0 e1 x1 k H6) in (let H9 \def H_x in (or3_ind (ex2 C -(\lambda (c3: C).(eq C e1 (CHead c3 k x1))) (\lambda (c3: C).(csubc g x0 -c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k -(Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C e1 -(CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: -A).(csubc g x0 c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g -(asucc g a) x0 x1)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g -a c3 w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: -T).(eq C e1 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g x0 c3))))) (ex2 C (\lambda (c1: C).(drop h (S n) -c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1))) -(\lambda (H10: (ex2 C (\lambda (c3: C).(eq C e1 (CHead c3 k x1))) (\lambda -(c3: C).(csubc g x0 c3)))).(ex2_ind C (\lambda (c3: C).(eq C e1 (CHead c3 k -x1))) (\lambda (c3: C).(csubc g x0 c3)) (ex2 C (\lambda (c1: C).(drop h (S n) -c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1))) -(\lambda (x: C).(\lambda (H11: (eq C e1 (CHead x k x1))).(\lambda (H12: -(csubc g x0 x)).(eq_ind_r C (CHead x k x1) (\lambda (c0: C).(ex2 C (\lambda -(c1: C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r -k n) x1)) c1)))) (let H_x0 \def (H x0 (r k n) h H5 x H12) in (let H13 \def -H_x0 in (ex2_ind C (\lambda (c1: C).(drop h (r k n) c1 x)) (\lambda (c1: -C).(csubc g c c1)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) -(\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1))) (\lambda (x2: -C).(\lambda (H14: (drop h (r k n) x2 x)).(\lambda (H15: (csubc g c -x2)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) (\lambda -(c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)) (CHead x2 k (lift h (r -k n) x1)) (drop_skip k h n x2 x H14 x1) (csubc_head g c x2 H15 k (lift h (r k -n) x1)))))) H13))) e1 H11)))) H10)) (\lambda (H10: (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C e1 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x0 c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) x0 x1)))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C e1 (CHead c3 (Bind -Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x0 -c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) x0 -x1)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))) -(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g -(CHead c k (lift h (r k n) x1)) c1))) (\lambda (x2: C).(\lambda (x3: -T).(\lambda (x4: A).(\lambda (H11: (eq K k (Bind Abst))).(\lambda (H12: (eq C -e1 (CHead x2 (Bind Abbr) x3))).(\lambda (H13: (csubc g x0 x2)).(\lambda (H14: -(sc3 g (asucc g x4) x0 x1)).(\lambda (H15: (sc3 g x4 x2 x3)).(eq_ind_r C -(CHead x2 (Bind Abbr) x3) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop h (S -n) c1 c0)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)))) -(let H16 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: nat).((drop h0 n -(CHead c k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to (\forall (e3: -C).((csubc g (CHead x0 k0 x1) e3) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 -e3)) (\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) x1)) c1)))))))) -H8 (Bind Abst) H11) in (let H17 \def (eq_ind K k (\lambda (k0: K).(drop h (r -k0 n) c x0)) H5 (Bind Abst) H11) in (eq_ind_r K (Bind Abst) (\lambda (k0: -K).(ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abbr) x3))) -(\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) x1)) c1)))) (let H_x0 -\def (H x0 (r (Bind Abst) n) h H17 x2 H13) in (let H18 \def H_x0 in (ex2_ind -C (\lambda (c1: C).(drop h n c1 x2)) (\lambda (c1: C).(csubc g c c1)) (ex2 C -(\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abbr) x3))) (\lambda (c1: -C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c1))) -(\lambda (x: C).(\lambda (H19: (drop h n x x2)).(\lambda (H20: (csubc g c -x)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abbr) -x3))) (\lambda (c1: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) -n) x1)) c1)) (CHead x (Bind Abbr) (lift h n x3)) (drop_skip_bind h n x x2 H19 -Abbr x3) (csubc_abst g c x H20 (lift h (r (Bind Abst) n) x1) x4 (sc3_lift g -(asucc g x4) x0 x1 H14 c h (r (Bind Abst) n) H17) (lift h n x3) (sc3_lift g -x4 x2 x3 H15 x h n H19)))))) H18))) k H11))) e1 H12))))))))) H10)) (\lambda -(H10: (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C e1 -(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g x0 c3)))))).(ex4_3_ind B C T (\lambda (b: B).(\lambda (c3: -C).(\lambda (v2: T).(eq C e1 (CHead c3 (Bind b) v2))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g x0 c3)))) (ex2 C (\lambda (c1: -C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) -x1)) c1))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H11: -(eq C e1 (CHead x3 (Bind x2) x4))).(\lambda (H12: (eq K k (Bind -Void))).(\lambda (H13: (not (eq B x2 Void))).(\lambda (H14: (csubc g x0 -x3)).(eq_ind_r C (CHead x3 (Bind x2) x4) (\lambda (c0: C).(ex2 C (\lambda -(c1: C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r -k n) x1)) c1)))) (let H15 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: -nat).((drop h0 n (CHead c k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to -(\forall (e3: C).((csubc g (CHead x0 k0 x1) e3) \to (ex2 C (\lambda (c1: -C).(drop h0 n c1 e3)) (\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) -x1)) c1)))))))) H8 (Bind Void) H12) in (let H16 \def (eq_ind K k (\lambda -(k0: K).(drop h (r k0 n) c x0)) H5 (Bind Void) H12) in (eq_ind_r K (Bind -Void) (\lambda (k0: K).(ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x3 -(Bind x2) x4))) (\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) x1)) -c1)))) (let H_x0 \def (H x0 (r (Bind Void) n) h H16 x3 H14) in (let H17 \def -H_x0 in (ex2_ind C (\lambda (c1: C).(drop h n c1 x3)) (\lambda (c1: C).(csubc -g c c1)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x3 (Bind x2) x4))) -(\lambda (c1: C).(csubc g (CHead c (Bind Void) (lift h (r (Bind Void) n) x1)) -c1))) (\lambda (x: C).(\lambda (H18: (drop h n x x3)).(\lambda (H19: (csubc g -c x)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x3 (Bind x2) -x4))) (\lambda (c1: C).(csubc g (CHead c (Bind Void) (lift h (r (Bind Void) -n) x1)) c1)) (CHead x (Bind x2) (lift h n x4)) (drop_skip_bind h n x x3 H18 -x2 x4) (csubc_void g c x H19 x2 H13 (lift h (r (Bind Void) n) x1) (lift h n -x4)))))) H17))) k H12))) e1 H11)))))))) H10)) H9))) t H4))))))))) -(drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). - -lemma csubc_drop_conf_rev: - \forall (g: G).(\forall (c2: C).(\forall (e2: C).(\forall (d: nat).(\forall -(h: nat).((drop h d c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C -(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))) -\def - \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: -C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: -C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda -(c1: C).(csubc g c1 c)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda -(d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda -(e1: C).(\lambda (H0: (csubc g e1 e2)).(and3_ind (eq C e2 (CSort n)) (eq nat -h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: -C).(csubc g c1 (CSort n)))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: -(eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: -nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g c1 -(CSort n))))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: -C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))))) (let H4 \def -(eq_ind C e2 (\lambda (c: C).(csubc g e1 c)) H0 (CSort n) H1) in (ex_intro2 C -(\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))) -e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) -(\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: -nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C -(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 -c))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: -nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) -e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h -n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) (\lambda (h: -nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall -(e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) -(\lambda (c1: C).(csubc g c1 (CHead c k t)))))))) (\lambda (H0: (drop O O -(CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 -\def (eq_ind_r C e2 (\lambda (c0: C).(csubc g e1 c0)) H1 (CHead c k t) -(drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O -O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))) e1 (drop_refl e1) -H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to -(\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 -e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))).(\lambda (H1: (drop -(S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 -e2)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in -(let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) -(\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 -e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))) (\lambda (x: C).(\lambda -(H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g x c)).(ex_intro2 C -(\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c -k t))) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g x c H5 k t))))) -H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n -(CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda -(c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k -t)))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) -e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 e2)).(ex3_2_ind C T (\lambda -(e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k -n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: -C).(csubc g c1 (CHead c k t)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) -x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda -(c0: C).(csubc g e1 c0)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 -(\lambda (c0: C).(\forall (h0: nat).((drop h0 n (CHead c k t) c0) \to -(\forall (e3: C).((csubc g e3 c0) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 -e3)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) H0 (CHead x0 k x1) -H3) in (let H8 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: nat).((drop h0 -n (CHead c k t0) (CHead x0 k x1)) \to (\forall (e3: C).((csubc g e3 (CHead x0 -k x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda (c1: C).(csubc -g c1 (CHead c k t0))))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r T (lift h -(r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) -(\lambda (c1: C).(csubc g c1 (CHead c k t0))))) (let H_x \def -(csubc_gen_head_r g x0 e1 x1 k H6) in (let H9 \def H_x in (or3_ind (ex2 C -(\lambda (c1: C).(eq C e1 (CHead c1 k x1))) (\lambda (c1: C).(csubc g c1 -x0))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k -(Bind Abbr))))) (\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C e1 -(CHead c1 (Bind Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: -A).(csubc g c1 x0)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g -(asucc g a) c1 v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a -x0 x1))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq -C e1 (CHead c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda -(_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c1: C).(\lambda (_: -T).(csubc g c1 x0))))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda -(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) (\lambda (H10: (ex2 C -(\lambda (c1: C).(eq C e1 (CHead c1 k x1))) (\lambda (c1: C).(csubc g c1 -x0)))).(ex2_ind C (\lambda (c1: C).(eq C e1 (CHead c1 k x1))) (\lambda (c1: -C).(csubc g c1 x0)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda -(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) (\lambda (x: -C).(\lambda (H11: (eq C e1 (CHead x k x1))).(\lambda (H12: (csubc g x -x0)).(eq_ind_r C (CHead x k x1) (\lambda (c0: C).(ex2 C (\lambda (c1: -C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k -n) x1)))))) (let H_x0 \def (H x0 (r k n) h H5 x H12) in (let H13 \def H_x0 in -(ex2_ind C (\lambda (c1: C).(drop h (r k n) c1 x)) (\lambda (c1: C).(csubc g -c1 c)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) (\lambda -(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) (\lambda (x2: -C).(\lambda (H14: (drop h (r k n) x2 x)).(\lambda (H15: (csubc g x2 -c)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) (\lambda -(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))) (CHead x2 k (lift h (r -k n) x1)) (drop_skip k h n x2 x H14 x1) (csubc_head g x2 c H15 k (lift h (r k -n) x1)))))) H13))) e1 H11)))) H10)) (\lambda (H10: (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c1: -C).(\lambda (v: T).(\lambda (_: A).(eq C e1 (CHead c1 (Bind Abst) v))))) -(\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 x0)))) (\lambda -(c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a x0 x1)))))).(ex5_3_ind C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) -(\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C e1 (CHead c1 (Bind -Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -x0)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 -v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a x0 x1)))) (ex2 -C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead -c k (lift h (r k n) x1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -A).(\lambda (H11: (eq K k (Bind Abbr))).(\lambda (H12: (eq C e1 (CHead x2 -(Bind Abst) x3))).(\lambda (H13: (csubc g x2 x0)).(\lambda (H14: (sc3 g -(asucc g x4) x2 x3)).(\lambda (H15: (sc3 g x4 x0 x1)).(eq_ind_r C (CHead x2 -(Bind Abst) x3) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop h (S n) c1 -c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))))) (let -H16 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: nat).((drop h0 n (CHead c -k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to (\forall (e3: C).((csubc g e3 -(CHead x0 k0 x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda -(c1: C).(csubc g c1 (CHead c k0 (lift h (r k0 n) x1)))))))))) H8 (Bind Abbr) -H11) in (let H17 \def (eq_ind K k (\lambda (k0: K).(drop h (r k0 n) c x0)) H5 -(Bind Abbr) H11) in (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 C (\lambda -(c1: C).(drop h (S n) c1 (CHead x2 (Bind Abst) x3))) (\lambda (c1: C).(csubc -g c1 (CHead c k0 (lift h (r k0 n) x1)))))) (let H_x0 \def (H x0 (r (Bind -Abbr) n) h H17 x2 H13) in (let H18 \def H_x0 in (ex2_ind C (\lambda (c1: -C).(drop h n c1 x2)) (\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: -C).(drop h (S n) c1 (CHead x2 (Bind Abst) x3))) (\lambda (c1: C).(csubc g c1 -(CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1))))) (\lambda (x: -C).(\lambda (H19: (drop h n x x2)).(\lambda (H20: (csubc g x c)).(ex_intro2 C -(\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abst) x3))) (\lambda (c1: -C).(csubc g c1 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1)))) (CHead x -(Bind Abst) (lift h n x3)) (drop_skip_bind h n x x2 H19 Abst x3) (csubc_abst -g x c H20 (lift h n x3) x4 (sc3_lift g (asucc g x4) x2 x3 H14 x h n H19) -(lift h (r (Bind Abbr) n) x1) (sc3_lift g x4 x0 x1 H15 c h (r (Bind Abbr) n) -H17)))))) H18))) k H11))) e1 H12))))))))) H10)) (\lambda (H10: (ex4_3 B C T -(\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C e1 (CHead c1 (Bind -Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) -(\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 -x0)))))).(ex4_3_ind B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: -T).(eq C e1 (CHead c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c1: -C).(\lambda (_: T).(csubc g c1 x0)))) (ex2 C (\lambda (c1: C).(drop h (S n) -c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) -(\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H11: (eq C e1 -(CHead x3 (Bind Void) x4))).(\lambda (H12: (eq K k (Bind x2))).(\lambda (H13: -(not (eq B x2 Void))).(\lambda (H14: (csubc g x3 x0)).(eq_ind_r C (CHead x3 -(Bind Void) x4) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop h (S n) c1 -c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))))) (let -H15 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: nat).((drop h0 n (CHead c -k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to (\forall (e3: C).((csubc g e3 -(CHead x0 k0 x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda -(c1: C).(csubc g c1 (CHead c k0 (lift h (r k0 n) x1)))))))))) H8 (Bind x2) -H12) in (let H16 \def (eq_ind K k (\lambda (k0: K).(drop h (r k0 n) c x0)) H5 -(Bind x2) H12) in (eq_ind_r K (Bind x2) (\lambda (k0: K).(ex2 C (\lambda (c1: -C).(drop h (S n) c1 (CHead x3 (Bind Void) x4))) (\lambda (c1: C).(csubc g c1 -(CHead c k0 (lift h (r k0 n) x1)))))) (let H_x0 \def (H x0 (r (Bind x2) n) h -H16 x3 H14) in (let H17 \def H_x0 in (ex2_ind C (\lambda (c1: C).(drop h n c1 -x3)) (\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: C).(drop h (S n) -c1 (CHead x3 (Bind Void) x4))) (\lambda (c1: C).(csubc g c1 (CHead c (Bind -x2) (lift h (r (Bind x2) n) x1))))) (\lambda (x: C).(\lambda (H18: (drop h n -x x3)).(\lambda (H19: (csubc g x c)).(ex_intro2 C (\lambda (c1: C).(drop h (S -n) c1 (CHead x3 (Bind Void) x4))) (\lambda (c1: C).(csubc g c1 (CHead c (Bind -x2) (lift h (r (Bind x2) n) x1)))) (CHead x (Bind Void) (lift h n x4)) -(drop_skip_bind h n x x3 H18 Void x4) (csubc_void g x c H19 x2 H13 (lift h n -x4) (lift h (r (Bind x2) n) x1)))))) H17))) k H12))) e1 H11)))))))) H10)) -H9))) t H4))))))))) (drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop1.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/drop1.ma deleted file mode 100644 index 32574ea29..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/drop1.ma +++ /dev/null @@ -1,86 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/drop.ma". - -lemma drop1_csubc_trans: - \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: -C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))))))) -\def - \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 -e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 -c1))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 -e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(let H_y \def -(drop1_gen_pnil c2 e2 H) in (let H1 \def (eq_ind_r C e2 (\lambda (c: -C).(csubc g c e1)) H0 c2 H_y) in (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 -e1)) (\lambda (c1: C).(csubc g c2 c1)) e1 (drop1_nil e1) H1)))))))) (\lambda -(n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: -C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) -\to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 -c1)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n -n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H_x \def -(drop1_gen_pcons c2 e2 p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda -(c3: C).(drop n n0 c2 c3)) (\lambda (c3: C).(drop1 p c3 e2)) (ex2 C (\lambda -(c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1))) -(\lambda (x: C).(\lambda (H3: (drop n n0 c2 x)).(\lambda (H4: (drop1 p x -e2)).(let H_x0 \def (H x e2 H4 e1 H1) in (let H5 \def H_x0 in (ex2_ind C -(\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g x c1)) (ex2 C -(\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 -c1))) (\lambda (x0: C).(\lambda (H6: (drop1 p x0 e1)).(\lambda (H7: (csubc g -x x0)).(let H_x1 \def (drop_csubc_trans g c2 x n0 n H3 x0 H7) in (let H8 \def -H_x1 in (ex2_ind C (\lambda (c1: C).(drop n n0 c1 x0)) (\lambda (c1: -C).(csubc g c2 c1)) (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) -(\lambda (c1: C).(csubc g c2 c1))) (\lambda (x1: C).(\lambda (H9: (drop n n0 -x1 x0)).(\lambda (H10: (csubc g c2 x1)).(ex_intro2 C (\lambda (c1: C).(drop1 -(PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1)) x1 (drop1_cons x1 x0 -n n0 H9 e1 p H6) H10)))) H8)))))) H5)))))) H2)))))))))))) hds)). - -lemma csubc_drop1_conf_rev: - \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: -C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C -(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))))))) -\def - \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 -e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 -c2))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 -e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(let H_y \def -(drop1_gen_pnil c2 e2 H) in (let H1 \def (eq_ind_r C e2 (\lambda (c: -C).(csubc g e1 c)) H0 c2 H_y) in (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 -e1)) (\lambda (c1: C).(csubc g c1 c2)) e1 (drop1_nil e1) H1)))))))) (\lambda -(n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: -C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) -\to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 -c2)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n -n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H_x \def -(drop1_gen_pcons c2 e2 p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda -(c3: C).(drop n n0 c2 c3)) (\lambda (c3: C).(drop1 p c3 e2)) (ex2 C (\lambda -(c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2))) -(\lambda (x: C).(\lambda (H3: (drop n n0 c2 x)).(\lambda (H4: (drop1 p x -e2)).(let H_x0 \def (H x e2 H4 e1 H1) in (let H5 \def H_x0 in (ex2_ind C -(\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 x)) (ex2 C -(\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 -c2))) (\lambda (x0: C).(\lambda (H6: (drop1 p x0 e1)).(\lambda (H7: (csubc g -x0 x)).(let H_x1 \def (csubc_drop_conf_rev g c2 x n0 n H3 x0 H7) in (let H8 -\def H_x1 in (ex2_ind C (\lambda (c1: C).(drop n n0 c1 x0)) (\lambda (c1: -C).(csubc g c1 c2)) (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) -(\lambda (c1: C).(csubc g c1 c2))) (\lambda (x1: C).(\lambda (H9: (drop n n0 -x1 x0)).(\lambda (H10: (csubc g x1 c2)).(ex_intro2 C (\lambda (c1: C).(drop1 -(PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2)) x1 (drop1_cons x1 x0 -n n0 H9 e1 p H6) H10)))) H8)))))) H5)))))) H2)))))))))))) hds)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/fwd.ma deleted file mode 100644 index 22f68a288..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/fwd.ma +++ /dev/null @@ -1,664 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/defs.ma". - -implied rec lemma csubc_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: -nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubc -g c1 c2) \to ((P c1 c2) \to (\forall (k: K).(\forall (v: T).(P (CHead c1 k v) -(CHead c2 k v))))))))) (f1: (\forall (c1: C).(\forall (c2: C).((csubc g c1 -c2) \to ((P c1 c2) \to (\forall (b: B).((not (eq B b Void)) \to (\forall (u1: -T).(\forall (u2: T).(P (CHead c1 (Bind Void) u1) (CHead c2 (Bind b) -u2))))))))))) (f2: (\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to ((P -c1 c2) \to (\forall (v: T).(\forall (a: A).((sc3 g (asucc g a) c1 v) \to -(\forall (w: T).((sc3 g a c2 w) \to (P (CHead c1 (Bind Abst) v) (CHead c2 -(Bind Abbr) w)))))))))))) (c: C) (c0: C) (c1: csubc g c c0) on c1: P c c0 -\def match c1 with [(csubc_sort n) \Rightarrow (f n) | (csubc_head c2 c3 c4 k -v) \Rightarrow (f0 c2 c3 c4 ((csubc_ind g P f f0 f1 f2) c2 c3 c4) k v) | -(csubc_void c2 c3 c4 b n u1 u2) \Rightarrow (f1 c2 c3 c4 ((csubc_ind g P f f0 -f1 f2) c2 c3 c4) b n u1 u2) | (csubc_abst c2 c3 c4 v a s0 w s1) \Rightarrow -(f2 c2 c3 c4 ((csubc_ind g P f f0 f1 f2) c2 c3 c4) v a s0 w s1)]. - -lemma csubc_gen_sort_l: - \forall (g: G).(\forall (x: C).(\forall (n: nat).((csubc g (CSort n) x) \to -(eq C x (CSort n))))) -\def - \lambda (g: G).(\lambda (x: C).(\lambda (n: nat).(\lambda (H: (csubc g -(CSort n) x)).(insert_eq C (CSort n) (\lambda (c: C).(csubc g c x)) (\lambda -(c: C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (csubc g y x)).(csubc_ind g -(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) \to (eq C c0 c)))) -(\lambda (n0: nat).(\lambda (H1: (eq C (CSort n0) (CSort n))).(let H2 \def -(f_equal C nat (\lambda (e: C).(match e with [(CSort n1) \Rightarrow n1 | -(CHead _ _ _) \Rightarrow n0])) (CSort n0) (CSort n) H1) in (eq_ind_r nat n -(\lambda (n1: nat).(eq C (CSort n1) (CSort n1))) (refl_equal C (CSort n)) n0 -H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csubc g c1 -c2)).(\lambda (_: (((eq C c1 (CSort n)) \to (eq C c2 c1)))).(\lambda (k: -K).(\lambda (v: T).(\lambda (H3: (eq C (CHead c1 k v) (CSort n))).(let H4 -\def (eq_ind C (CHead c1 k v) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in -(False_ind (eq C (CHead c2 k v) (CHead c1 k v)) H4))))))))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c1 -(CSort n)) \to (eq C c2 c1)))).(\lambda (b: B).(\lambda (_: (not (eq B b -Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 (Bind -Void) u1) (CSort n))).(let H5 \def (eq_ind C (CHead c1 (Bind Void) u1) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) -\Rightarrow True])) I (CSort n) H4) in (False_ind (eq C (CHead c2 (Bind b) -u2) (CHead c1 (Bind Void) u1)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c1 (CSort n)) \to (eq C -c2 c1)))).(\lambda (v: T).(\lambda (a: A).(\lambda (_: (sc3 g (asucc g a) c1 -v)).(\lambda (w: T).(\lambda (_: (sc3 g a c2 w)).(\lambda (H5: (eq C (CHead -c1 (Bind Abst) v) (CSort n))).(let H6 \def (eq_ind C (CHead c1 (Bind Abst) v) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) -\Rightarrow True])) I (CSort n) H5) in (False_ind (eq C (CHead c2 (Bind Abbr) -w) (CHead c1 (Bind Abst) v)) H6)))))))))))) y x H0))) H)))). - -lemma csubc_gen_head_l: - \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (k: -K).((csubc g (CHead c1 k v) x) \to (or3 (ex2 C (\lambda (c2: C).(eq C x -(CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c2: -C).(\lambda (w: T).(\lambda (_: A).(eq C x (CHead c2 (Bind Abbr) w))))) -(\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda -(c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T -(\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C x (CHead c2 (Bind b) -v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: T).(csubc g c1 -c2))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (k: -K).(\lambda (H: (csubc g (CHead c1 k v) x)).(insert_eq C (CHead c1 k v) -(\lambda (c: C).(csubc g c x)) (\lambda (_: C).(or3 (ex2 C (\lambda (c2: -C).(eq C x (CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c2: C).(\lambda (w: T).(\lambda (_: A).(eq C x (CHead c2 (Bind -Abbr) w))))) (\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -c2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 -v)))) (\lambda (c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) -(ex4_3 B C T (\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C x (CHead -c2 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k -(Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: T).(csubc g c1 -c2))))))) (\lambda (y: C).(\lambda (H0: (csubc g y x)).(csubc_ind g (\lambda -(c: C).(\lambda (c0: C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda -(c2: C).(eq C c0 (CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C -T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c2: C).(\lambda (w: T).(\lambda (_: A).(eq C c0 (CHead c2 (Bind -Abbr) w))))) (\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -c2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 -v)))) (\lambda (c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) -(ex4_3 B C T (\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C c0 -(CHead c2 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: -T).(csubc g c1 c2))))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) -(CHead c1 k v))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I -(CHead c1 k v) H1) in (False_ind (or3 (ex2 C (\lambda (c2: C).(eq C (CSort n) -(CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c2: -C).(\lambda (w: T).(\lambda (_: A).(eq C (CSort n) (CHead c2 (Bind Abbr) -w))))) (\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) -(\lambda (c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B -C T (\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C (CSort n) (CHead -c2 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k -(Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: T).(csubc g c1 -c2)))))) H2)))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (csubc g c0 -c2)).(\lambda (H2: (((eq C c0 (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: -C).(eq C c2 (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind -Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 -v)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) -(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 -(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g c1 c3))))))))).(\lambda (k0: K).(\lambda (v0: T).(\lambda (H3: -(eq C (CHead c0 k0 v0) (CHead c1 k v))).(let H4 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow -c])) (CHead c0 k0 v0) (CHead c1 k v) H3) in ((let H5 \def (f_equal C K -(\lambda (e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) -\Rightarrow k1])) (CHead c0 k0 v0) (CHead c1 k v) H3) in ((let H6 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v0 | (CHead -_ _ t) \Rightarrow t])) (CHead c0 k0 v0) (CHead c1 k v) H3) in (\lambda (H7: -(eq K k0 k)).(\lambda (H8: (eq C c0 c1)).(eq_ind_r T v (\lambda (t: T).(or3 -(ex2 C (\lambda (c3: C).(eq C (CHead c2 k0 t) (CHead c3 k v))) (\lambda (c3: -C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K k (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: -A).(eq C (CHead c2 k0 t) (CHead c3 (Bind Abbr) w))))) (\lambda (c3: -C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda -(b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead c2 k0 t) (CHead c3 -(Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k -(Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 -c3))))))) (eq_ind_r K k (\lambda (k1: K).(or3 (ex2 C (\lambda (c3: C).(eq C -(CHead c2 k1 v) (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C -T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C (CHead c2 k1 v) (CHead -c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc -g c1 c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g -a) c1 v)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 -w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C -(CHead c2 k1 v) (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c1 c3))))))) (let H9 \def (eq_ind C c0 (\lambda -(c: C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 -(CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T -(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) -v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 -c3)))))))) H2 c1 H8) in (let H10 \def (eq_ind C c0 (\lambda (c: C).(csubc g c -c2)) H1 c1 H8) in (or3_intro0 (ex2 C (\lambda (c3: C).(eq C (CHead c2 k v) -(CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C (CHead c2 k v) (CHead c3 (Bind Abbr) -w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) -(\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B -C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead c2 k v) -(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g c1 c3))))) (ex_intro2 C (\lambda (c3: C).(eq C (CHead c2 k v) -(CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3)) c2 (refl_equal C (CHead c2 -k v)) H10)))) k0 H7) v0 H6)))) H5)) H4))))))))) (\lambda (c0: C).(\lambda -(c2: C).(\lambda (H1: (csubc g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 k -v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 k v))) (\lambda (c3: -C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K k (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: -A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: C).(\lambda (w: -T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda (b: B).(\lambda -(c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 c3))))))))).(\lambda (b: -B).(\lambda (H3: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c0 (Bind Void) u1) (CHead c1 k v))).(let H5 -\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | -(CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Void) u1) (CHead c1 k v) H4) -in ((let H6 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) -\Rightarrow (Bind Void) | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 (Bind -Void) u1) (CHead c1 k v) H4) in ((let H7 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) -(CHead c0 (Bind Void) u1) (CHead c1 k v) H4) in (\lambda (H8: (eq K (Bind -Void) k)).(\lambda (H9: (eq C c0 c1)).(let H10 \def (eq_ind C c0 (\lambda (c: -C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 (CHead -c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T -(\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind -b0) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 -c3)))))))) H2 c1 H9) in (let H11 \def (eq_ind C c0 (\lambda (c: C).(csubc g c -c2)) H1 c1 H9) in (let H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c1 -(CHead c1 k0 v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 k0 v))) -(\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: C).(\lambda (w: -T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: -C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda -(b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b0) -v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k0 (Bind -Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 -c3)))))))) H10 (Bind Void) H8) in (eq_ind K (Bind Void) (\lambda (k0: K).(or3 -(ex2 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) u2) (CHead c3 k0 v))) -(\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: C).(\lambda (w: -T).(\lambda (_: A).(eq C (CHead c2 (Bind b) u2) (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T -(\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead c2 (Bind b) -u2) (CHead c3 (Bind b0) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K k0 (Bind Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g c1 c3))))))) (or3_intro2 (ex2 C (\lambda (c3: C).(eq C (CHead c2 -(Bind b) u2) (CHead c3 (Bind Void) v))) (\lambda (c3: C).(csubc g c1 c3))) -(ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind -Void) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C -(CHead c2 (Bind b) u2) (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda -(_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: C).(\lambda (w: -T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda (b0: B).(\lambda -(c3: C).(\lambda (v2: T).(eq C (CHead c2 (Bind b) u2) (CHead c3 (Bind b0) -v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Void) -(Bind Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B -b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 -c3))))) (ex4_3_intro B C T (\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: -T).(eq C (CHead c2 (Bind b) u2) (CHead c3 (Bind b0) v2))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Void) (Bind Void))))) (\lambda -(b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 c3)))) b c2 u2 (refl_equal C -(CHead c2 (Bind b) u2)) (refl_equal K (Bind Void)) H3 H11)) k H8))))))) H6)) -H5))))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (csubc g c0 -c2)).(\lambda (H2: (((eq C c0 (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: -C).(eq C c2 (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind -Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 -v)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) -(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 -(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g c1 c3))))))))).(\lambda (v0: T).(\lambda (a: A).(\lambda (H3: -(sc3 g (asucc g a) c0 v0)).(\lambda (w: T).(\lambda (H4: (sc3 g a c2 -w)).(\lambda (H5: (eq C (CHead c0 (Bind Abst) v0) (CHead c1 k v))).(let H6 -\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | -(CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Abst) v0) (CHead c1 k v) H5) -in ((let H7 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) -\Rightarrow (Bind Abst) | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 (Bind -Abst) v0) (CHead c1 k v) H5) in ((let H8 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) -(CHead c0 (Bind Abst) v0) (CHead c1 k v) H5) in (\lambda (H9: (eq K (Bind -Abst) k)).(\lambda (H10: (eq C c0 c1)).(let H11 \def (eq_ind T v0 (\lambda -(t: T).(sc3 g (asucc g a) c0 t)) H3 v H8) in (let H12 \def (eq_ind C c0 -(\lambda (c: C).(sc3 g (asucc g a) c v)) H11 c1 H10) in (let H13 \def (eq_ind -C c0 (\lambda (c: C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: -C).(eq C c2 (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) -(\lambda (c3: C).(\lambda (w0: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind -Abbr) w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) -c1 v)))) (\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 -w0))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C -c2 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g c1 c3)))))))) H2 c1 H10) in (let H14 \def (eq_ind C c0 (\lambda -(c: C).(csubc g c c2)) H1 c1 H10) in (let H15 \def (eq_ind_r K k (\lambda -(k0: K).((eq C c1 (CHead c1 k0 v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 -(CHead c3 k0 v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda -(_: C).(\lambda (_: T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: -C).(\lambda (w0: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w0))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) c1 v)))) (\lambda -(c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 w0))))) (ex4_3 B C T -(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) -v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k0 (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 -c3)))))))) H13 (Bind Abst) H9) in (eq_ind K (Bind Abst) (\lambda (k0: K).(or3 -(ex2 C (\lambda (c3: C).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 k0 v))) -(\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: C).(\lambda (w0: -T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 (Bind Abbr) -w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) c1 v)))) -(\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 w0))))) -(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead -c2 (Bind Abbr) w) (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K k0 (Bind Void))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c1 c3))))))) (or3_intro1 (ex2 C (\lambda (c3: -C).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 (Bind Abst) v))) (\lambda (c3: -C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda (c3: C).(\lambda (w0: -T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 (Bind Abbr) -w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) c1 v)))) -(\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 w0))))) -(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead -c2 (Bind Abbr) w) (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K (Bind Abst) (Bind Void))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c1 c3))))) (ex5_3_intro C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda -(c3: C).(\lambda (w0: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) w) -(CHead c3 (Bind Abbr) w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: -A).(csubc g c1 c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g -(asucc g a0) c1 v)))) (\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 -g a0 c3 w0)))) c2 w a (refl_equal K (Bind Abst)) (refl_equal C (CHead c2 -(Bind Abbr) w)) H14 H12 H4)) k H9))))))))) H7)) H6)))))))))))) y x H0))) -H)))))). - -lemma csubc_gen_sort_r: - \forall (g: G).(\forall (x: C).(\forall (n: nat).((csubc g x (CSort n)) \to -(eq C x (CSort n))))) -\def - \lambda (g: G).(\lambda (x: C).(\lambda (n: nat).(\lambda (H: (csubc g x -(CSort n))).(insert_eq C (CSort n) (\lambda (c: C).(csubc g x c)) (\lambda -(c: C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (csubc g x y)).(csubc_ind g -(\lambda (c: C).(\lambda (c0: C).((eq C c0 (CSort n)) \to (eq C c c0)))) -(\lambda (n0: nat).(\lambda (H1: (eq C (CSort n0) (CSort n))).(let H2 \def -(f_equal C nat (\lambda (e: C).(match e with [(CSort n1) \Rightarrow n1 | -(CHead _ _ _) \Rightarrow n0])) (CSort n0) (CSort n) H1) in (eq_ind_r nat n -(\lambda (n1: nat).(eq C (CSort n1) (CSort n1))) (refl_equal C (CSort n)) n0 -H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csubc g c1 -c2)).(\lambda (_: (((eq C c2 (CSort n)) \to (eq C c1 c2)))).(\lambda (k: -K).(\lambda (v: T).(\lambda (H3: (eq C (CHead c2 k v) (CSort n))).(let H4 -\def (eq_ind C (CHead c2 k v) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in -(False_ind (eq C (CHead c1 k v) (CHead c2 k v)) H4))))))))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c2 -(CSort n)) \to (eq C c1 c2)))).(\lambda (b: B).(\lambda (_: (not (eq B b -Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c2 (Bind -b) u2) (CSort n))).(let H5 \def (eq_ind C (CHead c2 (Bind b) u2) (\lambda -(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) -\Rightarrow True])) I (CSort n) H4) in (False_ind (eq C (CHead c1 (Bind Void) -u1) (CHead c2 (Bind b) u2)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c2 (CSort n)) \to (eq C -c1 c2)))).(\lambda (v: T).(\lambda (a: A).(\lambda (_: (sc3 g (asucc g a) c1 -v)).(\lambda (w: T).(\lambda (_: (sc3 g a c2 w)).(\lambda (H5: (eq C (CHead -c2 (Bind Abbr) w) (CSort n))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr) w) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) -\Rightarrow True])) I (CSort n) H5) in (False_ind (eq C (CHead c1 (Bind Abst) -v) (CHead c2 (Bind Abbr) w)) H6)))))))))))) x y H0))) H)))). - -lemma csubc_gen_head_r: - \forall (g: G).(\forall (c2: C).(\forall (x: C).(\forall (w: T).(\forall (k: -K).((csubc g x (CHead c2 k w)) \to (or3 (ex2 C (\lambda (c1: C).(eq C x -(CHead c1 k w))) (\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c1: -C).(\lambda (v: T).(\lambda (_: A).(eq C x (CHead c1 (Bind Abst) v))))) -(\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) (\lambda -(c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T -(\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C x (CHead c1 (Bind -Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) -(\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 c2))))))))))) -\def - \lambda (g: G).(\lambda (c2: C).(\lambda (x: C).(\lambda (w: T).(\lambda (k: -K).(\lambda (H: (csubc g x (CHead c2 k w))).(insert_eq C (CHead c2 k w) -(\lambda (c: C).(csubc g x c)) (\lambda (_: C).(or3 (ex2 C (\lambda (c1: -C).(eq C x (CHead c1 k w))) (\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) -(\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C x (CHead c1 (Bind -Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -c2)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 -v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) -(ex4_3 B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C x (CHead -c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K -k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 -c2))))))) (\lambda (y: C).(\lambda (H0: (csubc g x y)).(csubc_ind g (\lambda -(c: C).(\lambda (c0: C).((eq C c0 (CHead c2 k w)) \to (or3 (ex2 C (\lambda -(c1: C).(eq C c (CHead c1 k w))) (\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C -T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) -(\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C c (CHead c1 (Bind -Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 -c2)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 -v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) -(ex4_3 B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C c (CHead -c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K -k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 -c2))))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead c2 k -w))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort -_) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c2 k w) H1) -in (False_ind (or3 (ex2 C (\lambda (c1: C).(eq C (CSort n) (CHead c1 k w))) -(\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c1: C).(\lambda (v: -T).(\lambda (_: A).(eq C (CSort n) (CHead c1 (Bind Abst) v))))) (\lambda (c1: -C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) (\lambda (c1: -C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda -(_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C (CSort n) (CHead c1 (Bind -Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) -(\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 c2)))))) H2)))) -(\lambda (c1: C).(\lambda (c0: C).(\lambda (H1: (csubc g c1 c0)).(\lambda -(H2: (((eq C c0 (CHead c2 k w)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c1 -(CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: -C).(\lambda (v: T).(\lambda (_: A).(eq C c1 (CHead c3 (Bind Abst) v))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda -(c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T -(\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind -Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) -(\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 -c2))))))))).(\lambda (k0: K).(\lambda (v: T).(\lambda (H3: (eq C (CHead c0 k0 -v) (CHead c2 k w))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 v) -(CHead c2 k w) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e -with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 -k0 v) (CHead c2 k w) H3) in ((let H6 \def (f_equal C T (\lambda (e: C).(match -e with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 -v) (CHead c2 k w) H3) in (\lambda (H7: (eq K k0 k)).(\lambda (H8: (eq C c0 -c2)).(eq_ind_r T w (\lambda (t: T).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead -c1 k0 t) (CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) -(\lambda (c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C (CHead c1 k0 t) -(CHead c3 (Bind Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: -A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 -g (asucc g a) c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 -g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: -T).(eq C (CHead c1 k0 t) (CHead c3 (Bind Void) v1))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2))))))) (eq_ind_r K k -(\lambda (k1: K).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead c1 k1 w) (CHead c3 -k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: -C).(\lambda (v0: T).(\lambda (_: A).(eq C (CHead c1 k1 w) (CHead c3 (Bind -Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 -c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 g (asucc g a) -c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) -(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead -c1 k1 w) (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c3 c2))))))) (let H9 \def (eq_ind C c0 (\lambda -(c: C).((eq C c (CHead c2 k w)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c1 -(CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: -C).(\lambda (v0: T).(\lambda (_: A).(eq C c1 (CHead c3 (Bind Abst) v0))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda -(c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v0)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C -T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind -Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind -b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) -(\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2)))))))) H2 c2 -H8) in (let H10 \def (eq_ind C c0 (\lambda (c: C).(csubc g c1 c)) H1 c2 H8) -in (or3_intro0 (ex2 C (\lambda (c3: C).(eq C (CHead c1 k w) (CHead c3 k w))) -(\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v0: -T).(\lambda (_: A).(eq C (CHead c1 k w) (CHead c3 (Bind Abst) v0))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda -(c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v0)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C -T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead c1 k w) -(CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not -(eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g -c3 c2))))) (ex_intro2 C (\lambda (c3: C).(eq C (CHead c1 k w) (CHead c3 k -w))) (\lambda (c3: C).(csubc g c3 c2)) c1 (refl_equal C (CHead c1 k w)) -H10)))) k0 H7) v H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c0: -C).(\lambda (H1: (csubc g c1 c0)).(\lambda (H2: (((eq C c0 (CHead c2 k w)) -\to (or3 (ex2 C (\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: -C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: -A).(eq C c1 (CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: -T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda -(c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2))))))))).(\lambda (b: -B).(\lambda (H3: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c0 (Bind b) u2) (CHead c2 k w))).(let H5 \def -(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead -c _ _) \Rightarrow c])) (CHead c0 (Bind b) u2) (CHead c2 k w) H4) in ((let H6 -\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind -b) | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 (Bind b) u2) (CHead c2 k w) -H4) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind b) u2) (CHead -c2 k w) H4) in (\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c0 -c2)).(let H10 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c2 k w)) \to -(or3 (ex2 C (\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: -C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: -A).(eq C c1 (CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: -T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda -(c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b0))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2)))))))) H2 c2 H9) in (let -H11 \def (eq_ind C c0 (\lambda (c: C).(csubc g c1 c)) H1 c2 H9) in (let H12 -\def (eq_ind_r K k (\lambda (k0: K).((eq C c2 (CHead c2 k0 w)) \to (or3 (ex2 -C (\lambda (c3: C).(eq C c1 (CHead c3 k0 w))) (\lambda (c3: C).(csubc g c3 -c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k0 -(Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: A).(eq C c1 -(CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: -A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g -(asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a -c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq -C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda (_: C).(\lambda -(_: T).(eq K k0 (Bind b0))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: -T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g c3 c2)))))))) H10 (Bind b) H8) in (eq_ind K (Bind b) (\lambda -(k0: K).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead c1 (Bind Void) u1) (CHead -c3 k0 w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K k0 (Bind Abbr))))) (\lambda (c3: -C).(\lambda (v: T).(\lambda (_: A).(eq C (CHead c1 (Bind Void) u1) (CHead c3 -(Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g -c3 c2)))) (\lambda (c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) -c3 v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) -(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead -c1 (Bind Void) u1) (CHead c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (_: T).(eq K k0 (Bind b0))))) (\lambda (b0: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c3 c2))))))) (or3_intro2 (ex2 C (\lambda (c3: -C).(eq C (CHead c1 (Bind Void) u1) (CHead c3 (Bind b) w))) (\lambda (c3: -C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K (Bind b) (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: -T).(\lambda (_: A).(eq C (CHead c1 (Bind Void) u1) (CHead c3 (Bind Abst) -v))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) -(\lambda (c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C -T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead c1 (Bind -Void) u1) (CHead c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda (_: -C).(\lambda (_: T).(eq K (Bind b) (Bind b0))))) (\lambda (b0: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c3 c2))))) (ex4_3_intro B C T (\lambda (_: -B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead c1 (Bind Void) u1) (CHead -c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(eq K -(Bind b) (Bind b0))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not -(eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g -c3 c2)))) b c1 u1 (refl_equal C (CHead c1 (Bind Void) u1)) (refl_equal K -(Bind b)) H3 H11)) k H8))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda -(c0: C).(\lambda (H1: (csubc g c1 c0)).(\lambda (H2: (((eq C c0 (CHead c2 k -w)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: -C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: -A).(eq C c1 (CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: -T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda -(c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: -B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2))))))))).(\lambda (v: -T).(\lambda (a: A).(\lambda (H3: (sc3 g (asucc g a) c1 v)).(\lambda (w0: -T).(\lambda (H4: (sc3 g a c0 w0)).(\lambda (H5: (eq C (CHead c0 (Bind Abbr) -w0) (CHead c2 k w))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Bind -Abbr) w0) (CHead c2 k w) H5) in ((let H7 \def (f_equal C K (\lambda (e: -C).(match e with [(CSort _) \Rightarrow (Bind Abbr) | (CHead _ k0 _) -\Rightarrow k0])) (CHead c0 (Bind Abbr) w0) (CHead c2 k w) H5) in ((let H8 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow w0 | -(CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind Abbr) w0) (CHead c2 k w) H5) -in (\lambda (H9: (eq K (Bind Abbr) k)).(\lambda (H10: (eq C c0 c2)).(let H11 -\def (eq_ind T w0 (\lambda (t: T).(sc3 g a c0 t)) H4 w H8) in (let H12 \def -(eq_ind C c0 (\lambda (c: C).(sc3 g a c w)) H11 c2 H10) in (let H13 \def -(eq_ind C c0 (\lambda (c: C).((eq C c (CHead c2 k w)) \to (or3 (ex2 C -(\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) -(ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind -Abbr))))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C c1 (CHead -c3 (Bind Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: -A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 -g (asucc g a0) c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: -A).(sc3 g a0 c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda -(v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c3 c2)))))))) H2 c2 H10) in (let H14 \def (eq_ind -C c0 (\lambda (c: C).(csubc g c1 c)) H1 c2 H10) in (let H15 \def (eq_ind_r K -k (\lambda (k0: K).((eq C c2 (CHead c2 k0 w)) \to (or3 (ex2 C (\lambda (c3: -C).(eq C c1 (CHead c3 k0 w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A -(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k0 (Bind Abbr))))) -(\lambda (c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C c1 (CHead c3 (Bind -Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 -c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 g (asucc g a0) -c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g a0 c2 -w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C -c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: -T).(eq K k0 (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not -(eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g -c3 c2)))))))) H13 (Bind Abbr) H9) in (eq_ind K (Bind Abbr) (\lambda (k0: -K).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead c1 (Bind Abst) v) (CHead c3 k0 -w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda -(_: T).(\lambda (_: A).(eq K k0 (Bind Abbr))))) (\lambda (c3: C).(\lambda -(v0: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) v) (CHead c3 (Bind Abst) -v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) -(\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 g (asucc g a0) c3 -v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g a0 c2 w))))) -(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead -c1 (Bind Abst) v) (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(eq K k0 (Bind b))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c3 c2))))))) (or3_intro1 (ex2 C (\lambda (c3: -C).(eq C (CHead c1 (Bind Abst) v) (CHead c3 (Bind Abbr) w))) (\lambda (c3: -C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda -(_: A).(eq K (Bind Abbr) (Bind Abbr))))) (\lambda (c3: C).(\lambda (v0: -T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) v) (CHead c3 (Bind Abst) -v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) -(\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 g (asucc g a0) c3 -v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g a0 c2 w))))) -(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead -c1 (Bind Abst) v) (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (_: T).(eq K (Bind Abbr) (Bind b))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g c3 c2))))) (ex5_3_intro C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind Abbr) (Bind Abbr))))) (\lambda -(c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) v) -(CHead c3 (Bind Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: -A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 -g (asucc g a0) c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: -A).(sc3 g a0 c2 w)))) c1 v a (refl_equal K (Bind Abbr)) (refl_equal C (CHead -c1 (Bind Abst) v)) H14 H3 H12)) k H9))))))))) H7)) H6)))))))))))) x y H0))) -H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/getl.ma deleted file mode 100644 index 869c84320..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/getl.ma +++ /dev/null @@ -1,42 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/drop.ma". - -include "basic_1/csubc/clear.ma". - -lemma csubc_getl_conf: - \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (i: nat).((getl i -c1 e1) \to (\forall (c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: -C).(getl i c2 e2)) (\lambda (e2: C).(csubc g e1 e2))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (e1: C).(\lambda (i: nat).(\lambda -(H: (getl i c1 e1)).(\lambda (c2: C).(\lambda (H0: (csubc g c1 c2)).(let H1 -\def (getl_gen_all c1 e1 i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) -(\lambda (e: C).(clear e e1)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) -(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x: C).(\lambda (H2: (drop i O c1 -x)).(\lambda (H3: (clear x e1)).(let H_x \def (csubc_drop_conf_O g c1 x i H2 -c2 H0) in (let H4 \def H_x in (ex2_ind C (\lambda (e2: C).(drop i O c2 e2)) -(\lambda (e2: C).(csubc g x e2)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) -(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x0: C).(\lambda (H5: (drop i O -c2 x0)).(\lambda (H6: (csubc g x x0)).(let H_x0 \def (csubc_clear_conf g x e1 -H3 x0 H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (e2: C).(clear x0 e2)) -(\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) -(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x1: C).(\lambda (H8: (clear x0 -x1)).(\lambda (H9: (csubc g e1 x1)).(ex_intro2 C (\lambda (e2: C).(getl i c2 -e2)) (\lambda (e2: C).(csubc g e1 e2)) x1 (getl_intro i c2 x1 x0 H5 H8) -H9)))) H7)))))) H4)))))) H1)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubc/props.ma b/matita/matita/contribs/lambdadelta/basic_1/csubc/props.ma deleted file mode 100644 index a419bad4c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubc/props.ma +++ /dev/null @@ -1,27 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/defs.ma". - -include "basic_1/sc3/props.ma". - -lemma csubc_refl: - \forall (g: G).(\forall (c: C).(csubc g c c)) -\def - \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csubc g c0 c0)) -(\lambda (n: nat).(csubc_sort g n)) (\lambda (c0: C).(\lambda (H: (csubc g c0 -c0)).(\lambda (k: K).(\lambda (t: T).(csubc_head g c0 c0 H k t))))) c)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/clear.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst0/clear.ma deleted file mode 100644 index d70be313e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/clear.ma +++ /dev/null @@ -1,1170 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst0/props.ma". - -include "basic_1/csubst0/fwd.ma". - -include "basic_1/clear/fwd.ma". - -lemma csubst0_clear_O: - \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to -(\forall (c: C).((clear c1 c) \to (clear c2 c)))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: -T).((csubst0 O v c c2) \to (\forall (c0: C).((clear c c0) \to (clear c2 -c0))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: -(csubst0 O v (CSort n) c2)).(\lambda (c: C).(\lambda (_: (clear (CSort n) -c)).(csubst0_gen_sort c2 v O n H (clear c2 c)))))))) (\lambda (c: C).(\lambda -(H: ((\forall (c2: C).(\forall (v: T).((csubst0 O v c c2) \to (\forall (c0: -C).((clear c c0) \to (clear c2 c0)))))))).(\lambda (k: K).(\lambda (t: -T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 O v (CHead c k t) -c2)).(\lambda (c0: C).(\lambda (H1: (clear (CHead c k t) c0)).(let H2 \def -(csubst0_gen_head k c c2 t v O H0) in (or3_ind (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (clear c2 c0) -(\lambda (H3: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat O (s k -j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda -(u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2))) (clear c2 c0) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: (eq -nat O (s k x1))).(\lambda (H5: (eq C c2 (CHead c k x0))).(\lambda (H6: -(subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c3: C).(clear c3 -c0)) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 -x1)) \to (clear (CHead c k0 x0) c0)))) (\lambda (b: B).(\lambda (_: (clear -(CHead c (Bind b) t) c0)).(\lambda (H8: (eq nat O (s (Bind b) x1))).(let H9 -\def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True | (S -_) \Rightarrow False])) I (S x1) H8) in (False_ind (clear (CHead c (Bind b) -x0) c0) H9))))) (\lambda (f: F).(\lambda (H7: (clear (CHead c (Flat f) t) -c0)).(\lambda (H8: (eq nat O (s (Flat f) x1))).(let H9 \def (eq_ind_r nat x1 -(\lambda (n: nat).(subst0 n v t x0)) H6 O H8) in (clear_flat c c0 -(clear_gen_flat f c c0 t H7) f x0))))) k H1 H4) c2 H5)))))) H3)) (\lambda -(H3: (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j)))) -(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3))) (clear c2 c0) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq -nat O (s k x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: -(csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c3: C).(clear c3 -c0)) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 -x1)) \to (clear (CHead x0 k0 t) c0)))) (\lambda (b: B).(\lambda (_: (clear -(CHead c (Bind b) t) c0)).(\lambda (H8: (eq nat O (s (Bind b) x1))).(let H9 -\def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True | (S -_) \Rightarrow False])) I (S x1) H8) in (False_ind (clear (CHead x0 (Bind b) -t) c0) H9))))) (\lambda (f: F).(\lambda (H7: (clear (CHead c (Flat f) t) -c0)).(\lambda (H8: (eq nat O (s (Flat f) x1))).(let H9 \def (eq_ind_r nat x1 -(\lambda (n: nat).(csubst0 n v c x0)) H6 O H8) in (clear_flat x0 c0 (H x0 v -H9 c0 (clear_gen_flat f c c0 t H7)) f t))))) k H1 H4) c2 H5)))))) H3)) -(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))) (clear c2 c0) (\lambda (x0: -T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H4: (eq nat O (s k -x2))).(\lambda (H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t -x0)).(\lambda (H7: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda -(c3: C).(clear c3 c0)) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to -((eq nat O (s k0 x2)) \to (clear (CHead x1 k0 x0) c0)))) (\lambda (b: -B).(\lambda (_: (clear (CHead c (Bind b) t) c0)).(\lambda (H9: (eq nat O (s -(Bind b) x2))).(let H10 \def (eq_ind nat O (\lambda (ee: nat).(match ee with -[O \Rightarrow True | (S _) \Rightarrow False])) I (S x2) H9) in (False_ind -(clear (CHead x1 (Bind b) x0) c0) H10))))) (\lambda (f: F).(\lambda (H8: -(clear (CHead c (Flat f) t) c0)).(\lambda (H9: (eq nat O (s (Flat f) -x2))).(let H10 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H7 -O H9) in (let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) -H6 O H9) in (clear_flat x1 c0 (H x1 v H10 c0 (clear_gen_flat f c c0 t H8)) f -x0)))))) k H1 H4) c2 H5)))))))) H3)) H2))))))))))) c1). - -lemma csubst0_clear_O_back: - \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to -(\forall (c: C).((clear c2 c) \to (clear c1 c)))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: -T).((csubst0 O v c c2) \to (\forall (c0: C).((clear c2 c0) \to (clear c -c0))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: -(csubst0 O v (CSort n) c2)).(\lambda (c: C).(\lambda (_: (clear c2 -c)).(csubst0_gen_sort c2 v O n H (clear (CSort n) c)))))))) (\lambda (c: -C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).((csubst0 O v c c2) \to -(\forall (c0: C).((clear c2 c0) \to (clear c c0)))))))).(\lambda (k: -K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 O -v (CHead c k t) c2)).(\lambda (c0: C).(\lambda (H1: (clear c2 c0)).(let H2 -\def (csubst0_gen_head k c c2 t v O H0) in (or3_ind (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (clear (CHead c -k t) c0) (\lambda (H3: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat -O (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) -(\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2))) (clear (CHead c k t) c0) (\lambda (x0: T).(\lambda -(x1: nat).(\lambda (H4: (eq nat O (s k x1))).(\lambda (H5: (eq C c2 (CHead c -k x0))).(\lambda (H6: (subst0 x1 v t x0)).(let H7 \def (eq_ind C c2 (\lambda -(c3: C).(clear c3 c0)) H1 (CHead c k x0) H5) in (K_ind (\lambda (k0: K).((eq -nat O (s k0 x1)) \to ((clear (CHead c k0 x0) c0) \to (clear (CHead c k0 t) -c0)))) (\lambda (b: B).(\lambda (H8: (eq nat O (s (Bind b) x1))).(\lambda (_: -(clear (CHead c (Bind b) x0) c0)).(let H10 \def (eq_ind nat O (\lambda (ee: -nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) -H8) in (False_ind (clear (CHead c (Bind b) t) c0) H10))))) (\lambda (f: -F).(\lambda (H8: (eq nat O (s (Flat f) x1))).(\lambda (H9: (clear (CHead c -(Flat f) x0) c0)).(let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n -v t x0)) H6 O H8) in (clear_flat c c0 (clear_gen_flat f c c0 x0 H9) f t))))) -k H4 H7))))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead -c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (clear (CHead c k t) c0) -(\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat O (s k -x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 v c -x0)).(let H7 \def (eq_ind C c2 (\lambda (c3: C).(clear c3 c0)) H1 (CHead x0 k -t) H5) in (K_ind (\lambda (k0: K).((eq nat O (s k0 x1)) \to ((clear (CHead x0 -k0 t) c0) \to (clear (CHead c k0 t) c0)))) (\lambda (b: B).(\lambda (H8: (eq -nat O (s (Bind b) x1))).(\lambda (_: (clear (CHead x0 (Bind b) t) c0)).(let -H10 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True -| (S _) \Rightarrow False])) I (S x1) H8) in (False_ind (clear (CHead c (Bind -b) t) c0) H10))))) (\lambda (f: F).(\lambda (H8: (eq nat O (s (Flat f) -x1))).(\lambda (H9: (clear (CHead x0 (Flat f) t) c0)).(let H10 \def (eq_ind_r -nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H6 O H8) in (clear_flat c c0 (H -x0 v H10 c0 (clear_gen_flat f x0 c0 t H9)) f t))))) k H4 H7))))))) H3)) -(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))) (clear (CHead c k t) c0) (\lambda -(x0: T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H4: (eq nat O (s k -x2))).(\lambda (H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t -x0)).(\lambda (H7: (csubst0 x2 v c x1)).(let H8 \def (eq_ind C c2 (\lambda -(c3: C).(clear c3 c0)) H1 (CHead x1 k x0) H5) in (K_ind (\lambda (k0: K).((eq -nat O (s k0 x2)) \to ((clear (CHead x1 k0 x0) c0) \to (clear (CHead c k0 t) -c0)))) (\lambda (b: B).(\lambda (H9: (eq nat O (s (Bind b) x2))).(\lambda (_: -(clear (CHead x1 (Bind b) x0) c0)).(let H11 \def (eq_ind nat O (\lambda (ee: -nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x2) -H9) in (False_ind (clear (CHead c (Bind b) t) c0) H11))))) (\lambda (f: -F).(\lambda (H9: (eq nat O (s (Flat f) x2))).(\lambda (H10: (clear (CHead x1 -(Flat f) x0) c0)).(let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n -v c x1)) H7 O H9) in (let H12 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 -n v t x0)) H6 O H9) in (clear_flat c c0 (H x1 v H11 c0 (clear_gen_flat f x1 -c0 x0 H10)) f t)))))) k H4 H8))))))))) H3)) H2))))))))))) c1). - -lemma csubst0_clear_S: - \forall (c1: C).(\forall (c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 -(S i) v c1 c2) \to (\forall (c: C).((clear c1 c) \to (or4 (clear c2 c) (ex3_4 -B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq -C c (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v e1 e2)))))))))))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: -T).(\forall (i: nat).((csubst0 (S i) v c c2) \to (\forall (c0: C).((clear c -c0) \to (or4 (clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 -(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda -(i: nat).(\lambda (H: (csubst0 (S i) v (CSort n) c2)).(\lambda (c: -C).(\lambda (_: (clear (CSort n) c)).(csubst0_gen_sort c2 v (S i) n H (or4 -(clear c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind -b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))))))))))) -(\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).(\forall (i: -nat).((csubst0 (S i) v c c2) \to (\forall (c0: C).((clear c c0) \to (or4 -(clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind -b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda -(v: T).(\lambda (i: nat).(\lambda (H0: (csubst0 (S i) v (CHead c k t) -c2)).(\lambda (c0: C).(\lambda (H1: (clear (CHead c k t) c0)).(let H2 \def -(csubst0_gen_head k c c2 t v (S i) H0) in (or3_ind (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (clear c2 -c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: -C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind -b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (H3: (ex3_2 T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: -nat).(eq nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 -(CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or4 -(clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind -b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda -(x0: T).(\lambda (x1: nat).(\lambda (H4: (eq nat (S i) (s k x1))).(\lambda -(H5: (eq C c2 (CHead c k x0))).(\lambda (H6: (subst0 x1 v t x0)).(eq_ind_r C -(CHead c k x0) (\lambda (c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda -(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e -(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear c3 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -c3 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -i v e1 e2))))))))) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to -((eq nat (S i) (s k0 x1)) \to (or4 (clear (CHead c k0 x0) c0) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c k0 x0) -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e2 (Bind b) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))))))) (\lambda (b: B).(\lambda (H7: (clear (CHead c (Bind b) t) -c0)).(\lambda (H8: (eq nat (S i) (s (Bind b) x1))).(let H9 \def (f_equal nat -nat (\lambda (e: nat).(match e with [O \Rightarrow i | (S n) \Rightarrow n])) -(S i) (S x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 -n v t x0)) H6 i H9) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 -(clear (CHead c (Bind b) x0) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) -(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C -T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 -(CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro1 -(clear (CHead c (Bind b) x0) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda -(b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind -b) t) (CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e (Bind b0) -u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) -u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) -(ex3_4_intro B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e (Bind b0) u1)))))) -(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2))))) b c t x0 -(refl_equal C (CHead c (Bind b) t)) (clear_bind b c x0) H10)) c0 -(clear_gen_bind b c c0 t H7))))))) (\lambda (f: F).(\lambda (H7: (clear -(CHead c (Flat f) t) c0)).(\lambda (H8: (eq nat (S i) (s (Flat f) x1))).(let -H9 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) x1) H8) in -(let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H6 (S i) -H9) in (or4_intro0 (clear (CHead c (Flat f) x0) c0) (ex3_4 B C T T (\lambda -(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e -(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead c (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c (Flat f) x0) (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead c (Flat f) x0) (CHead e2 (Bind b) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) -(clear_flat c c0 (clear_gen_flat f c c0 t H7) f x0))))))) k H1 H4) c2 -H5)))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 -(CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or4 (clear c2 c0) (ex3_4 B C -T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: -nat).(\lambda (H4: (eq nat (S i) (s k x1))).(\lambda (H5: (eq C c2 (CHead x0 -k t))).(\lambda (H6: (csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda -(c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 -(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))))) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat -(S i) (s k0 x1)) \to (or4 (clear (CHead x0 k0 t) c0) (ex3_4 B C T T (\lambda -(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e -(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x0 k0 t) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 k0 t) (CHead e2 (Bind b) -u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind -b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead x0 k0 t) (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) -(\lambda (b: B).(\lambda (H7: (clear (CHead c (Bind b) t) c0)).(\lambda (H8: -(eq nat (S i) (s (Bind b) x1))).(let H9 \def (f_equal nat nat (\lambda (e: -nat).(match e with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H8) -in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H6 i -H9) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead -x0 (Bind b) t) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Bind b) -t) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x0 (Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro2 (clear (CHead x0 -(Bind b) t) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e -(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x0 (Bind b) t) (CHead e (Bind b0) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Bind b) -t) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 -(Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) -t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2))))) b c x0 t (refl_equal C (CHead c (Bind b) t)) (clear_bind b x0 t) -H10)) c0 (clear_gen_bind b c c0 t H7))))))) (\lambda (f: F).(\lambda (H7: -(clear (CHead c (Flat f) t) c0)).(\lambda (H8: (eq nat (S i) (s (Flat f) -x1))).(let H9 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) -x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c -x0)) H6 (S i) H9) in (let H11 \def (H x0 v i H10 c0 (clear_gen_flat f c c0 t -H7)) in (or4_ind (clear x0 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 -(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear x0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind -b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: -T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))) (\lambda (H12: (clear x0 c0)).(or4_intro0 (clear (CHead x0 (Flat -f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) -t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat x0 c0 H12 f t))) -(\lambda (H12: (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e (Bind -b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 -(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2))))) (or4 (clear (CHead x0 (Flat f) t) -c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e -(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear -(CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C -C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x2: B).(\lambda (x3: -C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H13: (eq C c0 (CHead x3 (Bind -x2) x4))).(\lambda (H14: (clear x0 (CHead x3 (Bind x2) x5))).(\lambda (H15: -(subst0 i v x4 x5)).(or4_intro1 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T -T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) -t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) -t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2))))) x2 x3 x4 x5 H13 (clear_flat x0 -(CHead x3 (Bind x2) x5) H14 f t) H15))))))))) H12)) (\lambda (H12: (ex3_4 B C -C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear x0 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 -e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x0 (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 i v e1 e2))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T -T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) -t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (H13: (eq C c0 (CHead x3 (Bind x2) x5))).(\lambda (H14: (clear x0 -(CHead x4 (Bind x2) x5))).(\lambda (H15: (csubst0 i v x3 x4)).(or4_intro2 -(clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C -C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2))))) x2 x3 x4 x5 H13 (clear_flat x0 (CHead x4 (Bind x2) x5) H14 f t) -H15))))))))) H12)) (\lambda (H12: (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear x0 (CHead e2 (Bind b) u2))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))).(ex4_5_ind B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind -b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: -T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (x6: T).(\lambda (H13: (eq C c0 (CHead x3 (Bind x2) -x5))).(\lambda (H14: (clear x0 (CHead x4 (Bind x2) x6))).(\lambda (H15: -(subst0 i v x5 x6)).(\lambda (H16: (csubst0 i v x3 x4)).(or4_intro3 (clear -(CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C -C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x2 x3 x4 x5 x6 H13 (clear_flat x0 -(CHead x4 (Bind x2) x6) H14 f t) H15 H16))))))))))) H12)) H11))))))) k H1 H4) -c2 H5)))))) H3)) (\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (clear c2 -c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: -C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind -b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x0: T).(\lambda -(x1: C).(\lambda (x2: nat).(\lambda (H4: (eq nat (S i) (s k x2))).(\lambda -(H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t x0)).(\lambda -(H7: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c3: C).(or4 -(clear c3 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e (Bind -b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c3 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (K_ind -(\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat (S i) (s k0 x2)) \to -(or4 (clear (CHead x1 k0 x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 k0 x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) (\lambda (b: B).(\lambda -(H8: (clear (CHead c (Bind b) t) c0)).(\lambda (H9: (eq nat (S i) (s (Bind b) -x2))).(let H10 \def (f_equal nat nat (\lambda (e: nat).(match e with [O -\Rightarrow i | (S n) \Rightarrow n])) (S i) (S x2) H9) in (let H11 \def -(eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H7 i H10) in (let H12 -\def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) H6 i H10) in -(eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead x1 (Bind -b) x0) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Bind b) -x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro3 (clear (CHead x1 -(Bind b) x0) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e -(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear -(CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C -C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C -C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))) b c x1 t x0 -(refl_equal C (CHead c (Bind b) t)) (clear_bind b x1 x0) H12 H11)) c0 -(clear_gen_bind b c c0 t H8)))))))) (\lambda (f: F).(\lambda (H8: (clear -(CHead c (Flat f) t) c0)).(\lambda (H9: (eq nat (S i) (s (Flat f) x2))).(let -H10 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) x2) H9) in -(let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H7 (S i) -H10) in (let H12 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) -H6 (S i) H10) in (let H13 \def (H x1 v i H11 c0 (clear_gen_flat f c c0 t H8)) -in (or4_ind (clear x1 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 -(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind -b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: -T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))) (\lambda (H14: (clear x1 c0)).(or4_intro0 (clear (CHead x1 (Flat -f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) -x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat x1 c0 H14 f x0))) -(\lambda (H14: (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e (Bind -b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 -(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2))))) (or4 (clear (CHead x1 (Flat f) x0) -c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e -(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear -(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C -C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x3: B).(\lambda (x4: -C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H15: (eq C c0 (CHead x4 (Bind -x3) x5))).(\lambda (H16: (clear x1 (CHead x4 (Bind x3) x6))).(\lambda (H17: -(subst0 i v x5 x6)).(or4_intro1 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C -T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) -x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) -x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2))))) x3 x4 x5 x6 H15 (clear_flat x1 -(CHead x4 (Bind x3) x6) H16 f x0) H17))))))))) H14)) (\lambda (H14: (ex3_4 B -C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C -c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 -e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x1 (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 i v e1 e2))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C -T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) -x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: -T).(\lambda (H15: (eq C c0 (CHead x4 (Bind x3) x6))).(\lambda (H16: (clear x1 -(CHead x5 (Bind x3) x6))).(\lambda (H17: (csubst0 i v x4 x5)).(or4_intro2 -(clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C -T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C -C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2))))) x3 x4 x5 x6 H15 (clear_flat x1 (CHead x5 (Bind x3) x6) H16 f x0) -H17))))))))) H14)) (\lambda (H14: (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear x1 (CHead e2 (Bind b) u2))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))).(ex4_5_ind B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind -b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: -T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: -T).(\lambda (x7: T).(\lambda (H15: (eq C c0 (CHead x4 (Bind x3) -x6))).(\lambda (H16: (clear x1 (CHead x5 (Bind x3) x7))).(\lambda (H17: -(subst0 i v x6 x7)).(\lambda (H18: (csubst0 i v x4 x5)).(or4_intro3 (clear -(CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C -T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C -C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x3 x4 x5 x6 x7 H15 (clear_flat x1 -(CHead x5 (Bind x3) x7) H16 f x0) H17 H18))))))))))) H14)) H13)))))))) k H1 -H4) c2 H5)))))))) H3)) H2)))))))))))) c1). - -lemma csubst0_clear_trans: - \forall (c1: C).(\forall (c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 -i v c1 c2) \to (\forall (e2: C).((clear c2 e2) \to (or (clear c1 e2) (ex2 C -(\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: C).(clear c1 e1)))))))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: -T).(\forall (i: nat).((csubst0 i v c c2) \to (\forall (e2: C).((clear c2 e2) -\to (or (clear c e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda -(e1: C).(clear c e1))))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda -(v: T).(\lambda (i: nat).(\lambda (H: (csubst0 i v (CSort n) c2)).(\lambda -(e2: C).(\lambda (_: (clear c2 e2)).(csubst0_gen_sort c2 v i n H (or (clear -(CSort n) e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: -C).(clear (CSort n) e1)))))))))))) (\lambda (c: C).(\lambda (H: ((\forall -(c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 i v c c2) \to (\forall -(e2: C).((clear c2 e2) \to (or (clear c e2) (ex2 C (\lambda (e1: C).(csubst0 -i v e1 e2)) (\lambda (e1: C).(clear c e1)))))))))))).(\lambda (k: K).(\lambda -(t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: -(csubst0 i v (CHead c k t) c2)).(\lambda (e2: C).(\lambda (H1: (clear c2 -e2)).(let H2 \def (csubst0_gen_head k c c2 t v i H0) in (or3_ind (ex3_2 T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k -t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat -(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) -(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k -u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3))))) (or (clear (CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 -e2)) (\lambda (e1: C).(clear (CHead c k t) e1)))) (\lambda (H3: (ex3_2 T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: -nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead -c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or (clear -(CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: -C).(clear (CHead c k t) e1)))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda -(H4: (eq nat i (s k x1))).(\lambda (H5: (eq C c2 (CHead c k x0))).(\lambda -(H6: (subst0 x1 v t x0)).(eq_ind_r nat (s k x1) (\lambda (n: nat).(or (clear -(CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 n v e1 e2)) (\lambda (e1: -C).(clear (CHead c k t) e1))))) (let H7 \def (eq_ind C c2 (\lambda (c0: -C).(clear c0 e2)) H1 (CHead c k x0) H5) in (K_ind (\lambda (k0: K).((clear -(CHead c k0 x0) e2) \to (or (clear (CHead c k0 t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (s k0 x1) v e1 e2)) (\lambda (e1: C).(clear (CHead c k0 t) -e1)))))) (\lambda (b: B).(\lambda (H8: (clear (CHead c (Bind b) x0) -e2)).(eq_ind_r C (CHead c (Bind b) x0) (\lambda (c0: C).(or (clear (CHead c -(Bind b) t) c0) (ex2 C (\lambda (e1: C).(csubst0 (s (Bind b) x1) v e1 c0)) -(\lambda (e1: C).(clear (CHead c (Bind b) t) e1))))) (or_intror (clear (CHead -c (Bind b) t) (CHead c (Bind b) x0)) (ex2 C (\lambda (e1: C).(csubst0 (s -(Bind b) x1) v e1 (CHead c (Bind b) x0))) (\lambda (e1: C).(clear (CHead c -(Bind b) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 (s (Bind b) x1) v e1 -(CHead c (Bind b) x0))) (\lambda (e1: C).(clear (CHead c (Bind b) t) e1)) -(CHead c (Bind b) t) (csubst0_snd (Bind b) x1 v t x0 H6 c) (clear_bind b c -t))) e2 (clear_gen_bind b c e2 x0 H8)))) (\lambda (f: F).(\lambda (H8: (clear -(CHead c (Flat f) x0) e2)).(or_introl (clear (CHead c (Flat f) t) e2) (ex2 C -(\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear -(CHead c (Flat f) t) e1))) (clear_flat c e2 (clear_gen_flat f c e2 x0 H8) f -t)))) k H7)) i H4)))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or (clear (CHead c k t) e2) -(ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: C).(clear (CHead c -k t) e1)))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat i (s k -x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 v c -x0)).(eq_ind_r nat (s k x1) (\lambda (n: nat).(or (clear (CHead c k t) e2) -(ex2 C (\lambda (e1: C).(csubst0 n v e1 e2)) (\lambda (e1: C).(clear (CHead c -k t) e1))))) (let H7 \def (eq_ind C c2 (\lambda (c0: C).(clear c0 e2)) H1 -(CHead x0 k t) H5) in (K_ind (\lambda (k0: K).((clear (CHead x0 k0 t) e2) \to -(or (clear (CHead c k0 t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s k0 x1) v e1 -e2)) (\lambda (e1: C).(clear (CHead c k0 t) e1)))))) (\lambda (b: B).(\lambda -(H8: (clear (CHead x0 (Bind b) t) e2)).(eq_ind_r C (CHead x0 (Bind b) t) -(\lambda (c0: C).(or (clear (CHead c (Bind b) t) c0) (ex2 C (\lambda (e1: -C).(csubst0 (s (Bind b) x1) v e1 c0)) (\lambda (e1: C).(clear (CHead c (Bind -b) t) e1))))) (or_intror (clear (CHead c (Bind b) t) (CHead x0 (Bind b) t)) -(ex2 C (\lambda (e1: C).(csubst0 (s (Bind b) x1) v e1 (CHead x0 (Bind b) t))) -(\lambda (e1: C).(clear (CHead c (Bind b) t) e1))) (ex_intro2 C (\lambda (e1: -C).(csubst0 (s (Bind b) x1) v e1 (CHead x0 (Bind b) t))) (\lambda (e1: -C).(clear (CHead c (Bind b) t) e1)) (CHead c (Bind b) t) (csubst0_fst (Bind -b) x1 c x0 v H6 t) (clear_bind b c t))) e2 (clear_gen_bind b x0 e2 t H8)))) -(\lambda (f: F).(\lambda (H8: (clear (CHead x0 (Flat f) t) e2)).(let H_x \def -(H x0 v x1 H6 e2 (clear_gen_flat f x0 e2 t H8)) in (let H9 \def H_x in -(or_ind (clear c e2) (ex2 C (\lambda (e1: C).(csubst0 x1 v e1 e2)) (\lambda -(e1: C).(clear c e1))) (or (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda -(e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear (CHead c -(Flat f) t) e1)))) (\lambda (H10: (clear c e2)).(or_introl (clear (CHead c -(Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) -(\lambda (e1: C).(clear (CHead c (Flat f) t) e1))) (clear_flat c e2 H10 f -t))) (\lambda (H10: (ex2 C (\lambda (e1: C).(csubst0 x1 v e1 e2)) (\lambda -(e1: C).(clear c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 x1 v e1 e2)) -(\lambda (e1: C).(clear c e1)) (or (clear (CHead c (Flat f) t) e2) (ex2 C -(\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear -(CHead c (Flat f) t) e1)))) (\lambda (x: C).(\lambda (H11: (csubst0 x1 v x -e2)).(\lambda (H12: (clear c x)).(or_intror (clear (CHead c (Flat f) t) e2) -(ex2 C (\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: -C).(clear (CHead c (Flat f) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 -(s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear (CHead c (Flat f) t) e1)) x -H11 (clear_flat c x H12 f t)))))) H10)) H9))))) k H7)) i H4)))))) H3)) -(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))) (or (clear (CHead c k t) e2) (ex2 -C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: C).(clear (CHead c k t) -e1)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H4: (eq -nat i (s k x2))).(\lambda (H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: -(subst0 x2 v t x0)).(\lambda (H7: (csubst0 x2 v c x1)).(eq_ind_r nat (s k x2) -(\lambda (n: nat).(or (clear (CHead c k t) e2) (ex2 C (\lambda (e1: -C).(csubst0 n v e1 e2)) (\lambda (e1: C).(clear (CHead c k t) e1))))) (let H8 -\def (eq_ind C c2 (\lambda (c0: C).(clear c0 e2)) H1 (CHead x1 k x0) H5) in -(K_ind (\lambda (k0: K).((clear (CHead x1 k0 x0) e2) \to (or (clear (CHead c -k0 t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s k0 x2) v e1 e2)) (\lambda (e1: -C).(clear (CHead c k0 t) e1)))))) (\lambda (b: B).(\lambda (H9: (clear (CHead -x1 (Bind b) x0) e2)).(eq_ind_r C (CHead x1 (Bind b) x0) (\lambda (c0: C).(or -(clear (CHead c (Bind b) t) c0) (ex2 C (\lambda (e1: C).(csubst0 (s (Bind b) -x2) v e1 c0)) (\lambda (e1: C).(clear (CHead c (Bind b) t) e1))))) (or_intror -(clear (CHead c (Bind b) t) (CHead x1 (Bind b) x0)) (ex2 C (\lambda (e1: -C).(csubst0 (s (Bind b) x2) v e1 (CHead x1 (Bind b) x0))) (\lambda (e1: -C).(clear (CHead c (Bind b) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 -(s (Bind b) x2) v e1 (CHead x1 (Bind b) x0))) (\lambda (e1: C).(clear (CHead -c (Bind b) t) e1)) (CHead c (Bind b) t) (csubst0_both (Bind b) x2 v t x0 H6 c -x1 H7) (clear_bind b c t))) e2 (clear_gen_bind b x1 e2 x0 H9)))) (\lambda (f: -F).(\lambda (H9: (clear (CHead x1 (Flat f) x0) e2)).(let H_x \def (H x1 v x2 -H7 e2 (clear_gen_flat f x1 e2 x0 H9)) in (let H10 \def H_x in (or_ind (clear -c e2) (ex2 C (\lambda (e1: C).(csubst0 x2 v e1 e2)) (\lambda (e1: C).(clear c -e1))) (or (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s -(Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear (CHead c (Flat f) t) e1)))) -(\lambda (H11: (clear c e2)).(or_introl (clear (CHead c (Flat f) t) e2) (ex2 -C (\lambda (e1: C).(csubst0 (s (Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear -(CHead c (Flat f) t) e1))) (clear_flat c e2 H11 f t))) (\lambda (H11: (ex2 C -(\lambda (e1: C).(csubst0 x2 v e1 e2)) (\lambda (e1: C).(clear c -e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 x2 v e1 e2)) (\lambda (e1: -C).(clear c e1)) (or (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (s (Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear (CHead c (Flat -f) t) e1)))) (\lambda (x: C).(\lambda (H12: (csubst0 x2 v x e2)).(\lambda -(H13: (clear c x)).(or_intror (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda -(e1: C).(csubst0 (s (Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear (CHead c -(Flat f) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 (s (Flat f) x2) v e1 -e2)) (\lambda (e1: C).(clear (CHead c (Flat f) t) e1)) x H12 (clear_flat c x -H13 f t)))))) H11)) H10))))) k H8)) i H4)))))))) H3)) H2)))))))))))) c1). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst0/defs.ma deleted file mode 100644 index eec1e74b7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/defs.ma +++ /dev/null @@ -1,32 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/defs.ma". - -include "basic_1/C/defs.ma". - -inductive csubst0: nat \to (T \to (C \to (C \to Prop))) \def -| csubst0_snd: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: -T).(\forall (u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(csubst0 (s k i) -v (CHead c k u1) (CHead c k u2)))))))) -| csubst0_fst: \forall (k: K).(\forall (i: nat).(\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (u: T).(csubst0 (s -k i) v (CHead c1 k u) (CHead c2 k u)))))))) -| csubst0_both: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall -(u1: T).(\forall (u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall -(c2: C).((csubst0 i v c1 c2) \to (csubst0 (s k i) v (CHead c1 k u1) (CHead c2 -k u2)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/drop.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst0/drop.ma deleted file mode 100644 index 2d759243f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/drop.ma +++ /dev/null @@ -1,6291 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst0/fwd.ma". - -include "basic_1/drop/fwd.ma". - -lemma csubst0_drop_gt: - \forall (n: nat).(\forall (i: nat).((lt i n) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O -c1 e) \to (drop n O c2 e))))))))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt i n0) -\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) -\to (\forall (e: C).((drop n0 O c1 e) \to (drop n0 O c2 e)))))))))) (\lambda -(i: nat).(\lambda (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda -(v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O -O c1 e)).(lt_x_O i H (drop O O c2 e)))))))))) (\lambda (n0: nat).(\lambda (H: -((\forall (i: nat).((lt i n0) \to (\forall (c1: C).(\forall (c2: C).(\forall -(v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n0 O c1 e) \to (drop -n0 O c2 e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda -(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v -c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) -(\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v -(CSort n1) c2)).(\lambda (e: C).(\lambda (H2: (drop (S n0) O (CSort n1) -e)).(and3_ind (eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (drop (S n0) -O c2 e) (\lambda (H3: (eq C e (CSort n1))).(\lambda (H4: (eq nat (S n0) -O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: C).(drop -(S n0) O c2 c)) (let H6 \def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee -with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind -(drop (S n0) O c2 (CSort n1)) H6)) e H3)))) (drop_gen_sort n1 (S n0) O e -H2)))))))) (\lambda (c: C).(\lambda (H1: ((\forall (c2: C).(\forall (v: -T).((csubst0 i v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S -n0) O c2 e)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda -(v: T).(\lambda (H2: (csubst0 i v (CHead c k t) c2)).(\lambda (e: C).(\lambda -(H3: (drop (S n0) O (CHead c k t) e)).(let H4 \def (csubst0_gen_head k c c2 t -v i H2) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i -(s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) -(\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda -(_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3))))) (drop (S n0) O c2 e) (\lambda (H5: (ex3_2 T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: -nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead -c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (drop (S -n0) O c2 e) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H6: (eq nat i (s k -x1))).(\lambda (H7: (eq C c2 (CHead c k x0))).(\lambda (_: (subst0 x1 v t -x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(drop (S n0) O c0 e)) (let -H9 \def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: -T).((csubst0 n1 v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop -(S n0) O c3 e0))))))) H1 (s k x1) H6) in (let H10 \def (eq_ind nat i (\lambda -(n1: nat).(lt n1 (S n0))) H0 (s k x1) H6) in (K_ind (\lambda (k0: K).((drop -(r k0 n0) O c e) \to (((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) -v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 -e0))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead c k0 x0) -e))))) (\lambda (b: B).(\lambda (H11: (drop (r (Bind b) n0) O c e)).(\lambda -(_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to -(\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 -e0)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 c -e H11 x0))))) (\lambda (f: F).(\lambda (H11: (drop (r (Flat f) n0) O c -e)).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x1) -v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 -e0)))))))).(\lambda (H13: (lt (s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) -(ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) -(drop (S n0) O (CHead c (Flat f) x0) e) (\lambda (_: (eq nat x1 -O)).(drop_drop (Flat f) n0 c e H11 x0)) (\lambda (H14: (ex2 nat (\lambda (m: -nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda -(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O -(CHead c (Flat f) x0) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S -x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e H11 x0)))) H14)) -(lt_gen_xS x1 n0 H13)))))) k (drop_gen_drop k c e t n0 H3) H9 H10))) c2 -H7)))))) H5)) (\lambda (H5: (ex3_2 C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead -c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S n0) O c2 e) (\lambda -(x0: C).(\lambda (x1: nat).(\lambda (H6: (eq nat i (s k x1))).(\lambda (H7: -(eq C c2 (CHead x0 k t))).(\lambda (H8: (csubst0 x1 v c x0)).(eq_ind_r C -(CHead x0 k t) (\lambda (c0: C).(drop (S n0) O c0 e)) (let H9 \def (eq_ind -nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c -c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 -e0))))))) H1 (s k x1) H6) in (let H10 \def (eq_ind nat i (\lambda (n1: -nat).(lt n1 (S n0))) H0 (s k x1) H6) in (K_ind (\lambda (k0: K).((drop (r k0 -n0) O c e) \to (((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c -c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 -e0))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead x0 k0 t) -e))))) (\lambda (b: B).(\lambda (H11: (drop (r (Bind b) n0) O c e)).(\lambda -(_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to -(\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 -e0)))))))).(\lambda (H13: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 -x0 e (H x1 (lt_S_n x1 n0 H13) c x0 v H8 e H11) t))))) (\lambda (f: -F).(\lambda (H11: (drop (r (Flat f) n0) O c e)).(\lambda (H12: ((\forall (c3: -C).(\forall (v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c e0) \to (drop (S n0) O c3 e0)))))))).(\lambda (H13: (lt -(s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq -nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead x0 (Flat -f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 x0 e (H12 x0 v H8 -e H11) t)) (\lambda (H14: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) -(\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S -m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead x0 (Flat f) t) e) -(\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x -n0)).(drop_drop (Flat f) n0 x0 e (H12 x0 v H8 e H11) t)))) H14)) (lt_gen_xS -x1 n0 H13)))))) k (drop_gen_drop k c e t n0 H3) H9 H10))) c2 H7)))))) H5)) -(\lambda (H5: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))) (drop (S n0) O c2 e) (\lambda (x0: -T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H6: (eq nat i (s k -x2))).(\lambda (H7: (eq C c2 (CHead x1 k x0))).(\lambda (_: (subst0 x2 v t -x0)).(\lambda (H9: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda -(c0: C).(drop (S n0) O c0 e)) (let H10 \def (eq_ind nat i (\lambda (n1: -nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall -(e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 e0))))))) H1 (s k x2) H6) -in (let H11 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x2) -H6) in (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to (((\forall (c3: -C).(\forall (v0: T).((csubst0 (s k0 x2) v0 c c3) \to (\forall (e0: C).((drop -(S n0) O c e0) \to (drop (S n0) O c3 e0))))))) \to ((lt (s k0 x2) (S n0)) \to -(drop (S n0) O (CHead x1 k0 x0) e))))) (\lambda (b: B).(\lambda (H12: (drop -(r (Bind b) n0) O c e)).(\lambda (_: ((\forall (c3: C).(\forall (v0: -T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c -e0) \to (drop (S n0) O c3 e0)))))))).(\lambda (H14: (lt (s (Bind b) x2) (S -n0))).(drop_drop (Bind b) n0 x1 e (H x2 (lt_S_n x2 n0 H14) c x1 v H9 e H12) -x0))))) (\lambda (f: F).(\lambda (H12: (drop (r (Flat f) n0) O c e)).(\lambda -(H13: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x2) v0 c c3) -\to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 -e0)))))))).(\lambda (H14: (lt (s (Flat f) x2) (S n0))).(or_ind (eq nat x2 O) -(ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) -(drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (_: (eq nat x2 -O)).(drop_drop (Flat f) n0 x1 e (H13 x1 v H9 e H12) x0)) (\lambda (H15: (ex2 -nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m -n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: -nat).(lt m n0)) (drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (x: -nat).(\lambda (_: (eq nat x2 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat -f) n0 x1 e (H13 x1 v H9 e H12) x0)))) H15)) (lt_gen_xS x2 n0 H14)))))) k -(drop_gen_drop k c e t n0 H3) H10 H11))) c2 H7)))))))) H5)) H4))))))))))) -c1)))))) n). - -lemma csubst0_drop_gt_back: - \forall (n: nat).(\forall (i: nat).((lt i n) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O -c2 e) \to (drop n O c1 e))))))))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt i n0) -\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) -\to (\forall (e: C).((drop n0 O c2 e) \to (drop n0 O c1 e)))))))))) (\lambda -(i: nat).(\lambda (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda -(v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O -O c2 e)).(lt_x_O i H (drop O O c1 e)))))))))) (\lambda (n0: nat).(\lambda (H: -((\forall (i: nat).((lt i n0) \to (\forall (c1: C).(\forall (c2: C).(\forall -(v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n0 O c2 e) \to (drop -n0 O c1 e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda -(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v -c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) -(\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H1: (csubst0 i -v (CSort n1) c2)).(\lambda (e: C).(\lambda (_: (drop (S n0) O c2 -e)).(csubst0_gen_sort c2 v i n1 H1 (drop (S n0) O (CSort n1) e)))))))) -(\lambda (c: C).(\lambda (H1: ((\forall (c2: C).(\forall (v: T).((csubst0 i v -c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c -e)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: -T).(\lambda (H2: (csubst0 i v (CHead c k t) c2)).(\lambda (e: C).(\lambda -(H3: (drop (S n0) O c2 e)).(let H4 \def (csubst0_gen_head k c c2 t v i H2) in -(or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) -(\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: -T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3))))) (drop (S n0) O (CHead c k t) e) (\lambda (H5: -(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda -(u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: -T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2))) (drop (S n0) O (CHead c k t) e) (\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H6: (eq nat i (s k x1))).(\lambda (H7: (eq C c2 (CHead c k -x0))).(\lambda (_: (subst0 x1 v t x0)).(let H9 \def (eq_ind C c2 (\lambda -(c0: C).(drop (S n0) O c0 e)) H3 (CHead c k x0) H7) in (let H10 \def (eq_ind -nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c -c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c -e0))))))) H1 (s k x1) H6) in (let H11 \def (eq_ind nat i (\lambda (n1: -nat).(lt n1 (S n0))) H0 (s k x1) H6) in (K_ind (\lambda (k0: K).(((\forall -(c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) \to ((lt (s k0 x1) -(S n0)) \to ((drop (r k0 n0) O c e) \to (drop (S n0) O (CHead c k0 t) e))))) -(\lambda (b: B).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s -(Bind b) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop -(S n0) O c e0)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(\lambda -(H14: (drop (r (Bind b) n0) O c e)).(drop_drop (Bind b) n0 c e H14 t))))) -(\lambda (f: F).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s -(Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop -(S n0) O c e0)))))))).(\lambda (H13: (lt (s (Flat f) x1) (S n0))).(\lambda -(H14: (drop (r (Flat f) n0) O c e)).(or_ind (eq nat x1 O) (ex2 nat (\lambda -(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O -(CHead c (Flat f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 c -e H14 t)) (\lambda (H15: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) -(\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S -m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) t) e) -(\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x -n0)).(drop_drop (Flat f) n0 c e H14 t)))) H15)) (lt_gen_xS x1 n0 H13)))))) k -H10 H11 (drop_gen_drop k c e x0 n0 H9)))))))))) H5)) (\lambda (H5: (ex3_2 C -nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead -c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S -n0) O (CHead c k t) e) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H6: (eq -nat i (s k x1))).(\lambda (H7: (eq C c2 (CHead x0 k t))).(\lambda (H8: -(csubst0 x1 v c x0)).(let H9 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) -O c0 e)) H3 (CHead x0 k t) H7) in (let H10 \def (eq_ind nat i (\lambda (n1: -nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall -(e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) H1 (s k x1) H6) -in (let H11 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x1) -H6) in (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 -(s k0 x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S -n0) O c e0))))))) \to ((lt (s k0 x1) (S n0)) \to ((drop (r k0 n0) O x0 e) \to -(drop (S n0) O (CHead c k0 t) e))))) (\lambda (b: B).(\lambda (_: ((\forall -(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0)))))))).(\lambda (H13: (lt -(s (Bind b) x1) (S n0))).(\lambda (H14: (drop (r (Bind b) n0) O x0 -e)).(drop_drop (Bind b) n0 c e (H x1 (lt_S_n x1 n0 H13) c x0 v H8 e H14) -t))))) (\lambda (f: F).(\lambda (H12: ((\forall (c3: C).(\forall (v0: -T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 -e0) \to (drop (S n0) O c e0)))))))).(\lambda (H13: (lt (s (Flat f) x1) (S -n0))).(\lambda (H14: (drop (r (Flat f) n0) O x0 e)).(or_ind (eq nat x1 O) -(ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) -(drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop -(Flat f) n0 c e (H12 x0 v H8 e H14) t)) (\lambda (H15: (ex2 nat (\lambda (m: -nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda -(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O -(CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S -x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H12 x0 v H8 e H14) -t)))) H15)) (lt_gen_xS x1 n0 H13)))))) k H10 H11 (drop_gen_drop k x0 e t n0 -H9)))))))))) H5)) (\lambda (H5: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (drop (S n0) O -(CHead c k t) e) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: -nat).(\lambda (H6: (eq nat i (s k x2))).(\lambda (H7: (eq C c2 (CHead x1 k -x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H9: (csubst0 x2 v c -x1)).(let H10 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H3 -(CHead x1 k x0) H7) in (let H11 \def (eq_ind nat i (\lambda (n1: -nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall -(e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) H1 (s k x2) H6) -in (let H12 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x2) -H6) in (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 -(s k0 x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S -n0) O c e0))))))) \to ((lt (s k0 x2) (S n0)) \to ((drop (r k0 n0) O x1 e) \to -(drop (S n0) O (CHead c k0 t) e))))) (\lambda (b: B).(\lambda (_: ((\forall -(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0)))))))).(\lambda (H14: (lt -(s (Bind b) x2) (S n0))).(\lambda (H15: (drop (r (Bind b) n0) O x1 -e)).(drop_drop (Bind b) n0 c e (H x2 (lt_S_n x2 n0 H14) c x1 v H9 e H15) -t))))) (\lambda (f: F).(\lambda (H13: ((\forall (c3: C).(\forall (v0: -T).((csubst0 (s (Flat f) x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 -e0) \to (drop (S n0) O c e0)))))))).(\lambda (H14: (lt (s (Flat f) x2) (S -n0))).(\lambda (H15: (drop (r (Flat f) n0) O x1 e)).(or_ind (eq nat x2 O) -(ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) -(drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x2 O)).(drop_drop -(Flat f) n0 c e (H13 x1 v H9 e H15) t)) (\lambda (H16: (ex2 nat (\lambda (m: -nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda -(m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O -(CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x2 (S -x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H13 x1 v H9 e H15) -t)))) H16)) (lt_gen_xS x2 n0 H14)))))) k H11 H12 (drop_gen_drop k x1 e x0 n0 -H10)))))))))))) H5)) H4))))))))))) c1)))))) n). - -lemma csubst0_drop_lt: - \forall (n: nat).(\forall (i: nat).((lt n i) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O -c1 e) \to (or4 (drop n O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 k -w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k n)) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k n)) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k -n)) v e1 e2)))))))))))))))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt n0 i) -\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) -\to (\forall (e: C).((drop n0 O c1 e) \to (or4 (drop n0 O c2 e) (ex3_4 K C T -T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop n0 O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop n0 O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n0)) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 -O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (s k n0)) v e1 e2))))))))))))))))) (\lambda (i: -nat).(\lambda (_: (lt O i)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (v: -T).(\lambda (H0: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (H1: (drop O O -c1 e)).(eq_ind C c1 (\lambda (c: C).(or4 (drop O O c2 c) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop O O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k O)) v u w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop O O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k O)) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O -c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k O)) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (s k O)) v e1 e2))))))))) (csubst0_ind (\lambda (n0: -nat).(\lambda (t: T).(\lambda (c: C).(\lambda (c0: C).(or4 (drop O O c0 c) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C c (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop O O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n0 (s k O)) t u w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop O O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n0 (s k O)) t e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O -c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n0 (s k O)) t u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus n0 (s k O)) t e1 e2)))))))))))) (\lambda (k: -K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H2: (subst0 i0 v0 u1 u2)).(\lambda (c: C).(let H3 \def (eq_ind_r -nat i0 (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 (minus (s k i0) (s k O)) -(s_arith0 k i0)) in (or4_intro1 (drop O O (CHead c k u2) (CHead c k u1)) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C (CHead c k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c k u1) -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop O O (CHead c k u2) (CHead e2 k0 u)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s -k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c k u1) -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead c k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 O)) v0 u w))))) k c u1 u2 (refl_equal C -(CHead c k u1)) (drop_refl (CHead c k u2)) H3)))))))))) (\lambda (k: -K).(\lambda (i0: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: -T).(\lambda (H2: (csubst0 i0 v0 c3 c4)).(\lambda (H3: (or4 (drop O O c4 c3) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C c3 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k0 -O)) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C c3 (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i0 (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i0 (s k0 O)) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k0 -O)) v0 e1 e2))))))))).(\lambda (u: T).(let H4 \def (eq_ind_r nat i0 (\lambda -(n0: nat).(csubst0 n0 v0 c3 c4)) H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) -in (let H5 \def (eq_ind_r nat i0 (\lambda (n0: nat).(or4 (drop O O c4 c3) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda -(_: T).(eq C c3 (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n0 (s -k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C c3 (CHead e1 k0 u0)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O c4 (CHead -e2 k0 u0)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus n0 (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C c3 (CHead e1 k0 u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda -(w: T).(subst0 (minus n0 (s k0 O)) v0 u0 w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n0 -(s k0 O)) v0 e1 e2))))))))) H3 (minus (s k i0) (s k O)) (s_arith0 k i0)) in -(or4_intro2 (drop O O (CHead c4 k u) (CHead c3 k u)) (ex3_4 K C T T (\lambda -(k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k -u) (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e0 k0 w)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k -i0) (s k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k u) (CHead e1 k0 -u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) -v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k u) (CHead e1 k0 -u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e2 k0 w))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 O)) v0 u0 w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k -i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k u) (CHead e1 k0 -u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) -v0 e1 e2))))) k c3 c4 u (refl_equal C (CHead c3 k u)) (drop_refl (CHead c4 k -u)) H4)))))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i0 v0 u1 -u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i0 v0 c3 -c4)).(\lambda (_: (or4 (drop O O c4 c3) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k0 O)) v0 u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c3 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k0 -O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i0 (s k0 O)) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k0 O)) v0 e1 -e2))))))))).(let H5 \def (eq_ind_r nat i0 (\lambda (n0: nat).(subst0 n0 v0 u1 -u2)) H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) in (let H6 \def (eq_ind_r -nat i0 (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H3 (minus (s k i0) (s k O)) -(s_arith0 k i0)) in (or4_intro3 (drop O O (CHead c4 k u2) (CHead c3 k u1)) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C (CHead c3 k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u2) (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 k -u1) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop O O (CHead c4 k u2) (CHead e2 k0 u)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s -k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 k u1) -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u2) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex4_5_intro K C C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead c3 k u1) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k -u2) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u -w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2)))))) k c3 c4 -u1 u2 (refl_equal C (CHead c3 k u1)) (drop_refl (CHead c4 k u2)) H5 -H6)))))))))))))) i v c1 c2 H0) e (drop_gen_refl c1 e H1)))))))))) (\lambda -(n0: nat).(\lambda (IHn: ((\forall (i: nat).((lt n0 i) \to (\forall (c1: -C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: -C).((drop n0 O c1 e) \to (or4 (drop n0 O c2 e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) (ex3_4 K C C T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop n0 O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n0)) v e1 e2)))))) -(ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c2 (CHead -e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (s k n0)) v e1 e2)))))))))))))))))).(\lambda (i: nat).(\lambda (H: -(lt (S n0) i)).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: -C).(\forall (v: T).((csubst0 i v c c2) \to (\forall (e: C).((drop (S n0) O c -e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (s k (S n0))) v e1 e2)))))))))))))) (\lambda (n1: -nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v (CSort n1) -c2)).(\lambda (e: C).(\lambda (H1: (drop (S n0) O (CSort n1) e)).(and3_ind -(eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (or4 (drop (S n0) O c2 e) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S -n0))) v e1 e2)))))))) (\lambda (H2: (eq C e (CSort n1))).(\lambda (H3: (eq -nat (S n0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: -C).(or4 (drop (S n0) O c2 c) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 k u)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (s k (S n0))) v e1 e2))))))))) (let H5 \def (eq_ind -nat (S n0) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) -\Rightarrow True])) I O H3) in (False_ind (or4 (drop (S n0) O c2 (CSort n1)) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C (CSort n1) (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CSort n1) (CHead e1 k u)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CSort n1) (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (s k (S n0))) v e1 e2)))))))) H5)) e H2)))) (drop_gen_sort n1 (S n0) -O e H1)))))))) (\lambda (c: C).(\lambda (H0: ((\forall (c2: C).(\forall (v: -T).((csubst0 i v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 -(drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 -(CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k -w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (s k (S n0))) v e1 e2))))))))))))))).(\lambda (k: K).(\lambda (t: -T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H1: (csubst0 i v (CHead c k t) -c2)).(\lambda (e: C).(\lambda (H2: (drop (S n0) O (CHead c k t) e)).(let H3 -\def (csubst0_gen_head k c c2 t v i H1) in (or3_ind (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (drop (S -n0) O c2 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 e2)))))))) -(\lambda (H4: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda -(u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2))) (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda -(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 -(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: -(eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead c k x0))).(\lambda (_: -(subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(or4 (drop (S -n0) O c0 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c0 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c0 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 e2))))))))) (let -H8 \def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: -T).((csubst0 n1 v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 -(drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 -(CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C -T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 -(S n0))) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 -(S n0))) v0 e1 e2)))))))))))))) H0 (s k x1) H5) in (let H9 \def (eq_ind nat i -(\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in (eq_ind_r nat (s k x1) -(\lambda (n1: nat).(or4 (drop (S n0) O (CHead c k x0) e) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c k x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O -(CHead c k x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c k x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 -(S n0))) v e1 e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to -(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall -(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) -(s k1 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda -(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 e2)))))) -(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v0 -u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 -e2)))))))))))))) \to ((lt (S n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead c -k0 x0) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead -e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T -(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead c k0 x0) (CHead e2 k1 u)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead e2 -k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda -(b: B).(\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall -(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 -(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Bind b) -x1))).(or4_intro0 (drop (S n0) O (CHead c (Bind b) x0) e) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c (Bind b) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 -e2))))))) (drop_drop (Bind b) n0 c e H10 x0)))))) (\lambda (f: F).(\lambda -(H10: (drop (r (Flat f) n0) O c e)).(\lambda (_: ((\forall (c3: C).(\forall -(v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) -O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead -e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) -x1))).(or4_intro0 (drop (S n0) O (CHead c (Flat f) x0) e) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2))))))) (drop_drop (Flat f) n0 c e H10 x0)))))) k (drop_gen_drop k c e t n0 -H2) H8 H9) i H5))) c2 H6)))))) H4)) (\lambda (H4: (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or4 (drop (S n0) O c2 e) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H5: -(eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead x0 k t))).(\lambda (H7: -(csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c0: C).(or4 (drop -(S n0) O c0 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c0 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c0 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 e2))))))))) (let -H8 \def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: -T).((csubst0 n1 v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 -(drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 -(CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C -T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 -(S n0))) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 -(S n0))) v0 e1 e2)))))))))))))) H0 (s k x1) H5) in (let H9 \def (eq_ind nat i -(\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in (eq_ind_r nat (s k x1) -(\lambda (n1: nat).(or4 (drop (S n0) O (CHead x0 k t) e) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 k t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O -(CHead x0 k t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 k t) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 -(S n0))) v e1 e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to -(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall -(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) -(s k1 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda -(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 e2)))))) -(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v0 -u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 -e2)))))))))))))) \to ((lt (S n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead x0 -k0 t) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead -e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T -(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 k1 u)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 -k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda -(b: B).(\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall -(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 -(S n0))) v0 e1 e2))))))))))))))).(\lambda (H12: (lt (S n0) (s (Bind b) -x1))).(let H13 \def (IHn x1 (le_S_n (S n0) x1 H12) c x0 v H7 e H10) in -(or4_ind (drop n0 O x0 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e0 -k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (ex3_4 K C C T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n0 O x0 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 n0)) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 O x0 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 -n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 n0)) v e1 e2))))))) (or4 -(drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Bind b) x1) (s k0 (S n0))) v e1 e2)))))))) (\lambda (H14: (drop n0 O x0 -e)).(or4_intro0 (drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 -e2))))))) (drop_drop (Bind b) n0 x0 e H14 t))) (\lambda (H14: (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O x0 (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 -n0)) v u w))))))).(ex3_4_ind K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e0 -k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x1 (s k0 n0)) v u w))))) (or4 (drop (S n0) O (CHead x0 -(Bind b) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: -T).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 x4))).(\lambda (H16: -(drop n0 O x0 (CHead x3 x2 x5))).(\lambda (H17: (subst0 (minus x1 (s x2 n0)) -v x4 x5)).(eq_ind_r C (CHead x3 x2 x4) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x0 (Bind b) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda -(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O -(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Bind b) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O -(CHead x0 (Bind b) t) (CHead x3 x2 x4)) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 -x4) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C (CHead x3 x2 x4) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 -(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 x4)) -(drop_drop (Bind b) n0 x0 (CHead x3 x2 x5) H16 t) (eq_ind_r nat (S (s x2 n0)) -(\lambda (n1: nat).(subst0 (minus (s (Bind b) x1) n1) v x4 x5)) H17 (s x2 (S -n0)) (s_S x2 n0)))) e H15)))))))) H14)) (\lambda (H14: (ex3_4 K C C T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop n0 O x0 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 -n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x0 (CHead e2 -k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus x1 (s k0 n0)) v e1 e2))))) (or4 (drop (S n0) O (CHead x0 -(Bind b) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: -C).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: -(drop n0 O x0 (CHead x4 x2 x5))).(\lambda (H17: (csubst0 (minus x1 (s x2 n0)) -v x3 x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x0 (Bind b) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda -(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O -(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Bind b) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O -(CHead x0 (Bind b) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 -x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 -(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) x1) (s k0 (S n0))) v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 -x5)) (drop_drop (Bind b) n0 x0 (CHead x4 x2 x5) H16 t) (eq_ind_r nat (S (s x2 -n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x1) n1) v x3 x4)) H17 (s -x2 (S n0)) (s_S x2 n0)))) e H15)))))))) H14)) (\lambda (H14: (ex4_5 K C C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 -k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus x1 (s k0 n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 -n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 K C T -T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 -e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: -(drop n0 O x0 (CHead x4 x2 x6))).(\lambda (H17: (subst0 (minus x1 (s x2 n0)) -v x5 x6)).(\lambda (H18: (csubst0 (minus x1 (s x2 n0)) v x3 x4)).(eq_ind_r C -(CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind b) t) -c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 -(S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead x0 (Bind b) t) -(CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) (CHead e0 k0 u)))))) (\lambda -(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O -(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O -(CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 -e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) x2 x3 x4 x5 x6 -(refl_equal C (CHead x3 x2 x5)) (drop_drop (Bind b) n0 x0 (CHead x4 x2 x6) -H16 t) (eq_ind_r nat (S (s x2 n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind -b) x1) n1) v x5 x6)) H17 (s x2 (S n0)) (s_S x2 n0)) (eq_ind_r nat (S (s x2 -n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x1) n1) v x3 x4)) H18 (s -x2 (S n0)) (s_S x2 n0)))) e H15)))))))))) H14)) H13)))))) (\lambda (f: -F).(\lambda (H10: (drop (r (Flat f) n0) O c e)).(\lambda (H11: ((\forall (c3: -C).(\forall (v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 -(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) -x1))).(let H13 \def (H11 x0 v H7 e H10) in (or4_ind (drop (S n0) O x0 e) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus x1 (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 -(s k0 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2)))))))) (\lambda (H14: (drop (S n0) O x0 e)).(or4_intro0 (drop (S n0) O -(CHead x0 (Flat f) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Flat f) x1) (s k0 (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 x0 e H14 -t))) (\lambda (H14: (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x1 (s k0 (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda -(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O x0 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 (S n0))) v u -w))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) (ex3_4 K C T T (\lambda -(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Flat f) x1) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: -C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 -x4))).(\lambda (H16: (drop (S n0) O x0 (CHead x3 x2 x5))).(\lambda (H17: -(subst0 (minus x1 (s x2 (S n0))) v x4 x5)).(eq_ind_r C (CHead x3 x2 x4) -(\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 -k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 x2 -x4)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x3 x2 x4) (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2))))))) (ex3_4_intro K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x3 x2 x4) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w))))) -x2 x3 x4 x5 (refl_equal C (CHead x3 x2 x4)) (drop_drop (Flat f) n0 x0 (CHead -x3 x2 x5) H16 t) H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 K C C T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 -(S n0))) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x0 (CHead -e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus x1 (s k0 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead -x0 (Flat f) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: -C).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: -(drop (S n0) O x0 (CHead x4 x2 x5))).(\lambda (H17: (csubst0 (minus x1 (s x2 -(S n0))) v x3 x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop -(S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) -(\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 -(S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O -(CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S -n0) O (CHead x0 (Flat f) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 -x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 -(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) x1) (s k0 (S n0))) v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 -x5)) (drop_drop (Flat f) n0 x0 (CHead x4 x2 x5) H16 t) H17)) e H15)))))))) -H14)) (\lambda (H14: (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 -(S n0))) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 -(S n0))) v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) (ex3_4 K -C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: -(drop (S n0) O x0 (CHead x4 x2 x6))).(\lambda (H17: (subst0 (minus x1 (s x2 -(S n0))) v x5 x6)).(\lambda (H18: (csubst0 (minus x1 (s x2 (S n0))) v x3 -x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead -x0 (Flat f) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Flat f) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O -(CHead x0 (Flat f) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 -x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 -(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v e1 e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 -e2)))))) x2 x3 x4 x5 x6 (refl_equal C (CHead x3 x2 x5)) (drop_drop (Flat f) -n0 x0 (CHead x4 x2 x6) H16 t) H17 H18)) e H15)))))))))) H14)) H13)))))) k -(drop_gen_drop k c e t n0 H2) H8 H9) i H5))) c2 H6)))))) H4)) (\lambda (H4: -(ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s -k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead -c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))) (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda -(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: -nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: (eq C c2 (CHead x1 k -x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: (csubst0 x2 v c -x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(or4 (drop (S n0) O c0 e) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 -(S n0))) v e1 e2))))))))) (let H9 \def (eq_ind nat i (\lambda (n1: -nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall -(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S -n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead -e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus n1 (s k0 (S n0))) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C e0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 -(s k0 (S n0))) v0 e1 e2)))))))))))))) H0 (s k x2) H5) in (let H10 \def -(eq_ind nat i (\lambda (n1: nat).(lt (S n0) n1)) H (s k x2) H5) in (eq_ind_r -nat (s k x2) (\lambda (n1: nat).(or4 (drop (S n0) O (CHead x1 k x0) e) (ex3_4 -K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 k x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O -(CHead x1 k x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 k x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 -(S n0))) v e1 e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to -(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x2) v0 c c3) \to (\forall -(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x2) -(s k1 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda -(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v0 e1 e2)))))) -(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x2) (s k1 (S n0))) v0 -u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v0 e1 -e2)))))))))))))) \to ((lt (S n0) (s k0 x2)) \to (or4 (drop (S n0) O (CHead x1 -k0 x0) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) -(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s k0 x2) (s k1 (S n0))) v u w)))))) (ex3_4 -K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e2 k1 u)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k0 x2) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e2 -k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s k0 x2) (s k1 (S n0))) v u w)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda -(b: B).(\lambda (H11: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall -(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x2) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x2) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 -(S n0))) v0 e1 e2))))))))))))))).(\lambda (H13: (lt (S n0) (s (Bind b) -x2))).(let H14 \def (IHn x2 (le_S_n (S n0) x2 H13) c x1 v H8 e H11) in -(or4_ind (drop n0 O x1 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e0 -k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (ex3_4 K C C T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n0 O x1 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 n0)) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 O x1 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 -n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 n0)) v e1 e2))))))) (or4 -(drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Bind b) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (H15: (drop n0 O x1 -e)).(or4_intro0 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 -e2))))))) (drop_drop (Bind b) n0 x1 e H15 x0))) (\lambda (H15: (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O x1 (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 -n0)) v u w))))))).(ex3_4_ind K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e0 -k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x2 (s k0 n0)) v u w))))) (or4 (drop (S n0) O (CHead x1 -(Bind b) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 x5))).(\lambda (H17: -(drop n0 O x1 (CHead x4 x3 x6))).(\lambda (H18: (subst0 (minus x2 (s x3 n0)) -v x5 x6)).(eq_ind_r C (CHead x4 x3 x5) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x1 (Bind b) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda -(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O -(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Bind b) x2) (s k0 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O -(CHead x1 (Bind b) x0) (CHead x4 x3 x5)) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 x3 -x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C (CHead x4 x3 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 -(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x2) (s k0 (S n0))) v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x5)) -(drop_drop (Bind b) n0 x1 (CHead x4 x3 x6) H17 x0) (eq_ind_r nat (S (s x3 -n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind b) x2) n1) v x5 x6)) H18 (s -x3 (S n0)) (s_S x3 n0)))) e H16)))))))) H15)) (\lambda (H15: (ex3_4 K C C T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop n0 O x1 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 -n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x1 (CHead e2 -k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus x2 (s k0 n0)) v e1 e2))))) (or4 (drop (S n0) O (CHead x1 -(Bind b) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: -C).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 x6))).(\lambda (H17: -(drop n0 O x1 (CHead x5 x3 x6))).(\lambda (H18: (csubst0 (minus x2 (s x3 n0)) -v x4 x5)).(eq_ind_r C (CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x1 (Bind b) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda -(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O -(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Bind b) x2) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O -(CHead x1 (Bind b) x0) (CHead x4 x3 x6)) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 x3 -x6) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C (CHead x4 x3 x6) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 -(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) x2) (s k0 (S n0))) v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 -x6)) (drop_drop (Bind b) n0 x1 (CHead x5 x3 x6) H17 x0) (eq_ind_r nat (S (s -x3 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x2) n1) v x4 x5)) H18 -(s x3 (S n0)) (s_S x3 n0)))) e H16)))))))) H15)) (\lambda (H15: (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead -e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus x2 (s k0 n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 -n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 K C T -T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 -u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 -e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: -T).(\lambda (x7: T).(\lambda (H16: (eq C e (CHead x4 x3 x6))).(\lambda (H17: -(drop n0 O x1 (CHead x5 x3 x7))).(\lambda (H18: (subst0 (minus x2 (s x3 n0)) -v x6 x7)).(\lambda (H19: (csubst0 (minus x2 (s x3 n0)) v x4 x5)).(eq_ind_r C -(CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind b) x0) -c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 -(S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Bind b) x0) -(CHead x4 x3 x6)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda -(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O -(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O -(CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 -e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) x3 x4 x5 -x6 x7 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Bind b) n0 x1 (CHead x5 x3 -x7) H17 x0) (eq_ind_r nat (S (s x3 n0)) (\lambda (n1: nat).(subst0 (minus (s -(Bind b) x2) n1) v x6 x7)) H18 (s x3 (S n0)) (s_S x3 n0)) (eq_ind_r nat (S (s -x3 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x2) n1) v x4 x5)) H19 -(s x3 (S n0)) (s_S x3 n0)))) e H16)))))))))) H15)) H14)))))) (\lambda (f: -F).(\lambda (H11: (drop (r (Flat f) n0) O c e)).(\lambda (H12: ((\forall (c3: -C).(\forall (v0: T).((csubst0 (s (Flat f) x2) v0 c c3) \to (\forall (e0: -C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x2) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x2) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 -(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) -x2))).(let H14 \def (H12 x1 v H8 e H11) in (or4_ind (drop (S n0) O x1 e) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x1 (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e2 k0 w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x2 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x2 -(s k0 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) -(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2)))))))) (\lambda (H15: (drop (S n0) O x1 e)).(or4_intro0 (drop (S n0) O -(CHead x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Flat f) x2) (s k0 (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 x1 e H15 -x0))) (\lambda (H15: (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead -e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus x2 (s k0 (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda -(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O x1 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S n0))) v u -w))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda -(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Flat f) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: -C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 -x5))).(\lambda (H17: (drop (S n0) O x1 (CHead x4 x3 x6))).(\lambda (H18: -(subst0 (minus x2 (s x3 (S n0))) v x5 x6)).(eq_ind_r C (CHead x4 x3 x5) -(\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K C T -T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 -k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2))))))))) (or4_intro1 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 -x5)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x4 x3 x5) (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) -(ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u -w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x5)) (drop_drop (Flat f) n0 x1 -(CHead x4 x3 x6) H17 x0) H18)) e H16)))))))) H15)) (\lambda (H15: (ex3_4 K C -C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O x1 (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 -(S n0))) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x1 (CHead -e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead -x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 -u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C -T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 -(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: -C).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 x6))).(\lambda (H17: -(drop (S n0) O x1 (CHead x5 x3 x6))).(\lambda (H18: (csubst0 (minus x2 (s x3 -(S n0))) v x4 x5)).(eq_ind_r C (CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop -(S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) -(\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 -(S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O -(CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S -n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))))) -(or4_intro2 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 x6)) (ex3_4 K -C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) -(ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Flat f) n0 x1 -(CHead x5 x3 x6) H17 x0) H18)) e H16)))))))) H15)) (\lambda (H15: (ex4_5 K C -C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S n0))) v u -w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus x2 (s k0 (S n0))) v e1 -e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O x1 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2)))))) (or4 -(drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda (k0: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 -u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda -(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Flat f) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: -C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H16: (eq C e -(CHead x4 x3 x6))).(\lambda (H17: (drop (S n0) O x1 (CHead x5 x3 -x7))).(\lambda (H18: (subst0 (minus x2 (s x3 (S n0))) v x6 x7)).(\lambda -(H19: (csubst0 (minus x2 (s x3 (S n0))) v x4 x5)).(eq_ind_r C (CHead x4 x3 -x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K -C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 -k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S -n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 -x6)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda (k0: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) -(ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 -u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)))))) x3 x4 x5 -x6 x7 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Flat f) n0 x1 (CHead x5 x3 -x7) H17 x0) H18 H19)) e H16)))))))))) H15)) H14)))))) k (drop_gen_drop k c e -t n0 H2) H9 H10) i H5))) c2 H6)))))))) H4)) H3))))))))))) c1)))))) n). - -lemma csubst0_drop_eq: - \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 -n v c1 c2) \to (\forall (e: C).((drop n O c1 e) \to (or4 (drop n O c2 e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n O c2 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop n O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: -C).(\forall (v: T).((csubst0 n0 v c1 c2) \to (\forall (e: C).((drop n0 O c1 -e) \to (or4 (drop n0 O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O -c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n0 O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c2 (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda -(H: (csubst0 O v c1 c2)).(\lambda (e: C).(\lambda (H0: (drop O O c1 -e)).(eq_ind C c1 (\lambda (c: C).(or4 (drop O O c2 c) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop O O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop O O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O -c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (insert_eq nat O (\lambda (n0: nat).(csubst0 n0 v c1 c2)) -(\lambda (n0: nat).(or4 (drop n0 n0 c2 c1) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c1 (CHead e0 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 n0 c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c1 -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop n0 n0 c2 (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c1 (CHead e1 (Flat f) u))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 n0 c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 n0 v e1 e2))))))))) (\lambda (y: nat).(\lambda (H1: (csubst0 -y v c1 c2)).(csubst0_ind (\lambda (n0: nat).(\lambda (t: T).(\lambda (c: -C).(\lambda (c0: C).((eq nat n0 O) \to (or4 (drop n0 n0 c0 c) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 n0 c0 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 t u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 c0 (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 -t e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 n0 c0 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 t u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 n0 t e1 e2))))))))))))) (\lambda (k: K).(K_ind (\lambda (k0: -K).(\forall (i: nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: -T).((subst0 i v0 u1 u2) \to (\forall (c: C).((eq nat (s k0 i) O) \to (or4 -(drop (s k0 i) (s k0 i) (CHead c k0 u2) (CHead c k0 u1)) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead -c k0 u1) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (s k0 i) (s k0 i) (CHead c k0 u2) (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (s k0 i) v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c k0 u1) (CHead e1 (Flat f) -u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (s k0 i) (s k0 i) (CHead c k0 u2) (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s -k0 i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c k0 u1) -(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) (s k0 i) (CHead c k0 u2) -(CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (s k0 i) v0 u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(s k0 i) v0 e1 e2)))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda -(v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i v0 u1 -u2)).(\lambda (c: C).(\lambda (H3: (eq nat (S i) O)).(let H4 \def (eq_ind nat -(S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) -\Rightarrow True])) I O H3) in (False_ind (or4 (drop (S i) (S i) (CHead c -(Bind b) u2) (CHead c (Bind b) u1)) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Bind b) u1) (CHead e0 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S i) (S i) (CHead c (Bind b) u2) (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (S i) -v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead c (Bind b) u1) (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S i) -(S i) (CHead c (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S i) v0 e1 -e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Bind b) u1) (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S i) (S i) (CHead c (Bind b) u2) (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (S i) v0 u w)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (S i) v0 e1 -e2)))))))) H4)))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 -u2)).(\lambda (c: C).(\lambda (H3: (eq nat i O)).(let H4 \def (eq_ind nat i -(\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O H3) in (eq_ind_r nat O (\lambda -(n0: nat).(or4 (drop n0 n0 (CHead c (Flat f) u2) (CHead c (Flat f) u1)) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C (CHead c (Flat f) u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 (CHead c -(Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 u w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C -(CHead c (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 (CHead c (Flat f) u2) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead c (Flat f) u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 (CHead c -(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro1 (drop O O (CHead c (Flat f) -u2) (CHead c (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Flat f) u1) (CHead e0 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop O O (CHead c (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead c (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O (CHead c (Flat -f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda -(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq -C (CHead c (Flat f) u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O -(CHead c (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Flat f) -u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop O O (CHead c (Flat f) u2) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v0 u w))))) f c u1 u2 (refl_equal C (CHead c (Flat f) u1)) -(drop_refl (CHead c (Flat f) u2)) H4)) i H3)))))))))) k)) (\lambda (k: -K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (c3: C).(\forall (c4: -C).(\forall (v0: T).((csubst0 i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop -i i c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 i v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 -(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e2 (Flat f) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 i v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 e2)))))))))) \to (\forall -(u: T).((eq nat (s k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead c4 k0 u) -(CHead c3 k0 u)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (_: T).(eq C (CHead c3 k0 u) (CHead e0 (Flat f) u0)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 -i) (s k0 i) (CHead c4 k0 u) (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (s k0 i) v0 u0 -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C (CHead c3 k0 u) (CHead e1 (Flat f) u0)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k0 -i) (s k0 i) (CHead c4 k0 u) (CHead e2 (Flat f) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 -e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k0 u) (CHead e1 (Flat f) -u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s k0 i) (s k0 i) (CHead c4 k0 u) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (s k0 i) v0 u0 w)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (s k0 i) v0 -e1 e2))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (c3: -C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (_: (csubst0 i v0 c3 -c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop i i c4 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop i i c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat -(S i) O)).(let H5 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (or4 -(drop (S i) (S i) (CHead c4 (Bind b) u) (CHead c3 (Bind b) u)) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C -(CHead c3 (Bind b) u) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S i) (S i) (CHead c4 (Bind b) -u) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (S i) v0 u0 w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 (Bind b) -u) (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S i) (S i) (CHead c4 (Bind b) u) (CHead e2 (Flat -f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (S i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 -(Bind b) u) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S i) (S i) (CHead -c4 (Bind b) u) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (S i) v0 u0 -w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (S i) v0 e1 e2)))))))) H5))))))))))) (\lambda (f: -F).(\lambda (i: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: -T).(\lambda (H2: (csubst0 i v0 c3 c4)).(\lambda (H3: (((eq nat i O) \to (or4 -(drop i i c4 c3) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e0 -(Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 i v0 u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i i -c4 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e2 (Flat f0) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 i v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda -(u: T).(\lambda (H4: (eq nat i O)).(let H5 \def (eq_ind nat i (\lambda (n0: -nat).((eq nat n0 O) \to (or4 (drop n0 n0 c4 c3) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat -f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 n0 c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c3 -(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop n0 n0 c4 (CHead e2 (Flat f0) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f0) u0))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop n0 n0 c4 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 -w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))))))) H3 O H4) in (let H6 \def -(eq_ind nat i (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H2 O H4) in (eq_ind_r -nat O (\lambda (n0: nat).(or4 (drop n0 n0 (CHead c4 (Flat f) u) (CHead c3 -(Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e0 (Flat f0) u0)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 -(CHead c4 (Flat f) u) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 w)))))) (ex3_4 F C C -T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C -(CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 n0 (CHead c4 (Flat f) u) -(CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C -(CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 (CHead c4 -(Flat f) u) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro2 (drop O O (CHead c4 (Flat f) -u) (CHead c3 (Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e0 -(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop O O (CHead c4 (Flat f) u) (CHead e0 (Flat f0) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 u0 -w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O -(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C -C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop O O (CHead c4 (Flat f) u) (CHead e2 (Flat f0) w))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 O v0 u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F -C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq -C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O (CHead c4 -(Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2))))) f c3 c4 u -(refl_equal C (CHead c3 (Flat f) u)) (drop_refl (CHead c4 (Flat f) u)) H6)) i -H4)))))))))))) k)) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: -nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: T).((subst0 i v0 u1 u2) -\to (\forall (c3: C).(\forall (c4: C).((csubst0 i v0 c3 c4) \to ((((eq nat i -O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 -(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 i v0 u w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat -f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop i i c4 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T -T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C c3 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 i v0 u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 -e2)))))))))) \to ((eq nat (s k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead -c4 k0 u2) (CHead c3 k0 u1)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 k0 u1) (CHead e0 (Flat f) -u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s k0 i) (s k0 i) (CHead c4 k0 u2) (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (s k0 -i) v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead c3 k0 u1) (CHead e1 (Flat f) u)))))) (\lambda -(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k0 i) (s k0 -i) (CHead c4 k0 u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 e2)))))) (ex4_5 F -C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead c3 k0 u1) (CHead e1 (Flat f) u))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (s k0 i) (s k0 i) (CHead c4 k0 u2) (CHead e2 (Flat f) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (s k0 i) v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 -e2))))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (v0: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i v0 u1 -u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubst0 i v0 c3 -c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop i i c4 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop i i c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (H5: (eq nat (S i) O)).(let H6 -\def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False -| (S _) \Rightarrow True])) I O H5) in (False_ind (or4 (drop (S i) (S i) -(CHead c4 (Bind b) u2) (CHead c3 (Bind b) u1)) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Bind b) -u1) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S i) (S i) (CHead c4 (Bind b) u2) (CHead e0 (Flat -f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (S i) v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 (Bind b) u1) (CHead e1 -(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S i) (S i) (CHead c4 (Bind b) u2) (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S -i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Bind b) u1) (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S i) (S i) (CHead c4 (Bind b) u2) (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (S i) v0 u w)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (S i) v0 e1 -e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 -u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i v0 c3 -c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 -(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop i i c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c3 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 (CHead e2 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f0) u))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop i i c4 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 -\def (eq_ind nat i (\lambda (n0: nat).((eq nat n0 O) \to (or4 (drop n0 n0 c4 -c3) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C c3 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 c4 (CHead e0 (Flat f0) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 -u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 c4 (CHead e2 -(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 -(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop n0 n0 c4 (CHead e2 (Flat f0) w))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 n0 v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))))))) H4 O H5) in -(let H7 \def (eq_ind nat i (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H3 O H5) -in (let H8 \def (eq_ind nat i (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O -H5) in (eq_ind_r nat O (\lambda (n0: nat).(or4 (drop n0 n0 (CHead c4 (Flat f) -u2) (CHead c3 (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u1) (CHead e0 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop n0 n0 (CHead c4 (Flat f) u2) (CHead e0 (Flat f0) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 -u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 -(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F -C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop n0 n0 (CHead c4 (Flat f) u2) (CHead e2 (Flat f0) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 n0 v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro3 -(drop O O (CHead c4 (Flat f) u2) (CHead c3 (Flat f) u1)) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead c3 (Flat f) u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) -(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 (Flat f) -u1) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop O O (CHead c4 (Flat f) u2) (CHead e2 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) -u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v0 e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) -u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v0 e1 e2)))))) f c3 c4 u1 u2 (refl_equal C (CHead c3 (Flat f) u1)) -(drop_refl (CHead c4 (Flat f) u2)) H8 H7)) i H5))))))))))))))) k)) y v c1 c2 -H1))) H) e (drop_gen_refl c1 e H0)))))))) (\lambda (n0: nat).(\lambda (IHn: -((\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 n0 v c1 c2) \to -(\forall (e: C).((drop n0 O c1 e) \to (or4 (drop n0 O c2 e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c2 (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))))))))))).(\lambda (c1: C).(C_ind (\lambda -(c: C).(\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to (\forall -(e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (n1: -nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 (S n0) v (CSort -n1) c2)).(\lambda (e: C).(\lambda (H0: (drop (S n0) O (CSort n1) -e)).(and3_ind (eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (or4 (drop -(S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (H1: (eq C e (CSort n1))).(\lambda (H2: (eq nat (S n0) -O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: C).(or4 -(drop (S n0) O c2 c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -c (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (let H4 \def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee with -[O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (or4 -(drop (S n0) O c2 (CSort n1)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CSort n1) (CHead e0 (Flat f) -u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CSort -n1) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C (CSort n1) (CHead e1 (Flat f) u))))))) (\lambda -(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop -(S n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) H4)) e H1)))) (drop_gen_sort n1 (S n0) O e -H0)))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: -T).((csubst0 (S n0) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 -(drop (S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda -(v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) c2)).(\lambda (e: -C).(\lambda (H1: (drop (S n0) O (CHead c k t) e)).(let H2 \def -(csubst0_gen_head k c c2 t v (S n0) H0) in (or3_ind (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (drop (S -n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (H3: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq -nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k -u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2))) (or4 (drop (S n0) O c2 e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: (eq nat -(S n0) (s k x1))).(\lambda (H5: (eq C c2 (CHead c k x0))).(\lambda (H6: -(subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(or4 (drop (S -n0) O c0 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S -n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead c k0 x0) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c -k0 x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))) (\lambda (b: B).(\lambda (H7: (drop (r (Bind b) n0) O c -e)).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(let H9 \def (f_equal nat -nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow -n1])) (S n0) (S x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n1: -nat).(subst0 n1 v t x0)) H6 n0 H9) in (or4_intro0 (drop (S n0) O (CHead c -(Bind b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c -(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(drop_drop (Bind b) n0 c e H7 x0))))))) (\lambda (f: F).(\lambda (H7: (drop -(r (Flat f) n0) O c e)).(\lambda (H8: (eq nat (S n0) (s (Flat f) x1))).(let -H9 \def (f_equal nat nat (\lambda (e0: nat).e0) (S n0) (s (Flat f) x1) H8) in -(let H10 \def (eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S -n0) H9) in (or4_intro0 (drop (S n0) O (CHead c (Flat f) x0) e) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) x0) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O (CHead c (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e H7 -x0))))))) k (drop_gen_drop k c e t n0 H1) H4) c2 H5)))))) H3)) (\lambda (H3: -(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) -(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3))) (or4 (drop (S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat (S n0) -(s k x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 -v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c0: C).(or4 (drop (S n0) O c0 -e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S -n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead x0 k0 t) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -k0 t) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))) (\lambda (b: B).(\lambda (H7: (drop (r (Bind b) n0) O c -e)).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(let H9 \def (f_equal nat -nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow -n1])) (S n0) (S x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n1: -nat).(csubst0 n1 v c x0)) H6 n0 H9) in (let H11 \def (IHn c x0 v H10 e H7) in -(or4_ind (drop n0 O x0 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O -x0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n0 O x0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(or4 (drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (H12: (drop n0 O x0 e)).(or4_intro0 (drop (S n0) O -(CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(drop_drop (Bind b) n0 x0 e H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop n0 O x0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O x0 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 -(drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda -(x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x4))).(\lambda (H14: (drop -n0 O x0 (CHead x3 (Flat x2) x5))).(\lambda (H15: (subst0 O v x4 -x5)).(eq_ind_r C (CHead x3 (Flat x2) x4) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x0 (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat -f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 (Flat -x2) x4)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead -x3 (Flat x2) x4) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x3 (Flat x2) x4) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) -x4) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x4)) -(drop_drop (Bind b) n0 x0 (CHead x3 (Flat x2) x5) H14 t) H15)) e H13)))))))) -H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x0 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O -x0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead x0 -(Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H14: (drop n0 O -x0 (CHead x4 (Flat x2) x5))).(\lambda (H15: (csubst0 O v x3 x4)).(eq_ind_r C -(CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind -b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat -f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro2 (drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 (Flat -x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead -x3 (Flat x2) x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x3 (Flat x2) x5) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) -x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) -(drop_drop (Bind b) n0 x0 (CHead x4 (Flat x2) x5) H14 t) H15)) e H13)))))))) -H12)) (\lambda (H12: (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O x0 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 (Flat f) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) -O (CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (x6: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda -(H14: (drop n0 O x0 (CHead x4 (Flat x2) x6))).(\lambda (H15: (subst0 O v x5 -x6)).(\lambda (H16: (csubst0 O v x3 x4)).(eq_ind_r C (CHead x3 (Flat x2) x5) -(\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind b) t) c0) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O (CHead x0 (Bind b) t) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O -(CHead x0 (Bind b) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) -x5) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 -(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat -f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat -f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) -x2 x3 x4 x5 x6 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Bind b) n0 -x0 (CHead x4 (Flat x2) x6) H14 t) H15 H16)) e H13)))))))))) H12)) H11))))))) -(\lambda (f: F).(\lambda (H7: (drop (r (Flat f) n0) O c e)).(\lambda (H8: (eq -nat (S n0) (s (Flat f) x1))).(let H9 \def (f_equal nat nat (\lambda (e0: -nat).e0) (S n0) (s (Flat f) x1) H8) in (let H10 \def (eq_ind_r nat x1 -(\lambda (n1: nat).(csubst0 n1 v c x0)) H6 (S n0) H9) in (let H11 \def (H x0 -v H10 e H7) in (or4_ind (drop (S n0) O x0 e) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O x0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O x0 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H12: -(drop (S n0) O x0 e)).(or4_intro0 (drop (S n0) O (CHead x0 (Flat f) t) e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat -f) n0 x0 e H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda (f0: F).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O x0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda -(f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O x0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) -O (CHead x0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda -(x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x4))).(\lambda (H14: (drop -(S n0) O x0 (CHead x3 (Flat x2) x5))).(\lambda (H15: (subst0 O v x4 -x5)).(eq_ind_r C (CHead x3 (Flat x2) x4) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x0 (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 -(Flat x2) x4)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead x3 (Flat x2) x4) (CHead e1 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e1 (Flat f0) u))))))) (\lambda -(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C -T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x3 (Flat x2) x4) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 -(Flat x2) x4)) (drop_drop (Flat f) n0 x0 (CHead x3 (Flat x2) x5) H14 t) H15)) -e H13)))))))) H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O x0 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C -C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) -(or4 (drop (S n0) O (CHead x0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda -(x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H14: (drop -(S n0) O x0 (CHead x4 (Flat x2) x5))).(\lambda (H15: (csubst0 O v x3 -x4)).(eq_ind_r C (CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x0 (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 -(Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 (Flat f0) u))))))) (\lambda -(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C -C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C -(CHead x3 (Flat x2) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead -x3 (Flat x2) x5)) (drop_drop (Flat f) n0 x0 (CHead x4 (Flat x2) x5) H14 t) -H15)) e H13)))))))) H12)) (\lambda (H12: (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 (Flat f0) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O x0 (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 -(Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 -(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat -f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: -T).(\lambda (x6: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda -(H14: (drop (S n0) O x0 (CHead x4 (Flat x2) x6))).(\lambda (H15: (subst0 O v -x5 x6)).(\lambda (H16: (csubst0 O v x3 x4)).(eq_ind_r C (CHead x3 (Flat x2) -x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 F C -T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -c0 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O -(CHead x0 (Flat f) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) -x5) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat -f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 -(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat -f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 -(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat -f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) -x2 x3 x4 x5 x6 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Flat f) n0 -x0 (CHead x4 (Flat x2) x6) H14 t) H15 H16)) e H13)))))))))) H12)) H11))))))) -k (drop_gen_drop k c e t n0 H1) H4) c2 H5)))))) H3)) (\lambda (H3: (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k -j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 -k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda -(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: -C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (drop (S n0) O c2 e) (ex3_4 F -C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: -C).(\lambda (x2: nat).(\lambda (H4: (eq nat (S n0) (s k x2))).(\lambda (H5: -(eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t x0)).(\lambda (H7: -(csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(or4 (drop -(S n0) O c0 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S -n0) (s k0 x2)) \to (or4 (drop (S n0) O (CHead x1 k0 x0) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -k0 x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))) (\lambda (b: B).(\lambda (H8: (drop (r (Bind b) n0) O c -e)).(\lambda (H9: (eq nat (S n0) (s (Bind b) x2))).(let H10 \def (f_equal nat -nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow -n1])) (S n0) (S x2) H9) in (let H11 \def (eq_ind_r nat x2 (\lambda (n1: -nat).(csubst0 n1 v c x1)) H7 n0 H10) in (let H12 \def (eq_ind_r nat x2 -(\lambda (n1: nat).(subst0 n1 v t x0)) H6 n0 H10) in (let H13 \def (IHn c x1 -v H11 e H8) in (or4_ind (drop n0 O x1 e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop n0 O x1 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop n0 O x1 (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 -O x1 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (or4 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H14: (drop n0 O x1 -e)).(or4_intro0 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 x1 e H14 -x0))) (\lambda (H14: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O -x1 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) O (CHead x1 (Bind -b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: -T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x5))).(\lambda (H16: (drop n0 O -x1 (CHead x4 (Flat x3) x6))).(\lambda (H17: (subst0 O v x5 x6)).(eq_ind_r C -(CHead x4 (Flat x3) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind -b) x0) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat -f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro1 (drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 (Flat -x3) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead -x4 (Flat x3) x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x4 (Flat x3) x5) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) -x5) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x5)) -(drop_drop (Bind b) n0 x1 (CHead x4 (Flat x3) x6) H16 x0) H17)) e H15)))))))) -H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x1 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O -x1 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead x1 -(Bind b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: -T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H16: (drop n0 O -x1 (CHead x5 (Flat x3) x6))).(\lambda (H17: (csubst0 O v x4 x5)).(eq_ind_r C -(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind -b) x0) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat -f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro2 (drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 (Flat -x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead -x4 (Flat x3) x6) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x4 (Flat x3) x6) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) -x6) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) -(drop_drop (Bind b) n0 x1 (CHead x5 (Flat x3) x6) H16 x0) H17)) e H15)))))))) -H14)) (\lambda (H14: (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O x1 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e2 (Flat f) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) -O (CHead x1 (Bind b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: -T).(\lambda (x7: T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x6))).(\lambda -(H16: (drop n0 O x1 (CHead x5 (Flat x3) x7))).(\lambda (H17: (subst0 O v x6 -x7)).(\lambda (H18: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x4 (Flat x3) x6) -(\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind b) x0) c0) (ex3_4 F C T -T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) -O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O -(CHead x1 (Bind b) x0) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) -x6) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 -(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat -f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat -f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) -x3 x4 x5 x6 x7 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Bind b) n0 -x1 (CHead x5 (Flat x3) x7) H16 x0) H17 H18)) e H15)))))))))) H14)) -H13)))))))) (\lambda (f: F).(\lambda (H8: (drop (r (Flat f) n0) O c -e)).(\lambda (H9: (eq nat (S n0) (s (Flat f) x2))).(let H10 \def (f_equal nat -nat (\lambda (e0: nat).e0) (S n0) (s (Flat f) x2) H9) in (let H11 \def -(eq_ind_r nat x2 (\lambda (n1: nat).(csubst0 n1 v c x1)) H7 (S n0) H10) in -(let H12 \def (eq_ind_r nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S -n0) H10) in (let H13 \def (H x1 v H11 e H8) in (or4_ind (drop (S n0) O x1 e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O x1 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead -e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H14: (drop (S n0) O -x1 e)).(or4_intro0 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 x1 e H14 -x0))) (\lambda (H14: (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O x1 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda -(f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O x1 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) -O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda -(x6: T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x5))).(\lambda (H16: (drop -(S n0) O x1 (CHead x4 (Flat x3) x6))).(\lambda (H17: (subst0 O v x5 -x6)).(eq_ind_r C (CHead x4 (Flat x3) x5) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead x1 (Flat f) x0) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead -x4 (Flat x3) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e0 (Flat f0) -u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead x4 (Flat x3) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e1 (Flat f0) u))))))) (\lambda -(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C -T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x4 (Flat x3) x5) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 -(Flat x3) x5)) (drop_drop (Flat f) n0 x1 (CHead x4 (Flat x3) x6) H16 x0) -H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O x1 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind -F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (S n0) O x1 (CHead e2 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: -C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 (Flat -x3) x6))).(\lambda (H16: (drop (S n0) O x1 (CHead x5 (Flat x3) x6))).(\lambda -(H17: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: -C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 F C T T (\lambda -(f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C c0 (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead x1 (Flat -f) x0) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) -u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex3_4_intro F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) -x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Flat f) n0 x1 -(CHead x5 (Flat x3) x6) H16 x0) H17)) e H15)))))))) H14)) (\lambda (H14: -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O x1 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e2 (Flat f0) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) -(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda -(x6: T).(\lambda (x7: T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) -x6))).(\lambda (H16: (drop (S n0) O x1 (CHead x5 (Flat x3) x7))).(\lambda -(H17: (subst0 O v x6 x7)).(\lambda (H18: (csubst0 O v x4 x5)).(eq_ind_r C -(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat -f) x0) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat -f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 (Flat -x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 -(Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u))))))) (\lambda -(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C -C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x3 x4 x5 x6 x7 -(refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Flat f) n0 x1 (CHead x5 -(Flat x3) x7) H16 x0) H17 H18)) e H15)))))))))) H14)) H13)))))))) k -(drop_gen_drop k c e t n0 H1) H4) c2 H5)))))))) H3)) H2))))))))))) c1)))) n). - -lemma csubst0_drop_eq_back: - \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 -n v c1 c2) \to (\forall (e: C).((drop n O c2 e) \to (or4 (drop n O c1 e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: -T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop n O c1 (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n O c1 (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop n O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: -C).(\forall (v: T).((csubst0 n0 v c1 c2) \to (\forall (e: C).((drop n0 O c2 -e) \to (or4 (drop n0 O c1 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O -c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop n0 O c1 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c1 (CHead e1 -(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda -(H: (csubst0 O v c1 c2)).(\lambda (e: C).(\lambda (H0: (drop O O c2 -e)).(eq_ind C c2 (\lambda (c: C).(or4 (drop O O c1 c) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop O O c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop O O c1 (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C c (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O -O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (insert_eq nat O (\lambda (n0: nat).(csubst0 n0 v c1 c2)) -(\lambda (n0: nat).(or4 (drop n0 n0 c1 c2) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c2 (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop n0 n0 c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c2 -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop n0 n0 c1 (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c2 (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop n0 n0 c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 v u1 -u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 n0 v e1 e2))))))))) (\lambda (y: nat).(\lambda -(H1: (csubst0 y v c1 c2)).(csubst0_ind (\lambda (n0: nat).(\lambda (t: -T).(\lambda (c: C).(\lambda (c0: C).((eq nat n0 O) \to (or4 (drop n0 n0 c c0) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: -T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 c (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 -t u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 c (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 n0 t e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 -(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(drop n0 n0 c (CHead e1 (Flat f) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 n0 t u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 t e1 e2))))))))))))) (\lambda -(k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (v0: T).(\forall -(u1: T).(\forall (u2: T).((subst0 i v0 u1 u2) \to (\forall (c: C).((eq nat (s -k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead c k0 u1) (CHead c k0 u2)) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: -T).(eq C (CHead c k0 u2) (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda -(e0: C).(\lambda (u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c k0 -u1) (CHead e0 (Flat f) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: -T).(\lambda (u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda -(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c k0 u2) -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (s k0 i) (s k0 i) (CHead c k0 u1) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (s k0 i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c k0 -u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c k0 -u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 (s k0 i) v0 e1 e2)))))))))))))))) (\lambda (b: B).(\lambda (i: -nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 -i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq nat (S i) O)).(let H4 \def -(eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S -_) \Rightarrow True])) I O H3) in (False_ind (or4 (drop (S i) (S i) (CHead c -(Bind b) u1) (CHead c (Bind b) u2)) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Bind b) u2) (CHead -e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: -T).(\lambda (_: T).(drop (S i) (S i) (CHead c (Bind b) u1) (CHead e0 (Flat f) -u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: -T).(subst0 (S i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c (Bind b) u2) (CHead e2 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S i) (S i) (CHead c (Bind b) u1) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S -i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Bind b) u2) (CHead -e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (_: T).(drop (S i) (S i) (CHead c (Bind b) u1) -(CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (S i) v0 u3 u4)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 (S i) v0 e1 e2)))))))) H4)))))))))) (\lambda (f: F).(\lambda (i: -nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 -i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq nat i O)).(let H4 \def (eq_ind -nat i (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O H3) in (eq_ind_r nat O -(\lambda (n0: nat).(or4 (drop n0 n0 (CHead c (Flat f) u1) (CHead c (Flat f) -u2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e0 (Flat f0) u4)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop n0 -n0 (CHead c (Flat f) u1) (CHead e0 (Flat f0) u3)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 n0 v0 u3 -u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C (CHead c (Flat f) u2) (CHead e2 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 -(CHead c (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F -C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e2 (Flat f0) u4))))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda -(_: T).(drop n0 n0 (CHead c (Flat f) u1) (CHead e1 (Flat f0) u3))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda -(u4: T).(subst0 n0 v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2))))))))) -(or4_intro1 (drop O O (CHead c (Flat f) u1) (CHead c (Flat f) u2)) (ex3_4 F C -T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C -(CHead c (Flat f) u2) (CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda -(e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c (Flat f) u1) -(CHead e0 (Flat f0) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: -T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c (Flat f) -u2) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(drop O O (CHead c (Flat f) u1) (CHead e1 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Flat f) -u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c (Flat f) u1) -(CHead e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v0 e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e0 -(Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: -T).(\lambda (_: T).(drop O O (CHead c (Flat f) u1) (CHead e0 (Flat f0) -u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: -T).(subst0 O v0 u3 u4))))) f c u1 u2 (refl_equal C (CHead c (Flat f) u2)) -(drop_refl (CHead c (Flat f) u1)) H4)) i H3)))))))))) k)) (\lambda (k: -K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (c3: C).(\forall (c4: -C).(\forall (v0: T).((csubst0 i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop -i i c3 c4) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 -(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 e2)))))))))) \to -(\forall (u: T).((eq nat (s k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead -c3 k0 u) (CHead c4 k0 u)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 k0 u) (CHead e0 (Flat f) -u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u) (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (s -k0 i) v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u0: T).(eq C (CHead c4 k0 u) (CHead e2 (Flat f) u0)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(drop (s k0 -i) (s k0 i) (CHead c3 k0 u) (CHead e1 (Flat f) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 -e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 k0 u) (CHead e2 (Flat f) -u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 (s k0 i) v0 u1 u2)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (s k0 i) v0 -e1 e2))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (c3: -C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (_: (csubst0 i v0 c3 -c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v0 u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop i i c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v0 u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat -(S i) O)).(let H5 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (or4 -(drop (S i) (S i) (CHead c3 (Bind b) u) (CHead c4 (Bind b) u)) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead c4 (Bind b) u) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S i) (S i) (CHead c3 (Bind b) -u) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 (S i) v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Bind b) -u) (CHead e2 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(drop (S i) (S i) (CHead c3 (Bind b) u) (CHead e1 (Flat -f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (S i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 -(Bind b) u) (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S i) (S i) (CHead -c3 (Bind b) u) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (S i) v0 u1 -u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (S i) v0 e1 e2)))))))) H5))))))))))) (\lambda (f: -F).(\lambda (i: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: -T).(\lambda (H2: (csubst0 i v0 c3 c4)).(\lambda (H3: (((eq nat i O) \to (or4 -(drop i i c3 c4) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e0 -(Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i i -c3 (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 -e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat i O)).(let H5 \def -(eq_ind nat i (\lambda (n0: nat).((eq nat n0 O) \to (or4 (drop n0 n0 c3 c4) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C c4 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 c3 (CHead e0 (Flat f0) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 n0 v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(eq C c4 (CHead e2 (Flat f0) u0)))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(drop n0 -n0 c3 (CHead e1 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda -(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq -C c4 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 c3 (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 n0 v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 -e2)))))))))) H3 O H4) in (let H6 \def (eq_ind nat i (\lambda (n0: -nat).(csubst0 n0 v0 c3 c4)) H2 O H4) in (eq_ind_r nat O (\lambda (n0: -nat).(or4 (drop n0 n0 (CHead c3 (Flat f) u) (CHead c4 (Flat f) u)) (ex3_4 F C -T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead c4 (Flat f) u) (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 (CHead c3 (Flat f) u) -(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 n0 v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Flat f) -u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(drop n0 n0 (CHead c3 (Flat f) u) (CHead e1 (Flat f0) -u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 (Flat f) -u) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 (CHead c3 (Flat f) u) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 v0 u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -n0 v0 e1 e2))))))))) (or4_intro2 (drop O O (CHead c3 (Flat f) u) (CHead c4 -(Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead c4 (Flat f) u) (CHead e0 (Flat f0) u2)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O -(CHead c3 (Flat f) u) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C -C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C -(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) -(CHead e1 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 -(Flat f) u) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Flat f) -u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) (CHead e1 (Flat f0) -u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v0 e1 e2))))) f c3 c4 u (refl_equal C (CHead c4 (Flat f) u)) -(drop_refl (CHead c3 (Flat f) u)) H6)) i H4)))))))))))) k)) (\lambda (k: -K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (v0: T).(\forall (u1: -T).(\forall (u2: T).((subst0 i v0 u1 u2) \to (\forall (c3: C).(\forall (c4: -C).((csubst0 i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 -F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq -C c4 (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(u3: T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f) u3)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 (Flat f) u4))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda -(_: T).(drop i i c3 (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v0 e1 e2)))))))))) \to ((eq nat (s k0 i) O) \to (or4 (drop -(s k0 i) (s k0 i) (CHead c3 k0 u1) (CHead c4 k0 u2)) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 k0 -u2) (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u1) (CHead e0 -(Flat f) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda -(u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c4 k0 u2) -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u1) (CHead e1 (Flat -f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (s k0 i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 k0 -u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 -u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 (s k0 i) v0 e1 e2))))))))))))))))))) (\lambda (b: B).(\lambda (i: -nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 -i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubst0 i v0 c3 -c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 -(CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: -T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f) u3)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 (Flat f) u4))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda -(_: T).(drop i i c3 (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (H5: (eq nat (S i) O)).(let H6 -\def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False -| (S _) \Rightarrow True])) I O H5) in (False_ind (or4 (drop (S i) (S i) -(CHead c3 (Bind b) u1) (CHead c4 (Bind b) u2)) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Bind b) -u2) (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(u3: T).(\lambda (_: T).(drop (S i) (S i) (CHead c3 (Bind b) u1) (CHead e0 -(Flat f) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda -(u4: T).(subst0 (S i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c4 (Bind b) u2) (CHead -e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S i) (S i) (CHead c3 (Bind b) u1) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S -i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Bind b) u2) (CHead -e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (_: T).(drop (S i) (S i) (CHead c3 (Bind b) u1) -(CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (S i) v0 u3 u4)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 (S i) v0 e1 e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda -(i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: -(subst0 i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 -i v0 c3 c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 F -C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq -C c4 (CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(u3: T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f0) u3)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 -u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 -(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 -(Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (_: T).(drop i i c3 (CHead e1 (Flat f0) -u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: -T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 -e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 \def (eq_ind nat i (\lambda -(n0: nat).((eq nat n0 O) \to (or4 (drop n0 n0 c3 c4) (ex3_4 F C T T (\lambda -(f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e0 -(Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: -T).(\lambda (_: T).(drop n0 n0 c3 (CHead e0 (Flat f0) u3)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 n0 v0 u3 -u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 c3 (CHead e1 -(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 -(Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (_: T).(drop n0 n0 c3 (CHead e1 (Flat f0) -u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: -T).(\lambda (u4: T).(subst0 n0 v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 -e2)))))))))) H4 O H5) in (let H7 \def (eq_ind nat i (\lambda (n0: -nat).(csubst0 n0 v0 c3 c4)) H3 O H5) in (let H8 \def (eq_ind nat i (\lambda -(n0: nat).(subst0 n0 v0 u1 u2)) H2 O H5) in (eq_ind_r nat O (\lambda (n0: -nat).(or4 (drop n0 n0 (CHead c3 (Flat f) u1) (CHead c4 (Flat f) u2)) (ex3_4 F -C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq -C (CHead c4 (Flat f) u2) (CHead e0 (Flat f0) u4)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop n0 n0 (CHead c3 -(Flat f) u1) (CHead e0 (Flat f0) u3)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 n0 v0 u3 u4)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C -(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 (CHead c3 (Flat f) u1) -(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C -(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop n0 -n0 (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u3))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 -n0 v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro3 (drop O O -(CHead c3 (Flat f) u1) (CHead c4 (Flat f) u2)) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) -u2) (CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) (CHead e0 (Flat f0) -u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: -T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop O O (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 -(Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) (CHead -e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v0 e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) -u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) -(CHead e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v0 e1 e2)))))) f c3 c4 u1 u2 (refl_equal C (CHead c4 (Flat f) u2)) -(drop_refl (CHead c3 (Flat f) u1)) H8 H7)) i H5))))))))))))))) k)) y v c1 c2 -H1))) H) e (drop_gen_refl c2 e H0)))))))) (\lambda (n0: nat).(\lambda (IHn: -((\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 n0 v c1 c2) \to -(\forall (e: C).((drop n0 O c2 e) \to (or4 (drop n0 O c1 e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop n0 O c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c1 (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop n0 O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))))).(\lambda (c1: C).(C_ind -(\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to -(\forall (e: C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O c e) (ex3_4 F C -T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (n1: -nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: (csubst0 (S n0) v (CSort -n1) c2)).(\lambda (e: C).(\lambda (_: (drop (S n0) O c2 e)).(csubst0_gen_sort -c2 v (S n0) n1 H (or4 (drop (S n0) O (CSort n1) e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CSort n1) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead e1 (Flat -f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CSort n1) (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))))))) -(\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).((csubst0 (S -n0) v c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O -c e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda -(v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) c2)).(\lambda (e: -C).(\lambda (H1: (drop (S n0) O c2 e)).(let H2 \def (csubst0_gen_head k c c2 -t v (S n0) H0) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq -nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k -u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat -(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda -(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: -T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (drop (S -n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H3: (ex3_2 T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: -nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 -(CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or4 -(drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda -(x1: nat).(\lambda (H4: (eq nat (S n0) (s k x1))).(\lambda (H5: (eq C c2 -(CHead c k x0))).(\lambda (H6: (subst0 x1 v t x0)).(let H7 \def (eq_ind C c2 -(\lambda (c0: C).(drop (S n0) O c0 e)) H1 (CHead c k x0) H5) in (K_ind -(\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop (r k0 n0) O c e) \to -(or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) (\lambda (b: -B).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(\lambda (H9: (drop (r -(Bind b) n0) O c e)).(let H10 \def (f_equal nat nat (\lambda (e0: nat).(match -e0 with [O \Rightarrow n0 | (S n1) \Rightarrow n1])) (S n0) (S x1) H8) in -(let H11 \def (eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 n0 -H10) in (or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e -H9 t))))))) (\lambda (f: F).(\lambda (H8: (eq nat (S n0) (s (Flat f) -x1))).(\lambda (H9: (drop (r (Flat f) n0) O c e)).(let H10 \def (f_equal nat -nat (\lambda (e0: nat).e0) (S n0) (s (Flat f) x1) H8) in (let H11 \def -(eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S n0) H10) in -(or4_intro0 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda -(f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e -H9 t))))))) k H4 (drop_gen_drop k c e x0 n0 H7)))))))) H3)) (\lambda (H3: -(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) -(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3))) (or4 (drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat (S n0) (s k x1))).(\lambda -(H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 v c x0)).(let H7 -\def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H1 (CHead x0 k t) -H5) in (K_ind (\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop (r k0 -n0) O x0 e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k0 t) (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) -(\lambda (b: B).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(\lambda (H9: -(drop (r (Bind b) n0) O x0 e)).(let H10 \def (f_equal nat nat (\lambda (e0: -nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow n1])) (S n0) (S -x1) H8) in (let H11 \def (eq_ind_r nat x1 (\lambda (n1: nat).(csubst0 n1 v c -x0)) H6 n0 H10) in (let H12 \def (IHn c x0 v H11 e H9) in (or4_ind (drop n0 O -c e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead c -(Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (H13: (drop n0 O c e)).(or4_intro0 (drop (S n0) O (CHead -c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(drop_drop (Bind b) n0 c e H13 t))) (\lambda (H13: (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C -T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) -(or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda -(x4: T).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 (Flat x2) -x5))).(\lambda (H15: (drop n0 O c (CHead x3 (Flat x2) x4))).(\lambda (H16: -(subst0 O v x4 x5)).(let H17 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x0 -c0)) H9 (CHead x3 (Flat x2) x5) H14) in (eq_ind_r C (CHead x3 (Flat x2) x5) -(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O -(CHead c (Bind b) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat -x2) x5) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat -f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 -(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat -f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex3_4_intro F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) -x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Bind b) n0 c -(CHead x3 (Flat x2) x4) H15 t) H16)) e H14))))))))) H13)) (\lambda (H13: -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: -T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) -(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (H14: (eq -C e (CHead x4 (Flat x2) x5))).(\lambda (H15: (drop n0 O c (CHead x3 (Flat x2) -x5))).(\lambda (H16: (csubst0 O v x3 x4)).(let H17 \def (eq_ind C e (\lambda -(c0: C).(drop n0 O x0 c0)) H9 (CHead x4 (Flat x2) x5) H14) in (eq_ind_r C -(CHead x4 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind -b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Bind b) t) (CHead x4 (Flat -x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u2))))))) (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C -C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C -(CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) -(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead -x4 (Flat x2) x5)) (drop_drop (Bind b) n0 c (CHead x3 (Flat x2) x5) H15 t) -H16)) e H14))))))))) H13)) (\lambda (H13: (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind -F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 -O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda -(x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H14: (eq -C e (CHead x4 (Flat x2) x6))).(\lambda (H15: (drop n0 O c (CHead x3 (Flat x2) -x5))).(\lambda (H16: (subst0 O v x5 x6)).(\lambda (H17: (csubst0 O v x3 -x4)).(let H18 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x0 c0)) H9 (CHead -x4 (Flat x2) x6) H14) in (eq_ind_r C (CHead x4 (Flat x2) x6) (\lambda (c0: -C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Bind -b) t) (CHead x4 (Flat x2) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f) -u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 -(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat -f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) -x2 x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x2) x6)) (drop_drop (Bind b) n0 -c (CHead x3 (Flat x2) x5) H15 t) H16 H17)) e H14))))))))))) H13)) H12))))))) -(\lambda (f: F).(\lambda (H8: (eq nat (S n0) (s (Flat f) x1))).(\lambda (H9: -(drop (r (Flat f) n0) O x0 e)).(let H10 \def (f_equal nat nat (\lambda (e0: -nat).e0) (S n0) (s (Flat f) x1) H8) in (let H11 \def (eq_ind_r nat x1 -(\lambda (n1: nat).(csubst0 n1 v c x0)) H6 (S n0) H10) in (let H12 \def (H x0 -v H11 e H9) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(H13: (drop (S n0) O c e)).(or4_intro0 (drop (S n0) O (CHead c (Flat f) t) e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop -(Flat f) n0 c e H13 t))) (\lambda (H13: (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C -T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C -e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda -(x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 -(Flat x2) x5))).(\lambda (H15: (drop (S n0) O c (CHead x3 (Flat x2) -x4))).(\lambda (H16: (subst0 O v x4 x5)).(let H17 \def (eq_ind C e (\lambda -(c0: C).(drop (S n0) O x0 c0)) H9 (CHead x3 (Flat x2) x5) H14) in (eq_ind_r C -(CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat -f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 -(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat -f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Flat f) t) (CHead x3 (Flat -x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f0) -u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f0) -u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f0) -u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Flat -f) n0 c (CHead x3 (Flat x2) x4) H15 t) H16)) e H14))))))))) H13)) (\lambda -(H13: (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) -O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda -(x5: T).(\lambda (H14: (eq C e (CHead x4 (Flat x2) x5))).(\lambda (H15: (drop -(S n0) O c (CHead x3 (Flat x2) x5))).(\lambda (H16: (csubst0 O v x3 x4)).(let -H17 \def (eq_ind C e (\lambda (c0: C).(drop (S n0) O x0 c0)) H9 (CHead x4 -(Flat x2) x5) H14) in (eq_ind_r C (CHead x4 (Flat x2) x5) (\lambda (c0: -C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat -f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Flat -f) t) (CHead x4 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e0 -(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 -(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x4 (Flat x2) x5)) (drop_drop -(Flat f) n0 c (CHead x3 (Flat x2) x5) H15 t) H16)) e H14))))))))) H13)) -(\lambda (H13: (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) -u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C -C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: -T).(\lambda (H14: (eq C e (CHead x4 (Flat x2) x6))).(\lambda (H15: (drop (S -n0) O c (CHead x3 (Flat x2) x5))).(\lambda (H16: (subst0 O v x5 x6)).(\lambda -(H17: (csubst0 O v x3 x4)).(let H18 \def (eq_ind C e (\lambda (c0: C).(drop -(S n0) O x0 c0)) H9 (CHead x4 (Flat x2) x6) H14) in (eq_ind_r C (CHead x4 -(Flat x2) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) -(or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x4 (Flat x2) x6)) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e0 (Flat f0) u2)))))) (\lambda -(f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O -(CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C -T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C -(CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) u2))))))) (\lambda -(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x2 x3 x4 x5 x6 -(refl_equal C (CHead x4 (Flat x2) x6)) (drop_drop (Flat f) n0 c (CHead x3 -(Flat x2) x5) H15 t) H16 H17)) e H14))))))))))) H13)) H12))))))) k H4 -(drop_gen_drop k x0 e t n0 H7)))))))) H3)) (\lambda (H3: (ex4_3 T C nat -(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) -(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k -u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda -(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: -C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (drop (S n0) O (CHead c k t) -e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c k t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k -t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: -nat).(\lambda (H4: (eq nat (S n0) (s k x2))).(\lambda (H5: (eq C c2 (CHead x1 -k x0))).(\lambda (H6: (subst0 x2 v t x0)).(\lambda (H7: (csubst0 x2 v c -x1)).(let H8 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H1 -(CHead x1 k x0) H5) in (K_ind (\lambda (k0: K).((eq nat (S n0) (s k0 x2)) \to -((drop (r k0 n0) O x1 e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C -T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq -C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead -e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))))) (\lambda (b: B).(\lambda (H9: (eq nat (S n0) (s (Bind b) -x2))).(\lambda (H10: (drop (r (Bind b) n0) O x1 e)).(let H11 \def (f_equal -nat nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) -\Rightarrow n1])) (S n0) (S x2) H9) in (let H12 \def (eq_ind_r nat x2 -(\lambda (n1: nat).(csubst0 n1 v c x1)) H7 n0 H11) in (let H13 \def (eq_ind_r -nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 n0 H11) in (let H14 \def -(IHn c x1 v H12 e H10) in (or4_ind (drop n0 O c e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 -O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H15: (drop n0 O c -e)).(or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e -H15 t))) (\lambda (H15: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O -c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) -O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead -e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) -(CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda -(x6: T).(\lambda (H16: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H17: (drop -n0 O c (CHead x4 (Flat x3) x5))).(\lambda (H18: (subst0 O v x5 x6)).(let H19 -\def (eq_ind C e (\lambda (c0: C).(drop n0 O x1 c0)) H10 (CHead x4 (Flat x3) -x6) H16) in (eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop -(S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead -e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) -(CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind b) t) (CHead x4 -(Flat x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u2))))))) (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C -T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) -(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead -x4 (Flat x3) x6)) (drop_drop (Bind b) n0 c (CHead x4 (Flat x3) x5) H17 t) -H18)) e H16))))))))) H15)) (\lambda (H15: (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C -C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) -(or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda -(x5: C).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) -x6))).(\lambda (H17: (drop n0 O c (CHead x4 (Flat x3) x6))).(\lambda (H18: -(csubst0 O v x4 x5)).(let H19 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x1 -c0)) H10 (CHead x5 (Flat x3) x6) H16) in (eq_ind_r C (CHead x5 (Flat x3) x6) -(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O -(CHead c (Bind b) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat -x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat -f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 -(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat -f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex3_4_intro F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x3 x4 x5 x6 -(refl_equal C (CHead x5 (Flat x3) x6)) (drop_drop (Bind b) n0 c (CHead x4 -(Flat x3) x6) H17 t) H18)) e H16))))))))) H15)) (\lambda (H15: (ex4_5 F C C T -T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 -(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: -T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) -(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: -T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) x7))).(\lambda (H17: (drop n0 O -c (CHead x4 (Flat x3) x6))).(\lambda (H18: (subst0 O v x6 x7)).(\lambda (H19: -(csubst0 O v x4 x5)).(let H20 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x1 -c0)) H10 (CHead x5 (Flat x3) x7) H16) in (eq_ind_r C (CHead x5 (Flat x3) x7) -(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O -(CHead c (Bind b) t) (CHead x5 (Flat x3) x7)) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat -x3) x7) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat -f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 -(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat -f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 -(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat -f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) -x3 x4 x5 x6 x7 (refl_equal C (CHead x5 (Flat x3) x7)) (drop_drop (Bind b) n0 -c (CHead x4 (Flat x3) x6) H17 t) H18 H19)) e H16))))))))))) H15)) H14)))))))) -(\lambda (f: F).(\lambda (H9: (eq nat (S n0) (s (Flat f) x2))).(\lambda (H10: -(drop (r (Flat f) n0) O x1 e)).(let H11 \def (f_equal nat nat (\lambda (e0: -nat).e0) (S n0) (s (Flat f) x2) H9) in (let H12 \def (eq_ind_r nat x2 -(\lambda (n1: nat).(csubst0 n1 v c x1)) H7 (S n0) H11) in (let H13 \def -(eq_ind_r nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S n0) H11) in -(let H14 \def (H x1 v H12 e H10) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T -T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S -n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (H15: (drop (S n0) O c e)).(or4_intro0 (drop (S -n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (drop_drop (Flat f) n0 c e H15 t))) (\lambda (H15: (ex3_4 F -C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq -C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead -e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Flat -f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: -T).(\lambda (H16: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H17: (drop (S -n0) O c (CHead x4 (Flat x3) x5))).(\lambda (H18: (subst0 O v x5 x6)).(let H19 -\def (eq_ind C e (\lambda (c0: C).(drop (S n0) O x1 c0)) H10 (CHead x4 (Flat -x3) x6) H16) in (eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 -(drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat -f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Flat -f) t) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 -(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 -(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 -(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) -(drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x5) H17 t) H18)) e H16))))))))) -H15)) (\lambda (H15: (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) -O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda -(x6: T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) x6))).(\lambda (H17: (drop -(S n0) O c (CHead x4 (Flat x3) x6))).(\lambda (H18: (csubst0 O v x4 x5)).(let -H19 \def (eq_ind C e (\lambda (c0: C).(drop (S n0) O x1 c0)) H10 (CHead x5 -(Flat x3) x6) H16) in (eq_ind_r C (CHead x5 (Flat x3) x6) (\lambda (c0: -C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat -f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Flat -f) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e0 -(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) -u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 -(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 -(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x5 (Flat x3) x6)) (drop_drop -(Flat f) n0 c (CHead x4 (Flat x3) x6) H17 t) H18)) e H16))))))))) H15)) -(\lambda (H15: (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) -u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C -C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: -T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) x7))).(\lambda (H17: (drop (S -n0) O c (CHead x4 (Flat x3) x6))).(\lambda (H18: (subst0 O v x6 x7)).(\lambda -(H19: (csubst0 O v x4 x5)).(let H20 \def (eq_ind C e (\lambda (c0: C).(drop -(S n0) O x1 c0)) H10 (CHead x5 (Flat x3) x7) H16) in (eq_ind_r C (CHead x5 -(Flat x3) x7) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 -e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) -(or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x5 (Flat x3) x7)) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e0 (Flat f0) u2)))))) (\lambda -(f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O -(CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C -T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C -(CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u2))))))) (\lambda -(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x3 x4 x5 x6 x7 -(refl_equal C (CHead x5 (Flat x3) x7)) (drop_drop (Flat f) n0 c (CHead x4 -(Flat x3) x6) H17 t) H18 H19)) e H16))))))))))) H15)) H14)))))))) k H4 -(drop_gen_drop k x1 e x0 n0 H8)))))))))) H3)) H2))))))))))) c1)))) n). - -lemma csubst0_drop_lt_back: - \forall (n: nat).(\forall (i: nat).((lt n i) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e2: C).((drop n O -c2 e2) \to (or (drop n O c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) -v e1 e2)) (\lambda (e1: C).(drop n O c1 e1)))))))))))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt n0 i) -\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) -\to (\forall (e2: C).((drop n0 O c2 e2) \to (or (drop n0 O c1 e2) (ex2 C -(\lambda (e1: C).(csubst0 (minus i n0) v e1 e2)) (\lambda (e1: C).(drop n0 O -c1 e1))))))))))))) (\lambda (i: nat).(\lambda (_: (lt O i)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 -c2)).(\lambda (e2: C).(\lambda (H1: (drop O O c2 e2)).(eq_ind C c2 (\lambda -(c: C).(or (drop O O c1 c) (ex2 C (\lambda (e1: C).(csubst0 (minus i O) v e1 -c)) (\lambda (e1: C).(drop O O c1 e1))))) (eq_ind nat i (\lambda (n0: -nat).(or (drop O O c1 c2) (ex2 C (\lambda (e1: C).(csubst0 n0 v e1 c2)) -(\lambda (e1: C).(drop O O c1 e1))))) (or_intror (drop O O c1 c2) (ex2 C -(\lambda (e1: C).(csubst0 i v e1 c2)) (\lambda (e1: C).(drop O O c1 e1))) -(ex_intro2 C (\lambda (e1: C).(csubst0 i v e1 c2)) (\lambda (e1: C).(drop O O -c1 e1)) c1 H0 (drop_refl c1))) (minus i O) (minus_n_O i)) e2 (drop_gen_refl -c2 e2 H1)))))))))) (\lambda (n0: nat).(\lambda (IHn: ((\forall (i: nat).((lt -n0 i) \to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 -c2) \to (\forall (e2: C).((drop n0 O c2 e2) \to (or (drop n0 O c1 e2) (ex2 C -(\lambda (e1: C).(csubst0 (minus i n0) v e1 e2)) (\lambda (e1: C).(drop n0 O -c1 e1)))))))))))))).(\lambda (i: nat).(\lambda (H: (lt (S n0) i)).(\lambda -(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v -c c2) \to (\forall (e2: C).((drop (S n0) O c2 e2) \to (or (drop (S n0) O c -e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: -C).(drop (S n0) O c e1)))))))))) (\lambda (n1: nat).(\lambda (c2: C).(\lambda -(v: T).(\lambda (H0: (csubst0 i v (CSort n1) c2)).(\lambda (e2: C).(\lambda -(_: (drop (S n0) O c2 e2)).(csubst0_gen_sort c2 v i n1 H0 (or (drop (S n0) O -(CSort n1) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) -(\lambda (e1: C).(drop (S n0) O (CSort n1) e1))))))))))) (\lambda (c: -C).(\lambda (H0: ((\forall (c2: C).(\forall (v: T).((csubst0 i v c c2) \to -(\forall (e2: C).((drop (S n0) O c2 e2) \to (or (drop (S n0) O c e2) (ex2 C -(\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O c e1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: -C).(\lambda (v: T).(\lambda (H1: (csubst0 i v (CHead c k t) c2)).(\lambda -(e2: C).(\lambda (H2: (drop (S n0) O c2 e2)).(let H3 \def (csubst0_gen_head k -c c2 t v i H1) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq -nat i (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k -u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat -(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3))))) (or (drop (S n0) O (CHead c k t) -e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: -C).(drop (S n0) O (CHead c k t) e1)))) (\lambda (H4: (ex3_2 T nat (\lambda -(_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda -(u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or (drop (S n0) O (CHead c k -t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda -(e1: C).(drop (S n0) O (CHead c k t) e1)))) (\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead c k -x0))).(\lambda (_: (subst0 x1 v t x0)).(let H8 \def (eq_ind C c2 (\lambda -(c0: C).(drop (S n0) O c0 e2)) H2 (CHead c k x0) H6) in (let H9 \def (eq_ind -nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c -c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) -(ex2 C (\lambda (e1: C).(csubst0 (minus n1 (S n0)) v0 e1 e3)) (\lambda (e1: -C).(drop (S n0) O c e1)))))))))) H0 (s k x1) H5) in (let H10 \def (eq_ind nat -i (\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in (eq_ind_r nat (s k x1) -(\lambda (n1: nat).(or (drop (S n0) O (CHead c k t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus n1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O -(CHead c k t) e1))))) (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall -(v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 -e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s -k0 x1) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop (S n0) O c e1)))))))))) \to -((lt (S n0) (s k0 x1)) \to ((drop (r k0 n0) O c e2) \to (or (drop (S n0) O -(CHead c k0 t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s k0 x1) (S n0)) -v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c k0 t) e1)))))))) (\lambda -(b: B).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) -x1) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) -O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x1) (S n0)) v0 e1 -e3)) (\lambda (e1: C).(drop (S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) -(s (Bind b) x1))).(\lambda (H13: (drop (r (Bind b) n0) O c e2)).(or_introl -(drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 -(minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O -(CHead c (Bind b) t) e1))) (drop_drop (Bind b) n0 c e2 H13 t)))))) (\lambda -(f: F).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) -x1) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) -O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x1) (S n0)) v0 e1 -e3)) (\lambda (e1: C).(drop (S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) -(s (Flat f) x1))).(\lambda (H13: (drop (r (Flat f) n0) O c e2)).(or_introl -(drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 -(minus (s (Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O -(CHead c (Flat f) t) e1))) (drop_drop (Flat f) n0 c e2 H13 t)))))) k H9 H10 -(drop_gen_drop k c e2 x0 n0 H8)) i H5))))))))) H4)) (\lambda (H4: (ex3_2 C -nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead -c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or (drop -(S n0) O (CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) -v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c k t) e1)))) (\lambda (x0: -C).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C -c2 (CHead x0 k t))).(\lambda (H7: (csubst0 x1 v c x0)).(let H8 \def (eq_ind C -c2 (\lambda (c0: C).(drop (S n0) O c0 e2)) H2 (CHead x0 k t) H6) in (let H9 -\def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: -T).((csubst0 n1 v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or -(drop (S n0) O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus n1 (S n0)) v0 e1 -e3)) (\lambda (e1: C).(drop (S n0) O c e1)))))))))) H0 (s k x1) H5) in (let -H10 \def (eq_ind nat i (\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in -(eq_ind_r nat (s k x1) (\lambda (n1: nat).(or (drop (S n0) O (CHead c k t) -e2) (ex2 C (\lambda (e1: C).(csubst0 (minus n1 (S n0)) v e1 e2)) (\lambda -(e1: C).(drop (S n0) O (CHead c k t) e1))))) (K_ind (\lambda (k0: -K).(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to -(\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C -(\lambda (e1: C).(csubst0 (minus (s k0 x1) (S n0)) v0 e1 e3)) (\lambda (e1: -C).(drop (S n0) O c e1)))))))))) \to ((lt (S n0) (s k0 x1)) \to ((drop (r k0 -n0) O x0 e2) \to (or (drop (S n0) O (CHead c k0 t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s k0 x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) -O (CHead c k0 t) e1)))))))) (\lambda (b: B).(\lambda (_: ((\forall (c3: -C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e3: -C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Bind b) x1) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop -(S n0) O c e1))))))))))).(\lambda (H12: (lt (S n0) (s (Bind b) x1))).(\lambda -(H13: (drop (r (Bind b) n0) O x0 e2)).(let H_x \def (IHn x1 (lt_S_n n0 x1 -H12) c x0 v H7 e2 H13) in (let H14 \def H_x in (or_ind (drop n0 O c e2) (ex2 -C (\lambda (e1: C).(csubst0 (minus x1 n0) v e1 e2)) (\lambda (e1: C).(drop n0 -O c e1))) (or (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O (CHead c (Bind b) t) e1)))) (\lambda (H15: (drop n0 O c -e2)).(or_introl (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O (CHead c (Bind b) t) e1))) (drop_drop (Bind b) n0 c e2 H15 t))) -(\lambda (H15: (ex2 C (\lambda (e1: C).(csubst0 (minus x1 n0) v e1 e2)) -(\lambda (e1: C).(drop n0 O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 -(minus x1 n0) v e1 e2)) (\lambda (e1: C).(drop n0 O c e1)) (or (drop (S n0) O -(CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) -x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) -e1)))) (\lambda (x: C).(\lambda (H16: (csubst0 (minus x1 n0) v x -e2)).(\lambda (H17: (drop n0 O c x)).(or_intror (drop (S n0) O (CHead c (Bind -b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x1) (S n0)) v -e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) e1))) (ex_intro2 -C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda -(e1: C).(drop (S n0) O (CHead c (Bind b) t) e1)) x H16 (drop_drop (Bind b) n0 -c x H17 t)))))) H15)) H14))))))) (\lambda (f: F).(\lambda (H11: ((\forall -(c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e3: -C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Flat f) x1) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop -(S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) x1))).(\lambda -(H13: (drop (r (Flat f) n0) O x0 e2)).(let H_x \def (H11 x0 v H7 e2 H13) in -(let H14 \def H_x in (or_ind (drop (S n0) O c e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus x1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c -e1))) (or (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O (CHead c (Flat f) t) e1)))) (\lambda (H15: (drop (S n0) O c -e2)).(or_introl (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O (CHead c (Flat f) t) e1))) (drop_drop (Flat f) n0 c e2 H15 t))) -(\lambda (H15: (ex2 C (\lambda (e1: C).(csubst0 (minus x1 (S n0)) v e1 e2)) -(\lambda (e1: C).(drop (S n0) O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 -(minus x1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c e1)) (or (drop -(S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s -(Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat -f) t) e1)))) (\lambda (x: C).(\lambda (H16: (csubst0 (minus x1 (S n0)) v x -e2)).(\lambda (H17: (drop (S n0) O c x)).(or_intror (drop (S n0) O (CHead c -(Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x1) (S -n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1))) -(ex_intro2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x1) (S n0)) v e1 -e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1)) x H16 -(drop_drop (Flat f) n0 c x H17 t)))))) H15)) H14))))))) k H9 H10 -(drop_gen_drop k x0 e2 t n0 H8)) i H5))))))))) H4)) (\lambda (H4: (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) -(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k -u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))) (or (drop (S n0) O (CHead c k t) e2) (ex2 C -(\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O (CHead c k t) e1)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: -nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: (eq C c2 (CHead x1 k -x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: (csubst0 x2 v c -x1)).(let H9 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e2)) H2 -(CHead x1 k x0) H6) in (let H10 \def (eq_ind nat i (\lambda (n1: -nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall -(e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda -(e1: C).(csubst0 (minus n1 (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop (S n0) O -c e1)))))))))) H0 (s k x2) H5) in (let H11 \def (eq_ind nat i (\lambda (n1: -nat).(lt (S n0) n1)) H (s k x2) H5) in (eq_ind_r nat (s k x2) (\lambda (n1: -nat).(or (drop (S n0) O (CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 -(minus n1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c k t) -e1))))) (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 -(s k0 x2) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop -(S n0) O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s k0 x2) (S n0)) v0 -e1 e3)) (\lambda (e1: C).(drop (S n0) O c e1)))))))))) \to ((lt (S n0) (s k0 -x2)) \to ((drop (r k0 n0) O x1 e2) \to (or (drop (S n0) O (CHead c k0 t) e2) -(ex2 C (\lambda (e1: C).(csubst0 (minus (s k0 x2) (S n0)) v e1 e2)) (\lambda -(e1: C).(drop (S n0) O (CHead c k0 t) e1)))))))) (\lambda (b: B).(\lambda (_: -((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x2) v0 c c3) \to -(\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C -(\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v0 e1 e3)) (\lambda -(e1: C).(drop (S n0) O c e1))))))))))).(\lambda (H13: (lt (S n0) (s (Bind b) -x2))).(\lambda (H14: (drop (r (Bind b) n0) O x1 e2)).(let H_x \def (IHn x2 -(lt_S_n n0 x2 H13) c x1 v H8 e2 H14) in (let H15 \def H_x in (or_ind (drop n0 -O c e2) (ex2 C (\lambda (e1: C).(csubst0 (minus x2 n0) v e1 e2)) (\lambda -(e1: C).(drop n0 O c e1))) (or (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C -(\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v e1 e2)) (\lambda -(e1: C).(drop (S n0) O (CHead c (Bind b) t) e1)))) (\lambda (H16: (drop n0 O -c e2)).(or_introl (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda -(e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v e1 e2)) (\lambda (e1: -C).(drop (S n0) O (CHead c (Bind b) t) e1))) (drop_drop (Bind b) n0 c e2 H16 -t))) (\lambda (H16: (ex2 C (\lambda (e1: C).(csubst0 (minus x2 n0) v e1 e2)) -(\lambda (e1: C).(drop n0 O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 -(minus x2 n0) v e1 e2)) (\lambda (e1: C).(drop n0 O c e1)) (or (drop (S n0) O -(CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) -x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) -e1)))) (\lambda (x: C).(\lambda (H17: (csubst0 (minus x2 n0) v x -e2)).(\lambda (H18: (drop n0 O c x)).(or_intror (drop (S n0) O (CHead c (Bind -b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v -e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) e1))) (ex_intro2 -C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v e1 e2)) (\lambda -(e1: C).(drop (S n0) O (CHead c (Bind b) t) e1)) x H17 (drop_drop (Bind b) n0 -c x H18 t)))))) H16)) H15))))))) (\lambda (f: F).(\lambda (H12: ((\forall -(c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x2) v0 c c3) \to (\forall (e3: -C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Flat f) x2) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop -(S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) x2))).(\lambda -(H14: (drop (r (Flat f) n0) O x1 e2)).(let H_x \def (H12 x1 v H8 e2 H14) in -(let H15 \def H_x in (or_ind (drop (S n0) O c e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus x2 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c -e1))) (or (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Flat f) x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O (CHead c (Flat f) t) e1)))) (\lambda (H16: (drop (S n0) O c -e2)).(or_introl (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus (s (Flat f) x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop -(S n0) O (CHead c (Flat f) t) e1))) (drop_drop (Flat f) n0 c e2 H16 t))) -(\lambda (H16: (ex2 C (\lambda (e1: C).(csubst0 (minus x2 (S n0)) v e1 e2)) -(\lambda (e1: C).(drop (S n0) O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 -(minus x2 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c e1)) (or (drop -(S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s -(Flat f) x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat -f) t) e1)))) (\lambda (x: C).(\lambda (H17: (csubst0 (minus x2 (S n0)) v x -e2)).(\lambda (H18: (drop (S n0) O c x)).(or_intror (drop (S n0) O (CHead c -(Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x2) (S -n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1))) -(ex_intro2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x2) (S n0)) v e1 -e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1)) x H17 -(drop_drop (Flat f) n0 c x H18 t)))))) H16)) H15))))))) k H10 H11 -(drop_gen_drop k x1 e2 x0 n0 H9)) i H5))))))))))) H4)) H3))))))))))) c1)))))) -n). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst0/fwd.ma deleted file mode 100644 index a267513d1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/fwd.ma +++ /dev/null @@ -1,473 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst0/defs.ma". - -include "basic_1/C/fwd.ma". - -implied rec lemma csubst0_ind (P: (nat \to (T \to (C \to (C \to Prop))))) (f: -(\forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall -(u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(P (s k i) v (CHead c k u1) -(CHead c k u2)))))))))) (f0: (\forall (k: K).(\forall (i: nat).(\forall (c1: -C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to ((P i v c1 c2) -\to (\forall (u: T).(P (s k i) v (CHead c1 k u) (CHead c2 k u))))))))))) (f1: -(\forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall -(u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst0 i -v c1 c2) \to ((P i v c1 c2) \to (P (s k i) v (CHead c1 k u1) (CHead c2 k -u2))))))))))))) (n: nat) (t: T) (c: C) (c0: C) (c1: csubst0 n t c c0) on c1: -P n t c c0 \def match c1 with [(csubst0_snd k i v u1 u2 s0 c2) \Rightarrow (f -k i v u1 u2 s0 c2) | (csubst0_fst k i c2 c3 v c4 u) \Rightarrow (f0 k i c2 c3 -v c4 ((csubst0_ind P f f0 f1) i v c2 c3 c4) u) | (csubst0_both k i v u1 u2 s0 -c2 c3 c4) \Rightarrow (f1 k i v u1 u2 s0 c2 c3 c4 ((csubst0_ind P f f0 f1) i -v c2 c3 c4))]. - -lemma csubst0_gen_sort: - \forall (x: C).(\forall (v: T).(\forall (i: nat).(\forall (n: nat).((csubst0 -i v (CSort n) x) \to (\forall (P: Prop).P))))) -\def - \lambda (x: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (csubst0 i v (CSort n) x)).(\lambda (P: Prop).(insert_eq C (CSort n) -(\lambda (c: C).(csubst0 i v c x)) (\lambda (_: C).P) (\lambda (y: -C).(\lambda (H0: (csubst0 i v y x)).(csubst0_ind (\lambda (_: nat).(\lambda -(_: T).(\lambda (c: C).(\lambda (_: C).((eq C c (CSort n)) \to P))))) -(\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda -(u2: T).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (c: C).(\lambda (H2: (eq -C (CHead c k u1) (CSort n))).(let H3 \def (eq_ind C (CHead c k u1) (\lambda -(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) -\Rightarrow True])) I (CSort n) H2) in (False_ind P H3)))))))))) (\lambda (k: -K).(\lambda (i0: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (v0: -T).(\lambda (_: (csubst0 i0 v0 c1 c2)).(\lambda (_: (((eq C c1 (CSort n)) \to -P))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CSort n))).(let H4 -\def (eq_ind C (CHead c1 k u) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in -(False_ind P H4))))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i0 v0 u1 -u2)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csubst0 i0 v0 c1 -c2)).(\lambda (_: (((eq C c1 (CSort n)) \to P))).(\lambda (H4: (eq C (CHead -c1 k u1) (CSort n))).(let H5 \def (eq_ind C (CHead c1 k u1) (\lambda (ee: -C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow -True])) I (CSort n) H4) in (False_ind P H5))))))))))))) i v y x H0))) H)))))). - -lemma csubst0_gen_head: - \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).(\forall -(v: T).(\forall (i: nat).((csubst0 i v (CHead c1 k u1) x) \to (or3 (ex3_2 T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat i (s k j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C x (CHead c2 k -u1)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c1 c2)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) -(\lambda (u2: T).(\lambda (c2: C).(\lambda (_: nat).(eq C x (CHead c2 k -u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 -u2)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c1 -c2)))))))))))) -\def - \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda -(v: T).(\lambda (i: nat).(\lambda (H: (csubst0 i v (CHead c1 k u1) -x)).(insert_eq C (CHead c1 k u1) (\lambda (c: C).(csubst0 i v c x)) (\lambda -(_: C).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda -(u2: T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c2: C).(\lambda (_: -nat).(eq C x (CHead c2 k u1)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j -v c1 c2)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c2: C).(\lambda (_: -nat).(eq C x (CHead c2 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v u1 u2)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: -nat).(csubst0 j v c1 c2))))))) (\lambda (y: C).(\lambda (H0: (csubst0 i v y -x)).(csubst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (c: C).(\lambda -(c0: C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat n (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c0 (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -t u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat n (s k -j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 k u1)))) (\lambda -(c2: C).(\lambda (j: nat).(csubst0 j t c1 c2)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat n (s k j))))) (\lambda (u2: -T).(\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j t u1 u2)))) (\lambda (_: -T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j t c1 c2))))))))))) (\lambda -(k0: K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (H1: (subst0 i0 v0 u0 u2)).(\lambda (c: C).(\lambda (H2: (eq C -(CHead c k0 u0) (CHead c1 k u1))).(let H3 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow c | (CHead c0 _ _) \Rightarrow c0])) -(CHead c k0 u0) (CHead c1 k u1) H2) in ((let H4 \def (f_equal C K (\lambda -(e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow -k1])) (CHead c k0 u0) (CHead c1 k u1) H2) in ((let H5 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) -\Rightarrow t])) (CHead c k0 u0) (CHead c1 k u1) H2) in (\lambda (H6: (eq K -k0 k)).(\lambda (H7: (eq C c c1)).(eq_ind_r C c1 (\lambda (c0: C).(or3 (ex3_2 -T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda -(u3: T).(\lambda (_: nat).(eq C (CHead c0 k0 u2) (CHead c1 k u3)))) (\lambda -(u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda (c2: C).(\lambda -(_: nat).(eq C (CHead c0 k0 u2) (CHead c2 k u1)))) (\lambda (c2: C).(\lambda -(j: nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j))))) (\lambda (u3: T).(\lambda -(c2: C).(\lambda (_: nat).(eq C (CHead c0 k0 u2) (CHead c2 k u3))))) (\lambda -(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: -T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 c2))))))) (let H8 \def -(eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H5) in (eq_ind_r K k -(\lambda (k1: K).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat -(s k1 i0) (s k j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c1 k1 -u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j v0 u1 -u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (s k -j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C (CHead c1 k1 u2) (CHead c2 k -u1)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (s k -j))))) (\lambda (u3: T).(\lambda (c2: C).(\lambda (_: nat).(eq C (CHead c1 k1 -u2) (CHead c2 k u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: -nat).(subst0 j v0 u1 u3)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: -nat).(csubst0 j v0 c1 c2))))))) (or3_intro0 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u3: T).(\lambda -(_: nat).(eq C (CHead c1 k u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda -(j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat (s k i0) (s k j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C -(CHead c1 k u2) (CHead c2 k u1)))) (\lambda (c2: C).(\lambda (j: -nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: T).(\lambda -(c2: C).(\lambda (_: nat).(eq C (CHead c1 k u2) (CHead c2 k u3))))) (\lambda -(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: -T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 c2))))) (ex3_2_intro T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda -(u3: T).(\lambda (_: nat).(eq C (CHead c1 k u2) (CHead c1 k u3)))) (\lambda -(u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3))) u2 i0 (refl_equal nat (s k -i0)) (refl_equal C (CHead c1 k u2)) H8)) k0 H6)) c H7)))) H4)) H3)))))))))) -(\lambda (k0: K).(\lambda (i0: nat).(\lambda (c0: C).(\lambda (c2: -C).(\lambda (v0: T).(\lambda (H1: (csubst0 i0 v0 c0 c2)).(\lambda (H2: (((eq -C c0 (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: -nat).(eq nat i0 (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead -c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (ex3_2 -C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda -(j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))))).(\lambda (u: T).(\lambda -(H3: (eq C (CHead c0 k0 u) (CHead c1 k u1))).(let H4 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) -\Rightarrow c])) (CHead c0 k0 u) (CHead c1 k u1) H3) in ((let H5 \def -(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead -_ k1 _) \Rightarrow k1])) (CHead c0 k0 u) (CHead c1 k u1) H3) in ((let H6 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u) (CHead c1 k u1) H3) in -(\lambda (H7: (eq K k0 k)).(\lambda (H8: (eq C c0 c1)).(eq_ind_r T u1 -(\lambda (t: T).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat -(s k0 i0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 k0 t) -(CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) -(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) -(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k0 t) (CHead c3 k u1)))) -(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat -(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k -j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k0 -t) (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: -nat).(subst0 j v0 u1 u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v0 c1 c3))))))) (let H9 \def (eq_ind C c0 (\lambda (c: -C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda -(j: nat).(eq nat i0 (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 -(CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) -(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda -(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))))))) H2 c1 H8) -in (let H10 \def (eq_ind C c0 (\lambda (c: C).(csubst0 i0 v0 c c2)) H1 c1 H8) -in (eq_ind_r K k (\lambda (k1: K).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda -(j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq -C (CHead c2 k1 u1) (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat (s k1 i0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C -(CHead c2 k1 u1) (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda (u2: T).(\lambda -(c3: C).(\lambda (_: nat).(eq C (CHead c2 k1 u1) (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))) (or3_intro1 -(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) -(\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c1 k u2)))) -(\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat -(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 k u1)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda -(u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 k -u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 -c3))))) (ex3_2_intro C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) -(s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 -k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))) c2 i0 -(refl_equal nat (s k i0)) (refl_equal C (CHead c2 k u1)) H10)) k0 H7))) u -H6)))) H5)) H4))))))))))) (\lambda (k0: K).(\lambda (i0: nat).(\lambda (v0: -T).(\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (subst0 i0 v0 u0 -u2)).(\lambda (c0: C).(\lambda (c2: C).(\lambda (H2: (csubst0 i0 v0 c0 -c2)).(\lambda (H3: (((eq C c0 (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda -(_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (u3: T).(\lambda (_: -nat).(eq C c2 (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j -v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u3: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u3))))) (\lambda -(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))))).(\lambda -(H4: (eq C (CHead c0 k0 u0) (CHead c1 k u1))).(let H5 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) -\Rightarrow c])) (CHead c0 k0 u0) (CHead c1 k u1) H4) in ((let H6 \def -(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead -_ k1 _) \Rightarrow k1])) (CHead c0 k0 u0) (CHead c1 k u1) H4) in ((let H7 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | -(CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c1 k u1) H4) in -(\lambda (H8: (eq K k0 k)).(\lambda (H9: (eq C c0 c1)).(let H10 \def (eq_ind -C c0 (\lambda (c: C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda -(_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (u3: T).(\lambda (_: -nat).(eq C c2 (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j -v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u3: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u3))))) (\lambda -(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))))))) H3 c1 H9) -in (let H11 \def (eq_ind C c0 (\lambda (c: C).(csubst0 i0 v0 c c2)) H2 c1 H9) -in (let H12 \def (eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H7) -in (eq_ind_r K k (\lambda (k1: K).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda -(j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u3: T).(\lambda (_: nat).(eq -C (CHead c2 k1 u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat (s k1 i0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C -(CHead c2 k1 u2) (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda (u3: T).(\lambda -(c3: C).(\lambda (_: nat).(eq C (CHead c2 k1 u2) (CHead c3 k u3))))) (\lambda -(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))) (or3_intro2 -(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) -(\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c1 k u3)))) -(\lambda (u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat -(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c3 k u1)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda -(u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c3 k -u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 -u3)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 -c3))))) (ex4_3_intro T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda -(_: nat).(eq C (CHead c2 k u2) (CHead c3 k u3))))) (\lambda (u3: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) u2 c2 i0 (refl_equal nat (s k -i0)) (refl_equal C (CHead c2 k u2)) H12 H11)) k0 H8))))))) H6)) -H5))))))))))))) i v y x H0))) H))))))). - -lemma csubst0_gen_S_bind_2: - \forall (b: B).(\forall (x: C).(\forall (c2: C).(\forall (v: T).(\forall -(v2: T).(\forall (i: nat).((csubst0 (S i) v x (CHead c2 (Bind b) v2)) \to -(or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C x -(CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) -(\lambda (c1: C).(eq C x (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: -C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: -T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C x (CHead c1 -(Bind b) v1)))))))))))) -\def - \lambda (b: B).(\lambda (x: C).(C_ind (\lambda (c: C).(\forall (c2: -C).(\forall (v: T).(\forall (v2: T).(\forall (i: nat).((csubst0 (S i) v c -(CHead c2 (Bind b) v2)) \to (or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) -(\lambda (v1: T).(eq C c (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: -C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C c (CHead c1 (Bind b) v2)))) -(ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda -(c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: -T).(eq C c (CHead c1 (Bind b) v1)))))))))))) (\lambda (n: nat).(\lambda (c2: -C).(\lambda (v: T).(\lambda (v2: T).(\lambda (i: nat).(\lambda (H: (csubst0 -(S i) v (CSort n) (CHead c2 (Bind b) v2))).(csubst0_gen_sort (CHead c2 (Bind -b) v2) v (S i) n H (or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda -(v1: T).(eq C (CSort n) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: -C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C (CSort n) (CHead c1 (Bind b) -v2)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) -(\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: -C).(\lambda (v1: T).(eq C (CSort n) (CHead c1 (Bind b) v1))))))))))))) -(\lambda (c: C).(\lambda (_: ((\forall (c2: C).(\forall (v: T).(\forall (v2: -T).(\forall (i: nat).((csubst0 (S i) v c (CHead c2 (Bind b) v2)) \to (or3 -(ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C c (CHead -c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: -C).(eq C c (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: -T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 -c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C c (CHead c1 (Bind b) -v1))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: -T).(\lambda (v2: T).(\lambda (i: nat).(\lambda (H0: (csubst0 (S i) v (CHead c -k t) (CHead c2 (Bind b) v2))).(let H1 \def (csubst0_gen_head k c (CHead c2 -(Bind b) v2) t v (S i) H0) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda -(j: nat).(eq nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C -(CHead c2 (Bind b) v2) (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 (Bind -b) v2) (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq -nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq -C (CHead c2 (Bind b) v2) (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: -C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c c3))))) (or3 (ex2 T (\lambda (v1: -T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) (CHead c2 (Bind -b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C -(CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda -(v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 -c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind -b) v1)))))) (\lambda (H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq -nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 (Bind -b) v2) (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t -u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S i) (s k -j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead -c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or3 (ex2 T -(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) -(CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) -(\lambda (c1: C).(eq C (CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T -(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: -C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: -T).(eq C (CHead c k t) (CHead c1 (Bind b) v1)))))) (\lambda (x0: T).(\lambda -(x1: nat).(\lambda (H3: (eq nat (S i) (s k x1))).(\lambda (H4: (eq C (CHead -c2 (Bind b) v2) (CHead c k x0))).(\lambda (H5: (subst0 x1 v t x0)).(let H6 -\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | -(CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) v2) (CHead c k x0) H4) in -((let H7 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) -\Rightarrow (Bind b) | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 (Bind b) -v2) (CHead c k x0) H4) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e -with [(CSort _) \Rightarrow v2 | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 -(Bind b) v2) (CHead c k x0) H4) in (\lambda (H9: (eq K (Bind b) k)).(\lambda -(H10: (eq C c2 c)).(let H11 \def (eq_ind_r T x0 (\lambda (t0: T).(subst0 x1 v -t t0)) H5 v2 H8) in (eq_ind_r C c (\lambda (c0: C).(or3 (ex2 T (\lambda (v1: -T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) (CHead c0 (Bind -b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c0)) (\lambda (c1: C).(eq C -(CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda -(v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 -c0))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind -b) v1))))))) (let H12 \def (eq_ind_r K k (\lambda (k0: K).(eq nat (S i) (s k0 -x1))) H3 (Bind b) H9) in (eq_ind K (Bind b) (\lambda (k0: K).(or3 (ex2 T -(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k0 t) -(CHead c (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c)) (\lambda -(c1: C).(eq C (CHead c k0 t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda -(_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: -T).(csubst0 i v c1 c))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k0 -t) (CHead c1 (Bind b) v1))))))) (let H13 \def (f_equal nat nat (\lambda (e: -nat).(match e with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) -H12) in (let H14 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t v2)) -H11 i H13) in (or3_intro0 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) -(\lambda (v1: T).(eq C (CHead c (Bind b) t) (CHead c (Bind b) v1)))) (ex2 C -(\lambda (c1: C).(csubst0 i v c1 c)) (\lambda (c1: C).(eq C (CHead c (Bind b) -t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: -T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c))) -(\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind -b) v1))))) (ex_intro2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: -T).(eq C (CHead c (Bind b) t) (CHead c (Bind b) v1))) t H14 (refl_equal C -(CHead c (Bind b) t)))))) k H9)) c2 H10))))) H7)) H6))))))) H2)) (\lambda -(H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j)))) -(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead c3 k -t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C -nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or3 (ex2 T (\lambda (v1: -T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) (CHead c2 (Bind -b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C -(CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda -(v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 -c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind -b) v1)))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H3: (eq nat (S i) -(s k x1))).(\lambda (H4: (eq C (CHead c2 (Bind b) v2) (CHead x0 k -t))).(\lambda (H5: (csubst0 x1 v c x0)).(let H6 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow -c0])) (CHead c2 (Bind b) v2) (CHead x0 k t) H4) in ((let H7 \def (f_equal C K -(\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind b) | (CHead _ k0 -_) \Rightarrow k0])) (CHead c2 (Bind b) v2) (CHead x0 k t) H4) in ((let H8 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v2 | -(CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) v2) (CHead x0 k t) H4) in -(\lambda (H9: (eq K (Bind b) k)).(\lambda (H10: (eq C c2 x0)).(let H11 \def -(eq_ind_r C x0 (\lambda (c0: C).(csubst0 x1 v c c0)) H5 c2 H10) in (eq_ind_r -T t (\lambda (t0: T).(or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 t0)) -(\lambda (v1: T).(eq C (CHead c k t) (CHead c2 (Bind b) v1)))) (ex2 C -(\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C (CHead c k t) -(CHead c1 (Bind b) t0)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 -i v v1 t0))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda -(c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind b) v1))))))) -(let H12 \def (eq_ind_r K k (\lambda (k0: K).(eq nat (S i) (s k0 x1))) H3 -(Bind b) H9) in (eq_ind K (Bind b) (\lambda (k0: K).(or3 (ex2 T (\lambda (v1: -T).(subst0 i v v1 t)) (\lambda (v1: T).(eq C (CHead c k0 t) (CHead c2 (Bind -b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C -(CHead c k0 t) (CHead c1 (Bind b) t)))) (ex3_2 C T (\lambda (_: C).(\lambda -(v1: T).(subst0 i v v1 t))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 -c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k0 t) (CHead c1 (Bind -b) v1))))))) (let H13 \def (f_equal nat nat (\lambda (e: nat).(match e with -[O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H12) in (let H14 \def -(eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c c2)) H11 i H13) in -(or3_intro1 (ex2 T (\lambda (v1: T).(subst0 i v v1 t)) (\lambda (v1: T).(eq C -(CHead c (Bind b) t) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: -C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C (CHead c (Bind b) t) (CHead c1 -(Bind b) t)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 -t))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: -C).(\lambda (v1: T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v1))))) -(ex_intro2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C -(CHead c (Bind b) t) (CHead c1 (Bind b) t))) c H14 (refl_equal C (CHead c -(Bind b) t)))))) k H9)) v2 H8))))) H7)) H6))))))) H2)) (\lambda (H2: (ex4_3 T -C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k -j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 -(Bind b) v2) (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda -(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: -C).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead c3 k u2))))) -(\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) -(\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (or3 -(ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k -t) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) -(\lambda (c1: C).(eq C (CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T -(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: -C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: -T).(eq C (CHead c k t) (CHead c1 (Bind b) v1)))))) (\lambda (x0: T).(\lambda -(x1: C).(\lambda (x2: nat).(\lambda (H3: (eq nat (S i) (s k x2))).(\lambda -(H4: (eq C (CHead c2 (Bind b) v2) (CHead x1 k x0))).(\lambda (H5: (subst0 x2 -v t x0)).(\lambda (H6: (csubst0 x2 v c x1)).(let H7 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) -\Rightarrow c0])) (CHead c2 (Bind b) v2) (CHead x1 k x0) H4) in ((let H8 \def -(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind b) | -(CHead _ k0 _) \Rightarrow k0])) (CHead c2 (Bind b) v2) (CHead x1 k x0) H4) -in ((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow v2 | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) v2) -(CHead x1 k x0) H4) in (\lambda (H10: (eq K (Bind b) k)).(\lambda (H11: (eq C -c2 x1)).(let H12 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 x2 v c c0)) H6 -c2 H11) in (let H13 \def (eq_ind_r T x0 (\lambda (t0: T).(subst0 x2 v t t0)) -H5 v2 H9) in (let H14 \def (eq_ind_r K k (\lambda (k0: K).(eq nat (S i) (s k0 -x2))) H3 (Bind b) H10) in (eq_ind K (Bind b) (\lambda (k0: K).(or3 (ex2 T -(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k0 t) -(CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) -(\lambda (c1: C).(eq C (CHead c k0 t) (CHead c1 (Bind b) v2)))) (ex3_2 C T -(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: -C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: -T).(eq C (CHead c k0 t) (CHead c1 (Bind b) v1))))))) (let H15 \def (f_equal -nat nat (\lambda (e: nat).(match e with [O \Rightarrow i | (S n) \Rightarrow -n])) (S i) (S x2) H14) in (let H16 \def (eq_ind_r nat x2 (\lambda (n: -nat).(csubst0 n v c c2)) H12 i H15) in (let H17 \def (eq_ind_r nat x2 -(\lambda (n: nat).(subst0 n v t v2)) H13 i H15) in (or3_intro2 (ex2 T -(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c (Bind b) -t) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) -(\lambda (c1: C).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v2)))) (ex3_2 -C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: -C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: -T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v1))))) (ex3_2_intro C T -(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: -C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: -T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v1)))) c t H17 H16 -(refl_equal C (CHead c (Bind b) t))))))) k H10))))))) H8)) H7))))))))) H2)) -H1))))))))))) x)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst0/getl.ma deleted file mode 100644 index 894932961..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/getl.ma +++ /dev/null @@ -1,1145 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst0/clear.ma". - -include "basic_1/csubst0/drop.ma". - -include "basic_1/getl/fwd.ma". - -lemma csubst0_getl_ge: - \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c1 -e) \to (getl n c2 e))))))))) -\def - \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 -c2)).(\lambda (e: C).(\lambda (H1: (getl n c1 e)).(let H2 \def (getl_gen_all -c1 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c1 e0)) (\lambda (e0: -C).(clear e0 e)) (getl n c2 e) (\lambda (x: C).(\lambda (H3: (drop n O c1 -x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c2 e) (\lambda (H5: -(lt i n)).(getl_intro n c2 e x (csubst0_drop_gt n i H5 c1 c2 v H0 x H3) H4)) -(\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n0: -nat).(drop n0 O c1 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n0: -nat).(le i n0)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c2 e)) -(let H8 \def (csubst0_drop_eq i c1 c2 v H0 x H6) in (or4_ind (drop i O c2 x) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C x (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop i O c2 (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C x (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop i O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (getl i c2 e) (\lambda (H9: -(drop i O c2 x)).(getl_intro i c2 e x H9 H4)) (\lambda (H9: (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C x -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop i O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C x (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i O c2 (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w))))) (getl i c2 e) (\lambda (x0: F).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C x (CHead x1 (Flat -x0) x2))).(\lambda (H11: (drop i O c2 (CHead x1 (Flat x0) x3))).(\lambda (_: -(subst0 O v x2 x3)).(let H13 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 -(CHead x1 (Flat x0) x2) H10) in (getl_intro i c2 e (CHead x1 (Flat x0) x3) -H11 (clear_flat x1 e (clear_gen_flat x0 x1 e x2 H13) x0 x3)))))))))) H9)) -(\lambda (H9: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C x (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C x (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 -(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))) (getl i c2 e) (\lambda (x0: -F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C x -(CHead x1 (Flat x0) x3))).(\lambda (H11: (drop i O c2 (CHead x2 (Flat x0) -x3))).(\lambda (H12: (csubst0 O v x1 x2)).(let H13 \def (eq_ind C x (\lambda -(c: C).(clear c e)) H4 (CHead x1 (Flat x0) x3) H10) in (getl_intro i c2 e -(CHead x2 (Flat x0) x3) H11 (clear_flat x2 e (csubst0_clear_O x1 x2 v H12 e -(clear_gen_flat x0 x1 e x3 H13)) x0 x3)))))))))) H9)) (\lambda (H9: (ex4_5 F -C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C x (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop i O -c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop i O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (getl i c2 e) (\lambda (x0: -F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H10: (eq C x (CHead x1 (Flat x0) x3))).(\lambda (H11: (drop i O -c2 (CHead x2 (Flat x0) x4))).(\lambda (_: (subst0 O v x3 x4)).(\lambda (H13: -(csubst0 O v x1 x2)).(let H14 \def (eq_ind C x (\lambda (c: C).(clear c e)) -H4 (CHead x1 (Flat x0) x3) H10) in (getl_intro i c2 e (CHead x2 (Flat x0) x4) -H11 (clear_flat x2 e (csubst0_clear_O x1 x2 v H13 e (clear_gen_flat x0 x1 e -x3 H14)) x0 x4)))))))))))) H9)) H8)) n H5)))) (\lambda (H5: (lt n -i)).(le_lt_false i n H H5 (getl n c2 e))))))) H2)))))))))). - -lemma csubst0_getl_lt: - \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c1 -e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))))))) -\def - \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 -c2)).(\lambda (e: C).(\lambda (H1: (getl n c1 e)).(let H2 \def (getl_gen_all -c1 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c1 e0)) (\lambda (e0: -C).(clear e0 e)) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x: -C).(\lambda (H3: (drop n O c1 x)).(\lambda (H4: (clear x e)).(let H5 \def -(csubst0_drop_lt n i H c1 c2 v H0 x H3) in (or4_ind (drop n O c2 x) (ex3_4 K -C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C x (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O -c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (s k n)) v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B -C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))) (\lambda (H6: (drop n O c2 x)).(or4_intro0 (getl n c2 e) -(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2))))))) (getl_intro n c2 e x H6 H4))) (\lambda (H6: -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u -w))))))).(ex3_4_ind K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k -n)) v u w))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq C x -(CHead x1 x0 x2))).(\lambda (H8: (drop n O c2 (CHead x1 x0 x3))).(\lambda -(H9: (subst0 (minus i (s x0 n)) v x2 x3)).(let H10 \def (eq_ind C x (\lambda -(c: C).(clear c e)) H4 (CHead x1 x0 x2) H7) in (K_ind (\lambda (k: K).((drop -n O c2 (CHead x1 k x3)) \to ((subst0 (minus i (s k n)) v x2 x3) \to ((clear -(CHead x1 k x2) e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind -b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))) (\lambda (b: -B).(\lambda (H11: (drop n O c2 (CHead x1 (Bind b) x3))).(\lambda (H12: -(subst0 (minus i (s (Bind b) n)) v x2 x3)).(\lambda (H13: (clear (CHead x1 -(Bind b) x2) e)).(eq_ind_r C (CHead x1 (Bind b) x2) (\lambda (c: C).(or4 -(getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) (\lambda (b0: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n -c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 (getl n c2 -(CHead x1 (Bind b) x2)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead e0 -(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C (CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u)))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u))))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b0: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead -e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w))))) b x1 x2 x3 (refl_equal C (CHead x1 (Bind b) x2)) (getl_intro n c2 -(CHead x1 (Bind b) x3) (CHead x1 (Bind b) x3) H11 (clear_bind b x1 x3)) H12)) -e (clear_gen_bind b x1 e x2 H13)))))) (\lambda (f: F).(\lambda (H11: (drop n -O c2 (CHead x1 (Flat f) x3))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v -x2 x3)).(\lambda (H13: (clear (CHead x1 (Flat f) x2) e)).(or4_intro0 (getl n -c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n -c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e (CHead x1 -(Flat f) x3) H11 (clear_flat x1 e (clear_gen_flat f x1 e x2 H13) f x3))))))) -x0 H8 H9 H10))))))))) H6)) (\lambda (H6: (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C x (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2))))))).(ex3_4_ind -K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C x (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 -e2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H7: (eq C x -(CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x3))).(\lambda -(H9: (csubst0 (minus i (s x0 n)) v x1 x2)).(let H10 \def (eq_ind C x (\lambda -(c: C).(clear c e)) H4 (CHead x1 x0 x3) H7) in (K_ind (\lambda (k: K).((drop -n O c2 (CHead x2 k x3)) \to ((csubst0 (minus i (s k n)) v x1 x2) \to ((clear -(CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind -b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))) (\lambda (b: -B).(\lambda (H11: (drop n O c2 (CHead x2 (Bind b) x3))).(\lambda (H12: -(csubst0 (minus i (s (Bind b) n)) v x1 x2)).(\lambda (H13: (clear (CHead x1 -(Bind b) x3) e)).(eq_ind_r C (CHead x1 (Bind b) x3) (\lambda (c: C).(or4 -(getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) (\lambda (b0: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n -c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 -(CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead e0 -(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b0: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead -e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))) b x1 x2 x3 (refl_equal C (CHead x1 (Bind b) x3)) (getl_intro n -c2 (CHead x2 (Bind b) x3) (CHead x2 (Bind b) x3) H11 (clear_bind b x2 x3)) -H12)) e (clear_gen_bind b x1 e x3 H13)))))) (\lambda (f: F).(\lambda (H11: -(drop n O c2 (CHead x2 (Flat f) x3))).(\lambda (H12: (csubst0 (minus i (s -(Flat f) n)) v x1 x2)).(\lambda (H13: (clear (CHead x1 (Flat f) x3) e)).(let -H14 \def (eq_ind nat (minus i n) (\lambda (n0: nat).(csubst0 n0 v x1 x2)) H12 -(S (minus i (S n))) (minus_x_Sy i n H)) in (let H15 \def (csubst0_clear_S x1 -x2 v (minus i (S n)) H14 e (clear_gen_flat f x1 e x3 H13)) in (or4_ind (clear -x2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 -(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B C -T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))) (\lambda (H16: (clear x2 e)).(or4_intro0 (getl n c2 e) (ex3_4 -B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))) (getl_intro n c2 e (CHead x2 (Flat f) x3) H11 (clear_flat x2 e -H16 f x3)))) (\lambda (H16: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 -(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2))))))).(ex3_4_ind B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) -v u1 u2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x4: -B).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H17: (eq C e -(CHead x5 (Bind x4) x6))).(\lambda (H18: (clear x2 (CHead x5 (Bind x4) -x7))).(\lambda (H19: (subst0 (minus i (S n)) v x6 x7)).(eq_ind_r C (CHead x5 -(Bind x4) x6) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind -b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C c (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 -(getl n c2 (CHead x5 (Bind x4) x6)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead -e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C (CHead x5 (Bind x4) x6) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) -x6) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) -u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x4 x5 -x6 x7 (refl_equal C (CHead x5 (Bind x4) x6)) (getl_intro n c2 (CHead x5 (Bind -x4) x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x5 (Bind x4) x7) H18 -f x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 -e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i (S n)) v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))) (\lambda (x4: B).(\lambda (x5: C).(\lambda (x6: C).(\lambda -(x7: T).(\lambda (H17: (eq C e (CHead x5 (Bind x4) x7))).(\lambda (H18: -(clear x2 (CHead x6 (Bind x4) x7))).(\lambda (H19: (csubst0 (minus i (S n)) v -x5 x6)).(eq_ind_r C (CHead x5 (Bind x4) x7) (\lambda (c: C).(or4 (getl n c2 -c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 (CHead x5 (Bind x4) -x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x5 (Bind x4) x7) (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) -x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 -(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) -(ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x4 x5 x6 x7 -(refl_equal C (CHead x5 (Bind x4) x7)) (getl_intro n c2 (CHead x6 (Bind x4) -x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x6 (Bind x4) x7) H18 f -x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind -b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -(minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n -c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x4: B).(\lambda -(x5: C).(\lambda (x6: C).(\lambda (x7: T).(\lambda (x8: T).(\lambda (H17: (eq -C e (CHead x5 (Bind x4) x7))).(\lambda (H18: (clear x2 (CHead x6 (Bind x4) -x8))).(\lambda (H19: (subst0 (minus i (S n)) v x7 x8)).(\lambda (H20: -(csubst0 (minus i (S n)) v x5 x6)).(eq_ind_r C (CHead x5 (Bind x4) x7) -(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 -(getl n c2 (CHead x5 (Bind x4) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead -e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) -x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) -x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) x4 x5 x6 x7 x8 (refl_equal C (CHead x5 (Bind x4) x7)) -(getl_intro n c2 (CHead x6 (Bind x4) x8) (CHead x2 (Flat f) x3) H11 -(clear_flat x2 (CHead x6 (Bind x4) x8) H18 f x3)) H19 H20)) e H17)))))))))) -H16)) H15))))))) x0 H8 H9 H10))))))))) H6)) (\lambda (H6: (ex4_5 K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C x (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k n)) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k -n)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k -n)) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2)))))) (or4 (getl n -c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n -c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: K).(\lambda -(x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H7: (eq -C x (CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x4))).(\lambda -(H9: (subst0 (minus i (s x0 n)) v x3 x4)).(\lambda (H10: (csubst0 (minus i (s -x0 n)) v x1 x2)).(let H11 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 -(CHead x1 x0 x3) H7) in (K_ind (\lambda (k: K).((drop n O c2 (CHead x2 k x4)) -\to ((subst0 (minus i (s k n)) v x3 x4) \to ((csubst0 (minus i (s k n)) v x1 -x2) \to ((clear (CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))))))))) (\lambda (b: B).(\lambda (H12: (drop n O c2 (CHead x2 -(Bind b) x4))).(\lambda (H13: (subst0 (minus i (s (Bind b) n)) v x3 -x4)).(\lambda (H14: (csubst0 (minus i (s (Bind b) n)) v x1 x2)).(\lambda -(H15: (clear (CHead x1 (Bind b) x3) e)).(eq_ind_r C (CHead x1 (Bind b) x3) -(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) -(\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c -(CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 -(getl n c2 (CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead -e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda -(b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (ex4_5_intro B C C -T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) b x1 x2 x3 x4 -(refl_equal C (CHead x1 (Bind b) x3)) (getl_intro n c2 (CHead x2 (Bind b) x4) -(CHead x2 (Bind b) x4) H12 (clear_bind b x2 x4)) H13 H14)) e (clear_gen_bind -b x1 e x3 H15))))))) (\lambda (f: F).(\lambda (H12: (drop n O c2 (CHead x2 -(Flat f) x4))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v x3 -x4)).(\lambda (H14: (csubst0 (minus i (s (Flat f) n)) v x1 x2)).(\lambda -(H15: (clear (CHead x1 (Flat f) x3) e)).(let H16 \def (eq_ind nat (minus i n) -(\lambda (n0: nat).(csubst0 n0 v x1 x2)) H14 (S (minus i (S n))) (minus_x_Sy -i n H)) in (let H17 \def (csubst0_clear_S x1 x2 v (minus i (S n)) H16 e -(clear_gen_flat f x1 e x3 H15)) in (or4_ind (clear x2 e) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) -v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (H18: -(clear x2 e)).(or4_intro0 (getl n c2 e) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind -b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e -(CHead x2 (Flat f) x4) H12 (clear_flat x2 e H18 f x4)))) (\lambda (H18: -(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -(minus i (S n)) v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 -(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2))))) (or4 (getl n c2 e) -(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda -(x7: T).(\lambda (x8: T).(\lambda (H19: (eq C e (CHead x6 (Bind x5) -x7))).(\lambda (H20: (clear x2 (CHead x6 (Bind x5) x8))).(\lambda (H21: -(subst0 (minus i (S n)) v x7 x8)).(eq_ind_r C (CHead x6 (Bind x5) x7) -(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 -(getl n c2 (CHead x6 (Bind x5) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x7) (CHead -e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C (CHead x6 (Bind x5) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) -x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x7) (CHead e0 (Bind b) -u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x5 x6 -x7 x8 (refl_equal C (CHead x6 (Bind x5) x7)) (getl_intro n c2 (CHead x6 (Bind -x5) x8) (CHead x2 (Flat f) x4) H12 (clear_flat x2 (CHead x6 (Bind x5) x8) H20 -f x4)) H21)) e H19)))))))) H18)) (\lambda (H18: (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 -e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i (S n)) v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: C).(\lambda -(x8: T).(\lambda (H19: (eq C e (CHead x6 (Bind x5) x8))).(\lambda (H20: -(clear x2 (CHead x7 (Bind x5) x8))).(\lambda (H21: (csubst0 (minus i (S n)) v -x6 x7)).(eq_ind_r C (CHead x6 (Bind x5) x8) (\lambda (c: C).(or4 (getl n c2 -c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 (CHead x6 (Bind x5) -x8)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x6 (Bind x5) x8) (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x6 (Bind x5) -x8) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x8) (CHead e1 -(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) -(ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x6 (Bind x5) x8) (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x5 x6 x7 x8 -(refl_equal C (CHead x6 (Bind x5) x8)) (getl_intro n c2 (CHead x7 (Bind x5) -x8) (CHead x2 (Flat f) x4) H12 (clear_flat x2 (CHead x7 (Bind x5) x8) H20 f -x4)) H21)) e H19)))))))) H18)) (\lambda (H18: (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind -b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -(minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n -c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x5: B).(\lambda -(x6: C).(\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: T).(\lambda (H19: (eq -C e (CHead x6 (Bind x5) x8))).(\lambda (H20: (clear x2 (CHead x7 (Bind x5) -x9))).(\lambda (H21: (subst0 (minus i (S n)) v x8 x9)).(\lambda (H22: -(csubst0 (minus i (S n)) v x6 x7)).(eq_ind_r C (CHead x6 (Bind x5) x8) -(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 -(getl n c2 (CHead x6 (Bind x5) x8)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x8) (CHead -e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C (CHead x6 (Bind x5) x8) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) -x8) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) -x8) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) x5 x6 x7 x8 x9 (refl_equal C (CHead x6 (Bind x5) x8)) -(getl_intro n c2 (CHead x7 (Bind x5) x9) (CHead x2 (Flat f) x4) H12 -(clear_flat x2 (CHead x7 (Bind x5) x9) H20 f x4)) H21 H22)) e H19)))))))))) -H18)) H17)))))))) x0 H8 H9 H10 H11))))))))))) H6)) H5))))) H2)))))))))). - -lemma csubst0_getl_ge_back: - \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c2 -e) \to (getl n c1 e))))))))) -\def - \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 -c2)).(\lambda (e: C).(\lambda (H1: (getl n c2 e)).(let H2 \def (getl_gen_all -c2 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c2 e0)) (\lambda (e0: -C).(clear e0 e)) (getl n c1 e) (\lambda (x: C).(\lambda (H3: (drop n O c2 -x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c1 e) (\lambda (H5: -(lt i n)).(getl_intro n c1 e x (csubst0_drop_gt_back n i H5 c1 c2 v H0 x H3) -H4)) (\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n0: -nat).(drop n0 O c2 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n0: -nat).(le i n0)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c1 e)) -(let H8 \def (csubst0_drop_eq_back i c1 c2 v H0 x H6) in (or4_ind (drop i O -c1 x) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 -(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C x -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (getl i c1 -e) (\lambda (H9: (drop i O c1 x)).(getl_intro i c1 e x H9 H4)) (\lambda (H9: -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: -T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2))))) (getl i c1 e) (\lambda (x0: F).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C x (CHead x1 (Flat -x0) x3))).(\lambda (H11: (drop i O c1 (CHead x1 (Flat x0) x2))).(\lambda (_: -(subst0 O v x2 x3)).(let H13 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 -(CHead x1 (Flat x0) x3) H10) in (getl_intro i c1 e (CHead x1 (Flat x0) x2) -H11 (clear_flat x1 e (clear_gen_flat x0 x1 e x3 H13) x0 x2)))))))))) H9)) -(\lambda (H9: (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 -(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))) (getl i c1 e) (\lambda (x0: -F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C x -(CHead x2 (Flat x0) x3))).(\lambda (H11: (drop i O c1 (CHead x1 (Flat x0) -x3))).(\lambda (H12: (csubst0 O v x1 x2)).(let H13 \def (eq_ind C x (\lambda -(c: C).(clear c e)) H4 (CHead x2 (Flat x0) x3) H10) in (getl_intro i c1 e -(CHead x1 (Flat x0) x3) H11 (clear_flat x1 e (csubst0_clear_O_back x1 x2 v -H12 e (clear_gen_flat x0 x2 e x3 H13)) x0 x3)))))))))) H9)) (\lambda (H9: -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C x (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop i -O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C x (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop i O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 -O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (getl i c1 e) (\lambda (x0: -F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H10: (eq C x (CHead x2 (Flat x0) x4))).(\lambda (H11: (drop i O -c1 (CHead x1 (Flat x0) x3))).(\lambda (_: (subst0 O v x3 x4)).(\lambda (H13: -(csubst0 O v x1 x2)).(let H14 \def (eq_ind C x (\lambda (c: C).(clear c e)) -H4 (CHead x2 (Flat x0) x4) H10) in (getl_intro i c1 e (CHead x1 (Flat x0) x3) -H11 (clear_flat x1 e (csubst0_clear_O_back x1 x2 v H13 e (clear_gen_flat x0 -x2 e x4 H14)) x0 x3)))))))))))) H9)) H8)) n H5)))) (\lambda (H5: (lt n -i)).(le_lt_false i n H H5 (getl n c1 e))))))) H2)))))))))). - -lemma csubst0_getl_lt_back: - \forall (n: nat).(\forall (i: nat).((lt n i) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e2: C).((getl n c2 -e2) \to (or (getl n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 -e2)) (\lambda (e1: C).(getl n c1 e1)))))))))))) -\def - \lambda (n: nat).(\lambda (i: nat).(\lambda (H: (lt n i)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 -c2)).(\lambda (e2: C).(\lambda (H1: (getl n c2 e2)).(let H2 \def -(getl_gen_all c2 e2 n H1) in (ex2_ind C (\lambda (e: C).(drop n O c2 e)) -(\lambda (e: C).(clear e e2)) (or (getl n c1 e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda -(x: C).(\lambda (H3: (drop n O c2 x)).(\lambda (H4: (clear x e2)).(let H_x -\def (csubst0_drop_lt_back n i H c1 c2 v H0 x H3) in (let H5 \def H_x in -(or_ind (drop n O c1 x) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 x)) -(\lambda (e1: C).(drop n O c1 e1))) (or (getl n c1 e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda -(H6: (drop n O c1 x)).(or_introl (getl n c1 e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1))) -(getl_intro n c1 e2 x H6 H4))) (\lambda (H6: (ex2 C (\lambda (e1: C).(csubst0 -(minus i n) v e1 x)) (\lambda (e1: C).(drop n O c1 e1)))).(ex2_ind C (\lambda -(e1: C).(csubst0 (minus i n) v e1 x)) (\lambda (e1: C).(drop n O c1 e1)) (or -(getl n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) -(\lambda (e1: C).(getl n c1 e1)))) (\lambda (x0: C).(\lambda (H7: (csubst0 -(minus i n) v x0 x)).(\lambda (H8: (drop n O c1 x0)).(let H_x0 \def -(csubst0_clear_trans x0 x v (minus i n) H7 e2 H4) in (let H9 \def H_x0 in -(or_ind (clear x0 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) -(\lambda (e1: C).(clear x0 e1))) (or (getl n c1 e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda -(H10: (clear x0 e2)).(or_introl (getl n c1 e2) (ex2 C (\lambda (e1: -C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1))) -(getl_intro n c1 e2 x0 H8 H10))) (\lambda (H10: (ex2 C (\lambda (e1: -C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(clear x0 e1)))).(ex2_ind -C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(clear x0 -e1)) (or (getl n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 -e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda (x1: C).(\lambda (H11: -(csubst0 (minus i n) v x1 e2)).(\lambda (H12: (clear x0 x1)).(or_intror (getl -n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: -C).(getl n c1 e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 -e2)) (\lambda (e1: C).(getl n c1 e1)) x1 H11 (getl_intro n c1 x1 x0 H8 -H12)))))) H10)) H9)))))) H6)) H5)))))) H2)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst0/props.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst0/props.ma deleted file mode 100644 index bb427a677..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst0/props.ma +++ /dev/null @@ -1,52 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst0/defs.ma". - -lemma csubst0_snd_bind: - \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall -(u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(csubst0 (S i) v (CHead c -(Bind b) u1) (CHead c (Bind b) u2)))))))) -\def - \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda -(u2: T).(\lambda (H: (subst0 i v u1 u2)).(\lambda (c: C).(eq_ind nat (s (Bind -b) i) (\lambda (n: nat).(csubst0 n v (CHead c (Bind b) u1) (CHead c (Bind b) -u2))) (csubst0_snd (Bind b) i v u1 u2 H c) (S i) (refl_equal nat (S -i))))))))). - -lemma csubst0_fst_bind: - \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall -(v: T).((csubst0 i v c1 c2) \to (\forall (u: T).(csubst0 (S i) v (CHead c1 -(Bind b) u) (CHead c2 (Bind b) u)))))))) -\def - \lambda (b: B).(\lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda -(v: T).(\lambda (H: (csubst0 i v c1 c2)).(\lambda (u: T).(eq_ind nat (s (Bind -b) i) (\lambda (n: nat).(csubst0 n v (CHead c1 (Bind b) u) (CHead c2 (Bind b) -u))) (csubst0_fst (Bind b) i c1 c2 v H u) (S i) (refl_equal nat (S i))))))))). - -theorem csubst0_both_bind: - \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall -(u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst0 i -v c1 c2) \to (csubst0 (S i) v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) -u2)))))))))) -\def - \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda -(u2: T).(\lambda (H: (subst0 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: -C).(\lambda (H0: (csubst0 i v c1 c2)).(eq_ind nat (s (Bind b) i) (\lambda (n: -nat).(csubst0 n v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) u2))) -(csubst0_both (Bind b) i v u1 u2 H c1 c2 H0) (S i) (refl_equal nat (S -i))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst1/defs.ma deleted file mode 100644 index dcfa78456..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/defs.ma +++ /dev/null @@ -1,22 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst0/defs.ma". - -inductive csubst1 (i: nat) (v: T) (c1: C): C \to Prop \def -| csubst1_refl: csubst1 i v c1 c1 -| csubst1_sing: \forall (c2: C).((csubst0 i v c1 c2) \to (csubst1 i v c1 c2)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst1/fwd.ma deleted file mode 100644 index c06340168..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/fwd.ma +++ /dev/null @@ -1,128 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst1/defs.ma". - -include "basic_1/csubst0/fwd.ma". - -include "basic_1/subst1/defs.ma". - -include "basic_1/s/fwd.ma". - -implied lemma csubst1_ind: - \forall (i: nat).(\forall (v: T).(\forall (c1: C).(\forall (P: ((C \to -Prop))).((P c1) \to (((\forall (c2: C).((csubst0 i v c1 c2) \to (P c2)))) \to -(\forall (c: C).((csubst1 i v c1 c) \to (P c)))))))) -\def - \lambda (i: nat).(\lambda (v: T).(\lambda (c1: C).(\lambda (P: ((C \to -Prop))).(\lambda (f: (P c1)).(\lambda (f0: ((\forall (c2: C).((csubst0 i v c1 -c2) \to (P c2))))).(\lambda (c: C).(\lambda (c0: (csubst1 i v c1 c)).(match -c0 with [csubst1_refl \Rightarrow f | (csubst1_sing x x0) \Rightarrow (f0 x -x0)])))))))). - -lemma csubst1_gen_head: - \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).(\forall -(v: T).(\forall (i: nat).((csubst1 (s k i) v (CHead c1 k u1) x) \to (ex3_2 T -C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 k u2)))) (\lambda (u2: -T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: -C).(csubst1 i v c1 c2)))))))))) -\def - \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda -(v: T).(\lambda (i: nat).(\lambda (H: (csubst1 (s k i) v (CHead c1 k u1) -x)).(csubst1_ind (s k i) v (CHead c1 k u1) (\lambda (c: C).(ex3_2 T C -(\lambda (u2: T).(\lambda (c2: C).(eq C c (CHead c2 k u2)))) (\lambda (u2: -T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: -C).(csubst1 i v c1 c2))))) (ex3_2_intro T C (\lambda (u2: T).(\lambda (c2: -C).(eq C (CHead c1 k u1) (CHead c2 k u2)))) (\lambda (u2: T).(\lambda (_: -C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 i v c1 -c2))) u1 c1 (refl_equal C (CHead c1 k u1)) (subst1_refl i v u1) (csubst1_refl -i v c1)) (\lambda (c2: C).(\lambda (H0: (csubst0 (s k i) v (CHead c1 k u1) -c2)).(let H1 \def (csubst0_gen_head k c1 c2 u1 v (s k i) H0) in (or3_ind -(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s k j)))) -(\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k u2)))) (\lambda (u2: -T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 -j v c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat (s k i) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda -(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: -C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: T).(\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c1 c3))))) (ex3_2 T C (\lambda (u2: -T).(\lambda (c3: C).(eq C c2 (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: -C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 -c3)))) (\lambda (H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat -(s k i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k -u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v u1 u2))))).(ex3_2_ind T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda -(u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k u2)))) (\lambda (u2: -T).(\lambda (j: nat).(subst0 j v u1 u2))) (ex3_2 T C (\lambda (u2: -T).(\lambda (c3: C).(eq C c2 (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: -C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 -c3)))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H3: (eq nat (s k i) (s k -x1))).(\lambda (H4: (eq C c2 (CHead c1 k x0))).(\lambda (H5: (subst0 x1 v u1 -x0)).(eq_ind_r C (CHead c1 k x0) (\lambda (c: C).(ex3_2 T C (\lambda (u2: -T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: -C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 -c3))))) (let H_y \def (s_inj k i x1 H3) in (let H6 \def (eq_ind_r nat x1 -(\lambda (n: nat).(subst0 n v u1 x0)) H5 i H_y) in (ex3_2_intro T C (\lambda -(u2: T).(\lambda (c3: C).(eq C (CHead c1 k x0) (CHead c3 k u2)))) (\lambda -(u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: -C).(csubst1 i v c1 c3))) x0 c1 (refl_equal C (CHead c1 k x0)) (subst1_single -i v u1 x0 H6) (csubst1_refl i v c1)))) c2 H4)))))) H2)) (\lambda (H2: (ex3_2 -C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda -(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c1 c3))))).(ex3_2_ind C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 -j v c1 c3))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c2 (CHead c3 -k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: -T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: C).(\lambda (x1: -nat).(\lambda (H3: (eq nat (s k i) (s k x1))).(\lambda (H4: (eq C c2 (CHead -x0 k u1))).(\lambda (H5: (csubst0 x1 v c1 x0)).(eq_ind_r C (CHead x0 k u1) -(\lambda (c: C).(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead -c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda -(_: T).(\lambda (c3: C).(csubst1 i v c1 c3))))) (let H_y \def (s_inj k i x1 -H3) in (let H6 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c1 x0)) -H5 i H_y) in (ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead -x0 k u1) (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 -u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3))) u1 x0 -(refl_equal C (CHead x0 k u1)) (subst1_refl i v u1) (csubst1_sing i v c1 x0 -H6)))) c2 H4)))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda -(_: C).(\lambda (j: nat).(eq nat (s k i) (s k j))))) (\lambda (u2: -T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda -(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: -T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3)))))).(ex4_3_ind T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k -j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 -k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 -c3)))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c2 (CHead c3 k -u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: -T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: T).(\lambda (x1: -C).(\lambda (x2: nat).(\lambda (H3: (eq nat (s k i) (s k x2))).(\lambda (H4: -(eq C c2 (CHead x1 k x0))).(\lambda (H5: (subst0 x2 v u1 x0)).(\lambda (H6: -(csubst0 x2 v c1 x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c: C).(ex3_2 T C -(\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: -T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: -C).(csubst1 i v c1 c3))))) (let H_y \def (s_inj k i x2 H3) in (let H7 \def -(eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c1 x1)) H6 i H_y) in (let H8 -\def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v u1 x0)) H5 i H_y) in -(ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead x1 k x0) -(CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) -(\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3))) x0 x1 (refl_equal C -(CHead x1 k x0)) (subst1_single i v u1 x0 H8) (csubst1_sing i v c1 x1 H7))))) -c2 H4)))))))) H2)) H1)))) x H))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst1/getl.ma deleted file mode 100644 index 1d37fd761..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/getl.ma +++ /dev/null @@ -1,269 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst1/props.ma". - -include "basic_1/csubst0/getl.ma". - -include "basic_1/subst1/props.ma". - -include "basic_1/drop/props.ma". - -lemma csubst1_getl_ge: - \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c1 -e) \to (getl n c2 e))))))))) -\def - \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 -c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c1 e) \to -(getl n c e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda -(c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2: -(getl n c1 e)).(csubst0_getl_ge i n H c1 c3 v H1 e H2))))) c2 H0))))))). - -lemma csubst1_getl_lt: - \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e1: C).((getl n c1 -e1) \to (ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2: -C).(getl n c2 e2))))))))))) -\def - \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 -c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e1: C).((getl n c1 e1) \to -(ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2: C).(getl -n c e2)))))) (\lambda (e1: C).(\lambda (H1: (getl n c1 e1)).(eq_ind_r nat (S -(minus i (S n))) (\lambda (n0: nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1 -e2)) (\lambda (e2: C).(getl n c1 e2)))) (ex_intro2 C (\lambda (e2: -C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c1 e2)) e1 -(csubst1_refl (S (minus i (S n))) v e1) H1) (minus i n) (minus_x_Sy i n H)))) -(\lambda (c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e1: C).(\lambda -(H2: (getl n c1 e1)).(eq_ind_r nat (S (minus i (S n))) (\lambda (n0: -nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1 e2)) (\lambda (e2: C).(getl n -c3 e2)))) (let H3 \def (csubst0_getl_lt i n H c1 c3 v H1 e1 H2) in (or4_ind -(getl n c3 e1) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: -T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n -c3 (CHead e3 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e2 e3))))))) (ex2 C (\lambda (e2: -C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) -(\lambda (H4: (getl n c3 e1)).(ex_intro2 C (\lambda (e2: C).(csubst1 (S -(minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2)) e1 (csubst1_refl -(S (minus i (S n))) v e1) H4)) (\lambda (H4: (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind -b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u -w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w))))) (ex2 C (\lambda (e2: C).(csubst1 (S -(minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H5: (eq C e1 -(CHead x1 (Bind x0) x2))).(\lambda (H6: (getl n c3 (CHead x1 (Bind x0) -x3))).(\lambda (H7: (subst0 (minus i (S n)) v x2 x3)).(eq_ind_r C (CHead x1 -(Bind x0) x2) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S -n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2: -C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x2) e2)) (\lambda (e2: -C).(getl n c3 e2)) (CHead x1 (Bind x0) x3) (csubst1_sing (S (minus i (S n))) -v (CHead x1 (Bind x0) x2) (CHead x1 (Bind x0) x3) (csubst0_snd_bind x0 (minus -i (S n)) v x2 x3 H7 x1)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex3_4 B C C T -(\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 -(CHead e2 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: -C).(\lambda (u: T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e2 e3))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e2: C).(\lambda -(_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: T).(getl n c3 (CHead e3 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e2 e3))))) (ex2 C (\lambda (e2: C).(csubst1 -(S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H5: (eq C e1 -(CHead x1 (Bind x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0) -x3))).(\lambda (H7: (csubst0 (minus i (S n)) v x1 x2)).(eq_ind_r C (CHead x1 -(Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S -n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2: -C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x3) e2)) (\lambda (e2: -C).(getl n c3 e2)) (CHead x2 (Bind x0) x3) (csubst1_sing (S (minus i (S n))) -v (CHead x1 (Bind x0) x3) (CHead x2 (Bind x0) x3) (csubst0_fst_bind x0 (minus -i (S n)) x1 x2 v H7 x3)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex4_5 B C C T -T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e3 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e2 e3)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda -(e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e2 -(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda -(_: T).(\lambda (w: T).(getl n c3 (CHead e3 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3)))))) -(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: -C).(getl n c3 e2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H5: (eq C e1 (CHead x1 (Bind -x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H7: -(subst0 (minus i (S n)) v x3 x4)).(\lambda (H8: (csubst0 (minus i (S n)) v x1 -x2)).(eq_ind_r C (CHead x1 (Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2: -C).(csubst1 (S (minus i (S n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) -(ex_intro2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind -x0) x3) e2)) (\lambda (e2: C).(getl n c3 e2)) (CHead x2 (Bind x0) x4) -(csubst1_sing (S (minus i (S n))) v (CHead x1 (Bind x0) x3) (CHead x2 (Bind -x0) x4) (csubst0_both_bind x0 (minus i (S n)) v x3 x4 H7 x1 x2 H8)) H6) e1 -H5)))))))))) H4)) H3)) (minus i n) (minus_x_Sy i n H)))))) c2 H0))))))). - -lemma csubst1_getl_ge_back: - \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall -(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c2 -e) \to (getl n c1 e))))))))) -\def - \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 -c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c e) \to -(getl n c1 e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda -(c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2: -(getl n c3 e)).(csubst0_getl_ge_back i n H c1 c3 v H1 e H2))))) c2 H0))))))). - -lemma getl_csubst1: - \forall (d: nat).(\forall (c: C).(\forall (e: C).(\forall (u: T).((getl d c -(CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: -C).(csubst1 d u c a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) d a0 -a)))))))) -\def - \lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (c: C).(\forall (e: -C).(\forall (u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C -(\lambda (a0: C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: -C).(\lambda (a: C).(drop (S O) n a0 a))))))))) (\lambda (c: C).(C_ind -(\lambda (c0: C).(\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind -Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 -a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a)))))))) (\lambda -(n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H: (getl O (CSort n) -(CHead e (Bind Abbr) u))).(getl_gen_sort n O (CHead e (Bind Abbr) u) H (ex2_2 -C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CSort n) a0))) (\lambda -(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (c0: C).(\lambda -(H: ((\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind Abbr) u)) \to -(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda -(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))).(\lambda (k: K).(K_ind -(\lambda (k0: K).(\forall (t: T).(\forall (e: C).(\forall (u: T).((getl O -(CHead c0 k0 t) (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: -C).(\lambda (_: C).(csubst1 O u (CHead c0 k0 t) a0))) (\lambda (a0: -C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (b: B).(\lambda (t: -T).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl O (CHead c0 (Bind b) -t) (CHead e (Bind Abbr) u))).(let H1 \def (f_equal C C (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) -(CHead e (Bind Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e -(Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) -H0))) in ((let H2 \def (f_equal C B (\lambda (e0: C).(match e0 with [(CSort -_) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead e (Bind Abbr) u) -(CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t -(getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in ((let H3 -\def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | -(CHead _ _ t0) \Rightarrow t0])) (CHead e (Bind Abbr) u) (CHead c0 (Bind b) -t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind -b) t) (CHead e (Bind Abbr) u) H0))) in (\lambda (H4: (eq B Abbr b)).(\lambda -(_: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(ex2_2 C C (\lambda (a0: -C).(\lambda (_: C).(csubst1 O t0 (CHead c0 (Bind b) t) a0))) (\lambda (a0: -C).(\lambda (a: C).(drop (S O) O a0 a))))) (eq_ind B Abbr (\lambda (b0: -B).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t (CHead c0 (Bind -b0) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))))) -(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t (CHead c0 -(Bind Abbr) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) -(CHead c0 (Bind Abbr) t) c0 (csubst1_refl O t (CHead c0 (Bind Abbr) t)) -(drop_drop (Bind Abbr) O c0 c0 (drop_refl c0) t)) b H4) u H3)))) H2)) -H1))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (e: C).(\lambda (u: -T).(\lambda (H0: (getl O (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u))).(let -H_x \def (subst1_ex u t O) in (let H1 \def H_x in (ex_ind T (\lambda (t2: -T).(subst1 O u t (lift (S O) O t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: -C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: -C).(drop (S O) O a0 a)))) (\lambda (x: T).(\lambda (H2: (subst1 O u t (lift -(S O) O x))).(let H3 \def (H e u (getl_intro O c0 (CHead e (Bind Abbr) u) c0 -(drop_refl c0) (clear_gen_flat f c0 (CHead e (Bind Abbr) u) t (getl_gen_O -(CHead c0 (Flat f) t) (CHead e (Bind Abbr) u) H0)))) in (ex2_2_ind C C -(\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda (a0: -C).(\lambda (a: C).(drop (S O) O a0 a))) (ex2_2 C C (\lambda (a0: C).(\lambda -(_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: -C).(drop (S O) O a0 a)))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H4: -(csubst1 O u c0 x0)).(\lambda (H5: (drop (S O) O x0 x1)).(ex2_2_intro C C -(\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) (CHead x0 (Flat f) -(lift (S O) O x)) x1 (csubst1_flat f O u t (lift (S O) O x) H2 c0 x0 H4) -(drop_drop (Flat f) O x0 x1 H5 (lift (S O) O x))))))) H3)))) H1)))))))) k)))) -c)) (\lambda (n: nat).(\lambda (H: ((\forall (c: C).(\forall (e: C).(\forall -(u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: -C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: C).(\lambda (a: -C).(drop (S O) n a0 a)))))))))).(\lambda (c: C).(C_ind (\lambda (c0: -C).(\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead e (Bind Abbr) u)) -\to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))))))) (\lambda (n0: -nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl (S n) (CSort n0) -(CHead e (Bind Abbr) u))).(getl_gen_sort n0 (S n) (CHead e (Bind Abbr) u) H0 -(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CSort n0) a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))))))))) (\lambda -(c0: C).(\lambda (H0: ((\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead -e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S -n) u c0 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 -a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall -(e: C).(\forall (u: T).((getl (S n) (CHead c0 k0 t) (CHead e (Bind Abbr) u)) -\to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 k0 -t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))))))))) -(\lambda (b: B).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (H1: -(getl (S n) (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u))).(let H_x \def -(subst1_ex u t n) in (let H2 \def H_x in (ex_ind T (\lambda (t2: T).(subst1 n -u t (lift (S O) n t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 -(S n) u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S -O) (S n) a0 a)))) (\lambda (x: T).(\lambda (H3: (subst1 n u t (lift (S O) n -x))).(let H4 \def (H c0 e u (getl_gen_S (Bind b) c0 (CHead e (Bind Abbr) u) t -n H1)) in (ex2_2_ind C C (\lambda (a0: C).(\lambda (_: C).(csubst1 n u c0 -a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) n a0 a))) (ex2_2 C C -(\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0: -C).(\lambda (x1: C).(\lambda (H5: (csubst1 n u c0 x0)).(\lambda (H6: (drop (S -O) n x0 x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) -u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S -n) a0 a))) (CHead x0 (Bind b) (lift (S O) n x)) (CHead x1 (Bind b) x) -(csubst1_bind b n u t (lift (S O) n x) H3 c0 x0 H5) (drop_skip_bind (S O) n -x0 x1 H6 b x)))))) H4)))) H2)))))))) (\lambda (f: F).(\lambda (t: T).(\lambda -(e: C).(\lambda (u: T).(\lambda (H1: (getl (S n) (CHead c0 (Flat f) t) (CHead -e (Bind Abbr) u))).(let H_x \def (subst1_ex u t (S n)) in (let H2 \def H_x in -(ex_ind T (\lambda (t2: T).(subst1 (S n) u t (lift (S O) (S n) t2))) (ex2_2 C -C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) -a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda -(x: T).(\lambda (H3: (subst1 (S n) u t (lift (S O) (S n) x))).(let H4 \def -(H0 e u (getl_gen_S (Flat f) c0 (CHead e (Bind Abbr) u) t n H1)) in -(ex2_2_ind C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))) (ex2_2 C C -(\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0: -C).(\lambda (x1: C).(\lambda (H5: (csubst1 (S n) u c0 x0)).(\lambda (H6: -(drop (S O) (S n) x0 x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: -C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: -C).(drop (S O) (S n) a0 a))) (CHead x0 (Flat f) (lift (S O) (S n) x)) (CHead -x1 (Flat f) x) (csubst1_flat f (S n) u t (lift (S O) (S n) x) H3 c0 x0 H5) -(drop_skip_flat (S O) n x0 x1 H6 f x)))))) H4)))) H2)))))))) k)))) c)))) d). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubst1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/csubst1/props.ma deleted file mode 100644 index 349485a88..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubst1/props.ma +++ /dev/null @@ -1,66 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst1/fwd.ma". - -include "basic_1/subst1/fwd.ma". - -theorem csubst1_head: - \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall -(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i -v c1 c2) \to (csubst1 (s k i) v (CHead c1 k u1) (CHead c2 k u2)))))))))) -\def - \lambda (k: K).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda -(u2: T).(\lambda (H: (subst1 i v u1 u2)).(subst1_ind i v u1 (\lambda (t: -T).(\forall (c1: C).(\forall (c2: C).((csubst1 i v c1 c2) \to (csubst1 (s k -i) v (CHead c1 k u1) (CHead c2 k t)))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (H0: (csubst1 i v c1 c2)).(csubst1_ind i v c1 (\lambda (c: -C).(csubst1 (s k i) v (CHead c1 k u1) (CHead c k u1))) (csubst1_refl (s k i) -v (CHead c1 k u1)) (\lambda (c3: C).(\lambda (H1: (csubst0 i v c1 -c3)).(csubst1_sing (s k i) v (CHead c1 k u1) (CHead c3 k u1) (csubst0_fst k i -c1 c3 v H1 u1)))) c2 H0)))) (\lambda (t2: T).(\lambda (H0: (subst0 i v u1 -t2)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csubst1 i v c1 -c2)).(csubst1_ind i v c1 (\lambda (c: C).(csubst1 (s k i) v (CHead c1 k u1) -(CHead c k t2))) (csubst1_sing (s k i) v (CHead c1 k u1) (CHead c1 k t2) -(csubst0_snd k i v u1 t2 H0 c1)) (\lambda (c3: C).(\lambda (H2: (csubst0 i v -c1 c3)).(csubst1_sing (s k i) v (CHead c1 k u1) (CHead c3 k t2) (csubst0_both -k i v u1 t2 H0 c1 c3 H2)))) c2 H1)))))) u2 H)))))). - -theorem csubst1_bind: - \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall -(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i -v c1 c2) \to (csubst1 (S i) v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) -u2)))))))))) -\def - \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda -(u2: T).(\lambda (H: (subst1 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: -C).(\lambda (H0: (csubst1 i v c1 c2)).(eq_ind nat (s (Bind b) i) (\lambda (n: -nat).(csubst1 n v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) u2))) -(csubst1_head (Bind b) i v u1 u2 H c1 c2 H0) (S i) (refl_equal nat (S -i))))))))))). - -theorem csubst1_flat: - \forall (f: F).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall -(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i -v c1 c2) \to (csubst1 i v (CHead c1 (Flat f) u1) (CHead c2 (Flat f) -u2)))))))))) -\def - \lambda (f: F).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda -(u2: T).(\lambda (H: (subst1 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: -C).(\lambda (H0: (csubst1 i v c1 c2)).(eq_ind nat (s (Flat f) i) (\lambda (n: -nat).(csubst1 n v (CHead c1 (Flat f) u1) (CHead c2 (Flat f) u2))) -(csubst1_head (Flat f) i v u1 u2 H c1 c2 H0) i (refl_equal nat i)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/clear.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/clear.ma deleted file mode 100644 index d2dc87dfe..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/clear.ma +++ /dev/null @@ -1,71 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/fwd.ma". - -include "basic_1/clear/fwd.ma". - -lemma csubt_clear_conf: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to -(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) -(\lambda (e2: C).(clear c2 e2)))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 -c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c -e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c0 -e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) -e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csubt g e1 e2)) -(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (H0: (csubt g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 -e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c4 -e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: -(clear (CHead c3 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c3 k0 u) -e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear -(CHead c4 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c3 (Bind -b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csubt g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) -(ex_intro2 C (\lambda (e2: C).(csubt g (CHead c3 (Bind b) u) e2)) (\lambda -(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csubt_head g -c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3)))) -(\lambda (f: F).(\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def -(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csubt g -e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csubt g e1 -e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: -C).(\lambda (H5: (csubt g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C -(\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) -u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: -C).(\lambda (c4: C).(\lambda (H0: (csubt g c3 c4)).(\lambda (_: ((\forall -(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda -(e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b -Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: -(clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) -(\lambda (c: C).(ex2 C (\lambda (e2: C).(csubt g c e2)) (\lambda (e2: -C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csubt -g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) -u2) e2)) (CHead c4 (Bind b) u2) (csubt_void g c3 c4 H0 b H2 u1 u2) -(clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) -(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubt g c3 c4)).(\lambda (_: -((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) -(\lambda (e2: C).(clear c4 e2))))))).(\lambda (u: T).(\lambda (t: T).(\lambda -(H2: (ty3 g c3 u t)).(\lambda (H3: (ty3 g c4 u t)).(\lambda (e1: C).(\lambda -(H4: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) -t) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubt g c e2)) (\lambda (e2: -C).(clear (CHead c4 (Bind Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: -C).(csubt g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead c4 -(Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) u) (csubt_abst g c3 c4 H0 u t H2 -H3) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H4)))))))))))) c1 -c2 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/csuba.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/csuba.ma deleted file mode 100644 index 0de7f11cd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/csuba.ma +++ /dev/null @@ -1,39 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/arity.ma". - -lemma csubt_csuba: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (csuba -g c1 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 -c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(csuba g c c0))) (\lambda -(n: nat).(csuba_refl g (CSort n))) (\lambda (c3: C).(\lambda (c4: C).(\lambda -(_: (csubt g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (k: K).(\lambda -(u: T).(csuba_head g c3 c4 H1 k u))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (_: (csubt g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (b: -B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: -T).(csuba_void g c3 c4 H1 b H2 u1 u2))))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (_: (csubt g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (u: -T).(\lambda (t: T).(\lambda (H2: (ty3 g c3 u t)).(\lambda (_: (ty3 g c4 u -t)).(let H_x \def (ty3_arity g c3 u t H2) in (let H4 \def H_x in (ex2_ind A -(\lambda (a1: A).(arity g c3 u a1)) (\lambda (a1: A).(arity g c3 t (asucc g -a1))) (csuba g (CHead c3 (Bind Abst) t) (CHead c4 (Bind Abbr) u)) (\lambda -(x: A).(\lambda (H5: (arity g c3 u x)).(\lambda (H6: (arity g c3 t (asucc g -x))).(csuba_abst g c3 c4 H1 t x H6 u (csuba_arity g c3 u x H5 c4 H1))))) -H4))))))))))) c1 c2 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/defs.ma deleted file mode 100644 index 35ef17fb0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/defs.ma +++ /dev/null @@ -1,29 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/defs.ma". - -inductive csubt (g: G): C \to (C \to Prop) \def -| csubt_sort: \forall (n: nat).(csubt g (CSort n) (CSort n)) -| csubt_head: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall -(k: K).(\forall (u: T).(csubt g (CHead c1 k u) (CHead c2 k u)))))) -| csubt_void: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall -(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csubt g -(CHead c1 (Bind Void) u1) (CHead c2 (Bind b) u2)))))))) -| csubt_abst: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall -(u: T).(\forall (t: T).((ty3 g c1 u t) \to ((ty3 g c2 u t) \to (csubt g -(CHead c1 (Bind Abst) t) (CHead c2 (Bind Abbr) u)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/drop.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/drop.ma deleted file mode 100644 index 8d05e4b14..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/drop.ma +++ /dev/null @@ -1,579 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/fwd.ma". - -include "basic_1/drop/fwd.ma". - -lemma csubt_drop_flat: - \forall (g: G).(\forall (f: F).(\forall (n: nat).(\forall (c1: C).(\forall -(c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 -(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop n O c2 (CHead d2 (Flat f) u)))))))))))) -\def - \lambda (g: G).(\lambda (f: F).(\lambda (n: nat).(nat_ind (\lambda (n0: -nat).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: -C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) -u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 -c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 -(Flat f) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H -(CHead d1 (Flat f) u) (drop_gen_refl c1 (CHead d1 (Flat f) u) H0)) in (let -H_x \def (csubt_gen_flat g d1 c2 u f H1) in (let H2 \def H_x in (ex2_ind C -(\lambda (e2: C).(eq C c2 (CHead e2 (Flat f) u))) (\lambda (e2: C).(csubt g -d1 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O -c2 (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x -(Flat f) u))).(\lambda (H4: (csubt g d1 x)).(eq_ind_r C (CHead x (Flat f) u) -(\lambda (c: C).(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop O O c (CHead d2 (Flat f) u))))) (ex_intro2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Flat f) u) (CHead d2 (Flat f) -u))) x H4 (drop_refl (CHead x (Flat f) u))) c2 H3)))) H2)))))))))) (\lambda -(n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) -\to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) -\to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 -(CHead d2 (Flat f) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda -(H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall -(d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Flat f) u)) \to (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead -d2 (Flat f) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: -T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Flat f) u))).(and3_ind -(eq C (CHead d1 (Flat f) u) (CSort n1)) (eq nat (S n0) O) (eq nat O O) (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) -(CHead d2 (Flat f) u)))) (\lambda (_: (eq C (CHead d1 (Flat f) u) (CSort -n1))).(\lambda (H3: (eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 -\def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee with [O \Rightarrow -False | (S _) \Rightarrow True])) I O H3) in (False_ind (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Flat f) u)))) H5))))) (drop_gen_sort n1 (S n0) O (CHead d1 (Flat f) u) -H1)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 -c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 -(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (k: -K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: -T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Flat f) u0)) \to (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -k0 u) (CHead d2 (Flat f) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda -(d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) -(CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) -(CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 -x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) -u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) -u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Flat f) -u0) u n0 H3)))))))) (\lambda (f0: F).(\lambda (u: T).(\lambda (d1: -C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f0) u) -(CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) -u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 -x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Flat f) u0))).(ex_intro2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Flat f0) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Flat f0) n0 c3 (CHead -x (Flat f) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f0) c0 (CHead d1 -(Flat f) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: -T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) -u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: -T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S -n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Flat f) u))).(ex2_ind C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) -u))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O -(CHead c3 (Bind b) u2) (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H5: -(csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u))).(ex_intro2 -C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Bind b) u2) (CHead d2 (Flat f) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x -(Flat f) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead -d1 (Flat f) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: -T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) -u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u -t)).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda -(H5: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Flat f) -u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 -O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) -u0)))) (\lambda (x: C).(\lambda (H6: (csubt g d1 x)).(\lambda (H7: (drop n0 O -c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) -u0))) x H6 (drop_drop (Bind Abbr) n0 c3 (CHead x (Flat f) u0) H7 u))))) (H c0 -c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Flat f) u0) t n0 -H5)))))))))))))) c1 c2 H0)))))) n))). - -lemma csubt_drop_abbr: - \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csubt g -c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind -Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop -n O c2 (CHead d2 (Bind Abbr) u))))))))))) -\def - \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: -C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: -T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) -u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 -c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 -(Bind Abbr) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H -(CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H0)) in -(let H2 \def (csubt_gen_abbr g d1 c2 u H1) in (ex2_ind C (\lambda (e2: C).(eq -C c2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csubt g d1 e2)) (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 -(Bind Abbr) u)))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x (Bind Abbr) -u))).(\lambda (H4: (csubt g d1 x)).(eq_ind_r C (CHead x (Bind Abbr) u) -(\lambda (c: C).(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop O O c (CHead d2 (Bind Abbr) u))))) (ex_intro2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead -d2 (Bind Abbr) u))) x H4 (drop_refl (CHead x (Bind Abbr) u))) c2 H3)))) -H2))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: -C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 -(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))))))))))).(\lambda -(c1: C).(\lambda (c2: C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda -(c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c -(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u))))))))) (\lambda -(n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O -(CSort n1) (CHead d1 (Bind Abbr) u))).(and3_ind (eq C (CHead d1 (Bind Abbr) -u) (CSort n1)) (eq nat (S n0) O) (eq nat O O) (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) -u)))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u) (CSort n1))).(\lambda (H3: -(eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n0) -(\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H3) in (False_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) -H5))))) (drop_gen_sort n1 (S n0) O (CHead d1 (Bind Abbr) u) H1)))))) (\lambda -(c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (H2: -((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) -u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S -n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (k: K).(K_ind (\lambda -(k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O -(CHead c0 k0 u) (CHead d1 (Bind Abbr) u0)) \to (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind -Abbr) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda -(u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind -Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csubt g -d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 x)).(\lambda (H5: -(drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 -(Bind Abbr) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u0) H5 -u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abbr) u0) -u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda -(u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead d1 (Bind -Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) -(CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 -x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Flat f) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Flat f) n0 c3 (CHead -x (Bind Abbr) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f) c0 (CHead d1 -(Bind Abbr) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: -T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) -u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: -T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S -n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(ex2_ind C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 -(Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda -(x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x -(Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u))) x H5 -(drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u) H6 u2))))) (H c0 c3 H1 d1 u -(drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abbr) u) u1 n0 H4)))))))))))))) -(\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: -((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) -u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S -n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (u: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: -C).(\lambda (u0: T).(\lambda (H5: (drop (S n0) O (CHead c0 (Bind Abst) t) -(CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind -Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H6: (csubt g -d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Bind Abbr) u) (CHead d2 (Bind Abbr) u0))) x H6 (drop_drop (Bind Abbr) n0 c3 -(CHead x (Bind Abbr) u0) H7 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind -Abst) c0 (CHead d1 (Bind Abbr) u0) t n0 H5)))))))))))))) c1 c2 H0)))))) n)). - -lemma csubt_drop_abst: - \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csubt g -c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n O c1 (CHead d1 (Bind -Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop n O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n -O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) -\def - \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: -C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (t: -T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) -t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda -(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 -g d2 u t)))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g -c1 c2)).(\lambda (d1: C).(\lambda (t: T).(\lambda (H0: (drop O O c1 (CHead d1 -(Bind Abst) t))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H -(CHead d1 (Bind Abst) t) (drop_gen_refl c1 (CHead d1 (Bind Abst) t) H0)) in -(let H2 \def (csubt_gen_abst g d1 c2 t H1) in (or_ind (ex2 C (\lambda (e2: -C).(eq C c2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2))) -(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) -v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (_: -C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda (v2: T).(ty3 -g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O -O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H3: (ex2 C -(\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt -g d1 e2)))).(ex2_ind C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) t))) -(\lambda (e2: C).(csubt g d1 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) t))).(\lambda -(H5: (csubt g d1 x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c: C).(or -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead -d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c (CHead d2 (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))))) (or_introl (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind Abst) t) (CHead -d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O (CHead x (Bind Abst) t) -(CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) -(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind Abst) t) (CHead -d2 (Bind Abst) t))) x H5 (drop_refl (CHead x (Bind Abst) t)))) c2 H4)))) H3)) -(\lambda (H3: (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 -(Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) -(\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda -(v2: T).(ty3 g e2 v2 t))))).(ex4_2_ind C T (\lambda (e2: C).(\lambda (v2: -T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csubt g d1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) -(\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) -(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead -x0 (Bind Abbr) x1))).(\lambda (H5: (csubt g d1 x0)).(\lambda (H6: (ty3 g d1 -x1 t)).(\lambda (H7: (ty3 g x0 x1 t)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) -(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O -O c (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))) (or_intror (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x0 (Bind -Abbr) x1) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda -(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O (CHead x0 -(Bind Abbr) x1) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) -(ex4_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind -Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H5 (drop_refl (CHead x0 (Bind Abbr) -x1)) H6 H7)) c2 H4))))))) H3)) H2))))))))) (\lambda (n0: nat).(\lambda (H: -((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: -C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t))))))))))))).(\lambda (c1: C).(\lambda (c2: -C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: -C).(\forall (d1: C).(\forall (t: T).((drop (S n0) O c (CHead d1 (Bind Abst) -t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop -(S n0) O c0 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda -(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c0 -(CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) -(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (n1: -nat).(\lambda (d1: C).(\lambda (t: T).(\lambda (H1: (drop (S n0) O (CSort n1) -(CHead d1 (Bind Abst) t))).(and3_ind (eq C (CHead d1 (Bind Abst) t) (CSort -n1)) (eq nat (S n0) O) (eq nat O O) (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) -(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t))))) (\lambda (_: (eq C (CHead d1 (Bind Abst) t) (CSort -n1))).(\lambda (H3: (eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 -\def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee with [O \Rightarrow -False | (S _) \Rightarrow True])) I O H3) in (False_ind (or (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda -(d2: C).(\lambda (u: T).(ty3 g d2 u t))))) H5))))) (drop_gen_sort n1 (S n0) O -(CHead d1 (Bind Abst) t) H1)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda -(H1: (csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (t: T).((drop -(S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) -(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: -T).(\forall (d1: C).(\forall (t: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 -(Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u0: T).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0)))) (\lambda -(_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: -T).(ty3 g d2 u0 t)))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: -C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead -d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g -d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Bind b) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda -(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O -(CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda -(u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 -t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) -(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O -(CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -(S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: -C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 -g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: -(drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) -(CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead -c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: -T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) -O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Bind b) -n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda (H4: (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda -(u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 -t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) -(\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) -(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda -(u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) -t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H5: (csubt g d1 x0)).(\lambda (H6: (drop n0 O c3 (CHead x0 (Bind -Abbr) x1))).(\lambda (H7: (ty3 g d1 x1 t)).(\lambda (H8: (ty3 g x0 x1 -t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C -T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex4_2_intro C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -(S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: -C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 -g d2 u0 t))) x0 x1 H5 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H6 -u) H7 H8)))))))) H4)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind b) c0 (CHead d1 -(Bind Abst) t) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: -C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead -d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda -(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: -T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda -(u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 -t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S -n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda -(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda -(_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: -T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead -d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) -(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csubt -g d1 x)).(\lambda (H6: (drop (S n0) O c3 (CHead x (Bind Abst) t))).(or_introl -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O -(CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -(S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: -C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 -g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t))) x H5 -(drop_drop (Flat f) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda -(H4: (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) -(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda -(u0: T).(ty3 g d2 u0 t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 -(CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 -t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) -u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead -c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: -T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csubt g d1 x0)).(\lambda -(H6: (drop (S n0) O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g d1 x1 -t)).(\lambda (H8: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) -(CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 -t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex4_2_intro C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) -(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda -(u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Flat f) n0 c3 (CHead x0 (Bind -Abbr) x1) H6 u) H7 H8)))))))) H4)) (H2 d1 t (drop_gen_drop (Flat f) c0 (CHead -d1 (Bind Abst) t) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: -T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) -t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t)))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b -Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (t: -T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind -Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop -n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 -u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) -u2) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead -c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (H5: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop -n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda -(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O -(CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda -(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x: C).(\lambda (H6: (csubt g d1 x)).(\lambda (H7: (drop n0 O c3 -(CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) -t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind -Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g -d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 -(Bind Abst) t))) x H6 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H7 -u2)))))) H5)) (\lambda (H5: (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 -(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda -(d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex4_2_ind C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop -n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 -u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) -u2) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead -c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (csubt g d1 x0)).(\lambda -(H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g d1 x1 -t)).(\lambda (H9: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) -(CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) -(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex4_2_intro C T (\lambda -(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: -T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda -(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 -g d2 u t))) x0 x1 H6 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H7 -u2) H8 H9)))))))) H5)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind Void) c0 (CHead -d1 (Bind Abst) t) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: -T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) -t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t)))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: -(ty3 g c0 u t)).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (t0: -T).(\lambda (H5: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind -Abst) t0))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop n0 O c3 (CHead d2 (Bind Abst) t0)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g -d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -(S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: -C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 -g d2 u0 t0))))) (\lambda (H6: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0))))).(ex2_ind C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 -(Bind Abst) t0))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) -(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda -(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (x: C).(\lambda (H7: -(csubt g d1 x)).(\lambda (H8: (drop n0 O c3 (CHead x (Bind Abst) -t0))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) -(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda -(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex_intro2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) -(CHead d2 (Bind Abst) t0))) x H7 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind -Abst) t0) H8 u)))))) H6)) (\lambda (H6: (ex4_2 C T (\lambda (d2: C).(\lambda -(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 -(CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 -t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))).(ex4_2_ind C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda -(u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 -t0))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S -n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) -(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda -(u0: T).(ty3 g d2 u0 t0))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H7: -(csubt g d1 x0)).(\lambda (H8: (drop n0 O c3 (CHead x0 (Bind Abbr) -x1))).(\lambda (H9: (ty3 g d1 x1 t0)).(\lambda (H10: (ty3 g x0 x1 -t0)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) -(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda -(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex4_2_intro C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -(S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: -C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 -g d2 u0 t0))) x0 x1 H7 (drop_drop (Bind Abbr) n0 c3 (CHead x0 (Bind Abbr) x1) -H8 u) H9 H10)))))))) H6)) (H c0 c3 H1 d1 t0 (drop_gen_drop (Bind Abst) c0 -(CHead d1 (Bind Abst) t0) t n0 H5)))))))))))))) c1 c2 H0)))))) n)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/fwd.ma deleted file mode 100644 index eb571467a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/fwd.ma +++ /dev/null @@ -1,386 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/defs.ma". - -implied rec lemma csubt_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: -nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubt -g c1 c2) \to ((P c1 c2) \to (\forall (k: K).(\forall (u: T).(P (CHead c1 k u) -(CHead c2 k u))))))))) (f1: (\forall (c1: C).(\forall (c2: C).((csubt g c1 -c2) \to ((P c1 c2) \to (\forall (b: B).((not (eq B b Void)) \to (\forall (u1: -T).(\forall (u2: T).(P (CHead c1 (Bind Void) u1) (CHead c2 (Bind b) -u2))))))))))) (f2: (\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to ((P -c1 c2) \to (\forall (u: T).(\forall (t: T).((ty3 g c1 u t) \to ((ty3 g c2 u -t) \to (P (CHead c1 (Bind Abst) t) (CHead c2 (Bind Abbr) u))))))))))) (c: C) -(c0: C) (c1: csubt g c c0) on c1: P c c0 \def match c1 with [(csubt_sort n) -\Rightarrow (f n) | (csubt_head c2 c3 c4 k u) \Rightarrow (f0 c2 c3 c4 -((csubt_ind g P f f0 f1 f2) c2 c3 c4) k u) | (csubt_void c2 c3 c4 b n u1 u2) -\Rightarrow (f1 c2 c3 c4 ((csubt_ind g P f f0 f1 f2) c2 c3 c4) b n u1 u2) | -(csubt_abst c2 c3 c4 u t t0 t1) \Rightarrow (f2 c2 c3 c4 ((csubt_ind g P f f0 -f1 f2) c2 c3 c4) u t t0 t1)]. - -lemma csubt_gen_abbr: - \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).((csubt g -(CHead e1 (Bind Abbr) v) c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 -(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))))))) -\def - \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda -(H: (csubt g (CHead e1 (Bind Abbr) v) c2)).(insert_eq C (CHead e1 (Bind Abbr) -v) (\lambda (c: C).(csubt g c c2)) (\lambda (_: C).(ex2 C (\lambda (e2: -C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2)))) -(\lambda (y: C).(\lambda (H0: (csubt g y c2)).(csubt_ind g (\lambda (c: -C).(\lambda (c0: C).((eq C c (CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda -(e2: C).(eq C c0 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 -e2)))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead e1 (Bind -Abbr) v))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 -(Bind Abbr) v) H1) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CSort n) -(CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))) H2)))) (\lambda -(c1: C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C -c1 (CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 -(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (k: -K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead e1 (Bind Abbr) -v))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 -(Bind Abbr) v) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e -with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k -u) (CHead e1 (Bind Abbr) v) H3) in ((let H6 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) -(CHead c1 k u) (CHead e1 (Bind Abbr) v) H3) in (\lambda (H7: (eq K k (Bind -Abbr))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v (\lambda (t: T).(ex2 C -(\lambda (e2: C).(eq C (CHead c3 k t) (CHead e2 (Bind Abbr) v))) (\lambda -(e2: C).(csubt g e1 e2)))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 C -(\lambda (e2: C).(eq C (CHead c3 k0 v) (CHead e2 (Bind Abbr) v))) (\lambda -(e2: C).(csubt g e1 e2)))) (let H9 \def (eq_ind C c1 (\lambda (c: C).((eq C c -(CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 -(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))))) H2 e1 H8) in (let H10 -\def (eq_ind C c1 (\lambda (c: C).(csubt g c c3)) H1 e1 H8) in (ex_intro2 C -(\lambda (e2: C).(eq C (CHead c3 (Bind Abbr) v) (CHead e2 (Bind Abbr) v))) -(\lambda (e2: C).(csubt g e1 e2)) c3 (refl_equal C (CHead c3 (Bind Abbr) v)) -H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c3: -C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 (CHead e1 (Bind -Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Bind Abbr) v))) -(\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (b: B).(\lambda (_: (not (eq B -b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 -(Bind Void) u1) (CHead e1 (Bind Abbr) v))).(let H5 \def (eq_ind C (CHead c1 -(Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False -| (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0 -with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow -True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) v) H4) in -(False_ind (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind b) u2) (CHead e2 -(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))) H5))))))))))) (\lambda -(c1: C).(\lambda (c3: C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C -c1 (CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 -(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (u: -T).(\lambda (t: T).(\lambda (_: (ty3 g c1 u t)).(\lambda (_: (ty3 g c3 u -t)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abbr) -v))).(let H6 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (ee: C).(match -ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k -with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst -\Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) -I (CHead e1 (Bind Abbr) v) H5) in (False_ind (ex2 C (\lambda (e2: C).(eq C -(CHead c3 (Bind Abbr) u) (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g -e1 e2))) H6))))))))))) y c2 H0))) H))))). - -lemma csubt_gen_abst: - \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csubt g -(CHead e1 (Bind Abst) v1) c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead -e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda -(e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: -C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g -e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))))) -\def - \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda -(H: (csubt g (CHead e1 (Bind Abst) v1) c2)).(insert_eq C (CHead e1 (Bind -Abst) v1) (\lambda (c: C).(csubt g c c2)) (\lambda (_: C).(or (ex2 C (\lambda -(e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 -e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind -Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: -C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 -g e2 v2 v1)))))) (\lambda (y: C).(\lambda (H0: (csubt g y c2)).(csubt_ind g -(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind Abst) v1)) \to (or -(ex2 C (\lambda (e2: C).(eq C c0 (CHead e2 (Bind Abst) v1))) (\lambda (e2: -C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c0 -(CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 -e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) (\lambda (n: nat).(\lambda (H1: -(eq C (CSort n) (CHead e1 (Bind Abst) v1))).(let H2 \def (eq_ind C (CSort n) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) -\Rightarrow False])) I (CHead e1 (Bind Abst) v1) H1) in (False_ind (or (ex2 C -(\lambda (e2: C).(eq C (CSort n) (CHead e2 (Bind Abst) v1))) (\lambda (e2: -C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C -(CSort n) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) -(\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))) H2)))) (\lambda (c1: -C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 -(CHead e1 (Bind Abst) v1)) \to (or (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 -(Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: -C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: -C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g -e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) -(CHead e1 (Bind Abst) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match -e with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k -u) (CHead e1 (Bind Abst) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: -C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) -(CHead c1 k u) (CHead e1 (Bind Abst) v1) H3) in ((let H6 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) -\Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H3) in (\lambda -(H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v1 -(\lambda (t: T).(or (ex2 C (\lambda (e2: C).(eq C (CHead c3 k t) (CHead e2 -(Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: -C).(\lambda (v2: T).(eq C (CHead c3 k t) (CHead e2 (Bind Abbr) v2)))) -(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda -(v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1)))))) (eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2 C (\lambda (e2: -C).(eq C (CHead c3 k0 v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt -g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 k0 -v1) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 -e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))) (let H9 \def (eq_ind C c1 (\lambda -(c: C).((eq C c (CHead e1 (Bind Abst) v1)) \to (or (ex2 C (\lambda (e2: -C).(eq C c3 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) -(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind Abbr) -v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: -C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 -g e2 v2 v1))))))) H2 e1 H8) in (let H10 \def (eq_ind C c1 (\lambda (c: -C).(csubt g c c3)) H1 e1 H8) in (or_introl (ex2 C (\lambda (e2: C).(eq C -(CHead c3 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt -g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 (Bind -Abst) v1) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: -T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) -(\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex_intro2 C (\lambda -(e2: C).(eq C (CHead c3 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda -(e2: C).(csubt g e1 e2)) c3 (refl_equal C (CHead c3 (Bind Abst) v1)) H10)))) -k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda -(_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 (CHead e1 (Bind Abst) v1)) \to -(or (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Bind Abst) v1))) (\lambda -(e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C -c3 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 -e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))).(\lambda (b: B).(\lambda (_: (not -(eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead -c1 (Bind Void) u1) (CHead e1 (Bind Abst) v1))).(let H5 \def (eq_ind C (CHead -c1 (Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow -False | (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match -b0 with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow -True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abst) v1) H4) in -(False_ind (or (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind b) u2) (CHead e2 -(Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: -C).(\lambda (v2: T).(eq C (CHead c3 (Bind b) u2) (CHead e2 (Bind Abbr) v2)))) -(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda -(v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1))))) H5))))))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csubt -g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind Abst) v1)) \to (or (ex2 C -(\lambda (e2: C).(eq C c3 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt -g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 -(Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) -(\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda -(v2: T).(ty3 g e2 v2 v1)))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: -(ty3 g c1 u t)).(\lambda (H4: (ty3 g c3 u t)).(\lambda (H5: (eq C (CHead c1 -(Bind Abst) t) (CHead e1 (Bind Abst) v1))).(let H6 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow -c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H5) in ((let H7 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow t | (CHead -_ _ t0) \Rightarrow t0])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) -H5) in (\lambda (H8: (eq C c1 e1)).(let H9 \def (eq_ind T t (\lambda (t0: -T).(ty3 g c3 u t0)) H4 v1 H7) in (let H10 \def (eq_ind T t (\lambda (t0: -T).(ty3 g c1 u t0)) H3 v1 H7) in (let H11 \def (eq_ind C c1 (\lambda (c: -C).(ty3 g c u v1)) H10 e1 H8) in (let H12 \def (eq_ind C c1 (\lambda (c: -C).((eq C c (CHead e1 (Bind Abst) v1)) \to (or (ex2 C (\lambda (e2: C).(eq C -c3 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T -(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind Abbr) v2)))) -(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda -(v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 -v1))))))) H2 e1 H8) in (let H13 \def (eq_ind C c1 (\lambda (c: C).(csubt g c -c3)) H1 e1 H8) in (or_intror (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind -Abbr) u) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) -(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) -(CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 -e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex4_2_intro C T (\lambda (e2: -C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) (CHead e2 (Bind Abbr) -v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: -C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 -g e2 v2 v1))) c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H13 H11 -H9))))))))) H6))))))))))) y c2 H0))) H))))). - -lemma csubt_gen_flat: - \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).(\forall -(f: F).((csubt g (CHead e1 (Flat f) v) c2) \to (ex2 C (\lambda (e2: C).(eq C -c2 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))))))) -\def - \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda -(f: F).(\lambda (H: (csubt g (CHead e1 (Flat f) v) c2)).(insert_eq C (CHead -e1 (Flat f) v) (\lambda (c: C).(csubt g c c2)) (\lambda (_: C).(ex2 C -(\lambda (e2: C).(eq C c2 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g -e1 e2)))) (\lambda (y: C).(\lambda (H0: (csubt g y c2)).(csubt_ind g (\lambda -(c: C).(\lambda (c0: C).((eq C c (CHead e1 (Flat f) v)) \to (ex2 C (\lambda -(e2: C).(eq C c0 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 -e2)))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead e1 (Flat f) -v))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort -_) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Flat f) -v) H1) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CSort n) (CHead e2 (Flat -f) v))) (\lambda (e2: C).(csubt g e1 e2))) H2)))) (\lambda (c1: C).(\lambda -(c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 -(Flat f) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Flat f) v))) -(\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (k: K).(\lambda (u: -T).(\lambda (H3: (eq C (CHead c1 k u) (CHead e1 (Flat f) v))).(let H4 \def -(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead -c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Flat f) v) H3) in ((let H5 -\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k | -(CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) (CHead e1 (Flat f) v) H3) in -((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Flat -f) v) H3) in (\lambda (H7: (eq K k (Flat f))).(\lambda (H8: (eq C c1 -e1)).(eq_ind_r T v (\lambda (t: T).(ex2 C (\lambda (e2: C).(eq C (CHead c3 k -t) (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))) (eq_ind_r K -(Flat f) (\lambda (k0: K).(ex2 C (\lambda (e2: C).(eq C (CHead c3 k0 v) -(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))) (let H9 \def -(eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Flat f) v)) \to (ex2 C -(\lambda (e2: C).(eq C c3 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g -e1 e2))))) H2 e1 H8) in (let H10 \def (eq_ind C c1 (\lambda (c: C).(csubt g c -c3)) H1 e1 H8) in (ex_intro2 C (\lambda (e2: C).(eq C (CHead c3 (Flat f) v) -(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)) c3 (refl_equal C -(CHead c3 (Flat f) v)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: -C).(\lambda (c3: C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 -(CHead e1 (Flat f) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Flat -f) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (b: B).(\lambda (_: -(not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C -(CHead c1 (Bind Void) u1) (CHead e1 (Flat f) v))).(let H5 \def (eq_ind C -(CHead c1 (Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e1 (Flat f) v) -H4) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind b) u2) (CHead -e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2))) H5))))))))))) (\lambda -(c1: C).(\lambda (c3: C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C -c1 (CHead e1 (Flat f) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 -(Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (u: T).(\lambda -(t: T).(\lambda (_: (ty3 g c1 u t)).(\lambda (_: (ty3 g c3 u t)).(\lambda -(H5: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Flat f) v))).(let H6 \def -(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e1 (Flat f) v) -H5) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind Abbr) u) -(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2))) H6))))))))))) y c2 -H0))) H)))))). - -lemma csubt_gen_bind: - \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall -(v1: T).((csubt g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2)))))))))) -\def - \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda -(v1: T).(\lambda (H: (csubt g (CHead e1 (Bind b1) v1) c2)).(insert_eq C -(CHead e1 (Bind b1) v1) (\lambda (c: C).(csubt g c c2)) (\lambda (_: -C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 -(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csubt g e1 e2)))))) (\lambda (y: C).(\lambda (H0: (csubt g y -c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind -b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C c0 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csubt g e1 e2)))))))) (\lambda (n: nat).(\lambda (H1: (eq -C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) -\Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 -(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g -e1 e2))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 -c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T -(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 -e2)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) -(CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k -u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: -C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) -(CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) -\Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7: -(eq K k (Bind b1))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v1 (\lambda (t: -T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c3 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csubt g e1 e2)))))) (eq_ind_r K (Bind b1) (\lambda (k0: -K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c3 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csubt g e1 e2)))))) (let H9 \def (eq_ind C c1 (\lambda -(c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))))))) H2 e1 -H8) in (let H10 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c3)) H1 e1 H8) -in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq -C (CHead c3 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2)))) b1 c3 v1 (refl_equal C -(CHead c3 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: -C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 -(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2)))))))).(\lambda (b: -B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) -v1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1) -(CHead e1 (Bind b1) v1) H4) in ((let H6 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Void | (CHead _ k _) \Rightarrow -(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Void])])) -(CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) in ((let H7 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead -_ _ t) \Rightarrow t])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) -in (\lambda (H8: (eq B Void b1)).(\lambda (H9: (eq C c1 e1)).(let H10 \def -(eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C -T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind -b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 -e2))))))) H2 e1 H9) in (let H11 \def (eq_ind C c1 (\lambda (c: C).(csubt g c -c3)) H1 e1 H9) in (let H12 \def (eq_ind_r B b1 (\lambda (b0: B).((eq C e1 -(CHead e1 (Bind b0) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: -C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))))))) H10 Void H8) in -(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C -(CHead c3 (Bind b) u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda -(e2: C).(\lambda (_: T).(csubt g e1 e2)))) b c3 u2 (refl_equal C (CHead c3 -(Bind b) u2)) H11))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c3: -C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind -b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csubt g e1 e2)))))))).(\lambda (u: T).(\lambda (t: -T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (H4: (ty3 g c3 u t)).(\lambda (H5: -(eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1))).(let H6 \def -(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead -c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) -in ((let H7 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead c1 (Bind Abst) t) -(CHead e1 (Bind b1) v1) H5) in ((let H8 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0) \Rightarrow t0])) -(CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in (\lambda (H9: (eq B -Abst b1)).(\lambda (H10: (eq C c1 e1)).(let H11 \def (eq_ind T t (\lambda -(t0: T).(ty3 g c3 u t0)) H4 v1 H8) in (let H12 \def (eq_ind T t (\lambda (t0: -T).(ty3 g c1 u t0)) H3 v1 H8) in (let H13 \def (eq_ind C c1 (\lambda (c: -C).(ty3 g c u v1)) H12 e1 H10) in (let H14 \def (eq_ind C c1 (\lambda (c: -C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))))))) H2 e1 -H10) in (let H15 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c3)) H1 e1 H10) -in (let H16 \def (eq_ind_r B b1 (\lambda (b: B).((eq C e1 (CHead e1 (Bind b) -v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq -C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda -(_: T).(csubt g e1 e2))))))) H14 Abst H9) in (ex2_3_intro B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) (CHead e2 -(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g -e1 e2)))) Abbr c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H15)))))))))) -H7)) H6))))))))))) y c2 H0))) H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/getl.ma deleted file mode 100644 index 7156f6296..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/getl.ma +++ /dev/null @@ -1,417 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/clear.ma". - -include "basic_1/csubt/drop.ma". - -include "basic_1/getl/clear.ma". - -lemma csubt_getl_abbr: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall -(n: nat).((getl n c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g -c1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n -c2 (CHead d2 (Bind Abbr) u))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda -(n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abbr) u))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abbr) u) n H) in (ex2_ind C (\lambda (e: -C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) -(\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))) (\lambda (x: -C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind -Abbr) u))).(C_ind (\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 -(Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) -u))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 (CSort n0))).(\lambda -(H4: (clear (CSort n0) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 -(Bind Abbr) u) n0 H4 (\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) -u)))))))))) (\lambda (x0: C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 -(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 c2) \to (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind -Abbr) u)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: (drop n O c1 -(CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 (Bind Abbr) -u))).(K_ind (\lambda (k0: K).((drop n O c1 (CHead x0 k0 t)) \to ((clear -(CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 -c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 -(CHead d2 (Bind Abbr) u))))))))) (\lambda (b: B).(\lambda (H5: (drop n O c1 -(CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 -(Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind -Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) -t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) -(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in -((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abbr) u) -(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in -(\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: -C).(\lambda (H12: (csubt g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: -T).(drop n O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def (eq_ind_r -B b (\lambda (b0: B).(drop n O c1 (CHead x0 (Bind b0) u))) H13 Abbr H10) in -(let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop n O c1 (CHead c (Bind -Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (x1: C).(\lambda (H16: (csubt g d1 x1)).(\lambda (H17: (drop n O c2 -(CHead x1 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) x1 H16 (getl_intro n -c2 (CHead x1 (Bind Abbr) u) (CHead x1 (Bind Abbr) u) H17 (clear_bind Abbr x1 -u)))))) (csubt_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) H8)) H7))))) -(\lambda (f: F).(\lambda (H5: (drop n O c1 (CHead x0 (Flat f) t))).(\lambda -(H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 -in (unintro C c1 (\lambda (c: C).((drop n O c (CHead x0 (Flat f) t)) \to -(\forall (c2: C).((csubt g c c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))) (nat_ind (\lambda -(n0: nat).(\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall -(c2: C).((csubt g x1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (x1: -C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: -C).(\lambda (H9: (csubt g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: -C).(csubt g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat -f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abbr) u) -(clear_gen_flat f x0 (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def -(csubt_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) -H_y) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead d1 (Bind Abbr) u) e2)) -(\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: -C).(\lambda (H12: (csubt g (CHead d1 (Bind Abbr) u) x2)).(\lambda (H13: -(clear c2 x2)).(let H14 \def (csubt_gen_abbr g d1 x2 u H12) in (ex2_ind C -(\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csubt -g d1 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x3: C).(\lambda (H15: (eq C x2 -(CHead x3 (Bind Abbr) u))).(\lambda (H16: (csubt g d1 x3)).(let H17 \def -(eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) u) H15) -in (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 -(CHead d2 (Bind Abbr) u))) x3 H16 (getl_intro O c2 (CHead x3 (Bind Abbr) u) -c2 (drop_refl c2) H17)))))) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda -(H8: ((\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall -(c2: C).((csubt g x1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda (x1: -C).(\lambda (H9: (drop (S n0) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: -C).(\lambda (H10: (csubt g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 -(Flat f) t) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: -C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: -B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead x0 (Flat f) t))))) -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 -(CHead d2 (Bind Abbr) u)))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: -T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 -O x3 (CHead x0 (Flat f) t))).(let H14 \def (csubt_clear_conf g x1 c2 H10 -(CHead x3 (Bind x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead -x3 (Bind x2) x4) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (x5: C).(\lambda (H15: (csubt g (CHead x3 (Bind x2) x4) -x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def (csubt_gen_bind g x2 x3 x5 -x4 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csubt g x3 e2)))) (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda -(x6: B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 -(Bind x6) x8))).(\lambda (H19: (csubt g x3 x7)).(let H20 \def (eq_ind C x5 -(\lambda (c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 -\def (H8 x3 H13 x7 H19) in (ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (x9: C).(\lambda (H22: (csubt g d1 x9)).(\lambda (H23: (getl -n0 x7 (CHead x9 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u))) x9 H22 -(getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) u) n0 H23))))) -H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))) k H3 H4))))))) x H1 -H2)))) H0))))))). - -lemma csubt_getl_abst: - \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (t: T).(\forall -(n: nat).((getl n c1 (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g -c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (t: T).(\lambda -(n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abst) t))).(let H0 \def -(getl_gen_all c1 (CHead d1 (Bind Abst) t) n H) in (ex2_ind C (\lambda (e: -C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) t))) -(\forall (c2: C).((csubt g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))) -(\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead -d1 (Bind Abst) t))).(C_ind (\lambda (c: C).((drop n O c1 c) \to ((clear c -(CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g c1 c2) \to (or (ex2 -C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t)))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 -(CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abst) -t))).(clear_gen_sort (CHead d1 (Bind Abst) t) n0 H4 (\forall (c2: C).((csubt -g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))) (\lambda (x0: -C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 (CHead d1 (Bind Abst) t)) -\to (\forall (c2: C).((csubt g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (H3: (drop n O c1 -(CHead x0 k t0))).(\lambda (H4: (clear (CHead x0 k t0) (CHead d1 (Bind Abst) -t))).(K_ind (\lambda (k0: K).((drop n O c1 (CHead x0 k0 t0)) \to ((clear -(CHead x0 k0 t0) (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g c1 -c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n -c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 -(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda -(d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (b: B).(\lambda (H5: -(drop n O c1 (CHead x0 (Bind b) t0))).(\lambda (H6: (clear (CHead x0 (Bind b) -t0) (CHead d1 (Bind Abst) t))).(let H7 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) -(CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead -d1 (Bind Abst) t) t0 H6)) in ((let H8 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k0 _) \Rightarrow -(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) -(CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead -d1 (Bind Abst) t) t0 H6)) in ((let H9 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t1) \Rightarrow t1])) -(CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead -d1 (Bind Abst) t) t0 H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq -C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csubt g c1 c2)).(let H13 \def -(eq_ind_r T t0 (\lambda (t1: T).(drop n O c1 (CHead x0 (Bind b) t1))) H5 t -H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead x0 -(Bind b0) t))) H13 Abst H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: -C).(drop n O c1 (CHead c (Bind Abst) t))) H14 d1 H11) in (or_ind (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (H16: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop n O c2 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))) -(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 -(CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 -(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda -(d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: C).(\lambda (H17: -(csubt g d1 x1)).(\lambda (H18: (drop n O c2 (CHead x1 (Bind Abst) -t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) -t))) x1 H17 (getl_intro n c2 (CHead x1 (Bind Abst) t) (CHead x1 (Bind Abst) -t) H18 (clear_bind Abst x1 t))))))) H16)) (\lambda (H16: (ex4_2 C T (\lambda -(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: -T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) -(\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: -C).(\lambda (x2: T).(\lambda (H17: (csubt g d1 x1)).(\lambda (H18: (drop n O -c2 (CHead x1 (Bind Abbr) x2))).(\lambda (H19: (ty3 g d1 x2 t)).(\lambda (H20: -(ty3 g x1 x2 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex4_2_intro C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x1 x2 -H17 (getl_intro n c2 (CHead x1 (Bind Abbr) x2) (CHead x1 (Bind Abbr) x2) H18 -(clear_bind Abbr x1 x2)) H19 H20)))))))) H16)) (csubt_drop_abst g n c1 c2 H12 -d1 t H15)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop n O c1 -(CHead x0 (Flat f) t0))).(\lambda (H6: (clear (CHead x0 (Flat f) t0) (CHead -d1 (Bind Abst) t))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop n -O c (CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csubt g c c2) \to (or (ex2 -C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t))))))))) (nat_ind (\lambda (n0: nat).(\forall (x1: -C).((drop n0 O x1 (CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csubt g x1 -c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl -n0 c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 -(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda -(d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (x1: C).(\lambda -(H8: (drop O O x1 (CHead x0 (Flat f) t0))).(\lambda (c2: C).(\lambda (H9: -(csubt g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: C).(csubt g c c2)) -H9 (CHead x0 (Flat f) t0) (drop_gen_refl x1 (CHead x0 (Flat f) t0) H8)) in -(let H_y \def (clear_flat x0 (CHead d1 (Bind Abst) t) (clear_gen_flat f x0 -(CHead d1 (Bind Abst) t) t0 H6) f t0) in (let H11 \def (csubt_clear_conf g -(CHead x0 (Flat f) t0) c2 H10 (CHead d1 (Bind Abst) t) H_y) in (ex2_ind C -(\lambda (e2: C).(csubt g (CHead d1 (Bind Abst) t) e2)) (\lambda (e2: -C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u -t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: -C).(\lambda (H12: (csubt g (CHead d1 (Bind Abst) t) x2)).(\lambda (H13: -(clear c2 x2)).(let H14 \def (csubt_gen_abst g d1 x2 t H12) in (or_ind (ex2 C -(\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt -g d1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 -(Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) -(\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda -(v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda -(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: -T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (H15: (ex2 C (\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) -(\lambda (e2: C).(csubt g d1 e2)))).(ex2_ind C (\lambda (e2: C).(eq C x2 -(CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2)) (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind -Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) -(\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead x3 -(Bind Abst) t))).(\lambda (H17: (csubt g d1 x3)).(let H18 \def (eq_ind C x2 -(\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) t) H16) in (or_introl -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead -d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t))) x3 H17 (getl_intro O -c2 (CHead x3 (Bind Abst) t) c2 (drop_refl c2) H18))))))) H15)) (\lambda (H15: -(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 (Bind Abbr) -v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (_: -C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda (v2: T).(ty3 -g e2 v2 t))))).(ex4_2_ind C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 -(CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 -e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: -C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C x2 (CHead x3 (Bind -Abbr) x4))).(\lambda (H17: (csubt g d1 x3)).(\lambda (H18: (ty3 g d1 x4 -t)).(\lambda (H19: (ty3 g x3 x4 t)).(let H20 \def (eq_ind C x2 (\lambda (c: -C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) x4) H16) in (or_intror (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind -Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) -(\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t)))) (ex4_2_intro C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 -(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda -(d2: C).(\lambda (u: T).(ty3 g d2 u t))) x3 x4 H17 (getl_intro O c2 (CHead x3 -(Bind Abbr) x4) c2 (drop_refl c2) H20) H18 H19))))))))) H15)) H14))))) -H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x1: C).((drop n0 O x1 -(CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csubt g x1 c2) \to (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 -(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t))))))))))).(\lambda (x1: C).(\lambda (H9: -(drop (S n0) O x1 (CHead x0 (Flat f) t0))).(\lambda (c2: C).(\lambda (H10: -(csubt g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t0) n0 H9) -in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 -(CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: -T).(drop n0 O e (CHead x0 (Flat f) t0))))) (or (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 -C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: -(clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 O x3 (CHead x0 -(Flat f) t0))).(let H14 \def (csubt_clear_conf g x1 c2 H10 (CHead x3 (Bind -x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead x3 (Bind x2) x4) -e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda -(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x5: C).(\lambda (H15: (csubt g (CHead x3 (Bind x2) x4) -x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def (csubt_gen_bind g x2 x3 x5 -x4 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csubt g x3 e2)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda -(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x6: B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 -(CHead x7 (Bind x6) x8))).(\lambda (H19: (csubt g x3 x7)).(let H20 \def -(eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) -in (let H21 \def (H8 x3 H13 x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: -T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 -(CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead -d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) -(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H22: (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 -(Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(getl n0 x7 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 -C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))))) (\lambda (x9: C).(\lambda (H23: (csubt g d1 x9)).(\lambda (H24: -(getl n0 x7 (CHead x9 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) -t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda -(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 -g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(getl (S n0) c2 (CHead d2 (Bind Abst) t))) x9 H23 (getl_clear_bind x6 c2 -x7 x8 H20 (CHead x9 (Bind Abst) t) n0 H24)))))) H22)) (\lambda (H22: (ex4_2 C -T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) -(\lambda (d2: C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl -(S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g -d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x9: -C).(\lambda (x10: T).(\lambda (H23: (csubt g d1 x9)).(\lambda (H24: (getl n0 -x7 (CHead x9 (Bind Abbr) x10))).(\lambda (H25: (ty3 g d1 x10 t)).(\lambda -(H26: (ty3 g x9 x10 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda -(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) -(ex4_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda -(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 -g d2 u t))) x9 x10 H23 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) -x10) n0 H24) H25 H26)))))))) H22)) H21)))))))) H17))))) H14))))))) -H11)))))))) n) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/pc3.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/pc3.ma deleted file mode 100644 index 60a4452e3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/pc3.ma +++ /dev/null @@ -1,56 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/getl.ma". - -include "basic_1/pc3/left.ma". - -lemma csubt_pr2: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 -t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (pr2 c2 t1 t2))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pr2 c1 t1 t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0: -T).(\forall (c2: C).((csubt g c c2) \to (pr2 c2 t t0)))))) (\lambda (c: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (c2: -C).(\lambda (_: (csubt g c c2)).(pr2_free c2 t3 t4 H0))))))) (\lambda (c: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c -(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: -(pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c2: -C).(\lambda (H3: (csubt g c c2)).(let H4 \def (csubt_getl_abbr g c d u i H0 -c2 H3) in (ex2_ind C (\lambda (d2: C).(csubt g d d2)) (\lambda (d2: C).(getl -i c2 (CHead d2 (Bind Abbr) u))) (pr2 c2 t3 t) (\lambda (x: C).(\lambda (_: -(csubt g d x)).(\lambda (H6: (getl i c2 (CHead x (Bind Abbr) u))).(pr2_delta -c2 x u i H6 t3 t4 H1 t H2)))) H4)))))))))))))) c1 t1 t2 H))))). - -lemma csubt_pc3: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1 -t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (pc3 c2 t1 t2))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pc3 c1 t1 t2)).(pc3_ind_left c1 (\lambda (t: T).(\lambda (t0: -T).(\forall (c2: C).((csubt g c1 c2) \to (pc3 c2 t t0))))) (\lambda (t: -T).(\lambda (c2: C).(\lambda (_: (csubt g c1 c2)).(pc3_refl c2 t)))) (\lambda -(t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c1 t0 t3)).(\lambda (t4: -T).(\lambda (_: (pc3 c1 t3 t4)).(\lambda (H2: ((\forall (c2: C).((csubt g c1 -c2) \to (pc3 c2 t3 t4))))).(\lambda (c2: C).(\lambda (H3: (csubt g c1 -c2)).(pc3_t t3 c2 t0 (pc3_pr2_r c2 t0 t3 (csubt_pr2 g c1 t0 t3 H0 c2 H3)) t4 -(H2 c2 H3)))))))))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c1 -t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3 c1 t0 t4)).(\lambda (H2: ((\forall -(c2: C).((csubt g c1 c2) \to (pc3 c2 t0 t4))))).(\lambda (c2: C).(\lambda -(H3: (csubt g c1 c2)).(pc3_t t0 c2 t3 (pc3_pr2_x c2 t3 t0 (csubt_pr2 g c1 t0 -t3 H0 c2 H3)) t4 (H2 c2 H3)))))))))) t1 t2 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/props.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/props.ma deleted file mode 100644 index 31221463f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/props.ma +++ /dev/null @@ -1,27 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/defs.ma". - -include "basic_1/C/fwd.ma". - -lemma csubt_refl: - \forall (g: G).(\forall (c: C).(csubt g c c)) -\def - \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csubt g c0 c0)) -(\lambda (n: nat).(csubt_sort g n)) (\lambda (c0: C).(\lambda (H: (csubt g c0 -c0)).(\lambda (k: K).(\lambda (t: T).(csubt_head g c0 c0 H k t))))) c)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubt/ty3.ma b/matita/matita/contribs/lambdadelta/basic_1/csubt/ty3.ma deleted file mode 100644 index 7b3094bd1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubt/ty3.ma +++ /dev/null @@ -1,98 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/pc3.ma". - -include "basic_1/csubt/props.ma". - -include "basic_1/ty3/fwd.ma". - -lemma csubt_ty3: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 -t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (ty3 g c2 t1 t2))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g c1 t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda -(t0: T).(\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t t0)))))) (\lambda -(c: C).(\lambda (t0: T).(\lambda (t: T).(\lambda (_: (ty3 g c t0 t)).(\lambda -(H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t0 t))))).(\lambda (u: -T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (c2: -C).((csubt g c c2) \to (ty3 g c2 u t3))))).(\lambda (H4: (pc3 c t3 -t0)).(\lambda (c2: C).(\lambda (H5: (csubt g c c2)).(ty3_conv g c2 t0 t (H1 -c2 H5) u t3 (H3 c2 H5) (csubt_pc3 g c t3 t0 H4 c2 H5)))))))))))))) (\lambda -(c: C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (csubt g c -c2)).(ty3_sort g c2 m))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda -(t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((csubt g -d c2) \to (ty3 g c2 u t))))).(\lambda (c2: C).(\lambda (H3: (csubt g c -c2)).(let H4 \def (csubt_getl_abbr g c d u n H0 c2 H3) in (ex2_ind C (\lambda -(d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) -u))) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x: C).(\lambda (H5: -(csubt g d x)).(\lambda (H6: (getl n c2 (CHead x (Bind Abbr) u))).(ty3_abbr g -n c2 x u H6 t (H2 x H5))))) H4)))))))))))) (\lambda (n: nat).(\lambda (c: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind -Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: -((\forall (c2: C).((csubt g d c2) \to (ty3 g c2 u t))))).(\lambda (c2: -C).(\lambda (H3: (csubt g c c2)).(let H4 \def (csubt_getl_abst g c d u n H0 -c2 H3) in (or_ind (ex2 C (\lambda (d2: C).(csubt g d d2)) (\lambda (d2: -C).(getl n c2 (CHead d2 (Bind Abst) u)))) (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n -c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d u0 -u))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u)))) (ty3 g c2 (TLRef n) -(lift (S n) O u)) (\lambda (H5: (ex2 C (\lambda (d2: C).(csubt g d d2)) -(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))))).(ex2_ind C (\lambda -(d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) -u))) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x: C).(\lambda (H6: -(csubt g d x)).(\lambda (H7: (getl n c2 (CHead x (Bind Abst) u))).(ty3_abst g -n c2 x u H7 t (H2 x H6))))) H5)) (\lambda (H5: (ex4_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n -c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d u0 -u))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u))))).(ex4_2_ind C T -(\lambda (d2: C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda -(u0: T).(getl n c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: -T).(ty3 g d u0 u))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u))) (ty3 -g c2 (TLRef n) (lift (S n) O u)) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(_: (csubt g d x0)).(\lambda (H7: (getl n c2 (CHead x0 (Bind Abbr) -x1))).(\lambda (_: (ty3 g d x1 u)).(\lambda (H9: (ty3 g x0 x1 u)).(ty3_abbr g -n c2 x0 x1 H7 u H9))))))) H5)) H4)))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (t: T).(\lambda (_: (ty3 g c u t)).(\lambda (H1: ((\forall (c2: -C).((csubt g c c2) \to (ty3 g c2 u t))))).(\lambda (b: B).(\lambda (t0: -T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t0 t3)).(\lambda -(H3: ((\forall (c2: C).((csubt g (CHead c (Bind b) u) c2) \to (ty3 g c2 t0 -t3))))).(\lambda (c2: C).(\lambda (H4: (csubt g c c2)).(ty3_bind g c2 u t (H1 -c2 H4) b t0 t3 (H3 (CHead c2 (Bind b) u) (csubt_head g c c2 H4 (Bind b) -u))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: -(ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 -w u))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead (Bind -Abst) u t))).(\lambda (H3: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 v -(THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (csubt g c -c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c: -C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t0 t3)).(\lambda -(H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t0 t3))))).(\lambda (t4: -T).(\lambda (_: (ty3 g c t3 t4)).(\lambda (H3: ((\forall (c2: C).((csubt g c -c2) \to (ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (csubt g c -c2)).(ty3_cast g c2 t0 t3 (H1 c2 H4) t4 (H3 c2 H4)))))))))))) c1 t1 t2 H))))). - -lemma csubt_ty3_ld: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (v: T).((ty3 g c u -v) \to (\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c (Bind Abst) v) t1 -t2) \to (ty3 g (CHead c (Bind Abbr) u) t1 t2)))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (H: -(ty3 g c u v)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (ty3 g (CHead -c (Bind Abst) v) t1 t2)).(csubt_ty3 g (CHead c (Bind Abst) v) t1 t2 H0 (CHead -c (Bind Abbr) u) (csubt_abst g c c (csubt_refl g c) u v H H))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/clear.ma b/matita/matita/contribs/lambdadelta/basic_1/csubv/clear.ma deleted file mode 100644 index 4f4a01272..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/clear.ma +++ /dev/null @@ -1,179 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubv/fwd.ma". - -include "basic_1/clear/fwd.ma". - -lemma csubv_clear_conf: - \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b1: -B).(\forall (d1: C).(\forall (v1: T).((clear c1 (CHead d1 (Bind b1) v1)) \to -(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 -d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(clear c2 (CHead d2 -(Bind b2) v2)))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(csubv_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (b1: B).(\forall (d1: C).(\forall -(v1: T).((clear c (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: -B).(\lambda (d2: C).(\lambda (v2: T).(clear c0 (CHead d2 (Bind b2) -v2)))))))))))) (\lambda (n: nat).(\lambda (b1: B).(\lambda (d1: C).(\lambda -(v1: T).(\lambda (H0: (clear (CSort n) (CHead d1 (Bind b1) -v1))).(clear_gen_sort (CHead d1 (Bind b1) v1) n H0 (ex2_3 B C T (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: -B).(\lambda (d2: C).(\lambda (v2: T).(clear (CSort n) (CHead d2 (Bind b2) -v2)))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 -c4)).(\lambda (_: ((\forall (b1: B).(\forall (d1: C).(\forall (v1: T).((clear -c3 (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: B).(\lambda (d2: -C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: -C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind b2) v2)))))))))))).(\lambda -(v1: T).(\lambda (v2: T).(\lambda (b1: B).(\lambda (d1: C).(\lambda (v0: -T).(\lambda (H2: (clear (CHead c3 (Bind Void) v1) (CHead d1 (Bind b1) -v0))).(let H3 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b1) v0) -(CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind b1) v0) v1 -H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow b1 | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow b1])])) (CHead d1 (Bind b1) v0) (CHead -c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind b1) v0) v1 H2)) in -((let H5 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b1) v0) -(CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind b1) v0) v1 -H2)) in (\lambda (_: (eq B b1 Void)).(\lambda (H7: (eq C d1 c3)).(eq_ind_r C -c3 (\lambda (c: C).(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: -T).(csubv c d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear -(CHead c4 (Bind Void) v2) (CHead d2 (Bind b2) v3))))))) (ex2_3_intro B C T -(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv c3 d2)))) (\lambda -(b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Bind Void) v2) -(CHead d2 (Bind b2) v3))))) Void c4 v2 H0 (clear_bind Void c4 v2)) d1 H7)))) -H4)) H3)))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 -c4)).(\lambda (_: ((\forall (b1: B).(\forall (d1: C).(\forall (v1: T).((clear -c3 (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: B).(\lambda (d2: -C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: -C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind b2) v2)))))))))))).(\lambda -(b1: B).(\lambda (_: (not (eq B b1 Void))).(\lambda (b2: B).(\lambda (v1: -T).(\lambda (v2: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (v0: -T).(\lambda (H3: (clear (CHead c3 (Bind b1) v1) (CHead d1 (Bind b0) -v0))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b0) v0) -(CHead c3 (Bind b1) v1) (clear_gen_bind b1 c3 (CHead d1 (Bind b0) v0) v1 H3)) -in ((let H5 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow b0 | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead d1 (Bind b0) v0) (CHead -c3 (Bind b1) v1) (clear_gen_bind b1 c3 (CHead d1 (Bind b0) v0) v1 H3)) in -((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b0) v0) -(CHead c3 (Bind b1) v1) (clear_gen_bind b1 c3 (CHead d1 (Bind b0) v0) v1 H3)) -in (\lambda (_: (eq B b0 b1)).(\lambda (H8: (eq C d1 c3)).(eq_ind_r C c3 -(\lambda (c: C).(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: -T).(csubv c d2)))) (\lambda (b3: B).(\lambda (d2: C).(\lambda (v3: T).(clear -(CHead c4 (Bind b2) v2) (CHead d2 (Bind b3) v3))))))) (ex2_3_intro B C T -(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv c3 d2)))) (\lambda -(b3: B).(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Bind b2) v2) -(CHead d2 (Bind b3) v3))))) b2 c4 v2 H0 (clear_bind b2 c4 v2)) d1 H8)))) H5)) -H4))))))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubv c3 -c4)).(\lambda (H1: ((\forall (b1: B).(\forall (d1: C).(\forall (v1: -T).((clear c3 (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: -B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: -B).(\lambda (d2: C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind b2) -v2)))))))))))).(\lambda (f1: F).(\lambda (f2: F).(\lambda (v1: T).(\lambda -(v2: T).(\lambda (b1: B).(\lambda (d1: C).(\lambda (v0: T).(\lambda (H2: -(clear (CHead c3 (Flat f1) v1) (CHead d1 (Bind b1) v0))).(let H_x \def (H1 b1 -d1 v0 (clear_gen_flat f1 c3 (CHead d1 (Bind b1) v0) v1 H2)) in (let H3 \def -H_x in (ex2_3_ind B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear -c4 (CHead d2 (Bind b2) v3))))) (ex2_3 B C T (\lambda (_: B).(\lambda (d2: -C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: -C).(\lambda (v3: T).(clear (CHead c4 (Flat f2) v2) (CHead d2 (Bind b2) -v3)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H4: -(csubv d1 x1)).(\lambda (H5: (clear c4 (CHead x1 (Bind x0) x2))).(ex2_3_intro -B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) -(\lambda (b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Flat f2) -v2) (CHead d2 (Bind b2) v3))))) x0 x1 x2 H4 (clear_flat c4 (CHead x1 (Bind -x0) x2) H5 f2 v2))))))) H3))))))))))))))) c1 c2 H))). - -lemma csubv_clear_conf_void: - \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (d1: -C).(\forall (v1: T).((clear c1 (CHead d1 (Bind Void) v1)) \to (ex2_2 C T -(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda -(v2: T).(clear c2 (CHead d2 (Bind Void) v2)))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(csubv_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (v1: T).((clear c -(CHead d1 (Bind Void) v1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear c0 (CHead d2 -(Bind Void) v2)))))))))) (\lambda (n: nat).(\lambda (d1: C).(\lambda (v1: -T).(\lambda (H0: (clear (CSort n) (CHead d1 (Bind Void) v1))).(clear_gen_sort -(CHead d1 (Bind Void) v1) n H0 (ex2_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear (CSort n) (CHead -d2 (Bind Void) v2)))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: -(csubv c3 c4)).(\lambda (_: ((\forall (d1: C).(\forall (v1: T).((clear c3 -(CHead d1 (Bind Void) v1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear c4 (CHead d2 -(Bind Void) v2)))))))))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (d1: -C).(\lambda (v0: T).(\lambda (H2: (clear (CHead c3 (Bind Void) v1) (CHead d1 -(Bind Void) v0))).(let H3 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind -Void) v0) (CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind -Void) v0) v1 H2)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e with -[(CSort _) \Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind -Void) v0) (CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind -Void) v0) v1 H2)) in (\lambda (H5: (eq C d1 c3)).(eq_ind_r C c3 (\lambda (c: -C).(ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv c d2))) (\lambda (d2: -C).(\lambda (v3: T).(clear (CHead c4 (Bind Void) v2) (CHead d2 (Bind Void) -v3)))))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubv c3 d2))) -(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Bind Void) v2) (CHead d2 -(Bind Void) v3)))) c4 v2 H0 (clear_bind Void c4 v2)) d1 H5))) H3))))))))))) -(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubv c3 c4)).(\lambda (_: -((\forall (d1: C).(\forall (v1: T).((clear c3 (CHead d1 (Bind Void) v1)) \to -(ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: -C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind Void) v2)))))))))).(\lambda -(b1: B).(\lambda (H2: (not (eq B b1 Void))).(\lambda (b2: B).(\lambda (v1: -T).(\lambda (v2: T).(\lambda (d1: C).(\lambda (v0: T).(\lambda (H3: (clear -(CHead c3 (Bind b1) v1) (CHead d1 (Bind Void) v0))).(let H4 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) -\Rightarrow c])) (CHead d1 (Bind Void) v0) (CHead c3 (Bind b1) v1) -(clear_gen_bind b1 c3 (CHead d1 (Bind Void) v0) v1 H3)) in ((let H5 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Void | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Void])])) (CHead d1 (Bind Void) v0) (CHead c3 (Bind b1) v1) -(clear_gen_bind b1 c3 (CHead d1 (Bind Void) v0) v1 H3)) in ((let H6 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v0 | (CHead -_ _ t) \Rightarrow t])) (CHead d1 (Bind Void) v0) (CHead c3 (Bind b1) v1) -(clear_gen_bind b1 c3 (CHead d1 (Bind Void) v0) v1 H3)) in (\lambda (H7: (eq -B Void b1)).(\lambda (H8: (eq C d1 c3)).(eq_ind_r C c3 (\lambda (c: C).(ex2_2 -C T (\lambda (d2: C).(\lambda (_: T).(csubv c d2))) (\lambda (d2: C).(\lambda -(v3: T).(clear (CHead c4 (Bind b2) v2) (CHead d2 (Bind Void) v3)))))) (let H9 -\def (eq_ind_r B b1 (\lambda (b: B).(not (eq B b Void))) H2 Void H7) in (let -H10 \def (match (H9 (refl_equal B Void)) in False with []) in H10)) d1 H8)))) -H5)) H4)))))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubv -c3 c4)).(\lambda (H1: ((\forall (d1: C).(\forall (v1: T).((clear c3 (CHead d1 -(Bind Void) v1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 -d2))) (\lambda (d2: C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind Void) -v2)))))))))).(\lambda (f1: F).(\lambda (f2: F).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (d1: C).(\lambda (v0: T).(\lambda (H2: (clear (CHead c3 (Flat f1) -v1) (CHead d1 (Bind Void) v0))).(let H_x \def (H1 d1 v0 (clear_gen_flat f1 c3 -(CHead d1 (Bind Void) v0) v1 H2)) in (let H3 \def H_x in (ex2_2_ind C T -(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda -(v3: T).(clear c4 (CHead d2 (Bind Void) v3)))) (ex2_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v3: T).(clear -(CHead c4 (Flat f2) v2) (CHead d2 (Bind Void) v3))))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H4: (csubv d1 x0)).(\lambda (H5: (clear c4 -(CHead x0 (Bind Void) x1))).(ex2_2_intro C T (\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Flat -f2) v2) (CHead d2 (Bind Void) v3)))) x0 x1 H4 (clear_flat c4 (CHead x0 (Bind -Void) x1) H5 f2 v2)))))) H3)))))))))))))) c1 c2 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/csubv/defs.ma deleted file mode 100644 index fe704a1ac..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/defs.ma +++ /dev/null @@ -1,30 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -inductive csubv: C \to (C \to Prop) \def -| csubv_sort: \forall (n: nat).(csubv (CSort n) (CSort n)) -| csubv_void: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall -(v1: T).(\forall (v2: T).(csubv (CHead c1 (Bind Void) v1) (CHead c2 (Bind -Void) v2)))))) -| csubv_bind: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall -(b1: B).((not (eq B b1 Void)) \to (\forall (b2: B).(\forall (v1: T).(\forall -(v2: T).(csubv (CHead c1 (Bind b1) v1) (CHead c2 (Bind b2) v2))))))))) -| csubv_flat: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall -(f1: F).(\forall (f2: F).(\forall (v1: T).(\forall (v2: T).(csubv (CHead c1 -(Flat f1) v1) (CHead c2 (Flat f2) v2)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/drop.ma b/matita/matita/contribs/lambdadelta/basic_1/csubv/drop.ma deleted file mode 100644 index 0fb7bbceb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/drop.ma +++ /dev/null @@ -1,114 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubv/props.ma". - -include "basic_1/csubv/fwd.ma". - -include "basic_1/drop/fwd.ma". - -lemma csubv_drop_conf: - \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (e1: -C).(\forall (h: nat).((drop h O c1 e1) \to (ex2 C (\lambda (e2: C).(csubv e1 -e2)) (\lambda (e2: C).(drop h O c2 e2)))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(csubv_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).(\forall (h: nat).((drop h -O c e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O -c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (h: nat).(\lambda -(H0: (drop h O (CSort n) e1)).(and3_ind (eq C e1 (CSort n)) (eq nat h O) (eq -nat O O) (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O -(CSort n) e2))) (\lambda (H1: (eq C e1 (CSort n))).(\lambda (H2: (eq nat h -O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C -(\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop n0 O (CSort n) e2)))) -(eq_ind_r C (CSort n) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubv c e2)) -(\lambda (e2: C).(drop O O (CSort n) e2)))) (ex_intro2 C (\lambda (e2: -C).(csubv (CSort n) e2)) (\lambda (e2: C).(drop O O (CSort n) e2)) (CSort n) -(csubv_refl (CSort n)) (drop_refl (CSort n))) e1 H1) h H2)))) (drop_gen_sort -n h O e1 H0)))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 -c4)).(\lambda (H1: ((\forall (e1: C).(\forall (h: nat).((drop h O c3 e1) \to -(ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O c4 -e2)))))))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (e1: C).(\lambda (h: -nat).(\lambda (H2: (drop h O (CHead c3 (Bind Void) v1) e1)).(nat_ind (\lambda -(n: nat).((drop n O (CHead c3 (Bind Void) v1) e1) \to (ex2 C (\lambda (e2: -C).(csubv e1 e2)) (\lambda (e2: C).(drop n O (CHead c4 (Bind Void) v2) -e2))))) (\lambda (H3: (drop O O (CHead c3 (Bind Void) v1) e1)).(eq_ind C -(CHead c3 (Bind Void) v1) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubv c -e2)) (\lambda (e2: C).(drop O O (CHead c4 (Bind Void) v2) e2)))) (ex_intro2 C -(\lambda (e2: C).(csubv (CHead c3 (Bind Void) v1) e2)) (\lambda (e2: C).(drop -O O (CHead c4 (Bind Void) v2) e2)) (CHead c4 (Bind Void) v2) (csubv_bind_same -c3 c4 H0 Void v1 v2) (drop_refl (CHead c4 (Bind Void) v2))) e1 (drop_gen_refl -(CHead c3 (Bind Void) v1) e1 H3))) (\lambda (h0: nat).(\lambda (_: (((drop h0 -O (CHead c3 (Bind Void) v1) e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) -(\lambda (e2: C).(drop h0 O (CHead c4 (Bind Void) v2) e2)))))).(\lambda (H3: -(drop (S h0) O (CHead c3 (Bind Void) v1) e1)).(let H_x \def (H1 e1 (r (Bind -Void) h0) (drop_gen_drop (Bind Void) c3 e1 v1 h0 H3)) in (let H4 \def H_x in -(ex2_ind C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h0 O c4 -e2)) (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop (S h0) O -(CHead c4 (Bind Void) v2) e2))) (\lambda (x: C).(\lambda (H5: (csubv e1 -x)).(\lambda (H6: (drop h0 O c4 x)).(ex_intro2 C (\lambda (e2: C).(csubv e1 -e2)) (\lambda (e2: C).(drop (S h0) O (CHead c4 (Bind Void) v2) e2)) x H5 -(drop_drop (Bind Void) h0 c4 x H6 v2))))) H4)))))) h H2)))))))))) (\lambda -(c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 c4)).(\lambda (H1: ((\forall -(e1: C).(\forall (h: nat).((drop h O c3 e1) \to (ex2 C (\lambda (e2: -C).(csubv e1 e2)) (\lambda (e2: C).(drop h O c4 e2)))))))).(\lambda (b1: -B).(\lambda (H2: (not (eq B b1 Void))).(\lambda (b2: B).(\lambda (v1: -T).(\lambda (v2: T).(\lambda (e1: C).(\lambda (h: nat).(\lambda (H3: (drop h -O (CHead c3 (Bind b1) v1) e1)).(nat_ind (\lambda (n: nat).((drop n O (CHead -c3 (Bind b1) v1) e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: -C).(drop n O (CHead c4 (Bind b2) v2) e2))))) (\lambda (H4: (drop O O (CHead -c3 (Bind b1) v1) e1)).(eq_ind C (CHead c3 (Bind b1) v1) (\lambda (c: C).(ex2 -C (\lambda (e2: C).(csubv c e2)) (\lambda (e2: C).(drop O O (CHead c4 (Bind -b2) v2) e2)))) (ex_intro2 C (\lambda (e2: C).(csubv (CHead c3 (Bind b1) v1) -e2)) (\lambda (e2: C).(drop O O (CHead c4 (Bind b2) v2) e2)) (CHead c4 (Bind -b2) v2) (csubv_bind c3 c4 H0 b1 H2 b2 v1 v2) (drop_refl (CHead c4 (Bind b2) -v2))) e1 (drop_gen_refl (CHead c3 (Bind b1) v1) e1 H4))) (\lambda (h0: -nat).(\lambda (_: (((drop h0 O (CHead c3 (Bind b1) v1) e1) \to (ex2 C -(\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h0 O (CHead c4 (Bind -b2) v2) e2)))))).(\lambda (H4: (drop (S h0) O (CHead c3 (Bind b1) v1) -e1)).(let H_x \def (H1 e1 (r (Bind b1) h0) (drop_gen_drop (Bind b1) c3 e1 v1 -h0 H4)) in (let H5 \def H_x in (ex2_ind C (\lambda (e2: C).(csubv e1 e2)) -(\lambda (e2: C).(drop h0 O c4 e2)) (ex2 C (\lambda (e2: C).(csubv e1 e2)) -(\lambda (e2: C).(drop (S h0) O (CHead c4 (Bind b2) v2) e2))) (\lambda (x: -C).(\lambda (H6: (csubv e1 x)).(\lambda (H7: (drop h0 O c4 x)).(ex_intro2 C -(\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop (S h0) O (CHead c4 -(Bind b2) v2) e2)) x H6 (drop_drop (Bind b2) h0 c4 x H7 v2))))) H5)))))) h -H3))))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 -c4)).(\lambda (H1: ((\forall (e1: C).(\forall (h: nat).((drop h O c3 e1) \to -(ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O c4 -e2)))))))).(\lambda (f1: F).(\lambda (f2: F).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (e1: C).(\lambda (h: nat).(\lambda (H2: (drop h O (CHead c3 (Flat -f1) v1) e1)).(nat_ind (\lambda (n: nat).((drop n O (CHead c3 (Flat f1) v1) -e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop n O -(CHead c4 (Flat f2) v2) e2))))) (\lambda (H3: (drop O O (CHead c3 (Flat f1) -v1) e1)).(eq_ind C (CHead c3 (Flat f1) v1) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csubv c e2)) (\lambda (e2: C).(drop O O (CHead c4 (Flat f2) v2) -e2)))) (ex_intro2 C (\lambda (e2: C).(csubv (CHead c3 (Flat f1) v1) e2)) -(\lambda (e2: C).(drop O O (CHead c4 (Flat f2) v2) e2)) (CHead c4 (Flat f2) -v2) (csubv_flat c3 c4 H0 f1 f2 v1 v2) (drop_refl (CHead c4 (Flat f2) v2))) e1 -(drop_gen_refl (CHead c3 (Flat f1) v1) e1 H3))) (\lambda (h0: nat).(\lambda -(_: (((drop h0 O (CHead c3 (Flat f1) v1) e1) \to (ex2 C (\lambda (e2: -C).(csubv e1 e2)) (\lambda (e2: C).(drop h0 O (CHead c4 (Flat f2) v2) -e2)))))).(\lambda (H3: (drop (S h0) O (CHead c3 (Flat f1) v1) e1)).(let H_x -\def (H1 e1 (r (Flat f1) h0) (drop_gen_drop (Flat f1) c3 e1 v1 h0 H3)) in -(let H4 \def H_x in (ex2_ind C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: -C).(drop (S h0) O c4 e2)) (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda -(e2: C).(drop (S h0) O (CHead c4 (Flat f2) v2) e2))) (\lambda (x: C).(\lambda -(H5: (csubv e1 x)).(\lambda (H6: (drop (S h0) O c4 x)).(ex_intro2 C (\lambda -(e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop (S h0) O (CHead c4 (Flat f2) -v2) e2)) x H5 (drop_drop (Flat f2) h0 c4 x H6 v2))))) H4)))))) h -H2)))))))))))) c1 c2 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/csubv/fwd.ma deleted file mode 100644 index 23883b412..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/fwd.ma +++ /dev/null @@ -1,35 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubv/defs.ma". - -implied rec lemma csubv_ind (P: (C \to (C \to Prop))) (f: (\forall (n: -nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubv -c1 c2) \to ((P c1 c2) \to (\forall (v1: T).(\forall (v2: T).(P (CHead c1 -(Bind Void) v1) (CHead c2 (Bind Void) v2))))))))) (f1: (\forall (c1: -C).(\forall (c2: C).((csubv c1 c2) \to ((P c1 c2) \to (\forall (b1: B).((not -(eq B b1 Void)) \to (\forall (b2: B).(\forall (v1: T).(\forall (v2: T).(P -(CHead c1 (Bind b1) v1) (CHead c2 (Bind b2) v2)))))))))))) (f2: (\forall (c1: -C).(\forall (c2: C).((csubv c1 c2) \to ((P c1 c2) \to (\forall (f2: -F).(\forall (f3: F).(\forall (v1: T).(\forall (v2: T).(P (CHead c1 (Flat f2) -v1) (CHead c2 (Flat f3) v2))))))))))) (c: C) (c0: C) (c1: csubv c c0) on c1: -P c c0 \def match c1 with [(csubv_sort n) \Rightarrow (f n) | (csubv_void c2 -c3 c4 v1 v2) \Rightarrow (f0 c2 c3 c4 ((csubv_ind P f f0 f1 f2) c2 c3 c4) v1 -v2) | (csubv_bind c2 c3 c4 b1 n b2 v1 v2) \Rightarrow (f1 c2 c3 c4 -((csubv_ind P f f0 f1 f2) c2 c3 c4) b1 n b2 v1 v2) | (csubv_flat c2 c3 c4 f3 -f4 v1 v2) \Rightarrow (f2 c2 c3 c4 ((csubv_ind P f f0 f1 f2) c2 c3 c4) f3 f4 -v1 v2)]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/csubv/getl.ma deleted file mode 100644 index f648b2323..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/getl.ma +++ /dev/null @@ -1,84 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubv/clear.ma". - -include "basic_1/csubv/drop.ma". - -include "basic_1/getl/fwd.ma". - -lemma csubv_getl_conf: - \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b1: -B).(\forall (d1: C).(\forall (v1: T).(\forall (i: nat).((getl i c1 (CHead d1 -(Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl -i c2 (CHead d2 (Bind b2) v2))))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(\lambda (b1: -B).(\lambda (d1: C).(\lambda (v1: T).(\lambda (i: nat).(\lambda (H0: (getl i -c1 (CHead d1 (Bind b1) v1))).(let H1 \def (getl_gen_all c1 (CHead d1 (Bind -b1) v1) i H0) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: -C).(clear e (CHead d1 (Bind b1) v1))) (ex2_3 B C T (\lambda (_: B).(\lambda -(d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: -C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind b2) v2)))))) (\lambda (x: -C).(\lambda (H2: (drop i O c1 x)).(\lambda (H3: (clear x (CHead d1 (Bind b1) -v1))).(let H_x \def (csubv_drop_conf c1 c2 H x i H2) in (let H4 \def H_x in -(ex2_ind C (\lambda (e2: C).(csubv x e2)) (\lambda (e2: C).(drop i O c2 e2)) -(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 -d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead -d2 (Bind b2) v2)))))) (\lambda (x0: C).(\lambda (H5: (csubv x x0)).(\lambda -(H6: (drop i O c2 x0)).(let H_x0 \def (csubv_clear_conf x x0 H5 b1 d1 v1 H3) -in (let H7 \def H_x0 in (ex2_3_ind B C T (\lambda (_: B).(\lambda (d2: -C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: -C).(\lambda (v2: T).(clear x0 (CHead d2 (Bind b2) v2))))) (ex2_3 B C T -(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda -(b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind b2) -v2)))))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H8: -(csubv d1 x2)).(\lambda (H9: (clear x0 (CHead x2 (Bind x1) x3))).(ex2_3_intro -B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) -(\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind -b2) v2))))) x1 x2 x3 H8 (getl_intro i c2 (CHead x2 (Bind x1) x3) x0 H6 -H9))))))) H7)))))) H4)))))) H1))))))))). - -lemma csubv_getl_conf_void: - \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (d1: -C).(\forall (v1: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind Void) v1)) -\to (ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: -C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind Void) v2))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(\lambda (d1: -C).(\lambda (v1: T).(\lambda (i: nat).(\lambda (H0: (getl i c1 (CHead d1 -(Bind Void) v1))).(let H1 \def (getl_gen_all c1 (CHead d1 (Bind Void) v1) i -H0) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e -(CHead d1 (Bind Void) v1))) (ex2_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 -(Bind Void) v2))))) (\lambda (x: C).(\lambda (H2: (drop i O c1 x)).(\lambda -(H3: (clear x (CHead d1 (Bind Void) v1))).(let H_x \def (csubv_drop_conf c1 -c2 H x i H2) in (let H4 \def H_x in (ex2_ind C (\lambda (e2: C).(csubv x e2)) -(\lambda (e2: C).(drop i O c2 e2)) (ex2_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 -(Bind Void) v2))))) (\lambda (x0: C).(\lambda (H5: (csubv x x0)).(\lambda -(H6: (drop i O c2 x0)).(let H_x0 \def (csubv_clear_conf_void x x0 H5 d1 v1 -H3) in (let H7 \def H_x0 in (ex2_2_ind C T (\lambda (d2: C).(\lambda (_: -T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear x0 (CHead d2 -(Bind Void) v2)))) (ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 -d2))) (\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind Void) -v2))))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (H8: (csubv d1 -x1)).(\lambda (H9: (clear x0 (CHead x1 (Bind Void) x2))).(ex2_2_intro C T -(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda -(v2: T).(getl i c2 (CHead d2 (Bind Void) v2)))) x1 x2 H8 (getl_intro i c2 -(CHead x1 (Bind Void) x2) x0 H6 H9)))))) H7)))))) H4)))))) H1)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/csubv/props.ma b/matita/matita/contribs/lambdadelta/basic_1/csubv/props.ma deleted file mode 100644 index eb8448a1a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/csubv/props.ma +++ /dev/null @@ -1,43 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubv/defs.ma". - -include "basic_1/C/fwd.ma". - -include "basic_1/T/props.ma". - -lemma csubv_bind_same: - \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b: B).(\forall -(v1: T).(\forall (v2: T).(csubv (CHead c1 (Bind b) v1) (CHead c2 (Bind b) -v2))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(\lambda (b: -B).(B_ind (\lambda (b0: B).(\forall (v1: T).(\forall (v2: T).(csubv (CHead c1 -(Bind b0) v1) (CHead c2 (Bind b0) v2))))) (\lambda (v1: T).(\lambda (v2: -T).(csubv_bind c1 c2 H Abbr not_abbr_void Abbr v1 v2))) (\lambda (v1: -T).(\lambda (v2: T).(csubv_bind c1 c2 H Abst not_abst_void Abst v1 v2))) -(\lambda (v1: T).(\lambda (v2: T).(csubv_void c1 c2 H v1 v2))) b)))). - -lemma csubv_refl: - \forall (c: C).(csubv c c) -\def - \lambda (c: C).(C_ind (\lambda (c0: C).(csubv c0 c0)) (\lambda (n: -nat).(csubv_sort n)) (\lambda (c0: C).(\lambda (H: (csubv c0 c0)).(\lambda -(k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(csubv (CHead c0 k0 t) (CHead -c0 k0 t)))) (\lambda (b: B).(\lambda (t: T).(csubv_bind_same c0 c0 H b t t))) -(\lambda (f: F).(\lambda (t: T).(csubv_flat c0 c0 H f f t t))) k)))) c). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/definitions.ma b/matita/matita/contribs/lambdadelta/basic_1/definitions.ma deleted file mode 100644 index 010b9d252..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/definitions.ma +++ /dev/null @@ -1,68 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/tlt/defs.ma". - -include "basic_1/iso/defs.ma". - -include "basic_1/clen/defs.ma". - -include "basic_1/flt/defs.ma". - -include "basic_1/app/defs.ma". - -include "basic_1/cnt/defs.ma". - -include "basic_1/cimp/defs.ma". - -include "basic_1/subst1/defs.ma". - -include "basic_1/subst/defs.ma". - -include "basic_1/csubst1/defs.ma". - -include "basic_1/fsubst0/defs.ma". - -include "basic_1/next_plus/defs.ma". - -include "basic_1/sty1/defs.ma". - -include "basic_1/llt/defs.ma". - -include "basic_1/aprem/defs.ma". - -include "basic_1/ex0/defs.ma". - -include "basic_1/wcpr0/defs.ma". - -include "basic_1/csubv/defs.ma". - -include "basic_1/csuba/defs.ma". - -include "basic_1/nf2/defs.ma". - -include "basic_1/ex2/defs.ma". - -include "basic_1/csubc/defs.ma". - -include "basic_1/pc1/defs.ma". - -include "basic_1/ex1/defs.ma". - -include "basic_1/csubt/defs.ma". - -include "basic_1/wf3/defs.ma". - diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/drop/defs.ma deleted file mode 100644 index 426f37070..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/drop/defs.ma +++ /dev/null @@ -1,31 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -include "basic_1/lift/defs.ma". - -include "basic_1/r/defs.ma". - -inductive drop: nat \to (nat \to (C \to (C \to Prop))) \def -| drop_refl: \forall (c: C).(drop O O c c) -| drop_drop: \forall (k: K).(\forall (h: nat).(\forall (c: C).(\forall (e: -C).((drop (r k h) O c e) \to (\forall (u: T).(drop (S h) O (CHead c k u) -e)))))) -| drop_skip: \forall (k: K).(\forall (h: nat).(\forall (d: nat).(\forall (c: -C).(\forall (e: C).((drop h (r k d) c e) \to (\forall (u: T).(drop h (S d) -(CHead c k (lift h (r k d) u)) (CHead e k u)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/drop/fwd.ma deleted file mode 100644 index 0b7876eea..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/drop/fwd.ma +++ /dev/null @@ -1,475 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/drop/defs.ma". - -include "basic_1/lift/fwd.ma". - -include "basic_1/r/props.ma". - -include "basic_1/C/fwd.ma". - -implied rec lemma drop_ind (P: (nat \to (nat \to (C \to (C \to Prop))))) (f: -(\forall (c: C).(P O O c c))) (f0: (\forall (k: K).(\forall (h: nat).(\forall -(c: C).(\forall (e: C).((drop (r k h) O c e) \to ((P (r k h) O c e) \to -(\forall (u: T).(P (S h) O (CHead c k u) e))))))))) (f1: (\forall (k: -K).(\forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop -h (r k d) c e) \to ((P h (r k d) c e) \to (\forall (u: T).(P h (S d) (CHead c -k (lift h (r k d) u)) (CHead e k u))))))))))) (n: nat) (n0: nat) (c: C) (c0: -C) (d: drop n n0 c c0) on d: P n n0 c c0 \def match d with [(drop_refl c1) -\Rightarrow (f c1) | (drop_drop k h c1 e d0 u) \Rightarrow (f0 k h c1 e d0 -((drop_ind P f f0 f1) (r k h) O c1 e d0) u) | (drop_skip k h d0 c1 e d1 u) -\Rightarrow (f1 k h d0 c1 e d1 ((drop_ind P f f0 f1) h (r k d0) c1 e d1) u)]. - -lemma drop_gen_sort: - \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(\forall (x: C).((drop -h d (CSort n) x) \to (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)))))) -\def - \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (x: -C).(\lambda (H: (drop h d (CSort n) x)).(insert_eq C (CSort n) (\lambda (c: -C).(drop h d c x)) (\lambda (c: C).(and3 (eq C x c) (eq nat h O) (eq nat d -O))) (\lambda (y: C).(\lambda (H0: (drop h d y x)).(drop_ind (\lambda (n0: -nat).(\lambda (n1: nat).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) -\to (and3 (eq C c0 c) (eq nat n0 O) (eq nat n1 O))))))) (\lambda (c: -C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: -C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(and3 (eq C -c0 c0) (eq nat O O) (eq nat O O))) (and3_intro (eq C (CSort n) (CSort n)) (eq -nat O O) (eq nat O O) (refl_equal C (CSort n)) (refl_equal nat O) (refl_equal -nat O)) c H2)))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (c: C).(\lambda -(e: C).(\lambda (_: (drop (r k h0) O c e)).(\lambda (_: (((eq C c (CSort n)) -\to (and3 (eq C e c) (eq nat (r k h0) O) (eq nat O O))))).(\lambda (u: -T).(\lambda (H3: (eq C (CHead c k u) (CSort n))).(let H4 \def (eq_ind C -(CHead c k u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | -(CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C e -(CHead c k u)) (eq nat (S h0) O) (eq nat O O)) H4)))))))))) (\lambda (k: -K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c: C).(\lambda (e: -C).(\lambda (_: (drop h0 (r k d0) c e)).(\lambda (_: (((eq C c (CSort n)) \to -(and3 (eq C e c) (eq nat h0 O) (eq nat (r k d0) O))))).(\lambda (u: -T).(\lambda (H3: (eq C (CHead c k (lift h0 (r k d0) u)) (CSort n))).(let H4 -\def (eq_ind C (CHead c k (lift h0 (r k d0) u)) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I -(CSort n) H3) in (False_ind (and3 (eq C (CHead e k u) (CHead c k (lift h0 (r -k d0) u))) (eq nat h0 O) (eq nat (S d0) O)) H4))))))))))) h d y x H0))) -H))))). - -lemma drop_gen_refl: - \forall (x: C).(\forall (e: C).((drop O O x e) \to (eq C x e))) -\def - \lambda (x: C).(\lambda (e: C).(\lambda (H: (drop O O x e)).(insert_eq nat O -(\lambda (n: nat).(drop n O x e)) (\lambda (_: nat).(eq C x e)) (\lambda (y: -nat).(\lambda (H0: (drop y O x e)).(insert_eq nat O (\lambda (n: nat).(drop y -n x e)) (\lambda (n: nat).((eq nat y n) \to (eq C x e))) (\lambda (y0: -nat).(\lambda (H1: (drop y y0 x e)).(drop_ind (\lambda (n: nat).(\lambda (n0: -nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n0 O) \to ((eq nat n n0) \to -(eq C c c0))))))) (\lambda (c: C).(\lambda (_: (eq nat O O)).(\lambda (_: (eq -nat O O)).(refl_equal C c)))) (\lambda (k: K).(\lambda (h: nat).(\lambda (c: -C).(\lambda (e0: C).(\lambda (_: (drop (r k h) O c e0)).(\lambda (_: (((eq -nat O O) \to ((eq nat (r k h) O) \to (eq C c e0))))).(\lambda (u: T).(\lambda -(_: (eq nat O O)).(\lambda (H5: (eq nat (S h) O)).(let H6 \def (eq_ind nat (S -h) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H5) in (False_ind (eq C (CHead c k u) e0) H6))))))))))) (\lambda -(k: K).(\lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e0: -C).(\lambda (H2: (drop h (r k d) c e0)).(\lambda (H3: (((eq nat (r k d) O) -\to ((eq nat h (r k d)) \to (eq C c e0))))).(\lambda (u: T).(\lambda (H4: (eq -nat (S d) O)).(\lambda (H5: (eq nat h (S d))).(let H6 \def (f_equal nat nat -(\lambda (e1: nat).e1) h (S d) H5) in (let H7 \def (eq_ind nat h (\lambda (n: -nat).((eq nat (r k d) O) \to ((eq nat n (r k d)) \to (eq C c e0)))) H3 (S d) -H6) in (let H8 \def (eq_ind nat h (\lambda (n: nat).(drop n (r k d) c e0)) H2 -(S d) H6) in (eq_ind_r nat (S d) (\lambda (n: nat).(eq C (CHead c k (lift n -(r k d) u)) (CHead e0 k u))) (let H9 \def (eq_ind nat (S d) (\lambda (ee: -nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) -in (False_ind (eq C (CHead c k (lift (S d) (r k d) u)) (CHead e0 k u)) H9)) h -H6)))))))))))))) y y0 x e H1))) H0))) H))). - -lemma drop_gen_drop: - \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: -nat).((drop (S h) O (CHead c k u) x) \to (drop (r k h) O c x)))))) -\def - \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: -nat).(\lambda (H: (drop (S h) O (CHead c k u) x)).(insert_eq C (CHead c k u) -(\lambda (c0: C).(drop (S h) O c0 x)) (\lambda (_: C).(drop (r k h) O c x)) -(\lambda (y: C).(\lambda (H0: (drop (S h) O y x)).(insert_eq nat O (\lambda -(n: nat).(drop (S h) n y x)) (\lambda (n: nat).((eq C y (CHead c k u)) \to -(drop (r k h) n c x))) (\lambda (y0: nat).(\lambda (H1: (drop (S h) y0 y -x)).(insert_eq nat (S h) (\lambda (n: nat).(drop n y0 y x)) (\lambda (_: -nat).((eq nat y0 O) \to ((eq C y (CHead c k u)) \to (drop (r k h) y0 c x)))) -(\lambda (y1: nat).(\lambda (H2: (drop y1 y0 y x)).(drop_ind (\lambda (n: -nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n (S h)) -\to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) n0 c -c1)))))))) (\lambda (c0: C).(\lambda (H3: (eq nat O (S h))).(\lambda (_: (eq -nat O O)).(\lambda (H5: (eq C c0 (CHead c k u))).(eq_ind_r C (CHead c k u) -(\lambda (c1: C).(drop (r k h) O c c1)) (let H6 \def (eq_ind nat O (\lambda -(ee: nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I -(S h) H3) in (False_ind (drop (r k h) O c (CHead c k u)) H6)) c0 H5))))) -(\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda -(H3: (drop (r k0 h0) O c0 e)).(\lambda (H4: (((eq nat (r k0 h0) (S h)) \to -((eq nat O O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c -e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S h))).(\lambda (_: -(eq nat O O)).(\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H8 -\def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | -(CHead c1 _ _) \Rightarrow c1])) (CHead c0 k0 u0) (CHead c k u) H7) in ((let -H9 \def (f_equal C K (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow -k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 u0) (CHead c k u) H7) in -((let H10 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c k -u) H7) in (\lambda (H11: (eq K k0 k)).(\lambda (H12: (eq C c0 c)).(let H13 -\def (eq_ind C c0 (\lambda (c1: C).((eq nat (r k0 h0) (S h)) \to ((eq nat O -O) \to ((eq C c1 (CHead c k u)) \to (drop (r k h) O c e))))) H4 c H12) in -(let H14 \def (eq_ind C c0 (\lambda (c1: C).(drop (r k0 h0) O c1 e)) H3 c -H12) in (let H15 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 h0) (S h)) -\to ((eq nat O O) \to ((eq C c (CHead c k u)) \to (drop (r k h) O c e))))) -H13 k H11) in (let H16 \def (eq_ind K k0 (\lambda (k1: K).(drop (r k1 h0) O c -e)) H14 k H11) in (let H17 \def (f_equal nat nat (\lambda (e0: nat).(match e0 -with [O \Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H5) in (let H18 -\def (eq_ind nat h0 (\lambda (n: nat).((eq nat (r k n) (S h)) \to ((eq nat O -O) \to ((eq C c (CHead c k u)) \to (drop (r k h) O c e))))) H15 h H17) in -(let H19 \def (eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) H16 h -H17) in H19)))))))))) H9)) H8)))))))))))) (\lambda (k0: K).(\lambda (h0: -nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H3: (drop -h0 (r k0 d) c0 e)).(\lambda (H4: (((eq nat h0 (S h)) \to ((eq nat (r k0 d) O) -\to ((eq C c0 (CHead c k u)) \to (drop (r k h) (r k0 d) c e)))))).(\lambda -(u0: T).(\lambda (H5: (eq nat h0 (S h))).(\lambda (H6: (eq nat (S d) -O)).(\lambda (H7: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c k -u))).(let H8 \def (eq_ind nat h0 (\lambda (n: nat).(eq C (CHead c0 k0 (lift n -(r k0 d) u0)) (CHead c k u))) H7 (S h) H5) in (let H9 \def (eq_ind nat h0 -(\lambda (n: nat).((eq nat n (S h)) \to ((eq nat (r k0 d) O) \to ((eq C c0 -(CHead c k u)) \to (drop (r k h) (r k0 d) c e))))) H4 (S h) H5) in (let H10 -\def (eq_ind nat h0 (\lambda (n: nat).(drop n (r k0 d) c0 e)) H3 (S h) H5) in -(let H11 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow c0 | (CHead c1 _ _) \Rightarrow c1])) (CHead c0 k0 (lift (S h) (r -k0 d) u0)) (CHead c k u) H8) in ((let H12 \def (f_equal C K (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow -k1])) (CHead c0 k0 (lift (S h) (r k0 d) u0)) (CHead c k u) H8) in ((let H13 -\def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow -(lref_map (\lambda (x0: nat).(plus x0 (S h))) (r k0 d) u0) | (CHead _ _ t) -\Rightarrow t])) (CHead c0 k0 (lift (S h) (r k0 d) u0)) (CHead c k u) H8) in -(\lambda (H14: (eq K k0 k)).(\lambda (H15: (eq C c0 c)).(let H16 \def (eq_ind -C c0 (\lambda (c1: C).((eq nat (S h) (S h)) \to ((eq nat (r k0 d) O) \to ((eq -C c1 (CHead c k u)) \to (drop (r k h) (r k0 d) c e))))) H9 c H15) in (let H17 -\def (eq_ind C c0 (\lambda (c1: C).(drop (S h) (r k0 d) c1 e)) H10 c H15) in -(let H18 \def (eq_ind K k0 (\lambda (k1: K).(eq T (lift (S h) (r k1 d) u0) -u)) H13 k H14) in (let H19 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (S h) -(S h)) \to ((eq nat (r k1 d) O) \to ((eq C c (CHead c k u)) \to (drop (r k h) -(r k1 d) c e))))) H16 k H14) in (let H20 \def (eq_ind K k0 (\lambda (k1: -K).(drop (S h) (r k1 d) c e)) H17 k H14) in (eq_ind_r K k (\lambda (k1: -K).(drop (r k h) (S d) c (CHead e k1 u0))) (let H21 \def (eq_ind_r T u -(\lambda (t: T).((eq nat (S h) (S h)) \to ((eq nat (r k d) O) \to ((eq C c -(CHead c k t)) \to (drop (r k h) (r k d) c e))))) H19 (lift (S h) (r k d) u0) -H18) in (let H22 \def (eq_ind nat (S d) (\lambda (ee: nat).(match ee with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind (drop (r -k h) (S d) c (CHead e k u0)) H22))) k0 H14))))))))) H12)) H11)))))))))))))))) -y1 y0 y x H2))) H1))) H0))) H)))))). - -lemma drop_gen_skip_r: - \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall -(d: nat).(\forall (k: K).((drop h (S d) x (CHead c k u)) \to (ex2 C (\lambda -(e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k -d) e c))))))))) -\def - \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k -u))).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop h (S d) x c0)) -(\lambda (_: C).(ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) -u)))) (\lambda (e: C).(drop h (r k d) e c)))) (\lambda (y: C).(\lambda (H0: -(drop h (S d) x y)).(insert_eq nat (S d) (\lambda (n: nat).(drop h n x y)) -(\lambda (_: nat).((eq C y (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x -(CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c))))) -(\lambda (y0: nat).(\lambda (H1: (drop h y0 x y)).(drop_ind (\lambda (n: -nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n0 (S d)) -\to ((eq C c1 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C c0 (CHead e k -(lift n (r k d) u)))) (\lambda (e: C).(drop n (r k d) e c))))))))) (\lambda -(c0: C).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C c0 (CHead c k -u))).(eq_ind_r C (CHead c k u) (\lambda (c1: C).(ex2 C (\lambda (e: C).(eq C -c1 (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k d) e c)))) -(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow -True | (S _) \Rightarrow False])) I (S d) H2) in (False_ind (ex2 C (\lambda -(e: C).(eq C (CHead c k u) (CHead e k (lift O (r k d) u)))) (\lambda (e: -C).(drop O (r k d) e c))) H4)) c0 H3)))) (\lambda (k0: K).(\lambda (h0: -nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H2: (drop (r k0 h0) O c0 -e)).(\lambda (H3: (((eq nat O (S d)) \to ((eq C e (CHead c k u)) \to (ex2 C -(\lambda (e0: C).(eq C c0 (CHead e0 k (lift (r k0 h0) (r k d) u)))) (\lambda -(e0: C).(drop (r k0 h0) (r k d) e0 c))))))).(\lambda (u0: T).(\lambda (H4: -(eq nat O (S d))).(\lambda (H5: (eq C e (CHead c k u))).(let H6 \def (eq_ind -C e (\lambda (c1: C).((eq nat O (S d)) \to ((eq C c1 (CHead c k u)) \to (ex2 -C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift (r k0 h0) (r k d) u)))) -(\lambda (e0: C).(drop (r k0 h0) (r k d) e0 c)))))) H3 (CHead c k u) H5) in -(let H7 \def (eq_ind C e (\lambda (c1: C).(drop (r k0 h0) O c0 c1)) H2 (CHead -c k u) H5) in (let H8 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O -\Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind (ex2 -C (\lambda (e0: C).(eq C (CHead c0 k0 u0) (CHead e0 k (lift (S h0) (r k d) -u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 c))) H8))))))))))))) (\lambda -(k0: K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c0: C).(\lambda (e: -C).(\lambda (H2: (drop h0 (r k0 d0) c0 e)).(\lambda (H3: (((eq nat (r k0 d0) -(S d)) \to ((eq C e (CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 -(CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 -c))))))).(\lambda (u0: T).(\lambda (H4: (eq nat (S d0) (S d))).(\lambda (H5: -(eq C (CHead e k0 u0) (CHead c k u))).(let H6 \def (f_equal C C (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) -(CHead e k0 u0) (CHead c k u) H5) in ((let H7 \def (f_equal C K (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow -k1])) (CHead e k0 u0) (CHead c k u) H5) in ((let H8 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u0 | (CHead _ _ t) -\Rightarrow t])) (CHead e k0 u0) (CHead c k u) H5) in (\lambda (H9: (eq K k0 -k)).(\lambda (H10: (eq C e c)).(eq_ind_r T u (\lambda (t: T).(ex2 C (\lambda -(e0: C).(eq C (CHead c0 k0 (lift h0 (r k0 d0) t)) (CHead e0 k (lift h0 (r k -d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)))) (let H11 \def (eq_ind C e -(\lambda (c1: C).((eq nat (r k0 d0) (S d)) \to ((eq C c1 (CHead c k u)) \to -(ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift h0 (r k d) u)))) (\lambda -(e0: C).(drop h0 (r k d) e0 c)))))) H3 c H10) in (let H12 \def (eq_ind C e -(\lambda (c1: C).(drop h0 (r k0 d0) c0 c1)) H2 c H10) in (let H13 \def -(eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 d0) (S d)) \to ((eq C c (CHead c -k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift h0 (r k d) u)))) -(\lambda (e0: C).(drop h0 (r k d) e0 c)))))) H11 k H9) in (let H14 \def -(eq_ind K k0 (\lambda (k1: K).(drop h0 (r k1 d0) c0 c)) H12 k H9) in -(eq_ind_r K k (\lambda (k1: K).(ex2 C (\lambda (e0: C).(eq C (CHead c0 k1 -(lift h0 (r k1 d0) u)) (CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: -C).(drop h0 (r k d) e0 c)))) (let H15 \def (f_equal nat nat (\lambda (e0: -nat).(match e0 with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) -H4) in (let H16 \def (eq_ind nat d0 (\lambda (n: nat).((eq nat (r k n) (S d)) -\to ((eq C c (CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k -(lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)))))) H13 d -H15) in (let H17 \def (eq_ind nat d0 (\lambda (n: nat).(drop h0 (r k n) c0 -c)) H14 d H15) in (eq_ind_r nat d (\lambda (n: nat).(ex2 C (\lambda (e0: -C).(eq C (CHead c0 k (lift h0 (r k n) u)) (CHead e0 k (lift h0 (r k d) u)))) -(\lambda (e0: C).(drop h0 (r k d) e0 c)))) (ex_intro2 C (\lambda (e0: C).(eq -C (CHead c0 k (lift h0 (r k d) u)) (CHead e0 k (lift h0 (r k d) u)))) -(\lambda (e0: C).(drop h0 (r k d) e0 c)) c0 (refl_equal C (CHead c0 k (lift -h0 (r k d) u))) H17) d0 H15)))) k0 H9))))) u0 H8)))) H7)) H6)))))))))))) h y0 -x y H1))) H0))) H))))))). - -lemma drop_gen_skip_l: - \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall -(d: nat).(\forall (k: K).((drop h (S d) (CHead c k u) x) \to (ex3_2 C T -(\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: -C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: -T).(drop h (r k d) c e)))))))))) -\def - \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) -x)).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop h (S d) c0 x)) (\lambda -(_: C).(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) -(\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: -C).(\lambda (_: T).(drop h (r k d) c e))))) (\lambda (y: C).(\lambda (H0: -(drop h (S d) y x)).(insert_eq nat (S d) (\lambda (n: nat).(drop h n y x)) -(\lambda (_: nat).((eq C y (CHead c k u)) \to (ex3_2 C T (\lambda (e: -C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k -d) c e)))))) (\lambda (y0: nat).(\lambda (H1: (drop h y0 y x)).(drop_ind -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq -nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to (ex3_2 C T (\lambda (e: -C).(\lambda (v: T).(eq C c1 (CHead e k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop n (r k -d) c e)))))))))) (\lambda (c0: C).(\lambda (H2: (eq nat O (S d))).(\lambda -(H3: (eq C c0 (CHead c k u))).(eq_ind_r C (CHead c k u) (\lambda (c1: -C).(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C c1 (CHead e k v)))) -(\lambda (_: C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: -C).(\lambda (_: T).(drop O (r k d) c e))))) (let H4 \def (eq_ind nat O -(\lambda (ee: nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow -False])) I (S d) H2) in (False_ind (ex3_2 C T (\lambda (e: C).(\lambda (v: -T).(eq C (CHead c k u) (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T -u (lift O (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop O (r k d) c -e)))) H4)) c0 H3)))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: -C).(\lambda (e: C).(\lambda (H2: (drop (r k0 h0) O c0 e)).(\lambda (H3: (((eq -nat O (S d)) \to ((eq C c0 (CHead c k u)) \to (ex3_2 C T (\lambda (e0: -C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T u (lift (r k0 h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: -T).(drop (r k0 h0) (r k d) c e0)))))))).(\lambda (u0: T).(\lambda (H4: (eq -nat O (S d))).(\lambda (H5: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H6 -\def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | -(CHead c1 _ _) \Rightarrow c1])) (CHead c0 k0 u0) (CHead c k u) H5) in ((let -H7 \def (f_equal C K (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow -k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 u0) (CHead c k u) H5) in -((let H8 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c k -u) H5) in (\lambda (H9: (eq K k0 k)).(\lambda (H10: (eq C c0 c)).(let H11 -\def (eq_ind C c0 (\lambda (c1: C).((eq nat O (S d)) \to ((eq C c1 (CHead c k -u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) -(\lambda (_: C).(\lambda (v: T).(eq T u (lift (r k0 h0) (r k d) v)))) -(\lambda (e0: C).(\lambda (_: T).(drop (r k0 h0) (r k d) c e0))))))) H3 c -H10) in (let H12 \def (eq_ind C c0 (\lambda (c1: C).(drop (r k0 h0) O c1 e)) -H2 c H10) in (let H13 \def (eq_ind K k0 (\lambda (k1: K).((eq nat O (S d)) -\to ((eq C c (CHead c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: -T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (r -k1 h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (r k1 h0) (r k d) -c e0))))))) H11 k H9) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).(drop (r -k1 h0) O c e)) H12 k H9) in (let H15 \def (eq_ind nat O (\lambda (ee: -nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) -H4) in (False_ind (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead -e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (S h0) (r k d) v)))) -(\lambda (e0: C).(\lambda (_: T).(drop (S h0) (r k d) c e0)))) H15))))))))) -H7)) H6))))))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (d0: -nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H2: (drop h0 (r k0 d0) c0 -e)).(\lambda (H3: (((eq nat (r k0 d0) (S d)) \to ((eq C c0 (CHead c k u)) \to -(ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) -(\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 (r k d) v)))) (\lambda (e0: -C).(\lambda (_: T).(drop h0 (r k d) c e0)))))))).(\lambda (u0: T).(\lambda -(H4: (eq nat (S d0) (S d))).(\lambda (H5: (eq C (CHead c0 k0 (lift h0 (r k0 -d0) u0)) (CHead c k u))).(let H6 \def (f_equal C C (\lambda (e0: C).(match e0 -with [(CSort _) \Rightarrow c0 | (CHead c1 _ _) \Rightarrow c1])) (CHead c0 -k0 (lift h0 (r k0 d0) u0)) (CHead c k u) H5) in ((let H7 \def (f_equal C K -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) -\Rightarrow k1])) (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u) H5) in -((let H8 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow (lref_map (\lambda (x0: nat).(plus x0 h0)) (r k0 d0) u0) | (CHead -_ _ t) \Rightarrow t])) (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u) -H5) in (\lambda (H9: (eq K k0 k)).(\lambda (H10: (eq C c0 c)).(let H11 \def -(eq_ind C c0 (\lambda (c1: C).((eq nat (r k0 d0) (S d)) \to ((eq C c1 (CHead -c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k -v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 (r k d) v)))) (\lambda -(e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))))) H3 c H10) in (let H12 -\def (eq_ind C c0 (\lambda (c1: C).(drop h0 (r k0 d0) c1 e)) H2 c H10) in -(let H13 \def (eq_ind K k0 (\lambda (k1: K).(eq T (lift h0 (r k1 d0) u0) u)) -H8 k H9) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 d0) (S -d)) \to ((eq C c (CHead c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: -T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 -(r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))))) -H11 k H9) in (let H15 \def (eq_ind K k0 (\lambda (k1: K).(drop h0 (r k1 d0) c -e)) H12 k H9) in (eq_ind_r K k (\lambda (k1: K).(ex3_2 C T (\lambda (e0: -C).(\lambda (v: T).(eq C (CHead e k1 u0) (CHead e0 k v)))) (\lambda (_: -C).(\lambda (v: T).(eq T u (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda -(_: T).(drop h0 (r k d) c e0))))) (let H16 \def (eq_ind_r T u (\lambda (t: -T).((eq nat (r k d0) (S d)) \to ((eq C c (CHead c k t)) \to (ex3_2 C T -(\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: -C).(\lambda (v: T).(eq T t (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda -(_: T).(drop h0 (r k d) c e0))))))) H14 (lift h0 (r k d0) u0) H13) in (eq_ind -T (lift h0 (r k d0) u0) (\lambda (t: T).(ex3_2 C T (\lambda (e0: C).(\lambda -(v: T).(eq C (CHead e k u0) (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T t (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 -(r k d) c e0))))) (let H17 \def (f_equal nat nat (\lambda (e0: nat).(match e0 -with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H4) in (let H18 -\def (eq_ind nat d0 (\lambda (n: nat).((eq nat (r k n) (S d)) \to ((eq C c -(CHead c k (lift h0 (r k n) u0))) \to (ex3_2 C T (\lambda (e0: C).(\lambda -(v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift -h0 (r k n) u0) (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop -h0 (r k d) c e0))))))) H16 d H17) in (let H19 \def (eq_ind nat d0 (\lambda -(n: nat).(drop h0 (r k n) c e)) H15 d H17) in (eq_ind_r nat d (\lambda (n: -nat).(ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) (CHead -e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h0 (r k n) u0) (lift -h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))) -(ex3_2_intro C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) (CHead -e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h0 (r k d) u0) (lift -h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))) e -u0 (refl_equal C (CHead e k u0)) (refl_equal T (lift h0 (r k d) u0)) H19) d0 -H17)))) u H13)) k0 H9))))))))) H7)) H6)))))))))))) h y0 y x H1))) H0))) -H))))))). - -lemma drop_S: - \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: -nat).((drop h O c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) -\def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: -C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to -(drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: -T).(\lambda (h: nat).(\lambda (H: (drop h O (CSort n) (CHead e (Bind b) -u))).(and3_ind (eq C (CHead e (Bind b) u) (CSort n)) (eq nat h O) (eq nat O -O) (drop (S h) O (CSort n) e) (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort -n))).(\lambda (H1: (eq nat h O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O -(\lambda (n0: nat).(drop (S n0) O (CSort n) e)) (let H3 \def (eq_ind C (CHead -e (Bind b) u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | -(CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind (drop (S O) O -(CSort n) e) H3)) h H1)))) (drop_gen_sort n h O (CHead e (Bind b) u) H))))))) -(\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: -nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 -e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: -T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) -(CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: -(drop O O (CHead c0 k t) (CHead e (Bind b) u))).(let H1 \def (f_equal C C -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | (CHead c1 _ _) -\Rightarrow c1])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead -c0 k t) (CHead e (Bind b) u) H0)) in ((let H2 \def (f_equal C K (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) -(CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e -(Bind b) u) H0)) in ((let H3 \def (f_equal C T (\lambda (e0: C).(match e0 -with [(CSort _) \Rightarrow t | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 k -t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) -H0)) in (\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq C c0 e)).(eq_ind C -c0 (\lambda (c1: C).(drop (S O) O (CHead c0 k t) c1)) (eq_ind_r K (Bind b) -(\lambda (k0: K).(drop (S O) O (CHead c0 k0 t) c0)) (drop_drop (Bind b) O c0 -c0 (drop_refl c0) t) k H4) e H5)))) H2)) H1))) (\lambda (n: nat).(\lambda (_: -(((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 -k t) e)))).(\lambda (H1: (drop (S n) O (CHead c0 k t) (CHead e (Bind b) -u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: -nat).(drop n0 O c0 e)) (H e u (r k n) (drop_gen_drop k c0 (CHead e (Bind b) -u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). - -theorem drop_mono: - \forall (c: C).(\forall (x1: C).(\forall (d: nat).(\forall (h: nat).((drop h -d c x1) \to (\forall (x2: C).((drop h d c x2) \to (eq C x1 x2))))))) -\def - \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (x1: C).(\forall (d: -nat).(\forall (h: nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 -x2) \to (eq C x1 x2)))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (d: -nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) x1)).(\lambda (x2: -C).(\lambda (H0: (drop h d (CSort n) x2)).(and3_ind (eq C x2 (CSort n)) (eq -nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H1: (eq C x2 (CSort -n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(and3_ind (eq C -x1 (CSort n)) (eq nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H4: (eq C x1 -(CSort n))).(\lambda (H5: (eq nat h O)).(\lambda (H6: (eq nat d O)).(eq_ind_r -C (CSort n) (\lambda (c0: C).(eq C x1 c0)) (let H7 \def (eq_ind nat h -(\lambda (n0: nat).(eq nat n0 O)) H2 O H5) in (let H8 \def (eq_ind nat d -(\lambda (n0: nat).(eq nat n0 O)) H3 O H6) in (eq_ind_r C (CSort n) (\lambda -(c0: C).(eq C c0 (CSort n))) (refl_equal C (CSort n)) x1 H4))) x2 H1)))) -(drop_gen_sort n h d x1 H))))) (drop_gen_sort n h d x2 H0))))))))) (\lambda -(c0: C).(\lambda (H: ((\forall (x1: C).(\forall (d: nat).(\forall (h: -nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 x2) \to (eq C x1 -x2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (d: -nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c0 k t) -x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq C x1 x2)))))) -(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) x1) -\to (\forall (x2: C).((drop n O (CHead c0 k t) x2) \to (eq C x1 x2))))) -(\lambda (H0: (drop O O (CHead c0 k t) x1)).(\lambda (x2: C).(\lambda (H1: -(drop O O (CHead c0 k t) x2)).(eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C -x1 c1)) (eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C c1 (CHead c0 k t))) -(refl_equal C (CHead c0 k t)) x1 (drop_gen_refl (CHead c0 k t) x1 H0)) x2 -(drop_gen_refl (CHead c0 k t) x2 H1))))) (\lambda (n: nat).(\lambda (_: -(((drop n O (CHead c0 k t) x1) \to (\forall (x2: C).((drop n O (CHead c0 k t) -x2) \to (eq C x1 x2)))))).(\lambda (H1: (drop (S n) O (CHead c0 k t) -x1)).(\lambda (x2: C).(\lambda (H2: (drop (S n) O (CHead c0 k t) x2)).(H x1 O -(r k n) (drop_gen_drop k c0 x1 t n H1) x2 (drop_gen_drop k c0 x2 t n -H2))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n -(CHead c0 k t) x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq -C x1 x2))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c0 k t) -x1)).(\lambda (x2: C).(\lambda (H2: (drop h (S n) (CHead c0 k t) -x2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x2 (CHead e k v)))) -(\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: -C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x0: -C).(\lambda (x3: T).(\lambda (H3: (eq C x2 (CHead x0 k x3))).(\lambda (H4: -(eq T t (lift h (r k n) x3))).(\lambda (H5: (drop h (r k n) c0 -x0)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x1 (CHead e k v)))) -(\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: -C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x4: -C).(\lambda (x5: T).(\lambda (H6: (eq C x1 (CHead x4 k x5))).(\lambda (H7: -(eq T t (lift h (r k n) x5))).(\lambda (H8: (drop h (r k n) c0 x4)).(eq_ind_r -C (CHead x0 k x3) (\lambda (c1: C).(eq C x1 c1)) (let H9 \def (eq_ind C x1 -(\lambda (c1: C).(\forall (h0: nat).((drop h0 n (CHead c0 k t) c1) \to -(\forall (x6: C).((drop h0 n (CHead c0 k t) x6) \to (eq C c1 x6)))))) H0 -(CHead x4 k x5) H6) in (eq_ind_r C (CHead x4 k x5) (\lambda (c1: C).(eq C c1 -(CHead x0 k x3))) (let H10 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: -nat).((drop h0 n (CHead c0 k t0) (CHead x4 k x5)) \to (\forall (x6: C).((drop -h0 n (CHead c0 k t0) x6) \to (eq C (CHead x4 k x5) x6)))))) H9 (lift h (r k -n) x5) H7) in (let H11 \def (eq_ind T t (\lambda (t0: T).(eq T t0 (lift h (r -k n) x3))) H4 (lift h (r k n) x5) H7) in (let H12 \def (eq_ind T x5 (\lambda -(t0: T).(\forall (h0: nat).((drop h0 n (CHead c0 k (lift h (r k n) t0)) -(CHead x4 k t0)) \to (\forall (x6: C).((drop h0 n (CHead c0 k (lift h (r k n) -t0)) x6) \to (eq C (CHead x4 k t0) x6)))))) H10 x3 (lift_inj x5 x3 h (r k n) -H11)) in (eq_ind_r T x3 (\lambda (t0: T).(eq C (CHead x4 k t0) (CHead x0 k -x3))) (sym_eq C (CHead x0 k x3) (CHead x4 k x3) (sym_eq C (CHead x4 k x3) -(CHead x0 k x3) (sym_eq C (CHead x0 k x3) (CHead x4 k x3) (f_equal3 C K T C -CHead x0 x4 k k x3 x3 (H x0 (r k n) h H5 x4 H8) (refl_equal K k) (refl_equal -T x3))))) x5 (lift_inj x5 x3 h (r k n) H11))))) x1 H6)) x2 H3)))))) -(drop_gen_skip_l c0 x1 t h n k H1))))))) (drop_gen_skip_l c0 x2 t h n k -H2)))))))) d))))))) c). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop/props.ma b/matita/matita/contribs/lambdadelta/basic_1/drop/props.ma deleted file mode 100644 index 1d662e8d4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/drop/props.ma +++ /dev/null @@ -1,594 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/drop/fwd.ma". - -lemma drop_skip_bind: - \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h -d c e) \to (\forall (b: B).(\forall (u: T).(drop h (S d) (CHead c (Bind b) -(lift h d u)) (CHead e (Bind b) u)))))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda -(H: (drop h d c e)).(\lambda (b: B).(\lambda (u: T).(eq_ind nat (r (Bind b) -d) (\lambda (n: nat).(drop h (S d) (CHead c (Bind b) (lift h n u)) (CHead e -(Bind b) u))) (drop_skip (Bind b) h d c e H u) d (refl_equal nat d)))))))). - -lemma drop_skip_flat: - \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h -(S d) c e) \to (\forall (f: F).(\forall (u: T).(drop h (S d) (CHead c (Flat -f) (lift h (S d) u)) (CHead e (Flat f) u)))))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda -(H: (drop h (S d) c e)).(\lambda (f: F).(\lambda (u: T).(eq_ind nat (r (Flat -f) d) (\lambda (n: nat).(drop h (S d) (CHead c (Flat f) (lift h n u)) (CHead -e (Flat f) u))) (drop_skip (Flat f) h d c e H u) (S d) (refl_equal nat (S -d))))))))). - -lemma drop_ctail: - \forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop -h d c1 c2) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k u c1) -(CTail k u c2)))))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (d: -nat).(\forall (h: nat).((drop h d c c2) \to (\forall (k: K).(\forall (u: -T).(drop h d (CTail k u c) (CTail k u c2))))))))) (\lambda (n: nat).(\lambda -(c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) -c2)).(\lambda (k: K).(\lambda (u: T).(and3_ind (eq C c2 (CSort n)) (eq nat h -O) (eq nat d O) (drop h d (CTail k u (CSort n)) (CTail k u c2)) (\lambda (H0: -(eq C c2 (CSort n))).(\lambda (H1: (eq nat h O)).(\lambda (H2: (eq nat d -O)).(eq_ind_r nat O (\lambda (n0: nat).(drop n0 d (CTail k u (CSort n)) -(CTail k u c2))) (eq_ind_r nat O (\lambda (n0: nat).(drop O n0 (CTail k u -(CSort n)) (CTail k u c2))) (eq_ind_r C (CSort n) (\lambda (c: C).(drop O O -(CTail k u (CSort n)) (CTail k u c))) (drop_refl (CTail k u (CSort n))) c2 -H0) d H2) h H1)))) (drop_gen_sort n h d c2 H))))))))) (\lambda (c2: -C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: -nat).((drop h d c2 c3) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k -u c2) (CTail k u c3)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: -C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n -(CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u -(CHead c2 k t)) (CTail k0 u c3))))))) (\lambda (h: nat).(nat_ind (\lambda (n: -nat).((drop n O (CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop -n O (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)))))) (\lambda (H: (drop O O -(CHead c2 k t) c3)).(\lambda (k0: K).(\lambda (u: T).(eq_ind C (CHead c2 k t) -(\lambda (c: C).(drop O O (CTail k0 u (CHead c2 k t)) (CTail k0 u c))) -(drop_refl (CTail k0 u (CHead c2 k t))) c3 (drop_gen_refl (CHead c2 k t) c3 -H))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to -(\forall (k0: K).(\forall (u: T).(drop n O (CTail k0 u (CHead c2 k t)) (CTail -k0 u c3))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (k0: -K).(\lambda (u: T).(drop_drop k n (CTail k0 u c2) (CTail k0 u c3) (IHc c3 O -(r k n) (drop_gen_drop k c2 c3 t n H0) k0 u) t)))))) h)) (\lambda (n: -nat).(\lambda (H: ((\forall (h: nat).((drop h n (CHead c2 k t) c3) \to -(\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) (CTail -k0 u c3)))))))).(\lambda (h: nat).(\lambda (H0: (drop h (S n) (CHead c2 k t) -c3)).(\lambda (k0: K).(\lambda (u: T).(ex3_2_ind C T (\lambda (e: C).(\lambda -(v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t -(lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c2 e))) -(drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H1: (eq C c3 (CHead x0 k x1))).(\lambda (H2: -(eq T t (lift h (r k n) x1))).(\lambda (H3: (drop h (r k n) c2 x0)).(let H4 -\def (eq_ind C c3 (\lambda (c: C).(\forall (h0: nat).((drop h0 n (CHead c2 k -t) c) \to (\forall (k1: K).(\forall (u0: T).(drop h0 n (CTail k1 u0 (CHead c2 -k t)) (CTail k1 u0 c))))))) H (CHead x0 k x1) H1) in (eq_ind_r C (CHead x0 k -x1) (\lambda (c: C).(drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u -c))) (let H5 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: nat).((drop h0 n -(CHead c2 k t0) (CHead x0 k x1)) \to (\forall (k1: K).(\forall (u0: T).(drop -h0 n (CTail k1 u0 (CHead c2 k t0)) (CTail k1 u0 (CHead x0 k x1)))))))) H4 -(lift h (r k n) x1) H2) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: -T).(drop h (S n) (CTail k0 u (CHead c2 k t0)) (CTail k0 u (CHead x0 k x1)))) -(drop_skip k h n (CTail k0 u c2) (CTail k0 u x0) (IHc x0 (r k n) h H3 k0 u) -x1) t H2)) c3 H1))))))) (drop_gen_skip_l c2 c3 t h n k H0)))))))) d))))))) -c1). - -theorem drop_conf_lt: - \forall (k: K).(\forall (i: nat).(\forall (u: T).(\forall (c0: C).(\forall -(c: C).((drop i O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: -nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda -(v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda -(e0: C).(drop i O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop -h (r k d) c0 e0))))))))))))) -\def - \lambda (k: K).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (u: -T).(\forall (c0: C).(\forall (c: C).((drop n O c (CHead c0 k u)) \to (\forall -(e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus n d)) c e) \to -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) -(\lambda (v: T).(\lambda (e0: C).(drop n O e (CHead e0 k v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) (\lambda (u: -T).(\lambda (c0: C).(\lambda (c: C).(\lambda (H: (drop O O c (CHead c0 k -u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop -h (S (plus O d)) c e)).(let H1 \def (eq_ind C c (\lambda (c1: C).(drop h (S -(plus O d)) c1 e)) H0 (CHead c0 k u) (drop_gen_refl c (CHead c0 k u) H)) in -(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) -(\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k (plus O d)) v)))) -(\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus O d)) c0 e0))) (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: -T).(\lambda (e0: C).(drop O O e (CHead e0 k v)))) (\lambda (_: T).(\lambda -(e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(H2: (eq C e (CHead x0 k x1))).(\lambda (H3: (eq T u (lift h (r k (plus O d)) -x1))).(\lambda (H4: (drop h (r k (plus O d)) c0 x0)).(eq_ind_r C (CHead x0 k -x1) (\lambda (c1: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift -h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O c1 (CHead e0 k -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (eq_ind_r T -(lift h (r k (plus O d)) x1) (\lambda (t: T).(ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T t (lift h (r k d) v)))) (\lambda (v: T).(\lambda -(e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda -(e0: C).(drop h (r k d) c0 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda -(_: C).(eq T (lift h (r k (plus O d)) x1) (lift h (r k d) v)))) (\lambda (v: -T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x1 x0 (refl_equal T (lift h (r k -d) x1)) (drop_refl (CHead x0 k x1)) H4) u H3) e H2)))))) (drop_gen_skip_l c0 -e u h (plus O d) k H1))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall -(u: T).(\forall (c0: C).(\forall (c: C).((drop i0 O c (CHead c0 k u)) \to -(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i0 d)) -c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) -v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O e (CHead e0 k v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))))))).(\lambda -(u: T).(\lambda (c0: C).(\lambda (c: C).(C_ind (\lambda (c1: C).((drop (S i0) -O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: -nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda -(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: -C).(drop h (r k d) c0 e0)))))))))) (\lambda (n: nat).(\lambda (_: (drop (S -i0) O (CSort n) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (H1: (drop h (S (plus (S i0) d)) (CSort n) e)).(and3_ind -(eq C e (CSort n)) (eq nat h O) (eq nat (S (plus (S i0) d)) O) (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: -T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (_: (eq C e (CSort -n))).(\lambda (_: (eq nat h O)).(\lambda (H4: (eq nat (S (plus (S i0) d)) -O)).(let H5 \def (eq_ind nat (S (plus (S i0) d)) (\lambda (ee: nat).(match ee -with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) -(\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) H5))))) (drop_gen_sort n h -(S (plus (S i0) d)) e H1)))))))) (\lambda (c1: C).(\lambda (H0: (((drop (S -i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: -nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda -(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: -C).(drop h (r k d) c0 e0))))))))))).(\lambda (k0: K).(K_ind (\lambda (k1: -K).(\forall (t: T).((drop (S i0) O (CHead c1 k1 t) (CHead c0 k u)) \to -(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) -d)) (CHead c1 k1 t) e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u -(lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e -(CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 -e0))))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O -(CHead c1 (Bind b) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 -(Bind b) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e -(CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r -(Bind b) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r -(Bind b) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: -C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S -i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 -e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 -(Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) (plus (S i0) d)) -x1))).(\lambda (H5: (drop h (r (Bind b) (plus (S i0) d)) c1 x0)).(eq_ind_r C -(CHead x0 (Bind b) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda -(_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop -(S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k -d) c0 e0))))) (let H6 \def (H u c0 c1 (drop_gen_drop (Bind b) c1 (CHead c0 k -u) t i0 H1) x0 h d H5) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq -T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O x0 -(CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) -(\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead -e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) -(\lambda (x2: T).(\lambda (x3: C).(\lambda (H7: (eq T u (lift h (r k d) -x2))).(\lambda (H8: (drop i0 O x0 (CHead x3 k x2))).(\lambda (H9: (drop h (r -k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h -(r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind -b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 -e0))) x2 x3 H7 (drop_drop (Bind b) i0 x0 (CHead x3 k x2) H8 x1) H9)))))) H6)) -e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Bind b) H2))))))))) -(\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Flat -f) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Flat f) t) -e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat -f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus (S -i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus (S -i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h -(r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Flat f) -x1))).(\lambda (_: (eq T t (lift h (r (Flat f) (plus (S i0) d)) -x1))).(\lambda (H5: (drop h (r (Flat f) (plus (S i0) d)) c1 x0)).(eq_ind_r C -(CHead x0 (Flat f) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda -(_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop -(S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k -d) c0 e0))))) (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h -(r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O x0 (CHead e0 k -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: -T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: -T).(\lambda (x3: C).(\lambda (H6: (eq T u (lift h (r k d) x2))).(\lambda (H7: -(drop (S i0) O x0 (CHead x3 k x2))).(\lambda (H8: (drop h (r k d) c0 -x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) -v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) -(CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) -x2 x3 H6 (drop_drop (Flat f) i0 x0 (CHead x3 k x2) H7 x1) H8)))))) (H0 -(drop_gen_drop (Flat f) c1 (CHead c0 k u) t i0 H1) x0 h d H5)) e H3)))))) -(drop_gen_skip_l c1 e t h (plus (S i0) d) (Flat f) H2))))))))) k0)))) c)))))) -i)). - -theorem drop_conf_ge: - \forall (i: nat).(\forall (a: C).(\forall (c: C).((drop i O c a) \to -(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le -(plus d h) i) \to (drop (minus i h) O e a))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (a: C).(\forall (c: -C).((drop n O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c e) \to ((le (plus d h) n) \to (drop (minus n h) O e -a)))))))))) (\lambda (a: C).(\lambda (c: C).(\lambda (H: (drop O O c -a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h -d c e)).(\lambda (H1: (le (plus d h) O)).(let H2 \def (eq_ind C c (\lambda -(c0: C).(drop h d c0 e)) H0 a (drop_gen_refl c a H)) in (let H_y \def -(le_n_O_eq (plus d h) H1) in (land_ind (eq nat d O) (eq nat h O) (drop (minus -O h) O e a) (\lambda (H3: (eq nat d O)).(\lambda (H4: (eq nat h O)).(let H5 -\def (eq_ind nat d (\lambda (n: nat).(drop h n a e)) H2 O H3) in (let H6 \def -(eq_ind nat h (\lambda (n: nat).(drop n O a e)) H5 O H4) in (eq_ind_r nat O -(\lambda (n: nat).(drop (minus O n) O e a)) (eq_ind C a (\lambda (c0: -C).(drop (minus O O) O c0 a)) (drop_refl a) e (drop_gen_refl a e H6)) h -H4))))) (plus_O d h (sym_eq nat O (plus d h) H_y))))))))))))) (\lambda (i0: -nat).(\lambda (H: ((\forall (a: C).(\forall (c: C).((drop i0 O c a) \to -(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le -(plus d h) i0) \to (drop (minus i0 h) O e a))))))))))).(\lambda (a: -C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop (S i0) O c0 a) \to (\forall -(e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d -h) (S i0)) \to (drop (minus (S i0) h) O e a)))))))) (\lambda (n: -nat).(\lambda (H0: (drop (S i0) O (CSort n) a)).(\lambda (e: C).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H1: (drop h d (CSort n) e)).(\lambda (H2: -(le (plus d h) (S i0))).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat d -O) (drop (minus (S i0) h) O e a) (\lambda (H3: (eq C e (CSort n))).(\lambda -(H4: (eq nat h O)).(\lambda (H5: (eq nat d O)).(and3_ind (eq C a (CSort n)) -(eq nat (S i0) O) (eq nat O O) (drop (minus (S i0) h) O e a) (\lambda (H6: -(eq C a (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O -O)).(let H9 \def (eq_ind nat d (\lambda (n0: nat).(le (plus n0 h) (S i0))) H2 -O H5) in (let H10 \def (eq_ind nat h (\lambda (n0: nat).(le (plus O n0) (S -i0))) H9 O H4) in (eq_ind_r nat O (\lambda (n0: nat).(drop (minus (S i0) n0) -O e a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O c0 -a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) -c0)) (let H11 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (drop -(minus (S i0) O) O (CSort n) (CSort n)) H11)) a H6) e H3) h H4)))))) -(drop_gen_sort n (S i0) O a H0))))) (drop_gen_sort n h d e H1))))))))) -(\lambda (c0: C).(\lambda (H0: (((drop (S i0) O c0 a) \to (\forall (e: -C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) -(S i0)) \to (drop (minus (S i0) h) O e a))))))))).(\lambda (k: K).(K_ind -(\lambda (k0: K).(\forall (t: T).((drop (S i0) O (CHead c0 k0 t) a) \to -(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d (CHead c0 k0 -t) e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))) -(\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Bind -b) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: -(drop h d (CHead c0 (Bind b) t) e)).(\lambda (H3: (le (plus d h) (S -i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Bind b) t) e) \to ((le -(plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h -O (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind -(\lambda (n: nat).((drop n O (CHead c0 (Bind b) t) e) \to ((le (plus O n) (S -i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 -(Bind b) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 -(Bind b) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Bind -b) i0 c0 a (drop_gen_drop (Bind b) c0 a t i0 H1) t) e (drop_gen_refl (CHead -c0 (Bind b) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead -c0 (Bind b) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O -e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Bind b) t) e)).(\lambda (H7: -(le (plus O (S h0)) (S i0))).(H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) e -h0 O (drop_gen_drop (Bind b) c0 e t h0 H6) (le_S_n (plus O h0) i0 H7)))))) h -H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Bind b) t) -e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e -a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Bind b) t) e)).(\lambda (H5: -(le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: -T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t -(lift h (r (Bind b) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r -(Bind b) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H6: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t -(lift h (r (Bind b) d0) x1))).(\lambda (H8: (drop h (r (Bind b) d0) c0 -x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c1: C).(drop (minus (S i0) -h) O c1 a)) (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead -x0 (Bind b) x1) a)) (drop_drop (Bind b) (minus i0 h) x0 a (H a c0 -(drop_gen_drop (Bind b) c0 a t i0 H1) x0 h d0 H8 (le_S_n (plus d0 h) i0 H5)) -x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus -d0 h) i0 H5)))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Bind b) H4)))))) d -H2 H3))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O -(CHead c0 (Flat f) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H2: (drop h d (CHead c0 (Flat f) t) e)).(\lambda (H3: (le -(plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Flat f) -t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) -(\lambda (H4: (drop h O (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus O -h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Flat f) t) e) -\to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda -(H6: (drop O O (CHead c0 (Flat f) t) e)).(\lambda (_: (le (plus O O) (S -i0))).(eq_ind C (CHead c0 (Flat f) t) (\lambda (c1: C).(drop (minus (S i0) O) -O c1 a)) (drop_drop (Flat f) i0 c0 a (drop_gen_drop (Flat f) c0 a t i0 H1) t) -e (drop_gen_refl (CHead c0 (Flat f) t) e H6)))) (\lambda (h0: nat).(\lambda -(_: (((drop h0 O (CHead c0 (Flat f) t) e) \to ((le (plus O h0) (S i0)) \to -(drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 -(Flat f) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H0 (drop_gen_drop -(Flat f) c0 a t i0 H1) e (S h0) O (drop_gen_drop (Flat f) c0 e t h0 H6) -H7))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 -(Flat f) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e -a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Flat f) t) e)).(\lambda (H5: -(le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: -T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t -(lift h (r (Flat f) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r -(Flat f) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H6: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t -(lift h (r (Flat f) d0) x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 -x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) -h) O c1 a)) (let H9 \def (eq_ind_r nat (minus (S i0) h) (\lambda (n: -nat).(drop n O x0 a)) (H0 (drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) -H8 H5) (S (minus i0 h)) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n -(plus d0 h) i0 H5)))) in (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop -n O (CHead x0 (Flat f) x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) -(minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 -h) i0 H5))))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 -H3))))))))) k)))) c))))) i). - -theorem drop_conf_rev: - \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to -(\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: -C).(drop j O c1 c2)) (\lambda (c1: C).(drop i j c1 e1))))))))) -\def - \lambda (j: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (e2: -C).((drop n O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) -\to (ex2 C (\lambda (c1: C).(drop n O c1 c2)) (\lambda (c1: C).(drop i n c1 -e1)))))))))) (\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop O O e1 -e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(let -H1 \def (eq_ind_r C e2 (\lambda (c: C).(drop i O c2 c)) H0 e1 (drop_gen_refl -e1 e2 H)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 c2)) (\lambda (c1: -C).(drop i O c1 e1)) c2 (drop_refl c2) H1)))))))) (\lambda (j0: nat).(\lambda -(IHj: ((\forall (e1: C).(\forall (e2: C).((drop j0 O e1 e2) \to (\forall (c2: -C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j0 O -c1 c2)) (\lambda (c1: C).(drop i j0 c1 e1))))))))))).(\lambda (e1: C).(C_ind -(\lambda (c: C).(\forall (e2: C).((drop (S j0) O c e2) \to (\forall (c2: -C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop (S -j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 c))))))))) (\lambda (n: -nat).(\lambda (e2: C).(\lambda (H: (drop (S j0) O (CSort n) e2)).(\lambda -(c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(and3_ind (eq C e2 -(CSort n)) (eq nat (S j0) O) (eq nat O O) (ex2 C (\lambda (c1: C).(drop (S -j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) (\lambda (H1: -(eq C e2 (CSort n))).(\lambda (H2: (eq nat (S j0) O)).(\lambda (_: (eq nat O -O)).(let H4 \def (eq_ind C e2 (\lambda (c: C).(drop i O c2 c)) H0 (CSort n) -H1) in (let H5 \def (eq_ind nat (S j0) (\lambda (ee: nat).(match ee with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C -(\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 -(CSort n)))) H5)))))) (drop_gen_sort n (S j0) O e2 H)))))))) (\lambda (e2: -C).(\lambda (IHe1: ((\forall (e3: C).((drop (S j0) O e2 e3) \to (\forall (c2: -C).(\forall (i: nat).((drop i O c2 e3) \to (ex2 C (\lambda (c1: C).(drop (S -j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)))))))))).(\lambda (k: -K).(\lambda (t: T).(\lambda (e3: C).(\lambda (H: (drop (S j0) O (CHead e2 k -t) e3)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 -e3)).(K_ind (\lambda (k0: K).((drop (r k0 j0) O e2 e3) \to (ex2 C (\lambda -(c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 -k0 t)))))) (\lambda (b: B).(\lambda (H1: (drop (r (Bind b) j0) O e2 e3)).(let -H_x \def (IHj e2 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda -(c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e2)) (ex2 C -(\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 -(CHead e2 (Bind b) t)))) (\lambda (x: C).(\lambda (H3: (drop j0 O x -c2)).(\lambda (H4: (drop i j0 x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S -j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t))) -(CHead x (Bind b) (lift i (r (Bind b) j0) t)) (drop_drop (Bind b) j0 x c2 H3 -(lift i (r (Bind b) j0) t)) (drop_skip (Bind b) i j0 x e2 H4 t))))) H2))))) -(\lambda (f: F).(\lambda (H1: (drop (r (Flat f) j0) O e2 e3)).(let H_x \def -(IHe1 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop -(S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)) (ex2 C (\lambda (c1: -C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat -f) t)))) (\lambda (x: C).(\lambda (H3: (drop (S j0) O x c2)).(\lambda (H4: -(drop i (S j0) x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) -(\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t))) (CHead x (Flat f) -(lift i (r (Flat f) j0) t)) (drop_drop (Flat f) j0 x c2 H3 (lift i (r (Flat -f) j0) t)) (drop_skip (Flat f) i j0 x e2 H4 t))))) H2))))) k (drop_gen_drop k -e2 e3 t j0 H))))))))))) e1)))) j). - -theorem drop_trans_le: - \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall -(c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O -c2 e2) \to (ex2 C (\lambda (e1: C).(drop i O c1 e1)) (\lambda (e1: C).(drop h -(minus d i) e1 e2))))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (d: nat).((le n d) \to -(\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to -(\forall (e2: C).((drop n O c2 e2) \to (ex2 C (\lambda (e1: C).(drop n O c1 -e1)) (\lambda (e1: C).(drop h (minus d n) e1 e2)))))))))))) (\lambda (d: -nat).(\lambda (_: (le O d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: -nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H1: (drop O O -c2 e2)).(let H2 \def (eq_ind C c2 (\lambda (c: C).(drop h d c1 c)) H0 e2 -(drop_gen_refl c2 e2 H1)) in (eq_ind nat d (\lambda (n: nat).(ex2 C (\lambda -(e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h n e1 e2)))) (ex_intro2 C -(\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h d e1 e2)) c1 -(drop_refl c1) H2) (minus d O) (minus_n_O d))))))))))) (\lambda (i0: -nat).(\lambda (IHi: ((\forall (d: nat).((le i0 d) \to (\forall (c1: -C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: -C).((drop i0 O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i0 O c1 e1)) (\lambda -(e1: C).(drop h (minus d i0) e1 e2))))))))))))).(\lambda (d: nat).(nat_ind -(\lambda (n: nat).((le (S i0) n) \to (\forall (c1: C).(\forall (c2: -C).(\forall (h: nat).((drop h n c1 c2) \to (\forall (e2: C).((drop (S i0) O -c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: -C).(drop h (minus n (S i0)) e1 e2))))))))))) (\lambda (H: (le (S i0) -O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (_: (drop h -O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(ex2_ind nat -(\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le i0 n)) (ex2 C -(\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S -i0)) e1 e2))) (\lambda (x: nat).(\lambda (H2: (eq nat O (S x))).(\lambda (_: -(le i0 x)).(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O -\Rightarrow True | (S _) \Rightarrow False])) I (S x) H2) in (False_ind (ex2 -C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O -(S i0)) e1 e2))) H4))))) (le_gen_S i0 O H))))))))) (\lambda (d0: -nat).(\lambda (_: (((le (S i0) d0) \to (\forall (c1: C).(\forall (c2: -C).(\forall (h: nat).((drop h d0 c1 c2) \to (\forall (e2: C).((drop (S i0) O -c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: -C).(drop h (minus d0 (S i0)) e1 e2)))))))))))).(\lambda (H: (le (S i0) (S -d0))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: -nat).((drop h (S d0) c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to -(ex2 C (\lambda (e1: C).(drop (S i0) O c e1)) (\lambda (e1: C).(drop h (minus -(S d0) (S i0)) e1 e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (h: -nat).(\lambda (H0: (drop h (S d0) (CSort n) c2)).(\lambda (e2: C).(\lambda -(H1: (drop (S i0) O c2 e2)).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq -nat (S d0) O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda -(e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H2: (eq C c2 (CSort -n))).(\lambda (_: (eq nat h O)).(\lambda (_: (eq nat (S d0) O)).(let H5 \def -(eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CSort n) H2) in -(and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (ex2 C (\lambda -(e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) -(S i0)) e1 e2))) (\lambda (H6: (eq C e2 (CSort n))).(\lambda (H7: (eq nat (S -i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(ex2 -C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h -(minus (S d0) (S i0)) e1 c)))) (let H9 \def (eq_ind nat (S i0) (\lambda (ee: -nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) -in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda -(e1: C).(drop h (minus (S d0) (S i0)) e1 (CSort n)))) H9)) e2 H6)))) -(drop_gen_sort n (S i0) O e2 H5)))))) (drop_gen_sort n h (S d0) c2 H0)))))))) -(\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (h: nat).((drop h -(S d0) c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda -(e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) -e1 e2)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: -T).(\forall (c3: C).(\forall (h: nat).((drop h (S d0) (CHead c2 k0 t) c3) \to -(\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S -i0) O (CHead c2 k0 t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 -e2)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: -nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Bind b) t) c3)).(\lambda (e2: -C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: -C).(\lambda (v: T).(eq C c3 (CHead e (Bind b) v)))) (\lambda (_: C).(\lambda -(v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e: C).(\lambda (_: -T).(drop h (r (Bind b) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O -(CHead c2 (Bind b) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 -e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 -(Bind b) x1))).(\lambda (H3: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda -(H4: (drop h (r (Bind b) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: -C).(drop (S i0) O c e2)) H1 (CHead x0 (Bind b) x1) H2) in (eq_ind_r T (lift h -(r (Bind b) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O -(CHead c2 (Bind b) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 -e2)))) (ex2_ind C (\lambda (e1: C).(drop i0 O c2 e1)) (\lambda (e1: C).(drop -h (minus d0 i0) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 -(Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S -d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop i0 O c2 x)).(\lambda -(H7: (drop h (minus d0 i0) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) -O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop -h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Bind b) i0 c2 x H6 (lift h (r -(Bind b) d0) x1)) H7)))) (IHi d0 (le_S_n i0 d0 H) c2 x0 h H4 e2 -(drop_gen_drop (Bind b) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 -t h d0 (Bind b) H0))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (c3: -C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Flat f) t) -c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T -(\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Flat f) v)))) (\lambda (_: -C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e: -C).(\lambda (_: T).(drop h (r (Flat f) d0) c2 e))) (ex2 C (\lambda (e1: -C).(drop (S i0) O (CHead c2 (Flat f) t) e1)) (\lambda (e1: C).(drop h (minus -(S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C -c3 (CHead x0 (Flat f) x1))).(\lambda (H3: (eq T t (lift h (r (Flat f) d0) -x1))).(\lambda (H4: (drop h (r (Flat f) d0) c2 x0)).(let H5 \def (eq_ind C c3 -(\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Flat f) x1) H2) in -(eq_ind_r T (lift h (r (Flat f) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: -C).(drop (S i0) O (CHead c2 (Flat f) t0) e1)) (\lambda (e1: C).(drop h (minus -(S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop (S i0) O c2 e1)) -(\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) (ex2 C (\lambda (e1: -C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) -(\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: -C).(\lambda (H6: (drop (S i0) O c2 x)).(\lambda (H7: (drop h (minus (S d0) (S -i0)) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) -(lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S -i0)) e1 e2)) x (drop_drop (Flat f) i0 c2 x H6 (lift h (r (Flat f) d0) x1)) -H7)))) (IHc x0 h H4 e2 (drop_gen_drop (Flat f) x0 e2 x1 i0 H5))) t H3))))))) -(drop_gen_skip_l c2 c3 t h d0 (Flat f) H0))))))))) k)))) c1))))) d)))) i). - -theorem drop_trans_ge: - \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: -nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O c2 -e2) \to ((le d i) \to (drop (plus i h) O c1 e2))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c2: -C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: -C).((drop n O c2 e2) \to ((le d n) \to (drop (plus n h) O c1 e2)))))))))) -(\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: -nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (drop O O -c2 e2)).(\lambda (H1: (le d O)).(eq_ind C c2 (\lambda (c: C).(drop (plus O h) -O c1 c)) (let H_y \def (le_n_O_eq d H1) in (let H2 \def (eq_ind_r nat d -(\lambda (n: nat).(drop h n c1 c2)) H O H_y) in H2)) e2 (drop_gen_refl c2 e2 -H0)))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (c1: C).(\forall -(c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall -(e2: C).((drop i0 O c2 e2) \to ((le d i0) \to (drop (plus i0 h) O c1 -e2))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: -C).(\forall (d: nat).(\forall (h: nat).((drop h d c c2) \to (\forall (e2: -C).((drop (S i0) O c2 e2) \to ((le d (S i0)) \to (drop (plus (S i0) h) O c -e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: -nat).(\lambda (H: (drop h d (CSort n) c2)).(\lambda (e2: C).(\lambda (H0: -(drop (S i0) O c2 e2)).(\lambda (H1: (le d (S i0))).(and3_ind (eq C c2 (CSort -n)) (eq nat h O) (eq nat d O) (drop (S (plus i0 h)) O (CSort n) e2) (\lambda -(H2: (eq C c2 (CSort n))).(\lambda (H3: (eq nat h O)).(\lambda (H4: (eq nat d -O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S (plus i0 n0)) O (CSort n) -e2)) (let H5 \def (eq_ind nat d (\lambda (n0: nat).(le n0 (S i0))) H1 O H4) -in (let H6 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CSort -n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop -(S (plus i0 O)) O (CSort n) e2) (\lambda (H7: (eq C e2 (CSort n))).(\lambda -(H8: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) -(\lambda (c: C).(drop (S (plus i0 O)) O (CSort n) c)) (let H10 \def (eq_ind -nat (S i0) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) -\Rightarrow True])) I O H8) in (False_ind (drop (S (plus i0 O)) O (CSort n) -(CSort n)) H10)) e2 H7)))) (drop_gen_sort n (S i0) O e2 H6)))) h H3)))) -(drop_gen_sort n h d c2 H)))))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall -(c3: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 c3) \to (\forall -(e2: C).((drop (S i0) O c3 e2) \to ((le d (S i0)) \to (drop (S (plus i0 h)) O -c2 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (d: -nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c2 k t) -c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le n (S i0)) \to (drop -(S (plus i0 h)) O (CHead c2 k t) e2))))))) (\lambda (h: nat).(nat_ind -(\lambda (n: nat).((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop -(S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) -e2)))))) (\lambda (H: (drop O O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda -(H0: (drop (S i0) O c3 e2)).(\lambda (_: (le O (S i0))).(let H2 \def -(eq_ind_r C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead c2 k t) -(drop_gen_refl (CHead c2 k t) c3 H)) in (eq_ind nat i0 (\lambda (n: -nat).(drop (S n) O (CHead c2 k t) e2)) (drop_drop k i0 c2 e2 (drop_gen_drop k -c2 e2 t i0 H2) t) (plus i0 O) (plus_n_O i0))))))) (\lambda (n: nat).(\lambda -(_: (((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 -e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) -e2))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (e2: -C).(\lambda (H1: (drop (S i0) O c3 e2)).(\lambda (H2: (le O (S i0))).(eq_ind -nat (S (plus i0 n)) (\lambda (n0: nat).(drop (S n0) O (CHead c2 k t) e2)) -(drop_drop k (S (plus i0 n)) c2 e2 (eq_ind_r nat (S (r k (plus i0 n))) -(\lambda (n0: nat).(drop n0 O c2 e2)) (eq_ind_r nat (plus i0 (r k n)) -(\lambda (n0: nat).(drop (S n0) O c2 e2)) (IHc c3 O (r k n) (drop_gen_drop k -c2 c3 t n H0) e2 H1 H2) (r k (plus i0 n)) (r_plus_sym k i0 n)) (r k (S (plus -i0 n))) (r_S k (plus i0 n))) t) (plus i0 (S n)) (plus_n_Sm i0 n)))))))) h)) -(\lambda (d0: nat).(\lambda (IHd: ((\forall (h: nat).((drop h d0 (CHead c2 k -t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d0 (S i0)) \to -(drop (S (plus i0 h)) O (CHead c2 k t) e2)))))))).(\lambda (h: nat).(\lambda -(H: (drop h (S d0) (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop -(S i0) O c3 e2)).(\lambda (H1: (le (S d0) (S i0))).(ex3_2_ind C T (\lambda -(e: C).(\lambda (v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T t (lift h (r k d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r -k d0) c2 e))) (drop (S (plus i0 h)) O (CHead c2 k t) e2) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 k x1))).(\lambda (H3: -(eq T t (lift h (r k d0) x1))).(\lambda (H4: (drop h (r k d0) c2 x0)).(let H5 -\def (eq_ind C c3 (\lambda (c: C).(\forall (h0: nat).((drop h0 d0 (CHead c2 k -t) c) \to (\forall (e3: C).((drop (S i0) O c e3) \to ((le d0 (S i0)) \to -(drop (S (plus i0 h0)) O (CHead c2 k t) e3))))))) IHd (CHead x0 k x1) H2) in -(let H6 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead x0 -k x1) H2) in (let H7 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: -nat).((drop h0 d0 (CHead c2 k t0) (CHead x0 k x1)) \to (\forall (e3: -C).((drop (S i0) O (CHead x0 k x1) e3) \to ((le d0 (S i0)) \to (drop (S (plus -i0 h0)) O (CHead c2 k t0) e3))))))) H5 (lift h (r k d0) x1) H3) in (eq_ind_r -T (lift h (r k d0) x1) (\lambda (t0: T).(drop (S (plus i0 h)) O (CHead c2 k -t0) e2)) (drop_drop k (plus i0 h) c2 e2 (K_ind (\lambda (k0: K).((drop h (r -k0 d0) c2 x0) \to ((drop (r k0 i0) O x0 e2) \to (drop (r k0 (plus i0 h)) O c2 -e2)))) (\lambda (b: B).(\lambda (H8: (drop h (r (Bind b) d0) c2 x0)).(\lambda -(H9: (drop (r (Bind b) i0) O x0 e2)).(IHi c2 x0 (r (Bind b) d0) h H8 e2 H9 -(le_S_n (r (Bind b) d0) i0 H1))))) (\lambda (f: F).(\lambda (H8: (drop h (r -(Flat f) d0) c2 x0)).(\lambda (H9: (drop (r (Flat f) i0) O x0 e2)).(IHc x0 (r -(Flat f) d0) h H8 e2 H9 H1)))) k H4 (drop_gen_drop k x0 e2 x1 i0 H6)) (lift h -(r k d0) x1)) t H3))))))))) (drop_gen_skip_l c2 c3 t h d0 k H))))))))) -d))))))) c1)))) i). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/drop1/defs.ma deleted file mode 100644 index 41b084879..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/defs.ma +++ /dev/null @@ -1,32 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/drop/defs.ma". - -include "basic_1/lift1/defs.ma". - -inductive drop1: PList \to (C \to (C \to Prop)) \def -| drop1_nil: \forall (c: C).(drop1 PNil c c) -| drop1_cons: \forall (c1: C).(\forall (c2: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c1 c2) \to (\forall (c3: C).(\forall (hds: PList).((drop1 hds -c2 c3) \to (drop1 (PCons h d hds) c1 c3)))))))). - -rec definition ptrans (hds: PList) on hds: nat \to PList \def \lambda (i: -nat).(match hds with [PNil \Rightarrow PNil | (PCons h d hds0) \Rightarrow -(let j \def (trans hds0 i) in (let q \def (ptrans hds0 i) in (match (blt j d) -with [true \Rightarrow (PCons h (minus d (S j)) q) | false \Rightarrow -q])))]). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/drop1/fwd.ma deleted file mode 100644 index 319591895..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/fwd.ma +++ /dev/null @@ -1,81 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/drop1/defs.ma". - -implied rec lemma drop1_ind (P: (PList \to (C \to (C \to Prop)))) (f: -(\forall (c: C).(P PNil c c))) (f0: (\forall (c1: C).(\forall (c2: -C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c2) \to (\forall (c3: -C).(\forall (hds: PList).((drop1 hds c2 c3) \to ((P hds c2 c3) \to (P (PCons -h d hds) c1 c3))))))))))) (p: PList) (c: C) (c0: C) (d: drop1 p c c0) on d: P -p c c0 \def match d with [(drop1_nil c1) \Rightarrow (f c1) | (drop1_cons c1 -c2 h d0 d1 c3 hds d2) \Rightarrow (f0 c1 c2 h d0 d1 c3 hds d2 ((drop1_ind P f -f0) hds c2 c3 d2))]. - -lemma drop1_gen_pnil: - \forall (c1: C).(\forall (c2: C).((drop1 PNil c1 c2) \to (eq C c1 c2))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c1 c2)).(insert_eq -PList PNil (\lambda (p: PList).(drop1 p c1 c2)) (\lambda (_: PList).(eq C c1 -c2)) (\lambda (y: PList).(\lambda (H0: (drop1 y c1 c2)).(drop1_ind (\lambda -(p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to (eq C c -c0))))) (\lambda (c: C).(\lambda (_: (eq PList PNil PNil)).(refl_equal C c))) -(\lambda (c3: C).(\lambda (c4: C).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (_: (drop h d c3 c4)).(\lambda (c5: C).(\lambda (hds: -PList).(\lambda (_: (drop1 hds c4 c5)).(\lambda (_: (((eq PList hds PNil) \to -(eq C c4 c5)))).(\lambda (H4: (eq PList (PCons h d hds) PNil)).(let H5 \def -(eq_ind PList (PCons h d hds) (\lambda (ee: PList).(match ee with [PNil -\Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H4) in -(False_ind (eq C c3 c5) H5)))))))))))) y c1 c2 H0))) H))). - -lemma drop1_gen_pcons: - \forall (c1: C).(\forall (c3: C).(\forall (hds: PList).(\forall (h: -nat).(\forall (d: nat).((drop1 (PCons h d hds) c1 c3) \to (ex2 C (\lambda -(c2: C).(drop h d c1 c2)) (\lambda (c2: C).(drop1 hds c2 c3)))))))) -\def - \lambda (c1: C).(\lambda (c3: C).(\lambda (hds: PList).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (drop1 (PCons h d hds) c1 c3)).(insert_eq -PList (PCons h d hds) (\lambda (p: PList).(drop1 p c1 c3)) (\lambda (_: -PList).(ex2 C (\lambda (c2: C).(drop h d c1 c2)) (\lambda (c2: C).(drop1 hds -c2 c3)))) (\lambda (y: PList).(\lambda (H0: (drop1 y c1 c3)).(drop1_ind -(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p (PCons h d -hds)) \to (ex2 C (\lambda (c2: C).(drop h d c c2)) (\lambda (c2: C).(drop1 -hds c2 c0))))))) (\lambda (c: C).(\lambda (H1: (eq PList PNil (PCons h d -hds))).(let H2 \def (eq_ind PList PNil (\lambda (ee: PList).(match ee with -[PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons h d hds) -H1) in (False_ind (ex2 C (\lambda (c2: C).(drop h d c c2)) (\lambda (c2: -C).(drop1 hds c2 c))) H2)))) (\lambda (c2: C).(\lambda (c4: C).(\lambda (h0: -nat).(\lambda (d0: nat).(\lambda (H1: (drop h0 d0 c2 c4)).(\lambda (c5: -C).(\lambda (hds0: PList).(\lambda (H2: (drop1 hds0 c4 c5)).(\lambda (H3: -(((eq PList hds0 (PCons h d hds)) \to (ex2 C (\lambda (c6: C).(drop h d c4 -c6)) (\lambda (c6: C).(drop1 hds c6 c5)))))).(\lambda (H4: (eq PList (PCons -h0 d0 hds0) (PCons h d hds))).(let H5 \def (f_equal PList nat (\lambda (e: -PList).(match e with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) -(PCons h0 d0 hds0) (PCons h d hds) H4) in ((let H6 \def (f_equal PList nat -(\lambda (e: PList).(match e with [PNil \Rightarrow d0 | (PCons _ n _) -\Rightarrow n])) (PCons h0 d0 hds0) (PCons h d hds) H4) in ((let H7 \def -(f_equal PList PList (\lambda (e: PList).(match e with [PNil \Rightarrow hds0 -| (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds0) (PCons h d hds) H4) in -(\lambda (H8: (eq nat d0 d)).(\lambda (H9: (eq nat h0 h)).(let H10 \def -(eq_ind PList hds0 (\lambda (p: PList).((eq PList p (PCons h d hds)) \to (ex2 -C (\lambda (c6: C).(drop h d c4 c6)) (\lambda (c6: C).(drop1 hds c6 c5))))) -H3 hds H7) in (let H11 \def (eq_ind PList hds0 (\lambda (p: PList).(drop1 p -c4 c5)) H2 hds H7) in (let H12 \def (eq_ind nat d0 (\lambda (n: nat).(drop h0 -n c2 c4)) H1 d H8) in (let H13 \def (eq_ind nat h0 (\lambda (n: nat).(drop n -d c2 c4)) H12 h H9) in (ex_intro2 C (\lambda (c6: C).(drop h d c2 c6)) -(\lambda (c6: C).(drop1 hds c6 c5)) c4 H13 H11)))))))) H6)) H5)))))))))))) y -c1 c3 H0))) H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/drop1/getl.ma deleted file mode 100644 index 83889c30a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/getl.ma +++ /dev/null @@ -1,107 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/drop1/fwd.ma". - -include "basic_1/getl/drop.ma". - -lemma drop1_getl_trans: - \forall (hds: PList).(\forall (c1: C).(\forall (c2: C).((drop1 hds c2 c1) -\to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl -i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda (e2: C).(drop1 (ptrans hds i) -e2 e1)) (\lambda (e2: C).(getl (trans hds i) c2 (CHead e2 (Bind b) (lift1 -(ptrans hds i) v))))))))))))) -\def - \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: -C).(\forall (c2: C).((drop1 p c2 c1) \to (\forall (b: B).(\forall (e1: -C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to -(ex2 C (\lambda (e2: C).(drop1 (ptrans p i) e2 e1)) (\lambda (e2: C).(getl -(trans p i) c2 (CHead e2 (Bind b) (lift1 (ptrans p i) v)))))))))))))) -(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 c1)).(\lambda -(b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl -i c1 (CHead e1 (Bind b) v))).(let H_y \def (drop1_gen_pnil c2 c1 H) in -(eq_ind_r C c1 (\lambda (c: C).(ex2 C (\lambda (e2: C).(drop1 PNil e2 e1)) -(\lambda (e2: C).(getl i c (CHead e2 (Bind b) v))))) (ex_intro2 C (\lambda -(e2: C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c1 (CHead e2 (Bind b) -v))) e1 (drop1_nil e1) H0) c2 H_y)))))))))) (\lambda (h: nat).(\lambda (d: -nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2: -C).((drop1 hds0 c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: -T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda -(e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) -c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))))))))))))).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2 c1)).(\lambda -(b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl -i c1 (CHead e1 (Bind b) v))).(let H_x \def (drop1_gen_pcons c2 c1 hds0 h d -H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h d c2 c3)) -(\lambda (c3: C).(drop1 hds0 c3 c1)) (ex2 C (\lambda (e2: C).(drop1 (match -(blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans -hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) -(\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow -(trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 -(Bind b) (lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h -(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans -hds0 i)]) v))))) (\lambda (x: C).(\lambda (H3: (drop h d c2 x)).(\lambda (H4: -(drop1 hds0 x c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: -bool).(ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons -h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans -hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow -(trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 -(Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d (S (trans -hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v)))))) -(\lambda (x_x: bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 -i) d) b0) \to (ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow -(PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow -(ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true -\Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 -(CHead e2 (Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d -(S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) -v))))))) (\lambda (H5: (eq bool (blt (trans hds0 i) d) true)).(let H_x0 \def -(H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in (ex2_ind C (\lambda (e2: -C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) x -(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: -C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) -(\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h -(minus d (S (trans hds0 i))) (ptrans hds0 i)) v))))) (\lambda (x0: -C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8: (getl (trans -hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let H_x1 \def -(drop_getl_trans_lt (trans hds0 i) d (blt_lt d (trans hds0 i) H5) c2 x h H3 b -x0 (lift1 (ptrans hds0 i) v) H8) in (let H9 \def H_x1 in (ex2_ind C (\lambda -(e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans -hds0 i))) (lift1 (ptrans hds0 i) v))))) (\lambda (e2: C).(drop h (minus d (S -(trans hds0 i))) e2 x0)) (ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S -(trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 -i) c2 (CHead e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans -hds0 i)) v))))) (\lambda (x1: C).(\lambda (H10: (getl (trans hds0 i) c2 -(CHead x1 (Bind b) (lift h (minus d (S (trans hds0 i))) (lift1 (ptrans hds0 -i) v))))).(\lambda (H11: (drop h (minus d (S (trans hds0 i))) x1 -x0)).(ex_intro2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0 -i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead -e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) -v)))) x1 (drop1_cons x1 x0 h (minus d (S (trans hds0 i))) H11 e1 (ptrans hds0 -i) H7) H10)))) H9)))))) H6)))) (\lambda (H5: (eq bool (blt (trans hds0 i) d) -false)).(let H_x0 \def (H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in -(ex2_ind C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: -C).(getl (trans hds0 i) x (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) -(ex2 C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl -(plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))) -(\lambda (x0: C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8: -(getl (trans hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let -H9 \def (drop_getl_trans_ge (trans hds0 i) c2 x d h H3 (CHead x0 (Bind b) -(lift1 (ptrans hds0 i) v)) H8) in (ex_intro2 C (\lambda (e2: C).(drop1 -(ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 -(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) x0 H7 (H9 (bge_le d (trans -hds0 i) H5))))))) H6)))) x_x)))))) H2))))))))))))))) hds). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/drop1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/drop1/props.ma deleted file mode 100644 index 41b61d8b6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/drop1/props.ma +++ /dev/null @@ -1,88 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/drop1/fwd.ma". - -include "basic_1/drop/props.ma". - -include "basic_1/getl/defs.ma". - -lemma drop1_skip_bind: - \forall (b: B).(\forall (e: C).(\forall (hds: PList).(\forall (c: -C).(\forall (u: T).((drop1 hds c e) \to (drop1 (Ss hds) (CHead c (Bind b) -(lift1 hds u)) (CHead e (Bind b) u))))))) -\def - \lambda (b: B).(\lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: -PList).(\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) -(CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u)))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (H: (drop1 PNil c e)).(let H_y \def -(drop1_gen_pnil c e H) in (eq_ind_r C e (\lambda (c0: C).(drop1 PNil (CHead -c0 (Bind b) u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c -H_y))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda -(H: ((\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead -c (Bind b) (lift1 p u)) (CHead e (Bind b) u))))))).(\lambda (c: C).(\lambda -(u: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(let H_x \def -(drop1_gen_pcons c e p n n0 H0) in (let H1 \def H_x in (ex2_ind C (\lambda -(c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 e)) (drop1 (PCons n (S -n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)) -(\lambda (x: C).(\lambda (H2: (drop n n0 c x)).(\lambda (H3: (drop1 p x -e)).(drop1_cons (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead x (Bind b) -(lift1 p u)) n (S n0) (drop_skip_bind n n0 c x H2 b (lift1 p u)) (CHead e -(Bind b) u) (Ss p) (H x u H3))))) H1)))))))))) hds))). - -lemma drop1_cons_tail: - \forall (c2: C).(\forall (c3: C).(\forall (h: nat).(\forall (d: nat).((drop -h d c2 c3) \to (\forall (hds: PList).(\forall (c1: C).((drop1 hds c1 c2) \to -(drop1 (PConsTail hds h d) c1 c3)))))))) -\def - \lambda (c2: C).(\lambda (c3: C).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (drop h d c2 c3)).(\lambda (hds: PList).(PList_ind (\lambda -(p: PList).(\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 -c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H_y \def -(drop1_gen_pnil c1 c2 H0) in (eq_ind_r C c2 (\lambda (c: C).(drop1 (PCons h d -PNil) c c3)) (drop1_cons c2 c3 h d H c3 PNil (drop1_nil c3)) c1 H_y)))) -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H0: -((\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 -c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 (PCons n n0 p) c1 c2)).(let H_x -\def (drop1_gen_pcons c1 c2 p n n0 H1) in (let H2 \def H_x in (ex2_ind C -(\lambda (c4: C).(drop n n0 c1 c4)) (\lambda (c4: C).(drop1 p c4 c2)) (drop1 -(PCons n n0 (PConsTail p h d)) c1 c3) (\lambda (x: C).(\lambda (H3: (drop n -n0 c1 x)).(\lambda (H4: (drop1 p x c2)).(drop1_cons c1 x n n0 H3 c3 -(PConsTail p h d) (H0 x H4))))) H2))))))))) hds)))))). - -theorem drop1_trans: - \forall (is1: PList).(\forall (c1: C).(\forall (c0: C).((drop1 is1 c1 c0) -\to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1 -(papp is1 is2) c1 c2))))))) -\def - \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (c1: -C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2: -C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1 c2)))))))) (\lambda (c1: -C).(\lambda (c0: C).(\lambda (H: (drop1 PNil c1 c0)).(\lambda (is2: -PList).(\lambda (c2: C).(\lambda (H0: (drop1 is2 c0 c2)).(let H_y \def -(drop1_gen_pnil c1 c0 H) in (let H1 \def (eq_ind_r C c0 (\lambda (c: -C).(drop1 is2 c c2)) H0 c1 H_y) in H1)))))))) (\lambda (n: nat).(\lambda (n0: -nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: C).(\forall (c0: -C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 -c2) \to (drop1 (papp p is2) c1 c2))))))))).(\lambda (c1: C).(\lambda (c0: -C).(\lambda (H0: (drop1 (PCons n n0 p) c1 c0)).(\lambda (is2: PList).(\lambda -(c2: C).(\lambda (H1: (drop1 is2 c0 c2)).(let H_x \def (drop1_gen_pcons c1 c0 -p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c3: C).(drop n n0 c1 -c3)) (\lambda (c3: C).(drop1 p c3 c0)) (drop1 (PCons n n0 (papp p is2)) c1 -c2) (\lambda (x: C).(\lambda (H3: (drop n n0 c1 x)).(\lambda (H4: (drop1 p x -c0)).(drop1_cons c1 x n n0 H3 c2 (papp p is2) (H x c0 H4 is2 c2 H1))))) -H2))))))))))))) is1). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/etc/performance.txt b/matita/matita/contribs/lambdadelta/basic_1/etc/performance.txt deleted file mode 100644 index 6c46086ea..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/etc/performance.txt +++ /dev/null @@ -1,17 +0,0 @@ -full validation of lambdadelta_1 - -command: time ../../matitac.opt basic_1 - -- machine: "monica" - date : ven 6 mar 2015, 20.31.46, CET - - real 4m39.904s - user 3m58.580s - sys 0m11.473s - -- machine: "dev.helm" - date : Sat Mar 7 16:41:46 CET 2015 - - real 30m36.357s - user 6m35.749s - sys 0m31.518s diff --git a/matita/matita/contribs/lambdadelta/basic_1/etc/planes.txt b/matita/matita/contribs/lambdadelta/basic_1/etc/planes.txt deleted file mode 100644 index d4b66b373..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/etc/planes.txt +++ /dev/null @@ -1,13 +0,0 @@ -T s tlist tlt iso -C r flt app -lift cnt drop clear getl clen cimp -lift1 drop1 -subst0 subst1 subst csubst0 csubst1 fsubst0 -G next_plus -sty0 sty1 -A asucc aplus leq llt aprem ex0 -pr0 wcpr0 pr1 pr2 pr3 -csubv arity csuba -nf2 sn3 sc3 csubc ex2 -pc1 pc3 -ty3 csubt wf3 ex1 diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/ex0/defs.ma deleted file mode 100644 index 546e03916..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ex0/defs.ma +++ /dev/null @@ -1,32 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/A/defs.ma". - -include "basic_1/G/defs.ma". - -definition gz: - G -\def - mk_G S lt_n_Sn. - -inductive leqz: A \to (A \to Prop) \def -| leqz_sort: \forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall -(n2: nat).((eq nat (plus h1 n2) (plus h2 n1)) \to (leqz (ASort h1 n1) (ASort -h2 n2)))))) -| leqz_head: \forall (a1: A).(\forall (a2: A).((leqz a1 a2) \to (\forall (a3: -A).(\forall (a4: A).((leqz a3 a4) \to (leqz (AHead a1 a3) (AHead a2 a4))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/ex0/fwd.ma deleted file mode 100644 index 248d07e06..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ex0/fwd.ma +++ /dev/null @@ -1,28 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ex0/defs.ma". - -implied rec lemma leqz_ind (P: (A \to (A \to Prop))) (f: (\forall (h1: -nat).(\forall (h2: nat).(\forall (n1: nat).(\forall (n2: nat).((eq nat (plus -h1 n2) (plus h2 n1)) \to (P (ASort h1 n1) (ASort h2 n2)))))))) (f0: (\forall -(a1: A).(\forall (a2: A).((leqz a1 a2) \to ((P a1 a2) \to (\forall (a3: -A).(\forall (a4: A).((leqz a3 a4) \to ((P a3 a4) \to (P (AHead a1 a3) (AHead -a2 a4))))))))))) (a: A) (a0: A) (l: leqz a a0) on l: P a a0 \def match l with -[(leqz_sort h1 h2 n1 n2 e) \Rightarrow (f h1 h2 n1 n2 e) | (leqz_head a1 a2 -l0 a3 a4 l1) \Rightarrow (f0 a1 a2 l0 ((leqz_ind P f f0) a1 a2 l0) a3 a4 l1 -((leqz_ind P f f0) a3 a4 l1))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex0/props.ma b/matita/matita/contribs/lambdadelta/basic_1/ex0/props.ma deleted file mode 100644 index c115f9d6b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ex0/props.ma +++ /dev/null @@ -1,188 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ex0/fwd.ma". - -include "basic_1/leq/fwd.ma". - -include "basic_1/aplus/props.ma". - -lemma aplus_gz_le: - \forall (k: nat).(\forall (h: nat).(\forall (n: nat).((le h k) \to (eq A -(aplus gz (ASort h n) k) (ASort O (plus (minus k h) n)))))) -\def - \lambda (k: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).(\forall (n0: -nat).((le h n) \to (eq A (aplus gz (ASort h n0) n) (ASort O (plus (minus n h) -n0))))))) (\lambda (h: nat).(\lambda (n: nat).(\lambda (H: (le h O)).(let H_y -\def (le_n_O_eq h H) in (eq_ind nat O (\lambda (n0: nat).(eq A (ASort n0 n) -(ASort O n))) (refl_equal A (ASort O n)) h H_y))))) (\lambda (k0: -nat).(\lambda (IH: ((\forall (h: nat).(\forall (n: nat).((le h k0) \to (eq A -(aplus gz (ASort h n) k0) (ASort O (plus (minus k0 h) n)))))))).(\lambda (h: -nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le n (S k0)) \to (eq A -(asucc gz (aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O -\Rightarrow (S k0) | (S l) \Rightarrow (minus k0 l)]) n0)))))) (\lambda (n: -nat).(\lambda (_: (le O (S k0))).(eq_ind A (aplus gz (asucc gz (ASort O n)) -k0) (\lambda (a: A).(eq A a (ASort O (S (plus k0 n))))) (eq_ind_r A (ASort O -(plus (minus k0 O) (S n))) (\lambda (a: A).(eq A a (ASort O (S (plus k0 -n))))) (eq_ind nat k0 (\lambda (n0: nat).(eq A (ASort O (plus n0 (S n))) -(ASort O (S (plus k0 n))))) (eq_ind nat (S (plus k0 n)) (\lambda (n0: -nat).(eq A (ASort O n0) (ASort O (S (plus k0 n))))) (refl_equal A (ASort O (S -(plus k0 n)))) (plus k0 (S n)) (plus_n_Sm k0 n)) (minus k0 O) (minus_n_O k0)) -(aplus gz (ASort O (S n)) k0) (IH O (S n) (le_O_n k0))) (asucc gz (aplus gz -(ASort O n) k0)) (aplus_asucc gz k0 (ASort O n))))) (\lambda (n: -nat).(\lambda (_: ((\forall (n0: nat).((le n (S k0)) \to (eq A (asucc gz -(aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O \Rightarrow (S -k0) | (S l) \Rightarrow (minus k0 l)]) n0))))))).(\lambda (n0: nat).(\lambda -(H0: (le (S n) (S k0))).(let H_y \def (le_S_n n k0 H0) in (eq_ind A (aplus gz -(ASort n n0) k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n) n0) -k0)) a)) (eq_ind A (aplus gz (asucc gz (ASort (S n) n0)) k0) (\lambda (a: -A).(eq A a (aplus gz (ASort n n0) k0))) (refl_equal A (aplus gz (ASort n n0) -k0)) (asucc gz (aplus gz (ASort (S n) n0) k0)) (aplus_asucc gz k0 (ASort (S -n) n0))) (ASort O (plus (minus k0 n) n0)) (IH n n0 H_y))))))) h)))) k). - -lemma aplus_gz_ge: - \forall (n: nat).(\forall (k: nat).(\forall (h: nat).((le k h) \to (eq A -(aplus gz (ASort h n) k) (ASort (minus h k) n))))) -\def - \lambda (n: nat).(\lambda (k: nat).(nat_ind (\lambda (n0: nat).(\forall (h: -nat).((le n0 h) \to (eq A (aplus gz (ASort h n) n0) (ASort (minus h n0) -n))))) (\lambda (h: nat).(\lambda (_: (le O h)).(eq_ind nat h (\lambda (n0: -nat).(eq A (ASort h n) (ASort n0 n))) (refl_equal A (ASort h n)) (minus h O) -(minus_n_O h)))) (\lambda (k0: nat).(\lambda (IH: ((\forall (h: nat).((le k0 -h) \to (eq A (aplus gz (ASort h n) k0) (ASort (minus h k0) n)))))).(\lambda -(h: nat).(nat_ind (\lambda (n0: nat).((le (S k0) n0) \to (eq A (asucc gz -(aplus gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n)))) (\lambda (H: (le -(S k0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat O (S n0))) (\lambda (n0: -nat).(le k0 n0)) (eq A (asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) -(\lambda (x: nat).(\lambda (H0: (eq nat O (S x))).(\lambda (_: (le k0 -x)).(let H2 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O -\Rightarrow True | (S _) \Rightarrow False])) I (S x) H0) in (False_ind (eq A -(asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) H2))))) (le_gen_S k0 O H))) -(\lambda (n0: nat).(\lambda (_: (((le (S k0) n0) \to (eq A (asucc gz (aplus -gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n))))).(\lambda (H0: (le (S k0) -(S n0))).(let H_y \def (le_S_n k0 n0 H0) in (eq_ind A (aplus gz (ASort n0 n) -k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n0) n) k0)) a)) -(eq_ind A (aplus gz (asucc gz (ASort (S n0) n)) k0) (\lambda (a: A).(eq A a -(aplus gz (ASort n0 n) k0))) (refl_equal A (aplus gz (ASort n0 n) k0)) (asucc -gz (aplus gz (ASort (S n0) n) k0)) (aplus_asucc gz k0 (ASort (S n0) n))) -(ASort (minus n0 k0) n) (IH n0 H_y)))))) h)))) k)). - -lemma next_plus_gz: - \forall (n: nat).(\forall (h: nat).(eq nat (next_plus gz n h) (plus h n))) -\def - \lambda (n: nat).(\lambda (h: nat).(nat_ind (\lambda (n0: nat).(eq nat -(next_plus gz n n0) (plus n0 n))) (refl_equal nat n) (\lambda (n0: -nat).(\lambda (H: (eq nat (next_plus gz n n0) (plus n0 n))).(f_equal nat nat -S (next_plus gz n n0) (plus n0 n) H))) h)). - -lemma leqz_leq: - \forall (a1: A).(\forall (a2: A).((leq gz a1 a2) \to (leqz a1 a2))) -\def - \lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq gz a1 a2)).(leq_ind gz -(\lambda (a: A).(\lambda (a0: A).(leqz a a0))) (\lambda (h1: nat).(\lambda -(h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda -(H0: (eq A (aplus gz (ASort h1 n1) k) (aplus gz (ASort h2 n2) k))).(lt_le_e k -h1 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H1: (lt k h1)).(lt_le_e k h2 -(leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k h2)).(let H3 \def -(eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort -h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 (le_S_n k h1 -(le_S_n (S k) (S h1) (le_S (S (S k)) (S h1) (le_n_S (S k) h1 H1)))))) in (let -H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort -(minus h1 k) n1) a)) H3 (ASort (minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n -k h2 (le_S_n (S k) (S h2) (le_S (S (S k)) (S h2) (le_n_S (S k) h2 H2)))))) in -(let H5 \def (f_equal A nat (\lambda (e: A).(match e with [(ASort n _) -\Rightarrow n | (AHead _ _) \Rightarrow (minus h1 k)])) (ASort (minus h1 k) -n1) (ASort (minus h2 k) n2) H4) in ((let H6 \def (f_equal A nat (\lambda (e: -A).(match e with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) -(ASort (minus h1 k) n1) (ASort (minus h2 k) n2) H4) in (\lambda (H7: (eq nat -(minus h1 k) (minus h2 k))).(eq_ind nat n1 (\lambda (n: nat).(leqz (ASort h1 -n1) (ASort h2 n))) (eq_ind nat h1 (\lambda (n: nat).(leqz (ASort h1 n1) -(ASort n n1))) (leqz_sort h1 h1 n1 n1 (refl_equal nat (plus h1 n1))) h2 -(minus_minus k h1 h2 (le_S_n k h1 (le_S_n (S k) (S h1) (le_S (S (S k)) (S h1) -(le_n_S (S k) h1 H1)))) (le_S_n k h2 (le_S_n (S k) (S h2) (le_S (S (S k)) (S -h2) (le_n_S (S k) h2 H2)))) H7)) n2 H6))) H5))))) (\lambda (H2: (le h2 -k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a -(aplus gz (ASort h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 -(le_S_n k h1 (le_S_n (S k) (S h1) (le_S (S (S k)) (S h1) (le_n_S (S k) h1 -H1)))))) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: -A).(eq A (ASort (minus h1 k) n1) a)) H3 (ASort O (plus (minus k h2) n2)) -(aplus_gz_le k h2 n2 H2)) in (let H5 \def (eq_ind nat (minus h1 k) (\lambda -(n: nat).(eq A (ASort n n1) (ASort O (plus (minus k h2) n2)))) H4 (S (minus -h1 (S k))) (minus_x_Sy h1 k H1)) in (let H6 \def (eq_ind A (ASort (S (minus -h1 (S k))) n1) (\lambda (ee: A).(match ee with [(ASort n _) \Rightarrow -(match n with [O \Rightarrow False | (S _) \Rightarrow True]) | (AHead _ _) -\Rightarrow False])) I (ASort O (plus (minus k h2) n2)) H5) in (False_ind -(leqz (ASort h1 n1) (ASort h2 n2)) H6)))))))) (\lambda (H1: (le h1 -k)).(lt_le_e k h2 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k -h2)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A -a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus k h1) n1)) -(aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) -k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) H3 (ASort -(minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n k h2 (le_S_n (S k) (S h2) (le_S -(S (S k)) (S h2) (le_n_S (S k) h2 H2)))))) in (let H5 \def (sym_eq A (ASort O -(plus (minus k h1) n1)) (ASort (minus h2 k) n2) H4) in (let H6 \def (eq_ind -nat (minus h2 k) (\lambda (n: nat).(eq A (ASort n n2) (ASort O (plus (minus k -h1) n1)))) H5 (S (minus h2 (S k))) (minus_x_Sy h2 k H2)) in (let H7 \def -(eq_ind A (ASort (S (minus h2 (S k))) n2) (\lambda (ee: A).(match ee with -[(ASort n _) \Rightarrow (match n with [O \Rightarrow False | (S _) -\Rightarrow True]) | (AHead _ _) \Rightarrow False])) I (ASort O (plus (minus -k h1) n1)) H6) in (False_ind (leqz (ASort h1 n1) (ASort h2 n2)) H7))))))) -(\lambda (H2: (le h2 k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) -(\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus -k h1) n1)) (aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz -(ASort h2 n2) k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) -H3 (ASort O (plus (minus k h2) n2)) (aplus_gz_le k h2 n2 H2)) in (let H5 \def -(f_equal A nat (\lambda (e: A).(match e with [(ASort _ n) \Rightarrow n | -(AHead _ _) \Rightarrow (plus (minus k h1) n1)])) (ASort O (plus (minus k h1) -n1)) (ASort O (plus (minus k h2) n2)) H4) in (let H_y \def (plus_plus k h1 h2 -n1 n2 H1 H2 H5) in (leqz_sort h1 h2 n1 n2 H_y))))))))))))))) (\lambda (a0: -A).(\lambda (a3: A).(\lambda (_: (leq gz a0 a3)).(\lambda (H1: (leqz a0 -a3)).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq gz a4 a5)).(\lambda -(H3: (leqz a4 a5)).(leqz_head a0 a3 H1 a4 a5 H3))))))))) a1 a2 H))). - -lemma leq_leqz: - \forall (a1: A).(\forall (a2: A).((leqz a1 a2) \to (leq gz a1 a2))) -\def - \lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leqz a1 a2)).(leqz_ind -(\lambda (a: A).(\lambda (a0: A).(leq gz a a0))) (\lambda (h1: nat).(\lambda -(h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H0: (eq nat (plus -h1 n2) (plus h2 n1))).(leq_sort gz h1 h2 n1 n2 (plus h1 h2) (eq_ind_r A -(ASort (minus h1 (plus h1 h2)) (next_plus gz n1 (minus (plus h1 h2) h1))) -(\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) (plus h1 h2)))) (eq_ind_r A -(ASort (minus h2 (plus h1 h2)) (next_plus gz n2 (minus (plus h1 h2) h2))) -(\lambda (a: A).(eq A (ASort (minus h1 (plus h1 h2)) (next_plus gz n1 (minus -(plus h1 h2) h1))) a)) (eq_ind_r nat h2 (\lambda (n: nat).(eq A (ASort (minus -h1 (plus h1 h2)) (next_plus gz n1 n)) (ASort (minus h2 (plus h1 h2)) -(next_plus gz n2 (minus (plus h1 h2) h2))))) (eq_ind_r nat h1 (\lambda (n: -nat).(eq A (ASort (minus h1 (plus h1 h2)) (next_plus gz n1 h2)) (ASort (minus -h2 (plus h1 h2)) (next_plus gz n2 n)))) (eq_ind_r nat O (\lambda (n: nat).(eq -A (ASort n (next_plus gz n1 h2)) (ASort (minus h2 (plus h1 h2)) (next_plus gz -n2 h1)))) (eq_ind_r nat O (\lambda (n: nat).(eq A (ASort O (next_plus gz n1 -h2)) (ASort n (next_plus gz n2 h1)))) (eq_ind_r nat (plus h2 n1) (\lambda (n: -nat).(eq A (ASort O n) (ASort O (next_plus gz n2 h1)))) (eq_ind_r nat (plus -h1 n2) (\lambda (n: nat).(eq A (ASort O (plus h2 n1)) (ASort O n))) (f_equal -nat A (ASort O) (plus h2 n1) (plus h1 n2) (sym_eq nat (plus h1 n2) (plus h2 -n1) H0)) (next_plus gz n2 h1) (next_plus_gz n2 h1)) (next_plus gz n1 h2) -(next_plus_gz n1 h2)) (minus h2 (plus h1 h2)) (O_minus h2 (plus h1 h2) -(le_plus_r h1 h2))) (minus h1 (plus h1 h2)) (O_minus h1 (plus h1 h2) -(le_plus_l h1 h2))) (minus (plus h1 h2) h2) (minus_plus_r h1 h2)) (minus -(plus h1 h2) h1) (minus_plus h1 h2)) (aplus gz (ASort h2 n2) (plus h1 h2)) -(aplus_asort_simpl gz (plus h1 h2) h2 n2)) (aplus gz (ASort h1 n1) (plus h1 -h2)) (aplus_asort_simpl gz (plus h1 h2) h1 n1)))))))) (\lambda (a0: -A).(\lambda (a3: A).(\lambda (_: (leqz a0 a3)).(\lambda (H1: (leq gz a0 -a3)).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leqz a4 a5)).(\lambda -(H3: (leq gz a4 a5)).(leq_head gz a0 a3 H1 a4 a5 H3))))))))) a1 a2 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/ex1/defs.ma deleted file mode 100644 index 4da7cc4d6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ex1/defs.ma +++ /dev/null @@ -1,29 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -definition ex1_c: - C -\def - CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O). - -definition ex1_t: - T -\def - THead (Flat Appl) (TLRef O) (THead (Bind Abst) (TLRef (S (S O))) (TSort O)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/ex1/props.ma deleted file mode 100644 index 91ce1745b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ex1/props.ma +++ /dev/null @@ -1,516 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ex1/defs.ma". - -include "basic_1/ty3/fwd.ma". - -include "basic_1/pc3/fwd.ma". - -include "basic_1/nf2/pr3.ma". - -include "basic_1/nf2/props.ma". - -include "basic_1/arity/defs.ma". - -include "basic_1/leq/props.ma". - -fact ex1__leq_sort_SS: - \forall (g: G).(\forall (k: nat).(\forall (n: nat).(leq g (ASort k n) (asucc -g (asucc g (ASort (S (S k)) n)))))) -\def - \lambda (g: G).(\lambda (k: nat).(\lambda (n: nat).(leq_refl g (asucc g -(asucc g (ASort (S (S k)) n)))))). - -lemma ex1_arity: - \forall (g: G).(arity g ex1_c ex1_t (ASort O O)) -\def - \lambda (g: G).(arity_appl g (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef O) (ASort (S -(S O)) O) (arity_abst g (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (TLRef O) O (getl_refl Abst (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (TLRef O)) -(ASort (S (S O)) O) (arity_abst g (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (CHead (CSort O) (Bind Abst) (TSort O)) (TSort O) -O (getl_refl Abst (CHead (CSort O) (Bind Abst) (TSort O)) (TSort O)) (asucc g -(ASort (S (S O)) O)) (arity_repl g (CHead (CSort O) (Bind Abst) (TSort O)) -(TSort O) (ASort O O) (arity_sort g (CHead (CSort O) (Bind Abst) (TSort O)) -O) (asucc g (asucc g (ASort (S (S O)) O))) (ex1__leq_sort_SS g O O)))) (THead -(Bind Abst) (TLRef (S (S O))) (TSort O)) (ASort O O) (arity_head g (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (TLRef (S (S O))) (ASort (S (S O)) O) (arity_abst g (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (CSort O) (TSort O) (S (S O)) (getl_clear_bind Abst (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (TLRef O) (clear_bind Abst (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (TLRef O)) (CHead (CSort O) (Bind Abst) -(TSort O)) (S O) (getl_head (Bind Abst) O (CHead (CSort O) (Bind Abst) (TSort -O)) (CHead (CSort O) (Bind Abst) (TSort O)) (getl_refl Abst (CSort O) (TSort -O)) (TSort O))) (asucc g (ASort (S (S O)) O)) (arity_repl g (CSort O) (TSort -O) (ASort O O) (arity_sort g (CSort O) O) (asucc g (asucc g (ASort (S (S O)) -O))) (ex1__leq_sort_SS g O O))) (TSort O) (ASort O O) (arity_sort g (CHead -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (Bind Abst) (TLRef (S (S O)))) O))). - -lemma ex1_ty3: - \forall (g: G).(\forall (u: T).((ty3 g ex1_c ex1_t u) \to (\forall (P: -Prop).P))) -\def - \lambda (g: G).(\lambda (u: T).(\lambda (H: (ty3 g (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (THead (Flat Appl) (TLRef O) (THead (Bind Abst) (TLRef (S (S O))) (TSort -O))) u)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u0: T).(\lambda (t: -T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (THead (Flat Appl) (TLRef O) (THead (Bind -Abst) u0 t)) u))) (\lambda (u0: T).(\lambda (t: T).(ty3 g (CHead (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) -(TLRef O)) (THead (Bind Abst) (TLRef (S (S O))) (TSort O)) (THead (Bind Abst) -u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead (CHead (CHead (CSort -O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) -(TLRef O) u0))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (THead (Flat Appl) (TLRef O) (THead (Bind Abst) x0 x1)) -u)).(\lambda (H1: (ty3 g (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (THead (Bind Abst) (TLRef -(S (S O))) (TSort O)) (THead (Bind Abst) x0 x1))).(\lambda (H2: (ty3 g (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (TLRef O) x0)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda -(_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O t) x0)))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O u0) x0)))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t))))) P (\lambda (H3: (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O -t) x0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O -t) x0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda (x2: C).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (_: (pc3 (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O -x4) x0)).(\lambda (H5: (getl O (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind -Abbr) x3))).(\lambda (_: (ty3 g x2 x3 x4)).(ex3_2_ind T T (\lambda (t2: -T).(\lambda (_: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (THead (Bind Abst) (TLRef (S (S -O))) t2) (THead (Bind Abst) x0 x1)))) (\lambda (_: T).(\lambda (t: T).(ty3 g -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (TLRef (S (S O))) t))) (\lambda (t2: T).(\lambda (_: -T).(ty3 g (CHead (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (Bind Abst) (TLRef O)) (Bind Abst) (TLRef (S (S O)))) (TSort -O) t2))) P (\lambda (x5: T).(\lambda (x6: T).(\lambda (_: (pc3 (CHead (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) -(TLRef O)) (THead (Bind Abst) (TLRef (S (S O))) x5) (THead (Bind Abst) x0 -x1))).(\lambda (H8: (ty3 g (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) -x6)).(\lambda (_: (ty3 g (CHead (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (Bind Abst) (TLRef -(S (S O)))) (TSort O) x5)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: -T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O t) x6)))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t: T).(ty3 g e u0 t))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) -O u0) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (t: T).(ty3 g e u0 t))))) P (\lambda (H10: (ex3_3 C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 -t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t)))) P (\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: -T).(\lambda (_: (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O x9) -x6)).(\lambda (H12: (getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x7 -(Bind Abbr) x8))).(\lambda (_: (ty3 g x7 x8 x9)).(let H14 \def (getl_gen_all -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead -x7 (Bind Abbr) x8) (r (Bind Abst) (S O)) (getl_gen_S (Bind Abst) (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x7 -(Bind Abbr) x8) (TLRef O) (S O) H12)) in (ex2_ind C (\lambda (e: C).(drop (S -O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abbr) x8))) P (\lambda (x: -C).(\lambda (_: (drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) x)).(\lambda (_: (clear x (CHead x7 (Bind Abbr) -x8))).(let H17 \def (eq_ind C (CHead x2 (Bind Abbr) x3) (\lambda (ee: -C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | -Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow -False])])) I (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abbr) -x3) (TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abbr) x3) -H5))) in (False_ind P H17))))) H14)))))))) H10)) (\lambda (H10: (ex3_3 C T T -(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (lift (S (S (S O))) O u0) x6)))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abst) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 -t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: -T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O u0) x6)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t)))) P (\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: -T).(\lambda (_: (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O x8) -x6)).(\lambda (H12: (getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x7 -(Bind Abst) x8))).(\lambda (_: (ty3 g x7 x8 x9)).(let H14 \def (getl_gen_all -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead -x7 (Bind Abst) x8) (r (Bind Abst) (S O)) (getl_gen_S (Bind Abst) (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x7 -(Bind Abst) x8) (TLRef O) (S O) H12)) in (ex2_ind C (\lambda (e: C).(drop (S -O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abst) x8))) P (\lambda (x: -C).(\lambda (_: (drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) x)).(\lambda (_: (clear x (CHead x7 (Bind Abst) -x8))).(let H17 \def (eq_ind C (CHead x2 (Bind Abbr) x3) (\lambda (ee: -C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | -Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow -False])])) I (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abbr) -x3) (TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abbr) x3) -H5))) in (False_ind P H17))))) H14)))))))) H10)) (ty3_gen_lref g (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) x6 (S (S O)) H8))))))) (ty3_gen_bind g Abst (CHead (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) -(TLRef O)) (TLRef (S (S O))) (TSort O) (THead (Bind Abst) x0 x1) H1)))))))) -H3)) (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: -T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O u0) x0)))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e -(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e -u0 t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: -T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O u0) x0)))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e -(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e -u0 t)))) P (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H4: -(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort -O)) (Bind Abst) (TLRef O)) (lift (S O) O x3) x0)).(\lambda (H5: (getl O -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3))).(\lambda (H6: (ty3 g x2 x3 -x4)).(ex3_2_ind T T (\lambda (t2: T).(\lambda (_: T).(pc3 (CHead (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) -(TLRef O)) (THead (Bind Abst) (TLRef (S (S O))) t2) (THead (Bind Abst) x0 -x1)))) (\lambda (_: T).(\lambda (t: T).(ty3 g (CHead (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef -(S (S O))) t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead (CHead (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) -(TLRef O)) (Bind Abst) (TLRef (S (S O)))) (TSort O) t2))) P (\lambda (x5: -T).(\lambda (x6: T).(\lambda (H7: (pc3 (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (THead (Bind -Abst) (TLRef (S (S O))) x5) (THead (Bind Abst) x0 x1))).(\lambda (H8: (ty3 g -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (TLRef (S (S O))) x6)).(\lambda (_: (ty3 g (CHead -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (Bind Abst) (TLRef (S (S O)))) (TSort O) x5)).(or_ind -(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind -Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 -t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (lift (S (S (S O))) O u0) x6)))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t))))) P (\lambda (H10: (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S -O))) O t) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S -O)) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort -O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda -(x7: C).(\lambda (x8: T).(\lambda (x9: T).(\lambda (_: (pc3 (CHead (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) -(TLRef O)) (lift (S (S (S O))) O x9) x6)).(\lambda (H12: (getl (S (S O)) -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (CHead x7 (Bind Abbr) x8))).(\lambda (_: (ty3 g x7 x8 -x9)).(let H14 \def (getl_gen_all (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (CHead x7 (Bind Abbr) x8) (r (Bind Abst) (S O)) -(getl_gen_S (Bind Abst) (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (CHead x7 (Bind Abbr) x8) (TLRef O) (S O) H12)) in (ex2_ind -C (\lambda (e: C).(drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abbr) -x8))) P (\lambda (x: C).(\lambda (H15: (drop (S O) O (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) x)).(\lambda (H16: (clear x -(CHead x7 (Bind Abbr) x8))).(let H17 \def (f_equal C C (\lambda (e: C).(match -e with [(CSort _) \Rightarrow x2 | (CHead c _ _) \Rightarrow c])) (CHead x2 -(Bind Abst) x3) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) -x3) (TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) -H5))) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow x3 | (CHead _ _ t) \Rightarrow t])) (CHead x2 (Bind Abst) x3) -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) x3) (TLRef O) -(getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) H5))) in (\lambda -(H19: (eq C x2 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)))).(let H20 \def (eq_ind T x3 (\lambda (t: T).(ty3 g x2 t x4)) H6 -(TLRef O) H18) in (let H21 \def (eq_ind T x3 (\lambda (t: T).(pc3 (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (lift (S O) O t) x0)) H4 (TLRef O) H18) in (let H22 \def -(eq_ind C x2 (\lambda (c: C).(ty3 g c (TLRef O) x4)) H20 (CHead (CHead (CSort -O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) H19) in (let H23 \def -(eq_ind_r C x (\lambda (c: C).(clear c (CHead x7 (Bind Abbr) x8))) H16 (CHead -(CSort O) (Bind Abst) (TSort O)) (drop_gen_refl (CHead (CSort O) (Bind Abst) -(TSort O)) x (drop_gen_drop (Bind Abst) (CHead (CSort O) (Bind Abst) (TSort -O)) x (TSort O) O H15))) in (let H24 \def (eq_ind C (CHead x7 (Bind Abbr) x8) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead (CSort O) (Bind Abst) (TSort O)) -(clear_gen_bind Abst (CSort O) (CHead x7 (Bind Abbr) x8) (TSort O) H23)) in -(False_ind P H24)))))))) H17))))) H14)))))))) H10)) (\lambda (H10: (ex3_3 C T -T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (lift (S (S (S O))) O u0) x6)))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abst) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 -t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: -T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O u0) x6)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t)))) P (\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: -T).(\lambda (H11: (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O x8) -x6)).(\lambda (H12: (getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x7 -(Bind Abst) x8))).(\lambda (H13: (ty3 g x7 x8 x9)).(let H14 \def -(getl_gen_all (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (CHead x7 (Bind Abst) x8) (r (Bind Abst) (S O)) (getl_gen_S (Bind -Abst) (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(CHead x7 (Bind Abst) x8) (TLRef O) (S O) H12)) in (ex2_ind C (\lambda (e: -C).(drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abst) x8))) P -(\lambda (x: C).(\lambda (H15: (drop (S O) O (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) x)).(\lambda (H16: (clear x (CHead x7 -(Bind Abst) x8))).(let H17 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow x2 | (CHead c _ _) \Rightarrow c])) (CHead x2 (Bind -Abst) x3) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead (CSort -O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) x3) -(TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) H5))) -in ((let H18 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow x3 | (CHead _ _ t) \Rightarrow t])) (CHead x2 (Bind Abst) x3) -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) x3) (TLRef O) -(getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) H5))) in (\lambda -(H19: (eq C x2 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)))).(let H20 \def (eq_ind T x3 (\lambda (t: T).(ty3 g x2 t x4)) H6 -(TLRef O) H18) in (let H21 \def (eq_ind T x3 (\lambda (t: T).(pc3 (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (lift (S O) O t) x0)) H4 (TLRef O) H18) in (let H22 \def -(eq_ind C x2 (\lambda (c: C).(ty3 g c (TLRef O) x4)) H20 (CHead (CHead (CSort -O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) H19) in (let H23 \def -(eq_ind_r C x (\lambda (c: C).(clear c (CHead x7 (Bind Abst) x8))) H16 (CHead -(CSort O) (Bind Abst) (TSort O)) (drop_gen_refl (CHead (CSort O) (Bind Abst) -(TSort O)) x (drop_gen_drop (Bind Abst) (CHead (CSort O) (Bind Abst) (TSort -O)) x (TSort O) O H15))) in (let H24 \def (f_equal C C (\lambda (e: C).(match -e with [(CSort _) \Rightarrow x7 | (CHead c _ _) \Rightarrow c])) (CHead x7 -(Bind Abst) x8) (CHead (CSort O) (Bind Abst) (TSort O)) (clear_gen_bind Abst -(CSort O) (CHead x7 (Bind Abst) x8) (TSort O) H23)) in ((let H25 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow x8 | (CHead -_ _ t) \Rightarrow t])) (CHead x7 (Bind Abst) x8) (CHead (CSort O) (Bind -Abst) (TSort O)) (clear_gen_bind Abst (CSort O) (CHead x7 (Bind Abst) x8) -(TSort O) H23)) in (\lambda (H26: (eq C x7 (CSort O))).(let H27 \def (eq_ind -T x8 (\lambda (t: T).(ty3 g x7 t x9)) H13 (TSort O) H25) in (let H28 \def -(eq_ind T x8 (\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) -O t) x6)) H11 (TSort O) H25) in (let H29 \def (eq_ind C x7 (\lambda (c: -C).(ty3 g c (TSort O) x9)) H27 (CSort O) H26) in (or_ind (ex3_3 C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (lift (S O) O t) x4)))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CSort -O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead e (Bind Abbr) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t))))) (ex3_3 C -T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (lift (S O) O u0) -x4)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead e (Bind Abst) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t))))) P -(\lambda (H30: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: -T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(lift (S O) O t) x4)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: -T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort -O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: -T).(\lambda (t: T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (lift (S O) O t) x4)))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (_: T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda (x10: C).(\lambda (x11: -T).(\lambda (x12: T).(\lambda (_: (pc3 (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (lift (S O) O x12) x4)).(\lambda (H32: -(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(CHead x10 (Bind Abbr) x11))).(\lambda (_: (ty3 g x10 x11 x12)).(let H34 \def -(eq_ind C (CHead x10 (Bind Abbr) x11) (\lambda (ee: C).(match ee with [(CSort -_) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (clear_gen_bind Abst -(CHead (CSort O) (Bind Abst) (TSort O)) (CHead x10 (Bind Abbr) x11) (TSort O) -(getl_gen_O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort -O)) (CHead x10 (Bind Abbr) x11) H32))) in (False_ind P H34)))))))) H30)) -(\lambda (H30: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: -T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(lift (S O) O u0) x4)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: -T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort -O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (lift (S O) O u0) x4)))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (_: T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda (x10: C).(\lambda (x11: -T).(\lambda (x12: T).(\lambda (H31: (pc3 (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (lift (S O) O x11) x4)).(\lambda (H32: -(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(CHead x10 (Bind Abst) x11))).(\lambda (H33: (ty3 g x10 x11 x12)).(let H34 -\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow x10 | -(CHead c _ _) \Rightarrow c])) (CHead x10 (Bind Abst) x11) (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (clear_gen_bind Abst -(CHead (CSort O) (Bind Abst) (TSort O)) (CHead x10 (Bind Abst) x11) (TSort O) -(getl_gen_O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort -O)) (CHead x10 (Bind Abst) x11) H32))) in ((let H35 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow x11 | (CHead _ _ t) -\Rightarrow t])) (CHead x10 (Bind Abst) x11) (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (clear_gen_bind Abst (CHead (CSort O) -(Bind Abst) (TSort O)) (CHead x10 (Bind Abst) x11) (TSort O) (getl_gen_O -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead -x10 (Bind Abst) x11) H32))) in (\lambda (H36: (eq C x10 (CHead (CSort O) -(Bind Abst) (TSort O)))).(let H37 \def (eq_ind T x11 (\lambda (t: T).(ty3 g -x10 t x12)) H33 (TSort O) H35) in (let H38 \def (eq_ind T x11 (\lambda (t: -T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(lift (S O) O t) x4)) H31 (TSort O) H35) in (let H39 \def (eq_ind C x10 -(\lambda (c: C).(ty3 g c (TSort O) x12)) H37 (CHead (CSort O) (Bind Abst) -(TSort O)) H36) in (land_ind (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) -x0) (\forall (b: B).(\forall (u0: T).(pc3 (CHead (CHead (CHead (CHead (CSort -O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (Bind -b) u0) x5 x1))) P (\lambda (H40: (pc3 (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S -O))) x0)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pc3 (CHead (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (Bind b) u0) x5 x1))))).(let H42 \def (eq_ind T (lift (S O) -O (TLRef O)) (\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) -t)) (pc3_t x0 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind -Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) H40 (lift (S O) O -(TLRef O)) (ex2_sym T (pr3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort -O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O (TLRef O))) -(pr3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort -O)) (Bind Abst) (TLRef O)) x0) H21)) (TLRef (plus O (S O))) (lift_lref_ge O -(S O) O (le_O_n O))) in (let H43 \def H42 in (ex2_ind T (\lambda (t: T).(pr3 -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (TLRef (S (S O))) t)) (\lambda (t: T).(pr3 (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (TLRef (S O)) t)) P (\lambda (x13: T).(\lambda (H44: (pr3 -(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) -(Bind Abst) (TLRef O)) (TLRef (S (S O))) x13)).(\lambda (H45: (pr3 (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) (TLRef (S O)) x13)).(let H46 \def (eq_ind_r T x13 (\lambda -(t: T).(eq T (TLRef (S (S O))) t)) (nf2_pr3_unfold (CHead (CHead (CHead -(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef -O)) (TLRef (S (S O))) x13 H44 (nf2_lref_abst (CHead (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CSort -O) (TSort O) (S (S O)) (getl_clear_bind Abst (CHead (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead -(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (TLRef O) -(clear_bind Abst (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) -(TSort O)) (TLRef O)) (CHead (CSort O) (Bind Abst) (TSort O)) (S O) -(getl_head (Bind Abst) O (CHead (CSort O) (Bind Abst) (TSort O)) (CHead -(CSort O) (Bind Abst) (TSort O)) (getl_refl Abst (CSort O) (TSort O)) (TSort -O))))) (TLRef (S O)) (nf2_pr3_unfold (CHead (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S O)) -x13 H45 (nf2_lref_abst (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) -(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead (CSort O) (Bind Abst) -(TSort O)) (TSort O) (S O) (getl_head (Bind Abst) O (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead (CHead (CSort O) (Bind -Abst) (TSort O)) (Bind Abst) (TSort O)) (getl_refl Abst (CHead (CSort O) -(Bind Abst) (TSort O)) (TSort O)) (TLRef O))))) in (let H47 \def (eq_ind T -(TLRef (S (S O))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef n) \Rightarrow (match n with [O \Rightarrow False | (S n0) -\Rightarrow (match n0 with [O \Rightarrow False | (S _) \Rightarrow True])]) -| (THead _ _ _) \Rightarrow False])) I (TLRef (S O)) H46) in (False_ind P -H47)))))) H43))))) (pc3_gen_abst (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) x0 -x5 x1 H7))))))) H34)))))))) H30)) (ty3_gen_lref g (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) x4 O H22))))))) H24)))))))) -H17))))) H14)))))))) H10)) (ty3_gen_lref g (CHead (CHead (CHead (CSort O) -(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) x6 (S (S -O)) H8))))))) (ty3_gen_bind g Abst (CHead (CHead (CHead (CSort O) (Bind Abst) -(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) -(TSort O) (THead (Bind Abst) x0 x1) H1)))))))) H3)) (ty3_gen_lref g (CHead -(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind -Abst) (TLRef O)) x0 O H2))))))) (ty3_gen_appl g (CHead (CHead (CHead (CSort -O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) -(TLRef O) (THead (Bind Abst) (TLRef (S (S O))) (TSort O)) u H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/ex2/defs.ma deleted file mode 100644 index 6524d3114..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ex2/defs.ma +++ /dev/null @@ -1,28 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -definition ex2_c: - C -\def - CSort O. - -definition ex2_t: - T -\def - THead (Flat Appl) (TSort O) (TSort O). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ex2/props.ma b/matita/matita/contribs/lambdadelta/basic_1/ex2/props.ma deleted file mode 100644 index 42c2de646..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ex2/props.ma +++ /dev/null @@ -1,152 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ex2/defs.ma". - -include "basic_1/nf2/defs.ma". - -include "basic_1/pr2/fwd.ma". - -include "basic_1/arity/fwd.ma". - -lemma ex2_nf2: - nf2 ex2_c ex2_t -\def - \lambda (t2: T).(\lambda (H: (pr2 (CSort O) (THead (Flat Appl) (TSort O) -(TSort O)) t2)).(let H0 \def (pr2_gen_appl (CSort O) (TSort O) (TSort O) t2 -H) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 (CSort O) (TSort -O) u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 (CSort O) (TSort O) t3)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (TSort O) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 (CSort O) (TSort O) u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead (CSort O) -(Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat -Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 (CSort O) (TSort -O) u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CSort O) y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead (CSort O) (Bind b) y2) z1 z2)))))))) (eq T (THead (Flat -Appl) (TSort O) (TSort O)) t2) (\lambda (H1: (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 (CSort O) (TSort O) u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 (CSort O) (TSort O) t3))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 (CSort O) (TSort O) u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 (CSort O) (TSort O) t3))) (eq T (THead (Flat Appl) (TSort O) -(TSort O)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T t2 -(THead (Flat Appl) x0 x1))).(\lambda (H3: (pr2 (CSort O) (TSort O) -x0)).(\lambda (H4: (pr2 (CSort O) (TSort O) x1)).(let H5 \def (eq_ind T x1 -(\lambda (t: T).(eq T t2 (THead (Flat Appl) x0 t))) H2 (TSort O) -(pr2_gen_sort (CSort O) x1 O H4)) in (let H6 \def (eq_ind T x0 (\lambda (t: -T).(eq T t2 (THead (Flat Appl) t (TSort O)))) H5 (TSort O) (pr2_gen_sort -(CSort O) x0 O H3)) in (eq_ind_r T (THead (Flat Appl) (TSort O) (TSort O)) -(\lambda (t: T).(eq T (THead (Flat Appl) (TSort O) (TSort O)) t)) (refl_equal -T (THead (Flat Appl) (TSort O) (TSort O))) t2 H6)))))))) H1)) (\lambda (H1: -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (TSort O) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 (CSort O) (TSort O) u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead (CSort O) -(Bind b) u) z1 t3))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 (CSort O) (TSort O) u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead (CSort O) (Bind b) u) z1 t3))))))) (eq T -(THead (Flat Appl) (TSort O) (TSort O)) t2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H2: (eq T (TSort O) (THead -(Bind Abst) x0 x1))).(\lambda (H3: (eq T t2 (THead (Bind Abbr) x2 -x3))).(\lambda (H4: (pr2 (CSort O) (TSort O) x2)).(\lambda (_: ((\forall (b: -B).(\forall (u: T).(pr2 (CHead (CSort O) (Bind b) u) x1 x3))))).(let H6 \def -(eq_ind T x2 (\lambda (t: T).(eq T t2 (THead (Bind Abbr) t x3))) H3 (TSort O) -(pr2_gen_sort (CSort O) x2 O H4)) in (eq_ind_r T (THead (Bind Abbr) (TSort O) -x3) (\lambda (t: T).(eq T (THead (Flat Appl) (TSort O) (TSort O)) t)) (let H7 -\def (eq_ind T (TSort O) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (THead (Bind Abst) x0 x1) H2) in (False_ind (eq T (THead (Flat -Appl) (TSort O) (TSort O)) (THead (Bind Abbr) (TSort O) x3)) H7)) t2 -H6)))))))))) H1)) (\lambda (H1: (ex6_6 B T T T T T (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not -(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 (CSort O) (TSort O) u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CSort O) y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead (CSort O) -(Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not -(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 (CSort O) (TSort O) u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CSort O) y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead (CSort O) -(Bind b) y2) z1 z2))))))) (eq T (THead (Flat Appl) (TSort O) (TSort O)) t2) -(\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda -(x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H3: (eq -T (TSort O) (THead (Bind x0) x1 x2))).(\lambda (H4: (eq T t2 (THead (Bind x0) -x5 (THead (Flat Appl) (lift (S O) O x4) x3)))).(\lambda (H5: (pr2 (CSort O) -(TSort O) x4)).(\lambda (H6: (pr2 (CSort O) x1 x5)).(\lambda (_: (pr2 (CHead -(CSort O) (Bind x0) x5) x2 x3)).(let H_y \def (pr2_gen_csort x1 x5 O H6) in -(let H8 \def (eq_ind T x4 (\lambda (t: T).(eq T t2 (THead (Bind x0) x5 (THead -(Flat Appl) (lift (S O) O t) x3)))) H4 (TSort O) (pr2_gen_sort (CSort O) x4 O -H5)) in (eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O -(TSort O)) x3)) (\lambda (t: T).(eq T (THead (Flat Appl) (TSort O) (TSort O)) -t)) (let H9 \def (eq_ind T (TSort O) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (THead (Bind x0) x1 x2) H3) in (False_ind (eq T (THead (Flat Appl) -(TSort O) (TSort O)) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O -(TSort O)) x3))) H9)) t2 H8))))))))))))))) H1)) H0))). - -lemma ex2_arity: - \forall (g: G).(\forall (a: A).((arity g ex2_c ex2_t a) \to (\forall (P: -Prop).P))) -\def - \lambda (g: G).(\lambda (a: A).(\lambda (H: (arity g (CSort O) (THead (Flat -Appl) (TSort O) (TSort O)) a)).(\lambda (P: Prop).(let H0 \def -(arity_gen_appl g (CSort O) (TSort O) (TSort O) a H) in (ex2_ind A (\lambda -(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 -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 with [(ASort _ _) -\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead x0 x1) H6) in -(False_ind P H7))))))) H3)))))) H0))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/flt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/flt/defs.ma deleted file mode 100644 index 71e1028ee..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/flt/defs.ma +++ /dev/null @@ -1,29 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/C/defs.ma". - -definition fweight: - C \to (T \to nat) -\def - \lambda (c: C).(\lambda (t: T).(plus (cweight c) (tweight t))). - -definition flt: - C \to (T \to (C \to (T \to Prop))) -\def - \lambda (c1: C).(\lambda (t1: T).(\lambda (c2: C).(\lambda (t2: T).(lt -(fweight c1 t1) (fweight c2 t2))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/flt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/flt/fwd.ma deleted file mode 100644 index a25e73916..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/flt/fwd.ma +++ /dev/null @@ -1,49 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/flt/defs.ma". - -fact flt_wf__q_ind: - \forall (P: ((C \to (T \to Prop)))).(((\forall (n: nat).((\lambda (P0: ((C -\to (T \to Prop)))).(\lambda (n0: nat).(\forall (c: C).(\forall (t: T).((eq -nat (fweight c t) n0) \to (P0 c t)))))) P n))) \to (\forall (c: C).(\forall -(t: T).(P c t)))) -\def - let Q \def (\lambda (P: ((C \to (T \to Prop)))).(\lambda (n: nat).(\forall -(c: C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t)))))) in (\lambda -(P: ((C \to (T \to Prop)))).(\lambda (H: ((\forall (n: nat).(\forall (c: -C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t))))))).(\lambda (c: -C).(\lambda (t: T).(H (fweight c t) c t (refl_equal nat (fweight c t))))))). - -lemma flt_wf_ind: - \forall (P: ((C \to (T \to Prop)))).(((\forall (c2: C).(\forall (t2: -T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t2) \to (P c1 t1))))) -\to (P c2 t2))))) \to (\forall (c: C).(\forall (t: T).(P c t)))) -\def - let Q \def (\lambda (P: ((C \to (T \to Prop)))).(\lambda (n: nat).(\forall -(c: C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t)))))) in (\lambda -(P: ((C \to (T \to Prop)))).(\lambda (H: ((\forall (c2: C).(\forall (t2: -T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t2) \to (P c1 t1))))) -\to (P c2 t2)))))).(\lambda (c: C).(\lambda (t: T).(flt_wf__q_ind P (\lambda -(n: nat).(lt_wf_ind n (Q P) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: -nat).((lt m n0) \to (Q P m))))).(\lambda (c0: C).(\lambda (t0: T).(\lambda -(H1: (eq nat (fweight c0 t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: -nat).(\forall (m: nat).((lt m n1) \to (\forall (c1: C).(\forall (t1: T).((eq -nat (fweight c1 t1) m) \to (P c1 t1))))))) H0 (fweight c0 t0) H1) in (H c0 t0 -(\lambda (c1: C).(\lambda (t1: T).(\lambda (H3: (flt c1 t1 c0 t0)).(H2 -(fweight c1 t1) H3 c1 t1 (refl_equal nat (fweight c1 t1))))))))))))))) c -t))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/flt/props.ma b/matita/matita/contribs/lambdadelta/basic_1/flt/props.ma deleted file mode 100644 index 395bb94a7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/flt/props.ma +++ /dev/null @@ -1,105 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/flt/defs.ma". - -include "basic_1/C/props.ma". - -lemma flt_thead_sx: - \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt c u c -(THead k u t))))) -\def - \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(lt_reg_l -(tweight u) (S (plus (tweight u) (tweight t))) (cweight c) (le_n_S (tweight -u) (plus (tweight u) (tweight t)) (le_plus_l (tweight u) (tweight t))))))). - -lemma flt_thead_dx: - \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt c t c -(THead k u t))))) -\def - \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(lt_reg_l -(tweight t) (S (plus (tweight u) (tweight t))) (cweight c) (le_n_S (tweight -t) (plus (tweight u) (tweight t)) (le_plus_r (tweight u) (tweight t))))))). - -lemma flt_shift: - \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt (CHead c -k u) t c (THead k u t))))) -\def - \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(eq_ind nat -(S (plus (cweight c) (plus (tweight u) (tweight t)))) (\lambda (n: nat).(lt -(plus (plus (cweight c) (tweight u)) (tweight t)) n)) (eq_ind_r nat (plus -(plus (cweight c) (tweight u)) (tweight t)) (\lambda (n: nat).(lt (plus (plus -(cweight c) (tweight u)) (tweight t)) (S n))) (le_n (S (plus (plus (cweight -c) (tweight u)) (tweight t)))) (plus (cweight c) (plus (tweight u) (tweight -t))) (plus_assoc_l (cweight c) (tweight u) (tweight t))) (plus (cweight c) (S -(plus (tweight u) (tweight t)))) (plus_n_Sm (cweight c) (plus (tweight u) -(tweight t))))))). - -lemma flt_arith0: - \forall (k: K).(\forall (c: C).(\forall (t: T).(\forall (i: nat).(flt c t -(CHead c k t) (TLRef i))))) -\def - \lambda (_: K).(\lambda (c: C).(\lambda (t: T).(\lambda (_: -nat).(lt_x_plus_x_Sy (plus (cweight c) (tweight t)) O)))). - -lemma flt_arith1: - \forall (k1: K).(\forall (c1: C).(\forall (c2: C).(\forall (t1: T).((cle -(CHead c1 k1 t1) c2) \to (\forall (k2: K).(\forall (t2: T).(\forall (i: -nat).(flt c1 t1 (CHead c2 k2 t2) (TLRef i))))))))) -\def - \lambda (_: K).(\lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda -(H: (le (plus (cweight c1) (tweight t1)) (cweight c2))).(\lambda (_: -K).(\lambda (t2: T).(\lambda (_: nat).(le_lt_trans (plus (cweight c1) -(tweight t1)) (cweight c2) (plus (plus (cweight c2) (tweight t2)) (S O)) H -(eq_ind_r nat (plus (S O) (plus (cweight c2) (tweight t2))) (\lambda (n: -nat).(lt (cweight c2) n)) (le_lt_n_Sm (cweight c2) (plus (cweight c2) -(tweight t2)) (le_plus_l (cweight c2) (tweight t2))) (plus (plus (cweight c2) -(tweight t2)) (S O)) (plus_sym (plus (cweight c2) (tweight t2)) (S -O))))))))))). - -lemma flt_arith2: - \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (i: nat).((flt c1 -t1 c2 (TLRef i)) \to (\forall (k2: K).(\forall (t2: T).(\forall (j: nat).(flt -c1 t1 (CHead c2 k2 t2) (TLRef j))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (_: nat).(\lambda -(H: (lt (plus (cweight c1) (tweight t1)) (plus (cweight c2) (S O)))).(\lambda -(_: K).(\lambda (t2: T).(\lambda (_: nat).(lt_le_trans (plus (cweight c1) -(tweight t1)) (plus (cweight c2) (S O)) (plus (plus (cweight c2) (tweight -t2)) (S O)) H (le_plus_plus (cweight c2) (plus (cweight c2) (tweight t2)) (S -O) (S O) (le_plus_l (cweight c2) (tweight t2)) (le_n (S O))))))))))). - -lemma cle_flt_trans: - \forall (c1: C).(\forall (c2: C).((cle c1 c2) \to (\forall (c3: C).(\forall -(u2: T).(\forall (u3: T).((flt c2 u2 c3 u3) \to (flt c1 u2 c3 u3))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (le (cweight c1) (cweight -c2))).(\lambda (c3: C).(\lambda (u2: T).(\lambda (u3: T).(\lambda (H0: (lt -(plus (cweight c2) (tweight u2)) (plus (cweight c3) (tweight -u3)))).(le_lt_trans (plus (cweight c1) (tweight u2)) (plus (cweight c2) -(tweight u2)) (plus (cweight c3) (tweight u3)) (le_plus_plus (cweight c1) -(cweight c2) (tweight u2) (tweight u2) H (le_n (tweight u2))) H0))))))). - -theorem flt_trans: - \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (t2: T).((flt c1 -t1 c2 t2) \to (\forall (c3: C).(\forall (t3: T).((flt c2 t2 c3 t3) \to (flt -c1 t1 c3 t3)))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (lt (fweight c1 t1) (fweight c2 t2))).(\lambda (c3: C).(\lambda (t3: -T).(\lambda (H0: (lt (fweight c2 t2) (fweight c3 t3))).(lt_trans (fweight c1 -t1) (fweight c2 t2) (fweight c3 t3) H H0)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/fsubst0/defs.ma deleted file mode 100644 index 8d5cc21e0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/defs.ma +++ /dev/null @@ -1,26 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubst0/defs.ma". - -inductive fsubst0 (i: nat) (v: T) (c1: C) (t1: T): C \to (T \to Prop) \def -| fsubst0_snd: \forall (t2: T).((subst0 i v t1 t2) \to (fsubst0 i v c1 t1 c1 -t2)) -| fsubst0_fst: \forall (c2: C).((csubst0 i v c1 c2) \to (fsubst0 i v c1 t1 c2 -t1)) -| fsubst0_both: \forall (t2: T).((subst0 i v t1 t2) \to (\forall (c2: -C).((csubst0 i v c1 c2) \to (fsubst0 i v c1 t1 c2 t2)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/fsubst0/fwd.ma deleted file mode 100644 index 59ca03b0b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/fsubst0/fwd.ma +++ /dev/null @@ -1,57 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/fsubst0/defs.ma". - -implied lemma fsubst0_ind: - \forall (i: nat).(\forall (v: T).(\forall (c1: C).(\forall (t1: T).(\forall -(P: ((C \to (T \to Prop)))).(((\forall (t2: T).((subst0 i v t1 t2) \to (P c1 -t2)))) \to (((\forall (c2: C).((csubst0 i v c1 c2) \to (P c2 t1)))) \to -(((\forall (t2: T).((subst0 i v t1 t2) \to (\forall (c2: C).((csubst0 i v c1 -c2) \to (P c2 t2)))))) \to (\forall (c: C).(\forall (t: T).((fsubst0 i v c1 -t1 c t) \to (P c t))))))))))) -\def - \lambda (i: nat).(\lambda (v: T).(\lambda (c1: C).(\lambda (t1: T).(\lambda -(P: ((C \to (T \to Prop)))).(\lambda (f: ((\forall (t2: T).((subst0 i v t1 -t2) \to (P c1 t2))))).(\lambda (f0: ((\forall (c2: C).((csubst0 i v c1 c2) -\to (P c2 t1))))).(\lambda (f1: ((\forall (t2: T).((subst0 i v t1 t2) \to -(\forall (c2: C).((csubst0 i v c1 c2) \to (P c2 t2))))))).(\lambda (c: -C).(\lambda (t: T).(\lambda (f2: (fsubst0 i v c1 t1 c t)).(match f2 with -[(fsubst0_snd x x0) \Rightarrow (f x x0) | (fsubst0_fst x x0) \Rightarrow (f0 -x x0) | (fsubst0_both x x0 x1 x2) \Rightarrow (f1 x x0 x1 x2)]))))))))))). - -lemma fsubst0_gen_base: - \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (t2: T).(\forall -(v: T).(\forall (i: nat).((fsubst0 i v c1 t1 c2 t2) \to (or3 (land (eq C c1 -c2) (subst0 i v t1 t2)) (land (eq T t1 t2) (csubst0 i v c1 c2)) (land (subst0 -i v t1 t2) (csubst0 i v c1 c2))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(v: T).(\lambda (i: nat).(\lambda (H: (fsubst0 i v c1 t1 c2 t2)).(fsubst0_ind -i v c1 t1 (\lambda (c: C).(\lambda (t: T).(or3 (land (eq C c1 c) (subst0 i v -t1 t)) (land (eq T t1 t) (csubst0 i v c1 c)) (land (subst0 i v t1 t) (csubst0 -i v c1 c))))) (\lambda (t0: T).(\lambda (H0: (subst0 i v t1 t0)).(or3_intro0 -(land (eq C c1 c1) (subst0 i v t1 t0)) (land (eq T t1 t0) (csubst0 i v c1 -c1)) (land (subst0 i v t1 t0) (csubst0 i v c1 c1)) (conj (eq C c1 c1) (subst0 -i v t1 t0) (refl_equal C c1) H0)))) (\lambda (c0: C).(\lambda (H0: (csubst0 i -v c1 c0)).(or3_intro1 (land (eq C c1 c0) (subst0 i v t1 t1)) (land (eq T t1 -t1) (csubst0 i v c1 c0)) (land (subst0 i v t1 t1) (csubst0 i v c1 c0)) (conj -(eq T t1 t1) (csubst0 i v c1 c0) (refl_equal T t1) H0)))) (\lambda (t0: -T).(\lambda (H0: (subst0 i v t1 t0)).(\lambda (c0: C).(\lambda (H1: (csubst0 -i v c1 c0)).(or3_intro2 (land (eq C c1 c0) (subst0 i v t1 t0)) (land (eq T t1 -t0) (csubst0 i v c1 c0)) (land (subst0 i v t1 t0) (csubst0 i v c1 c0)) (conj -(subst0 i v t1 t0) (csubst0 i v c1 c0) H0 H1)))))) c2 t2 H))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/clear.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/clear.ma deleted file mode 100644 index 0915f5f57..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/clear.ma +++ /dev/null @@ -1,139 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/props.ma". - -include "basic_1/clear/drop.ma". - -lemma clear_getl_trans: - \forall (i: nat).(\forall (c2: C).(\forall (c3: C).((getl i c2 c3) \to -(\forall (c1: C).((clear c1 c2) \to (getl i c1 c3)))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c2: C).(\forall (c3: -C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 -c3))))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (H: (getl O c2 -c3)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(getl_intro O c1 c3 c1 -(drop_refl c1) (clear_trans c1 c2 H0 c3 (getl_gen_O c2 c3 H)))))))) (\lambda -(n: nat).(\lambda (_: ((\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to -(\forall (c1: C).((clear c1 c2) \to (getl n c1 c3)))))))).(\lambda (c2: -C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall -(c1: C).((clear c1 c) \to (getl (S n) c1 c3)))))) (\lambda (n0: nat).(\lambda -(c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c1: C).(\lambda -(_: (clear c1 (CSort n0))).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c1 -c3))))))) (\lambda (c: C).(\lambda (_: ((\forall (c3: C).((getl (S n) c c3) -\to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3))))))).(\lambda (k: -K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) -c3)).(\lambda (c1: C).(\lambda (H2: (clear c1 (CHead c k t))).(K_ind (\lambda -(k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear c1 (CHead c k0 t)) \to -(getl (S n) c1 c3)))) (\lambda (b: B).(\lambda (H3: (getl (S n) (CHead c -(Bind b) t) c3)).(\lambda (H4: (clear c1 (CHead c (Bind b) t))).(let H5 \def -(getl_gen_all c c3 (r (Bind b) n) (getl_gen_S (Bind b) c c3 t n H3)) in -(ex2_ind C (\lambda (e: C).(drop n O c e)) (\lambda (e: C).(clear e c3)) -(getl (S n) c1 c3) (\lambda (x: C).(\lambda (H6: (drop n O c x)).(\lambda -(H7: (clear x c3)).(getl_intro (S n) c1 c3 x (drop_clear_O b c1 c t H4 x n -H6) H7)))) H5))))) (\lambda (f: F).(\lambda (_: (getl (S n) (CHead c (Flat f) -t) c3)).(\lambda (H4: (clear c1 (CHead c (Flat f) t))).(clear_gen_flat_r f c1 -c t H4 (getl (S n) c1 c3))))) k H1 H2))))))))) c2)))) i). - -lemma getl_clear_trans: - \forall (i: nat).(\forall (c1: C).(\forall (c2: C).((getl i c1 c2) \to -(\forall (c3: C).((clear c2 c3) \to (getl i c1 c3)))))) -\def - \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (getl i c1 -c2)).(\lambda (c3: C).(\lambda (H0: (clear c2 c3)).(let H1 \def (getl_gen_all -c1 c2 i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: -C).(clear e c2)) (getl i c1 c3) (\lambda (x: C).(\lambda (H2: (drop i O c1 -x)).(\lambda (H3: (clear x c2)).(let H4 \def (clear_gen_all x c2 H3) in -(ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c2 -(CHead e (Bind b) u))))) (getl i c1 c3) (\lambda (x0: B).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (H5: (eq C c2 (CHead x1 (Bind x0) x2))).(let H6 -\def (eq_ind C c2 (\lambda (c: C).(clear x c)) H3 (CHead x1 (Bind x0) x2) H5) -in (let H7 \def (eq_ind C c2 (\lambda (c: C).(clear c c3)) H0 (CHead x1 (Bind -x0) x2) H5) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(getl i c1 -c)) (getl_intro i c1 (CHead x1 (Bind x0) x2) x H2 H6) c3 (clear_gen_bind x0 -x1 c3 x2 H7)))))))) H4))))) H1))))))). - -lemma getl_clear_bind: - \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (v: T).((clear c -(CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) -\to (getl (S n) c e2)))))))) -\def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: -C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: -C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2)))))))) (\lambda -(n: nat).(\lambda (e1: C).(\lambda (v: T).(\lambda (H: (clear (CSort n) -(CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n0: nat).(\lambda (_: -(getl n0 e1 e2)).(clear_gen_sort (CHead e1 (Bind b) v) n H (getl (S n0) -(CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: -C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: -C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2))))))))).(\lambda -(k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (v: T).(\lambda (H0: (clear -(CHead c0 k t) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n: -nat).(\lambda (H1: (getl n e1 e2)).(K_ind (\lambda (k0: K).((clear (CHead c0 -k0 t) (CHead e1 (Bind b) v)) \to (getl (S n) (CHead c0 k0 t) e2))) (\lambda -(b0: B).(\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) -v))).(let H3 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow e1 | (CHead c1 _ _) \Rightarrow c1])) (CHead e1 (Bind b) v) -(CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in -((let H4 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) v) (CHead c0 -(Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H5 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v | -(CHead _ _ t0) \Rightarrow t0])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) -(clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in (\lambda (H6: (eq B b -b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c1: -C).(getl n c1 e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(getl (S n) -(CHead c0 (Bind b1) t) e2)) (getl_head (Bind b) n c0 e2 H8 t) b0 H6))))) H4)) -H3)))) (\lambda (f: F).(\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 -(Bind b) v))).(getl_flat c0 e2 (S n) (H e1 v (clear_gen_flat f c0 (CHead e1 -(Bind b) v) t H2) e2 n H1) f t))) k H0))))))))))) c)). - -lemma getl_clear_conf: - \forall (i: nat).(\forall (c1: C).(\forall (c3: C).((getl i c1 c3) \to -(\forall (c2: C).((clear c1 c2) \to (getl i c2 c3)))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c3: -C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 -c3))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H: (getl O c1 -c3)).(\lambda (c2: C).(\lambda (H0: (clear c1 c2)).(eq_ind C c3 (\lambda (c: -C).(getl O c c3)) (let H1 \def (clear_gen_all c1 c3 (getl_gen_O c1 c3 H)) in -(ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c3 -(CHead e (Bind b) u))))) (getl O c3 c3) (\lambda (x0: B).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (H2: (eq C c3 (CHead x1 (Bind x0) x2))).(let H3 -\def (eq_ind C c3 (\lambda (c: C).(clear c1 c)) (getl_gen_O c1 c3 H) (CHead -x1 (Bind x0) x2) H2) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: -C).(getl O c c)) (getl_refl x0 x1 x2) c3 H2)))))) H1)) c2 (clear_mono c1 c3 -(getl_gen_O c1 c3 H) c2 H0))))))) (\lambda (n: nat).(\lambda (_: ((\forall -(c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) -\to (getl n c2 c3)))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall -(c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) -c2 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) -(CSort n0) c3)).(\lambda (c2: C).(\lambda (_: (clear (CSort n0) -c2)).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c2 c3))))))) (\lambda (c: -C).(\lambda (H0: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: -C).((clear c c2) \to (getl (S n) c2 c3))))))).(\lambda (k: K).(\lambda (t: -T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda -(c2: C).(\lambda (H2: (clear (CHead c k t) c2)).(K_ind (\lambda (k0: -K).((getl (S n) (CHead c k0 t) c3) \to ((clear (CHead c k0 t) c2) \to (getl -(S n) c2 c3)))) (\lambda (b: B).(\lambda (H3: (getl (S n) (CHead c (Bind b) -t) c3)).(\lambda (H4: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c -(Bind b) t) (\lambda (c0: C).(getl (S n) c0 c3)) (getl_head (Bind b) n c c3 -(getl_gen_S (Bind b) c c3 t n H3) t) c2 (clear_gen_bind b c c2 t H4))))) -(\lambda (f: F).(\lambda (H3: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda -(H4: (clear (CHead c (Flat f) t) c2)).(H0 c3 (getl_gen_S (Flat f) c c3 t n -H3) c2 (clear_gen_flat f c c2 t H4))))) k H1 H2))))))))) c1)))) i). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/dec.ma deleted file mode 100644 index a8f4df8bd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/dec.ma +++ /dev/null @@ -1,97 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/props.ma". - -lemma getl_dec: - \forall (c: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda -(b: B).(\lambda (v: T).(getl i c (CHead e (Bind b) v)))))) (\forall (d: -C).((getl i c d) \to (\forall (P: Prop).P))))) -\def - \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (i: nat).(or (ex_3 C B T -(\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) -v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P)))))) -(\lambda (n: nat).(\lambda (i: nat).(or_intror (ex_3 C B T (\lambda (e: -C).(\lambda (b: B).(\lambda (v: T).(getl i (CSort n) (CHead e (Bind b) -v)))))) (\forall (d: C).((getl i (CSort n) d) \to (\forall (P: Prop).P))) -(\lambda (d: C).(\lambda (H: (getl i (CSort n) d)).(\lambda (P: -Prop).(getl_gen_sort n i d H P))))))) (\lambda (c0: C).(\lambda (H: ((\forall -(i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: -T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to -(\forall (P: Prop).P))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (i: -nat).(nat_ind (\lambda (n: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: -B).(\lambda (v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall -(d: C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))) (K_ind -(\lambda (k0: K).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: -T).(getl O (CHead c0 k0 t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O -(CHead c0 k0 t) d) \to (\forall (P: Prop).P))))) (\lambda (b: B).(or_introl -(ex_3 C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead -c0 (Bind b) t) (CHead e (Bind b0) v)))))) (\forall (d: C).((getl O (CHead c0 -(Bind b) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: -C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e -(Bind b0) v))))) c0 b t (getl_refl b c0 t)))) (\lambda (f: F).(let H_x \def -(H O) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: -B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v)))))) (\forall (d: -C).((getl O c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: -C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e -(Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to -(\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda -(b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T -(\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) -v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl -O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O -(CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: -C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl O c0 (CHead x0 (Bind -x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: -T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: -C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (ex_3_intro -C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat -f) t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_flat c0 (CHead x0 (Bind x1) x2) -O H2 f t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl O c0 d) \to -(\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: -B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) -(\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) -(\lambda (d: C).(\lambda (H2: (getl O (CHead c0 (Flat f) t) d)).(\lambda (P: -Prop).(H1 d (getl_intro O c0 d c0 (drop_refl c0) (clear_gen_flat f c0 d t -(getl_gen_O (CHead c0 (Flat f) t) d H2))) P)))))) H0)))) k) (\lambda (n: -nat).(\lambda (_: (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda -(v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: -C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))).(let H_x \def (H -(r k n)) in (let H1 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda -(b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v)))))) (\forall -(d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T -(\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) -(CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to -(\forall (P: Prop).P)))) (\lambda (H2: (ex_3 C B T (\lambda (e: C).(\lambda -(b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))))).(ex_3_ind -C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead -e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda -(v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: -C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: -C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H3: (getl (r k n) c0 (CHead x0 -(Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: -B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) -(\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) -(ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) -(CHead c0 k t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_head k n c0 (CHead x0 -(Bind x1) x2) H3 t))))))) H2)) (\lambda (H2: ((\forall (d: C).((getl (r k n) -c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: -C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind -b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: -Prop).P))) (\lambda (d: C).(\lambda (H3: (getl (S n) (CHead c0 k t) -d)).(\lambda (P: Prop).(H2 d (getl_gen_S k c0 d t n H3) P)))))) H1))))) -i)))))) c). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/defs.ma deleted file mode 100644 index 9a21c5ece..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/defs.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/drop/defs.ma". - -include "basic_1/clear/defs.ma". - -inductive getl (h: nat) (c1: C) (c2: C): Prop \def -| getl_intro: \forall (e: C).((drop h O c1 e) \to ((clear e c2) \to (getl h -c1 c2))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/drop.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/drop.ma deleted file mode 100644 index 6b8d9a268..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/drop.ma +++ /dev/null @@ -1,483 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/props.ma". - -include "basic_1/clear/drop.ma". - -lemma getl_drop: - \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: -nat).((getl h c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) -\def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: -C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to -(drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: -T).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) (CHead e (Bind b) -u))).(getl_gen_sort n h (CHead e (Bind b) u) H (drop (S h) O (CSort n) -e))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: -T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 -e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: -T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) -(CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: -(getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear -(CHead c0 k0 t) (CHead e (Bind b) u)) \to (drop (S O) O (CHead c0 k0 t) e))) -(\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind -b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) (CHead e (Bind b) u) (CHead -c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 -\def (f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow b | -(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) \Rightarrow b1 | (Flat -_) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) -(clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C -T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t0) -\Rightarrow t0])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind -b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: -(eq C e c0)).(eq_ind_r C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 (Bind -b0) t) c1)) (eq_ind B b (\lambda (b1: B).(drop (S O) O (CHead c0 (Bind b1) t) -c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) b0 H5) e H6)))) H3)) -H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e -(Bind b) u))).(drop_clear_O b (CHead c0 (Flat f) t) e u (clear_flat c0 (CHead -e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1) f t) e O -(drop_refl e)))) k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) -(\lambda (n: nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) -\to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (getl (S n) (CHead c0 k -t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) -(\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (getl_gen_S k c0 (CHead e -(Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). - -lemma getl_drop_conf_lt: - \forall (b: B).(\forall (c: C).(\forall (c0: C).(\forall (u: T).(\forall (i: -nat).((getl i c (CHead c0 (Bind b) u)) \to (\forall (e: C).(\forall (h: -nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda -(v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop -h d c0 e0))))))))))))) -\def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: -C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to -(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) -c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0))))))))))))) (\lambda (n: -nat).(\lambda (c0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i -(CSort n) (CHead c0 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (_: (drop h (S (plus i d)) (CSort n) e)).(getl_gen_sort n i -(CHead c0 (Bind b) u) H (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u -(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c0 e0)))))))))))))) (\lambda -(c0: C).(\lambda (H: ((\forall (c1: C).(\forall (u: T).(\forall (i: -nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: -nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda -(v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop -h d c1 e0)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i (CHead c0 k t) -(CHead c1 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H1: (drop h (S (plus i d)) (CHead c0 k t) e)).(let H2 \def -(getl_gen_all (CHead c0 k t) (CHead c1 (Bind b) u) i H0) in (ex2_ind C -(\lambda (e0: C).(drop i O (CHead c0 k t) e0)) (\lambda (e0: C).(clear e0 -(CHead c1 (Bind b) u))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u -(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x: -C).(\lambda (H3: (drop i O (CHead c0 k t) x)).(\lambda (H4: (clear x (CHead -c1 (Bind b) u))).(C_ind (\lambda (c2: C).((drop i O (CHead c0 k t) c2) \to -((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: -C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead -e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) -(\lambda (n: nat).(\lambda (_: (drop i O (CHead c0 k t) (CSort n))).(\lambda -(H6: (clear (CSort n) (CHead c1 (Bind b) u))).(clear_gen_sort (CHead c1 (Bind -b) u) n H6 (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) (\lambda (x0: C).(\lambda -(IHx: (((drop i O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) -\to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))).(\lambda (k0: K).(\lambda -(t0: T).(\lambda (H5: (drop i O (CHead c0 k t) (CHead x0 k0 t0))).(\lambda -(H6: (clear (CHead x0 k0 t0) (CHead c1 (Bind b) u))).(K_ind (\lambda (k1: -K).((drop i O (CHead c0 k t) (CHead x0 k1 t0)) \to ((clear (CHead x0 k1 t0) -(CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u -(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) (\lambda (b0: -B).(\lambda (H7: (drop i O (CHead c0 k t) (CHead x0 (Bind b0) t0))).(\lambda -(H8: (clear (CHead x0 (Bind b0) t0) (CHead c1 (Bind b) u))).(let H9 \def -(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c1 | -(CHead c2 _ _) \Rightarrow c2])) (CHead c1 (Bind b) u) (CHead x0 (Bind b0) -t0) (clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in ((let H10 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow b | -(CHead _ k1 _) \Rightarrow (match k1 with [(Bind b1) \Rightarrow b1 | (Flat -_) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead x0 (Bind b0) t0) -(clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in ((let H11 \def -(f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | -(CHead _ _ t1) \Rightarrow t1])) (CHead c1 (Bind b) u) (CHead x0 (Bind b0) -t0) (clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in (\lambda (H12: (eq -B b b0)).(\lambda (H13: (eq C c1 x0)).(let H14 \def (eq_ind_r T t0 (\lambda -(t1: T).(drop i O (CHead c0 k t) (CHead x0 (Bind b0) t1))) H7 u H11) in (let -H15 \def (eq_ind_r B b0 (\lambda (b1: B).(drop i O (CHead c0 k t) (CHead x0 -(Bind b1) u))) H14 b H12) in (let H16 \def (eq_ind_r C x0 (\lambda (c2: -C).((drop i O (CHead c0 k t) c2) \to ((clear c2 (CHead c1 (Bind b) u)) \to -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda -(v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))))) IHx c1 H13) in (let H17 \def -(eq_ind_r C x0 (\lambda (c2: C).(drop i O (CHead c0 k t) (CHead c2 (Bind b) -u))) H15 c1 H13) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u -(lift h (r (Bind b) d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e -(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r (Bind b) -d) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d -v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: -T).(\lambda (x2: C).(\lambda (H18: (eq T u (lift h (r (Bind b) d) -x1))).(\lambda (H19: (drop i O e (CHead x2 (Bind b) x1))).(\lambda (H20: -(drop h (r (Bind b) d) c1 x2)).(let H21 \def (eq_ind T u (\lambda (t1: -T).((drop i O (CHead c0 k t) c1) \to ((clear c1 (CHead c1 (Bind b) t1)) \to -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda -(v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))))) H16 (lift h (r (Bind b) d) x1) -H18) in (eq_ind_r T (lift h (r (Bind b) d) x1) (\lambda (t1: T).(ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: -T).(\lambda (_: C).(eq T (lift h (r (Bind b) d) x1) (lift h d v)))) (\lambda -(v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))) x1 x2 (refl_equal T (lift h d x1)) -(getl_intro i e (CHead x2 (Bind b) x1) (CHead x2 (Bind b) x1) H19 (clear_bind -b x2 x1)) H20) u H18))))))) (drop_conf_lt (Bind b) i u c1 (CHead c0 k t) H17 -e h d H1))))))))) H10)) H9))))) (\lambda (f: F).(\lambda (H7: (drop i O -(CHead c0 k t) (CHead x0 (Flat f) t0))).(\lambda (H8: (clear (CHead x0 (Flat -f) t0) (CHead c1 (Bind b) u))).(nat_ind (\lambda (n: nat).((drop h (S (plus n -d)) (CHead c0 k t) e) \to ((drop n O (CHead c0 k t) (CHead x0 (Flat f) t0)) -\to ((((drop n O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) \to -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda -(v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop -h d c1 e0)))))))) (\lambda (H9: (drop h (S (plus O d)) (CHead c0 k t) -e)).(\lambda (H10: (drop O O (CHead c0 k t) (CHead x0 (Flat f) t0))).(\lambda -(IHx0: (((drop O O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) -\to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))).(let H11 \def (f_equal C C -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | (CHead c2 _ _) -\Rightarrow c2])) (CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead -c0 k t) (CHead x0 (Flat f) t0) H10)) in ((let H12 \def (f_equal C K (\lambda -(e0: C).(match e0 with [(CSort _) \Rightarrow k | (CHead _ k1 _) \Rightarrow -k1])) (CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead c0 k t) -(CHead x0 (Flat f) t0) H10)) in ((let H13 \def (f_equal C T (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow t | (CHead _ _ t1) \Rightarrow t1])) -(CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead x0 -(Flat f) t0) H10)) in (\lambda (H14: (eq K k (Flat f))).(\lambda (H15: (eq C -c0 x0)).(let H16 \def (eq_ind_r C x0 (\lambda (c2: C).(clear c2 (CHead c1 -(Bind b) u))) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) c0 H15) in -(let H17 \def (eq_ind_r C x0 (\lambda (c2: C).((drop O O (CHead c0 k t) c2) -\to ((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda -(_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e -(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 -e0))))))) IHx0 c0 H15) in (let H18 \def (eq_ind K k (\lambda (k1: K).((drop O -O (CHead c0 k1 t) c0) \to ((clear c0 (CHead c1 (Bind b) u)) \to (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))))) H17 (Flat f) H14) in (let H19 \def -(eq_ind K k (\lambda (k1: K).(drop h (S (plus O d)) (CHead c0 k1 t) e)) H9 -(Flat f) H14) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e -(CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r -(Flat f) (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat -f) (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u -(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: -C).(\lambda (x2: T).(\lambda (H20: (eq C e (CHead x1 (Flat f) x2))).(\lambda -(H21: (eq T t (lift h (r (Flat f) (plus O d)) x2))).(\lambda (H22: (drop h (r -(Flat f) (plus O d)) c0 x1)).(let H23 \def (f_equal T T (\lambda (e0: T).e0) -t (lift h (r (Flat f) (plus O d)) x2) H21) in (let H24 \def (eq_ind C e -(\lambda (c2: C).((drop O O (CHead c0 (Flat f) t) c0) \to ((clear c0 (CHead -c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift -h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O c2 (CHead e0 (Bind b) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H18 (CHead x1 -(Flat f) x2) H20) in (eq_ind_r C (CHead x1 (Flat f) x2) (\lambda (c2: -C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl O c2 (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H25 \def (eq_ind T t -(\lambda (t1: T).((drop O O (CHead c0 (Flat f) t1) c0) \to ((clear c0 (CHead -c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift -h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) -(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 -e0))))))) H24 (lift h (S d) x2) H23) in (let H26 \def (H c1 u O (getl_intro O -c0 (CHead c1 (Bind b) u) c0 (drop_refl c0) H16) x1 h d H22) in (ex3_2_ind T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl O x1 (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda -(_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O -(CHead x1 (Flat f) x2) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: -C).(drop h d c1 e0)))) (\lambda (x3: T).(\lambda (x4: C).(\lambda (H27: (eq T -u (lift h d x3))).(\lambda (H28: (getl O x1 (CHead x4 (Bind b) x3))).(\lambda -(H29: (drop h d c1 x4)).(let H30 \def (eq_ind T u (\lambda (t1: T).((drop O O -(CHead c0 (Flat f) (lift h (S d) x2)) c0) \to ((clear c0 (CHead c1 (Bind b) -t1)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) (CHead e0 -(Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H25 -(lift h d x3) H27) in (let H31 \def (eq_ind T u (\lambda (t1: T).(clear c0 -(CHead c1 (Bind b) t1))) H16 (lift h d x3) H27) in (eq_ind_r T (lift h d x3) -(\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h -d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) -(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 -e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x3) -(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) -x2) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 -e0))) x3 x4 (refl_equal T (lift h d x3)) (getl_flat x1 (CHead x4 (Bind b) x3) -O H28 f x2) H29) u H27)))))))) H26))) e H20)))))))) (drop_gen_skip_l c0 e t h -(plus O d) (Flat f) H19))))))))) H12)) H11))))) (\lambda (i0: nat).(\lambda -(IHi: (((drop h (S (plus i0 d)) (CHead c0 k t) e) \to ((drop i0 O (CHead c0 k -t) (CHead x0 (Flat f) t0)) \to ((((drop i0 O (CHead c0 k t) x0) \to ((clear -x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq -T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i0 e (CHead e0 -(Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda -(v: T).(\lambda (e0: C).(getl i0 e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))))))).(\lambda (H9: (drop h (S (plus -(S i0) d)) (CHead c0 k t) e)).(\lambda (H10: (drop (S i0) O (CHead c0 k t) -(CHead x0 (Flat f) t0))).(\lambda (IHx0: (((drop (S i0) O (CHead c0 k t) x0) -\to ((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda -(_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) -e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 -e0)))))))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 -k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k (plus (S i0) d)) -v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus (S i0) d)) c0 e0))) -(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda -(v: T).(\lambda (e0: C).(getl (S i0) e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: C).(\lambda (x2: -T).(\lambda (H11: (eq C e (CHead x1 k x2))).(\lambda (H12: (eq T t (lift h (r -k (plus (S i0) d)) x2))).(\lambda (H13: (drop h (r k (plus (S i0) d)) c0 -x1)).(let H14 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r k (plus (S -i0) d)) x2) H12) in (let H15 \def (eq_ind C e (\lambda (c2: C).((drop h (S -(plus i0 d)) (CHead c0 k t) c2) \to ((drop i0 O (CHead c0 k t) (CHead x0 -(Flat f) t0)) \to ((((drop i0 O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 -(Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d -v)))) (\lambda (v: T).(\lambda (e0: C).(getl i0 c2 (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl i0 c2 (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0)))))))) IHi (CHead x1 k x2) H11) in (let -H16 \def (eq_ind C e (\lambda (c2: C).((drop (S i0) O (CHead c0 k t) x0) \to -((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: -C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) c2 -(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 -e0))))))) IHx0 (CHead x1 k x2) H11) in (eq_ind_r C (CHead x1 k x2) (\lambda -(c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl (S i0) c2 (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H17 \def (eq_ind T -t (\lambda (t1: T).((drop (S i0) O (CHead c0 k t1) x0) \to ((clear x0 (CHead -c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift -h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) -(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 -e0))))))) H16 (lift h (r k (S (plus i0 d))) x2) H14) in (let H18 \def (eq_ind -T t (\lambda (t1: T).((drop h (S (plus i0 d)) (CHead c0 k t1) (CHead x1 k -x2)) \to ((drop i0 O (CHead c0 k t1) (CHead x0 (Flat f) t0)) \to ((((drop i0 -O (CHead c0 k t1) x0) \to ((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl i0 (CHead x1 k x2) (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl i0 (CHead x1 k x2) (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) H15 (lift h (r k (S -(plus i0 d))) x2) H14) in (let H19 \def (eq_ind nat (r k (plus (S i0) d)) -(\lambda (n: nat).(drop h n c0 x1)) H13 (plus (r k (S i0)) d) (r_plus k (S -i0) d)) in (let H20 \def (eq_ind nat (r k (S i0)) (\lambda (n: nat).(drop h -(plus n d) c0 x1)) H19 (S (r k i0)) (r_S k i0)) in (let H21 \def (H c1 u (r k -i0) (getl_intro (r k i0) c0 (CHead c1 (Bind b) u) (CHead x0 (Flat f) t0) -(drop_gen_drop k c0 (CHead x0 (Flat f) t0) t i0 H10) (clear_flat x0 (CHead c1 -(Bind b) u) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) f t0)) x1 h d -H20) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d -v)))) (\lambda (v: T).(\lambda (e0: C).(getl (r k i0) x1 (CHead e0 (Bind b) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda -(v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x3: T).(\lambda (x4: -C).(\lambda (H22: (eq T u (lift h d x3))).(\lambda (H23: (getl (r k i0) x1 -(CHead x4 (Bind b) x3))).(\lambda (H24: (drop h d c1 x4)).(let H25 \def -(eq_ind T u (\lambda (t1: T).((drop (S i0) O (CHead c0 k (lift h (r k (S -(plus i0 d))) x2)) x0) \to ((clear x0 (CHead c1 (Bind b) t1)) \to (ex3_2 T C -(\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H17 (lift h d x3) -H22) in (let H26 \def (eq_ind T u (\lambda (t1: T).(clear x0 (CHead c1 (Bind -b) t1))) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) (lift h d x3) H22) -in (eq_ind_r T (lift h d x3) (\lambda (t1: T).(ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: -T).(\lambda (_: C).(eq T (lift h d x3) (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x3 x4 (refl_equal T (lift -h d x3)) (getl_head k i0 x1 (CHead x4 (Bind b) x3) H23 x2) H24) u H22)))))))) -H21)))))) e H11))))))))) (drop_gen_skip_l c0 e t h (plus (S i0) d) k -H9))))))) i H1 H7 IHx)))) k0 H5 H6))))))) x H3 H4)))) H2)))))))))))))) c)). - -lemma getl_drop_conf_ge: - \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall -(e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d -h) i) \to (getl (minus i h) e a))))))))) -\def - \lambda (i: nat).(\lambda (a: C).(\lambda (c: C).(\lambda (H: (getl i c -a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h -d c e)).(\lambda (H1: (le (plus d h) i)).(let H2 \def (getl_gen_all c a i H) -in (ex2_ind C (\lambda (e0: C).(drop i O c e0)) (\lambda (e0: C).(clear e0 -a)) (getl (minus i h) e a) (\lambda (x: C).(\lambda (H3: (drop i O c -x)).(\lambda (H4: (clear x a)).(getl_intro (minus i h) e a x (drop_conf_ge i -x c H3 e h d H0 H1) H4)))) H2)))))))))). - -lemma getl_conf_ge_drop: - \forall (b: B).(\forall (c1: C).(\forall (e: C).(\forall (u: T).(\forall (i: -nat).((getl i c1 (CHead e (Bind b) u)) \to (\forall (c2: C).((drop (S O) i c1 -c2) \to (drop i O c2 e)))))))) -\def - \lambda (b: B).(\lambda (c1: C).(\lambda (e: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H: (getl i c1 (CHead e (Bind b) u))).(\lambda (c2: C).(\lambda -(H0: (drop (S O) i c1 c2)).(let H3 \def (eq_ind nat (minus (S i) (S O)) -(\lambda (n: nat).(drop n O c2 e)) (drop_conf_ge (S i) e c1 (getl_drop b c1 e -u i H) c2 (S O) i H0 (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(le n (S -i))) (le_n (S i)) (plus i (S O)) (plus_sym i (S O)))) i (minus_Sx_SO i)) in -H3)))))))). - -lemma getl_drop_conf_rev: - \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to -(\forall (b: B).(\forall (c2: C).(\forall (v2: T).(\forall (i: nat).((getl i -c2 (CHead e2 (Bind b) v2)) \to (ex2 C (\lambda (c1: C).(drop j O c1 c2)) -(\lambda (c1: C).(drop (S i) j c1 e1))))))))))) -\def - \lambda (j: nat).(\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop j O e1 -e2)).(\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(\lambda (i: -nat).(\lambda (H0: (getl i c2 (CHead e2 (Bind b) v2))).(drop_conf_rev j e1 e2 -H c2 (S i) (getl_drop b c2 e2 v2 i H0)))))))))). - -lemma drop_getl_trans_lt: - \forall (i: nat).(\forall (d: nat).((lt i d) \to (\forall (c1: C).(\forall -(c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (b: B).(\forall (e2: -C).(\forall (v: T).((getl i c2 (CHead e2 (Bind b) v)) \to (ex2 C (\lambda -(e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda -(e1: C).(drop h (minus d (S i)) e1 e2))))))))))))) -\def - \lambda (i: nat).(\lambda (d: nat).(\lambda (H: (lt i d)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 -c2)).(\lambda (b: B).(\lambda (e2: C).(\lambda (v: T).(\lambda (H1: (getl i -c2 (CHead e2 (Bind b) v))).(let H2 \def (getl_gen_all c2 (CHead e2 (Bind b) -v) i H1) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: -C).(clear e (CHead e2 (Bind b) v))) (ex2 C (\lambda (e1: C).(getl i c1 (CHead -e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h (minus d -(S i)) e1 e2))) (\lambda (x: C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: -(clear x (CHead e2 (Bind b) v))).(ex2_ind C (\lambda (e1: C).(drop i O c1 -e1)) (\lambda (e1: C).(drop h (minus d i) e1 x)) (ex2 C (\lambda (e1: -C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: -C).(drop h (minus d (S i)) e1 e2))) (\lambda (x0: C).(\lambda (H5: (drop i O -c1 x0)).(\lambda (H6: (drop h (minus d i) x0 x)).(let H7 \def (eq_ind nat -(minus d i) (\lambda (n: nat).(drop h n x0 x)) H6 (S (minus d (S i))) -(minus_x_Sy d i H)) in (let H8 \def (drop_clear_S x x0 h (minus d (S i)) H7 b -e2 v H4) in (ex2_ind C (\lambda (c3: C).(clear x0 (CHead c3 (Bind b) (lift h -(minus d (S i)) v)))) (\lambda (c3: C).(drop h (minus d (S i)) c3 e2)) (ex2 C -(\lambda (e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) -(\lambda (e1: C).(drop h (minus d (S i)) e1 e2))) (\lambda (x1: C).(\lambda -(H9: (clear x0 (CHead x1 (Bind b) (lift h (minus d (S i)) v)))).(\lambda -(H10: (drop h (minus d (S i)) x1 e2)).(ex_intro2 C (\lambda (e1: C).(getl i -c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h -(minus d (S i)) e1 e2)) x1 (getl_intro i c1 (CHead x1 (Bind b) (lift h (minus -d (S i)) v)) x0 H5 H9) H10)))) H8)))))) (drop_trans_le i d (le_S_n i d -(le_S_n (S i) (S d) (le_S (S (S i)) (S d) (le_n_S (S i) d H)))) c1 c2 h H0 x -H3))))) H2)))))))))))). - -lemma drop_getl_trans_le: - \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall -(c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((getl i c2 -e2) \to (ex3_2 C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) -(\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: -C).(\lambda (e1: C).(clear e1 e2)))))))))))) -\def - \lambda (i: nat).(\lambda (d: nat).(\lambda (H: (le i d)).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 -c2)).(\lambda (e2: C).(\lambda (H1: (getl i c2 e2)).(let H2 \def -(getl_gen_all c2 e2 i H1) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) -(\lambda (e: C).(clear e e2)) (ex3_2 C C (\lambda (e0: C).(\lambda (_: -C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) -e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 e2)))) (\lambda (x: -C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: (clear x e2)).(let H5 \def -(drop_trans_le i d H c1 c2 h H0 x H3) in (ex2_ind C (\lambda (e1: C).(drop i -O c1 e1)) (\lambda (e1: C).(drop h (minus d i) e1 x)) (ex3_2 C C (\lambda -(e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: -C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 -e2)))) (\lambda (x0: C).(\lambda (H6: (drop i O c1 x0)).(\lambda (H7: (drop h -(minus d i) x0 x)).(ex3_2_intro C C (\lambda (e0: C).(\lambda (_: C).(drop i -O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) -(\lambda (_: C).(\lambda (e1: C).(clear e1 e2))) x0 x H6 H7 H4)))) H5))))) -H2)))))))))). - -lemma drop_getl_trans_ge: - \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: -nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((getl i c2 e2) -\to ((le d i) \to (getl (plus i h) c1 e2))))))))) -\def - \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (d: -nat).(\lambda (h: nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: -C).(\lambda (H0: (getl i c2 e2)).(\lambda (H1: (le d i)).(let H2 \def -(getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) -(\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) (\lambda (x: -C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: (clear x e2)).(getl_intro -(plus i h) c1 e2 x (drop_trans_ge i c1 c2 d h H x H3 H1) H4)))) H2)))))))))). - -lemma getl_drop_trans: - \forall (c1: C).(\forall (c2: C).(\forall (h: nat).((getl h c1 c2) \to -(\forall (e2: C).(\forall (i: nat).((drop (S i) O c2 e2) \to (drop (S (plus i -h)) O c1 e2))))))) -\def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: -nat).((getl h c c2) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c2 -e2) \to (drop (S (plus i h)) O c e2)))))))) (\lambda (n: nat).(\lambda (c2: -C).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) c2)).(\lambda (e2: -C).(\lambda (i: nat).(\lambda (_: (drop (S i) O c2 e2)).(getl_gen_sort n h c2 -H (drop (S (plus i h)) O (CSort n) e2))))))))) (\lambda (c2: C).(\lambda -(IHc: ((\forall (c3: C).(\forall (h: nat).((getl h c2 c3) \to (\forall (e2: -C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i h)) O c2 -e2))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall -(c3: C).(\forall (h: nat).((getl h (CHead c2 k0 t) c3) \to (\forall (e2: -C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i h)) O (CHead -c2 k0 t) e2))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: -C).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c2 (Bind b) -t) c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop -(S (plus i n)) O (CHead c2 (Bind b) t) e2)))))) (\lambda (H: (getl O (CHead -c2 (Bind b) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H0: (drop (S -i) O c3 e2)).(let H1 \def (eq_ind C c3 (\lambda (c: C).(drop (S i) O c e2)) -H0 (CHead c2 (Bind b) t) (clear_gen_bind b c2 c3 t (getl_gen_O (CHead c2 -(Bind b) t) c3 H))) in (eq_ind nat i (\lambda (n: nat).(drop (S n) O (CHead -c2 (Bind b) t) e2)) (drop_drop (Bind b) i c2 e2 (drop_gen_drop (Bind b) c2 e2 -t i H1) t) (plus i O) (plus_n_O i))))))) (\lambda (n: nat).(\lambda (_: -(((getl n (CHead c2 (Bind b) t) c3) \to (\forall (e2: C).(\forall (i: -nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Bind b) t) -e2))))))).(\lambda (H0: (getl (S n) (CHead c2 (Bind b) t) c3)).(\lambda (e2: -C).(\lambda (i: nat).(\lambda (H1: (drop (S i) O c3 e2)).(eq_ind nat (plus (S -i) n) (\lambda (n0: nat).(drop (S n0) O (CHead c2 (Bind b) t) e2)) (drop_drop -(Bind b) (plus (S i) n) c2 e2 (IHc c3 n (getl_gen_S (Bind b) c2 c3 t n H0) e2 -i H1) t) (plus i (S n)) (plus_Snm_nSm i n)))))))) h))))) (\lambda (f: -F).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(nat_ind (\lambda (n: -nat).((getl n (CHead c2 (Flat f) t) c3) \to (\forall (e2: C).(\forall (i: -nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Flat f) t) -e2)))))) (\lambda (H: (getl O (CHead c2 (Flat f) t) c3)).(\lambda (e2: -C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O c3 e2)).(drop_drop (Flat f) -(plus i O) c2 e2 (IHc c3 O (getl_intro O c2 c3 c2 (drop_refl c2) -(clear_gen_flat f c2 c3 t (getl_gen_O (CHead c2 (Flat f) t) c3 H))) e2 i H0) -t))))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead c2 (Flat f) t) c3) \to -(\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i -n)) O (CHead c2 (Flat f) t) e2))))))).(\lambda (H0: (getl (S n) (CHead c2 -(Flat f) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H1: (drop (S i) -O c3 e2)).(drop_drop (Flat f) (plus i (S n)) c2 e2 (IHc c3 (S n) (getl_gen_S -(Flat f) c2 c3 t n H0) e2 i H1) t))))))) h))))) k)))) c1). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/flt.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/flt.ma deleted file mode 100644 index 63876304a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/flt.ma +++ /dev/null @@ -1,60 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/fwd.ma". - -include "basic_1/flt/props.ma". - -lemma getl_flt: - \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: -nat).((getl i c (CHead e (Bind b) u)) \to (flt e u c (TLRef i))))))) -\def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: -C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to -(flt e u c0 (TLRef i))))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead e (Bind b) -u))).(getl_gen_sort n i (CHead e (Bind b) u) H (flt e u (CSort n) (TLRef -i)))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: -T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef -i)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: -T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) -(CHead e (Bind b) u)) \to (flt e u (CHead c0 k t) (TLRef n)))) (\lambda (H0: -(getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear -(CHead c0 k0 t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k0 t) (TLRef -O)))) (\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e -(Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 with -[(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) (CHead e (Bind b) -u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) -in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 -(Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 -\def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | -(CHead _ _ t0) \Rightarrow t0])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) -(clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b -b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(flt e t0 -(CHead c0 (Bind b0) t) (TLRef O))) (eq_ind_r C c0 (\lambda (c1: C).(flt c1 t -(CHead c0 (Bind b0) t) (TLRef O))) (eq_ind B b (\lambda (b1: B).(flt c0 t -(CHead c0 (Bind b1) t) (TLRef O))) (flt_arith0 (Bind b) c0 t O) b0 H5) e H6) -u H4)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) -t) (CHead e (Bind b) u))).(flt_arith1 (Bind b) e c0 u (clear_cle c0 (CHead e -(Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1)) (Flat f) t O))) -k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) (\lambda (n: -nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (flt e u -(CHead c0 k t) (TLRef n))))).(\lambda (H1: (getl (S n) (CHead c0 k t) (CHead -e (Bind b) u))).(let H_y \def (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind -b) u) t n H1)) in (flt_arith2 e c0 u (r k n) H_y k t (S n)))))) i)))))))) c)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/fwd.ma deleted file mode 100644 index 7390775d3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/fwd.ma +++ /dev/null @@ -1,154 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/defs.ma". - -include "basic_1/drop/fwd.ma". - -include "basic_1/clear/fwd.ma". - -implied lemma getl_ind: - \forall (h: nat).(\forall (c1: C).(\forall (c2: C).(\forall (P: -Prop).(((\forall (e: C).((drop h O c1 e) \to ((clear e c2) \to P)))) \to -((getl h c1 c2) \to P))))) -\def - \lambda (h: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (P: -Prop).(\lambda (f: ((\forall (e: C).((drop h O c1 e) \to ((clear e c2) \to -P))))).(\lambda (g: (getl h c1 c2)).(match g with [(getl_intro x x0 x1) -\Rightarrow (f x x0 x1)])))))). - -lemma getl_gen_all: - \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((getl i c1 c2) \to (ex2 -C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 -c2)).(getl_ind i c1 c2 (ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: -C).(clear e c2))) (\lambda (e: C).(\lambda (H0: (drop i O c1 e)).(\lambda -(H1: (clear e c2)).(ex_intro2 C (\lambda (e0: C).(drop i O c1 e0)) (\lambda -(e0: C).(clear e0 c2)) e H0 H1)))) H)))). - -lemma getl_gen_sort: - \forall (n: nat).(\forall (h: nat).(\forall (x: C).((getl h (CSort n) x) \to -(\forall (P: Prop).P)))) -\def - \lambda (n: nat).(\lambda (h: nat).(\lambda (x: C).(\lambda (H: (getl h -(CSort n) x)).(\lambda (P: Prop).(let H0 \def (getl_gen_all (CSort n) x h H) -in (ex2_ind C (\lambda (e: C).(drop h O (CSort n) e)) (\lambda (e: C).(clear -e x)) P (\lambda (x0: C).(\lambda (H1: (drop h O (CSort n) x0)).(\lambda (H2: -(clear x0 x)).(and3_ind (eq C x0 (CSort n)) (eq nat h O) (eq nat O O) P -(\lambda (H3: (eq C x0 (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (_: -(eq nat O O)).(let H6 \def (eq_ind C x0 (\lambda (c: C).(clear c x)) H2 -(CSort n) H3) in (clear_gen_sort x n H6 P))))) (drop_gen_sort n h O x0 -H1))))) H0)))))). - -lemma getl_gen_O: - \forall (e: C).(\forall (x: C).((getl O e x) \to (clear e x))) -\def - \lambda (e: C).(\lambda (x: C).(\lambda (H: (getl O e x)).(let H0 \def -(getl_gen_all e x O H) in (ex2_ind C (\lambda (e0: C).(drop O O e e0)) -(\lambda (e0: C).(clear e0 x)) (clear e x) (\lambda (x0: C).(\lambda (H1: -(drop O O e x0)).(\lambda (H2: (clear x0 x)).(let H3 \def (eq_ind_r C x0 -(\lambda (c: C).(clear c x)) H2 e (drop_gen_refl e x0 H1)) in H3)))) H0)))). - -lemma getl_gen_S: - \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: -nat).((getl (S h) (CHead c k u) x) \to (getl (r k h) c x)))))) -\def - \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: -nat).(\lambda (H: (getl (S h) (CHead c k u) x)).(let H0 \def (getl_gen_all -(CHead c k u) x (S h) H) in (ex2_ind C (\lambda (e: C).(drop (S h) O (CHead c -k u) e)) (\lambda (e: C).(clear e x)) (getl (r k h) c x) (\lambda (x0: -C).(\lambda (H1: (drop (S h) O (CHead c k u) x0)).(\lambda (H2: (clear x0 -x)).(getl_intro (r k h) c x x0 (drop_gen_drop k c x0 u h H1) H2)))) H0))))))). - -lemma getl_gen_2: - \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((getl i c1 c2) \to (ex_3 -B C T (\lambda (b: B).(\lambda (c: C).(\lambda (v: T).(eq C c2 (CHead c (Bind -b) v))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 -c2)).(let H0 \def (getl_gen_all c1 c2 i H) in (ex2_ind C (\lambda (e: -C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)) (ex_3 B C T (\lambda (b: -B).(\lambda (c: C).(\lambda (v: T).(eq C c2 (CHead c (Bind b) v)))))) -(\lambda (x: C).(\lambda (_: (drop i O c1 x)).(\lambda (H2: (clear x -c2)).(let H3 \def (clear_gen_all x c2 H2) in (ex_3_ind B C T (\lambda (b: -B).(\lambda (e: C).(\lambda (u: T).(eq C c2 (CHead e (Bind b) u))))) (ex_3 B -C T (\lambda (b: B).(\lambda (c: C).(\lambda (v: T).(eq C c2 (CHead c (Bind -b) v)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H4: -(eq C c2 (CHead x1 (Bind x0) x2))).(let H5 \def (eq_ind C c2 (\lambda (c: -C).(clear x c)) H2 (CHead x1 (Bind x0) x2) H4) in (eq_ind_r C (CHead x1 (Bind -x0) x2) (\lambda (c: C).(ex_3 B C T (\lambda (b: B).(\lambda (c0: C).(\lambda -(v: T).(eq C c (CHead c0 (Bind b) v))))))) (ex_3_intro B C T (\lambda (b: -B).(\lambda (c: C).(\lambda (v: T).(eq C (CHead x1 (Bind x0) x2) (CHead c -(Bind b) v))))) x0 x1 x2 (refl_equal C (CHead x1 (Bind x0) x2))) c2 H4)))))) -H3))))) H0))))). - -lemma getl_gen_flat: - \forall (f: F).(\forall (e: C).(\forall (d: C).(\forall (v: T).(\forall (i: -nat).((getl i (CHead e (Flat f) v) d) \to (getl i e d)))))) -\def - \lambda (f: F).(\lambda (e: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: -nat).(nat_ind (\lambda (n: nat).((getl n (CHead e (Flat f) v) d) \to (getl n -e d))) (\lambda (H: (getl O (CHead e (Flat f) v) d)).(getl_intro O e d e -(drop_refl e) (clear_gen_flat f e d v (getl_gen_O (CHead e (Flat f) v) d -H)))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead e (Flat f) v) d) \to -(getl n e d)))).(\lambda (H0: (getl (S n) (CHead e (Flat f) v) -d)).(getl_gen_S (Flat f) e d v n H0)))) i))))). - -lemma getl_gen_bind: - \forall (b: B).(\forall (e: C).(\forall (d: C).(\forall (v: T).(\forall (i: -nat).((getl i (CHead e (Bind b) v) d) \to (or (land (eq nat i O) (eq C d -(CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda -(j: nat).(getl j e d))))))))) -\def - \lambda (b: B).(\lambda (e: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: -nat).(nat_ind (\lambda (n: nat).((getl n (CHead e (Bind b) v) d) \to (or -(land (eq nat n O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: -nat).(eq nat n (S j))) (\lambda (j: nat).(getl j e d)))))) (\lambda (H: (getl -O (CHead e (Bind b) v) d)).(eq_ind_r C (CHead e (Bind b) v) (\lambda (c: -C).(or (land (eq nat O O) (eq C c (CHead e (Bind b) v))) (ex2 nat (\lambda -(j: nat).(eq nat O (S j))) (\lambda (j: nat).(getl j e c))))) (or_introl -(land (eq nat O O) (eq C (CHead e (Bind b) v) (CHead e (Bind b) v))) (ex2 nat -(\lambda (j: nat).(eq nat O (S j))) (\lambda (j: nat).(getl j e (CHead e -(Bind b) v)))) (conj (eq nat O O) (eq C (CHead e (Bind b) v) (CHead e (Bind -b) v)) (refl_equal nat O) (refl_equal C (CHead e (Bind b) v)))) d -(clear_gen_bind b e d v (getl_gen_O (CHead e (Bind b) v) d H)))) (\lambda (n: -nat).(\lambda (_: (((getl n (CHead e (Bind b) v) d) \to (or (land (eq nat n -O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat n (S -j))) (\lambda (j: nat).(getl j e d))))))).(\lambda (H0: (getl (S n) (CHead e -(Bind b) v) d)).(or_intror (land (eq nat (S n) O) (eq C d (CHead e (Bind b) -v))) (ex2 nat (\lambda (j: nat).(eq nat (S n) (S j))) (\lambda (j: nat).(getl -j e d))) (ex_intro2 nat (\lambda (j: nat).(eq nat (S n) (S j))) (\lambda (j: -nat).(getl j e d)) n (refl_equal nat (S n)) (getl_gen_S (Bind b) e d v n -H0)))))) i))))). - -theorem getl_mono: - \forall (c: C).(\forall (x1: C).(\forall (h: nat).((getl h c x1) \to -(\forall (x2: C).((getl h c x2) \to (eq C x1 x2)))))) -\def - \lambda (c: C).(\lambda (x1: C).(\lambda (h: nat).(\lambda (H: (getl h c -x1)).(\lambda (x2: C).(\lambda (H0: (getl h c x2)).(let H1 \def (getl_gen_all -c x2 h H0) in (ex2_ind C (\lambda (e: C).(drop h O c e)) (\lambda (e: -C).(clear e x2)) (eq C x1 x2) (\lambda (x: C).(\lambda (H2: (drop h O c -x)).(\lambda (H3: (clear x x2)).(let H4 \def (getl_gen_all c x1 h H) in -(ex2_ind C (\lambda (e: C).(drop h O c e)) (\lambda (e: C).(clear e x1)) (eq -C x1 x2) (\lambda (x0: C).(\lambda (H5: (drop h O c x0)).(\lambda (H6: (clear -x0 x1)).(let H7 \def (eq_ind C x (\lambda (c0: C).(drop h O c c0)) H2 x0 -(drop_mono c x O h H2 x0 H5)) in (let H8 \def (eq_ind_r C x0 (\lambda (c0: -C).(drop h O c c0)) H7 x (drop_mono c x O h H2 x0 H5)) in (let H9 \def -(eq_ind_r C x0 (\lambda (c0: C).(clear c0 x1)) H6 x (drop_mono c x O h H2 x0 -H5)) in (clear_mono x x1 H9 x2 H3))))))) H4))))) H1))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/getl.ma deleted file mode 100644 index 64e331905..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/getl.ma +++ /dev/null @@ -1,51 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/drop.ma". - -include "basic_1/getl/clear.ma". - -lemma getl_conf_le: - \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall -(e: C).(\forall (h: nat).((getl h c e) \to ((le h i) \to (getl (minus i h) e -a)))))))) -\def - \lambda (i: nat).(\lambda (a: C).(\lambda (c: C).(\lambda (H: (getl i c -a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (H0: (getl h c e)).(\lambda -(H1: (le h i)).(let H2 \def (getl_gen_all c e h H0) in (ex2_ind C (\lambda -(e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) (getl (minus i h) e -a) (\lambda (x: C).(\lambda (H3: (drop h O c x)).(\lambda (H4: (clear x -e)).(getl_clear_conf (minus i h) x a (getl_drop_conf_ge i a c H x h O H3 H1) -e H4)))) H2))))))))). - -theorem getl_trans: - \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((getl -h c1 c2) \to (\forall (e2: C).((getl i c2 e2) \to (getl (plus i h) c1 -e2))))))) -\def - \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: -nat).(\lambda (H: (getl h c1 c2)).(\lambda (e2: C).(\lambda (H0: (getl i c2 -e2)).(let H1 \def (getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: -C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) -(\lambda (x: C).(\lambda (H2: (drop i O c2 x)).(\lambda (H3: (clear x -e2)).(nat_ind (\lambda (n: nat).((drop n O c2 x) \to (getl (plus n h) c1 -e2))) (\lambda (H4: (drop O O c2 x)).(let H5 \def (eq_ind_r C x (\lambda (c: -C).(clear c e2)) H3 c2 (drop_gen_refl c2 x H4)) in (getl_clear_trans (plus O -h) c1 c2 H e2 H5))) (\lambda (i0: nat).(\lambda (_: (((drop i0 O c2 x) \to -(getl (plus i0 h) c1 e2)))).(\lambda (H4: (drop (S i0) O c2 x)).(let H_y \def -(getl_drop_trans c1 c2 h H x i0 H4) in (getl_intro (plus (S i0) h) c1 e2 x -H_y H3))))) i H2)))) H1)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/getl/props.ma b/matita/matita/contribs/lambdadelta/basic_1/getl/props.ma deleted file mode 100644 index 56592c5e6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/getl/props.ma +++ /dev/null @@ -1,72 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/getl/fwd.ma". - -include "basic_1/clear/props.ma". - -include "basic_1/drop/props.ma". - -lemma getl_refl: - \forall (b: B).(\forall (c: C).(\forall (u: T).(getl O (CHead c (Bind b) u) -(CHead c (Bind b) u)))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(getl_intro O (CHead c (Bind -b) u) (CHead c (Bind b) u) (CHead c (Bind b) u) (drop_refl (CHead c (Bind b) -u)) (clear_bind b c u)))). - -lemma getl_head: - \forall (k: K).(\forall (h: nat).(\forall (c: C).(\forall (e: C).((getl (r k -h) c e) \to (\forall (u: T).(getl (S h) (CHead c k u) e)))))) -\def - \lambda (k: K).(\lambda (h: nat).(\lambda (c: C).(\lambda (e: C).(\lambda -(H: (getl (r k h) c e)).(\lambda (u: T).(let H0 \def (getl_gen_all c e (r k -h) H) in (ex2_ind C (\lambda (e0: C).(drop (r k h) O c e0)) (\lambda (e0: -C).(clear e0 e)) (getl (S h) (CHead c k u) e) (\lambda (x: C).(\lambda (H1: -(drop (r k h) O c x)).(\lambda (H2: (clear x e)).(getl_intro (S h) (CHead c k -u) e x (drop_drop k h c x H1 u) H2)))) H0))))))). - -lemma getl_flat: - \forall (c: C).(\forall (e: C).(\forall (h: nat).((getl h c e) \to (\forall -(f: F).(\forall (u: T).(getl h (CHead c (Flat f) u) e)))))) -\def - \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (H: (getl h c -e)).(\lambda (f: F).(\lambda (u: T).(let H0 \def (getl_gen_all c e h H) in -(ex2_ind C (\lambda (e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) -(getl h (CHead c (Flat f) u) e) (\lambda (x: C).(\lambda (H1: (drop h O c -x)).(\lambda (H2: (clear x e)).(nat_ind (\lambda (n: nat).((drop n O c x) \to -(getl n (CHead c (Flat f) u) e))) (\lambda (H3: (drop O O c x)).(let H4 \def -(eq_ind_r C x (\lambda (c0: C).(clear c0 e)) H2 c (drop_gen_refl c x H3)) in -(getl_intro O (CHead c (Flat f) u) e (CHead c (Flat f) u) (drop_refl (CHead c -(Flat f) u)) (clear_flat c e H4 f u)))) (\lambda (h0: nat).(\lambda (_: -(((drop h0 O c x) \to (getl h0 (CHead c (Flat f) u) e)))).(\lambda (H3: (drop -(S h0) O c x)).(getl_intro (S h0) (CHead c (Flat f) u) e x (drop_drop (Flat -f) h0 c x H3 u) H2)))) h H1)))) H0))))))). - -lemma getl_ctail: - \forall (b: B).(\forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: -nat).((getl i c (CHead d (Bind b) u)) \to (\forall (k: K).(\forall (v: -T).(getl i (CTail k v c) (CHead (CTail k v d) (Bind b) u))))))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H: (getl i c (CHead d (Bind b) u))).(\lambda (k: K).(\lambda -(v: T).(let H0 \def (getl_gen_all c (CHead d (Bind b) u) i H) in (ex2_ind C -(\lambda (e: C).(drop i O c e)) (\lambda (e: C).(clear e (CHead d (Bind b) -u))) (getl i (CTail k v c) (CHead (CTail k v d) (Bind b) u)) (\lambda (x: -C).(\lambda (H1: (drop i O c x)).(\lambda (H2: (clear x (CHead d (Bind b) -u))).(getl_intro i (CTail k v c) (CHead (CTail k v d) (Bind b) u) (CTail k v -x) (drop_ctail c x O i H1 k v) (clear_ctail b x d u H2 k v))))) H0))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/iso/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/iso/defs.ma deleted file mode 100644 index 54a5e01fc..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/iso/defs.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -inductive iso: T \to (T \to Prop) \def -| iso_sort: \forall (n1: nat).(\forall (n2: nat).(iso (TSort n1) (TSort n2))) -| iso_lref: \forall (i1: nat).(\forall (i2: nat).(iso (TLRef i1) (TLRef i2))) -| iso_head: \forall (v1: T).(\forall (v2: T).(\forall (t1: T).(\forall (t2: -T).(\forall (k: K).(iso (THead k v1 t1) (THead k v2 t2)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/iso/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/iso/fwd.ma deleted file mode 100644 index fc3550a4c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/iso/fwd.ma +++ /dev/null @@ -1,184 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/iso/defs.ma". - -include "basic_1/tlist/defs.ma". - -implied lemma iso_ind: - \forall (P: ((T \to (T \to Prop)))).(((\forall (n1: nat).(\forall (n2: -nat).(P (TSort n1) (TSort n2))))) \to (((\forall (i1: nat).(\forall (i2: -nat).(P (TLRef i1) (TLRef i2))))) \to (((\forall (v1: T).(\forall (v2: -T).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).(P (THead k v1 t1) -(THead k v2 t2)))))))) \to (\forall (t: T).(\forall (t0: T).((iso t t0) \to -(P t t0))))))) -\def - \lambda (P: ((T \to (T \to Prop)))).(\lambda (f: ((\forall (n1: -nat).(\forall (n2: nat).(P (TSort n1) (TSort n2)))))).(\lambda (f0: ((\forall -(i1: nat).(\forall (i2: nat).(P (TLRef i1) (TLRef i2)))))).(\lambda (f1: -((\forall (v1: T).(\forall (v2: T).(\forall (t1: T).(\forall (t2: T).(\forall -(k: K).(P (THead k v1 t1) (THead k v2 t2))))))))).(\lambda (t: T).(\lambda -(t0: T).(\lambda (i: (iso t t0)).(match i with [(iso_sort x x0) \Rightarrow -(f x x0) | (iso_lref x x0) \Rightarrow (f0 x x0) | (iso_head x x0 x1 x2 x3) -\Rightarrow (f1 x x0 x1 x2 x3)]))))))). - -lemma iso_gen_sort: - \forall (u2: T).(\forall (n1: nat).((iso (TSort n1) u2) \to (ex nat (\lambda -(n2: nat).(eq T u2 (TSort n2)))))) -\def - \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TSort n1) -u2)).(insert_eq T (TSort n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex -nat (\lambda (n2: nat).(eq T u2 (TSort n2))))) (\lambda (y: T).(\lambda (H0: -(iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n1)) -\to (ex nat (\lambda (n2: nat).(eq T t0 (TSort n2))))))) (\lambda (n0: -nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TSort n1))).(let H2 -\def (f_equal T nat (\lambda (e: T).(match e with [(TSort n) \Rightarrow n | -(TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort -n1) H1) in (ex_intro nat (\lambda (n3: nat).(eq T (TSort n2) (TSort n3))) n2 -(refl_equal T (TSort n2))))))) (\lambda (i1: nat).(\lambda (i2: nat).(\lambda -(H1: (eq T (TLRef i1) (TSort n1))).(let H2 \def (eq_ind T (TLRef i1) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -True | (THead _ _ _) \Rightarrow False])) I (TSort n1) H1) in (False_ind (ex -nat (\lambda (n2: nat).(eq T (TLRef i2) (TSort n2)))) H2))))) (\lambda (v1: -T).(\lambda (v2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: -K).(\lambda (H1: (eq T (THead k v1 t1) (TSort n1))).(let H2 \def (eq_ind T -(THead k v1 t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False -| (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort -n1) H1) in (False_ind (ex nat (\lambda (n2: nat).(eq T (THead k v2 t2) (TSort -n2)))) H2)))))))) y u2 H0))) H))). - -lemma iso_gen_lref: - \forall (u2: T).(\forall (n1: nat).((iso (TLRef n1) u2) \to (ex nat (\lambda -(n2: nat).(eq T u2 (TLRef n2)))))) -\def - \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TLRef n1) -u2)).(insert_eq T (TLRef n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex -nat (\lambda (n2: nat).(eq T u2 (TLRef n2))))) (\lambda (y: T).(\lambda (H0: -(iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n1)) -\to (ex nat (\lambda (n2: nat).(eq T t0 (TLRef n2))))))) (\lambda (n0: -nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TLRef n1))).(let H2 -\def (eq_ind T (TSort n0) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (TLRef n1) H1) in (False_ind (ex nat (\lambda (n3: nat).(eq T -(TSort n2) (TLRef n3)))) H2))))) (\lambda (i1: nat).(\lambda (i2: -nat).(\lambda (H1: (eq T (TLRef i1) (TLRef n1))).(let H2 \def (f_equal T nat -(\lambda (e: T).(match e with [(TSort _) \Rightarrow i1 | (TLRef n) -\Rightarrow n | (THead _ _ _) \Rightarrow i1])) (TLRef i1) (TLRef n1) H1) in -(ex_intro nat (\lambda (n2: nat).(eq T (TLRef i2) (TLRef n2))) i2 (refl_equal -T (TLRef i2))))))) (\lambda (v1: T).(\lambda (v2: T).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H1: (eq T (THead k v1 t1) -(TLRef n1))).(let H2 \def (eq_ind T (THead k v1 t1) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ -_ _) \Rightarrow True])) I (TLRef n1) H1) in (False_ind (ex nat (\lambda (n2: -nat).(eq T (THead k v2 t2) (TLRef n2)))) H2)))))))) y u2 H0))) H))). - -lemma iso_gen_head: - \forall (k: K).(\forall (v1: T).(\forall (t1: T).(\forall (u2: T).((iso -(THead k v1 t1) u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2 -(THead k v2 t2))))))))) -\def - \lambda (k: K).(\lambda (v1: T).(\lambda (t1: T).(\lambda (u2: T).(\lambda -(H: (iso (THead k v1 t1) u2)).(insert_eq T (THead k v1 t1) (\lambda (t: -T).(iso t u2)) (\lambda (_: T).(ex_2 T T (\lambda (v2: T).(\lambda (t2: -T).(eq T u2 (THead k v2 t2)))))) (\lambda (y: T).(\lambda (H0: (iso y -u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (THead k v1 t1)) \to -(ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead k v2 t2)))))))) -(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n1) (THead k -v1 t1))).(let H2 \def (eq_ind T (TSort n1) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead k v1 t1) H1) in (False_ind (ex_2 T T (\lambda -(v2: T).(\lambda (t2: T).(eq T (TSort n2) (THead k v2 t2))))) H2))))) -(\lambda (i1: nat).(\lambda (i2: nat).(\lambda (H1: (eq T (TLRef i1) (THead k -v1 t1))).(let H2 \def (eq_ind T (TLRef i1) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (THead k v1 t1) H1) in (False_ind (ex_2 T T (\lambda -(v2: T).(\lambda (t2: T).(eq T (TLRef i2) (THead k v2 t2))))) H2))))) -(\lambda (v0: T).(\lambda (v2: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda -(k0: K).(\lambda (H1: (eq T (THead k0 v0 t0) (THead k v1 t1))).(let H2 \def -(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | (TLRef -_) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 v0 t0) (THead -k v1 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _) -\Rightarrow t])) (THead k0 v0 t0) (THead k v1 t1) H1) in ((let H4 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef -_) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 v0 t0) (THead k -v1 t1) H1) in (\lambda (_: (eq T v0 v1)).(\lambda (H6: (eq K k0 k)).(eq_ind_r -K k (\lambda (k1: K).(ex_2 T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead -k1 v2 t2) (THead k v3 t3)))))) (ex_2_intro T T (\lambda (v3: T).(\lambda (t3: -T).(eq T (THead k v2 t2) (THead k v3 t3)))) v2 t2 (refl_equal T (THead k v2 -t2))) k0 H6)))) H3)) H2)))))))) y u2 H0))) H))))). - -lemma iso_flats_lref_bind_false: - \forall (f: F).(\forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall -(t: T).(\forall (vs: TList).((iso (THeads (Flat f) vs (TLRef i)) (THead (Bind -b) v t)) \to (\forall (P: Prop).P))))))) -\def - \lambda (f: F).(\lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda -(t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads -(Flat f) t0 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) -(\lambda (H: (iso (TLRef i) (THead (Bind b) v t))).(\lambda (P: Prop).(let -H_x \def (iso_gen_lref (THead (Bind b) v t) i H) in (let H0 \def H_x in -(ex_ind nat (\lambda (n2: nat).(eq T (THead (Bind b) v t) (TLRef n2))) P -(\lambda (x: nat).(\lambda (H1: (eq T (THead (Bind b) v t) (TLRef x))).(let -H2 \def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef x) H1) in (False_ind P H2)))) H0))))) (\lambda -(t0: T).(\lambda (t1: TList).(\lambda (_: (((iso (THeads (Flat f) t1 (TLRef -i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso -(THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) (THead (Bind b) v -t))).(\lambda (P: Prop).(let H_x \def (iso_gen_head (Flat f) t0 (THeads (Flat -f) t1 (TLRef i)) (THead (Bind b) v t) H0) in (let H1 \def H_x in (ex_2_ind T -T (\lambda (v2: T).(\lambda (t2: T).(eq T (THead (Bind b) v t) (THead (Flat -f) v2 t2)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T (THead -(Bind b) v t) (THead (Flat f) x0 x1))).(let H3 \def (eq_ind T (THead (Bind b) -v t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat f) x0 x1) -H2) in (False_ind P H3))))) H1)))))))) vs)))))). - -lemma iso_flats_flat_bind_false: - \forall (f1: F).(\forall (f2: F).(\forall (b: B).(\forall (v: T).(\forall -(v2: T).(\forall (t: T).(\forall (t2: T).(\forall (vs: TList).((iso (THeads -(Flat f1) vs (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: -Prop).P))))))))) -\def - \lambda (f1: F).(\lambda (f2: F).(\lambda (b: B).(\lambda (v: T).(\lambda -(v2: T).(\lambda (t: T).(\lambda (t2: T).(\lambda (vs: TList).(TList_ind -(\lambda (t0: TList).((iso (THeads (Flat f1) t0 (THead (Flat f2) v2 t2)) -(THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (THead -(Flat f2) v2 t2) (THead (Bind b) v t))).(\lambda (P: Prop).(let H_x \def -(iso_gen_head (Flat f2) v2 t2 (THead (Bind b) v t) H) in (let H0 \def H_x in -(ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) v t) -(THead (Flat f2) v3 t3)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: -(eq T (THead (Bind b) v t) (THead (Flat f2) x0 x1))).(let H2 \def (eq_ind T -(THead (Bind b) v t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with -[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat -f2) x0 x1) H1) in (False_ind P H2))))) H0))))) (\lambda (t0: T).(\lambda (t1: -TList).(\lambda (_: (((iso (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) -(THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead -(Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) (THead (Bind b) v -t))).(\lambda (P: Prop).(let H_x \def (iso_gen_head (Flat f1) t0 (THeads -(Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t) H0) in (let H1 -\def H_x in (ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead -(Bind b) v t) (THead (Flat f1) v3 t3)))) P (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H2: (eq T (THead (Bind b) v t) (THead (Flat f1) x0 x1))).(let H3 -\def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow -False])])) I (THead (Flat f1) x0 x1) H2) in (False_ind P H3))))) H1)))))))) -vs)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/iso/props.ma b/matita/matita/contribs/lambdadelta/basic_1/iso/props.ma deleted file mode 100644 index baef0f833..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/iso/props.ma +++ /dev/null @@ -1,52 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/fwd.ma". - -include "basic_1/iso/fwd.ma". - -lemma iso_refl: - \forall (t: T).(iso t t) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(iso t0 t0)) (\lambda (n: -nat).(iso_sort n n)) (\lambda (n: nat).(iso_lref n n)) (\lambda (k: -K).(\lambda (t0: T).(\lambda (_: (iso t0 t0)).(\lambda (t1: T).(\lambda (_: -(iso t1 t1)).(iso_head t0 t0 t1 t1 k)))))) t). - -theorem iso_trans: - \forall (t1: T).(\forall (t2: T).((iso t1 t2) \to (\forall (t3: T).((iso t2 -t3) \to (iso t1 t3))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (iso t1 t2)).(iso_ind (\lambda -(t: T).(\lambda (t0: T).(\forall (t3: T).((iso t0 t3) \to (iso t t3))))) -(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (t3: T).(\lambda (H0: (iso -(TSort n2) t3)).(let H_x \def (iso_gen_sort t3 n2 H0) in (let H1 \def H_x in -(ex_ind nat (\lambda (n3: nat).(eq T t3 (TSort n3))) (iso (TSort n1) t3) -(\lambda (x: nat).(\lambda (H2: (eq T t3 (TSort x))).(eq_ind_r T (TSort x) -(\lambda (t: T).(iso (TSort n1) t)) (iso_sort n1 x) t3 H2))) H1))))))) -(\lambda (i1: nat).(\lambda (i2: nat).(\lambda (t3: T).(\lambda (H0: (iso -(TLRef i2) t3)).(let H_x \def (iso_gen_lref t3 i2 H0) in (let H1 \def H_x in -(ex_ind nat (\lambda (n2: nat).(eq T t3 (TLRef n2))) (iso (TLRef i1) t3) -(\lambda (x: nat).(\lambda (H2: (eq T t3 (TLRef x))).(eq_ind_r T (TLRef x) -(\lambda (t: T).(iso (TLRef i1) t)) (iso_lref i1 x) t3 H2))) H1))))))) -(\lambda (v1: T).(\lambda (v2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda -(k: K).(\lambda (t5: T).(\lambda (H0: (iso (THead k v2 t4) t5)).(let H_x \def -(iso_gen_head k v2 t4 t5 H0) in (let H1 \def H_x in (ex_2_ind T T (\lambda -(v3: T).(\lambda (t6: T).(eq T t5 (THead k v3 t6)))) (iso (THead k v1 t3) t5) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T t5 (THead k x0 -x1))).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(iso (THead k v1 t3) t)) -(iso_head v1 x0 t3 x1 k) t5 H2)))) H1)))))))))) t1 t2 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/leq/asucc.ma b/matita/matita/contribs/lambdadelta/basic_1/leq/asucc.ma deleted file mode 100644 index 42005d6ba..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/asucc.ma +++ /dev/null @@ -1,447 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/leq/props.ma". - -lemma asucc_repl: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (leq g -(asucc g a1) (asucc g a2))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 -a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(leq g (asucc g a) (asucc g -a0)))) (\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))).(nat_ind (\lambda (n: nat).((eq A (aplus g (ASort n n1) k) -(aplus g (ASort h2 n2) k)) \to (leq g (match n with [O \Rightarrow (ASort O -(next g n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow -(ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)])))) (\lambda (H1: (eq -A (aplus g (ASort O n1) k) (aplus g (ASort h2 n2) k))).(nat_ind (\lambda (n: -nat).((eq A (aplus g (ASort O n1) k) (aplus g (ASort n n2) k)) \to (leq g -(ASort O (next g n1)) (match n with [O \Rightarrow (ASort O (next g n2)) | (S -h) \Rightarrow (ASort h n2)])))) (\lambda (H2: (eq A (aplus g (ASort O n1) k) -(aplus g (ASort O n2) k))).(leq_sort g O O (next g n1) (next g n2) k (eq_ind -A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O -(next g n2)) k))) (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq -A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort O n2) k) -(\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) -(refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort O n1) k) -H2) (aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k)) (aplus g -(ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))) (\lambda (h3: -nat).(\lambda (_: (((eq A (aplus g (ASort O n1) k) (aplus g (ASort h3 n2) k)) -\to (leq g (ASort O (next g n1)) (match h3 with [O \Rightarrow (ASort O (next -g n2)) | (S h) \Rightarrow (ASort h n2)]))))).(\lambda (H2: (eq A (aplus g -(ASort O n1) k) (aplus g (ASort (S h3) n2) k))).(leq_sort g O h3 (next g n1) -n2 k (eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g -(ASort h3 n2) k))) (eq_ind A (aplus g (ASort (S h3) n2) (S k)) (\lambda (a: -A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort (S h3) -n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort (S h3) n2) -k)))) (refl_equal A (asucc g (aplus g (ASort (S h3) n2) k))) (aplus g (ASort -O n1) k) H2) (aplus g (ASort h3 n2) k) (aplus_sort_S_S_simpl g n2 h3 k)) -(aplus g (ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))))) h2 H1)) -(\lambda (h3: nat).(\lambda (IHh1: (((eq A (aplus g (ASort h3 n1) k) (aplus g -(ASort h2 n2) k)) \to (leq g (match h3 with [O \Rightarrow (ASort O (next g -n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow (ASort -O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))).(\lambda (H1: (eq A -(aplus g (ASort (S h3) n1) k) (aplus g (ASort h2 n2) k))).(nat_ind (\lambda -(n: nat).((eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort n n2) k)) \to -((((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort n n2) k)) \to (leq g -(match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow -(ASort h n1)]) (match n with [O \Rightarrow (ASort O (next g n2)) | (S h) -\Rightarrow (ASort h n2)])))) \to (leq g (ASort h3 n1) (match n with [O -\Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))) -(\lambda (H2: (eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort O n2) -k))).(\lambda (_: (((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort O n2) k)) -\to (leq g (match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) -\Rightarrow (ASort h n1)]) (ASort O (next g n2)))))).(leq_sort g h3 O n1 -(next g n2) k (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq A -(aplus g (ASort h3 n1) k) a)) (eq_ind A (aplus g (ASort (S h3) n1) (S k)) -(\lambda (a: A).(eq A a (aplus g (ASort O n2) (S k)))) (eq_ind_r A (aplus g -(ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O -n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort -(S h3) n1) k) H2) (aplus g (ASort h3 n1) k) (aplus_sort_S_S_simpl g n1 h3 k)) -(aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k))))) (\lambda -(h4: nat).(\lambda (_: (((eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort -h4 n2) k)) \to ((((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort h4 n2) k)) -\to (leq g (match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) -\Rightarrow (ASort h n1)]) (match h4 with [O \Rightarrow (ASort O (next g -n2)) | (S h) \Rightarrow (ASort h n2)])))) \to (leq g (ASort h3 n1) (match h4 -with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h -n2)])))))).(\lambda (H2: (eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort -(S h4) n2) k))).(\lambda (_: (((eq A (aplus g (ASort h3 n1) k) (aplus g -(ASort (S h4) n2) k)) \to (leq g (match h3 with [O \Rightarrow (ASort O (next -g n1)) | (S h) \Rightarrow (ASort h n1)]) (ASort h4 n2))))).(leq_sort g h3 h4 -n1 n2 k (eq_ind A (aplus g (ASort (S h3) n1) (S k)) (\lambda (a: A).(eq A a -(aplus g (ASort h4 n2) k))) (eq_ind A (aplus g (ASort (S h4) n2) (S k)) -(\lambda (a: A).(eq A (aplus g (ASort (S h3) n1) (S k)) a)) (eq_ind_r A -(aplus g (ASort (S h4) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g -(aplus g (ASort (S h4) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S -h4) n2) k))) (aplus g (ASort (S h3) n1) k) H2) (aplus g (ASort h4 n2) k) -(aplus_sort_S_S_simpl g n2 h4 k)) (aplus g (ASort h3 n1) k) -(aplus_sort_S_S_simpl g n1 h3 k))))))) h2 H1 IHh1)))) h1 H0))))))) (\lambda -(a3: A).(\lambda (a4: A).(\lambda (H0: (leq g a3 a4)).(\lambda (_: (leq g -(asucc g a3) (asucc g a4))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: -(leq g a5 a6)).(\lambda (H3: (leq g (asucc g a5) (asucc g a6))).(leq_head g -a3 a4 H0 (asucc g a5) (asucc g a6) H3))))))))) a1 a2 H)))). - -lemma asucc_inj: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (asucc g a1) (asucc -g a2)) \to (leq g a1 a2)))) -\def - \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: -A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2)))) (\lambda (n: -nat).(\lambda (n0: nat).(\lambda (a2: A).(A_ind (\lambda (a: A).((leq g -(asucc g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a))) (\lambda -(n1: nat).(\lambda (n2: nat).(\lambda (H: (leq g (asucc g (ASort n n0)) -(asucc g (ASort n1 n2)))).(nat_ind (\lambda (n3: nat).((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 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 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 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 with [(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 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 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 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 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 with [(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 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 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 -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)) -(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 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 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 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 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 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 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 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 with [(ASort _ _) \Rightarrow (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)). - -lemma leq_asucc: - \forall (g: G).(\forall (a: A).(ex A (\lambda (a0: A).(leq g a (asucc g -a0))))) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(ex A (\lambda (a1: -A).(leq g a0 (asucc g a1))))) (\lambda (n: nat).(\lambda (n0: nat).(ex_intro -A (\lambda (a0: A).(leq g (ASort n n0) (asucc g a0))) (ASort (S n) n0) -(leq_refl g (ASort n n0))))) (\lambda (a0: A).(\lambda (_: (ex A (\lambda -(a1: A).(leq g a0 (asucc g a1))))).(\lambda (a1: A).(\lambda (H0: (ex A -(\lambda (a2: A).(leq g a1 (asucc g a2))))).(let H1 \def H0 in (ex_ind A -(\lambda (a2: A).(leq g a1 (asucc g a2))) (ex A (\lambda (a2: A).(leq g -(AHead a0 a1) (asucc g a2)))) (\lambda (x: A).(\lambda (H2: (leq g a1 (asucc -g x))).(ex_intro A (\lambda (a2: A).(leq g (AHead a0 a1) (asucc g a2))) -(AHead a0 x) (leq_head g a0 a0 (leq_refl g a0) a1 (asucc g x) H2)))) H1)))))) -a)). - -lemma leq_ahead_asucc_false: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (AHead a1 a2) -(asucc g a1)) \to (\forall (P: Prop).P)))) -\def - \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: -A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P)))) (\lambda -(n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead -(ASort n n0) a2) (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) -\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 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 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 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 with [(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 with [(ASort _ _) -\Rightarrow (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)). - -lemma leq_asucc_false: - \forall (g: G).(\forall (a: A).((leq g (asucc g a) a) \to (\forall (P: -Prop).P))) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).((leq g (asucc g a0) -a0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda -(H: (leq g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) -\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 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 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 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 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 with [(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 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 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/matita/matita/contribs/lambdadelta/basic_1/leq/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/leq/defs.ma deleted file mode 100644 index 45a4288aa..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/defs.ma +++ /dev/null @@ -1,26 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/aplus/defs.ma". - -inductive leq (g: G): A \to (A \to Prop) \def -| leq_sort: \forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall -(n2: nat).(\forall (k: nat).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort -h2 n2) k)) \to (leq g (ASort h1 n1) (ASort h2 n2))))))) -| leq_head: \forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall (a3: -A).(\forall (a4: A).((leq g a3 a4) \to (leq g (AHead a1 a3) (AHead a2 -a4))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/leq/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/leq/fwd.ma deleted file mode 100644 index 4fc6915b4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/fwd.ma +++ /dev/null @@ -1,254 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/leq/defs.ma". - -implied rec lemma leq_ind (g: G) (P: (A \to (A \to Prop))) (f: (\forall (h1: -nat).(\forall (h2: nat).(\forall (n1: nat).(\forall (n2: nat).(\forall (k: -nat).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (P -(ASort h1 n1) (ASort h2 n2))))))))) (f0: (\forall (a1: A).(\forall (a2: -A).((leq g a1 a2) \to ((P a1 a2) \to (\forall (a3: A).(\forall (a4: A).((leq -g a3 a4) \to ((P a3 a4) \to (P (AHead a1 a3) (AHead a2 a4))))))))))) (a: A) -(a0: A) (l: leq g a a0) on l: P a a0 \def match l with [(leq_sort h1 h2 n1 n2 -k e) \Rightarrow (f h1 h2 n1 n2 k e) | (leq_head a1 a2 l0 a3 a4 l1) -\Rightarrow (f0 a1 a2 l0 ((leq_ind g P f f0) a1 a2 l0) a3 a4 l1 ((leq_ind g P -f f0) a3 a4 l1))]. - -lemma 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 (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)).(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 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 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 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))))). - -lemma 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 (_: 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 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 -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 -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))))). - -lemma 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 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 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 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))))). - -lemma 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 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 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 -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 -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))))). - -lemma ahead_inj_snd: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a3: A).(\forall -(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 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 -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 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)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/leq/props.ma b/matita/matita/contribs/lambdadelta/basic_1/leq/props.ma deleted file mode 100644 index 6eec6578a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/leq/props.ma +++ /dev/null @@ -1,188 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/leq/fwd.ma". - -include "basic_1/aplus/props.ma". - -lemma leq_refl: - \forall (g: G).(\forall (a: A).(leq g a a)) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(leq g a0 a0)) -(\lambda (n: nat).(\lambda (n0: nat).(leq_sort g n n n0 n0 O (refl_equal A -(aplus g (ASort n n0) O))))) (\lambda (a0: A).(\lambda (H: (leq g a0 -a0)).(\lambda (a1: A).(\lambda (H0: (leq g a1 a1)).(leq_head g a0 a0 H a1 a1 -H0))))) a)). - -lemma leq_eq: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((eq A a1 a2) \to (leq g a1 -a2)))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (eq A a1 -a2)).(eq_ind A a1 (\lambda (a: A).(leq g a1 a)) (leq_refl g a1) a2 H)))). - -lemma leq_sym: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (leq g -a2 a1)))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 -a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(leq g a0 a))) (\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))).(leq_sort g h2 h1 n2 n1 k (sym_eq A (aplus g (ASort h1 n1) k) (aplus g -(ASort h2 n2) k) H0)))))))) (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: -(leq g a3 a4)).(\lambda (H1: (leq g a4 a3)).(\lambda (a5: A).(\lambda (a6: -A).(\lambda (_: (leq g a5 a6)).(\lambda (H3: (leq g a6 a5)).(leq_head g a4 a3 -H1 a6 a5 H3))))))))) a1 a2 H)))). - -theorem leq_trans: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall -(a3: A).((leq g a2 a3) \to (leq g a1 a3)))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 -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 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)))). - -lemma leq_ahead_false_1: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (AHead a1 a2) a1) -\to (\forall (P: Prop).P)))) -\def - \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: -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 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 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 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 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 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 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)). - -lemma leq_ahead_false_2: - \forall (g: G).(\forall (a2: A).(\forall (a1: A).((leq g (AHead a1 a2) a2) -\to (\forall (P: Prop).P)))) -\def - \lambda (g: G).(\lambda (a2: A).(A_ind (\lambda (a: A).(\forall (a1: -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 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 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 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 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 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/matita/matita/contribs/lambdadelta/basic_1/lift/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/lift/defs.ma deleted file mode 100644 index 6c5959228..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/defs.ma +++ /dev/null @@ -1,35 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/tlist/defs.ma". - -include "basic_1/s/defs.ma". - -rec definition lref_map (f: (nat \to nat)) (d: nat) (t: T) on t: T \def match -t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match -(blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u -t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]. - -definition lift: - nat \to (nat \to (T \to T)) -\def - \lambda (h: nat).(\lambda (i: nat).(\lambda (t: T).(lref_map (\lambda (x: -nat).(plus x h)) i t))). - -rec definition lifts (h: nat) (d: nat) (ts: TList) on ts: TList \def match ts -with [TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift h d t) -(lifts h d ts0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/lift/fwd.ma deleted file mode 100644 index beb400a3f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/fwd.ma +++ /dev/null @@ -1,634 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift/props.ma". - -lemma lift_gen_sort: - \forall (h: nat).(\forall (d: nat).(\forall (n: nat).(\forall (t: T).((eq T -(TSort n) (lift h d t)) \to (eq T t (TSort n)))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (t: T).(T_ind -(\lambda (t0: T).((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n)))) -(\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TSort -n0)))).(sym_eq T (TSort n) (TSort n0) H))) (\lambda (n0: nat).(\lambda (H: -(eq T (TSort n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TSort -n)) (\lambda (_: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) -(\lambda (t0: T).(eq T (TSort n) t0)) H (TLRef n0) (lift_lref_lt n0 h d (let -H1 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (lift h d (TLRef n0)) H) in (False_ind (lt n0 d) H1)))) in (let H2 -\def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (TLRef n0) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))) -(\lambda (_: (le d n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda -(t0: T).(eq T (TSort n) t0)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d (let -H1 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (lift h d (TLRef n0)) H) in (False_ind (le d n0) H1)))) in (let H2 -\def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (TLRef (plus n0 h)) H1) in (False_ind (eq T (TLRef n0) (TSort n)) -H2))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TSort n) -(lift h d t0)) \to (eq T t0 (TSort n))))).(\lambda (t1: T).(\lambda (_: (((eq -T (TSort n) (lift h d t1)) \to (eq T t1 (TSort n))))).(\lambda (H1: (eq T -(TSort n) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d -(THead k t0 t1)) (\lambda (t2: T).(eq T (TSort n) t2)) H1 (THead k (lift h d -t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (eq_ind T -(TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow True | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k -(lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (eq T (THead k t0 t1) -(TSort n)) H3))))))))) t)))). - -lemma lift_gen_lref: - \forall (t: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T -(TLRef i) (lift h d t)) \to (or (land (lt i d) (eq T t (TLRef i))) (land (le -(plus d h) i) (eq T t (TLRef (minus i h))))))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(\forall (h: -nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) -(eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i -h)))))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda -(i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TSort n)))).(let H0 \def -(eq_ind T (lift h d (TSort n)) (\lambda (t0: T).(eq T (TLRef i) t0)) H (TSort -n) (lift_sort n h d)) in (let H1 \def (eq_ind T (TLRef i) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (TSort n) H0) in (False_ind (or (land -(lt i d) (eq T (TSort n) (TLRef i))) (land (le (plus d h) i) (eq T (TSort n) -(TLRef (minus i h))))) H1)))))))) (\lambda (n: nat).(\lambda (d: -nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h -d (TLRef n)))).(lt_le_e n d (or (land (lt i d) (eq T (TLRef n) (TLRef i))) -(land (le (plus d h) i) (eq T (TLRef n) (TLRef (minus i h))))) (\lambda (H0: -(lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T -(TLRef i) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (f_equal -T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i | (TLRef n0) -\Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H1) in -(eq_ind_r nat n (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef -n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) -(or_introl (land (lt n d) (eq T (TLRef n) (TLRef n))) (land (le (plus d h) n) -(eq T (TLRef n) (TLRef (minus n h)))) (conj (lt n d) (eq T (TLRef n) (TLRef -n)) H0 (refl_equal T (TLRef n)))) i H2)))) (\lambda (H0: (le d n)).(let H1 -\def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (TLRef i) t0)) H -(TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (f_equal T nat -(\lambda (e: T).(match e with [(TSort _) \Rightarrow i | (TLRef n0) -\Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef (plus n h)) -H1) in (eq_ind_r nat (plus n h) (\lambda (n0: nat).(or (land (lt n0 d) (eq T -(TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus -n0 h)))))) (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt (plus n h) d) (eq -T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T -(TLRef n) (TLRef n0))))) (or_intror (land (lt (plus n h) d) (eq T (TLRef n) -(TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef -n))) (conj (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n)) -(le_plus_plus d n h h H0 (le_n h)) (refl_equal T (TLRef n)))) (minus (plus n -h) h) (minus_plus_r n h)) i H2)))))))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T -(TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land -(le (plus d h) i) (eq T t0 (TLRef (minus i h))))))))))).(\lambda (t1: -T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T -(TLRef i) (lift h d t1)) \to (or (land (lt i d) (eq T t1 (TLRef i))) (land -(le (plus d h) i) (eq T t1 (TLRef (minus i h))))))))))).(\lambda (d: -nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H1: (eq T (TLRef i) (lift -h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) -(\lambda (t2: T).(eq T (TLRef i) t2)) H1 (THead k (lift h d t0) (lift h (s k -d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (eq_ind T (TLRef i) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s -k d) t1)) H2) in (False_ind (or (land (lt i d) (eq T (THead k t0 t1) (TLRef -i))) (land (le (plus d h) i) (eq T (THead k t0 t1) (TLRef (minus i h))))) -H3)))))))))))) t). - -lemma lift_gen_lref_lt: - \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((lt n d) \to (\forall -(t: T).((eq T (TLRef n) (lift h d t)) \to (eq T t (TLRef n))))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt n -d)).(\lambda (t: T).(\lambda (H0: (eq T (TLRef n) (lift h d t))).(let H_x -\def (lift_gen_lref t d h n H0) in (let H1 \def H_x in (or_ind (land (lt n d) -(eq T t (TLRef n))) (land (le (plus d h) n) (eq T t (TLRef (minus n h)))) (eq -T t (TLRef n)) (\lambda (H2: (land (lt n d) (eq T t (TLRef n)))).(land_ind -(lt n d) (eq T t (TLRef n)) (eq T t (TLRef n)) (\lambda (_: (lt n -d)).(\lambda (H4: (eq T t (TLRef n))).(eq_ind_r T (TLRef n) (\lambda (t0: -T).(eq T t0 (TLRef n))) (refl_equal T (TLRef n)) t H4))) H2)) (\lambda (H2: -(land (le (plus d h) n) (eq T t (TLRef (minus n h))))).(land_ind (le (plus d -h) n) (eq T t (TLRef (minus n h))) (eq T t (TLRef n)) (\lambda (H3: (le (plus -d h) n)).(\lambda (H4: (eq T t (TLRef (minus n h)))).(eq_ind_r T (TLRef -(minus n h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (le_false (plus d h) n (eq -T (TLRef (minus n h)) (TLRef n)) H3 (lt_le_S n (plus d h) (le_plus_trans (S -n) d h H))) t H4))) H2)) H1)))))))). - -lemma lift_gen_lref_false: - \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to ((lt n -(plus d h)) \to (\forall (t: T).((eq T (TLRef n) (lift h d t)) \to (\forall -(P: Prop).P))))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d -n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(\lambda (H1: (eq T -(TLRef n) (lift h d t))).(\lambda (P: Prop).(let H_x \def (lift_gen_lref t d -h n H1) in (let H2 \def H_x in (or_ind (land (lt n d) (eq T t (TLRef n))) -(land (le (plus d h) n) (eq T t (TLRef (minus n h)))) P (\lambda (H3: (land -(lt n d) (eq T t (TLRef n)))).(land_ind (lt n d) (eq T t (TLRef n)) P -(\lambda (H4: (lt n d)).(\lambda (_: (eq T t (TLRef n))).(le_false d n P H -H4))) H3)) (\lambda (H3: (land (le (plus d h) n) (eq T t (TLRef (minus n -h))))).(land_ind (le (plus d h) n) (eq T t (TLRef (minus n h))) P (\lambda -(H4: (le (plus d h) n)).(\lambda (_: (eq T t (TLRef (minus n h)))).(le_false -(plus d h) n P H4 H0))) H3)) H2)))))))))). - -lemma lift_gen_lref_ge: - \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to (\forall -(t: T).((eq T (TLRef (plus n h)) (lift h d t)) \to (eq T t (TLRef n))))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d -n)).(\lambda (t: T).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d -t))).(let H_x \def (lift_gen_lref t d h (plus n h) H0) in (let H1 \def H_x in -(or_ind (land (lt (plus n h) d) (eq T t (TLRef (plus n h)))) (land (le (plus -d h) (plus n h)) (eq T t (TLRef (minus (plus n h) h)))) (eq T t (TLRef n)) -(\lambda (H2: (land (lt (plus n h) d) (eq T t (TLRef (plus n h))))).(land_ind -(lt (plus n h) d) (eq T t (TLRef (plus n h))) (eq T t (TLRef n)) (\lambda -(H3: (lt (plus n h) d)).(\lambda (H4: (eq T t (TLRef (plus n h)))).(eq_ind_r -T (TLRef (plus n h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (le_false d n (eq -T (TLRef (plus n h)) (TLRef n)) H (lt_le_S n d (simpl_lt_plus_r h n d -(lt_le_trans (plus n h) d (plus d h) H3 (le_plus_l d h))))) t H4))) H2)) -(\lambda (H2: (land (le (plus d h) (plus n h)) (eq T t (TLRef (minus (plus n -h) h))))).(land_ind (le (plus d h) (plus n h)) (eq T t (TLRef (minus (plus n -h) h))) (eq T t (TLRef n)) (\lambda (_: (le (plus d h) (plus n h))).(\lambda -(H4: (eq T t (TLRef (minus (plus n h) h)))).(eq_ind_r T (TLRef (minus (plus n -h) h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (f_equal nat T TLRef (minus -(plus n h) h) n (minus_plus_r n h)) t H4))) H2)) H1)))))))). - -lemma lift_gen_head: - \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: -nat).(\forall (d: nat).((eq T (THead k u t) (lift h d x)) \to (ex3_2 T T -(\lambda (y: T).(\lambda (z: T).(eq T x (THead k y z)))) (\lambda (y: -T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (s k d) z))))))))))) -\def - \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind -(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) -(lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead -k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda -(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))) (\lambda (n: -nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) -(lift h d (TSort n)))).(let H0 \def (eq_ind T (lift h d (TSort n)) (\lambda -(t0: T).(eq T (THead k u t) t0)) H (TSort n) (lift_sort n h d)) in (let H1 -\def (eq_ind T (THead k u t) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: -T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u -(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) -z))))) H1))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef n)))).(lt_le_e n d -(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: (lt n -d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead -k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (eq_ind T -(THead k u t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) -H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) -(THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) -(\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))) -(\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda -(t0: T).(eq T (THead k u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d -H0)) in (let H2 \def (eq_ind T (THead k u t) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T -(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: -T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (s k d) z))))) H2))))))))) (\lambda (k0: K).(\lambda (t0: -T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) -(lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead -k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda -(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (t1: -T).(\lambda (H0: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) -(lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead -k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda -(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k u t) (lift h d (THead k0 -t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t2: -T).(eq T (THead k u t) t2)) H1 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) -(lift_head k0 t0 t1 h d)) in (let H3 \def (f_equal T K (\lambda (e: T).(match -e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) -\Rightarrow k1])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) -H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t2 _) \Rightarrow t2])) -(THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H5 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | -(TLRef _) \Rightarrow t | (THead _ _ t2) \Rightarrow t2])) (THead k u t) -(THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in (\lambda (H6: (eq T u -(lift h d t0))).(\lambda (H7: (eq K k k0)).(let H8 \def (eq_ind_r K k0 -(\lambda (k1: K).(eq T t (lift h (s k1 d) t1))) H5 k H7) in (eq_ind K k -(\lambda (k1: K).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k1 -t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))) (let H9 -\def (eq_ind T t (\lambda (t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq -T (THead k u t2) (lift h0 d0 t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: -T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h0 -d0 y)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h0 (s k d0) -z))))))))) H0 (lift h (s k d) t1) H8) in (let H10 \def (eq_ind T t (\lambda -(t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq T (THead k u t2) (lift h0 -d0 t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h0 d0 y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t2 (lift h0 (s k d0) z))))))))) H (lift h (s k d) -t1) H8) in (eq_ind_r T (lift h (s k d) t1) (\lambda (t2: T).(ex3_2 T T -(\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead k y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t2 (lift h (s k d) z)))))) (let H11 \def (eq_ind T u -(\lambda (t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq T (THead k t2 -(lift h (s k d) t1)) (lift h0 d0 t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda -(z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 -(lift h0 d0 y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) -(lift h0 (s k d0) z))))))))) H10 (lift h d t0) H6) in (let H12 \def (eq_ind T -u (\lambda (t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq T (THead k t2 -(lift h (s k d) t1)) (lift h0 d0 t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda -(z: T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 -(lift h0 d0 y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) -(lift h0 (s k d0) z))))))))) H9 (lift h d t0) H6) in (eq_ind_r T (lift h d -t0) (\lambda (t2: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead -k t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) (lift h (s k -d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 -t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) -(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) -(lift h (s k d) z)))) t0 t1 (refl_equal T (THead k t0 t1)) (refl_equal T -(lift h d t0)) (refl_equal T (lift h (s k d) t1))) u H6))) t H8))) k0 H7))))) -H4)) H3))))))))))) x)))). - -lemma lift_gen_bind: - \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: -nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d x)) \to (ex3_2 T -T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda -(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (S d) z))))))))))) -\def - \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d -x))).(let H_x \def (lift_gen_head (Bind b) u t x h d H) in (let H0 \def H_x -in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (S d) z)))) (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda -(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift -h (S d) z))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: (eq T x (THead -(Bind b) x0 x1))).(\lambda (H2: (eq T u (lift h d x0))).(\lambda (H3: (eq T t -(lift h (S d) x1))).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: -T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (S d) z)))))) (eq_ind_r T (lift h (S d) -x1) (\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead -(Bind b) x0 x1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T -u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t0 (lift h (S d) -z)))))) (eq_ind_r T (lift h d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T (THead (Bind b) x0 x1) (THead (Bind b) y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T t0 (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T (lift h (S d) x1) (lift h (S d) z)))))) (ex3_2_intro -T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) x0 x1) (THead (Bind -b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d x0) (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (S d) x1) (lift h (S d) -z)))) x0 x1 (refl_equal T (THead (Bind b) x0 x1)) (refl_equal T (lift h d -x0)) (refl_equal T (lift h (S d) x1))) u H2) t H3) x H1)))))) H0))))))))). - -lemma lift_gen_flat: - \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: -nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d x)) \to (ex3_2 T -T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda -(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h d z))))))))))) -\def - \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d -x))).(let H_x \def (lift_gen_head (Flat f) u t x h d H) in (let H0 \def H_x -in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z)))) (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: T).(\lambda -(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift -h d z))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: (eq T x (THead -(Flat f) x0 x1))).(\lambda (H2: (eq T u (lift h d x0))).(\lambda (H3: (eq T t -(lift h d x1))).(eq_ind_r T (THead (Flat f) x0 x1) (\lambda (t0: T).(ex3_2 T -T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda -(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h d z)))))) (eq_ind_r T (lift h d x1) (\lambda (t0: -T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) x0 x1) -(THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t0 (lift h d z)))))) (eq_ind_r T -(lift h d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq -T (THead (Flat f) x0 x1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: -T).(eq T t0 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h d -x1) (lift h d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T -(THead (Flat f) x0 x1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: -T).(eq T (lift h d x0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T -(lift h d x1) (lift h d z)))) x0 x1 (refl_equal T (THead (Flat f) x0 x1)) -(refl_equal T (lift h d x0)) (refl_equal T (lift h d x1))) u H2) t H3) x -H1)))))) H0))))))))). - -lemma lift_inj: - \forall (x: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T -(lift h d x) (lift h d t)) \to (eq T x t))))) -\def - \lambda (x: T).(T_ind (\lambda (t: T).(\forall (t0: T).(\forall (h: -nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to (eq T t -t0)))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (eq T (lift h d (TSort n)) (lift h d t))).(let H0 \def -(eq_ind T (lift h d (TSort n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H -(TSort n) (lift_sort n h d)) in (sym_eq T t (TSort n) (lift_gen_sort h d n t -H0)))))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (eq T (lift h d (TLRef n)) (lift h d t))).(lt_le_e n d (eq -T (TLRef n) t) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d -(TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef n) (lift_lref_lt -n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_lt h d n (lt_le_trans n d -d H0 (le_n d)) t H1)))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift -h d (TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef (plus n h)) -(lift_lref_ge n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_ge h d n H0 -t H1)))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: -T).(((\forall (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) -(lift h d t0)) \to (eq T t t0)))))) \to (\forall (t0: T).(((\forall (t1: -T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t1)) -\to (eq T t0 t1)))))) \to (\forall (t1: T).(\forall (h: nat).(\forall (d: -nat).((eq T (lift h d (THead k0 t t0)) (lift h d t1)) \to (eq T (THead k0 t -t0) t1)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H: ((\forall (t0: -T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to -(eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t1: T).(\forall -(h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t1)) \to (eq T t0 -t1))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: -(eq T (lift h d (THead (Bind b) t t0)) (lift h d t1))).(let H2 \def (eq_ind T -(lift h d (THead (Bind b) t t0)) (\lambda (t2: T).(eq T t2 (lift h d t1))) H1 -(THead (Bind b) (lift h d t) (lift h (S d) t0)) (lift_bind b t t0 h d)) in -(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Bind b) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t) (lift h d y)))) -(\lambda (_: T).(\lambda (z: T).(eq T (lift h (S d) t0) (lift h (S d) z)))) -(eq T (THead (Bind b) t t0) t1) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(H3: (eq T t1 (THead (Bind b) x0 x1))).(\lambda (H4: (eq T (lift h d t) (lift -h d x0))).(\lambda (H5: (eq T (lift h (S d) t0) (lift h (S d) x1))).(eq_ind_r -T (THead (Bind b) x0 x1) (\lambda (t2: T).(eq T (THead (Bind b) t t0) t2)) -(sym_eq T (THead (Bind b) x0 x1) (THead (Bind b) t t0) (sym_eq T (THead (Bind -b) t t0) (THead (Bind b) x0 x1) (f_equal3 K T T T THead (Bind b) (Bind b) t -x0 t0 x1 (refl_equal K (Bind b)) (H x0 h d H4) (H0 x1 h (S d) H5)))) t1 -H3)))))) (lift_gen_bind b (lift h d t) (lift h (S d) t0) t1 h d -H2)))))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H: ((\forall (t0: -T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to -(eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t1: T).(\forall -(h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t1)) \to (eq T t0 -t1))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: -(eq T (lift h d (THead (Flat f) t t0)) (lift h d t1))).(let H2 \def (eq_ind T -(lift h d (THead (Flat f) t t0)) (\lambda (t2: T).(eq T t2 (lift h d t1))) H1 -(THead (Flat f) (lift h d t) (lift h d t0)) (lift_flat f t t0 h d)) in -(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat f) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t) (lift h d y)))) -(\lambda (_: T).(\lambda (z: T).(eq T (lift h d t0) (lift h d z)))) (eq T -(THead (Flat f) t t0) t1) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq -T t1 (THead (Flat f) x0 x1))).(\lambda (H4: (eq T (lift h d t) (lift h d -x0))).(\lambda (H5: (eq T (lift h d t0) (lift h d x1))).(eq_ind_r T (THead -(Flat f) x0 x1) (\lambda (t2: T).(eq T (THead (Flat f) t t0) t2)) (sym_eq T -(THead (Flat f) x0 x1) (THead (Flat f) t t0) (sym_eq T (THead (Flat f) t t0) -(THead (Flat f) x0 x1) (f_equal3 K T T T THead (Flat f) (Flat f) t x0 t0 x1 -(refl_equal K (Flat f)) (H x0 h d H4) (H0 x1 h d H5)))) t1 H3)))))) -(lift_gen_flat f (lift h d t) (lift h d t0) t1 h d H2)))))))))))) k)) x). - -lemma lift_gen_lift: - \forall (t1: T).(\forall (x: T).(\forall (h1: nat).(\forall (h2: -nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 -t1) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 -t2))) (\lambda (t2: T).(eq T t1 (lift h2 d2 t2))))))))))) -\def - \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: T).(\forall (h1: -nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to -((eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: -T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 -t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (h1: nat).(\lambda -(h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (_: (le d1 -d2)).(\lambda (H0: (eq T (lift h1 d1 (TSort n)) (lift h2 (plus d2 h1) -x))).(let H1 \def (eq_ind T (lift h1 d1 (TSort n)) (\lambda (t: T).(eq T t -(lift h2 (plus d2 h1) x))) H0 (TSort n) (lift_sort n h1 d1)) in (eq_ind_r T -(TSort n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) -(\lambda (t2: T).(eq T (TSort n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda -(t2: T).(eq T (TSort n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TSort n) -(lift h2 d2 t2))) (TSort n) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T -(TSort n) t)) (refl_equal T (TSort n)) (lift h1 d1 (TSort n)) (lift_sort n h1 -d1)) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T -(TSort n)) (lift h2 d2 (TSort n)) (lift_sort n h2 d2))) x (lift_gen_sort h2 -(plus d2 h1) n x H1))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda -(h1: nat).(\lambda (h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda -(H: (le d1 d2)).(\lambda (H0: (eq T (lift h1 d1 (TLRef n)) (lift h2 (plus d2 -h1) x))).(lt_le_e n d1 (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) -(\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) (\lambda (H1: (lt n -d1)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) (\lambda (t: T).(eq T t -(lift h2 (plus d2 h1) x))) H0 (TLRef n) (lift_lref_lt n h1 d1 H1)) in -(eq_ind_r T (TLRef n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift -h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) (ex_intro2 T -(\lambda (t2: T).(eq T (TLRef n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T -(TLRef n) (lift h2 d2 t2))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t: -T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) (lift h1 d1 (TLRef n)) -(lift_lref_lt n h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef -n) t)) (refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 -(lt_le_trans n d1 d2 H1 H)))) x (lift_gen_lref_lt h2 (plus d2 h1) n -(lt_le_trans n d1 (plus d2 h1) H1 (le_plus_trans d1 d2 h1 H)) x H2)))) -(\lambda (H1: (le d1 n)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) -(\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H0 (TLRef (plus n h1)) -(lift_lref_ge n h1 d1 H1)) in (lt_le_e n d2 (ex2 T (\lambda (t2: T).(eq T x -(lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) -(\lambda (H3: (lt n d2)).(eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(ex2 -T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) -(lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq T (TLRef (plus n h1)) -(lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef -n) (eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(eq T (TLRef (plus n h1)) -t)) (refl_equal T (TLRef (plus n h1))) (lift h1 d1 (TLRef n)) (lift_lref_ge n -h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) -(refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 H3))) x -(lift_gen_lref_lt h2 (plus d2 h1) (plus n h1) (lt_reg_r n d2 h1 H3) x H2))) -(\lambda (H3: (le d2 n)).(lt_le_e n (plus d2 h2) (ex2 T (\lambda (t2: T).(eq -T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) -(\lambda (H4: (lt n (plus d2 h2))).(lift_gen_lref_false h2 (plus d2 h1) (plus -n h1) (le_plus_plus d2 n h1 h1 H3 (le_n h1)) (eq_ind_r nat (plus (plus d2 h2) -h1) (\lambda (n0: nat).(lt (plus n h1) n0)) (lt_reg_r n (plus d2 h2) h1 H4) -(plus (plus d2 h1) h2) (plus_permute_2_in_3 d2 h1 h2)) x H2 (ex2 T (\lambda -(t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 -d2 t2)))))) (\lambda (H4: (le (plus d2 h2) n)).(let H5 \def (eq_ind nat (plus -n h1) (\lambda (n0: nat).(eq T (TLRef n0) (lift h2 (plus d2 h1) x))) H2 (plus -(minus (plus n h1) h2) h2) (le_plus_minus_sym h2 (plus n h1) (le_plus_trans -h2 n h1 (le_trans h2 (plus d2 h2) n (le_plus_r d2 h2) H4)))) in (eq_ind_r T -(TLRef (minus (plus n h1) h2)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T -t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) -(ex_intro2 T (\lambda (t2: T).(eq T (TLRef (minus (plus n h1) h2)) (lift h1 -d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef (minus n -h2)) (eq_ind_r nat (plus (minus n h2) h1) (\lambda (n0: nat).(eq T (TLRef n0) -(lift h1 d1 (TLRef (minus n h2))))) (eq_ind_r T (TLRef (plus (minus n h2) -h1)) (\lambda (t: T).(eq T (TLRef (plus (minus n h2) h1)) t)) (refl_equal T -(TLRef (plus (minus n h2) h1))) (lift h1 d1 (TLRef (minus n h2))) -(lift_lref_ge (minus n h2) h1 d1 (le_trans d1 d2 (minus n h2) H (le_minus d2 -n h2 H4)))) (minus (plus n h1) h2) (le_minus_plus h2 n (le_trans h2 (plus d2 -h2) n (le_plus_r d2 h2) H4) h1)) (eq_ind_r nat (plus (minus n h2) h2) -(\lambda (n0: nat).(eq T (TLRef n0) (lift h2 d2 (TLRef (minus n0 h2))))) -(eq_ind_r T (TLRef (plus (minus (plus (minus n h2) h2) h2) h2)) (\lambda (t: -T).(eq T (TLRef (plus (minus n h2) h2)) t)) (sym_eq T (TLRef (plus (minus -(plus (minus n h2) h2) h2) h2)) (TLRef (plus (minus n h2) h2)) (f_equal nat T -TLRef (plus (minus (plus (minus n h2) h2) h2) h2) (plus (minus n h2) h2) -(f_equal2 nat nat nat plus (minus (plus (minus n h2) h2) h2) (minus n h2) h2 -h2 (minus_plus_r (minus n h2) h2) (refl_equal nat h2)))) (lift h2 d2 (TLRef -(minus (plus (minus n h2) h2) h2))) (lift_lref_ge (minus (plus (minus n h2) -h2) h2) h2 d2 (le_minus d2 (plus (minus n h2) h2) h2 (le_plus_plus d2 (minus -n h2) h2 h2 (le_minus d2 n h2 H4) (le_n h2))))) n (le_plus_minus_sym h2 n -(le_trans h2 (plus d2 h2) n (le_plus_r d2 h2) H4)))) x (lift_gen_lref_ge h2 -(plus d2 h1) (minus (plus n h1) h2) (arith0 h2 d2 n H4 h1) x -H5)))))))))))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall -(x: T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: -nat).((le d1 d2) \to ((eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 -T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift -h2 d2 t2))))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (x: -T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: -nat).((le d1 d2) \to ((eq T (lift h1 d1 t0) (lift h2 (plus d2 h1) x)) \to -(ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t0 -(lift h2 d2 t2))))))))))))).(\lambda (x: T).(\lambda (h1: nat).(\lambda (h2: -nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (H1: (le d1 d2)).(\lambda -(H2: (eq T (lift h1 d1 (THead k t t0)) (lift h2 (plus d2 h1) x))).(K_ind -(\lambda (k0: K).((eq T (lift h1 d1 (THead k0 t t0)) (lift h2 (plus d2 h1) -x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: -T).(eq T (THead k0 t t0) (lift h2 d2 t2)))))) (\lambda (b: B).(\lambda (H3: -(eq T (lift h1 d1 (THead (Bind b) t t0)) (lift h2 (plus d2 h1) x))).(let H4 -\def (eq_ind T (lift h1 d1 (THead (Bind b) t t0)) (\lambda (t2: T).(eq T t2 -(lift h2 (plus d2 h1) x))) H3 (THead (Bind b) (lift h1 d1 t) (lift h1 (S d1) -t0)) (lift_bind b t t0 h1 d1)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: -T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T -(lift h1 d1 t) (lift h2 (plus d2 h1) y)))) (\lambda (_: T).(\lambda (z: -T).(eq T (lift h1 (S d1) t0) (lift h2 (S (plus d2 h1)) z)))) (ex2 T (\lambda -(t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) t -t0) (lift h2 d2 t2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T -x (THead (Bind b) x0 x1))).(\lambda (H6: (eq T (lift h1 d1 t) (lift h2 (plus -d2 h1) x0))).(\lambda (H7: (eq T (lift h1 (S d1) t0) (lift h2 (S (plus d2 -h1)) x1))).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead -(Bind b) t t0) (lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift -h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 t2))) (ex2 T (\lambda (t2: -T).(eq T (THead (Bind b) x0 x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T -(THead (Bind b) t t0) (lift h2 d2 t2)))) (\lambda (x2: T).(\lambda (H8: (eq T -x0 (lift h1 d1 x2))).(\lambda (H9: (eq T t (lift h2 d2 x2))).(eq_ind_r T -(lift h1 d1 x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind -b) t2 x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) t t0) -(lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 x2) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) x1) (lift h1 d1 t3))) -(\lambda (t3: T).(eq T (THead (Bind b) t2 t0) (lift h2 d2 t3))))) (let H10 -\def (refl_equal nat (plus (S d2) h1)) in (let H11 \def (eq_ind nat (S (plus -d2 h1)) (\lambda (n: nat).(eq T (lift h1 (S d1) t0) (lift h2 n x1))) H7 (plus -(S d2) h1) H10) in (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h1 (S d1) t2))) -(\lambda (t2: T).(eq T t0 (lift h2 (S d2) t2))) (ex2 T (\lambda (t2: T).(eq T -(THead (Bind b) (lift h1 d1 x2) x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T -(THead (Bind b) (lift h2 d2 x2) t0) (lift h2 d2 t2)))) (\lambda (x3: -T).(\lambda (H12: (eq T x1 (lift h1 (S d1) x3))).(\lambda (H13: (eq T t0 -(lift h2 (S d2) x3))).(eq_ind_r T (lift h1 (S d1) x3) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) t2) (lift h1 d1 t3))) -(\lambda (t3: T).(eq T (THead (Bind b) (lift h2 d2 x2) t0) (lift h2 d2 -t3))))) (eq_ind_r T (lift h2 (S d2) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: -T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (lift h1 d1 -t3))) (\lambda (t3: T).(eq T (THead (Bind b) (lift h2 d2 x2) t2) (lift h2 d2 -t3))))) (ex_intro2 T (\lambda (t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) -(lift h1 (S d1) x3)) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) -(lift h2 d2 x2) (lift h2 (S d2) x3)) (lift h2 d2 t2))) (THead (Bind b) x2 x3) -(eq_ind_r T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (\lambda -(t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) t2)) -(refl_equal T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3))) (lift h1 -d1 (THead (Bind b) x2 x3)) (lift_bind b x2 x3 h1 d1)) (eq_ind_r T (THead -(Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) (\lambda (t2: T).(eq T (THead -(Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) t2)) (refl_equal T (THead (Bind -b) (lift h2 d2 x2) (lift h2 (S d2) x3))) (lift h2 d2 (THead (Bind b) x2 x3)) -(lift_bind b x2 x3 h2 d2))) t0 H13) x1 H12)))) (H0 x1 h1 h2 (S d1) (S d2) -(le_n_S d1 d2 H1) H11)))) t H9) x0 H8)))) (H x0 h1 h2 d1 d2 H1 H6)) x -H5)))))) (lift_gen_bind b (lift h1 d1 t) (lift h1 (S d1) t0) x h2 (plus d2 -h1) H4))))) (\lambda (f: F).(\lambda (H3: (eq T (lift h1 d1 (THead (Flat f) t -t0)) (lift h2 (plus d2 h1) x))).(let H4 \def (eq_ind T (lift h1 d1 (THead -(Flat f) t t0)) (\lambda (t2: T).(eq T t2 (lift h2 (plus d2 h1) x))) H3 -(THead (Flat f) (lift h1 d1 t) (lift h1 d1 t0)) (lift_flat f t t0 h1 d1)) in -(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h1 d1 t) (lift h2 (plus d2 -h1) y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h1 d1 t0) (lift h2 -(plus d2 h1) z)))) (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda -(t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H5: (eq T x (THead (Flat f) x0 x1))).(\lambda -(H6: (eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x0))).(\lambda (H7: (eq T -(lift h1 d1 t0) (lift h2 (plus d2 h1) x1))).(eq_ind_r T (THead (Flat f) x0 -x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) -(\lambda (t3: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (ex2_ind T -(\lambda (t2: T).(eq T x0 (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 -d2 t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Flat f) x0 x1) (lift h1 d1 -t2))) (\lambda (t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) -(\lambda (x2: T).(\lambda (H8: (eq T x0 (lift h1 d1 x2))).(\lambda (H9: (eq T -t (lift h2 d2 x2))).(eq_ind_r T (lift h1 d1 x2) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T (THead (Flat f) t2 x1) (lift h1 d1 t3))) (\lambda (t3: -T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 -x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat f) (lift h1 -d1 x2) x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) t2 t0) -(lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h1 d1 t2))) -(\lambda (t2: T).(eq T t0 (lift h2 d2 t2))) (ex2 T (\lambda (t2: T).(eq T -(THead (Flat f) (lift h1 d1 x2) x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T -(THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t2)))) (\lambda (x3: -T).(\lambda (H10: (eq T x1 (lift h1 d1 x3))).(\lambda (H11: (eq T t0 (lift h2 -d2 x3))).(eq_ind_r T (lift h1 d1 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: -T).(eq T (THead (Flat f) (lift h1 d1 x2) t2) (lift h1 d1 t3))) (\lambda (t3: -T).(eq T (THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t3))))) (eq_ind_r T -(lift h2 d2 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat -f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 t3))) (\lambda (t3: T).(eq T -(THead (Flat f) (lift h2 d2 x2) t2) (lift h2 d2 t3))))) (ex_intro2 T (\lambda -(t2: T).(eq T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 -t2))) (\lambda (t2: T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) -(lift h2 d2 t2))) (THead (Flat f) x2 x3) (eq_ind_r T (THead (Flat f) (lift h1 -d1 x2) (lift h1 d1 x3)) (\lambda (t2: T).(eq T (THead (Flat f) (lift h1 d1 -x2) (lift h1 d1 x3)) t2)) (refl_equal T (THead (Flat f) (lift h1 d1 x2) (lift -h1 d1 x3))) (lift h1 d1 (THead (Flat f) x2 x3)) (lift_flat f x2 x3 h1 d1)) -(eq_ind_r T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) (\lambda (t2: -T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) t2)) (refl_equal T -(THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3))) (lift h2 d2 (THead (Flat f) -x2 x3)) (lift_flat f x2 x3 h2 d2))) t0 H11) x1 H10)))) (H0 x1 h1 h2 d1 d2 H1 -H7)) t H9) x0 H8)))) (H x0 h1 h2 d1 d2 H1 H6)) x H5)))))) (lift_gen_flat f -(lift h1 d1 t) (lift h1 d1 t0) x h2 (plus d2 h1) H4))))) k H2))))))))))))) -t1). - -lemma lifts_inj: - \forall (xs: TList).(\forall (ts: TList).(\forall (h: nat).(\forall (d: -nat).((eq TList (lifts h d xs) (lifts h d ts)) \to (eq TList xs ts))))) -\def - \lambda (xs: TList).(TList_ind (\lambda (t: TList).(\forall (ts: -TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h d t) (lifts h -d ts)) \to (eq TList t ts)))))) (\lambda (ts: TList).(TList_ind (\lambda (t: -TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h d TNil) (lifts -h d t)) \to (eq TList TNil t))))) (\lambda (_: nat).(\lambda (_: -nat).(\lambda (_: (eq TList TNil TNil)).(refl_equal TList TNil)))) (\lambda -(t: T).(\lambda (t0: TList).(\lambda (_: ((\forall (h: nat).(\forall (d: -nat).((eq TList TNil (lifts h d t0)) \to (eq TList TNil t0)))))).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H0: (eq TList TNil (TCons (lift h d t) -(lifts h d t0)))).(let H1 \def (eq_ind TList TNil (\lambda (ee: TList).(match -ee with [TNil \Rightarrow True | (TCons _ _) \Rightarrow False])) I (TCons -(lift h d t) (lifts h d t0)) H0) in (False_ind (eq TList TNil (TCons t t0)) -H1)))))))) ts)) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: ((\forall -(ts: TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h d t0) -(lifts h d ts)) \to (eq TList t0 ts))))))).(\lambda (ts: TList).(TList_ind -(\lambda (t1: TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h -d (TCons t t0)) (lifts h d t1)) \to (eq TList (TCons t t0) t1))))) (\lambda -(h: nat).(\lambda (d: nat).(\lambda (H0: (eq TList (TCons (lift h d t) (lifts -h d t0)) TNil)).(let H1 \def (eq_ind TList (TCons (lift h d t) (lifts h d -t0)) (\lambda (ee: TList).(match ee with [TNil \Rightarrow False | (TCons _ -_) \Rightarrow True])) I TNil H0) in (False_ind (eq TList (TCons t t0) TNil) -H1))))) (\lambda (t1: T).(\lambda (t2: TList).(\lambda (_: ((\forall (h: -nat).(\forall (d: nat).((eq TList (TCons (lift h d t) (lifts h d t0)) (lifts -h d t2)) \to (eq TList (TCons t t0) t2)))))).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H1: (eq TList (TCons (lift h d t) (lifts h d t0)) (TCons (lift -h d t1) (lifts h d t2)))).(let H2 \def (f_equal TList T (\lambda (e: -TList).(match e with [TNil \Rightarrow (lref_map (\lambda (x: nat).(plus x -h)) d t) | (TCons t3 _) \Rightarrow t3])) (TCons (lift h d t) (lifts h d t0)) -(TCons (lift h d t1) (lifts h d t2)) H1) in ((let H3 \def (f_equal TList -TList (\lambda (e: TList).(match e with [TNil \Rightarrow (lifts h d t0) | -(TCons _ t3) \Rightarrow t3])) (TCons (lift h d t) (lifts h d t0)) (TCons -(lift h d t1) (lifts h d t2)) H1) in (\lambda (H4: (eq T (lift h d t) (lift h -d t1))).(eq_ind T t (\lambda (t3: T).(eq TList (TCons t t0) (TCons t3 t2))) -(f_equal2 T TList TList TCons t t t0 t2 (refl_equal T t) (H t2 h d H3)) t1 -(lift_inj t t1 h d H4)))) H2)))))))) ts))))) xs). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift/props.ma b/matita/matita/contribs/lambdadelta/basic_1/lift/props.ma deleted file mode 100644 index 610e02018..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/props.ma +++ /dev/null @@ -1,323 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift/defs.ma". - -include "basic_1/s/props.ma". - -include "basic_1/T/fwd.ma". - -lemma lift_sort: - \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (TSort -n)) (TSort n)))) -\def - \lambda (n: nat).(\lambda (_: nat).(\lambda (_: nat).(refl_equal T (TSort -n)))). - -lemma lift_lref_lt: - \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((lt n d) \to (eq T -(lift h d (TLRef n)) (TLRef n))))) -\def - \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (lt n -d)).(eq_ind bool true (\lambda (b: bool).(eq T (TLRef (match b with [true -\Rightarrow n | false \Rightarrow (plus n h)])) (TLRef n))) (refl_equal T -(TLRef n)) (blt n d) (sym_eq bool (blt n d) true (lt_blt d n H)))))). - -lemma lift_lref_ge: - \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((le d n) \to (eq T -(lift h d (TLRef n)) (TLRef (plus n h)))))) -\def - \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (le d -n)).(eq_ind bool false (\lambda (b: bool).(eq T (TLRef (match b with [true -\Rightarrow n | false \Rightarrow (plus n h)])) (TLRef (plus n h)))) -(refl_equal T (TLRef (plus n h))) (blt n d) (sym_eq bool (blt n d) false -(le_bge d n H)))))). - -lemma lift_head: - \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall -(d: nat).(eq T (lift h d (THead k u t)) (THead k (lift h d u) (lift h (s k d) -t))))))) -\def - \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda -(d: nat).(refl_equal T (THead k (lift h d u) (lift h (s k d) t))))))). - -lemma lift_bind: - \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall -(d: nat).(eq T (lift h d (THead (Bind b) u t)) (THead (Bind b) (lift h d u) -(lift h (S d) t))))))) -\def - \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda -(d: nat).(refl_equal T (THead (Bind b) (lift h d u) (lift h (S d) t))))))). - -lemma lift_flat: - \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall -(d: nat).(eq T (lift h d (THead (Flat f) u t)) (THead (Flat f) (lift h d u) -(lift h d t))))))) -\def - \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda -(d: nat).(refl_equal T (THead (Flat f) (lift h d u) (lift h d t))))))). - -lemma thead_x_lift_y_y: - \forall (k: K).(\forall (t: T).(\forall (v: T).(\forall (h: nat).(\forall -(d: nat).((eq T (THead k v (lift h d t)) t) \to (\forall (P: Prop).P)))))) -\def - \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (v: -T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) -\to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TSort n))) -(TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d -(TSort n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) -H) in (False_ind P H0)))))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TLRef n))) -(TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d -(TLRef n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) -H) in (False_ind P H0)))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: -((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift -h d t0)) t0) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (H0: -((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift -h d t1)) t1) \to (\forall (P: Prop).P))))))).(\lambda (v: T).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k v (lift h d (THead k0 t0 -t1))) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K -(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k v (lift h d (THead -k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead -_ t2 _) \Rightarrow t2])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 -t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow (THead k0 (lref_map (\lambda (x: nat).(plus x h)) d -t0) (lref_map (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (TLRef _) -\Rightarrow (THead k0 (lref_map (\lambda (x: nat).(plus x h)) d t0) (lref_map -(\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (THead _ _ t2) \Rightarrow -t2])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in -(\lambda (_: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind K k -(\lambda (k1: K).(\forall (v0: T).(\forall (h0: nat).(\forall (d0: nat).((eq -T (THead k1 v0 (lift h0 d0 t1)) t1) \to (\forall (P0: Prop).P0)))))) H0 k0 -H6) in (let H8 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t2: -T).(eq T t2 t1)) H4 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head -k0 t0 t1 h d)) in (H7 (lift h d t0) h (s k0 d) H8 P)))))) H3)) H2)))))))))))) -t)). - -lemma lift_r: - \forall (t: T).(\forall (d: nat).(eq T (lift O d t) t)) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(eq T (lift O d t0) -t0))) (\lambda (n: nat).(\lambda (_: nat).(refl_equal T (TSort n)))) (\lambda -(n: nat).(\lambda (d: nat).(lt_le_e n d (eq T (lift O d (TLRef n)) (TLRef n)) -(\lambda (H: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef -n))) (refl_equal T (TLRef n)) (lift O d (TLRef n)) (lift_lref_lt n O d H))) -(\lambda (H: (le d n)).(eq_ind_r T (TLRef (plus n O)) (\lambda (t0: T).(eq T -t0 (TLRef n))) (f_equal nat T TLRef (plus n O) n (sym_eq nat n (plus n O) -(plus_n_O n))) (lift O d (TLRef n)) (lift_lref_ge n O d H)))))) (\lambda (k: -K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).(eq T (lift O d t0) -t0)))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(eq T (lift O d t1) -t1)))).(\lambda (d: nat).(eq_ind_r T (THead k (lift O d t0) (lift O (s k d) -t1)) (\lambda (t2: T).(eq T t2 (THead k t0 t1))) (sym_eq T (THead k t0 t1) -(THead k (lift O d t0) (lift O (s k d) t1)) (sym_eq T (THead k (lift O d t0) -(lift O (s k d) t1)) (THead k t0 t1) (f_equal3 K T T T THead k k (lift O d -t0) t0 (lift O (s k d) t1) t1 (refl_equal K k) (H d) (H0 (s k d))))) (lift O -d (THead k t0 t1)) (lift_head k t0 t1 O d)))))))) t). - -lemma lift_lref_gt: - \forall (d: nat).(\forall (n: nat).((lt d n) \to (eq T (lift (S O) d (TLRef -(pred n))) (TLRef n)))) -\def - \lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt d n)).(eq_ind_r T (TLRef -(plus (pred n) (S O))) (\lambda (t: T).(eq T t (TLRef n))) (eq_ind nat (plus -(S O) (pred n)) (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (eq_ind nat n -(\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (refl_equal T (TLRef n)) (S -(pred n)) (S_pred n d H)) (plus (pred n) (S O)) (plus_sym (S O) (pred n))) -(lift (S O) d (TLRef (pred n))) (lift_lref_ge (pred n) (S O) d (le_S_n d -(pred n) (eq_ind nat n (\lambda (n0: nat).(le (S d) n0)) H (S (pred n)) -(S_pred n d H))))))). - -lemma lift_tle: - \forall (t: T).(\forall (h: nat).(\forall (d: nat).(tle t (lift h d t)))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: -nat).(le (tweight t0) (tweight (lift h d t0)))))) (\lambda (_: nat).(\lambda -(_: nat).(\lambda (_: nat).(le_n (S O))))) (\lambda (_: nat).(\lambda (_: -nat).(\lambda (_: nat).(le_n (S O))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(le (tweight t0) -(tweight (lift h d t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: -nat).(\forall (d: nat).(le (tweight t1) (tweight (lift h d t1))))))).(\lambda -(h: nat).(\lambda (d: nat).(let H_y \def (H h d) in (let H_y0 \def (H0 h (s k -d)) in (le_n_S (plus (tweight t0) (tweight t1)) (plus (tweight (lref_map -(\lambda (x: nat).(plus x h)) d t0)) (tweight (lref_map (\lambda (x: -nat).(plus x h)) (s k d) t1))) (le_plus_plus (tweight t0) (tweight (lref_map -(\lambda (x: nat).(plus x h)) d t0)) (tweight t1) (tweight (lref_map (\lambda -(x: nat).(plus x h)) (s k d) t1)) H_y H_y0))))))))))) t). - -lemma lifts_tapp: - \forall (h: nat).(\forall (d: nat).(\forall (v: T).(\forall (vs: TList).(eq -TList (lifts h d (TApp vs v)) (TApp (lifts h d vs) (lift h d v)))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (v: T).(\lambda (vs: -TList).(TList_ind (\lambda (t: TList).(eq TList (lifts h d (TApp t v)) (TApp -(lifts h d t) (lift h d v)))) (refl_equal TList (TCons (lift h d v) TNil)) -(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq TList (lifts h d (TApp -t0 v)) (TApp (lifts h d t0) (lift h d v)))).(eq_ind_r TList (TApp (lifts h d -t0) (lift h d v)) (\lambda (t1: TList).(eq TList (TCons (lift h d t) t1) -(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v))))) (refl_equal TList -(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v)))) (lifts h d (TApp t0 -v)) H)))) vs)))). - -lemma lift_free: - \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: -nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e -(lift h d t)) (lift (plus k h) d t)))))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: -nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to -(eq T (lift k e (lift h d t0)) (lift (plus k h) d t0))))))))) (\lambda (n: -nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: -nat).(\lambda (_: (le e (plus d h))).(\lambda (_: (le d e)).(eq_ind_r T -(TSort n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TSort -n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d -(TSort n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) -(refl_equal T (TSort n)) (lift (plus k h) d (TSort n)) (lift_sort n (plus k -h) d)) (lift k e (TSort n)) (lift_sort n k e)) (lift h d (TSort n)) -(lift_sort n h d))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (k: -nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H: (le e (plus d -h))).(\lambda (H0: (le d e)).(lt_le_e n d (eq T (lift k e (lift h d (TLRef -n))) (lift (plus k h) d (TLRef n))) (\lambda (H1: (lt n d)).(eq_ind_r T -(TLRef n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TLRef -n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d -(TLRef n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) -(refl_equal T (TLRef n)) (lift (plus k h) d (TLRef n)) (lift_lref_lt n (plus -k h) d H1)) (lift k e (TLRef n)) (lift_lref_lt n k e (lt_le_trans n d e H1 -H0))) (lift h d (TLRef n)) (lift_lref_lt n h d H1))) (\lambda (H1: (le d -n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq T (lift k e t0) (lift -(plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus (plus n h) k)) (\lambda -(t0: T).(eq T t0 (lift (plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus n -(plus k h))) (\lambda (t0: T).(eq T (TLRef (plus (plus n h) k)) t0)) (f_equal -nat T TLRef (plus (plus n h) k) (plus n (plus k h)) -(plus_permute_2_in_3_assoc n h k)) (lift (plus k h) d (TLRef n)) -(lift_lref_ge n (plus k h) d H1)) (lift k e (TLRef (plus n h))) (lift_lref_ge -(plus n h) k e (le_trans e (plus d h) (plus n h) H (le_plus_plus d n h h H1 -(le_n h))))) (lift h d (TLRef n)) (lift_lref_ge n h d H1))))))))))) (\lambda -(k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (k0: -nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to -(eq T (lift k0 e (lift h d t0)) (lift (plus k0 h) d t0)))))))))).(\lambda -(t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (k0: nat).(\forall (d: -nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k0 e -(lift h d t1)) (lift (plus k0 h) d t1)))))))))).(\lambda (h: nat).(\lambda -(k0: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e (plus d -h))).(\lambda (H2: (le d e)).(eq_ind_r T (THead k (lift h d t0) (lift h (s k -d) t1)) (\lambda (t2: T).(eq T (lift k0 e t2) (lift (plus k0 h) d (THead k t0 -t1)))) (eq_ind_r T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift -h (s k d) t1))) (\lambda (t2: T).(eq T t2 (lift (plus k0 h) d (THead k t0 -t1)))) (eq_ind_r T (THead k (lift (plus k0 h) d t0) (lift (plus k0 h) (s k d) -t1)) (\lambda (t2: T).(eq T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k -e) (lift h (s k d) t1))) t2)) (f_equal3 K T T T THead k k (lift k0 e (lift h -d t0)) (lift (plus k0 h) d t0) (lift k0 (s k e) (lift h (s k d) t1)) (lift -(plus k0 h) (s k d) t1) (refl_equal K k) (H h k0 d e H1 H2) (H0 h k0 (s k d) -(s k e) (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le (s k e) n)) (s_le -k e (plus d h) H1) (plus (s k d) h) (s_plus k d h)) (s_le k d e H2))) (lift -(plus k0 h) d (THead k t0 t1)) (lift_head k t0 t1 (plus k0 h) d)) (lift k0 e -(THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k (lift h d t0) (lift -h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) (lift_head k t0 t1 h -d))))))))))))) t). - -lemma lift_free_sym: - \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: -nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e -(lift h d t)) (lift (plus h k) d t)))))))) -\def - \lambda (t: T).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: -nat).(\lambda (e: nat).(\lambda (H: (le e (plus d h))).(\lambda (H0: (le d -e)).(eq_ind_r nat (plus k h) (\lambda (n: nat).(eq T (lift k e (lift h d t)) -(lift n d t))) (lift_free t h k d e H H0) (plus h k) (plus_sym h k)))))))). - -lemma lift_d: - \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: -nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t)) -(lift k e (lift h d t)))))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: -nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k -d) (lift k e t0)) (lift k e (lift h d t0))))))))) (\lambda (n: nat).(\lambda -(h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (_: -(le e d)).(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (lift h (plus k d) t0) -(lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq -T t0 (lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: -T).(eq T (TSort n) (lift k e t0))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq -T (TSort n) t0)) (refl_equal T (TSort n)) (lift k e (TSort n)) (lift_sort n k -e)) (lift h d (TSort n)) (lift_sort n h d)) (lift h (plus k d) (TSort n)) -(lift_sort n h (plus k d))) (lift k e (TSort n)) (lift_sort n k e)))))))) -(\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: -nat).(\lambda (e: nat).(\lambda (H: (le e d)).(lt_le_e n e (eq T (lift h -(plus k d) (lift k e (TLRef n))) (lift k e (lift h d (TLRef n)))) (\lambda -(H0: (lt n e)).(let H1 \def (lt_le_trans n e d H0 H) in (eq_ind_r T (TLRef n) -(\lambda (t0: T).(eq T (lift h (plus k d) t0) (lift k e (lift h d (TLRef -n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift k e (lift h d -(TLRef n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) (lift k -e t0))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) -(refl_equal T (TLRef n)) (lift k e (TLRef n)) (lift_lref_lt n k e H0)) (lift -h d (TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus k d) (TLRef n)) -(lift_lref_lt n h (plus k d) (lt_le_trans n d (plus k d) H1 (le_plus_r k -d)))) (lift k e (TLRef n)) (lift_lref_lt n k e H0)))) (\lambda (H0: (le e -n)).(eq_ind_r T (TLRef (plus n k)) (\lambda (t0: T).(eq T (lift h (plus k d) -t0) (lift k e (lift h d (TLRef n))))) (eq_ind_r nat (plus d k) (\lambda (n0: -nat).(eq T (lift h n0 (TLRef (plus n k))) (lift k e (lift h d (TLRef n))))) -(lt_le_e n d (eq T (lift h (plus d k) (TLRef (plus n k))) (lift k e (lift h d -(TLRef n)))) (\lambda (H1: (lt n d)).(eq_ind_r T (TLRef (plus n k)) (\lambda -(t0: T).(eq T t0 (lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef n) -(\lambda (t0: T).(eq T (TLRef (plus n k)) (lift k e t0))) (eq_ind_r T (TLRef -(plus n k)) (\lambda (t0: T).(eq T (TLRef (plus n k)) t0)) (refl_equal T -(TLRef (plus n k))) (lift k e (TLRef n)) (lift_lref_ge n k e H0)) (lift h d -(TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus d k) (TLRef (plus n k))) -(lift_lref_lt (plus n k) h (plus d k) (lt_reg_r n d k H1)))) (\lambda (H1: -(le d n)).(eq_ind_r T (TLRef (plus (plus n k) h)) (\lambda (t0: T).(eq T t0 -(lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef (plus n h)) (\lambda -(t0: T).(eq T (TLRef (plus (plus n k) h)) (lift k e t0))) (eq_ind_r T (TLRef -(plus (plus n h) k)) (\lambda (t0: T).(eq T (TLRef (plus (plus n k) h)) t0)) -(f_equal nat T TLRef (plus (plus n k) h) (plus (plus n h) k) -(plus_permute_2_in_3 n k h)) (lift k e (TLRef (plus n h))) (lift_lref_ge -(plus n h) k e (le_plus_trans e n h H0))) (lift h d (TLRef n)) (lift_lref_ge -n h d H1)) (lift h (plus d k) (TLRef (plus n k))) (lift_lref_ge (plus n k) h -(plus d k) (le_plus_plus d n k k H1 (le_n k)))))) (plus k d) (plus_sym k d)) -(lift k e (TLRef n)) (lift_lref_ge n k e H0)))))))))) (\lambda (k: -K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (k0: -nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k0 -d) (lift k0 e t0)) (lift k0 e (lift h d t0)))))))))).(\lambda (t1: -T).(\lambda (H0: ((\forall (h: nat).(\forall (k0: nat).(\forall (d: -nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k0 d) (lift k0 e -t1)) (lift k0 e (lift h d t1)))))))))).(\lambda (h: nat).(\lambda (k0: -nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e d)).(eq_ind_r T -(THead k (lift k0 e t0) (lift k0 (s k e) t1)) (\lambda (t2: T).(eq T (lift h -(plus k0 d) t2) (lift k0 e (lift h d (THead k t0 t1))))) (eq_ind_r T (THead k -(lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) (lift k0 (s k -e) t1))) (\lambda (t2: T).(eq T t2 (lift k0 e (lift h d (THead k t0 t1))))) -(eq_ind_r T (THead k (lift h d t0) (lift h (s k d) t1)) (\lambda (t2: T).(eq -T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) -(lift k0 (s k e) t1))) (lift k0 e t2))) (eq_ind_r T (THead k (lift k0 e (lift -h d t0)) (lift k0 (s k e) (lift h (s k d) t1))) (\lambda (t2: T).(eq T (THead -k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) (lift k0 (s k -e) t1))) t2)) (eq_ind_r nat (plus k0 (s k d)) (\lambda (n: nat).(eq T (THead -k (lift h (plus k0 d) (lift k0 e t0)) (lift h n (lift k0 (s k e) t1))) (THead -k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h (s k d) t1))))) -(f_equal3 K T T T THead k k (lift h (plus k0 d) (lift k0 e t0)) (lift k0 e -(lift h d t0)) (lift h (plus k0 (s k d)) (lift k0 (s k e) t1)) (lift k0 (s k -e) (lift h (s k d) t1)) (refl_equal K k) (H h k0 d e H1) (H0 h k0 (s k d) (s -k e) (s_le k e d H1))) (s k (plus k0 d)) (s_plus_sym k k0 d)) (lift k0 e -(THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k (lift h d t0) (lift -h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) (lift_head k t0 t1 h d)) -(lift h (plus k0 d) (THead k (lift k0 e t0) (lift k0 (s k e) t1))) (lift_head -k (lift k0 e t0) (lift k0 (s k e) t1) h (plus k0 d))) (lift k0 e (THead k t0 -t1)) (lift_head k t0 t1 k0 e)))))))))))) t). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift/tlt.ma b/matita/matita/contribs/lambdadelta/basic_1/lift/tlt.ma deleted file mode 100644 index 5adcfd6d8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/lift/tlt.ma +++ /dev/null @@ -1,284 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift/props.ma". - -include "basic_1/tlt/props.ma". - -lemma lift_weight_map: - \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to -nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat -(weight_map f (lift h d t)) (weight_map f t)))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: -nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat -(f m) O)))) \to (eq nat (weight_map f (lift h d t0)) (weight_map f t0))))))) -(\lambda (n: nat).(\lambda (_: nat).(\lambda (d: nat).(\lambda (f: ((nat \to -nat))).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (f m) -O))))).(refl_equal nat (weight_map f (TSort n)))))))) (\lambda (n: -nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to -nat))).(\lambda (H: ((\forall (m: nat).((le d m) \to (eq nat (f m) -O))))).(lt_le_e n d (eq nat (weight_map f (lift h d (TLRef n))) (weight_map f -(TLRef n))) (\lambda (H0: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: -T).(eq nat (weight_map f t0) (weight_map f (TLRef n)))) (refl_equal nat -(weight_map f (TLRef n))) (lift h d (TLRef n)) (lift_lref_lt n h d H0))) -(\lambda (H0: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq -nat (weight_map f t0) (weight_map f (TLRef n)))) (eq_ind_r nat O (\lambda -(n0: nat).(eq nat (f (plus n h)) n0)) (H (plus n h) (le_plus_trans d n h H0)) -(f n) (H n H0)) (lift h d (TLRef n)) (lift_lref_ge n h d H0))))))))) (\lambda -(k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (d: -nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat -(f m) O)))) \to (eq nat (weight_map f (lift h d t0)) (weight_map f -t0)))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (d: -nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat -(f m) O)))) \to (eq nat (weight_map f (lift h d t1)) (weight_map f -t1)))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to -nat))).(\lambda (H1: ((\forall (m: nat).((le d m) \to (eq nat (f m) -O))))).(K_ind (\lambda (k0: K).(eq nat (weight_map f (lift h d (THead k0 t0 -t1))) (weight_map f (THead k0 t0 t1)))) (\lambda (b: B).(eq_ind_r T (THead -(Bind b) (lift h d t0) (lift h (s (Bind b) d) t1)) (\lambda (t2: T).(eq nat -(weight_map f t2) (weight_map f (THead (Bind b) t0 t1)))) (B_ind (\lambda -(b0: B).(eq nat (match b0 with [Abbr \Rightarrow (S (plus (weight_map f (lift -h d t0)) (weight_map (wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) -t1)))) | Abst \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map -(wadd f O) (lift h (S d) t1)))) | Void \Rightarrow (S (plus (weight_map f -(lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))))]) (match b0 with -[Abbr \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f (S -(weight_map f t0))) t1))) | Abst \Rightarrow (S (plus (weight_map f t0) -(weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus (weight_map f t0) -(weight_map (wadd f O) t1)))]))) (eq_ind_r nat (weight_map f t0) (\lambda (n: -nat).(eq nat (S (plus n (weight_map (wadd f (S n)) (lift h (S d) t1)))) (S -(plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1))))) -(eq_ind_r nat (weight_map (wadd f (S (weight_map f t0))) t1) (\lambda (n: -nat).(eq nat (S (plus (weight_map f t0) n)) (S (plus (weight_map f t0) -(weight_map (wadd f (S (weight_map f t0))) t1))))) (refl_equal nat (S (plus -(weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1)))) -(weight_map (wadd f (S (weight_map f t0))) (lift h (S d) t1)) (H0 h (S d) -(wadd f (S (weight_map f t0))) (\lambda (m: nat).(\lambda (H2: (le (S d) -m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d -n)) (eq nat (wadd f (S (weight_map f t0)) m) O) (\lambda (x: nat).(\lambda -(H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S x) (\lambda -(n: nat).(eq nat (wadd f (S (weight_map f t0)) n) O)) (H1 x H4) m H3)))) -(le_gen_S d m H2)))))) (weight_map f (lift h d t0)) (H h d f H1)) (eq_ind_r -nat (weight_map (wadd f O) t1) (\lambda (n: nat).(eq nat (S (plus (weight_map -f (lift h d t0)) n)) (S (plus (weight_map f t0) (weight_map (wadd f O) -t1))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map -(wadd f O) t1)) (plus (weight_map f t0) (weight_map (wadd f O) t1)) (f_equal2 -nat nat nat plus (weight_map f (lift h d t0)) (weight_map f t0) (weight_map -(wadd f O) t1) (weight_map (wadd f O) t1) (H h d f H1) (refl_equal nat -(weight_map (wadd f O) t1)))) (weight_map (wadd f O) (lift h (S d) t1)) (H0 h -(S d) (wadd f O) (\lambda (m: nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat -(\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (wadd -f O m) O) (\lambda (x: nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le -d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd f O n) O)) (H1 x -H4) m H3)))) (le_gen_S d m H2)))))) (eq_ind_r nat (weight_map (wadd f O) t1) -(\lambda (n: nat).(eq nat (S (plus (weight_map f (lift h d t0)) n)) (S (plus -(weight_map f t0) (weight_map (wadd f O) t1))))) (f_equal nat nat S (plus -(weight_map f (lift h d t0)) (weight_map (wadd f O) t1)) (plus (weight_map f -t0) (weight_map (wadd f O) t1)) (f_equal2 nat nat nat plus (weight_map f -(lift h d t0)) (weight_map f t0) (weight_map (wadd f O) t1) (weight_map (wadd -f O) t1) (H h d f H1) (refl_equal nat (weight_map (wadd f O) t1)))) -(weight_map (wadd f O) (lift h (S d) t1)) (H0 h (S d) (wadd f O) (\lambda (m: -nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S -n))) (\lambda (n: nat).(le d n)) (eq nat (wadd f O m) O) (\lambda (x: -nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S -x) (\lambda (n: nat).(eq nat (wadd f O n) O)) (H1 x H4) m H3)))) (le_gen_S d -m H2)))))) b) (lift h d (THead (Bind b) t0 t1)) (lift_head (Bind b) t0 t1 h -d))) (\lambda (f0: F).(eq_ind_r T (THead (Flat f0) (lift h d t0) (lift h (s -(Flat f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) (weight_map f -(THead (Flat f0) t0 t1)))) (f_equal nat nat S (plus (weight_map f (lift h d -t0)) (weight_map f (lift h d t1))) (plus (weight_map f t0) (weight_map f t1)) -(f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map f t0) -(weight_map f (lift h d t1)) (weight_map f t1) (H h d f H1) (H0 h d f H1))) -(lift h d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 h d))) -k)))))))))) t). - -lemma lift_weight: - \forall (t: T).(\forall (h: nat).(\forall (d: nat).(eq nat (weight (lift h d -t)) (weight t)))) -\def - \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(lift_weight_map t h d -(\lambda (_: nat).O) (\lambda (m: nat).(\lambda (_: (le d m)).(refl_equal nat -O)))))). - -lemma lift_weight_add: - \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (d: -nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall -(m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to -(((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) \to (eq nat -(weight_map f (lift h d t)) (weight_map g (lift (S h) d t))))))))))) -\def - \lambda (w: nat).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: -nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat -(g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) -\to (eq nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d -t0))))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (m: -nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) -w)).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f -m)))))).(refl_equal nat (weight_map g (lift (S h) d (TSort n)))))))))))) -(\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (m: nat).((lt m -d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) w)).(\lambda (H1: -((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m)))))).(lt_le_e n d -(eq nat (weight_map f (lift h d (TLRef n))) (weight_map g (lift (S h) d -(TLRef n)))) (\lambda (H2: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: -T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) -(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq nat (weight_map f (TLRef n)) -(weight_map g t0))) (sym_eq nat (g n) (f n) (H n H2)) (lift (S h) d (TLRef -n)) (lift_lref_lt n (S h) d H2)) (lift h d (TLRef n)) (lift_lref_lt n h d -H2))) (\lambda (H2: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: -T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) -(eq_ind_r T (TLRef (plus n (S h))) (\lambda (t0: T).(eq nat (weight_map f -(TLRef (plus n h))) (weight_map g t0))) (eq_ind nat (S (plus n h)) (\lambda -(n0: nat).(eq nat (f (plus n h)) (g n0))) (sym_eq nat (g (S (plus n h))) (f -(plus n h)) (H1 (plus n h) (le_plus_trans d n h H2))) (plus n (S h)) -(plus_n_Sm n h)) (lift (S h) d (TLRef n)) (lift_lref_ge n (S h) d H2)) (lift -h d (TLRef n)) (lift_lref_ge n h d H2)))))))))))) (\lambda (k: K).(\lambda -(t0: T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat -\to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to -(eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d -m) \to (eq nat (g (S m)) (f m))))) \to (eq nat (weight_map f (lift h d t0)) -(weight_map g (lift (S h) d t0)))))))))))).(\lambda (t1: T).(\lambda (H0: -((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall -(g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f -m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g -(S m)) (f m))))) \to (eq nat (weight_map f (lift h d t1)) (weight_map g (lift -(S h) d t1)))))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat -\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (m: -nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (H2: (eq nat (g d) -w)).(\lambda (H3: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f -m)))))).(K_ind (\lambda (k0: K).(eq nat (weight_map f (lift h d (THead k0 t0 -t1))) (weight_map g (lift (S h) d (THead k0 t0 t1))))) (\lambda (b: -B).(eq_ind_r T (THead (Bind b) (lift h d t0) (lift h (s (Bind b) d) t1)) -(\lambda (t2: T).(eq nat (weight_map f t2) (weight_map g (lift (S h) d (THead -(Bind b) t0 t1))))) (eq_ind_r T (THead (Bind b) (lift (S h) d t0) (lift (S h) -(s (Bind b) d) t1)) (\lambda (t2: T).(eq nat (weight_map f (THead (Bind b) -(lift h d t0) (lift h (s (Bind b) d) t1))) (weight_map g t2))) (B_ind -(\lambda (b0: B).(eq nat (match b0 with [Abbr \Rightarrow (S (plus -(weight_map f (lift h d t0)) (weight_map (wadd f (S (weight_map f (lift h d -t0)))) (lift h (S d) t1)))) | Abst \Rightarrow (S (plus (weight_map f (lift h -d t0)) (weight_map (wadd f O) (lift h (S d) t1)))) | Void \Rightarrow (S -(plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) -t1))))]) (match b0 with [Abbr \Rightarrow (S (plus (weight_map g (lift (S h) -d t0)) (weight_map (wadd g (S (weight_map g (lift (S h) d t0)))) (lift (S h) -(S d) t1)))) | Abst \Rightarrow (S (plus (weight_map g (lift (S h) d t0)) -(weight_map (wadd g O) (lift (S h) (S d) t1)))) | Void \Rightarrow (S (plus -(weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) -t1))))]))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map -(wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) t1))) (plus -(weight_map g (lift (S h) d t0)) (weight_map (wadd g (S (weight_map g (lift -(S h) d t0)))) (lift (S h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map -f (lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map (wadd f (S -(weight_map f (lift h d t0)))) (lift h (S d) t1)) (weight_map (wadd g (S -(weight_map g (lift (S h) d t0)))) (lift (S h) (S d) t1)) (H h d f g H1 H2 -H3) (H0 h (S d) (wadd f (S (weight_map f (lift h d t0)))) (wadd g (S -(weight_map g (lift (S h) d t0)))) (\lambda (m: nat).(\lambda (H4: (lt m (S -d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) -(\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g (S (weight_map g (lift (S h) d -t0))) m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (H5: (eq nat m -O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g (S (weight_map g (lift -(S h) d t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (f_equal nat -nat S (weight_map g (lift (S h) d t0)) (weight_map f (lift h d t0)) (sym_eq -nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) (H h d f g -H1 H2 H3))) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S -m0))) (\lambda (m0: nat).(lt m0 d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat -m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g (S (weight_map g -(lift (S h) d t0))) m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda -(x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r -nat (S x) (\lambda (n: nat).(eq nat (wadd g (S (weight_map g (lift (S h) d -t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (H1 x H7) m H6)))) -H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) -m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d -n)) (eq nat (g m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (x: -nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S -x) (\lambda (n: nat).(eq nat (g n) (wadd f (S (weight_map f (lift h d t0))) -n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) (f_equal nat nat S (plus -(weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))) (plus -(weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) -t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map g -(lift (S h) d t0)) (weight_map (wadd f O) (lift h (S d) t1)) (weight_map -(wadd g O) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h (S d) (wadd f O) -(wadd g O) (\lambda (m: nat).(\lambda (H4: (lt m (S d))).(or_ind (eq nat m O) -(ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d))) -(eq nat (wadd g O m) (wadd f O m)) (\lambda (H5: (eq nat m O)).(eq_ind_r nat -O (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (refl_equal nat O) m -H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda -(m0: nat).(lt m0 d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat m (S m0))) -(\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g O m) (wadd f O m)) (\lambda (x: -nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r nat (S -x) (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (H1 x H7) m H6)))) -H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) -m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d -n)) (eq nat (g m) (wadd f O m)) (\lambda (x: nat).(\lambda (H5: (eq nat m (S -x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (g -n) (wadd f O n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) (f_equal nat nat -S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) -t1))) (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S -h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) -(weight_map g (lift (S h) d t0)) (weight_map (wadd f O) (lift h (S d) t1)) -(weight_map (wadd g O) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h (S -d) (wadd f O) (wadd g O) (\lambda (m: nat).(\lambda (H4: (lt m (S -d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) -(\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g O m) (wadd f O m)) (\lambda -(H5: (eq nat m O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g O n) -(wadd f O n))) (refl_equal nat O) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: -nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)))).(ex2_ind nat (\lambda -(m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g O -m) (wadd f O m)) (\lambda (x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda -(H7: (lt x d)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd g O n) -(wadd f O n))) (H1 x H7) m H6)))) H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: -nat).(\lambda (H4: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S -n))) (\lambda (n: nat).(le d n)) (eq nat (g m) (wadd f O m)) (\lambda (x: -nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S -x) (\lambda (n: nat).(eq nat (g n) (wadd f O n))) (H3 x H6) m H5)))) -(le_gen_S d m H4))))))) b) (lift (S h) d (THead (Bind b) t0 t1)) (lift_head -(Bind b) t0 t1 (S h) d)) (lift h d (THead (Bind b) t0 t1)) (lift_head (Bind -b) t0 t1 h d))) (\lambda (f0: F).(eq_ind_r T (THead (Flat f0) (lift h d t0) -(lift h (s (Flat f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) -(weight_map g (lift (S h) d (THead (Flat f0) t0 t1))))) (eq_ind_r T (THead -(Flat f0) (lift (S h) d t0) (lift (S h) (s (Flat f0) d) t1)) (\lambda (t2: -T).(eq nat (weight_map f (THead (Flat f0) (lift h d t0) (lift h (s (Flat f0) -d) t1))) (weight_map g t2))) (f_equal nat nat S (plus (weight_map f (lift h d -t0)) (weight_map f (lift h d t1))) (plus (weight_map g (lift (S h) d t0)) -(weight_map g (lift (S h) d t1))) (f_equal2 nat nat nat plus (weight_map f -(lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map f (lift h d t1)) -(weight_map g (lift (S h) d t1)) (H h d f g H1 H2 H3) (H0 h d f g H1 H2 H3))) -(lift (S h) d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 (S h) d)) -(lift h d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 h d))) -k))))))))))))) t)). - -lemma lift_weight_add_O: - \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (f: ((nat \to -nat))).(eq nat (weight_map f (lift h O t)) (weight_map (wadd f w) (lift (S h) -O t)))))) -\def - \lambda (w: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (f: ((nat \to -nat))).(lift_weight_add (minus (wadd f w O) O) t h O f (wadd f w) (\lambda -(m: nat).(\lambda (H: (lt m O)).(lt_x_O m H (eq nat (wadd f w m) (f m))))) -(minus_n_O (wadd f w O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal -nat (f m)))))))). - -lemma lift_tlt_dx: - \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall -(d: nat).(tlt t (THead k u (lift h d t))))))) -\def - \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda -(d: nat).(eq_ind nat (weight (lift h d t)) (\lambda (n: nat).(lt n (weight -(THead k u (lift h d t))))) (tlt_head_dx k u (lift h d t)) (weight t) -(lift_weight t h d)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/lift1/defs.ma deleted file mode 100644 index 4ab258905..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/lift1/defs.ma +++ /dev/null @@ -1,31 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift/defs.ma". - -rec definition trans (hds: PList) on hds: nat \to nat \def \lambda (i: -nat).(match hds with [PNil \Rightarrow i | (PCons h d hds0) \Rightarrow (let -j \def (trans hds0 i) in (match (blt j d) with [true \Rightarrow j | false -\Rightarrow (plus j h)]))]). - -rec definition lift1 (hds: PList) on hds: T \to T \def \lambda (t: T).(match -hds with [PNil \Rightarrow t | (PCons h d hds0) \Rightarrow (lift h d (lift1 -hds0 t))]). - -rec definition lifts1 (hds: PList) (ts: TList) on ts: TList \def match ts -with [TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift1 hds t) -(lifts1 hds ts0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift1/drop1.ma b/matita/matita/contribs/lambdadelta/basic_1/lift1/drop1.ma deleted file mode 100644 index f5839c798..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/lift1/drop1.ma +++ /dev/null @@ -1,127 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift/props.ma". - -include "basic_1/drop1/defs.ma". - -lemma lift1_lift1: - \forall (is1: PList).(\forall (is2: PList).(\forall (t: T).(eq T (lift1 is1 -(lift1 is2 t)) (lift1 (papp is1 is2) t)))) -\def - \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (is2: -PList).(\forall (t: T).(eq T (lift1 p (lift1 is2 t)) (lift1 (papp p is2) -t))))) (\lambda (is2: PList).(\lambda (t: T).(refl_equal T (lift1 is2 t)))) -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: -((\forall (is2: PList).(\forall (t: T).(eq T (lift1 p (lift1 is2 t)) (lift1 -(papp p is2) t)))))).(\lambda (is2: PList).(\lambda (t: T).(f_equal3 nat nat -T T lift n n n0 n0 (lift1 p (lift1 is2 t)) (lift1 (papp p is2) t) (refl_equal -nat n) (refl_equal nat n0) (H is2 t)))))))) is1). - -lemma lift1_xhg: - \forall (hds: PList).(\forall (t: T).(eq T (lift1 (Ss hds) (lift (S O) O t)) -(lift (S O) O (lift1 hds t)))) -\def - \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (t: T).(eq T -(lift1 (Ss p) (lift (S O) O t)) (lift (S O) O (lift1 p t))))) (\lambda (t: -T).(refl_equal T (lift (S O) O t))) (\lambda (h: nat).(\lambda (d: -nat).(\lambda (p: PList).(\lambda (H: ((\forall (t: T).(eq T (lift1 (Ss p) -(lift (S O) O t)) (lift (S O) O (lift1 p t)))))).(\lambda (t: T).(eq_ind_r T -(lift (S O) O (lift1 p t)) (\lambda (t0: T).(eq T (lift h (S d) t0) (lift (S -O) O (lift h d (lift1 p t))))) (eq_ind nat (plus (S O) d) (\lambda (n: -nat).(eq T (lift h n (lift (S O) O (lift1 p t))) (lift (S O) O (lift h d -(lift1 p t))))) (eq_ind_r T (lift (S O) O (lift h d (lift1 p t))) (\lambda -(t0: T).(eq T t0 (lift (S O) O (lift h d (lift1 p t))))) (refl_equal T (lift -(S O) O (lift h d (lift1 p t)))) (lift h (plus (S O) d) (lift (S O) O (lift1 -p t))) (lift_d (lift1 p t) h (S O) d O (le_O_n d))) (S d) (refl_equal nat (S -d))) (lift1 (Ss p) (lift (S O) O t)) (H t))))))) hds). - -lemma lifts1_xhg: - \forall (hds: PList).(\forall (ts: TList).(eq TList (lifts1 (Ss hds) (lifts -(S O) O ts)) (lifts (S O) O (lifts1 hds ts)))) -\def - \lambda (hds: PList).(\lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq -TList (lifts1 (Ss hds) (lifts (S O) O t)) (lifts (S O) O (lifts1 hds t)))) -(refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq -TList (lifts1 (Ss hds) (lifts (S O) O t0)) (lifts (S O) O (lifts1 hds -t0)))).(eq_ind_r T (lift (S O) O (lift1 hds t)) (\lambda (t1: T).(eq TList -(TCons t1 (lifts1 (Ss hds) (lifts (S O) O t0))) (TCons (lift (S O) O (lift1 -hds t)) (lifts (S O) O (lifts1 hds t0))))) (eq_ind_r TList (lifts (S O) O -(lifts1 hds t0)) (\lambda (t1: TList).(eq TList (TCons (lift (S O) O (lift1 -hds t)) t1) (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O (lifts1 hds -t0))))) (refl_equal TList (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O -(lifts1 hds t0)))) (lifts1 (Ss hds) (lifts (S O) O t0)) H) (lift1 (Ss hds) -(lift (S O) O t)) (lift1_xhg hds t))))) ts)). - -lemma lift1_free: - \forall (hds: PList).(\forall (i: nat).(\forall (t: T).(eq T (lift1 hds -(lift (S i) O t)) (lift (S (trans hds i)) O (lift1 (ptrans hds i) t))))) -\def - \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: -nat).(\forall (t: T).(eq T (lift1 p (lift (S i) O t)) (lift (S (trans p i)) O -(lift1 (ptrans p i) t)))))) (\lambda (i: nat).(\lambda (t: T).(refl_equal T -(lift (S i) O t)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: -PList).(\lambda (H: ((\forall (i: nat).(\forall (t: T).(eq T (lift1 hds0 -(lift (S i) O t)) (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) -t))))))).(\lambda (i: nat).(\lambda (t: T).(eq_ind_r T (lift (S (trans hds0 -i)) O (lift1 (ptrans hds0 i) t)) (\lambda (t0: T).(eq T (lift h d t0) (lift -(S (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | -false \Rightarrow (plus (trans hds0 i) h)])) O (lift1 (match (blt (trans hds0 -i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans -hds0 i)) | false \Rightarrow (ptrans hds0 i)]) t)))) (xinduction bool (blt -(trans hds0 i) d) (\lambda (b: bool).(eq T (lift h d (lift (S (trans hds0 i)) -O (lift1 (ptrans hds0 i) t))) (lift (S (match b with [true \Rightarrow (trans -hds0 i) | false \Rightarrow (plus (trans hds0 i) h)])) O (lift1 (match b with -[true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | -false \Rightarrow (ptrans hds0 i)]) t)))) (\lambda (x_x: bool).(bool_ind -(\lambda (b: bool).((eq bool (blt (trans hds0 i) d) b) \to (eq T (lift h d -(lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift (S (match b with -[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) -h)])) O (lift1 (match b with [true \Rightarrow (PCons h (minus d (S (trans -hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) t))))) -(\lambda (H0: (eq bool (blt (trans hds0 i) d) true)).(eq_ind_r nat (plus (S -(trans hds0 i)) (minus d (S (trans hds0 i)))) (\lambda (n: nat).(eq T (lift h -n (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift (S (trans hds0 -i)) O (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) t)))) -(eq_ind_r T (lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) -(lift1 (ptrans hds0 i) t))) (\lambda (t0: T).(eq T t0 (lift (S (trans hds0 -i)) O (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) t)))) -(refl_equal T (lift (S (trans hds0 i)) O (lift1 (PCons h (minus d (S (trans -hds0 i))) (ptrans hds0 i)) t))) (lift h (plus (S (trans hds0 i)) (minus d (S -(trans hds0 i)))) (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) -(lift_d (lift1 (ptrans hds0 i) t) h (S (trans hds0 i)) (minus d (S (trans -hds0 i))) O (le_O_n (minus d (S (trans hds0 i)))))) d (le_plus_minus (S -(trans hds0 i)) d (bge_le (S (trans hds0 i)) d (le_bge (S (trans hds0 i)) d -(lt_le_S (trans hds0 i) d (blt_lt d (trans hds0 i) H0))))))) (\lambda (H0: -(eq bool (blt (trans hds0 i) d) false)).(eq_ind_r T (lift (plus h (S (trans -hds0 i))) O (lift1 (ptrans hds0 i) t)) (\lambda (t0: T).(eq T t0 (lift (S -(plus (trans hds0 i) h)) O (lift1 (ptrans hds0 i) t)))) (eq_ind nat (S (plus -h (trans hds0 i))) (\lambda (n: nat).(eq T (lift n O (lift1 (ptrans hds0 i) -t)) (lift (S (plus (trans hds0 i) h)) O (lift1 (ptrans hds0 i) t)))) -(eq_ind_r nat (plus (trans hds0 i) h) (\lambda (n: nat).(eq T (lift (S n) O -(lift1 (ptrans hds0 i) t)) (lift (S (plus (trans hds0 i) h)) O (lift1 (ptrans -hds0 i) t)))) (refl_equal T (lift (S (plus (trans hds0 i) h)) O (lift1 -(ptrans hds0 i) t))) (plus h (trans hds0 i)) (plus_sym h (trans hds0 i))) -(plus h (S (trans hds0 i))) (plus_n_Sm h (trans hds0 i))) (lift h d (lift (S -(trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift_free (lift1 (ptrans hds0 -i) t) (S (trans hds0 i)) h O d (eq_ind nat (S (plus O (trans hds0 i))) -(\lambda (n: nat).(le d n)) (eq_ind_r nat (plus (trans hds0 i) O) (\lambda -(n: nat).(le d (S n))) (le_S d (plus (trans hds0 i) O) (le_plus_trans d -(trans hds0 i) O (bge_le d (trans hds0 i) H0))) (plus O (trans hds0 i)) -(plus_sym O (trans hds0 i))) (plus O (S (trans hds0 i))) (plus_n_Sm O (trans -hds0 i))) (le_O_n d)))) x_x))) (lift1 hds0 (lift (S i) O t)) (H i t)))))))) -hds). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/lift1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/lift1/props.ma deleted file mode 100644 index 286dfbee3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/lift1/props.ma +++ /dev/null @@ -1,140 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift1/defs.ma". - -include "basic_1/lift/props.ma". - -lemma lift1_sort: - \forall (n: nat).(\forall (is: PList).(eq T (lift1 is (TSort n)) (TSort n))) -\def - \lambda (n: nat).(\lambda (is: PList).(PList_ind (\lambda (p: PList).(eq T -(lift1 p (TSort n)) (TSort n))) (refl_equal T (TSort n)) (\lambda (n0: -nat).(\lambda (n1: nat).(\lambda (p: PList).(\lambda (H: (eq T (lift1 p -(TSort n)) (TSort n))).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (lift n0 -n1 t) (TSort n))) (refl_equal T (TSort n)) (lift1 p (TSort n)) H))))) is)). - -lemma lift1_lref: - \forall (hds: PList).(\forall (i: nat).(eq T (lift1 hds (TLRef i)) (TLRef -(trans hds i)))) -\def - \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: nat).(eq T -(lift1 p (TLRef i)) (TLRef (trans p i))))) (\lambda (i: nat).(refl_equal T -(TLRef i))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda -(H: ((\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef (trans p -i)))))).(\lambda (i: nat).(eq_ind_r T (TLRef (trans p i)) (\lambda (t: T).(eq -T (lift n n0 t) (TLRef (match (blt (trans p i) n0) with [true \Rightarrow -(trans p i) | false \Rightarrow (plus (trans p i) n)])))) (refl_equal T -(TLRef (match (blt (trans p i) n0) with [true \Rightarrow (trans p i) | false -\Rightarrow (plus (trans p i) n)]))) (lift1 p (TLRef i)) (H i))))))) hds). - -lemma lift1_bind: - \forall (b: B).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T -(lift1 hds (THead (Bind b) u t)) (THead (Bind b) (lift1 hds u) (lift1 (Ss -hds) t)))))) -\def - \lambda (b: B).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(u: T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) -(lift1 p u) (lift1 (Ss p) t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal -T (THead (Bind b) u t)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: -PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead -(Bind b) u t)) (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))))))).(\lambda -(u: T).(\lambda (t: T).(eq_ind_r T (THead (Bind b) (lift1 p u) (lift1 (Ss p) -t)) (\lambda (t0: T).(eq T (lift n n0 t0) (THead (Bind b) (lift n n0 (lift1 p -u)) (lift n (S n0) (lift1 (Ss p) t))))) (eq_ind_r T (THead (Bind b) (lift n -n0 (lift1 p u)) (lift n (S n0) (lift1 (Ss p) t))) (\lambda (t0: T).(eq T t0 -(THead (Bind b) (lift n n0 (lift1 p u)) (lift n (S n0) (lift1 (Ss p) t))))) -(refl_equal T (THead (Bind b) (lift n n0 (lift1 p u)) (lift n (S n0) (lift1 -(Ss p) t)))) (lift n n0 (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))) -(lift_bind b (lift1 p u) (lift1 (Ss p) t) n n0)) (lift1 p (THead (Bind b) u -t)) (H u t)))))))) hds)). - -lemma lift1_flat: - \forall (f: F).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T -(lift1 hds (THead (Flat f) u t)) (THead (Flat f) (lift1 hds u) (lift1 hds -t)))))) -\def - \lambda (f: F).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(u: T).(\forall (t: T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) -(lift1 p u) (lift1 p t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal T -(THead (Flat f) u t)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: -PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead -(Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p t))))))).(\lambda (u: -T).(\lambda (t: T).(eq_ind_r T (THead (Flat f) (lift1 p u) (lift1 p t)) -(\lambda (t0: T).(eq T (lift n n0 t0) (THead (Flat f) (lift n n0 (lift1 p u)) -(lift n n0 (lift1 p t))))) (eq_ind_r T (THead (Flat f) (lift n n0 (lift1 p -u)) (lift n n0 (lift1 p t))) (\lambda (t0: T).(eq T t0 (THead (Flat f) (lift -n n0 (lift1 p u)) (lift n n0 (lift1 p t))))) (refl_equal T (THead (Flat f) -(lift n n0 (lift1 p u)) (lift n n0 (lift1 p t)))) (lift n n0 (THead (Flat f) -(lift1 p u) (lift1 p t))) (lift_flat f (lift1 p u) (lift1 p t) n n0)) (lift1 -p (THead (Flat f) u t)) (H u t)))))))) hds)). - -lemma lift1_cons_tail: - \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(eq -T (lift1 (PConsTail hds h d) t) (lift1 hds (lift h d t)))))) -\def - \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (hds: -PList).(PList_ind (\lambda (p: PList).(eq T (lift1 (PConsTail p h d) t) -(lift1 p (lift h d t)))) (refl_equal T (lift h d t)) (\lambda (n: -nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: (eq T (lift1 -(PConsTail p h d) t) (lift1 p (lift h d t)))).(eq_ind_r T (lift1 p (lift h d -t)) (\lambda (t0: T).(eq T (lift n n0 t0) (lift n n0 (lift1 p (lift h d -t))))) (refl_equal T (lift n n0 (lift1 p (lift h d t)))) (lift1 (PConsTail p -h d) t) H))))) hds)))). - -lemma lifts1_flat: - \forall (f: F).(\forall (hds: PList).(\forall (t: T).(\forall (ts: -TList).(eq T (lift1 hds (THeads (Flat f) ts t)) (THeads (Flat f) (lifts1 hds -ts) (lift1 hds t)))))) -\def - \lambda (f: F).(\lambda (hds: PList).(\lambda (t: T).(\lambda (ts: -TList).(TList_ind (\lambda (t0: TList).(eq T (lift1 hds (THeads (Flat f) t0 -t)) (THeads (Flat f) (lifts1 hds t0) (lift1 hds t)))) (refl_equal T (lift1 -hds t)) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: (eq T (lift1 hds -(THeads (Flat f) t1 t)) (THeads (Flat f) (lifts1 hds t1) (lift1 hds -t)))).(eq_ind_r T (THead (Flat f) (lift1 hds t0) (lift1 hds (THeads (Flat f) -t1 t))) (\lambda (t2: T).(eq T t2 (THead (Flat f) (lift1 hds t0) (THeads -(Flat f) (lifts1 hds t1) (lift1 hds t))))) (eq_ind_r T (THeads (Flat f) -(lifts1 hds t1) (lift1 hds t)) (\lambda (t2: T).(eq T (THead (Flat f) (lift1 -hds t0) t2) (THead (Flat f) (lift1 hds t0) (THeads (Flat f) (lifts1 hds t1) -(lift1 hds t))))) (refl_equal T (THead (Flat f) (lift1 hds t0) (THeads (Flat -f) (lifts1 hds t1) (lift1 hds t)))) (lift1 hds (THeads (Flat f) t1 t)) H) -(lift1 hds (THead (Flat f) t0 (THeads (Flat f) t1 t))) (lift1_flat f hds t0 -(THeads (Flat f) t1 t)))))) ts)))). - -lemma lifts1_nil: - \forall (ts: TList).(eq TList (lifts1 PNil ts) ts) -\def - \lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 PNil t) -t)) (refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: -(eq TList (lifts1 PNil t0) t0)).(eq_ind_r TList t0 (\lambda (t1: TList).(eq -TList (TCons t t1) (TCons t t0))) (refl_equal TList (TCons t t0)) (lifts1 -PNil t0) H)))) ts). - -lemma lifts1_cons: - \forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(\forall (ts: -TList).(eq TList (lifts1 (PCons h d hds) ts) (lifts h d (lifts1 hds ts)))))) -\def - \lambda (h: nat).(\lambda (d: nat).(\lambda (hds: PList).(\lambda (ts: -TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 (PCons h d hds) t) -(lifts h d (lifts1 hds t)))) (refl_equal TList TNil) (\lambda (t: T).(\lambda -(t0: TList).(\lambda (H: (eq TList (lifts1 (PCons h d hds) t0) (lifts h d -(lifts1 hds t0)))).(eq_ind_r TList (lifts h d (lifts1 hds t0)) (\lambda (t1: -TList).(eq TList (TCons (lift h d (lift1 hds t)) t1) (TCons (lift h d (lift1 -hds t)) (lifts h d (lifts1 hds t0))))) (refl_equal TList (TCons (lift h d -(lift1 hds t)) (lifts h d (lifts1 hds t0)))) (lifts1 (PCons h d hds) t0) -H)))) ts)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/llt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/llt/defs.ma deleted file mode 100644 index 7d5bc550a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/llt/defs.ma +++ /dev/null @@ -1,27 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/A/defs.ma". - -rec definition lweight (a: A) on a: nat \def match a with [(ASort _ _) -\Rightarrow O | (AHead a1 a2) \Rightarrow (S (plus (lweight a1) (lweight -a2)))]. - -definition llt: - A \to (A \to Prop) -\def - \lambda (a1: A).(\lambda (a2: A).(lt (lweight a1) (lweight a2))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/llt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/llt/fwd.ma deleted file mode 100644 index 8d45d3775..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/llt/fwd.ma +++ /dev/null @@ -1,46 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/llt/defs.ma". - -fact llt_wf__q_ind: - \forall (P: ((A \to Prop))).(((\forall (n: nat).((\lambda (P0: ((A \to -Prop))).(\lambda (n0: nat).(\forall (a: A).((eq nat (lweight a) n0) \to (P0 -a))))) P n))) \to (\forall (a: A).(P a))) -\def - let Q \def (\lambda (P: ((A \to Prop))).(\lambda (n: nat).(\forall (a: -A).((eq nat (lweight a) n) \to (P a))))) in (\lambda (P: ((A \to -Prop))).(\lambda (H: ((\forall (n: nat).(\forall (a: A).((eq nat (lweight a) -n) \to (P a)))))).(\lambda (a: A).(H (lweight a) a (refl_equal nat (lweight -a)))))). - -lemma llt_wf_ind: - \forall (P: ((A \to Prop))).(((\forall (a2: A).(((\forall (a1: A).((llt a1 -a2) \to (P a1)))) \to (P a2)))) \to (\forall (a: A).(P a))) -\def - let Q \def (\lambda (P: ((A \to Prop))).(\lambda (n: nat).(\forall (a: -A).((eq nat (lweight a) n) \to (P a))))) in (\lambda (P: ((A \to -Prop))).(\lambda (H: ((\forall (a2: A).(((\forall (a1: A).((lt (lweight a1) -(lweight a2)) \to (P a1)))) \to (P a2))))).(\lambda (a: A).(llt_wf__q_ind -(\lambda (a0: A).(P a0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (a0: -A).(P a0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) -\to (Q (\lambda (a0: A).(P a0)) m))))).(\lambda (a0: A).(\lambda (H1: (eq nat -(lweight a0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall -(m: nat).((lt m n1) \to (\forall (a1: A).((eq nat (lweight a1) m) \to (P -a1)))))) H0 (lweight a0) H1) in (H a0 (\lambda (a1: A).(\lambda (H3: (lt -(lweight a1) (lweight a0))).(H2 (lweight a1) H3 a1 (refl_equal nat (lweight -a1))))))))))))) a)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/llt/props.ma b/matita/matita/contribs/lambdadelta/basic_1/llt/props.ma deleted file mode 100644 index 0c7cef628..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/llt/props.ma +++ /dev/null @@ -1,65 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/llt/defs.ma". - -include "basic_1/leq/fwd.ma". - -lemma lweight_repl: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (eq nat -(lweight a1) (lweight a2))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 -a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(eq nat (lweight a) (lweight -a0)))) (\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))).(refl_equal nat O))))))) (\lambda (a0: A).(\lambda (a3: -A).(\lambda (_: (leq g a0 a3)).(\lambda (H1: (eq nat (lweight a0) (lweight -a3))).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq g a4 a5)).(\lambda -(H3: (eq nat (lweight a4) (lweight a5))).(f_equal nat nat S (plus (lweight -a0) (lweight a4)) (plus (lweight a3) (lweight a5)) (f_equal2 nat nat nat plus -(lweight a0) (lweight a3) (lweight a4) (lweight a5) H1 H3)))))))))) a1 a2 -H)))). - -lemma llt_repl: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall -(a3: A).((llt a1 a3) \to (llt a2 a3)))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 -a2)).(\lambda (a3: A).(\lambda (H0: (lt (lweight a1) (lweight a3))).(let H1 -\def (eq_ind nat (lweight a1) (\lambda (n: nat).(lt n (lweight a3))) H0 -(lweight a2) (lweight_repl g a1 a2 H)) in H1)))))). - -theorem llt_trans: - \forall (a1: A).(\forall (a2: A).(\forall (a3: A).((llt a1 a2) \to ((llt a2 -a3) \to (llt a1 a3))))) -\def - \lambda (a1: A).(\lambda (a2: A).(\lambda (a3: A).(\lambda (H: (lt (lweight -a1) (lweight a2))).(\lambda (H0: (lt (lweight a2) (lweight a3))).(lt_trans -(lweight a1) (lweight a2) (lweight a3) H H0))))). - -lemma llt_head_sx: - \forall (a1: A).(\forall (a2: A).(llt a1 (AHead a1 a2))) -\def - \lambda (a1: A).(\lambda (a2: A).(le_n_S (lweight a1) (plus (lweight a1) -(lweight a2)) (le_plus_l (lweight a1) (lweight a2)))). - -lemma llt_head_dx: - \forall (a1: A).(\forall (a2: A).(llt a2 (AHead a1 a2))) -\def - \lambda (a1: A).(\lambda (a2: A).(le_n_S (lweight a2) (plus (lweight a1) -(lweight a2)) (le_plus_r (lweight a1) (lweight a2)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/next_plus/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/next_plus/defs.ma deleted file mode 100644 index 04e15b3cc..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/next_plus/defs.ma +++ /dev/null @@ -1,21 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/G/defs.ma". - -rec definition next_plus (g: G) (n: nat) (i: nat) on i: nat \def match i with -[O \Rightarrow n | (S i0) \Rightarrow (next g (next_plus g n i0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/next_plus/props.ma b/matita/matita/contribs/lambdadelta/basic_1/next_plus/props.ma deleted file mode 100644 index 2f42fc60e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/next_plus/props.ma +++ /dev/null @@ -1,59 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/next_plus/defs.ma". - -lemma next_plus_assoc: - \forall (g: G).(\forall (n: nat).(\forall (h1: nat).(\forall (h2: nat).(eq -nat (next_plus g (next_plus g n h1) h2) (next_plus g n (plus h1 h2)))))) -\def - \lambda (g: G).(\lambda (n: nat).(\lambda (h1: nat).(nat_ind (\lambda (n0: -nat).(\forall (h2: nat).(eq nat (next_plus g (next_plus g n n0) h2) -(next_plus g n (plus n0 h2))))) (\lambda (h2: nat).(refl_equal nat (next_plus -g n h2))) (\lambda (n0: nat).(\lambda (_: ((\forall (h2: nat).(eq nat -(next_plus g (next_plus g n n0) h2) (next_plus g n (plus n0 h2)))))).(\lambda -(h2: nat).(nat_ind (\lambda (n1: nat).(eq nat (next_plus g (next g (next_plus -g n n0)) n1) (next g (next_plus g n (plus n0 n1))))) (eq_ind nat n0 (\lambda -(n1: nat).(eq nat (next g (next_plus g n n0)) (next g (next_plus g n n1)))) -(refl_equal nat (next g (next_plus g n n0))) (plus n0 O) (plus_n_O n0)) -(\lambda (n1: nat).(\lambda (H0: (eq nat (next_plus g (next g (next_plus g n -n0)) n1) (next g (next_plus g n (plus n0 n1))))).(eq_ind nat (S (plus n0 n1)) -(\lambda (n2: nat).(eq nat (next g (next_plus g (next g (next_plus g n n0)) -n1)) (next g (next_plus g n n2)))) (f_equal nat nat (next g) (next_plus g -(next g (next_plus g n n0)) n1) (next g (next_plus g n (plus n0 n1))) H0) -(plus n0 (S n1)) (plus_n_Sm n0 n1)))) h2)))) h1))). - -lemma next_plus_next: - \forall (g: G).(\forall (n: nat).(\forall (h: nat).(eq nat (next_plus g -(next g n) h) (next g (next_plus g n h))))) -\def - \lambda (g: G).(\lambda (n: nat).(\lambda (h: nat).(eq_ind_r nat (next_plus -g n (plus (S O) h)) (\lambda (n0: nat).(eq nat n0 (next g (next_plus g n -h)))) (refl_equal nat (next g (next_plus g n h))) (next_plus g (next_plus g n -(S O)) h) (next_plus_assoc g n (S O) h)))). - -lemma next_plus_lt: - \forall (g: G).(\forall (h: nat).(\forall (n: nat).(lt n (next_plus g (next -g n) h)))) -\def - \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (n0: -nat).(lt n0 (next_plus g (next g n0) n)))) (\lambda (n: nat).(next_lt g n)) -(\lambda (n: nat).(\lambda (H: ((\forall (n0: nat).(lt n0 (next_plus g (next -g n0) n))))).(\lambda (n0: nat).(eq_ind nat (next_plus g (next g (next g n0)) -n) (\lambda (n1: nat).(lt n0 n1)) (lt_trans n0 (next g n0) (next_plus g (next -g (next g n0)) n) (next_lt g n0) (H (next g n0))) (next g (next_plus g (next -g n0) n)) (next_plus_next g (next g n0) n))))) h)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/arity.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/arity.ma deleted file mode 100644 index c5b3b0a64..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/arity.ma +++ /dev/null @@ -1,486 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/nf2/fwd.ma". - -include "basic_1/arity/subst0.ma". - -lemma arity_nf2_inv_all: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t -a) \to ((nf2 c t) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t -(THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) -(\lambda (w: T).(\lambda (u: T).(nf2 (CHead c (Bind Abst) w) u)))) (ex nat -(\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: -A).((nf2 c0 t0) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t0 -(THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) -(\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat -(\lambda (n: nat).(eq T t0 (TSort n)))) (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)))))))))) (\lambda (c0: C).(\lambda -(n: nat).(\lambda (_: (nf2 c0 (TSort n))).(or3_intro1 (ex3_2 T T (\lambda (w: -T).(\lambda (u: T).(eq T (TSort n) (THead (Bind Abst) w u)))) (\lambda (w: -T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead -c0 (Bind Abst) w) u)))) (ex nat (\lambda (n0: nat).(eq T (TSort n) (TSort -n0)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (TSort -n) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i))))) (ex_intro nat (\lambda (n0: nat).(eq T (TSort n) (TSort n0))) n -(refl_equal T (TSort n))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) -u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: (((nf2 d u) -\to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (THead (Bind -Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 d w))) (\lambda (w: -T).(\lambda (u0: T).(nf2 (CHead d (Bind Abst) w) u0)))) (ex nat (\lambda (n: -nat).(eq T u (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i0: -nat).(eq T u (THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 d ws))) (\lambda (_: TList).(\lambda (i0: -nat).(nf2 d (TLRef i0))))))))).(\lambda (H3: (nf2 c0 (TLRef -i))).(nf2_gen_lref c0 d u i H0 H3 (or3 (ex3_2 T T (\lambda (w: T).(\lambda -(u0: T).(eq T (TLRef i) (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 (TLRef i) (TSort n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T (TLRef i) (THeads -(Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 -ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 c0 (TLRef -i0)))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: -A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: (((nf2 d u) \to (or3 -(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (THead (Bind Abst) w -u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 d w))) (\lambda (w: T).(\lambda -(u0: T).(nf2 (CHead d (Bind Abst) w) u0)))) (ex nat (\lambda (n: nat).(eq T u -(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T u -(THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 d ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 d (TLRef -i0))))))))).(\lambda (H3: (nf2 c0 (TLRef i))).(or3_intro2 (ex3_2 T T (\lambda -(w: T).(\lambda (u0: T).(eq T (TLRef i) (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 (TLRef i) -(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T -(TLRef i) (THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda -(_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 c0 (TLRef -i0))))) (ex3_2_intro TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T -(TLRef i) (THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda -(_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 c0 (TLRef -i0)))) TNil i (refl_equal T (TLRef i)) I H3))))))))))) (\lambda (b: -B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((nf2 c0 u) -\to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: -nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda -(H3: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (_: (((nf2 (CHead c0 -(Bind b) u) t0) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T t0 -(THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 (CHead c0 -(Bind b) u) w))) (\lambda (w: T).(\lambda (u0: T).(nf2 (CHead (CHead c0 (Bind -b) u) (Bind Abst) w) u0)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort n)))) -(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 -(CHead c0 (Bind b) u) ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 (CHead -c0 (Bind b) u) (TLRef i))))))))).(\lambda (H5: (nf2 c0 (THead (Bind b) u -t0))).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to ((arity g (CHead c0 -(Bind b0) u) t0 a2) \to ((nf2 c0 (THead (Bind b0) u t0)) \to (or3 (ex3_2 T T -(\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind b0) u t0) (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 (Bind b0) u t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T (THead (Bind b0) u t0) (THeads (Flat Appl) ws -(TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda -(_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))))))) (\lambda (_: (not (eq -B Abbr Abst))).(\lambda (_: (arity g (CHead c0 (Bind Abbr) u) t0 -a2)).(\lambda (H8: (nf2 c0 (THead (Bind Abbr) u t0))).(nf2_gen_abbr c0 u t0 -H8 (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind Abbr) -u t0) (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 (Bind Abbr) u t0) (TSort n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind Abbr) u -t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i)))))))))) (\lambda (H6: (not (eq B Abst Abst))).(\lambda (_: (arity g -(CHead c0 (Bind Abst) u) t0 a2)).(\lambda (_: (nf2 c0 (THead (Bind Abst) u -t0))).(let H9 \def (match (H6 (refl_equal B Abst)) in False with []) in -H9)))) (\lambda (_: (not (eq B Void Abst))).(\lambda (H7: (arity g (CHead c0 -(Bind Void) u) t0 a2)).(\lambda (H8: (nf2 c0 (THead (Bind Void) u t0))).(let -H9 \def (arity_gen_cvoid g (CHead c0 (Bind Void) u) t0 a2 H7 c0 u O -(getl_refl Void c0 u)) in (ex_ind T (\lambda (v: T).(eq T t0 (lift (S O) O -v))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind -Void) u t0) (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 (Bind Void) u t0) (TSort n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind Void) u -t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i)))))) (\lambda (x: T).(\lambda (H10: (eq T t0 (lift (S O) O x))).(let H11 -\def (eq_ind T t0 (\lambda (t1: T).(nf2 c0 (THead (Bind Void) u t1))) H8 -(lift (S O) O x) H10) in (eq_ind_r T (lift (S O) O x) (\lambda (t1: T).(or3 -(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind Void) u t1) -(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 (Bind Void) u t1) (TSort n)))) (ex3_2 TList -nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind Void) 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))))))) (nf2_gen_void c0 u x H11 (or3 (ex3_2 T T (\lambda (w: T).(\lambda -(u0: T).(eq T (THead (Bind Void) u (lift (S O) O 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 (Bind Void) u (lift (S O) O x)) (TSort n)))) (ex3_2 TList nat (\lambda -(ws: TList).(\lambda (i: nat).(eq T (THead (Bind Void) u (lift (S O) O x)) -(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i))))))) t0 H10)))) H9))))) b H0 H3 H5))))))))))))) (\lambda (c0: C).(\lambda -(u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda -(_: (((nf2 c0 u) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u -(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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda -(a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a2)).(\lambda (_: -(((nf2 (CHead c0 (Bind Abst) u) t0) \to (or3 (ex3_2 T T (\lambda (w: -T).(\lambda (u0: T).(eq T t0 (THead (Bind Abst) w u0)))) (\lambda (w: -T).(\lambda (_: T).(nf2 (CHead c0 (Bind Abst) u) w))) (\lambda (w: -T).(\lambda (u0: T).(nf2 (CHead (CHead c0 (Bind Abst) u) (Bind Abst) w) -u0)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort n)))) (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 (CHead c0 (Bind Abst) u) -ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 (CHead c0 (Bind Abst) u) -(TLRef i))))))))).(\lambda (H4: (nf2 c0 (THead (Bind Abst) u t0))).(let H5 -\def (nf2_gen_abst c0 u t0 H4) in (land_ind (nf2 c0 u) (nf2 (CHead c0 (Bind -Abst) u) t0) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead -(Bind Abst) u t0) (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 (Bind Abst) u t0) (TSort -n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead -(Bind Abst) u t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c0 (TLRef i)))))) (\lambda (H6: (nf2 c0 u)).(\lambda (H7: (nf2 -(CHead c0 (Bind Abst) u) t0)).(or3_intro0 (ex3_2 T T (\lambda (w: T).(\lambda -(u0: T).(eq T (THead (Bind Abst) u t0) (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 (Bind -Abst) u t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: -nat).(eq T (THead (Bind Abst) u 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_intro T T (\lambda (w: -T).(\lambda (u0: T).(eq T (THead (Bind Abst) u t0) (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))) u t0 (refl_equal T (THead (Bind -Abst) u t0)) H6 H7)))) H5)))))))))))) (\lambda (c0: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((nf2 c0 u) -\to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: -nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda -(H2: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: (((nf2 c0 t0) \to (or3 -(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T t0 (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 -t0 (TSort n)))) (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))))))))).(\lambda (H4: (nf2 c0 (THead (Flat Appl) u t0))).(let H5 \def -(nf2_gen_flat Appl c0 u t0 H4) in (land_ind (nf2 c0 u) (nf2 c0 t0) (or3 -(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) -(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 t0) (TSort n)))) (ex3_2 TList -nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) -(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i)))))) (\lambda (H6: (nf2 c0 u)).(\lambda (H7: (nf2 c0 t0)).(let H_x \def -(H3 H7) in (let H8 \def H_x in (or3_ind (ex3_2 T T (\lambda (w: T).(\lambda -(u0: T).(eq T t0 (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 t0 (TSort n)))) (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))))) (or3 (ex3_2 T T (\lambda (w: -T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) (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 t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) (THeads (Flat Appl) -ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))) (\lambda (H9: -(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T t0 (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))))).(ex3_2_ind T T (\lambda (w: -T).(\lambda (u0: T).(eq T t0 (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))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq -T (THead (Flat Appl) u t0) (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 -t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq -T (THead (Flat Appl) u t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c0 (TLRef i)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: -(eq T t0 (THead (Bind Abst) x0 x1))).(\lambda (_: (nf2 c0 x0)).(\lambda (_: -(nf2 (CHead c0 (Bind Abst) x0) x1)).(let H13 \def (eq_ind T t0 (\lambda (t1: -T).(nf2 c0 (THead (Flat Appl) u t1))) H4 (THead (Bind Abst) x0 x1) H10) in -(let H14 \def (eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a2))) H2 -(THead (Bind Abst) x0 x1) H10) in (eq_ind_r T (THead (Bind Abst) x0 x1) -(\lambda (t1: T).(or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T -(THead (Flat Appl) u t1) (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 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))))))) (nf2_gen_beta c0 u x0 x1 H13 (or3 (ex3_2 T T -(\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u (THead (Bind -Abst) x0 x1)) (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 (THead (Bind -Abst) x0 x1)) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: -nat).(eq T (THead (Flat Appl) u (THead (Bind Abst) x0 x1)) (THeads (Flat -Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))) t0 H10)))))))) -H9)) (\lambda (H9: (ex nat (\lambda (n: nat).(eq T t0 (TSort n))))).(ex_ind -nat (\lambda (n: nat).(eq T t0 (TSort n))) (or3 (ex3_2 T T (\lambda (w: -T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) (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 t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) (THeads (Flat Appl) -ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))) (\lambda (x: -nat).(\lambda (H10: (eq T t0 (TSort x))).(let H11 \def (eq_ind T t0 (\lambda -(t1: T).(nf2 c0 (THead (Flat Appl) u t1))) H4 (TSort x) H10) in (let H12 \def -(eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a2))) H2 (TSort x) -H10) in (eq_ind_r T (TSort x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (w: -T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t1) (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 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 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)))))) (\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 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 (_: -TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))) (or3 (ex3_2 T T (\lambda (w: -T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) (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 t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) (THeads (Flat Appl) -ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))) (\lambda (x0: -TList).(\lambda (x1: nat).(\lambda (H10: (eq T t0 (THeads (Flat Appl) x0 -(TLRef x1)))).(\lambda (H11: (nfs2 c0 x0)).(\lambda (H12: (nf2 c0 (TLRef -x1))).(let H13 \def (eq_ind T t0 (\lambda (t1: T).(nf2 c0 (THead (Flat Appl) -u t1))) H4 (THeads (Flat Appl) x0 (TLRef x1)) H10) in (let H14 \def (eq_ind T -t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a2))) H2 (THeads (Flat Appl) x0 -(TLRef x1)) H10) in (eq_ind_r T (THeads (Flat Appl) x0 (TLRef x1)) (\lambda -(t1: T).(or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat -Appl) u t1) (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 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))))))) (or3_intro2 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead -(Flat Appl) u (THeads (Flat Appl) x0 (TLRef x1))) (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 (THeads (Flat Appl) x0 (TLRef x1))) (TSort n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u -(THeads (Flat Appl) x0 (TLRef x1))) (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_intro TList nat -(\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u (THeads -(Flat Appl) x0 (TLRef x1))) (THeads (Flat Appl) ws (TLRef i))))) (\lambda -(ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c0 (TLRef i)))) (TCons u x0) x1 (refl_equal T (THead (Flat Appl) u -(THeads (Flat Appl) x0 (TLRef x1)))) (conj (nf2 c0 u) (nfs2 c0 x0) H6 H11) -H12)) t0 H10)))))))) H9)) H8))))) H5)))))))))))) (\lambda (c0: C).(\lambda -(u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda -(_: (((nf2 c0 u) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u -(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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda -(_: (arity g c0 t0 a0)).(\lambda (_: (((nf2 c0 t0) \to (or3 (ex3_2 T T -(\lambda (w: T).(\lambda (u0: T).(eq T t0 (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 t0 -(TSort n)))) (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))))))))).(\lambda (H4: (nf2 c0 (THead (Flat Cast) u t0))).(nf2_gen_cast c0 -u t0 H4 (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat -Cast) u t0) (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 Cast) u t0) (TSort n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Cast) u -t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i)))))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda -(_: (arity g c0 t0 a1)).(\lambda (H1: (((nf2 c0 t0) \to (or3 (ex3_2 T T -(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda -(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 -(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort -n)))) (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))))))))).(\lambda (a2: A).(\lambda (_: (leq g a1 a2)).(\lambda (H3: (nf2 c0 -t0)).(let H_x \def (H1 H3) in (let H4 \def H_x in (or3_ind (ex3_2 T T -(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda -(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 -(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort -n)))) (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))))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind -Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: -T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: -nat).(eq T t0 (TSort n)))) (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)))))) (\lambda (H5: (ex3_2 T T (\lambda (w: T).(\lambda -(u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: -T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) -u))))).(ex3_2_ind T T (\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind -Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: -T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u))) (or3 (ex3_2 T T -(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda -(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 -(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort -n)))) (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)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t0 (THead (Bind -Abst) x0 x1))).(\lambda (H7: (nf2 c0 x0)).(\lambda (H8: (nf2 (CHead c0 (Bind -Abst) x0) x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t1: T).(or3 -(ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind Abst) w -u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda -(u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t1 -(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t1 -(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i))))))) (or3_intro0 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T (THead -(Bind Abst) x0 x1) (THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: -T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) -u)))) (ex nat (\lambda (n: nat).(eq T (THead (Bind Abst) x0 x1) (TSort n)))) -(ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind -Abst) x0 x1) (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_intro T T (\lambda (w: T).(\lambda (u: -T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) w u)))) (\lambda (w: -T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead -c0 (Bind Abst) w) u))) x0 x1 (refl_equal T (THead (Bind Abst) x0 x1)) H7 H8)) -t0 H6)))))) H5)) (\lambda (H5: (ex nat (\lambda (n: nat).(eq T t0 (TSort -n))))).(ex_ind nat (\lambda (n: nat).(eq T t0 (TSort n))) (or3 (ex3_2 T T -(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda -(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 -(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort -n)))) (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)))))) (\lambda (x: nat).(\lambda (H6: (eq T t0 (TSort x))).(eq_ind_r T -(TSort x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: -T).(eq T t1 (THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 -c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) -(ex nat (\lambda (n: nat).(eq T t1 (TSort n)))) (ex3_2 TList nat (\lambda -(ws: TList).(\lambda (i: nat).(eq T t1 (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))) (or3_intro1 (ex3_2 T T -(\lambda (w: T).(\lambda (u: T).(eq T (TSort x) (THead (Bind Abst) w u)))) -(\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: -T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T (TSort -x) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T -(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))))) (ex_intro nat (\lambda (n: nat).(eq T (TSort x) (TSort n))) x -(refl_equal T (TSort x)))) t0 H6))) H5)) (\lambda (H5: (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 (_: -TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))) (or3 (ex3_2 T T (\lambda (w: -T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda (w: -T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead -c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort n)))) -(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)))))) (\lambda -(x0: TList).(\lambda (x1: nat).(\lambda (H6: (eq T t0 (THeads (Flat Appl) x0 -(TLRef x1)))).(\lambda (H7: (nfs2 c0 x0)).(\lambda (H8: (nf2 c0 (TLRef -x1))).(eq_ind_r T (THeads (Flat Appl) x0 (TLRef x1)) (\lambda (t1: T).(or3 -(ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind Abst) w -u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda -(u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t1 -(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t1 -(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i))))))) (or3_intro2 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T (THeads -(Flat Appl) x0 (TLRef x1)) (THead (Bind Abst) w u)))) (\lambda (w: -T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead -c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T (THeads (Flat Appl) -x0 (TLRef x1)) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda -(i: nat).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (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_intro TList nat -(\lambda (ws: TList).(\lambda (i: nat).(eq T (THeads (Flat Appl) x0 (TLRef -x1)) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef -i)))) x0 x1 (refl_equal T (THeads (Flat Appl) x0 (TLRef x1))) H7 H8)) t0 -H6)))))) H5)) H4))))))))))) c t a H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/dec.ma deleted file mode 100644 index d7211841f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/dec.ma +++ /dev/null @@ -1,193 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/nf2/defs.ma". - -include "basic_1/pr2/clen.ma". - -include "basic_1/pr0/dec.ma". - -include "basic_1/C/props.ma". - -lemma nf2_dec: - \forall (c: C).(\forall (t1: T).(or (nf2 c t1) (ex2 T (\lambda (t2: T).((eq -T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c t1 t2))))) -\def - \lambda (c: C).(c_tail_ind (\lambda (c0: C).(\forall (t1: T).(or (\forall -(t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 -t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))))) (\lambda -(n: nat).(\lambda (t1: T).(let H_x \def (nf0_dec t1) in (let H \def H_x in -(or_ind (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: -T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2))) -(or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T -(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr2 (CSort n) t1 t2)))) (\lambda (H0: ((\forall (t2: T).((pr0 t1 t2) \to -(eq T t1 t2))))).(or_introl (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T -t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CSort n) t1 t2))) (\lambda (t2: T).(\lambda (H1: (pr2 -(CSort n) t1 t2)).(let H_y \def (pr2_gen_csort t1 t2 n H1) in (H0 t2 -H_y)))))) (\lambda (H0: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)))).(ex2_ind T (\lambda (t2: -T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)) -(or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T -(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr2 (CSort n) t1 t2)))) (\lambda (x: T).(\lambda (H1: (((eq T t1 x) \to -(\forall (P: Prop).P)))).(\lambda (H2: (pr0 t1 x)).(or_intror (\forall (t2: -T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T -t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2))) -(ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CSort n) t1 t2)) x H1 (pr2_free (CSort n) t1 x -H2)))))) H0)) H))))) (\lambda (c0: C).(\lambda (H: ((\forall (t1: T).(or -(\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: -T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 -t2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (t1: T).(let H_x \def (H -t1) in (let H0 \def H_x in (or_ind (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T -t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 c0 t1 t2))) (or (\forall (t2: T).((pr2 (CTail k t c0) -t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (H1: -((\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))))).(K_ind (\lambda (k0: -K).(or (\forall (t2: T).((pr2 (CTail k0 t c0) t1 t2) \to (eq T t1 t2))) (ex2 -T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr2 (CTail k0 t c0) t1 t2))))) (\lambda (b: B).(B_ind (\lambda (b0: -B).(or (\forall (t2: T).((pr2 (CTail (Bind b0) t c0) t1 t2) \to (eq T t1 -t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail (Bind b0) t c0) t1 t2))))) (let H_x0 \def -(dnf_dec t t1 (clen c0)) in (let H2 \def H_x0 in (ex_ind T (\lambda (v: -T).(or (subst0 (clen c0) t t1 (lift (S O) (clen c0) v)) (eq T t1 (lift (S O) -(clen c0) v)))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) -\to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda -(x: T).(\lambda (H3: (or (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq -T t1 (lift (S O) (clen c0) x)))).(or_ind (subst0 (clen c0) t t1 (lift (S O) -(clen c0) x)) (eq T t1 (lift (S O) (clen c0) x)) (or (\forall (t2: T).((pr2 -(CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: -T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail -(Bind Abbr) t c0) t1 t2)))) (\lambda (H4: (subst0 (clen c0) t t1 (lift (S O) -(clen c0) x))).(let H_x1 \def (getl_ctail_clen Abbr t c0) in (let H5 \def -H_x1 in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind Abbr) t -c0) (CHead (CSort n) (Bind Abbr) t))) (or (\forall (t2: T).((pr2 (CTail (Bind -Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 -t2)))) (\lambda (x0: nat).(\lambda (H6: (getl (clen c0) (CTail (Bind Abbr) t -c0) (CHead (CSort x0) (Bind Abbr) t))).(or_intror (\forall (t2: T).((pr2 -(CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: -T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail -(Bind Abbr) t c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 -t2)) (lift (S O) (clen c0) x) (\lambda (H7: (eq T t1 (lift (S O) (clen c0) -x))).(\lambda (P: Prop).(let H8 \def (eq_ind T t1 (\lambda (t0: T).(subst0 -(clen c0) t t0 (lift (S O) (clen c0) x))) H4 (lift (S O) (clen c0) x) H7) in -(subst0_gen_lift_false x t (lift (S O) (clen c0) x) (S O) (clen c0) (clen c0) -(le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt -(clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_sym -(clen c0) (S O))) H8 P)))) (pr2_delta (CTail (Bind Abbr) t c0) (CSort x0) t -(clen c0) H6 t1 t1 (pr0_refl t1) (lift (S O) (clen c0) x) H4))))) H5)))) -(\lambda (H4: (eq T t1 (lift (S O) (clen c0) x))).(let H5 \def (eq_ind T t1 -(\lambda (t0: T).(\forall (t2: T).((pr2 c0 t0 t2) \to (eq T t0 t2)))) H1 -(lift (S O) (clen c0) x) H4) in (eq_ind_r T (lift (S O) (clen c0) x) (\lambda -(t0: T).(or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t0 t2) \to (eq T -t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t0 t2))))) (or_introl (\forall -(t2: T).((pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2) \to (eq T -(lift (S O) (clen c0) x) t2))) (ex2 T (\lambda (t2: T).((eq T (lift (S O) -(clen c0) x) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail -(Bind Abbr) t c0) (lift (S O) (clen c0) x) t2))) (\lambda (t2: T).(\lambda -(H6: (pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2)).(let H_x1 -\def (pr2_gen_ctail (Bind Abbr) c0 t (lift (S O) (clen c0) x) t2 H6) in (let -H7 \def H_x1 in (or_ind (pr2 c0 (lift (S O) (clen c0) x) t2) (ex3 T (\lambda -(_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) -(clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T (lift -(S O) (clen c0) x) t2) (\lambda (H8: (pr2 c0 (lift (S O) (clen c0) x) -t2)).(H5 t2 H8)) (\lambda (H8: (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind -Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: -T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abbr) -(Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda -(t0: T).(subst0 (clen c0) t t0 t2)) (eq T (lift (S O) (clen c0) x) t2) -(\lambda (x0: T).(\lambda (_: (eq K (Bind Abbr) (Bind Abbr))).(\lambda (H10: -(pr0 (lift (S O) (clen c0) x) x0)).(\lambda (H11: (subst0 (clen c0) t x0 -t2)).(ex2_ind T (\lambda (t3: T).(eq T x0 (lift (S O) (clen c0) t3))) -(\lambda (t3: T).(pr0 x t3)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x1: -T).(\lambda (H12: (eq T x0 (lift (S O) (clen c0) x1))).(\lambda (_: (pr0 x -x1)).(let H14 \def (eq_ind T x0 (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) -H11 (lift (S O) (clen c0) x1) H12) in (subst0_gen_lift_false x1 t t2 (S O) -(clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) -(\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen -c0) (S O)) (plus_sym (clen c0) (S O))) H14 (eq T (lift (S O) (clen c0) x) -t2)))))) (pr0_gen_lift x x0 (S O) (clen c0) H10)))))) H8)) H7)))))) t1 H4))) -H3))) H2))) (or_introl (\forall (t2: T).((pr2 (CTail (Bind Abst) t c0) t1 t2) -\to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abst) t c0) t1 t2))) (\lambda -(t2: T).(\lambda (H2: (pr2 (CTail (Bind Abst) t c0) t1 t2)).(let H_x0 \def -(pr2_gen_ctail (Bind Abst) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind -(pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) -(\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) -(eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T -(\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) -(\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq -K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: -T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: -(eq K (Bind Abst) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: -(subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Abst) (\lambda (ee: -K).(match ee with [(Bind b0) \Rightarrow (match b0 with [Abbr \Rightarrow -False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) -\Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) -H4)) H3)))))) (or_introl (\forall (t2: T).((pr2 (CTail (Bind Void) t c0) t1 -t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Void) t c0) t1 t2))) (\lambda -(t2: T).(\lambda (H2: (pr2 (CTail (Bind Void) t c0) t1 t2)).(let H_x0 \def -(pr2_gen_ctail (Bind Void) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind -(pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) -(\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) -(eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T -(\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) -(\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq -K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: -T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: -(eq K (Bind Void) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: -(subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Void) (\lambda (ee: -K).(match ee with [(Bind b0) \Rightarrow (match b0 with [Abbr \Rightarrow -False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) -\Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) -H4)) H3)))))) b)) (\lambda (f: F).(or_introl (\forall (t2: T).((pr2 (CTail -(Flat f) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 -t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Flat f) t c0) -t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Flat f) t c0) t1 -t2)).(let H_x0 \def (pr2_gen_ctail (Flat f) c0 t t1 t2 H2) in (let H3 \def -H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind -Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 -t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: -(ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 -t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: -T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: -T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: -(eq K (Flat f) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 -(clen c0) t x0 t2)).(let H8 \def (eq_ind K (Flat f) (\lambda (ee: K).(match -ee with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind -Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3))))))) k)) (\lambda -(H1: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 c0 t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)) (or (\forall -(t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: -T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t -c0) t1 t2)))) (\lambda (x: T).(\lambda (H2: (((eq T t1 x) \to (\forall (P: -Prop).P)))).(\lambda (H3: (pr2 c0 t1 x)).(or_intror (\forall (t2: T).((pr2 -(CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 -t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2))) -(ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)) x H2 (pr2_ctail c0 t1 x H3 k -t)))))) H1)) H0)))))))) c). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/defs.ma deleted file mode 100644 index 5b4849d7a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/defs.ma +++ /dev/null @@ -1,27 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr2/defs.ma". - -definition nf2: - C \to (T \to Prop) -\def - \lambda (c: C).(\lambda (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (eq T t1 -t2)))). - -rec definition nfs2 (c: C) (ts: TList) on ts: Prop \def match ts with [TNil -\Rightarrow True | (TCons t ts0) \Rightarrow (land (nf2 c t) (nfs2 c ts0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/fwd.ma deleted file mode 100644 index 06487b713..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/fwd.ma +++ /dev/null @@ -1,173 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/nf2/defs.ma". - -include "basic_1/pr2/clen.ma". - -include "basic_1/subst0/dec.ma". - -include "basic_1/T/props.ma". - -lemma nf2_gen_lref: - \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) u)) \to ((nf2 c (TLRef i)) \to (\forall (P: Prop).P)))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H0: ((\forall (t2: T).((pr2 -c (TLRef i) t2) \to (eq T (TLRef i) t2))))).(\lambda (P: -Prop).(lift_gen_lref_false (S i) O i (le_O_n i) (le_n (plus O (S i))) u (H0 -(lift (S i) O u) (pr2_delta c d u i H (TLRef i) (TLRef i) (pr0_refl (TLRef -i)) (lift (S i) O u) (subst0_lref u i))) P))))))). - -lemma nf2_gen_abst: - \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Bind Abst) u -t)) \to (land (nf2 c u) (nf2 (CHead c (Bind Abst) u) t))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: -T).((pr2 c (THead (Bind Abst) u t) t2) \to (eq T (THead (Bind Abst) u t) -t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall (t2: -T).((pr2 (CHead c (Bind Abst) u) t t2) \to (eq T t t2))) (\lambda (t2: -T).(\lambda (H0: (pr2 c u t2)).(let H1 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead -_ t0 _) \Rightarrow t0])) (THead (Bind Abst) u t) (THead (Bind Abst) t2 t) (H -(THead (Bind Abst) t2 t) (pr2_head_1 c u t2 H0 (Bind Abst) t))) in (let H2 -\def (eq_ind_r T t2 (\lambda (t0: T).(pr2 c u t0)) H0 u H1) in (eq_ind T u -(\lambda (t0: T).(eq T u t0)) (refl_equal T u) t2 H1))))) (\lambda (t2: -T).(\lambda (H0: (pr2 (CHead c (Bind Abst) u) t t2)).(let H1 \def (f_equal T -T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef _) -\Rightarrow t | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) u t) -(THead (Bind Abst) u t2) (H (THead (Bind Abst) u t2) (let H_y \def -(pr2_gen_cbind Abst c u t t2 H0) in H_y))) in (let H2 \def (eq_ind_r T t2 -(\lambda (t0: T).(pr2 (CHead c (Bind Abst) u) t t0)) H0 t H1) in (eq_ind T t -(\lambda (t0: T).(eq T t t0)) (refl_equal T t) t2 H1))))))))). - -lemma nf2_gen_cast: - \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Flat Cast) u -t)) \to (\forall (P: Prop).P)))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (nf2 c (THead -(Flat Cast) u t))).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) u t (H t -(pr2_free c (THead (Flat Cast) u t) t (pr0_tau t t (pr0_refl t) u))) P))))). - -lemma nf2_gen_beta: - \forall (c: C).(\forall (u: T).(\forall (v: T).(\forall (t: T).((nf2 c -(THead (Flat Appl) u (THead (Bind Abst) v t))) \to (\forall (P: Prop).P))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (t: T).(\lambda (H: -((\forall (t2: T).((pr2 c (THead (Flat Appl) u (THead (Bind Abst) v t)) t2) -\to (eq T (THead (Flat Appl) u (THead (Bind Abst) v t)) t2))))).(\lambda (P: -Prop).(let H0 \def (eq_ind T (THead (Flat Appl) u (THead (Bind Abst) v t)) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u t) -(H (THead (Bind Abbr) u t) (pr2_free c (THead (Flat Appl) u (THead (Bind -Abst) v t)) (THead (Bind Abbr) u t) (pr0_beta v u u (pr0_refl u) t t -(pr0_refl t))))) in (False_ind P H0))))))). - -lemma nf2_gen_flat: - \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c -(THead (Flat f) u t)) \to (land (nf2 c u) (nf2 c t)))))) -\def - \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: -((\forall (t2: T).((pr2 c (THead (Flat f) u t) t2) \to (eq T (THead (Flat f) -u t) t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall -(t2: T).((pr2 c t t2) \to (eq T t t2))) (\lambda (t2: T).(\lambda (H0: (pr2 c -u t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t0 _) \Rightarrow t0])) -(THead (Flat f) u t) (THead (Flat f) t2 t) (H (THead (Flat f) t2 t) -(pr2_head_1 c u t2 H0 (Flat f) t))) in H1))) (\lambda (t2: T).(\lambda (H0: -(pr2 c t t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t0) \Rightarrow t0])) -(THead (Flat f) u t) (THead (Flat f) u t2) (H (THead (Flat f) u t2) -(pr2_head_2 c u t t2 (Flat f) (pr2_cflat c t t2 H0 f u)))) in H1)))))))). - -fact nf2_gen__nf2_gen_aux: - \forall (b: B).(\forall (x: T).(\forall (u: T).(\forall (d: nat).((eq T -(THead (Bind b) u (lift (S O) d x)) x) \to (\forall (P: Prop).P))))) -\def - \lambda (b: B).(\lambda (x: T).(T_ind (\lambda (t: T).(\forall (u: -T).(\forall (d: nat).((eq T (THead (Bind b) u (lift (S O) d t)) t) \to -(\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (d: -nat).(\lambda (H: (eq T (THead (Bind b) u (lift (S O) d (TSort n))) (TSort -n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead (Bind b) u (lift (S O) -d (TSort n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) -H) in (False_ind P H0))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (d: -nat).(\lambda (H: (eq T (THead (Bind b) u (lift (S O) d (TLRef n))) (TLRef -n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead (Bind b) u (lift (S O) -d (TLRef n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) -H) in (False_ind P H0))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: -((\forall (u: T).(\forall (d: nat).((eq T (THead (Bind b) u (lift (S O) d t)) -t) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda (H0: ((\forall -(u: T).(\forall (d: nat).((eq T (THead (Bind b) u (lift (S O) d t0)) t0) \to -(\forall (P: Prop).P)))))).(\lambda (u: T).(\lambda (d: nat).(\lambda (H1: -(eq T (THead (Bind b) u (lift (S O) d (THead k t t0))) (THead k t -t0))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e -with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | -(THead k0 _ _) \Rightarrow k0])) (THead (Bind b) u (lift (S O) d (THead k t -t0))) (THead k t t0) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t1 _) -\Rightarrow t1])) (THead (Bind b) u (lift (S O) d (THead k t t0))) (THead k t -t0) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow (THead k (lref_map (\lambda (x0: nat).(plus x0 (S O))) d t) -(lref_map (\lambda (x0: nat).(plus x0 (S O))) (s k d) t0)) | (TLRef _) -\Rightarrow (THead k (lref_map (\lambda (x0: nat).(plus x0 (S O))) d t) -(lref_map (\lambda (x0: nat).(plus x0 (S O))) (s k d) t0)) | (THead _ _ t1) -\Rightarrow t1])) (THead (Bind b) u (lift (S O) d (THead k t t0))) (THead k t -t0) H1) in (\lambda (_: (eq T u t)).(\lambda (H6: (eq K (Bind b) k)).(let H7 -\def (eq_ind_r K k (\lambda (k0: K).(eq T (lift (S O) d (THead k0 t t0)) t0)) -H4 (Bind b) H6) in (let H8 \def (eq_ind T (lift (S O) d (THead (Bind b) t -t0)) (\lambda (t1: T).(eq T t1 t0)) H7 (THead (Bind b) (lift (S O) d t) (lift -(S O) (S d) t0)) (lift_bind b t t0 (S O) d)) in (H0 (lift (S O) d t) (S d) H8 -P)))))) H3)) H2))))))))))) x)). - -lemma nf2_gen_abbr: - \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Bind Abbr) u -t)) \to (\forall (P: Prop).P)))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: -T).((pr2 c (THead (Bind Abbr) u t) t2) \to (eq T (THead (Bind Abbr) u t) -t2))))).(\lambda (P: Prop).(let H_x \def (dnf_dec u t O) in (let H0 \def H_x -in (ex_ind T (\lambda (v: T).(or (subst0 O u t (lift (S O) O v)) (eq T t -(lift (S O) O v)))) P (\lambda (x: T).(\lambda (H1: (or (subst0 O u t (lift -(S O) O x)) (eq T t (lift (S O) O x)))).(or_ind (subst0 O u t (lift (S O) O -x)) (eq T t (lift (S O) O x)) P (\lambda (H2: (subst0 O u t (lift (S O) O -x))).(let H3 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t0) \Rightarrow t0])) -(THead (Bind Abbr) u t) (THead (Bind Abbr) u (lift (S O) O x)) (H (THead -(Bind Abbr) u (lift (S O) O x)) (pr2_free c (THead (Bind Abbr) u t) (THead -(Bind Abbr) u (lift (S O) O x)) (pr0_delta u u (pr0_refl u) t t (pr0_refl t) -(lift (S O) O x) H2)))) in (let H4 \def (eq_ind T t (\lambda (t0: T).(subst0 -O u t0 (lift (S O) O x))) H2 (lift (S O) O x) H3) in (subst0_refl u (lift (S -O) O x) O H4 P)))) (\lambda (H2: (eq T t (lift (S O) O x))).(let H3 \def -(eq_ind T t (\lambda (t0: T).(\forall (t2: T).((pr2 c (THead (Bind Abbr) u -t0) t2) \to (eq T (THead (Bind Abbr) u t0) t2)))) H (lift (S O) O x) H2) in -(nf2_gen__nf2_gen_aux Abbr x u O (H3 x (pr2_free c (THead (Bind Abbr) u (lift -(S O) O x)) x (pr0_zeta Abbr not_abbr_abst x x (pr0_refl x) u))) P))) H1))) -H0))))))). - -lemma nf2_gen_void: - \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Bind Void) u -(lift (S O) O t))) \to (\forall (P: Prop).P)))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: -T).((pr2 c (THead (Bind Void) u (lift (S O) O t)) t2) \to (eq T (THead (Bind -Void) u (lift (S O) O t)) t2))))).(\lambda (P: Prop).(nf2_gen__nf2_gen_aux -Void t u O (H t (pr2_free c (THead (Bind Void) u (lift (S O) O t)) t -(pr0_zeta Void not_void_abst t t (pr0_refl t) u))) P))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/iso.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/iso.ma deleted file mode 100644 index 39b827580..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/iso.ma +++ /dev/null @@ -1,125 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/nf2/pr3.ma". - -include "basic_1/iso/props.ma". - -lemma nf2_iso_appls_lref: - \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (vs: -TList).(\forall (u: T).((pr3 c (THeads (Flat Appl) vs (TLRef i)) u) \to (iso -(THeads (Flat Appl) vs (TLRef i)) u)))))) -\def - \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda -(vs: TList).(TList_ind (\lambda (t: TList).(\forall (u: T).((pr3 c (THeads -(Flat Appl) t (TLRef i)) u) \to (iso (THeads (Flat Appl) t (TLRef i)) u)))) -(\lambda (u: T).(\lambda (H0: (pr3 c (TLRef i) u)).(let H_y \def -(nf2_pr3_unfold c (TLRef i) u H0 H) in (let H1 \def (eq_ind_r T u (\lambda -(t: T).(pr3 c (TLRef i) t)) H0 (TLRef i) H_y) in (eq_ind T (TLRef i) (\lambda -(t: T).(iso (TLRef i) t)) (iso_refl (TLRef i)) u H_y))))) (\lambda (t: -T).(\lambda (t0: TList).(\lambda (H0: ((\forall (u: T).((pr3 c (THeads (Flat -Appl) t0 (TLRef i)) u) \to (iso (THeads (Flat Appl) t0 (TLRef i)) -u))))).(\lambda (u: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads -(Flat Appl) t0 (TLRef i))) u)).(let H2 \def (pr3_gen_appl c t (THeads (Flat -Appl) t0 (TLRef i)) u H1) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T u (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) -t0 (TLRef i)) t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) u))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat -Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u0: -T).(pr3 (CHead c (Bind b) u0) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat -Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: -T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -u))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2)))))))) (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef -i))) u) (\lambda (H3: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T u -(THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T u (THead (Flat -Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2))) (iso -(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) u) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H4: (eq T u (THead (Flat Appl) x0 -x1))).(\lambda (_: (pr3 c t x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) t0 -(TLRef i)) x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t1: T).(iso -(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t1)) (iso_head t x0 -(THeads (Flat Appl) t0 (TLRef i)) x1 (Flat Appl)) u H4)))))) H3)) (\lambda -(H3: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t2: T).(pr3 c (THead (Bind Abbr) u2 t2) u))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat -Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u0: -T).(pr3 (CHead c (Bind b) u0) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u2 t2) u))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c t u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t2: T).(\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) u0) z1 -t2))))))) (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) u) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda -(_: (pr3 c (THead (Bind Abbr) x2 x3) u)).(\lambda (_: (pr3 c t x2)).(\lambda -(H6: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) x0 -x1))).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) -u0) x1 x3))))).(let H_y \def (H0 (THead (Bind Abst) x0 x1) H6) in -(iso_flats_lref_bind_false Appl Abst i x0 x1 t0 H_y (iso (THead (Flat Appl) t -(THeads (Flat Appl) t0 (TLRef i))) u))))))))))) H3)) (\lambda (H3: (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2)) u))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 -(CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat -Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: -T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -u))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2))))))) (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) -u) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 -Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind -x0) x1 x2))).(\lambda (_: (pr3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift -(S O) O x4) x3)) u)).(\lambda (_: (pr3 c t x4)).(\lambda (_: (pr3 c x1 -x5)).(\lambda (_: (pr3 (CHead c (Bind x0) x5) x2 x3)).(let H_y \def (H0 -(THead (Bind x0) x1 x2) H5) in (iso_flats_lref_bind_false Appl x0 i x1 x2 t0 -H_y (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) -u))))))))))))))) H3)) H2))))))) vs)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/lift1.ma deleted file mode 100644 index 9e680d7e8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/lift1.ma +++ /dev/null @@ -1,38 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/nf2/props.ma". - -include "basic_1/drop1/fwd.ma". - -lemma nf2_lift1: - \forall (e: C).(\forall (hds: PList).(\forall (c: C).(\forall (t: T).((drop1 -hds c e) \to ((nf2 e t) \to (nf2 c (lift1 hds t))))))) -\def - \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(c: C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p -t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c -e)).(\lambda (H0: (nf2 e t)).(let H_y \def (drop1_gen_pnil c e H) in -(eq_ind_r C e (\lambda (c0: C).(nf2 c0 t)) H0 c H_y)))))) (\lambda (n: -nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: -C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p -t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) -c e)).(\lambda (H1: (nf2 e t)).(let H_x \def (drop1_gen_pcons c e p n n0 H0) -in (let H2 \def H_x in (ex2_ind C (\lambda (c2: C).(drop n n0 c c2)) (\lambda -(c2: C).(drop1 p c2 e)) (nf2 c (lift n n0 (lift1 p t))) (\lambda (x: -C).(\lambda (H3: (drop n n0 c x)).(\lambda (H4: (drop1 p x e)).(nf2_lift x -(lift1 p t) (H x t H4 H1) c n n0 H3)))) H2))))))))))) hds)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/pr3.ma deleted file mode 100644 index 5c6a686e9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/pr3.ma +++ /dev/null @@ -1,50 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/nf2/defs.ma". - -include "basic_1/pr3/pr3.ma". - -lemma nf2_pr3_unfold: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to ((nf2 c -t1) \to (eq T t1 t2))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).((nf2 c t) \to (eq T t -t0)))) (\lambda (t: T).(\lambda (H0: (nf2 c t)).(H0 t (pr2_free c t t -(pr0_refl t))))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c t3 -t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: (((nf2 c t0) -\to (eq T t0 t4)))).(\lambda (H3: (nf2 c t3)).(let H4 \def H3 in (let H5 \def -(eq_ind T t3 (\lambda (t: T).(nf2 c t)) H3 t0 (H4 t0 H0)) in (let H6 \def -(eq_ind T t3 (\lambda (t: T).(pr2 c t t0)) H0 t0 (H4 t0 H0)) in (eq_ind_r T -t0 (\lambda (t: T).(eq T t t4)) (H2 H5) t3 (H4 t0 H0)))))))))))) t1 t2 H)))). - -theorem nf2_pr3_confluence: - \forall (c: C).(\forall (t1: T).((nf2 c t1) \to (\forall (t2: T).((nf2 c t2) -\to (\forall (t: T).((pr3 c t t1) \to ((pr3 c t t2) \to (eq T t1 t2)))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (H: (nf2 c t1)).(\lambda (t2: -T).(\lambda (H0: (nf2 c t2)).(\lambda (t: T).(\lambda (H1: (pr3 c t -t1)).(\lambda (H2: (pr3 c t t2)).(ex2_ind T (\lambda (t0: T).(pr3 c t2 t0)) -(\lambda (t0: T).(pr3 c t1 t0)) (eq T t1 t2) (\lambda (x: T).(\lambda (H3: -(pr3 c t2 x)).(\lambda (H4: (pr3 c t1 x)).(let H_y \def (nf2_pr3_unfold c t1 -x H4 H) in (let H5 \def (eq_ind_r T x (\lambda (t0: T).(pr3 c t1 t0)) H4 t1 -H_y) in (let H6 \def (eq_ind_r T x (\lambda (t0: T).(pr3 c t2 t0)) H3 t1 H_y) -in (let H_y0 \def (nf2_pr3_unfold c t2 t1 H6 H0) in (let H7 \def (eq_ind T t2 -(\lambda (t0: T).(pr3 c t0 t1)) H6 t1 H_y0) in (eq_ind_r T t1 (\lambda (t0: -T).(eq T t1 t0)) (refl_equal T t1) t2 H_y0))))))))) (pr3_confluence c t t2 H2 -t1 H1))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/nf2/props.ma b/matita/matita/contribs/lambdadelta/basic_1/nf2/props.ma deleted file mode 100644 index ccaa9eb52..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/nf2/props.ma +++ /dev/null @@ -1,309 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/nf2/defs.ma". - -include "basic_1/pr2/fwd.ma". - -lemma nf2_sort: - \forall (c: C).(\forall (n: nat).(nf2 c (TSort n))) -\def - \lambda (c: C).(\lambda (n: nat).(\lambda (t2: T).(\lambda (H: (pr2 c (TSort -n) t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal -T (TSort n)) t2 (pr2_gen_sort c t2 n H))))). - -lemma nf2_csort_lref: - \forall (n: nat).(\forall (i: nat).(nf2 (CSort n) (TLRef i))) -\def - \lambda (n: nat).(\lambda (i: nat).(\lambda (t2: T).(\lambda (H: (pr2 (CSort -n) (TLRef i) t2)).(let H0 \def (pr2_gen_lref (CSort n) t2 i H) in (or_ind (eq -T t2 (TLRef i)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i (CSort n) -(CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S -i) O u))))) (eq T (TLRef i) t2) (\lambda (H1: (eq T t2 (TLRef i))).(eq_ind_r -T (TLRef i) (\lambda (t: T).(eq T (TLRef i) t)) (refl_equal T (TLRef i)) t2 -H1)) (\lambda (H1: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i (CSort -n) (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift -(S i) O u)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i (CSort -n) (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift -(S i) O u)))) (eq T (TLRef i) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(H2: (getl i (CSort n) (CHead x0 (Bind Abbr) x1))).(\lambda (H3: (eq T t2 -(lift (S i) O x1))).(eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(eq T -(TLRef i) t)) (getl_gen_sort n i (CHead x0 (Bind Abbr) x1) H2 (eq T (TLRef i) -(lift (S i) O x1))) t2 H3))))) H1)) H0))))). - -theorem nf2_abst: - \forall (c: C).(\forall (u: T).((nf2 c u) \to (\forall (b: B).(\forall (v: -T).(\forall (t: T).((nf2 (CHead c (Bind b) v) t) \to (nf2 c (THead (Bind -Abst) u t)))))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (H: ((\forall (t2: T).((pr2 c u t2) -\to (eq T u t2))))).(\lambda (b: B).(\lambda (v: T).(\lambda (t: T).(\lambda -(H0: ((\forall (t2: T).((pr2 (CHead c (Bind b) v) t t2) \to (eq T t -t2))))).(\lambda (t2: T).(\lambda (H1: (pr2 c (THead (Bind Abst) u t) -t2)).(let H2 \def (pr2_gen_abst c u t t2 H1) in (ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) t t3))))) (eq T (THead -(Bind Abst) u t) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T t2 -(THead (Bind Abst) x0 x1))).(\lambda (H4: (pr2 c u x0)).(\lambda (H5: -((\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) t -x1))))).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(eq T (THead -(Bind Abst) u t) t0)) (f_equal3 K T T T THead (Bind Abst) (Bind Abst) u x0 t -x1 (refl_equal K (Bind Abst)) (H x0 H4) (H0 x1 (H5 b v))) t2 H3)))))) -H2)))))))))). - -theorem nf2_abst_shift: - \forall (c: C).(\forall (u: T).((nf2 c u) \to (\forall (t: T).((nf2 (CHead c -(Bind Abst) u) t) \to (nf2 c (THead (Bind Abst) u t)))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (H: ((\forall (t2: T).((pr2 c u t2) -\to (eq T u t2))))).(\lambda (t: T).(\lambda (H0: ((\forall (t2: T).((pr2 -(CHead c (Bind Abst) u) t t2) \to (eq T t t2))))).(\lambda (t2: T).(\lambda -(H1: (pr2 c (THead (Bind Abst) u t) t2)).(let H2 \def (pr2_gen_abst c u t t2 -H1) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) -u0) t t3))))) (eq T (THead (Bind Abst) u t) t2) (\lambda (x0: T).(\lambda -(x1: T).(\lambda (H3: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H4: (pr2 -c u x0)).(\lambda (H5: ((\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind -b) u0) t x1))))).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(eq T -(THead (Bind Abst) u t) t0)) (f_equal3 K T T T THead (Bind Abst) (Bind Abst) -u x0 t x1 (refl_equal K (Bind Abst)) (H x0 H4) (H0 x1 (H5 Abst u))) t2 -H3)))))) H2)))))))). - -lemma nfs2_tapp: - \forall (c: C).(\forall (t: T).(\forall (ts: TList).((nfs2 c (TApp ts t)) -\to (land (nfs2 c ts) (nf2 c t))))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (ts: TList).(TList_ind (\lambda (t0: -TList).((nfs2 c (TApp t0 t)) \to (land (nfs2 c t0) (nf2 c t)))) (\lambda (H: -(land (nf2 c t) True)).(let H0 \def H in (land_ind (nf2 c t) True (land True -(nf2 c t)) (\lambda (H1: (nf2 c t)).(\lambda (_: True).(conj True (nf2 c t) I -H1))) H0))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: (((nfs2 c -(TApp t1 t)) \to (land (nfs2 c t1) (nf2 c t))))).(\lambda (H0: (land (nf2 c -t0) (nfs2 c (TApp t1 t)))).(let H1 \def H0 in (land_ind (nf2 c t0) (nfs2 c -(TApp t1 t)) (land (land (nf2 c t0) (nfs2 c t1)) (nf2 c t)) (\lambda (H2: -(nf2 c t0)).(\lambda (H3: (nfs2 c (TApp t1 t))).(let H_x \def (H H3) in (let -H4 \def H_x in (land_ind (nfs2 c t1) (nf2 c t) (land (land (nf2 c t0) (nfs2 c -t1)) (nf2 c t)) (\lambda (H5: (nfs2 c t1)).(\lambda (H6: (nf2 c t)).(conj -(land (nf2 c t0) (nfs2 c t1)) (nf2 c t) (conj (nf2 c t0) (nfs2 c t1) H2 H5) -H6))) H4))))) H1)))))) ts))). - -lemma nf2_appls_lref: - \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (vs: -TList).((nfs2 c vs) \to (nf2 c (THeads (Flat Appl) vs (TLRef i))))))) -\def - \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda -(vs: TList).(TList_ind (\lambda (t: TList).((nfs2 c t) \to (nf2 c (THeads -(Flat Appl) t (TLRef i))))) (\lambda (_: True).H) (\lambda (t: T).(\lambda -(t0: TList).(\lambda (H0: (((nfs2 c t0) \to (nf2 c (THeads (Flat Appl) t0 -(TLRef i)))))).(\lambda (H1: (land (nf2 c t) (nfs2 c t0))).(let H2 \def H1 in -(land_ind (nf2 c t) (nfs2 c t0) (nf2 c (THead (Flat Appl) t (THeads (Flat -Appl) t0 (TLRef i)))) (\lambda (H3: (nf2 c t)).(\lambda (H4: (nfs2 c -t0)).(let H_y \def (H0 H4) in (\lambda (t2: T).(\lambda (H5: (pr2 c (THead -(Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t2)).(let H6 \def -(pr2_gen_appl c t (THeads (Flat Appl) t0 (TLRef i)) t2 H5) in (or3_ind (ex3_2 -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c t u2))) (\lambda (_: T).(\lambda (t3: -T).(pr2 c (THeads (Flat Appl) t0 (TLRef i)) t3)))) (ex4_4 T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat -Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 -t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (eq T (THead (Flat Appl) t -(THeads (Flat Appl) t0 (TLRef i))) t2) (\lambda (H7: (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c t u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c -(THeads (Flat Appl) t0 (TLRef i)) t3))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c t u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c -(THeads (Flat Appl) t0 (TLRef i)) t3))) (eq T (THead (Flat Appl) t (THeads -(Flat Appl) t0 (TLRef i))) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(H8: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H9: (pr2 c t -x0)).(\lambda (H10: (pr2 c (THeads (Flat Appl) t0 (TLRef i)) x1)).(eq_ind_r T -(THead (Flat Appl) x0 x1) (\lambda (t1: T).(eq T (THead (Flat Appl) t (THeads -(Flat Appl) t0 (TLRef i))) t1)) (let H11 \def (eq_ind_r T x1 (\lambda (t1: -T).(pr2 c (THeads (Flat Appl) t0 (TLRef i)) t1)) H10 (THeads (Flat Appl) t0 -(TLRef i)) (H_y x1 H10)) in (eq_ind T (THeads (Flat Appl) t0 (TLRef i)) -(\lambda (t1: T).(eq T (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef -i))) (THead (Flat Appl) x0 t1))) (let H12 \def (eq_ind_r T x0 (\lambda (t1: -T).(pr2 c t t1)) H9 t (H3 x0 H9)) in (eq_ind T t (\lambda (t1: T).(eq T -(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) (THead (Flat Appl) t1 -(THeads (Flat Appl) t0 (TLRef i))))) (refl_equal T (THead (Flat Appl) t -(THeads (Flat Appl) t0 (TLRef i)))) x0 (H3 x0 H9))) x1 (H_y x1 H10))) t2 -H8)))))) H7)) (\lambda (H7: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))))).(ex4_4_ind T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -z1 t3))))))) (eq T (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) -t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H8: (eq T (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) -x0 x1))).(\lambda (H9: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 -c t x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) -u) x1 x3))))).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t1: T).(eq T -(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t1)) (TList_ind -(\lambda (t1: TList).((nf2 c (THeads (Flat Appl) t1 (TLRef i))) \to ((eq T -(THeads (Flat Appl) t1 (TLRef i)) (THead (Bind Abst) x0 x1)) \to (eq T (THead -(Flat Appl) t (THeads (Flat Appl) t1 (TLRef i))) (THead (Bind Abbr) x2 -x3))))) (\lambda (_: (nf2 c (THeads (Flat Appl) TNil (TLRef i)))).(\lambda -(H13: (eq T (THeads (Flat Appl) TNil (TLRef i)) (THead (Bind Abst) x0 -x1))).(let H14 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (THead (Bind Abst) x0 x1) H13) in (False_ind (eq T -(THead (Flat Appl) t (THeads (Flat Appl) TNil (TLRef i))) (THead (Bind Abbr) -x2 x3)) H14)))) (\lambda (t1: T).(\lambda (t3: TList).(\lambda (_: (((nf2 c -(THeads (Flat Appl) t3 (TLRef i))) \to ((eq T (THeads (Flat Appl) t3 (TLRef -i)) (THead (Bind Abst) x0 x1)) \to (eq T (THead (Flat Appl) t (THeads (Flat -Appl) t3 (TLRef i))) (THead (Bind Abbr) x2 x3)))))).(\lambda (_: (nf2 c -(THeads (Flat Appl) (TCons t1 t3) (TLRef i)))).(\lambda (H13: (eq T (THeads -(Flat Appl) (TCons t1 t3) (TLRef i)) (THead (Bind Abst) x0 x1))).(let H14 -\def (eq_ind T (THead (Flat Appl) t1 (THeads (Flat Appl) t3 (TLRef i))) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x0 -x1) H13) in (False_ind (eq T (THead (Flat Appl) t (THeads (Flat Appl) (TCons -t1 t3) (TLRef i))) (THead (Bind Abbr) x2 x3)) H14))))))) t0 H_y H8) t2 -H9))))))))) H7)) (\lambda (H7: (ex6_6 B T T T T T (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not -(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) -t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c t u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (eq T (THead -(Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t2) (\lambda (x0: -B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H9: (eq T -(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind x0) x1 x2))).(\lambda (H10: -(eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) -x3)))).(\lambda (_: (pr2 c t x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: -(pr2 (CHead c (Bind x0) x5) x2 x3)).(eq_ind_r T (THead (Bind x0) x5 (THead -(Flat Appl) (lift (S O) O x4) x3)) (\lambda (t1: T).(eq T (THead (Flat Appl) -t (THeads (Flat Appl) t0 (TLRef i))) t1)) (TList_ind (\lambda (t1: -TList).((nf2 c (THeads (Flat Appl) t1 (TLRef i))) \to ((eq T (THeads (Flat -Appl) t1 (TLRef i)) (THead (Bind x0) x1 x2)) \to (eq T (THead (Flat Appl) t -(THeads (Flat Appl) t1 (TLRef i))) (THead (Bind x0) x5 (THead (Flat Appl) -(lift (S O) O x4) x3)))))) (\lambda (_: (nf2 c (THeads (Flat Appl) TNil -(TLRef i)))).(\lambda (H15: (eq T (THeads (Flat Appl) TNil (TLRef i)) (THead -(Bind x0) x1 x2))).(let H16 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ -_ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H15) in (False_ind (eq T -(THead (Flat Appl) t (THeads (Flat Appl) TNil (TLRef i))) (THead (Bind x0) x5 -(THead (Flat Appl) (lift (S O) O x4) x3))) H16)))) (\lambda (t1: T).(\lambda -(t3: TList).(\lambda (_: (((nf2 c (THeads (Flat Appl) t3 (TLRef i))) \to ((eq -T (THeads (Flat Appl) t3 (TLRef i)) (THead (Bind x0) x1 x2)) \to (eq T (THead -(Flat Appl) t (THeads (Flat Appl) t3 (TLRef i))) (THead (Bind x0) x5 (THead -(Flat Appl) (lift (S O) O x4) x3))))))).(\lambda (_: (nf2 c (THeads (Flat -Appl) (TCons t1 t3) (TLRef i)))).(\lambda (H15: (eq T (THeads (Flat Appl) -(TCons t1 t3) (TLRef i)) (THead (Bind x0) x1 x2))).(let H16 \def (eq_ind T -(THead (Flat Appl) t1 (THeads (Flat Appl) t3 (TLRef i))) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind x0) x1 x2) H15) in (False_ind (eq T -(THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t3) (TLRef i))) (THead -(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) H16))))))) t0 H_y H9) -t2 H10))))))))))))) H7)) H6))))))) H2)))))) vs)))). - -theorem nf2_appl_lref: - \forall (c: C).(\forall (u: T).((nf2 c u) \to (\forall (i: nat).((nf2 c -(TLRef i)) \to (nf2 c (THead (Flat Appl) u (TLRef i))))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (H: (nf2 c u)).(\lambda (i: -nat).(\lambda (H0: (nf2 c (TLRef i))).(let H_y \def (nf2_appls_lref c i H0 -(TCons u TNil)) in (H_y (conj (nf2 c u) True H I))))))). - -lemma nf2_lref_abst: - \forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c -(CHead e (Bind Abst) u)) \to (nf2 c (TLRef i)))))) -\def - \lambda (c: C).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead e (Bind Abst) u))).(\lambda (t2: T).(\lambda (H0: (pr2 c -(TLRef i) t2)).(let H1 \def (pr2_gen_lref c t2 i H0) in (or_ind (eq T t2 -(TLRef i)) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c (CHead d -(Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift (S i) O -u0))))) (eq T (TLRef i) t2) (\lambda (H2: (eq T t2 (TLRef i))).(eq_ind_r T -(TLRef i) (\lambda (t: T).(eq T (TLRef i) t)) (refl_equal T (TLRef i)) t2 -H2)) (\lambda (H2: (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c -(CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift -(S i) O u0)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u0: T).(getl i c -(CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift -(S i) O u0)))) (eq T (TLRef i) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda -(H3: (getl i c (CHead x0 (Bind Abbr) x1))).(\lambda (H4: (eq T t2 (lift (S i) -O x1))).(eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(eq T (TLRef i) t)) -(let H5 \def (eq_ind C (CHead e (Bind Abst) u) (\lambda (c0: C).(getl i c -c0)) H (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e (Bind Abst) u) i H -(CHead x0 (Bind Abbr) x1) H3)) in (let H6 \def (eq_ind C (CHead e (Bind Abst) -u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k -_) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e -(Bind Abst) u) i H (CHead x0 (Bind Abbr) x1) H3)) in (False_ind (eq T (TLRef -i) (lift (S i) O x1)) H6))) t2 H4))))) H2)) H1)))))))). - -lemma nf2_lift: - \forall (d: C).(\forall (t: T).((nf2 d t) \to (\forall (c: C).(\forall (h: -nat).(\forall (i: nat).((drop h i c d) \to (nf2 c (lift h i t)))))))) -\def - \lambda (d: C).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).((pr2 d t t2) -\to (eq T t t2))))).(\lambda (c: C).(\lambda (h: nat).(\lambda (i: -nat).(\lambda (H0: (drop h i c d)).(\lambda (t2: T).(\lambda (H1: (pr2 c -(lift h i t) t2)).(let H2 \def (pr2_gen_lift c t t2 h i H1 d H0) in (ex2_ind -T (\lambda (t3: T).(eq T t2 (lift h i t3))) (\lambda (t3: T).(pr2 d t t3)) -(eq T (lift h i t) t2) (\lambda (x: T).(\lambda (H3: (eq T t2 (lift h i -x))).(\lambda (H4: (pr2 d t x)).(eq_ind_r T (lift h i x) (\lambda (t0: T).(eq -T (lift h i t) t0)) (let H_y \def (H x H4) in (let H5 \def (eq_ind_r T x -(\lambda (t0: T).(pr2 d t t0)) H4 t H_y) in (eq_ind T t (\lambda (t0: T).(eq -T (lift h i t) (lift h i t0))) (refl_equal T (lift h i t)) x H_y))) t2 H3)))) -H2)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/pc1/defs.ma deleted file mode 100644 index 7fb3cd29a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc1/defs.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr1/defs.ma". - -definition pc1: - T \to (T \to Prop) -\def - \lambda (t1: T).(\lambda (t2: T).(ex2 T (\lambda (t: T).(pr1 t1 t)) (\lambda -(t: T).(pr1 t2 t)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/pc1/props.ma deleted file mode 100644 index 86e794a79..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc1/props.ma +++ /dev/null @@ -1,116 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc1/defs.ma". - -include "basic_1/pr1/pr1.ma". - -lemma pc1_pr0_r: - \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pc1 t1 t2))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(ex_intro2 T -(\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) t2 (pr1_pr0 t1 t2 H) -(pr1_refl t2)))). - -lemma pc1_pr0_x: - \forall (t1: T).(\forall (t2: T).((pr0 t2 t1) \to (pc1 t1 t2))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t2 t1)).(ex_intro2 T -(\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) t1 (pr1_refl t1) -(pr1_pr0 t2 t1 H)))). - -lemma pc1_refl: - \forall (t: T).(pc1 t t) -\def - \lambda (t: T).(ex_intro2 T (\lambda (t0: T).(pr1 t t0)) (\lambda (t0: -T).(pr1 t t0)) t (pr1_refl t) (pr1_refl t)). - -lemma pc1_pr0_u: - \forall (t2: T).(\forall (t1: T).((pr0 t1 t2) \to (\forall (t3: T).((pc1 t2 -t3) \to (pc1 t1 t3))))) -\def - \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pr0 t1 t2)).(\lambda (t3: -T).(\lambda (H0: (pc1 t2 t3)).(let H1 \def H0 in (ex2_ind T (\lambda (t: -T).(pr1 t2 t)) (\lambda (t: T).(pr1 t3 t)) (pc1 t1 t3) (\lambda (x: -T).(\lambda (H2: (pr1 t2 x)).(\lambda (H3: (pr1 t3 x)).(ex_intro2 T (\lambda -(t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t3 t)) x (pr1_sing t2 t1 H x H2) -H3)))) H1)))))). - -lemma pc1_s: - \forall (t2: T).(\forall (t1: T).((pc1 t1 t2) \to (pc1 t2 t1))) -\def - \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pc1 t1 t2)).(let H0 \def H in -(ex2_ind T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) (pc1 t2 -t1) (\lambda (x: T).(\lambda (H1: (pr1 t1 x)).(\lambda (H2: (pr1 t2 -x)).(ex_intro2 T (\lambda (t: T).(pr1 t2 t)) (\lambda (t: T).(pr1 t1 t)) x H2 -H1)))) H0)))). - -lemma pc1_head_1: - \forall (u1: T).(\forall (u2: T).((pc1 u1 u2) \to (\forall (t: T).(\forall -(k: K).(pc1 (THead k u1 t) (THead k u2 t)))))) -\def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc1 u1 u2)).(\lambda (t: -T).(\lambda (k: K).(let H0 \def H in (ex2_ind T (\lambda (t0: T).(pr1 u1 t0)) -(\lambda (t0: T).(pr1 u2 t0)) (pc1 (THead k u1 t) (THead k u2 t)) (\lambda -(x: T).(\lambda (H1: (pr1 u1 x)).(\lambda (H2: (pr1 u2 x)).(ex_intro2 T -(\lambda (t0: T).(pr1 (THead k u1 t) t0)) (\lambda (t0: T).(pr1 (THead k u2 -t) t0)) (THead k x t) (pr1_head_1 u1 x H1 t k) (pr1_head_1 u2 x H2 t k))))) -H0)))))). - -lemma pc1_head_2: - \forall (t1: T).(\forall (t2: T).((pc1 t1 t2) \to (\forall (u: T).(\forall -(k: K).(pc1 (THead k u t1) (THead k u t2)))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc1 t1 t2)).(\lambda (u: -T).(\lambda (k: K).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr1 t1 t)) -(\lambda (t: T).(pr1 t2 t)) (pc1 (THead k u t1) (THead k u t2)) (\lambda (x: -T).(\lambda (H1: (pr1 t1 x)).(\lambda (H2: (pr1 t2 x)).(ex_intro2 T (\lambda -(t: T).(pr1 (THead k u t1) t)) (\lambda (t: T).(pr1 (THead k u t2) t)) (THead -k u x) (pr1_head_2 t1 x H1 u k) (pr1_head_2 t2 x H2 u k))))) H0)))))). - -theorem pc1_t: - \forall (t2: T).(\forall (t1: T).((pc1 t1 t2) \to (\forall (t3: T).((pc1 t2 -t3) \to (pc1 t1 t3))))) -\def - \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pc1 t1 t2)).(\lambda (t3: -T).(\lambda (H0: (pc1 t2 t3)).(let H1 \def H0 in (ex2_ind T (\lambda (t: -T).(pr1 t2 t)) (\lambda (t: T).(pr1 t3 t)) (pc1 t1 t3) (\lambda (x: -T).(\lambda (H2: (pr1 t2 x)).(\lambda (H3: (pr1 t3 x)).(let H4 \def H in -(ex2_ind T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) (pc1 t1 -t3) (\lambda (x0: T).(\lambda (H5: (pr1 t1 x0)).(\lambda (H6: (pr1 t2 -x0)).(ex2_ind T (\lambda (t: T).(pr1 x0 t)) (\lambda (t: T).(pr1 x t)) (pc1 -t1 t3) (\lambda (x1: T).(\lambda (H7: (pr1 x0 x1)).(\lambda (H8: (pr1 x -x1)).(ex_intro2 T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t3 t)) x1 -(pr1_t x0 t1 H5 x1 H7) (pr1_t x t3 H3 x1 H8))))) (pr1_confluence t2 x0 H6 x -H2))))) H4))))) H1)))))). - -lemma pc1_pr0_u2: - \forall (t0: T).(\forall (t1: T).((pr0 t0 t1) \to (\forall (t2: T).((pc1 t0 -t2) \to (pc1 t1 t2))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr0 t0 t1)).(\lambda (t2: -T).(\lambda (H0: (pc1 t0 t2)).(pc1_t t0 t1 (pc1_pr0_x t1 t0 H) t2 H0))))). - -theorem pc1_head: - \forall (u1: T).(\forall (u2: T).((pc1 u1 u2) \to (\forall (t1: T).(\forall -(t2: T).((pc1 t1 t2) \to (\forall (k: K).(pc1 (THead k u1 t1) (THead k u2 -t2)))))))) -\def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc1 u1 u2)).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H0: (pc1 t1 t2)).(\lambda (k: K).(pc1_t (THead -k u2 t1) (THead k u1 t1) (pc1_head_1 u1 u2 H t1 k) (THead k u2 t2) -(pc1_head_2 t1 t2 H0 u2 k)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/dec.ma deleted file mode 100644 index c8cca3131..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/dec.ma +++ /dev/null @@ -1,146 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/arity_props.ma". - -include "basic_1/nf2/fwd.ma". - -theorem pc3_dec: - \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c -u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to (or (pc3 c -u1 u2) ((pc3 c u1 u2) \to False))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda -(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c -u2 t2)).(let H_y \def (ty3_sn3 g c u1 t1 H) in (let H_y0 \def (ty3_sn3 g c u2 -t2 H0) in (let H_x \def (nf2_sn3 c u1 H_y) in (let H1 \def H_x in (ex2_ind T -(\lambda (u: T).(pr3 c u1 u)) (\lambda (u: T).(nf2 c u)) (or (pc3 c u1 u2) -((pc3 c u1 u2) \to False)) (\lambda (x: T).(\lambda (H2: (pr3 c u1 -x)).(\lambda (H3: (nf2 c x)).(let H_x0 \def (nf2_sn3 c u2 H_y0) in (let H4 -\def H_x0 in (ex2_ind T (\lambda (u: T).(pr3 c u2 u)) (\lambda (u: T).(nf2 c -u)) (or (pc3 c u1 u2) ((pc3 c u1 u2) \to False)) (\lambda (x0: T).(\lambda -(H5: (pr3 c u2 x0)).(\lambda (H6: (nf2 c x0)).(let H_x1 \def (term_dec x x0) -in (let H7 \def H_x1 in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: -Prop).P)) (or (pc3 c u1 u2) ((pc3 c u1 u2) \to False)) (\lambda (H8: (eq T x -x0)).(let H9 \def (eq_ind_r T x0 (\lambda (t: T).(nf2 c t)) H6 x H8) in (let -H10 \def (eq_ind_r T x0 (\lambda (t: T).(pr3 c u2 t)) H5 x H8) in (or_introl -(pc3 c u1 u2) ((pc3 c u1 u2) \to False) (pc3_pr3_t c u1 x H2 u2 H10))))) -(\lambda (H8: (((eq T x x0) \to (\forall (P: Prop).P)))).(or_intror (pc3 c u1 -u2) ((pc3 c u1 u2) \to False) (\lambda (H9: (pc3 c u1 u2)).(let H10 \def H9 -in (ex2_ind T (\lambda (t: T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c u2 t)) -False (\lambda (x1: T).(\lambda (H11: (pr3 c u1 x1)).(\lambda (H12: (pr3 c u2 -x1)).(let H_x2 \def (pr3_confluence c u2 x0 H5 x1 H12) in (let H13 \def H_x2 -in (ex2_ind T (\lambda (t: T).(pr3 c x0 t)) (\lambda (t: T).(pr3 c x1 t)) -False (\lambda (x2: T).(\lambda (H14: (pr3 c x0 x2)).(\lambda (H15: (pr3 c x1 -x2)).(let H_y1 \def (nf2_pr3_unfold c x0 x2 H14 H6) in (let H16 \def -(eq_ind_r T x2 (\lambda (t: T).(pr3 c x1 t)) H15 x0 H_y1) in (let H17 \def -(nf2_pr3_confluence c x H3 x0 H6 u1 H2) in (H8 (H17 (pr3_t x1 u1 c H11 x0 -H16)) False))))))) H13)))))) H10))))) H7)))))) H4)))))) H1)))))))))))). - -theorem pc3_abst_dec: - \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c -u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to (or (ex4_2 -T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) -(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) -(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda -(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) -\to False)))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda -(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c -u2 t2)).(let H1 \def (ty3_sn3 g c u1 t1 H) in (let H2 \def (ty3_sn3 g c u2 t2 -H0) in (let H_x \def (nf2_sn3 c u1 H1) in (let H3 \def H_x in (ex2_ind T -(\lambda (u: T).(pr3 c u1 u)) (\lambda (u: T).(nf2 c u)) (or (ex4_2 T T -(\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) -(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) -(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda -(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) -\to False))) (\lambda (x: T).(\lambda (H4: (pr3 c u1 x)).(\lambda (H5: (nf2 c -x)).(let H_x0 \def (nf2_sn3 c u2 H2) in (let H6 \def H_x0 in (ex2_ind T -(\lambda (u: T).(pr3 c u2 u)) (\lambda (u: T).(nf2 c u)) (or (ex4_2 T T -(\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) -(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) -(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda -(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) -\to False))) (\lambda (x0: T).(\lambda (H7: (pr3 c u2 x0)).(\lambda (H8: (nf2 -c x0)).(let H_x1 \def (abst_dec x x0) in (let H9 \def H_x1 in (or_ind (ex T -(\lambda (t: T).(eq T x (THead (Bind Abst) x0 t)))) (\forall (t: T).((eq T x -(THead (Bind Abst) x0 t)) \to (\forall (P: Prop).P))) (or (ex4_2 T T (\lambda -(u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) (\lambda (u: -T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) (\lambda (_: -T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c -v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) \to False))) -(\lambda (H10: (ex T (\lambda (t: T).(eq T x (THead (Bind Abst) x0 -t))))).(ex_ind T (\lambda (t: T).(eq T x (THead (Bind Abst) x0 t))) (or -(ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 -u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) -t1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: -T).(\lambda (v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind -Abst) u2 u)) \to False))) (\lambda (x1: T).(\lambda (H11: (eq T x (THead -(Bind Abst) x0 x1))).(let H12 \def (eq_ind T x (\lambda (t: T).(nf2 c t)) H5 -(THead (Bind Abst) x0 x1) H11) in (let H13 \def (eq_ind T x (\lambda (t: -T).(pr3 c u1 t)) H4 (THead (Bind Abst) x0 x1) H11) in (let H_y \def -(ty3_sred_pr3 c u1 (THead (Bind Abst) x0 x1) H13 g t1 H) in (or_introl (ex4_2 -T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) -(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) -(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda -(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) -\to False)) (ex4_2_intro T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead -(Bind Abst) u2 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind -Abst) v2 u) t1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda -(_: T).(\lambda (v2: T).(nf2 c v2))) x1 x0 (pc3_pr3_t c u1 (THead (Bind Abst) -x0 x1) H13 (THead (Bind Abst) u2 x1) (pr3_head_12 c u2 x0 H7 (Bind Abst) x1 -x1 (pr3_refl (CHead c (Bind Abst) x0) x1))) H_y H7 H8))))))) H10)) (\lambda -(H10: ((\forall (t: T).((eq T x (THead (Bind Abst) x0 t)) \to (\forall (P: -Prop).P))))).(or_intror (ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 -(THead (Bind Abst) u2 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead -(Bind Abst) v2 u) t1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) -(\lambda (_: T).(\lambda (v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 -(THead (Bind Abst) u2 u)) \to False)) (\lambda (u: T).(\lambda (H11: (pc3 c -u1 (THead (Bind Abst) u2 u))).(let H12 \def H11 in (ex2_ind T (\lambda (t: -T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 u) t)) False -(\lambda (x1: T).(\lambda (H13: (pr3 c u1 x1)).(\lambda (H14: (pr3 c (THead -(Bind Abst) u2 u) x1)).(ex2_ind T (\lambda (t: T).(pr3 c x1 t)) (\lambda (t: -T).(pr3 c x t)) False (\lambda (x2: T).(\lambda (H15: (pr3 c x1 x2)).(\lambda -(H16: (pr3 c x x2)).(let H_y \def (nf2_pr3_unfold c x x2 H16 H5) in (let H17 -\def (eq_ind_r T x2 (\lambda (t: T).(pr3 c x1 t)) H15 x H_y) in (let H18 \def -(pr3_gen_abst c u2 u x1 H14) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: -T).(eq T x1 (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr3 (CHead c (Bind b) u0) u t3))))) False (\lambda (x3: T).(\lambda -(x4: T).(\lambda (H19: (eq T x1 (THead (Bind Abst) x3 x4))).(\lambda (H20: -(pr3 c u2 x3)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c -(Bind b) u0) u x4))))).(let H22 \def (eq_ind T x1 (\lambda (t: T).(pr3 c t -x)) H17 (THead (Bind Abst) x3 x4) H19) in (let H23 \def (pr3_gen_abst c x3 x4 -x H22) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead -(Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c x3 u3))) -(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr3 (CHead -c (Bind b) u0) x4 t3))))) False (\lambda (x5: T).(\lambda (x6: T).(\lambda -(H24: (eq T x (THead (Bind Abst) x5 x6))).(\lambda (H25: (pr3 c x3 -x5)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) -u0) x4 x6))))).(let H27 \def (eq_ind T x (\lambda (t: T).(\forall (t0: -T).((eq T t (THead (Bind Abst) x0 t0)) \to (\forall (P: Prop).P)))) H10 -(THead (Bind Abst) x5 x6) H24) in (let H28 \def (eq_ind T x (\lambda (t: -T).(nf2 c t)) H5 (THead (Bind Abst) x5 x6) H24) in (let H29 \def -(nf2_gen_abst c x5 x6 H28) in (land_ind (nf2 c x5) (nf2 (CHead c (Bind Abst) -x5) x6) False (\lambda (H30: (nf2 c x5)).(\lambda (_: (nf2 (CHead c (Bind -Abst) x5) x6)).(let H32 \def (nf2_pr3_confluence c x0 H8 x5 H30 u2 H7) in -(H27 x6 (sym_eq T (THead (Bind Abst) x0 x6) (THead (Bind Abst) x5 x6) -(f_equal3 K T T T THead (Bind Abst) (Bind Abst) x0 x5 x6 x6 (refl_equal K -(Bind Abst)) (H32 (pr3_t x3 u2 c H20 x5 H25)) (refl_equal T x6))) False)))) -H29))))))))) H23)))))))) H18))))))) (pr3_confluence c u1 x1 H13 x H4))))) -H12)))))) H9)))))) H6)))))) H3)))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/defs.ma deleted file mode 100644 index a0c97231e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/defs.ma +++ /dev/null @@ -1,31 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/defs.ma". - -definition pc3: - C \to (T \to (T \to Prop)) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(ex2 T (\lambda (t: T).(pr3 -c t1 t)) (\lambda (t: T).(pr3 c t2 t))))). - -inductive pc3_left (c: C): T \to (T \to Prop) \def -| pc3_left_r: \forall (t: T).(pc3_left c t t) -| pc3_left_ur: \forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(t3: T).((pc3_left c t2 t3) \to (pc3_left c t1 t3))))) -| pc3_left_ux: \forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(t3: T).((pc3_left c t1 t3) \to (pc3_left c t2 t3))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/fsubst0.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/fsubst0.ma deleted file mode 100644 index 61df1500c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/fsubst0.ma +++ /dev/null @@ -1,697 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/left.ma". - -include "basic_1/fsubst0/fwd.ma". - -include "basic_1/csubst0/getl.ma". - -lemma pc3_pr2_fsubst0: - \forall (c1: C).(\forall (t1: T).(\forall (t: T).((pr2 c1 t1 t) \to (\forall -(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 -t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 -c2 t2 t))))))))))) -\def - \lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (pr2 c1 t1 -t)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: -nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t0 c2 -t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t3 -t2))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: -(pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: -T).(\lambda (H1: (fsubst0 i u c t2 c2 t0)).(fsubst0_ind i u c t2 (\lambda -(c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) -\to (pc3 c0 t4 t3))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 -t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) -u))).(or_ind (pr0 t4 t3) (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: -T).(subst0 i u t3 w2))) (pc3 c t4 t3) (\lambda (H4: (pr0 t4 t3)).(pc3_pr2_r c -t4 t3 (pr2_free c t4 t3 H4))) (\lambda (H4: (ex2 T (\lambda (w2: T).(pr0 t4 -w2)) (\lambda (w2: T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 -t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)) (pc3 c t4 t3) (\lambda (x: -T).(\lambda (H5: (pr0 t4 x)).(\lambda (H6: (subst0 i u t3 x)).(pc3_pr2_u c x -t4 (pr2_free c t4 x H5) t3 (pc3_pr2_x c x t3 (pr2_delta c e u i H3 t3 t3 -(pr0_refl t3) x H6)))))) H4)) (pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl -u))))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: -C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 -(pr2_free c0 t2 t3 H0)))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 -t4)).(\lambda (c0: C).(\lambda (H3: (csubst0 i u c c0)).(\lambda (e: -C).(\lambda (H4: (getl i c (CHead e (Bind Abbr) u))).(or_ind (pr0 t4 t3) (ex2 -T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2))) (pc3 c0 -t4 t3) (\lambda (H5: (pr0 t4 t3)).(pc3_pr2_r c0 t4 t3 (pr2_free c0 t4 t3 -H5))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: -T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t4 w2)) (\lambda -(w2: T).(subst0 i u t3 w2)) (pc3 c0 t4 t3) (\lambda (x: T).(\lambda (H6: (pr0 -t4 x)).(\lambda (H7: (subst0 i u t3 x)).(pc3_pr2_u c0 x t4 (pr2_free c0 t4 x -H6) t3 (pc3_pr2_x c0 x t3 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c -c0 u H3 (CHead e (Bind Abbr) u) H4) t3 t3 (pr0_refl t3) x H7)))))) H5)) -(pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl u))))))))) c2 t0 H1)))))))))) -(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: -T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 -t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: -T).(\lambda (H3: (fsubst0 i0 u0 c t2 c2 t4)).(fsubst0_ind i0 u0 c t2 (\lambda -(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) -u0)) \to (pc3 c0 t5 t0))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t2 -t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) -u0))).(pc3_t t2 c t5 (pc3_s c t5 t2 (pc3_pr2_r c t2 t5 (pr2_delta c e u0 i0 -H5 t2 t2 (pr0_refl t2) t5 H4))) t0 (pc3_pr2_r c t2 t0 (pr2_delta c d u i H0 -t2 t3 H1 t0 H2))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c -c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) -u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def -(csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind -(getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: -(getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i -H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) -u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) -(pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda -(x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: -(subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in -((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: -(eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t5: T).(subst0 (minus i0 -(S i)) u0 t5 x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c3: -C).(getl i c0 (CHead c3 (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r -B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in -(ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S -(plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda -(H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) -i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) -(\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in -(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 -x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead -e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 -t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda -(H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 -(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda -(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind -Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S -i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda -(x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead -x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) -x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def -(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | -(CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 with -[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind -b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B -Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda -(t5: T).(getl i c0 (CHead x2 (Bind x0) t5))) H10 u H14) in (let H18 \def -(eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H11 d -H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 -(Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 -t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))))).(ex4_5_ind B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: -(subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) -u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort -_) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) -\Rightarrow t5])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in -(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def -(eq_ind_r T x3 (\lambda (t5: T).(subst0 (minus i0 (S i)) u0 t5 x4)) H11 u -H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S -i)) u0 c3 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: -B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda -(t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S -i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 -t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let -H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: -nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x -t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta -c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) -u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 -u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: -(le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c -c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: -T).(\lambda (H4: (subst0 i0 u0 t2 t5)).(\lambda (c0: C).(\lambda (H5: -(csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind -Abbr) u0))).(lt_le_e i i0 (pc3 c0 t5 t0) (\lambda (H7: (lt i i0)).(let H8 -\def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in -(or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind -Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 -(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) -u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) -(pc3 c0 t5 t0) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u2 -c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 -(CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 -t0 (pr2_delta c0 d u i H9 t2 t3 H1 t0 H2)))) (\lambda (H9: (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 -(Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda -(H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda -(e0: C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow -c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in -((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: -(eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t6: T).(subst0 (minus i0 -(S i)) u0 t6 x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: -C).(getl i c0 (CHead c3 (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r -B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in -(ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S -(plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda -(H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) -i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) -(\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in -(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c -c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 -(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 -x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead -e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23)))))))) (subst0_subst0_back -t3 t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) -(\lambda (H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C -T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C -(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) -u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t5 t0) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 -(CHead x2 (Bind x0) x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 -x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t6) -\Rightarrow t6])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in -(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def -(eq_ind_r T x3 (\lambda (t6: T).(getl i c0 (CHead x2 (Bind x0) t6))) H11 u -H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S -i)) u0 c3 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: -B).(getl i c0 (CHead x2 (Bind b) u))) H18 Abbr H16) in (pc3_pr2_u2 c0 t2 t5 -(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e -(Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 -(pr2_delta c0 x2 u i H20 t2 t3 H1 t0 H2))))))))) H14)) H13))))))))) H9)) -(\lambda (H9: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 -e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) -(pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda -(x3: T).(\lambda (x4: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead -x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) -x4))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: -(csubst0 (minus i0 (S i)) u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in -((let H16 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H10) in (\lambda (H17: (eq B Abbr x0)).(\lambda (H18: -(eq C d x1)).(let H19 \def (eq_ind_r T x3 (\lambda (t6: T).(subst0 (minus i0 -(S i)) u0 t6 x4)) H12 u H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c3: -C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H13 d H18) in (let H21 \def (eq_ind_r -B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in -(ex2_ind T (\lambda (t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S -(plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda -(H22: (subst0 i x4 t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) -i)) u0 t0 x)).(let H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) -(\lambda (n: nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in -(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c -c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 -(pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t0 (pc3_pr2_x c0 -x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead -e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24)))))))) (subst0_subst0_back -t3 t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) -H8))) (\lambda (H7: (le i0 i)).(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 -(csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 -t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i -(csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 -H2))))))))))) c2 t4 H3)))))))))))))))) c1 t1 t H)))). - -lemma pc3_pr2_fsubst0_back: - \forall (c1: C).(\forall (t: T).(\forall (t1: T).((pr2 c1 t t1) \to (\forall -(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 -t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 -c2 t t2))))))))))) -\def - \lambda (c1: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (H: (pr2 c1 t -t1)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: -nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 c2 -t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t0 -t3))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: -(pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: -T).(\lambda (H1: (fsubst0 i u c t3 c2 t0)).(fsubst0_ind i u c t3 (\lambda -(c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) -\to (pc3 c0 t2 t4))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t3 -t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) -u))).(pc3_pr2_u c t3 t2 (pr2_free c t2 t3 H0) t4 (pc3_pr2_r c t3 t4 -(pr2_delta c e u i H3 t3 t3 (pr0_refl t3) t4 H2))))))) (\lambda (c0: -C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (_: (getl i c -(CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 (pr2_free c0 t2 t3 H0)))))) -(\lambda (t4: T).(\lambda (H2: (subst0 i u t3 t4)).(\lambda (c0: C).(\lambda -(H3: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (H4: (getl i c (CHead e -(Bind Abbr) u))).(pc3_pr2_u c0 t3 t2 (pr2_free c0 t2 t3 H0) t4 (pc3_pr2_r c0 -t3 t4 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c c0 u H3 (CHead e -(Bind Abbr) u) H4) t3 t3 (pr0_refl t3) t4 H2))))))))) c2 t0 H1)))))))))) -(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: -T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 -t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: -T).(\lambda (H3: (fsubst0 i0 u0 c t0 c2 t4)).(fsubst0_ind i0 u0 c t0 (\lambda -(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) -u0)) \to (pc3 c0 t2 t5))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t0 -t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) -u0))).(pc3_t t3 c t2 (pc3_pr3_r c t2 t3 (pr3_pr2 c t2 t3 (pr2_free c t2 t3 -H1))) t5 (pc3_pr3_r c t3 t5 (pr3_sing c t0 t3 (pr2_delta c d u i H0 t3 t3 -(pr0_refl t3) t0 H2) t5 (pr3_pr2 c t0 t5 (pr2_delta c e u0 i0 H5 t0 t0 -(pr0_refl t0) t5 H4))))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c -c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) -u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def -(csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind -(getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: -(getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i -H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) -u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) -(pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda -(x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: -(subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in -((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: -(eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t5: T).(subst0 (minus i0 -(S i)) u0 t5 x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c3: -C).(getl i c0 (CHead c3 (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r -B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in -(ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S -(plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda -(H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) -i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) -(\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in -(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 -x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead -e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 -t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda -(H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 -(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda -(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind -Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S -i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda -(x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead -x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) -x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def -(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | -(CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 with -[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind -b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B -Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda -(t5: T).(getl i c0 (CHead x2 (Bind x0) t5))) H10 u H14) in (let H18 \def -(eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H11 d -H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 -(Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 -t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))))).(ex4_5_ind B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: -(subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) -u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort -_) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) -\Rightarrow t5])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in -(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def -(eq_ind_r T x3 (\lambda (t5: T).(subst0 (minus i0 (S i)) u0 t5 x4)) H11 u -H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S -i)) u0 c3 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: -B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda -(t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S -i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 -t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let -H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: -nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x -t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta -c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) -u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 -u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: -(le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c -c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: -T).(\lambda (H4: (subst0 i0 u0 t0 t5)).(\lambda (c0: C).(\lambda (H5: -(csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind -Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t5) (\lambda (H7: (lt i i0)).(let H8 -\def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in -(or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind -Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 -(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) -u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) -(pc3 c0 t2 t5) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u -c0 t3 t2 (pr2_free c0 t2 t3 H1) t5 (pc3_pr3_r c0 t3 t5 (pr3_sing c0 t0 t3 -(pr2_delta c0 d u i H9 t3 t3 (pr0_refl t3) t0 H2) t5 (pr3_pr2 c0 t0 t5 -(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e -(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))) (\lambda (H9: (ex3_4 B C -T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) -u0 u1 w))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 -(Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda -(H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda -(e0: C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow -c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in -((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: -(eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t6: T).(subst0 (minus i0 -(S i)) u0 t6 x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: -C).(getl i c0 (CHead c3 (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r -B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in -(ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S -(plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda -(H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) -i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) -(\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in -(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t5 (pc3_pr2_u2 c0 -t0 x (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead -e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23) t5 (pc3_pr2_r c0 t0 t5 -(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e -(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 -t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) (\lambda -(H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 -(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda -(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind -Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S -i)) u0 e1 e2))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda -(x2: C).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead -x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) -x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def -(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | -(CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 with -[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind -b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H16: (eq B -Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda -(t6: T).(getl i c0 (CHead x2 (Bind x0) t6))) H11 u H15) in (let H19 \def -(eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H12 d -H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 -(Bind b) u))) H18 Abbr H16) in (pc3_pr2_u c0 t0 t2 (pr2_delta c0 x2 u i H20 -t2 t3 H1 t0 H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge -i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) -t5 H4))))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))))).(ex4_5_ind B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t5) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H12: -(subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: (csubst0 (minus i0 (S i)) -u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort -_) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C B (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H16 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t6) -\Rightarrow t6])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in -(\lambda (H17: (eq B Abbr x0)).(\lambda (H18: (eq C d x1)).(let H19 \def -(eq_ind_r T x3 (\lambda (t6: T).(subst0 (minus i0 (S i)) u0 t6 x4)) H12 u -H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S -i)) u0 c3 x2)) H13 d H18) in (let H21 \def (eq_ind_r B x0 (\lambda (b: -B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in (ex2_ind T (\lambda -(t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S -i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda (H22: (subst0 i x4 -t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let -H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: -nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u c0 x -t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t5 (pc3_pr2_u2 c0 t0 x -(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e -(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24) t5 (pc3_pr2_r c0 t0 t5 -(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e -(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 -t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) H8))) -(\lambda (H7: (le i0 i)).(pc3_pr2_u c0 t0 t2 (pr2_delta c0 d u i -(csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 -H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n -i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 -H4))))))))))) c2 t4 H3)))))))))))))))) c1 t t1 H)))). - -lemma pc3_fsubst0: - \forall (c1: C).(\forall (t1: T).(\forall (t: T).((pc3 c1 t1 t) \to (\forall -(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 -t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 -c2 t2 t))))))))))) -\def - \lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (pc3 c1 t1 -t)).(pc3_ind_left c1 (\lambda (t0: T).(\lambda (t2: T).(\forall (i: -nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c1 t0 c2 -t3) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c2 t3 -t2)))))))))) (\lambda (t0: T).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: -C).(\lambda (t2: T).(\lambda (H0: (fsubst0 i u c1 t0 c2 t2)).(fsubst0_ind i u -c1 t0 (\lambda (c: C).(\lambda (t3: T).(\forall (e: C).((getl i c1 (CHead e -(Bind Abbr) u)) \to (pc3 c t3 t0))))) (\lambda (t3: T).(\lambda (H1: (subst0 -i u t0 t3)).(\lambda (e: C).(\lambda (H2: (getl i c1 (CHead e (Bind Abbr) -u))).(pc3_pr2_x c1 t3 t0 (pr2_delta c1 e u i H2 t0 t0 (pr0_refl t0) t3 -H1)))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c1 c0)).(\lambda (e: -C).(\lambda (_: (getl i c1 (CHead e (Bind Abbr) u))).(pc3_refl c0 t0))))) -(\lambda (t3: T).(\lambda (H1: (subst0 i u t0 t3)).(\lambda (c0: C).(\lambda -(H2: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H3: (getl i c1 (CHead e -(Bind Abbr) u))).(pc3_pr2_x c0 t3 t0 (pr2_delta c0 e u i (csubst0_getl_ge i i -(le_n i) c1 c0 u H2 (CHead e (Bind Abbr) u) H3) t0 t0 (pr0_refl t0) t3 -H1)))))))) c2 t2 H0))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda (H0: -(pr2 c1 t0 t2)).(\lambda (t3: T).(\lambda (H1: (pc3 c1 t2 t3)).(\lambda (H2: -((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: -T).((fsubst0 i u c1 t2 c2 t4) \to (\forall (e: C).((getl i c1 (CHead e (Bind -Abbr) u)) \to (pc3 c2 t4 t3)))))))))).(\lambda (i: nat).(\lambda (u: -T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H3: (fsubst0 i u c1 t0 c2 -t4)).(fsubst0_ind i u c1 t0 (\lambda (c: C).(\lambda (t5: T).(\forall (e: -C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c t5 t3))))) (\lambda (t5: -T).(\lambda (H4: (subst0 i u t0 t5)).(\lambda (e: C).(\lambda (H5: (getl i c1 -(CHead e (Bind Abbr) u))).(pc3_t t2 c1 t5 (pc3_pr2_fsubst0 c1 t0 t2 H0 i u c1 -t5 (fsubst0_snd i u c1 t0 t5 H4) e H5) t3 H1))))) (\lambda (c0: C).(\lambda -(H4: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H5: (getl i c1 (CHead e -(Bind Abbr) u))).(pc3_t t2 c0 t0 (pc3_pr2_fsubst0 c1 t0 t2 H0 i u c0 t0 -(fsubst0_fst i u c1 t0 c0 H4) e H5) t3 (H2 i u c0 t2 (fsubst0_fst i u c1 t2 -c0 H4) e H5)))))) (\lambda (t5: T).(\lambda (H4: (subst0 i u t0 t5)).(\lambda -(c0: C).(\lambda (H5: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H6: -(getl i c1 (CHead e (Bind Abbr) u))).(pc3_t t2 c0 t5 (pc3_pr2_fsubst0 c1 t0 -t2 H0 i u c0 t5 (fsubst0_both i u c1 t0 t5 H4 c0 H5) e H6) t3 (H2 i u c0 t2 -(fsubst0_fst i u c1 t2 c0 H5) e H6)))))))) c2 t4 H3)))))))))))) (\lambda (t0: -T).(\lambda (t2: T).(\lambda (H0: (pr2 c1 t0 t2)).(\lambda (t3: T).(\lambda -(H1: (pc3 c1 t0 t3)).(\lambda (H2: ((\forall (i: nat).(\forall (u: -T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u c1 t0 c2 t4) \to (\forall -(e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c2 t4 -t3)))))))))).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t4: -T).(\lambda (H3: (fsubst0 i u c1 t2 c2 t4)).(fsubst0_ind i u c1 t2 (\lambda -(c: C).(\lambda (t5: T).(\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) -\to (pc3 c t5 t3))))) (\lambda (t5: T).(\lambda (H4: (subst0 i u t2 -t5)).(\lambda (e: C).(\lambda (H5: (getl i c1 (CHead e (Bind Abbr) -u))).(pc3_t t0 c1 t5 (pc3_s c1 t5 t0 (pc3_pr2_fsubst0_back c1 t0 t2 H0 i u c1 -t5 (fsubst0_snd i u c1 t2 t5 H4) e H5)) t3 H1))))) (\lambda (c0: C).(\lambda -(H4: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H5: (getl i c1 (CHead e -(Bind Abbr) u))).(pc3_t t0 c0 t2 (pc3_s c0 t2 t0 (pc3_pr2_fsubst0_back c1 t0 -t2 H0 i u c0 t2 (fsubst0_fst i u c1 t2 c0 H4) e H5)) t3 (H2 i u c0 t0 -(fsubst0_fst i u c1 t0 c0 H4) e H5)))))) (\lambda (t5: T).(\lambda (H4: -(subst0 i u t2 t5)).(\lambda (c0: C).(\lambda (H5: (csubst0 i u c1 -c0)).(\lambda (e: C).(\lambda (H6: (getl i c1 (CHead e (Bind Abbr) -u))).(pc3_t t0 c0 t5 (pc3_s c0 t5 t0 (pc3_pr2_fsubst0_back c1 t0 t2 H0 i u c0 -t5 (fsubst0_both i u c1 t2 t5 H4 c0 H5) e H6)) t3 (H2 i u c0 t0 (fsubst0_fst -i u c1 t0 c0 H5) e H6)))))))) c2 t4 H3)))))))))))) t1 t H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/fwd.ma deleted file mode 100644 index 99239c2a7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/fwd.ma +++ /dev/null @@ -1,304 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/props.ma". - -lemma pc3_gen_sort: - \forall (c: C).(\forall (m: nat).(\forall (n: nat).((pc3 c (TSort m) (TSort -n)) \to (eq nat m n)))) -\def - \lambda (c: C).(\lambda (m: nat).(\lambda (n: nat).(\lambda (H: (pc3 c -(TSort m) (TSort n))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c -(TSort m) t)) (\lambda (t: T).(pr3 c (TSort n) t)) (eq nat m n) (\lambda (x: -T).(\lambda (H1: (pr3 c (TSort m) x)).(\lambda (H2: (pr3 c (TSort n) x)).(let -H3 \def (eq_ind T x (\lambda (t: T).(eq T t (TSort n))) (pr3_gen_sort c x n -H2) (TSort m) (pr3_gen_sort c x m H1)) in (let H4 \def (f_equal T nat -(\lambda (e: T).(match e with [(TSort n0) \Rightarrow n0 | (TLRef _) -\Rightarrow m | (THead _ _ _) \Rightarrow m])) (TSort m) (TSort n) H3) in -H4))))) H0))))). - -lemma pc3_gen_abst: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).(\forall (t1: T).(\forall -(t2: T).((pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2)) \to -(land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) -t1 t2))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (H: (pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 -t2))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Abst) -u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (land (pc3 c -u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) -(\lambda (x: T).(\lambda (H1: (pr3 c (THead (Bind Abst) u1 t1) x)).(\lambda -(H2: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H3 \def (pr3_gen_abst c u2 t2 -x H2) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead -(Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) -(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead -c (Bind b) u) t2 t3))))) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: -T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H4: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H5: (pr3 c u2 -x0)).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -t2 x1))))).(let H7 \def (pr3_gen_abst c u1 t1 x H1) in (ex3_2_ind T T -(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t3))))) -(land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) -t1 t2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H8: (eq T x (THead -(Bind Abst) x2 x3))).(\lambda (H9: (pr3 c u1 x2)).(\lambda (H10: ((\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 x3))))).(let H11 \def -(eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Abst) x0 x1))) H4 (THead -(Bind Abst) x2 x3) H8) in (let H12 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ t _) -\Rightarrow t])) (THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in -((let H13 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x3 | (TLRef _) \Rightarrow x3 | (THead _ _ t) \Rightarrow t])) -(THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in (\lambda (H14: -(eq T x2 x0)).(let H15 \def (eq_ind T x3 (\lambda (t: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t)))) H10 x1 H13) in (let H16 -\def (eq_ind T x2 (\lambda (t: T).(pr3 c u1 t)) H9 x0 H14) in (conj (pc3 c u1 -u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2))) -(pc3_pr3_t c u1 x0 H16 u2 H5) (\lambda (b: B).(\lambda (u: T).(pc3_pr3_t -(CHead c (Bind b) u) t1 x1 (H15 b u) t2 (H6 b u))))))))) H12)))))))) -H7))))))) H3))))) H0))))))). - -lemma pc3_gen_abst_shift: - \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).((pc3 c -(THead (Bind Abst) u t1) (THead (Bind Abst) u t2)) \to (pc3 (CHead c (Bind -Abst) u) t1 t2))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pc3 c (THead (Bind Abst) u t1) (THead (Bind Abst) u t2))).(let H_x \def -(pc3_gen_abst c u u t1 t2 H) in (let H0 \def H_x in (land_ind (pc3 c u u) -(\forall (b: B).(\forall (u0: T).(pc3 (CHead c (Bind b) u0) t1 t2))) (pc3 -(CHead c (Bind Abst) u) t1 t2) (\lambda (_: (pc3 c u u)).(\lambda (H2: -((\forall (b: B).(\forall (u0: T).(pc3 (CHead c (Bind b) u0) t1 t2))))).(H2 -Abst u))) H0))))))). - -lemma pc3_gen_lift: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (h: nat).(\forall -(d: nat).((pc3 c (lift h d t1) (lift h d t2)) \to (\forall (e: C).((drop h d -c e) \to (pc3 e t1 t2)))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (H: (pc3 c (lift h d t1) (lift h d t2))).(\lambda (e: -C).(\lambda (H0: (drop h d c e)).(let H1 \def H in (ex2_ind T (\lambda (t: -T).(pr3 c (lift h d t1) t)) (\lambda (t: T).(pr3 c (lift h d t2) t)) (pc3 e -t1 t2) (\lambda (x: T).(\lambda (H2: (pr3 c (lift h d t1) x)).(\lambda (H3: -(pr3 c (lift h d t2) x)).(let H4 \def (pr3_gen_lift c t2 x h d H3 e H0) in -(ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr3 e -t2 t3)) (pc3 e t1 t2) (\lambda (x0: T).(\lambda (H5: (eq T x (lift h d -x0))).(\lambda (H6: (pr3 e t2 x0)).(let H7 \def (pr3_gen_lift c t1 x h d H2 e -H0) in (ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: -T).(pr3 e t1 t3)) (pc3 e t1 t2) (\lambda (x1: T).(\lambda (H8: (eq T x (lift -h d x1))).(\lambda (H9: (pr3 e t1 x1)).(let H10 \def (eq_ind T x (\lambda (t: -T).(eq T t (lift h d x0))) H5 (lift h d x1) H8) in (let H11 \def (eq_ind T x1 -(\lambda (t: T).(pr3 e t1 t)) H9 x0 (lift_inj x1 x0 h d H10)) in (pc3_pr3_t e -t1 x0 H11 t2 H6)))))) H7))))) H4))))) H1))))))))). - -lemma pc3_gen_not_abst: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (t1: -T).(\forall (t2: T).(\forall (u1: T).(\forall (u2: T).((pc3 c (THead (Bind b) -u1 t1) (THead (Bind Abst) u2 t2)) \to (pc3 (CHead c (Bind b) u1) t1 (lift (S -O) O (THead (Bind Abst) u2 t2)))))))))) -\def - \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall -(c: C).(\forall (t1: T).(\forall (t2: T).(\forall (u1: T).(\forall (u2: -T).((pc3 c (THead (Bind b0) u1 t1) (THead (Bind Abst) u2 t2)) \to (pc3 (CHead -c (Bind b0) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))))))))))) (\lambda -(_: (not (eq B Abbr Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Abbr) -u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: -T).(pr3 c (THead (Bind Abbr) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind -Abst) u2 t2) t)) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind -Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Abbr) u1 t1) -x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def -(pr3_gen_abbr c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda -(t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) -u1) t1 t3)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (pc3 (CHead -c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (H5: -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3))))).(ex3_2_ind T T -(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda -(t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3))) (pc3 (CHead c (Bind Abbr) u1) -t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H6: (eq T x (THead (Bind Abbr) x0 x1))).(\lambda (_: (pr3 c u1 -x0)).(\lambda (_: (pr3 (CHead c (Bind Abbr) u1) t1 x1)).(let H9 \def -(pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: -T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 -c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: -T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Abbr) u1) t1 -(lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: -T).(\lambda (H10: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 -x2)).(\lambda (_: ((\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) -u) t2 x3))))).(let H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind -Abbr) x0 x1))) H6 (THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T -(THead (Bind Abst) x2 x3) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind b0) \Rightarrow (match b0 with [Abbr \Rightarrow False | -Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow -False])])) I (THead (Bind Abbr) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind -Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) -H5)) (\lambda (H5: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))).(let -H6 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c -(Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 -x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda (H9: ((\forall (b0: B).(\forall -(u: T).(pr3 (CHead c (Bind b0) u) t2 x1))))).(let H10 \def (eq_ind T x -(\lambda (t: T).(pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O t))) H5 (THead -(Bind Abst) x0 x1) H7) in (pc3_pr3_t (CHead c (Bind Abbr) u1) t1 (lift (S O) -O (THead (Bind Abst) x0 x1)) H10 (lift (S O) O (THead (Bind Abst) u2 t2)) -(pr3_lift (CHead c (Bind Abbr) u1) c (S O) O (drop_drop (Bind Abbr) O c c -(drop_refl c) u1) (THead (Bind Abst) u2 t2) (THead (Bind Abst) x0 x1) -(pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 Abst x0)))))))))) H6))) H4))))) -H1))))))))) (\lambda (H: (not (eq B Abst Abst))).(\lambda (c: C).(\lambda -(t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pc3 -c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def (match -(H (refl_equal B Abst)) in False with []) in H1)))))))) (\lambda (_: (not (eq -B Void Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Void) u1 t1) -(THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: -T).(pr3 c (THead (Bind Void) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind -Abst) u2 t2) t)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind -Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Void) u1 t1) -x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def -(pr3_gen_void c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda -(t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall -(u: T).(pr3 (CHead c (Bind b0) u) t1 t3)))))) (pr3 (CHead c (Bind Void) u1) -t1 (lift (S O) O x)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead -(Bind Abst) u2 t2))) (\lambda (H5: (ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 -c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: -T).(pr3 (CHead c (Bind b0) u) t1 t3))))))).(ex3_2_ind T T (\lambda (u3: -T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t3))))) (pc3 (CHead c -(Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H6: (eq T x (THead (Bind Void) x0 -x1))).(\lambda (_: (pr3 c u1 x0)).(\lambda (_: ((\forall (b0: B).(\forall (u: -T).(pr3 (CHead c (Bind b0) u) t1 x1))))).(let H9 \def (pr3_gen_abst c u2 t2 x -H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind -Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) -u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind -Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq T x -(THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 x2)).(\lambda (_: -((\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 x3))))).(let -H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Void) x0 x1))) H6 -(THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T (THead (Bind Abst) -x2 x3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind b0) -\Rightarrow (match b0 with [Abbr \Rightarrow False | Abst \Rightarrow True | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind -Void) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) -O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) H5)) (\lambda (H5: (pr3 -(CHead c (Bind Void) u1) t1 (lift (S O) O x))).(let H6 \def (pr3_gen_abst c -u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x -(THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) -(\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead -c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O -(THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: -(eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda -(H9: ((\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 -x1))))).(let H10 \def (eq_ind T x (\lambda (t: T).(pr3 (CHead c (Bind Void) -u1) t1 (lift (S O) O t))) H5 (THead (Bind Abst) x0 x1) H7) in (pc3_pr3_t -(CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) x0 x1)) H10 -(lift (S O) O (THead (Bind Abst) u2 t2)) (pr3_lift (CHead c (Bind Void) u1) c -(S O) O (drop_drop (Bind Void) O c c (drop_refl c) u1) (THead (Bind Abst) u2 -t2) (THead (Bind Abst) x0 x1) (pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 -Abst x0)))))))))) H6))) H4))))) H1))))))))) b). - -lemma pc3_gen_lift_abst: - \forall (c: C).(\forall (t: T).(\forall (t2: T).(\forall (u2: T).(\forall -(h: nat).(\forall (d: nat).((pc3 c (lift h d t) (THead (Bind Abst) u2 t2)) -\to (\forall (e: C).((drop h d c e) \to (ex3_2 T T (\lambda (u1: T).(\lambda -(t1: T).(pr3 e t (THead (Bind Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: -T).(pr3 c u2 (lift h d u1)))) (\lambda (_: T).(\lambda (t1: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) -t1))))))))))))))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda -(h: nat).(\lambda (d: nat).(\lambda (H: (pc3 c (lift h d t) (THead (Bind -Abst) u2 t2))).(\lambda (e: C).(\lambda (H0: (drop h d c e)).(let H1 \def H -in (ex2_ind T (\lambda (t0: T).(pr3 c (lift h d t) t0)) (\lambda (t0: T).(pr3 -c (THead (Bind Abst) u2 t2) t0)) (ex3_2 T T (\lambda (u1: T).(\lambda (t1: -T).(pr3 e t (THead (Bind Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: -T).(pr3 c u2 (lift h d u1)))) (\lambda (_: T).(\lambda (t1: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) t1))))))) -(\lambda (x: T).(\lambda (H2: (pr3 c (lift h d t) x)).(\lambda (H3: (pr3 c -(THead (Bind Abst) u2 t2) x)).(let H4 \def (pr3_gen_lift c t x h d H2 e H0) -in (ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr3 -e t t3)) (ex3_2 T T (\lambda (u1: T).(\lambda (t1: T).(pr3 e t (THead (Bind -Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: T).(pr3 c u2 (lift h d u1)))) -(\lambda (_: T).(\lambda (t1: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead -c (Bind b) u) t2 (lift h (S d) t1))))))) (\lambda (x0: T).(\lambda (H5: (eq T -x (lift h d x0))).(\lambda (H6: (pr3 e t x0)).(let H7 \def (pr3_gen_abst c u2 -t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead -(Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) -(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead -c (Bind b) u) t2 t3))))) (ex3_2 T T (\lambda (u1: T).(\lambda (t1: T).(pr3 e -t (THead (Bind Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: T).(pr3 c u2 -(lift h d u1)))) (\lambda (_: T).(\lambda (t1: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) t1))))))) (\lambda (x1: -T).(\lambda (x2: T).(\lambda (H8: (eq T x (THead (Bind Abst) x1 -x2))).(\lambda (H9: (pr3 c u2 x1)).(\lambda (H10: ((\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) t2 x2))))).(let H11 \def (eq_ind T x -(\lambda (t0: T).(eq T t0 (lift h d x0))) H5 (THead (Bind Abst) x1 x2) H8) in -(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x0 (THead (Bind Abst) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T x1 (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T x2 (lift h (S d) z)))) (ex3_2 T T (\lambda (u1: -T).(\lambda (t1: T).(pr3 e t (THead (Bind Abst) u1 t1)))) (\lambda (u1: -T).(\lambda (_: T).(pr3 c u2 (lift h d u1)))) (\lambda (_: T).(\lambda (t1: -T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) -t1))))))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq T x0 (THead -(Bind Abst) x3 x4))).(\lambda (H13: (eq T x1 (lift h d x3))).(\lambda (H14: -(eq T x2 (lift h (S d) x4))).(let H15 \def (eq_ind T x2 (\lambda (t0: -T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 t0)))) H10 -(lift h (S d) x4) H14) in (let H16 \def (eq_ind T x1 (\lambda (t0: T).(pr3 c -u2 t0)) H9 (lift h d x3) H13) in (let H17 \def (eq_ind T x0 (\lambda (t0: -T).(pr3 e t t0)) H6 (THead (Bind Abst) x3 x4) H12) in (ex3_2_intro T T -(\lambda (u1: T).(\lambda (t1: T).(pr3 e t (THead (Bind Abst) u1 t1)))) -(\lambda (u1: T).(\lambda (_: T).(pr3 c u2 (lift h d u1)))) (\lambda (_: -T).(\lambda (t1: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -t2 (lift h (S d) t1)))))) x3 x4 H17 H16 H15))))))))) (lift_gen_bind Abst x1 -x2 x0 h d H11)))))))) H7))))) H4))))) H1)))))))))). - -lemma pc3_gen_sort_abst: - \forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (n: nat).((pc3 c -(TSort n) (THead (Bind Abst) u t)) \to (\forall (P: Prop).P))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (n: nat).(\lambda -(H: (pc3 c (TSort n) (THead (Bind Abst) u t))).(\lambda (P: Prop).(let H0 -\def H in (ex2_ind T (\lambda (t0: T).(pr3 c (TSort n) t0)) (\lambda (t0: -T).(pr3 c (THead (Bind Abst) u t) t0)) P (\lambda (x: T).(\lambda (H1: (pr3 c -(TSort n) x)).(\lambda (H2: (pr3 c (THead (Bind Abst) u t) x)).(let H3 \def -(pr3_gen_abst c u t x H2) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u0: -T).(pr3 (CHead c (Bind b) u0) t t2))))) P (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H4: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (_: (pr3 c u -x0)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) -u0) t x1))))).(let H7 \def (eq_ind T x (\lambda (t0: T).(eq T t0 (TSort n))) -(pr3_gen_sort c x n H1) (THead (Bind Abst) x0 x1) H4) in (let H8 \def (eq_ind -T (THead (Bind Abst) x0 x1) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H7) in (False_ind P H8)))))))) H3))))) H0))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/left.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/left.ma deleted file mode 100644 index 579d42b24..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/left.ma +++ /dev/null @@ -1,117 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/props.ma". - -implied rec lemma pc3_left_ind (c: C) (P: (T \to (T \to Prop))) (f: (\forall -(t: T).(P t t))) (f0: (\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to -(\forall (t3: T).((pc3_left c t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) (f1: -(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (t3: -T).((pc3_left c t1 t3) \to ((P t1 t3) \to (P t2 t3)))))))) (t: T) (t0: T) (p: -pc3_left c t t0) on p: P t t0 \def match p with [(pc3_left_r t1) \Rightarrow -(f t1) | (pc3_left_ur t1 t2 p0 t3 p1) \Rightarrow (f0 t1 t2 p0 t3 p1 -((pc3_left_ind c P f f0 f1) t2 t3 p1)) | (pc3_left_ux t1 t2 p0 t3 p1) -\Rightarrow (f1 t1 t2 p0 t3 p1 ((pc3_left_ind c P f f0 f1) t1 t3 p1))]. - -fact pc3_ind_left__pc3_left_pr3: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to -(pc3_left c t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(pc3_left c t t0))) (\lambda -(t: T).(pc3_left_r c t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 -c t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: -(pc3_left c t0 t4)).(pc3_left_ur c t3 t0 H0 t4 H2))))))) t1 t2 H)))). - -fact pc3_ind_left__pc3_left_trans: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3_left c t1 t2) \to -(\forall (t3: T).((pc3_left c t2 t3) \to (pc3_left c t1 t3)))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3_left c t1 -t2)).(pc3_left_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t3: -T).((pc3_left c t0 t3) \to (pc3_left c t t3))))) (\lambda (t: T).(\lambda -(t3: T).(\lambda (H0: (pc3_left c t t3)).H0))) (\lambda (t0: T).(\lambda (t3: -T).(\lambda (H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t3 -t4)).(\lambda (H2: ((\forall (t5: T).((pc3_left c t4 t5) \to (pc3_left c t3 -t5))))).(\lambda (t5: T).(\lambda (H3: (pc3_left c t4 t5)).(pc3_left_ur c t0 -t3 H0 t5 (H2 t5 H3)))))))))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: -(pr2 c t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t0 t4)).(\lambda -(H2: ((\forall (t5: T).((pc3_left c t4 t5) \to (pc3_left c t0 -t5))))).(\lambda (t5: T).(\lambda (H3: (pc3_left c t4 t5)).(pc3_left_ux c t0 -t3 H0 t5 (H2 t5 H3)))))))))) t1 t2 H)))). - -fact pc3_ind_left__pc3_left_sym: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3_left c t1 t2) \to -(pc3_left c t2 t1)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3_left c t1 -t2)).(pc3_left_ind c (\lambda (t: T).(\lambda (t0: T).(pc3_left c t0 t))) -(\lambda (t: T).(pc3_left_r c t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda -(H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t3 -t4)).(\lambda (H2: (pc3_left c t4 t3)).(pc3_ind_left__pc3_left_trans c t4 t3 -H2 t0 (pc3_left_ux c t0 t3 H0 t0 (pc3_left_r c t0))))))))) (\lambda (t0: -T).(\lambda (t3: T).(\lambda (H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda -(_: (pc3_left c t0 t4)).(\lambda (H2: (pc3_left c t4 -t0)).(pc3_ind_left__pc3_left_trans c t4 t0 H2 t3 (pc3_left_ur c t0 t3 H0 t3 -(pc3_left_r c t3))))))))) t1 t2 H)))). - -fact pc3_ind_left__pc3_left_pc3: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to -(pc3_left c t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 -t2)).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: -T).(pr3 c t2 t)) (pc3_left c t1 t2) (\lambda (x: T).(\lambda (H1: (pr3 c t1 -x)).(\lambda (H2: (pr3 c t2 x)).(pc3_ind_left__pc3_left_trans c t1 x -(pc3_ind_left__pc3_left_pr3 c t1 x H1) t2 (pc3_ind_left__pc3_left_sym c t2 x -(pc3_ind_left__pc3_left_pr3 c t2 x H2)))))) H0))))). - -fact pc3_ind_left__pc3_pc3_left: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3_left c t1 t2) \to -(pc3 c t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3_left c t1 -t2)).(pc3_left_ind c (\lambda (t: T).(\lambda (t0: T).(pc3 c t t0))) (\lambda -(t: T).(pc3_refl c t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c -t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t3 t4)).(\lambda (H2: (pc3 -c t3 t4)).(pc3_t t3 c t0 (pc3_pr2_r c t0 t3 H0) t4 H2))))))) (\lambda (t0: -T).(\lambda (t3: T).(\lambda (H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda -(_: (pc3_left c t0 t4)).(\lambda (H2: (pc3 c t0 t4)).(pc3_t t0 c t3 -(pc3_pr2_x c t3 t0 H0) t4 H2))))))) t1 t2 H)))). - -lemma pc3_ind_left: - \forall (c: C).(\forall (P: ((T \to (T \to Prop)))).(((\forall (t: T).(P t -t))) \to (((\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (t3: -T).((pc3 c t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) \to (((\forall (t1: -T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (t3: T).((pc3 c t1 t3) \to -((P t1 t3) \to (P t2 t3)))))))) \to (\forall (t: T).(\forall (t0: T).((pc3 c -t t0) \to (P t t0)))))))) -\def - \lambda (c: C).(\lambda (P: ((T \to (T \to Prop)))).(\lambda (H: ((\forall -(t: T).(P t t)))).(\lambda (H0: ((\forall (t1: T).(\forall (t2: T).((pr2 c t1 -t2) \to (\forall (t3: T).((pc3 c t2 t3) \to ((P t2 t3) \to (P t1 -t3))))))))).(\lambda (H1: ((\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) -\to (\forall (t3: T).((pc3 c t1 t3) \to ((P t1 t3) \to (P t2 -t3))))))))).(\lambda (t: T).(\lambda (t0: T).(\lambda (H2: (pc3 c t -t0)).(pc3_left_ind c (\lambda (t1: T).(\lambda (t2: T).(P t1 t2))) H (\lambda -(t1: T).(\lambda (t2: T).(\lambda (H3: (pr2 c t1 t2)).(\lambda (t3: -T).(\lambda (H4: (pc3_left c t2 t3)).(\lambda (H5: (P t2 t3)).(H0 t1 t2 H3 t3 -(pc3_ind_left__pc3_pc3_left c t2 t3 H4) H5))))))) (\lambda (t1: T).(\lambda -(t2: T).(\lambda (H3: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda (H4: (pc3_left -c t1 t3)).(\lambda (H5: (P t1 t3)).(H1 t1 t2 H3 t3 -(pc3_ind_left__pc3_pc3_left c t1 t3 H4) H5))))))) t t0 -(pc3_ind_left__pc3_left_pc3 c t t0 H2))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/nf2.ma deleted file mode 100644 index 3ce4180a1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/nf2.ma +++ /dev/null @@ -1,46 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/defs.ma". - -include "basic_1/nf2/pr3.ma". - -lemma pc3_nf2: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to ((nf2 c -t1) \to ((nf2 c t2) \to (eq T t1 t2)))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 -t2)).(\lambda (H0: (nf2 c t1)).(\lambda (H1: (nf2 c t2)).(let H2 \def H in -(ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (eq T -t1 t2) (\lambda (x: T).(\lambda (H3: (pr3 c t1 x)).(\lambda (H4: (pr3 c t2 -x)).(let H_y \def (nf2_pr3_unfold c t1 x H3 H0) in (let H5 \def (eq_ind_r T x -(\lambda (t: T).(pr3 c t2 t)) H4 t1 H_y) in (let H6 \def (eq_ind_r T x -(\lambda (t: T).(pr3 c t1 t)) H3 t1 H_y) in (let H_y0 \def (nf2_pr3_unfold c -t2 t1 H5 H1) in (let H7 \def (eq_ind T t2 (\lambda (t: T).(pr3 c t t1)) H5 t1 -H_y0) in (eq_ind_r T t1 (\lambda (t: T).(eq T t1 t)) (refl_equal T t1) t2 -H_y0))))))))) H2))))))). - -lemma pc3_nf2_unfold: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to ((nf2 c -t2) \to (pr3 c t1 t2))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 -t2)).(\lambda (H0: (nf2 c t2)).(let H1 \def H in (ex2_ind T (\lambda (t: -T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (pr3 c t1 t2) (\lambda (x: -T).(\lambda (H2: (pr3 c t1 x)).(\lambda (H3: (pr3 c t2 x)).(let H_y \def -(nf2_pr3_unfold c t2 x H3 H0) in (let H4 \def (eq_ind_r T x (\lambda (t: -T).(pr3 c t1 t)) H2 t2 H_y) in H4))))) H1)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/pc1.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/pc1.ma deleted file mode 100644 index a629475c6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/pc1.ma +++ /dev/null @@ -1,33 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/defs.ma". - -include "basic_1/pc1/defs.ma". - -include "basic_1/pr3/pr1.ma". - -lemma pc3_pc1: - \forall (t1: T).(\forall (t2: T).((pc1 t1 t2) \to (\forall (c: C).(pc3 c t1 -t2)))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc1 t1 t2)).(\lambda (c: -C).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: -T).(pr1 t2 t)) (pc3 c t1 t2) (\lambda (x: T).(\lambda (H1: (pr1 t1 -x)).(\lambda (H2: (pr1 t2 x)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) -(\lambda (t: T).(pr3 c t2 t)) x (pr3_pr1 t1 x H1 c) (pr3_pr1 t2 x H2 c))))) -H0))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/props.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/props.ma deleted file mode 100644 index 8d8693596..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/props.ma +++ /dev/null @@ -1,410 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/defs.ma". - -include "basic_1/pr3/pr3.ma". - -lemma clear_pc3_trans: - \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pc3 c2 t1 t2) \to -(\forall (c1: C).((clear c1 c2) \to (pc3 c1 t1 t2)))))) -\def - \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c2 t1 -t2)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(let H1 \def H in (ex2_ind -T (\lambda (t: T).(pr3 c2 t1 t)) (\lambda (t: T).(pr3 c2 t2 t)) (pc3 c1 t1 -t2) (\lambda (x: T).(\lambda (H2: (pr3 c2 t1 x)).(\lambda (H3: (pr3 c2 t2 -x)).(ex_intro2 T (\lambda (t: T).(pr3 c1 t1 t)) (\lambda (t: T).(pr3 c1 t2 -t)) x (clear_pr3_trans c2 t1 x H2 c1 H0) (clear_pr3_trans c2 t2 x H3 c1 -H0))))) H1))))))). - -lemma pc3_pr2_r: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (pc3 c -t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) -t2 (pr3_pr2 c t1 t2 H) (pr3_refl c t2))))). - -lemma pc3_pr2_x: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t2 t1) \to (pc3 c -t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t2 -t1)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) -t1 (pr3_refl c t1) (pr3_pr2 c t2 t1 H))))). - -lemma pc3_pr3_r: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (pc3 c -t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) -t2 H (pr3_refl c t2))))). - -lemma pc3_pr3_x: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t2 t1) \to (pc3 c -t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t2 -t1)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) -t1 (pr3_refl c t1) H)))). - -lemma pc3_pr3_t: - \forall (c: C).(\forall (t1: T).(\forall (t0: T).((pr3 c t1 t0) \to (\forall -(t2: T).((pr3 c t2 t0) \to (pc3 c t1 t2)))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t0: T).(\lambda (H: (pr3 c t1 -t0)).(\lambda (t2: T).(\lambda (H0: (pr3 c t2 t0)).(ex_intro2 T (\lambda (t: -T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) t0 H H0)))))). - -lemma pc3_refl: - \forall (c: C).(\forall (t: T).(pc3 c t t)) -\def - \lambda (c: C).(\lambda (t: T).(ex_intro2 T (\lambda (t0: T).(pr3 c t t0)) -(\lambda (t0: T).(pr3 c t t0)) t (pr3_refl c t) (pr3_refl c t))). - -lemma pc3_s: - \forall (c: C).(\forall (t2: T).(\forall (t1: T).((pc3 c t1 t2) \to (pc3 c -t2 t1)))) -\def - \lambda (c: C).(\lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pc3 c t1 -t2)).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: -T).(pr3 c t2 t)) (pc3 c t2 t1) (\lambda (x: T).(\lambda (H1: (pr3 c t1 -x)).(\lambda (H2: (pr3 c t2 x)).(ex_intro2 T (\lambda (t: T).(pr3 c t2 t)) -(\lambda (t: T).(pr3 c t1 t)) x H2 H1)))) H0))))). - -lemma pc3_thin_dx: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to (\forall -(u: T).(\forall (f: F).(pc3 c (THead (Flat f) u t1) (THead (Flat f) u -t2))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 -t2)).(\lambda (u: T).(\lambda (f: F).(let H0 \def H in (ex2_ind T (\lambda -(t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (pc3 c (THead (Flat f) u -t1) (THead (Flat f) u t2)) (\lambda (x: T).(\lambda (H1: (pr3 c t1 -x)).(\lambda (H2: (pr3 c t2 x)).(ex_intro2 T (\lambda (t: T).(pr3 c (THead -(Flat f) u t1) t)) (\lambda (t: T).(pr3 c (THead (Flat f) u t2) t)) (THead -(Flat f) u x) (pr3_thin_dx c t1 x H1 u f) (pr3_thin_dx c t2 x H2 u f))))) -H0))))))). - -lemma pc3_head_1: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pc3 c u1 u2) \to (\forall -(k: K).(\forall (t: T).(pc3 c (THead k u1 t) (THead k u2 t))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc3 c u1 -u2)).(\lambda (k: K).(\lambda (t: T).(let H0 \def H in (ex2_ind T (\lambda -(t0: T).(pr3 c u1 t0)) (\lambda (t0: T).(pr3 c u2 t0)) (pc3 c (THead k u1 t) -(THead k u2 t)) (\lambda (x: T).(\lambda (H1: (pr3 c u1 x)).(\lambda (H2: -(pr3 c u2 x)).(ex_intro2 T (\lambda (t0: T).(pr3 c (THead k u1 t) t0)) -(\lambda (t0: T).(pr3 c (THead k u2 t) t0)) (THead k x t) (pr3_head_12 c u1 x -H1 k t t (pr3_refl (CHead c k x) t)) (pr3_head_12 c u2 x H2 k t t (pr3_refl -(CHead c k x) t)))))) H0))))))). - -lemma pc3_head_2: - \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).(\forall -(k: K).((pc3 (CHead c k u) t1 t2) \to (pc3 c (THead k u t1) (THead k u -t2))))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(k: K).(\lambda (H: (pc3 (CHead c k u) t1 t2)).(let H0 \def H in (ex2_ind T -(\lambda (t: T).(pr3 (CHead c k u) t1 t)) (\lambda (t: T).(pr3 (CHead c k u) -t2 t)) (pc3 c (THead k u t1) (THead k u t2)) (\lambda (x: T).(\lambda (H1: -(pr3 (CHead c k u) t1 x)).(\lambda (H2: (pr3 (CHead c k u) t2 x)).(ex_intro2 -T (\lambda (t: T).(pr3 c (THead k u t1) t)) (\lambda (t: T).(pr3 c (THead k u -t2) t)) (THead k u x) (pr3_head_12 c u u (pr3_refl c u) k t1 x H1) -(pr3_head_12 c u u (pr3_refl c u) k t2 x H2))))) H0))))))). - -lemma pc3_pr2_u: - \forall (c: C).(\forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to (\forall -(t3: T).((pc3 c t2 t3) \to (pc3 c t1 t3)))))) -\def - \lambda (c: C).(\lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pr2 c t1 -t2)).(\lambda (t3: T).(\lambda (H0: (pc3 c t2 t3)).(let H1 \def H0 in -(ex2_ind T (\lambda (t: T).(pr3 c t2 t)) (\lambda (t: T).(pr3 c t3 t)) (pc3 c -t1 t3) (\lambda (x: T).(\lambda (H2: (pr3 c t2 x)).(\lambda (H3: (pr3 c t3 -x)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t3 t)) -x (pr3_sing c t2 t1 H x H2) H3)))) H1))))))). - -theorem pc3_t: - \forall (t2: T).(\forall (c: C).(\forall (t1: T).((pc3 c t1 t2) \to (\forall -(t3: T).((pc3 c t2 t3) \to (pc3 c t1 t3)))))) -\def - \lambda (t2: T).(\lambda (c: C).(\lambda (t1: T).(\lambda (H: (pc3 c t1 -t2)).(\lambda (t3: T).(\lambda (H0: (pc3 c t2 t3)).(let H1 \def H0 in -(ex2_ind T (\lambda (t: T).(pr3 c t2 t)) (\lambda (t: T).(pr3 c t3 t)) (pc3 c -t1 t3) (\lambda (x: T).(\lambda (H2: (pr3 c t2 x)).(\lambda (H3: (pr3 c t3 -x)).(let H4 \def H in (ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: -T).(pr3 c t2 t)) (pc3 c t1 t3) (\lambda (x0: T).(\lambda (H5: (pr3 c t1 -x0)).(\lambda (H6: (pr3 c t2 x0)).(ex2_ind T (\lambda (t: T).(pr3 c x0 t)) -(\lambda (t: T).(pr3 c x t)) (pc3 c t1 t3) (\lambda (x1: T).(\lambda (H7: -(pr3 c x0 x1)).(\lambda (H8: (pr3 c x x1)).(pc3_pr3_t c t1 x1 (pr3_t x0 t1 c -H5 x1 H7) t3 (pr3_t x t3 c H3 x1 H8))))) (pr3_confluence c t2 x0 H6 x H2))))) -H4))))) H1))))))). - -lemma pc3_pr2_u2: - \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr2 c t0 t1) \to (\forall -(t2: T).((pc3 c t0 t2) \to (pc3 c t1 t2)))))) -\def - \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr2 c t0 -t1)).(\lambda (t2: T).(\lambda (H0: (pc3 c t0 t2)).(pc3_t t0 c t1 (pc3_pr2_x -c t1 t0 H) t2 H0)))))). - -lemma pc3_pr3_conf: - \forall (c: C).(\forall (t: T).(\forall (t1: T).((pc3 c t t1) \to (\forall -(t2: T).((pr3 c t t2) \to (pc3 c t2 t1)))))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (H: (pc3 c t -t1)).(\lambda (t2: T).(\lambda (H0: (pr3 c t t2)).(pc3_t t c t2 (pc3_pr3_x c -t2 t H0) t1 H)))))). - -theorem pc3_head_12: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pc3 c u1 u2) \to (\forall -(k: K).(\forall (t1: T).(\forall (t2: T).((pc3 (CHead c k u2) t1 t2) \to (pc3 -c (THead k u1 t1) (THead k u2 t2))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc3 c u1 -u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pc3 -(CHead c k u2) t1 t2)).(pc3_t (THead k u2 t1) c (THead k u1 t1) (pc3_head_1 c -u1 u2 H k t1) (THead k u2 t2) (pc3_head_2 c u2 t1 t2 k H0))))))))). - -theorem pc3_head_21: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pc3 c u1 u2) \to (\forall -(k: K).(\forall (t1: T).(\forall (t2: T).((pc3 (CHead c k u1) t1 t2) \to (pc3 -c (THead k u1 t1) (THead k u2 t2))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc3 c u1 -u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pc3 -(CHead c k u1) t1 t2)).(pc3_t (THead k u1 t2) c (THead k u1 t1) (pc3_head_2 c -u1 t1 t2 k H0) (THead k u2 t2) (pc3_head_1 c u1 u2 H k t2))))))))). - -lemma pc3_pr0_pr2_t: - \forall (u1: T).(\forall (u2: T).((pr0 u2 u1) \to (\forall (c: C).(\forall -(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 -(CHead c k u1) t1 t2)))))))) -\def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u2 u1)).(\lambda (c: -C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 -(CHead c k u2) t1 t2)).(insert_eq C (CHead c k u2) (\lambda (c0: C).(pr2 c0 -t1 t2)) (\lambda (_: C).(pc3 (CHead c k u1) t1 t2)) (\lambda (y: C).(\lambda -(H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).((eq C c0 (CHead c k u2)) \to (pc3 (CHead c k u1) t t0))))) (\lambda (c0: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (H3: -(eq C c0 (CHead c k u2))).(let H4 \def (f_equal C C (\lambda (e: C).e) c0 -(CHead c k u2) H3) in (pc3_pr2_r (CHead c k u1) t3 t4 (pr2_free (CHead c k -u1) t3 t4 H2)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H2: (getl i c0 (CHead d (Bind Abbr) -u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda -(t: T).(\lambda (H4: (subst0 i u t4 t)).(\lambda (H5: (eq C c0 (CHead c k -u2))).(let H6 \def (f_equal C C (\lambda (e: C).e) c0 (CHead c k u2) H5) in -(let H7 \def (eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) -u))) H2 (CHead c k u2) H6) in (nat_ind (\lambda (n: nat).((getl n (CHead c k -u2) (CHead d (Bind Abbr) u)) \to ((subst0 n u t4 t) \to (pc3 (CHead c k u1) -t3 t)))) (\lambda (H8: (getl O (CHead c k u2) (CHead d (Bind Abbr) -u))).(\lambda (H9: (subst0 O u t4 t)).(K_ind (\lambda (k0: K).((clear (CHead -c k0 u2) (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k0 u1) t3 t))) (\lambda -(b: B).(\lambda (H10: (clear (CHead c (Bind b) u2) (CHead d (Bind Abbr) -u))).(let H11 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u) -(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H10)) in -((let H12 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) -(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H10)) in -((let H13 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) -(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H10)) in -(\lambda (H14: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H16 \def (eq_ind -T u (\lambda (t0: T).(subst0 O t0 t4 t)) H9 u2 H13) in (eq_ind B Abbr -(\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t3 t)) (ex2_ind T (\lambda (t0: -T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(pr0 t t0)) (pc3 (CHead c (Bind -Abbr) u1) t3 t) (\lambda (x: T).(\lambda (H17: (subst0 O u1 t4 x)).(\lambda -(H18: (pr0 t x)).(pc3_pr3_t (CHead c (Bind Abbr) u1) t3 x (pr3_pr2 (CHead c -(Bind Abbr) u1) t3 x (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl -Abbr c u1) t3 t4 H3 x H17)) t (pr3_pr2 (CHead c (Bind Abbr) u1) t x (pr2_free -(CHead c (Bind Abbr) u1) t x H18)))))) (pr0_subst0_fwd u2 t4 t O H16 u1 H)) b -H14))))) H12)) H11)))) (\lambda (f: F).(\lambda (H10: (clear (CHead c (Flat -f) u2) (CHead d (Bind Abbr) u))).(clear_pc3_trans (CHead d (Bind Abbr) u) t3 -t (pc3_pr2_r (CHead d (Bind Abbr) u) t3 t (pr2_delta (CHead d (Bind Abbr) u) -d u O (getl_refl Abbr d u) t3 t4 H3 t H9)) (CHead c (Flat f) u1) (clear_flat -c (CHead d (Bind Abbr) u) (clear_gen_flat f c (CHead d (Bind Abbr) u) u2 H10) -f u1)))) k (getl_gen_O (CHead c k u2) (CHead d (Bind Abbr) u) H8)))) (\lambda -(i0: nat).(\lambda (IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) -\to ((subst0 i0 u t4 t) \to (pc3 (CHead c k u1) t3 t))))).(\lambda (H8: (getl -(S i0) (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H9: (subst0 (S i0) -u t4 t)).(K_ind (\lambda (k0: K).((((getl i0 (CHead c k0 u2) (CHead d (Bind -Abbr) u)) \to ((subst0 i0 u t4 t) \to (pc3 (CHead c k0 u1) t3 t)))) \to -((getl (r k0 i0) c (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k0 u1) t3 t)))) -(\lambda (b: B).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind -Abbr) u)) \to ((subst0 i0 u t4 t) \to (pc3 (CHead c (Bind b) u1) t3 -t))))).(\lambda (H10: (getl (r (Bind b) i0) c (CHead d (Bind Abbr) -u))).(pc3_pr2_r (CHead c (Bind b) u1) t3 t (pr2_delta (CHead c (Bind b) u1) d -u (S i0) (getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) H10 u1) t3 t4 H3 t -H9))))) (\lambda (f: F).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead -d (Bind Abbr) u)) \to ((subst0 i0 u t4 t) \to (pc3 (CHead c (Flat f) u1) t3 -t))))).(\lambda (H10: (getl (r (Flat f) i0) c (CHead d (Bind Abbr) -u))).(pc3_pr2_r (CHead c (Flat f) u1) t3 t (pr2_cflat c t3 t (pr2_delta c d u -(r (Flat f) i0) H10 t3 t4 H3 t H9) f u1))))) k IHi (getl_gen_S k c (CHead d -(Bind Abbr) u) u2 i0 H8)))))) i H7 H4)))))))))))))) y t1 t2 H1))) H0)))))))). - -lemma pc3_pr2_pr2_t: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u2 u1) \to (\forall -(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 -(CHead c k u1) t1 t2)))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u2 -u1)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (t1: -T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c0 k t) t1 t2) \to (pc3 -(CHead c0 k t0) t1 t2)))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: -K).(\lambda (H1: (pr2 (CHead c0 k t1) t0 t3)).(pc3_pr0_pr2_t t2 t1 H0 c0 t0 -t3 k H1))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H2: -(subst0 i u t2 t)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda -(H3: (pr2 (CHead c0 k t1) t0 t3)).(insert_eq C (CHead c0 k t1) (\lambda (c1: -C).(pr2 c1 t0 t3)) (\lambda (_: C).(pc3 (CHead c0 k t) t0 t3)) (\lambda (y: -C).(\lambda (H4: (pr2 y t0 t3)).(pr2_ind (\lambda (c1: C).(\lambda (t4: -T).(\lambda (t5: T).((eq C c1 (CHead c0 k t1)) \to (pc3 (CHead c0 k t) t4 -t5))))) (\lambda (c1: C).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H5: (pr0 -t4 t5)).(\lambda (_: (eq C c1 (CHead c0 k t1))).(pc3_pr2_r (CHead c0 k t) t4 -t5 (pr2_free (CHead c0 k t) t4 t5 H5))))))) (\lambda (c1: C).(\lambda (d0: -C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H5: (getl i0 c1 (CHead d0 -(Bind Abbr) u0))).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H6: (pr0 t4 -t5)).(\lambda (t6: T).(\lambda (H7: (subst0 i0 u0 t5 t6)).(\lambda (H8: (eq C -c1 (CHead c0 k t1))).(let H9 \def (eq_ind C c1 (\lambda (c2: C).(getl i0 c2 -(CHead d0 (Bind Abbr) u0))) H5 (CHead c0 k t1) H8) in (nat_ind (\lambda (n: -nat).((getl n (CHead c0 k t1) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t5 -t6) \to (pc3 (CHead c0 k t) t4 t6)))) (\lambda (H10: (getl O (CHead c0 k t1) -(CHead d0 (Bind Abbr) u0))).(\lambda (H11: (subst0 O u0 t5 t6)).(K_ind -(\lambda (k0: K).((clear (CHead c0 k0 t1) (CHead d0 (Bind Abbr) u0)) \to (pc3 -(CHead c0 k0 t) t4 t6))) (\lambda (b: B).(\lambda (H12: (clear (CHead c0 -(Bind b) t1) (CHead d0 (Bind Abbr) u0))).(let H13 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow d0 | (CHead c2 _ _) \Rightarrow -c2])) (CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t1) (clear_gen_bind b c0 -(CHead d0 (Bind Abbr) u0) t1 H12)) in ((let H14 \def (f_equal C B (\lambda -(e: C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow -(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) -(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t1) (clear_gen_bind b c0 (CHead -d0 (Bind Abbr) u0) t1 H12)) in ((let H15 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t7) \Rightarrow t7])) -(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t1) (clear_gen_bind b c0 (CHead -d0 (Bind Abbr) u0) t1 H12)) in (\lambda (H16: (eq B Abbr b)).(\lambda (_: (eq -C d0 c0)).(let H18 \def (eq_ind T u0 (\lambda (t7: T).(subst0 O t7 t5 t6)) -H11 t1 H15) in (eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c0 (Bind b0) t) t4 -t6)) (ex2_ind T (\lambda (t7: T).(subst0 O t2 t5 t7)) (\lambda (t7: T).(pr0 -t6 t7)) (pc3 (CHead c0 (Bind Abbr) t) t4 t6) (\lambda (x: T).(\lambda (H19: -(subst0 O t2 t5 x)).(\lambda (H20: (pr0 t6 x)).(ex2_ind T (\lambda (t7: -T).(subst0 O t t5 t7)) (\lambda (t7: T).(subst0 (S (plus i O)) u x t7)) (pc3 -(CHead c0 (Bind Abbr) t) t4 t6) (\lambda (x0: T).(\lambda (H21: (subst0 O t -t5 x0)).(\lambda (H22: (subst0 (S (plus i O)) u x x0)).(let H23 \def (f_equal -nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H24 -\def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n u x x0)) H22 (S -i) H23) in (pc3_pr2_u (CHead c0 (Bind Abbr) t) x0 t4 (pr2_delta (CHead c0 -(Bind Abbr) t) c0 t O (getl_refl Abbr c0 t) t4 t5 H6 x0 H21) t6 (pc3_pr2_x -(CHead c0 (Bind Abbr) t) x0 t6 (pr2_delta (CHead c0 (Bind Abbr) t) d u (S i) -(getl_head (Bind Abbr) i c0 (CHead d (Bind Abbr) u) H0 t) t6 x H20 x0 -H24)))))))) (subst0_subst0_back t5 x t2 O H19 t u i H2))))) (pr0_subst0_fwd -t1 t5 t6 O H18 t2 H1)) b H16))))) H14)) H13)))) (\lambda (f: F).(\lambda -(H12: (clear (CHead c0 (Flat f) t1) (CHead d0 (Bind Abbr) -u0))).(clear_pc3_trans (CHead d0 (Bind Abbr) u0) t4 t6 (pc3_pr2_r (CHead d0 -(Bind Abbr) u0) t4 t6 (pr2_delta (CHead d0 (Bind Abbr) u0) d0 u0 O (getl_refl -Abbr d0 u0) t4 t5 H6 t6 H11)) (CHead c0 (Flat f) t) (clear_flat c0 (CHead d0 -(Bind Abbr) u0) (clear_gen_flat f c0 (CHead d0 (Bind Abbr) u0) t1 H12) f -t)))) k (getl_gen_O (CHead c0 k t1) (CHead d0 (Bind Abbr) u0) H10)))) -(\lambda (i1: nat).(\lambda (_: (((getl i1 (CHead c0 k t1) (CHead d0 (Bind -Abbr) u0)) \to ((subst0 i1 u0 t5 t6) \to (pc3 (CHead c0 k t) t4 -t6))))).(\lambda (H10: (getl (S i1) (CHead c0 k t1) (CHead d0 (Bind Abbr) -u0))).(\lambda (H11: (subst0 (S i1) u0 t5 t6)).(K_ind (\lambda (k0: K).((getl -(r k0 i1) c0 (CHead d0 (Bind Abbr) u0)) \to (pc3 (CHead c0 k0 t) t4 t6))) -(\lambda (b: B).(\lambda (H12: (getl (r (Bind b) i1) c0 (CHead d0 (Bind Abbr) -u0))).(pc3_pr2_r (CHead c0 (Bind b) t) t4 t6 (pr2_delta (CHead c0 (Bind b) t) -d0 u0 (S i1) (getl_head (Bind b) i1 c0 (CHead d0 (Bind Abbr) u0) H12 t) t4 t5 -H6 t6 H11)))) (\lambda (f: F).(\lambda (H12: (getl (r (Flat f) i1) c0 (CHead -d0 (Bind Abbr) u0))).(pc3_pr2_r (CHead c0 (Flat f) t) t4 t6 (pr2_cflat c0 t4 -t6 (pr2_delta c0 d0 u0 (r (Flat f) i1) H12 t4 t5 H6 t6 H11) f t)))) k -(getl_gen_S k c0 (CHead d0 (Bind Abbr) u0) t1 i1 H10)))))) i0 H9 -H7))))))))))))) y t0 t3 H4))) H3))))))))))))))) c u2 u1 H)))). - -lemma pc3_pr2_pr3_t: - \forall (c: C).(\forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall -(k: K).((pr3 (CHead c k u2) t1 t2) \to (\forall (u1: T).((pr2 c u2 u1) \to -(pc3 (CHead c k u1) t1 t2)))))))) -\def - \lambda (c: C).(\lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(k: K).(\lambda (H: (pr3 (CHead c k u2) t1 t2)).(pr3_ind (CHead c k u2) -(\lambda (t: T).(\lambda (t0: T).(\forall (u1: T).((pr2 c u2 u1) \to (pc3 -(CHead c k u1) t t0))))) (\lambda (t: T).(\lambda (u1: T).(\lambda (_: (pr2 c -u2 u1)).(pc3_refl (CHead c k u1) t)))) (\lambda (t0: T).(\lambda (t3: -T).(\lambda (H0: (pr2 (CHead c k u2) t3 t0)).(\lambda (t4: T).(\lambda (_: -(pr3 (CHead c k u2) t0 t4)).(\lambda (H2: ((\forall (u1: T).((pr2 c u2 u1) -\to (pc3 (CHead c k u1) t0 t4))))).(\lambda (u1: T).(\lambda (H3: (pr2 c u2 -u1)).(pc3_t t0 (CHead c k u1) t3 (pc3_pr2_pr2_t c u1 u2 H3 t3 t0 k H0) t4 (H2 -u1 H3)))))))))) t1 t2 H)))))). - -lemma pc3_pr3_pc3_t: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u2 u1) \to (\forall -(t1: T).(\forall (t2: T).(\forall (k: K).((pc3 (CHead c k u2) t1 t2) \to (pc3 -(CHead c k u1) t1 t2)))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u2 -u1)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t1: T).(\forall -(t2: T).(\forall (k: K).((pc3 (CHead c k t) t1 t2) \to (pc3 (CHead c k t0) t1 -t2))))))) (\lambda (t: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: -K).(\lambda (H0: (pc3 (CHead c k t) t1 t2)).H0))))) (\lambda (t2: T).(\lambda -(t1: T).(\lambda (H0: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda (_: (pr3 c t2 -t3)).(\lambda (H2: ((\forall (t4: T).(\forall (t5: T).(\forall (k: K).((pc3 -(CHead c k t2) t4 t5) \to (pc3 (CHead c k t3) t4 t5))))))).(\lambda (t0: -T).(\lambda (t4: T).(\lambda (k: K).(\lambda (H3: (pc3 (CHead c k t1) t0 -t4)).(H2 t0 t4 k (let H4 \def H3 in (ex2_ind T (\lambda (t: T).(pr3 (CHead c -k t1) t0 t)) (\lambda (t: T).(pr3 (CHead c k t1) t4 t)) (pc3 (CHead c k t2) -t0 t4) (\lambda (x: T).(\lambda (H5: (pr3 (CHead c k t1) t0 x)).(\lambda (H6: -(pr3 (CHead c k t1) t4 x)).(pc3_t x (CHead c k t2) t0 (pc3_pr2_pr3_t c t1 t0 -x k H5 t2 H0) t4 (pc3_s (CHead c k t2) x t4 (pc3_pr2_pr3_t c t1 t4 x k H6 t2 -H0)))))) H4))))))))))))) u2 u1 H)))). - -lemma pc3_lift: - \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h -d c e) \to (\forall (t1: T).(\forall (t2: T).((pc3 e t1 t2) \to (pc3 c (lift -h d t1) (lift h d t2))))))))) -\def - \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pc3 e t1 -t2)).(let H1 \def H0 in (ex2_ind T (\lambda (t: T).(pr3 e t1 t)) (\lambda (t: -T).(pr3 e t2 t)) (pc3 c (lift h d t1) (lift h d t2)) (\lambda (x: T).(\lambda -(H2: (pr3 e t1 x)).(\lambda (H3: (pr3 e t2 x)).(pc3_pr3_t c (lift h d t1) -(lift h d x) (pr3_lift c e h d H t1 x H2) (lift h d t2) (pr3_lift c e h d H -t2 x H3))))) H1))))))))). - -lemma pc3_eta: - \forall (c: C).(\forall (t: T).(\forall (w: T).(\forall (u: T).((pc3 c t -(THead (Bind Abst) w u)) \to (\forall (v: T).((pc3 c v w) \to (pc3 c (THead -(Bind Abst) v (THead (Flat Appl) (TLRef O) (lift (S O) O t))) t))))))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (w: T).(\lambda (u: T).(\lambda (H: -(pc3 c t (THead (Bind Abst) w u))).(\lambda (v: T).(\lambda (H0: (pc3 c v -w)).(pc3_t (THead (Bind Abst) w (THead (Flat Appl) (TLRef O) (lift (S O) O -(THead (Bind Abst) w u)))) c (THead (Bind Abst) v (THead (Flat Appl) (TLRef -O) (lift (S O) O t))) (pc3_head_21 c v w H0 (Bind Abst) (THead (Flat Appl) -(TLRef O) (lift (S O) O t)) (THead (Flat Appl) (TLRef O) (lift (S O) O (THead -(Bind Abst) w u))) (pc3_thin_dx (CHead c (Bind Abst) v) (lift (S O) O t) -(lift (S O) O (THead (Bind Abst) w u)) (pc3_lift (CHead c (Bind Abst) v) c (S -O) O (drop_drop (Bind Abst) O c c (drop_refl c) v) t (THead (Bind Abst) w u) -H) (TLRef O) Appl)) t (pc3_t (THead (Bind Abst) w u) c (THead (Bind Abst) w -(THead (Flat Appl) (TLRef O) (lift (S O) O (THead (Bind Abst) w u)))) -(pc3_pr3_r c (THead (Bind Abst) w (THead (Flat Appl) (TLRef O) (lift (S O) O -(THead (Bind Abst) w u)))) (THead (Bind Abst) w u) (pr3_eta c w u w (pr3_refl -c w))) t (pc3_s c (THead (Bind Abst) w u) t H))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/subst1.ma deleted file mode 100644 index 1df35129b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/subst1.ma +++ /dev/null @@ -1,45 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/props.ma". - -include "basic_1/pr3/subst1.ma". - -lemma pc3_gen_cabbr: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to (\forall -(e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) -\to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d -a0 a) \to (\forall (x1: T).((subst1 d u t1 (lift (S O) d x1)) \to (\forall -(x2: T).((subst1 d u t2 (lift (S O) d x2)) \to (pc3 a x1 x2)))))))))))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 -t2)).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (H0: (getl d -c (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (H1: (csubst1 d u c -a0)).(\lambda (a: C).(\lambda (H2: (drop (S O) d a0 a)).(\lambda (x1: -T).(\lambda (H3: (subst1 d u t1 (lift (S O) d x1))).(\lambda (x2: T).(\lambda -(H4: (subst1 d u t2 (lift (S O) d x2))).(let H5 \def H in (ex2_ind T (\lambda -(t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (pc3 a x1 x2) (\lambda (x: -T).(\lambda (H6: (pr3 c t1 x)).(\lambda (H7: (pr3 c t2 x)).(ex2_ind T -(\lambda (x3: T).(subst1 d u x (lift (S O) d x3))) (\lambda (x3: T).(pr3 a x2 -x3)) (pc3 a x1 x2) (\lambda (x0: T).(\lambda (H8: (subst1 d u x (lift (S O) d -x0))).(\lambda (H9: (pr3 a x2 x0)).(ex2_ind T (\lambda (x3: T).(subst1 d u x -(lift (S O) d x3))) (\lambda (x3: T).(pr3 a x1 x3)) (pc3 a x1 x2) (\lambda -(x3: T).(\lambda (H10: (subst1 d u x (lift (S O) d x3))).(\lambda (H11: (pr3 -a x1 x3)).(let H12 \def (eq_ind T x3 (\lambda (t: T).(pr3 a x1 t)) H11 x0 -(subst1_confluence_lift x x3 u d H10 x0 H8)) in (pc3_pr3_t a x1 x0 H12 x2 -H9))))) (pr3_gen_cabbr c t1 x H6 e u d H0 a0 H1 a H2 x1 H3))))) -(pr3_gen_cabbr c t2 x H7 e u d H0 a0 H1 a H2 x2 H4))))) H5))))))))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pc3/wcpr0.ma b/matita/matita/contribs/lambdadelta/basic_1/pc3/wcpr0.ma deleted file mode 100644 index a72a7e90d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pc3/wcpr0.ma +++ /dev/null @@ -1,87 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/props.ma". - -include "basic_1/wcpr0/getl.ma". - -fact pc3_wcpr0__pc3_wcpr0_t_aux: - \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (k: K).(\forall -(u: T).(\forall (t1: T).(\forall (t2: T).((pr3 (CHead c1 k u) t1 t2) \to (pc3 -(CHead c2 k u) t1 t2)))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(\lambda (k: -K).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 -(CHead c1 k u) t1 t2)).(pr3_ind (CHead c1 k u) (\lambda (t: T).(\lambda (t0: -T).(pc3 (CHead c2 k u) t t0))) (\lambda (t: T).(pc3_refl (CHead c2 k u) t)) -(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr2 (CHead c1 k u) t4 -t3)).(\lambda (t5: T).(\lambda (_: (pr3 (CHead c1 k u) t3 t5)).(\lambda (H3: -(pc3 (CHead c2 k u) t3 t5)).(pc3_t t3 (CHead c2 k u) t4 (insert_eq C (CHead -c1 k u) (\lambda (c: C).(pr2 c t4 t3)) (\lambda (_: C).(pc3 (CHead c2 k u) t4 -t3)) (\lambda (y: C).(\lambda (H4: (pr2 y t4 t3)).(pr2_ind (\lambda (c: -C).(\lambda (t: T).(\lambda (t0: T).((eq C c (CHead c1 k u)) \to (pc3 (CHead -c2 k u) t t0))))) (\lambda (c: C).(\lambda (t6: T).(\lambda (t0: T).(\lambda -(H5: (pr0 t6 t0)).(\lambda (_: (eq C c (CHead c1 k u))).(pc3_pr2_r (CHead c2 -k u) t6 t0 (pr2_free (CHead c2 k u) t6 t0 H5))))))) (\lambda (c: C).(\lambda -(d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H5: (getl i c (CHead d -(Bind Abbr) u0))).(\lambda (t6: T).(\lambda (t0: T).(\lambda (H6: (pr0 t6 -t0)).(\lambda (t: T).(\lambda (H7: (subst0 i u0 t0 t)).(\lambda (H8: (eq C c -(CHead c1 k u))).(let H9 \def (eq_ind C c (\lambda (c0: C).(getl i c0 (CHead -d (Bind Abbr) u0))) H5 (CHead c1 k u) H8) in (ex3_2_ind C T (\lambda (e2: -C).(\lambda (u2: T).(getl i (CHead c2 k u) (CHead e2 (Bind Abbr) u2)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: -T).(pr0 u0 u2))) (pc3 (CHead c2 k u) t6 t) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H10: (getl i (CHead c2 k u) (CHead x0 (Bind Abbr) x1))).(\lambda -(_: (wcpr0 d x0)).(\lambda (H12: (pr0 u0 x1)).(ex2_ind T (\lambda (t7: -T).(subst0 i x1 t0 t7)) (\lambda (t7: T).(pr0 t t7)) (pc3 (CHead c2 k u) t6 -t) (\lambda (x: T).(\lambda (H13: (subst0 i x1 t0 x)).(\lambda (H14: (pr0 t -x)).(pc3_pr2_u (CHead c2 k u) x t6 (pr2_delta (CHead c2 k u) x0 x1 i H10 t6 -t0 H6 x H13) t (pc3_pr2_x (CHead c2 k u) x t (pr2_free (CHead c2 k u) t x -H14)))))) (pr0_subst0_fwd u0 t0 t i H7 x1 H12))))))) (wcpr0_getl (CHead c1 k -u) (CHead c2 k u) (wcpr0_comp c1 c2 H u u (pr0_refl u) k) i d u0 (Bind Abbr) -H9)))))))))))))) y t4 t3 H4))) H1) t5 H3))))))) t1 t2 H0)))))))). - -lemma pc3_wcpr0_t: - \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t1: -T).(\forall (t2: T).((pr3 c1 t1 t2) \to (pc3 c2 t1 t2)))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 -t2) \to (pc3 c0 t1 t2)))))) (\lambda (c: C).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H0: (pr3 c t1 t2)).(pc3_pr3_r c t1 t2 H0))))) (\lambda (c0: -C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (_: ((\forall (t1: -T).(\forall (t2: T).((pr3 c0 t1 t2) \to (pc3 c3 t1 t2)))))).(\lambda (u1: -T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H3: (pr3 (CHead c0 k u1) t1 t2)).(let H4 \def -(pc3_pr2_pr3_t c0 u1 t1 t2 k H3 u2 (pr2_free c0 u1 u2 H2)) in (ex2_ind T -(\lambda (t: T).(pr3 (CHead c0 k u2) t1 t)) (\lambda (t: T).(pr3 (CHead c0 k -u2) t2 t)) (pc3 (CHead c3 k u2) t1 t2) (\lambda (x: T).(\lambda (H5: (pr3 -(CHead c0 k u2) t1 x)).(\lambda (H6: (pr3 (CHead c0 k u2) t2 x)).(pc3_t x -(CHead c3 k u2) t1 (pc3_wcpr0__pc3_wcpr0_t_aux c0 c3 H0 k u2 t1 x H5) t2 -(pc3_s (CHead c3 k u2) x t2 (pc3_wcpr0__pc3_wcpr0_t_aux c0 c3 H0 k u2 t2 x -H6)))))) H4))))))))))))) c1 c2 H))). - -lemma pc3_wcpr0: - \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t1: -T).(\forall (t2: T).((pc3 c1 t1 t2) \to (pc3 c2 t1 t2)))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H0: (pc3 c1 t1 t2)).(let H1 \def H0 in (ex2_ind -T (\lambda (t: T).(pr3 c1 t1 t)) (\lambda (t: T).(pr3 c1 t2 t)) (pc3 c2 t1 -t2) (\lambda (x: T).(\lambda (H2: (pr3 c1 t1 x)).(\lambda (H3: (pr3 c1 t2 -x)).(pc3_t x c2 t1 (pc3_wcpr0_t c1 c2 H t1 x H2) t2 (pc3_s c2 x t2 -(pc3_wcpr0_t c1 c2 H t2 x H3)))))) H1))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/pr0/dec.ma deleted file mode 100644 index 889e82034..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/dec.ma +++ /dev/null @@ -1,520 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/props.ma". - -include "basic_1/subst0/dec.ma". - -include "basic_1/T/dec.ma". - -include "basic_1/T/props.ma". - -lemma nf0_dec: - \forall (t1: T).(or (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T -(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t1 t2)))) -\def - \lambda (t1: T).(T_ind (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to -(eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t t2))))) (\lambda (n: nat).(or_introl -(\forall (t2: T).((pr0 (TSort n) t2) \to (eq T (TSort n) t2))) (ex2 T -(\lambda (t2: T).((eq T (TSort n) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (TSort n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TSort n) -t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T -(TSort n)) t2 (pr0_gen_sort t2 n H)))))) (\lambda (n: nat).(or_introl -(\forall (t2: T).((pr0 (TLRef n) t2) \to (eq T (TLRef n) t2))) (ex2 T -(\lambda (t2: T).((eq T (TLRef n) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (TLRef n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TLRef n) -t2)).(eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) (refl_equal T -(TLRef n)) t2 (pr0_gen_lref t2 n H)))))) (\lambda (k: K).(\lambda (t: -T).(\lambda (H: (or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T -(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t t2))))).(\lambda (t0: T).(\lambda (H0: (or (\forall (t2: T).((pr0 -t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))))).(K_ind (\lambda (k0: K).(or -(\forall (t2: T).((pr0 (THead k0 t t0) t2) \to (eq T (THead k0 t t0) t2))) -(ex2 T (\lambda (t2: T).((eq T (THead k0 t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead k0 t t0) t2))))) (\lambda (b: -B).(B_ind (\lambda (b0: B).(or (\forall (t2: T).((pr0 (THead (Bind b0) t t0) -t2) \to (eq T (THead (Bind b0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T -(THead (Bind b0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind b0) t t0) t2))))) (or_intror (\forall (t2: T).((pr0 (THead (Bind -Abbr) t t0) t2) \to (eq T (THead (Bind Abbr) t t0) t2))) (ex2 T (\lambda (t2: -T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (let H_x \def (dnf_dec t t0 O) in -(let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) -O v)) (eq T t0 (lift (S O) O v)))) (ex2 T (\lambda (t2: T).((eq T (THead -(Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind Abbr) t t0) t2))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t -t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 -(lift (S O) O x)) (eq T t0 (lift (S O) O x)) (ex2 T (\lambda (t2: T).((eq T -(THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Bind Abbr) t t0) t2))) (\lambda (H3: (subst0 O t t0 (lift (S -O) O x))).(ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) -t2)) (THead (Bind Abbr) t (lift (S O) O x)) (\lambda (H4: (eq T (THead (Bind -Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)))).(\lambda (P: Prop).(let -H5 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 -| (TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind -Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)) H4) in (let H6 \def -(eq_ind T t0 (\lambda (t2: T).(subst0 O t t2 (lift (S O) O x))) H3 (lift (S -O) O x) H5) in (subst0_refl t (lift (S O) O x) O H6 P))))) (pr0_delta t t -(pr0_refl t) t0 t0 (pr0_refl t0) (lift (S O) O x) H3))) (\lambda (H3: (eq T -t0 (lift (S O) O x))).(eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).((eq T (THead (Bind Abbr) t t2) t3) \to (\forall (P: -Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Abbr) t t2) t3)))) (ex_intro2 T -(\lambda (t2: T).((eq T (THead (Bind Abbr) t (lift (S O) O x)) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t (lift (S -O) O x)) t2)) x (\lambda (H4: (eq T (THead (Bind Abbr) t (lift (S O) O x)) -x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Abbr) x t (S O) O H4 P))) -(pr0_zeta Abbr not_abbr_abst x x (pr0_refl x) t)) t0 H3)) H2))) H1)))) (let -H1 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T -(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to -(eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead -(Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind Abst) t t0) t2)))) (\lambda (H2: ((\forall (t2: T).((pr0 t t2) -\to (eq T t t2))))).(let H3 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) -\to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead -(Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda -(H4: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall -(t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) -(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) t t0) t2)).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t0 t3))) (eq T (THead (Bind Abst) t t0) t2) (\lambda (x0: T).(\lambda -(x1: T).(\lambda (H6: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H7: (pr0 -t x0)).(\lambda (H8: (pr0 t0 x1)).(let H_y \def (H4 x1 H8) in (let H_y0 \def -(H2 x0 H7) in (let H9 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H8 t0 -H_y) in (let H10 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead (Bind -Abst) x0 t3))) H6 t0 H_y) in (let H11 \def (eq_ind_r T x0 (\lambda (t3: -T).(pr0 t t3)) H7 t H_y0) in (let H12 \def (eq_ind_r T x0 (\lambda (t3: -T).(eq T t2 (THead (Bind Abst) t3 t0))) H10 t H_y0) in (eq_ind_r T (THead -(Bind Abst) t t0) (\lambda (t3: T).(eq T (THead (Bind Abst) t t0) t3)) -(refl_equal T (THead (Bind Abst) t t0)) t2 H12)))))))))))) (pr0_gen_abst t t0 -t2 H5)))))) (\lambda (H4: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: -T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) -(or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead -(Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t -t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) -t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T t0 x) \to (\forall (P: -Prop).P)))).(\lambda (H6: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 -(THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (ex_intro2 T -(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) (THead (Bind -Abst) t x) (\lambda (H7: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t -x))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) -\Rightarrow t2])) (THead (Bind Abst) t t0) (THead (Bind Abst) t x) H7) in -(let H9 \def (eq_ind_r T x (\lambda (t2: T).(pr0 t0 t2)) H6 t0 H8) in (let -H10 \def (eq_ind_r T x (\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: -Prop).P0))) H5 t0 H8) in (H10 (refl_equal T t0) P)))))) (pr0_comp t t -(pr0_refl t) t0 x H6 (Bind Abst))))))) H4)) H3))) (\lambda (H2: (ex2 T -(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead -(Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (x: -T).(\lambda (H3: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr0 -t x)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq -T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind -Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind Abst) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind -Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind Abst) t t0) t2)) (THead (Bind Abst) x t0) (\lambda (H5: (eq T (THead -(Bind Abst) t t0) (THead (Bind Abst) x t0))).(\lambda (P: Prop).(let H6 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef -_) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead (Bind Abst) t t0) -(THead (Bind Abst) x t0) H5) in (let H7 \def (eq_ind_r T x (\lambda (t2: -T).(pr0 t t2)) H4 t H6) in (let H8 \def (eq_ind_r T x (\lambda (t2: T).((eq T -t t2) \to (\forall (P0: Prop).P0))) H3 t H6) in (H8 (refl_equal T t) P)))))) -(pr0_comp t x H4 t0 t0 (pr0_refl t0) (Bind Abst))))))) H2)) H1)) (let H_x -\def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or -(subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O v)))) (or (\forall -(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) -(\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 (lift (S O) O x)) (eq T t0 -(lift (S O) O x)))).(or_ind (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift -(S O) O x)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T -(THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind -Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind Void) t t0) t2)))) (\lambda (H3: (subst0 O t t0 (lift (S O) O x))).(let -H4 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T -(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to -(eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead -(Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind Void) t t0) t2)))) (\lambda (H5: ((\forall (t2: T).((pr0 t t2) -\to (eq T t t2))))).(let H6 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) -\to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead -(Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda -(H7: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall -(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) -(\lambda (t2: T).(\lambda (H8: (pr0 (THead (Bind Void) t t0) t2)).(or_ind -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda -(t3: T).(pr0 t0 t3)))) (pr0 t0 (lift (S O) O t2)) (eq T (THead (Bind Void) t -t0) t2) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 -t3))) (eq T (THead (Bind Void) t t0) t2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H10: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H11: (pr0 t -x0)).(\lambda (H12: (pr0 t0 x1)).(let H_y \def (H7 x1 H12) in (let H_y0 \def -(H5 x0 H11) in (let H13 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H12 -t0 H_y) in (let H14 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead -(Bind Void) x0 t3))) H10 t0 H_y) in (let H15 \def (eq_ind_r T x0 (\lambda -(t3: T).(pr0 t t3)) H11 t H_y0) in (let H16 \def (eq_ind_r T x0 (\lambda (t3: -T).(eq T t2 (THead (Bind Void) t3 t0))) H14 t H_y0) in (eq_ind_r T (THead -(Bind Void) t t0) (\lambda (t3: T).(eq T (THead (Bind Void) t t0) t3)) -(refl_equal T (THead (Bind Void) t t0)) t2 H16)))))))))))) H9)) (\lambda (H9: -(pr0 t0 (lift (S O) O t2))).(let H_y \def (H7 (lift (S O) O t2) H9) in (let -H10 \def (eq_ind T t0 (\lambda (t3: T).(subst0 O t t3 (lift (S O) O x))) H3 -(lift (S O) O t2) H_y) in (eq_ind_r T (lift (S O) O t2) (\lambda (t3: T).(eq -T (THead (Bind Void) t t3) t2)) (subst0_gen_lift_false t2 t (lift (S O) O x) -(S O) O O (le_O_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) -(le_n (plus (S O) O)) (plus O (S O)) (plus_sym O (S O))) H10 (eq T (THead -(Bind Void) t (lift (S O) O t2)) t2)) t0 H_y)))) (pr0_gen_void t t0 t2 -H8)))))) (\lambda (H7: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T -t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall -(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) -(\lambda (x0: T).(\lambda (H8: (((eq T t0 x0) \to (\forall (P: -Prop).P)))).(\lambda (H9: (pr0 t0 x0)).(or_intror (\forall (t2: T).((pr0 -(THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T -(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind -Void) t x0) (\lambda (H10: (eq T (THead (Bind Void) t t0) (THead (Bind Void) -t x0))).(\lambda (P: Prop).(let H11 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) -\Rightarrow t2])) (THead (Bind Void) t t0) (THead (Bind Void) t x0) H10) in -(let H12 \def (eq_ind_r T x0 (\lambda (t2: T).(pr0 t0 t2)) H9 t0 H11) in (let -H13 \def (eq_ind_r T x0 (\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: -Prop).P0))) H8 t0 H11) in (H13 (refl_equal T t0) P)))))) (pr0_comp t t -(pr0_refl t) t0 x0 H9 (Bind Void))))))) H7)) H6))) (\lambda (H5: (ex2 T -(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead -(Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda -(x0: T).(\lambda (H6: (((eq T t x0) \to (\forall (P: Prop).P)))).(\lambda -(H7: (pr0 t x0)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t t0) -t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T -(THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T -(THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind Void) x0 t0) (\lambda (H8: -(eq T (THead (Bind Void) t t0) (THead (Bind Void) x0 t0))).(\lambda (P: -Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) -(THead (Bind Void) t t0) (THead (Bind Void) x0 t0) H8) in (let H10 \def -(eq_ind_r T x0 (\lambda (t2: T).(pr0 t t2)) H7 t H9) in (let H11 \def -(eq_ind_r T x0 (\lambda (t2: T).((eq T t t2) \to (\forall (P0: Prop).P0))) H6 -t H9) in (H11 (refl_equal T t) P)))))) (pr0_comp t x0 H7 t0 t0 (pr0_refl t0) -(Bind Void))))))) H5)) H4))) (\lambda (H3: (eq T t0 (lift (S O) O x))).(let -H4 \def (eq_ind T t0 (\lambda (t2: T).(or (\forall (t3: T).((pr0 t2 t3) \to -(eq T t2 t3))) (ex2 T (\lambda (t3: T).((eq T t2 t3) \to (\forall (P: -Prop).P))) (\lambda (t3: T).(pr0 t2 t3))))) H0 (lift (S O) O x) H3) in -(eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(or (\forall (t3: T).((pr0 -(THead (Bind Void) t t2) t3) \to (eq T (THead (Bind Void) t t2) t3))) (ex2 T -(\lambda (t3: T).((eq T (THead (Bind Void) t t2) t3) \to (\forall (P: -Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Void) t t2) t3))))) (or_intror -(\forall (t2: T).((pr0 (THead (Bind Void) t (lift (S O) O x)) t2) \to (eq T -(THead (Bind Void) t (lift (S O) O x)) t2))) (ex2 T (\lambda (t2: T).((eq T -(THead (Bind Void) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S O) O x)) t2))) (ex_intro2 -T (\lambda (t2: T).((eq T (THead (Bind Void) t (lift (S O) O x)) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S -O) O x)) t2)) x (\lambda (H5: (eq T (THead (Bind Void) t (lift (S O) O x)) -x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Void) x t (S O) O H5 P))) -(pr0_zeta Void not_void_abst x x (pr0_refl x) t))) t0 H3))) H2))) H1))) b)) -(\lambda (f: F).(F_ind (\lambda (f0: F).(or (\forall (t2: T).((pr0 (THead -(Flat f0) t t0) t2) \to (eq T (THead (Flat f0) t t0) t2))) (ex2 T (\lambda -(t2: T).((eq T (THead (Flat f0) t t0) t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr0 (THead (Flat f0) t t0) t2))))) (let H_x \def -(binder_dec t0) in (let H1 \def H_x in (or_ind (ex_3 B T T (\lambda (b: -B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) -(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w -u)) \to (\forall (P: Prop).P))))) (or (\forall (t2: T).((pr0 (THead (Flat -Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: -T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H2: (ex_3 B T T -(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w -u))))))).(ex_3_ind B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq -T t0 (THead (Bind b) w u))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t -t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq -T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x0: B).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (H3: (eq T t0 (THead (Bind x0) x1 x2))).(let H4 -\def (eq_ind T t0 (\lambda (t2: T).(or (\forall (t3: T).((pr0 t2 t3) \to (eq -T t2 t3))) (ex2 T (\lambda (t3: T).((eq T t2 t3) \to (\forall (P: Prop).P))) -(\lambda (t3: T).(pr0 t2 t3))))) H0 (THead (Bind x0) x1 x2) H3) in (eq_ind_r -T (THead (Bind x0) x1 x2) (\lambda (t2: T).(or (\forall (t3: T).((pr0 (THead -(Flat Appl) t t2) t3) \to (eq T (THead (Flat Appl) t t2) t3))) (ex2 T -(\lambda (t3: T).((eq T (THead (Flat Appl) t t2) t3) \to (\forall (P: -Prop).P))) (\lambda (t3: T).(pr0 (THead (Flat Appl) t t2) t3))))) (B_ind -(\lambda (b: B).((or (\forall (t2: T).((pr0 (THead (Bind b) x1 x2) t2) \to -(eq T (THead (Bind b) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead -(Bind b) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind b) x1 x2) t2)))) \to (or (\forall (t2: T).((pr0 (THead (Flat Appl) t -(THead (Bind b) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind b) x1 -x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind -b) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat -Appl) t (THead (Bind b) x1 x2)) t2)))))) (\lambda (_: (or (\forall (t2: -T).((pr0 (THead (Bind Abbr) x1 x2) t2) \to (eq T (THead (Bind Abbr) x1 x2) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) x1 x2) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) x1 x2) -t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind -Abbr) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abbr) -x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat -Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T -(THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 -x2)) t2)) (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) -(\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) (THead -(Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: -Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ t2) \Rightarrow (match t2 with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow -(match k0 with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) -I (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in -(False_ind P H7)))) (pr0_upsilon Abbr not_abbr_abst t t (pr0_refl t) x1 x1 -(pr0_refl x1) x2 x2 (pr0_refl x2))))) (\lambda (_: (or (\forall (t2: T).((pr0 -(THead (Bind Abst) x1 x2) t2) \to (eq T (THead (Bind Abst) x1 x2) t2))) (ex2 -T (\lambda (t2: T).((eq T (THead (Bind Abst) x1 x2) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) x1 x2) t2))))).(or_intror -(\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) -\to (eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead -(Bind Abst) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat -Appl) t (THead (Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2)) (THead -(Bind Abbr) t x2) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abst) -x1 x2)) (THead (Bind Abbr) t x2))).(\lambda (P: Prop).(let H7 \def (eq_ind T -(THead (Flat Appl) t (THead (Bind Abst) x1 x2)) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ -_) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])])) I (THead (Bind Abbr) t x2) H6) in (False_ind P H7)))) -(pr0_beta x1 t t (pr0_refl t) x2 x2 (pr0_refl x2))))) (\lambda (_: (or -(\forall (t2: T).((pr0 (THead (Bind Void) x1 x2) t2) \to (eq T (THead (Bind -Void) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) x1 x2) -t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) x1 -x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead -(Bind Void) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Void) x1 -x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind -Void) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Flat Appl) t (THead (Bind Void) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: -T).((eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) -x1 x2)) t2)) (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) -(\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (THead -(Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: -Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ t2) \Rightarrow (match t2 with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow -(match k0 with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) -I (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in -(False_ind P H7)))) (pr0_upsilon Void not_void_abst t t (pr0_refl t) x1 x1 -(pr0_refl x1) x2 x2 (pr0_refl x2))))) x0 H4) t0 H3)))))) H2)) (\lambda (H2: -((\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w -u)) \to (\forall (P: Prop).P))))))).(let H3 \def H in (or_ind (\forall (t2: -T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: -T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) -(\lambda (H4: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H5 \def -H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T -(\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to -(eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead -(Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Flat Appl) t t0) t2)))) (\lambda (H6: ((\forall (t2: T).((pr0 t0 t2) -\to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Flat Appl) t -t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq -T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Flat Appl) t t0) t2))) (\lambda (t2: T).(\lambda (H7: (pr0 -(THead (Flat Appl) t t0) t2)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (ex4_4 T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T -t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))) (eq T (THead (Flat Appl) t t0) t2) -(\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t0 t3))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 -t3))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H9: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H10: (pr0 t -x0)).(\lambda (H11: (pr0 t0 x1)).(let H_y \def (H6 x1 H11) in (let H_y0 \def -(H4 x0 H10) in (let H12 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H11 -t0 H_y) in (let H13 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead -(Flat Appl) x0 t3))) H9 t0 H_y) in (let H14 \def (eq_ind_r T x0 (\lambda (t3: -T).(pr0 t t3)) H10 t H_y0) in (let H15 \def (eq_ind_r T x0 (\lambda (t3: -T).(eq T t2 (THead (Flat Appl) t3 t0))) H13 t H_y0) in (eq_ind_r T (THead -(Flat Appl) t t0) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) -(refl_equal T (THead (Flat Appl) t t0)) t2 H15)))))))))))) H8)) (\lambda (H8: -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(pr0 z1 t3))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t3: T).(pr0 z1 t3))))) (eq T (THead (Flat Appl) t t0) t2) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda -(H9: (eq T t0 (THead (Bind Abst) x0 x1))).(\lambda (H10: (eq T t2 (THead -(Bind Abbr) x2 x3))).(\lambda (_: (pr0 t x2)).(\lambda (_: (pr0 x1 -x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t3: T).(eq T (THead -(Flat Appl) t t0) t3)) (let H13 \def (eq_ind T t0 (\lambda (t3: T).(\forall -(t4: T).((pr0 t3 t4) \to (eq T t3 t4)))) H6 (THead (Bind Abst) x0 x1) H9) in -(let H14 \def (eq_ind T t0 (\lambda (t3: T).(\forall (b: B).(\forall (w: -T).(\forall (u: T).((eq T t3 (THead (Bind b) w u)) \to (\forall (P: -Prop).P)))))) H2 (THead (Bind Abst) x0 x1) H9) in (eq_ind_r T (THead (Bind -Abst) x0 x1) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind -Abbr) x2 x3))) (H14 Abst x0 x1 (H13 (THead (Bind Abst) x0 x1) (pr0_refl -(THead (Bind Abst) x0 x1))) (eq T (THead (Flat Appl) t (THead (Bind Abst) x0 -x1)) (THead (Bind Abbr) x2 x3))) t0 H9))) t2 H10))))))))) H8)) (\lambda (H8: -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T -t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))))))).(ex6_6_ind B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: -B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H10: (eq T -t0 (THead (Bind x0) x1 x2))).(\lambda (H11: (eq T t2 (THead (Bind x0) x4 -(THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (_: (pr0 t x3)).(\lambda -(_: (pr0 x1 x4)).(\lambda (_: (pr0 x2 x5)).(eq_ind_r T (THead (Bind x0) x4 -(THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t3: T).(eq T (THead (Flat -Appl) t t0) t3)) (let H15 \def (eq_ind T t0 (\lambda (t3: T).(\forall (t4: -T).((pr0 t3 t4) \to (eq T t3 t4)))) H6 (THead (Bind x0) x1 x2) H10) in (let -H16 \def (eq_ind T t0 (\lambda (t3: T).(\forall (b: B).(\forall (w: -T).(\forall (u: T).((eq T t3 (THead (Bind b) w u)) \to (\forall (P: -Prop).P)))))) H2 (THead (Bind x0) x1 x2) H10) in (eq_ind_r T (THead (Bind x0) -x1 x2) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind x0) x4 -(THead (Flat Appl) (lift (S O) O x3) x5)))) (H16 x0 x1 x2 (H15 (THead (Bind -x0) x1 x2) (pr0_refl (THead (Bind x0) x1 x2))) (eq T (THead (Flat Appl) t -(THead (Bind x0) x1 x2)) (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O -x3) x5)))) t0 H10))) t2 H11))))))))))))) H8)) (pr0_gen_appl t t0 t2 H7)))))) -(\lambda (H6: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T -t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall -(t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) -t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) -(\lambda (x: T).(\lambda (H7: (((eq T t0 x) \to (\forall (P: -Prop).P)))).(\lambda (H8: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 -(THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (ex_intro2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)) (THead (Flat -Appl) t x) (\lambda (H9: (eq T (THead (Flat Appl) t t0) (THead (Flat Appl) t -x))).(\lambda (P: Prop).(let H10 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) -\Rightarrow t2])) (THead (Flat Appl) t t0) (THead (Flat Appl) t x) H9) in -(let H11 \def (eq_ind_r T x (\lambda (t2: T).(pr0 t0 t2)) H8 t0 H10) in (let -H12 \def (eq_ind_r T x (\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: -Prop).P0))) H7 t0 H10) in (H12 (refl_equal T t0) P)))))) (pr0_comp t t -(pr0_refl t) t0 x H8 (Flat Appl))))))) H6)) H5))) (\lambda (H4: (ex2 T -(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead -(Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x: -T).(\lambda (H5: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H6: (pr0 -t x)).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq -T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat -Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Flat Appl) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat -Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Flat Appl) t t0) t2)) (THead (Flat Appl) x t0) (\lambda (H7: (eq T (THead -(Flat Appl) t t0) (THead (Flat Appl) x t0))).(\lambda (P: Prop).(let H8 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef -_) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead (Flat Appl) t t0) -(THead (Flat Appl) x t0) H7) in (let H9 \def (eq_ind_r T x (\lambda (t2: -T).(pr0 t t2)) H6 t H8) in (let H10 \def (eq_ind_r T x (\lambda (t2: T).((eq -T t t2) \to (\forall (P0: Prop).P0))) H5 t H8) in (H10 (refl_equal T t) -P)))))) (pr0_comp t x H6 t0 t0 (pr0_refl t0) (Flat Appl))))))) H4)) H3))) -H1))) (or_intror (\forall (t2: T).((pr0 (THead (Flat Cast) t t0) t2) \to (eq -T (THead (Flat Cast) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat -Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Flat Cast) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat -Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Flat Cast) t t0) t2)) t0 (\lambda (H1: (eq T (THead (Flat Cast) t t0) -t0)).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) t t0 H1 P))) (pr0_tau t0 t0 -(pr0_refl t0) t))) f)) k)))))) t1). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/pr0/defs.ma deleted file mode 100644 index 5f6bd58fb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/defs.ma +++ /dev/null @@ -1,40 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/defs.ma". - -inductive pr0: T \to (T \to Prop) \def -| pr0_refl: \forall (t: T).(pr0 t t) -| pr0_comp: \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: -T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (k: K).(pr0 (THead k u1 t1) -(THead k u2 t2)))))))) -| pr0_beta: \forall (u: T).(\forall (v1: T).(\forall (v2: T).((pr0 v1 v2) \to -(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr0 (THead (Flat Appl) v1 -(THead (Bind Abst) u t1)) (THead (Bind Abbr) v2 t2)))))))) -| pr0_upsilon: \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: -T).(\forall (v2: T).((pr0 v1 v2) \to (\forall (u1: T).(\forall (u2: T).((pr0 -u1 u2) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr0 (THead -(Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t2))))))))))))) -| pr0_delta: \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: -T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (w: T).((subst0 O u2 t2 w) \to -(pr0 (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 w))))))))) -| pr0_zeta: \forall (b: B).((not (eq B b Abst)) \to (\forall (t1: T).(\forall -(t2: T).((pr0 t1 t2) \to (\forall (u: T).(pr0 (THead (Bind b) u (lift (S O) O -t1)) t2)))))) -| pr0_tau: \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (u: -T).(pr0 (THead (Flat Cast) u t1) t2)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/pr0/fwd.ma deleted file mode 100644 index ad2f0e886..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/fwd.ma +++ /dev/null @@ -1,1561 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/defs.ma". - -include "basic_1/subst0/fwd.ma". - -implied rec lemma pr0_ind (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t -t))) (f0: (\forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to ((P u1 u2) \to -(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall -(k: K).(P (THead k u1 t1) (THead k u2 t2)))))))))))) (f1: (\forall (u: -T).(\forall (v1: T).(\forall (v2: T).((pr0 v1 v2) \to ((P v1 v2) \to (\forall -(t1: T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (P (THead (Flat -Appl) v1 (THead (Bind Abst) u t1)) (THead (Bind Abbr) v2 t2)))))))))))) (f2: -(\forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: -T).((pr0 v1 v2) \to ((P v1 v2) \to (\forall (u1: T).(\forall (u2: T).((pr0 u1 -u2) \to ((P u1 u2) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to ((P -t1 t2) \to (P (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t2)))))))))))))))))) (f3: (\forall -(u1: T).(\forall (u2: T).((pr0 u1 u2) \to ((P u1 u2) \to (\forall (t1: -T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall (w: T).((subst0 -O u2 t2 w) \to (P (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 -w))))))))))))) (f4: (\forall (b: B).((not (eq B b Abst)) \to (\forall (t1: -T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall (u: T).(P (THead -(Bind b) u (lift (S O) O t1)) t2))))))))) (f5: (\forall (t1: T).(\forall (t2: -T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall (u: T).(P (THead (Flat Cast) u -t1) t2))))))) (t: T) (t0: T) (p: pr0 t t0) on p: P t t0 \def match p with -[(pr0_refl t1) \Rightarrow (f t1) | (pr0_comp u1 u2 p0 t1 t2 p1 k) -\Rightarrow (f0 u1 u2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) u1 u2 p0) t1 t2 p1 -((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p1) k) | (pr0_beta u v1 v2 p0 t1 t2 -p1) \Rightarrow (f1 u v1 v2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) v1 v2 p0) t1 -t2 p1 ((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p1)) | (pr0_upsilon b n v1 v2 p0 -u1 u2 p1 t1 t2 p2) \Rightarrow (f2 b n v1 v2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 -f5) v1 v2 p0) u1 u2 p1 ((pr0_ind P f f0 f1 f2 f3 f4 f5) u1 u2 p1) t1 t2 p2 -((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p2)) | (pr0_delta u1 u2 p0 t1 t2 p1 w -s0) \Rightarrow (f3 u1 u2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) u1 u2 p0) t1 t2 -p1 ((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p1) w s0) | (pr0_zeta b n t1 t2 p0 -u) \Rightarrow (f4 b n t1 t2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p0) u) -| (pr0_tau t1 t2 p0 u) \Rightarrow (f5 t1 t2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 -f5) t1 t2 p0) u)]. - -lemma pr0_gen_sort: - \forall (x: T).(\forall (n: nat).((pr0 (TSort n) x) \to (eq T x (TSort n)))) -\def - \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TSort n) x)).(insert_eq -T (TSort n) (\lambda (t: T).(pr0 t x)) (\lambda (t: T).(eq T x t)) (\lambda -(y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: -T).((eq T t (TSort n)) \to (eq T t0 t)))) (\lambda (t: T).(\lambda (H1: (eq T -t (TSort n))).(let H2 \def (f_equal T T (\lambda (e: T).e) t (TSort n) H1) in -(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 t0)) (refl_equal T (TSort n)) -t H2)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda -(_: (((eq T u1 (TSort n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 -t1)))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u1 t1) (TSort n))).(let -H6 \def (eq_ind T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H5) in (False_ind (eq T (THead k u2 t2) (THead k u1 t1)) -H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: -(pr0 v1 v2)).(\lambda (_: (((eq T v1 (TSort n)) \to (eq T v2 v1)))).(\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 -(TSort n)) \to (eq T t2 t1)))).(\lambda (H5: (eq T (THead (Flat Appl) v1 -(THead (Bind Abst) u t1)) (TSort n))).(let H6 \def (eq_ind T (THead (Flat -Appl) v1 (THead (Bind Abst) u t1)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H5) in (False_ind (eq T (THead (Bind Abbr) v2 t2) (THead -(Flat Appl) v1 (THead (Bind Abst) u t1))) H6)))))))))))) (\lambda (b: -B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (TSort n)) \to (eq T v2 -v1)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda -(_: (((eq T u1 (TSort n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 -t1)))).(\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) -(TSort n))).(let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 -t1)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H8) in -(False_ind (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) -(THead (Flat Appl) v1 (THead (Bind b) u1 t1))) H9))))))))))))))))) (\lambda -(u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 -(TSort n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: -(pr0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 t1)))).(\lambda -(w: T).(\lambda (_: (subst0 O u2 t2 w)).(\lambda (H6: (eq T (THead (Bind -Abbr) u1 t1) (TSort n))).(let H7 \def (eq_ind T (THead (Bind Abbr) u1 t1) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in -(False_ind (eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u1 t1)) -H7))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 -(TSort n)) \to (eq T t2 t1)))).(\lambda (u: T).(\lambda (H4: (eq T (THead -(Bind b) u (lift (S O) O t1)) (TSort n))).(let H5 \def (eq_ind T (THead (Bind -b) u (lift (S O) O t1)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H4) in (False_ind (eq T t2 (THead (Bind b) u (lift (S O) -O t1))) H5)))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 -t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 t1)))).(\lambda (u: -T).(\lambda (H3: (eq T (THead (Flat Cast) u t1) (TSort n))).(let H4 \def -(eq_ind T (THead (Flat Cast) u t1) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H3) in (False_ind (eq T t2 (THead (Flat Cast) u t1)) -H4)))))))) y x H0))) H))). - -lemma pr0_gen_lref: - \forall (x: T).(\forall (n: nat).((pr0 (TLRef n) x) \to (eq T x (TLRef n)))) -\def - \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TLRef n) x)).(insert_eq -T (TLRef n) (\lambda (t: T).(pr0 t x)) (\lambda (t: T).(eq T x t)) (\lambda -(y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: -T).((eq T t (TLRef n)) \to (eq T t0 t)))) (\lambda (t: T).(\lambda (H1: (eq T -t (TLRef n))).(let H2 \def (f_equal T T (\lambda (e: T).e) t (TLRef n) H1) in -(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 t0)) (refl_equal T (TLRef n)) -t H2)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda -(_: (((eq T u1 (TLRef n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 -t1)))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u1 t1) (TLRef n))).(let -H6 \def (eq_ind T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H5) in (False_ind (eq T (THead k u2 t2) (THead k u1 t1)) -H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: -(pr0 v1 v2)).(\lambda (_: (((eq T v1 (TLRef n)) \to (eq T v2 v1)))).(\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 -(TLRef n)) \to (eq T t2 t1)))).(\lambda (H5: (eq T (THead (Flat Appl) v1 -(THead (Bind Abst) u t1)) (TLRef n))).(let H6 \def (eq_ind T (THead (Flat -Appl) v1 (THead (Bind Abst) u t1)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H5) in (False_ind (eq T (THead (Bind Abbr) v2 t2) (THead -(Flat Appl) v1 (THead (Bind Abst) u t1))) H6)))))))))))) (\lambda (b: -B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (TLRef n)) \to (eq T v2 -v1)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda -(_: (((eq T u1 (TLRef n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 -t1)))).(\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) -(TLRef n))).(let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 -t1)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H8) in -(False_ind (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) -(THead (Flat Appl) v1 (THead (Bind b) u1 t1))) H9))))))))))))))))) (\lambda -(u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 -(TLRef n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: -(pr0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 t1)))).(\lambda -(w: T).(\lambda (_: (subst0 O u2 t2 w)).(\lambda (H6: (eq T (THead (Bind -Abbr) u1 t1) (TLRef n))).(let H7 \def (eq_ind T (THead (Bind Abbr) u1 t1) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in -(False_ind (eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u1 t1)) -H7))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 -(TLRef n)) \to (eq T t2 t1)))).(\lambda (u: T).(\lambda (H4: (eq T (THead -(Bind b) u (lift (S O) O t1)) (TLRef n))).(let H5 \def (eq_ind T (THead (Bind -b) u (lift (S O) O t1)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H4) in (False_ind (eq T t2 (THead (Bind b) u (lift (S O) -O t1))) H5)))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 -t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 t1)))).(\lambda (u: -T).(\lambda (H3: (eq T (THead (Flat Cast) u t1) (TLRef n))).(let H4 \def -(eq_ind T (THead (Flat Cast) u t1) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H3) in (False_ind (eq T t2 (THead (Flat Cast) u t1)) -H4)))))))) y x H0))) H))). - -lemma pr0_gen_abst: - \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abst) u1 -t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind -Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2))))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Bind Abst) u1 t1) x)).(insert_eq T (THead (Bind Abst) u1 t1) (\lambda (t: -T).(pr0 t x)) (\lambda (_: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))) (\lambda (y: -T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: T).((eq T -t (THead (Bind Abst) u1 t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))))) (\lambda -(t: T).(\lambda (H1: (eq T t (THead (Bind Abst) u1 t1))).(let H2 \def -(f_equal T T (\lambda (e: T).e) t (THead (Bind Abst) u1 t1) H1) in (eq_ind_r -T (THead (Bind Abst) u1 t1) (\lambda (t0: T).(ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 -t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind -Abst) u1 t1) (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 -(refl_equal T (THead (Bind Abst) u1 t1)) (pr0_refl u1) (pr0_refl t1)) t -H2)))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda -(H2: (((eq T u0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Bind Abst) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 -t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (pr0 t0 -t2)).(\lambda (H4: (((eq T t0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3))))))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u0 t0) -(THead (Bind Abst) u1 t1))).(let H6 \def (f_equal T K (\lambda (e: T).(match -e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H5) in ((let H7 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | -(TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) -(THead (Bind Abst) u1 t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H5) -in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k (Bind Abst))).(eq_ind_r -K (Bind Abst) (\lambda (k0: K).(ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T (THead k0 u2 t2) (THead (Bind Abst) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3))))) (let H11 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind -Abst) u1 t1)) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 -(THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))) H4 t1 H8) in (let H12 \def -(eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind T -u0 (\lambda (t: T).((eq T t (THead (Bind Abst) u1 t1)) \to (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind Abst) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))))) H2 u1 H9) in (let H14 \def (eq_ind T u0 (\lambda (t: -T).(pr0 t u2)) H1 u1 H9) in (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: -T).(eq T (THead (Bind Abst) u2 t2) (THead (Bind Abst) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3))) u2 t2 (refl_equal T (THead (Bind Abst) u2 t2)) H14 H12))))) k H10)))) -H7)) H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u1 -t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind -Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2))))))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 -t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (H5: (eq T (THead (Flat Appl) -v1 (THead (Bind Abst) u t0)) (THead (Bind Abst) u1 t1))).(let H6 \def (eq_ind -T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])])) I (THead (Bind Abst) u1 t1) H5) in (False_ind (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead -(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) H6)))))))))))) (\lambda (b: -B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u1 -t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind -Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2))))))).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u1 -t1)) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind -Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2))))))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 -t1)) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (H8: (eq T (THead (Flat Appl) -v1 (THead (Bind b) u0 t0)) (THead (Bind Abst) u1 t1))).(let H9 \def (eq_ind T -(THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abst) u1 t1) H8) in (False_ind (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t2)) (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) -H9))))))))))))))))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (_: (pr0 u0 -u2)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind Abst) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 -t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3))))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t2 -w)).(\lambda (H6: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abst) u1 -t1))).(let H7 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with -[Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | -(Flat _) \Rightarrow False])])) I (THead (Bind Abst) u1 t1) H6) in (False_ind -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) -(THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) H7))))))))))))) (\lambda (b: -B).(\lambda (H1: (not (eq B b Abst))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (_: (pr0 t0 t2)).(\lambda (H3: (((eq T t0 (THead (Bind Abst) u1 -t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (u: T).(\lambda (H4: (eq T -(THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1))).(let H5 \def -(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef -_) \Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O -t0)) (THead (Bind Abst) u1 t1) H4) in ((let H6 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead -_ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind -Abst) u1 t1) H4) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | -(TLRef _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | -(THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead -(Bind Abst) u1 t1) H4) in (\lambda (_: (eq T u u1)).(\lambda (H9: (eq B b -Abst)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H1 -Abst H9) in (let H11 \def (eq_ind_r T t1 (\lambda (t: T).((eq T t0 (THead -(Bind Abst) u1 t)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))))) H3 (lift (S O) O t0) H7) in -(eq_ind T (lift (S O) O t0) (\lambda (t: T).(ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t -t3))))) (let H12 \def (match (H10 (refl_equal B Abst)) in False with []) in -H12) t1 H7)))))) H6)) H5)))))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda -(_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 t1)) \to -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (u: T).(\lambda (H3: (eq T -(THead (Flat Cast) u t0) (THead (Bind Abst) u1 t1))).(let H4 \def (eq_ind T -(THead (Flat Cast) u t0) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind Abst) u1 t1) H3) in (False_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) H4)))))))) y x H0))) H)))). - -lemma pr0_gen_appl: - \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Appl) u1 -t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) -v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t2: T).(pr0 z1 t2)))))))))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Flat Appl) u1 t1) x)).(insert_eq T (THead (Flat Appl) u1 t1) (\lambda (t: -T).(pr0 t x)) (\lambda (_: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 -v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))) (\lambda (y: -T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: T).((eq T -t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T -t0 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 -v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))))) (\lambda (t: -T).(\lambda (H1: (eq T t (THead (Flat Appl) u1 t1))).(let H2 \def (f_equal T -T (\lambda (e: T).e) t (THead (Flat Appl) u1 t1) H1) in (eq_ind_r T (THead -(Flat Appl) u1 t1) (\lambda (t0: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T -t0 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 -v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))) (or3_intro0 (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead -(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind Abbr) u2 t2)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: -T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(v2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind b) v2 -(THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t2: T).(pr0 z1 t2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: -T).(eq T (THead (Flat Appl) u1 t1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 -t2))) u1 t1 (refl_equal T (THead (Flat Appl) u1 t1)) (pr0_refl u1) (pr0_refl -t1))) t H2)))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 -u2)).(\lambda (H2: (((eq T u0 (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind -Abbr) u3 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v2: T).(\lambda (t2: T).(eq T u2 (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O u3) t2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda -(H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u1 t1)) \to -(or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) -u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (k: K).(\lambda (H5: (eq -T (THead k u0 t0) (THead (Flat Appl) u1 t1))).(let H6 \def (f_equal T K -(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u0 t0) (THead (Flat -Appl) u1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) -\Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H5) in ((let H8 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | -(TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) -(THead (Flat Appl) u1 t1) H5) in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: -(eq K k (Flat Appl))).(eq_ind_r K (Flat Appl) (\lambda (k0: K).(or3 (ex3_2 T -T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k0 u2 t2) (THead (Flat Appl) -u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: -T).(eq T (THead k0 u2 t2) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T -(THead k0 u2 t2) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) -t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda -(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 -y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))) (let H11 \def -(eq_ind T t0 (\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H4 t1 H8) in (let H12 \def (eq_ind -T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind T u0 -(\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Flat Appl) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind -Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T u2 (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))) H2 u1 H9) in (let H14 \def (eq_ind T u0 -(\lambda (t: T).(pr0 t u2)) H1 u1 H9) in (or3_intro0 (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Flat Appl) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: -T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind Abbr) u3 t3)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda -(t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind b) v2 (THead (Flat Appl) -(lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead -(Flat Appl) u2 t2) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 -(refl_equal T (THead (Flat Appl) u2 t2)) H14 H12)))))) k H10)))) H7)) -H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda -(H1: (pr0 v1 v2)).(\lambda (H2: (((eq T v1 (THead (Flat Appl) u1 t1)) \to -(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Flat Appl) -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: -T).(eq T v2 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t2: T).(eq T v2 (THead (Bind -b) v3 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u1 -t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (H5: (eq T (THead (Flat -Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1))).(let H6 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef -_) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 -(THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1) H5) in ((let H7 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead -(Bind Abst) u t0) | (TLRef _) \Rightarrow (THead (Bind Abst) u t0) | (THead _ -_ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead -(Flat Appl) u1 t1) H5) in (\lambda (H8: (eq T v1 u1)).(let H9 \def (eq_ind T -v1 (\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T v2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T v2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind b) v3 (THead -(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))) H2 u1 H8) in (let H10 \def (eq_ind T v1 -(\lambda (t: T).(pr0 t v2)) H1 u1 H8) in (let H11 \def (eq_ind_r T t1 -(\lambda (t: T).((eq T t0 (THead (Flat Appl) u1 t)) \to (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v3 (THead -(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))) H4 (THead (Bind Abst) u t0) H7) in (let H12 -\def (eq_ind_r T t1 (\lambda (t: T).((eq T u1 (THead (Flat Appl) u1 t)) \to -(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T v2 (THead (Flat Appl) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T v2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind -b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H9 (THead (Bind Abst) u t0) H7) in -(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).(or3 (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Flat Appl) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda -(t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind b) v3 (THead (Flat Appl) -(lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Bind Abbr) v2 t2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead -(Bind Abst) u t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind -Abbr) v2 t2) (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) -t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda -(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 -y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex4_4_intro T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) -v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) u t0 v2 t2 -(refl_equal T (THead (Bind Abst) u t0)) (refl_equal T (THead (Bind Abbr) v2 -t2)) H10 H3)) t1 H7))))))) H6)))))))))))) (\lambda (b: B).(\lambda (H1: (not -(eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H2: (pr0 v1 -v2)).(\lambda (H3: (((eq T v1 (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind -Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v3: T).(\lambda (t2: T).(eq T v2 (THead (Bind b0) v3 (THead -(Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t2: T).(pr0 z1 t2)))))))))))).(\lambda (u0: T).(\lambda (u2: T).(\lambda -(H4: (pr0 u0 u2)).(\lambda (H5: (((eq T u0 (THead (Flat Appl) u1 t1)) \to -(or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) -u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: -T).(eq T u2 (THead (Bind Abbr) u3 t2)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T -(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t2: T).(eq T u2 (THead (Bind -b0) v3 (THead (Flat Appl) (lift (S O) O u3) t2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (H6: (pr0 t0 t2)).(\lambda (H7: (((eq T t0 (THead (Flat Appl) u1 -t1)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (H8: (eq T (THead (Flat -Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1))).(let H9 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef -_) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 -(THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1) H8) in ((let H10 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead -(Bind b) u0 t0) | (TLRef _) \Rightarrow (THead (Bind b) u0 t0) | (THead _ _ -t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead -(Flat Appl) u1 t1) H8) in (\lambda (H11: (eq T v1 u1)).(let H12 \def (eq_ind -T v1 (\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T v2 (THead (Flat Appl) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T v2 (THead (Bind -Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind b0) v3 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))) H3 u1 H11) in (let H13 \def (eq_ind T v1 -(\lambda (t: T).(pr0 t v2)) H2 u1 H11) in (let H14 \def (eq_ind_r T t1 -(\lambda (t: T).((eq T t0 (THead (Flat Appl) u1 t)) \to (or3 (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind b0) v3 (THead -(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))))) H7 (THead (Bind b) u0 t0) H10) in (let H15 \def -(eq_ind_r T t1 (\lambda (t: T).((eq T u0 (THead (Flat Appl) u1 t)) \to (or3 -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Flat Appl) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: -T).(eq T u2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t -(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T u2 (THead (Bind -b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H5 (THead (Bind b) u0 t0) H10) in -(let H16 \def (eq_ind_r T t1 (\lambda (t: T).((eq T u1 (THead (Flat Appl) u1 -t)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T v2 (THead -(Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(t3: T).(eq T v2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t -(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind -b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H12 (THead (Bind b) u0 t0) H10) in -(eq_ind T (THead (Bind b) u0 t0) (\lambda (t: T).(or3 (ex3_2 T T (\lambda -(u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t2)) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t2)) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t -(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat -Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Flat -Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 (THead (Bind b) u0 t0) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind b) u0 t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind Abbr) u3 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 -u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat -Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3)))))))) (ex6_6_intro B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 -Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind -b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat Appl) -(lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3))))))) b u0 t0 v2 u2 t2 H1 (refl_equal T (THead (Bind b) u0 t0)) -(refl_equal T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))) -H13 H4 H6)) t1 H10)))))))) H9))))))))))))))))) (\lambda (u0: T).(\lambda (u2: -T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead (Flat Appl) u1 -t1)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(t2: T).(eq T u2 (THead (Bind Abbr) u3 t2)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t2: T).(eq T u2 (THead (Bind -b) v2 (THead (Flat Appl) (lift (S O) O u3) t2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u1 -t1)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (w: T).(\lambda (_: -(subst0 O u2 t2 w)).(\lambda (H6: (eq T (THead (Bind Abbr) u0 t0) (THead -(Flat Appl) u1 t1))).(let H7 \def (eq_ind T (THead (Bind Abbr) u0 t0) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u1 -t1) H6) in (False_ind (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T -(THead (Bind Abbr) u2 w) (THead (Flat Appl) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) -u2 w) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T (THead (Bind -Abbr) u2 w) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) -t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda -(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 -y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))) H7))))))))))))) -(\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (t0: T).(\lambda -(t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Appl) -u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b0) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (u: T).(\lambda (H4: (eq -T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) u1 t1))).(let H5 -\def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k -_ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) -\Rightarrow False])])) I (THead (Flat Appl) u1 t1) H4) in (False_ind (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b0) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))))))) H5)))))))))) (\lambda (t0: -T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead -(Flat Appl) u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T -t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 -v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (u: -T).(\lambda (H3: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) u1 -t1))).(let H4 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k -_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) -\Rightarrow (match f with [Appl \Rightarrow False | Cast \Rightarrow -True])])])) I (THead (Flat Appl) u1 t1) H3) in (False_ind (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(t3: T).(pr0 z1 t3))))))))) H4)))))))) y x H0))) H)))). - -lemma pr0_gen_cast: - \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Cast) u1 -t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Flat Cast) u1 t1) x)).(insert_eq T (THead (Flat Cast) u1 t1) (\lambda (t: -T).(pr0 t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))) -(\lambda (y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda -(t0: T).((eq T t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 -t2)))) (pr0 t1 t0))))) (\lambda (t: T).(\lambda (H1: (eq T t (THead (Flat -Cast) u1 t1))).(let H2 \def (f_equal T T (\lambda (e: T).e) t (THead (Flat -Cast) u1 t1) H1) in (eq_ind_r T (THead (Flat Cast) u1 t1) (\lambda (t0: -T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat -Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 t0))) (or_introl (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) u1 t1) (THead -(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (THead (Flat Cast) u1 t1)) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) -u1 t1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 -u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T -(THead (Flat Cast) u1 t1)) (pr0_refl u1) (pr0_refl t1))) t H2)))) (\lambda -(u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda (H2: (((eq T u0 -(THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: -T).(eq T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 -u2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (pr0 t0 t2)).(\lambda -(H4: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2))))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u0 t0) -(THead (Flat Cast) u1 t1))).(let H6 \def (f_equal T K (\lambda (e: T).(match -e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H5) in ((let H7 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | -(TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) -(THead (Flat Cast) u1 t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H5) -in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k (Flat Cast))).(eq_ind_r -K (Flat Cast) (\lambda (k0: K).(or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T (THead k0 u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (THead k0 u2 t2)))) (let H11 \def (eq_ind T t0 (\lambda (t: -T).((eq T t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2)))) H4 t1 H8) in (let H12 \def (eq_ind T t0 (\lambda (t: -T).(pr0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind T u0 (\lambda (t: T).((eq T -t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda -(t3: T).(eq T u2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 -u2)))) H2 u1 H9) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 -u1 H9) in (or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T -(THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (THead (Flat Cast) u2 t2)) (ex3_2_intro T T (\lambda (u3: -T).(\lambda (t3: T).(eq T (THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Flat Cast) u2 -t2)) H14 H12)))))) k H10)))) H7)) H6)))))))))))) (\lambda (u: T).(\lambda -(v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 -(THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T v2 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 -v2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda -(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2))))).(\lambda (H5: (eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u t0)) (THead (Flat Cast) u1 t1))).(let H6 \def (eq_ind T (THead (Flat -Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f -with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat -Cast) u1 t1) H5) in (False_ind (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) v2 t2) (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (THead (Bind Abbr) v2 t2))) H6)))))))))))) (\lambda (b: -B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Flat Cast) u1 -t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead -(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 v2))))).(\lambda (u0: -T).(\lambda (u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead -(Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 -u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 -u2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda -(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2))))).(\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind -b) u0 t0)) (THead (Flat Cast) u1 t1))).(let H9 \def (eq_ind T (THead (Flat -Appl) v1 (THead (Bind b) u0 t0)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f -with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat -Cast) u1 t1) H8) in (False_ind (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead -(Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t2)))) H9))))))))))))))))) (\lambda (u0: -T).(\lambda (u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead -(Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 -u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 -u2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda -(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t2 -w)).(\lambda (H6: (eq T (THead (Bind Abbr) u0 t0) (THead (Flat Cast) u1 -t1))).(let H7 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat -_) \Rightarrow False])])) I (THead (Flat Cast) u1 t1) H6) in (False_ind (or -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) -(THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (THead (Bind Abbr) u2 -w))) H7))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b -Abst))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda -(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2))))).(\lambda (u: T).(\lambda (H4: (eq T (THead (Bind b) u -(lift (S O) O t0)) (THead (Flat Cast) u1 t1))).(let H5 \def (eq_ind T (THead -(Bind b) u (lift (S O) O t0)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I -(THead (Flat Cast) u1 t1) H4) in (False_ind (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2)) H5)))))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda -(H1: (pr0 t0 t2)).(\lambda (H2: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2))))).(\lambda (u: T).(\lambda -(H3: (eq T (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1))).(let H4 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef -_) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) -(THead (Flat Cast) u1 t1) H3) in ((let H5 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u1 -t1) H3) in (\lambda (_: (eq T u u1)).(let H7 \def (eq_ind T t0 (\lambda (t: -T).((eq T t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 t2)))) H2 t1 H5) in (let H8 \def (eq_ind T t0 (\lambda (t: -T).(pr0 t t2)) H1 t1 H5) in (or_intror (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) -H8))))) H4)))))))) y x H0))) H)))). - -lemma pr0_gen_lift: - \forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((pr0 -(lift h d t1) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda -(t2: T).(pr0 t1 t2))))))) -\def - \lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H: (pr0 (lift h d t1) x)).(insert_eq T (lift h d t1) (\lambda (t: T).(pr0 t -x)) (\lambda (_: T).(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda -(t2: T).(pr0 t1 t2)))) (\lambda (y: T).(\lambda (H0: (pr0 y x)).(unintro nat -d (\lambda (n: nat).((eq T y (lift h n t1)) \to (ex2 T (\lambda (t2: T).(eq T -x (lift h n t2))) (\lambda (t2: T).(pr0 t1 t2))))) (unintro T t1 (\lambda (t: -T).(\forall (x0: nat).((eq T y (lift h x0 t)) \to (ex2 T (\lambda (t2: T).(eq -T x (lift h x0 t2))) (\lambda (t2: T).(pr0 t t2)))))) (pr0_ind (\lambda (t: -T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: nat).((eq T t (lift h x1 -x0)) \to (ex2 T (\lambda (t2: T).(eq T t0 (lift h x1 t2))) (\lambda (t2: -T).(pr0 x0 t2)))))))) (\lambda (t: T).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H1: (eq T t (lift h x1 x0))).(ex_intro2 T (\lambda (t2: T).(eq -T t (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)) x0 H1 (pr0_refl x0)))))) -(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (H2: -((\forall (x0: T).(\forall (x1: nat).((eq T u1 (lift h x1 x0)) \to (ex2 T -(\lambda (t2: T).(eq T u2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 -t2)))))))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 -t3)).(\lambda (H4: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 -x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 x0 t4)))))))).(\lambda (k: K).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H5: (eq T (THead k u1 t2) (lift h x1 x0))).(K_ind (\lambda -(k0: K).((eq T (THead k0 u1 t2) (lift h x1 x0)) \to (ex2 T (\lambda (t4: -T).(eq T (THead k0 u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))))) -(\lambda (b: B).(\lambda (H6: (eq T (THead (Bind b) u1 t2) (lift h x1 -x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Bind -b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) -(\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda -(t4: T).(eq T (THead (Bind b) u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 -x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 (THead -(Bind b) x2 x3))).(\lambda (H8: (eq T u1 (lift h x1 x2))).(\lambda (H9: (eq T -t2 (lift h (S x1) x3))).(eq_ind_r T (THead (Bind b) x2 x3) (\lambda (t: -T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 t3) (lift h x1 t4))) -(\lambda (t4: T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 (lift h -(S x1) t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: T).(eq T -(THead (Bind b) u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) -x2 x3) t4))) (\lambda (x4: T).(\lambda (H_x: (eq T t3 (lift h (S x1) -x4))).(\lambda (H10: (pr0 x3 x4)).(eq_ind_r T (lift h (S x1) x4) (\lambda (t: -T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 t) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Bind b) x2 x3) t4)))) (ex2_ind T (\lambda (t4: -T).(eq T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda -(t4: T).(eq T (THead (Bind b) u2 (lift h (S x1) x4)) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Bind b) x2 x3) t4))) (\lambda (x5: T).(\lambda -(H_x0: (eq T u2 (lift h x1 x5))).(\lambda (H11: (pr0 x2 x5)).(eq_ind_r T -(lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) -t (lift h (S x1) x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) -x2 x3) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 -x5) (lift h (S x1) x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind -b) x2 x3) t4)) (THead (Bind b) x5 x4) (sym_eq T (lift h x1 (THead (Bind b) x5 -x4)) (THead (Bind b) (lift h x1 x5) (lift h (S x1) x4)) (lift_bind b x5 x4 h -x1)) (pr0_comp x2 x5 H11 x3 x4 H10 (Bind b))) u2 H_x0)))) (H2 x2 x1 H8)) t3 -H_x)))) (H4 x3 (S x1) H9)) x0 H7)))))) (lift_gen_bind b u1 t2 x0 h x1 H6)))) -(\lambda (f: F).(\lambda (H6: (eq T (THead (Flat f) u1 t2) (lift h x1 -x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat -f) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) -(\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h x1 z)))) (ex2 T (\lambda -(t4: T).(eq T (THead (Flat f) u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 -x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 (THead -(Flat f) x2 x3))).(\lambda (H8: (eq T u1 (lift h x1 x2))).(\lambda (H9: (eq T -t2 (lift h x1 x3))).(eq_ind_r T (THead (Flat f) x2 x3) (\lambda (t: T).(ex2 T -(\lambda (t4: T).(eq T (THead (Flat f) u2 t3) (lift h x1 t4))) (\lambda (t4: -T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) -(\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Flat f) -u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat f) x2 x3) t4))) -(\lambda (x4: T).(\lambda (H_x: (eq T t3 (lift h x1 x4))).(\lambda (H10: (pr0 -x3 x4)).(eq_ind_r T (lift h x1 x4) (\lambda (t: T).(ex2 T (\lambda (t4: -T).(eq T (THead (Flat f) u2 t) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead -(Flat f) x2 x3) t4)))) (ex2_ind T (\lambda (t4: T).(eq T u2 (lift h x1 t4))) -(\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Flat f) -u2 (lift h x1 x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat f) x2 -x3) t4))) (\lambda (x5: T).(\lambda (H_x0: (eq T u2 (lift h x1 x5))).(\lambda -(H11: (pr0 x2 x5)).(eq_ind_r T (lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda -(t4: T).(eq T (THead (Flat f) t (lift h x1 x4)) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Flat f) x2 x3) t4)))) (ex_intro2 T (\lambda (t4: T).(eq -T (THead (Flat f) (lift h x1 x5) (lift h x1 x4)) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Flat f) x2 x3) t4)) (THead (Flat f) x5 x4) (sym_eq T -(lift h x1 (THead (Flat f) x5 x4)) (THead (Flat f) (lift h x1 x5) (lift h x1 -x4)) (lift_flat f x5 x4 h x1)) (pr0_comp x2 x5 H11 x3 x4 H10 (Flat f))) u2 -H_x0)))) (H2 x2 x1 H8)) t3 H_x)))) (H4 x3 x1 H9)) x0 H7)))))) (lift_gen_flat -f u1 t2 x0 h x1 H6)))) k H5))))))))))))) (\lambda (u: T).(\lambda (v1: -T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (H2: ((\forall (x0: -T).(\forall (x1: nat).((eq T v1 (lift h x1 x0)) \to (ex2 T (\lambda (t2: -T).(eq T v2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H4: ((\forall -(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: -T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda -(x0: T).(\lambda (x1: nat).(\lambda (H5: (eq T (THead (Flat Appl) v1 (THead -(Bind Abst) u t2)) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda -(z: T).(eq T x0 (THead (Flat Appl) y0 z)))) (\lambda (y0: T).(\lambda (_: -T).(eq T v1 (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T (THead -(Bind Abst) u t2) (lift h x1 z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind -Abbr) v2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: -T).(\lambda (x3: T).(\lambda (H6: (eq T x0 (THead (Flat Appl) x2 -x3))).(\lambda (H7: (eq T v1 (lift h x1 x2))).(\lambda (H8: (eq T (THead -(Bind Abst) u t2) (lift h x1 x3))).(eq_ind_r T (THead (Flat Appl) x2 x3) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift -h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (ex3_2_ind T T (\lambda (y0: -T).(\lambda (z: T).(eq T x3 (THead (Bind Abst) y0 z)))) (\lambda (y0: -T).(\lambda (_: T).(eq T u (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: -T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind -Abbr) v2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 x3) -t4))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H9: (eq T x3 (THead (Bind -Abst) x4 x5))).(\lambda (_: (eq T u (lift h x1 x4))).(\lambda (H11: (eq T t2 -(lift h (S x1) x5))).(eq_ind_r T (THead (Bind Abst) x4 x5) (\lambda (t: -T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 t) t4)))) (ex2_ind T (\lambda -(t4: T).(eq T t3 (lift h (S x1) t4))) (\lambda (t4: T).(pr0 x5 t4)) (ex2 T -(\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4))) (\lambda -(x6: T).(\lambda (H_x: (eq T t3 (lift h (S x1) x6))).(\lambda (H12: (pr0 x5 -x6)).(eq_ind_r T (lift h (S x1) x6) (\lambda (t: T).(ex2 T (\lambda (t4: -T).(eq T (THead (Bind Abbr) v2 t) (lift h x1 t4))) (\lambda (t4: T).(pr0 -(THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4)))) (ex2_ind T (\lambda -(t4: T).(eq T v2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 T -(\lambda (t4: T).(eq T (THead (Bind Abbr) v2 (lift h (S x1) x6)) (lift h x1 -t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) -t4))) (\lambda (x7: T).(\lambda (H_x0: (eq T v2 (lift h x1 x7))).(\lambda -(H13: (pr0 x2 x7)).(eq_ind_r T (lift h x1 x7) (\lambda (t: T).(ex2 T (\lambda -(t4: T).(eq T (THead (Bind Abbr) t (lift h (S x1) x6)) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4)))) -(ex_intro2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x7) (lift h -(S x1) x6)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 -(THead (Bind Abst) x4 x5)) t4)) (THead (Bind Abbr) x7 x6) (sym_eq T (lift h -x1 (THead (Bind Abbr) x7 x6)) (THead (Bind Abbr) (lift h x1 x7) (lift h (S -x1) x6)) (lift_bind Abbr x7 x6 h x1)) (pr0_beta x4 x2 x7 H13 x5 x6 H12)) v2 -H_x0)))) (H2 x2 x1 H7)) t3 H_x)))) (H4 x5 (S x1) H11)) x3 H9)))))) -(lift_gen_bind Abst u t2 x3 h x1 H8)) x0 H6)))))) (lift_gen_flat Appl v1 -(THead (Bind Abst) u t2) x0 h x1 H5)))))))))))))) (\lambda (b: B).(\lambda -(H1: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 -v1 v2)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: nat).((eq T v1 (lift h -x1 x0)) \to (ex2 T (\lambda (t2: T).(eq T v2 (lift h x1 t2))) (\lambda (t2: -T).(pr0 x0 t2)))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 -u2)).(\lambda (H5: ((\forall (x0: T).(\forall (x1: nat).((eq T u1 (lift h x1 -x0)) \to (ex2 T (\lambda (t2: T).(eq T u2 (lift h x1 t2))) (\lambda (t2: -T).(pr0 x0 t2)))))))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 -t3)).(\lambda (H7: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 -x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 x0 t4)))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H8: (eq T -(THead (Flat Appl) v1 (THead (Bind b) u1 t2)) (lift h x1 x0))).(ex3_2_ind T T -(\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat Appl) y0 z)))) -(\lambda (y0: T).(\lambda (_: T).(eq T v1 (lift h x1 y0)))) (\lambda (_: -T).(\lambda (z: T).(eq T (THead (Bind b) u1 t2) (lift h x1 z)))) (ex2 T -(\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: -T).(\lambda (x3: T).(\lambda (H9: (eq T x0 (THead (Flat Appl) x2 -x3))).(\lambda (H10: (eq T v1 (lift h x1 x2))).(\lambda (H11: (eq T (THead -(Bind b) u1 t2) (lift h x1 x3))).(eq_ind_r T (THead (Flat Appl) x2 x3) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) -(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x3 (THead (Bind b) y0 -z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) (\lambda -(_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda (t4: -T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (lift h -x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 x3) t4))) (\lambda (x4: -T).(\lambda (x5: T).(\lambda (H12: (eq T x3 (THead (Bind b) x4 x5))).(\lambda -(H13: (eq T u1 (lift h x1 x4))).(\lambda (H14: (eq T t2 (lift h (S x1) -x5))).(eq_ind_r T (THead (Bind b) x4 x5) (\lambda (t: T).(ex2 T (\lambda (t4: -T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (lift h -x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 t) t4)))) (ex2_ind T -(\lambda (t4: T).(eq T t3 (lift h (S x1) t4))) (\lambda (t4: T).(pr0 x5 t4)) -(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 -(THead (Bind b) x4 x5)) t4))) (\lambda (x6: T).(\lambda (H_x: (eq T t3 (lift -h (S x1) x6))).(\lambda (H15: (pr0 x5 x6)).(eq_ind_r T (lift h (S x1) x6) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead -(Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) (ex2_ind T (\lambda (t4: T).(eq -T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x4 t4)) (ex2 T (\lambda (t4: -T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift h (S -x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead -(Bind b) x4 x5)) t4))) (\lambda (x7: T).(\lambda (H_x0: (eq T u2 (lift h x1 -x7))).(\lambda (H16: (pr0 x4 x7)).(eq_ind_r T (lift h x1 x7) (\lambda (t: -T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) t (THead (Flat Appl) (lift -(S O) O v2) (lift h (S x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 -(THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) (ex2_ind T (\lambda (t4: -T).(eq T v2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda -(t4: T).(eq T (THead (Bind b) (lift h x1 x7) (THead (Flat Appl) (lift (S O) O -v2) (lift h (S x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat -Appl) x2 (THead (Bind b) x4 x5)) t4))) (\lambda (x8: T).(\lambda (H_x1: (eq T -v2 (lift h x1 x8))).(\lambda (H17: (pr0 x2 x8)).(eq_ind_r T (lift h x1 x8) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 x7) -(THead (Flat Appl) (lift (S O) O t) (lift h (S x1) x6))) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) -(eq_ind T (lift h (plus (S O) x1) (lift (S O) O x8)) (\lambda (t: T).(ex2 T -(\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 x7) (THead (Flat Appl) t -(lift h (S x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat -Appl) x2 (THead (Bind b) x4 x5)) t4)))) (eq_ind T (lift h (S x1) (THead (Flat -Appl) (lift (S O) O x8) x6)) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T -(THead (Bind b) (lift h x1 x7) t) (lift h x1 t4))) (\lambda (t4: T).(pr0 -(THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) (ex_intro2 T (\lambda -(t4: T).(eq T (THead (Bind b) (lift h x1 x7) (lift h (S x1) (THead (Flat -Appl) (lift (S O) O x8) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead -(Flat Appl) x2 (THead (Bind b) x4 x5)) t4)) (THead (Bind b) x7 (THead (Flat -Appl) (lift (S O) O x8) x6)) (sym_eq T (lift h x1 (THead (Bind b) x7 (THead -(Flat Appl) (lift (S O) O x8) x6))) (THead (Bind b) (lift h x1 x7) (lift h (S -x1) (THead (Flat Appl) (lift (S O) O x8) x6))) (lift_bind b x7 (THead (Flat -Appl) (lift (S O) O x8) x6) h x1)) (pr0_upsilon b H1 x2 x8 H17 x4 x7 H16 x5 -x6 H15)) (THead (Flat Appl) (lift h (S x1) (lift (S O) O x8)) (lift h (S x1) -x6)) (lift_flat Appl (lift (S O) O x8) x6 h (S x1))) (lift (S O) O (lift h x1 -x8)) (lift_d x8 h (S O) x1 O (le_O_n x1))) v2 H_x1)))) (H3 x2 x1 H10)) u2 -H_x0)))) (H5 x4 x1 H13)) t3 H_x)))) (H7 x5 (S x1) H14)) x3 H12)))))) -(lift_gen_bind b u1 t2 x3 h x1 H11)) x0 H9)))))) (lift_gen_flat Appl v1 -(THead (Bind b) u1 t2) x0 h x1 H8))))))))))))))))))) (\lambda (u1: -T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (H2: ((\forall (x0: -T).(\forall (x1: nat).((eq T u1 (lift h x1 x0)) \to (ex2 T (\lambda (t2: -T).(eq T u2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H4: ((\forall -(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: -T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda (w: -T).(\lambda (H5: (subst0 O u2 t3 w)).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H6: (eq T (THead (Bind Abbr) u1 t2) (lift h x1 -x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Bind -Abbr) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) -(\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda -(t4: T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 t4))) (\lambda (t4: T).(pr0 -x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 (THead -(Bind Abbr) x2 x3))).(\lambda (H8: (eq T u1 (lift h x1 x2))).(\lambda (H9: -(eq T t2 (lift h (S x1) x3))).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda -(t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 -t4))) (\lambda (t4: T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 -(lift h (S x1) t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: -T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 t4))) (\lambda (t4: T).(pr0 -(THead (Bind Abbr) x2 x3) t4))) (\lambda (x4: T).(\lambda (H_x: (eq T t3 -(lift h (S x1) x4))).(\lambda (H10: (pr0 x3 x4)).(let H11 \def (eq_ind T t3 -(\lambda (t: T).(subst0 O u2 t w)) H5 (lift h (S x1) x4) H_x) in (ex2_ind T -(\lambda (t4: T).(eq T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 -T (\lambda (t4: T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4))) (\lambda (x5: T).(\lambda (H_x0: -(eq T u2 (lift h x1 x5))).(\lambda (H12: (pr0 x2 x5)).(eq_ind_r T (lift h x1 -x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) t w) -(lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4)))) (let -H13 \def (eq_ind T u2 (\lambda (t: T).(subst0 O t (lift h (S x1) x4) w)) H11 -(lift h x1 x5) H_x0) in (let H14 \def (refl_equal nat (S (plus O x1))) in -(let H15 \def (eq_ind nat (S x1) (\lambda (n: nat).(subst0 O (lift h x1 x5) -(lift h n x4) w)) H13 (S (plus O x1)) H14) in (ex2_ind T (\lambda (t4: T).(eq -T w (lift h (S (plus O x1)) t4))) (\lambda (t4: T).(subst0 O x5 x4 t4)) (ex2 -T (\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x5) w) (lift h x1 -t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4))) (\lambda (x6: -T).(\lambda (H16: (eq T w (lift h (S (plus O x1)) x6))).(\lambda (H17: -(subst0 O x5 x4 x6)).(eq_ind_r T (lift h (S (plus O x1)) x6) (\lambda (t: -T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x5) t) (lift h -x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4)))) (ex_intro2 T -(\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x5) (lift h (S (plus O -x1)) x6)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) -t4)) (THead (Bind Abbr) x5 x6) (sym_eq T (lift h x1 (THead (Bind Abbr) x5 -x6)) (THead (Bind Abbr) (lift h x1 x5) (lift h (S (plus O x1)) x6)) -(lift_bind Abbr x5 x6 h (plus O x1))) (pr0_delta x2 x5 H12 x3 x4 H10 x6 H17)) -w H16)))) (subst0_gen_lift_lt x5 x4 w O h x1 H15))))) u2 H_x0)))) (H2 x2 x1 -H8)))))) (H4 x3 (S x1) H9)) x0 H7)))))) (lift_gen_bind Abbr u1 t2 x0 h x1 -H6))))))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b Abst))).(\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H3: ((\forall -(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: -T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda (u: -T).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: (eq T (THead (Bind b) u -(lift (S O) O t2)) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda -(z: T).(eq T x0 (THead (Bind b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq -T u (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift (S O) O t2) -(lift h (S x1) z)))) (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) -(\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda -(H5: (eq T x0 (THead (Bind b) x2 x3))).(\lambda (_: (eq T u (lift h x1 -x2))).(\lambda (H7: (eq T (lift (S O) O t2) (lift h (S x1) x3))).(eq_ind_r T -(THead (Bind b) x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T t3 (lift -h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (let H8 \def (eq_ind_r nat (plus (S -O) x1) (\lambda (n: nat).(eq nat (S x1) n)) (le_antisym (S x1) (plus (S O) -x1) (le_n (plus (S O) x1)) (le_n (S x1))) (plus x1 (S O)) (plus_sym x1 (S -O))) in (let H9 \def (eq_ind nat (S x1) (\lambda (n: nat).(eq T (lift (S O) O -t2) (lift h n x3))) H7 (plus x1 (S O)) H8) in (ex2_ind T (\lambda (t4: T).(eq -T x3 (lift (S O) O t4))) (\lambda (t4: T).(eq T t2 (lift h x1 t4))) (ex2 T -(\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind -b) x2 x3) t4))) (\lambda (x4: T).(\lambda (H10: (eq T x3 (lift (S O) O -x4))).(\lambda (H11: (eq T t2 (lift h x1 x4))).(eq_ind_r T (lift (S O) O x4) -(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda -(t4: T).(pr0 (THead (Bind b) x2 t) t4)))) (ex2_ind T (\lambda (t4: T).(eq T -t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x4 t4)) (ex2 T (\lambda (t4: T).(eq -T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 (lift (S O) O -x4)) t4))) (\lambda (x5: T).(\lambda (H_x: (eq T t3 (lift h x1 x5))).(\lambda -(H12: (pr0 x4 x5)).(eq_ind_r T (lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda -(t4: T).(eq T t (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 -(lift (S O) O x4)) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (lift h x1 x5) -(lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 (lift (S O) O x4)) -t4)) x5 (refl_equal T (lift h x1 x5)) (pr0_zeta b H1 x4 x5 H12 x2)) t3 -H_x)))) (H3 x4 x1 H11)) x3 H10)))) (lift_gen_lift t2 x3 (S O) h O x1 (le_O_n -x1) H9)))) x0 H5)))))) (lift_gen_bind b u (lift (S O) O t2) x0 h x1 -H4)))))))))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 -t3)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 -x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: -T).(pr0 x0 t4)))))))).(\lambda (u: T).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H3: (eq T (THead (Flat Cast) u t2) (lift h x1 x0))).(ex3_2_ind -T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat Cast) y0 z)))) -(\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x1 y0)))) (\lambda (_: -T).(\lambda (z: T).(eq T t2 (lift h x1 z)))) (ex2 T (\lambda (t4: T).(eq T t3 -(lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda -(x3: T).(\lambda (H4: (eq T x0 (THead (Flat Cast) x2 x3))).(\lambda (_: (eq T -u (lift h x1 x2))).(\lambda (H6: (eq T t2 (lift h x1 x3))).(eq_ind_r T (THead -(Flat Cast) x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T t3 (lift h -x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 -(lift h x1 t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: T).(eq T -t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Cast) x2 x3) t4))) -(\lambda (x4: T).(\lambda (H_x: (eq T t3 (lift h x1 x4))).(\lambda (H7: (pr0 -x3 x4)).(eq_ind_r T (lift h x1 x4) (\lambda (t: T).(ex2 T (\lambda (t4: -T).(eq T t (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Cast) x2 x3) -t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (lift h x1 x4) (lift h x1 t4))) -(\lambda (t4: T).(pr0 (THead (Flat Cast) x2 x3) t4)) x4 (refl_equal T (lift h -x1 x4)) (pr0_tau x3 x4 H7 x2)) t3 H_x)))) (H2 x3 x1 H6)) x0 H4)))))) -(lift_gen_flat Cast u t2 x0 h x1 H3)))))))))) y x H0))))) H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/pr0.ma b/matita/matita/contribs/lambdadelta/basic_1/pr0/pr0.ma deleted file mode 100644 index d3a8f78c9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/pr0.ma +++ /dev/null @@ -1,2303 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/subst0.ma". - -include "basic_1/lift/tlt.ma". - -include "basic_1/tlt/fwd.ma". - -fact pr0_confluence__pr0_cong_upsilon_refl: - \forall (b: B).((not (eq B b Abst)) \to (\forall (u0: T).(\forall (u3: -T).((pr0 u0 u3) \to (\forall (t4: T).(\forall (t5: T).((pr0 t4 t5) \to -(\forall (u2: T).(\forall (v2: T).(\forall (x: T).((pr0 u2 x) \to ((pr0 v2 x) -\to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u0 t4)) -t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O -v2) t5)) t))))))))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (u0: T).(\lambda -(u3: T).(\lambda (H0: (pr0 u0 u3)).(\lambda (t4: T).(\lambda (t5: T).(\lambda -(H1: (pr0 t4 t5)).(\lambda (u2: T).(\lambda (v2: T).(\lambda (x: T).(\lambda -(H2: (pr0 u2 x)).(\lambda (H3: (pr0 v2 x)).(ex_intro2 T (\lambda (t: T).(pr0 -(THead (Flat Appl) u2 (THead (Bind b) u0 t4)) t)) (\lambda (t: T).(pr0 (THead -(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)) (THead (Bind b) u3 -(THead (Flat Appl) (lift (S O) O x) t5)) (pr0_upsilon b H u2 x H2 u0 u3 H0 t4 -t5 H1) (pr0_comp u3 u3 (pr0_refl u3) (THead (Flat Appl) (lift (S O) O v2) t5) -(THead (Flat Appl) (lift (S O) O x) t5) (pr0_comp (lift (S O) O v2) (lift (S -O) O x) (pr0_lift v2 x H3 (S O) O) t5 t5 (pr0_refl t5) (Flat Appl)) (Bind -b))))))))))))))). - -fact pr0_confluence__pr0_cong_upsilon_cong: - \forall (b: B).((not (eq B b Abst)) \to (\forall (u2: T).(\forall (v2: -T).(\forall (x: T).((pr0 u2 x) \to ((pr0 v2 x) \to (\forall (t2: T).(\forall -(t5: T).(\forall (x0: T).((pr0 t2 x0) \to ((pr0 t5 x0) \to (\forall (u5: -T).(\forall (u3: T).(\forall (x1: T).((pr0 u5 x1) \to ((pr0 u3 x1) \to (ex2 T -(\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) -(\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) -t5)) t))))))))))))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (u2: T).(\lambda -(v2: T).(\lambda (x: T).(\lambda (H0: (pr0 u2 x)).(\lambda (H1: (pr0 v2 -x)).(\lambda (t2: T).(\lambda (t5: T).(\lambda (x0: T).(\lambda (H2: (pr0 t2 -x0)).(\lambda (H3: (pr0 t5 x0)).(\lambda (u5: T).(\lambda (u3: T).(\lambda -(x1: T).(\lambda (H4: (pr0 u5 x1)).(\lambda (H5: (pr0 u3 x1)).(ex_intro2 T -(\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) -(\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) -t5)) t)) (THead (Bind b) x1 (THead (Flat Appl) (lift (S O) O x) x0)) -(pr0_upsilon b H u2 x H0 u5 x1 H4 t2 x0 H2) (pr0_comp u3 x1 H5 (THead (Flat -Appl) (lift (S O) O v2) t5) (THead (Flat Appl) (lift (S O) O x) x0) (pr0_comp -(lift (S O) O v2) (lift (S O) O x) (pr0_lift v2 x H1 (S O) O) t5 x0 H3 (Flat -Appl)) (Bind b))))))))))))))))))). - -fact pr0_confluence__pr0_cong_upsilon_delta: - (not (eq B Abbr Abst)) \to (\forall (u5: T).(\forall (t2: T).(\forall (w: -T).((subst0 O u5 t2 w) \to (\forall (u2: T).(\forall (v2: T).(\forall (x: -T).((pr0 u2 x) \to ((pr0 v2 x) \to (\forall (t5: T).(\forall (x0: T).((pr0 t2 -x0) \to ((pr0 t5 x0) \to (\forall (u3: T).(\forall (x1: T).((pr0 u5 x1) \to -((pr0 u3 x1) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead -(Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead -(Flat Appl) (lift (S O) O v2) t5)) t)))))))))))))))))))) -\def - \lambda (H: (not (eq B Abbr Abst))).(\lambda (u5: T).(\lambda (t2: -T).(\lambda (w: T).(\lambda (H0: (subst0 O u5 t2 w)).(\lambda (u2: -T).(\lambda (v2: T).(\lambda (x: T).(\lambda (H1: (pr0 u2 x)).(\lambda (H2: -(pr0 v2 x)).(\lambda (t5: T).(\lambda (x0: T).(\lambda (H3: (pr0 t2 -x0)).(\lambda (H4: (pr0 t5 x0)).(\lambda (u3: T).(\lambda (x1: T).(\lambda -(H5: (pr0 u5 x1)).(\lambda (H6: (pr0 u3 x1)).(or_ind (pr0 w x0) (ex2 T -(\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x1 x0 w2))) (ex2 T -(\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) -(\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O -v2) t5)) t))) (\lambda (H7: (pr0 w x0)).(ex_intro2 T (\lambda (t: T).(pr0 -(THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 -(THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)) (THead -(Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O x) x0)) (pr0_upsilon Abbr H -u2 x H1 u5 x1 H5 w x0 H7) (pr0_comp u3 x1 H6 (THead (Flat Appl) (lift (S O) O -v2) t5) (THead (Flat Appl) (lift (S O) O x) x0) (pr0_comp (lift (S O) O v2) -(lift (S O) O x) (pr0_lift v2 x H2 (S O) O) t5 x0 H4 (Flat Appl)) (Bind -Abbr)))) (\lambda (H7: (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: -T).(subst0 O x1 x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w w2)) (\lambda -(w2: T).(subst0 O x1 x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) -u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 -(THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x2: T).(\lambda (H8: -(pr0 w x2)).(\lambda (H9: (subst0 O x1 x0 x2)).(ex_intro2 T (\lambda (t: -T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: -T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)) -(THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O x) x2)) (pr0_upsilon -Abbr H u2 x H1 u5 x1 H5 w x2 H8) (pr0_delta u3 x1 H6 (THead (Flat Appl) (lift -(S O) O v2) t5) (THead (Flat Appl) (lift (S O) O x) x0) (pr0_comp (lift (S O) -O v2) (lift (S O) O x) (pr0_lift v2 x H2 (S O) O) t5 x0 H4 (Flat Appl)) -(THead (Flat Appl) (lift (S O) O x) x2) (subst0_snd (Flat Appl) x1 x2 x0 O H9 -(lift (S O) O x))))))) H7)) (pr0_subst0 t2 x0 H3 u5 w O H0 x1 -H5))))))))))))))))))). - -fact pr0_confluence__pr0_cong_upsilon_zeta: - \forall (b: B).((not (eq B b Abst)) \to (\forall (u0: T).(\forall (u3: -T).((pr0 u0 u3) \to (\forall (u2: T).(\forall (v2: T).(\forall (x0: T).((pr0 -u2 x0) \to ((pr0 v2 x0) \to (\forall (x: T).(\forall (t3: T).(\forall (x1: -T).((pr0 x x1) \to ((pr0 t3 x1) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat -Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) -(lift (S O) O v2) (lift (S O) O x))) t))))))))))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (u0: T).(\lambda -(u3: T).(\lambda (_: (pr0 u0 u3)).(\lambda (u2: T).(\lambda (v2: T).(\lambda -(x0: T).(\lambda (H1: (pr0 u2 x0)).(\lambda (H2: (pr0 v2 x0)).(\lambda (x: -T).(\lambda (t3: T).(\lambda (x1: T).(\lambda (H3: (pr0 x x1)).(\lambda (H4: -(pr0 t3 x1)).(eq_ind T (lift (S O) O (THead (Flat Appl) v2 x)) (\lambda (t: -T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: -T).(pr0 (THead (Bind b) u3 t) t0)))) (ex_intro2 T (\lambda (t: T).(pr0 (THead -(Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (lift (S O) O -(THead (Flat Appl) v2 x))) t)) (THead (Flat Appl) x0 x1) (pr0_comp u2 x0 H1 -t3 x1 H4 (Flat Appl)) (pr0_zeta b H (THead (Flat Appl) v2 x) (THead (Flat -Appl) x0 x1) (pr0_comp v2 x0 H2 x x1 H3 (Flat Appl)) u3)) (THead (Flat Appl) -(lift (S O) O v2) (lift (S O) O x)) (lift_flat Appl v2 x (S O) -O)))))))))))))))). - -fact pr0_confluence__pr0_cong_delta: - \forall (u3: T).(\forall (t5: T).(\forall (w: T).((subst0 O u3 t5 w) \to -(\forall (u2: T).(\forall (x: T).((pr0 u2 x) \to ((pr0 u3 x) \to (\forall -(t3: T).(\forall (x0: T).((pr0 t3 x0) \to ((pr0 t5 x0) \to (ex2 T (\lambda -(t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind -Abbr) u3 w) t)))))))))))))) -\def - \lambda (u3: T).(\lambda (t5: T).(\lambda (w: T).(\lambda (H: (subst0 O u3 -t5 w)).(\lambda (u2: T).(\lambda (x: T).(\lambda (H0: (pr0 u2 x)).(\lambda -(H1: (pr0 u3 x)).(\lambda (t3: T).(\lambda (x0: T).(\lambda (H2: (pr0 t3 -x0)).(\lambda (H3: (pr0 t5 x0)).(or_ind (pr0 w x0) (ex2 T (\lambda (w2: -T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 w2))) (ex2 T (\lambda (t: -T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) -u3 w) t))) (\lambda (H4: (pr0 w x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead -(Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t)) -(THead (Bind Abbr) x x0) (pr0_comp u2 x H0 t3 x0 H2 (Bind Abbr)) (pr0_comp u3 -x H1 w x0 H4 (Bind Abbr)))) (\lambda (H4: (ex2 T (\lambda (w2: T).(pr0 w w2)) -(\lambda (w2: T).(subst0 O x x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w -w2)) (\lambda (w2: T).(subst0 O x x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead -(Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) -(\lambda (x1: T).(\lambda (H5: (pr0 w x1)).(\lambda (H6: (subst0 O x x0 -x1)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda -(t: T).(pr0 (THead (Bind Abbr) u3 w) t)) (THead (Bind Abbr) x x1) (pr0_delta -u2 x H0 t3 x0 H2 x1 H6) (pr0_comp u3 x H1 w x1 H5 (Bind Abbr)))))) H4)) -(pr0_subst0 t5 x0 H3 u3 w O H x H1))))))))))))). - -fact pr0_confluence__pr0_upsilon_upsilon: - \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: -T).(\forall (x0: T).((pr0 v1 x0) \to ((pr0 v2 x0) \to (\forall (u1: -T).(\forall (u2: T).(\forall (x1: T).((pr0 u1 x1) \to ((pr0 u2 x1) \to -(\forall (t1: T).(\forall (t2: T).(\forall (x2: T).((pr0 t1 x2) \to ((pr0 t2 -x2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u1 (THead (Flat Appl) -(lift (S O) O v1) t1)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t2)) t))))))))))))))))))) -\def - \lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda -(v2: T).(\lambda (x0: T).(\lambda (H0: (pr0 v1 x0)).(\lambda (H1: (pr0 v2 -x0)).(\lambda (u1: T).(\lambda (u2: T).(\lambda (x1: T).(\lambda (H2: (pr0 u1 -x1)).(\lambda (H3: (pr0 u2 x1)).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(x2: T).(\lambda (H4: (pr0 t1 x2)).(\lambda (H5: (pr0 t2 x2)).(ex_intro2 T -(\lambda (t: T).(pr0 (THead (Bind b) u1 (THead (Flat Appl) (lift (S O) O v1) -t1)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t2)) t)) (THead (Bind b) x1 (THead (Flat Appl) (lift (S O) O x0) -x2)) (pr0_comp u1 x1 H2 (THead (Flat Appl) (lift (S O) O v1) t1) (THead (Flat -Appl) (lift (S O) O x0) x2) (pr0_comp (lift (S O) O v1) (lift (S O) O x0) -(pr0_lift v1 x0 H0 (S O) O) t1 x2 H4 (Flat Appl)) (Bind b)) (pr0_comp u2 x1 -H3 (THead (Flat Appl) (lift (S O) O v2) t2) (THead (Flat Appl) (lift (S O) O -x0) x2) (pr0_comp (lift (S O) O v2) (lift (S O) O x0) (pr0_lift v2 x0 H1 (S -O) O) t2 x2 H5 (Flat Appl)) (Bind b))))))))))))))))))). - -fact pr0_confluence__pr0_delta_delta: - \forall (u2: T).(\forall (t3: T).(\forall (w: T).((subst0 O u2 t3 w) \to -(\forall (u3: T).(\forall (t5: T).(\forall (w0: T).((subst0 O u3 t5 w0) \to -(\forall (x: T).((pr0 u2 x) \to ((pr0 u3 x) \to (\forall (x0: T).((pr0 t3 x0) -\to ((pr0 t5 x0) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) -(\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t)))))))))))))))) -\def - \lambda (u2: T).(\lambda (t3: T).(\lambda (w: T).(\lambda (H: (subst0 O u2 -t3 w)).(\lambda (u3: T).(\lambda (t5: T).(\lambda (w0: T).(\lambda (H0: -(subst0 O u3 t5 w0)).(\lambda (x: T).(\lambda (H1: (pr0 u2 x)).(\lambda (H2: -(pr0 u3 x)).(\lambda (x0: T).(\lambda (H3: (pr0 t3 x0)).(\lambda (H4: (pr0 t5 -x0)).(or_ind (pr0 w0 x0) (ex2 T (\lambda (w2: T).(pr0 w0 w2)) (\lambda (w2: -T).(subst0 O x x0 w2))) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) -t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H5: (pr0 w0 -x0)).(or_ind (pr0 w x0) (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: -T).(subst0 O x x0 w2))) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) -t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H6: (pr0 w -x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda -(t: T).(pr0 (THead (Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x0) (pr0_comp -u2 x H1 w x0 H6 (Bind Abbr)) (pr0_comp u3 x H2 w0 x0 H5 (Bind Abbr)))) -(\lambda (H6: (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O -x x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 -O x x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda -(t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x1: T).(\lambda (H7: -(pr0 w x1)).(\lambda (H8: (subst0 O x x0 x1)).(ex_intro2 T (\lambda (t: -T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) -u3 w0) t)) (THead (Bind Abbr) x x1) (pr0_comp u2 x H1 w x1 H7 (Bind Abbr)) -(pr0_delta u3 x H2 w0 x0 H5 x1 H8))))) H6)) (pr0_subst0 t3 x0 H3 u2 w O H x -H1))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 w0 w2)) (\lambda (w2: -T).(subst0 O x x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w0 w2)) (\lambda -(w2: T).(subst0 O x x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 -w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x1: -T).(\lambda (H6: (pr0 w0 x1)).(\lambda (H7: (subst0 O x x0 x1)).(or_ind (pr0 -w x0) (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 -w2))) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: -T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H8: (pr0 w x0)).(ex_intro2 T -(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead -(Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x1) (pr0_delta u2 x H1 w x0 H8 x1 -H7) (pr0_comp u3 x H2 w0 x1 H6 (Bind Abbr)))) (\lambda (H8: (ex2 T (\lambda -(w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 w2)))).(ex2_ind T -(\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 w2)) (ex2 T -(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead -(Bind Abbr) u3 w0) t))) (\lambda (x2: T).(\lambda (H9: (pr0 w x2)).(\lambda -(H10: (subst0 O x x0 x2)).(or4_ind (eq T x2 x1) (ex2 T (\lambda (t: -T).(subst0 O x x2 t)) (\lambda (t: T).(subst0 O x x1 t))) (subst0 O x x2 x1) -(subst0 O x x1 x2) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) -(\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H11: (eq T x2 -x1)).(let H12 \def (eq_ind T x2 (\lambda (t: T).(pr0 w t)) H9 x1 H11) in -(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: -T).(pr0 (THead (Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x1) (pr0_comp u2 x -H1 w x1 H12 (Bind Abbr)) (pr0_comp u3 x H2 w0 x1 H6 (Bind Abbr))))) (\lambda -(H11: (ex2 T (\lambda (t: T).(subst0 O x x2 t)) (\lambda (t: T).(subst0 O x -x1 t)))).(ex2_ind T (\lambda (t: T).(subst0 O x x2 t)) (\lambda (t: -T).(subst0 O x x1 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) -t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x3: -T).(\lambda (H12: (subst0 O x x2 x3)).(\lambda (H13: (subst0 O x x1 -x3)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda -(t: T).(pr0 (THead (Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x3) (pr0_delta -u2 x H1 w x2 H9 x3 H12) (pr0_delta u3 x H2 w0 x1 H6 x3 H13))))) H11)) -(\lambda (H11: (subst0 O x x2 x1)).(ex_intro2 T (\lambda (t: T).(pr0 (THead -(Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t)) -(THead (Bind Abbr) x x1) (pr0_delta u2 x H1 w x2 H9 x1 H11) (pr0_comp u3 x H2 -w0 x1 H6 (Bind Abbr)))) (\lambda (H11: (subst0 O x x1 x2)).(ex_intro2 T -(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead -(Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x2) (pr0_comp u2 x H1 w x2 H9 -(Bind Abbr)) (pr0_delta u3 x H2 w0 x1 H6 x2 H11))) (subst0_confluence_eq x0 -x2 x O H10 x1 H7))))) H8)) (pr0_subst0 t3 x0 H3 u2 w O H x H1))))) H5)) -(pr0_subst0 t5 x0 H4 u3 w0 O H0 x H2))))))))))))))). - -fact pr0_confluence__pr0_delta_tau: - \forall (u2: T).(\forall (t3: T).(\forall (w: T).((subst0 O u2 t3 w) \to -(\forall (t4: T).((pr0 (lift (S O) O t4) t3) \to (\forall (t2: T).(ex2 T -(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 -t))))))))) -\def - \lambda (u2: T).(\lambda (t3: T).(\lambda (w: T).(\lambda (H: (subst0 O u2 -t3 w)).(\lambda (t4: T).(\lambda (H0: (pr0 (lift (S O) O t4) t3)).(\lambda -(t2: T).(ex2_ind T (\lambda (t5: T).(eq T t3 (lift (S O) O t5))) (\lambda -(t5: T).(pr0 t4 t5)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) -(\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H1: (eq T t3 (lift (S -O) O x))).(\lambda (_: (pr0 t4 x)).(let H3 \def (eq_ind T t3 (\lambda (t: -T).(subst0 O u2 t w)) H (lift (S O) O x) H1) in (subst0_gen_lift_false x u2 w -(S O) O O (le_O_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) -(le_n (plus (S O) O)) (plus O (S O)) (plus_sym O (S O))) H3 (ex2 T (\lambda -(t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t)))))))) -(pr0_gen_lift t4 t3 (S O) O H0)))))))). - -theorem pr0_confluence: - \forall (t0: T).(\forall (t1: T).((pr0 t0 t1) \to (\forall (t2: T).((pr0 t0 -t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))))))) -\def - \lambda (t0: T).(tlt_wf_ind (\lambda (t: T).(\forall (t1: T).((pr0 t t1) \to -(\forall (t2: T).((pr0 t t2) \to (ex2 T (\lambda (t3: T).(pr0 t1 t3)) -(\lambda (t3: T).(pr0 t2 t3)))))))) (\lambda (t: T).(\lambda (H: ((\forall -(v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 -v t2) \to (ex2 T (\lambda (t3: T).(pr0 t1 t3)) (\lambda (t3: T).(pr0 t2 -t3))))))))))).(\lambda (t1: T).(\lambda (H0: (pr0 t t1)).(\lambda (t2: -T).(\lambda (H1: (pr0 t t2)).(let H2 \def (match H0 with [(pr0_refl t3) -\Rightarrow (\lambda (H2: (eq T t3 t)).(\lambda (H3: (eq T t3 t1)).(eq_ind T -t (\lambda (t4: T).((eq T t4 t1) \to (ex2 T (\lambda (t5: T).(pr0 t1 t5)) -(\lambda (t5: T).(pr0 t2 t5))))) (\lambda (H4: (eq T t t1)).(eq_ind T t1 -(\lambda (_: T).(ex2 T (\lambda (t5: T).(pr0 t1 t5)) (\lambda (t5: T).(pr0 t2 -t5)))) (let H5 \def (match H1 with [(pr0_refl t4) \Rightarrow (\lambda (H5: -(eq T t4 t)).(\lambda (H6: (eq T t4 t2)).(eq_ind T t (\lambda (t5: T).((eq T -t5 t2) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 -t6))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T -(\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6)))) (let H8 \def -(eq_ind T t (\lambda (t5: T).(eq T t4 t5)) H5 t2 H7) in (let H9 \def (eq_ind -T t (\lambda (t5: T).(eq T t5 t1)) H4 t2 H7) in (let H10 \def (eq_ind T t -(\lambda (t5: T).(eq T t3 t5)) H2 t2 H7) in (let H11 \def (eq_ind T t -(\lambda (t5: T).(\forall (v: T).((tlt v t5) \to (\forall (t6: T).((pr0 v t6) -\to (\forall (t7: T).((pr0 v t7) \to (ex2 T (\lambda (t8: T).(pr0 t6 t8)) -(\lambda (t8: T).(pr0 t7 t8)))))))))) H t2 H7) in (let H12 \def (eq_ind T t2 -(\lambda (t5: T).(\forall (v: T).((tlt v t5) \to (\forall (t6: T).((pr0 v t6) -\to (\forall (t7: T).((pr0 v t7) \to (ex2 T (\lambda (t8: T).(pr0 t6 t8)) -(\lambda (t8: T).(pr0 t7 t8)))))))))) H11 t1 H9) in (eq_ind_r T t1 (\lambda -(t5: T).(ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t5 t6)))) -(let H13 \def (eq_ind T t2 (\lambda (t5: T).(eq T t3 t5)) H10 t1 H9) in -(ex_intro2 T (\lambda (t5: T).(pr0 t1 t5)) (\lambda (t5: T).(pr0 t1 t5)) t1 -(pr0_refl t1) (pr0_refl t1))) t2 H9)))))) t (sym_eq T t t2 H7))) t4 (sym_eq T -t4 t H5) H6))) | (pr0_comp u1 u2 H5 t4 t5 H6 k) \Rightarrow (\lambda (H7: (eq -T (THead k u1 t4) t)).(\lambda (H8: (eq T (THead k u2 t5) t2)).(eq_ind T -(THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) -\to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: -T).(pr0 t2 t7))))))) (\lambda (H9: (eq T (THead k u2 t5) t2)).(eq_ind T -(THead k u2 t5) (\lambda (t6: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T -(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t6 t7)))))) (\lambda -(H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t4 t5)).(let H12 \def (eq_ind_r T t -(\lambda (t6: T).(eq T t6 t1)) H4 (THead k u1 t4) H7) in (eq_ind T (THead k -u1 t4) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: -T).(pr0 (THead k u2 t5) t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: -T).(eq T t3 t6)) H2 (THead k u1 t4) H7) in (let H14 \def (eq_ind_r T t -(\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) -\to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) -(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead k u1 t4) H7) in (ex_intro2 T -(\lambda (t6: T).(pr0 (THead k u1 t4) t6)) (\lambda (t6: T).(pr0 (THead k u2 -t5) t6)) (THead k u2 t5) (pr0_comp u1 u2 H10 t4 t5 H11 k) (pr0_refl (THead k -u2 t5))))) t1 H12)))) t2 H9)) t H7 H8 H5 H6))) | (pr0_beta u v1 v2 H5 t4 t5 -H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) -u t4)) t)).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T -(THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead -(Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda -(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))))) (\lambda (H9: (eq T -(THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda -(t6: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: T).(pr0 t1 -t7)) (\lambda (t7: T).(pr0 t6 t7)))))) (\lambda (H10: (pr0 v1 v2)).(\lambda -(H11: (pr0 t4 t5)).(let H12 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 t1)) -H4 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H7) in (eq_ind T (THead -(Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (t6: T).(ex2 T (\lambda -(t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t5) t7)))) -(let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) H2 (THead (Flat -Appl) v1 (THead (Bind Abst) u t4)) H7) in (let H14 \def (eq_ind_r T t -(\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) -\to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) -(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Appl) v1 (THead (Bind -Abst) u t4)) H7) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead (Flat Appl) v1 -(THead (Bind Abst) u t4)) t6)) (\lambda (t6: T).(pr0 (THead (Bind Abbr) v2 -t5) t6)) (THead (Bind Abbr) v2 t5) (pr0_beta u v1 v2 H10 t4 t5 H11) (pr0_refl -(THead (Bind Abbr) v2 t5))))) t1 H12)))) t2 H9)) t H7 H8 H5 H6))) | -(pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T -(THead (Flat Appl) v1 (THead (Bind b) u1 t4)) t)).(\lambda (H10: (eq T (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead -(Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to -((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: -T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))))))) (\lambda (H11: (eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t6: -T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) -\to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t6 t7)))))))) -(\lambda (H12: (not (eq B b Abst))).(\lambda (H13: (pr0 v1 v2)).(\lambda -(H14: (pr0 u1 u2)).(\lambda (H15: (pr0 t4 t5)).(let H16 \def (eq_ind_r T t -(\lambda (t6: T).(eq T t6 t1)) H4 (THead (Flat Appl) v1 (THead (Bind b) u1 -t4)) H9) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda -(t6: T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t7)))) (let H17 \def -(eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) H2 (THead (Flat Appl) v1 (THead -(Bind b) u1 t4)) H9) in (let H18 \def (eq_ind_r T t (\lambda (t6: T).(\forall -(v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall (t8: -T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 -t8 t9)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) H9) in -(pr0_confluence__pr0_cong_upsilon_refl b H12 u1 u2 H14 t4 t5 H15 v1 v2 v2 H13 -(pr0_refl v2)))) t1 H16)))))) t2 H11)) t H9 H10 H5 H6 H7 H8))) | (pr0_delta -u1 u2 H5 t4 t5 H6 w H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 -t4) t)).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead -(Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to -((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda -(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)))))))) (\lambda (H10: (eq T -(THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda -(t6: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T -(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t6 t7))))))) (\lambda -(H11: (pr0 u1 u2)).(\lambda (H12: (pr0 t4 t5)).(\lambda (H13: (subst0 O u2 t5 -w)).(let H14 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 t1)) H4 (THead -(Bind Abbr) u1 t4) H8) in (eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (t6: -T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 (THead (Bind -Abbr) u2 w) t7)))) (let H15 \def (eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) -H2 (THead (Bind Abbr) u1 t4) H8) in (let H16 \def (eq_ind_r T t (\lambda (t6: -T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall -(t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: -T).(pr0 t8 t9)))))))))) H (THead (Bind Abbr) u1 t4) H8) in (ex_intro2 T -(\lambda (t6: T).(pr0 (THead (Bind Abbr) u1 t4) t6)) (\lambda (t6: T).(pr0 -(THead (Bind Abbr) u2 w) t6)) (THead (Bind Abbr) u2 w) (pr0_delta u1 u2 H11 -t4 t5 H12 w H13) (pr0_refl (THead (Bind Abbr) u2 w))))) t1 H14))))) t2 H10)) -t H8 H9 H5 H6 H7))) | (pr0_zeta b H5 t4 t5 H6 u) \Rightarrow (\lambda (H7: -(eq T (THead (Bind b) u (lift (S O) O t4)) t)).(\lambda (H8: (eq T t5 -t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 -t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: -T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))))) (\lambda (H9: (eq T t5 -t2)).(eq_ind T t2 (\lambda (t6: T).((not (eq B b Abst)) \to ((pr0 t4 t6) \to -(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)))))) -(\lambda (H10: (not (eq B b Abst))).(\lambda (H11: (pr0 t4 t2)).(let H12 \def -(eq_ind_r T t (\lambda (t6: T).(eq T t6 t1)) H4 (THead (Bind b) u (lift (S O) -O t4)) H7) in (eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (t6: -T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let -H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) H2 (THead (Bind b) u -(lift (S O) O t4)) H7) in (let H14 \def (eq_ind_r T t (\lambda (t6: -T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall -(t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: -T).(pr0 t8 t9)))))))))) H (THead (Bind b) u (lift (S O) O t4)) H7) in -(ex_intro2 T (\lambda (t6: T).(pr0 (THead (Bind b) u (lift (S O) O t4)) t6)) -(\lambda (t6: T).(pr0 t2 t6)) t2 (pr0_zeta b H10 t4 t2 H11 u) (pr0_refl -t2)))) t1 H12)))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H5 H6))) | (pr0_tau t4 t5 -H5 u) \Rightarrow (\lambda (H6: (eq T (THead (Flat Cast) u t4) t)).(\lambda -(H7: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T -t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda -(t7: T).(pr0 t2 t7)))))) (\lambda (H8: (eq T t5 t2)).(eq_ind T t2 (\lambda -(t6: T).((pr0 t4 t6) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: -T).(pr0 t2 t7))))) (\lambda (H9: (pr0 t4 t2)).(let H10 \def (eq_ind_r T t -(\lambda (t6: T).(eq T t6 t1)) H4 (THead (Flat Cast) u t4) H6) in (eq_ind T -(THead (Flat Cast) u t4) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t6 -t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H11 \def (eq_ind_r T t (\lambda -(t6: T).(eq T t3 t6)) H2 (THead (Flat Cast) u t4) H6) in (let H12 \def -(eq_ind_r T t (\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: -T).((pr0 v t7) \to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: -T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Cast) u -t4) H6) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead (Flat Cast) u t4) t6)) -(\lambda (t6: T).(pr0 t2 t6)) t2 (pr0_tau t4 t2 H9 u) (pr0_refl t2)))) t1 -H10))) t5 (sym_eq T t5 t2 H8))) t H6 H7 H5)))]) in (H5 (refl_equal T t) -(refl_equal T t2))) t (sym_eq T t t1 H4))) t3 (sym_eq T t3 t H2) H3))) | -(pr0_comp u1 u2 H2 t3 t4 H3 k) \Rightarrow (\lambda (H4: (eq T (THead k u1 -t3) t)).(\lambda (H5: (eq T (THead k u2 t4) t1)).(eq_ind T (THead k u1 t3) -(\lambda (_: T).((eq T (THead k u2 t4) t1) \to ((pr0 u1 u2) \to ((pr0 t3 t4) -\to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6))))))) -(\lambda (H6: (eq T (THead k u2 t4) t1)).(eq_ind T (THead k u2 t4) (\lambda -(t5: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t5 -t6)) (\lambda (t6: T).(pr0 t2 t6)))))) (\lambda (H7: (pr0 u1 u2)).(\lambda -(H8: (pr0 t3 t4)).(let H9 \def (match H1 with [(pr0_refl t5) \Rightarrow -(\lambda (H9: (eq T t5 t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T t (\lambda -(t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead k u2 t4) t7)) -(\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H11: (eq T t t2)).(eq_ind T t2 -(\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 (THead k u2 t4) t7)) (\lambda -(t7: T).(pr0 t2 t7)))) (let H12 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 -t2)) H11 (THead k u1 t3) H4) in (eq_ind T (THead k u1 t3) (\lambda (t6: -T).(ex2 T (\lambda (t7: T).(pr0 (THead k u2 t4) t7)) (\lambda (t7: T).(pr0 t6 -t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H9 (THead k -u1 t3) H4) in (let H14 \def (eq_ind_r T t (\lambda (t6: T).(\forall (v: -T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall (t8: T).((pr0 v -t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 -t9)))))))))) H (THead k u1 t3) H4) in (ex_intro2 T (\lambda (t6: T).(pr0 -(THead k u2 t4) t6)) (\lambda (t6: T).(pr0 (THead k u1 t3) t6)) (THead k u2 -t4) (pr0_refl (THead k u2 t4)) (pr0_comp u1 u2 H7 t3 t4 H8 k)))) t2 H12)) t -(sym_eq T t t2 H11))) t5 (sym_eq T t5 t H9) H10))) | (pr0_comp u0 u3 H9 t5 t6 -H10 k0) \Rightarrow (\lambda (H11: (eq T (THead k0 u0 t5) t)).(\lambda (H12: -(eq T (THead k0 u3 t6) t2)).(eq_ind T (THead k0 u0 t5) (\lambda (_: T).((eq T -(THead k0 u3 t6) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda -(t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda -(H13: (eq T (THead k0 u3 t6) t2)).(eq_ind T (THead k0 u3 t6) (\lambda (t7: -T).((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 -t4) t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (H14: (pr0 u0 -u3)).(\lambda (H15: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda (t7: -T).(eq T (THead k u1 t3) t7)) H4 (THead k0 u0 t5) H11) in (let H17 \def -(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef -_) \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k u1 t3) (THead k0 -u0 t5) H16) in ((let H18 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) -\Rightarrow t7])) (THead k u1 t3) (THead k0 u0 t5) H16) in ((let H19 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef -_) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead -k0 u0 t5) H16) in (\lambda (H20: (eq T u1 u0)).(\lambda (H21: (eq K k -k0)).(let H22 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) -\to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T -(\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H -(THead k0 u0 t5) H11) in (eq_ind_r K k0 (\lambda (k1: K).(ex2 T (\lambda (t7: -T).(pr0 (THead k1 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead k0 u3 t6) t7)))) -(let H23 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 u0 H20) in (let -H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 t5 H19) in (ex2_ind T -(\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda -(t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead k0 u3 t6) -t7))) (\lambda (x: T).(\lambda (H25: (pr0 t4 x)).(\lambda (H26: (pr0 t6 -x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) (\lambda (t7: T).(pr0 u3 t7)) -(ex2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 -(THead k0 u3 t6) t7))) (\lambda (x0: T).(\lambda (H27: (pr0 u2 x0)).(\lambda -(H28: (pr0 u3 x0)).(ex_intro2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) -(\lambda (t7: T).(pr0 (THead k0 u3 t6) t7)) (THead k0 x0 x) (pr0_comp u2 x0 -H27 t4 x H25 k0) (pr0_comp u3 x0 H28 t6 x H26 k0))))) (H22 u0 (tlt_head_sx k0 -u0 t5) u2 H23 u3 H14))))) (H22 t5 (tlt_head_dx k0 u0 t5) t4 H24 t6 H15)))) k -H21))))) H18)) H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_beta u v1 v2 H9 -t5 t6 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 (THead -(Bind Abst) u t5)) t)).(\lambda (H12: (eq T (THead (Bind Abbr) v2 t6) -t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) (\lambda (_: -T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 -t8))))))) (\lambda (H13: (eq T (THead (Bind Abbr) v2 t6) t2)).(eq_ind T -(THead (Bind Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t7 -t8)))))) (\lambda (H14: (pr0 v1 v2)).(\lambda (H15: (pr0 t5 t6)).(let H16 -\def (eq_ind_r T t (\lambda (t7: T).(eq T (THead k u1 t3) t7)) H4 (THead -(Flat Appl) v1 (THead (Bind Abst) u t5)) H11) in (let H17 \def (f_equal T K -(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Flat -Appl) v1 (THead (Bind Abst) u t5)) H16) in ((let H18 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) -\Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) (THead -(Flat Appl) v1 (THead (Bind Abst) u t5)) H16) in ((let H19 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) -\Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead -(Flat Appl) v1 (THead (Bind Abst) u t5)) H16) in (\lambda (H20: (eq T u1 -v1)).(\lambda (H21: (eq K k (Flat Appl))).(let H22 \def (eq_ind_r T t -(\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) -\to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) -(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) v1 (THead (Bind -Abst) u t5)) H11) in (eq_ind_r K (Flat Appl) (\lambda (k0: K).(ex2 T (\lambda -(t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) -v2 t6) t7)))) (let H23 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 v1 -H20) in (let H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 (THead -(Bind Abst) u t5) H19) in (let H25 \def (match H24 with [(pr0_refl t7) -\Rightarrow (\lambda (H25: (eq T t7 (THead (Bind Abst) u t5))).(\lambda (H26: -(eq T t7 t4)).(eq_ind T (THead (Bind Abst) u t5) (\lambda (t8: T).((eq T t8 -t4) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda -(t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))))) (\lambda (H27: (eq T (THead -(Bind Abst) u t5) t4)).(eq_ind T (THead (Bind Abst) u t5) (\lambda (t8: -T).(ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t8) t9)) (\lambda (t9: -T).(pr0 (THead (Bind Abbr) v2 t6) t9)))) (ex2_ind T (\lambda (t8: T).(pr0 u2 -t8)) (\lambda (t8: T).(pr0 v2 t8)) (ex2 T (\lambda (t8: T).(pr0 (THead (Flat -Appl) u2 (THead (Bind Abst) u t5)) t8)) (\lambda (t8: T).(pr0 (THead (Bind -Abbr) v2 t6) t8))) (\lambda (x: T).(\lambda (H28: (pr0 u2 x)).(\lambda (H29: -(pr0 v2 x)).(ex_intro2 T (\lambda (t8: T).(pr0 (THead (Flat Appl) u2 (THead -(Bind Abst) u t5)) t8)) (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t6) t8)) -(THead (Bind Abbr) x t6) (pr0_beta u u2 x H28 t5 t6 H15) (pr0_comp v2 x H29 -t6 t6 (pr0_refl t6) (Bind Abbr)))))) (H22 v1 (tlt_head_sx (Flat Appl) v1 -(THead (Bind Abst) u t5)) u2 H23 v2 H14)) t4 H27)) t7 (sym_eq T t7 (THead -(Bind Abst) u t5) H25) H26))) | (pr0_comp u0 u3 H25 t7 t8 H26 k0) \Rightarrow -(\lambda (H27: (eq T (THead k0 u0 t7) (THead (Bind Abst) u t5))).(\lambda -(H28: (eq T (THead k0 u3 t8) t4)).((let H29 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t7 | (TLRef _) \Rightarrow t7 | -(THead _ _ t9) \Rightarrow t9])) (THead k0 u0 t7) (THead (Bind Abst) u t5) -H27) in ((let H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t9 _) \Rightarrow t9])) -(THead k0 u0 t7) (THead (Bind Abst) u t5) H27) in ((let H31 \def (f_equal T K -(\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | (TLRef _) -\Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t7) (THead -(Bind Abst) u t5) H27) in (eq_ind K (Bind Abst) (\lambda (k1: K).((eq T u0 u) -\to ((eq T t7 t5) \to ((eq T (THead k1 u3 t8) t4) \to ((pr0 u0 u3) \to ((pr0 -t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) -(\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))))))))) (\lambda (H32: -(eq T u0 u)).(eq_ind T u (\lambda (t9: T).((eq T t7 t5) \to ((eq T (THead -(Bind Abst) u3 t8) t4) \to ((pr0 t9 u3) \to ((pr0 t7 t8) \to (ex2 T (\lambda -(t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead -(Bind Abbr) v2 t6) t10)))))))) (\lambda (H33: (eq T t7 t5)).(eq_ind T t5 -(\lambda (t9: T).((eq T (THead (Bind Abst) u3 t8) t4) \to ((pr0 u u3) \to -((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) -t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t6) t10))))))) (\lambda -(H34: (eq T (THead (Bind Abst) u3 t8) t4)).(eq_ind T (THead (Bind Abst) u3 -t8) (\lambda (t9: T).((pr0 u u3) \to ((pr0 t5 t8) \to (ex2 T (\lambda (t10: -T).(pr0 (THead (Flat Appl) u2 t9) t10)) (\lambda (t10: T).(pr0 (THead (Bind -Abbr) v2 t6) t10)))))) (\lambda (_: (pr0 u u3)).(\lambda (H36: (pr0 t5 -t8)).(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t6 t9)) -(ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) -t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))) (\lambda (x: -T).(\lambda (H37: (pr0 t8 x)).(\lambda (H38: (pr0 t6 x)).(ex2_ind T (\lambda -(t9: T).(pr0 u2 t9)) (\lambda (t9: T).(pr0 v2 t9)) (ex2 T (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9)) (\lambda (t9: -T).(pr0 (THead (Bind Abbr) v2 t6) t9))) (\lambda (x0: T).(\lambda (H39: (pr0 -u2 x0)).(\lambda (H40: (pr0 v2 x0)).(ex_intro2 T (\lambda (t9: T).(pr0 (THead -(Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9)) (\lambda (t9: T).(pr0 (THead -(Bind Abbr) v2 t6) t9)) (THead (Bind Abbr) x0 x) (pr0_beta u3 u2 x0 H39 t8 x -H37) (pr0_comp v2 x0 H40 t6 x H38 (Bind Abbr)))))) (H22 v1 (tlt_head_sx (Flat -Appl) v1 (THead (Bind Abst) u t5)) u2 H23 v2 H14))))) (H22 t5 (tlt_trans -(THead (Bind Abst) u t5) t5 (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) -(tlt_head_dx (Bind Abst) u t5) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abst) -u t5))) t8 H36 t6 H15)))) t4 H34)) t7 (sym_eq T t7 t5 H33))) u0 (sym_eq T u0 -u H32))) k0 (sym_eq K k0 (Bind Abst) H31))) H30)) H29)) H28 H25 H26))) | -(pr0_beta u0 v0 v3 H25 t7 t8 H26) \Rightarrow (\lambda (H27: (eq T (THead -(Flat Appl) v0 (THead (Bind Abst) u0 t7)) (THead (Bind Abst) u t5))).(\lambda -(H28: (eq T (THead (Bind Abbr) v3 t8) t4)).((let H29 \def (eq_ind T (THead -(Flat Appl) v0 (THead (Bind Abst) u0 t7)) (\lambda (e: T).(match e with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) -\Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abst) u t5) H27) in (False_ind ((eq T (THead (Bind -Abbr) v3 t8) t4) \to ((pr0 v0 v3) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind -Abbr) v2 t6) t9)))))) H29)) H28 H25 H26))) | (pr0_upsilon b H25 v0 v3 H26 u0 -u3 H27 t7 t8 H28) \Rightarrow (\lambda (H29: (eq T (THead (Flat Appl) v0 -(THead (Bind b) u0 t7)) (THead (Bind Abst) u t5))).(\lambda (H30: (eq T -(THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t8)) t4)).((let H31 -\def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u0 t7)) (\lambda (e: -T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead k0 _ _) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind Abst) u t5) H29) in (False_ind ((eq T -(THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t8)) t4) \to ((not -(eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t7 t8) \to (ex2 T -(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 -(THead (Bind Abbr) v2 t6) t9)))))))) H31)) H30 H25 H26 H27 H28))) | -(pr0_delta u0 u3 H25 t7 t8 H26 w H27) \Rightarrow (\lambda (H28: (eq T (THead -(Bind Abbr) u0 t7) (THead (Bind Abst) u t5))).(\lambda (H29: (eq T (THead -(Bind Abbr) u3 w) t4)).((let H30 \def (eq_ind T (THead (Bind Abbr) u0 t7) -(\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind -Abst) u t5) H28) in (False_ind ((eq T (THead (Bind Abbr) u3 w) t4) \to ((pr0 -u0 u3) \to ((pr0 t7 t8) \to ((subst0 O u3 t8 w) \to (ex2 T (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind -Abbr) v2 t6) t9))))))) H30)) H29 H25 H26 H27))) | (pr0_zeta b H25 t7 t8 H26 -u0) \Rightarrow (\lambda (H27: (eq T (THead (Bind b) u0 (lift (S O) O t7)) -(THead (Bind Abst) u t5))).(\lambda (H28: (eq T t8 t4)).((let H29 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map -(\lambda (x: nat).(plus x (S O))) O t7) | (TLRef _) \Rightarrow (lref_map -(\lambda (x: nat).(plus x (S O))) O t7) | (THead _ _ t9) \Rightarrow t9])) -(THead (Bind b) u0 (lift (S O) O t7)) (THead (Bind Abst) u t5) H27) in ((let -H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 -| (TLRef _) \Rightarrow u0 | (THead _ t9 _) \Rightarrow t9])) (THead (Bind b) -u0 (lift (S O) O t7)) (THead (Bind Abst) u t5) H27) in ((let H31 \def -(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef -_) \Rightarrow b | (THead k0 _ _) \Rightarrow (match k0 with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O -t7)) (THead (Bind Abst) u t5) H27) in (eq_ind B Abst (\lambda (b0: B).((eq T -u0 u) \to ((eq T (lift (S O) O t7) t5) \to ((eq T t8 t4) \to ((not (eq B b0 -Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) -u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))))))))) -(\lambda (H32: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O -t7) t5) \to ((eq T t8 t4) \to ((not (eq B Abst Abst)) \to ((pr0 t7 t8) \to -(ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: -T).(pr0 (THead (Bind Abbr) v2 t6) t10)))))))) (\lambda (H33: (eq T (lift (S -O) O t7) t5)).(eq_ind T (lift (S O) O t7) (\lambda (_: T).((eq T t8 t4) \to -((not (eq B Abst Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 -(THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 -t6) t10))))))) (\lambda (H34: (eq T t8 t4)).(eq_ind T t4 (\lambda (t9: -T).((not (eq B Abst Abst)) \to ((pr0 t7 t9) \to (ex2 T (\lambda (t10: T).(pr0 -(THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 -t6) t10)))))) (\lambda (H35: (not (eq B Abst Abst))).(\lambda (_: (pr0 t7 -t4)).(let H37 \def (match (H35 (refl_equal B Abst)) in False with []) in -H37))) t8 (sym_eq T t8 t4 H34))) t5 H33)) u0 (sym_eq T u0 u H32))) b (sym_eq -B b Abst H31))) H30)) H29)) H28 H25 H26))) | (pr0_tau t7 t8 H25 u0) -\Rightarrow (\lambda (H26: (eq T (THead (Flat Cast) u0 t7) (THead (Bind Abst) -u t5))).(\lambda (H27: (eq T t8 t4)).((let H28 \def (eq_ind T (THead (Flat -Cast) u0 t7) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -Abst) u t5) H26) in (False_ind ((eq T t8 t4) \to ((pr0 t7 t8) \to (ex2 T -(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 -(THead (Bind Abbr) v2 t6) t9))))) H28)) H27 H25)))]) in (H25 (refl_equal T -(THead (Bind Abst) u t5)) (refl_equal T t4))))) k H21))))) H18)) H17))))) t2 -H13)) t H11 H12 H9 H10))) | (pr0_upsilon b H9 v1 v2 H10 u0 u3 H11 t5 t6 H12) -\Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 -t5)) t)).(\lambda (H14: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S -O) O v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t5)) -(\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O -v2) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to -((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda -(t8: T).(pr0 t2 t8))))))))) (\lambda (H15: (eq T (THead (Bind b) u3 (THead -(Flat Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b) u3 (THead -(Flat Appl) (lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b Abst)) \to -((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t7 t8)))))))) (\lambda -(H16: (not (eq B b Abst))).(\lambda (H17: (pr0 v1 v2)).(\lambda (H18: (pr0 u0 -u3)).(\lambda (H19: (pr0 t5 t6)).(let H20 \def (eq_ind_r T t (\lambda (t7: -T).(eq T (THead k u1 t3) t7)) H4 (THead (Flat Appl) v1 (THead (Bind b) u0 -t5)) H13) in (let H21 \def (f_equal T K (\lambda (e: T).(match e with [(TSort -_) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) -(THead k u1 t3) (THead (Flat Appl) v1 (THead (Bind b) u0 t5)) H20) in ((let -H22 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 -| (TLRef _) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) -(THead (Flat Appl) v1 (THead (Bind b) u0 t5)) H20) in ((let H23 \def (f_equal -T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) -\Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead -(Flat Appl) v1 (THead (Bind b) u0 t5)) H20) in (\lambda (H24: (eq T u1 -v1)).(\lambda (H25: (eq K k (Flat Appl))).(let H26 \def (eq_ind_r T t -(\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) -\to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) -(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) v1 (THead (Bind -b) u0 t5)) H13) in (eq_ind_r K (Flat Appl) (\lambda (k0: K).(ex2 T (\lambda -(t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind b) u3 -(THead (Flat Appl) (lift (S O) O v2) t6)) t7)))) (let H27 \def (eq_ind T u1 -(\lambda (t7: T).(pr0 t7 u2)) H7 v1 H24) in (let H28 \def (eq_ind T t3 -(\lambda (t7: T).(pr0 t7 t4)) H8 (THead (Bind b) u0 t5) H23) in (let H29 \def -(match H28 with [(pr0_refl t7) \Rightarrow (\lambda (H29: (eq T t7 (THead -(Bind b) u0 t5))).(\lambda (H30: (eq T t7 t4)).(eq_ind T (THead (Bind b) u0 -t5) (\lambda (t8: T).((eq T t8 t4) \to (ex2 T (\lambda (t9: T).(pr0 (THead -(Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat -Appl) (lift (S O) O v2) t6)) t9))))) (\lambda (H31: (eq T (THead (Bind b) u0 -t5) t4)).(eq_ind T (THead (Bind b) u0 t5) (\lambda (t8: T).(ex2 T (\lambda -(t9: T).(pr0 (THead (Flat Appl) u2 t8) t9)) (\lambda (t9: T).(pr0 (THead -(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9)))) (ex2_ind T -(\lambda (t8: T).(pr0 u2 t8)) (\lambda (t8: T).(pr0 v2 t8)) (ex2 T (\lambda -(t8: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u0 t5)) t8)) (\lambda (t8: -T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t8))) -(\lambda (x: T).(\lambda (H32: (pr0 u2 x)).(\lambda (H33: (pr0 v2 -x)).(pr0_confluence__pr0_cong_upsilon_refl b H16 u0 u3 H18 t5 t6 H19 u2 v2 x -H32 H33)))) (H26 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 t5)) u2 -H27 v2 H17)) t4 H31)) t7 (sym_eq T t7 (THead (Bind b) u0 t5) H29) H30))) | -(pr0_comp u4 u5 H29 t7 t8 H30 k0) \Rightarrow (\lambda (H31: (eq T (THead k0 -u4 t7) (THead (Bind b) u0 t5))).(\lambda (H32: (eq T (THead k0 u5 t8) -t4)).((let H33 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) \Rightarrow t9])) -(THead k0 u4 t7) (THead (Bind b) u0 t5) H31) in ((let H34 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow u4 | (TLRef _) -\Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) (THead k0 u4 t7) (THead -(Bind b) u0 t5) H31) in ((let H35 \def (f_equal T K (\lambda (e: T).(match e -with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) -\Rightarrow k1])) (THead k0 u4 t7) (THead (Bind b) u0 t5) H31) in (eq_ind K -(Bind b) (\lambda (k1: K).((eq T u4 u0) \to ((eq T t7 t5) \to ((eq T (THead -k1 u5 t8) t4) \to ((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) -u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9))))))))) (\lambda (H36: (eq T -u4 u0)).(eq_ind T u0 (\lambda (t9: T).((eq T t7 t5) \to ((eq T (THead (Bind -b) u5 t8) t4) \to ((pr0 t9 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: -T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind -b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t10)))))))) (\lambda (H37: -(eq T t7 t5)).(eq_ind T t5 (\lambda (t9: T).((eq T (THead (Bind b) u5 t8) t4) -\to ((pr0 u0 u5) \to ((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead -(Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead -(Flat Appl) (lift (S O) O v2) t6)) t10))))))) (\lambda (H38: (eq T (THead -(Bind b) u5 t8) t4)).(eq_ind T (THead (Bind b) u5 t8) (\lambda (t9: T).((pr0 -u0 u5) \to ((pr0 t5 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) -u2 t9) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) -(lift (S O) O v2) t6)) t10)))))) (\lambda (H39: (pr0 u0 u5)).(\lambda (H40: -(pr0 t5 t8)).(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 -t6 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 -t8)) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift -(S O) O v2) t6)) t9))) (\lambda (x: T).(\lambda (H41: (pr0 t8 x)).(\lambda -(H42: (pr0 t6 x)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: -T).(pr0 u3 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead -(Bind b) u5 t8)) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat -Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x0: T).(\lambda (H43: (pr0 u5 -x0)).(\lambda (H44: (pr0 u3 x0)).(ex2_ind T (\lambda (t9: T).(pr0 u2 t9)) -(\lambda (t9: T).(pr0 v2 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) -u2 (THead (Bind b) u5 t8)) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 -(THead (Flat Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x1: T).(\lambda -(H45: (pr0 u2 x1)).(\lambda (H46: (pr0 v2 -x1)).(pr0_confluence__pr0_cong_upsilon_cong b H16 u2 v2 x1 H45 H46 t8 t6 x -H41 H42 u5 u3 x0 H43 H44)))) (H26 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind -b) u0 t5)) u2 H27 v2 H17))))) (H26 u0 (tlt_trans (THead (Bind b) u0 t5) u0 -(THead (Flat Appl) v1 (THead (Bind b) u0 t5)) (tlt_head_sx (Bind b) u0 t5) -(tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 t5))) u5 H39 u3 H18))))) (H26 -t5 (tlt_trans (THead (Bind b) u0 t5) t5 (THead (Flat Appl) v1 (THead (Bind b) -u0 t5)) (tlt_head_dx (Bind b) u0 t5) (tlt_head_dx (Flat Appl) v1 (THead (Bind -b) u0 t5))) t8 H40 t6 H19)))) t4 H38)) t7 (sym_eq T t7 t5 H37))) u4 (sym_eq T -u4 u0 H36))) k0 (sym_eq K k0 (Bind b) H35))) H34)) H33)) H32 H29 H30))) | -(pr0_beta u v0 v3 H29 t7 t8 H30) \Rightarrow (\lambda (H31: (eq T (THead -(Flat Appl) v0 (THead (Bind Abst) u t7)) (THead (Bind b) u0 t5))).(\lambda -(H32: (eq T (THead (Bind Abbr) v3 t8) t4)).((let H33 \def (eq_ind T (THead -(Flat Appl) v0 (THead (Bind Abst) u t7)) (\lambda (e: T).(match e with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) -\Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind b) u0 t5) H31) in (False_ind ((eq T (THead (Bind -Abbr) v3 t8) t4) \to ((pr0 v0 v3) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) -u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9)))))) H33)) H32 H29 H30))) | -(pr0_upsilon b0 H29 v0 v3 H30 u4 u5 H31 t7 t8 H32) \Rightarrow (\lambda (H33: -(eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t7)) (THead (Bind b) u0 -t5))).(\lambda (H34: (eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) -O v3) t8)) t4)).((let H35 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind -b0) u4 t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -b) u0 t5) H33) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat Appl) -(lift (S O) O v3) t8)) t4) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to -((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat -Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) -(lift (S O) O v2) t6)) t9)))))))) H35)) H34 H29 H30 H31 H32))) | (pr0_delta -u4 u5 H29 t7 t8 H30 w H31) \Rightarrow (\lambda (H32: (eq T (THead (Bind -Abbr) u4 t7) (THead (Bind b) u0 t5))).(\lambda (H33: (eq T (THead (Bind Abbr) -u5 w) t4)).((let H34 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) \Rightarrow -t9])) (THead (Bind Abbr) u4 t7) (THead (Bind b) u0 t5) H32) in ((let H35 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u4 | (TLRef -_) \Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) (THead (Bind Abbr) u4 -t7) (THead (Bind b) u0 t5) H32) in ((let H36 \def (f_equal T B (\lambda (e: -T).(match e with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | -(THead k0 _ _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat -_) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t7) (THead (Bind b) u0 t5) -H32) in (eq_ind B Abbr (\lambda (b0: B).((eq T u4 u0) \to ((eq T t7 t5) \to -((eq T (THead (Bind Abbr) u5 w) t4) \to ((pr0 u4 u5) \to ((pr0 t7 t8) \to -((subst0 O u5 t8 w) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 -t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift -(S O) O v2) t6)) t9)))))))))) (\lambda (H37: (eq T u4 u0)).(eq_ind T u0 -(\lambda (t9: T).((eq T t7 t5) \to ((eq T (THead (Bind Abbr) u5 w) t4) \to -((pr0 t9 u5) \to ((pr0 t7 t8) \to ((subst0 O u5 t8 w) \to (ex2 T (\lambda -(t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead -(Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t10))))))))) -(\lambda (H38: (eq T t7 t5)).(eq_ind T t5 (\lambda (t9: T).((eq T (THead -(Bind Abbr) u5 w) t4) \to ((pr0 u0 u5) \to ((pr0 t9 t8) \to ((subst0 O u5 t8 -w) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda -(t10: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) -t10)))))))) (\lambda (H39: (eq T (THead (Bind Abbr) u5 w) t4)).(eq_ind T -(THead (Bind Abbr) u5 w) (\lambda (t9: T).((pr0 u0 u5) \to ((pr0 t5 t8) \to -((subst0 O u5 t8 w) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 -t9) t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) -(lift (S O) O v2) t6)) t10))))))) (\lambda (H40: (pr0 u0 u5)).(\lambda (H41: -(pr0 t5 t8)).(\lambda (H42: (subst0 O u5 t8 w)).(let H43 \def (eq_ind_r B b -(\lambda (b0: B).(\forall (v: T).((tlt v (THead (Flat Appl) v1 (THead (Bind -b0) u0 t5))) \to (\forall (t9: T).((pr0 v t9) \to (\forall (t10: T).((pr0 v -t10) \to (ex2 T (\lambda (t11: T).(pr0 t9 t11)) (\lambda (t11: T).(pr0 t10 -t11)))))))))) H26 Abbr H36) in (let H44 \def (eq_ind_r B b (\lambda (b0: -B).(eq T t3 (THead (Bind b0) u0 t5))) H23 Abbr H36) in (let H45 \def -(eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H16 Abbr H36) in -(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t6 t9)) (ex2 T -(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t9)) -(\lambda (t9: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O -v2) t6)) t9))) (\lambda (x: T).(\lambda (H46: (pr0 t8 x)).(\lambda (H47: (pr0 -t6 x)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: T).(pr0 u3 t9)) -(ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) -t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S -O) O v2) t6)) t9))) (\lambda (x0: T).(\lambda (H48: (pr0 u5 x0)).(\lambda -(H49: (pr0 u3 x0)).(ex2_ind T (\lambda (t9: T).(pr0 u2 t9)) (\lambda (t9: -T).(pr0 v2 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead -(Bind Abbr) u5 w)) t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) u3 (THead -(Flat Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x1: T).(\lambda (H50: (pr0 -u2 x1)).(\lambda (H51: (pr0 v2 x1)).(pr0_confluence__pr0_cong_upsilon_delta -H45 u5 t8 w H42 u2 v2 x1 H50 H51 t6 x H46 H47 u3 x0 H48 H49)))) (H43 v1 -(tlt_head_sx (Flat Appl) v1 (THead (Bind Abbr) u0 t5)) u2 H27 v2 H17))))) -(H43 u0 (tlt_trans (THead (Bind Abbr) u0 t5) u0 (THead (Flat Appl) v1 (THead -(Bind Abbr) u0 t5)) (tlt_head_sx (Bind Abbr) u0 t5) (tlt_head_dx (Flat Appl) -v1 (THead (Bind Abbr) u0 t5))) u5 H40 u3 H18))))) (H43 t5 (tlt_trans (THead -(Bind Abbr) u0 t5) t5 (THead (Flat Appl) v1 (THead (Bind Abbr) u0 t5)) -(tlt_head_dx (Bind Abbr) u0 t5) (tlt_head_dx (Flat Appl) v1 (THead (Bind -Abbr) u0 t5))) t8 H41 t6 H19)))))))) t4 H39)) t7 (sym_eq T t7 t5 H38))) u4 -(sym_eq T u4 u0 H37))) b H36)) H35)) H34)) H33 H29 H30 H31))) | (pr0_zeta b0 -H29 t7 t8 H30 u) \Rightarrow (\lambda (H31: (eq T (THead (Bind b0) u (lift (S -O) O t7)) (THead (Bind b) u0 t5))).(\lambda (H32: (eq T t8 t4)).((let H33 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow -(lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (TLRef _) \Rightarrow -(lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (THead _ _ t9) -\Rightarrow t9])) (THead (Bind b0) u (lift (S O) O t7)) (THead (Bind b) u0 -t5) H31) in ((let H34 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t9 _) \Rightarrow t9])) -(THead (Bind b0) u (lift (S O) O t7)) (THead (Bind b) u0 t5) H31) in ((let -H35 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 -| (TLRef _) \Rightarrow b0 | (THead k0 _ _) \Rightarrow (match k0 with [(Bind -b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S -O) O t7)) (THead (Bind b) u0 t5) H31) in (eq_ind B b (\lambda (b1: B).((eq T -u u0) \to ((eq T (lift (S O) O t7) t5) \to ((eq T t8 t4) \to ((not (eq B b1 -Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) -u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift -(S O) O v2) t6)) t9))))))))) (\lambda (H36: (eq T u u0)).(eq_ind T u0 -(\lambda (_: T).((eq T (lift (S O) O t7) t5) \to ((eq T t8 t4) \to ((not (eq -B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat -Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead (Flat -Appl) (lift (S O) O v2) t6)) t10)))))))) (\lambda (H37: (eq T (lift (S O) O -t7) t5)).(eq_ind T (lift (S O) O t7) (\lambda (_: T).((eq T t8 t4) \to ((not -(eq B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead -(Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead -(Flat Appl) (lift (S O) O v2) t6)) t10))))))) (\lambda (H38: (eq T t8 -t4)).(eq_ind T t4 (\lambda (t9: T).((not (eq B b Abst)) \to ((pr0 t7 t9) \to -(ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: -T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) -t10)))))) (\lambda (H39: (not (eq B b Abst))).(\lambda (H40: (pr0 t7 -t4)).(let H41 \def (eq_ind_r T t5 (\lambda (t9: T).(\forall (v: T).((tlt v -(THead (Flat Appl) v1 (THead (Bind b) u0 t9))) \to (\forall (t10: T).((pr0 v -t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T (\lambda (t12: T).(pr0 t10 -t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H26 (lift (S O) O t7) H37) in -(let H42 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T t3 (THead (Bind b) u0 -t9))) H23 (lift (S O) O t7) H37) in (let H43 \def (eq_ind_r T t5 (\lambda -(t9: T).(pr0 t9 t6)) H19 (lift (S O) O t7) H37) in (ex2_ind T (\lambda (t9: -T).(eq T t6 (lift (S O) O t9))) (\lambda (t9: T).(pr0 t7 t9)) (ex2 T (\lambda -(t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead -(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x: -T).(\lambda (H44: (eq T t6 (lift (S O) O x))).(\lambda (H45: (pr0 t7 -x)).(eq_ind_r T (lift (S O) O x) (\lambda (t9: T).(ex2 T (\lambda (t10: -T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind -b) u3 (THead (Flat Appl) (lift (S O) O v2) t9)) t10)))) (ex2_ind T (\lambda -(t9: T).(pr0 x t9)) (\lambda (t9: T).(pr0 t4 t9)) (ex2 T (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) -u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t9))) (\lambda -(x0: T).(\lambda (H46: (pr0 x x0)).(\lambda (H47: (pr0 t4 x0)).(ex2_ind T -(\lambda (t9: T).(pr0 u2 t9)) (\lambda (t9: T).(pr0 v2 t9)) (ex2 T (\lambda -(t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead -(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t9))) -(\lambda (x1: T).(\lambda (H48: (pr0 u2 x1)).(\lambda (H49: (pr0 v2 -x1)).(pr0_confluence__pr0_cong_upsilon_zeta b H39 u0 u3 H18 u2 v2 x1 H48 H49 -x t4 x0 H46 H47)))) (H41 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 -(lift (S O) O t7))) u2 H27 v2 H17))))) (H41 t7 (tlt_trans (THead (Bind b) u0 -(lift (S O) O t7)) t7 (THead (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O -t7))) (lift_tlt_dx (Bind b) u0 t7 (S O) O) (tlt_head_dx (Flat Appl) v1 (THead -(Bind b) u0 (lift (S O) O t7)))) x H45 t4 H40)) t6 H44)))) (pr0_gen_lift t7 -t6 (S O) O H43))))))) t8 (sym_eq T t8 t4 H38))) t5 H37)) u (sym_eq T u u0 -H36))) b0 (sym_eq B b0 b H35))) H34)) H33)) H32 H29 H30))) | (pr0_tau t7 t8 -H29 u) \Rightarrow (\lambda (H30: (eq T (THead (Flat Cast) u t7) (THead (Bind -b) u0 t5))).(\lambda (H31: (eq T t8 t4)).((let H32 \def (eq_ind T (THead -(Flat Cast) u t7) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False -| (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -b) u0 t5) H30) in (False_ind ((eq T t8 t4) \to ((pr0 t7 t8) \to (ex2 T -(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 -(THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9))))) H32)) -H31 H29)))]) in (H29 (refl_equal T (THead (Bind b) u0 t5)) (refl_equal T -t4))))) k H25))))) H22)) H21))))))) t2 H15)) t H13 H14 H9 H10 H11 H12))) | -(pr0_delta u0 u3 H9 t5 t6 H10 w H11) \Rightarrow (\lambda (H12: (eq T (THead -(Bind Abbr) u0 t5) t)).(\lambda (H13: (eq T (THead (Bind Abbr) u3 w) -t2)).(eq_ind T (THead (Bind Abbr) u0 t5) (\lambda (_: T).((eq T (THead (Bind -Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w) \to -(ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 -t8)))))))) (\lambda (H14: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T -(THead (Bind Abbr) u3 w) (\lambda (t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) \to -((subst0 O u3 t6 w) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) -(\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (H15: (pr0 u0 u3)).(\lambda (H16: -(pr0 t5 t6)).(\lambda (H17: (subst0 O u3 t6 w)).(let H18 \def (eq_ind_r T t -(\lambda (t7: T).(eq T (THead k u1 t3) t7)) H4 (THead (Bind Abbr) u0 t5) H12) -in (let H19 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) -(THead k u1 t3) (THead (Bind Abbr) u0 t5) H18) in ((let H20 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) -\Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) (THead -(Bind Abbr) u0 t5) H18) in ((let H21 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t7) -\Rightarrow t7])) (THead k u1 t3) (THead (Bind Abbr) u0 t5) H18) in (\lambda -(H22: (eq T u1 u0)).(\lambda (H23: (eq K k (Bind Abbr))).(let H24 \def -(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: -T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: -T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind Abbr) -u0 t5) H12) in (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 T (\lambda (t7: -T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w) -t7)))) (let H25 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 u0 H22) in -(let H26 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 t5 H21) in -(ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T -(\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 t4) t7)) (\lambda (t7: T).(pr0 -(THead (Bind Abbr) u3 w) t7))) (\lambda (x: T).(\lambda (H27: (pr0 t4 -x)).(\lambda (H28: (pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) -(\lambda (t7: T).(pr0 u3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) -u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w) t7))) (\lambda -(x0: T).(\lambda (H29: (pr0 u2 x0)).(\lambda (H30: (pr0 u3 -x0)).(pr0_confluence__pr0_cong_delta u3 t6 w H17 u2 x0 H29 H30 t4 x H27 -H28)))) (H24 u0 (tlt_head_sx (Bind Abbr) u0 t5) u2 H25 u3 H15))))) (H24 t5 -(tlt_head_dx (Bind Abbr) u0 t5) t4 H26 t6 H16)))) k H23))))) H20)) H19)))))) -t2 H14)) t H12 H13 H9 H10 H11))) | (pr0_zeta b H9 t5 t6 H10 u) \Rightarrow -(\lambda (H11: (eq T (THead (Bind b) u (lift (S O) O t5)) t)).(\lambda (H12: -(eq T t6 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t5)) (\lambda (_: -T).((eq T t6 t2) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ex2 T -(\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) -(\lambda (H13: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b -Abst)) \to ((pr0 t5 t7) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) -(\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H14: (not (eq B b -Abst))).(\lambda (H15: (pr0 t5 t2)).(let H16 \def (eq_ind_r T t (\lambda (t7: -T).(eq T (THead k u1 t3) t7)) H4 (THead (Bind b) u (lift (S O) O t5)) H11) in -(let H17 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) -(THead k u1 t3) (THead (Bind b) u (lift (S O) O t5)) H16) in ((let H18 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef -_) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) (THead -(Bind b) u (lift (S O) O t5)) H16) in ((let H19 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | -(THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead (Bind b) u (lift (S -O) O t5)) H16) in (\lambda (H20: (eq T u1 u)).(\lambda (H21: (eq K k (Bind -b))).(let H22 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) -\to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T -(\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H -(THead (Bind b) u (lift (S O) O t5)) H11) in (eq_ind_r K (Bind b) (\lambda -(k0: K).(ex2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: -T).(pr0 t2 t7)))) (let H23 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 -u H20) in (let H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 (lift -(S O) O t5) H19) in (ex2_ind T (\lambda (t7: T).(eq T t4 (lift (S O) O t7))) -(\lambda (t7: T).(pr0 t5 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 -t4) t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H25: (eq T -t4 (lift (S O) O x))).(\lambda (H26: (pr0 t5 x)).(eq_ind_r T (lift (S O) O x) -(\lambda (t7: T).(ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 t7) t8)) -(\lambda (t8: T).(pr0 t2 t8)))) (ex2_ind T (\lambda (t7: T).(pr0 x t7)) -(\lambda (t7: T).(pr0 t2 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 -(lift (S O) O x)) t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x0: -T).(\lambda (H27: (pr0 x x0)).(\lambda (H28: (pr0 t2 x0)).(ex_intro2 T -(\lambda (t7: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t7)) (\lambda (t7: -T).(pr0 t2 t7)) x0 (pr0_zeta b H14 x x0 H27 u2) H28)))) (H22 t5 (lift_tlt_dx -(Bind b) u t5 (S O) O) x H26 t2 H15)) t4 H25)))) (pr0_gen_lift t5 t4 (S O) O -H24)))) k H21))))) H18)) H17))))) t6 (sym_eq T t6 t2 H13))) t H11 H12 H9 -H10))) | (pr0_tau t5 t6 H9 u) \Rightarrow (\lambda (H10: (eq T (THead (Flat -Cast) u t5) t)).(\lambda (H11: (eq T t6 t2)).(eq_ind T (THead (Flat Cast) u -t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H12: -(eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda -(t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))) (\lambda -(H13: (pr0 t5 t2)).(let H14 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead -k u1 t3) t7)) H4 (THead (Flat Cast) u t5) H10) in (let H15 \def (f_equal T K -(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Flat -Cast) u t5) H14) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) -\Rightarrow t7])) (THead k u1 t3) (THead (Flat Cast) u t5) H14) in ((let H17 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | -(TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) -(THead (Flat Cast) u t5) H14) in (\lambda (H18: (eq T u1 u)).(\lambda (H19: -(eq K k (Flat Cast))).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(\forall -(v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: -T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: -T).(pr0 t9 t10)))))))))) H (THead (Flat Cast) u t5) H10) in (eq_ind_r K (Flat -Cast) (\lambda (k0: K).(ex2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) -(\lambda (t7: T).(pr0 t2 t7)))) (let H21 \def (eq_ind T u1 (\lambda (t7: -T).(pr0 t7 u2)) H7 u H18) in (let H22 \def (eq_ind T t3 (\lambda (t7: T).(pr0 -t7 t4)) H8 t5 H17) in (ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: -T).(pr0 t2 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Flat Cast) u2 t4) t7)) -(\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H23: (pr0 t4 -x)).(\lambda (H24: (pr0 t2 x)).(ex_intro2 T (\lambda (t7: T).(pr0 (THead -(Flat Cast) u2 t4) t7)) (\lambda (t7: T).(pr0 t2 t7)) x (pr0_tau t4 x H23 u2) -H24)))) (H20 t5 (tlt_head_dx (Flat Cast) u t5) t4 H22 t2 H13)))) k H19))))) -H16)) H15)))) t6 (sym_eq T t6 t2 H12))) t H10 H11 H9)))]) in (H9 (refl_equal -T t) (refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_beta u v1 v2 H2 t3 -t4 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u t3)) t)).(\lambda (H5: (eq T (THead (Bind Abbr) v2 t4) t1)).(eq_ind T -(THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (_: T).((eq T (THead -(Bind Abbr) v2 t4) t1) \to ((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda -(t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6))))))) (\lambda (H6: (eq T -(THead (Bind Abbr) v2 t4) t1)).(eq_ind T (THead (Bind Abbr) v2 t4) (\lambda -(t5: T).((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t5 -t6)) (\lambda (t6: T).(pr0 t2 t6)))))) (\lambda (H7: (pr0 v1 v2)).(\lambda -(H8: (pr0 t3 t4)).(let H9 \def (match H1 with [(pr0_refl t5) \Rightarrow -(\lambda (H9: (eq T t5 t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T t (\lambda -(t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 -t4) t7)) (\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H11: (eq T t t2)).(eq_ind -T t2 (\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) -t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H12 \def (eq_ind_r T t (\lambda -(t6: T).(eq T t6 t2)) H11 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H4) -in (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (t6: -T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: -T).(pr0 t6 t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) -H9 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H4) in (let H14 \def -(eq_ind_r T t (\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: -T).((pr0 v t7) \to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: -T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Appl) v1 -(THead (Bind Abst) u t3)) H4) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead -(Bind Abbr) v2 t4) t6)) (\lambda (t6: T).(pr0 (THead (Flat Appl) v1 (THead -(Bind Abst) u t3)) t6)) (THead (Bind Abbr) v2 t4) (pr0_refl (THead (Bind -Abbr) v2 t4)) (pr0_beta u v1 v2 H7 t3 t4 H8)))) t2 H12)) t (sym_eq T t t2 -H11))) t5 (sym_eq T t5 t H9) H10))) | (pr0_comp u1 u2 H9 t5 t6 H10 k) -\Rightarrow (\lambda (H11: (eq T (THead k u1 t5) t)).(\lambda (H12: (eq T -(THead k u2 t6) t2)).(eq_ind T (THead k u1 t5) (\lambda (_: T).((eq T (THead -k u2 t6) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) -(\lambda (H13: (eq T (THead k u2 t6) t2)).(eq_ind T (THead k u2 t6) (\lambda -(t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead -(Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (H14: (pr0 -u1 u2)).(\lambda (H15: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda (t7: -T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) t7)) H4 (THead k u1 -t5) H11) in (let H17 \def (f_equal T K (\lambda (e: T).(match e with [(TSort -_) \Rightarrow (Flat Appl) | (TLRef _) \Rightarrow (Flat Appl) | (THead k0 _ -_) \Rightarrow k0])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead k -u1 t5) H16) in ((let H18 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t7 _) -\Rightarrow t7])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead k u1 -t5) H16) in ((let H19 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow (THead (Bind Abst) u t3) | (TLRef _) \Rightarrow (THead (Bind -Abst) u t3) | (THead _ _ t7) \Rightarrow t7])) (THead (Flat Appl) v1 (THead -(Bind Abst) u t3)) (THead k u1 t5) H16) in (\lambda (H20: (eq T v1 -u1)).(\lambda (H21: (eq K (Flat Appl) k)).(eq_ind K (Flat Appl) (\lambda (k0: -K).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: -T).(pr0 (THead k0 u2 t6) t7)))) (let H22 \def (eq_ind_r K k (\lambda (k0: -K).(eq T (THead k0 u1 t5) t)) H11 (Flat Appl) H21) in (let H23 \def (eq_ind_r -T t5 (\lambda (t7: T).(pr0 t7 t6)) H15 (THead (Bind Abst) u t3) H19) in (let -H24 \def (match H23 with [(pr0_refl t7) \Rightarrow (\lambda (H24: (eq T t7 -(THead (Bind Abst) u t3))).(\lambda (H25: (eq T t7 t6)).(eq_ind T (THead -(Bind Abst) u t3) (\lambda (t8: T).((eq T t8 t6) \to (ex2 T (\lambda (t9: -T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat -Appl) u2 t6) t9))))) (\lambda (H26: (eq T (THead (Bind Abst) u t3) -t6)).(eq_ind T (THead (Bind Abst) u t3) (\lambda (t8: T).(ex2 T (\lambda (t9: -T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat -Appl) u2 t8) t9)))) (let H27 \def (eq_ind_r T t5 (\lambda (t8: T).(eq T -(THead (Flat Appl) u1 t8) t)) H22 (THead (Bind Abst) u t3) H19) in (let H28 -\def (eq_ind_r T t (\lambda (t8: T).(\forall (v: T).((tlt v t8) \to (\forall -(t9: T).((pr0 v t9) \to (\forall (t10: T).((pr0 v t10) \to (ex2 T (\lambda -(t11: T).(pr0 t9 t11)) (\lambda (t11: T).(pr0 t10 t11)))))))))) H (THead -(Flat Appl) u1 (THead (Bind Abst) u t3)) H27) in (let H29 \def (eq_ind T v1 -(\lambda (t8: T).(pr0 t8 v2)) H7 u1 H20) in (ex2_ind T (\lambda (t8: T).(pr0 -v2 t8)) (\lambda (t8: T).(pr0 u2 t8)) (ex2 T (\lambda (t8: T).(pr0 (THead -(Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 (THead (Flat Appl) u2 (THead -(Bind Abst) u t3)) t8))) (\lambda (x: T).(\lambda (H30: (pr0 v2 x)).(\lambda -(H31: (pr0 u2 x)).(ex_intro2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 -t4) t8)) (\lambda (t8: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u -t3)) t8)) (THead (Bind Abbr) x t4) (pr0_comp v2 x H30 t4 t4 (pr0_refl t4) -(Bind Abbr)) (pr0_beta u u2 x H31 t3 t4 H8))))) (H28 u1 (tlt_head_sx (Flat -Appl) u1 (THead (Bind Abst) u t3)) v2 H29 u2 H14))))) t6 H26)) t7 (sym_eq T -t7 (THead (Bind Abst) u t3) H24) H25))) | (pr0_comp u0 u3 H24 t7 t8 H25 k0) -\Rightarrow (\lambda (H26: (eq T (THead k0 u0 t7) (THead (Bind Abst) u -t3))).(\lambda (H27: (eq T (THead k0 u3 t8) t6)).((let H28 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow t7 | (TLRef _) -\Rightarrow t7 | (THead _ _ t9) \Rightarrow t9])) (THead k0 u0 t7) (THead -(Bind Abst) u t3) H26) in ((let H29 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t9 _) -\Rightarrow t9])) (THead k0 u0 t7) (THead (Bind Abst) u t3) H26) in ((let H30 -\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | -(TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t7) -(THead (Bind Abst) u t3) H26) in (eq_ind K (Bind Abst) (\lambda (k1: K).((eq -T u0 u) \to ((eq T t7 t3) \to ((eq T (THead k1 u3 t8) t6) \to ((pr0 u0 u3) -\to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) -t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t6) t9))))))))) (\lambda -(H31: (eq T u0 u)).(eq_ind T u (\lambda (t9: T).((eq T t7 t3) \to ((eq T -(THead (Bind Abst) u3 t8) t6) \to ((pr0 t9 u3) \to ((pr0 t7 t8) \to (ex2 T -(\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 -(THead (Flat Appl) u2 t6) t10)))))))) (\lambda (H32: (eq T t7 t3)).(eq_ind T -t3 (\lambda (t9: T).((eq T (THead (Bind Abst) u3 t8) t6) \to ((pr0 u u3) \to -((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) -t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t6) t10))))))) (\lambda -(H33: (eq T (THead (Bind Abst) u3 t8) t6)).(eq_ind T (THead (Bind Abst) u3 -t8) (\lambda (t9: T).((pr0 u u3) \to ((pr0 t3 t8) \to (ex2 T (\lambda (t10: -T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Flat -Appl) u2 t9) t10)))))) (\lambda (_: (pr0 u u3)).(\lambda (H35: (pr0 t3 -t8)).(let H36 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T (THead (Flat Appl) -u1 t9) t)) H22 (THead (Bind Abst) u t3) H19) in (let H37 \def (eq_ind_r T t -(\lambda (t9: T).(\forall (v: T).((tlt v t9) \to (\forall (t10: T).((pr0 v -t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T (\lambda (t12: T).(pr0 t10 -t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H (THead (Flat Appl) u1 (THead -(Bind Abst) u t3)) H36) in (let H38 \def (eq_ind T v1 (\lambda (t9: T).(pr0 -t9 v2)) H7 u1 H20) in (ex2_ind T (\lambda (t9: T).(pr0 v2 t9)) (\lambda (t9: -T).(pr0 u2 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) -(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9))) -(\lambda (x: T).(\lambda (H39: (pr0 v2 x)).(\lambda (H40: (pr0 u2 -x)).(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t4 t9)) -(ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9))) (\lambda (x0: -T).(\lambda (H41: (pr0 t8 x0)).(\lambda (H42: (pr0 t4 x0)).(ex_intro2 T -(\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 -(THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9)) (THead (Bind Abbr) x -x0) (pr0_comp v2 x H39 t4 x0 H42 (Bind Abbr)) (pr0_beta u3 u2 x H40 t8 x0 -H41))))) (H37 t3 (tlt_trans (THead (Bind Abst) u t3) t3 (THead (Flat Appl) u1 -(THead (Bind Abst) u t3)) (tlt_head_dx (Bind Abst) u t3) (tlt_head_dx (Flat -Appl) u1 (THead (Bind Abst) u t3))) t8 H35 t4 H8))))) (H37 u1 (tlt_head_sx -(Flat Appl) u1 (THead (Bind Abst) u t3)) v2 H38 u2 H14))))))) t6 H33)) t7 -(sym_eq T t7 t3 H32))) u0 (sym_eq T u0 u H31))) k0 (sym_eq K k0 (Bind Abst) -H30))) H29)) H28)) H27 H24 H25))) | (pr0_beta u0 v0 v3 H24 t7 t8 H25) -\Rightarrow (\lambda (H26: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 -t7)) (THead (Bind Abst) u t3))).(\lambda (H27: (eq T (THead (Bind Abbr) v3 -t8) t6)).((let H28 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 -t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t3) -H26) in (False_ind ((eq T (THead (Bind Abbr) v3 t8) t6) \to ((pr0 v0 v3) \to -((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) -(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t6) t9)))))) H28)) H27 H24 H25))) -| (pr0_upsilon b H24 v0 v3 H25 u0 u3 H26 t7 t8 H27) \Rightarrow (\lambda -(H28: (eq T (THead (Flat Appl) v0 (THead (Bind b) u0 t7)) (THead (Bind Abst) -u t3))).(\lambda (H29: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S -O) O v3) t8)) t6)).((let H30 \def (eq_ind T (THead (Flat Appl) v0 (THead -(Bind b) u0 t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -Abst) u t3) H28) in (False_ind ((eq T (THead (Bind b) u3 (THead (Flat Appl) -(lift (S O) O v3) t8)) t6) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to -((pr0 u0 u3) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind -Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t6) t9)))))))) -H30)) H29 H24 H25 H26 H27))) | (pr0_delta u0 u3 H24 t7 t8 H25 w H26) -\Rightarrow (\lambda (H27: (eq T (THead (Bind Abbr) u0 t7) (THead (Bind Abst) -u t3))).(\lambda (H28: (eq T (THead (Bind Abbr) u3 w) t6)).((let H29 \def -(eq_ind T (THead (Bind Abbr) u0 t7) (\lambda (e: T).(match e with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow -(match k0 with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | -Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow -False])])) I (THead (Bind Abst) u t3) H27) in (False_ind ((eq T (THead (Bind -Abbr) u3 w) t6) \to ((pr0 u0 u3) \to ((pr0 t7 t8) \to ((subst0 O u3 t8 w) \to -(ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 t6) t9))))))) H29)) H28 H24 H25 H26))) | -(pr0_zeta b H24 t7 t8 H25 u0) \Rightarrow (\lambda (H26: (eq T (THead (Bind -b) u0 (lift (S O) O t7)) (THead (Bind Abst) u t3))).(\lambda (H27: (eq T t8 -t6)).((let H28 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (TLRef _) -\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (THead _ _ -t9) \Rightarrow t9])) (THead (Bind b) u0 (lift (S O) O t7)) (THead (Bind -Abst) u t3) H26) in ((let H29 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t9 _) -\Rightarrow t9])) (THead (Bind b) u0 (lift (S O) O t7)) (THead (Bind Abst) u -t3) H26) in ((let H30 \def (f_equal T B (\lambda (e: T).(match e with [(TSort -_) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k0 _ _) \Rightarrow -(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead -(Bind b) u0 (lift (S O) O t7)) (THead (Bind Abst) u t3) H26) in (eq_ind B -Abst (\lambda (b0: B).((eq T u0 u) \to ((eq T (lift (S O) O t7) t3) \to ((eq -T t8 t6) \to ((not (eq B b0 Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: -T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat -Appl) u2 t6) t9))))))))) (\lambda (H31: (eq T u0 u)).(eq_ind T u (\lambda (_: -T).((eq T (lift (S O) O t7) t3) \to ((eq T t8 t6) \to ((not (eq B Abst Abst)) -\to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) -t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t6) t10)))))))) (\lambda -(H32: (eq T (lift (S O) O t7) t3)).(eq_ind T (lift (S O) O t7) (\lambda (_: -T).((eq T t8 t6) \to ((not (eq B Abst Abst)) \to ((pr0 t7 t8) \to (ex2 T -(\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 -(THead (Flat Appl) u2 t6) t10))))))) (\lambda (H33: (eq T t8 t6)).(eq_ind T -t6 (\lambda (t9: T).((not (eq B Abst Abst)) \to ((pr0 t7 t9) \to (ex2 T -(\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 -(THead (Flat Appl) u2 t6) t10)))))) (\lambda (H34: (not (eq B Abst -Abst))).(\lambda (_: (pr0 t7 t6)).(let H36 \def (match (H34 (refl_equal B -Abst)) in False with []) in H36))) t8 (sym_eq T t8 t6 H33))) t3 H32)) u0 -(sym_eq T u0 u H31))) b (sym_eq B b Abst H30))) H29)) H28)) H27 H24 H25))) | -(pr0_tau t7 t8 H24 u0) \Rightarrow (\lambda (H25: (eq T (THead (Flat Cast) u0 -t7) (THead (Bind Abst) u t3))).(\lambda (H26: (eq T t8 t6)).((let H27 \def -(eq_ind T (THead (Flat Cast) u0 t7) (\lambda (e: T).(match e with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow -(match k0 with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind Abst) u t3) H25) in (False_ind ((eq T t8 t6) \to ((pr0 t7 t8) -\to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: -T).(pr0 (THead (Flat Appl) u2 t6) t9))))) H27)) H26 H24)))]) in (H24 -(refl_equal T (THead (Bind Abst) u t3)) (refl_equal T t6))))) k H21)))) H18)) -H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_beta u0 v0 v3 H9 t5 t6 H10) -\Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 -t5)) t)).(\lambda (H12: (eq T (THead (Bind Abbr) v3 t6) t2)).(eq_ind T (THead -(Flat Appl) v0 (THead (Bind Abst) u0 t5)) (\lambda (_: T).((eq T (THead (Bind -Abbr) v3 t6) t2) \to ((pr0 v0 v3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) -(\lambda (H13: (eq T (THead (Bind Abbr) v3 t6) t2)).(eq_ind T (THead (Bind -Abbr) v3 t6) (\lambda (t7: T).((pr0 v0 v3) \to ((pr0 t5 t6) \to (ex2 T -(\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 -t8)))))) (\lambda (H14: (pr0 v0 v3)).(\lambda (H15: (pr0 t5 t6)).(let H16 -\def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u t3)) t7)) H4 (THead (Flat Appl) v0 (THead (Bind Abst) u0 t5)) H11) in -(let H17 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) -(THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead -(Bind Abst) u0 t5)) H16) in ((let H18 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead -_ _ t7) \Rightarrow (match t7 with [(TSort _) \Rightarrow u | (TLRef _) -\Rightarrow u | (THead _ t8 _) \Rightarrow t8])])) (THead (Flat Appl) v1 -(THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t5)) -H16) in ((let H19 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow (match -t7 with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t8) -\Rightarrow t8])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead -(Flat Appl) v0 (THead (Bind Abst) u0 t5)) H16) in (\lambda (_: (eq T u -u0)).(\lambda (H21: (eq T v1 v0)).(let H22 \def (eq_ind_r T t (\lambda (t7: -T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall -(t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: -T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u0 t5)) -H11) in (let H23 \def (eq_ind T v1 (\lambda (t7: T).(pr0 t7 v2)) H7 v0 H21) -in (let H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 t5 H19) in -(ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T -(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 -(THead (Bind Abbr) v3 t6) t7))) (\lambda (x: T).(\lambda (H25: (pr0 t4 -x)).(\lambda (H26: (pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 v2 t7)) -(\lambda (t7: T).(pr0 v3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) -v2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) v3 t6) t7))) (\lambda -(x0: T).(\lambda (H27: (pr0 v2 x0)).(\lambda (H28: (pr0 v3 x0)).(ex_intro2 T -(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 -(THead (Bind Abbr) v3 t6) t7)) (THead (Bind Abbr) x0 x) (pr0_comp v2 x0 H27 -t4 x H25 (Bind Abbr)) (pr0_comp v3 x0 H28 t6 x H26 (Bind Abbr)))))) (H22 v0 -(tlt_head_sx (Flat Appl) v0 (THead (Bind Abst) u0 t5)) v2 H23 v3 H14))))) -(H22 t5 (tlt_trans (THead (Bind Abst) u0 t5) t5 (THead (Flat Appl) v0 (THead -(Bind Abst) u0 t5)) (tlt_head_dx (Bind Abst) u0 t5) (tlt_head_dx (Flat Appl) -v0 (THead (Bind Abst) u0 t5))) t4 H24 t6 H15)))))))) H18)) H17))))) t2 H13)) -t H11 H12 H9 H10))) | (pr0_upsilon b H9 v0 v3 H10 u1 u2 H11 t5 t6 H12) -\Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v0 (THead (Bind b) u1 -t5)) t)).(\lambda (H14: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v3) t6)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u1 t5)) -(\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v3) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to -((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) -(\lambda (t8: T).(pr0 t2 t8))))))))) (\lambda (H15: (eq T (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v3) t6)) t2)).(eq_ind T (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v3) t6)) (\lambda (t7: T).((not (eq B b -Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda -(t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 -t8)))))))) (\lambda (H16: (not (eq B b Abst))).(\lambda (_: (pr0 v0 -v3)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t5 t6)).(let H20 \def -(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) -u t3)) t7)) H4 (THead (Flat Appl) v0 (THead (Bind b) u1 t5)) H13) in (let H21 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | -(TLRef _) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) (THead (Flat -Appl) v1 (THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead (Bind b) u1 -t5)) H20) in ((let H22 \def (f_equal T B (\lambda (e: T).(match e with -[(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead _ _ t7) -\Rightarrow (match t7 with [(TSort _) \Rightarrow Abst | (TLRef _) -\Rightarrow Abst | (THead k _ _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abst])])])) (THead (Flat Appl) v1 -(THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead (Bind b) u1 t5)) H20) -in ((let H23 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ _ t7) \Rightarrow (match -t7 with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t8 _) -\Rightarrow t8])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead -(Flat Appl) v0 (THead (Bind b) u1 t5)) H20) in ((let H24 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) -\Rightarrow t3 | (THead _ _ t7) \Rightarrow (match t7 with [(TSort _) -\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t8) \Rightarrow -t8])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead (Flat Appl) v0 -(THead (Bind b) u1 t5)) H20) in (\lambda (_: (eq T u u1)).(\lambda (H26: (eq -B Abst b)).(\lambda (_: (eq T v1 v0)).(eq_ind B Abst (\lambda (b0: B).(ex2 T -(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 -(THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v3) t6)) t7)))) (let H28 -\def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H16 Abst H26) in -(let H29 \def (match (H28 (refl_equal B Abst)) in False with []) in H29)) b -H26))))) H23)) H22)) H21))))))) t2 H15)) t H13 H14 H9 H10 H11 H12))) | -(pr0_delta u1 u2 H9 t5 t6 H10 w H11) \Rightarrow (\lambda (H12: (eq T (THead -(Bind Abbr) u1 t5) t)).(\lambda (H13: (eq T (THead (Bind Abbr) u2 w) -t2)).(eq_ind T (THead (Bind Abbr) u1 t5) (\lambda (_: T).((eq T (THead (Bind -Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to -(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: -T).(pr0 t2 t8)))))))) (\lambda (H14: (eq T (THead (Bind Abbr) u2 w) -t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t7: T).((pr0 u1 u2) \to -((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ex2 T (\lambda (t8: T).(pr0 (THead -(Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (_: (pr0 -u1 u2)).(\lambda (_: (pr0 t5 t6)).(\lambda (_: (subst0 O u2 t6 w)).(let H18 -\def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind -Abst) u t3)) t7)) H4 (THead (Bind Abbr) u1 t5) H12) in (let H19 \def (eq_ind -T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) -\Rightarrow True])])) I (THead (Bind Abbr) u1 t5) H18) in (False_ind (ex2 T -(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 -(THead (Bind Abbr) u2 w) t7))) H19)))))) t2 H14)) t H12 H13 H9 H10 H11))) | -(pr0_zeta b H9 t5 t6 H10 u0) \Rightarrow (\lambda (H11: (eq T (THead (Bind b) -u0 (lift (S O) O t5)) t)).(\lambda (H12: (eq T t6 t2)).(eq_ind T (THead (Bind -b) u0 (lift (S O) O t5)) (\lambda (_: T).((eq T t6 t2) \to ((not (eq B b -Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) -v2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H13: (eq T t6 -t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b Abst)) \to ((pr0 t5 t7) \to -(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: -T).(pr0 t2 t8)))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t5 -t2)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 -(THead (Bind Abst) u t3)) t7)) H4 (THead (Bind b) u0 (lift (S O) O t5)) H11) -in (let H17 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 (lift -(S O) O t5)) H16) in (False_ind (ex2 T (\lambda (t7: T).(pr0 (THead (Bind -Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 t2 t7))) H17))))) t6 (sym_eq T t6 t2 -H13))) t H11 H12 H9 H10))) | (pr0_tau t5 t6 H9 u0) \Rightarrow (\lambda (H10: -(eq T (THead (Flat Cast) u0 t5) t)).(\lambda (H11: (eq T t6 t2)).(eq_ind T -(THead (Flat Cast) u0 t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: -T).(pr0 t2 t8)))))) (\lambda (H12: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: -T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) -t8)) (\lambda (t8: T).(pr0 t2 t8))))) (\lambda (_: (pr0 t5 t2)).(let H14 \def -(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) -u t3)) t7)) H4 (THead (Flat Cast) u0 t5) H10) in (let H15 \def (eq_ind T -(THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) -\Rightarrow (match f with [Appl \Rightarrow True | Cast \Rightarrow -False])])])) I (THead (Flat Cast) u0 t5) H14) in (False_ind (ex2 T (\lambda -(t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 t2 t7))) -H15)))) t6 (sym_eq T t6 t2 H12))) t H10 H11 H9)))]) in (H9 (refl_equal T t) -(refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_upsilon b H2 v1 v2 H3 -u1 u2 H4 t3 t4 H5) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) t)).(\lambda (H7: (eq T (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) t1)).(eq_ind T (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) t1) \to ((not (eq B b Abst)) \to ((pr0 v1 -v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t1 -t6)) (\lambda (t6: T).(pr0 t2 t6))))))))) (\lambda (H8: (eq T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t1)).(eq_ind T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (\lambda (t5: T).((not (eq B b -Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda -(t6: T).(pr0 t5 t6)) (\lambda (t6: T).(pr0 t2 t6)))))))) (\lambda (H9: (not -(eq B b Abst))).(\lambda (H10: (pr0 v1 v2)).(\lambda (H11: (pr0 u1 -u2)).(\lambda (H12: (pr0 t3 t4)).(let H13 \def (match H1 with [(pr0_refl t5) -\Rightarrow (\lambda (H13: (eq T t5 t)).(\lambda (H14: (eq T t5 t2)).(eq_ind -T t (\lambda (t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: -T).(pr0 t2 t7))))) (\lambda (H15: (eq T t t2)).(eq_ind T t2 (\lambda (_: -T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H16 \def (eq_ind_r -T t (\lambda (t6: T).(eq T t6 t2)) H15 (THead (Flat Appl) v1 (THead (Bind b) -u1 t3)) H6) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) -(\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 t6 t7)))) (let H17 -\def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H13 (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) H6) in (let H18 \def (eq_ind_r T t (\lambda (t6: -T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall -(t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: -T).(pr0 t8 t9)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H6) -in (ex2_sym T (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 t3))) (pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) -(pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t3 t4 H12 v1 v2 v2 H10 -(pr0_refl v2))))) t2 H16)) t (sym_eq T t t2 H15))) t5 (sym_eq T t5 t H13) -H14))) | (pr0_comp u0 u3 H13 t5 t6 H14 k) \Rightarrow (\lambda (H15: (eq T -(THead k u0 t5) t)).(\lambda (H16: (eq T (THead k u3 t6) t2)).(eq_ind T -(THead k u0 t5) (\lambda (_: T).((eq T (THead k u3 t6) t2) \to ((pr0 u0 u3) -\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) -(\lambda (H17: (eq T (THead k u3 t6) t2)).(eq_ind T (THead k u3 t6) (\lambda -(t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: -T).(pr0 t7 t8)))))) (\lambda (H18: (pr0 u0 u3)).(\lambda (H19: (pr0 t5 -t6)).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) t7)) H6 (THead k u0 t5) H15) in (let H21 \def -(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow (Flat Appl) -| (TLRef _) \Rightarrow (Flat Appl) | (THead k0 _ _) \Rightarrow k0])) (THead -(Flat Appl) v1 (THead (Bind b) u1 t3)) (THead k u0 t5) H20) in ((let H22 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef -_) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (THead k u0 t5) H20) in ((let H23 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead (Bind b) u1 t3) | -(TLRef _) \Rightarrow (THead (Bind b) u1 t3) | (THead _ _ t7) \Rightarrow -t7])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead k u0 t5) H20) in -(\lambda (H24: (eq T v1 u0)).(\lambda (H25: (eq K (Flat Appl) k)).(eq_ind K -(Flat Appl) (\lambda (k0: K).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead -k0 u3 t6) t7)))) (let H26 \def (eq_ind_r K k (\lambda (k0: K).(eq T (THead k0 -u0 t5) t)) H15 (Flat Appl) H25) in (let H27 \def (eq_ind_r T t5 (\lambda (t7: -T).(pr0 t7 t6)) H19 (THead (Bind b) u1 t3) H23) in (let H28 \def (match H27 -with [(pr0_refl t7) \Rightarrow (\lambda (H28: (eq T t7 (THead (Bind b) u1 -t3))).(\lambda (H29: (eq T t7 t6)).(eq_ind T (THead (Bind b) u1 t3) (\lambda -(t8: T).((eq T t8 t6) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead -(Flat Appl) u3 t6) t9))))) (\lambda (H30: (eq T (THead (Bind b) u1 t3) -t6)).(eq_ind T (THead (Bind b) u1 t3) (\lambda (t8: T).(ex2 T (\lambda (t9: -T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) -(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t8) t9)))) (let H31 \def -(eq_ind_r T t5 (\lambda (t8: T).(eq T (THead (Flat Appl) u0 t8) t)) H26 -(THead (Bind b) u1 t3) H23) in (let H32 \def (eq_ind_r T t (\lambda (t8: -T).(\forall (v: T).((tlt v t8) \to (\forall (t9: T).((pr0 v t9) \to (\forall -(t10: T).((pr0 v t10) \to (ex2 T (\lambda (t11: T).(pr0 t9 t11)) (\lambda -(t11: T).(pr0 t10 t11)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 -t3)) H31) in (let H33 \def (eq_ind T v1 (\lambda (t8: T).(pr0 t8 v2)) H10 u0 -H24) in (ex2_ind T (\lambda (t8: T).(pr0 v2 t8)) (\lambda (t8: T).(pr0 u3 -t8)) (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 (THead (Flat Appl) u3 (THead -(Bind b) u1 t3)) t8))) (\lambda (x: T).(\lambda (H34: (pr0 v2 x)).(\lambda -(H35: (pr0 u3 x)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u1 -t3))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) -(pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t3 t4 H12 u3 v2 x H35 -H34))))) (H32 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 t3)) v2 H33 -u3 H18))))) t6 H30)) t7 (sym_eq T t7 (THead (Bind b) u1 t3) H28) H29))) | -(pr0_comp u4 u5 H28 t7 t8 H29 k0) \Rightarrow (\lambda (H30: (eq T (THead k0 -u4 t7) (THead (Bind b) u1 t3))).(\lambda (H31: (eq T (THead k0 u5 t8) -t6)).((let H32 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) \Rightarrow t9])) -(THead k0 u4 t7) (THead (Bind b) u1 t3) H30) in ((let H33 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow u4 | (TLRef _) -\Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) (THead k0 u4 t7) (THead -(Bind b) u1 t3) H30) in ((let H34 \def (f_equal T K (\lambda (e: T).(match e -with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) -\Rightarrow k1])) (THead k0 u4 t7) (THead (Bind b) u1 t3) H30) in (eq_ind K -(Bind b) (\lambda (k1: K).((eq T u4 u1) \to ((eq T t7 t3) \to ((eq T (THead -k1 u5 t8) t6) \to ((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: -T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) -(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t6) t9))))))))) (\lambda (H35: -(eq T u4 u1)).(eq_ind T u1 (\lambda (t9: T).((eq T t7 t3) \to ((eq T (THead -(Bind b) u5 t8) t6) \to ((pr0 t9 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda -(t10: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) t10)))))))) (\lambda -(H36: (eq T t7 t3)).(eq_ind T t3 (\lambda (t9: T).((eq T (THead (Bind b) u5 -t8) t6) \to ((pr0 u1 u5) \to ((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda -(t10: T).(pr0 (THead (Flat Appl) u3 t6) t10))))))) (\lambda (H37: (eq T -(THead (Bind b) u5 t8) t6)).(eq_ind T (THead (Bind b) u5 t8) (\lambda (t9: -T).((pr0 u1 u5) \to ((pr0 t3 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: -T).(pr0 (THead (Flat Appl) u3 t9) t10)))))) (\lambda (H38: (pr0 u1 -u5)).(\lambda (H39: (pr0 t3 t8)).(let H40 \def (eq_ind_r T t5 (\lambda (t9: -T).(eq T (THead (Flat Appl) u0 t9) t)) H26 (THead (Bind b) u1 t3) H23) in -(let H41 \def (eq_ind_r T t (\lambda (t9: T).(\forall (v: T).((tlt v t9) \to -(\forall (t10: T).((pr0 v t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T -(\lambda (t12: T).(pr0 t10 t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H -(THead (Flat Appl) u0 (THead (Bind b) u1 t3)) H40) in (let H42 \def (eq_ind T -v1 (\lambda (t9: T).(pr0 t9 v2)) H10 u0 H24) in (ex2_ind T (\lambda (t9: -T).(pr0 v2 t9)) (\lambda (t9: T).(pr0 u3 t9)) (ex2 T (\lambda (t9: T).(pr0 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda -(t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t8)) t9))) (\lambda (x: -T).(\lambda (H43: (pr0 v2 x)).(\lambda (H44: (pr0 u3 x)).(ex2_ind T (\lambda -(t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t4 t9)) (ex2 T (\lambda (t9: -T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) -(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t8)) t9))) -(\lambda (x0: T).(\lambda (H45: (pr0 t8 x0)).(\lambda (H46: (pr0 t4 -x0)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: T).(pr0 u2 t9)) -(ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind -b) u5 t8)) t9))) (\lambda (x1: T).(\lambda (H47: (pr0 u5 x1)).(\lambda (H48: -(pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t8))) -(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) -(pr0_confluence__pr0_cong_upsilon_cong b H9 u3 v2 x H44 H43 t8 t4 x0 H45 H46 -u5 u2 x1 H47 H48))))) (H41 u1 (tlt_trans (THead (Bind b) u1 t3) u1 (THead -(Flat Appl) u0 (THead (Bind b) u1 t3)) (tlt_head_sx (Bind b) u1 t3) -(tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 t3))) u5 H38 u2 H11))))) (H41 -t3 (tlt_trans (THead (Bind b) u1 t3) t3 (THead (Flat Appl) u0 (THead (Bind b) -u1 t3)) (tlt_head_dx (Bind b) u1 t3) (tlt_head_dx (Flat Appl) u0 (THead (Bind -b) u1 t3))) t8 H39 t4 H12))))) (H41 u0 (tlt_head_sx (Flat Appl) u0 (THead -(Bind b) u1 t3)) v2 H42 u3 H18))))))) t6 H37)) t7 (sym_eq T t7 t3 H36))) u4 -(sym_eq T u4 u1 H35))) k0 (sym_eq K k0 (Bind b) H34))) H33)) H32)) H31 H28 -H29))) | (pr0_beta u v0 v3 H28 t7 t8 H29) \Rightarrow (\lambda (H30: (eq T -(THead (Flat Appl) v0 (THead (Bind Abst) u t7)) (THead (Bind b) u1 -t3))).(\lambda (H31: (eq T (THead (Bind Abbr) v3 t8) t6)).((let H32 \def -(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t7)) (\lambda (e: -T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead k0 _ _) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind b) u1 t3) H30) in (False_ind ((eq T -(THead (Bind Abbr) v3 t8) t6) \to ((pr0 v0 v3) \to ((pr0 t7 t8) \to (ex2 T -(\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t6) t9)))))) H32)) H31 -H28 H29))) | (pr0_upsilon b0 H28 v0 v3 H29 u4 u5 H30 t7 t8 H31) \Rightarrow -(\lambda (H32: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t7)) (THead -(Bind b) u1 t3))).(\lambda (H33: (eq T (THead (Bind b0) u5 (THead (Flat Appl) -(lift (S O) O v3) t8)) t6)).((let H34 \def (eq_ind T (THead (Flat Appl) v0 -(THead (Bind b0) u4 t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 -with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead -(Bind b) u1 t3) H32) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat -Appl) (lift (S O) O v3) t8)) t6) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) -\to ((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: -T).(pr0 (THead (Flat Appl) u3 t6) t9)))))))) H34)) H33 H28 H29 H30 H31))) | -(pr0_delta u4 u5 H28 t7 t8 H29 w H30) \Rightarrow (\lambda (H31: (eq T (THead -(Bind Abbr) u4 t7) (THead (Bind b) u1 t3))).(\lambda (H32: (eq T (THead (Bind -Abbr) u5 w) t6)).((let H33 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) -\Rightarrow t9])) (THead (Bind Abbr) u4 t7) (THead (Bind b) u1 t3) H31) in -((let H34 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) -(THead (Bind Abbr) u4 t7) (THead (Bind b) u1 t3) H31) in ((let H35 \def -(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow Abbr | -(TLRef _) \Rightarrow Abbr | (THead k0 _ _) \Rightarrow (match k0 with [(Bind -b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t7) -(THead (Bind b) u1 t3) H31) in (eq_ind B Abbr (\lambda (b0: B).((eq T u4 u1) -\to ((eq T t7 t3) \to ((eq T (THead (Bind Abbr) u5 w) t6) \to ((pr0 u4 u5) -\to ((pr0 t7 t8) \to ((subst0 O u5 t8 w) \to (ex2 T (\lambda (t9: T).(pr0 -(THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda -(t9: T).(pr0 (THead (Flat Appl) u3 t6) t9)))))))))) (\lambda (H36: (eq T u4 -u1)).(eq_ind T u1 (\lambda (t9: T).((eq T t7 t3) \to ((eq T (THead (Bind -Abbr) u5 w) t6) \to ((pr0 t9 u5) \to ((pr0 t7 t8) \to ((subst0 O u5 t8 w) \to -(ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift -(S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) -t10))))))))) (\lambda (H37: (eq T t7 t3)).(eq_ind T t3 (\lambda (t9: T).((eq -T (THead (Bind Abbr) u5 w) t6) \to ((pr0 u1 u5) \to ((pr0 t9 t8) \to ((subst0 -O u5 t8 w) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 (THead (Flat -Appl) u3 t6) t10)))))))) (\lambda (H38: (eq T (THead (Bind Abbr) u5 w) -t6)).(eq_ind T (THead (Bind Abbr) u5 w) (\lambda (t9: T).((pr0 u1 u5) \to -((pr0 t3 t8) \to ((subst0 O u5 t8 w) \to (ex2 T (\lambda (t10: T).(pr0 (THead -(Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: -T).(pr0 (THead (Flat Appl) u3 t9) t10))))))) (\lambda (H39: (pr0 u1 -u5)).(\lambda (H40: (pr0 t3 t8)).(\lambda (H41: (subst0 O u5 t8 w)).(let H42 -\def (eq_ind_r B b (\lambda (b0: B).(eq T (THead (Bind b0) u1 t3) t5)) H23 -Abbr H35) in (let H43 \def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 -Abst))) H9 Abbr H35) in (let H44 \def (eq_ind_r B b (\lambda (b0: B).(eq T -(THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t1)) H8 Abbr -H35) in (let H45 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T (THead (Flat -Appl) u0 t9) t)) H26 (THead (Bind Abbr) u1 t3) H42) in (let H46 \def -(eq_ind_r T t (\lambda (t9: T).(\forall (v: T).((tlt v t9) \to (\forall (t10: -T).((pr0 v t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T (\lambda (t12: -T).(pr0 t10 t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H (THead (Flat -Appl) u0 (THead (Bind Abbr) u1 t3)) H45) in (let H47 \def (eq_ind T v1 -(\lambda (t9: T).(pr0 t9 v2)) H10 u0 H24) in (ex2_ind T (\lambda (t9: T).(pr0 -v2 t9)) (\lambda (t9: T).(pr0 u3 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead -(Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: -T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t9))) (\lambda (x: -T).(\lambda (H48: (pr0 v2 x)).(\lambda (H49: (pr0 u3 x)).(ex2_ind T (\lambda -(t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t4 t9)) (ex2 T (\lambda (t9: -T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) -(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t9))) -(\lambda (x0: T).(\lambda (H50: (pr0 t8 x0)).(\lambda (H51: (pr0 t4 -x0)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: T).(pr0 u2 t9)) -(ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift -(S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead -(Bind Abbr) u5 w)) t9))) (\lambda (x1: T).(\lambda (H52: (pr0 u5 -x1)).(\lambda (H53: (pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead -(Bind Abbr) u5 w))) (pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) -O v2) t4))) (pr0_confluence__pr0_cong_upsilon_delta H43 u5 t8 w H41 u3 v2 x -H49 H48 t4 x0 H50 H51 u2 x1 H52 H53))))) (H46 u1 (tlt_trans (THead (Bind -Abbr) u1 t3) u1 (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t3)) (tlt_head_sx -(Bind Abbr) u1 t3) (tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t3))) u5 -H39 u2 H11))))) (H46 t3 (tlt_trans (THead (Bind Abbr) u1 t3) t3 (THead (Flat -Appl) u0 (THead (Bind Abbr) u1 t3)) (tlt_head_dx (Bind Abbr) u1 t3) -(tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t3))) t8 H40 t4 H12))))) -(H46 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind Abbr) u1 t3)) v2 H47 u3 -H18))))))))))) t6 H38)) t7 (sym_eq T t7 t3 H37))) u4 (sym_eq T u4 u1 H36))) b -H35)) H34)) H33)) H32 H28 H29 H30))) | (pr0_zeta b0 H28 t7 t8 H29 u) -\Rightarrow (\lambda (H30: (eq T (THead (Bind b0) u (lift (S O) O t7)) (THead -(Bind b) u1 t3))).(\lambda (H31: (eq T t8 t6)).((let H32 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x: -nat).(plus x (S O))) O t7) | (TLRef _) \Rightarrow (lref_map (\lambda (x: -nat).(plus x (S O))) O t7) | (THead _ _ t9) \Rightarrow t9])) (THead (Bind -b0) u (lift (S O) O t7)) (THead (Bind b) u1 t3) H30) in ((let H33 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef -_) \Rightarrow u | (THead _ t9 _) \Rightarrow t9])) (THead (Bind b0) u (lift -(S O) O t7)) (THead (Bind b) u1 t3) H30) in ((let H34 \def (f_equal T B -(\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) -\Rightarrow b0 | (THead k0 _ _) \Rightarrow (match k0 with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S O) -O t7)) (THead (Bind b) u1 t3) H30) in (eq_ind B b (\lambda (b1: B).((eq T u -u1) \to ((eq T (lift (S O) O t7) t3) \to ((eq T t8 t6) \to ((not (eq B b1 -Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead -(Flat Appl) u3 t6) t9))))))))) (\lambda (H35: (eq T u u1)).(eq_ind T u1 -(\lambda (_: T).((eq T (lift (S O) O t7) t3) \to ((eq T t8 t6) \to ((not (eq -B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 -(THead (Flat Appl) u3 t6) t10)))))))) (\lambda (H36: (eq T (lift (S O) O t7) -t3)).(eq_ind T (lift (S O) O t7) (\lambda (_: T).((eq T t8 t6) \to ((not (eq -B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 -(THead (Flat Appl) u3 t6) t10))))))) (\lambda (H37: (eq T t8 t6)).(eq_ind T -t6 (\lambda (t9: T).((not (eq B b Abst)) \to ((pr0 t7 t9) \to (ex2 T (\lambda -(t10: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) t10)))))) (\lambda -(H38: (not (eq B b Abst))).(\lambda (H39: (pr0 t7 t6)).(let H40 \def -(eq_ind_r T t3 (\lambda (t9: T).(eq T (THead (Bind b) u1 t9) t5)) H23 (lift -(S O) O t7) H36) in (let H41 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T -(THead (Flat Appl) u0 t9) t)) H26 (THead (Bind b) u1 (lift (S O) O t7)) H40) -in (let H42 \def (eq_ind_r T t (\lambda (t9: T).(\forall (v: T).((tlt v t9) -\to (\forall (t10: T).((pr0 v t10) \to (\forall (t11: T).((pr0 v t11) \to -(ex2 T (\lambda (t12: T).(pr0 t10 t12)) (\lambda (t12: T).(pr0 t11 -t12)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t7))) -H41) in (let H43 \def (eq_ind_r T t3 (\lambda (t9: T).(pr0 t9 t4)) H12 (lift -(S O) O t7) H36) in (ex2_ind T (\lambda (t9: T).(eq T t4 (lift (S O) O t9))) -(\lambda (t9: T).(pr0 t7 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead -(Flat Appl) u3 t6) t9))) (\lambda (x: T).(\lambda (H44: (eq T t4 (lift (S O) -O x))).(\lambda (H45: (pr0 t7 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t9: -T).(ex2 T (\lambda (t10: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t9)) t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) -t10)))) (let H46 \def (eq_ind T v1 (\lambda (t9: T).(pr0 t9 v2)) H10 u0 H24) -in (ex2_ind T (\lambda (t9: T).(pr0 v2 t9)) (\lambda (t9: T).(pr0 u3 t9)) -(ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) (lift (S O) O x))) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 -t6) t9))) (\lambda (x0: T).(\lambda (H47: (pr0 v2 x0)).(\lambda (H48: (pr0 u3 -x0)).(ex2_ind T (\lambda (t9: T).(pr0 x t9)) (\lambda (t9: T).(pr0 t6 t9)) -(ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) (lift (S O) O x))) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 -t6) t9))) (\lambda (x1: T).(\lambda (H49: (pr0 x x1)).(\lambda (H50: (pr0 t6 -x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 t6)) (pr0 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x)))) -(pr0_confluence__pr0_cong_upsilon_zeta b H38 u1 u2 H11 u3 v2 x0 H48 H47 x t6 -x1 H49 H50))))) (H42 t7 (tlt_trans (THead (Bind b) u1 (lift (S O) O t7)) t7 -(THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t7))) (lift_tlt_dx -(Bind b) u1 t7 (S O) O) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 (lift -(S O) O t7)))) x H45 t6 H39))))) (H42 u0 (tlt_head_sx (Flat Appl) u0 (THead -(Bind b) u1 (lift (S O) O t7))) v2 H46 u3 H18))) t4 H44)))) (pr0_gen_lift t7 -t4 (S O) O H43)))))))) t8 (sym_eq T t8 t6 H37))) t3 H36)) u (sym_eq T u u1 -H35))) b0 (sym_eq B b0 b H34))) H33)) H32)) H31 H28 H29))) | (pr0_tau t7 t8 -H28 u) \Rightarrow (\lambda (H29: (eq T (THead (Flat Cast) u t7) (THead (Bind -b) u1 t3))).(\lambda (H30: (eq T t8 t6)).((let H31 \def (eq_ind T (THead -(Flat Cast) u t7) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False -| (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -b) u1 t3) H29) in (False_ind ((eq T t8 t6) \to ((pr0 t7 t8) \to (ex2 T -(\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t6) t9))))) H31)) H30 -H28)))]) in (H28 (refl_equal T (THead (Bind b) u1 t3)) (refl_equal T t6))))) -k H25)))) H22)) H21))))) t2 H17)) t H15 H16 H13 H14))) | (pr0_beta u v0 v3 -H13 t5 t6 H14) \Rightarrow (\lambda (H15: (eq T (THead (Flat Appl) v0 (THead -(Bind Abst) u t5)) t)).(\lambda (H16: (eq T (THead (Bind Abbr) v3 t6) -t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) (\lambda (_: -T).((eq T (THead (Bind Abbr) v3 t6) t2) \to ((pr0 v0 v3) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H17: (eq T -(THead (Bind Abbr) v3 t6) t2)).(eq_ind T (THead (Bind Abbr) v3 t6) (\lambda -(t7: T).((pr0 v0 v3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: -T).(pr0 t7 t8)))))) (\lambda (_: (pr0 v0 v3)).(\lambda (_: (pr0 t5 t6)).(let -H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead -(Bind b) u1 t3)) t7)) H6 (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) H15) -in (let H21 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) -(THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead -(Bind Abst) u t5)) H20) in ((let H22 \def (f_equal T B (\lambda (e: T).(match -e with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t7) -\Rightarrow (match t7 with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b -| (THead k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat -_) \Rightarrow b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead -(Flat Appl) v0 (THead (Bind Abst) u t5)) H20) in ((let H23 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) -\Rightarrow u1 | (THead _ _ t7) \Rightarrow (match t7 with [(TSort _) -\Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t8 _) \Rightarrow -t8])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) v0 -(THead (Bind Abst) u t5)) H20) in ((let H24 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | -(THead _ _ t7) \Rightarrow (match t7 with [(TSort _) \Rightarrow t3 | (TLRef -_) \Rightarrow t3 | (THead _ _ t8) \Rightarrow t8])])) (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) H20) -in (\lambda (_: (eq T u1 u)).(\lambda (H26: (eq B b Abst)).(\lambda (H27: (eq -T v1 v0)).(let H28 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt -v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to -(ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 -t10)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) H15) in (let -H29 \def (eq_ind T v1 (\lambda (t7: T).(pr0 t7 v2)) H10 v0 H27) in (eq_ind_r -B Abst (\lambda (b0: B).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b0) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead -(Bind Abbr) v3 t6) t7)))) (let H30 \def (eq_ind B b (\lambda (b0: B).(not (eq -B b0 Abst))) H9 Abst H26) in (let H31 \def (match (H30 (refl_equal B Abst)) -in False with []) in H31)) b H26))))))) H23)) H22)) H21))))) t2 H17)) t H15 -H16 H13 H14))) | (pr0_upsilon b0 H13 v0 v3 H14 u0 u3 H15 t5 t6 H16) -\Rightarrow (\lambda (H17: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u0 -t5)) t)).(\lambda (H18: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S -O) O v3) t6)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) -(\lambda (_: T).((eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O -v3) t6)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to -((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8))))))))) -(\lambda (H19: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) -t6)) t2)).(eq_ind T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) -t6)) (\lambda (t7: T).((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) -\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t7 t8)))))))) -(\lambda (_: (not (eq B b0 Abst))).(\lambda (H21: (pr0 v0 v3)).(\lambda (H22: -(pr0 u0 u3)).(\lambda (H23: (pr0 t5 t6)).(let H24 \def (eq_ind_r T t (\lambda -(t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) t7)) H6 (THead -(Flat Appl) v0 (THead (Bind b0) u0 t5)) H17) in (let H25 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef _) -\Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) H24) -in ((let H26 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) -\Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t7) \Rightarrow (match -t7 with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) -\Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow -b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) v0 -(THead (Bind b0) u0 t5)) H24) in ((let H27 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | -(THead _ _ t7) \Rightarrow (match t7 with [(TSort _) \Rightarrow u1 | (TLRef -_) \Rightarrow u1 | (THead _ t8 _) \Rightarrow t8])])) (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) H24) -in ((let H28 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow (match -t7 with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t8) -\Rightarrow t8])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead -(Flat Appl) v0 (THead (Bind b0) u0 t5)) H24) in (\lambda (H29: (eq T u1 -u0)).(\lambda (H30: (eq B b b0)).(\lambda (H31: (eq T v1 v0)).(let H32 \def -(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: -T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: -T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) -v0 (THead (Bind b0) u0 t5)) H17) in (let H33 \def (eq_ind T v1 (\lambda (t7: -T).(pr0 t7 v2)) H10 v0 H31) in (eq_ind_r B b0 (\lambda (b1: B).(ex2 T -(\lambda (t7: T).(pr0 (THead (Bind b1) u2 (THead (Flat Appl) (lift (S O) O -v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) -(lift (S O) O v3) t6)) t7)))) (let H34 \def (eq_ind B b (\lambda (b1: B).(not -(eq B b1 Abst))) H9 b0 H30) in (let H35 \def (eq_ind T u1 (\lambda (t7: -T).(pr0 t7 u2)) H11 u0 H29) in (let H36 \def (eq_ind T t3 (\lambda (t7: -T).(pr0 t7 t4)) H12 t5 H28) in (ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) -(\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b0) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 -(THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t6)) t7))) (\lambda -(x: T).(\lambda (H37: (pr0 t4 x)).(\lambda (H38: (pr0 t6 x)).(ex2_ind T -(\lambda (t7: T).(pr0 u2 t7)) (\lambda (t7: T).(pr0 u3 t7)) (ex2 T (\lambda -(t7: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) -O v3) t6)) t7))) (\lambda (x0: T).(\lambda (H39: (pr0 u2 x0)).(\lambda (H40: -(pr0 u3 x0)).(ex2_ind T (\lambda (t7: T).(pr0 v2 t7)) (\lambda (t7: T).(pr0 -v3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u3 (THead -(Flat Appl) (lift (S O) O v3) t6)) t7))) (\lambda (x1: T).(\lambda (H41: (pr0 -v2 x1)).(\lambda (H42: (pr0 v3 x1)).(pr0_confluence__pr0_upsilon_upsilon b0 -H34 v2 v3 x1 H41 H42 u2 u3 x0 H39 H40 t4 t6 x H37 H38)))) (H32 v0 -(tlt_head_sx (Flat Appl) v0 (THead (Bind b0) u0 t5)) v2 H33 v3 H21))))) (H32 -u0 (tlt_trans (THead (Bind b0) u0 t5) u0 (THead (Flat Appl) v0 (THead (Bind -b0) u0 t5)) (tlt_head_sx (Bind b0) u0 t5) (tlt_head_dx (Flat Appl) v0 (THead -(Bind b0) u0 t5))) u2 H35 u3 H22))))) (H32 t5 (tlt_trans (THead (Bind b0) u0 -t5) t5 (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) (tlt_head_dx (Bind b0) -u0 t5) (tlt_head_dx (Flat Appl) v0 (THead (Bind b0) u0 t5))) t4 H36 t6 -H23))))) b H30))))))) H27)) H26)) H25))))))) t2 H19)) t H17 H18 H13 H14 H15 -H16))) | (pr0_delta u0 u3 H13 t5 t6 H14 w H15) \Rightarrow (\lambda (H16: (eq -T (THead (Bind Abbr) u0 t5) t)).(\lambda (H17: (eq T (THead (Bind Abbr) u3 w) -t2)).(eq_ind T (THead (Bind Abbr) u0 t5) (\lambda (_: T).((eq T (THead (Bind -Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w) \to -(ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) (\lambda (H18: (eq T -(THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u3 w) (\lambda -(t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w) \to (ex2 T -(\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4)) t8)) (\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (_: (pr0 u0 -u3)).(\lambda (_: (pr0 t5 t6)).(\lambda (_: (subst0 O u3 t6 w)).(let H22 \def -(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 -t3)) t7)) H6 (THead (Bind Abbr) u0 t5) H16) in (let H23 \def (eq_ind T (THead -(Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abbr) u0 t5) H22) in (False_ind (ex2 T (\lambda (t7: -T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) -(\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w) t7))) H23)))))) t2 H18)) t H16 -H17 H13 H14 H15))) | (pr0_zeta b0 H13 t5 t6 H14 u) \Rightarrow (\lambda (H15: -(eq T (THead (Bind b0) u (lift (S O) O t5)) t)).(\lambda (H16: (eq T t6 -t2)).(eq_ind T (THead (Bind b0) u (lift (S O) O t5)) (\lambda (_: T).((eq T -t6 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) -(\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H17: (eq T t6 t2)).(eq_ind T t2 -(\lambda (t7: T).((not (eq B b0 Abst)) \to ((pr0 t5 t7) \to (ex2 T (\lambda -(t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (_: (not (eq B b0 -Abst))).(\lambda (_: (pr0 t5 t2)).(let H20 \def (eq_ind_r T t (\lambda (t7: -T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) t7)) H6 (THead (Bind -b0) u (lift (S O) O t5)) H15) in (let H21 \def (eq_ind T (THead (Flat Appl) -v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind b0) u (lift (S O) O t5)) H20) in (False_ind (ex2 T (\lambda (t7: -T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) -(\lambda (t7: T).(pr0 t2 t7))) H21))))) t6 (sym_eq T t6 t2 H17))) t H15 H16 -H13 H14))) | (pr0_tau t5 t6 H13 u) \Rightarrow (\lambda (H14: (eq T (THead -(Flat Cast) u t5) t)).(\lambda (H15: (eq T t6 t2)).(eq_ind T (THead (Flat -Cast) u t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T -(\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4)) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H16: (eq T t6 -t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: -T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) -(\lambda (t8: T).(pr0 t2 t8))))) (\lambda (_: (pr0 t5 t2)).(let H18 \def -(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 -t3)) t7)) H6 (THead (Flat Cast) u t5) H14) in (let H19 \def (eq_ind T (THead -(Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow -(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead -(Flat Cast) u t5) H18) in (False_ind (ex2 T (\lambda (t7: T).(pr0 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: -T).(pr0 t2 t7))) H19)))) t6 (sym_eq T t6 t2 H16))) t H14 H15 H13)))]) in (H13 -(refl_equal T t) (refl_equal T t2))))))) t1 H8)) t H6 H7 H2 H3 H4 H5))) | -(pr0_delta u1 u2 H2 t3 t4 H3 w H4) \Rightarrow (\lambda (H5: (eq T (THead -(Bind Abbr) u1 t3) t)).(\lambda (H6: (eq T (THead (Bind Abbr) u2 w) -t1)).(eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (_: T).((eq T (THead (Bind -Abbr) u2 w) t1) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 t4 w) \to -(ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6)))))))) -(\lambda (H7: (eq T (THead (Bind Abbr) u2 w) t1)).(eq_ind T (THead (Bind -Abbr) u2 w) (\lambda (t5: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 -t4 w) \to (ex2 T (\lambda (t6: T).(pr0 t5 t6)) (\lambda (t6: T).(pr0 t2 -t6))))))) (\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (pr0 t3 t4)).(\lambda -(H10: (subst0 O u2 t4 w)).(let H11 \def (match H1 with [(pr0_refl t5) -\Rightarrow (\lambda (H11: (eq T t5 t)).(\lambda (H12: (eq T t5 t2)).(eq_ind -T t (\lambda (t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead -(Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H13: (eq T -t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind -Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H14 \def (eq_ind_r T t -(\lambda (t6: T).(eq T t6 t2)) H13 (THead (Bind Abbr) u1 t3) H5) in (eq_ind T -(THead (Bind Abbr) u1 t3) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 -(THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t6 t7)))) (let H15 \def -(eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H11 (THead (Bind Abbr) u1 t3) -H5) in (let H16 \def (eq_ind_r T t (\lambda (t6: T).(\forall (v: T).((tlt v -t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall (t8: T).((pr0 v t8) \to -(ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 t9)))))))))) H -(THead (Bind Abbr) u1 t3) H5) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead -(Bind Abbr) u2 w) t6)) (\lambda (t6: T).(pr0 (THead (Bind Abbr) u1 t3) t6)) -(THead (Bind Abbr) u2 w) (pr0_refl (THead (Bind Abbr) u2 w)) (pr0_delta u1 u2 -H8 t3 t4 H9 w H10)))) t2 H14)) t (sym_eq T t t2 H13))) t5 (sym_eq T t5 t H11) -H12))) | (pr0_comp u0 u3 H11 t5 t6 H12 k) \Rightarrow (\lambda (H13: (eq T -(THead k u0 t5) t)).(\lambda (H14: (eq T (THead k u3 t6) t2)).(eq_ind T -(THead k u0 t5) (\lambda (_: T).((eq T (THead k u3 t6) t2) \to ((pr0 u0 u3) -\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) -t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H15: (eq T (THead k u3 t6) -t2)).(eq_ind T (THead k u3 t6) (\lambda (t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) -\to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: -T).(pr0 t7 t8)))))) (\lambda (H16: (pr0 u0 u3)).(\lambda (H17: (pr0 t5 -t6)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind Abbr) u1 -t3) t7)) H5 (THead k u0 t5) H13) in (let H19 \def (f_equal T K (\lambda (e: -T).(match e with [(TSort _) \Rightarrow (Bind Abbr) | (TLRef _) \Rightarrow -(Bind Abbr) | (THead k0 _ _) \Rightarrow k0])) (THead (Bind Abbr) u1 t3) -(THead k u0 t5) H18) in ((let H20 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) -\Rightarrow t7])) (THead (Bind Abbr) u1 t3) (THead k u0 t5) H18) in ((let H21 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | -(TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind -Abbr) u1 t3) (THead k u0 t5) H18) in (\lambda (H22: (eq T u1 u0)).(\lambda -(H23: (eq K (Bind Abbr) k)).(eq_ind K (Bind Abbr) (\lambda (k0: K).(ex2 T -(\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 -(THead k0 u3 t6) t7)))) (let H24 \def (eq_ind_r K k (\lambda (k0: K).(eq T -(THead k0 u0 t5) t)) H13 (Bind Abbr) H23) in (let H25 \def (eq_ind_r T t -(\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) -\to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) -(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind Abbr) u0 t5) H24) in -(let H26 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H8 u0 H22) in (let -H27 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H9 t5 H21) in (ex2_ind T -(\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda -(t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 (THead (Bind -Abbr) u3 t6) t7))) (\lambda (x: T).(\lambda (H28: (pr0 t4 x)).(\lambda (H29: -(pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) (\lambda (t7: T).(pr0 u3 -t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: -T).(pr0 (THead (Bind Abbr) u3 t6) t7))) (\lambda (x0: T).(\lambda (H30: (pr0 -u2 x0)).(\lambda (H31: (pr0 u3 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u3 -t6)) (pr0 (THead (Bind Abbr) u2 w)) (pr0_confluence__pr0_cong_delta u2 t4 w -H10 u3 x0 H31 H30 t6 x H29 H28))))) (H25 u0 (tlt_head_sx (Bind Abbr) u0 t5) -u2 H26 u3 H16))))) (H25 t5 (tlt_head_dx (Bind Abbr) u0 t5) t4 H27 t6 -H17)))))) k H23)))) H20)) H19))))) t2 H15)) t H13 H14 H11 H12))) | (pr0_beta -u v1 v2 H11 t5 t6 H12) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v1 -(THead (Bind Abst) u t5)) t)).(\lambda (H14: (eq T (THead (Bind Abbr) v2 t6) -t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) (\lambda (_: -T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: -T).(pr0 t2 t8))))))) (\lambda (H15: (eq T (THead (Bind Abbr) v2 t6) -t2)).(eq_ind T (THead (Bind Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to -((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) -(\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 -t5 t6)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind Abbr) -u1 t3) t7)) H5 (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) H13) in (let -H19 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow -False])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) H18) in -(False_ind (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) -(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t6) t7))) H19))))) t2 H15)) t H13 -H14 H11 H12))) | (pr0_upsilon b H11 v1 v2 H12 u0 u3 H13 t5 t6 H14) -\Rightarrow (\lambda (H15: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 -t5)) t)).(\lambda (H16: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S -O) O v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t5)) -(\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O -v2) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to -((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) -(\lambda (t8: T).(pr0 t2 t8))))))))) (\lambda (H17: (eq T (THead (Bind b) u3 -(THead (Flat Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b) u3 -(THead (Flat Appl) (lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b -Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda -(t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t7 -t8)))))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 v1 -v2)).(\lambda (_: (pr0 u0 u3)).(\lambda (_: (pr0 t5 t6)).(let H22 \def -(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind Abbr) u1 t3) t7)) H5 (THead -(Flat Appl) v1 (THead (Bind b) u0 t5)) H15) in (let H23 \def (eq_ind T (THead -(Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with -[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat -Appl) v1 (THead (Bind b) u0 t5)) H22) in (False_ind (ex2 T (\lambda (t7: -T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 (THead (Bind b) -u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t7))) H23))))))) t2 H17)) t H15 -H16 H11 H12 H13 H14))) | (pr0_delta u0 u3 H11 t5 t6 H12 w0 H13) \Rightarrow -(\lambda (H14: (eq T (THead (Bind Abbr) u0 t5) t)).(\lambda (H15: (eq T -(THead (Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u0 t5) (\lambda -(_: T).((eq T (THead (Bind Abbr) u3 w0) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) -\to ((subst0 O u3 t6 w0) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) -u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) (\lambda (H16: (eq T (THead -(Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u3 w0) (\lambda (t7: -T).((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w0) \to (ex2 T (\lambda -(t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t7 t8))))))) -(\lambda (H17: (pr0 u0 u3)).(\lambda (H18: (pr0 t5 t6)).(\lambda (H19: -(subst0 O u3 t6 w0)).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T -(THead (Bind Abbr) u1 t3) t7)) H5 (THead (Bind Abbr) u0 t5) H14) in (let H21 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | -(TLRef _) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead (Bind -Abbr) u1 t3) (THead (Bind Abbr) u0 t5) H20) in ((let H22 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) -\Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind Abbr) u1 t3) -(THead (Bind Abbr) u0 t5) H20) in (\lambda (H23: (eq T u1 u0)).(let H24 \def -(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: -T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: -T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind Abbr) -u0 t5) H14) in (let H25 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H8 u0 -H23) in (let H26 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H9 t5 H22) -in (ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) -(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: -T).(pr0 (THead (Bind Abbr) u3 w0) t7))) (\lambda (x: T).(\lambda (H27: (pr0 -t4 x)).(\lambda (H28: (pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) -(\lambda (t7: T).(pr0 u3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) -u2 w) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w0) t7))) (\lambda -(x0: T).(\lambda (H29: (pr0 u2 x0)).(\lambda (H30: (pr0 u3 -x0)).(pr0_confluence__pr0_delta_delta u2 t4 w H10 u3 t6 w0 H19 x0 H29 H30 x -H27 H28)))) (H24 u0 (tlt_head_sx (Bind Abbr) u0 t5) u2 H25 u3 H17))))) (H24 -t5 (tlt_head_dx (Bind Abbr) u0 t5) t4 H26 t6 H18))))))) H21)))))) t2 H16)) t -H14 H15 H11 H12 H13))) | (pr0_zeta b H11 t5 t6 H12 u) \Rightarrow (\lambda -(H13: (eq T (THead (Bind b) u (lift (S O) O t5)) t)).(\lambda (H14: (eq T t6 -t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t5)) (\lambda (_: T).((eq T t6 -t2) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) -(\lambda (H15: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b -Abst)) \to ((pr0 t5 t7) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) -u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H16: (not (eq B b -Abst))).(\lambda (H17: (pr0 t5 t2)).(let H18 \def (eq_ind_r T t (\lambda (t7: -T).(eq T (THead (Bind Abbr) u1 t3) t7)) H5 (THead (Bind b) u (lift (S O) O -t5)) H13) in (let H19 \def (f_equal T B (\lambda (e: T).(match e with [(TSort -_) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow -(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) -(THead (Bind Abbr) u1 t3) (THead (Bind b) u (lift (S O) O t5)) H18) in ((let -H20 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 -| (TLRef _) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead (Bind -Abbr) u1 t3) (THead (Bind b) u (lift (S O) O t5)) H18) in ((let H21 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef -_) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind Abbr) u1 -t3) (THead (Bind b) u (lift (S O) O t5)) H18) in (\lambda (H22: (eq T u1 -u)).(\lambda (H23: (eq B Abbr b)).(let H24 \def (eq_ind_r B b (\lambda (b0: -B).(not (eq B b0 Abst))) H16 Abbr H23) in (let H25 \def (eq_ind_r B b -(\lambda (b0: B).(eq T (THead (Bind b0) u (lift (S O) O t5)) t)) H13 Abbr -H23) in (let H26 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v -t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to -(ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 -t10)))))))))) H (THead (Bind Abbr) u (lift (S O) O t5)) H25) in (let H27 \def -(eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H8 u H22) in (let H28 \def (eq_ind -T t3 (\lambda (t7: T).(pr0 t7 t4)) H9 (lift (S O) O t5) H21) in (ex2_ind T -(\lambda (t7: T).(eq T t4 (lift (S O) O t7))) (\lambda (t7: T).(pr0 t5 t7)) -(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: -T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H29: (eq T t4 (lift (S O) O -x))).(\lambda (H30: (pr0 t5 x)).(let H31 \def (eq_ind T t4 (\lambda (t7: -T).(subst0 O u2 t7 w)) H10 (lift (S O) O x) H29) in (ex2_ind T (\lambda (t7: -T).(pr0 x t7)) (\lambda (t7: T).(pr0 t2 t7)) (ex2 T (\lambda (t7: T).(pr0 -(THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x0: -T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 t2 -x0)).(pr0_confluence__pr0_delta_tau u2 (lift (S O) O x) w H31 x (pr0_refl -(lift (S O) O x)) t2)))) (H26 t5 (lift_tlt_dx (Bind Abbr) u t5 (S O) O) x H30 -t2 H17)))))) (pr0_gen_lift t5 t4 (S O) O H28)))))))))) H20)) H19))))) t6 -(sym_eq T t6 t2 H15))) t H13 H14 H11 H12))) | (pr0_tau t5 t6 H11 u) -\Rightarrow (\lambda (H12: (eq T (THead (Flat Cast) u t5) t)).(\lambda (H13: -(eq T t6 t2)).(eq_ind T (THead (Flat Cast) u t5) (\lambda (_: T).((eq T t6 -t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 -w) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H14: (eq T t6 -t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: -T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8))))) -(\lambda (_: (pr0 t5 t2)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T -(THead (Bind Abbr) u1 t3) t7)) H5 (THead (Flat Cast) u t5) H12) in (let H17 -\def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow -False])])) I (THead (Flat Cast) u t5) H16) in (False_ind (ex2 T (\lambda (t7: -T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7))) H17)))) -t6 (sym_eq T t6 t2 H14))) t H12 H13 H11)))]) in (H11 (refl_equal T t) -(refl_equal T t2)))))) t1 H7)) t H5 H6 H2 H3 H4))) | (pr0_zeta b H2 t3 t4 H3 -u) \Rightarrow (\lambda (H4: (eq T (THead (Bind b) u (lift (S O) O t3)) -t)).(\lambda (H5: (eq T t4 t1)).(eq_ind T (THead (Bind b) u (lift (S O) O -t3)) (\lambda (_: T).((eq T t4 t1) \to ((not (eq B b Abst)) \to ((pr0 t3 t4) -\to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6))))))) -(\lambda (H6: (eq T t4 t1)).(eq_ind T t1 (\lambda (t5: T).((not (eq B b -Abst)) \to ((pr0 t3 t5) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda -(t6: T).(pr0 t2 t6)))))) (\lambda (H7: (not (eq B b Abst))).(\lambda (H8: -(pr0 t3 t1)).(let H9 \def (match H1 with [(pr0_refl t5) \Rightarrow (\lambda -(H9: (eq T t5 t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T t (\lambda (t6: -T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: -T).(pr0 t2 t7))))) (\lambda (H11: (eq T t t2)).(eq_ind T t2 (\lambda (_: -T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let -H12 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 t2)) H11 (THead (Bind b) u -(lift (S O) O t3)) H4) in (eq_ind T (THead (Bind b) u (lift (S O) O t3)) -(\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 -t6 t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H9 -(THead (Bind b) u (lift (S O) O t3)) H4) in (let H14 \def (eq_ind_r T t -(\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) -\to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) -(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Bind b) u (lift (S O) O t3)) -H4) in (ex_intro2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 -(THead (Bind b) u (lift (S O) O t3)) t6)) t1 (pr0_refl t1) (pr0_zeta b H7 t3 -t1 H8 u)))) t2 H12)) t (sym_eq T t t2 H11))) t5 (sym_eq T t5 t H9) H10))) | -(pr0_comp u1 u2 H9 t5 t6 H10 k) \Rightarrow (\lambda (H11: (eq T (THead k u1 -t5) t)).(\lambda (H12: (eq T (THead k u2 t6) t2)).(eq_ind T (THead k u1 t5) -(\lambda (_: T).((eq T (THead k u2 t6) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) -\to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) -(\lambda (H13: (eq T (THead k u2 t6) t2)).(eq_ind T (THead k u2 t6) (\lambda -(t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 -t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (_: (pr0 u1 u2)).(\lambda -(H15: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead -(Bind b) u (lift (S O) O t3)) t7)) H4 (THead k u1 t5) H11) in (let H17 \def -(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow (Bind b) | -(TLRef _) \Rightarrow (Bind b) | (THead k0 _ _) \Rightarrow k0])) (THead -(Bind b) u (lift (S O) O t3)) (THead k u1 t5) H16) in ((let H18 \def (f_equal -T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) -\Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Bind b) u (lift (S -O) O t3)) (THead k u1 t5) H16) in ((let H19 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x: nat).(plus x -(S O))) O t3) | (TLRef _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S -O))) O t3) | (THead _ _ t7) \Rightarrow t7])) (THead (Bind b) u (lift (S O) O -t3)) (THead k u1 t5) H16) in (\lambda (_: (eq T u u1)).(\lambda (H21: (eq K -(Bind b) k)).(eq_ind K (Bind b) (\lambda (k0: K).(ex2 T (\lambda (t7: T).(pr0 -t1 t7)) (\lambda (t7: T).(pr0 (THead k0 u2 t6) t7)))) (let H22 \def (eq_ind_r -K k (\lambda (k0: K).(eq T (THead k0 u1 t5) t)) H11 (Bind b) H21) in (let H23 -\def (eq_ind_r T t5 (\lambda (t7: T).(pr0 t7 t6)) H15 (lift (S O) O t3) H19) -in (ex2_ind T (\lambda (t7: T).(eq T t6 (lift (S O) O t7))) (\lambda (t7: -T).(pr0 t3 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 -(THead (Bind b) u2 t6) t7))) (\lambda (x: T).(\lambda (H24: (eq T t6 (lift (S -O) O x))).(\lambda (H25: (pr0 t3 x)).(let H26 \def (eq_ind_r T t5 (\lambda -(t7: T).(eq T (THead (Bind b) u1 t7) t)) H22 (lift (S O) O t3) H19) in (let -H27 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to -(\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T -(\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H -(THead (Bind b) u1 (lift (S O) O t3)) H26) in (eq_ind_r T (lift (S O) O x) -(\lambda (t7: T).(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 -(THead (Bind b) u2 t7) t8)))) (ex2_ind T (\lambda (t7: T).(pr0 x t7)) -(\lambda (t7: T).(pr0 t1 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda -(t7: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t7))) (\lambda (x0: -T).(\lambda (H28: (pr0 x x0)).(\lambda (H29: (pr0 t1 x0)).(ex_intro2 T -(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind b) u2 (lift -(S O) O x)) t7)) x0 H29 (pr0_zeta b H7 x x0 H28 u2))))) (H27 t3 (lift_tlt_dx -(Bind b) u1 t3 (S O) O) x H25 t1 H8)) t6 H24)))))) (pr0_gen_lift t3 t6 (S O) -O H23)))) k H21)))) H18)) H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_beta -u0 v1 v2 H9 t5 t6 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 -(THead (Bind Abst) u0 t5)) t)).(\lambda (H12: (eq T (THead (Bind Abbr) v2 t6) -t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t5)) (\lambda (_: -T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) -(\lambda (H13: (eq T (THead (Bind Abbr) v2 t6) t2)).(eq_ind T (THead (Bind -Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to ((pr0 t5 t6) \to (ex2 T -(\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (_: -(pr0 v1 v2)).(\lambda (_: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda -(t7: T).(eq T (THead (Bind b) u (lift (S O) O t3)) t7)) H4 (THead (Flat Appl) -v1 (THead (Bind Abst) u0 t5)) H11) in (let H17 \def (eq_ind T (THead (Bind b) -u (lift (S O) O t3)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with -[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat -Appl) v1 (THead (Bind Abst) u0 t5)) H16) in (False_ind (ex2 T (\lambda (t7: -T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t6) t7))) -H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_upsilon b0 H9 v1 v2 H10 u1 u2 -H11 t5 t6 H12) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v1 (THead -(Bind b0) u1 t5)) t)).(\lambda (H14: (eq T (THead (Bind b0) u2 (THead (Flat -Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead -(Bind b0) u1 t5)) (\lambda (_: T).((eq T (THead (Bind b0) u2 (THead (Flat -Appl) (lift (S O) O v2) t6)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v1 v2) -\to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) -(\lambda (t8: T).(pr0 t2 t8))))))))) (\lambda (H15: (eq T (THead (Bind b0) u2 -(THead (Flat Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b0) u2 -(THead (Flat Appl) (lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b0 -Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda -(t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8)))))))) (\lambda (_: (not -(eq B b0 Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda -(_: (pr0 t5 t6)).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead -(Bind b) u (lift (S O) O t3)) t7)) H4 (THead (Flat Appl) v1 (THead (Bind b0) -u1 t5)) H13) in (let H21 \def (eq_ind T (THead (Bind b) u (lift (S O) O t3)) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 -(THead (Bind b0) u1 t5)) H20) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 -t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) -O v2) t6)) t7))) H21))))))) t2 H15)) t H13 H14 H9 H10 H11 H12))) | (pr0_delta -u1 u2 H9 t5 t6 H10 w H11) \Rightarrow (\lambda (H12: (eq T (THead (Bind Abbr) -u1 t5) t)).(\lambda (H13: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T -(THead (Bind Abbr) u1 t5) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) -\to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ex2 T (\lambda -(t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) (\lambda (H14: (eq T -(THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda -(t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ex2 T -(\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (_: -(pr0 u1 u2)).(\lambda (H16: (pr0 t5 t6)).(\lambda (H17: (subst0 O u2 t6 -w)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind b) u -(lift (S O) O t3)) t7)) H4 (THead (Bind Abbr) u1 t5) H12) in (let H19 \def -(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef -_) \Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O -t3)) (THead (Bind Abbr) u1 t5) H18) in ((let H20 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | -(THead _ t7 _) \Rightarrow t7])) (THead (Bind b) u (lift (S O) O t3)) (THead -(Bind Abbr) u1 t5) H18) in ((let H21 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O -t3) | (TLRef _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) -| (THead _ _ t7) \Rightarrow t7])) (THead (Bind b) u (lift (S O) O t3)) -(THead (Bind Abbr) u1 t5) H18) in (\lambda (_: (eq T u u1)).(\lambda (H23: -(eq B b Abbr)).(let H24 \def (eq_ind_r T t5 (\lambda (t7: T).(pr0 t7 t6)) H16 -(lift (S O) O t3) H21) in (ex2_ind T (\lambda (t7: T).(eq T t6 (lift (S O) O -t7))) (\lambda (t7: T).(pr0 t3 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) -(\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7))) (\lambda (x: T).(\lambda -(H25: (eq T t6 (lift (S O) O x))).(\lambda (H26: (pr0 t3 x)).(let H27 \def -(eq_ind_r T t5 (\lambda (t7: T).(eq T (THead (Bind Abbr) u1 t7) t)) H12 (lift -(S O) O t3) H21) in (let H28 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: -T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v -t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 -t10)))))))))) H (THead (Bind Abbr) u1 (lift (S O) O t3)) H27) in (let H29 -\def (eq_ind T t6 (\lambda (t7: T).(subst0 O u2 t7 w)) H17 (lift (S O) O x) -H25) in (let H30 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H7 -Abbr H23) in (ex2_ind T (\lambda (t7: T).(pr0 x t7)) (\lambda (t7: T).(pr0 t1 -t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind -Abbr) u2 w) t7))) (\lambda (x0: T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 -t1 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u2 w)) (pr0 t1) -(pr0_confluence__pr0_delta_tau u2 (lift (S O) O x) w H29 x (pr0_refl (lift (S -O) O x)) t1))))) (H28 t3 (lift_tlt_dx (Bind Abbr) u1 t3 (S O) O) x H26 t1 -H8))))))))) (pr0_gen_lift t3 t6 (S O) O H24)))))) H20)) H19)))))) t2 H14)) t -H12 H13 H9 H10 H11))) | (pr0_zeta b0 H9 t5 t6 H10 u0) \Rightarrow (\lambda -(H11: (eq T (THead (Bind b0) u0 (lift (S O) O t5)) t)).(\lambda (H12: (eq T -t6 t2)).(eq_ind T (THead (Bind b0) u0 (lift (S O) O t5)) (\lambda (_: T).((eq -T t6 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H13: (eq T t6 -t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b0 Abst)) \to ((pr0 t5 t7) \to -(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) -(\lambda (_: (not (eq B b0 Abst))).(\lambda (H15: (pr0 t5 t2)).(let H16 \def -(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind b) u (lift (S O) O t3)) -t7)) H4 (THead (Bind b0) u0 (lift (S O) O t5)) H11) in (let H17 \def (f_equal -T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef _) -\Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O -t3)) (THead (Bind b0) u0 (lift (S O) O t5)) H16) in ((let H18 \def (f_equal T -T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) -\Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Bind b) u (lift (S -O) O t3)) (THead (Bind b0) u0 (lift (S O) O t5)) H16) in ((let H19 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map -(\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) \Rightarrow (lref_map -(\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ t7) \Rightarrow t7])) -(THead (Bind b) u (lift (S O) O t3)) (THead (Bind b0) u0 (lift (S O) O t5)) -H16) in (\lambda (_: (eq T u u0)).(\lambda (H21: (eq B b b0)).(let H22 \def -(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: -T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: -T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind b0) -u0 (lift (S O) O t5)) H11) in (let H23 \def (eq_ind T t3 (\lambda (t7: -T).(pr0 t7 t1)) H8 t5 (lift_inj t3 t5 (S O) O H19)) in (let H24 \def (eq_ind -B b (\lambda (b1: B).(not (eq B b1 Abst))) H7 b0 H21) in (ex2_ind T (\lambda -(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)) (ex2 T (\lambda (t7: -T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H25: -(pr0 t1 x)).(\lambda (H26: (pr0 t2 x)).(ex_intro2 T (\lambda (t7: T).(pr0 t1 -t7)) (\lambda (t7: T).(pr0 t2 t7)) x H25 H26)))) (H22 t5 (lift_tlt_dx (Bind -b0) u0 t5 (S O) O) t1 H23 t2 H15)))))))) H18)) H17))))) t6 (sym_eq T t6 t2 -H13))) t H11 H12 H9 H10))) | (pr0_tau t5 t6 H9 u0) \Rightarrow (\lambda (H10: -(eq T (THead (Flat Cast) u0 t5) t)).(\lambda (H11: (eq T t6 t2)).(eq_ind T -(THead (Flat Cast) u0 t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) -(\lambda (H12: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to -(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))) -(\lambda (_: (pr0 t5 t2)).(let H14 \def (eq_ind_r T t (\lambda (t7: T).(eq T -(THead (Bind b) u (lift (S O) O t3)) t7)) H4 (THead (Flat Cast) u0 t5) H10) -in (let H15 \def (eq_ind T (THead (Bind b) u (lift (S O) O t3)) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat -_) \Rightarrow False])])) I (THead (Flat Cast) u0 t5) H14) in (False_ind (ex2 -T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))) H15)))) t6 -(sym_eq T t6 t2 H12))) t H10 H11 H9)))]) in (H9 (refl_equal T t) (refl_equal -T t2))))) t4 (sym_eq T t4 t1 H6))) t H4 H5 H2 H3))) | (pr0_tau t3 t4 H2 u) -\Rightarrow (\lambda (H3: (eq T (THead (Flat Cast) u t3) t)).(\lambda (H4: -(eq T t4 t1)).(eq_ind T (THead (Flat Cast) u t3) (\lambda (_: T).((eq T t4 -t1) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: -T).(pr0 t2 t6)))))) (\lambda (H5: (eq T t4 t1)).(eq_ind T t1 (\lambda (t5: -T).((pr0 t3 t5) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: -T).(pr0 t2 t6))))) (\lambda (H6: (pr0 t3 t1)).(let H7 \def (match H1 with -[(pr0_refl t5) \Rightarrow (\lambda (H7: (eq T t5 t)).(\lambda (H8: (eq T t5 -t2)).(eq_ind T t (\lambda (t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: -T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H9: (eq T t -t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) -(\lambda (t7: T).(pr0 t2 t7)))) (let H10 \def (eq_ind_r T t (\lambda (t6: -T).(eq T t6 t2)) H9 (THead (Flat Cast) u t3) H3) in (eq_ind T (THead (Flat -Cast) u t3) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda -(t7: T).(pr0 t6 t7)))) (let H11 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 -t6)) H7 (THead (Flat Cast) u t3) H3) in (let H12 \def (eq_ind_r T t (\lambda -(t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to -(\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) -(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Cast) u t3) H3) in -(ex_intro2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 (THead (Flat -Cast) u t3) t6)) t1 (pr0_refl t1) (pr0_tau t3 t1 H6 u)))) t2 H10)) t (sym_eq -T t t2 H9))) t5 (sym_eq T t5 t H7) H8))) | (pr0_comp u1 u2 H7 t5 t6 H8 k) -\Rightarrow (\lambda (H9: (eq T (THead k u1 t5) t)).(\lambda (H10: (eq T -(THead k u2 t6) t2)).(eq_ind T (THead k u1 t5) (\lambda (_: T).((eq T (THead -k u2 t6) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H11: (eq T -(THead k u2 t6) t2)).(eq_ind T (THead k u2 t6) (\lambda (t7: T).((pr0 u1 u2) -\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: -T).(pr0 t7 t8)))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H13: (pr0 t5 -t6)).(let H14 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) u -t3) t7)) H3 (THead k u1 t5) H9) in (let H15 \def (f_equal T K (\lambda (e: -T).(match e with [(TSort _) \Rightarrow (Flat Cast) | (TLRef _) \Rightarrow -(Flat Cast) | (THead k0 _ _) \Rightarrow k0])) (THead (Flat Cast) u t3) -(THead k u1 t5) H14) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t7 _) -\Rightarrow t7])) (THead (Flat Cast) u t3) (THead k u1 t5) H14) in ((let H17 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | -(TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Flat -Cast) u t3) (THead k u1 t5) H14) in (\lambda (_: (eq T u u1)).(\lambda (H19: -(eq K (Flat Cast) k)).(eq_ind K (Flat Cast) (\lambda (k0: K).(ex2 T (\lambda -(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead k0 u2 t6) t7)))) (let H20 -\def (eq_ind_r K k (\lambda (k0: K).(eq T (THead k0 u1 t5) t)) H9 (Flat Cast) -H19) in (let H21 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v -t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to -(ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 -t10)))))))))) H (THead (Flat Cast) u1 t5) H20) in (let H22 \def (eq_ind T t3 -(\lambda (t7: T).(pr0 t7 t1)) H6 t5 H17) in (ex2_ind T (\lambda (t7: T).(pr0 -t1 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) -(\lambda (t7: T).(pr0 (THead (Flat Cast) u2 t6) t7))) (\lambda (x: -T).(\lambda (H23: (pr0 t1 x)).(\lambda (H24: (pr0 t6 x)).(ex_intro2 T -(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Flat Cast) u2 t6) -t7)) x H23 (pr0_tau t6 x H24 u2))))) (H21 t5 (tlt_head_dx (Flat Cast) u1 t5) -t1 H22 t6 H13))))) k H19)))) H16)) H15))))) t2 H11)) t H9 H10 H7 H8))) | -(pr0_beta u0 v1 v2 H7 t5 t6 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat -Appl) v1 (THead (Bind Abst) u0 t5)) t)).(\lambda (H10: (eq T (THead (Bind -Abbr) v2 t6) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t5)) -(\lambda (_: T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to -((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 -t2 t8))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v2 t6) t2)).(eq_ind T -(THead (Bind Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to ((pr0 t5 t6) \to -(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8)))))) -(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t5 t6)).(let H14 \def (eq_ind_r T -t (\lambda (t7: T).(eq T (THead (Flat Cast) u t3) t7)) H3 (THead (Flat Appl) -v1 (THead (Bind Abst) u0 t5)) H9) in (let H15 \def (eq_ind T (THead (Flat -Cast) u t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind -_) \Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow -False | Cast \Rightarrow True])])])) I (THead (Flat Appl) v1 (THead (Bind -Abst) u0 t5)) H14) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 t7)) -(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t6) t7))) H15))))) t2 H11)) t H9 -H10 H7 H8))) | (pr0_upsilon b H7 v1 v2 H8 u1 u2 H9 t5 t6 H10) \Rightarrow -(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) -t)).(\lambda (H12: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) -(\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to -((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 -t2 t8))))))))) (\lambda (H13: (eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b Abst)) \to ((pr0 v1 v2) -\to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) -(\lambda (t8: T).(pr0 t7 t8)))))))) (\lambda (_: (not (eq B b -Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 -t5 t6)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) -u t3) t7)) H3 (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) H11) in (let H19 -\def (eq_ind T (THead (Flat Cast) u t3) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow -(match f with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead -(Flat Appl) v1 (THead (Bind b) u1 t5)) H18) in (False_ind (ex2 T (\lambda -(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t6)) t7))) H19))))))) t2 H13)) t H11 H12 H7 H8 H9 -H10))) | (pr0_delta u1 u2 H7 t5 t6 H8 w H9) \Rightarrow (\lambda (H10: (eq T -(THead (Bind Abbr) u1 t5) t)).(\lambda (H11: (eq T (THead (Bind Abbr) u2 w) -t2)).(eq_ind T (THead (Bind Abbr) u1 t5) (\lambda (_: T).((eq T (THead (Bind -Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to -(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) -(\lambda (H12: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind -Abbr) u2 w) (\lambda (t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 -t6 w) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 -t8))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t5 t6)).(\lambda (_: -(subst0 O u2 t6 w)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead -(Flat Cast) u t3) t7)) H3 (THead (Bind Abbr) u1 t5) H10) in (let H17 \def -(eq_ind T (THead (Flat Cast) u t3) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind Abbr) u1 t5) H16) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 -t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7))) H17)))))) t2 H12)) -t H10 H11 H7 H8 H9))) | (pr0_zeta b H7 t5 t6 H8 u0) \Rightarrow (\lambda (H9: -(eq T (THead (Bind b) u0 (lift (S O) O t5)) t)).(\lambda (H10: (eq T t6 -t2)).(eq_ind T (THead (Bind b) u0 (lift (S O) O t5)) (\lambda (_: T).((eq T -t6 t2) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H11: (eq T t6 -t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b Abst)) \to ((pr0 t5 t7) \to -(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) -(\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t5 t2)).(let H14 \def -(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) u t3) t7)) H3 (THead -(Bind b) u0 (lift (S O) O t5)) H9) in (let H15 \def (eq_ind T (THead (Flat -Cast) u t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind -_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 -(lift (S O) O t5)) H14) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 t7)) -(\lambda (t7: T).(pr0 t2 t7))) H15))))) t6 (sym_eq T t6 t2 H11))) t H9 H10 H7 -H8))) | (pr0_tau t5 t6 H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Flat -Cast) u0 t5) t)).(\lambda (H9: (eq T t6 t2)).(eq_ind T (THead (Flat Cast) u0 -t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: -T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H10: (eq T t6 -t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: -T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))) (\lambda (H11: (pr0 t5 -t2)).(let H12 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) u -t3) t7)) H3 (THead (Flat Cast) u0 t5) H8) in (let H13 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) -\Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Cast) u t3) -(THead (Flat Cast) u0 t5) H12) in ((let H14 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | -(THead _ _ t7) \Rightarrow t7])) (THead (Flat Cast) u t3) (THead (Flat Cast) -u0 t5) H12) in (\lambda (_: (eq T u u0)).(let H16 \def (eq_ind_r T t (\lambda -(t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to -(\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) -(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Cast) u0 t5) H8) in -(let H17 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t1)) H6 t5 H14) in -(ex2_ind T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)) (ex2 T -(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: -T).(\lambda (H18: (pr0 t1 x)).(\lambda (H19: (pr0 t2 x)).(ex_intro2 T -(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)) x H18 H19)))) -(H16 t5 (tlt_head_dx (Flat Cast) u0 t5) t1 H17 t2 H11)))))) H13)))) t6 -(sym_eq T t6 t2 H10))) t H8 H9 H7)))]) in (H7 (refl_equal T t) (refl_equal T -t2)))) t4 (sym_eq T t4 t1 H5))) t H3 H4 H2)))]) in (H2 (refl_equal T t) -(refl_equal T t1))))))))) t0). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/props.ma b/matita/matita/contribs/lambdadelta/basic_1/pr0/props.ma deleted file mode 100644 index d1c31fcc7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/props.ma +++ /dev/null @@ -1,534 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/fwd.ma". - -include "basic_1/subst0/props.ma". - -lemma pr0_lift: - \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (h: nat).(\forall -(d: nat).(pr0 (lift h d t1) (lift h d t2)))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(pr0_ind (\lambda -(t: T).(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).(pr0 (lift h d t) -(lift h d t0)))))) (\lambda (t: T).(\lambda (h: nat).(\lambda (d: -nat).(pr0_refl (lift h d t))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda -(_: (pr0 u1 u2)).(\lambda (H1: ((\forall (h: nat).(\forall (d: nat).(pr0 -(lift h d u1) (lift h d u2)))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda -(_: (pr0 t3 t4)).(\lambda (H3: ((\forall (h: nat).(\forall (d: nat).(pr0 -(lift h d t3) (lift h d t4)))))).(\lambda (k: K).(\lambda (h: nat).(\lambda -(d: nat).(eq_ind_r T (THead k (lift h d u1) (lift h (s k d) t3)) (\lambda (t: -T).(pr0 t (lift h d (THead k u2 t4)))) (eq_ind_r T (THead k (lift h d u2) -(lift h (s k d) t4)) (\lambda (t: T).(pr0 (THead k (lift h d u1) (lift h (s k -d) t3)) t)) (pr0_comp (lift h d u1) (lift h d u2) (H1 h d) (lift h (s k d) -t3) (lift h (s k d) t4) (H3 h (s k d)) k) (lift h d (THead k u2 t4)) -(lift_head k u2 t4 h d)) (lift h d (THead k u1 t3)) (lift_head k u1 t3 h -d))))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: -(pr0 v1 v2)).(\lambda (H1: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h -d v1) (lift h d v2)))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 -t3 t4)).(\lambda (H3: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h d t3) -(lift h d t4)))))).(\lambda (h: nat).(\lambda (d: nat).(eq_ind_r T (THead -(Flat Appl) (lift h d v1) (lift h (s (Flat Appl) d) (THead (Bind Abst) u -t3))) (\lambda (t: T).(pr0 t (lift h d (THead (Bind Abbr) v2 t4)))) (eq_ind_r -T (THead (Bind Abst) (lift h (s (Flat Appl) d) u) (lift h (s (Bind Abst) (s -(Flat Appl) d)) t3)) (\lambda (t: T).(pr0 (THead (Flat Appl) (lift h d v1) t) -(lift h d (THead (Bind Abbr) v2 t4)))) (eq_ind_r T (THead (Bind Abbr) (lift h -d v2) (lift h (s (Bind Abbr) d) t4)) (\lambda (t: T).(pr0 (THead (Flat Appl) -(lift h d v1) (THead (Bind Abst) (lift h (s (Flat Appl) d) u) (lift h (s -(Bind Abst) (s (Flat Appl) d)) t3))) t)) (pr0_beta (lift h (s (Flat Appl) d) -u) (lift h d v1) (lift h d v2) (H1 h d) (lift h (s (Bind Abst) (s (Flat Appl) -d)) t3) (lift h (s (Bind Abbr) d) t4) (H3 h (s (Bind Abbr) d))) (lift h d -(THead (Bind Abbr) v2 t4)) (lift_head (Bind Abbr) v2 t4 h d)) (lift h (s -(Flat Appl) d) (THead (Bind Abst) u t3)) (lift_head (Bind Abst) u t3 h (s -(Flat Appl) d))) (lift h d (THead (Flat Appl) v1 (THead (Bind Abst) u t3))) -(lift_head (Flat Appl) v1 (THead (Bind Abst) u t3) h d))))))))))))) (\lambda -(b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: -T).(\lambda (_: (pr0 v1 v2)).(\lambda (H2: ((\forall (h: nat).(\forall (d: -nat).(pr0 (lift h d v1) (lift h d v2)))))).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (_: (pr0 u1 u2)).(\lambda (H4: ((\forall (h: nat).(\forall (d: -nat).(pr0 (lift h d u1) (lift h d u2)))))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (pr0 t3 t4)).(\lambda (H6: ((\forall (h: nat).(\forall (d: -nat).(pr0 (lift h d t3) (lift h d t4)))))).(\lambda (h: nat).(\lambda (d: -nat).(eq_ind_r T (THead (Flat Appl) (lift h d v1) (lift h (s (Flat Appl) d) -(THead (Bind b) u1 t3))) (\lambda (t: T).(pr0 t (lift h d (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4))))) (eq_ind_r T (THead (Bind b) -(lift h (s (Flat Appl) d) u1) (lift h (s (Bind b) (s (Flat Appl) d)) t3)) -(\lambda (t: T).(pr0 (THead (Flat Appl) (lift h d v1) t) (lift h d (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))))) (eq_ind_r T (THead -(Bind b) (lift h d u2) (lift h (s (Bind b) d) (THead (Flat Appl) (lift (S O) -O v2) t4))) (\lambda (t: T).(pr0 (THead (Flat Appl) (lift h d v1) (THead -(Bind b) (lift h (s (Flat Appl) d) u1) (lift h (s (Bind b) (s (Flat Appl) d)) -t3))) t)) (eq_ind_r T (THead (Flat Appl) (lift h (s (Bind b) d) (lift (S O) O -v2)) (lift h (s (Flat Appl) (s (Bind b) d)) t4)) (\lambda (t: T).(pr0 (THead -(Flat Appl) (lift h d v1) (THead (Bind b) (lift h (s (Flat Appl) d) u1) (lift -h (s (Bind b) (s (Flat Appl) d)) t3))) (THead (Bind b) (lift h d u2) t))) -(eq_ind nat (plus (S O) d) (\lambda (n: nat).(pr0 (THead (Flat Appl) (lift h -d v1) (THead (Bind b) (lift h d u1) (lift h n t3))) (THead (Bind b) (lift h d -u2) (THead (Flat Appl) (lift h n (lift (S O) O v2)) (lift h n t4))))) -(eq_ind_r T (lift (S O) O (lift h d v2)) (\lambda (t: T).(pr0 (THead (Flat -Appl) (lift h d v1) (THead (Bind b) (lift h d u1) (lift h (plus (S O) d) -t3))) (THead (Bind b) (lift h d u2) (THead (Flat Appl) t (lift h (plus (S O) -d) t4))))) (pr0_upsilon b H0 (lift h d v1) (lift h d v2) (H2 h d) (lift h d -u1) (lift h d u2) (H4 h d) (lift h (plus (S O) d) t3) (lift h (plus (S O) d) -t4) (H6 h (plus (S O) d))) (lift h (plus (S O) d) (lift (S O) O v2)) (lift_d -v2 h (S O) d O (le_O_n d))) (S d) (refl_equal nat (S d))) (lift h (s (Bind b) -d) (THead (Flat Appl) (lift (S O) O v2) t4)) (lift_head (Flat Appl) (lift (S -O) O v2) t4 h (s (Bind b) d))) (lift h d (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4))) (lift_head (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4) h d)) (lift h (s (Flat Appl) d) (THead (Bind b) u1 t3)) -(lift_head (Bind b) u1 t3 h (s (Flat Appl) d))) (lift h d (THead (Flat Appl) -v1 (THead (Bind b) u1 t3))) (lift_head (Flat Appl) v1 (THead (Bind b) u1 t3) -h d)))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 -u2)).(\lambda (H1: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h d u1) -(lift h d u2)))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 -t4)).(\lambda (H3: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h d t3) -(lift h d t4)))))).(\lambda (w: T).(\lambda (H4: (subst0 O u2 t4 w)).(\lambda -(h: nat).(\lambda (d: nat).(eq_ind_r T (THead (Bind Abbr) (lift h d u1) (lift -h (s (Bind Abbr) d) t3)) (\lambda (t: T).(pr0 t (lift h d (THead (Bind Abbr) -u2 w)))) (eq_ind_r T (THead (Bind Abbr) (lift h d u2) (lift h (s (Bind Abbr) -d) w)) (\lambda (t: T).(pr0 (THead (Bind Abbr) (lift h d u1) (lift h (s (Bind -Abbr) d) t3)) t)) (pr0_delta (lift h d u1) (lift h d u2) (H1 h d) (lift h (S -d) t3) (lift h (S d) t4) (H3 h (S d)) (lift h (S d) w) (let d' \def (S d) in -(eq_ind nat (minus (S d) (S O)) (\lambda (n: nat).(subst0 O (lift h n u2) -(lift h d' t4) (lift h d' w))) (subst0_lift_lt t4 w u2 O H4 (S d) (le_n_S O d -(le_O_n d)) h) d (eq_ind nat d (\lambda (n: nat).(eq nat n d)) (le_antisym d -d (le_n d) (le_n d)) (minus d O) (minus_n_O d))))) (lift h d (THead (Bind -Abbr) u2 w)) (lift_head (Bind Abbr) u2 w h d)) (lift h d (THead (Bind Abbr) -u1 t3)) (lift_head (Bind Abbr) u1 t3 h d)))))))))))))) (\lambda (b: -B).(\lambda (H0: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (pr0 t3 t4)).(\lambda (H2: ((\forall (h: nat).(\forall (d: -nat).(pr0 (lift h d t3) (lift h d t4)))))).(\lambda (u: T).(\lambda (h: -nat).(\lambda (d: nat).(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s -(Bind b) d) (lift (S O) O t3))) (\lambda (t: T).(pr0 t (lift h d t4))) -(eq_ind nat (plus (S O) d) (\lambda (n: nat).(pr0 (THead (Bind b) (lift h d -u) (lift h n (lift (S O) O t3))) (lift h d t4))) (eq_ind_r T (lift (S O) O -(lift h d t3)) (\lambda (t: T).(pr0 (THead (Bind b) (lift h d u) t) (lift h d -t4))) (pr0_zeta b H0 (lift h d t3) (lift h d t4) (H2 h d) (lift h d u)) (lift -h (plus (S O) d) (lift (S O) O t3)) (lift_d t3 h (S O) d O (le_O_n d))) (S d) -(refl_equal nat (S d))) (lift h d (THead (Bind b) u (lift (S O) O t3))) -(lift_head (Bind b) u (lift (S O) O t3) h d))))))))))) (\lambda (t3: -T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (H1: ((\forall (h: -nat).(\forall (d: nat).(pr0 (lift h d t3) (lift h d t4)))))).(\lambda (u: -T).(\lambda (h: nat).(\lambda (d: nat).(eq_ind_r T (THead (Flat Cast) (lift h -d u) (lift h (s (Flat Cast) d) t3)) (\lambda (t: T).(pr0 t (lift h d t4))) -(pr0_tau (lift h (s (Flat Cast) d) t3) (lift h d t4) (H1 h d) (lift h d u)) -(lift h d (THead (Flat Cast) u t3)) (lift_head (Flat Cast) u t3 h d))))))))) -t1 t2 H))). - -lemma pr0_gen_abbr: - \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abbr) u1 -t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) -(\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x)))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Bind Abbr) u1 t1) x)).(insert_eq T (THead (Bind Abbr) u1 t1) (\lambda (t: -T).(pr0 t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda -(y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S -O) O x)))) (\lambda (y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: -T).(\lambda (t0: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: -T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: -T).(subst0 O u2 y0 t2))))))) (pr0 t1 (lift (S O) O t0)))))) (\lambda (t: -T).(\lambda (H1: (eq T t (THead (Bind Abbr) u1 t1))).(let H2 \def (f_equal T -T (\lambda (e: T).e) t (THead (Bind Abbr) u1 t1) H1) in (eq_ind_r T (THead -(Bind Abbr) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T -(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 t2))))))) (pr0 -t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 -t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 -t2))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u1 t1))) (ex3_2_intro T T -(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abbr) u1 t1) (THead -(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t2)))))) u1 t1 (refl_equal T (THead (Bind -Abbr) u1 t1)) (pr0_refl u1) (or_introl (pr0 t1 t1) (ex2 T (\lambda (y0: -T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u1 y0 t1))) (pr0_refl t1)))) t -H2)))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda -(H2: (((eq T u0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Bind Abbr) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t2: T).(or (pr0 -t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 -t2))))))) (pr0 t1 (lift (S O) O u2)))))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Bind Abbr) u1 -t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead -(Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O -t2)))))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u0 t0) (THead (Bind -Abbr) u1 t1))).(let H6 \def (f_equal T K (\lambda (e: T).(match e with -[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H5) in ((let H7 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | -(TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) -(THead (Bind Abbr) u1 t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H5) -in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k (Bind Abbr))).(eq_ind_r -K (Bind Abbr) (\lambda (k0: K).(or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: -T).(eq T (THead k0 u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 -t3))))))) (pr0 t1 (lift (S O) O (THead k0 u2 t2))))) (let H11 \def (eq_ind T -t0 (\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: -T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: -T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O t2))))) H4 t1 H8) in (let -H12 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H13 \def -(eq_ind T u0 (\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind Abbr) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O u2))))) H2 -u1 H9) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 u1 H9) in -(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind -Abbr) u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T -(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 -t1 (lift (S O) O (THead (Bind Abbr) u2 t2))) (ex3_2_intro T T (\lambda (u3: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 t2) (THead (Bind Abbr) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u3 y0 t3)))))) u2 t2 (refl_equal T (THead (Bind -Abbr) u2 t2)) H14 (or_introl (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t2))) H12))))))) k H10)))) H7)) -H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: -(pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abbr) u1 t1)) \to (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind Abbr) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t2))))))) (pr0 t1 (lift (S O) O -v2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda -(_: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 -t3))))))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H5: (eq T (THead (Flat -Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abbr) u1 t1))).(let H6 \def -(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H5) in (False_ind (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) -(THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: -T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S -O) O (THead (Bind Abbr) v2 t2)))) H6)))))))))))) (\lambda (b: B).(\lambda (_: -(not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 -v2)).(\lambda (_: (((eq T v1 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: -T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: -T).(subst0 O u2 y0 t2))))))) (pr0 t1 (lift (S O) O v2)))))).(\lambda (u0: -T).(\lambda (u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead -(Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T u2 (THead (Bind Abbr) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 -u3))) (\lambda (u3: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: -T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 t2))))))) (pr0 t1 (lift (S -O) O u2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 -t2)).(\lambda (_: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: -T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: -T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H8: (eq -T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Abbr) u1 -t1))).(let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 -t1) H8) in (False_ind (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind -Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O (THead (Bind -b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))))) H9))))))))))))))))) -(\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda (H2: -(((eq T u0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Bind Abbr) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t2: T).(or (pr0 -t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 -t2))))))) (pr0 t1 (lift (S O) O u2)))))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Bind Abbr) u1 -t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead -(Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O -t2)))))).(\lambda (w: T).(\lambda (H5: (subst0 O u2 t2 w)).(\lambda (H6: (eq -T (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1))).(let H7 \def (f_equal -T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) -\Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u0 t0) -(THead (Bind Abbr) u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) -u1 t1) H6) in (\lambda (H9: (eq T u0 u1)).(let H10 \def (eq_ind T t0 (\lambda -(t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 -t3))))))) (pr0 t1 (lift (S O) O t2))))) H4 t1 H8) in (let H11 \def (eq_ind T -t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H12 \def (eq_ind T u0 -(\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind Abbr) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: -T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: -T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O u2))))) H2 u1 H9) in (let -H13 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 u1 H9) in (or_introl -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) -(THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) -(\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: -T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S -O) O (THead (Bind Abbr) u2 w))) (ex3_2_intro T T (\lambda (u3: T).(\lambda -(t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u3 t3)))) (\lambda -(u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or -(pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O -u3 y0 t3)))))) u2 w (refl_equal T (THead (Bind Abbr) u2 w)) H13 (or_intror -(pr0 t1 w) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 -y0 w))) (ex_intro2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O -u2 y0 w)) t2 H11 H5)))))))))) H7))))))))))))) (\lambda (b: B).(\lambda (H1: -(not (eq B b Abst))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 -t2)).(\lambda (H3: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: -T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: -T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (u: -T).(\lambda (H4: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind -Abbr) u1 t1))).(let H5 \def (f_equal T B (\lambda (e: T).(match e with -[(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) -\Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow -b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H4) in -((let H6 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) -(THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H4) in ((let -H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow -(lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | (TLRef _) \Rightarrow -(lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | (THead _ _ t) -\Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 -t1) H4) in (\lambda (_: (eq T u u1)).(\lambda (H9: (eq B b Abbr)).(let H10 -\def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H1 Abbr H9) in (let -H11 \def (eq_ind_r T t1 (\lambda (t: T).((eq T t0 (THead (Bind Abbr) u1 t)) -\to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t3: T).(or (pr0 t t3) (ex2 T (\lambda (y0: T).(pr0 t y0)) -(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t (lift (S O) O t2))))) H3 -(lift (S O) O t0) H7) in (eq_ind T (lift (S O) O t0) (\lambda (t: T).(or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t3: T).(or (pr0 t t3) (ex2 T (\lambda (y0: T).(pr0 t y0)) -(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t (lift (S O) O t2)))) -(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t3: T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y0: -T).(pr0 (lift (S O) O t0) y0)) (\lambda (y0: T).(subst0 O u2 y0 t3))))))) -(pr0 (lift (S O) O t0) (lift (S O) O t2)) (pr0_lift t0 t2 H2 (S O) O)) t1 -H7)))))) H6)) H5)))))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda (_: -(pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O -t2)))))).(\lambda (u: T).(\lambda (H3: (eq T (THead (Flat Cast) u t0) (THead -(Bind Abbr) u1 t1))).(let H4 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | -(Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H3) in (False_ind -(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O t2))) -H4)))))))) y x H0))) H)))). - -lemma pr0_gen_void: - \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Void) u1 -t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x)))))) -\def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead -(Bind Void) u1 t1) x)).(insert_eq T (THead (Bind Void) u1 t1) (\lambda (t: -T).(pr0 t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) -O x)))) (\lambda (y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: -T).(\lambda (t0: T).((eq T t (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Void) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O t0)))))) (\lambda (t: T).(\lambda -(H1: (eq T t (THead (Bind Void) u1 t1))).(let H2 \def (f_equal T T (\lambda -(e: T).e) t (THead (Bind Void) u1 t1) H1) in (eq_ind_r T (THead (Bind Void) -u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq -T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 -u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O -t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead -(Bind Void) u1 t1) (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 -(lift (S O) O (THead (Bind Void) u1 t1))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t2: T).(eq T (THead (Bind Void) u1 t1) (THead (Bind Void) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Bind Void) u1 -t1)) (pr0_refl u1) (pr0_refl t1))) t H2)))) (\lambda (u0: T).(\lambda (u2: -T).(\lambda (H1: (pr0 u0 u2)).(\lambda (H2: (((eq T u0 (THead (Bind Void) u1 -t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Bind Void) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O -u2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (pr0 t0 -t2)).(\lambda (H4: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (k: K).(\lambda -(H5: (eq T (THead k u0 t0) (THead (Bind Void) u1 t1))).(let H6 \def (f_equal -T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u0 t0) (THead (Bind -Void) u1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) -\Rightarrow t])) (THead k u0 t0) (THead (Bind Void) u1 t1) H5) in ((let H8 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | -(TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) -(THead (Bind Void) u1 t1) H5) in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: -(eq K k (Bind Void))).(eq_ind_r K (Bind Void) (\lambda (k0: K).(or (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k0 u2 t2) (THead (Bind Void) -u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead k0 u2 t2))))) -(let H11 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind Void) u1 -t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead -(Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2))))) H4 t1 -H8) in (let H12 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in -(let H13 \def (eq_ind T u0 (\lambda (t: T).((eq T t (THead (Bind Void) u1 -t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead -(Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O u2))))) H2 u1 -H9) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 u1 H9) in -(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind -Void) u2 t2) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 -(lift (S O) O (THead (Bind Void) u2 t2))) (ex3_2_intro T T (\lambda (u3: -T).(\lambda (t3: T).(eq T (THead (Bind Void) u2 t2) (THead (Bind Void) u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Bind Void) u2 -t2)) H14 H12)))))) k H10)))) H7)) H6)))))))))))) (\lambda (u: T).(\lambda -(v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 -(THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T v2 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 -(lift (S O) O v2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 -t2)).(\lambda (_: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H5: (eq T (THead -(Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Void) u1 t1))).(let H6 -\def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H5) in (False_ind (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) -(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead -(Bind Abbr) v2 t2)))) H6)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B -b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 -v2)).(\lambda (_: (((eq T v1 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind Void) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O v2)))))).(\lambda (u0: T).(\lambda -(u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead (Bind Void) -u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Bind Void) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O -u2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda -(_: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H8: (eq T (THead (Flat Appl) -v1 (THead (Bind b) u0 t0)) (THead (Bind Void) u1 t1))).(let H9 \def (eq_ind T -(THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Void) u1 t1) H8) in (False_ind (or (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t2)) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda -(_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 -(lift (S O) O (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))))) -H9))))))))))))))))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (_: (pr0 u0 -u2)).(\lambda (_: (((eq T u0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind Void) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: -T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O u2)))))).(\lambda (t0: T).(\lambda -(t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Void) -u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead -(Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O -t2)))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t2 w)).(\lambda (H6: (eq T -(THead (Bind Abbr) u0 t0) (THead (Bind Void) u1 t1))).(let H7 \def (eq_ind T -(THead (Bind Abbr) u0 t0) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | -Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow -False])])) I (THead (Bind Void) u1 t1) H6) in (False_ind (or (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind -Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) -u2 w)))) H7))))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b -Abst))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 t2)).(\lambda -(H3: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (u: T).(\lambda (H4: (eq T -(THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1))).(let H5 \def -(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef -_) \Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O -t0)) (THead (Bind Void) u1 t1) H4) in ((let H6 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead -_ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind -Void) u1 t1) H4) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | -(TLRef _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | -(THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead -(Bind Void) u1 t1) H4) in (\lambda (_: (eq T u u1)).(\lambda (H9: (eq B b -Void)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H1 -Void H9) in (let H11 \def (eq_ind_r T t1 (\lambda (t: T).((eq T t0 (THead -(Bind Void) u1 t)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (pr0 t (lift (S O) O -t2))))) H3 (lift (S O) O t0) H7) in (eq_ind T (lift (S O) O t0) (\lambda (t: -T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t t3)))) (pr0 t (lift (S O) O t2)))) (or_intror -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (pr0 (lift (S O) O t0) -(lift (S O) O t2)) (pr0_lift t0 t2 H2 (S O) O)) t1 H7)))))) H6)) H5)))))))))) -(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: -(((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (u: T).(\lambda (H3: (eq T -(THead (Flat Cast) u t0) (THead (Bind Void) u1 t1))).(let H4 \def (eq_ind T -(THead (Flat Cast) u t0) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind Void) u1 t1) H3) in (False_ind (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3)))) (pr0 t1 (lift (S O) O t2))) H4)))))))) y x H0))) H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1/pr0/subst0.ma deleted file mode 100644 index 95fb67571..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst0.ma +++ /dev/null @@ -1,1647 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/props.ma". - -include "basic_1/subst0/subst0.ma". - -lemma pr0_subst0_back: - \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst0 -i u2 t1 t2) \to (\forall (u1: T).((pr0 u1 u2) \to (ex2 T (\lambda (t: -T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t t2))))))))) -\def - \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).((pr0 u1 t) \to (ex2 T -(\lambda (t4: T).(subst0 n u1 t0 t4)) (\lambda (t4: T).(pr0 t4 t3))))))))) -(\lambda (v: T).(\lambda (i0: nat).(\lambda (u1: T).(\lambda (H0: (pr0 u1 -v)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 (TLRef i0) t)) (\lambda (t: -T).(pr0 t (lift (S i0) O v))) (lift (S i0) O u1) (subst0_lref u1 i0) -(pr0_lift u1 v H0 (S i0) O)))))) (\lambda (v: T).(\lambda (u3: T).(\lambda -(u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: -((\forall (u4: T).((pr0 u4 v) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) -(\lambda (t: T).(pr0 t u3))))))).(\lambda (t: T).(\lambda (k: K).(\lambda -(u0: T).(\lambda (H2: (pr0 u0 v)).(ex2_ind T (\lambda (t0: T).(subst0 i0 u0 -u1 t0)) (\lambda (t0: T).(pr0 t0 u3)) (ex2 T (\lambda (t0: T).(subst0 i0 u0 -(THead k u1 t) t0)) (\lambda (t0: T).(pr0 t0 (THead k u3 t)))) (\lambda (x: -T).(\lambda (H3: (subst0 i0 u0 u1 x)).(\lambda (H4: (pr0 x u3)).(ex_intro2 T -(\lambda (t0: T).(subst0 i0 u0 (THead k u1 t) t0)) (\lambda (t0: T).(pr0 t0 -(THead k u3 t))) (THead k x t) (subst0_fst u0 x u1 i0 H3 t k) (pr0_comp x u3 -H4 t t (pr0_refl t) k))))) (H1 u0 H2)))))))))))) (\lambda (k: K).(\lambda (v: -T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (i0: nat).(\lambda (_: (subst0 -(s k i0) v t4 t3)).(\lambda (H1: ((\forall (u1: T).((pr0 u1 v) \to (ex2 T -(\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t -t3))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (H2: (pr0 u1 v)).(ex2_ind -T (\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t t3)) (ex2 -T (\lambda (t: T).(subst0 i0 u1 (THead k u t4) t)) (\lambda (t: T).(pr0 t -(THead k u t3)))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i0) u1 t4 -x)).(\lambda (H4: (pr0 x t3)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 -(THead k u t4) t)) (\lambda (t: T).(pr0 t (THead k u t3))) (THead k u x) -(subst0_snd k u1 x t4 i0 H3 u) (pr0_comp u u (pr0_refl u) x t3 H4 k))))) (H1 -u1 H2)))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u3: T).(\lambda -(i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: ((\forall (u4: -T).((pr0 u4 v) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) (\lambda (t: -T).(pr0 t u3))))))).(\lambda (k: K).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (subst0 (s k i0) v t3 t4)).(\lambda (H3: ((\forall (u4: -T).((pr0 u4 v) \to (ex2 T (\lambda (t: T).(subst0 (s k i0) u4 t3 t)) (\lambda -(t: T).(pr0 t t4))))))).(\lambda (u0: T).(\lambda (H4: (pr0 u0 v)).(ex2_ind T -(\lambda (t: T).(subst0 (s k i0) u0 t3 t)) (\lambda (t: T).(pr0 t t4)) (ex2 T -(\lambda (t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 t -(THead k u3 t4)))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i0) u0 t3 -x)).(\lambda (H6: (pr0 x t4)).(ex2_ind T (\lambda (t: T).(subst0 i0 u0 u1 t)) -(\lambda (t: T).(pr0 t u3)) (ex2 T (\lambda (t: T).(subst0 i0 u0 (THead k u1 -t3) t)) (\lambda (t: T).(pr0 t (THead k u3 t4)))) (\lambda (x0: T).(\lambda -(H7: (subst0 i0 u0 u1 x0)).(\lambda (H8: (pr0 x0 u3)).(ex_intro2 T (\lambda -(t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 t (THead k u3 -t4))) (THead k x0 x) (subst0_both u0 u1 x0 i0 H7 k t3 x H5) (pr0_comp x0 u3 -H8 x t4 H6 k))))) (H1 u0 H4))))) (H3 u0 H4))))))))))))))) i u2 t1 t2 H))))). - -lemma pr0_subst0_fwd: - \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst0 -i u2 t1 t2) \to (\forall (u1: T).((pr0 u2 u1) \to (ex2 T (\lambda (t: -T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t2 t))))))))) -\def - \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).((pr0 t u1) \to (ex2 T -(\lambda (t4: T).(subst0 n u1 t0 t4)) (\lambda (t4: T).(pr0 t3 t4))))))))) -(\lambda (v: T).(\lambda (i0: nat).(\lambda (u1: T).(\lambda (H0: (pr0 v -u1)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 (TLRef i0) t)) (\lambda (t: -T).(pr0 (lift (S i0) O v) t)) (lift (S i0) O u1) (subst0_lref u1 i0) -(pr0_lift v u1 H0 (S i0) O)))))) (\lambda (v: T).(\lambda (u3: T).(\lambda -(u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: -((\forall (u4: T).((pr0 v u4) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) -(\lambda (t: T).(pr0 u3 t))))))).(\lambda (t: T).(\lambda (k: K).(\lambda -(u0: T).(\lambda (H2: (pr0 v u0)).(ex2_ind T (\lambda (t0: T).(subst0 i0 u0 -u1 t0)) (\lambda (t0: T).(pr0 u3 t0)) (ex2 T (\lambda (t0: T).(subst0 i0 u0 -(THead k u1 t) t0)) (\lambda (t0: T).(pr0 (THead k u3 t) t0))) (\lambda (x: -T).(\lambda (H3: (subst0 i0 u0 u1 x)).(\lambda (H4: (pr0 u3 x)).(ex_intro2 T -(\lambda (t0: T).(subst0 i0 u0 (THead k u1 t) t0)) (\lambda (t0: T).(pr0 -(THead k u3 t) t0)) (THead k x t) (subst0_fst u0 x u1 i0 H3 t k) (pr0_comp u3 -x H4 t t (pr0_refl t) k))))) (H1 u0 H2)))))))))))) (\lambda (k: K).(\lambda -(v: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (i0: nat).(\lambda (_: -(subst0 (s k i0) v t4 t3)).(\lambda (H1: ((\forall (u1: T).((pr0 v u1) \to -(ex2 T (\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t3 -t))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (H2: (pr0 v u1)).(ex2_ind -T (\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 -T (\lambda (t: T).(subst0 i0 u1 (THead k u t4) t)) (\lambda (t: T).(pr0 -(THead k u t3) t))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i0) u1 t4 -x)).(\lambda (H4: (pr0 t3 x)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 -(THead k u t4) t)) (\lambda (t: T).(pr0 (THead k u t3) t)) (THead k u x) -(subst0_snd k u1 x t4 i0 H3 u) (pr0_comp u u (pr0_refl u) t3 x H4 k))))) (H1 -u1 H2)))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u3: T).(\lambda -(i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: ((\forall (u4: -T).((pr0 v u4) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) (\lambda (t: -T).(pr0 u3 t))))))).(\lambda (k: K).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (subst0 (s k i0) v t3 t4)).(\lambda (H3: ((\forall (u4: -T).((pr0 v u4) \to (ex2 T (\lambda (t: T).(subst0 (s k i0) u4 t3 t)) (\lambda -(t: T).(pr0 t4 t))))))).(\lambda (u0: T).(\lambda (H4: (pr0 v u0)).(ex2_ind T -(\lambda (t: T).(subst0 (s k i0) u0 t3 t)) (\lambda (t: T).(pr0 t4 t)) (ex2 T -(\lambda (t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 (THead -k u3 t4) t))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i0) u0 t3 -x)).(\lambda (H6: (pr0 t4 x)).(ex2_ind T (\lambda (t: T).(subst0 i0 u0 u1 t)) -(\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(subst0 i0 u0 (THead k u1 -t3) t)) (\lambda (t: T).(pr0 (THead k u3 t4) t))) (\lambda (x0: T).(\lambda -(H7: (subst0 i0 u0 u1 x0)).(\lambda (H8: (pr0 u3 x0)).(ex_intro2 T (\lambda -(t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 (THead k u3 t4) -t)) (THead k x0 x) (subst0_both u0 u1 x0 i0 H7 k t3 x H5) (pr0_comp u3 x0 H8 -t4 x H6 k))))) (H1 u0 H4))))) (H3 u0 H4))))))))))))))) i u2 t1 t2 H))))). - -theorem pr0_subst0: - \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (v1: T).(\forall -(w1: T).(\forall (i: nat).((subst0 i v1 t1 w1) \to (\forall (v2: T).((pr0 v1 -v2) \to (or (pr0 w1 t2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 t2 w2)))))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(pr0_ind (\lambda -(t: T).(\lambda (t0: T).(\forall (v1: T).(\forall (w1: T).(\forall (i: -nat).((subst0 i v1 t w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 w1 -t0) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t0 -w2)))))))))))) (\lambda (t: T).(\lambda (v1: T).(\lambda (w1: T).(\lambda (i: -nat).(\lambda (H0: (subst0 i v1 t w1)).(\lambda (v2: T).(\lambda (H1: (pr0 v1 -v2)).(or_intror (pr0 w1 t) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 t w2))) (ex2_sym T (subst0 i v2 t) (pr0 w1) (pr0_subst0_fwd -v1 t w1 i H0 v2 H1)))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: -(pr0 u1 u2)).(\lambda (H1: ((\forall (v1: T).(\forall (w1: T).(\forall (i: -nat).((subst0 i v1 u1 w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 w1 -u2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 u2 -w2)))))))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 -t4)).(\lambda (H3: ((\forall (v1: T).(\forall (w1: T).(\forall (i: -nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 w1 -t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 -w2)))))))))))).(\lambda (k: K).(\lambda (v1: T).(\lambda (w1: T).(\lambda (i: -nat).(\lambda (H4: (subst0 i v1 (THead k u1 t3) w1)).(\lambda (v2: -T).(\lambda (H5: (pr0 v1 v2)).(or3_ind (ex2 T (\lambda (u3: T).(eq T w1 -(THead k u3 t3))) (\lambda (u3: T).(subst0 i v1 u1 u3))) (ex2 T (\lambda (t5: -T).(eq T w1 (THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i) v1 t3 t5))) -(ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead k u3 t5)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 i v1 u1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i) v1 t3 t5)))) (or (pr0 w1 (THead k u2 t4)) -(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 (THead k -u2 t4) w2)))) (\lambda (H6: (ex2 T (\lambda (u3: T).(eq T w1 (THead k u3 -t3))) (\lambda (u3: T).(subst0 i v1 u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq -T w1 (THead k u3 t3))) (\lambda (u3: T).(subst0 i v1 u1 u3)) (or (pr0 w1 -(THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: T).(\lambda (H7: (eq T w1 -(THead k x t3))).(\lambda (H8: (subst0 i v1 u1 x)).(eq_ind_r T (THead k x t3) -(\lambda (t: T).(or (pr0 t (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 t -w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))))) (or_ind (pr0 x u2) -(ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 u2 w2))) -(or (pr0 (THead k x t3) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead -k x t3) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda -(H9: (pr0 x u2)).(or_introl (pr0 (THead k x t3) (THead k u2 t4)) (ex2 T -(\lambda (w2: T).(pr0 (THead k x t3) w2)) (\lambda (w2: T).(subst0 i v2 -(THead k u2 t4) w2))) (pr0_comp x u2 H9 t3 t4 H2 k))) (\lambda (H9: (ex2 T -(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)))).(ex2_ind -T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)) (or (pr0 -(THead k x t3) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x t3) -w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x0: -T).(\lambda (H10: (pr0 x x0)).(\lambda (H11: (subst0 i v2 u2 x0)).(or_intror -(pr0 (THead k x t3) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x -t3) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T -(\lambda (w2: T).(pr0 (THead k x t3) w2)) (\lambda (w2: T).(subst0 i v2 -(THead k u2 t4) w2)) (THead k x0 t4) (pr0_comp x x0 H10 t3 t4 H2 k) -(subst0_fst v2 x0 u2 i H11 t4 k)))))) H9)) (H1 v1 x i H8 v2 H5)) w1 H7)))) -H6)) (\lambda (H6: (ex2 T (\lambda (t5: T).(eq T w1 (THead k u1 t5))) -(\lambda (t5: T).(subst0 (s k i) v1 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq -T w1 (THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i) v1 t3 t5)) (or (pr0 -w1 (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: T).(\lambda (H7: (eq T w1 -(THead k u1 x))).(\lambda (H8: (subst0 (s k i) v1 t3 x)).(eq_ind_r T (THead k -u1 x) (\lambda (t: T).(or (pr0 t (THead k u2 t4)) (ex2 T (\lambda (w2: -T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))))) (or_ind -(pr0 x t4) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s k -i) v2 t4 w2))) (or (pr0 (THead k u1 x) (THead k u2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead k u1 x) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) -w2)))) (\lambda (H9: (pr0 x t4)).(or_introl (pr0 (THead k u1 x) (THead k u2 -t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k u1 x) w2)) (\lambda (w2: -T).(subst0 i v2 (THead k u2 t4) w2))) (pr0_comp u1 u2 H0 x t4 H9 k))) -(\lambda (H9: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s -k i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: -T).(subst0 (s k i) v2 t4 w2)) (or (pr0 (THead k u1 x) (THead k u2 t4)) (ex2 T -(\lambda (w2: T).(pr0 (THead k u1 x) w2)) (\lambda (w2: T).(subst0 i v2 -(THead k u2 t4) w2)))) (\lambda (x0: T).(\lambda (H10: (pr0 x x0)).(\lambda -(H11: (subst0 (s k i) v2 t4 x0)).(or_intror (pr0 (THead k u1 x) (THead k u2 -t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k u1 x) w2)) (\lambda (w2: -T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 -(THead k u1 x) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)) (THead -k u2 x0) (pr0_comp u1 u2 H0 x x0 H10 k) (subst0_snd k v2 x0 t4 i H11 u2)))))) -H9)) (H3 v1 x (s k i) H8 v2 H5)) w1 H7)))) H6)) (\lambda (H6: (ex3_2 T T -(\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead k u3 t5)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i v1 u1 u3))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s k i) v1 t3 t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda -(t5: T).(eq T w1 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 -i v1 u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i) v1 t3 t5))) -(or (pr0 w1 (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda -(w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H7: (eq T w1 (THead k x0 x1))).(\lambda (H8: (subst0 i v1 u1 -x0)).(\lambda (H9: (subst0 (s k i) v1 t3 x1)).(eq_ind_r T (THead k x0 x1) -(\lambda (t: T).(or (pr0 t (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 t -w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))))) (or_ind (pr0 x1 -t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s k i) v2 -t4 w2))) (or (pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) -w2)))) (\lambda (H10: (pr0 x1 t4)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2))) (or (pr0 (THead k x0 -x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (H11: (pr0 x0 -u2)).(or_introl (pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) -w2))) (pr0_comp x0 u2 H11 x1 t4 H10 k))) (\lambda (H11: (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda -(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead k -x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: T).(\lambda -(H12: (pr0 x0 x)).(\lambda (H13: (subst0 i v2 u2 x)).(or_intror (pr0 (THead k -x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda -(w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 -t4) w2)) (THead k x t4) (pr0_comp x0 x H12 x1 t4 H10 k) (subst0_fst v2 x u2 i -H13 t4 k)))))) H11)) (H1 v1 x0 i H8 v2 H5))) (\lambda (H10: (ex2 T (\lambda -(w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s k i) v2 t4 w2)))).(ex2_ind T -(\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s k i) v2 t4 w2)) (or -(pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k -x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: -T).(\lambda (H11: (pr0 x1 x)).(\lambda (H12: (subst0 (s k i) v2 t4 -x)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 i v2 u2 w2))) (or (pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T -(\lambda (w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 -(THead k u2 t4) w2)))) (\lambda (H13: (pr0 x0 u2)).(or_intror (pr0 (THead k -x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda -(w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 -t4) w2)) (THead k u2 x) (pr0_comp x0 u2 H13 x1 x H11 k) (subst0_snd k v2 x t4 -i H12 u2)))) (\lambda (H13: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda -(w2: T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) -(\lambda (w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead k x0 x1) (THead k u2 -t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: -T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x2: T).(\lambda (H14: (pr0 -x0 x2)).(\lambda (H15: (subst0 i v2 u2 x2)).(or_intror (pr0 (THead k x0 x1) -(THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) (\lambda -(w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 -(THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)) -(THead k x2 x) (pr0_comp x0 x2 H14 x1 x H11 k) (subst0_both v2 u2 x2 i H15 k -t4 x H12)))))) H13)) (H1 v1 x0 i H8 v2 H5))))) H10)) (H3 v1 x1 (s k i) H9 v2 -H5)) w1 H7)))))) H6)) (subst0_gen_head k v1 u1 t3 w1 i H4))))))))))))))))) -(\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H0: (pr0 v1 -v2)).(\lambda (H1: ((\forall (v3: T).(\forall (w1: T).(\forall (i: -nat).((subst0 i v3 v1 w1) \to (\forall (v4: T).((pr0 v3 v4) \to (or (pr0 w1 -v2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v4 v2 -w2)))))))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 -t4)).(\lambda (H3: ((\forall (v3: T).(\forall (w1: T).(\forall (i: -nat).((subst0 i v3 t3 w1) \to (\forall (v4: T).((pr0 v3 v4) \to (or (pr0 w1 -t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v4 t4 -w2)))))))))))).(\lambda (v0: T).(\lambda (w1: T).(\lambda (i: nat).(\lambda -(H4: (subst0 i v0 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) -w1)).(\lambda (v3: T).(\lambda (H5: (pr0 v0 v3)).(or3_ind (ex2 T (\lambda -(u2: T).(eq T w1 (THead (Flat Appl) u2 (THead (Bind Abst) u t3)))) (\lambda -(u2: T).(subst0 i v0 v1 u2))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Flat -Appl) v1 t5))) (\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead (Bind -Abst) u t3) t5))) (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T w1 -(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 v1 -u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead -(Bind Abst) u t3) t5)))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T -(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind -Abbr) v2 t4) w2)))) (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T w1 (THead -(Flat Appl) u2 (THead (Bind Abst) u t3)))) (\lambda (u2: T).(subst0 i v0 v1 -u2)))).(ex2_ind T (\lambda (u2: T).(eq T w1 (THead (Flat Appl) u2 (THead -(Bind Abst) u t3)))) (\lambda (u2: T).(subst0 i v0 v1 u2)) (or (pr0 w1 (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (x: T).(\lambda -(H7: (eq T w1 (THead (Flat Appl) x (THead (Bind Abst) u t3)))).(\lambda (H8: -(subst0 i v0 v1 x)).(eq_ind_r T (THead (Flat Appl) x (THead (Bind Abst) u -t3)) (\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda -(w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2))))) (or_ind (pr0 x v2) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: -T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x (THead (Bind Abst) u -t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind Abbr) v2 t4) w2)))) (\lambda (H9: (pr0 x v2)).(or_introl (pr0 (THead -(Flat Appl) x (THead (Bind Abst) u t3)) (THead (Bind Abbr) v2 t4)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (pr0_beta u x -v2 H9 t3 t4 H2))) (\lambda (H9: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda -(w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) -(\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x (THead -(Bind Abst) u t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: T).(subst0 -i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (x0: T).(\lambda (H10: (pr0 x -x0)).(\lambda (H11: (subst0 i v3 v2 x0)).(or_intror (pr0 (THead (Flat Appl) x -(THead (Bind Abst) u t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) x0 t4) -(pr0_beta u x x0 H10 t3 t4 H2) (subst0_fst v3 x0 v2 i H11 t4 (Bind -Abbr))))))) H9)) (H1 v0 x i H8 v3 H5)) w1 H7)))) H6)) (\lambda (H6: (ex2 T -(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: -T).(subst0 (s (Flat Appl) i) v0 (THead (Bind Abst) u t3) t5)))).(ex2_ind T -(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: -T).(subst0 (s (Flat Appl) i) v0 (THead (Bind Abst) u t3) t5)) (or (pr0 w1 -(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (x: T).(\lambda -(H7: (eq T w1 (THead (Flat Appl) v1 x))).(\lambda (H8: (subst0 (s (Flat Appl) -i) v0 (THead (Bind Abst) u t3) x)).(or3_ind (ex2 T (\lambda (u2: T).(eq T x -(THead (Bind Abst) u2 t3))) (\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u -u2))) (ex2 T (\lambda (t5: T).(eq T x (THead (Bind Abst) u t5))) (\lambda -(t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T x (THead (Bind Abst) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u u2))) -(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 -t3 t5)))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 -w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) -(\lambda (H9: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 t3))) -(\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u u2)))).(ex2_ind T (\lambda -(u2: T).(eq T x (THead (Bind Abst) u2 t3))) (\lambda (u2: T).(subst0 (s (Flat -Appl) i) v0 u u2)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda -(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2)))) (\lambda (x0: T).(\lambda (H10: (eq T x (THead (Bind Abst) x0 -t3))).(\lambda (_: (subst0 (s (Flat Appl) i) v0 u x0)).(let H12 \def (eq_ind -T x (\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 t))) H7 (THead (Bind Abst) -x0 t3) H10) in (eq_ind_r T (THead (Flat Appl) v1 (THead (Bind Abst) x0 t3)) -(\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2))))) (or_introl (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 t3)) -(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 -(THead (Bind Abst) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind -Abbr) v2 t4) w2))) (pr0_beta x0 v1 v2 H0 t3 t4 H2)) w1 H12))))) H9)) (\lambda -(H9: (ex2 T (\lambda (t5: T).(eq T x (THead (Bind Abst) u t5))) (\lambda (t5: -T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5)))).(ex2_ind T (\lambda -(t5: T).(eq T x (THead (Bind Abst) u t5))) (\lambda (t5: T).(subst0 (s (Bind -Abst) (s (Flat Appl) i)) v0 t3 t5)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) -(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind Abbr) v2 t4) w2)))) (\lambda (x0: T).(\lambda (H10: (eq T x (THead -(Bind Abst) u x0))).(\lambda (H11: (subst0 (s (Bind Abst) (s (Flat Appl) i)) -v0 t3 x0)).(let H12 \def (eq_ind T x (\lambda (t: T).(eq T w1 (THead (Flat -Appl) v1 t))) H7 (THead (Bind Abst) u x0) H10) in (eq_ind_r T (THead (Flat -Appl) v1 (THead (Bind Abst) u x0)) (\lambda (t: T).(or (pr0 t (THead (Bind -Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind Abbr) v2 t4) w2))))) (or_ind (pr0 x0 t4) (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 -t4 w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead -(Bind Abst) u x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2)))) (\lambda (H13: (pr0 x0 t4)).(or_introl (pr0 (THead (Flat Appl) v1 -(THead (Bind Abst) u x0)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (pr0_beta u v1 v2 H0 x0 t4 -H13))) (\lambda (H13: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda -(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) -i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) -(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 -(THead (Bind Abst) u x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind -Abbr) v2 t4) w2)))) (\lambda (x1: T).(\lambda (H14: (pr0 x0 x1)).(\lambda -(H15: (subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 x1)).(or_intror (pr0 -(THead (Flat Appl) v1 (THead (Bind Abst) u x0)) (THead (Bind Abbr) v2 t4)) -(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 -T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind -Abbr) v2 x1) (pr0_beta u v1 v2 H0 x0 x1 H14) (subst0_snd (Bind Abbr) v3 x1 t4 -i H15 v2)))))) H13)) (H3 v0 x0 (s (Bind Abst) (s (Flat Appl) i)) H11 v3 H5)) -w1 H12))))) H9)) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: -T).(eq T x (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 (s (Flat Appl) i) v0 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t5: T).(eq T x (THead (Bind Abst) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u u2))) -(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 -t3 t5))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 -w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq T x (THead (Bind Abst) -x0 x1))).(\lambda (_: (subst0 (s (Flat Appl) i) v0 u x0)).(\lambda (H12: -(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 x1)).(let H13 \def (eq_ind T -x (\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 t))) H7 (THead (Bind Abst) -x0 x1) H10) in (eq_ind_r T (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) -(\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2))))) (or_ind (pr0 x1 t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda -(w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead -(Flat Appl) v1 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) v2 t4)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H14: -(pr0 x1 t4)).(or_introl (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) -(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 -(THead (Bind Abst) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind -Abbr) v2 t4) w2))) (pr0_beta x0 v1 v2 H0 x1 t4 H14))) (\lambda (H14: (ex2 T -(\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s -(Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 w2)) -(\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)) (or -(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) v2 -t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 -x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) -(\lambda (x2: T).(\lambda (H15: (pr0 x1 x2)).(\lambda (H16: (subst0 (s (Bind -Abst) (s (Flat Appl) i)) v3 t4 x2)).(or_intror (pr0 (THead (Flat Appl) v1 -(THead (Bind Abst) x0 x1)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) v2 x2) -(pr0_beta x0 v1 v2 H0 x1 x2 H15) (subst0_snd (Bind Abbr) v3 x2 t4 i H16 -v2)))))) H14)) (H3 v0 x1 (s (Bind Abst) (s (Flat Appl) i)) H12 v3 H5)) w1 -H13))))))) H9)) (subst0_gen_head (Bind Abst) v0 u t3 x (s (Flat Appl) i) -H8))))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T -w1 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 -v1 u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead -(Bind Abst) u t3) t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: -T).(eq T w1 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v0 v1 u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat -Appl) i) v0 (THead (Bind Abst) u t3) t5))) (or (pr0 w1 (THead (Bind Abbr) v2 -t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind Abbr) v2 t4) w2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(H7: (eq T w1 (THead (Flat Appl) x0 x1))).(\lambda (H8: (subst0 i v0 v1 -x0)).(\lambda (H9: (subst0 (s (Flat Appl) i) v0 (THead (Bind Abst) u t3) -x1)).(or3_ind (ex2 T (\lambda (u2: T).(eq T x1 (THead (Bind Abst) u2 t3))) -(\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u u2))) (ex2 T (\lambda (t5: -T).(eq T x1 (THead (Bind Abst) u t5))) (\lambda (t5: T).(subst0 (s (Bind -Abst) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t5: T).(eq T x1 (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 (s (Flat Appl) i) v0 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5)))) (or (pr0 w1 (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H10: (ex2 T -(\lambda (u2: T).(eq T x1 (THead (Bind Abst) u2 t3))) (\lambda (u2: -T).(subst0 (s (Flat Appl) i) v0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T x1 -(THead (Bind Abst) u2 t3))) (\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u -u2)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda -(x: T).(\lambda (H11: (eq T x1 (THead (Bind Abst) x t3))).(\lambda (_: -(subst0 (s (Flat Appl) i) v0 u x)).(let H13 \def (eq_ind T x1 (\lambda (t: -T).(eq T w1 (THead (Flat Appl) x0 t))) H7 (THead (Bind Abst) x t3) H11) in -(eq_ind_r T (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) (\lambda (t: -T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 t w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))))) (or_ind (pr0 -x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) (THead (Bind -Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -Abst) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2)))) (\lambda (H14: (pr0 x0 v2)).(or_introl (pr0 (THead (Flat Appl) x0 -(THead (Bind Abst) x t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (pr0_beta x x0 v2 H14 t3 t4 -H2))) (\lambda (H14: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda -(w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind -Abst) x t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead -(Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind Abbr) v2 t4) w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x0 -x2)).(\lambda (H16: (subst0 i v3 v2 x2)).(or_intror (pr0 (THead (Flat Appl) -x0 (THead (Bind Abst) x t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) x2 t4) -(pr0_beta x x0 x2 H15 t3 t4 H2) (subst0_fst v3 x2 v2 i H16 t4 (Bind -Abbr))))))) H14)) (H1 v0 x0 i H8 v3 H5)) w1 H13))))) H10)) (\lambda (H10: -(ex2 T (\lambda (t5: T).(eq T x1 (THead (Bind Abst) u t5))) (\lambda (t5: -T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5)))).(ex2_ind T (\lambda -(t5: T).(eq T x1 (THead (Bind Abst) u t5))) (\lambda (t5: T).(subst0 (s (Bind -Abst) (s (Flat Appl) i)) v0 t3 t5)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) -(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind Abbr) v2 t4) w2)))) (\lambda (x: T).(\lambda (H11: (eq T x1 (THead -(Bind Abst) u x))).(\lambda (H12: (subst0 (s (Bind Abst) (s (Flat Appl) i)) -v0 t3 x)).(let H13 \def (eq_ind T x1 (\lambda (t: T).(eq T w1 (THead (Flat -Appl) x0 t))) H7 (THead (Bind Abst) u x) H11) in (eq_ind_r T (THead (Flat -Appl) x0 (THead (Bind Abst) u x)) (\lambda (t: T).(or (pr0 t (THead (Bind -Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind Abbr) v2 t4) w2))))) (or_ind (pr0 x t4) (ex2 T (\lambda (w2: -T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 -t4 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind -Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2)))) (\lambda (H14: (pr0 x t4)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat -Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda -(w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) w2)) (\lambda -(w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H15: (pr0 x0 -v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2))) (pr0_beta u x0 v2 H15 x t4 H14))) (\lambda (H15: (ex2 T (\lambda -(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 -(THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) -(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda -(x2: T).(\lambda (H16: (pr0 x0 x2)).(\lambda (H17: (subst0 i v3 v2 -x2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2)) (THead (Bind Abbr) x2 t4) (pr0_beta u x0 x2 H16 x t4 H14) -(subst0_fst v3 x2 v2 i H17 t4 (Bind Abbr))))))) H15)) (H1 v0 x0 i H8 v3 H5))) -(\lambda (H14: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 -(s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: -T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 -t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind -Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x x2)).(\lambda (H16: (subst0 (s -(Bind Abst) (s (Flat Appl) i)) v3 t4 x2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda -(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead -(Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H17: -(pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) -(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 -(THead (Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind -Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 -(THead (Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind -Abbr) v2 t4) w2)) (THead (Bind Abbr) v2 x2) (pr0_beta u x0 v2 H17 x x2 H15) -(subst0_snd (Bind Abbr) v3 x2 t4 i H16 v2)))) (\lambda (H17: (ex2 T (\lambda -(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 -(THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) -(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda -(x3: T).(\lambda (H18: (pr0 x0 x3)).(\lambda (H19: (subst0 i v3 v2 -x3)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2)) (THead (Bind Abbr) x3 x2) (pr0_beta u x0 x3 H18 x x2 H15) -(subst0_both v3 v2 x3 i H19 (Bind Abbr) t4 x2 H16)))))) H17)) (H1 v0 x0 i H8 -v3 H5))))) H14)) (H3 v0 x (s (Bind Abst) (s (Flat Appl) i)) H12 v3 H5)) w1 -H13))))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: -T).(eq T x1 (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 (s (Flat Appl) i) v0 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t5: T).(eq T x1 (THead (Bind Abst) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u u2))) -(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 -t3 t5))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 -w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) -(\lambda (x2: T).(\lambda (x3: T).(\lambda (H11: (eq T x1 (THead (Bind Abst) -x2 x3))).(\lambda (_: (subst0 (s (Flat Appl) i) v0 u x2)).(\lambda (H13: -(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 x3)).(let H14 \def (eq_ind T -x1 (\lambda (t: T).(eq T w1 (THead (Flat Appl) x0 t))) H7 (THead (Bind Abst) -x2 x3) H11) in (eq_ind_r T (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) -(\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: -T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) -w2))))) (or_ind (pr0 x3 t4) (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda -(w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead -(Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H15: -(pr0 x3 t4)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) -(\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H16: (pr0 x0 -v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2))) (pr0_beta x2 x0 v2 H16 x3 t4 H15))) (\lambda (H16: (ex2 T (\lambda -(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 -(THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) -(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda -(x: T).(\lambda (H17: (pr0 x0 x)).(\lambda (H18: (subst0 i v3 v2 -x)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2)) (THead (Bind Abbr) x t4) (pr0_beta x2 x0 x H17 x3 t4 H15) -(subst0_fst v3 x v2 i H18 t4 (Bind Abbr))))))) H16)) (H1 v0 x0 i H8 v3 H5))) -(\lambda (H15: (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 -(s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: -T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 -t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2)))) (\lambda (x: T).(\lambda (H16: (pr0 x3 x)).(\lambda (H17: (subst0 -(s (Bind Abst) (s (Flat Appl) i)) v3 t4 x)).(or_ind (pr0 x0 v2) (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 -(THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) -(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda -(H18: (pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) -x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) v2 x) (pr0_beta x2 x0 v2 H18 x3 x -H16) (subst0_snd (Bind Abbr) v3 x t4 i H17 v2)))) (\lambda (H18: (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead -(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 -t4) w2)))) (\lambda (x4: T).(\lambda (H19: (pr0 x0 x4)).(\lambda (H20: -(subst0 i v3 v2 x4)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) -x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) x4 x) (pr0_beta x2 x0 x4 H19 x3 x -H16) (subst0_both v3 v2 x4 i H20 (Bind Abbr) t4 x H17)))))) H18)) (H1 v0 x0 i -H8 v3 H5))))) H15)) (H3 v0 x3 (s (Bind Abst) (s (Flat Appl) i)) H13 v3 H5)) -w1 H14))))))) H10)) (subst0_gen_head (Bind Abst) v0 u t3 x1 (s (Flat Appl) i) -H9))))))) H6)) (subst0_gen_head (Flat Appl) v0 v1 (THead (Bind Abst) u t3) w1 -i H4))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b -Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H1: (pr0 v1 v2)).(\lambda -(H2: ((\forall (v3: T).(\forall (w1: T).(\forall (i: nat).((subst0 i v3 v1 -w1) \to (\forall (v4: T).((pr0 v3 v4) \to (or (pr0 w1 v2) (ex2 T (\lambda -(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v4 v2 w2)))))))))))).(\lambda -(u1: T).(\lambda (u2: T).(\lambda (H3: (pr0 u1 u2)).(\lambda (H4: ((\forall -(v3: T).(\forall (w1: T).(\forall (i: nat).((subst0 i v3 u1 w1) \to (\forall -(v4: T).((pr0 v3 v4) \to (or (pr0 w1 u2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) -(\lambda (w2: T).(subst0 i v4 u2 w2)))))))))))).(\lambda (t3: T).(\lambda -(t4: T).(\lambda (H5: (pr0 t3 t4)).(\lambda (H6: ((\forall (v3: T).(\forall -(w1: T).(\forall (i: nat).((subst0 i v3 t3 w1) \to (\forall (v4: T).((pr0 v3 -v4) \to (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v4 t4 w2)))))))))))).(\lambda (v0: T).(\lambda (w1: T).(\lambda -(i: nat).(\lambda (H7: (subst0 i v0 (THead (Flat Appl) v1 (THead (Bind b) u1 -t3)) w1)).(\lambda (v3: T).(\lambda (H8: (pr0 v0 v3)).(or3_ind (ex2 T -(\lambda (u3: T).(eq T w1 (THead (Flat Appl) u3 (THead (Bind b) u1 t3)))) -(\lambda (u3: T).(subst0 i v0 v1 u3))) (ex2 T (\lambda (t5: T).(eq T w1 -(THead (Flat Appl) v1 t5))) (\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 -(THead (Bind b) u1 t3) t5))) (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq -T w1 (THead (Flat Appl) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i -v0 v1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 -(THead (Bind b) u1 t3) t5)))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda -(w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4)) w2)))) (\lambda (H9: (ex2 T (\lambda (u3: T).(eq T w1 (THead (Flat Appl) -u3 (THead (Bind b) u1 t3)))) (\lambda (u3: T).(subst0 i v0 v1 u3)))).(ex2_ind -T (\lambda (u3: T).(eq T w1 (THead (Flat Appl) u3 (THead (Bind b) u1 t3)))) -(\lambda (u3: T).(subst0 i v0 v1 u3)) (or (pr0 w1 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda (H10: (eq T w1 (THead (Flat -Appl) x (THead (Bind b) u1 t3)))).(\lambda (H11: (subst0 i v0 v1 -x)).(eq_ind_r T (THead (Flat Appl) x (THead (Bind b) u1 t3)) (\lambda (t: -T).(or (pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) -(ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x -v2) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2))) (or (pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (H12: (pr0 x v2)).(or_introl (pr0 (THead (Flat Appl) x (THead (Bind -b) u1 t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 -T (\lambda (w2: T).(pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2))) (pr0_upsilon b H0 x v2 H12 u1 u2 H3 t3 t4 H5))) (\lambda -(H12: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x0: T).(\lambda (H13: (pr0 x x0)).(\lambda (H14: (subst0 i v3 v2 -x0)).(or_intror (pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x (THead (Bind b) -u1 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O x0) t4)) (pr0_upsilon b H0 x x0 H13 u1 u2 H3 t3 t4 H5) (subst0_snd -(Bind b) v3 (THead (Flat Appl) (lift (S O) O x0) t4) (THead (Flat Appl) (lift -(S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x0) (lift (S O) O v2) (s (Bind -b) i) (subst0_lift_ge_s v2 x0 v3 i H14 O (le_O_n i) b) t4 (Flat Appl)) -u2)))))) H12)) (H2 v0 x i H11 v3 H8)) w1 H10)))) H9)) (\lambda (H9: (ex2 T -(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: -T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) u1 t3) t5)))).(ex2_ind T -(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: -T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) u1 t3) t5)) (or (pr0 w1 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda -(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda (H10: (eq -T w1 (THead (Flat Appl) v1 x))).(\lambda (H11: (subst0 (s (Flat Appl) i) v0 -(THead (Bind b) u1 t3) x)).(or3_ind (ex2 T (\lambda (u3: T).(eq T x (THead -(Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (ex2 -T (\lambda (t5: T).(eq T x (THead (Bind b) u1 t5))) (\lambda (t5: T).(subst0 -(s (Bind b) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T (\lambda (u3: -T).(\lambda (t5: T).(eq T x (THead (Bind b) u3 t5)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)))) (or -(pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H12: (ex2 T -(\lambda (u3: T).(eq T x (THead (Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s -(Flat Appl) i) v0 u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq T x (THead (Bind -b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 u1 u3)) (or (pr0 w1 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda -(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x0: T).(\lambda (H13: (eq -T x (THead (Bind b) x0 t3))).(\lambda (H14: (subst0 (s (Flat Appl) i) v0 u1 -x0)).(let H15 \def (eq_ind T x (\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 -t))) H10 (THead (Bind b) x0 t3) H13) in (eq_ind_r T (THead (Flat Appl) v1 -(THead (Bind b) x0 t3)) (\lambda (t: T).(or (pr0 t (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2))))) (or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 -w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2))) (or (pr0 (THead -(Flat Appl) v1 (THead (Bind b) x0 t3)) (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 -(THead (Bind b) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H16: (pr0 x0 -u2)).(or_introl (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 t3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (pr0_upsilon b H0 v1 v2 H1 x0 u2 H16 t3 t4 H5))) (\lambda (H16: (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 -u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 -(s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) -x0 t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 t3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (x1: T).(\lambda (H17: (pr0 x0 x1)).(\lambda -(H18: (subst0 (s (Flat Appl) i) v3 u2 x1)).(or_intror (pr0 (THead (Flat Appl) -v1 (THead (Bind b) x0 t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) -O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind -b) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead -(Flat Appl) v1 (THead (Bind b) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead -(Bind b) x1 (THead (Flat Appl) (lift (S O) O v2) t4)) (pr0_upsilon b H0 v1 v2 -H1 x0 x1 H17 t3 t4 H5) (subst0_fst v3 x1 u2 i H18 (THead (Flat Appl) (lift (S -O) O v2) t4) (Bind b))))))) H16)) (H4 v0 x0 (s (Flat Appl) i) H14 v3 H8)) w1 -H15))))) H12)) (\lambda (H12: (ex2 T (\lambda (t5: T).(eq T x (THead (Bind b) -u1 t5))) (\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 -t5)))).(ex2_ind T (\lambda (t5: T).(eq T x (THead (Bind b) u1 t5))) (\lambda -(t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)) (or (pr0 w1 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x0: T).(\lambda (H13: (eq T x -(THead (Bind b) u1 x0))).(\lambda (H14: (subst0 (s (Bind b) (s (Flat Appl) -i)) v0 t3 x0)).(let H15 \def (eq_ind T x (\lambda (t: T).(eq T w1 (THead -(Flat Appl) v1 t))) H10 (THead (Bind b) u1 x0) H13) in (eq_ind_r T (THead -(Flat Appl) v1 (THead (Bind b) u1 x0)) (\lambda (t: T).(or (pr0 t (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x0 t4) (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 -w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 x0)) (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) v1 (THead (Bind b) u1 x0)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (H16: (pr0 x0 t4)).(or_introl (pr0 (THead (Flat Appl) v1 (THead -(Bind b) u1 x0)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 -x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2))) (pr0_upsilon b H0 v1 v2 H1 u1 u2 H3 x0 t4 H16))) -(\lambda (H16: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 -(s (Bind b) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 -x0 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 w2)) -(or (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 x0)) (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) v1 (THead (Bind b) u1 x0)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x1: T).(\lambda (H17: (pr0 x0 x1)).(\lambda (H18: (subst0 (s (Bind -b) (s (Flat Appl) i)) v3 t4 x1)).(or_intror (pr0 (THead (Flat Appl) v1 (THead -(Bind b) u1 x0)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 -x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) v1 (THead (Bind b) u1 x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) x1)) (pr0_upsilon b H0 v1 v2 H1 u1 u2 H3 -x0 x1 H17) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) O v2) x1) -(THead (Flat Appl) (lift (S O) O v2) t4) i (subst0_snd (Flat Appl) v3 x1 t4 -(s (Bind b) i) H18 (lift (S O) O v2)) u2)))))) H16)) (H6 v0 x0 (s (Bind b) (s -(Flat Appl) i)) H14 v3 H8)) w1 H15))))) H12)) (\lambda (H12: (ex3_2 T T -(\lambda (u3: T).(\lambda (t5: T).(eq T x (THead (Bind b) u3 t5)))) (\lambda -(u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 -t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T x (THead (Bind -b) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 -u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) -v0 t3 t5))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H13: (eq T x (THead (Bind b) x0 -x1))).(\lambda (H14: (subst0 (s (Flat Appl) i) v0 u1 x0)).(\lambda (H15: -(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 x1)).(let H16 \def (eq_ind T x -(\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 t))) H10 (THead (Bind b) x0 -x1) H13) in (eq_ind_r T (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) -(\lambda (t: T).(or (pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) -O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind -(pr0 x1 t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s -(Bind b) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead (Flat Appl) v1 (THead -(Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 -x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2)))) (\lambda (H17: (pr0 x1 t4)).(or_ind (pr0 x0 u2) -(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) -i) v3 u2 w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2)))) (\lambda (H18: (pr0 x0 u2)).(or_introl (pr0 (THead (Flat Appl) v1 -(THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) -x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2))) (pr0_upsilon b H0 v1 v2 H1 x0 u2 H18 x1 t4 -H17))) (\lambda (H18: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 (s (Flat Appl) i) v3 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 -w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead -(Flat Appl) v1 (THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 -(THead (Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda -(H19: (pr0 x0 x2)).(\lambda (H20: (subst0 (s (Flat Appl) i) v3 u2 -x2)).(or_intror (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind -b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x2 (THead (Flat Appl) (lift -(S O) O v2) t4)) (pr0_upsilon b H0 v1 v2 H1 x0 x2 H19 x1 t4 H17) (subst0_fst -v3 x2 u2 i H20 (THead (Flat Appl) (lift (S O) O v2) t4) (Bind b))))))) H18)) -(H4 v0 x0 (s (Flat Appl) i) H14 v3 H8))) (\lambda (H17: (ex2 T (\lambda (w2: -T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s -(Bind b) (s (Flat Appl) i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) v1 (THead -(Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 -x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H18: (pr0 x1 -x2)).(\lambda (H19: (subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 x2)).(or_ind -(pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s -(Flat Appl) i) v3 u2 w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 -x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (H20: (pr0 x0 u2)).(or_intror (pr0 (THead (Flat -Appl) v1 (THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead -(Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) x2)) (pr0_upsilon b H0 v1 v2 -H1 x0 u2 H20 x1 x2 H18) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S -O) O v2) x2) (THead (Flat Appl) (lift (S O) O v2) t4) i (subst0_snd (Flat -Appl) v3 x2 t4 (s (Bind b) i) H19 (lift (S O) O v2)) u2)))) (\lambda (H20: -(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) -i) v3 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 (s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) v1 (THead -(Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 -x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2)))) (\lambda (x3: T).(\lambda (H21: (pr0 x0 -x3)).(\lambda (H22: (subst0 (s (Flat Appl) i) v3 u2 x3)).(or_intror (pr0 -(THead (Flat Appl) v1 (THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) -v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2)) (THead (Bind b) x3 (THead (Flat Appl) (lift (S O) O v2) x2)) -(pr0_upsilon b H0 v1 v2 H1 x0 x3 H21 x1 x2 H18) (subst0_both v3 u2 x3 i H22 -(Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat Appl) (lift (S -O) O v2) x2) (subst0_snd (Flat Appl) v3 x2 t4 (s (Bind b) i) H19 (lift (S O) -O v2)))))))) H20)) (H4 v0 x0 (s (Flat Appl) i) H14 v3 H8))))) H17)) (H6 v0 x1 -(s (Bind b) (s (Flat Appl) i)) H15 v3 H8)) w1 H16))))))) H12)) -(subst0_gen_head (Bind b) v0 u1 t3 x (s (Flat Appl) i) H11))))) H9)) (\lambda -(H9: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead (Flat Appl) -u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v0 v1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) u1 t3) -t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead -(Flat Appl) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v0 v1 u3))) -(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) -u1 t3) t5))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H10: (eq T w1 (THead (Flat Appl) x0 -x1))).(\lambda (H11: (subst0 i v0 v1 x0)).(\lambda (H12: (subst0 (s (Flat -Appl) i) v0 (THead (Bind b) u1 t3) x1)).(or3_ind (ex2 T (\lambda (u3: T).(eq -T x1 (THead (Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 -u1 u3))) (ex2 T (\lambda (t5: T).(eq T x1 (THead (Bind b) u1 t5))) (\lambda -(t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t5: T).(eq T x1 (THead (Bind b) u3 t5)))) (\lambda -(u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)))) (or -(pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H13: (ex2 T -(\lambda (u3: T).(eq T x1 (THead (Bind b) u3 t3))) (\lambda (u3: T).(subst0 -(s (Flat Appl) i) v0 u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq T x1 (THead -(Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 u1 u3)) (or -(pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda -(H14: (eq T x1 (THead (Bind b) x t3))).(\lambda (H15: (subst0 (s (Flat Appl) -i) v0 u1 x)).(let H16 \def (eq_ind T x1 (\lambda (t: T).(eq T w1 (THead (Flat -Appl) x0 t))) H10 (THead (Bind b) x t3) H14) in (eq_ind_r T (THead (Flat -Appl) x0 (THead (Bind b) x t3)) (\lambda (t: T).(or (pr0 t (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x u2) (ex2 T (\lambda (w2: -T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2))) (or -(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H17: -(pr0 x u2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda -(w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) -x t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (H18: (pr0 x0 v2)).(or_introl (pr0 (THead (Flat -Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) w2))) (pr0_upsilon b H0 x0 v2 H18 x u2 H17 -t3 t4 H5))) (\lambda (H18: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda -(w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x -t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H19: (pr0 x0 x2)).(\lambda -(H20: (subst0 i v3 v2 x2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind -b) x t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 -T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 -(THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O x2) t4)) (pr0_upsilon b H0 x0 x2 H19 x u2 H17 t3 t4 -H5) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) O x2) t4) (THead -(Flat Appl) (lift (S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x2) (lift (S -O) O v2) (s (Bind b) i) (subst0_lift_ge_s v2 x2 v3 i H20 O (le_O_n i) b) t4 -(Flat Appl)) u2)))))) H18)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H17: (ex2 T -(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s -(Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x -t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H18: (pr0 x x2)).(\lambda -(H19: (subst0 (s (Flat Appl) i) v3 u2 x2)).(or_ind (pr0 x0 v2) (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 -(THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) -x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H20: (pr0 x0 -v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x2 (THead (Flat Appl) (lift -(S O) O v2) t4)) (pr0_upsilon b H0 x0 v2 H20 x x2 H18 t3 t4 H5) (subst0_fst -v3 x2 u2 i H19 (THead (Flat Appl) (lift (S O) O v2) t4) (Bind b))))) (\lambda -(H20: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x3: T).(\lambda (H21: (pr0 x0 x3)).(\lambda (H22: (subst0 i v3 v2 -x3)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x2 (THead (Flat Appl) (lift -(S O) O x3) t4)) (pr0_upsilon b H0 x0 x3 H21 x x2 H18 t3 t4 H5) (subst0_both -v3 u2 x2 i H19 (Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat -Appl) (lift (S O) O x3) t4) (subst0_fst v3 (lift (S O) O x3) (lift (S O) O -v2) (s (Bind b) i) (subst0_lift_ge_s v2 x3 v3 i H22 O (le_O_n i) b) t4 (Flat -Appl)))))))) H20)) (H2 v0 x0 i H11 v3 H8))))) H17)) (H4 v0 x (s (Flat Appl) -i) H15 v3 H8)) w1 H16))))) H13)) (\lambda (H13: (ex2 T (\lambda (t5: T).(eq T -x1 (THead (Bind b) u1 t5))) (\lambda (t5: T).(subst0 (s (Bind b) (s (Flat -Appl) i)) v0 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq T x1 (THead (Bind b) -u1 t5))) (\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)) -(or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) -(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x: -T).(\lambda (H14: (eq T x1 (THead (Bind b) u1 x))).(\lambda (H15: (subst0 (s -(Bind b) (s (Flat Appl) i)) v0 t3 x)).(let H16 \def (eq_ind T x1 (\lambda (t: -T).(eq T w1 (THead (Flat Appl) x0 t))) H10 (THead (Bind b) u1 x) H14) in -(eq_ind_r T (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (\lambda (t: T).(or -(pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x t4) (ex2 T -(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat -Appl) i)) v3 t4 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda -(w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2)))) (\lambda (H17: (pr0 x t4)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat -Appl) x0 (THead (Bind b) u1 x)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H18: (pr0 x0 -v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (pr0_upsilon b H0 x0 v2 H18 u1 u2 H3 x t4 H17))) (\lambda (H18: (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x2: T).(\lambda (H19: (pr0 x0 x2)).(\lambda (H20: (subst0 i v3 v2 -x2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O x2) t4)) (pr0_upsilon b H0 x0 x2 H19 u1 u2 H3 x t4 H17) (subst0_snd -(Bind b) v3 (THead (Flat Appl) (lift (S O) O x2) t4) (THead (Flat Appl) (lift -(S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x2) (lift (S O) O v2) (s (Bind -b) i) (subst0_lift_ge_s v2 x2 v3 i H20 O (le_O_n i) b) t4 (Flat Appl)) -u2)))))) H18)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H17: (ex2 T (\lambda (w2: -T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s -(Bind b) (s (Flat Appl) i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead -(Bind b) u1 x)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) -(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) -w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H18: (pr0 x -x2)).(\lambda (H19: (subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 x2)).(or_ind -(pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i -v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2)))) (\lambda (H20: (pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 -(THead (Bind b) u1 x)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) -u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead -(Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) x2)) (pr0_upsilon b H0 x0 v2 -H20 u1 u2 H3 x x2 H18) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) -O v2) x2) (THead (Flat Appl) (lift (S O) O v2) t4) i (subst0_snd (Flat Appl) -v3 x2 t4 (s (Bind b) i) H19 (lift (S O) O v2)) u2)))) (\lambda (H20: (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x3: T).(\lambda (H21: (pr0 x0 x3)).(\lambda (H22: (subst0 i v3 v2 -x3)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O x3) x2)) (pr0_upsilon b H0 x0 x3 H21 u1 u2 H3 x x2 H18) (subst0_snd -(Bind b) v3 (THead (Flat Appl) (lift (S O) O x3) x2) (THead (Flat Appl) (lift -(S O) O v2) t4) i (subst0_both v3 (lift (S O) O v2) (lift (S O) O x3) (s -(Bind b) i) (subst0_lift_ge_s v2 x3 v3 i H22 O (le_O_n i) b) (Flat Appl) t4 -x2 H19) u2)))))) H20)) (H2 v0 x0 i H11 v3 H8))))) H17)) (H6 v0 x (s (Bind b) -(s (Flat Appl) i)) H15 v3 H8)) w1 H16))))) H13)) (\lambda (H13: (ex3_2 T T -(\lambda (u3: T).(\lambda (t5: T).(eq T x1 (THead (Bind b) u3 t5)))) (\lambda -(u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 -t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T x1 (THead -(Bind b) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) -v0 u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat -Appl) i)) v0 t3 t5))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T x1 (THead (Bind -b) x2 x3))).(\lambda (H15: (subst0 (s (Flat Appl) i) v0 u1 x2)).(\lambda -(H16: (subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 x3)).(let H17 \def (eq_ind -T x1 (\lambda (t: T).(eq T w1 (THead (Flat Appl) x0 t))) H10 (THead (Bind b) -x2 x3) H14) in (eq_ind_r T (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) -(\lambda (t: T).(or (pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) -O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind -(pr0 x3 t4) (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 (s -(Bind b) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead (Flat Appl) x0 (THead -(Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 -x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2)))) (\lambda (H18: (pr0 x3 t4)).(or_ind (pr0 x2 u2) -(ex2 T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) -i) v3 u2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2)))) (\lambda (H19: (pr0 x2 u2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat -Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead -(Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H20: (pr0 x0 -v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (pr0_upsilon b H0 x0 v2 H20 x2 u2 H19 x3 t4 H18))) (\lambda (H20: (ex2 -T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind -b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x: T).(\lambda (H21: (pr0 x0 x)).(\lambda (H22: (subst0 i v3 v2 -x)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O x) t4)) (pr0_upsilon b H0 x0 x H21 x2 u2 H19 x3 t4 H18) (subst0_snd -(Bind b) v3 (THead (Flat Appl) (lift (S O) O x) t4) (THead (Flat Appl) (lift -(S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x) (lift (S O) O v2) (s (Bind -b) i) (subst0_lift_ge_s v2 x v3 i H22 O (le_O_n i) b) t4 (Flat Appl)) -u2)))))) H20)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H19: (ex2 T (\lambda (w2: -T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s -(Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 -x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda (H20: (pr0 x2 x)).(\lambda -(H21: (subst0 (s (Flat Appl) i) v3 u2 x)).(or_ind (pr0 x0 v2) (ex2 T (\lambda -(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead -(Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 -(THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H22: (pr0 x0 -v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x (THead (Flat Appl) (lift -(S O) O v2) t4)) (pr0_upsilon b H0 x0 v2 H22 x2 x H20 x3 t4 H18) (subst0_fst -v3 x u2 i H21 (THead (Flat Appl) (lift (S O) O v2) t4) (Bind b))))) (\lambda -(H22: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind -b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x4: T).(\lambda (H23: (pr0 x0 x4)).(\lambda (H24: (subst0 i v3 v2 -x4)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x (THead (Flat Appl) (lift -(S O) O x4) t4)) (pr0_upsilon b H0 x0 x4 H23 x2 x H20 x3 t4 H18) (subst0_both -v3 u2 x i H21 (Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat -Appl) (lift (S O) O x4) t4) (subst0_fst v3 (lift (S O) O x4) (lift (S O) O -v2) (s (Bind b) i) (subst0_lift_ge_s v2 x4 v3 i H24 O (le_O_n i) b) t4 (Flat -Appl)))))))) H22)) (H2 v0 x0 i H11 v3 H8))))) H19)) (H4 v0 x2 (s (Flat Appl) -i) H15 v3 H8))) (\lambda (H18: (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda -(w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T -(\lambda (w2: T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat -Appl) i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) -(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda -(w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2)))) (\lambda (x: T).(\lambda (H19: (pr0 x3 x)).(\lambda (H20: (subst0 (s -(Bind b) (s (Flat Appl) i)) v3 t4 x)).(or_ind (pr0 x2 u2) (ex2 T (\lambda -(w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2))) -(or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (H21: (pr0 x2 u2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 -x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 -(THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) -x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H22: (pr0 x0 v2)).(or_intror -(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -x)) (pr0_upsilon b H0 x0 v2 H22 x2 u2 H21 x3 x H19) (subst0_snd (Bind b) v3 -(THead (Flat Appl) (lift (S O) O v2) x) (THead (Flat Appl) (lift (S O) O v2) -t4) i (subst0_snd (Flat Appl) v3 x t4 (s (Bind b) i) H20 (lift (S O) O v2)) -u2)))) (\lambda (H22: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda -(w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) -x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2)))) (\lambda (x4: T).(\lambda (H23: (pr0 x0 x4)).(\lambda -(H24: (subst0 i v3 v2 x4)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind -b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 -T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) -(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S -O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 -(THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O x4) x)) (pr0_upsilon b H0 x0 x4 H23 x2 u2 H21 x3 x -H19) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) O x4) x) (THead -(Flat Appl) (lift (S O) O v2) t4) i (subst0_both v3 (lift (S O) O v2) (lift -(S O) O x4) (s (Bind b) i) (subst0_lift_ge_s v2 x4 v3 i H24 O (le_O_n i) b) -(Flat Appl) t4 x H20) u2)))))) H22)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H21: -(ex2 T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) -i) v3 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: -T).(subst0 (s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead -(Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 -x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2)))) (\lambda (x4: T).(\lambda (H22: (pr0 x2 -x4)).(\lambda (H23: (subst0 (s (Flat Appl) i) v3 u2 x4)).(or_ind (pr0 x0 v2) -(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) -(or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (H24: (pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead -(Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 -x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat -Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x4 -(THead (Flat Appl) (lift (S O) O v2) x)) (pr0_upsilon b H0 x0 v2 H24 x2 x4 -H22 x3 x H19) (subst0_both v3 u2 x4 i H23 (Bind b) (THead (Flat Appl) (lift -(S O) O v2) t4) (THead (Flat Appl) (lift (S O) O v2) x) (subst0_snd (Flat -Appl) v3 x t4 (s (Bind b) i) H20 (lift (S O) O v2)))))) (\lambda (H24: (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 -v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind -b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i -v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) -(\lambda (x5: T).(\lambda (H25: (pr0 x0 x5)).(\lambda (H26: (subst0 i v3 v2 -x5)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: -T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) -w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind -b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x4 (THead (Flat Appl) (lift -(S O) O x5) x)) (pr0_upsilon b H0 x0 x5 H25 x2 x4 H22 x3 x H19) (subst0_both -v3 u2 x4 i H23 (Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat -Appl) (lift (S O) O x5) x) (subst0_both v3 (lift (S O) O v2) (lift (S O) O -x5) (s (Bind b) i) (subst0_lift_ge_s v2 x5 v3 i H26 O (le_O_n i) b) (Flat -Appl) t4 x H20))))))) H24)) (H2 v0 x0 i H11 v3 H8))))) H21)) (H4 v0 x2 (s -(Flat Appl) i) H15 v3 H8))))) H18)) (H6 v0 x3 (s (Bind b) (s (Flat Appl) i)) -H16 v3 H8)) w1 H17))))))) H13)) (subst0_gen_head (Bind b) v0 u1 t3 x1 (s -(Flat Appl) i) H12))))))) H9)) (subst0_gen_head (Flat Appl) v0 v1 (THead -(Bind b) u1 t3) w1 i H7)))))))))))))))))))))) (\lambda (u1: T).(\lambda (u2: -T).(\lambda (H0: (pr0 u1 u2)).(\lambda (H1: ((\forall (v1: T).(\forall (w1: -T).(\forall (i: nat).((subst0 i v1 u1 w1) \to (\forall (v2: T).((pr0 v1 v2) -\to (or (pr0 w1 u2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 u2 w2)))))))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda -(H2: (pr0 t3 t4)).(\lambda (H3: ((\forall (v1: T).(\forall (w1: T).(\forall -(i: nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 -w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 -w2)))))))))))).(\lambda (w: T).(\lambda (H4: (subst0 O u2 t4 w)).(\lambda -(v1: T).(\lambda (w1: T).(\lambda (i: nat).(\lambda (H5: (subst0 i v1 (THead -(Bind Abbr) u1 t3) w1)).(\lambda (v2: T).(\lambda (H6: (pr0 v1 v2)).(or3_ind -(ex2 T (\lambda (u3: T).(eq T w1 (THead (Bind Abbr) u3 t3))) (\lambda (u3: -T).(subst0 i v1 u1 u3))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind Abbr) -u1 t5))) (\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead (Bind Abbr) u3 t5)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 i v1 u1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5)))) (or (pr0 w1 (THead -(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H7: (ex2 T (\lambda -(u3: T).(eq T w1 (THead (Bind Abbr) u3 t3))) (\lambda (u3: T).(subst0 i v1 u1 -u3)))).(ex2_ind T (\lambda (u3: T).(eq T w1 (THead (Bind Abbr) u3 t3))) -(\lambda (u3: T).(subst0 i v1 u1 u3)) (or (pr0 w1 (THead (Bind Abbr) u2 w)) -(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 (THead -(Bind Abbr) u2 w) w2)))) (\lambda (x: T).(\lambda (H8: (eq T w1 (THead (Bind -Abbr) x t3))).(\lambda (H9: (subst0 i v1 u1 x)).(eq_ind_r T (THead (Bind -Abbr) x t3) (\lambda (t: T).(or (pr0 t (THead (Bind Abbr) u2 w)) (ex2 T -(\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) -u2 w) w2))))) (or_ind (pr0 x u2) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda -(w2: T).(subst0 i v2 u2 w2))) (or (pr0 (THead (Bind Abbr) x t3) (THead (Bind -Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H10: -(pr0 x u2)).(or_introl (pr0 (THead (Bind Abbr) x t3) (THead (Bind Abbr) u2 -w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) (\lambda (w2: -T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (pr0_delta x u2 H10 t3 t4 H2 w -H4))) (\lambda (H10: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: -T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda -(w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead (Bind Abbr) x t3) (THead (Bind -Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x0: -T).(\lambda (H11: (pr0 x x0)).(\lambda (H12: (subst0 i v2 u2 x0)).(ex2_ind T -(\lambda (t: T).(subst0 O x0 t4 t)) (\lambda (t: T).(subst0 (S (plus i O)) v2 -w t)) (or (pr0 (THead (Bind Abbr) x t3) (THead (Bind Abbr) u2 w)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x1: T).(\lambda (H13: (subst0 -O x0 t4 x1)).(\lambda (H14: (subst0 (S (plus i O)) v2 w x1)).(let H15 \def -(f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in -(let H16 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n v2 w -x1)) H14 (S i) H15) in (or_intror (pr0 (THead (Bind Abbr) x t3) (THead (Bind -Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) x0 x1) (pr0_delta x x0 -H11 t3 t4 H2 x1 H13) (subst0_both v2 u2 x0 i H12 (Bind Abbr) w x1 H16)))))))) -(subst0_subst0_back t4 w u2 O H4 x0 v2 i H12))))) H10)) (H1 v1 x i H9 v2 H6)) -w1 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind -Abbr) u1 t5))) (\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 -t5)))).(ex2_ind T (\lambda (t5: T).(eq T w1 (THead (Bind Abbr) u1 t5))) -(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5)) (or (pr0 w1 (THead -(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x: T).(\lambda (H8: -(eq T w1 (THead (Bind Abbr) u1 x))).(\lambda (H9: (subst0 (s (Bind Abbr) i) -v1 t3 x)).(eq_ind_r T (THead (Bind Abbr) u1 x) (\lambda (t: T).(or (pr0 t -(THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: -T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))))) (or_ind (pr0 x t4) (ex2 T -(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) i) v2 t4 -w2))) (or (pr0 (THead (Bind Abbr) u1 x) (THead (Bind Abbr) u2 w)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 x) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H10: (pr0 x t4)).(or_introl -(pr0 (THead (Bind Abbr) u1 x) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: -T).(pr0 (THead (Bind Abbr) u1 x) w2)) (\lambda (w2: T).(subst0 i v2 (THead -(Bind Abbr) u2 w) w2))) (pr0_delta u1 u2 H0 x t4 H10 w H4))) (\lambda (H10: -(ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) -i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: -T).(subst0 (s (Bind Abbr) i) v2 t4 w2)) (or (pr0 (THead (Bind Abbr) u1 x) -(THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 -x) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) -(\lambda (x0: T).(\lambda (H11: (pr0 x x0)).(\lambda (H12: (subst0 (s (Bind -Abbr) i) v2 t4 x0)).(ex2_ind T (\lambda (t: T).(subst0 O u2 x0 t)) (\lambda -(t: T).(subst0 (s (Bind Abbr) i) v2 w t)) (or (pr0 (THead (Bind Abbr) u1 x) -(THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 -x) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) -(\lambda (x1: T).(\lambda (H13: (subst0 O u2 x0 x1)).(\lambda (H14: (subst0 -(s (Bind Abbr) i) v2 w x1)).(or_intror (pr0 (THead (Bind Abbr) u1 x) (THead -(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 x) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 x) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) u2 x1) (pr0_delta u1 u2 -H0 x x0 H11 x1 H13) (subst0_snd (Bind Abbr) v2 x1 w i H14 u2)))))) -(subst0_confluence_neq t4 x0 v2 (s (Bind Abbr) i) H12 w u2 O H4 (sym_not_eq -nat O (S i) (O_S i))))))) H10)) (H3 v1 x (s (Bind Abbr) i) H9 v2 H6)) w1 -H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T -w1 (THead (Bind Abbr) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v1 -u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 -t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead -(Bind Abbr) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v1 u1 u3))) -(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5))) (or -(pr0 w1 (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H8: (eq T w1 (THead (Bind Abbr) x0 -x1))).(\lambda (H9: (subst0 i v1 u1 x0)).(\lambda (H10: (subst0 (s (Bind -Abbr) i) v1 t3 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or -(pr0 t (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda -(w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))))) (or_ind (pr0 x1 t4) -(ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) -i) v2 t4 w2))) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) -(ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: -T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H11: (pr0 x1 -t4)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 i v2 u2 w2))) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind -Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H12: -(pr0 x0 u2)).(or_introl (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 -w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: -T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (pr0_delta x0 u2 H12 x1 t4 H11 -w H4))) (\lambda (H12: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: -T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda -(w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind -Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x: -T).(\lambda (H13: (pr0 x0 x)).(\lambda (H14: (subst0 i v2 u2 x)).(ex2_ind T -(\lambda (t: T).(subst0 O x t4 t)) (\lambda (t: T).(subst0 (S (plus i O)) v2 -w t)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x2: T).(\lambda (H15: (subst0 -O x t4 x2)).(\lambda (H16: (subst0 (S (plus i O)) v2 w x2)).(let H17 \def -(f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in -(let H18 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n v2 w -x2)) H16 (S i) H17) in (or_intror (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind -Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) x x2) (pr0_delta x0 x -H13 x1 t4 H11 x2 H15) (subst0_both v2 u2 x i H14 (Bind Abbr) w x2 H18)))))))) -(subst0_subst0_back t4 w u2 O H4 x v2 i H14))))) H12)) (H1 v1 x0 i H9 v2 -H6))) (\lambda (H11: (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: -T).(subst0 (s (Bind Abbr) i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 -w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) i) v2 t4 w2)) (or (pr0 (THead -(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 -(THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind -Abbr) u2 w) w2)))) (\lambda (x: T).(\lambda (H12: (pr0 x1 x)).(\lambda (H13: -(subst0 (s (Bind Abbr) i) v2 t4 x)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: -T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2))) (or (pr0 (THead (Bind -Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead -(Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 -w) w2)))) (\lambda (H14: (pr0 x0 u2)).(ex2_ind T (\lambda (t: T).(subst0 O u2 -x t)) (\lambda (t: T).(subst0 (s (Bind Abbr) i) v2 w t)) (or (pr0 (THead -(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 -(THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind -Abbr) u2 w) w2)))) (\lambda (x2: T).(\lambda (H15: (subst0 O u2 x -x2)).(\lambda (H16: (subst0 (s (Bind Abbr) i) v2 w x2)).(or_intror (pr0 -(THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: -T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead -(Bind Abbr) u2 w) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) -x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)) -(THead (Bind Abbr) u2 x2) (pr0_delta x0 u2 H14 x1 x H12 x2 H15) (subst0_snd -(Bind Abbr) v2 x2 w i H16 u2)))))) (subst0_confluence_neq t4 x v2 (s (Bind -Abbr) i) H13 w u2 O H4 (sym_not_eq nat O (S i) (O_S i))))) (\lambda (H14: -(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 -u2 w2)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x0 -x2)).(\lambda (H16: (subst0 i v2 u2 x2)).(ex2_ind T (\lambda (t: T).(subst0 O -x2 t4 t)) (\lambda (t: T).(subst0 (S (plus i O)) v2 w t)) (or (pr0 (THead -(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 -(THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind -Abbr) u2 w) w2)))) (\lambda (x3: T).(\lambda (H17: (subst0 O x2 t4 -x3)).(\lambda (H18: (subst0 (S (plus i O)) v2 w x3)).(let H19 \def (f_equal -nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H20 -\def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n v2 w x3)) H18 (S -i) H19) in (ex2_ind T (\lambda (t: T).(subst0 (s (Bind Abbr) i) v2 x3 t)) -(\lambda (t: T).(subst0 O x2 x t)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead -(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) -w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda -(x4: T).(\lambda (H21: (subst0 (s (Bind Abbr) i) v2 x3 x4)).(\lambda (H22: -(subst0 O x2 x x4)).(or_intror (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind -Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T -(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 -i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) x2 x4) (pr0_delta x0 x2 -H15 x1 x H12 x4 H22) (subst0_both v2 u2 x2 i H16 (Bind Abbr) w x4 -(subst0_trans x3 w v2 (s (Bind Abbr) i) H20 x4 H21))))))) -(subst0_confluence_neq t4 x3 x2 O H17 x v2 (s (Bind Abbr) i) H13 (O_S -i)))))))) (subst0_subst0_back t4 w u2 O H4 x2 v2 i H16))))) H14)) (H1 v1 x0 i -H9 v2 H6))))) H11)) (H3 v1 x1 (s (Bind Abbr) i) H10 v2 H6)) w1 H8)))))) H7)) -(subst0_gen_head (Bind Abbr) v1 u1 t3 w1 i H5)))))))))))))))))) (\lambda (b: -B).(\lambda (H0: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (H1: (pr0 t3 t4)).(\lambda (H2: ((\forall (v1: T).(\forall (w1: -T).(\forall (i: nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) -\to (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)))))))))))).(\lambda (u: T).(\lambda (v1: T).(\lambda -(w1: T).(\lambda (i: nat).(\lambda (H3: (subst0 i v1 (THead (Bind b) u (lift -(S O) O t3)) w1)).(\lambda (v2: T).(\lambda (H4: (pr0 v1 v2)).(or3_ind (ex2 T -(\lambda (u2: T).(eq T w1 (THead (Bind b) u2 (lift (S O) O t3)))) (\lambda -(u2: T).(subst0 i v1 u u2))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind b) -u t5))) (\lambda (t5: T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T w1 (THead (Bind b) u2 -t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5)))) (or -(pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i -v2 t4 w2)))) (\lambda (H5: (ex2 T (\lambda (u2: T).(eq T w1 (THead (Bind b) -u2 (lift (S O) O t3)))) (\lambda (u2: T).(subst0 i v1 u u2)))).(ex2_ind T -(\lambda (u2: T).(eq T w1 (THead (Bind b) u2 (lift (S O) O t3)))) (\lambda -(u2: T).(subst0 i v1 u u2)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 -w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H6: -(eq T w1 (THead (Bind b) x (lift (S O) O t3)))).(\lambda (_: (subst0 i v1 u -x)).(eq_ind_r T (THead (Bind b) x (lift (S O) O t3)) (\lambda (t: T).(or (pr0 -t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 -w2))))) (or_introl (pr0 (THead (Bind b) x (lift (S O) O t3)) t4) (ex2 T -(\lambda (w2: T).(pr0 (THead (Bind b) x (lift (S O) O t3)) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2))) (pr0_zeta b H0 t3 t4 H1 x)) w1 H6)))) H5)) (\lambda -(H5: (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind b) u t5))) (\lambda (t5: -T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5)))).(ex2_ind T (\lambda -(t5: T).(eq T w1 (THead (Bind b) u t5))) (\lambda (t5: T).(subst0 (s (Bind b) -i) v1 (lift (S O) O t3) t5)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 -w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H6: -(eq T w1 (THead (Bind b) u x))).(\lambda (H7: (subst0 (s (Bind b) i) v1 (lift -(S O) O t3) x)).(lt_le_e (s (Bind b) i) (S O) (or (pr0 w1 t4) (ex2 T (\lambda -(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (H8: -(lt (s (Bind b) i) (S O))).(subst0_gen_lift_false t3 v1 x (S O) O (s (Bind b) -i) (le_O_n (s (Bind b) i)) H8 H7 (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 -w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))))) (\lambda (Hle: (le (S O) (s -(Bind b) i))).(let H_x \def (subst0_gen_lift_ge v1 t3 x (s (Bind b) i) (S O) -O H7 Hle) in (let H8 \def H_x in (ex2_ind T (\lambda (t5: T).(eq T x (lift (S -O) O t5))) (\lambda (t5: T).(subst0 (minus i O) v1 t3 t5)) (or (pr0 w1 t4) -(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) -(\lambda (x0: T).(\lambda (H9: (eq T x (lift (S O) O x0))).(\lambda (H10: -(subst0 (minus i O) v1 t3 x0)).(let H11 \def (eq_ind T x (\lambda (t: T).(eq -T w1 (THead (Bind b) u t))) H6 (lift (S O) O x0) H9) in (eq_ind_r T (THead -(Bind b) u (lift (S O) O x0)) (\lambda (t: T).(or (pr0 t t4) (ex2 T (\lambda -(w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))))) (let H12 \def -(eq_ind_r nat (minus i O) (\lambda (n: nat).(subst0 n v1 t3 x0)) H10 i -(minus_n_O i)) in (or_ind (pr0 x0 t4) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) -(\lambda (w2: T).(subst0 i v2 t4 w2))) (or (pr0 (THead (Bind b) u (lift (S O) -O x0)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) -w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (H13: (pr0 x0 -t4)).(or_introl (pr0 (THead (Bind b) u (lift (S O) O x0)) t4) (ex2 T (\lambda -(w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2))) (pr0_zeta b H0 x0 t4 H13 u))) (\lambda (H13: (ex2 T -(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 t4 -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 -t4 w2)) (or (pr0 (THead (Bind b) u (lift (S O) O x0)) t4) (ex2 T (\lambda -(w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)))) (\lambda (x1: T).(\lambda (H14: (pr0 x0 -x1)).(\lambda (H15: (subst0 i v2 t4 x1)).(or_intror (pr0 (THead (Bind b) u -(lift (S O) O x0)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) u (lift -(S O) O x0)) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (ex_intro2 T -(\lambda (w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)) x1 (pr0_zeta b H0 x0 x1 H14 u) H15))))) H13)) (H2 v1 -x0 i H12 v2 H4))) w1 H11))))) H8)))))))) H5)) (\lambda (H5: (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T w1 (THead (Bind b) u2 t5)))) (\lambda -(u2: T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t5: T).(eq T w1 (THead (Bind b) u2 t5)))) (\lambda -(u2: T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5))) (or (pr0 w1 t4) (ex2 T -(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T w1 (THead (Bind b) x0 -x1))).(\lambda (_: (subst0 i v1 u x0)).(\lambda (H8: (subst0 (s (Bind b) i) -v1 (lift (S O) O t3) x1)).(lt_le_e (s (Bind b) i) (S O) (or (pr0 w1 t4) (ex2 -T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) -(\lambda (H9: (lt (s (Bind b) i) (S O))).(subst0_gen_lift_false t3 v1 x1 (S -O) O (s (Bind b) i) (le_O_n (s (Bind b) i)) H9 H8 (or (pr0 w1 t4) (ex2 T -(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))))) -(\lambda (Hle: (le (S O) (s (Bind b) i))).(let H_x \def (subst0_gen_lift_ge -v1 t3 x1 (s (Bind b) i) (S O) O H8 Hle) in (let H9 \def H_x in (ex2_ind T -(\lambda (t5: T).(eq T x1 (lift (S O) O t5))) (\lambda (t5: T).(subst0 (minus -i O) v1 t3 t5)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda -(w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H10: (eq T x1 (lift -(S O) O x))).(\lambda (H11: (subst0 (minus i O) v1 t3 x)).(let H12 \def -(eq_ind T x1 (\lambda (t: T).(eq T w1 (THead (Bind b) x0 t))) H6 (lift (S O) -O x) H10) in (eq_ind_r T (THead (Bind b) x0 (lift (S O) O x)) (\lambda (t: -T).(or (pr0 t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2))))) (let H13 \def (eq_ind_r nat (minus i O) (\lambda -(n: nat).(subst0 n v1 t3 x)) H11 i (minus_n_O i)) in (or_ind (pr0 x t4) (ex2 -T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (or -(pr0 (THead (Bind b) x0 (lift (S O) O x)) t4) (ex2 T (\lambda (w2: T).(pr0 -(THead (Bind b) x0 (lift (S O) O x)) w2)) (\lambda (w2: T).(subst0 i v2 t4 -w2)))) (\lambda (H14: (pr0 x t4)).(or_introl (pr0 (THead (Bind b) x0 (lift (S -O) O x)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) x0 (lift (S O) O -x)) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (pr0_zeta b H0 x t4 H14 x0))) -(\lambda (H14: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i -v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 -i v2 t4 w2)) (or (pr0 (THead (Bind b) x0 (lift (S O) O x)) t4) (ex2 T -(\lambda (w2: T).(pr0 (THead (Bind b) x0 (lift (S O) O x)) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x -x2)).(\lambda (H16: (subst0 i v2 t4 x2)).(or_intror (pr0 (THead (Bind b) x0 -(lift (S O) O x)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) x0 (lift -(S O) O x)) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (ex_intro2 T (\lambda -(w2: T).(pr0 (THead (Bind b) x0 (lift (S O) O x)) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)) x2 (pr0_zeta b H0 x x2 H15 x0) H16))))) H14)) (H2 v1 -x i H13 v2 H4))) w1 H12))))) H9)))))))))) H5)) (subst0_gen_head (Bind b) v1 u -(lift (S O) O t3) w1 i H3))))))))))))))) (\lambda (t3: T).(\lambda (t4: -T).(\lambda (H0: (pr0 t3 t4)).(\lambda (H1: ((\forall (v1: T).(\forall (w1: -T).(\forall (i: nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) -\to (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)))))))))))).(\lambda (u: T).(\lambda (v1: T).(\lambda -(w1: T).(\lambda (i: nat).(\lambda (H2: (subst0 i v1 (THead (Flat Cast) u t3) -w1)).(\lambda (v2: T).(\lambda (H3: (pr0 v1 v2)).(or3_ind (ex2 T (\lambda -(u2: T).(eq T w1 (THead (Flat Cast) u2 t3))) (\lambda (u2: T).(subst0 i v1 u -u2))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Flat Cast) u t5))) (\lambda -(t5: T).(subst0 (s (Flat Cast) i) v1 t3 t5))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T w1 (THead (Flat Cast) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Flat Cast) i) v1 t3 t5)))) (or (pr0 w1 t4) (ex2 T (\lambda -(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (H4: -(ex2 T (\lambda (u2: T).(eq T w1 (THead (Flat Cast) u2 t3))) (\lambda (u2: -T).(subst0 i v1 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T w1 (THead (Flat -Cast) u2 t3))) (\lambda (u2: T).(subst0 i v1 u u2)) (or (pr0 w1 t4) (ex2 T -(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) -(\lambda (x: T).(\lambda (H5: (eq T w1 (THead (Flat Cast) x t3))).(\lambda -(_: (subst0 i v1 u x)).(eq_ind_r T (THead (Flat Cast) x t3) (\lambda (t: -T).(or (pr0 t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2))))) (or_introl (pr0 (THead (Flat Cast) x t3) t4) (ex2 -T (\lambda (w2: T).(pr0 (THead (Flat Cast) x t3) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2))) (pr0_tau t3 t4 H0 x)) w1 H5)))) H4)) (\lambda (H4: -(ex2 T (\lambda (t5: T).(eq T w1 (THead (Flat Cast) u t5))) (\lambda (t5: -T).(subst0 (s (Flat Cast) i) v1 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq T -w1 (THead (Flat Cast) u t5))) (\lambda (t5: T).(subst0 (s (Flat Cast) i) v1 -t3 t5)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H5: (eq T w1 (THead (Flat -Cast) u x))).(\lambda (H6: (subst0 (s (Flat Cast) i) v1 t3 x)).(eq_ind_r T -(THead (Flat Cast) u x) (\lambda (t: T).(or (pr0 t t4) (ex2 T (\lambda (w2: -T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))))) (or_ind (pr0 x t4) -(ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Cast) -i) v2 t4 w2))) (or (pr0 (THead (Flat Cast) u x) t4) (ex2 T (\lambda (w2: -T).(pr0 (THead (Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) -(\lambda (H7: (pr0 x t4)).(or_introl (pr0 (THead (Flat Cast) u x) t4) (ex2 T -(\lambda (w2: T).(pr0 (THead (Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i -v2 t4 w2))) (pr0_tau x t4 H7 u))) (\lambda (H7: (ex2 T (\lambda (w2: T).(pr0 -x w2)) (\lambda (w2: T).(subst0 (s (Flat Cast) i) v2 t4 w2)))).(ex2_ind T -(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Cast) i) v2 t4 -w2)) (or (pr0 (THead (Flat Cast) u x) t4) (ex2 T (\lambda (w2: T).(pr0 (THead -(Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x0: -T).(\lambda (H8: (pr0 x x0)).(\lambda (H9: (subst0 (s (Flat Cast) i) v2 t4 -x0)).(or_intror (pr0 (THead (Flat Cast) u x) t4) (ex2 T (\lambda (w2: T).(pr0 -(THead (Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) -(ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) u x) w2)) (\lambda (w2: -T).(subst0 i v2 t4 w2)) x0 (pr0_tau x x0 H8 u) H9))))) H7)) (H1 v1 x (s (Flat -Cast) i) H6 v2 H3)) w1 H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T w1 (THead (Flat Cast) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Flat Cast) i) v1 t3 t5))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t5: T).(eq T w1 (THead (Flat Cast) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s (Flat Cast) i) v1 t3 t5))) (or (pr0 w1 t4) (ex2 T (\lambda (w2: -T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H5: (eq T w1 (THead (Flat Cast) x0 -x1))).(\lambda (_: (subst0 i v1 u x0)).(\lambda (H7: (subst0 (s (Flat Cast) -i) v1 t3 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t: T).(or (pr0 -t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 -w2))))) (or_ind (pr0 x1 t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda -(w2: T).(subst0 (s (Flat Cast) i) v2 t4 w2))) (or (pr0 (THead (Flat Cast) x0 -x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) x0 x1) w2)) (\lambda -(w2: T).(subst0 i v2 t4 w2)))) (\lambda (H8: (pr0 x1 t4)).(or_introl (pr0 -(THead (Flat Cast) x0 x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) -x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (pr0_tau x1 t4 H8 x0))) -(\lambda (H8: (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 -(s (Flat Cast) i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 w2)) -(\lambda (w2: T).(subst0 (s (Flat Cast) i) v2 t4 w2)) (or (pr0 (THead (Flat -Cast) x0 x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) x0 x1) w2)) -(\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H9: (pr0 x1 -x)).(\lambda (H10: (subst0 (s (Flat Cast) i) v2 t4 x)).(or_intror (pr0 (THead -(Flat Cast) x0 x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) x0 x1) -w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (ex_intro2 T (\lambda (w2: -T).(pr0 (THead (Flat Cast) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)) -x (pr0_tau x1 x H9 x0) H10))))) H8)) (H1 v1 x1 (s (Flat Cast) i) H7 v2 H3)) -w1 H5)))))) H4)) (subst0_gen_head (Flat Cast) v1 u t3 w1 i H2))))))))))))) t1 -t2 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1/pr0/subst1.ma deleted file mode 100644 index 05a93172a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr0/subst1.ma +++ /dev/null @@ -1,93 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/subst0.ma". - -include "basic_1/subst1/fwd.ma". - -lemma pr0_delta1: - \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: T).(\forall -(t2: T).((pr0 t1 t2) \to (\forall (w: T).((subst1 O u2 t2 w) \to (pr0 (THead -(Bind Abbr) u1 t1) (THead (Bind Abbr) u2 w))))))))) -\def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u1 u2)).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H0: (pr0 t1 t2)).(\lambda (w: T).(\lambda (H1: -(subst1 O u2 t2 w)).(subst1_ind O u2 t2 (\lambda (t: T).(pr0 (THead (Bind -Abbr) u1 t1) (THead (Bind Abbr) u2 t))) (pr0_comp u1 u2 H t1 t2 H0 (Bind -Abbr)) (\lambda (t0: T).(\lambda (H2: (subst0 O u2 t2 t0)).(pr0_delta u1 u2 H -t1 t2 H0 t0 H2))) w H1)))))))). - -lemma pr0_subst1_back: - \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst1 -i u2 t1 t2) \to (\forall (u1: T).((pr0 u1 u2) \to (ex2 T (\lambda (t: -T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t2))))))))) -\def - \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda -(H: (subst1 i u2 t1 t2)).(subst1_ind i u2 t1 (\lambda (t: T).(\forall (u1: -T).((pr0 u1 u2) \to (ex2 T (\lambda (t0: T).(subst1 i u1 t1 t0)) (\lambda -(t0: T).(pr0 t0 t)))))) (\lambda (u1: T).(\lambda (_: (pr0 u1 u2)).(ex_intro2 -T (\lambda (t: T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t1)) t1 -(subst1_refl i u1 t1) (pr0_refl t1)))) (\lambda (t0: T).(\lambda (H0: (subst0 -i u2 t1 t0)).(\lambda (u1: T).(\lambda (H1: (pr0 u1 u2)).(ex2_ind T (\lambda -(t: T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t t0)) (ex2 T (\lambda (t: -T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t0))) (\lambda (x: T).(\lambda -(H2: (subst0 i u1 t1 x)).(\lambda (H3: (pr0 x t0)).(ex_intro2 T (\lambda (t: -T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t0)) x (subst1_single i u1 t1 x -H2) H3)))) (pr0_subst0_back u2 t1 t0 i H0 u1 H1)))))) t2 H))))). - -lemma pr0_subst1_fwd: - \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst1 -i u2 t1 t2) \to (\forall (u1: T).((pr0 u2 u1) \to (ex2 T (\lambda (t: -T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t2 t))))))))) -\def - \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda -(H: (subst1 i u2 t1 t2)).(subst1_ind i u2 t1 (\lambda (t: T).(\forall (u1: -T).((pr0 u2 u1) \to (ex2 T (\lambda (t0: T).(subst1 i u1 t1 t0)) (\lambda -(t0: T).(pr0 t t0)))))) (\lambda (u1: T).(\lambda (_: (pr0 u2 u1)).(ex_intro2 -T (\lambda (t: T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t1 t)) t1 -(subst1_refl i u1 t1) (pr0_refl t1)))) (\lambda (t0: T).(\lambda (H0: (subst0 -i u2 t1 t0)).(\lambda (u1: T).(\lambda (H1: (pr0 u2 u1)).(ex2_ind T (\lambda -(t: T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t0 t)) (ex2 T (\lambda (t: -T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t0 t))) (\lambda (x: T).(\lambda -(H2: (subst0 i u1 t1 x)).(\lambda (H3: (pr0 t0 x)).(ex_intro2 T (\lambda (t: -T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t0 t)) x (subst1_single i u1 t1 x -H2) H3)))) (pr0_subst0_fwd u2 t1 t0 i H0 u1 H1)))))) t2 H))))). - -theorem pr0_subst1: - \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (v1: T).(\forall -(w1: T).(\forall (i: nat).((subst1 i v1 t1 w1) \to (\forall (v2: T).((pr0 v1 -v2) \to (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v2 t2 -w2))))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(\lambda (v1: -T).(\lambda (w1: T).(\lambda (i: nat).(\lambda (H0: (subst1 i v1 t1 -w1)).(subst1_ind i v1 t1 (\lambda (t: T).(\forall (v2: T).((pr0 v1 v2) \to -(ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)))))) -(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(ex_intro2 T (\lambda (w2: T).(pr0 -t1 w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)) t2 H (subst1_refl i v2 t2)))) -(\lambda (t0: T).(\lambda (H1: (subst0 i v1 t1 t0)).(\lambda (v2: T).(\lambda -(H2: (pr0 v1 v2)).(or_ind (pr0 t0 t2) (ex2 T (\lambda (w2: T).(pr0 t0 w2)) -(\lambda (w2: T).(subst0 i v2 t2 w2))) (ex2 T (\lambda (w2: T).(pr0 t0 w2)) -(\lambda (w2: T).(subst1 i v2 t2 w2))) (\lambda (H3: (pr0 t0 t2)).(ex_intro2 -T (\lambda (w2: T).(pr0 t0 w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)) t2 H3 -(subst1_refl i v2 t2))) (\lambda (H3: (ex2 T (\lambda (w2: T).(pr0 t0 w2)) -(\lambda (w2: T).(subst0 i v2 t2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t0 -w2)) (\lambda (w2: T).(subst0 i v2 t2 w2)) (ex2 T (\lambda (w2: T).(pr0 t0 -w2)) (\lambda (w2: T).(subst1 i v2 t2 w2))) (\lambda (x: T).(\lambda (H4: -(pr0 t0 x)).(\lambda (H5: (subst0 i v2 t2 x)).(ex_intro2 T (\lambda (w2: -T).(pr0 t0 w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)) x H4 (subst1_single i -v2 t2 x H5))))) H3)) (pr0_subst0 t1 t2 H v1 t0 i H1 v2 H2)))))) w1 H0))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/pr1/defs.ma deleted file mode 100644 index b466ad925..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/defs.ma +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/defs.ma". - -inductive pr1: T \to (T \to Prop) \def -| pr1_refl: \forall (t: T).(pr1 t t) -| pr1_sing: \forall (t2: T).(\forall (t1: T).((pr0 t1 t2) \to (\forall (t3: -T).((pr1 t2 t3) \to (pr1 t1 t3))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/pr1/fwd.ma deleted file mode 100644 index 8c9640c9f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/fwd.ma +++ /dev/null @@ -1,25 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr1/defs.ma". - -implied rec lemma pr1_ind (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t -t))) (f0: (\forall (t2: T).(\forall (t1: T).((pr0 t1 t2) \to (\forall (t3: -T).((pr1 t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) (t: T) (t0: T) (p: pr1 t -t0) on p: P t t0 \def match p with [(pr1_refl t1) \Rightarrow (f t1) | -(pr1_sing t2 t1 p0 t3 p1) \Rightarrow (f0 t2 t1 p0 t3 p1 ((pr1_ind P f f0) t2 -t3 p1))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/pr1.ma b/matita/matita/contribs/lambdadelta/basic_1/pr1/pr1.ma deleted file mode 100644 index 60dbdbfaa..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/pr1.ma +++ /dev/null @@ -1,64 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr1/props.ma". - -include "basic_1/pr0/pr0.ma". - -lemma pr1_strip: - \forall (t0: T).(\forall (t1: T).((pr1 t0 t1) \to (\forall (t2: T).((pr0 t0 -t2) \to (ex2 T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr1 t0 t1)).(pr1_ind (\lambda -(t: T).(\lambda (t2: T).(\forall (t3: T).((pr0 t t3) \to (ex2 T (\lambda (t4: -T).(pr1 t2 t4)) (\lambda (t4: T).(pr1 t3 t4))))))) (\lambda (t: T).(\lambda -(t2: T).(\lambda (H0: (pr0 t t2)).(ex_intro2 T (\lambda (t3: T).(pr1 t t3)) -(\lambda (t3: T).(pr1 t2 t3)) t2 (pr1_pr0 t t2 H0) (pr1_refl t2))))) (\lambda -(t2: T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t2)).(\lambda (t4: T).(\lambda -(_: (pr1 t2 t4)).(\lambda (H2: ((\forall (t5: T).((pr0 t2 t5) \to (ex2 T -(\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))))))).(\lambda (t5: -T).(\lambda (H3: (pr0 t3 t5)).(ex2_ind T (\lambda (t: T).(pr0 t5 t)) (\lambda -(t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 -t))) (\lambda (x: T).(\lambda (H4: (pr0 t5 x)).(\lambda (H5: (pr0 t2 x)).(let -H6 \def (H2 x H5) in (ex2_ind T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: -T).(pr1 x t)) (ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))) -(\lambda (x0: T).(\lambda (H7: (pr1 t4 x0)).(\lambda (H8: (pr1 x -x0)).(ex_intro2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t)) x0 -H7 (pr1_t x t5 (pr1_pr0 t5 x H4) x0 H8))))) H6))))) (pr0_confluence t3 t5 H3 -t2 H0)))))))))) t0 t1 H))). - -theorem pr1_confluence: - \forall (t0: T).(\forall (t1: T).((pr1 t0 t1) \to (\forall (t2: T).((pr1 t0 -t2) \to (ex2 T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr1 t0 t1)).(pr1_ind (\lambda -(t: T).(\lambda (t2: T).(\forall (t3: T).((pr1 t t3) \to (ex2 T (\lambda (t4: -T).(pr1 t2 t4)) (\lambda (t4: T).(pr1 t3 t4))))))) (\lambda (t: T).(\lambda -(t2: T).(\lambda (H0: (pr1 t t2)).(ex_intro2 T (\lambda (t3: T).(pr1 t t3)) -(\lambda (t3: T).(pr1 t2 t3)) t2 H0 (pr1_refl t2))))) (\lambda (t2: -T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t2)).(\lambda (t4: T).(\lambda (_: -(pr1 t2 t4)).(\lambda (H2: ((\forall (t5: T).((pr1 t2 t5) \to (ex2 T (\lambda -(t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))))))).(\lambda (t5: T).(\lambda -(H3: (pr1 t3 t5)).(let H_x \def (pr1_strip t3 t5 H3 t2 H0) in (let H4 \def -H_x in (ex2_ind T (\lambda (t: T).(pr1 t5 t)) (\lambda (t: T).(pr1 t2 t)) -(ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))) (\lambda (x: -T).(\lambda (H5: (pr1 t5 x)).(\lambda (H6: (pr1 t2 x)).(let H_x0 \def (H2 x -H6) in (let H7 \def H_x0 in (ex2_ind T (\lambda (t: T).(pr1 t4 t)) (\lambda -(t: T).(pr1 x t)) (ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 -t))) (\lambda (x0: T).(\lambda (H8: (pr1 t4 x0)).(\lambda (H9: (pr1 x -x0)).(ex_intro2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t)) x0 -H8 (pr1_t x t5 H5 x0 H9))))) H7)))))) H4))))))))))) t0 t1 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/pr1/props.ma deleted file mode 100644 index 97a5e45d8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr1/props.ma +++ /dev/null @@ -1,108 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr1/fwd.ma". - -include "basic_1/pr0/subst1.ma". - -include "basic_1/subst1/props.ma". - -include "basic_1/T/props.ma". - -lemma pr1_pr0: - \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr1 t1 t2))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(pr1_sing t2 t1 H -t2 (pr1_refl t2)))). - -theorem pr1_t: - \forall (t2: T).(\forall (t1: T).((pr1 t1 t2) \to (\forall (t3: T).((pr1 t2 -t3) \to (pr1 t1 t3))))) -\def - \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda -(t: T).(\lambda (t0: T).(\forall (t3: T).((pr1 t0 t3) \to (pr1 t t3))))) -(\lambda (t: T).(\lambda (t3: T).(\lambda (H0: (pr1 t t3)).H0))) (\lambda -(t0: T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t0)).(\lambda (t4: T).(\lambda -(_: (pr1 t0 t4)).(\lambda (H2: ((\forall (t5: T).((pr1 t4 t5) \to (pr1 t0 -t5))))).(\lambda (t5: T).(\lambda (H3: (pr1 t4 t5)).(pr1_sing t0 t3 H0 t5 (H2 -t5 H3)))))))))) t1 t2 H))). - -lemma pr1_head_1: - \forall (u1: T).(\forall (u2: T).((pr1 u1 u2) \to (\forall (t: T).(\forall -(k: K).(pr1 (THead k u1 t) (THead k u2 t)))))) -\def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr1 u1 u2)).(\lambda (t: -T).(\lambda (k: K).(pr1_ind (\lambda (t0: T).(\lambda (t1: T).(pr1 (THead k -t0 t) (THead k t1 t)))) (\lambda (t0: T).(pr1_refl (THead k t0 t))) (\lambda -(t2: T).(\lambda (t1: T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t3: T).(\lambda -(_: (pr1 t2 t3)).(\lambda (H2: (pr1 (THead k t2 t) (THead k t3 t))).(pr1_sing -(THead k t2 t) (THead k t1 t) (pr0_comp t1 t2 H0 t t (pr0_refl t) k) (THead k -t3 t) H2))))))) u1 u2 H))))). - -lemma pr1_head_2: - \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (u: T).(\forall -(k: K).(pr1 (THead k u t1) (THead k u t2)))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(\lambda (u: -T).(\lambda (k: K).(pr1_ind (\lambda (t: T).(\lambda (t0: T).(pr1 (THead k u -t) (THead k u t0)))) (\lambda (t: T).(pr1_refl (THead k u t))) (\lambda (t0: -T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t0)).(\lambda (t4: T).(\lambda (_: -(pr1 t0 t4)).(\lambda (H2: (pr1 (THead k u t0) (THead k u t4))).(pr1_sing -(THead k u t0) (THead k u t3) (pr0_comp u u (pr0_refl u) t3 t0 H0 k) (THead k -u t4) H2))))))) t1 t2 H))))). - -theorem pr1_comp: - \forall (v: T).(\forall (w: T).((pr1 v w) \to (\forall (t: T).(\forall (u: -T).((pr1 t u) \to (\forall (k: K).(pr1 (THead k v t) (THead k w u)))))))) -\def - \lambda (v: T).(\lambda (w: T).(\lambda (H: (pr1 v w)).(pr1_ind (\lambda (t: -T).(\lambda (t0: T).(\forall (t1: T).(\forall (u: T).((pr1 t1 u) \to (\forall -(k: K).(pr1 (THead k t t1) (THead k t0 u)))))))) (\lambda (t: T).(\lambda -(t0: T).(\lambda (u: T).(\lambda (H0: (pr1 t0 u)).(\lambda (k: K).(pr1_head_2 -t0 u H0 t k)))))) (\lambda (t2: T).(\lambda (t1: T).(\lambda (H0: (pr0 t1 -t2)).(\lambda (t3: T).(\lambda (H1: (pr1 t2 t3)).(\lambda (_: ((\forall (t: -T).(\forall (u: T).((pr1 t u) \to (\forall (k: K).(pr1 (THead k t2 t) (THead -k t3 u)))))))).(\lambda (t: T).(\lambda (u: T).(\lambda (H3: (pr1 t -u)).(\lambda (k: K).(pr1_ind (\lambda (t0: T).(\lambda (t4: T).(pr1 (THead k -t1 t0) (THead k t3 t4)))) (\lambda (t0: T).(pr1_head_1 t1 t3 (pr1_sing t2 t1 -H0 t3 H1) t0 k)) (\lambda (t0: T).(\lambda (t4: T).(\lambda (H4: (pr0 t4 -t0)).(\lambda (t5: T).(\lambda (_: (pr1 t0 t5)).(\lambda (H6: (pr1 (THead k -t1 t0) (THead k t3 t5))).(pr1_sing (THead k t1 t0) (THead k t1 t4) (pr0_comp -t1 t1 (pr0_refl t1) t4 t0 H4 k) (THead k t3 t5) H6))))))) t u H3))))))))))) v -w H))). - -lemma pr1_eta: - \forall (w: T).(\forall (u: T).(let t \def (THead (Bind Abst) w u) in -(\forall (v: T).((pr1 v w) \to (pr1 (THead (Bind Abst) v (THead (Flat Appl) -(TLRef O) (lift (S O) O t))) t))))) -\def - \lambda (w: T).(\lambda (u: T).(let t \def (THead (Bind Abst) w u) in -(\lambda (v: T).(\lambda (H: (pr1 v w)).(eq_ind_r T (THead (Bind Abst) (lift -(S O) O w) (lift (S O) (S O) u)) (\lambda (t0: T).(pr1 (THead (Bind Abst) v -(THead (Flat Appl) (TLRef O) t0)) (THead (Bind Abst) w u))) (pr1_comp v w H -(THead (Flat Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) -(S O) u))) u (pr1_sing (THead (Bind Abbr) (TLRef O) (lift (S O) (S O) u)) -(THead (Flat Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) -(S O) u))) (pr0_beta (lift (S O) O w) (TLRef O) (TLRef O) (pr0_refl (TLRef -O)) (lift (S O) (S O) u) (lift (S O) (S O) u) (pr0_refl (lift (S O) (S O) -u))) u (pr1_sing (THead (Bind Abbr) (TLRef O) (lift (S O) O u)) (THead (Bind -Abbr) (TLRef O) (lift (S O) (S O) u)) (pr0_delta1 (TLRef O) (TLRef O) -(pr0_refl (TLRef O)) (lift (S O) (S O) u) (lift (S O) (S O) u) (pr0_refl -(lift (S O) (S O) u)) (lift (S O) O u) (subst1_lift_S u O O (le_O_n O))) u -(pr1_pr0 (THead (Bind Abbr) (TLRef O) (lift (S O) O u)) u (pr0_zeta Abbr -not_abbr_abst u u (pr0_refl u) (TLRef O))))) (Bind Abst)) (lift (S O) O -(THead (Bind Abst) w u)) (lift_bind Abst w u (S O) O)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/clen.ma b/matita/matita/contribs/lambdadelta/basic_1/pr2/clen.ma deleted file mode 100644 index b518e4360..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/clen.ma +++ /dev/null @@ -1,151 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr2/props.ma". - -include "basic_1/clen/getl.ma". - -lemma pr2_gen_ctail: - \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall -(t2: T).((pr2 (CTail k u c) t1 t2) \to (or (pr2 c t1 t2) (ex3 T (\lambda (_: -T).(eq K k (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(subst0 -(clen c) u t t2))))))))) -\def - \lambda (k: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (H: (pr2 (CTail k u c) t1 t2)).(insert_eq C (CTail k u c) -(\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(or (pr2 c t1 t2) (ex3 T -(\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda -(t: T).(subst0 (clen c) u t t2))))) (\lambda (y: C).(\lambda (H0: (pr2 y t1 -t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 -(CTail k u c)) \to (or (pr2 c t t0) (ex3 T (\lambda (_: T).(eq K k (Bind -Abbr))) (\lambda (t3: T).(pr0 t t3)) (\lambda (t3: T).(subst0 (clen c) u t3 -t0)))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: -(pr0 t3 t4)).(\lambda (_: (eq C c0 (CTail k u c))).(or_introl (pr2 c t3 t4) -(ex3 T (\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t: T).(pr0 t3 t)) -(\lambda (t: T).(subst0 (clen c) u t t4))) (pr2_free c t3 t4 H1))))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda -(H1: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: (subst0 i u0 t4 -t)).(\lambda (H4: (eq C c0 (CTail k u c))).(let H5 \def (eq_ind C c0 (\lambda -(c1: C).(getl i c1 (CHead d (Bind Abbr) u0))) H1 (CTail k u c) H4) in (let -H_x \def (getl_gen_tail k Abbr u u0 d c i H5) in (let H6 \def H_x in (or_ind -(ex2 C (\lambda (e: C).(eq C d (CTail k u e))) (\lambda (e: C).(getl i c -(CHead e (Bind Abbr) u0)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) -(\lambda (_: nat).(eq K k (Bind Abbr))) (\lambda (_: nat).(eq T u u0)) -(\lambda (n: nat).(eq C d (CSort n)))) (or (pr2 c t3 t) (ex3 T (\lambda (_: -T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: -T).(subst0 (clen c) u t0 t)))) (\lambda (H7: (ex2 C (\lambda (e: C).(eq C d -(CTail k u e))) (\lambda (e: C).(getl i c (CHead e (Bind Abbr) -u0))))).(ex2_ind C (\lambda (e: C).(eq C d (CTail k u e))) (\lambda (e: -C).(getl i c (CHead e (Bind Abbr) u0))) (or (pr2 c t3 t) (ex3 T (\lambda (_: -T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: -T).(subst0 (clen c) u t0 t)))) (\lambda (x: C).(\lambda (_: (eq C d (CTail k -u x))).(\lambda (H9: (getl i c (CHead x (Bind Abbr) u0))).(or_introl (pr2 c -t3 t) (ex3 T (\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 -t0)) (\lambda (t0: T).(subst0 (clen c) u t0 t))) (pr2_delta c x u0 i H9 t3 t4 -H2 t H3))))) H7)) (\lambda (H7: (ex4 nat (\lambda (_: nat).(eq nat i (clen -c))) (\lambda (_: nat).(eq K k (Bind Abbr))) (\lambda (_: nat).(eq T u u0)) -(\lambda (n: nat).(eq C d (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq -nat i (clen c))) (\lambda (_: nat).(eq K k (Bind Abbr))) (\lambda (_: -nat).(eq T u u0)) (\lambda (n: nat).(eq C d (CSort n))) (or (pr2 c t3 t) (ex3 -T (\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 t0)) -(\lambda (t0: T).(subst0 (clen c) u t0 t)))) (\lambda (x0: nat).(\lambda (H8: -(eq nat i (clen c))).(\lambda (H9: (eq K k (Bind Abbr))).(\lambda (H10: (eq T -u u0)).(\lambda (_: (eq C d (CSort x0))).(let H12 \def (eq_ind nat i (\lambda -(n: nat).(subst0 n u0 t4 t)) H3 (clen c) H8) in (let H13 \def (eq_ind_r T u0 -(\lambda (t0: T).(subst0 (clen c) t0 t4 t)) H12 u H10) in (eq_ind_r K (Bind -Abbr) (\lambda (k0: K).(or (pr2 c t3 t) (ex3 T (\lambda (_: T).(eq K k0 (Bind -Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: T).(subst0 (clen c) u t0 -t))))) (or_intror (pr2 c t3 t) (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind -Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: T).(subst0 (clen c) u t0 -t))) (ex3_intro T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda -(t0: T).(pr0 t3 t0)) (\lambda (t0: T).(subst0 (clen c) u t0 t)) t4 -(refl_equal K (Bind Abbr)) H2 H13)) k H9)))))))) H7)) H6))))))))))))))) y t1 -t2 H0))) H)))))). - -lemma pr2_gen_cbind: - \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall -(t2: T).((pr2 (CHead c (Bind b) v) t1 t2) \to (pr2 c (THead (Bind b) v t1) -(THead (Bind b) v t2))))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (H: (pr2 (CHead c (Bind b) v) t1 t2)).(insert_eq C (CHead c -(Bind b) v) (\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c (THead -(Bind b) v t1) (THead (Bind b) v t2))) (\lambda (y: C).(\lambda (H0: (pr2 y -t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 -(CHead c (Bind b) v)) \to (pr2 c (THead (Bind b) v t) (THead (Bind b) v -t0)))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: -(pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Bind b) v))).(pr2_free c (THead -(Bind b) v t3) (THead (Bind b) v t4) (pr0_comp v v (pr0_refl v) t3 t4 H1 -(Bind b)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: -(subst0 i u t4 t)).(\lambda (H4: (eq C c0 (CHead c (Bind b) v))).(let H5 \def -(eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) u))) H1 (CHead -c (Bind b) v) H4) in (let H_x \def (getl_gen_bind b c (CHead d (Bind Abbr) u) -v i H5) in (let H6 \def H_x in (or_ind (land (eq nat i O) (eq C (CHead d -(Bind Abbr) u) (CHead c (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat i (S -j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u)))) (pr2 c (THead -(Bind b) v t3) (THead (Bind b) v t)) (\lambda (H7: (land (eq nat i O) (eq C -(CHead d (Bind Abbr) u) (CHead c (Bind b) v)))).(land_ind (eq nat i O) (eq C -(CHead d (Bind Abbr) u) (CHead c (Bind b) v)) (pr2 c (THead (Bind b) v t3) -(THead (Bind b) v t)) (\lambda (H8: (eq nat i O)).(\lambda (H9: (eq C (CHead -d (Bind Abbr) u) (CHead c (Bind b) v))).(let H10 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow -c1])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H9) in ((let H11 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H9) in -((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) -(CHead c (Bind b) v) H9) in (\lambda (H13: (eq B Abbr b)).(\lambda (_: (eq C -d c)).(let H15 \def (eq_ind nat i (\lambda (n: nat).(subst0 n u t4 t)) H3 O -H8) in (let H16 \def (eq_ind T u (\lambda (t0: T).(subst0 O t0 t4 t)) H15 v -H12) in (eq_ind B Abbr (\lambda (b0: B).(pr2 c (THead (Bind b0) v t3) (THead -(Bind b0) v t))) (pr2_free c (THead (Bind Abbr) v t3) (THead (Bind Abbr) v t) -(pr0_delta v v (pr0_refl v) t3 t4 H2 t H16)) b H13)))))) H11)) H10)))) H7)) -(\lambda (H7: (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: -nat).(getl j c (CHead d (Bind Abbr) u))))).(ex2_ind nat (\lambda (j: nat).(eq -nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u))) (pr2 c -(THead (Bind b) v t3) (THead (Bind b) v t)) (\lambda (x: nat).(\lambda (H8: -(eq nat i (S x))).(\lambda (H9: (getl x c (CHead d (Bind Abbr) u))).(let H10 -\def (f_equal nat nat (\lambda (e: nat).e) i (S x) H8) in (let H11 \def -(eq_ind nat i (\lambda (n: nat).(subst0 n u t4 t)) H3 (S x) H10) in -(pr2_head_2 c v t3 t (Bind b) (pr2_delta (CHead c (Bind b) v) d u (S x) -(getl_clear_bind b (CHead c (Bind b) v) c v (clear_bind b c v) (CHead d (Bind -Abbr) u) x H9) t3 t4 H2 t H11))))))) H7)) H6))))))))))))))) y t1 t2 H0))) -H)))))). - -lemma pr2_gen_cflat: - \forall (f: F).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall -(t2: T).((pr2 (CHead c (Flat f) v) t1 t2) \to (pr2 c t1 t2)))))) -\def - \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (H: (pr2 (CHead c (Flat f) v) t1 t2)).(insert_eq C (CHead c -(Flat f) v) (\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c t1 t2)) -(\lambda (y: C).(\lambda (H0: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: -C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Flat f) v)) \to (pr2 -c t t0))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: -(pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Flat f) v))).(pr2_free c t3 t4 -H1)))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: -(subst0 i u t4 t)).(\lambda (H4: (eq C c0 (CHead c (Flat f) v))).(let H5 \def -(eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) u))) H1 (CHead -c (Flat f) v) H4) in (let H_y \def (getl_gen_flat f c (CHead d (Bind Abbr) u) -v i H5) in (pr2_delta c d u i H_y t3 t4 H2 t H3)))))))))))))) y t1 t2 H0))) -H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/pr2/defs.ma deleted file mode 100644 index 1bcb0b108..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/defs.ma +++ /dev/null @@ -1,28 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/defs.ma". - -include "basic_1/getl/defs.ma". - -inductive pr2: C \to (T \to (T \to Prop)) \def -| pr2_free: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to -(pr2 c t1 t2)))) -| pr2_delta: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: -nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (t1: T).(\forall (t2: -T).((pr0 t1 t2) \to (\forall (t: T).((subst0 i u t2 t) \to (pr2 c t1 -t)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/pr2/fwd.ma deleted file mode 100644 index 1c19f4a2f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/fwd.ma +++ /dev/null @@ -1,2801 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr2/defs.ma". - -include "basic_1/pr0/fwd.ma". - -include "basic_1/getl/clear.ma". - -include "basic_1/getl/drop.ma". - -implied lemma pr2_ind: - \forall (P: ((C \to (T \to (T \to Prop))))).(((\forall (c: C).(\forall (t1: -T).(\forall (t2: T).((pr0 t1 t2) \to (P c t1 t2)))))) \to (((\forall (c: -C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d -(Bind Abbr) u)) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to -(\forall (t: T).((subst0 i u t2 t) \to (P c t1 t)))))))))))) \to (\forall (c: -C).(\forall (t: T).(\forall (t0: T).((pr2 c t t0) \to (P c t t0))))))) -\def - \lambda (P: ((C \to (T \to (T \to Prop))))).(\lambda (f: ((\forall (c: -C).(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (P c t1 -t2))))))).(\lambda (f0: ((\forall (c: C).(\forall (d: C).(\forall (u: -T).(\forall (i: nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (t1: -T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (t: T).((subst0 i u t2 t) \to -(P c t1 t))))))))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: -T).(\lambda (p: (pr2 c t t0)).(match p with [(pr2_free x x0 x1 x2) -\Rightarrow (f x x0 x1 x2) | (pr2_delta x x0 x1 x2 x3 x4 x5 x6 x7 x8) -\Rightarrow (f0 x x0 x1 x2 x3 x4 x5 x6 x7 x8)]))))))). - -lemma pr2_gen_sort: - \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr2 c (TSort n) x) \to -(eq T x (TSort n))))) -\def - \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TSort -n) x)).(insert_eq T (TSort n) (\lambda (t: T).(pr2 c t x)) (\lambda (t: -T).(eq T x t)) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda -(_: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n)) \to (eq T t0 -t))))) (\lambda (_: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H1: (pr0 -t1 t2)).(\lambda (H2: (eq T t1 (TSort n))).(let H3 \def (eq_ind T t1 (\lambda -(t: T).(pr0 t t2)) H1 (TSort n) H2) in (eq_ind_r T (TSort n) (\lambda (t: -T).(eq T t2 t)) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T t (TSort n))) -(refl_equal T (TSort n)) t2 (pr0_gen_sort t2 n H3)) t1 H2))))))) (\lambda -(c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl -i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H2: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda -(H4: (eq T t1 (TSort n))).(let H5 \def (eq_ind T t1 (\lambda (t0: T).(pr0 t0 -t2)) H2 (TSort n) H4) in (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t t0)) -(let H6 \def (eq_ind T t2 (\lambda (t0: T).(subst0 i u t0 t)) H3 (TSort n) -(pr0_gen_sort t2 n H5)) in (subst0_gen_sort u t i n H6 (eq T t (TSort n)))) -t1 H4))))))))))))) c y x H0))) H)))). - -lemma pr2_gen_lref: - \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr2 c (TLRef n) x) \to -(or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c -(CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S -n) O u))))))))) -\def - \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TLRef -n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(pr2 c t x)) (\lambda (t: -T).(or (eq T x t) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead -d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O -u))))))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: -C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (eq T t0 t) -(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c0 (CHead d (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(eq T t0 (lift (S n) O u)))))))))) -(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 -t2)).(\lambda (H2: (eq T t1 (TLRef n))).(let H3 \def (eq_ind T t1 (\lambda -(t: T).(pr0 t t2)) H1 (TLRef n) H2) in (eq_ind_r T (TLRef n) (\lambda (t: -T).(or (eq T t2 t) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c0 -(CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S -n) O u))))))) (eq_ind_r T (TLRef n) (\lambda (t: T).(or (eq T t (TLRef n)) -(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c0 (CHead d (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(eq T t (lift (S n) O u))))))) -(or_introl (eq T (TLRef n) (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: -T).(getl n c0 (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq -T (TLRef n) (lift (S n) O u))))) (refl_equal T (TLRef n))) t2 (pr0_gen_lref -t2 n H3)) t1 H2))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) -u))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H2: (pr0 t1 t2)).(\lambda -(t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t1 (TLRef -n))).(let H5 \def (eq_ind T t1 (\lambda (t0: T).(pr0 t0 t2)) H2 (TLRef n) H4) -in (eq_ind_r T (TLRef n) (\lambda (t0: T).(or (eq T t t0) (ex2_2 C T (\lambda -(d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (_: -C).(\lambda (u0: T).(eq T t (lift (S n) O u0))))))) (let H6 \def (eq_ind T t2 -(\lambda (t0: T).(subst0 i u t0 t)) H3 (TLRef n) (pr0_gen_lref t2 n H5)) in -(land_ind (eq nat n i) (eq T t (lift (S n) O u)) (or (eq T t (TLRef n)) -(ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) -u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t (lift (S n) O u0)))))) -(\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t (lift (S n) O -u))).(eq_ind_r T (lift (S n) O u) (\lambda (t0: T).(or (eq T t0 (TLRef n)) -(ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) -u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t0 (lift (S n) O u0))))))) (let -H9 \def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d (Bind Abbr) -u))) H1 n H7) in (or_intror (eq T (lift (S n) O u) (TLRef n)) (ex2_2 C T -(\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) u0)))) -(\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S n) O u0))))) -(ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind -Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S -n) O u0)))) d u H9 (refl_equal T (lift (S n) O u))))) t H8))) -(subst0_gen_lref u t i n H6))) t1 H4))))))))))))) c y x H0))) H)))). - -lemma pr2_gen_abst: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c -(THead (Bind Abst) u1 t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: -T).(pr2 (CHead c (Bind b) u) t1 t2)))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr2 c (THead (Bind Abst) u1 t1) x)).(insert_eq T (THead (Bind Abst) u1 -t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))))))) (\lambda (y: -T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: C).(\lambda (t: -T).(\lambda (t0: T).((eq T t (THead (Bind Abst) u1 t1)) \to (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abst) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -t2)))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: -(pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Bind Abst) u1 t1))).(let H3 \def -(eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Bind Abst) u1 t1) H2) in -(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c0 (Bind b) u) t1 t3)))))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H4: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H5: (pr0 u1 -x0)).(\lambda (H6: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) -(\lambda (t: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead -c0 (Bind b) u) t1 t3))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))))) x0 x1 -(refl_equal T (THead (Bind Abst) x0 x1)) (pr2_free c0 u1 x0 H5) (\lambda (b: -B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) t1 x1 H6)))) t2 H4)))))) -(pr0_gen_abst u1 t1 t2 H3)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda -(u: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) -u))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 t2)).(\lambda -(t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t0 (THead (Bind -Abst) u1 t1))).(let H5 \def (eq_ind T t0 (\lambda (t3: T).(pr0 t3 t2)) H2 -(THead (Bind Abst) u1 t1) H4) in (ex3_2_ind T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t2 (THead -(Bind Abst) x0 x1))).(\lambda (H7: (pr0 u1 x0)).(\lambda (H8: (pr0 t1 -x1)).(let H9 \def (eq_ind T t2 (\lambda (t3: T).(subst0 i u t3 t)) H3 (THead -(Bind Abst) x0 x1) H6) in (or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead -(Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda -(t3: T).(eq T t (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind -Abst) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 -u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) t1 t3)))))) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t (THead (Bind -Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda -(u2: T).(eq T t (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 -u2)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) t1 t3)))))) (\lambda (x2: T).(\lambda (H11: (eq T t (THead (Bind Abst) x2 -x1))).(\lambda (H12: (subst0 i u x0 x2)).(eq_ind_r T (THead (Bind Abst) x2 -x1) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 -(THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abst) x2 x1) (THead (Bind Abst) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) t1 t3))))) x2 x1 (refl_equal T (THead (Bind Abst) x2 x1)) (pr2_delta c0 d -u i H1 u1 x0 H7 x2 H12) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c0 -(Bind b) u0) t1 x1 H8)))) t H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: -T).(eq T t (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind -Abst) i) u x1 t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Abst) -x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3)))))) (\lambda (x2: T).(\lambda (H11: (eq T t (THead (Bind Abst) x0 -x2))).(\lambda (H12: (subst0 (s (Bind Abst) i) u x1 x2)).(eq_ind_r T (THead -(Bind Abst) x0 x2) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x0 x2) (THead (Bind Abst) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) t1 t3))))) x0 x2 (refl_equal T (THead (Bind Abst) x0 x2)) (pr2_free c0 u1 -x0 H7) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u -(S i) (getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H8 x2 -H12)))) t H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind -Abst) i) u x1 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u -x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 -t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) t1 t3)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H11: (eq T t -(THead (Bind Abst) x2 x3))).(\lambda (H12: (subst0 i u x0 x2)).(\lambda (H13: -(subst0 (s (Bind Abst) i) u x1 x3)).(eq_ind_r T (THead (Bind Abst) x2 x3) -(\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abst) x2 x3) (THead (Bind Abst) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))))) x2 x3 -(refl_equal T (THead (Bind Abst) x2 x3)) (pr2_delta c0 d u i H1 u1 x0 H7 x2 -H12) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u -(S i) (getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H8 x3 -H13)))) t H11)))))) H10)) (subst0_gen_head (Bind Abst) u x0 x1 t i H9)))))))) -(pr0_gen_abst u1 t1 t2 H5)))))))))))))) c y x H0))) H))))). - -lemma pr2_gen_cast: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c -(THead (Flat Cast) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (pr2 c -t1 x)))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr2 c (THead (Flat Cast) u1 t1) x)).(insert_eq T (THead (Flat Cast) u1 -t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 -t2)))) (pr2 c t1 x))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind -(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Cast) -u1 t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead -(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr2 c0 t1 t2)))) (pr2 c0 t1 t0)))))) -(\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: (pr0 t0 -t2)).(\lambda (H2: (eq T t0 (THead (Flat Cast) u1 t1))).(let H3 \def (eq_ind -T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Flat Cast) u1 t1) H2) in (or_ind -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (pr2 c0 t1 t2)) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t2)) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t2 (THead (Flat Cast) -x0 x1))).(\lambda (H6: (pr0 u1 x0)).(\lambda (H7: (pr0 t1 x1)).(eq_ind_r T -(THead (Flat Cast) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (pr2 c0 t1 t))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t3)))) (\lambda -(u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr2 c0 t1 t3)))) (pr2 c0 t1 (THead (Flat Cast) x0 x1)) (ex3_2_intro T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Cast) x0 x1) (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3))) x0 x1 (refl_equal T (THead -(Flat Cast) x0 x1)) (pr2_free c0 u1 x0 H6) (pr2_free c0 t1 x1 H7))) t2 -H5)))))) H4)) (\lambda (H4: (pr0 t1 t2)).(or_intror (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (pr2 c0 t1 t2) (pr2_free c0 t1 t2 H4))) (pr0_gen_cast u1 t1 t2 -H3)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t0: -T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 t2)).(\lambda (t: T).(\lambda (H3: -(subst0 i u t2 t)).(\lambda (H4: (eq T t0 (THead (Flat Cast) u1 t1))).(let H5 -\def (eq_ind T t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (THead (Flat Cast) u1 t1) -H4) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) (or (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (pr2 c0 t1 t)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t2 (THead (Flat Cast) -x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def -(eq_ind T t2 (\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Flat Cast) x0 x1) -H7) in (or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead (Flat Cast) u2 x1))) -(\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead -(Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) (\lambda (H11: (ex2 T (\lambda (u2: -T).(eq T t (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 -u2)))).(ex2_ind T (\lambda (u2: T).(eq T t (THead (Flat Cast) u2 x1))) -(\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 -c0 t1 t)) (\lambda (x2: T).(\lambda (H12: (eq T t (THead (Flat Cast) x2 -x1))).(\lambda (H13: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (pr2 c0 t1 t) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3))) x2 x1 H12 -(pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (pr2_free c0 t1 x1 H9)))))) H11)) -(\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t (THead (Flat Cast) x0 t3))) -(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)))).(ex2_ind T (\lambda -(t3: T).(eq T t (THead (Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat -Cast) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) -(\lambda (x2: T).(\lambda (H12: (eq T t (THead (Flat Cast) x0 x2))).(\lambda -(H13: (subst0 (s (Flat Cast) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (pr2 c0 t1 t) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3))) x0 x2 H12 -(pr2_free c0 u1 x0 H8) (pr2_delta c0 d u i H1 t1 x1 H9 x2 H13)))))) H11)) -(\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat -Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) (\lambda (x2: -T).(\lambda (x3: T).(\lambda (H12: (eq T t (THead (Flat Cast) x2 -x3))).(\lambda (H13: (subst0 i u x0 x2)).(\lambda (H14: (subst0 (s (Flat -Cast) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 t1 t3))) x2 x3 H12 (pr2_delta c0 d u i H1 u1 x0 -H8 x2 H13) (pr2_delta c0 d u i H1 t1 x1 H9 x3 H14)))))))) H11)) -(subst0_gen_head (Flat Cast) u x0 x1 t i H10)))))))) H6)) (\lambda (H6: (pr0 -t1 t2)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t) -(pr2_delta c0 d u i H1 t1 t2 H6 t H3))) (pr0_gen_cast u1 t1 t2 -H5)))))))))))))) c y x H0))) H))))). - -lemma pr2_gen_csort: - \forall (t1: T).(\forall (t2: T).(\forall (n: nat).((pr2 (CSort n) t1 t2) -\to (pr0 t1 t2)))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (n: nat).(\lambda (H: (pr2 (CSort -n) t1 t2)).(insert_eq C (CSort n) (\lambda (c: C).(pr2 c t1 t2)) (\lambda (_: -C).(pr0 t1 t2)) (\lambda (y: C).(\lambda (H0: (pr2 y t1 t2)).(pr2_ind -(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c (CSort n)) \to (pr0 -t t0))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: -(pr0 t3 t4)).(\lambda (_: (eq C c (CSort n))).H1))))) (\lambda (c: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (getl i c -(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 -t3 t4)).(\lambda (t: T).(\lambda (_: (subst0 i u t4 t)).(\lambda (H4: (eq C c -(CSort n))).(let H5 \def (eq_ind C c (\lambda (c0: C).(getl i c0 (CHead d -(Bind Abbr) u))) H1 (CSort n) H4) in (getl_gen_sort n i (CHead d (Bind Abbr) -u) H5 (pr0 t3 t)))))))))))))) y t1 t2 H0))) H)))). - -lemma pr2_gen_appl: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c -(THead (Flat Appl) u1 t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (ex4_4 T -T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq -T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead -(Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr2 c (THead (Flat Appl) u1 t1) x)).(insert_eq T (THead (Flat Appl) u1 -t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or3 (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 -t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind -Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) -y2) z1 z2)))))))))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind -(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) -u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead -(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr2 c0 t1 t2)))) (ex4_4 T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t2)))))))) (ex6_6 B T T -T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t0 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 -z2))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda -(H1: (pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Flat Appl) u1 t1))).(let H3 -\def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Flat Appl) u1 t1) -H2) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) -u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H4: (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) -u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H5: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H6: (pr0 u1 -x0)).(\lambda (H7: (pr0 t1 x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) -(\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T -T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 -z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) -x0 x1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat -Appl) x0 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3))) x0 x1 (refl_equal T (THead (Flat Appl) x0 x1)) (pr2_free c0 u1 x0 -H6) (pr2_free c0 t1 x1 H7))) t2 H5)))))) H4)) (\lambda (H4: (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 -T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq -T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T -T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 -z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H5: (eq T t1 (THead (Bind Abst) x0 x1))).(\lambda (H6: (eq T t2 -(THead (Bind Abbr) x2 x3))).(\lambda (H7: (pr0 u1 x2)).(\lambda (H8: (pr0 x1 -x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 -(CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (eq_ind_r T (THead (Bind -Abst) x0 x1) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) -x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind -Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) -u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind -Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) -u) z1 t3))))))) x0 x1 x2 x3 (refl_equal T (THead (Bind Abst) x0 x1)) -(refl_equal T (THead (Bind Abbr) x2 x3)) (pr2_free c0 u1 x2 H7) (\lambda (b: -B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) x1 x3 H8))))) t1 H5) t2 -H6))))))))) H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not -(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) -y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat -Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift -(S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 -t3))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T -T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 -z2))))))))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not (eq B x0 -Abst))).(\lambda (H6: (eq T t1 (THead (Bind x0) x1 x2))).(\lambda (H7: (eq T -t2 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda -(H8: (pr0 u1 x3)).(\lambda (H9: (pr0 x1 x4)).(\lambda (H10: (pr0 x2 -x5)).(eq_ind_r T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) -x5)) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T -T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 -z2)))))))))) (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t: T).(or3 (ex3_2 -T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat -Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) -x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat -Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 -(CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))) -x0 x1 x2 x5 x3 x4 H5 (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T -(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5))) (pr2_free c0 -u1 x3 H8) (pr2_free c0 x1 x4 H9) (pr2_free (CHead c0 (Bind x0) x4) x2 x5 -H10))) t1 H6) t2 H7))))))))))))) H4)) (pr0_gen_appl u1 t1 t2 H3)))))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (H2: (pr0 t0 t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 -t)).(\lambda (H4: (eq T t0 (THead (Flat Appl) u1 t1))).(let H5 \def (eq_ind T -t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (THead (Flat Appl) u1 t1) H4) in (or3_ind -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H6: (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H7: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr0 u1 -x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T t2 (\lambda (t3: -T).(subst0 i u t3 t)) H3 (THead (Flat Appl) x0 x1) H7) in (or3_ind (ex2 T -(\lambda (u2: T).(eq T t (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 -i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Flat Appl) x0 t3))) -(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Appl) i) u x1 t3)))) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H11: (ex2 T (\lambda (u2: -T).(eq T t (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 -u2)))).(ex2_ind T (\lambda (u2: T).(eq T t (THead (Flat Appl) u2 x1))) -(\lambda (u2: T).(subst0 i u x0 u2)) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (H12: (eq T t -(THead (Flat Appl) x2 x1))).(\lambda (H13: (subst0 i u x0 x2)).(eq_ind_r T -(THead (Flat Appl) x2 x1) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 -t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Flat Appl) x2 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O -u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3))) x2 x1 (refl_equal T (THead (Flat Appl) x2 x1)) (pr2_delta c0 d u i -H1 u1 x0 H8 x2 H13) (pr2_free c0 t1 x1 H9))) t H12)))) H11)) (\lambda (H11: -(ex2 T (\lambda (t3: T).(eq T t (THead (Flat Appl) x0 t3))) (\lambda (t3: -T).(subst0 (s (Flat Appl) i) u x1 t3)))).(ex2_ind T (\lambda (t3: T).(eq T t -(THead (Flat Appl) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 -t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat -Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda -(H12: (eq T t (THead (Flat Appl) x0 x2))).(\lambda (H13: (subst0 (s (Flat -Appl) i) u x1 x2)).(eq_ind_r T (THead (Flat Appl) x0 x2) (\lambda (t3: -T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat -Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda -(_: T).(\lambda (t4: T).(pr2 c0 t1 t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) -(or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat -Appl) x0 x2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 -T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq -T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind Abbr) -u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind b) y2 -(THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Flat Appl) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 t1 t3))) x0 x2 (refl_equal T (THead (Flat Appl) -x0 x2)) (pr2_free c0 u1 x0 H8) (pr2_delta c0 d u i H1 t1 x1 H9 x2 H13))) t -H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u -x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat -Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda -(x3: T).(\lambda (H12: (eq T t (THead (Flat Appl) x2 x3))).(\lambda (H13: -(subst0 i u x0 x2)).(\lambda (H14: (subst0 (s (Flat Appl) i) u x1 -x3)).(eq_ind_r T (THead (Flat Appl) x2 x3) (\lambda (t3: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 -(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind b) y2 -(THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Flat Appl) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 t1 t3))) x2 x3 (refl_equal T (THead (Flat Appl) -x2 x3)) (pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (pr2_delta c0 d u i H1 t1 x1 -H9 x3 H14))) t H12)))))) H11)) (subst0_gen_head (Flat Appl) u x0 x1 t i -H10)))))))) H6)) (\lambda (H6: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t3: T).(pr0 z1 t3))))))).(ex4_4_ind T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda -(x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T t1 (THead (Bind -Abst) x0 x1))).(\lambda (H8: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda -(H9: (pr0 u1 x2)).(\lambda (H10: (pr0 x1 x3)).(let H11 \def (eq_ind T t2 -(\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Bind Abbr) x2 x3) H8) in -(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t3: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 t3 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T t3 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t -(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t3 (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda -(u2: T).(eq T t (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 -u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x2 t3))) (\lambda -(t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Bind Abbr) i) u x3 t3)))) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) -O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (H12: (ex2 T (\lambda (u2: T).(eq T t (THead -(Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2)))).(ex2_ind T -(\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 -i u x2 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind Abst) x0 x1) t3)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda -(H13: (eq T t (THead (Bind Abbr) x4 x3))).(\lambda (H14: (subst0 i u x2 -x4)).(eq_ind_r T (THead (Bind Abbr) x4 x3) (\lambda (t3: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 (THead (Bind Abst) x0 x1) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) -x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: -T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) x4 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind -Abbr) x4 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3))))))) x0 x1 x4 x3 (refl_equal T (THead (Bind Abst) x0 x1)) -(refl_equal T (THead (Bind Abbr) x4 x3)) (pr2_delta c0 d u i H1 u1 x2 H9 x4 -H14) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c0 (Bind b) u0) x1 x3 -H10))))) t H13)))) H12)) (\lambda (H12: (ex2 T (\lambda (t3: T).(eq T t -(THead (Bind Abbr) x2 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x2 t3))) -(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3)) (or3 (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) -O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (H13: (eq T t (THead (Bind Abbr) -x2 x4))).(\lambda (H14: (subst0 (s (Bind Abbr) i) u x3 x4)).(eq_ind_r T -(THead (Bind Abbr) x2 x4) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 -(THead (Bind Abst) x0 x1) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) x2 x4) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind -Abbr) x2 x4) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3))))))) x0 x1 x2 x4 (refl_equal T (THead (Bind Abst) x0 x1)) -(refl_equal T (THead (Bind Abbr) x2 x4)) (pr2_free c0 u1 x2 H9) (\lambda (b: -B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) -(getl_clear_bind b (CHead c0 (Bind b) u0) c0 u0 (clear_bind b c0 u0) (CHead d -(Bind Abbr) u) i H1) x1 x3 H10 x4 H14))))) t H13)))) H12)) (\lambda (H12: -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) -x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) -O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H13: (eq T t -(THead (Bind Abbr) x4 x5))).(\lambda (H14: (subst0 i u x2 x4)).(\lambda (H15: -(subst0 (s (Bind Abbr) i) u x3 x5)).(eq_ind_r T (THead (Bind Abbr) x4 x5) -(\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 -(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind Abst) x0 x1) -t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind Abbr) x4 x5) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind -Abbr) x4 x5) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3))))))) x0 x1 x4 x5 (refl_equal T (THead (Bind Abst) x0 x1)) -(refl_equal T (THead (Bind Abbr) x4 x5)) (pr2_delta c0 d u i H1 u1 x2 H9 x4 -H14) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u -(S i) (getl_clear_bind b (CHead c0 (Bind b) u0) c0 u0 (clear_bind b c0 u0) -(CHead d (Bind Abbr) u) i H1) x1 x3 H10 x5 H15))))) t H13)))))) H12)) -(subst0_gen_head (Bind Abbr) u x2 x3 t i H11)) t1 H7)))))))))) H6)) (\lambda -(H6: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) -t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda -(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 -y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))).(ex6_6_ind B T T T T -T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq -T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead -(Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda -(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (t3: T).(pr0 z1 t3))))))) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: B).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: -T).(\lambda (H7: (not (eq B x0 Abst))).(\lambda (H8: (eq T t1 (THead (Bind -x0) x1 x2))).(\lambda (H9: (eq T t2 (THead (Bind x0) x4 (THead (Flat Appl) -(lift (S O) O x3) x5)))).(\lambda (H10: (pr0 u1 x3)).(\lambda (H11: (pr0 x1 -x4)).(\lambda (H12: (pr0 x2 x5)).(let H13 \def (eq_ind T t2 (\lambda (t3: -T).(subst0 i u t3 t)) H3 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O -x3) x5)) H9) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t3: T).(or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t (THead (Flat Appl) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr2 c0 t3 t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t3 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T t (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t3 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda -(u2: T).(eq T t (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) -x5)))) (\lambda (u2: T).(subst0 i u x4 u2))) (ex2 T (\lambda (t3: T).(eq T t -(THead (Bind x0) x4 t3))) (\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead -(Flat Appl) (lift (S O) O x3) x5) t3))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) -i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3)))) (or3 (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (H14: (ex2 T (\lambda (u2: T).(eq T t (THead -(Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: -T).(subst0 i u x4 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t (THead (Bind x0) -u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u -x4 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda -(H15: (eq T t (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) -x5)))).(\lambda (H16: (subst0 i u x4 x6)).(eq_ind_r T (THead (Bind x0) x6 -(THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t3: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) -x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) -O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x3 x6 H7 (refl_equal T (THead -(Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift -(S O) O x3) x5))) (pr2_free c0 u1 x3 H10) (pr2_delta c0 d u i H1 x1 x4 H11 x6 -H16) (pr2_free (CHead c0 (Bind x0) x6) x2 x5 H12))) t H15)))) H14)) (\lambda -(H14: (ex2 T (\lambda (t3: T).(eq T t (THead (Bind x0) x4 t3))) (\lambda (t3: -T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind x0) x4 t3))) (\lambda -(t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) -t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat -Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda -(H15: (eq T t (THead (Bind x0) x4 x6))).(\lambda (H16: (subst0 (s (Bind x0) -i) u (THead (Flat Appl) (lift (S O) O x3) x5) x6)).(eq_ind_r T (THead (Bind -x0) x4 x6) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) -x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x6 (THead (Flat -Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) -u2))) (ex2 T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) -t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) -O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind -x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H17: (ex2 T -(\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: -T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda -(u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s -(Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) -x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (H18: (eq T -x6 (THead (Flat Appl) x7 x5))).(\lambda (H19: (subst0 (s (Bind x0) i) u (lift -(S O) O x3) x7)).(eq_ind_r T (THead (Flat Appl) x7 x5) (\lambda (t3: T).(or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x4 t3) -(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) -x4 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) (S O) (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead -(Flat Appl) x7 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind -x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead -(Flat Appl) x7 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (H20: (lt (s (Bind x0) i) (S -O))).(subst0_gen_lift_false x3 u x7 (S O) O (s (Bind x0) i) (le_O_n (s (Bind -x0) i)) H20 H19 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) -(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x7 (s (Bind x0) i) -(S O) O H19 Hle) in (let H20 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x7 -(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead -(Flat Appl) x7 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind -x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead -(Flat Appl) x7 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (H21: (eq T x7 (lift (S O) O -x8))).(\lambda (H22: (subst0 (minus i O) u x3 x8)).(eq_ind_r T (lift (S O) O -x8) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) t3 x5)) (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t3 x5)) -(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) t3 x5)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H23 \def (eq_ind_r -nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x8)) H22 i (minus_n_O i)) in -(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind -x0) x4 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift -(S O) O x8) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x8) x5)) -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) -(ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat -Appl) (lift (S O) O x8) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))) x0 x1 x2 x5 x8 x4 H7 (refl_equal T (THead (Bind x0) x1 x2)) -(refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x8) x5))) -(pr2_delta c0 d u i H1 u1 x3 H10 x8 H23) (pr2_free c0 x1 x4 H11) (pr2_free -(CHead c0 (Bind x0) x4) x2 x5 H12)))) x7 H21)))) H20))))) x6 H18)))) H17)) -(\lambda (H17: (ex2 T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S -O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 -t3)))).(ex2_ind T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O -x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)) -(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 -x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) -x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (H18: (eq T -x6 (THead (Flat Appl) (lift (S O) O x3) x7))).(\lambda (H19: (subst0 (s (Flat -Appl) (s (Bind x0) i)) u x5 x7)).(eq_ind_r T (THead (Flat Appl) (lift (S O) O -x3) x7) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: -T).(eq T (THead (Bind x0) x4 t3) (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 -(THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat -Appl) (lift (S O) O x3) x7)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7)) -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7)) (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7)) -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))) -x0 x1 x2 x7 x3 x4 H7 (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T -(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7))) (pr2_free c0 -u1 x3 H10) (pr2_free c0 x1 x4 H11) (pr2_delta (CHead c0 (Bind x0) x4) d u (S -i) (getl_clear_bind x0 (CHead c0 (Bind x0) x4) c0 x4 (clear_bind x0 c0 x4) -(CHead d (Bind Abbr) u) i H1) x2 x5 H12 x7 H19))) x6 H18)))) H17)) (\lambda -(H17: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat -Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u -(lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat -Appl) (s (Bind x0) i)) u x5 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda -(t3: T).(eq T x6 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda -(t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat -Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) -x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (x8: -T).(\lambda (H18: (eq T x6 (THead (Flat Appl) x7 x8))).(\lambda (H19: (subst0 -(s (Bind x0) i) u (lift (S O) O x3) x7)).(\lambda (H20: (subst0 (s (Flat -Appl) (s (Bind x0) i)) u x5 x8)).(eq_ind_r T (THead (Flat Appl) x7 x8) -(\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T -(THead (Bind x0) x4 t3) (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 -(THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) -(S O) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind -x0) x4 (THead (Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead -(Flat Appl) x7 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (H21: (lt (s (Bind x0) i) (S -O))).(subst0_gen_lift_false x3 u x7 (S O) O (s (Bind x0) i) (le_O_n (s (Bind -x0) i)) H21 H19 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) -(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x7 (s (Bind x0) i) -(S O) O H19 Hle) in (let H21 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x7 -(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead -(Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind -x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead -(Flat Appl) x7 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (x9: T).(\lambda (H22: (eq T x7 (lift (S O) O -x9))).(\lambda (H23: (subst0 (minus i O) u x3 x9)).(eq_ind_r T (lift (S O) O -x9) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) t3 x8)) (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t3 x8)) -(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x4 (THead (Flat Appl) t3 x8)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H24 \def (eq_ind_r -nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x9)) H23 i (minus_n_O i)) in -(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind -x0) x4 (THead (Flat Appl) (lift (S O) O x9) x8)) (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift -(S O) O x9) x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x9) x8)) -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) -(ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat -Appl) (lift (S O) O x9) x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))) x0 x1 x2 x8 x9 x4 H7 (refl_equal T (THead (Bind x0) x1 x2)) -(refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x9) x8))) -(pr2_delta c0 d u i H1 u1 x3 H10 x9 H24) (pr2_free c0 x1 x4 H11) (pr2_delta -(CHead c0 (Bind x0) x4) d u (S i) (getl_clear_bind x0 (CHead c0 (Bind x0) x4) -c0 x4 (clear_bind x0 c0 x4) (CHead d (Bind Abbr) u) i H1) x2 x5 H12 x8 -H20)))) x7 H22)))) H21))))) x6 H18)))))) H17)) (subst0_gen_head (Flat Appl) u -(lift (S O) O x3) x5 x6 (s (Bind x0) i) H16)) t H15)))) H14)) (\lambda (H14: -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind x0) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) -O x3) x5) t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 -u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat -Appl) (lift (S O) O x3) x5) t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) -x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H15: (eq T t -(THead (Bind x0) x6 x7))).(\lambda (H16: (subst0 i u x4 x6)).(\lambda (H17: -(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) -x7)).(eq_ind_r T (THead (Bind x0) x6 x7) (\lambda (t3: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x7 (THead (Flat -Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) -u2))) (ex2 T (\lambda (t3: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) -t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) -O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind -x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H18: (ex2 T -(\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: -T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda -(u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s -(Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) -x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (H19: (eq T -x7 (THead (Flat Appl) x8 x5))).(\lambda (H20: (subst0 (s (Bind x0) i) u (lift -(S O) O x3) x8)).(eq_ind_r T (THead (Flat Appl) x8 x5) (\lambda (t3: T).(or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 t3) -(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) -x6 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) (S O) (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) x8 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind -x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) x8 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (H21: (lt (s (Bind x0) i) (S -O))).(subst0_gen_lift_false x3 u x8 (S O) O (s (Bind x0) i) (le_O_n (s (Bind -x0) i)) H21 H20 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) -(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x8 (s (Bind x0) i) -(S O) O H20 Hle) in (let H21 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x8 -(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) x8 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind -x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) x8 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (x9: T).(\lambda (H22: (eq T x8 (lift (S O) O -x9))).(\lambda (H23: (subst0 (minus i O) u x3 x9)).(eq_ind_r T (lift (S O) O -x9) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) t3 x5)) (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t3 x5)) -(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) t3 x5)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H24 \def (eq_ind_r -nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x9)) H23 i (minus_n_O i)) in -(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind -x0) x6 (THead (Flat Appl) (lift (S O) O x9) x5)) (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift -(S O) O x9) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x9) x5)) -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) -(ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat -Appl) (lift (S O) O x9) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))) x0 x1 x2 x5 x9 x6 H7 (refl_equal T (THead (Bind x0) x1 x2)) -(refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x9) x5))) -(pr2_delta c0 d u i H1 u1 x3 H10 x9 H24) (pr2_delta c0 d u i H1 x1 x4 H11 x6 -H16) (pr2_free (CHead c0 (Bind x0) x6) x2 x5 H12)))) x8 H22)))) H21))))) x7 -H19)))) H18)) (\lambda (H18: (ex2 T (\lambda (t3: T).(eq T x7 (THead (Flat -Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s -(Bind x0) i)) u x5 t3)))).(ex2_ind T (\lambda (t3: T).(eq T x7 (THead (Flat -Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s -(Bind x0) i)) u x5 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda -(H19: (eq T x7 (THead (Flat Appl) (lift (S O) O x3) x8))).(\lambda (H20: -(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x8)).(eq_ind_r T (THead (Flat -Appl) (lift (S O) O x3) x8) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 t3) (THead (Flat Appl) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) -x6 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) -O x3) x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) -t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8)) (THead -(Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8)) (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8)) -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda -(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 -y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))) -x0 x1 x2 x8 x3 x6 H7 (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T -(THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8))) (pr2_free c0 -u1 x3 H10) (pr2_delta c0 d u i H1 x1 x4 H11 x6 H16) (pr2_delta (CHead c0 -(Bind x0) x6) d u (S i) (getl_clear_bind x0 (CHead c0 (Bind x0) x6) c0 x6 -(clear_bind x0 c0 x6) (CHead d (Bind Abbr) u) i H1) x2 x5 H12 x8 H20))) x7 -H19)))) H18)) (\lambda (H18: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T x7 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s -(Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) -u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) -i)) u x5 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead -(Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) -x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda -(x9: T).(\lambda (H19: (eq T x7 (THead (Flat Appl) x8 x9))).(\lambda (H20: -(subst0 (s (Bind x0) i) u (lift (S O) O x3) x8)).(\lambda (H21: (subst0 (s -(Flat Appl) (s (Bind x0) i)) u x5 x9)).(eq_ind_r T (THead (Flat Appl) x8 x9) -(\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T -(THead (Bind x0) x6 t3) (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 -(THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda -(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) -(S O) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind -x0) x6 (THead (Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 -(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) x8 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (H22: (lt (s (Bind x0) i) (S -O))).(subst0_gen_lift_false x3 u x8 (S O) O (s (Bind x0) i) (le_O_n (s (Bind -x0) i)) H22 H20 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) -(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) -(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x8 (s (Bind x0) i) -(S O) O H20 Hle) in (let H22 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x8 -(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda -(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind -x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind Abbr) u2 -t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) x8 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2))))))))) (\lambda (x10: T).(\lambda (H23: (eq T x8 (lift (S O) O -x10))).(\lambda (H24: (subst0 (minus i O) u x3 x10)).(eq_ind_r T (lift (S O) -O x10) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq -T (THead (Bind x0) x6 (THead (Flat Appl) t3 x9)) (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t3 x9)) -(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -(THead (Bind x0) x6 (THead (Flat Appl) t3 x9)) (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H25 \def (eq_ind_r -nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x10)) H24 i (minus_n_O i)) -in (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead -(Bind x0) x6 (THead (Flat Appl) (lift (S O) O x10) x9)) (THead (Flat Appl) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) -x6 (THead (Flat Appl) (lift (S O) O x10) x9)) (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) -O x10) x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) -y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead -(Flat Appl) (lift (S O) O x10) x9)) (THead (Bind b) y2 (THead (Flat Appl) -(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c0 (Bind b) y2) z1 z2))))))) x0 x1 x2 x9 x10 x6 H7 (refl_equal T -(THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) -(lift (S O) O x10) x9))) (pr2_delta c0 d u i H1 u1 x3 H10 x10 H25) (pr2_delta -c0 d u i H1 x1 x4 H11 x6 H16) (pr2_delta (CHead c0 (Bind x0) x6) d u (S i) -(getl_clear_bind x0 (CHead c0 (Bind x0) x6) c0 x6 (clear_bind x0 c0 x6) -(CHead d (Bind Abbr) u) i H1) x2 x5 H12 x9 H21)))) x8 H23)))) H22))))) x7 -H19)))))) H18)) (subst0_gen_head (Flat Appl) u (lift (S O) O x3) x5 x7 (s -(Bind x0) i) H17)) t H15)))))) H14)) (subst0_gen_head (Bind x0) u x4 (THead -(Flat Appl) (lift (S O) O x3) x5) t i H13)) t1 H8)))))))))))))) H6)) -(pr0_gen_appl u1 t1 t2 H5)))))))))))))) c y x H0))) H))))). - -lemma pr2_gen_lift: - \forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall -(d: nat).((pr2 c (lift h d t1) x) \to (\forall (e: C).((drop h d c e) \to -(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr2 e t1 -t2)))))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (H: (pr2 c (lift h d t1) x)).(insert_eq T (lift h d t1) -(\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(\forall (e: C).((drop h d c e) -\to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr2 e -t1 t2)))))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: -C).(\lambda (t: T).(\lambda (t0: T).((eq T t (lift h d t1)) \to (\forall (e: -C).((drop h d c0 e) \to (ex2 T (\lambda (t2: T).(eq T t0 (lift h d t2))) -(\lambda (t2: T).(pr2 e t1 t2))))))))) (\lambda (c0: C).(\lambda (t0: -T).(\lambda (t2: T).(\lambda (H1: (pr0 t0 t2)).(\lambda (H2: (eq T t0 (lift h -d t1))).(\lambda (e: C).(\lambda (_: (drop h d c0 e)).(let H4 \def (eq_ind T -t0 (\lambda (t: T).(pr0 t t2)) H1 (lift h d t1) H2) in (ex2_ind T (\lambda -(t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T -(\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) -(\lambda (x0: T).(\lambda (H5: (eq T t2 (lift h d x0))).(\lambda (H6: (pr0 t1 -x0)).(eq_ind_r T (lift h d x0) (\lambda (t: T).(ex2 T (\lambda (t3: T).(eq T -t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)))) (ex_intro2 T (\lambda -(t3: T).(eq T (lift h d x0) (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) -x0 (refl_equal T (lift h d x0)) (pr2_free e t1 x0 H6)) t2 H5)))) -(pr0_gen_lift t1 t2 h d H4)))))))))) (\lambda (c0: C).(\lambda (d0: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d0 (Bind -Abbr) u))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 -t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t0 -(lift h d t1))).(\lambda (e: C).(\lambda (H5: (drop h d c0 e)).(let H6 \def -(eq_ind T t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (lift h d t1) H4) in (ex2_ind T -(\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 -T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) -(\lambda (x0: T).(\lambda (H7: (eq T t2 (lift h d x0))).(\lambda (H8: (pr0 t1 -x0)).(let H9 \def (eq_ind T t2 (\lambda (t3: T).(subst0 i u t3 t)) H3 (lift h -d x0) H7) in (lt_le_e i d (ex2 T (\lambda (t3: T).(eq T t (lift h d t3))) -(\lambda (t3: T).(pr2 e t1 t3))) (\lambda (H10: (lt i d)).(let H11 \def -(eq_ind nat d (\lambda (n: nat).(subst0 i u (lift h n x0) t)) H9 (S (plus i -(minus d (S i)))) (lt_plus_minus i d H10)) in (let H12 \def (eq_ind nat d -(\lambda (n: nat).(drop h n c0 e)) H5 (S (plus i (minus d (S i)))) -(lt_plus_minus i d H10)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: -C).(eq T u (lift h (minus d (S i)) v)))) (\lambda (v: T).(\lambda (e0: -C).(getl i e (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: -C).(drop h (minus d (S i)) d0 e0))) (ex2 T (\lambda (t3: T).(eq T t (lift h d -t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x1: T).(\lambda (x2: -C).(\lambda (H13: (eq T u (lift h (minus d (S i)) x1))).(\lambda (H14: (getl -i e (CHead x2 (Bind Abbr) x1))).(\lambda (_: (drop h (minus d (S i)) d0 -x2)).(let H16 \def (eq_ind T u (\lambda (t3: T).(subst0 i t3 (lift h (S (plus -i (minus d (S i)))) x0) t)) H11 (lift h (minus d (S i)) x1) H13) in (ex2_ind -T (\lambda (t3: T).(eq T t (lift h (S (plus i (minus d (S i)))) t3))) -(\lambda (t3: T).(subst0 i x1 x0 t3)) (ex2 T (\lambda (t3: T).(eq T t (lift h -d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x3: T).(\lambda (H17: (eq -T t (lift h (S (plus i (minus d (S i)))) x3))).(\lambda (H18: (subst0 i x1 x0 -x3)).(let H19 \def (eq_ind_r nat (S (plus i (minus d (S i)))) (\lambda (n: -nat).(eq T t (lift h n x3))) H17 d (lt_plus_minus i d H10)) in (ex_intro2 T -(\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x3 -H19 (pr2_delta e x2 x1 i H14 t1 x0 H8 x3 H18)))))) (subst0_gen_lift_lt x1 x0 -t i h (minus d (S i)) H16)))))))) (getl_drop_conf_lt Abbr c0 d0 u i H1 e h -(minus d (S i)) H12))))) (\lambda (H10: (le d i)).(lt_le_e i (plus d h) (ex2 -T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) -(\lambda (H11: (lt i (plus d h))).(subst0_gen_lift_false x0 u t h d i H10 H11 -H9 (ex2 T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 -t3))))) (\lambda (H11: (le (plus d h) i)).(ex2_ind T (\lambda (t3: T).(eq T t -(lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u x0 t3)) (ex2 T -(\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) -(\lambda (x1: T).(\lambda (H12: (eq T t (lift h d x1))).(\lambda (H13: -(subst0 (minus i h) u x0 x1)).(ex_intro2 T (\lambda (t3: T).(eq T t (lift h d -t3))) (\lambda (t3: T).(pr2 e t1 t3)) x1 H12 (pr2_delta e d0 u (minus i h) -(getl_drop_conf_ge i (CHead d0 (Bind Abbr) u) c0 H1 e h d H5 H11) t1 x0 H8 x1 -H13))))) (subst0_gen_lift_ge u x0 t i h d H9 H11)))))))))) (pr0_gen_lift t1 -t2 h d H6)))))))))))))))) c y x H0))) H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/pr2.ma b/matita/matita/contribs/lambdadelta/basic_1/pr2/pr2.ma deleted file mode 100644 index 3151fc53c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/pr2.ma +++ /dev/null @@ -1,236 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr2/defs.ma". - -include "basic_1/pr0/pr0.ma". - -include "basic_1/getl/fwd.ma". - -fact pr2_confluence__pr2_free_free: - \forall (c: C).(\forall (t0: T).(\forall (t1: T).(\forall (t2: T).((pr0 t0 -t1) \to ((pr0 t0 t2) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t)))))))) -\def - \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pr0 t0 t1)).(\lambda (H0: (pr0 t0 t2)).(ex2_ind T (\lambda (t: T).(pr0 -t2 t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) -(\lambda (t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H1: (pr0 t2 -x)).(\lambda (H2: (pr0 t1 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) -(\lambda (t: T).(pr2 c t2 t)) x (pr2_free c t1 x H2) (pr2_free c t2 x H1))))) -(pr0_confluence t0 t2 H0 t1 H))))))). - -fact pr2_confluence__pr2_free_delta: - \forall (c: C).(\forall (d: C).(\forall (t0: T).(\forall (t1: T).(\forall -(t2: T).(\forall (t4: T).(\forall (u: T).(\forall (i: nat).((pr0 t0 t1) \to -((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) \to ((subst0 i u t4 t2) -\to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 -t)))))))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (t4: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (pr0 -t0 t1)).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H1: (pr0 -t0 t4)).(\lambda (H2: (subst0 i u t4 t2)).(ex2_ind T (\lambda (t: T).(pr0 t4 -t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda -(t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H3: (pr0 t4 x)).(\lambda (H4: -(pr0 t1 x)).(or_ind (pr0 t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda -(w2: T).(subst0 i u x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t))) (\lambda (H5: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 -c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x (pr2_free c t1 x H4) (pr2_free c t2 -x H5))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: -T).(subst0 i u x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda -(w2: T).(subst0 i u x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t))) (\lambda (x0: T).(\lambda (H6: (pr0 t2 x0)).(\lambda (H7: -(subst0 i u x x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t)) x0 (pr2_delta c d u i H0 t1 x H4 x0 H7) (pr2_free c t2 x0 -H6))))) H5)) (pr0_subst0 t4 x H3 u t2 i H2 u (pr0_refl u)))))) -(pr0_confluence t0 t4 H1 t1 H))))))))))))). - -fact pr2_confluence__pr2_delta_delta: - \forall (c: C).(\forall (d: C).(\forall (d0: C).(\forall (t0: T).(\forall -(t1: T).(\forall (t2: T).(\forall (t3: T).(\forall (t4: T).(\forall (u: -T).(\forall (u0: T).(\forall (i: nat).(\forall (i0: nat).((getl i c (CHead d -(Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t1) \to ((getl i0 c -(CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t4) \to ((subst0 i0 u0 t4 t2) \to -(ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 -t)))))))))))))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (d0: C).(\lambda (t0: T).(\lambda -(t1: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (u: -T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (i0: nat).(\lambda (H: (getl i -c (CHead d (Bind Abbr) u))).(\lambda (H0: (pr0 t0 t3)).(\lambda (H1: (subst0 -i u t3 t1)).(\lambda (H2: (getl i0 c (CHead d0 (Bind Abbr) u0))).(\lambda -(H3: (pr0 t0 t4)).(\lambda (H4: (subst0 i0 u0 t4 t2)).(ex2_ind T (\lambda (t: -T).(pr0 t4 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr2 c t1 -t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H5: (pr0 t4 -x)).(\lambda (H6: (pr0 t3 x)).(or_ind (pr0 t1 x) (ex2 T (\lambda (w2: T).(pr0 -t1 w2)) (\lambda (w2: T).(subst0 i u x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 -t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H7: (pr0 t1 x)).(or_ind (pr0 t2 -x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x -w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) -(\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda -(t: T).(pr2 c t2 t)) x (pr2_free c t1 x H7) (pr2_free c t2 x H8))) (\lambda -(H8: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x -w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 -u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) -(\lambda (x0: T).(\lambda (H9: (pr0 t2 x0)).(\lambda (H10: (subst0 i0 u0 x -x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) -x0 (pr2_delta c d0 u0 i0 H2 t1 x H7 x0 H10) (pr2_free c t2 x0 H9))))) H8)) -(pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))) (\lambda (H7: (ex2 T -(\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)))).(ex2_ind -T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)) (ex2 T -(\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x0: -T).(\lambda (H8: (pr0 t1 x0)).(\lambda (H9: (subst0 i u x x0)).(or_ind (pr0 -t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x -w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) -(\lambda (H10: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) -(\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H -t2 x H10 x0 H9))) (\lambda (H10: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) -(\lambda (w2: T).(subst0 i0 u0 x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 -w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 -t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x1: T).(\lambda (H11: (pr0 t2 -x1)).(\lambda (H12: (subst0 i0 u0 x x1)).(neq_eq_e i i0 (ex2 T (\lambda (t: -T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H13: (not (eq nat i -i0))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 -i0 u0 x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 -t))) (\lambda (x2: T).(\lambda (H14: (subst0 i u x1 x2)).(\lambda (H15: -(subst0 i0 u0 x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t)) x2 (pr2_delta c d0 u0 i0 H2 t1 x0 H8 x2 H15) (pr2_delta c d -u i H t2 x1 H11 x2 H14))))) (subst0_confluence_neq x x1 u0 i0 H12 x0 u i H9 -(sym_not_eq nat i i0 H13)))) (\lambda (H13: (eq nat i i0)).(let H14 \def -(eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u0 x x1)) H12 i H13) in (let H15 -\def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d0 (Bind Abbr) u0))) -H2 i H13) in (let H16 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: -C).(getl i c c0)) H (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind -Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in (let H17 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c0 _ _) -\Rightarrow c0])) (CHead d (Bind Abbr) u) (CHead d0 (Bind Abbr) u0) -(getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in -((let H18 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead -d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind -Abbr) u0) H15)) in (\lambda (H19: (eq C d d0)).(let H20 \def (eq_ind_r T u0 -(\lambda (t: T).(subst0 i t x x1)) H14 u H18) in (let H21 \def (eq_ind_r T u0 -(\lambda (t: T).(getl i c (CHead d0 (Bind Abbr) t))) H16 u H18) in (let H22 -\def (eq_ind_r C d0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H21 -d H19) in (or4_ind (eq T x1 x0) (ex2 T (\lambda (t: T).(subst0 i u x1 t)) -(\lambda (t: T).(subst0 i u x0 t))) (subst0 i u x1 x0) (subst0 i u x0 x1) -(ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda -(H23: (eq T x1 x0)).(let H24 \def (eq_ind T x1 (\lambda (t: T).(pr0 t2 t)) -H11 x0 H23) in (ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_free c t2 x0 H24)))) (\lambda -(H23: (ex2 T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u -x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: -T).(subst0 i u x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t))) (\lambda (x2: T).(\lambda (H24: (subst0 i u x1 -x2)).(\lambda (H25: (subst0 i u x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c -t1 t)) (\lambda (t: T).(pr2 c t2 t)) x2 (pr2_delta c d u i H22 t1 x0 H8 x2 -H25) (pr2_delta c d u i H22 t2 x1 H11 x2 H24))))) H23)) (\lambda (H23: -(subst0 i u x1 x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H22 t2 x1 H11 x0 -H23))) (\lambda (H23: (subst0 i u x0 x1)).(ex_intro2 T (\lambda (t: T).(pr2 c -t1 t)) (\lambda (t: T).(pr2 c t2 t)) x1 (pr2_delta c d u i H22 t1 x0 H8 x1 -H23) (pr2_free c t2 x1 H11))) (subst0_confluence_eq x x1 u i H20 x0 H9))))))) -H17)))))))))) H10)) (pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))))) -H7)) (pr0_subst0 t3 x H6 u t1 i H1 u (pr0_refl u)))))) (pr0_confluence t0 t4 -H3 t3 H0))))))))))))))))))). - -theorem pr2_confluence: - \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr2 c t0 t1) \to (\forall -(t2: T).((pr2 c t0 t2) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: -T).(pr2 c t2 t)))))))) -\def - \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr2 c t0 -t1)).(\lambda (t2: T).(\lambda (H0: (pr2 c t0 t2)).(let H1 \def (match H with -[(pr2_free c0 t3 t4 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: -(eq T t3 t0)).(\lambda (H4: (eq T t4 t1)).(eq_ind C c (\lambda (_: C).((eq T -t3 t0) \to ((eq T t4 t1) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t: T).(pr2 c -t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H5: (eq T t3 t0)).(eq_ind -T t0 (\lambda (t: T).((eq T t4 t1) \to ((pr0 t t4) \to (ex2 T (\lambda (t5: -T).(pr2 c t1 t5)) (\lambda (t5: T).(pr2 c t2 t5)))))) (\lambda (H6: (eq T t4 -t1)).(eq_ind T t1 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t5: -T).(pr2 c t1 t5)) (\lambda (t5: T).(pr2 c t2 t5))))) (\lambda (H7: (pr0 t0 -t1)).(let H8 \def (match H0 with [(pr2_free c1 t5 t6 H8) \Rightarrow (\lambda -(H9: (eq C c1 c)).(\lambda (H10: (eq T t5 t0)).(\lambda (H11: (eq T t6 -t2)).(eq_ind C c (\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 -t6) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 -t))))))) (\lambda (H12: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t6 -t2) \to ((pr0 t t6) \to (ex2 T (\lambda (t7: T).(pr2 c t1 t7)) (\lambda (t7: -T).(pr2 c t2 t7)))))) (\lambda (H13: (eq T t6 t2)).(eq_ind T t2 (\lambda (t: -T).((pr0 t0 t) \to (ex2 T (\lambda (t7: T).(pr2 c t1 t7)) (\lambda (t7: -T).(pr2 c t2 t7))))) (\lambda (H14: (pr0 t0 -t2)).(pr2_confluence__pr2_free_free c t0 t1 t2 H7 H14)) t6 (sym_eq T t6 t2 -H13))) t5 (sym_eq T t5 t0 H12))) c1 (sym_eq C c1 c H9) H10 H11 H8)))) | -(pr2_delta c1 d u i H8 t5 t6 H9 t H10) \Rightarrow (\lambda (H11: (eq C c1 -c)).(\lambda (H12: (eq T t5 t0)).(\lambda (H13: (eq T t t2)).(eq_ind C c -(\lambda (c2: C).((eq T t5 t0) \to ((eq T t t2) \to ((getl i c2 (CHead d -(Bind Abbr) u)) \to ((pr0 t5 t6) \to ((subst0 i u t6 t) \to (ex2 T (\lambda -(t7: T).(pr2 c t1 t7)) (\lambda (t7: T).(pr2 c t2 t7))))))))) (\lambda (H14: -(eq T t5 t0)).(eq_ind T t0 (\lambda (t7: T).((eq T t t2) \to ((getl i c -(CHead d (Bind Abbr) u)) \to ((pr0 t7 t6) \to ((subst0 i u t6 t) \to (ex2 T -(\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 t8)))))))) -(\lambda (H15: (eq T t t2)).(eq_ind T t2 (\lambda (t7: T).((getl i c (CHead d -(Bind Abbr) u)) \to ((pr0 t0 t6) \to ((subst0 i u t6 t7) \to (ex2 T (\lambda -(t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 t8))))))) (\lambda (H16: -(getl i c (CHead d (Bind Abbr) u))).(\lambda (H17: (pr0 t0 t6)).(\lambda -(H18: (subst0 i u t6 t2)).(pr2_confluence__pr2_free_delta c d t0 t1 t2 t6 u i -H7 H16 H17 H18)))) t (sym_eq T t t2 H15))) t5 (sym_eq T t5 t0 H14))) c1 -(sym_eq C c1 c H11) H12 H13 H8 H9 H10))))]) in (H8 (refl_equal C c) -(refl_equal T t0) (refl_equal T t2)))) t4 (sym_eq T t4 t1 H6))) t3 (sym_eq T -t3 t0 H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t3 t4 -H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t3 -t0)).(\lambda (H6: (eq T t t1)).(eq_ind C c (\lambda (c1: C).((eq T t3 t0) -\to ((eq T t t1) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t3 t4) -\to ((subst0 i u t4 t) \to (ex2 T (\lambda (t5: T).(pr2 c t1 t5)) (\lambda -(t5: T).(pr2 c t2 t5))))))))) (\lambda (H7: (eq T t3 t0)).(eq_ind T t0 -(\lambda (t5: T).((eq T t t1) \to ((getl i c (CHead d (Bind Abbr) u)) \to -((pr0 t5 t4) \to ((subst0 i u t4 t) \to (ex2 T (\lambda (t6: T).(pr2 c t1 -t6)) (\lambda (t6: T).(pr2 c t2 t6)))))))) (\lambda (H8: (eq T t t1)).(eq_ind -T t1 (\lambda (t5: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) -\to ((subst0 i u t4 t5) \to (ex2 T (\lambda (t6: T).(pr2 c t1 t6)) (\lambda -(t6: T).(pr2 c t2 t6))))))) (\lambda (H9: (getl i c (CHead d (Bind Abbr) -u))).(\lambda (H10: (pr0 t0 t4)).(\lambda (H11: (subst0 i u t4 t1)).(let H12 -\def (match H0 with [(pr2_free c1 t5 t6 H12) \Rightarrow (\lambda (H13: (eq C -c1 c)).(\lambda (H14: (eq T t5 t0)).(\lambda (H15: (eq T t6 t2)).(eq_ind C c -(\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T -(\lambda (t7: T).(pr2 c t1 t7)) (\lambda (t7: T).(pr2 c t2 t7))))))) (\lambda -(H16: (eq T t5 t0)).(eq_ind T t0 (\lambda (t7: T).((eq T t6 t2) \to ((pr0 t7 -t6) \to (ex2 T (\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 -t8)))))) (\lambda (H17: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t0 -t7) \to (ex2 T (\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 -t8))))) (\lambda (H18: (pr0 t0 t2)).(ex2_sym T (pr2 c t2) (pr2 c t1) -(pr2_confluence__pr2_free_delta c d t0 t2 t1 t4 u i H18 H9 H10 H11))) t6 -(sym_eq T t6 t2 H17))) t5 (sym_eq T t5 t0 H16))) c1 (sym_eq C c1 c H13) H14 -H15 H12)))) | (pr2_delta c1 d0 u0 i0 H12 t5 t6 H13 t7 H14) \Rightarrow -(\lambda (H15: (eq C c1 c)).(\lambda (H16: (eq T t5 t0)).(\lambda (H17: (eq T -t7 t2)).(eq_ind C c (\lambda (c2: C).((eq T t5 t0) \to ((eq T t7 t2) \to -((getl i0 c2 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t5 t6) \to ((subst0 i0 u0 -t6 t7) \to (ex2 T (\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 -t8))))))))) (\lambda (H18: (eq T t5 t0)).(eq_ind T t0 (\lambda (t8: T).((eq T -t7 t2) \to ((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t8 t6) \to -((subst0 i0 u0 t6 t7) \to (ex2 T (\lambda (t9: T).(pr2 c t1 t9)) (\lambda -(t9: T).(pr2 c t2 t9)))))))) (\lambda (H19: (eq T t7 t2)).(eq_ind T t2 -(\lambda (t8: T).((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t6) \to -((subst0 i0 u0 t6 t8) \to (ex2 T (\lambda (t9: T).(pr2 c t1 t9)) (\lambda -(t9: T).(pr2 c t2 t9))))))) (\lambda (H20: (getl i0 c (CHead d0 (Bind Abbr) -u0))).(\lambda (H21: (pr0 t0 t6)).(\lambda (H22: (subst0 i0 u0 t6 -t2)).(pr2_confluence__pr2_delta_delta c d d0 t0 t1 t2 t4 t6 u u0 i i0 H9 H10 -H11 H20 H21 H22)))) t7 (sym_eq T t7 t2 H19))) t5 (sym_eq T t5 t0 H18))) c1 -(sym_eq C c1 c H15) H16 H17 H12 H13 H14))))]) in (H12 (refl_equal C c) -(refl_equal T t0) (refl_equal T t2)))))) t (sym_eq T t t1 H8))) t3 (sym_eq T -t3 t0 H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C -c) (refl_equal T t0) (refl_equal T t1)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/props.ma b/matita/matita/contribs/lambdadelta/basic_1/pr2/props.ma deleted file mode 100644 index 5677ca53e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/props.ma +++ /dev/null @@ -1,998 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr2/fwd.ma". - -include "basic_1/pr0/subst0.ma". - -lemma pr2_thin_dx: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(u: T).(\forall (f: F).(pr2 c (THead (Flat f) u t1) (THead (Flat f) u -t2))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(\lambda (u: T).(\lambda (f: F).(pr2_ind (\lambda (c0: C).(\lambda (t: -T).(\lambda (t0: T).(pr2 c0 (THead (Flat f) u t) (THead (Flat f) u t0))))) -(\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr0 t0 -t3)).(pr2_free c0 (THead (Flat f) u t0) (THead (Flat f) u t3) (pr0_comp u u -(pr0_refl u) t0 t3 H0 (Flat f))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind -Abbr) u0))).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (pr0 t0 -t3)).(\lambda (t: T).(\lambda (H2: (subst0 i u0 t3 t)).(pr2_delta c0 d u0 i -H0 (THead (Flat f) u t0) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t0 -t3 H1 (Flat f)) (THead (Flat f) u t) (subst0_snd (Flat f) u0 t t3 i H2 -u)))))))))))) c t1 t2 H)))))). - -lemma pr2_head_1: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u1 u2) \to (\forall -(k: K).(\forall (t: T).(pr2 c (THead k u1 t) (THead k u2 t))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u1 -u2)).(\lambda (k: K).(\lambda (t: T).(pr2_ind (\lambda (c0: C).(\lambda (t0: -T).(\lambda (t1: T).(pr2 c0 (THead k t0 t) (THead k t1 t))))) (\lambda (c0: -C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr0 t1 t2)).(pr2_free c0 -(THead k t1 t) (THead k t2 t) (pr0_comp t1 t2 H0 t t (pr0_refl t) k)))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H1: (pr0 t1 t2)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t2 -t0)).(pr2_delta c0 d u i H0 (THead k t1 t) (THead k t2 t) (pr0_comp t1 t2 H1 -t t (pr0_refl t) k) (THead k t0 t) (subst0_fst u t0 t2 i H2 t k)))))))))))) c -u1 u2 H)))))). - -lemma pr2_head_2: - \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).(\forall -(k: K).((pr2 (CHead c k u) t1 t2) \to (pr2 c (THead k u t1) (THead k u -t2))))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(k: K).(\lambda (H: (pr2 (CHead c k u) t1 t2)).(insert_eq C (CHead c k u) -(\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c (THead k u t1) (THead -k u t2))) (\lambda (y: C).(\lambda (H0: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: -C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c k u)) \to (pr2 c -(THead k u t) (THead k u t0)))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda -(t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c k -u))).(pr2_free c (THead k u t3) (THead k u t4) (pr0_comp u u (pr0_refl u) t3 -t4 H1 k))))))) (K_ind (\lambda (k0: K).(\forall (c0: C).(\forall (d: -C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Abbr) u0)) -\to (\forall (t3: T).(\forall (t4: T).((pr0 t3 t4) \to (\forall (t: -T).((subst0 i u0 t4 t) \to ((eq C c0 (CHead c k0 u)) \to (pr2 c (THead k0 u -t3) (THead k0 u t)))))))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n c0 -(CHead d (Bind Abbr) u0)) \to (\forall (t3: T).(\forall (t4: T).((pr0 t3 t4) -\to (\forall (t: T).((subst0 n u0 t4 t) \to ((eq C c0 (CHead c (Bind b) u)) -\to (pr2 c (THead (Bind b) u t3) (THead (Bind b) u t)))))))))) (\lambda (H1: -(getl O c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: (subst0 O u0 t4 -t)).(\lambda (H4: (eq C c0 (CHead c (Bind b) u))).(let H5 \def (eq_ind C c0 -(\lambda (c1: C).(getl O c1 (CHead d (Bind Abbr) u0))) H1 (CHead c (Bind b) -u) H4) in (let H6 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u0) -(CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u -(getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H5))) in ((let H7 -\def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | -(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat -_) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) -(clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) -u) (CHead d (Bind Abbr) u0) H5))) in ((let H8 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) -(CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d -(Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) -H5))) in (\lambda (H9: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H11 \def -(eq_ind T u0 (\lambda (t0: T).(subst0 O t0 t4 t)) H3 u H8) in (eq_ind B Abbr -(\lambda (b0: B).(pr2 c (THead (Bind b0) u t3) (THead (Bind b0) u t))) -(pr2_free c (THead (Bind Abbr) u t3) (THead (Bind Abbr) u t) (pr0_delta u u -(pr0_refl u) t3 t4 H2 t H11)) b H9))))) H7)) H6)))))))))) (\lambda (n: -nat).(\lambda (H1: (((getl n c0 (CHead d (Bind Abbr) u0)) \to (\forall (t3: -T).(\forall (t4: T).((pr0 t3 t4) \to (\forall (t: T).((subst0 n u0 t4 t) \to -((eq C c0 (CHead c (Bind b) u)) \to (pr2 c (THead (Bind b) u t3) (THead (Bind -b) u t))))))))))).(\lambda (H2: (getl (S n) c0 (CHead d (Bind Abbr) -u0))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda -(t: T).(\lambda (H4: (subst0 (S n) u0 t4 t)).(\lambda (H5: (eq C c0 (CHead c -(Bind b) u))).(let H6 \def (eq_ind C c0 (\lambda (c1: C).(getl (S n) c1 -(CHead d (Bind Abbr) u0))) H2 (CHead c (Bind b) u) H5) in (let H7 \def -(eq_ind C c0 (\lambda (c1: C).((getl n c1 (CHead d (Bind Abbr) u0)) \to -(\forall (t5: T).(\forall (t6: T).((pr0 t5 t6) \to (\forall (t0: T).((subst0 -n u0 t6 t0) \to ((eq C c1 (CHead c (Bind b) u)) \to (pr2 c (THead (Bind b) u -t5) (THead (Bind b) u t0)))))))))) H1 (CHead c (Bind b) u) H5) in (pr2_delta -c d u0 (r (Bind b) n) (getl_gen_S (Bind b) c (CHead d (Bind Abbr) u0) u n H6) -(THead (Bind b) u t3) (THead (Bind b) u t4) (pr0_comp u u (pr0_refl u) t3 t4 -H3 (Bind b)) (THead (Bind b) u t) (subst0_snd (Bind b) u0 t t4 (r (Bind b) n) -H4 u))))))))))))) i)))))) (\lambda (f: F).(\lambda (c0: C).(\lambda (d: -C).(\lambda (u0: T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n c0 -(CHead d (Bind Abbr) u0)) \to (\forall (t3: T).(\forall (t4: T).((pr0 t3 t4) -\to (\forall (t: T).((subst0 n u0 t4 t) \to ((eq C c0 (CHead c (Flat f) u)) -\to (pr2 c (THead (Flat f) u t3) (THead (Flat f) u t)))))))))) (\lambda (H1: -(getl O c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: (subst0 O u0 t4 -t)).(\lambda (H4: (eq C c0 (CHead c (Flat f) u))).(let H5 \def (eq_ind C c0 -(\lambda (c1: C).(getl O c1 (CHead d (Bind Abbr) u0))) H1 (CHead c (Flat f) -u) H4) in (pr2_delta c d u0 O (getl_intro O c (CHead d (Bind Abbr) u0) c -(drop_refl c) (clear_gen_flat f c (CHead d (Bind Abbr) u0) u (getl_gen_O -(CHead c (Flat f) u) (CHead d (Bind Abbr) u0) H5))) (THead (Flat f) u t3) -(THead (Flat f) u t4) (pr0_comp u u (pr0_refl u) t3 t4 H2 (Flat f)) (THead -(Flat f) u t) (subst0_snd (Flat f) u0 t t4 O H3 u)))))))))) (\lambda (n: -nat).(\lambda (H1: (((getl n c0 (CHead d (Bind Abbr) u0)) \to (\forall (t3: -T).(\forall (t4: T).((pr0 t3 t4) \to (\forall (t: T).((subst0 n u0 t4 t) \to -((eq C c0 (CHead c (Flat f) u)) \to (pr2 c (THead (Flat f) u t3) (THead (Flat -f) u t))))))))))).(\lambda (H2: (getl (S n) c0 (CHead d (Bind Abbr) -u0))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda -(t: T).(\lambda (H4: (subst0 (S n) u0 t4 t)).(\lambda (H5: (eq C c0 (CHead c -(Flat f) u))).(let H6 \def (eq_ind C c0 (\lambda (c1: C).(getl (S n) c1 -(CHead d (Bind Abbr) u0))) H2 (CHead c (Flat f) u) H5) in (let H7 \def -(eq_ind C c0 (\lambda (c1: C).((getl n c1 (CHead d (Bind Abbr) u0)) \to -(\forall (t5: T).(\forall (t6: T).((pr0 t5 t6) \to (\forall (t0: T).((subst0 -n u0 t6 t0) \to ((eq C c1 (CHead c (Flat f) u)) \to (pr2 c (THead (Flat f) u -t5) (THead (Flat f) u t0)))))))))) H1 (CHead c (Flat f) u) H5) in (pr2_delta -c d u0 (r (Flat f) n) (getl_gen_S (Flat f) c (CHead d (Bind Abbr) u0) u n H6) -(THead (Flat f) u t3) (THead (Flat f) u t4) (pr0_comp u u (pr0_refl u) t3 t4 -H3 (Flat f)) (THead (Flat f) u t) (subst0_snd (Flat f) u0 t t4 (r (Flat f) n) -H4 u))))))))))))) i)))))) k) y t1 t2 H0))) H)))))). - -lemma clear_pr2_trans: - \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pr2 c2 t1 t2) \to -(\forall (c1: C).((clear c1 c2) \to (pr2 c1 t1 t2)))))) -\def - \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c2 t1 -t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\forall (c1: -C).((clear c1 c) \to (pr2 c1 t t0)))))) (\lambda (c: C).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (c1: C).(\lambda (_: -(clear c1 c)).(pr2_free c1 t3 t4 H0))))))) (\lambda (c: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind -Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 -t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c1: -C).(\lambda (H3: (clear c1 c)).(pr2_delta c1 d u i (clear_getl_trans i c -(CHead d (Bind Abbr) u) H0 c1 H3) t3 t4 H1 t H2))))))))))))) c2 t1 t2 H)))). - -lemma pr2_cflat: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(f: F).(\forall (v: T).(pr2 (CHead c (Flat f) v) t1 t2)))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(\lambda (f: F).(\lambda (v: T).(pr2_ind (\lambda (c0: C).(\lambda (t: -T).(\lambda (t0: T).(pr2 (CHead c0 (Flat f) v) t t0)))) (\lambda (c0: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(pr2_free -(CHead c0 (Flat f) v) t3 t4 H0))))) (\lambda (c0: C).(\lambda (d: C).(\lambda -(u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) -u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda -(t: T).(\lambda (H2: (subst0 i u t4 t)).(pr2_delta (CHead c0 (Flat f) v) d u -i (getl_flat c0 (CHead d (Bind Abbr) u) i H0 f v) t3 t4 H1 t H2))))))))))) c -t1 t2 H)))))). - -lemma pr2_ctail: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(k: K).(\forall (u: T).(pr2 (CTail k u c) t1 t2)))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(\lambda (k: K).(\lambda (u: T).(pr2_ind (\lambda (c0: C).(\lambda (t: -T).(\lambda (t0: T).(pr2 (CTail k u c0) t t0)))) (\lambda (c0: C).(\lambda -(t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(pr2_free (CTail k u c0) -t3 t4 H0))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: -nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: -(subst0 i u0 t4 t)).(pr2_delta (CTail k u c0) (CTail k u d) u0 i (getl_ctail -Abbr c0 d u0 i H0 k u) t3 t4 H1 t H2))))))))))) c t1 t2 H)))))). - -lemma pr2_change: - \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: -T).(\forall (t1: T).(\forall (t2: T).((pr2 (CHead c (Bind b) v1) t1 t2) \to -(\forall (v2: T).(pr2 (CHead c (Bind b) v2) t1 t2)))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda -(v1: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 (CHead c (Bind -b) v1) t1 t2)).(\lambda (v2: T).(insert_eq C (CHead c (Bind b) v1) (\lambda -(c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 (CHead c (Bind b) v2) t1 t2)) -(\lambda (y: C).(\lambda (H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: -C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Bind b) v1)) \to (pr2 -(CHead c (Bind b) v2) t t0))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda -(t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Bind b) -v1))).(pr2_free (CHead c (Bind b) v2) t3 t4 H2)))))) (\lambda (c0: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H2: (getl i c0 -(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: -(pr0 t3 t4)).(\lambda (t: T).(\lambda (H4: (subst0 i u t4 t)).(\lambda (H5: -(eq C c0 (CHead c (Bind b) v1))).(let H6 \def (eq_ind C c0 (\lambda (c1: -C).(getl i c1 (CHead d (Bind Abbr) u))) H2 (CHead c (Bind b) v1) H5) in -(nat_ind (\lambda (n: nat).((getl n (CHead c (Bind b) v1) (CHead d (Bind -Abbr) u)) \to ((subst0 n u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t)))) -(\lambda (H7: (getl O (CHead c (Bind b) v1) (CHead d (Bind Abbr) -u))).(\lambda (H8: (subst0 O u t4 t)).(let H9 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) -(CHead d (Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d -(Bind Abbr) u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) -H7))) in ((let H10 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) -\Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) -(CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) u) v1 -(getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in ((let H11 -\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) (CHead c (Bind b) -v1) (clear_gen_bind b c (CHead d (Bind Abbr) u) v1 (getl_gen_O (CHead c (Bind -b) v1) (CHead d (Bind Abbr) u) H7))) in (\lambda (H12: (eq B Abbr -b)).(\lambda (_: (eq C d c)).(let H14 \def (eq_ind T u (\lambda (t0: -T).(subst0 O t0 t4 t)) H8 v1 H11) in (let H15 \def (eq_ind_r B b (\lambda -(b0: B).(not (eq B b0 Abbr))) H Abbr H12) in (eq_ind B Abbr (\lambda (b0: -B).(pr2 (CHead c (Bind b0) v2) t3 t)) (let H16 \def (match (H15 (refl_equal B -Abbr)) in False with []) in H16) b H12)))))) H10)) H9)))) (\lambda (i0: -nat).(\lambda (_: (((getl i0 (CHead c (Bind b) v1) (CHead d (Bind Abbr) u)) -\to ((subst0 i0 u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t))))).(\lambda -(H7: (getl (S i0) (CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda -(H8: (subst0 (S i0) u t4 t)).(pr2_delta (CHead c (Bind b) v2) d u (S i0) -(getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c -(CHead d (Bind Abbr) u) v1 i0 H7) v2) t3 t4 H3 t H8))))) i H6 H4))))))))))))) -y t1 t2 H1))) H0)))))))). - -lemma pr2_lift: - \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h -d c e) \to (\forall (t1: T).(\forall (t2: T).((pr2 e t1 t2) \to (pr2 c (lift -h d t1) (lift h d t2))))))))) -\def - \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 e t1 -t2)).(insert_eq C e (\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c -(lift h d t1) (lift h d t2))) (\lambda (y: C).(\lambda (H1: (pr2 y t1 -t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 e) -\to (pr2 c (lift h d t) (lift h d t0)))))) (\lambda (c0: C).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (_: (eq C c0 -e)).(pr2_free c (lift h d t3) (lift h d t4) (pr0_lift t3 t4 H2 h d))))))) -(\lambda (c0: C).(\lambda (d0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H2: (getl i c0 (CHead d0 (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (H3: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H4: (subst0 i u t4 -t)).(\lambda (H5: (eq C c0 e)).(let H6 \def (eq_ind C c0 (\lambda (c1: -C).(getl i c1 (CHead d0 (Bind Abbr) u))) H2 e H5) in (lt_le_e i d (pr2 c -(lift h d t3) (lift h d t)) (\lambda (H7: (lt i d)).(let H8 \def -(drop_getl_trans_le i d (le_S_n i d (le_S_n (S i) (S d) (le_S (S (S i)) (S d) -(le_n_S (S i) d H7)))) c e h H (CHead d0 (Bind Abbr) u) H6) in (ex3_2_ind C C -(\lambda (e0: C).(\lambda (_: C).(drop i O c e0))) (\lambda (e0: C).(\lambda -(e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear -e1 (CHead d0 (Bind Abbr) u)))) (pr2 c (lift h d t3) (lift h d t)) (\lambda -(x0: C).(\lambda (x1: C).(\lambda (H9: (drop i O c x0)).(\lambda (H10: (drop -h (minus d i) x0 x1)).(\lambda (H11: (clear x1 (CHead d0 (Bind Abbr) -u))).(let H12 \def (eq_ind nat (minus d i) (\lambda (n: nat).(drop h n x0 -x1)) H10 (S (minus d (S i))) (minus_x_Sy d i H7)) in (let H13 \def -(drop_clear_S x1 x0 h (minus d (S i)) H12 Abbr d0 u H11) in (ex2_ind C -(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d (S i)) -u)))) (\lambda (c1: C).(drop h (minus d (S i)) c1 d0)) (pr2 c (lift h d t3) -(lift h d t)) (\lambda (x: C).(\lambda (H14: (clear x0 (CHead x (Bind Abbr) -(lift h (minus d (S i)) u)))).(\lambda (_: (drop h (minus d (S i)) x -d0)).(pr2_delta c x (lift h (minus d (S i)) u) i (getl_intro i c (CHead x -(Bind Abbr) (lift h (minus d (S i)) u)) x0 H9 H14) (lift h d t3) (lift h d -t4) (pr0_lift t3 t4 H3 h d) (lift h d t) (subst0_lift_lt t4 t u i H4 d H7 -h))))) H13)))))))) H8))) (\lambda (H7: (le d i)).(pr2_delta c d0 u (plus i h) -(drop_getl_trans_ge i c e d h H (CHead d0 (Bind Abbr) u) H6 H7) (lift h d t3) -(lift h d t4) (pr0_lift t3 t4 H3 h d) (lift h d t) (subst0_lift_ge t4 t u i h -H4 d H7)))))))))))))))) y t1 t2 H1))) H0)))))))). - -lemma pr2_gen_abbr: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c -(THead (Bind Abbr) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(or3 (\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))) (ex2 T (\lambda (u: -T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t2))) (ex3_2 T -T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) -(\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c (Bind Abbr) u1) z t2)))))))) (\forall (b: B).(\forall (u: -T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr2 c (THead (Bind Abbr) u1 t1) x)).(insert_eq T (THead (Bind Abbr) u1 -t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(or3 -(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))) (ex2 T -(\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 -t2))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) -u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t2)))))))) (\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))) -(\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: C).(\lambda -(t: T).(\lambda (t0: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -t2))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind -Abbr) u) t1 t2))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 -(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) -(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t2)))))))) -(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O -t0))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: -(pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Bind Abbr) u1 t1))).(let H3 \def -(eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Bind Abbr) u1 t1) H2) in -(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O t2)) (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind -b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead -c0 (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z -t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -(lift (S O) O t2))))) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T -(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 -t3)))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda -(u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t3)))))) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T -(\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 -t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) -u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O t2))))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t2 (THead (Bind Abbr) -x0 x1))).(\lambda (H6: (pr0 u1 x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T -(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 -x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda -(y0: T).(subst0 O x0 y0 x1))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: -B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: -T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 -T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) -(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: -T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O t2))))) (\lambda (H7: (pr0 t1 -x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind -Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 -(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) -(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) -(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O -t)))))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead -(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: -B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: -T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 -T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) -(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: -T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) -x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: -T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) -(\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda -(y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) -(pr2_free c0 u1 x0 H6) (or3_intro0 (\forall (b: B).(\forall (u: T).(pr2 -(CHead c0 (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda -(u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead -c0 (Bind b) u) t1 x1 H7)))))) t2 H5)) (\lambda (H_x0: (ex2 T (\lambda (y0: -T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 x1)))).(ex2_ind T (\lambda -(y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 x1)) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind -Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 -(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) -(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) -(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O -t2))))) (\lambda (x2: T).(\lambda (H7: (pr0 t1 x2)).(\lambda (H8: (subst0 O -x0 x2 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind -Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 -(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) -(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) -(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O -t)))))) (ex2_ind T (\lambda (t: T).(subst0 O u1 x2 t)) (\lambda (t: T).(pr0 t -x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind -Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: -B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: -T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 -T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) -(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: -T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1)))))) -(\lambda (x3: T).(\lambda (_: (subst0 O u1 x2 x3)).(\lambda (_: (pr0 x3 -x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead -(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: -B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: -T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 -T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) -(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: -T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) -x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 -u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: -T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) -(\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda -(y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) -(pr2_free c0 u1 x0 H6) (or3_intro1 (\forall (b: B).(\forall (u: T).(pr2 -(CHead c0 (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda -(u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z x1)))) (ex_intro2 T (\lambda (u: T).(pr0 u1 u)) (\lambda -(u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 x1)) x0 H6 (pr2_delta (CHead c0 (Bind -Abbr) x0) c0 x0 O (getl_refl Abbr c0 x0) t1 x2 H7 x1 H8)))))))) -(pr0_subst0_back x0 x2 x1 O H8 u1 H6)) t2 H5)))) H_x0)) H_x)))))) H4)) -(\lambda (H4: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T -(\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 -t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) -u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O t2)))) -(\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) t1 (lift (S -O) O t2) H4))))) (pr0_gen_abbr u1 t1 t2 H3)))))))) (\lambda (c0: C).(\lambda -(d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d -(Bind Abbr) u))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 -t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t0 -(THead (Bind Abbr) u1 t1))).(let H5 \def (eq_ind T t0 (\lambda (t3: T).(pr0 -t3 t2)) H2 (THead (Bind Abbr) u1 t1) H4) in (or_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 -t3))))))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: -T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) -(ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 -y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda -(z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (H6: -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: -T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O u2 y0 t3)))))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 -t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 -t3)))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H7: (eq T t2 (THead (Bind Abbr) x0 x1))).(\lambda (H8: (pr0 u1 -x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) -(\lambda (y0: T).(subst0 O x0 y0 x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda -(y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 x1))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z -t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T t2 -(\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Bind Abbr) x0 x1) H7) in -(or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda -(u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind -Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z -t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t (THead -(Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T -(\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 -i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x2: T).(\lambda (H12: (eq T -t (THead (Bind Abbr) x2 x1))).(\lambda (H13: (subst0 i u x0 x2)).(or_introl -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 -(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: -T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x2 x1 H12 -(pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (or3_intro0 (\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 -u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x1))) (ex3_2 T T -(\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) -(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c0 (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u0: -T).(pr2_free (CHead c0 (Bind b) u0) t1 x1 H9))))))))) H11)) (\lambda (H11: -(ex2 T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x0 t3))) (\lambda (t3: -T).(subst0 (s (Bind Abbr) i) u x1 t3)))).(ex2_ind T (\lambda (t3: T).(eq T t -(THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 -t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind -Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 -(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: -T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x2: T).(\lambda (H12: (eq T -t (THead (Bind Abbr) x0 x2))).(\lambda (H13: (subst0 (s (Bind Abbr) i) u x1 -x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x0 x2 H12 -(pr2_free c0 u1 x0 H8) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 x2))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x2))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z x2)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta -(CHead c0 (Bind b) u0) d u (S i) (getl_head (Bind b) i c0 (CHead d (Bind -Abbr) u) H1 u0) t1 x1 H9 x2 H13))))))))) H11)) (\lambda (H11: (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z -t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq T t -(THead (Bind Abbr) x2 x3))).(\lambda (H13: (subst0 i u x0 x2)).(\lambda (H14: -(subst0 (s (Bind Abbr) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 -(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: -T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3))))))) x2 x3 H12 (pr2_delta c0 d u i H1 u1 x0 H8 x2 -H13) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) -t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z x3)))) -(\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) -(getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H9 x3 -H14))))))))))) H11)) (subst0_gen_head (Bind Abbr) u x0 x1 t i H10)))) -(\lambda (H_x0: (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 -O x0 y0 x1)))).(ex2_ind T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: -T).(subst0 O x0 y0 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: -T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) -(\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda -(y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x2: T).(\lambda (H9: (pr0 -t1 x2)).(\lambda (H10: (subst0 O x0 x2 x1)).(let H11 \def (eq_ind T t2 -(\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Bind Abbr) x0 x1) H7) in -(or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda -(u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind -Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z -t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (H12: (ex2 T (\lambda (u2: T).(eq T t (THead -(Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T -(\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 -i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x3: T).(\lambda (H13: (eq T -t (THead (Bind Abbr) x3 x1))).(\lambda (H14: (subst0 i u x0 x3)).(ex2_ind T -(\lambda (t3: T).(subst0 O u1 x2 t3)) (\lambda (t3: T).(pr0 t3 x1)) (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 -(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: -T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x4: T).(\lambda (_: (subst0 -O u1 x2 x4)).(\lambda (_: (pr0 x4 x1)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 -(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: -T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3))))))) x3 x1 H13 (pr2_delta c0 d u i H1 u1 x0 H8 x3 -H14) (or3_intro1 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) -t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 x1))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z x1)))) -(ex_intro2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 x1)) x0 H8 (pr2_delta (CHead c0 (Bind Abbr) x0) c0 x0 O -(getl_refl Abbr c0 x0) t1 x2 H9 x1 H10)))))))) (pr0_subst0_back x0 x2 x1 O -H10 u1 H8))))) H12)) (\lambda (H12: (ex2 T (\lambda (t3: T).(eq T t (THead -(Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x0 t3))) -(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)) (or (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) -(\lambda (x3: T).(\lambda (H13: (eq T t (THead (Bind Abbr) x0 x3))).(\lambda -(H14: (subst0 (s (Bind Abbr) i) u x1 x3)).(ex2_ind T (\lambda (t3: T).(subst0 -O u1 x2 t3)) (\lambda (t3: T).(pr0 t3 x1)) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) -(\lambda (x4: T).(\lambda (H15: (subst0 O u1 x2 x4)).(\lambda (H16: (pr0 x4 -x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x0 x3 H13 -(pr2_free c0 u1 x0 H8) (or3_intro2 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z x3)))) (ex3_2_intro T T (\lambda (y0: T).(\lambda (_: -T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: -T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) -u1) z x3))) x4 x1 (pr2_delta (CHead c0 (Bind Abbr) u1) c0 u1 O (getl_refl -Abbr c0 u1) t1 x2 H9 x4 H15) H16 (pr2_delta (CHead c0 (Bind Abbr) u1) d u (S -i) (getl_head (Bind Abbr) i c0 (CHead d (Bind Abbr) u) H1 u1) x1 x1 (pr0_refl -x1) x3 H14)))))))) (pr0_subst0_back x0 x2 x1 O H10 u1 H8))))) H12)) (\lambda -(H12: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 -(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z -t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H13: (eq T t -(THead (Bind Abbr) x3 x4))).(\lambda (H14: (subst0 i u x0 x3)).(\lambda (H15: -(subst0 (s (Bind Abbr) i) u x1 x4)).(ex2_ind T (\lambda (t3: T).(subst0 O u1 -x2 t3)) (\lambda (t3: T).(pr0 t3 x1)) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) -(\lambda (x5: T).(\lambda (H16: (subst0 O u1 x2 x5)).(\lambda (H17: (pr0 x5 -x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead -(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda -(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead -c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x3 x4 H13 -(pr2_delta c0 d u i H1 u1 x0 H8 x3 H14) (or3_intro2 (\forall (b: B).(\forall -(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 x4))) (ex2 T (\lambda (u0: T).(pr0 u1 -u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x4))) (ex3_2 T T -(\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) -(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c0 (Bind Abbr) u1) z x4)))) (ex3_2_intro T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead -c0 (Bind Abbr) u1) z x4))) x5 x1 (pr2_delta (CHead c0 (Bind Abbr) u1) c0 u1 O -(getl_refl Abbr c0 u1) t1 x2 H9 x5 H16) H17 (pr2_delta (CHead c0 (Bind Abbr) -u1) d u (S i) (getl_head (Bind Abbr) i c0 (CHead d (Bind Abbr) u) H1 u1) x1 -x1 (pr0_refl x1) x4 H15)))))))) (pr0_subst0_back x0 x2 x1 O H10 u1 H8))))))) -H12)) (subst0_gen_head (Bind Abbr) u x0 x1 t i H11)))))) H_x0)) H_x)))))) -H6)) (\lambda (H6: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 -(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T -(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) -t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind -Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: -T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) -(\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) -(getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 (lift (S O) O t2) -H6 (lift (S O) O t) (subst0_lift_ge_S t2 t u i H3 O (le_O_n i))))))) -(pr0_gen_abbr u1 t1 t2 H5)))))))))))))) c y x H0))) H))))). - -lemma pr2_gen_void: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c -(THead (Bind Void) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))) (\forall (b: B).(\forall (u: -T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr2 c (THead (Bind Void) u1 t1) x)).(insert_eq T (THead (Bind Void) u1 -t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))) (\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))) -(\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: C).(\lambda -(t: T).(\lambda (t0: T).((eq T t (THead (Bind Void) u1 t1)) \to (or (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Void) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -t2)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift -(S O) O t0))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (H1: (pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Bind Void) u1 -t1))).(let H3 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Bind -Void) u1 t1) H2) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O -t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind -b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) -t1 (lift (S O) O t2))))) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 -(CHead c0 (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead -c0 (Bind b) u) t1 (lift (S O) O t2))))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H5: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H6: (pr0 u1 -x0)).(\lambda (H7: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Void) x0 x1) -(\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 -(CHead c0 (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead -c0 (Bind b) u) t1 (lift (S O) O t)))))) (or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) -u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -(lift (S O) O (THead (Bind Void) x0 x1))))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) -u) t1 t3))))) x0 x1 (refl_equal T (THead (Bind Void) x0 x1)) (pr2_free c0 u1 -x0 H6) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) t1 x1 -H7))))) t2 H5)))))) H4)) (\lambda (H4: (pr0 t1 (lift (S O) O t2))).(or_intror -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) -u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 -(lift (S O) O t2)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c0 -(Bind b) u) t1 (lift (S O) O t2) H4))))) (pr0_gen_void u1 t1 t2 H3)))))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (H2: (pr0 t0 t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 -t)).(\lambda (H4: (eq T t0 (THead (Bind Void) u1 t1))).(let H5 \def (eq_ind T -t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (THead (Bind Void) u1 t1) H4) in (or_ind -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t -(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H7: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H8: (pr0 u1 -x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T t2 (\lambda (t3: -T).(subst0 i u t3 t)) H3 (THead (Bind Void) x0 x1) H7) in (or3_ind (ex2 T -(\lambda (u2: T).(eq T t (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 -i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind Void) x0 t3))) -(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s (Bind Void) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) -(\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t (THead (Bind Void) u2 x1))) -(\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t -(THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (x2: T).(\lambda (H12: (eq T t (THead (Bind -Void) x2 x1))).(\lambda (H13: (subst0 i u x0 x2)).(or_introl (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 -(CHead c0 (Bind b) u0) t1 t3))))) x2 x1 H12 (pr2_delta c0 d u i H1 u1 x0 H8 -x2 H13) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c0 (Bind b) u0) t1 -x1 H9)))))))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t (THead -(Bind Void) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Void) x0 t3))) -(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3)) (or (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) -(\lambda (x2: T).(\lambda (H12: (eq T t (THead (Bind Void) x0 x2))).(\lambda -(H13: (subst0 (s (Bind Void) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) t1 t3))))) x0 x2 H12 (pr2_free c0 u1 x0 H8) (\lambda (b: B).(\lambda (u0: -T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) (getl_head (Bind b) i c0 -(CHead d (Bind Abbr) u) H1 u0) t1 x1 H9 x2 H13)))))))) H11)) (\lambda (H11: -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 -(lift (S O) O t))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq T t -(THead (Bind Void) x2 x3))).(\lambda (H13: (subst0 i u x0 x2)).(\lambda (H14: -(subst0 (s (Bind Void) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: -B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) -u0) t1 t3))))) x2 x3 H12 (pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (\lambda (b: -B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) (getl_head -(Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H9 x3 H14)))))))))) H11)) -(subst0_gen_head (Bind Void) u x0 x1 t i H10)))))))) H6)) (\lambda (H6: (pr0 -t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 -c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: -T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: -T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) (\lambda (b: -B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) (getl_head -(Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 (lift (S O) O t2) H6 (lift (S -O) O t) (subst0_lift_ge_S t2 t u i H3 O (le_O_n i))))))) (pr0_gen_void u1 t1 -t2 H5)))))))))))))) c y x H0))) H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr2/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1/pr2/subst1.ma deleted file mode 100644 index 8f1063f8e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr2/subst1.ma +++ /dev/null @@ -1,265 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr2/fwd.ma". - -include "basic_1/pr0/subst1.ma". - -include "basic_1/csubst1/getl.ma". - -include "basic_1/subst1/subst1.ma". - -lemma pr2_delta1: - \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) u)) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) -\to (\forall (t: T).((subst1 i u t2 t) \to (pr2 c t1 t)))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H1: (subst1 i u t2 -t)).(subst1_ind i u t2 (\lambda (t0: T).(pr2 c t1 t0)) (pr2_free c t1 t2 H0) -(\lambda (t0: T).(\lambda (H2: (subst0 i u t2 t0)).(pr2_delta c d u i H t1 t2 -H0 t0 H2))) t H1)))))))))). - -lemma pr2_subst1: - \forall (c: C).(\forall (e: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead e (Bind Abbr) v)) \to (\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) -\to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c -w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))))) -\def - \lambda (c: C).(\lambda (e: C).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead e (Bind Abbr) v))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H0: (pr2 c t1 t2)).(insert_eq C c (\lambda (c0: C).(pr2 c0 t1 -t2)) (\lambda (c0: C).(\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T -(\lambda (w2: T).(pr2 c0 w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))) -(\lambda (y: C).(\lambda (H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: -C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to (\forall (w1: -T).((subst1 i v t w1) \to (ex2 T (\lambda (w2: T).(pr2 c0 w1 w2)) (\lambda -(w2: T).(subst1 i v t0 w2))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda -(t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (H3: (eq C c0 c)).(\lambda (w1: -T).(\lambda (H4: (subst1 i v t3 w1)).(eq_ind_r C c (\lambda (c1: C).(ex2 T -(\lambda (w2: T).(pr2 c1 w1 w2)) (\lambda (w2: T).(subst1 i v t4 w2)))) -(ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v t4 w2)) -(ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t4 w2))) -(\lambda (x: T).(\lambda (H5: (pr0 w1 x)).(\lambda (H6: (subst1 i v t4 -x)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v -t4 w2)) x (pr2_free c w1 x H5) H6)))) (pr0_subst1 t3 t4 H2 v w1 i H4 v -(pr0_refl v))) c0 H3)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i0: nat).(\lambda (H2: (getl i0 c0 (CHead d (Bind Abbr) -u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda -(t: T).(\lambda (H4: (subst0 i0 u t4 t)).(\lambda (H5: (eq C c0 c)).(\lambda -(w1: T).(\lambda (H6: (subst1 i v t3 w1)).(let H7 \def (eq_ind C c0 (\lambda -(c1: C).(getl i0 c1 (CHead d (Bind Abbr) u))) H2 c H5) in (eq_ind_r C c -(\lambda (c1: C).(ex2 T (\lambda (w2: T).(pr2 c1 w1 w2)) (\lambda (w2: -T).(subst1 i v t w2)))) (ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda -(w2: T).(subst1 i v t4 w2)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda -(w2: T).(subst1 i v t w2))) (\lambda (x: T).(\lambda (H8: (pr0 w1 -x)).(\lambda (H9: (subst1 i v t4 x)).(neq_eq_e i i0 (ex2 T (\lambda (w2: -T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t w2))) (\lambda (H10: (not -(eq nat i i0))).(ex2_ind T (\lambda (t0: T).(subst1 i v t t0)) (\lambda (t0: -T).(subst1 i0 u x t0)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: -T).(subst1 i v t w2))) (\lambda (x0: T).(\lambda (H11: (subst1 i v t -x0)).(\lambda (H12: (subst1 i0 u x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c -w1 w2)) (\lambda (w2: T).(subst1 i v t w2)) x0 (pr2_delta1 c d u i0 H7 w1 x -H8 x0 H12) H11)))) (subst1_confluence_neq t4 t u i0 (subst1_single i0 u t4 t -H4) x v i H9 (sym_not_eq nat i i0 H10)))) (\lambda (H10: (eq nat i i0)).(let -H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u t4 t)) H4 i H10) in -(let H12 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d (Bind -Abbr) u))) H7 i H10) in (let H13 \def (eq_ind C (CHead e (Bind Abbr) v) -(\lambda (c1: C).(getl i c c1)) H (CHead d (Bind Abbr) u) (getl_mono c (CHead -e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H12)) in (let H14 \def (f_equal -C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow e | (CHead c1 _ _) -\Rightarrow c1])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) u) (getl_mono -c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H12)) in ((let H15 \def -(f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow v | -(CHead _ _ t0) \Rightarrow t0])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) -u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H12)) in -(\lambda (H16: (eq C e d)).(let H17 \def (eq_ind_r T u (\lambda (t0: T).(getl -i c (CHead d (Bind Abbr) t0))) H13 v H15) in (let H18 \def (eq_ind_r T u -(\lambda (t0: T).(subst0 i t0 t4 t)) H11 v H15) in (let H19 \def (eq_ind_r C -d (\lambda (c1: C).(getl i c (CHead c1 (Bind Abbr) v))) H17 e H16) in -(ex2_ind T (\lambda (t0: T).(subst1 i v t t0)) (\lambda (t0: T).(subst1 i v x -t0)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t -w2))) (\lambda (x0: T).(\lambda (H20: (subst1 i v t x0)).(\lambda (H21: -(subst1 i v x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: -T).(subst1 i v t w2)) x0 (pr2_delta1 c e v i H19 w1 x H8 x0 H21) H20)))) -(subst1_confluence_eq t4 t v i (subst1_single i v t4 t H18) x H9))))))) -H14)))))))))) (pr0_subst1 t3 t4 H3 v w1 i H6 v (pr0_refl v))) c0 -H5))))))))))))))) y t1 t2 H1))) H0)))))))). - -lemma pr2_gen_cabbr: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) -\to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d -a0 a) \to (\forall (x1: T).((subst1 d u t1 (lift (S O) d x1)) \to (ex2 T -(\lambda (x2: T).(subst1 d u t2 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a -x1 x2)))))))))))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: -C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to -(\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 -a) \to (\forall (x1: T).((subst1 d u t (lift (S O) d x1)) \to (ex2 T (\lambda -(x2: T).(subst1 d u t0 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 -x2)))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (H0: (pr0 t3 t4)).(\lambda (e: C).(\lambda (u: T).(\lambda (d: -nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: -C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) -d a0 a)).(\lambda (x1: T).(\lambda (H4: (subst1 d u t3 (lift (S O) d -x1))).(ex2_ind T (\lambda (w2: T).(pr0 (lift (S O) d x1) w2)) (\lambda (w2: -T).(subst1 d u t4 w2)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d -x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H5: (pr0 -(lift (S O) d x1) x)).(\lambda (H6: (subst1 d u t4 x)).(ex2_ind T (\lambda -(t5: T).(eq T x (lift (S O) d t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T -(\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a -x1 x2))) (\lambda (x0: T).(\lambda (H7: (eq T x (lift (S O) d x0))).(\lambda -(H8: (pr0 x1 x0)).(let H9 \def (eq_ind T x (\lambda (t: T).(subst1 d u t4 t)) -H6 (lift (S O) d x0) H7) in (ex_intro2 T (\lambda (x2: T).(subst1 d u t4 -(lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2)) x0 H9 (pr2_free a x1 x0 -H8)))))) (pr0_gen_lift x1 x (S O) d H5))))) (pr0_subst1 t3 t4 H0 u (lift (S -O) d x1) d H4 u (pr0_refl u))))))))))))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind -Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 -t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (e: -C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e -(Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 -a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(\lambda (x1: -T).(\lambda (H6: (subst1 d0 u0 t3 (lift (S O) d0 x1))).(ex2_ind T (\lambda -(w2: T).(pr0 (lift (S O) d0 x1) w2)) (\lambda (w2: T).(subst1 d0 u0 t4 w2)) -(ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: -T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H7: (pr0 (lift (S O) d0 x1) -x)).(\lambda (H8: (subst1 d0 u0 t4 x)).(ex2_ind T (\lambda (t5: T).(eq T x -(lift (S O) d0 t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T (\lambda (x2: -T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) -(\lambda (x0: T).(\lambda (H9: (eq T x (lift (S O) d0 x0))).(\lambda (H10: -(pr0 x1 x0)).(let H11 \def (eq_ind T x (\lambda (t0: T).(subst1 d0 u0 t4 t0)) -H8 (lift (S O) d0 x0) H9) in (lt_eq_gt_e i d0 (ex2 T (\lambda (x2: T).(subst1 -d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (H12: -(lt i d0)).(ex2_ind T (\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: -T).(subst1 i u (lift (S O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 -t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: -T).(\lambda (H13: (subst1 d0 u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) -d0 x0) x2)).(ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 i) u0 (CHead d -(Bind Abbr) u) e2)) (\lambda (e2: C).(getl i a0 e2)) (ex2 T (\lambda (x3: -T).(subst1 d0 u0 t (lift (S O) d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) -(\lambda (x3: C).(\lambda (H15: (csubst1 (minus d0 i) u0 (CHead d (Bind Abbr) -u) x3)).(\lambda (H16: (getl i a0 x3)).(let H17 \def (eq_ind nat (minus d0 i) -(\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abbr) u) x3)) H15 (S (minus d0 -(S i))) (minus_x_Sy d0 i H12)) in (let H18 \def (csubst1_gen_head (Bind Abbr) -d x3 u u0 (minus d0 (S i)) H17) in (ex3_2_ind T C (\lambda (u2: T).(\lambda -(c2: C).(eq C x3 (CHead c2 (Bind Abbr) u2)))) (\lambda (u2: T).(\lambda (_: -C).(subst1 (minus d0 (S i)) u0 u u2))) (\lambda (_: T).(\lambda (c2: -C).(csubst1 (minus d0 (S i)) u0 d c2))) (ex2 T (\lambda (x4: T).(subst1 d0 u0 -t (lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4))) (\lambda (x4: -T).(\lambda (x5: C).(\lambda (H19: (eq C x3 (CHead x5 (Bind Abbr) -x4))).(\lambda (H20: (subst1 (minus d0 (S i)) u0 u x4)).(\lambda (_: (csubst1 -(minus d0 (S i)) u0 d x5)).(let H22 \def (eq_ind C x3 (\lambda (c1: C).(getl -i a0 c1)) H16 (CHead x5 (Bind Abbr) x4) H19) in (let H23 \def (eq_ind nat d0 -(\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus i (minus d0 (S i)))) -(lt_plus_minus i d0 H12)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: -C).(eq T x4 (lift (S O) (minus d0 (S i)) v)))) (\lambda (v: T).(\lambda (e0: -C).(getl i a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: -C).(drop (S O) (minus d0 (S i)) x5 e0))) (ex2 T (\lambda (x6: T).(subst1 d0 -u0 t (lift (S O) d0 x6))) (\lambda (x6: T).(pr2 a x1 x6))) (\lambda (x6: -T).(\lambda (x7: C).(\lambda (H24: (eq T x4 (lift (S O) (minus d0 (S i)) -x6))).(\lambda (H25: (getl i a (CHead x7 (Bind Abbr) x6))).(\lambda (_: (drop -(S O) (minus d0 (S i)) x5 x7)).(let H27 \def (eq_ind T x4 (\lambda (t0: -T).(subst1 (minus d0 (S i)) u0 u t0)) H20 (lift (S O) (minus d0 (S i)) x6) -H24) in (ex2_ind T (\lambda (t0: T).(subst1 i (lift (S O) (minus d0 (S i)) -x6) (lift (S O) d0 x0) t0)) (\lambda (t0: T).(subst1 (S (plus (minus d0 (S -i)) i)) u0 x2 t0)) (ex2 T (\lambda (x8: T).(subst1 d0 u0 t (lift (S O) d0 -x8))) (\lambda (x8: T).(pr2 a x1 x8))) (\lambda (x8: T).(\lambda (H28: -(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) d0 x0) x8)).(\lambda -(H29: (subst1 (S (plus (minus d0 (S i)) i)) u0 x2 x8)).(let H30 \def (eq_ind -nat d0 (\lambda (n: nat).(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S -O) n x0) x8)) H28 (S (plus i (minus d0 (S i)))) (lt_plus_minus i d0 H12)) in -(ex2_ind T (\lambda (t5: T).(eq T x8 (lift (S O) (S (plus i (minus d0 (S -i)))) t5))) (\lambda (t5: T).(subst1 i x6 x0 t5)) (ex2 T (\lambda (x9: -T).(subst1 d0 u0 t (lift (S O) d0 x9))) (\lambda (x9: T).(pr2 a x1 x9))) -(\lambda (x9: T).(\lambda (H31: (eq T x8 (lift (S O) (S (plus i (minus d0 (S -i)))) x9))).(\lambda (H32: (subst1 i x6 x0 x9)).(let H33 \def (eq_ind T x8 -(\lambda (t0: T).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 t0)) H29 (lift -(S O) (S (plus i (minus d0 (S i)))) x9) H31) in (let H34 \def (eq_ind_r nat -(S (plus i (minus d0 (S i)))) (\lambda (n: nat).(subst1 (S (plus (minus d0 (S -i)) i)) u0 x2 (lift (S O) n x9))) H33 d0 (lt_plus_minus i d0 H12)) in (let -H35 \def (eq_ind_r nat (S (plus (minus d0 (S i)) i)) (\lambda (n: -nat).(subst1 n u0 x2 (lift (S O) d0 x9))) H34 d0 (lt_plus_minus_r i d0 H12)) -in (ex_intro2 T (\lambda (x10: T).(subst1 d0 u0 t (lift (S O) d0 x10))) -(\lambda (x10: T).(pr2 a x1 x10)) x9 (subst1_trans x2 t u0 d0 H13 (lift (S O) -d0 x9) H35) (pr2_delta1 a x7 x6 i H25 x1 x0 H10 x9 H32)))))))) -(subst1_gen_lift_lt x6 x0 x8 i (S O) (minus d0 (S i)) H30)))))) -(subst1_subst1_back (lift (S O) d0 x0) x2 u i H14 (lift (S O) (minus d0 (S -i)) x6) u0 (minus d0 (S i)) H27)))))))) (getl_drop_conf_lt Abbr a0 x5 x4 i -H22 a (S O) (minus d0 (S i)) H23))))))))) H18)))))) (csubst1_getl_lt d0 i H12 -c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0))))) (subst1_confluence_neq t4 t u i -(subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (lt_neq i d0 H12)))) -(\lambda (H12: (eq nat i d0)).(let H13 \def (eq_ind_r nat d0 (\lambda (n: -nat).(subst1 n u0 t4 (lift (S O) n x0))) H11 i H12) in (let H14 \def -(eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 i H12) in (let H15 -\def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 i H12) in -(let H16 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind -Abbr) u0))) H3 i H12) in (eq_ind nat i (\lambda (n: nat).(ex2 T (\lambda (x2: -T).(subst1 n u0 t (lift (S O) n x2))) (\lambda (x2: T).(pr2 a x1 x2)))) (let -H17 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c1: C).(getl i c0 c1)) -H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead -e (Bind Abbr) u0) H16)) in (let H18 \def (f_equal C C (\lambda (e0: C).(match -e0 with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d -(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) -i H0 (CHead e (Bind Abbr) u0) H16)) in ((let H19 \def (f_equal C T (\lambda -(e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow -t0])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d -(Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in (\lambda (H20: (eq C d -e)).(let H21 \def (eq_ind_r T u0 (\lambda (t0: T).(getl i c0 (CHead e (Bind -Abbr) t0))) H17 u H19) in (let H22 \def (eq_ind_r T u0 (\lambda (t0: -T).(subst1 i t0 t4 (lift (S O) i x0))) H13 u H19) in (let H23 \def (eq_ind_r -T u0 (\lambda (t0: T).(csubst1 i t0 c0 a0)) H15 u H19) in (eq_ind T u -(\lambda (t0: T).(ex2 T (\lambda (x2: T).(subst1 i t0 t (lift (S O) i x2))) -(\lambda (x2: T).(pr2 a x1 x2)))) (let H24 \def (eq_ind_r C e (\lambda (c1: -C).(getl i c0 (CHead c1 (Bind Abbr) u))) H21 d H20) in (ex2_ind T (\lambda -(t0: T).(subst1 i u t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) i x0) -t0)) (ex2 T (\lambda (x2: T).(subst1 i u t (lift (S O) i x2))) (\lambda (x2: -T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H25: (subst1 i u t -x2)).(\lambda (H26: (subst1 i u (lift (S O) i x0) x2)).(let H27 \def (eq_ind -T x2 (\lambda (t0: T).(subst1 i u t t0)) H25 (lift (S O) i x0) -(subst1_gen_lift_eq x0 u x2 (S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) -(\lambda (n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) (plus_sym i -(S O))) H26)) in (ex_intro2 T (\lambda (x3: T).(subst1 i u t (lift (S O) i -x3))) (\lambda (x3: T).(pr2 a x1 x3)) x0 H27 (pr2_free a x1 x0 H10)))))) -(subst1_confluence_eq t4 t u i (subst1_single i u t4 t H2) (lift (S O) i x0) -H22))) u0 H19)))))) H18))) d0 H12)))))) (\lambda (H12: (lt d0 i)).(ex2_ind T -(\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: T).(subst1 i u (lift (S -O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) -(\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H13: (subst1 d0 -u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) d0 x0) x2)).(ex2_ind T -(\lambda (t5: T).(eq T x2 (lift (S O) d0 t5))) (\lambda (t5: T).(subst1 -(minus i (S O)) u x0 t5)) (ex2 T (\lambda (x3: T).(subst1 d0 u0 t (lift (S O) -d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) (\lambda (x3: T).(\lambda (H15: (eq -T x2 (lift (S O) d0 x3))).(\lambda (H16: (subst1 (minus i (S O)) u x0 -x3)).(let H17 \def (eq_ind T x2 (\lambda (t0: T).(subst1 d0 u0 t t0)) H13 -(lift (S O) d0 x3) H15) in (ex_intro2 T (\lambda (x4: T).(subst1 d0 u0 t -(lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4)) x3 H17 (pr2_delta1 a d u -(minus i (S O)) (getl_drop_conf_ge i (CHead d (Bind Abbr) u) a0 -(csubst1_getl_ge d0 i (le_S_n d0 i (le_S_n (S d0) (S i) (le_S (S (S d0)) (S -i) (le_n_S (S d0) i H12)))) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) -d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) H12 (plus d0 -(S O)) (plus_sym d0 (S O)))) x1 x0 H10 x3 H16)))))) (subst1_gen_lift_ge u x0 -x2 i (S O) d0 H14 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) -H12 (plus d0 (S O)) (plus_sym d0 (S O)))))))) (subst1_confluence_neq t4 t u i -(subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (sym_not_eq nat d0 i -(lt_neq d0 i H12)))))))))) (pr0_gen_lift x1 x (S O) d0 H7))))) (pr0_subst1 t3 -t4 H1 u0 (lift (S O) d0 x1) d0 H6 u0 (pr0_refl u0))))))))))))))))))))))) c t1 -t2 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/defs.ma deleted file mode 100644 index 7430c894d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/defs.ma +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr2/defs.ma". - -inductive pr3 (c: C): T \to (T \to Prop) \def -| pr3_refl: \forall (t: T).(pr3 c t t) -| pr3_sing: \forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to (\forall (t3: -T).((pr3 c t2 t3) \to (pr3 c t1 t3))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/fwd.ma deleted file mode 100644 index 7f9e46419..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/fwd.ma +++ /dev/null @@ -1,334 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/defs.ma". - -include "basic_1/pr2/fwd.ma". - -implied rec lemma pr3_ind (c: C) (P: (T \to (T \to Prop))) (f: (\forall (t: -T).(P t t))) (f0: (\forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to -(\forall (t3: T).((pr3 c t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) (t: T) -(t0: T) (p: pr3 c t t0) on p: P t t0 \def match p with [(pr3_refl t1) -\Rightarrow (f t1) | (pr3_sing t2 t1 p0 t3 p1) \Rightarrow (f0 t2 t1 p0 t3 p1 -((pr3_ind c P f f0) t2 t3 p1))]. - -lemma pr3_gen_sort: - \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr3 c (TSort n) x) \to -(eq T x (TSort n))))) -\def - \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr3 c (TSort -n) x)).(insert_eq T (TSort n) (\lambda (t: T).(pr3 c t x)) (\lambda (t: -T).(eq T x t)) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(pr3_ind c (\lambda -(t: T).(\lambda (t0: T).((eq T t (TSort n)) \to (eq T t0 t)))) (\lambda (t: -T).(\lambda (_: (eq T t (TSort n))).(refl_equal T t))) (\lambda (t2: -T).(\lambda (t1: T).(\lambda (H1: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda -(_: (pr3 c t2 t3)).(\lambda (H3: (((eq T t2 (TSort n)) \to (eq T t3 -t2)))).(\lambda (H4: (eq T t1 (TSort n))).(let H5 \def (eq_ind T t1 (\lambda -(t: T).(pr2 c t t2)) H1 (TSort n) H4) in (eq_ind_r T (TSort n) (\lambda (t: -T).(eq T t3 t)) (let H6 \def (eq_ind T t2 (\lambda (t: T).((eq T t (TSort n)) -\to (eq T t3 t))) H3 (TSort n) (pr2_gen_sort c t2 n H5)) in (H6 (refl_equal T -(TSort n)))) t1 H4))))))))) y x H0))) H)))). - -lemma pr3_gen_abst: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c -(THead (Bind Abst) u1 t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: -T).(pr3 (CHead c (Bind b) u) t1 t2)))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr3 c (THead (Bind Abst) u1 t1) x)).(insert_eq T (THead (Bind Abst) u1 -t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t2))))))) (\lambda (y: -T).(\lambda (H0: (pr3 c y x)).(unintro T t1 (\lambda (t: T).((eq T y (THead -(Bind Abst) u1 t)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead -c (Bind b) u) t t2)))))))) (unintro T u1 (\lambda (t: T).(\forall (x0: -T).((eq T y (THead (Bind Abst) t x0)) \to (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x0 t2))))))))) (pr3_ind c -(\lambda (t: T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: T).((eq T t -(THead (Bind Abst) x0 x1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) x1 t2))))))))))) (\lambda (t: T).(\lambda -(x0: T).(\lambda (x1: T).(\lambda (H1: (eq T t (THead (Bind Abst) x0 -x1))).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T t (THead (Bind -Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -x1 t2))))) x0 x1 H1 (pr3_refl c x0) (\lambda (b: B).(\lambda (u: T).(pr3_refl -(CHead c (Bind b) u) x1)))))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda -(H1: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (_: (pr3 c t2 t4)).(\lambda -(H3: ((\forall (x0: T).(\forall (x1: T).((eq T t2 (THead (Bind Abst) x0 x1)) -\to (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) -u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -x1 t5))))))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t3 -(THead (Bind Abst) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c -t t2)) H1 (THead (Bind Abst) x0 x1) H4) in (let H6 \def (pr2_gen_abst c x0 x1 -t2 H5) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead -(Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead -c (Bind b) u) x1 t5))))) (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T -t4 (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))) (\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) x1 t5)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda -(H7: (eq T t2 (THead (Bind Abst) x2 x3))).(\lambda (H8: (pr2 c x0 -x2)).(\lambda (H9: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -x1 x3))))).(let H10 \def (eq_ind T t2 (\lambda (t: T).(\forall (x4: -T).(\forall (x5: T).((eq T t (THead (Bind Abst) x4 x5)) \to (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) (\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x5 -t5)))))))))) H3 (THead (Bind Abst) x2 x3) H7) in (let H11 \def (H10 x2 x3 -(refl_equal T (THead (Bind Abst) x2 x3))) in (ex3_2_ind T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5))))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) -(\lambda (x4: T).(\lambda (x5: T).(\lambda (H12: (eq T t4 (THead (Bind Abst) -x4 x5))).(\lambda (H13: (pr3 c x2 x4)).(\lambda (H14: ((\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 x5))))).(ex3_2_intro T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5))))) -x4 x5 H12 (pr3_sing c x2 x0 H8 x4 H13) (\lambda (b: B).(\lambda (u: -T).(pr3_sing (CHead c (Bind b) u) x3 x1 (H9 b u) x5 (H14 b u)))))))))) -H11)))))))) H6)))))))))))) y x H0))))) H))))). - -lemma pr3_gen_cast: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c -(THead (Flat Cast) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 t2)))) (pr3 c -t1 x)))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr3 c (THead (Flat Cast) u1 t1) x)).(insert_eq T (THead (Flat Cast) u1 -t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 -t2)))) (pr3 c t1 x))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T -t1 (\lambda (t: T).((eq T y (THead (Flat Cast) u1 t)) \to (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c t t2)))) (pr3 c t x)))) (unintro T u1 (\lambda (t: T).(\forall -(x0: T).((eq T y (THead (Flat Cast) t x0)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c x0 -t2)))) (pr3 c x0 x))))) (pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall -(x0: T).(\forall (x1: T).((eq T t (THead (Flat Cast) x0 x1)) \to (or (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c x1 t2)))) (pr3 c x1 t0))))))) (\lambda (t: T).(\lambda (x0: -T).(\lambda (x1: T).(\lambda (H1: (eq T t (THead (Flat Cast) x0 -x1))).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: T).(or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c x1 t2)))) (pr3 c x1 t0))) (or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 c x1 t2)))) (pr3 c x1 (THead (Flat Cast) x0 x1)) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) -x0 x1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c -x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c x1 t2))) x0 x1 (refl_equal T -(THead (Flat Cast) x0 x1)) (pr3_refl c x0) (pr3_refl c x1))) t H1))))) -(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: -T).(\lambda (H2: (pr3 c t2 t4)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: -T).((eq T t2 (THead (Flat Cast) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 -t5)))) (pr3 c x1 t4))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: -(eq T t3 (THead (Flat Cast) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: -T).(pr2 c t t2)) H1 (THead (Flat Cast) x0 x1) H4) in (let H6 \def -(pr2_gen_cast c x0 x1 t2 H5) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t5: T).(eq T t2 (THead (Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr2 c x1 t5)))) (pr2 c -x1 t2) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat -Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4)) (\lambda (H7: (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Flat Cast) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr2 c x1 t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: -T).(eq T t2 (THead (Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr2 c x1 t5))) (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 -t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4)) (\lambda (x2: T).(\lambda -(x3: T).(\lambda (H8: (eq T t2 (THead (Flat Cast) x2 x3))).(\lambda (H9: (pr2 -c x0 x2)).(\lambda (H10: (pr2 c x1 x3)).(let H11 \def (eq_ind T t2 (\lambda -(t: T).(\forall (x4: T).(\forall (x5: T).((eq T t (THead (Flat Cast) x4 x5)) -\to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat -Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x5 t5)))) (pr3 c x5 t4)))))) H3 (THead (Flat Cast) -x2 x3) H8) in (let H12 \def (H11 x2 x3 (refl_equal T (THead (Flat Cast) x2 -x3))) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x3 t5)))) (pr3 c x3 t4) (or (ex3_2 T -T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4)) (\lambda (H13: (ex3_2 T T (\lambda -(u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x3 -t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x3 t5))) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 -t5)))) (pr3 c x1 t4)) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H14: (eq T -t4 (THead (Flat Cast) x4 x5))).(\lambda (H15: (pr3 c x2 x4)).(\lambda (H16: -(pr3 c x3 x5)).(eq_ind_r T (THead (Flat Cast) x4 x5) (\lambda (t: T).(or -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t (THead (Flat Cast) u2 -t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t))) (or_introl (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T (THead (Flat Cast) x4 x5) (THead -(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 (THead (Flat -Cast) x4 x5)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t5: T).(eq T (THead -(Flat Cast) x4 x5) (THead (Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5))) x4 x5 -(refl_equal T (THead (Flat Cast) x4 x5)) (pr3_sing c x2 x0 H9 x4 H15) -(pr3_sing c x3 x1 H10 x5 H16))) t4 H14)))))) H13)) (\lambda (H13: (pr3 c x3 -t4)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4) (pr3_sing c -x3 x1 H10 t4 H13))) H12)))))))) H7)) (\lambda (H7: (pr2 c x1 t2)).(or_intror -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 -t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4) (pr3_sing c t2 x1 H7 t4 -H2))) H6)))))))))))) y x H0))))) H))))). - -lemma pr3_gen_lift: - \forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall -(d: nat).((pr3 c (lift h d t1) x) \to (\forall (e: C).((drop h d c e) \to -(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr3 e t1 -t2)))))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (H: (pr3 c (lift h d t1) x)).(insert_eq T (lift h d t1) -(\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(\forall (e: C).((drop h d c e) -\to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr3 e -t1 t2)))))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T t1 (\lambda -(t: T).((eq T y (lift h d t)) \to (\forall (e: C).((drop h d c e) \to (ex2 T -(\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr3 e t t2))))))) -(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (x0: T).((eq T t (lift h -d x0)) \to (\forall (e: C).((drop h d c e) \to (ex2 T (\lambda (t2: T).(eq T -t0 (lift h d t2))) (\lambda (t2: T).(pr3 e x0 t2))))))))) (\lambda (t: -T).(\lambda (x0: T).(\lambda (H1: (eq T t (lift h d x0))).(\lambda (e: -C).(\lambda (_: (drop h d c e)).(ex_intro2 T (\lambda (t2: T).(eq T t (lift h -d t2))) (\lambda (t2: T).(pr3 e x0 t2)) x0 H1 (pr3_refl e x0))))))) (\lambda -(t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: -T).(\lambda (_: (pr3 c t2 t4)).(\lambda (H3: ((\forall (x0: T).((eq T t2 -(lift h d x0)) \to (\forall (e: C).((drop h d c e) \to (ex2 T (\lambda (t5: -T).(eq T t4 (lift h d t5))) (\lambda (t5: T).(pr3 e x0 t5))))))))).(\lambda -(x0: T).(\lambda (H4: (eq T t3 (lift h d x0))).(\lambda (e: C).(\lambda (H5: -(drop h d c e)).(let H6 \def (eq_ind T t3 (\lambda (t: T).(pr2 c t t2)) H1 -(lift h d x0) H4) in (let H7 \def (pr2_gen_lift c x0 t2 h d H6 e H5) in -(ex2_ind T (\lambda (t5: T).(eq T t2 (lift h d t5))) (\lambda (t5: T).(pr2 e -x0 t5)) (ex2 T (\lambda (t5: T).(eq T t4 (lift h d t5))) (\lambda (t5: -T).(pr3 e x0 t5))) (\lambda (x1: T).(\lambda (H8: (eq T t2 (lift h d -x1))).(\lambda (H9: (pr2 e x0 x1)).(ex2_ind T (\lambda (t5: T).(eq T t4 (lift -h d t5))) (\lambda (t5: T).(pr3 e x1 t5)) (ex2 T (\lambda (t5: T).(eq T t4 -(lift h d t5))) (\lambda (t5: T).(pr3 e x0 t5))) (\lambda (x2: T).(\lambda -(H10: (eq T t4 (lift h d x2))).(\lambda (H11: (pr3 e x1 x2)).(ex_intro2 T -(\lambda (t5: T).(eq T t4 (lift h d t5))) (\lambda (t5: T).(pr3 e x0 t5)) x2 -H10 (pr3_sing e x1 x0 H9 x2 H11))))) (H3 x1 H8 e H5))))) H7))))))))))))) y x -H0)))) H)))))). - -lemma pr3_gen_lref: - \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr3 c (TLRef n) x) \to -(or (eq T x (TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda -(_: T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T x (lift (S n) O v)))))))))) -\def - \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr3 c (TLRef -n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(pr3 c t x)) (\lambda (t: -T).(or (eq T x t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: -T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T x (lift (S n) O v)))))))) (\lambda (y: T).(\lambda (H0: (pr3 c y -x)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or -(eq T t0 t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: -T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T t0 (lift (S n) O v)))))))))) (\lambda (t: T).(\lambda (_: (eq T -t (TLRef n))).(or_introl (eq T t t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: -T).(\lambda (_: T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: -C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda -(_: T).(\lambda (v: T).(eq T t (lift (S n) O v)))))) (refl_equal T t)))) -(\lambda (t2: T).(\lambda (t1: T).(\lambda (H1: (pr2 c t1 t2)).(\lambda (t3: -T).(\lambda (H2: (pr3 c t2 t3)).(\lambda (H3: (((eq T t2 (TLRef n)) \to (or -(eq T t3 t2) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: -T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T t3 (lift (S n) O v)))))))))).(\lambda (H4: (eq T t1 (TLRef -n))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(pr2 c t t2)) H1 (TLRef n) H4) -in (eq_ind_r T (TLRef n) (\lambda (t: T).(or (eq T t3 t) (ex3_3 C T T -(\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead d (Bind -Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 (lift (S n) O -v)))))))) (let H6 \def (pr2_gen_lref c t2 n H5) in (or_ind (eq T t2 (TLRef -n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S n) O u))))) (or (eq T -t3 (TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: -T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T t3 (lift (S n) O v))))))) (\lambda (H7: (eq T t2 (TLRef -n))).(let H8 \def (eq_ind T t2 (\lambda (t: T).((eq T t (TLRef n)) \to (or -(eq T t3 t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: -T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T t3 (lift (S n) O v))))))))) H3 (TLRef n) H7) in (let H9 \def -(eq_ind T t2 (\lambda (t: T).(pr3 c t t3)) H2 (TLRef n) H7) in (H8 -(refl_equal T (TLRef n)))))) (\lambda (H7: (ex2_2 C T (\lambda (d: -C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(eq T t2 (lift (S n) O u)))))).(ex2_2_ind C T (\lambda (d: -C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(eq T t2 (lift (S n) O u)))) (or (eq T t3 (TLRef n)) -(ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead -d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: T).(pr3 d u -v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 (lift (S n) O -v))))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H8: (getl n c (CHead x0 -(Bind Abbr) x1))).(\lambda (H9: (eq T t2 (lift (S n) O x1))).(let H10 \def -(eq_ind T t2 (\lambda (t: T).((eq T t (TLRef n)) \to (or (eq T t3 t) (ex3_3 C -T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead d (Bind -Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 (lift (S n) O -v))))))))) H3 (lift (S n) O x1) H9) in (let H11 \def (eq_ind T t2 (\lambda -(t: T).(pr3 c t t3)) H2 (lift (S n) O x1) H9) in (let H12 \def (pr3_gen_lift -c x1 t3 (S n) O H11 x0 (getl_drop Abbr c x0 x1 n H8)) in (ex2_ind T (\lambda -(t4: T).(eq T t3 (lift (S n) O t4))) (\lambda (t4: T).(pr3 x0 x1 t4)) (or (eq -T t3 (TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: -T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T t3 (lift (S n) O v))))))) (\lambda (x2: T).(\lambda (H13: (eq T -t3 (lift (S n) O x2))).(\lambda (H14: (pr3 x0 x1 x2)).(or_intror (eq T t3 -(TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl -n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: -T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 -(lift (S n) O v)))))) (ex3_3_intro C T T (\lambda (d: C).(\lambda (u: -T).(\lambda (_: T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: -C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda -(_: T).(\lambda (v: T).(eq T t3 (lift (S n) O v))))) x0 x1 x2 H8 H14 H13))))) -H12)))))))) H7)) H6)) t1 H4))))))))) y x H0))) H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/iso.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/iso.ma deleted file mode 100644 index c56ee4c23..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/iso.ma +++ /dev/null @@ -1,1125 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/props.ma". - -include "basic_1/iso/props.ma". - -include "basic_1/tlist/fwd.ma". - -lemma pr3_iso_appls_abbr: - \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).(let u1 \def (THeads (Flat -Appl) vs (TLRef i)) in (\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) vs (lift (S i) O w)) -u2)))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind -(\lambda (t: TList).(let u1 \def (THeads (Flat Appl) t (TLRef i)) in (\forall -(u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to -(pr3 c (THeads (Flat Appl) t (lift (S i) O w)) u2)))))) (\lambda (u2: -T).(\lambda (H0: (pr3 c (TLRef i) u2)).(\lambda (H1: (((iso (TLRef i) u2) \to -(\forall (P: Prop).P)))).(let H2 \def (pr3_gen_lref c u2 i H0) in (or_ind (eq -T u2 (TLRef i)) (ex3_3 C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: -T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T u2 (lift (S i) O v)))))) (pr3 c (lift (S i) O w) u2) (\lambda -(H3: (eq T u2 (TLRef i))).(let H4 \def (eq_ind T u2 (\lambda (t: T).((iso -(TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H3) in (eq_ind_r T -(TLRef i) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (H4 (iso_refl (TLRef -i)) (pr3 c (lift (S i) O w) (TLRef i))) u2 H3))) (\lambda (H3: (ex3_3 C T T -(\lambda (d0: C).(\lambda (u: T).(\lambda (_: T).(getl i c (CHead d0 (Bind -Abbr) u))))) (\lambda (d0: C).(\lambda (u: T).(\lambda (v: T).(pr3 d0 u v)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T u2 (lift (S i) O -v))))))).(ex3_3_ind C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: -T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: -T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(v: T).(eq T u2 (lift (S i) O v))))) (pr3 c (lift (S i) O w) u2) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H4: (getl i c (CHead x0 -(Bind Abbr) x1))).(\lambda (H5: (pr3 x0 x1 x2)).(\lambda (H6: (eq T u2 (lift -(S i) O x2))).(let H7 \def (eq_ind T u2 (\lambda (t: T).((iso (TLRef i) t) -\to (\forall (P: Prop).P))) H1 (lift (S i) O x2) H6) in (eq_ind_r T (lift (S -i) O x2) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (let H8 \def (eq_ind C -(CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind -Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 (Bind Abbr) x1) -H4)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) w) -(CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 -(Bind Abbr) x1) H4)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e -with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind -Abbr) w) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H -(CHead x0 (Bind Abbr) x1) H4)) in (\lambda (H11: (eq C d x0)).(let H12 \def -(eq_ind_r T x1 (\lambda (t: T).(getl i c (CHead x0 (Bind Abbr) t))) H8 w H10) -in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(pr3 x0 t x2)) H5 w H10) in -(let H14 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) -w))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c0: C).(pr3 c0 w -x2)) H13 d H11) in (pr3_lift c d (S i) O (getl_drop Abbr c d w i H14) w x2 -H15))))))) H9))) u2 H6)))))))) H3)) H2))))) (\lambda (t: T).(\lambda (t0: -TList).(\lambda (H0: ((\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (TLRef -i)) u2) \to ((((iso (THeads (Flat Appl) t0 (TLRef i)) u2) \to (\forall (P: -Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (lift (S i) O w)) -u2)))))).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads -(Flat Appl) t0 (TLRef i))) u2)).(\lambda (H2: (((iso (THead (Flat Appl) t -(THeads (Flat Appl) t0 (TLRef i))) u2) \to (\forall (P: Prop).P)))).(let H3 -\def (pr3_gen_appl c t (THeads (Flat Appl) t0 (TLRef i)) u2 H1) in (or3_ind -(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 -t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: -T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2)))) (ex4_4 T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 -c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c (THead (Flat Appl) t -(THeads (Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (H4: (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: -T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2))))).(ex3_2_ind T T (\lambda -(u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THeads (Flat Appl) t0 (TLRef i)) t2))) (pr3 c (THead (Flat Appl) t (THeads -(Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H5: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c t -x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) x1)).(let H8 \def -(eq_ind T u2 (\lambda (t1: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) -t0 (TLRef i))) t1) \to (\forall (P: Prop).P))) H2 (THead (Flat Appl) x0 x1) -H5) in (eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t1: T).(pr3 c (THead -(Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) t1)) (H8 (iso_head t -x0 (THeads (Flat Appl) t0 (TLRef i)) x1 (Flat Appl)) (pr3 c (THead (Flat -Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) (THead (Flat Appl) x0 x1))) -u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t -u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 -c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O -w))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H6: (pr3 c t -x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind -Abst) x0 x1))).(\lambda (H8: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c -(Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) (THead (Flat Appl) t -(THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t -(THead (Bind Abst) x0 x1)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift -(S i) O w))) c (pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead -(Bind Abst) x0 x1) (H0 (THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso -(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) x0 x1))).(\lambda (P: -Prop).(iso_flats_lref_bind_false Appl Abst i x0 x1 t0 H9 P)))) t Appl) (THead -(Bind Abbr) t x1) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) -(THead (Bind Abbr) t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) -x0 x1)) (THead (Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 -(pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t -x1) c (pr3_head_12 c t x2 H6 (Bind Abbr) x1 x3 (H8 Abbr x2)) u2 H5)))))))))) -H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 -(CHead c (Bind b) y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat -Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda -(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not -(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) -(THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c (THead (Bind x0) x5 (THead -(Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H8: (pr3 c t x4)).(\lambda -(H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (THead (Flat -Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Bind x0) -x1 (THead (Flat Appl) (lift (S O) O t) x2)) (THead (Flat Appl) t (THeads -(Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t (THead (Bind -x0) x1 x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c -(pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead (Bind x0) x1 -x2) (H0 (THead (Bind x0) x1 x2) H6 (\lambda (H11: (iso (THeads (Flat Appl) t0 -(TLRef i)) (THead (Bind x0) x1 x2))).(\lambda (P: -Prop).(iso_flats_lref_bind_false Appl x0 i x1 x2 t0 H11 P)))) t Appl) (THead -(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr3_pr2 c (THead (Flat -Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) (lift -(S O) O t) x2)) (pr2_free c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr0_upsilon x0 -H5 t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) (THead (Bind -x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr3_head_12 c x1 x1 -(pr3_refl c x1) (Bind x0) (THead (Flat Appl) (lift (S O) O t) x2) (THead -(Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 (CHead c (Bind x0) x1) (lift -(S O) O t) (lift (S O) O x4) (pr3_lift (CHead c (Bind x0) x1) c (S O) O -(drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H8) (Flat Appl) x2 x2 -(pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) -u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c (pr3_head_12 -c x1 x5 H9 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat -Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 -(lift (S O) O x4) Appl)) u2 H7)))))))))))))) H4)) H3)))))))) vs)))))). - -lemma pr3_iso_appls_cast: - \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).(let u1 -\def (THeads (Flat Appl) vs (THead (Flat Cast) v t)) in (\forall (u2: -T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c -(THeads (Flat Appl) vs t) u2)))))))) -\def - \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (vs: -TList).(TList_ind (\lambda (t0: TList).(let u1 \def (THeads (Flat Appl) t0 -(THead (Flat Cast) v t)) in (\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 -u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 t) u2)))))) -(\lambda (u2: T).(\lambda (H: (pr3 c (THead (Flat Cast) v t) u2)).(\lambda -(H0: (((iso (THead (Flat Cast) v t) u2) \to (\forall (P: Prop).P)))).(let H1 -\def (pr3_gen_cast c v t u2 H) in (or_ind (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t -t2)))) (pr3 c t u2) (pr3 c t u2) (\lambda (H2: (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t -t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c t t2))) (pr3 c t u2) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H3: (eq T u2 (THead (Flat Cast) x0 -x1))).(\lambda (_: (pr3 c v x0)).(\lambda (_: (pr3 c t x1)).(let H6 \def -(eq_ind T u2 (\lambda (t0: T).((iso (THead (Flat Cast) v t) t0) \to (\forall -(P: Prop).P))) H0 (THead (Flat Cast) x0 x1) H3) in (eq_ind_r T (THead (Flat -Cast) x0 x1) (\lambda (t0: T).(pr3 c t t0)) (H6 (iso_head v x0 t x1 (Flat -Cast)) (pr3 c t (THead (Flat Cast) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: -(pr3 c t u2)).H2) H1))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: -((\forall (u2: T).((pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) u2) -\to ((((iso (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) u2) \to (\forall -(P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t1 t) u2)))))).(\lambda (u2: -T).(\lambda (H0: (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead -(Flat Cast) v t))) u2)).(\lambda (H1: (((iso (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 (THead (Flat Cast) v t))) u2) \to (\forall (P: -Prop).P)))).(let H2 \def (pr3_gen_appl c t0 (THeads (Flat Appl) t1 (THead -(Flat Cast) v t)) u2 H0) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda -(t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c t0 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat -Appl) t1 (THead (Flat Cast) v t)) t2)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Cast) v t)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat -Appl) t1 (THead (Flat Cast) v t)) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) -u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2)))))))) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) u2) -(\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Cast) v t)) t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 -(THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Cast) v t)) t2))) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) u2) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T u2 (THead (Flat Appl) -x0 x1))).(\lambda (_: (pr3 c t0 x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) -t1 (THead (Flat Cast) v t)) x1)).(let H7 \def (eq_ind T u2 (\lambda (t2: -T).((iso (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Cast) v -t))) t2) \to (\forall (P: Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in -(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat -Appl) t0 (THeads (Flat Appl) t1 t)) t2)) (H7 (iso_head t0 x0 (THeads (Flat -Appl) t1 (THead (Flat Cast) v t)) x1 (Flat Appl)) (pr3 c (THead (Flat Appl) -t0 (THeads (Flat Appl) t1 t)) (THead (Flat Appl) x0 x1))) u2 H4))))))) H3)) -(\lambda (H3: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: -T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 -t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: -T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) -(pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) u2) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c -(THead (Bind Abbr) x2 x3) u2)).(\lambda (H5: (pr3 c t0 x2)).(\lambda (H6: -(pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind Abst) x0 -x1))).(\lambda (H7: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) -u) x1 x3))))).(pr3_t (THead (Bind Abbr) t0 x1) (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 t)) c (pr3_t (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) -(THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) c (pr3_thin_dx c (THeads -(Flat Appl) t1 t) (THead (Bind Abst) x0 x1) (H (THead (Bind Abst) x0 x1) H6 -(\lambda (H8: (iso (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead -(Bind Abst) x0 x1))).(\lambda (P: Prop).(iso_flats_flat_bind_false Appl Cast -Abst x0 v x1 t t1 H8 P)))) t0 Appl) (THead (Bind Abbr) t0 x1) (pr3_pr2 c -(THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) -(pr2_free c (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind -Abbr) t0 x1) (pr0_beta x0 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1))))) u2 -(pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t0 x1) c (pr3_head_12 c -t0 x2 H5 (Bind Abbr) x1 x3 (H7 Abbr x2)) u2 H4)))))))))) H3)) (\lambda (H3: -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind b) -y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat -Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 -(CHead c (Bind b) y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t0 (THeads (Flat -Appl) t1 t)) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda -(x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq B x0 -Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) -(THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c (THead (Bind x0) x5 (THead -(Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H7: (pr3 c t0 x4)).(\lambda -(H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (THead (Flat -Appl) t0 (THeads (Flat Appl) t1 t)) c (pr3_t (THead (Bind x0) x1 (THead (Flat -Appl) (lift (S O) O t0) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) -c (pr3_t (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Flat Appl) t0 -(THeads (Flat Appl) t1 t)) c (pr3_thin_dx c (THeads (Flat Appl) t1 t) (THead -(Bind x0) x1 x2) (H (THead (Bind x0) x1 x2) H5 (\lambda (H10: (iso (THeads -(Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind x0) x1 x2))).(\lambda -(P: Prop).(iso_flats_flat_bind_false Appl Cast x0 x1 v x2 t t1 H10 P)))) t0 -Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) x2)) (pr3_pr2 -c (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead -(Flat Appl) (lift (S O) O t0) x2)) (pr2_free c (THead (Flat Appl) t0 (THead -(Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) -x2)) (pr0_upsilon x0 H4 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1) x2 x2 -(pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) -x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat Appl) (lift -(S O) O t0) x2) (THead (Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 (CHead -c (Bind x0) x1) (lift (S O) O t0) (lift (S O) O x4) (pr3_lift (CHead c (Bind -x0) x1) c (S O) O (drop_drop (Bind x0) O c c (drop_refl c) x1) t0 x4 H7) -(Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift -(S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S -O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c -(pr3_head_12 c x1 x5 H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) -(THead (Flat Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) -x2 x3 H9 (lift (S O) O x4) Appl)) u2 H6)))))))))))))) H3)) H2)))))))) vs)))). - -lemma pr3_iso_appl_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: -T).(\forall (t: T).(let u1 \def (THead (Flat Appl) v1 (THead (Bind b) v2 t)) -in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) v2 (THead (Flat Appl) -(lift (S O) O v1) t)) u2)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v1: T).(\lambda -(v2: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H0: (pr3 c -(THead (Flat Appl) v1 (THead (Bind b) v2 t)) u2)).(\lambda (H1: (((iso (THead -(Flat Appl) v1 (THead (Bind b) v2 t)) u2) \to (\forall (P: Prop).P)))).(let -H2 \def (pr3_gen_appl c v1 (THead (Bind b) v2 t) u2 H0) in (or3_ind (ex3_2 T -T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c (THead (Bind b) v2 t) t2)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 -t2)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) -(\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 -z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat -Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b0: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c (THead (Bind b) v2 -(THead (Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (H3: (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c (THead (Bind b) v2 t) t2))))).(ex3_2_ind T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THead (Bind b) v2 t) t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) -(lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq -T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v1 x0)).(\lambda (_: -(pr3 c (THead (Bind b) v2 t) x1)).(let H7 \def (eq_ind T u2 (\lambda (t0: -T).((iso (THead (Flat Appl) v1 (THead (Bind b) v2 t)) t0) \to (\forall (P: -Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) -x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S -O) O v1) t)) t0)) (H7 (iso_head v1 x0 (THead (Bind b) v2 t) x1 (Flat Appl)) -(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead -(Flat Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda -(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 -t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THead (Bind b) v2 t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: -T).(pr3 (CHead c (Bind b0) u) z1 t2))))))) (pr3 c (THead (Bind b) v2 (THead -(Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c (THead (Bind Abbr) -x2 x3) u2)).(\lambda (H5: (pr3 c v1 x2)).(\lambda (H6: (pr3 c (THead (Bind b) -v2 t) (THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b0: B).(\forall -(u: T).(pr3 (CHead c (Bind b0) u) x1 x3))))).(pr3_t (THead (Bind Abbr) x2 x3) -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) c (let H_x \def -(pr3_gen_bind b H c v2 t (THead (Bind Abst) x0 x1) H6) in (let H8 \def H_x in -(or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) -x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 -u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2)))) -(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind Abst) x0 x1))) (pr3 c -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind -Abbr) x2 x3)) (\lambda (H9: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind b) v2) t t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: -T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind b) v2) t t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) -(lift (S O) O v1) t)) (THead (Bind Abbr) x2 x3)) (\lambda (x4: T).(\lambda -(x5: T).(\lambda (H10: (eq T (THead (Bind Abst) x0 x1) (THead (Bind b) x4 -x5))).(\lambda (H11: (pr3 c v2 x4)).(\lambda (H12: (pr3 (CHead c (Bind b) v2) -t x5)).(let H13 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) -\Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow -(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) -(THead (Bind Abst) x0 x1) (THead (Bind b) x4 x5) H10) in ((let H14 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef -_) \Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abst) x0 -x1) (THead (Bind b) x4 x5) H10) in ((let H15 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) x0 x1) (THead (Bind b) x4 -x5) H10) in (\lambda (H16: (eq T x0 x4)).(\lambda (H17: (eq B Abst b)).(let -H18 \def (eq_ind_r T x5 (\lambda (t0: T).(pr3 (CHead c (Bind b) v2) t t0)) -H12 x1 H15) in (let H19 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 c v2 t0)) -H11 x0 H16) in (let H20 \def (eq_ind_r B b (\lambda (b0: B).(pr3 (CHead c -(Bind b0) v2) t x1)) H18 Abst H17) in (let H21 \def (eq_ind_r B b (\lambda -(b0: B).(not (eq B b0 Abst))) H Abst H17) in (eq_ind B Abst (\lambda (b0: -B).(pr3 c (THead (Bind b0) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead -(Bind Abbr) x2 x3))) (let H22 \def (match (H21 (refl_equal B Abst)) in False -with []) in H22) b H17)))))))) H14)) H13))))))) H9)) (\lambda (H9: (pr3 -(CHead c (Bind b) v2) t (lift (S O) O (THead (Bind Abst) x0 x1)))).(pr3_t -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O x2) (lift (S O) O (THead -(Bind Abst) x0 x1)))) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) -t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat -Appl) (lift (S O) O x2) (lift (S O) O (THead (Bind Abst) x0 x1))) (Bind b) -(pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O x2) (pr3_lift -(CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) v2) -v1 x2 H5) t (lift (S O) O (THead (Bind Abst) x0 x1)) H9 Appl)) (THead (Bind -Abbr) x2 x3) (eq_ind T (lift (S O) O (THead (Flat Appl) x2 (THead (Bind Abst) -x0 x1))) (\lambda (t0: T).(pr3 c (THead (Bind b) v2 t0) (THead (Bind Abbr) x2 -x3))) (pr3_sing c (THead (Bind Abbr) x2 x1) (THead (Bind b) v2 (lift (S O) O -(THead (Flat Appl) x2 (THead (Bind Abst) x0 x1)))) (pr2_free c (THead (Bind -b) v2 (lift (S O) O (THead (Flat Appl) x2 (THead (Bind Abst) x0 x1)))) (THead -(Bind Abbr) x2 x1) (pr0_zeta b H (THead (Flat Appl) x2 (THead (Bind Abst) x0 -x1)) (THead (Bind Abbr) x2 x1) (pr0_beta x0 x2 x2 (pr0_refl x2) x1 x1 -(pr0_refl x1)) v2)) (THead (Bind Abbr) x2 x3) (pr3_head_12 c x2 x2 (pr3_refl -c x2) (Bind Abbr) x1 x3 (H7 Abbr x2))) (THead (Flat Appl) (lift (S O) O x2) -(lift (S O) O (THead (Bind Abst) x0 x1))) (lift_flat Appl x2 (THead (Bind -Abst) x0 x1) (S O) O)))) H8))) u2 H4))))))))) H3)) (\lambda (H3: (ex6_6 B T T -T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 z1)))))))) (\lambda -(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: -T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat Appl) (lift (S O) -O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) -y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c v1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))) (pr3 c -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (x0: -B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (x5: T).(\lambda (H4: (not (eq B x0 Abst))).(\lambda (H5: (pr3 c -(THead (Bind b) v2 t) (THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c (THead -(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H7: -(pr3 c v1 x4)).(\lambda (H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c (Bind -x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O -x4) x3)) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) c (let -H_x \def (pr3_gen_bind b H c v2 t (THead (Bind x0) x1 x2) H5) in (let H10 -\def H_x in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead -(Bind x0) x1 x2) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) -v2) t t2)))) (pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind x0) x1 -x2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) (\lambda (H11: -(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) -(THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t -t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind -x0) x1 x2) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c -v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2))) -(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead -(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) (\lambda (x6: -T).(\lambda (x7: T).(\lambda (H12: (eq T (THead (Bind x0) x1 x2) (THead (Bind -b) x6 x7))).(\lambda (H13: (pr3 c v2 x6)).(\lambda (H14: (pr3 (CHead c (Bind -b) v2) t x7)).(let H15 \def (f_equal T B (\lambda (e: T).(match e with -[(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead k _ _) -\Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow -x0])])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in ((let H16 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x1 | (TLRef -_) \Rightarrow x1 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind x0) x1 x2) -(THead (Bind b) x6 x7) H12) in ((let H17 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 -x7) H12) in (\lambda (H18: (eq T x1 x6)).(\lambda (H19: (eq B x0 b)).(let H20 -\def (eq_ind_r T x7 (\lambda (t0: T).(pr3 (CHead c (Bind b) v2) t t0)) H14 x2 -H17) in (let H21 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c v2 t0)) H13 x1 -H18) in (let H22 \def (eq_ind B x0 (\lambda (b0: B).(pr3 (CHead c (Bind b0) -x5) x2 x3)) H9 b H19) in (let H23 \def (eq_ind B x0 (\lambda (b0: B).(not (eq -B b0 Abst))) H4 b H19) in (eq_ind_r B b (\lambda (b0: B).(pr3 c (THead (Bind -b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind b0) x5 (THead -(Flat Appl) (lift (S O) O x4) x3)))) (pr3_head_21 c v2 x5 (pr3_t x1 v2 c H21 -x5 H8) (Bind b) (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat Appl) -(lift (S O) O x4) x3) (pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift -(S O) O x4) (pr3_lift (CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c -c (drop_refl c) v2) v1 x4 H7) t x3 (pr3_t x2 t (CHead c (Bind b) v2) H20 x3 -(pr3_pr3_pr3_t c v2 x1 H21 x2 x3 (Bind b) (pr3_pr3_pr3_t c x1 x5 H8 x2 x3 -(Bind b) H22))) Appl)) x0 H19)))))))) H16)) H15))))))) H11)) (\lambda (H11: -(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind x0) x1 x2)))).(pr3_t -(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead -(Bind x0) x1 x2)))) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) -t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat -Appl) (lift (S O) O x4) (lift (S O) O (THead (Bind x0) x1 x2))) (Bind b) -(pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O x4) (pr3_lift -(CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) v2) -v1 x4 H7) t (lift (S O) O (THead (Bind x0) x1 x2)) H11 Appl)) (THead (Bind -x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (eq_ind T (lift (S O) O -(THead (Flat Appl) x4 (THead (Bind x0) x1 x2))) (\lambda (t0: T).(pr3 c -(THead (Bind b) v2 t0) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O -x4) x3)))) (pr3_sing c (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O -x4) x2)) (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x4 (THead (Bind -x0) x1 x2)))) (pr2_free c (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) -x4 (THead (Bind x0) x1 x2)))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (pr0_zeta b H (THead (Flat Appl) x4 (THead (Bind x0) x1 x2)) -(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr0_upsilon x0 -H4 x4 x4 (pr0_refl x4) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2)) v2)) (THead -(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (pr3_head_12 c x1 x5 -H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat Appl) -(lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H9 (lift (S -O) O x4) Appl))) (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead -(Bind x0) x1 x2))) (lift_flat Appl x4 (THead (Bind x0) x1 x2) (S O) O)))) -H10))) u2 H6))))))))))))) H3)) H2)))))))))). - -lemma pr3_iso_appls_appl_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (v: T).(\forall (u: -T).(\forall (t: T).(\forall (vs: TList).(let u1 \def (THeads (Flat Appl) vs -(THead (Flat Appl) v (THead (Bind b) u t))) in (\forall (c: C).(\forall (u2: -T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c -(THeads (Flat Appl) vs (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) -t))) u2))))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v: T).(\lambda -(u: T).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: -TList).(let u1 \def (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind -b) u t))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 -u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead -(Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))) (\lambda (c: -C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) v (THead (Bind b) -u t)) u2)).(\lambda (H1: (((iso (THead (Flat Appl) v (THead (Bind b) u t)) -u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b H v u t c u2 H0 H1))))) -(\lambda (t0: T).(\lambda (t1: TList).(\lambda (H0: ((\forall (c: C).(\forall -(u2: T).((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u -t))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind -b) u t))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t1 -(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))).(\lambda -(c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t)))) u2)).(\lambda -(H2: (((iso (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v -(THead (Bind b) u t)))) u2) \to (\forall (P: Prop).P)))).(let H3 \def -(pr3_gen_appl c t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind -b) u t))) u2 H1) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 -u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead -(Flat Appl) v (THead (Bind b) u t))) t2)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: -B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2)))))))) (ex6_6 B T T T -T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c -(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat -Appl) (lift (S O) O v) t)))) u2) (\lambda (H4: (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c t0 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) -t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) t2))) (pr3 c (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) -u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T u2 (THead (Flat -Appl) x0 x1))).(\lambda (_: (pr3 c t0 x0)).(\lambda (_: (pr3 c (THeads (Flat -Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) x1)).(let H8 \def -(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t0 (THeads (Flat Appl) -t1 (THead (Flat Appl) v (THead (Bind b) u t)))) t2) \to (\forall (P: -Prop).P))) H2 (THead (Flat Appl) x0 x1) H5) in (eq_ind_r T (THead (Flat Appl) -x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) t2)) (H8 -(iso_head t0 x0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u -t))) x1 (Flat Appl)) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) (THead (Flat -Appl) x0 x1))) u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: -B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))))).(ex4_4_ind T T -T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: -B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))) (pr3 c (THead -(Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O v) t)))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) -u2)).(\lambda (H6: (pr3 c t0 x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t1 -(THead (Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 -x1))).(\lambda (H8: ((\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind -b0) u0) x1 x3))))).(pr3_t (THead (Bind Abbr) t0 x1) (THead (Flat Appl) t0 -(THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) -t)))) c (pr3_t (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Flat -Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S -O) O v) t)))) c (pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u -(THead (Flat Appl) (lift (S O) O v) t))) (THead (Bind Abst) x0 x1) (H0 c -(THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso (THeads (Flat Appl) t1 (THead -(Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 x1))).(\lambda (P: -Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 (THead (Bind b) u t) -t1 H9 P)))) t0 Appl) (THead (Bind Abbr) t0 x1) (pr3_pr2 c (THead (Flat Appl) -t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr2_free c (THead -(Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr0_beta -x0 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) -x2 x3) (THead (Bind Abbr) t0 x1) c (pr3_head_12 c t0 x2 H6 (Bind Abbr) x1 x3 -(H8 Abbr x2)) u2 H5)))))))))) H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda -(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u -t))) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind -b0) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))) (pr3 c -(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat -Appl) (lift (S O) O v) t)))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda -(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not -(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t1 (THead (Flat -Appl) v (THead (Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda -(H8: (pr3 c t0 x4)).(\lambda (H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c -(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u -(THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t (THead (Bind x0) x1 (THead -(Flat Appl) (lift (S O) O t0) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) -t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t -(THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Flat Appl) t0 (THeads -(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c -(pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O v) t))) (THead (Bind x0) x1 x2) (H0 c (THead (Bind x0) x1 x2) -H6 (\lambda (H11: (iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead -(Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (P: -Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind b) u t) t1 -H11 P)))) t0 Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) -x2)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind -x0) x1 (THead (Flat Appl) (lift (S O) O t0) x2)) (pr2_free c (THead (Flat -Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) -(lift (S O) O t0) x2)) (pr0_upsilon x0 H5 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl -x1) x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat -Appl) (lift (S O) O t0) x2) (THead (Flat Appl) (lift (S O) O x4) x2) -(pr3_head_12 (CHead c (Bind x0) x1) (lift (S O) O t0) (lift (S O) O x4) -(pr3_lift (CHead c (Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c -(drop_refl c) x1) t0 x4 H8) (Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind -x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 -(THead (Flat Appl) (lift (S O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat -Appl) (lift (S O) O x4) x2)) c (pr3_head_12 c x1 x5 H9 (Bind x0) (THead (Flat -Appl) (lift (S O) O x4) x2) (THead (Flat Appl) (lift (S O) O x4) x3) -(pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 (lift (S O) O x4) Appl)) u2 -H7)))))))))))))) H4)) H3))))))))) vs)))))). - -lemma pr3_iso_appls_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (vs: TList).(\forall (u: -T).(\forall (t: T).(let u1 \def (THeads (Flat Appl) vs (THead (Bind b) u t)) -in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) -(lifts (S O) O vs) t)) u2)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (vs: -TList).(tlist_ind_rev (\lambda (t: TList).(\forall (u: T).(\forall (t0: -T).(let u1 \def (THeads (Flat Appl) t (THead (Bind b) u t0)) in (\forall (c: -C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: -Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t) -t0)) u2))))))))) (\lambda (u: T).(\lambda (t: T).(\lambda (c: C).(\lambda -(u2: T).(\lambda (H0: (pr3 c (THead (Bind b) u t) u2)).(\lambda (_: (((iso -(THead (Bind b) u t) u2) \to (\forall (P: Prop).P)))).H0)))))) (\lambda (ts: -TList).(\lambda (t: T).(\lambda (H0: ((\forall (u: T).(\forall (t0: -T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) ts (THead -(Bind b) u t0)) u2) \to ((((iso (THeads (Flat Appl) ts (THead (Bind b) u t0)) -u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat -Appl) (lifts (S O) O ts) t0)) u2))))))))).(\lambda (u: T).(\lambda (t0: -T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THeads (Flat Appl) -(TApp ts t) (THead (Bind b) u t0)) u2)).(\lambda (H2: (((iso (THeads (Flat -Appl) (TApp ts t) (THead (Bind b) u t0)) u2) \to (\forall (P: -Prop).P)))).(eq_ind_r TList (TApp (lifts (S O) O ts) (lift (S O) O t)) -(\lambda (t1: TList).(pr3 c (THead (Bind b) u (THeads (Flat Appl) t1 t0)) -u2)) (eq_ind_r T (THeads (Flat Appl) (lifts (S O) O ts) (THead (Flat Appl) -(lift (S O) O t) t0)) (\lambda (t1: T).(pr3 c (THead (Bind b) u t1) u2)) (let -H3 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind b) u t0)) -(\lambda (t1: T).(pr3 c t1 u2)) H1 (THeads (Flat Appl) ts (THead (Flat Appl) -t (THead (Bind b) u t0))) (theads_tapp (Flat Appl) t (THead (Bind b) u t0) -ts)) in (let H4 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind -b) u t0)) (\lambda (t1: T).((iso t1 u2) \to (\forall (P: Prop).P))) H2 -(THeads (Flat Appl) ts (THead (Flat Appl) t (THead (Bind b) u t0))) -(theads_tapp (Flat Appl) t (THead (Bind b) u t0) ts)) in (TList_ind (\lambda -(t1: TList).(((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall -(u3: T).((pr3 c0 (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to -((((iso (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to (\forall (P: -Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O -t1) t2)) u3)))))))) \to ((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) t -(THead (Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat -Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c -(THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t1) (THead (Flat Appl) -(lift (S O) O t) t0))) u2))))) (\lambda (_: ((\forall (u0: T).(\forall (t1: -T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) TNil (THead -(Bind b) u0 t1)) u3) \to ((((iso (THeads (Flat Appl) TNil (THead (Bind b) u0 -t1)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads -(Flat Appl) (lifts (S O) O TNil) t1)) u3))))))))).(\lambda (H6: (pr3 c -(THeads (Flat Appl) TNil (THead (Flat Appl) t (THead (Bind b) u t0))) -u2)).(\lambda (H7: (((iso (THeads (Flat Appl) TNil (THead (Flat Appl) t -(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b -H t u t0 c u2 H6 H7)))) (\lambda (t1: T).(\lambda (ts0: TList).(\lambda (_: -((((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall (u3: T).((pr3 -c0 (THeads (Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads -(Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to -(pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O ts0) t2)) -u3)))))))) \to ((pr3 c (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead -(Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) ts0 (THead (Flat Appl) t -(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead -(Bind b) u (THeads (Flat Appl) (lifts (S O) O ts0) (THead (Flat Appl) (lift -(S O) O t) t0))) u2)))))).(\lambda (H5: ((\forall (u0: T).(\forall (t2: -T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) (TCons t1 -ts0) (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads (Flat Appl) (TCons t1 -ts0) (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 -(THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O (TCons t1 ts0)) t2)) -u3))))))))).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t1 ts0) (THead -(Flat Appl) t (THead (Bind b) u t0))) u2)).(\lambda (H7: (((iso (THeads (Flat -Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to -(\forall (P: Prop).P)))).(H5 u (THead (Flat Appl) (lift (S O) O t) t0) c u2 -(pr3_iso_appls_appl_bind b H t u t0 (TCons t1 ts0) c u2 H6 H7) (\lambda (H8: -(iso (THeads (Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O t) t0))) u2)).(\lambda (P: Prop).(H7 (iso_trans (THeads (Flat -Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) (THeads -(Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) (lift (S O) O -t) t0))) (iso_head t1 t1 (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead -(Bind b) u t0))) (THeads (Flat Appl) ts0 (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O t) t0))) (Flat Appl)) u2 H8) P)))))))))) ts H0 H3 H4))) (THeads -(Flat Appl) (TApp (lifts (S O) O ts) (lift (S O) O t)) t0) (theads_tapp (Flat -Appl) (lift (S O) O t) t0 (lifts (S O) O ts))) (lifts (S O) O (TApp ts t)) -(lifts_tapp (S O) O t ts))))))))))) vs))). - -lemma pr3_iso_beta: - \forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 \def (THead (Flat -Appl) v (THead (Bind Abst) w t)) in (\forall (c: C).(\forall (u2: T).((pr3 c -u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind -Abbr) v t) u2)))))))) -\def - \lambda (v: T).(\lambda (w: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: -T).(\lambda (H: (pr3 c (THead (Flat Appl) v (THead (Bind Abst) w t)) -u2)).(\lambda (H0: (((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) u2) -\to (\forall (P: Prop).P)))).(let H1 \def (pr3_gen_appl c v (THead (Bind -Abst) w t) u2 H) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq -T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v -u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) w t) t2)))) -(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: -T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) -w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind -b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c v u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c -(THead (Bind Abbr) v t) u2) (\lambda (H2: (ex3_2 T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abst) w t) t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: -T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) -w t) t2))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H3: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v -x0)).(\lambda (_: (pr3 c (THead (Bind Abst) w t) x1)).(let H6 \def (eq_ind T -u2 (\lambda (t0: T).((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) t0) -\to (\forall (P: Prop).P))) H0 (THead (Flat Appl) x0 x1) H3) in (eq_ind_r T -(THead (Flat Appl) x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind Abbr) v t) -t0)) (H6 (iso_head v x0 (THead (Bind Abst) w t) x1 (Flat Appl)) (pr3 c (THead -(Bind Abbr) v t) (THead (Flat Appl) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: -(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: -T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) -w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind -b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v -u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Bind Abbr) v t) -u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H3: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H4: (pr3 c v -x2)).(\lambda (H5: (pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) x0 -x1))).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) -u) x1 x3))))).(let H7 \def (pr3_gen_abst c w t (THead (Bind Abst) x0 x1) H5) -in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) -x0 x1) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w -u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda -(x4: T).(\lambda (x5: T).(\lambda (H8: (eq T (THead (Bind Abst) x0 x1) (THead -(Bind Abst) x4 x5))).(\lambda (H9: (pr3 c w x4)).(\lambda (H10: ((\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x5))))).(let H11 \def (f_equal -T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) -\Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abst) x0 x1) -(THead (Bind Abst) x4 x5) H8) in ((let H12 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) x0 x1) (THead (Bind Abst) -x4 x5) H8) in (\lambda (H13: (eq T x0 x4)).(let H14 \def (eq_ind_r T x5 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t -t0)))) H10 x1 H12) in (let H15 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 c w -t0)) H9 x0 H13) in (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) v t) c -(pr3_head_12 c v x2 H4 (Bind Abbr) t x3 (pr3_t x1 t (CHead c (Bind Abbr) x2) -(H14 Abbr x2) x3 (H6 Abbr x2))) u2 H3))))) H11))))))) H7)))))))))) H2)) -(\lambda (H2: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat -Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v -u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THead (Bind Abst) w t) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) -u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2))))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: B).(\lambda -(x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: -T).(\lambda (H3: (not (eq B x0 Abst))).(\lambda (H4: (pr3 c (THead (Bind -Abst) w t) (THead (Bind x0) x1 x2))).(\lambda (H5: (pr3 c (THead (Bind x0) x5 -(THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (_: (pr3 c v -x4)).(\lambda (_: (pr3 c x1 x5)).(\lambda (H8: (pr3 (CHead c (Bind x0) x5) x2 -x3)).(let H9 \def (pr3_gen_abst c w t (THead (Bind x0) x1 x2) H4) in -(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 -x2) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w -u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda -(x6: T).(\lambda (x7: T).(\lambda (H10: (eq T (THead (Bind x0) x1 x2) (THead -(Bind Abst) x6 x7))).(\lambda (H11: (pr3 c w x6)).(\lambda (H12: ((\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x7))))).(let H13 \def -(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef -_) \Rightarrow x0 | (THead k _ _) \Rightarrow (match k with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow x0])])) (THead (Bind x0) x1 x2) (THead -(Bind Abst) x6 x7) H10) in ((let H14 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ t0 _) -\Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind Abst) x6 x7) H10) in -((let H15 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ _ t0) \Rightarrow t0])) -(THead (Bind x0) x1 x2) (THead (Bind Abst) x6 x7) H10) in (\lambda (H16: (eq -T x1 x6)).(\lambda (H17: (eq B x0 Abst)).(let H18 \def (eq_ind_r T x7 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t -t0)))) H12 x2 H15) in (let H19 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c w -t0)) H11 x1 H16) in (let H20 \def (eq_ind B x0 (\lambda (b: B).(pr3 (CHead c -(Bind b) x5) x2 x3)) H8 Abst H17) in (let H21 \def (eq_ind B x0 (\lambda (b: -B).(pr3 c (THead (Bind b) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)) -H5 Abst H17) in (let H22 \def (eq_ind B x0 (\lambda (b: B).(not (eq B b -Abst))) H3 Abst H17) in (let H23 \def (match (H22 (refl_equal B Abst)) in -False with []) in H23))))))))) H14)) H13))))))) H9)))))))))))))) H2)) -H1)))))))). - -lemma pr3_iso_appls_beta: - \forall (us: TList).(\forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 -\def (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) w t))) in -(\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to -(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) us (THead (Bind Abbr) -v t)) u2))))))))) -\def - \lambda (us: TList).(TList_ind (\lambda (t: TList).(\forall (v: T).(\forall -(w: T).(\forall (t0: T).(let u1 \def (THeads (Flat Appl) t (THead (Flat Appl) -v (THead (Bind Abst) w t0))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 -u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat -Appl) t (THead (Bind Abbr) v t0)) u2)))))))))) (\lambda (v: T).(\lambda (w: -T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H: (pr3 c -(THead (Flat Appl) v (THead (Bind Abst) w t)) u2)).(\lambda (H0: (((iso -(THead (Flat Appl) v (THead (Bind Abst) w t)) u2) \to (\forall (P: -Prop).P)))).(pr3_iso_beta v w t c u2 H H0)))))))) (\lambda (t: T).(\lambda -(t0: TList).(\lambda (H: ((\forall (v: T).(\forall (w: T).(\forall (t1: -T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (THead -(Flat Appl) v (THead (Bind Abst) w t1))) u2) \to ((((iso (THeads (Flat Appl) -t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) u2) \to (\forall (P: -Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1)) -u2)))))))))).(\lambda (v: T).(\lambda (w: T).(\lambda (t1: T).(\lambda (c: -C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) t (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) u2)).(\lambda (H1: -(((iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Flat Appl) v -(THead (Bind Abst) w t1)))) u2) \to (\forall (P: Prop).P)))).(let H2 \def -(pr3_gen_appl c t (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind -Abst) w t1))) u2 H0) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: -T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) -t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2)))) (ex4_4 T T T T -(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda -(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c -(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) -(\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead -(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) t2))))).(ex3_2_ind T T (\lambda (u3: -T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c -(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2))) -(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) -u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T u2 (THead (Flat -Appl) x0 x1))).(\lambda (_: (pr3 c t x0)).(\lambda (_: (pr3 c (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) x1)).(let H7 \def -(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) -t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) t2) \to (\forall (P: -Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) -x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 -(THead (Bind Abbr) v t1))) t2)) (H7 (iso_head t x0 (THeads (Flat Appl) t0 -(THead (Flat Appl) v (THead (Bind Abst) w t1))) x1 (Flat Appl)) (pr3 c (THead -(Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) (THead (Flat -Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T -T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c -(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Flat -Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c -(THead (Bind Abbr) x2 x3) u2)).(\lambda (H5: (pr3 c t x2)).(\lambda (H6: (pr3 -c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) -(THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b: B).(\forall (u: -T).(pr3 (CHead c (Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) -(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c -(pr3_t (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Flat Appl) t -(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads -(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind Abst) x0 x1) (H v w t1 -c (THead (Bind Abst) x0 x1) H6 (\lambda (H8: (iso (THeads (Flat Appl) t0 -(THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) x0 -x1))).(\lambda (P: Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 -(THead (Bind Abst) w t1) t0 H8 P)))) t Appl) (THead (Bind Abbr) t x1) -(pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) -t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead -(Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 (pr0_refl x1))))) u2 -(pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t x1) c (pr3_head_12 c t -x2 H5 (Bind Abbr) x1 x3 (H7 Abbr x2)) u2 H4)))))))))) H3)) (\lambda (H3: -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) -w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: -T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat -Appl) v (THead (Bind Abst) w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) -u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead -(Bind Abbr) v t1))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq -B x0 Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v -(THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda -(H7: (pr3 c t x4)).(\lambda (H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c -(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S -O) O x4) x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) -v t1))) c (pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) -(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c -(pr3_t (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Flat Appl) t -(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads -(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind x0) x1 x2) (H v w t1 c -(THead (Bind x0) x1 x2) H5 (\lambda (H10: (iso (THeads (Flat Appl) t0 (THead -(Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda -(P: Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind Abst) -w t1) t0 H10 P)))) t Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) -O t) x2)) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead -(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr2_free c (THead -(Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) -(lift (S O) O t) x2)) (pr0_upsilon x0 H4 t t (pr0_refl t) x1 x1 (pr0_refl x1) -x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O -x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat Appl) -(lift (S O) O t) x2) (THead (Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 -(CHead c (Bind x0) x1) (lift (S O) O t) (lift (S O) O x4) (pr3_lift (CHead c -(Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H7) -(Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift -(S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S -O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c -(pr3_head_12 c x1 x5 H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) -(THead (Flat Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) -x2 x3 H9 (lift (S O) O x4) Appl)) u2 H6)))))))))))))) H3)) H2)))))))))))) us). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr1.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/pr1.ma deleted file mode 100644 index 04878c2b9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr1.ma +++ /dev/null @@ -1,31 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/defs.ma". - -include "basic_1/pr1/fwd.ma". - -lemma pr3_pr1: - \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (c: C).(pr3 c t1 -t2)))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda -(t: T).(\lambda (t0: T).(\forall (c: C).(pr3 c t t0)))) (\lambda (t: -T).(\lambda (c: C).(pr3_refl c t))) (\lambda (t0: T).(\lambda (t3: -T).(\lambda (H0: (pr0 t3 t0)).(\lambda (t4: T).(\lambda (_: (pr1 t0 -t4)).(\lambda (H2: ((\forall (c: C).(pr3 c t0 t4)))).(\lambda (c: -C).(pr3_sing c t0 t3 (pr2_free c t3 t0 H0) t4 (H2 c))))))))) t1 t2 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/pr3.ma deleted file mode 100644 index d973e0eb2..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/pr3.ma +++ /dev/null @@ -1,68 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/props.ma". - -include "basic_1/pr2/pr2.ma". - -lemma pr3_strip: - \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr3 c t0 t1) \to (\forall -(t2: T).((pr2 c t0 t2) \to (ex2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: -T).(pr3 c t2 t)))))))) -\def - \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr3 c t0 -t1)).(pr3_ind c (\lambda (t: T).(\lambda (t2: T).(\forall (t3: T).((pr2 c t -t3) \to (ex2 T (\lambda (t4: T).(pr3 c t2 t4)) (\lambda (t4: T).(pr3 c t3 -t4))))))) (\lambda (t: T).(\lambda (t2: T).(\lambda (H0: (pr2 c t -t2)).(ex_intro2 T (\lambda (t3: T).(pr3 c t t3)) (\lambda (t3: T).(pr3 c t2 -t3)) t2 (pr3_pr2 c t t2 H0) (pr3_refl c t2))))) (\lambda (t2: T).(\lambda -(t3: T).(\lambda (H0: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (_: (pr3 c t2 -t4)).(\lambda (H2: ((\forall (t5: T).((pr2 c t2 t5) \to (ex2 T (\lambda (t: -T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))))))).(\lambda (t5: T).(\lambda -(H3: (pr2 c t3 t5)).(ex2_ind T (\lambda (t: T).(pr2 c t5 t)) (\lambda (t: -T).(pr2 c t2 t)) (ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c -t5 t))) (\lambda (x: T).(\lambda (H4: (pr2 c t5 x)).(\lambda (H5: (pr2 c t2 -x)).(ex2_ind T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c x t)) -(ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))) (\lambda -(x0: T).(\lambda (H6: (pr3 c t4 x0)).(\lambda (H7: (pr3 c x x0)).(ex_intro2 T -(\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t)) x0 H6 (pr3_sing c -x t5 H4 x0 H7))))) (H2 x H5))))) (pr2_confluence c t3 t5 H3 t2 H0)))))))))) -t0 t1 H)))). - -theorem pr3_confluence: - \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr3 c t0 t1) \to (\forall -(t2: T).((pr3 c t0 t2) \to (ex2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: -T).(pr3 c t2 t)))))))) -\def - \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr3 c t0 -t1)).(pr3_ind c (\lambda (t: T).(\lambda (t2: T).(\forall (t3: T).((pr3 c t -t3) \to (ex2 T (\lambda (t4: T).(pr3 c t2 t4)) (\lambda (t4: T).(pr3 c t3 -t4))))))) (\lambda (t: T).(\lambda (t2: T).(\lambda (H0: (pr3 c t -t2)).(ex_intro2 T (\lambda (t3: T).(pr3 c t t3)) (\lambda (t3: T).(pr3 c t2 -t3)) t2 H0 (pr3_refl c t2))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda -(H0: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (_: (pr3 c t2 t4)).(\lambda -(H2: ((\forall (t5: T).((pr3 c t2 t5) \to (ex2 T (\lambda (t: T).(pr3 c t4 -t)) (\lambda (t: T).(pr3 c t5 t))))))).(\lambda (t5: T).(\lambda (H3: (pr3 c -t3 t5)).(ex2_ind T (\lambda (t: T).(pr3 c t5 t)) (\lambda (t: T).(pr3 c t2 -t)) (ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))) -(\lambda (x: T).(\lambda (H4: (pr3 c t5 x)).(\lambda (H5: (pr3 c t2 -x)).(ex2_ind T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c x t)) -(ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))) (\lambda -(x0: T).(\lambda (H6: (pr3 c t4 x0)).(\lambda (H7: (pr3 c x x0)).(ex_intro2 T -(\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t)) x0 H6 (pr3_t x t5 -c H4 x0 H7))))) (H2 x H5))))) (pr3_strip c t3 t5 H3 t2 H0)))))))))) t0 t1 -H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/props.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/props.ma deleted file mode 100644 index c9cf9c301..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/props.ma +++ /dev/null @@ -1,1604 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/fwd.ma". - -include "basic_1/pr3/pr1.ma". - -include "basic_1/pr2/props.ma". - -include "basic_1/pr1/props.ma". - -lemma clear_pr3_trans: - \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pr3 c2 t1 t2) \to -(\forall (c1: C).((clear c1 c2) \to (pr3 c1 t1 t2)))))) -\def - \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c2 t1 -t2)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(pr3_ind c2 (\lambda (t: -T).(\lambda (t0: T).(pr3 c1 t t0))) (\lambda (t: T).(pr3_refl c1 t)) (\lambda -(t3: T).(\lambda (t4: T).(\lambda (H1: (pr2 c2 t4 t3)).(\lambda (t5: -T).(\lambda (_: (pr3 c2 t3 t5)).(\lambda (H3: (pr3 c1 t3 t5)).(pr3_sing c1 t3 -t4 (clear_pr2_trans c2 t4 t3 H1 c1 H0) t5 H3))))))) t1 t2 H)))))). - -lemma pr3_pr2: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (pr3 c -t1 t2)))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(pr3_sing c t2 t1 H t2 (pr3_refl c t2))))). - -theorem pr3_t: - \forall (t2: T).(\forall (t1: T).(\forall (c: C).((pr3 c t1 t2) \to (\forall -(t3: T).((pr3 c t2 t3) \to (pr3 c t1 t3)))))) -\def - \lambda (t2: T).(\lambda (t1: T).(\lambda (c: C).(\lambda (H: (pr3 c t1 -t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t3: T).((pr3 c t0 -t3) \to (pr3 c t t3))))) (\lambda (t: T).(\lambda (t3: T).(\lambda (H0: (pr3 -c t t3)).H0))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c t3 -t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: ((\forall -(t5: T).((pr3 c t4 t5) \to (pr3 c t0 t5))))).(\lambda (t5: T).(\lambda (H3: -(pr3 c t4 t5)).(pr3_sing c t0 t3 H0 t5 (H2 t5 H3)))))))))) t1 t2 H)))). - -lemma pr3_thin_dx: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall -(u: T).(\forall (f: F).(pr3 c (THead (Flat f) u t1) (THead (Flat f) u -t2))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(\lambda (u: T).(\lambda (f: F).(pr3_ind c (\lambda (t: T).(\lambda (t0: -T).(pr3 c (THead (Flat f) u t) (THead (Flat f) u t0)))) (\lambda (t: -T).(pr3_refl c (THead (Flat f) u t))) (\lambda (t0: T).(\lambda (t3: -T).(\lambda (H0: (pr2 c t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 -t4)).(\lambda (H2: (pr3 c (THead (Flat f) u t0) (THead (Flat f) u -t4))).(pr3_sing c (THead (Flat f) u t0) (THead (Flat f) u t3) (pr2_thin_dx c -t3 t0 H0 u f) (THead (Flat f) u t4) H2))))))) t1 t2 H)))))). - -lemma pr3_head_1: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall -(k: K).(\forall (t: T).(pr3 c (THead k u1 t) (THead k u2 t))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 -u2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (k: K).(\forall -(t1: T).(pr3 c (THead k t t1) (THead k t0 t1)))))) (\lambda (t: T).(\lambda -(k: K).(\lambda (t0: T).(pr3_refl c (THead k t t0))))) (\lambda (t2: -T).(\lambda (t1: T).(\lambda (H0: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda -(_: (pr3 c t2 t3)).(\lambda (H2: ((\forall (k: K).(\forall (t: T).(pr3 c -(THead k t2 t) (THead k t3 t)))))).(\lambda (k: K).(\lambda (t: T).(pr3_sing -c (THead k t2 t) (THead k t1 t) (pr2_head_1 c t1 t2 H0 k t) (THead k t3 t) -(H2 k t)))))))))) u1 u2 H)))). - -lemma pr3_head_2: - \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).(\forall -(k: K).((pr3 (CHead c k u) t1 t2) \to (pr3 c (THead k u t1) (THead k u -t2))))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(k: K).(\lambda (H: (pr3 (CHead c k u) t1 t2)).(pr3_ind (CHead c k u) -(\lambda (t: T).(\lambda (t0: T).(pr3 c (THead k u t) (THead k u t0)))) -(\lambda (t: T).(pr3_refl c (THead k u t))) (\lambda (t0: T).(\lambda (t3: -T).(\lambda (H0: (pr2 (CHead c k u) t3 t0)).(\lambda (t4: T).(\lambda (_: -(pr3 (CHead c k u) t0 t4)).(\lambda (H2: (pr3 c (THead k u t0) (THead k u -t4))).(pr3_sing c (THead k u t0) (THead k u t3) (pr2_head_2 c u t3 t0 k H0) -(THead k u t4) H2))))))) t1 t2 H)))))). - -theorem pr3_head_21: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall -(k: K).(\forall (t1: T).(\forall (t2: T).((pr3 (CHead c k u1) t1 t2) \to (pr3 -c (THead k u1 t1) (THead k u2 t2))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 -u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 -(CHead c k u1) t1 t2)).(pr3_t (THead k u1 t2) (THead k u1 t1) c (pr3_head_2 c -u1 t1 t2 k H0) (THead k u2 t2) (pr3_head_1 c u1 u2 H k t2))))))))). - -theorem pr3_head_12: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall -(k: K).(\forall (t1: T).(\forall (t2: T).((pr3 (CHead c k u2) t1 t2) \to (pr3 -c (THead k u1 t1) (THead k u2 t2))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 -u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 -(CHead c k u2) t1 t2)).(pr3_t (THead k u2 t1) (THead k u1 t1) c (pr3_head_1 c -u1 u2 H k t1) (THead k u2 t2) (pr3_head_2 c u2 t1 t2 k H0))))))))). - -lemma pr3_cflat: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall -(f: F).(\forall (v: T).(pr3 (CHead c (Flat f) v) t1 t2)))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (f: F).(\forall (v: -T).(pr3 (CHead c (Flat f) v) t t0))))) (\lambda (t: T).(\lambda (f: -F).(\lambda (v: T).(pr3_refl (CHead c (Flat f) v) t)))) (\lambda (t3: -T).(\lambda (t4: T).(\lambda (H0: (pr2 c t4 t3)).(\lambda (t5: T).(\lambda -(_: (pr3 c t3 t5)).(\lambda (H2: ((\forall (f: F).(\forall (v: T).(pr3 (CHead -c (Flat f) v) t3 t5))))).(\lambda (f: F).(\lambda (v: T).(pr3_sing (CHead c -(Flat f) v) t3 t4 (pr2_cflat c t4 t3 H0 f v) t5 (H2 f v)))))))))) t1 t2 H)))). - -theorem pr3_flat: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall -(t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall (f: F).(pr3 c (THead -(Flat f) u1 t1) (THead (Flat f) u2 t2))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 -u2)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).(\lambda -(f: F).(pr3_head_12 c u1 u2 H (Flat f) t1 t2 (pr3_cflat c t1 t2 H0 f -u2))))))))). - -lemma pr3_pr0_pr2_t: - \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (c: C).(\forall -(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 -(CHead c k u1) t1 t2)))))))) -\def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u1 u2)).(\lambda (c: -C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 -(CHead c k u2) t1 t2)).(insert_eq C (CHead c k u2) (\lambda (c0: C).(pr2 c0 -t1 t2)) (\lambda (_: C).(pr3 (CHead c k u1) t1 t2)) (\lambda (y: C).(\lambda -(H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).((eq C c0 (CHead c k u2)) \to (pr3 (CHead c k u1) t t0))))) (\lambda (c0: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (_: -(eq C c0 (CHead c k u2))).(pr3_pr2 (CHead c k u1) t3 t4 (pr2_free (CHead c k -u1) t3 t4 H2))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (H2: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: -T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H4: -(subst0 i u t4 t)).(\lambda (H5: (eq C c0 (CHead c k u2))).(let H6 \def -(eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) u))) H2 (CHead -c k u2) H5) in (nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d -(Bind Abbr) u)) \to ((subst0 n u t4 t) \to (pr3 (CHead c k u1) t3 t)))) -(\lambda (H7: (getl O (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H8: -(subst0 O u t4 t)).(K_ind (\lambda (k0: K).((getl O (CHead c k0 u2) (CHead d -(Bind Abbr) u)) \to (pr3 (CHead c k0 u1) t3 t))) (\lambda (b: B).(\lambda -(H9: (getl O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(let H10 \def -(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead -c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) -(clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) -u2) (CHead d (Bind Abbr) u) H9))) in ((let H11 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow -(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) -(CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d -(Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) -H9))) in ((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) -(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 -(getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H9))) in (\lambda -(H13: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H15 \def (eq_ind T u -(\lambda (t0: T).(subst0 O t0 t4 t)) H8 u2 H12) in (eq_ind B Abbr (\lambda -(b0: B).(pr3 (CHead c (Bind b0) u1) t3 t)) (ex2_ind T (\lambda (t0: -T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(pr0 t0 t)) (pr3 (CHead c (Bind -Abbr) u1) t3 t) (\lambda (x: T).(\lambda (H16: (subst0 O u1 t4 x)).(\lambda -(H17: (pr0 x t)).(pr3_sing (CHead c (Bind Abbr) u1) x t3 (pr2_delta (CHead c -(Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t3 t4 H3 x H16) t (pr3_pr2 -(CHead c (Bind Abbr) u1) x t (pr2_free (CHead c (Bind Abbr) u1) x t H17)))))) -(pr0_subst0_back u2 t4 t O H15 u1 H)) b H13))))) H11)) H10)))) (\lambda (f: -F).(\lambda (H9: (getl O (CHead c (Flat f) u2) (CHead d (Bind Abbr) -u))).(pr3_pr2 (CHead c (Flat f) u1) t3 t (pr2_cflat c t3 t (pr2_delta c d u O -(getl_intro O c (CHead d (Bind Abbr) u) c (drop_refl c) (clear_gen_flat f c -(CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Flat f) u2) (CHead d (Bind -Abbr) u) H9))) t3 t4 H3 t H8) f u1)))) k H7))) (\lambda (i0: nat).(\lambda -(IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t4 -t) \to (pr3 (CHead c k u1) t3 t))))).(\lambda (H7: (getl (S i0) (CHead c k -u2) (CHead d (Bind Abbr) u))).(\lambda (H8: (subst0 (S i0) u t4 t)).(K_ind -(\lambda (k0: K).((getl (S i0) (CHead c k0 u2) (CHead d (Bind Abbr) u)) \to -((((getl i0 (CHead c k0 u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t4 t) -\to (pr3 (CHead c k0 u1) t3 t)))) \to (pr3 (CHead c k0 u1) t3 t)))) (\lambda -(b: B).(\lambda (H9: (getl (S i0) (CHead c (Bind b) u2) (CHead d (Bind Abbr) -u))).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind Abbr) u)) -\to ((subst0 i0 u t4 t) \to (pr3 (CHead c (Bind b) u1) t3 t))))).(pr3_pr2 -(CHead c (Bind b) u1) t3 t (pr2_delta (CHead c (Bind b) u1) d u (S i0) -(getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c -(CHead d (Bind Abbr) u) u2 i0 H9) u1) t3 t4 H3 t H8))))) (\lambda (f: -F).(\lambda (H9: (getl (S i0) (CHead c (Flat f) u2) (CHead d (Bind Abbr) -u))).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead d (Bind Abbr) u)) -\to ((subst0 i0 u t4 t) \to (pr3 (CHead c (Flat f) u1) t3 t))))).(pr3_pr2 -(CHead c (Flat f) u1) t3 t (pr2_cflat c t3 t (pr2_delta c d u (r (Flat f) i0) -(getl_gen_S (Flat f) c (CHead d (Bind Abbr) u) u2 i0 H9) t3 t4 H3 t H8) f -u1))))) k H7 IHi))))) i H6 H4))))))))))))) y t1 t2 H1))) H0)))))))). - -lemma pr3_pr2_pr2_t: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u1 u2) \to (\forall -(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 -(CHead c k u1) t1 t2)))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u1 -u2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (t1: -T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c0 k t0) t1 t2) \to (pr3 -(CHead c0 k t) t1 t2)))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: -K).(\lambda (H1: (pr2 (CHead c0 k t2) t0 t3)).(pr3_pr0_pr2_t t1 t2 H0 c0 t0 -t3 k H1))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H2: -(subst0 i u t2 t)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda -(H3: (pr2 (CHead c0 k t) t0 t3)).(insert_eq C (CHead c0 k t) (\lambda (c1: -C).(pr2 c1 t0 t3)) (\lambda (_: C).(pr3 (CHead c0 k t1) t0 t3)) (\lambda (y: -C).(\lambda (H4: (pr2 y t0 t3)).(pr2_ind (\lambda (c1: C).(\lambda (t4: -T).(\lambda (t5: T).((eq C c1 (CHead c0 k t)) \to (pr3 (CHead c0 k t1) t4 -t5))))) (\lambda (c1: C).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H5: (pr0 -t4 t5)).(\lambda (_: (eq C c1 (CHead c0 k t))).(pr3_pr2 (CHead c0 k t1) t4 t5 -(pr2_free (CHead c0 k t1) t4 t5 H5))))))) (\lambda (c1: C).(\lambda (d0: -C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H5: (getl i0 c1 (CHead d0 -(Bind Abbr) u0))).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H6: (pr0 t4 -t5)).(\lambda (t6: T).(\lambda (H7: (subst0 i0 u0 t5 t6)).(\lambda (H8: (eq C -c1 (CHead c0 k t))).(let H9 \def (eq_ind C c1 (\lambda (c2: C).(getl i0 c2 -(CHead d0 (Bind Abbr) u0))) H5 (CHead c0 k t) H8) in (nat_ind (\lambda (n: -nat).((getl n (CHead c0 k t) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t5 -t6) \to (pr3 (CHead c0 k t1) t4 t6)))) (\lambda (H10: (getl O (CHead c0 k t) -(CHead d0 (Bind Abbr) u0))).(\lambda (H11: (subst0 O u0 t5 t6)).(K_ind -(\lambda (k0: K).((clear (CHead c0 k0 t) (CHead d0 (Bind Abbr) u0)) \to (pr3 -(CHead c0 k0 t1) t4 t6))) (\lambda (b: B).(\lambda (H12: (clear (CHead c0 -(Bind b) t) (CHead d0 (Bind Abbr) u0))).(let H13 \def (f_equal C C (\lambda -(e: C).(match e with [(CSort _) \Rightarrow d0 | (CHead c2 _ _) \Rightarrow -c2])) (CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t) (clear_gen_bind b c0 -(CHead d0 (Bind Abbr) u0) t H12)) in ((let H14 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow -(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) -(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead -d0 (Bind Abbr) u0) t H12)) in ((let H15 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t7) \Rightarrow t7])) -(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead -d0 (Bind Abbr) u0) t H12)) in (\lambda (H16: (eq B Abbr b)).(\lambda (_: (eq -C d0 c0)).(let H18 \def (eq_ind T u0 (\lambda (t7: T).(subst0 O t7 t5 t6)) -H11 t H15) in (eq_ind B Abbr (\lambda (b0: B).(pr3 (CHead c0 (Bind b0) t1) t4 -t6)) (ex2_ind T (\lambda (t7: T).(subst0 O t2 t5 t7)) (\lambda (t7: -T).(subst0 (S (plus i O)) u t7 t6)) (pr3 (CHead c0 (Bind Abbr) t1) t4 t6) -(\lambda (x: T).(\lambda (H19: (subst0 O t2 t5 x)).(\lambda (H20: (subst0 (S -(plus i O)) u x t6)).(let H21 \def (f_equal nat nat S (plus i O) i (sym_eq -nat i (plus i O) (plus_n_O i))) in (let H22 \def (eq_ind nat (S (plus i O)) -(\lambda (n: nat).(subst0 n u x t6)) H20 (S i) H21) in (ex2_ind T (\lambda -(t7: T).(subst0 O t1 t5 t7)) (\lambda (t7: T).(pr0 t7 x)) (pr3 (CHead c0 -(Bind Abbr) t1) t4 t6) (\lambda (x0: T).(\lambda (H23: (subst0 O t1 t5 -x0)).(\lambda (H24: (pr0 x0 x)).(pr3_sing (CHead c0 (Bind Abbr) t1) x0 t4 -(pr2_delta (CHead c0 (Bind Abbr) t1) c0 t1 O (getl_refl Abbr c0 t1) t4 t5 H6 -x0 H23) t6 (pr3_pr2 (CHead c0 (Bind Abbr) t1) x0 t6 (pr2_delta (CHead c0 -(Bind Abbr) t1) d u (S i) (getl_clear_bind Abbr (CHead c0 (Bind Abbr) t1) c0 -t1 (clear_bind Abbr c0 t1) (CHead d (Bind Abbr) u) i H0) x0 x H24 t6 -H22)))))) (pr0_subst0_back t2 t5 x O H19 t1 H1))))))) (subst0_subst0 t5 t6 t -O H18 t2 u i H2)) b H16))))) H14)) H13)))) (\lambda (f: F).(\lambda (H12: -(clear (CHead c0 (Flat f) t) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c0 -(Flat f) t1) t4 t6 (pr2_cflat c0 t4 t6 (pr2_delta c0 d0 u0 O (getl_intro O c0 -(CHead d0 (Bind Abbr) u0) c0 (drop_refl c0) (clear_gen_flat f c0 (CHead d0 -(Bind Abbr) u0) t H12)) t4 t5 H6 t6 H11) f t1)))) k (getl_gen_O (CHead c0 k -t) (CHead d0 (Bind Abbr) u0) H10)))) (\lambda (i1: nat).(\lambda (_: (((getl -i1 (CHead c0 k t) (CHead d0 (Bind Abbr) u0)) \to ((subst0 i1 u0 t5 t6) \to -(pr3 (CHead c0 k t1) t4 t6))))).(\lambda (H10: (getl (S i1) (CHead c0 k t) -(CHead d0 (Bind Abbr) u0))).(\lambda (H11: (subst0 (S i1) u0 t5 t6)).(K_ind -(\lambda (k0: K).((getl (S i1) (CHead c0 k0 t) (CHead d0 (Bind Abbr) u0)) \to -(pr3 (CHead c0 k0 t1) t4 t6))) (\lambda (b: B).(\lambda (H12: (getl (S i1) -(CHead c0 (Bind b) t) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c0 (Bind b) -t1) t4 t6 (pr2_delta (CHead c0 (Bind b) t1) d0 u0 (S i1) (getl_head (Bind b) -i1 c0 (CHead d0 (Bind Abbr) u0) (getl_gen_S (Bind b) c0 (CHead d0 (Bind Abbr) -u0) t i1 H12) t1) t4 t5 H6 t6 H11)))) (\lambda (f: F).(\lambda (H12: (getl (S -i1) (CHead c0 (Flat f) t) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c0 -(Flat f) t1) t4 t6 (pr2_cflat c0 t4 t6 (pr2_delta c0 d0 u0 (r (Flat f) i1) -(getl_gen_S (Flat f) c0 (CHead d0 (Bind Abbr) u0) t i1 H12) t4 t5 H6 t6 H11) -f t1)))) k H10))))) i0 H9 H7))))))))))))) y t0 t3 H4))) H3))))))))))))))) c -u1 u2 H)))). - -lemma pr3_pr2_pr3_t: - \forall (c: C).(\forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall -(k: K).((pr3 (CHead c k u2) t1 t2) \to (\forall (u1: T).((pr2 c u1 u2) \to -(pr3 (CHead c k u1) t1 t2)))))))) -\def - \lambda (c: C).(\lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(k: K).(\lambda (H: (pr3 (CHead c k u2) t1 t2)).(pr3_ind (CHead c k u2) -(\lambda (t: T).(\lambda (t0: T).(\forall (u1: T).((pr2 c u1 u2) \to (pr3 -(CHead c k u1) t t0))))) (\lambda (t: T).(\lambda (u1: T).(\lambda (_: (pr2 c -u1 u2)).(pr3_refl (CHead c k u1) t)))) (\lambda (t0: T).(\lambda (t3: -T).(\lambda (H0: (pr2 (CHead c k u2) t3 t0)).(\lambda (t4: T).(\lambda (_: -(pr3 (CHead c k u2) t0 t4)).(\lambda (H2: ((\forall (u1: T).((pr2 c u1 u2) -\to (pr3 (CHead c k u1) t0 t4))))).(\lambda (u1: T).(\lambda (H3: (pr2 c u1 -u2)).(pr3_t t0 t3 (CHead c k u1) (pr3_pr2_pr2_t c u1 u2 H3 t3 t0 k H0) t4 (H2 -u1 H3)))))))))) t1 t2 H)))))). - -theorem pr3_pr3_pr3_t: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall -(t1: T).(\forall (t2: T).(\forall (k: K).((pr3 (CHead c k u2) t1 t2) \to (pr3 -(CHead c k u1) t1 t2)))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 -u2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t1: T).(\forall -(t2: T).(\forall (k: K).((pr3 (CHead c k t0) t1 t2) \to (pr3 (CHead c k t) t1 -t2))))))) (\lambda (t: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: -K).(\lambda (H0: (pr3 (CHead c k t) t1 t2)).H0))))) (\lambda (t2: T).(\lambda -(t1: T).(\lambda (H0: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda (_: (pr3 c t2 -t3)).(\lambda (H2: ((\forall (t4: T).(\forall (t5: T).(\forall (k: K).((pr3 -(CHead c k t3) t4 t5) \to (pr3 (CHead c k t2) t4 t5))))))).(\lambda (t0: -T).(\lambda (t4: T).(\lambda (k: K).(\lambda (H3: (pr3 (CHead c k t3) t0 -t4)).(pr3_pr2_pr3_t c t2 t0 t4 k (H2 t0 t4 k H3) t1 H0))))))))))) u1 u2 H)))). - -lemma pr3_lift: - \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h -d c e) \to (\forall (t1: T).(\forall (t2: T).((pr3 e t1 t2) \to (pr3 c (lift -h d t1) (lift h d t2))))))))) -\def - \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 e t1 -t2)).(pr3_ind e (\lambda (t: T).(\lambda (t0: T).(pr3 c (lift h d t) (lift h -d t0)))) (\lambda (t: T).(pr3_refl c (lift h d t))) (\lambda (t0: T).(\lambda -(t3: T).(\lambda (H1: (pr2 e t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 e t0 -t4)).(\lambda (H3: (pr3 c (lift h d t0) (lift h d t4))).(pr3_sing c (lift h d -t0) (lift h d t3) (pr2_lift c e h d H t3 t0 H1) (lift h d t4) H3))))))) t1 t2 -H0)))))))). - -lemma pr3_eta: - \forall (c: C).(\forall (w: T).(\forall (u: T).(let t \def (THead (Bind -Abst) w u) in (\forall (v: T).((pr3 c v w) \to (pr3 c (THead (Bind Abst) v -(THead (Flat Appl) (TLRef O) (lift (S O) O t))) t)))))) -\def - \lambda (c: C).(\lambda (w: T).(\lambda (u: T).(let t \def (THead (Bind -Abst) w u) in (\lambda (v: T).(\lambda (H: (pr3 c v w)).(eq_ind_r T (THead -(Bind Abst) (lift (S O) O w) (lift (S O) (S O) u)) (\lambda (t0: T).(pr3 c -(THead (Bind Abst) v (THead (Flat Appl) (TLRef O) t0)) (THead (Bind Abst) w -u))) (pr3_head_12 c v w H (Bind Abst) (THead (Flat Appl) (TLRef O) (THead -(Bind Abst) (lift (S O) O w) (lift (S O) (S O) u))) u (pr3_pr1 (THead (Flat -Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) (S O) u))) u -(pr1_sing (THead (Bind Abbr) (TLRef O) (lift (S O) (S O) u)) (THead (Flat -Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) (S O) u))) -(pr0_beta (lift (S O) O w) (TLRef O) (TLRef O) (pr0_refl (TLRef O)) (lift (S -O) (S O) u) (lift (S O) (S O) u) (pr0_refl (lift (S O) (S O) u))) u (pr1_sing -(THead (Bind Abbr) (TLRef O) (lift (S O) O u)) (THead (Bind Abbr) (TLRef O) -(lift (S O) (S O) u)) (pr0_delta1 (TLRef O) (TLRef O) (pr0_refl (TLRef O)) -(lift (S O) (S O) u) (lift (S O) (S O) u) (pr0_refl (lift (S O) (S O) u)) -(lift (S O) O u) (subst1_lift_S u O O (le_O_n O))) u (pr1_pr0 (THead (Bind -Abbr) (TLRef O) (lift (S O) O u)) u (pr0_zeta Abbr not_abbr_abst u u -(pr0_refl u) (TLRef O))))) (CHead c (Bind Abst) w))) (lift (S O) O (THead -(Bind Abst) w u)) (lift_bind Abst w u (S O) O))))))). - -lemma pr3_gen_void: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c -(THead (Bind Void) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) t1 t2)))))) (pr3 (CHead c (Bind Void) u1) t1 -(lift (S O) O x))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr3 c (THead (Bind Void) u1 t1) x)).(insert_eq T (THead (Bind Void) u1 -t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t2)))))) (pr3 (CHead c -(Bind Void) u1) t1 (lift (S O) O x)))) (\lambda (y: T).(\lambda (H0: (pr3 c y -x)).(unintro T t1 (\lambda (t: T).((eq T y (THead (Bind Void) u1 t)) \to (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -t t2)))))) (pr3 (CHead c (Bind Void) u1) t (lift (S O) O x))))) (unintro T u1 -(\lambda (t: T).(\forall (x0: T).((eq T y (THead (Bind Void) t x0)) \to (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -x0 t2)))))) (pr3 (CHead c (Bind Void) t) x0 (lift (S O) O x)))))) (pr3_ind c -(\lambda (t: T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: T).((eq T t -(THead (Bind Void) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) x1 t2)))))) (pr3 (CHead c (Bind Void) x0) x1 -(lift (S O) O t0)))))))) (\lambda (t: T).(\lambda (x0: T).(\lambda (x1: -T).(\lambda (H1: (eq T t (THead (Bind Void) x0 x1))).(eq_ind_r T (THead (Bind -Void) x0 x1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) x1 t2)))))) (pr3 (CHead c (Bind Void) x0) x1 -(lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t2)))))) (pr3 (CHead c -(Bind Void) x0) x1 (lift (S O) O (THead (Bind Void) x0 x1))) (ex3_2_intro T T -(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Void) x0 x1) (THead -(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead -c (Bind b) u) x1 t2))))) x0 x1 (refl_equal T (THead (Bind Void) x0 x1)) -(pr3_refl c x0) (\lambda (b: B).(\lambda (u: T).(pr3_refl (CHead c (Bind b) -u) x1))))) t H1))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c -t3 t2)).(\lambda (t4: T).(\lambda (H2: (pr3 c t2 t4)).(\lambda (H3: ((\forall -(x0: T).(\forall (x1: T).((eq T t2 (THead (Bind Void) x0 x1)) \to (or (ex3_2 -T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) -(pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4)))))))).(\lambda (x0: -T).(\lambda (x1: T).(\lambda (H4: (eq T t3 (THead (Bind Void) x0 x1))).(let -H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c t t2)) H1 (THead (Bind Void) x0 -x1) H4) in (let H6 \def (pr2_gen_void c x0 x1 t2 H5) in (or_ind (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind Void) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 t5)))))) -(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 (lift (S O) O -t2)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind -Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4))) (\lambda -(H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind Void) -u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -x1 t5))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead -(Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead -c (Bind b) u) x1 t5))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq -T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))) (\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) -O t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H8: (eq T t2 (THead (Bind -Void) x2 x3))).(\lambda (H9: (pr2 c x0 x2)).(\lambda (H10: ((\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let H11 \def (eq_ind -T t2 (\lambda (t: T).(\forall (x4: T).(\forall (x5: T).((eq T t (THead (Bind -Void) x4 x5)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead (Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) -(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead -c (Bind b) u) x5 t5)))))) (pr3 (CHead c (Bind Void) x4) x5 (lift (S O) O -t4))))))) H3 (THead (Bind Void) x2 x3) H8) in (let H12 \def (H11 x2 x3 -(refl_equal T (THead (Bind Void) x2 x3))) in (or_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5)))))) (pr3 (CHead c -(Bind Void) x2) x3 (lift (S O) O t4)) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) (pr3 (CHead c -(Bind Void) x0) x1 (lift (S O) O t4))) (\lambda (H13: (ex3_2 T T (\lambda -(u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5))))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5))))) -(or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) -u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4))) (\lambda -(x4: T).(\lambda (x5: T).(\lambda (H14: (eq T t4 (THead (Bind Void) x4 -x5))).(\lambda (H15: (pr3 c x2 x4)).(\lambda (H16: ((\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) x3 x5))))).(or_introl (ex3_2 T T (\lambda -(u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) (pr3 (CHead c -(Bind Void) x0) x1 (lift (S O) O t4)) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5))))) x4 x5 H14 -(pr3_sing c x2 x0 H9 x4 H15) (\lambda (b: B).(\lambda (u: T).(pr3_sing (CHead -c (Bind b) u) x3 x1 (H10 b u) x5 (H16 b u))))))))))) H13)) (\lambda (H13: -(pr3 (CHead c (Bind Void) x2) x3 (lift (S O) O t4))).(or_intror (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) -(pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4)) (pr3_sing (CHead c (Bind -Void) x0) x3 x1 (H10 Void x0) (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 (lift -(S O) O t4) (Bind Void) H13 x0 H9)))) H12)))))))) H7)) (\lambda (H7: -((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 (lift (S O) O -t2)))))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead (Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead -c (Bind b) u) x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4)) -(pr3_sing (CHead c (Bind Void) x0) (lift (S O) O t2) x1 (H7 Void x0) (lift (S -O) O t4) (pr3_lift (CHead c (Bind Void) x0) c (S O) O (drop_drop (Bind Void) -O c c (drop_refl c) x0) t2 t4 H2)))) H6)))))))))))) y x H0))))) H))))). - -lemma pr3_gen_abbr: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c -(THead (Bind Abbr) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) -u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr3 c (THead (Bind Abbr) u1 t1) x)).(insert_eq T (THead (Bind Abbr) u1 -t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S -O) O x)))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T t1 (\lambda -(t: T).((eq T y (THead (Bind Abbr) u1 t)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) u1) t t2)))) (pr3 (CHead c (Bind Abbr) u1) t (lift (S O) -O x))))) (unintro T u1 (\lambda (t: T).(\forall (x0: T).((eq T y (THead (Bind -Abbr) t x0)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) t) x0 t2)))) (pr3 -(CHead c (Bind Abbr) t) x0 (lift (S O) O x)))))) (pr3_ind c (\lambda (t: -T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: T).((eq T t (THead (Bind -Abbr) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 -(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) x0) x1 t2)))) (pr3 -(CHead c (Bind Abbr) x0) x1 (lift (S O) O t0)))))))) (\lambda (t: T).(\lambda -(x0: T).(\lambda (x1: T).(\lambda (H1: (eq T t (THead (Bind Abbr) x0 -x1))).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t0: T).(or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abbr) x0) x1 t2)))) (pr3 (CHead c (Bind Abbr) x0) -x1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t2)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O (THead (Bind Abbr) x0 x1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda -(t2: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t2)))) (\lambda -(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t2))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 -x1)) (pr3_refl c x0) (pr3_refl (CHead c (Bind Abbr) x0) x1))) t H1))))) -(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: -T).(\lambda (H2: (pr3 c t2 t4)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: -T).((eq T t2 (THead (Bind Abbr) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O t4)))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t3 -(THead (Bind Abbr) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c -t t2)) H1 (THead (Bind Abbr) x0 x1) H4) in (let H6 \def (pr2_gen_abbr c x0 x1 -t2 H5) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 -(THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 -(CHead c (Bind b) u) x1 t5))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: -T).(pr2 (CHead c (Bind Abbr) u) x1 t5))) (ex3_2 T T (\lambda (y0: T).(\lambda -(_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: -T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) -z t5)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 -(lift (S O) O t2)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T -t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 -t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H7: -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind Abbr) u2 -t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind -b) u) x1 t5))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead -c (Bind Abbr) u) x1 t5))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) z -t5))))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead -(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 -(CHead c (Bind b) u) x1 t5))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: -T).(pr2 (CHead c (Bind Abbr) u) x1 t5))) (ex3_2 T T (\lambda (y0: T).(\lambda -(_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: -T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) -z t5))))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 -(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x2: T).(\lambda -(x3: T).(\lambda (H8: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (H9: (pr2 -c x0 x2)).(\lambda (H10: (or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c -(Bind b) u) x1 x3))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 -(CHead c (Bind Abbr) u) x1 x3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: -T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: -T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) -z x3)))))).(or3_ind (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -x1 x3))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead c -(Bind Abbr) u) x1 x3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 -(CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 -z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) z x3)))) -(or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) -u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c -(Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H11: ((\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let H12 \def (eq_ind -T t2 (\lambda (t: T).(\forall (x4: T).(\forall (x5: T).((eq T t (THead (Bind -Abbr) x4 x5)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x4) x5 t5)))) (pr3 -(CHead c (Bind Abbr) x4) x5 (lift (S O) O t4))))))) H3 (THead (Bind Abbr) x2 -x3) H8) in (let H13 \def (H12 x2 x3 (refl_equal T (THead (Bind Abbr) x2 x3))) -in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind -Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5)))) (pr3 (CHead c -(Bind Abbr) x2) x3 (lift (S O) O t4)) (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O t4))) (\lambda (H14: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T -t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 -u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 -t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5))) (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 -t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c -(Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x4: T).(\lambda (x5: -T).(\lambda (H15: (eq T t4 (THead (Bind Abbr) x4 x5))).(\lambda (H16: (pr3 c -x2 x4)).(\lambda (H17: (pr3 (CHead c (Bind Abbr) x2) x3 x5)).(eq_ind_r T -(THead (Bind Abbr) x4 x5) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O t)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T -(THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O (THead (Bind Abbr) x4 x5))) (ex3_2_intro T T (\lambda (u2: T).(\lambda -(t5: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t5)))) (\lambda -(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5))) x4 x5 (refl_equal T (THead (Bind Abbr) x4 -x5)) (pr3_sing c x2 x0 H9 x4 H16) (pr3_sing (CHead c (Bind Abbr) x0) x3 x1 -(H11 Abbr x0) x5 (pr3_pr2_pr3_t c x2 x3 x5 (Bind Abbr) H17 x0 H9)))) t4 -H15)))))) H14)) (\lambda (H14: (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S O) O -t4))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 -(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4)) (pr3_sing (CHead c (Bind Abbr) -x0) x3 x1 (H11 Abbr x0) (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 (lift (S O) -O t4) (Bind Abbr) H14 x0 H9)))) H13)))) (\lambda (H11: (ex2 T (\lambda (u: -T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) x1 -x3)))).(ex2_ind T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead c -(Bind Abbr) u) x1 x3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T -t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 -t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x4: -T).(\lambda (H12: (pr0 x0 x4)).(\lambda (H13: (pr2 (CHead c (Bind Abbr) x4) -x1 x3)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(\forall (x5: T).(\forall -(x6: T).((eq T t (THead (Bind Abbr) x5 x6)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x5 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x5) x6 t5)))) (pr3 (CHead c (Bind Abbr) x5) x6 (lift (S -O) O t4))))))) H3 (THead (Bind Abbr) x2 x3) H8) in (let H15 \def (H14 x2 x3 -(refl_equal T (THead (Bind Abbr) x2 x3))) in (or_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x2) x3 t5)))) (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S -O) O t4)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 -(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H16: (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x2) x3 t5))) (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) -x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda -(x5: T).(\lambda (x6: T).(\lambda (H17: (eq T t4 (THead (Bind Abbr) x5 -x6))).(\lambda (H18: (pr3 c x2 x5)).(\lambda (H19: (pr3 (CHead c (Bind Abbr) -x2) x3 x6)).(eq_ind_r T (THead (Bind Abbr) x5 x6) (\lambda (t: T).(or (ex3_2 -T T (\lambda (u2: T).(\lambda (t5: T).(eq T t (THead (Bind Abbr) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) -x1 (lift (S O) O t)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t5: -T).(eq T (THead (Bind Abbr) x5 x6) (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O (THead (Bind Abbr) x5 x6))) (ex3_2_intro T T (\lambda (u2: T).(\lambda -(t5: T).(eq T (THead (Bind Abbr) x5 x6) (THead (Bind Abbr) u2 t5)))) (\lambda -(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5))) x5 x6 (refl_equal T (THead (Bind Abbr) x5 -x6)) (pr3_sing c x2 x0 H9 x5 H18) (pr3_t x3 x1 (CHead c (Bind Abbr) x0) -(pr3_pr0_pr2_t x0 x4 H12 c x1 x3 (Bind Abbr) H13) x6 (pr3_pr2_pr3_t c x2 x3 -x6 (Bind Abbr) H19 x0 H9)))) t4 H17)))))) H16)) (\lambda (H16: (pr3 (CHead c -(Bind Abbr) x2) x3 (lift (S O) O t4))).(or_intror (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O t4)) (pr3_t x3 x1 (CHead c (Bind Abbr) x0) (pr3_pr0_pr2_t x0 x4 H12 c x1 -x3 (Bind Abbr) H13) (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 (lift (S O) O -t4) (Bind Abbr) H16 x0 H9)))) H15)))))) H11)) (\lambda (H11: (ex3_2 T T -(\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) -(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: -T).(pr2 (CHead c (Bind Abbr) x0) z x3))))).(ex3_2_ind T T (\lambda (y0: -T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: -T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c -(Bind Abbr) x0) z x3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq -T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 -t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x4: -T).(\lambda (x5: T).(\lambda (H12: (pr2 (CHead c (Bind Abbr) x0) x1 -x4)).(\lambda (H13: (pr0 x4 x5)).(\lambda (H14: (pr2 (CHead c (Bind Abbr) x0) -x5 x3)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(\forall (x6: T).(\forall -(x7: T).((eq T t (THead (Bind Abbr) x6 x7)) \to (or (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x6 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x6) x7 t5)))) (pr3 (CHead c (Bind Abbr) x6) x7 (lift (S -O) O t4))))))) H3 (THead (Bind Abbr) x2 x3) H8) in (let H16 \def (H15 x2 x3 -(refl_equal T (THead (Bind Abbr) x2 x3))) in (or_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x2) x3 t5)))) (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S -O) O t4)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 -(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H17: (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x2) x3 t5))) (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) -x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda -(x6: T).(\lambda (x7: T).(\lambda (H18: (eq T t4 (THead (Bind Abbr) x6 -x7))).(\lambda (H19: (pr3 c x2 x6)).(\lambda (H20: (pr3 (CHead c (Bind Abbr) -x2) x3 x7)).(eq_ind_r T (THead (Bind Abbr) x6 x7) (\lambda (t: T).(or (ex3_2 -T T (\lambda (u2: T).(\lambda (t5: T).(eq T t (THead (Bind Abbr) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) -x1 (lift (S O) O t)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t5: -T).(eq T (THead (Bind Abbr) x6 x7) (THead (Bind Abbr) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S -O) O (THead (Bind Abbr) x6 x7))) (ex3_2_intro T T (\lambda (u2: T).(\lambda -(t5: T).(eq T (THead (Bind Abbr) x6 x7) (THead (Bind Abbr) u2 t5)))) (\lambda -(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 -(CHead c (Bind Abbr) x0) x1 t5))) x6 x7 (refl_equal T (THead (Bind Abbr) x6 -x7)) (pr3_sing c x2 x0 H9 x6 H19) (pr3_sing (CHead c (Bind Abbr) x0) x4 x1 -H12 x7 (pr3_sing (CHead c (Bind Abbr) x0) x5 x4 (pr2_free (CHead c (Bind -Abbr) x0) x4 x5 H13) x7 (pr3_sing (CHead c (Bind Abbr) x0) x3 x5 H14 x7 -(pr3_pr2_pr3_t c x2 x3 x7 (Bind Abbr) H20 x0 H9)))))) t4 H18)))))) H17)) -(\lambda (H17: (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S O) O -t4))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 -(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4)) (pr3_sing (CHead c (Bind Abbr) -x0) x4 x1 H12 (lift (S O) O t4) (pr3_sing (CHead c (Bind Abbr) x0) x5 x4 -(pr2_free (CHead c (Bind Abbr) x0) x4 x5 H13) (lift (S O) O t4) (pr3_sing -(CHead c (Bind Abbr) x0) x3 x5 H14 (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 -(lift (S O) O t4) (Bind Abbr) H17 x0 H9)))))) H16)))))))) H11)) H10)))))) -H7)) (\lambda (H7: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -x1 (lift (S O) O t2)))))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda -(t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) -x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4)) (pr3_sing -(CHead c (Bind Abbr) x0) (lift (S O) O t2) x1 (H7 Abbr x0) (lift (S O) O t4) -(pr3_lift (CHead c (Bind Abbr) x0) c (S O) O (drop_drop (Bind Abbr) O c c -(drop_refl c) x0) t2 t4 H2)))) H6)))))))))))) y x H0))))) H))))). - -lemma pr3_gen_appl: - \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c -(THead (Flat Appl) u1 t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 t2)))) (ex4_4 T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 -c (THead (Bind Abbr) u2 t2) x))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (_: T).(pr3 c u1 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c t1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) x))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda -(H: (pr3 c (THead (Flat Appl) u1 t1) x)).(insert_eq T (THead (Flat Appl) u1 -t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or3 (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 -t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) x))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c t1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -x))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2)))))))))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T t1 -(\lambda (t: T).((eq T y (THead (Flat Appl) u1 t)) \to (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c t t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) x))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 -u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c t (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2)) x))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))) (unintro T u1 (\lambda -(t: T).(\forall (x0: T).((eq T y (THead (Flat Appl) t x0)) \to (or3 (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: -T).(pr3 c x0 t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) x))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x0 (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -x))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2)))))))))))) (pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall -(x0: T).(\forall (x1: T).((eq T t (THead (Flat Appl) x0 x1)) \to (or3 (ex3_2 -T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 c x1 t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) t0))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t0))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))))))) -(\lambda (t: T).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: (eq T t -(THead (Flat Appl) x0 x1))).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda -(t0: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead -(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c x1 t2)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind -Abbr) u2 t2) t0))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t0))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))) -(or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat -Appl) x0 x1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c x1 t2)))) (ex4_4 T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 -c (THead (Bind Abbr) u2 t2) (THead (Flat Appl) x0 x1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -(THead (Flat Appl) x0 x1)))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 -(CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t2: T).(eq T (THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 c x1 t2))) x0 x1 (refl_equal T (THead (Flat Appl) x0 -x1)) (pr3_refl c x0) (pr3_refl c x1))) t H1))))) (\lambda (t2: T).(\lambda -(t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (H2: (pr3 c t2 -t4)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: T).((eq T t2 (THead (Flat -Appl) x0 x1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 -z2)))))))))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t3 -(THead (Flat Appl) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c -t t2)) H1 (THead (Flat Appl) x0 x1) H4) in (let H6 \def (pr2_gen_appl c x0 x1 -t2 H5) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 -(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr2 c x1 t5)))) (ex4_4 T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x1 (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t5: T).(eq T t2 (THead (Bind Abbr) u2 t5)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq -T x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead -(Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (or3 (ex3_2 -T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Flat Appl) -u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr2 c x1 t5))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t2 (THead (Flat Appl) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr2 c x1 -t5))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat -Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) -t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 -c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(x2: T).(\lambda (x3: T).(\lambda (H8: (eq T t2 (THead (Flat Appl) x2 -x3))).(\lambda (H9: (pr2 c x0 x2)).(\lambda (H10: (pr2 c x1 x3)).(let H11 -\def (eq_ind T t2 (\lambda (t: T).(\forall (x4: T).(\forall (x5: T).((eq T t -(THead (Flat Appl) x4 x5)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: -T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x4 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x5 t5)))) (ex4_4 T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 -c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (_: T).(pr3 c x4 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x5 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x5 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x4 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) H3 -(THead (Flat Appl) x2 x3) H8) in (let H12 \def (eq_ind T t2 (\lambda (t: -T).(pr3 c t t4)) H2 (THead (Flat Appl) x2 x3) H8) in (let H13 \def (H11 x2 x3 -(refl_equal T (THead (Flat Appl) x2 x3))) in (or3_ind (ex3_2 T T (\lambda -(u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x3 -t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -t4))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2)))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(H14: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat -Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x3 t5))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x3 -t5))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat -Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) -t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 -c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(x4: T).(\lambda (x5: T).(\lambda (H15: (eq T t4 (THead (Flat Appl) x4 -x5))).(\lambda (H16: (pr3 c x2 x4)).(\lambda (H17: (pr3 c x3 x5)).(eq_ind_r T -(THead (Flat Appl) x4 x5) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t (THead (Flat Appl) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 -t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))) -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -t))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: -T).(eq T (THead (Flat Appl) x4 x5) (THead (Flat Appl) u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 -t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) (THead (Flat Appl) x4 -x5)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) (THead (Flat Appl) x4 x5)))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) -(ex3_2_intro T T (\lambda (u2: T).(\lambda (t5: T).(eq T (THead (Flat Appl) -x4 x5) (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c -x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5))) x4 x5 (refl_equal T -(THead (Flat Appl) x4 x5)) (pr3_sing c x2 x0 H9 x4 H16) (pr3_sing c x3 x1 H10 -x5 H17))) t4 H15)))))) H14)) (\lambda (H14: (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5))))))))).(ex4_4_ind T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 -c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (_: T).(pr3 c x2 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5))))))) (or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H15: -(pr3 c (THead (Bind Abbr) x6 x7) t4)).(\lambda (H16: (pr3 c x2 x6)).(\lambda -(H17: (pr3 c x3 (THead (Bind Abst) x4 x5))).(\lambda (H18: ((\forall (b: -B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x5 x7))))).(or3_intro1 (ex3_2 T -T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro -T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: -T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 -t5))))))) x4 x5 x6 x7 H15 (pr3_sing c x2 x0 H9 x6 H16) (pr3_sing c x3 x1 H10 -(THead (Bind Abst) x4 x5) H17) H18)))))))))) H14)) (\lambda (H14: (ex6_6 B T -T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c x3 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x2 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 -(CHead c (Bind b) y2) z1 z2))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda -(t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 -c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(x4: B).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (x8: -T).(\lambda (x9: T).(\lambda (H15: (not (eq B x4 Abst))).(\lambda (H16: (pr3 -c x3 (THead (Bind x4) x5 x6))).(\lambda (H17: (pr3 c (THead (Bind x4) x9 -(THead (Flat Appl) (lift (S O) O x8) x7)) t4)).(\lambda (H18: (pr3 c x2 -x8)).(\lambda (H19: (pr3 c x5 x9)).(\lambda (H20: (pr3 (CHead c (Bind x4) x9) -x6 x7)).(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro -B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(pr3 c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c -(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))) -x4 x5 x6 x7 x8 x9 H15 (pr3_sing c x3 x1 H10 (THead (Bind x4) x5 x6) H16) H17 -(pr3_sing c x2 x0 H9 x8 H18) H19 H20)))))))))))))) H14)) H13))))))))) H7)) -(\lambda (H7: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind -Abbr) u2 t5)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -z1 t5))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(eq T x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind -Abbr) u2 t5)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -z1 t5))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H8: (eq -T x1 (THead (Bind Abst) x2 x3))).(\lambda (H9: (eq T t2 (THead (Bind Abbr) x4 -x5))).(\lambda (H10: (pr2 c x0 x4)).(\lambda (H11: ((\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x3 x5))))).(eq_ind_r T (THead (Bind Abst) x2 -x3) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T -t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c t t5)))) (ex4_4 T T T T -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c -(THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c t (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))) (let H12 -\def (eq_ind T t2 (\lambda (t: T).(\forall (x6: T).(\forall (x7: T).((eq T t -(THead (Flat Appl) x6 x7)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: -T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x6 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x7 t5)))) (ex4_4 T -T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 -c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (_: T).(pr3 c x6 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x7 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x7 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x6 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) H3 -(THead (Bind Abbr) x4 x5) H9) in (let H13 \def (eq_ind T t2 (\lambda (t: -T).(pr3 c t t4)) H2 (THead (Bind Abbr) x4 x5) H9) in (or3_intro1 (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 c (THead (Bind Abst) x2 x3) t5)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) x2 x3) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) x2 x3) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat -Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c -(THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) x2 x3) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t5))))))) x2 x3 x4 x5 H13 (pr3_pr2 c x0 x4 H10) (pr3_refl c (THead (Bind -Abst) x2 x3)) (\lambda (b: B).(\lambda (u: T).(pr3_pr2 (CHead c (Bind b) u) -x3 x5 (H11 b u)))))))) x1 H8))))))))) H7)) (\lambda (H7: (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x1 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) -(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) -u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: -T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) -t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 -c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) -y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda -(x2: B).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: -T).(\lambda (x7: T).(\lambda (H8: (not (eq B x2 Abst))).(\lambda (H9: (eq T -x1 (THead (Bind x2) x3 x4))).(\lambda (H10: (eq T t2 (THead (Bind x2) x7 -(THead (Flat Appl) (lift (S O) O x6) x5)))).(\lambda (H11: (pr2 c x0 -x6)).(\lambda (H12: (pr2 c x3 x7)).(\lambda (H13: (pr2 (CHead c (Bind x2) x7) -x4 x5)).(eq_ind_r T (THead (Bind x2) x3 x4) (\lambda (t: T).(or3 (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 c t t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(pr3 c t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 -(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c t (THead (Bind -b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead -(Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))) (let H14 \def (eq_ind T t2 -(\lambda (t: T).(\forall (x8: T).(\forall (x9: T).((eq T t (THead (Flat Appl) -x8 x9)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead -(Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x8 u2))) -(\lambda (_: T).(\lambda (t5: T).(pr3 c x9 t5)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x8 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c x9 (THead (Bind Abst) y1 z1)))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall -(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 -c x9 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr3 c x8 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) H3 -(THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) H10) in (let -H15 \def (eq_ind T t2 (\lambda (t: T).(pr3 c t t4)) H2 (THead (Bind x2) x7 -(THead (Flat Appl) (lift (S O) O x6) x5)) H10) in (or3_intro2 (ex3_2 T T -(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda -(t5: T).(pr3 c (THead (Bind x2) x3 x4) t5)))) (ex4_4 T T T T (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind -Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind x2) x3 x4) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) -z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) -(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(pr3 c (THead (Bind x2) x3 x4) (THead (Bind b) y1 -z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: -T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat -Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 -u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c -(THead (Bind x2) x3 x4) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) -t4))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) -y2) z1 z2))))))) x2 x3 x4 x5 x6 x7 H8 (pr3_refl c (THead (Bind x2) x3 x4)) -H15 (pr3_pr2 c x0 x6 H11) (pr3_pr2 c x3 x7 H12) (pr3_pr2 (CHead c (Bind x2) -x7) x4 x5 H13))))) x1 H9))))))))))))) H7)) H6)))))))))))) y x H0))))) H))))). - -lemma pr3_gen_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u1: -T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind b) u1 t1) x) \to (or -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind b) u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 (CHead c (Bind b) u1) t1 t2)))) (pr3 (CHead c (Bind -b) u1) t1 (lift (S O) O x))))))))) -\def - \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall -(c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind -b0) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind b0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b0) u1) t1 t2)))) (pr3 -(CHead c (Bind b0) u1) t1 (lift (S O) O x)))))))))) (\lambda (_: (not (eq B -Abbr Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: -T).(\lambda (H0: (pr3 c (THead (Bind Abbr) u1 t1) x)).(let H1 \def -(pr3_gen_abbr c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) -u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (or (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) -t1 (lift (S O) O x))) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 -t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind -Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) (or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) -t1 (lift (S O) O x))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T x -(THead (Bind Abbr) x0 x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: (pr3 -(CHead c (Bind Abbr) u1) t1 x1)).(or_introl (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S -O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) x0 x1 -H3 H4 H5))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S -O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 -(CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) H2)) H1)))))))) (\lambda (H: -(not (eq B Abst Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: -T).(\lambda (x: T).(\lambda (_: (pr3 c (THead (Bind Abst) u1 t1) x)).(let H1 -\def (match (H (refl_equal B Abst)) in False with []) in H1))))))) (\lambda -(_: (not (eq B Void Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: -T).(\lambda (x: T).(\lambda (H0: (pr3 c (THead (Bind Void) u1 t1) x)).(let H1 -\def (pr3_gen_void c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall -(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t2)))))) (pr3 (CHead c -(Bind Void) u1) t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) -u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda -(H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) -u) t1 t2))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead -c (Bind b0) u) t1 t2))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 -t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H3: (eq T x (THead (Bind Void) x0 -x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: ((\forall (b0: B).(\forall -(u: T).(pr3 (CHead c (Bind b0) u) t1 x1))))).(or_introl (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Void) u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S -O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead -(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 t2))) x0 x1 -H3 H4 (H5 Void u1)))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Void) u1) t1 -(lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 -c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 -t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) H2)) H1)))))))) b). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/subst1.ma deleted file mode 100644 index 3c2e56c05..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/subst1.ma +++ /dev/null @@ -1,89 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/fwd.ma". - -include "basic_1/pr2/subst1.ma". - -lemma pr3_subst1: - \forall (c: C).(\forall (e: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead e (Bind Abbr) v)) \to (\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) -\to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr3 c -w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))))) -\def - \lambda (c: C).(\lambda (e: C).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead e (Bind Abbr) v))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H0: (pr3 c t1 t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: -T).(\forall (w1: T).((subst1 i v t w1) \to (ex2 T (\lambda (w2: T).(pr3 c w1 -w2)) (\lambda (w2: T).(subst1 i v t0 w2))))))) (\lambda (t: T).(\lambda (w1: -T).(\lambda (H1: (subst1 i v t w1)).(ex_intro2 T (\lambda (w2: T).(pr3 c w1 -w2)) (\lambda (w2: T).(subst1 i v t w2)) w1 (pr3_refl c w1) H1)))) (\lambda -(t3: T).(\lambda (t4: T).(\lambda (H1: (pr2 c t4 t3)).(\lambda (t5: -T).(\lambda (_: (pr3 c t3 t5)).(\lambda (H3: ((\forall (w1: T).((subst1 i v -t3 w1) \to (ex2 T (\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 i -v t5 w2))))))).(\lambda (w1: T).(\lambda (H4: (subst1 i v t4 w1)).(ex2_ind T -(\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t3 w2)) (ex2 T -(\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 i v t5 w2))) -(\lambda (x: T).(\lambda (H5: (pr2 c w1 x)).(\lambda (H6: (subst1 i v t3 -x)).(ex2_ind T (\lambda (w2: T).(pr3 c x w2)) (\lambda (w2: T).(subst1 i v t5 -w2)) (ex2 T (\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 i v t5 -w2))) (\lambda (x0: T).(\lambda (H7: (pr3 c x x0)).(\lambda (H8: (subst1 i v -t5 x0)).(ex_intro2 T (\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 -i v t5 w2)) x0 (pr3_sing c x w1 H5 x0 H7) H8)))) (H3 x H6))))) (pr2_subst1 c -e v i H t4 t3 H1 w1 H4)))))))))) t1 t2 H0)))))))). - -lemma pr3_gen_cabbr: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall -(e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) -\to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d -a0 a) \to (\forall (x1: T).((subst1 d u t1 (lift (S O) d x1)) \to (ex2 T -(\lambda (x2: T).(subst1 d u t2 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a -x1 x2)))))))))))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: -T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) \to (\forall (a0: -C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (\forall -(x1: T).((subst1 d u t (lift (S O) d x1)) \to (ex2 T (\lambda (x2: T).(subst1 -d u t0 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x1 x2))))))))))))))) -(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda -(_: (getl d c (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (_: -(csubst1 d u c a0)).(\lambda (a: C).(\lambda (_: (drop (S O) d a0 -a)).(\lambda (x1: T).(\lambda (H3: (subst1 d u t (lift (S O) d -x1))).(ex_intro2 T (\lambda (x2: T).(subst1 d u t (lift (S O) d x2))) -(\lambda (x2: T).(pr3 a x1 x2)) x1 H3 (pr3_refl a x1))))))))))))) (\lambda -(t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c t3 t0)).(\lambda (t4: -T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: ((\forall (e: C).(\forall (u: -T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) \to (\forall (a0: -C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (\forall -(x1: T).((subst1 d u t0 (lift (S O) d x1)) \to (ex2 T (\lambda (x2: -T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x1 -x2))))))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda -(H3: (getl d c (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (H4: -(csubst1 d u c a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d a0 -a)).(\lambda (x1: T).(\lambda (H6: (subst1 d u t3 (lift (S O) d -x1))).(ex2_ind T (\lambda (x2: T).(subst1 d u t0 (lift (S O) d x2))) (\lambda -(x2: T).(pr2 a x1 x2)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d -x2))) (\lambda (x2: T).(pr3 a x1 x2))) (\lambda (x: T).(\lambda (H7: (subst1 -d u t0 (lift (S O) d x))).(\lambda (H8: (pr2 a x1 x)).(ex2_ind T (\lambda -(x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x x2)) -(ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: -T).(pr3 a x1 x2))) (\lambda (x0: T).(\lambda (H9: (subst1 d u t4 (lift (S O) -d x0))).(\lambda (H10: (pr3 a x x0)).(ex_intro2 T (\lambda (x2: T).(subst1 d -u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x1 x2)) x0 H9 (pr3_sing a x -x1 H8 x0 H10))))) (H2 e u d H3 a0 H4 a H5 x H7))))) (pr2_gen_cabbr c t3 t0 H0 -e u d H3 a0 H4 a H5 x1 H6)))))))))))))))))) t1 t2 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/pr3/wcpr0.ma b/matita/matita/contribs/lambdadelta/basic_1/pr3/wcpr0.ma deleted file mode 100644 index fa49b9855..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/pr3/wcpr0.ma +++ /dev/null @@ -1,63 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/props.ma". - -include "basic_1/wcpr0/getl.ma". - -lemma pr3_wcpr0_t: - \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (t1: -T).(\forall (t2: T).((pr3 c1 t1 t2) \to (pr3 c2 t1 t2)))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (t1: T).(\forall (t2: T).((pr3 c0 -t1 t2) \to (pr3 c t1 t2)))))) (\lambda (c: C).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H0: (pr3 c t1 t2)).H0)))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (_: ((\forall (t1: T).(\forall (t2: -T).((pr3 c3 t1 t2) \to (pr3 c0 t1 t2)))))).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H3: (pr3 (CHead c3 k u2) t1 t2)).(pr3_ind (CHead c3 k u1) -(\lambda (t: T).(\lambda (t0: T).(pr3 (CHead c0 k u1) t t0))) (\lambda (t: -T).(pr3_refl (CHead c0 k u1) t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda -(H4: (pr2 (CHead c3 k u1) t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 (CHead -c3 k u1) t0 t4)).(\lambda (H6: (pr3 (CHead c0 k u1) t0 t4)).(pr3_t t0 t3 -(CHead c0 k u1) (insert_eq C (CHead c3 k u1) (\lambda (c: C).(pr2 c t3 t0)) -(\lambda (_: C).(pr3 (CHead c0 k u1) t3 t0)) (\lambda (y: C).(\lambda (H7: -(pr2 y t3 t0)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t5: T).((eq -C c (CHead c3 k u1)) \to (pr3 (CHead c0 k u1) t t5))))) (\lambda (c: -C).(\lambda (t5: T).(\lambda (t6: T).(\lambda (H8: (pr0 t5 t6)).(\lambda (_: -(eq C c (CHead c3 k u1))).(pr3_pr2 (CHead c0 k u1) t5 t6 (pr2_free (CHead c0 -k u1) t5 t6 H8))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H8: (getl i c (CHead d (Bind Abbr) -u))).(\lambda (t5: T).(\lambda (t6: T).(\lambda (H9: (pr0 t5 t6)).(\lambda -(t: T).(\lambda (H10: (subst0 i u t6 t)).(\lambda (H11: (eq C c (CHead c3 k -u1))).(let H12 \def (eq_ind C c (\lambda (c4: C).(getl i c4 (CHead d (Bind -Abbr) u))) H8 (CHead c3 k u1) H11) in (ex3_2_ind C T (\lambda (e2: -C).(\lambda (u3: T).(getl i (CHead c0 k u1) (CHead e2 (Bind Abbr) u3)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 d))) (\lambda (_: C).(\lambda (u3: -T).(pr0 u3 u))) (pr3 (CHead c0 k u1) t5 t) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H13: (getl i (CHead c0 k u1) (CHead x0 (Bind Abbr) -x1))).(\lambda (_: (wcpr0 x0 d)).(\lambda (H15: (pr0 x1 u)).(ex2_ind T -(\lambda (t7: T).(subst0 i x1 t6 t7)) (\lambda (t7: T).(pr0 t7 t)) (pr3 -(CHead c0 k u1) t5 t) (\lambda (x: T).(\lambda (H16: (subst0 i x1 t6 -x)).(\lambda (H17: (pr0 x t)).(pr3_sing (CHead c0 k u1) x t5 (pr2_delta -(CHead c0 k u1) x0 x1 i H13 t5 t6 H9 x H16) t (pr3_pr2 (CHead c0 k u1) x t -(pr2_free (CHead c0 k u1) x t H17)))))) (pr0_subst0_back u t6 t i H10 x1 -H15))))))) (wcpr0_getl_back (CHead c3 k u1) (CHead c0 k u1) (wcpr0_comp c0 c3 -H0 u1 u1 (pr0_refl u1) k) i d u (Bind Abbr) H12)))))))))))))) y t3 t0 H7))) -H4) t4 H6))))))) t1 t2 (pr3_pr2_pr3_t c3 u2 t1 t2 k H3 u1 (pr2_free c3 u1 u2 -H2)))))))))))))) c2 c1 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/preamble.ma b/matita/matita/contribs/lambdadelta/basic_1/preamble.ma deleted file mode 100644 index 2354bcc2b..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/preamble.ma +++ /dev/null @@ -1,15 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "ground_1/theory.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_1/r/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/r/defs.ma deleted file mode 100644 index 6108d3c05..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/r/defs.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -definition r: - K \to (nat \to nat) -\def - \lambda (k: K).(\lambda (i: nat).(match k with [(Bind _) \Rightarrow i | -(Flat _) \Rightarrow (S i)])). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/r/props.ma b/matita/matita/contribs/lambdadelta/basic_1/r/props.ma deleted file mode 100644 index 6dc07a0e1..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/r/props.ma +++ /dev/null @@ -1,153 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/r/defs.ma". - -include "basic_1/s/defs.ma". - -lemma r_S: - \forall (k: K).(\forall (i: nat).(eq nat (r k (S i)) (S (r k i)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (r k0 (S -i)) (S (r k0 i))))) (\lambda (b: B).(\lambda (i: nat).(refl_equal nat (S (r -(Bind b) i))))) (\lambda (f: F).(\lambda (i: nat).(refl_equal nat (S (r (Flat -f) i))))) k). - -lemma r_plus: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k (plus i j)) -(plus (r k i) j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).(eq nat (r k0 (plus i j)) (plus (r k0 i) j))))) (\lambda (b: B).(\lambda -(i: nat).(\lambda (j: nat).(refl_equal nat (plus (r (Bind b) i) j))))) -(\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (r -(Flat f) i) j))))) k). - -lemma r_plus_sym: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k (plus i j)) -(plus i (r k j))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).(eq nat (r k0 (plus i j)) (plus i (r k0 j)))))) (\lambda (_: B).(\lambda -(i: nat).(\lambda (j: nat).(refl_equal nat (plus i j))))) (\lambda (_: -F).(\lambda (i: nat).(\lambda (j: nat).(plus_n_Sm i j)))) k). - -lemma r_minus: - \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (k: K).(eq nat -(minus (r k i) (S n)) (r k (minus i (S n))))))) -\def - \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (k: -K).(K_ind (\lambda (k0: K).(eq nat (minus (r k0 i) (S n)) (r k0 (minus i (S -n))))) (\lambda (_: B).(refl_equal nat (minus i (S n)))) (\lambda (_: -F).(minus_x_Sy i n H)) k)))). - -lemma r_dis: - \forall (k: K).(\forall (P: Prop).(((((\forall (i: nat).(eq nat (r k i) i))) -\to P)) \to (((((\forall (i: nat).(eq nat (r k i) (S i)))) \to P)) \to P))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (P: Prop).(((((\forall (i: -nat).(eq nat (r k0 i) i))) \to P)) \to (((((\forall (i: nat).(eq nat (r k0 i) -(S i)))) \to P)) \to P)))) (\lambda (b: B).(\lambda (P: Prop).(\lambda (H: -((((\forall (i: nat).(eq nat (r (Bind b) i) i))) \to P))).(\lambda (_: -((((\forall (i: nat).(eq nat (r (Bind b) i) (S i)))) \to P))).(H (\lambda (i: -nat).(refl_equal nat i))))))) (\lambda (f: F).(\lambda (P: Prop).(\lambda (_: -((((\forall (i: nat).(eq nat (r (Flat f) i) i))) \to P))).(\lambda (H0: -((((\forall (i: nat).(eq nat (r (Flat f) i) (S i)))) \to P))).(H0 (\lambda -(i: nat).(refl_equal nat (S i)))))))) k). - -lemma s_r: - \forall (k: K).(\forall (i: nat).(eq nat (s k (r k i)) (S i))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (r k0 -i)) (S i)))) (\lambda (_: B).(\lambda (i: nat).(refl_equal nat (S i)))) -(\lambda (_: F).(\lambda (i: nat).(refl_equal nat (S i)))) k). - -lemma r_arith0: - \forall (k: K).(\forall (i: nat).(eq nat (minus (r k (S i)) (S O)) (r k i))) -\def - \lambda (k: K).(\lambda (i: nat).(eq_ind_r nat (S (r k i)) (\lambda (n: -nat).(eq nat (minus n (S O)) (r k i))) (eq_ind_r nat (r k i) (\lambda (n: -nat).(eq nat n (r k i))) (refl_equal nat (r k i)) (minus (S (r k i)) (S O)) -(minus_Sx_SO (r k i))) (r k (S i)) (r_S k i))). - -lemma r_arith1: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (r k (S -i)) (S j)) (minus (r k i) j)))) -\def - \lambda (k: K).(\lambda (i: nat).(\lambda (j: nat).(eq_ind_r nat (S (r k i)) -(\lambda (n: nat).(eq nat (minus n (S j)) (minus (r k i) j))) (refl_equal nat -(minus (r k i) j)) (r k (S i)) (r_S k i)))). - -lemma r_arith2: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le (S i) (s k j)) \to -(le (r k i) j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((le (S i) (s k0 j)) \to (le (r k0 i) j))))) (\lambda (_: B).(\lambda -(i: nat).(\lambda (j: nat).(\lambda (H: (le (S i) (S j))).(let H_y \def -(le_S_n i j H) in H_y))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: -nat).(\lambda (H: (le (S i) j)).H)))) k). - -lemma r_arith3: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le (s k j) (S i)) \to -(le j (r k i))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((le (s k0 j) (S i)) \to (le j (r k0 i)))))) (\lambda (_: B).(\lambda -(i: nat).(\lambda (j: nat).(\lambda (H: (le (S j) (S i))).(let H_y \def -(le_S_n j i H) in H_y))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: -nat).(\lambda (H: (le j (S i))).H)))) k). - -lemma r_arith4: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (S i) (s k -j)) (minus (r k i) j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).(eq nat (minus (S i) (s k0 j)) (minus (r k0 i) j))))) (\lambda (b: -B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus (r (Bind b) i) -j))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat -(minus (r (Flat f) i) j))))) k). - -lemma r_arith5: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((lt (s k j) (S i)) \to -(lt j (r k i))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((lt (s k0 j) (S i)) \to (lt j (r k0 i)))))) (\lambda (_: B).(\lambda -(i: nat).(\lambda (j: nat).(\lambda (H: (lt (S j) (S i))).(lt_S_n j i H))))) -(\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (lt j (S -i))).H)))) k). - -lemma r_arith6: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (r k i) (S -j)) (minus i (s k j))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).(eq nat (minus (r k0 i) (S j)) (minus i (s k0 j)))))) (\lambda (b: -B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i (s (Bind b) -j)))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat -(minus i (s (Flat f) j)))))) k). - -lemma r_arith7: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((eq nat (S i) (s k j)) -\to (eq nat (r k i) j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((eq nat (S i) (s k0 j)) \to (eq nat (r k0 i) j))))) (\lambda (_: -B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (eq nat (S i) (S -j))).(eq_add_S i j H))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: -nat).(\lambda (H: (eq nat (S i) j)).H)))) k). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/s/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/s/defs.ma deleted file mode 100644 index 9a2f29db9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/s/defs.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -definition s: - K \to (nat \to nat) -\def - \lambda (k: K).(\lambda (i: nat).(match k with [(Bind _) \Rightarrow (S i) | -(Flat _) \Rightarrow i])). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/s/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/s/fwd.ma deleted file mode 100644 index deac2dbd3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/s/fwd.ma +++ /dev/null @@ -1,48 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/s/defs.ma". - -lemma s_inj: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((eq nat (s k i) (s k j)) -\to (eq nat i j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((eq nat (s k0 i) (s k0 j)) \to (eq nat i j))))) (\lambda (b: -B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (eq nat (s (Bind b) i) (s -(Bind b) j))).(eq_add_S i j H))))) (\lambda (f: F).(\lambda (i: nat).(\lambda -(j: nat).(\lambda (H: (eq nat (s (Flat f) i) (s (Flat f) j))).H)))) k). - -lemma s_le_gen: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le (s k i) (s k j)) \to -(le i j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((le (s k0 i) (s k0 j)) \to (le i j))))) (\lambda (b: B).(\lambda (i: -nat).(\lambda (j: nat).(\lambda (H: (le (s (Bind b) i) (s (Bind b) -j))).(le_S_n i j H))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: -nat).(\lambda (H: (le (s (Flat f) i) (s (Flat f) j))).H)))) k). - -lemma s_lt_gen: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((lt (s k i) (s k j)) \to -(lt i j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((lt (s k0 i) (s k0 j)) \to (lt i j))))) (\lambda (b: B).(\lambda (i: -nat).(\lambda (j: nat).(\lambda (H: (lt (s (Bind b) i) (s (Bind b) -j))).(le_S_n (S i) j H))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: -nat).(\lambda (H: (lt (s (Flat f) i) (s (Flat f) j))).H)))) k). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/s/props.ma b/matita/matita/contribs/lambdadelta/basic_1/s/props.ma deleted file mode 100644 index 75318f07a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/s/props.ma +++ /dev/null @@ -1,109 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/s/defs.ma". - -lemma s_S: - \forall (k: K).(\forall (i: nat).(eq nat (s k (S i)) (S (s k i)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (S -i)) (S (s k0 i))))) (\lambda (b: B).(\lambda (i: nat).(refl_equal nat (S (s -(Bind b) i))))) (\lambda (f: F).(\lambda (i: nat).(refl_equal nat (S (s (Flat -f) i))))) k). - -lemma s_plus: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k (plus i j)) -(plus (s k i) j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).(eq nat (s k0 (plus i j)) (plus (s k0 i) j))))) (\lambda (b: B).(\lambda -(i: nat).(\lambda (j: nat).(refl_equal nat (plus (s (Bind b) i) j))))) -(\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (s -(Flat f) i) j))))) k). - -lemma s_plus_sym: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k (plus i j)) -(plus i (s k j))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).(eq nat (s k0 (plus i j)) (plus i (s k0 j)))))) (\lambda (_: B).(\lambda -(i: nat).(\lambda (j: nat).(eq_ind_r nat (plus i (S j)) (\lambda (n: nat).(eq -nat n (plus i (S j)))) (refl_equal nat (plus i (S j))) (S (plus i j)) -(plus_n_Sm i j))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: -nat).(refl_equal nat (plus i (s (Flat f) j)))))) k). - -lemma s_minus: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le j i) \to (eq nat (s -k (minus i j)) (minus (s k i) j))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((le j i) \to (eq nat (s k0 (minus i j)) (minus (s k0 i) j)))))) -(\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (le j -i)).(eq_ind_r nat (minus (S i) j) (\lambda (n: nat).(eq nat n (minus (S i) -j))) (refl_equal nat (minus (S i) j)) (S (minus i j)) (minus_Sn_m i j H)))))) -(\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (_: (le j -i)).(refl_equal nat (minus (s (Flat f) i) j)))))) k). - -lemma minus_s_s: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (s k i) (s -k j)) (minus i j)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).(eq nat (minus (s k0 i) (s k0 j)) (minus i j))))) (\lambda (_: -B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i j))))) -(\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i -j))))) k). - -lemma s_le: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le i j) \to (le (s k i) -(s k j))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((le i j) \to (le (s k0 i) (s k0 j)))))) (\lambda (_: B).(\lambda (i: -nat).(\lambda (j: nat).(\lambda (H: (le i j)).(le_n_S i j H))))) (\lambda (_: -F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (le i j)).H)))) k). - -lemma s_lt: - \forall (k: K).(\forall (i: nat).(\forall (j: nat).((lt i j) \to (lt (s k i) -(s k j))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: -nat).((lt i j) \to (lt (s k0 i) (s k0 j)))))) (\lambda (_: B).(\lambda (i: -nat).(\lambda (j: nat).(\lambda (H: (lt i j)).(lt_n_S i j H))))) (\lambda (_: -F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (lt i j)).H)))) k). - -lemma s_inc: - \forall (k: K).(\forall (i: nat).(le i (s k i))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(le i (s k0 i)))) -(\lambda (b: B).(\lambda (i: nat).(le_S_n i (s (Bind b) i) (le_S_n (S i) (S -(s (Bind b) i)) (le_S_n (S (S i)) (S (S (s (Bind b) i))) (le_S (S (S (S i))) -(S (S (s (Bind b) i))) (le_n (S (S (s (Bind b) i)))))))))) (\lambda (f: -F).(\lambda (i: nat).(le_n (s (Flat f) i)))) k). - -lemma s_arith0: - \forall (k: K).(\forall (i: nat).(eq nat (minus (s k i) (s k O)) i)) -\def - \lambda (k: K).(\lambda (i: nat).(eq_ind_r nat (minus i O) (\lambda (n: -nat).(eq nat n i)) (eq_ind nat i (\lambda (n: nat).(eq nat n i)) (refl_equal -nat i) (minus i O) (minus_n_O i)) (minus (s k i) (s k O)) (minus_s_s k i O))). - -lemma s_arith1: - \forall (b: B).(\forall (i: nat).(eq nat (minus (s (Bind b) i) (S O)) i)) -\def - \lambda (_: B).(\lambda (i: nat).(eq_ind nat i (\lambda (n: nat).(eq nat n -i)) (refl_equal nat i) (minus i O) (minus_n_O i))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sc3/arity.ma b/matita/matita/contribs/lambdadelta/basic_1/sc3/arity.ma deleted file mode 100644 index 373c81691..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sc3/arity.ma +++ /dev/null @@ -1,313 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubc/arity.ma". - -include "basic_1/csubc/getl.ma". - -include "basic_1/csubc/drop1.ma". - -include "basic_1/csubc/props.ma". - -lemma sc3_arity_csubc: - \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 -t a) \to (\forall (d1: C).(\forall (is: PList).((drop1 is d1 c1) \to (\forall -(c2: C).((csubc g d1 c2) \to (sc3 g a c2 (lift1 is t))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: -A).(\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: -C).((csubc g d1 c2) \to (sc3 g a0 c2 (lift1 is t0)))))))))) (\lambda (c: -C).(\lambda (n: nat).(\lambda (d1: C).(\lambda (is: PList).(\lambda (_: -(drop1 is d1 c)).(\lambda (c2: C).(\lambda (_: (csubc g d1 c2)).(eq_ind_r T -(TSort n) (\lambda (t0: T).(land (arity g c2 t0 (ASort O n)) (sn3 c2 t0))) -(conj (arity g c2 (TSort n) (ASort O n)) (sn3 c2 (TSort n)) (arity_sort g c2 -n) (sn3_nf2 c2 (TSort n) (nf2_sort c2 n))) (lift1 is (TSort n)) (lift1_sort n -is))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: -A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (d1: C).(\forall -(is: PList).((drop1 is d1 d) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g -a0 c2 (lift1 is u))))))))).(\lambda (d1: C).(\lambda (is: PList).(\lambda -(H3: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H4: (csubc g d1 c2)).(let -H_x \def (drop1_getl_trans is c d1 H3 Abbr d u i H0) in (let H5 \def H_x in -(ex2_ind C (\lambda (e2: C).(drop1 (ptrans is i) e2 d)) (\lambda (e2: -C).(getl (trans is i) d1 (CHead e2 (Bind Abbr) (lift1 (ptrans is i) u)))) -(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x: C).(\lambda (_: (drop1 -(ptrans is i) x d)).(\lambda (H7: (getl (trans is i) d1 (CHead x (Bind Abbr) -(lift1 (ptrans is i) u)))).(let H_x0 \def (csubc_getl_conf g d1 (CHead x -(Bind Abbr) (lift1 (ptrans is i) u)) (trans is i) H7 c2 H4) in (let H8 \def -H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans is i) c2 e2)) (\lambda (e2: -C).(csubc g (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) e2)) (sc3 g a0 c2 -(lift1 is (TLRef i))) (\lambda (x0: C).(\lambda (H9: (getl (trans is i) c2 -x0)).(\lambda (H10: (csubc g (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) -x0)).(let H_x1 \def (csubc_gen_head_l g x x0 (lift1 (ptrans is i) u) (Bind -Abbr) H10) in (let H11 \def H_x1 in (or3_ind (ex2 C (\lambda (c3: C).(eq C x0 -(CHead c3 (Bind Abbr) (lift1 (ptrans is i) u)))) (\lambda (c3: C).(csubc g x -c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K -(Bind Abbr) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: -A).(eq C x0 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g x c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans is i) u))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 w))))) (ex4_3 B C T (\lambda -(b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C x0 (CHead c3 (Bind b) v2))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Abbr) (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g x c3))))) -(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (H12: (ex2 C (\lambda (c3: C).(eq -C x0 (CHead c3 (Bind Abbr) (lift1 (ptrans is i) u)))) (\lambda (c3: C).(csubc -g x c3)))).(ex2_ind C (\lambda (c3: C).(eq C x0 (CHead c3 (Bind Abbr) (lift1 -(ptrans is i) u)))) (\lambda (c3: C).(csubc g x c3)) (sc3 g a0 c2 (lift1 is -(TLRef i))) (\lambda (x1: C).(\lambda (H13: (eq C x0 (CHead x1 (Bind Abbr) -(lift1 (ptrans is i) u)))).(\lambda (_: (csubc g x x1)).(let H15 \def (eq_ind -C x0 (\lambda (c0: C).(getl (trans is i) c2 c0)) H9 (CHead x1 (Bind Abbr) -(lift1 (ptrans is i) u)) H13) in (let H_y \def (sc3_abbr g a0 TNil) in -(eq_ind_r T (TLRef (trans is i)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H_y -(trans is i) x1 (lift1 (ptrans is i) u) c2 (eq_ind T (lift1 is (lift (S i) O -u)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (eq_ind T (lift1 (PConsTail is (S i) -O) u) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H2 d1 (PConsTail is (S i) O) -(drop1_cons_tail c d (S i) O (getl_drop Abbr c d u i H0) is d1 H3) c2 H4) -(lift1 is (lift (S i) O u)) (lift1_cons_tail u (S i) O is)) (lift (S (trans -is i)) O (lift1 (ptrans is i) u)) (lift1_free is i u)) H15) (lift1 is (TLRef -i)) (lift1_lref is i))))))) H12)) (\lambda (H12: (ex5_3 C T A (\lambda (_: -C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind Abbr) (Bind Abst))))) (\lambda -(c3: C).(\lambda (w: T).(\lambda (_: A).(eq C x0 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans -is i) u))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 -w)))))).(ex5_3_ind C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq -K (Bind Abbr) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: -A).(eq C x0 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g x c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans is i) u))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 w)))) (sc3 g a0 c2 (lift1 is -(TLRef i))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (H13: -(eq K (Bind Abbr) (Bind Abst))).(\lambda (H14: (eq C x0 (CHead x1 (Bind Abbr) -x2))).(\lambda (_: (csubc g x x1)).(\lambda (_: (sc3 g (asucc g x3) x (lift1 -(ptrans is i) u))).(\lambda (_: (sc3 g x3 x1 x2)).(let H18 \def (eq_ind C x0 -(\lambda (c0: C).(getl (trans is i) c2 c0)) H9 (CHead x1 (Bind Abbr) x2) H14) -in (let H19 \def (eq_ind K (Bind Abbr) (\lambda (ee: K).(match ee with [(Bind -b) \Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False -| Void \Rightarrow False]) | (Flat _) \Rightarrow False])) I (Bind Abst) H13) -in (False_ind (sc3 g a0 c2 (lift1 is (TLRef i))) H19))))))))))) H12)) -(\lambda (H12: (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: -T).(eq C x0 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K (Bind Abbr) (Bind Void))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g x c3)))))).(ex4_3_ind B C T (\lambda (b: -B).(\lambda (c3: C).(\lambda (v2: T).(eq C x0 (CHead c3 (Bind b) v2))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Abbr) (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g x c3)))) -(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x1: B).(\lambda (x2: C).(\lambda -(x3: T).(\lambda (H13: (eq C x0 (CHead x2 (Bind x1) x3))).(\lambda (H14: (eq -K (Bind Abbr) (Bind Void))).(\lambda (_: (not (eq B x1 Void))).(\lambda (_: -(csubc g x x2)).(let H17 \def (eq_ind C x0 (\lambda (c0: C).(getl (trans is -i) c2 c0)) H9 (CHead x2 (Bind x1) x3) H13) in (let H18 \def (eq_ind K (Bind -Abbr) (\lambda (ee: K).(match ee with [(Bind b) \Rightarrow (match b with -[Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | -(Flat _) \Rightarrow False])) I (Bind Void) H14) in (False_ind (sc3 g a0 c2 -(lift1 is (TLRef i))) H18)))))))))) H12)) H11)))))) H8)))))) -H5)))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda -(i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: -A).(\lambda (H1: (arity g d u (asucc g a0))).(\lambda (_: ((\forall (d1: -C).(\forall (is: PList).((drop1 is d1 d) \to (\forall (c2: C).((csubc g d1 -c2) \to (sc3 g (asucc g a0) c2 (lift1 is u))))))))).(\lambda (d1: C).(\lambda -(is: PList).(\lambda (H3: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H4: -(csubc g d1 c2)).(let H5 \def H0 in (let H_x \def (drop1_getl_trans is c d1 -H3 Abst d u i H5) in (let H6 \def H_x in (ex2_ind C (\lambda (e2: C).(drop1 -(ptrans is i) e2 d)) (\lambda (e2: C).(getl (trans is i) d1 (CHead e2 (Bind -Abst) (lift1 (ptrans is i) u)))) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda -(x: C).(\lambda (H7: (drop1 (ptrans is i) x d)).(\lambda (H8: (getl (trans is -i) d1 (CHead x (Bind Abst) (lift1 (ptrans is i) u)))).(let H_x0 \def -(csubc_getl_conf g d1 (CHead x (Bind Abst) (lift1 (ptrans is i) u)) (trans is -i) H8 c2 H4) in (let H9 \def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans -is i) c2 e2)) (\lambda (e2: C).(csubc g (CHead x (Bind Abst) (lift1 (ptrans -is i) u)) e2)) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x0: C).(\lambda -(H10: (getl (trans is i) c2 x0)).(\lambda (H11: (csubc g (CHead x (Bind Abst) -(lift1 (ptrans is i) u)) x0)).(let H_x1 \def (csubc_gen_head_l g x x0 (lift1 -(ptrans is i) u) (Bind Abst) H11) in (let H12 \def H_x1 in (or3_ind (ex2 C -(\lambda (c3: C).(eq C x0 (CHead c3 (Bind Abst) (lift1 (ptrans is i) u)))) -(\lambda (c3: C).(csubc g x c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C x0 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans -is i) u))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 -w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C -x0 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -T).(eq K (Bind Abst) (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda -(_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: -T).(csubc g x c3))))) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (H13: (ex2 -C (\lambda (c3: C).(eq C x0 (CHead c3 (Bind Abst) (lift1 (ptrans is i) u)))) -(\lambda (c3: C).(csubc g x c3)))).(ex2_ind C (\lambda (c3: C).(eq C x0 -(CHead c3 (Bind Abst) (lift1 (ptrans is i) u)))) (\lambda (c3: C).(csubc g x -c3)) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x1: C).(\lambda (H14: (eq C -x0 (CHead x1 (Bind Abst) (lift1 (ptrans is i) u)))).(\lambda (_: (csubc g x -x1)).(let H16 \def (eq_ind C x0 (\lambda (c0: C).(getl (trans is i) c2 c0)) -H10 (CHead x1 (Bind Abst) (lift1 (ptrans is i) u)) H14) in (let H_y \def -(sc3_abst g a0 TNil) in (eq_ind_r T (TLRef (trans is i)) (\lambda (t0: -T).(sc3 g a0 c2 t0)) (H_y c2 (trans is i) (csubc_arity_conf g d1 c2 H4 (TLRef -(trans is i)) a0 (eq_ind T (lift1 is (TLRef i)) (\lambda (t0: T).(arity g d1 -t0 a0)) (arity_lift1 g a0 c is d1 (TLRef i) H3 (arity_abst g c d u i H0 a0 -H1)) (TLRef (trans is i)) (lift1_lref is i))) (nf2_lref_abst c2 x1 (lift1 -(ptrans is i) u) (trans is i) H16) I) (lift1 is (TLRef i)) (lift1_lref is -i))))))) H13)) (\lambda (H13: (ex5_3 C T A (\lambda (_: C).(\lambda (_: -T).(\lambda (_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (_: A).(eq C x0 (CHead c3 (Bind Abbr) w))))) -(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x c3)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans -is i) u))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 -w)))))).(ex5_3_ind C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq -K (Bind Abst) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: -A).(eq C x0 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: -T).(\lambda (_: A).(csubc g x c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans is i) u))))) (\lambda (c3: -C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 w)))) (sc3 g a0 c2 (lift1 is -(TLRef i))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (_: -(eq K (Bind Abst) (Bind Abst))).(\lambda (H15: (eq C x0 (CHead x1 (Bind Abbr) -x2))).(\lambda (_: (csubc g x x1)).(\lambda (H17: (sc3 g (asucc g x3) x -(lift1 (ptrans is i) u))).(\lambda (H18: (sc3 g x3 x1 x2)).(let H19 \def -(eq_ind C x0 (\lambda (c0: C).(getl (trans is i) c2 c0)) H10 (CHead x1 (Bind -Abbr) x2) H15) in (let H_y \def (sc3_abbr g a0 TNil) in (eq_ind_r T (TLRef -(trans is i)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H_y (trans is i) x1 x2 c2 -(let H_y0 \def (arity_lift1 g (asucc g a0) d (ptrans is i) x u H7 H1) in (let -H_y1 \def (sc3_arity_gen g x (lift1 (ptrans is i) u) (asucc g x3) H17) in -(sc3_repl g x3 c2 (lift (S (trans is i)) O x2) (sc3_lift g x3 x1 x2 H18 c2 (S -(trans is i)) O (getl_drop Abbr c2 x1 x2 (trans is i) H19)) a0 (asucc_inj g -x3 a0 (arity_mono g x (lift1 (ptrans is i) u) (asucc g x3) H_y1 (asucc g a0) -H_y0))))) H19) (lift1 is (TLRef i)) (lift1_lref is i)))))))))))) H13)) -(\lambda (H13: (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: -T).(eq C x0 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: T).(eq K (Bind Abst) (Bind Void))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: -C).(\lambda (_: T).(csubc g x c3)))))).(ex4_3_ind B C T (\lambda (b: -B).(\lambda (c3: C).(\lambda (v2: T).(eq C x0 (CHead c3 (Bind b) v2))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Abst) (Bind -Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b -Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g x c3)))) -(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x1: B).(\lambda (x2: C).(\lambda -(x3: T).(\lambda (H14: (eq C x0 (CHead x2 (Bind x1) x3))).(\lambda (H15: (eq -K (Bind Abst) (Bind Void))).(\lambda (_: (not (eq B x1 Void))).(\lambda (_: -(csubc g x x2)).(let H18 \def (eq_ind C x0 (\lambda (c0: C).(getl (trans is -i) c2 c0)) H10 (CHead x2 (Bind x1) x3) H14) in (let H19 \def (eq_ind K (Bind -Abst) (\lambda (ee: K).(match ee with [(Bind b) \Rightarrow (match b with -[Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | -(Flat _) \Rightarrow False])) I (Bind Void) H15) in (False_ind (sc3 g a0 c2 -(lift1 is (TLRef i))) H19)))))))))) H13)) H12)))))) H9)))))) -H6))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b -Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity -g c u a1)).(\lambda (H2: ((\forall (d1: C).(\forall (is: PList).((drop1 is d1 -c) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g a1 c2 (lift1 is -u))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c -(Bind b) u) t0 a2)).(\lambda (H4: ((\forall (d1: C).(\forall (is: -PList).((drop1 is d1 (CHead c (Bind b) u)) \to (\forall (c2: C).((csubc g d1 -c2) \to (sc3 g a2 c2 (lift1 is t0))))))))).(\lambda (d1: C).(\lambda (is: -PList).(\lambda (H5: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H6: (csubc g -d1 c2)).(let H_y \def (sc3_bind g b H0 a1 a2 TNil) in (eq_ind_r T (THead -(Bind b) (lift1 is u) (lift1 (Ss is) t0)) (\lambda (t1: T).(sc3 g a2 c2 t1)) -(H_y c2 (lift1 is u) (lift1 (Ss is) t0) (H4 (CHead d1 (Bind b) (lift1 is u)) -(Ss is) (drop1_skip_bind b c is d1 u H5) (CHead c2 (Bind b) (lift1 is u)) -(csubc_head g d1 c2 H6 (Bind b) (lift1 is u))) (H2 d1 is H5 c2 H6)) (lift1 is -(THead (Bind b) u t0)) (lift1_bind b is u t0))))))))))))))))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u (asucc g -a1))).(\lambda (H1: ((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) -\to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g (asucc g a1) c2 (lift1 is -u))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H2: (arity g (CHead c -(Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (d1: C).(\forall (is: -PList).((drop1 is d1 (CHead c (Bind Abst) u)) \to (\forall (c2: C).((csubc g -d1 c2) \to (sc3 g a2 c2 (lift1 is t0))))))))).(\lambda (d1: C).(\lambda (is: -PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H5: (csubc g -d1 c2)).(eq_ind_r T (THead (Bind Abst) (lift1 is u) (lift1 (Ss is) t0)) -(\lambda (t1: T).(land (arity g c2 t1 (AHead a1 a2)) (\forall (d: C).(\forall -(w: T).((sc3 g a1 d w) \to (\forall (is0: PList).((drop1 is0 d c2) \to (sc3 g -a2 d (THead (Flat Appl) w (lift1 is0 t1)))))))))) (conj (arity g c2 (THead -(Bind Abst) (lift1 is u) (lift1 (Ss is) t0)) (AHead a1 a2)) (\forall (d: -C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is0: PList).((drop1 is0 d -c2) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is0 (THead (Bind Abst) (lift1 -is u) (lift1 (Ss is) t0)))))))))) (csubc_arity_conf g d1 c2 H5 (THead (Bind -Abst) (lift1 is u) (lift1 (Ss is) t0)) (AHead a1 a2) (arity_head g d1 (lift1 -is u) a1 (arity_lift1 g (asucc g a1) c is d1 u H4 H0) (lift1 (Ss is) t0) a2 -(arity_lift1 g a2 (CHead c (Bind Abst) u) (Ss is) (CHead d1 (Bind Abst) -(lift1 is u)) t0 (drop1_skip_bind Abst c is d1 u H4) H2))) (\lambda (d: -C).(\lambda (w: T).(\lambda (H6: (sc3 g a1 d w)).(\lambda (is0: -PList).(\lambda (H7: (drop1 is0 d c2)).(eq_ind_r T (THead (Bind Abst) (lift1 -is0 (lift1 is u)) (lift1 (Ss is0) (lift1 (Ss is) t0))) (\lambda (t1: T).(sc3 -g a2 d (THead (Flat Appl) w t1))) (let H8 \def (sc3_appl g a1 a2 TNil) in (H8 -d w (lift1 (Ss is0) (lift1 (Ss is) t0)) (let H_y \def (sc3_bind g Abbr -not_abbr_abst a1 a2 TNil) in (H_y d w (lift1 (Ss is0) (lift1 (Ss is) t0)) -(let H_x \def (csubc_drop1_conf_rev g is0 d c2 H7 d1 H5) in (let H9 \def H_x -in (ex2_ind C (\lambda (c3: C).(drop1 is0 c3 d1)) (\lambda (c3: C).(csubc g -c3 d)) (sc3 g a2 (CHead d (Bind Abbr) w) (lift1 (Ss is0) (lift1 (Ss is) t0))) -(\lambda (x: C).(\lambda (H10: (drop1 is0 x d1)).(\lambda (H11: (csubc g x -d)).(eq_ind_r T (lift1 (papp (Ss is0) (Ss is)) t0) (\lambda (t1: T).(sc3 g a2 -(CHead d (Bind Abbr) w) t1)) (eq_ind_r PList (Ss (papp is0 is)) (\lambda (p: -PList).(sc3 g a2 (CHead d (Bind Abbr) w) (lift1 p t0))) (H3 (CHead x (Bind -Abst) (lift1 (papp is0 is) u)) (Ss (papp is0 is)) (drop1_skip_bind Abst c -(papp is0 is) x u (drop1_trans is0 x d1 H10 is c H4)) (CHead d (Bind Abbr) w) -(csubc_abst g x d H11 (lift1 (papp is0 is) u) a1 (H1 x (papp is0 is) -(drop1_trans is0 x d1 H10 is c H4) x (csubc_refl g x)) w H6)) (papp (Ss is0) -(Ss is)) (papp_ss is0 is)) (lift1 (Ss is0) (lift1 (Ss is) t0)) (lift1_lift1 -(Ss is0) (Ss is) t0))))) H9))) H6)) H6 (lift1 is0 (lift1 is u)) (sc3_lift1 g -c2 (asucc g a1) is0 d (lift1 is u) (H1 d1 is H4 c2 H5) H7))) (lift1 is0 -(THead (Bind Abst) (lift1 is u) (lift1 (Ss is) t0))) (lift1_bind Abst is0 -(lift1 is u) (lift1 (Ss is) t0))))))))) (lift1 is (THead (Bind Abst) u t0)) -(lift1_bind Abst is u t0)))))))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall -(d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g -d1 c2) \to (sc3 g a1 c2 (lift1 is u))))))))).(\lambda (t0: T).(\lambda (a2: -A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (d1: -C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 -c2) \to (sc3 g (AHead a1 a2) c2 (lift1 is t0))))))))).(\lambda (d1: -C).(\lambda (is: PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: -C).(\lambda (H5: (csubc g d1 c2)).(let H_y \def (H1 d1 is H4 c2 H5) in (let -H_y0 \def (H3 d1 is H4 c2 H5) in (let H6 \def H_y0 in (land_ind (arity g c2 -(lift1 is t0) (AHead a1 a2)) (\forall (d: C).(\forall (w: T).((sc3 g a1 d w) -\to (\forall (is0: PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat -Appl) w (lift1 is0 (lift1 is t0))))))))) (sc3 g a2 c2 (lift1 is (THead (Flat -Appl) u t0))) (\lambda (_: (arity g c2 (lift1 is t0) (AHead a1 a2))).(\lambda -(H8: ((\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is0: -PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is0 -(lift1 is t0))))))))))).(let H_y1 \def (H8 c2 (lift1 is u) H_y PNil) in -(eq_ind_r T (THead (Flat Appl) (lift1 is u) (lift1 is t0)) (\lambda (t1: -T).(sc3 g a2 c2 t1)) (H_y1 (drop1_nil c2)) (lift1 is (THead (Flat Appl) u -t0)) (lift1_flat Appl is u t0))))) H6)))))))))))))))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g -a0))).(\lambda (H1: ((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) -\to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g (asucc g a0) c2 (lift1 is -u))))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: -((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: -C).((csubc g d1 c2) \to (sc3 g a0 c2 (lift1 is t0))))))))).(\lambda (d1: -C).(\lambda (is: PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: -C).(\lambda (H5: (csubc g d1 c2)).(let H_y \def (sc3_cast g a0 TNil) in -(eq_ind_r T (THead (Flat Cast) (lift1 is u) (lift1 is t0)) (\lambda (t1: -T).(sc3 g a0 c2 t1)) (H_y c2 (lift1 is u) (H1 d1 is H4 c2 H5) (lift1 is t0) -(H3 d1 is H4 c2 H5)) (lift1 is (THead (Flat Cast) u t0)) (lift1_flat Cast is -u t0)))))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: -A).(\lambda (_: (arity g c t0 a1)).(\lambda (H1: ((\forall (d1: C).(\forall -(is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g -a1 c2 (lift1 is t0))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 -a2)).(\lambda (d1: C).(\lambda (is: PList).(\lambda (H3: (drop1 is d1 -c)).(\lambda (c2: C).(\lambda (H4: (csubc g d1 c2)).(sc3_repl g a1 c2 (lift1 -is t0) (H1 d1 is H3 c2 H4) a2 H2))))))))))))) c1 t a H))))). - -lemma sc3_arity: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t -a) \to (sc3 g a c t))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: -(arity g c t a)).(let H_y \def (sc3_arity_csubc g c t a H c PNil) in (H_y -(drop1_nil c) c (csubc_refl g c))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sc3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/sc3/defs.ma deleted file mode 100644 index 417868bc4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sc3/defs.ma +++ /dev/null @@ -1,29 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sn3/defs.ma". - -include "basic_1/arity/defs.ma". - -include "basic_1/drop1/defs.ma". - -rec definition sc3 (g: G) (a: A) on a: C \to (T \to Prop) \def \lambda (c: -C).(\lambda (t: T).(match a with [(ASort h n) \Rightarrow (land (arity g c t -(ASort h n)) (sn3 c t)) | (AHead a1 a2) \Rightarrow (land (arity g c t (AHead -a1 a2)) (\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is -t)))))))))])). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sc3/props.ma b/matita/matita/contribs/lambdadelta/basic_1/sc3/props.ma deleted file mode 100644 index 80da46d3c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sc3/props.ma +++ /dev/null @@ -1,697 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sc3/defs.ma". - -include "basic_1/sn3/lift1.ma". - -include "basic_1/nf2/lift1.ma". - -include "basic_1/csuba/arity.ma". - -include "basic_1/arity/lift1.ma". - -include "basic_1/arity/aprem.ma". - -include "basic_1/llt/props.ma". - -include "basic_1/llt/fwd.ma". - -include "basic_1/drop1/getl.ma". - -include "basic_1/drop1/props.ma". - -include "basic_1/lift1/drop1.ma". - -lemma sc3_arity_gen: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((sc3 g a c -t) \to (arity g c t a))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(A_ind -(\lambda (a0: A).((sc3 g a0 c t) \to (arity g c t a0))) (\lambda (n: -nat).(\lambda (n0: nat).(\lambda (H: (land (arity g c t (ASort n n0)) (sn3 c -t))).(let H0 \def H in (land_ind (arity g c t (ASort n n0)) (sn3 c t) (arity -g c t (ASort n n0)) (\lambda (H1: (arity g c t (ASort n n0))).(\lambda (_: -(sn3 c t)).H1)) H0))))) (\lambda (a0: A).(\lambda (_: (((sc3 g a0 c t) \to -(arity g c t a0)))).(\lambda (a1: A).(\lambda (_: (((sc3 g a1 c t) \to (arity -g c t a1)))).(\lambda (H1: (land (arity g c t (AHead a0 a1)) (\forall (d: -C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) -\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is t)))))))))).(let H2 \def H1 in -(land_ind (arity g c t (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g -a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat -Appl) w (lift1 is t)))))))) (arity g c t (AHead a0 a1)) (\lambda (H3: (arity -g c t (AHead a0 a1))).(\lambda (_: ((\forall (d: C).(\forall (w: T).((sc3 g -a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat -Appl) w (lift1 is t)))))))))).H3)) H2))))))) a)))). - -lemma sc3_repl: - \forall (g: G).(\forall (a1: A).(\forall (c: C).(\forall (t: T).((sc3 g a1 c -t) \to (\forall (a2: A).((leq g a1 a2) \to (sc3 g a2 c t))))))) -\def - \lambda (g: G).(\lambda (a1: A).(llt_wf_ind (\lambda (a: A).(\forall (c: -C).(\forall (t: T).((sc3 g a c t) \to (\forall (a2: A).((leq g a a2) \to (sc3 -g a2 c t))))))) (\lambda (a2: A).(A_ind (\lambda (a: A).(((\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 (n: nat).(\lambda (n0: nat).(\lambda (_: ((\forall -(a3: A).((llt a3 (ASort n n0)) \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)))))))))).(\lambda -(c: C).(\lambda (t: T).(\lambda (H0: (land (arity g c t (ASort n n0)) (sn3 c -t))).(\lambda (a3: A).(\lambda (H1: (leq g (ASort n n0) a3)).(let H2 \def H0 -in (land_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_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 (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: -A).(\lambda (H0: ((((\forall (a3: A).((llt a3 a0) \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 a0 c t) -\to (\forall (a3: A).((leq g a0 a3) \to (sc3 g a3 c t))))))))).(\lambda (H1: -((\forall (a3: A).((llt a3 (AHead a a0)) \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)))))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H2: (land (arity g c t -(AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall -(is: PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is -t)))))))))).(\lambda (a3: A).(\lambda (H3: (leq g (AHead a a0) a3)).(let H4 -\def H2 in (land_ind (arity g c t (AHead a a0)) (\forall (d: C).(\forall (w: -T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d -(THead (Flat Appl) w (lift1 is 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_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)). - -lemma sc3_lift: - \forall (g: G).(\forall (a: A).(\forall (e: C).(\forall (t: T).((sc3 g a e -t) \to (\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) -\to (sc3 g a c (lift h d t)))))))))) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (e: -C).(\forall (t: T).((sc3 g a0 e t) \to (\forall (c: C).(\forall (h: -nat).(\forall (d: nat).((drop h d c e) \to (sc3 g a0 c (lift h d t)))))))))) -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (e: C).(\lambda (t: T).(\lambda -(H: (land (arity g e t (ASort n n0)) (sn3 e t))).(\lambda (c: C).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H0: (drop h d c e)).(let H1 \def H in -(land_ind (arity g e t (ASort n n0)) (sn3 e t) (land (arity g c (lift h d t) -(ASort n n0)) (sn3 c (lift h d t))) (\lambda (H2: (arity g e t (ASort n -n0))).(\lambda (H3: (sn3 e t)).(conj (arity g c (lift h d t) (ASort n n0)) -(sn3 c (lift h d t)) (arity_lift g e t (ASort n n0) H2 c h d H0) (sn3_lift e -t H3 c h d H0)))) H1))))))))))) (\lambda (a0: A).(\lambda (_: ((\forall (e: -C).(\forall (t: T).((sc3 g a0 e t) \to (\forall (c: C).(\forall (h: -nat).(\forall (d: nat).((drop h d c e) \to (sc3 g a0 c (lift h d -t))))))))))).(\lambda (a1: A).(\lambda (_: ((\forall (e: C).(\forall (t: -T).((sc3 g a1 e t) \to (\forall (c: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c e) \to (sc3 g a1 c (lift h d t))))))))))).(\lambda (e: -C).(\lambda (t: T).(\lambda (H1: (land (arity g e t (AHead a0 a1)) (\forall -(d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d -e) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is t)))))))))).(\lambda (c: -C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d c e)).(let H3 -\def H1 in (land_ind (arity g e t (AHead a0 a1)) (\forall (d0: C).(\forall -(w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 e) \to (sc3 g -a1 d0 (THead (Flat Appl) w (lift1 is t)))))))) (land (arity g c (lift h d t) -(AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall -(is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is -(lift h d t)))))))))) (\lambda (H4: (arity g e t (AHead a0 a1))).(\lambda -(H5: ((\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: -PList).((drop1 is d0 e) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is -t)))))))))).(conj (arity g c (lift h d t) (AHead a0 a1)) (\forall (d0: -C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) -\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (lift h d t))))))))) -(arity_lift g e t (AHead a0 a1) H4 c h d H2) (\lambda (d0: C).(\lambda (w: -T).(\lambda (H6: (sc3 g a0 d0 w)).(\lambda (is: PList).(\lambda (H7: (drop1 -is d0 c)).(let H_y \def (H5 d0 w H6 (PConsTail is h d)) in (eq_ind T (lift1 -(PConsTail is h d) t) (\lambda (t0: T).(sc3 g a1 d0 (THead (Flat Appl) w -t0))) (H_y (drop1_cons_tail c e h d H2 is d0 H7)) (lift1 is (lift h d t)) -(lift1_cons_tail t h d is))))))))))) H3))))))))))))) a)). - -lemma sc3_lift1: - \forall (g: G).(\forall (e: C).(\forall (a: A).(\forall (hds: -PList).(\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 hds c e) -\to (sc3 g a c (lift1 hds t))))))))) -\def - \lambda (g: G).(\lambda (e: C).(\lambda (a: A).(\lambda (hds: -PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((sc3 g -a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t))))))) (\lambda (c: -C).(\lambda (t: T).(\lambda (H: (sc3 g a e t)).(\lambda (H0: (drop1 PNil c -e)).(let H_y \def (drop1_gen_pnil c e H0) in (eq_ind_r C e (\lambda (c0: -C).(sc3 g a c0 t)) H c H_y)))))) (\lambda (n: nat).(\lambda (n0: -nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (t: T).((sc3 -g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t)))))))).(\lambda (c: -C).(\lambda (t: T).(\lambda (H0: (sc3 g a e t)).(\lambda (H1: (drop1 (PCons n -n0 p) c e)).(let H_x \def (drop1_gen_pcons c e p n n0 H1) in (let H2 \def H_x -in (ex2_ind C (\lambda (c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 -e)) (sc3 g a c (lift n n0 (lift1 p t))) (\lambda (x: C).(\lambda (H3: (drop n -n0 c x)).(\lambda (H4: (drop1 p x e)).(sc3_lift g a x (lift1 p t) (H x t H0 -H4) c n n0 H3)))) H2))))))))))) hds)))). - -lemma sc3_abbr: - \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (i: -nat).(\forall (d: C).(\forall (v: T).(\forall (c: C).((sc3 g a c (THeads -(Flat Appl) vs (lift (S i) O v))) \to ((getl i c (CHead d (Bind Abbr) v)) \to -(sc3 g a c (THeads (Flat Appl) vs (TLRef i))))))))))) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: -TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: -C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c -(CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs (TLRef -i))))))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (vs: -TList).(\lambda (i: nat).(\lambda (d: C).(\lambda (v: T).(\lambda (c: -C).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs (lift (S i) O v)) -(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (lift (S i) O v))))).(\lambda -(H0: (getl i c (CHead d (Bind Abbr) v))).(let H1 \def H in (land_ind (arity g -c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0)) (sn3 c (THeads (Flat -Appl) vs (lift (S i) O v))) (land (arity g c (THeads (Flat Appl) vs (TLRef -i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i)))) (\lambda (H2: -(arity g c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0))).(\lambda -(H3: (sn3 c (THeads (Flat Appl) vs (lift (S i) O v)))).(conj (arity g c -(THeads (Flat Appl) vs (TLRef i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs -(TLRef i))) (arity_appls_abbr g c d v i H0 vs (ASort n n0) H2) -(sn3_appls_abbr c d v i H0 vs H3)))) H1))))))))))) (\lambda (a0: A).(\lambda -(_: ((\forall (vs: TList).(\forall (i: nat).(\forall (d: C).(\forall (v: -T).(\forall (c: C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to -((getl i c (CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs -(TLRef i)))))))))))).(\lambda (a1: A).(\lambda (H0: ((\forall (vs: -TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: -C).((sc3 g a1 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c -(CHead d (Bind Abbr) v)) \to (sc3 g a1 c (THeads (Flat Appl) vs (TLRef -i)))))))))))).(\lambda (vs: TList).(\lambda (i: nat).(\lambda (d: C).(\lambda -(v: T).(\lambda (c: C).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs -(lift (S i) O v)) (AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 -d0 w) \to (\forall (is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat -Appl) w (lift1 is (THeads (Flat Appl) vs (lift (S i) O v)))))))))))).(\lambda -(H2: (getl i c (CHead d (Bind Abbr) v))).(let H3 \def H1 in (land_ind (arity -g c (THeads (Flat Appl) vs (lift (S i) O v)) (AHead a0 a1)) (\forall (d0: -C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) -\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift -(S i) O v)))))))))) (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (AHead -a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: -PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is -(THeads (Flat Appl) vs (TLRef i))))))))))) (\lambda (H4: (arity g c (THeads -(Flat Appl) vs (lift (S i) O v)) (AHead a0 a1))).(\lambda (H5: ((\forall (d0: -C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) -\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift -(S i) O v)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (TLRef i)) -(AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall -(is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is -(THeads (Flat Appl) vs (TLRef i)))))))))) (arity_appls_abbr g c d v i H2 vs -(AHead a0 a1) H4) (\lambda (d0: C).(\lambda (w: T).(\lambda (H6: (sc3 g a0 d0 -w)).(\lambda (is: PList).(\lambda (H7: (drop1 is d0 c)).(let H_x \def -(drop1_getl_trans is c d0 H7 Abbr d v i H2) in (let H8 \def H_x in (ex2_ind C -(\lambda (e2: C).(drop1 (ptrans is i) e2 d)) (\lambda (e2: C).(getl (trans is -i) d0 (CHead e2 (Bind Abbr) (lift1 (ptrans is i) v)))) (sc3 g a1 d0 (THead -(Flat Appl) w (lift1 is (THeads (Flat Appl) vs (TLRef i))))) (\lambda (x: -C).(\lambda (_: (drop1 (ptrans is i) x d)).(\lambda (H10: (getl (trans is i) -d0 (CHead x (Bind Abbr) (lift1 (ptrans is i) v)))).(let H_y \def (H0 (TCons w -(lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is -(TLRef i))) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w t))) (eq_ind_r -T (TLRef (trans is i)) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w -(THeads (Flat Appl) (lifts1 is vs) t)))) (H_y (trans is i) x (lift1 (ptrans -is i) v) d0 (eq_ind T (lift1 is (lift (S i) O v)) (\lambda (t: T).(sc3 g a1 -d0 (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 is vs) t)))) (eq_ind T -(lift1 is (THeads (Flat Appl) vs (lift (S i) O v))) (\lambda (t: T).(sc3 g a1 -d0 (THead (Flat Appl) w t))) (H5 d0 w H6 is H7) (THeads (Flat Appl) (lifts1 -is vs) (lift1 is (lift (S i) O v))) (lifts1_flat Appl is (lift (S i) O v) -vs)) (lift (S (trans is i)) O (lift1 (ptrans is i) v)) (lift1_free is i v)) -H10) (lift1 is (TLRef i)) (lift1_lref is i)) (lift1 is (THeads (Flat Appl) vs -(TLRef i))) (lifts1_flat Appl is (TLRef i) vs)))))) H8))))))))))) -H3))))))))))))) a)). - -theorem sc3_cast: - \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c: C).(\forall -(u: T).((sc3 g (asucc g a) c (THeads (Flat Appl) vs u)) \to (\forall (t: -T).((sc3 g a c (THeads (Flat Appl) vs t)) \to (sc3 g a c (THeads (Flat Appl) -vs (THead (Flat Cast) u t)))))))))) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: -TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat -Appl) vs u)) \to (\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to -(sc3 g a0 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (\lambda -(n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: -T).(\lambda (H: (sc3 g (match n with [O \Rightarrow (ASort O (next g n0)) | -(S h) \Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u))).(\lambda (t: -T).(\lambda (H0: (land (arity g c (THeads (Flat Appl) vs t) (ASort n n0)) -(sn3 c (THeads (Flat Appl) vs t)))).(nat_ind (\lambda (n1: nat).((sc3 g -(match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow -(ASort h n0)]) c (THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads -(Flat Appl) vs t) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land -(arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) -(sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))) (\lambda (H1: -(sc3 g (ASort O (next g n0)) c (THeads (Flat Appl) vs u))).(\lambda (H2: -(land (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads (Flat -Appl) vs t)))).(let H3 \def H1 in (land_ind (arity g c (THeads (Flat Appl) vs -u) (ASort O (next g n0))) (sn3 c (THeads (Flat Appl) vs u)) (land (arity g c -(THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads -(Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads -(Flat Appl) vs u) (ASort O (next g n0)))).(\lambda (H5: (sn3 c (THeads (Flat -Appl) vs u))).(let H6 \def H2 in (land_ind (arity g c (THeads (Flat Appl) vs -t) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity g c (THeads -(Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat -Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat -Appl) vs t) (ASort O n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs -t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort -O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))) -(arity_appls_cast g c u t vs (ASort O n0) H4 H7) (sn3_appls_cast c vs u H5 t -H8)))) H6)))) H3)))) (\lambda (n1: nat).(\lambda (_: (((sc3 g (match n1 with -[O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c -(THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads (Flat Appl) vs t) -(ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land (arity g c -(THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) (sn3 c (THeads -(Flat Appl) vs (THead (Flat Cast) u t)))))))).(\lambda (H1: (sc3 g (ASort n1 -n0) c (THeads (Flat Appl) vs u))).(\lambda (H2: (land (arity g c (THeads -(Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let -H3 \def H1 in (land_ind (arity g c (THeads (Flat Appl) vs u) (ASort n1 n0)) -(sn3 c (THeads (Flat Appl) vs u)) (land (arity g c (THeads (Flat Appl) vs -(THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs -(THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) -(ASort n1 n0))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def -H2 in (land_ind (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 -c (THeads (Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead -(Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead -(Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort -(S n1) n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g -c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c -(THeads (Flat Appl) vs (THead (Flat Cast) u t))) (arity_appls_cast g c u t vs -(ASort (S n1) n0) H4 H7) (sn3_appls_cast c vs u H5 t H8)))) H6)))) H3)))))) n -H H0))))))))) (\lambda (a0: A).(\lambda (_: ((\forall (vs: TList).(\forall -(c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to -(\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c -(THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (a1: -A).(\lambda (H0: ((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 -g (asucc g a1) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a1 c -(THeads (Flat Appl) vs t)) \to (sc3 g a1 c (THeads (Flat Appl) vs (THead -(Flat Cast) u t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: -T).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc -g a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 -is (THeads (Flat Appl) vs u))))))))))).(\lambda (t: T).(\lambda (H2: (land -(arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: C).(\forall -(w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 -d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))))).(let H3 -\def H1 in (land_ind (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g -a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 -is (THeads (Flat Appl) vs u))))))))) (land (arity g c (THeads (Flat Appl) vs -(THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 -g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead -(Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u -t))))))))))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (AHead a0 -(asucc g a1)))).(\lambda (H5: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d -w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead -(Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))))).(let H6 \def H2 -in (land_ind (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: -C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) -\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs -t))))))))) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) -(AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall -(is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is -(THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))) (\lambda (H7: (arity -g c (THeads (Flat Appl) vs t) (AHead a0 a1))).(\lambda (H8: ((\forall (d: -C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) -\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs -t))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) -(AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall -(is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is -(THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (arity_appls_cast g c -u t vs (AHead a0 a1) H4 H7) (\lambda (d: C).(\lambda (w: T).(\lambda (H9: -(sc3 g a0 d w)).(\lambda (is: PList).(\lambda (H10: (drop1 is d c)).(let H_y -\def (H0 (TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 -is vs) (lift1 is (THead (Flat Cast) u t))) (\lambda (t0: T).(sc3 g a1 d -(THead (Flat Appl) w t0))) (eq_ind_r T (THead (Flat Cast) (lift1 is u) (lift1 -is t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w (THeads (Flat Appl) -(lifts1 is vs) t0)))) (H_y d (lift1 is u) (eq_ind T (lift1 is (THeads (Flat -Appl) vs u)) (\lambda (t0: T).(sc3 g (asucc g a1) d (THead (Flat Appl) w -t0))) (H5 d w H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is u)) -(lifts1_flat Appl is u vs)) (lift1 is t) (eq_ind T (lift1 is (THeads (Flat -Appl) vs t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w t0))) (H8 d w -H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is t)) (lifts1_flat Appl -is t vs))) (lift1 is (THead (Flat Cast) u t)) (lift1_flat Cast is u t)) -(lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (lifts1_flat Appl -is (THead (Flat Cast) u t) vs))))))))))) H6)))) H3)))))))))))) a)). - -fact sc3_props__sc3_sn3_abst: - \forall (g: G).(\forall (a: A).(land (\forall (c: C).(\forall (t: T).((sc3 g -a c t) \to (sn3 c t)))) (\forall (vs: TList).(\forall (i: nat).(let t \def -(THeads (Flat Appl) vs (TLRef i)) in (\forall (c: C).((arity g c t a) \to -((nf2 c (TLRef i)) \to ((sns3 c vs) \to (sc3 g a c t)))))))))) -\def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(land (\forall (c: -C).(\forall (t: T).((sc3 g a0 c t) \to (sn3 c t)))) (\forall (vs: -TList).(\forall (i: nat).(let t \def (THeads (Flat Appl) vs (TLRef i)) in -(\forall (c: C).((arity g c t a0) \to ((nf2 c (TLRef i)) \to ((sns3 c vs) \to -(sc3 g a0 c t)))))))))) (\lambda (n: nat).(\lambda (n0: nat).(conj (\forall -(c: C).(\forall (t: T).((land (arity g c t (ASort n n0)) (sn3 c t)) \to (sn3 -c t)))) (\forall (vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c -(THeads (Flat Appl) vs (TLRef i)) (ASort n n0)) \to ((nf2 c (TLRef i)) \to -((sns3 c vs) \to (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (ASort n -n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i)))))))))) (\lambda (c: -C).(\lambda (t: T).(\lambda (H: (land (arity g c t (ASort n n0)) (sn3 c -t))).(let H0 \def H in (land_ind (arity g c t (ASort n n0)) (sn3 c t) (sn3 c -t) (\lambda (_: (arity g c t (ASort n n0))).(\lambda (H2: (sn3 c t)).H2)) -H0))))) (\lambda (vs: TList).(\lambda (i: nat).(\lambda (c: C).(\lambda (H: -(arity g c (THeads (Flat Appl) vs (TLRef i)) (ASort n n0))).(\lambda (H0: -(nf2 c (TLRef i))).(\lambda (H1: (sns3 c vs)).(conj (arity g c (THeads (Flat -Appl) vs (TLRef i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i))) H -(sn3_appls_lref c i H0 vs H1))))))))))) (\lambda (a0: A).(\lambda (H: (land -(\forall (c: C).(\forall (t: T).((sc3 g a0 c t) \to (sn3 c t)))) (\forall -(vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c (THeads (Flat Appl) -vs (TLRef i)) a0) \to ((nf2 c (TLRef i)) \to ((sns3 c vs) \to (sc3 g a0 c -(THeads (Flat Appl) vs (TLRef i))))))))))).(\lambda (a1: A).(\lambda (H0: -(land (\forall (c: C).(\forall (t: T).((sc3 g a1 c t) \to (sn3 c t)))) -(\forall (vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c (THeads -(Flat Appl) vs (TLRef i)) a1) \to ((nf2 c (TLRef i)) \to ((sns3 c vs) \to -(sc3 g a1 c (THeads (Flat Appl) vs (TLRef i))))))))))).(conj (\forall (c: -C).(\forall (t: T).((land (arity g c t (AHead a0 a1)) (\forall (d: -C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) -\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is t))))))))) \to (sn3 c t)))) -(\forall (vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c (THeads -(Flat Appl) vs (TLRef i)) (AHead a0 a1)) \to ((nf2 c (TLRef i)) \to ((sns3 c -vs) \to (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (AHead a0 a1)) -(\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads -(Flat Appl) vs (TLRef i))))))))))))))))) (\lambda (c: C).(\lambda (t: -T).(\lambda (H1: (land (arity g c t (AHead a0 a1)) (\forall (d: C).(\forall -(w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 -d (THead (Flat Appl) w (lift1 is t)))))))))).(let H2 \def H in (land_ind -(\forall (c0: C).(\forall (t0: T).((sc3 g a0 c0 t0) \to (sn3 c0 t0)))) -(\forall (vs: TList).(\forall (i: nat).(\forall (c0: C).((arity g c0 (THeads -(Flat Appl) vs (TLRef i)) a0) \to ((nf2 c0 (TLRef i)) \to ((sns3 c0 vs) \to -(sc3 g a0 c0 (THeads (Flat Appl) vs (TLRef i))))))))) (sn3 c t) (\lambda (_: -((\forall (c0: C).(\forall (t0: T).((sc3 g a0 c0 t0) \to (sn3 c0 -t0)))))).(\lambda (H4: ((\forall (vs: TList).(\forall (i: nat).(\forall (c0: -C).((arity g c0 (THeads (Flat Appl) vs (TLRef i)) a0) \to ((nf2 c0 (TLRef i)) -\to ((sns3 c0 vs) \to (sc3 g a0 c0 (THeads (Flat Appl) vs (TLRef -i))))))))))).(let H5 \def H0 in (land_ind (\forall (c0: C).(\forall (t0: -T).((sc3 g a1 c0 t0) \to (sn3 c0 t0)))) (\forall (vs: TList).(\forall (i: -nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs (TLRef i)) a1) \to -((nf2 c0 (TLRef i)) \to ((sns3 c0 vs) \to (sc3 g a1 c0 (THeads (Flat Appl) vs -(TLRef i))))))))) (sn3 c t) (\lambda (H6: ((\forall (c0: C).(\forall (t0: -T).((sc3 g a1 c0 t0) \to (sn3 c0 t0)))))).(\lambda (_: ((\forall (vs: -TList).(\forall (i: nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs -(TLRef i)) a1) \to ((nf2 c0 (TLRef i)) \to ((sns3 c0 vs) \to (sc3 g a1 c0 -(THeads (Flat Appl) vs (TLRef i))))))))))).(let H8 \def H1 in (land_ind -(arity g c t (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) -\to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w -(lift1 is t)))))))) (sn3 c t) (\lambda (H9: (arity g c t (AHead a0 -a1))).(\lambda (H10: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to -(\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w -(lift1 is t)))))))))).(let H_y \def (arity_aprem g c t (AHead a0 a1) H9 O a0) -in (let H11 \def (H_y (aprem_zero a0 a1)) in (ex2_3_ind C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop j O d c)))) (\lambda (d: -C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g a0))))) (sn3 c t) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H12: (drop x2 -O x0 c)).(\lambda (H13: (arity g x0 x1 (asucc g a0))).(let H_y0 \def (H10 -(CHead x0 (Bind Abst) x1) (TLRef O) (H4 TNil O (CHead x0 (Bind Abst) x1) -(arity_abst g (CHead x0 (Bind Abst) x1) x0 x1 O (getl_refl Abst x0 x1) a0 -H13) (nf2_lref_abst (CHead x0 (Bind Abst) x1) x0 x1 O (getl_refl Abst x0 x1)) -I) (PCons (S x2) O PNil)) in (let H_y1 \def (H6 (CHead x0 (Bind Abst) x1) -(THead (Flat Appl) (TLRef O) (lift (S x2) O t)) (H_y0 (drop1_cons (CHead x0 -(Bind Abst) x1) c (S x2) O (drop_drop (Bind Abst) x2 x0 c H12 x1) c PNil -(drop1_nil c)))) in (let H_x \def (sn3_gen_flat Appl (CHead x0 (Bind Abst) -x1) (TLRef O) (lift (S x2) O t) H_y1) in (let H14 \def H_x in (land_ind (sn3 -(CHead x0 (Bind Abst) x1) (TLRef O)) (sn3 (CHead x0 (Bind Abst) x1) (lift (S -x2) O t)) (sn3 c t) (\lambda (_: (sn3 (CHead x0 (Bind Abst) x1) (TLRef -O))).(\lambda (H16: (sn3 (CHead x0 (Bind Abst) x1) (lift (S x2) O -t))).(sn3_gen_lift (CHead x0 (Bind Abst) x1) t (S x2) O H16 c (drop_drop -(Bind Abst) x2 x0 c H12 x1)))) H14)))))))))) H11))))) H8)))) H5)))) H2))))) -(\lambda (vs: TList).(\lambda (i: nat).(\lambda (c: C).(\lambda (H1: (arity g -c (THeads (Flat Appl) vs (TLRef i)) (AHead a0 a1))).(\lambda (H2: (nf2 c -(TLRef i))).(\lambda (H3: (sns3 c vs)).(conj (arity g c (THeads (Flat Appl) -vs (TLRef i)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) -\to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w -(lift1 is (THeads (Flat Appl) vs (TLRef i)))))))))) H1 (\lambda (d: -C).(\lambda (w: T).(\lambda (H4: (sc3 g a0 d w)).(\lambda (is: -PList).(\lambda (H5: (drop1 is d c)).(let H6 \def H in (land_ind (\forall -(c0: C).(\forall (t: T).((sc3 g a0 c0 t) \to (sn3 c0 t)))) (\forall (vs0: -TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) -vs0 (TLRef i0)) a0) \to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a0 -c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))) (sc3 g a1 d (THead (Flat Appl) -w (lift1 is (THeads (Flat Appl) vs (TLRef i))))) (\lambda (H7: ((\forall (c0: -C).(\forall (t: T).((sc3 g a0 c0 t) \to (sn3 c0 t)))))).(\lambda (_: -((\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 -(THeads (Flat Appl) vs0 (TLRef i0)) a0) \to ((nf2 c0 (TLRef i0)) \to ((sns3 -c0 vs0) \to (sc3 g a0 c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))))).(let H9 -\def H0 in (land_ind (\forall (c0: C).(\forall (t: T).((sc3 g a1 c0 t) \to -(sn3 c0 t)))) (\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: -C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a1) \to ((nf2 c0 (TLRef -i0)) \to ((sns3 c0 vs0) \to (sc3 g a1 c0 (THeads (Flat Appl) vs0 (TLRef -i0))))))))) (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs -(TLRef i))))) (\lambda (_: ((\forall (c0: C).(\forall (t: T).((sc3 g a1 c0 t) -\to (sn3 c0 t)))))).(\lambda (H11: ((\forall (vs0: TList).(\forall (i0: -nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a1) -\to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a1 c0 (THeads (Flat -Appl) vs0 (TLRef i0))))))))))).(let H_y \def (H11 (TCons w (lifts1 is vs))) -in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is (TLRef i))) -(\lambda (t: T).(sc3 g a1 d (THead (Flat Appl) w t))) (eq_ind_r T (TLRef -(trans is i)) (\lambda (t: T).(sc3 g a1 d (THead (Flat Appl) w (THeads (Flat -Appl) (lifts1 is vs) t)))) (H_y (trans is i) d (eq_ind T (lift1 is (TLRef i)) -(\lambda (t: T).(arity g d (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 -is vs) t)) a1)) (eq_ind T (lift1 is (THeads (Flat Appl) vs (TLRef i))) -(\lambda (t: T).(arity g d (THead (Flat Appl) w t) a1)) (arity_appl g d w a0 -(sc3_arity_gen g d w a0 H4) (lift1 is (THeads (Flat Appl) vs (TLRef i))) a1 -(arity_lift1 g (AHead a0 a1) c is d (THeads (Flat Appl) vs (TLRef i)) H5 H1)) -(THeads (Flat Appl) (lifts1 is vs) (lift1 is (TLRef i))) (lifts1_flat Appl is -(TLRef i) vs)) (TLRef (trans is i)) (lift1_lref is i)) (eq_ind T (lift1 is -(TLRef i)) (\lambda (t: T).(nf2 d t)) (nf2_lift1 c is d (TLRef i) H5 H2) -(TLRef (trans is i)) (lift1_lref is i)) (conj (sn3 d w) (sns3 d (lifts1 is -vs)) (H7 d w H4) (sns3_lifts1 c is d H5 vs H3))) (lift1 is (TLRef i)) -(lift1_lref is i)) (lift1 is (THeads (Flat Appl) vs (TLRef i))) (lifts1_flat -Appl is (TLRef i) vs))))) H9)))) H6))))))))))))))))))) a)). - -lemma sc3_sn3: - \forall (g: G).(\forall (a: A).(\forall (c: C).(\forall (t: T).((sc3 g a c -t) \to (sn3 c t))))) -\def - \lambda (g: G).(\lambda (a: A).(\lambda (c: C).(\lambda (t: T).(\lambda (H: -(sc3 g a c t)).(let H_x \def (sc3_props__sc3_sn3_abst g a) in (let H0 \def -H_x in (land_ind (\forall (c0: C).(\forall (t0: T).((sc3 g a c0 t0) \to (sn3 -c0 t0)))) (\forall (vs: TList).(\forall (i: nat).(\forall (c0: C).((arity g -c0 (THeads (Flat Appl) vs (TLRef i)) a) \to ((nf2 c0 (TLRef i)) \to ((sns3 c0 -vs) \to (sc3 g a c0 (THeads (Flat Appl) vs (TLRef i))))))))) (sn3 c t) -(\lambda (H1: ((\forall (c0: C).(\forall (t0: T).((sc3 g a c0 t0) \to (sn3 c0 -t0)))))).(\lambda (_: ((\forall (vs: TList).(\forall (i: nat).(\forall (c0: -C).((arity g c0 (THeads (Flat Appl) vs (TLRef i)) a) \to ((nf2 c0 (TLRef i)) -\to ((sns3 c0 vs) \to (sc3 g a c0 (THeads (Flat Appl) vs (TLRef -i))))))))))).(H1 c t H))) H0))))))). - -lemma sc3_abst: - \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c: C).(\forall -(i: nat).((arity g c (THeads (Flat Appl) vs (TLRef i)) a) \to ((nf2 c (TLRef -i)) \to ((sns3 c vs) \to (sc3 g a c (THeads (Flat Appl) vs (TLRef i)))))))))) -\def - \lambda (g: G).(\lambda (a: A).(\lambda (vs: TList).(\lambda (c: C).(\lambda -(i: nat).(\lambda (H: (arity g c (THeads (Flat Appl) vs (TLRef i)) -a)).(\lambda (H0: (nf2 c (TLRef i))).(\lambda (H1: (sns3 c vs)).(let H_x \def -(sc3_props__sc3_sn3_abst g a) in (let H2 \def H_x in (land_ind (\forall (c0: -C).(\forall (t: T).((sc3 g a c0 t) \to (sn3 c0 t)))) (\forall (vs0: -TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) -vs0 (TLRef i0)) a) \to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a -c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))) (sc3 g a c (THeads (Flat Appl) -vs (TLRef i))) (\lambda (_: ((\forall (c0: C).(\forall (t: T).((sc3 g a c0 t) -\to (sn3 c0 t)))))).(\lambda (H4: ((\forall (vs0: TList).(\forall (i0: -nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a) \to -((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a c0 (THeads (Flat Appl) -vs0 (TLRef i0))))))))))).(H4 vs i c H H0 H1))) H2)))))))))). - -theorem sc3_bind: - \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (a1: -A).(\forall (a2: A).(\forall (vs: TList).(\forall (c: C).(\forall (v: -T).(\forall (t: T).((sc3 g a2 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts -(S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a2 c (THeads (Flat Appl) vs -(THead (Bind b) v t))))))))))))) -\def - \lambda (g: G).(\lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda -(a1: A).(\lambda (a2: A).(A_ind (\lambda (a: A).(\forall (vs: TList).(\forall -(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads -(Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads -(Flat Appl) vs (THead (Bind b) v t)))))))))) (\lambda (n: nat).(\lambda (n0: -nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: -T).(\lambda (H0: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) -(lifts (S O) O vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat -Appl) (lifts (S O) O vs) t)))).(\lambda (H1: (sc3 g a1 c v)).(let H2 \def H0 -in (land_ind (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O -vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S -O) O vs) t)) (land (arity g c (THeads (Flat Appl) vs (THead (Bind b) v t)) -(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t)))) (\lambda -(H3: (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) -(ASort n n0))).(\lambda (H4: (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) -(lifts (S O) O vs) t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Bind -b) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t))) -(arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 H1) t vs (ASort n n0) -H3) (sn3_appls_bind b H c v (sc3_sn3 g a1 c v H1) vs t H4)))) H2)))))))))) -(\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall (c: C).(\forall -(v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads (Flat Appl) -(lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads (Flat Appl) -vs (THead (Bind b) v t))))))))))).(\lambda (a0: A).(\lambda (H1: ((\forall -(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 (CHead -c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) -\to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Bind b) v -t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda -(t: T).(\lambda (H2: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) -(lifts (S O) O vs) t) (AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a -d w) \to (\forall (is: PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g -a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) -t))))))))))).(\lambda (H3: (sc3 g a1 c v)).(let H4 \def H2 in (land_ind -(arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) -(AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall -(is: PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat -Appl) w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) t))))))))) (land -(arity g c (THeads (Flat Appl) vs (THead (Bind b) v t)) (AHead a a0)) -(\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads -(Flat Appl) vs (THead (Bind b) v t))))))))))) (\lambda (H5: (arity g (CHead c -(Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) (AHead a a0))).(\lambda -(H6: ((\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: -PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat Appl) -w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) t))))))))))).(conj (arity -g c (THeads (Flat Appl) vs (THead (Bind b) v t)) (AHead a a0)) (\forall (d: -C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) -\to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead -(Bind b) v t)))))))))) (arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 -H3) t vs (AHead a a0) H5) (\lambda (d: C).(\lambda (w: T).(\lambda (H7: (sc3 -g a d w)).(\lambda (is: PList).(\lambda (H8: (drop1 is d c)).(let H_y \def -(H1 (TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is -vs) (lift1 is (THead (Bind b) v t))) (\lambda (t0: T).(sc3 g a0 d (THead -(Flat Appl) w t0))) (eq_ind_r T (THead (Bind b) (lift1 is v) (lift1 (Ss is) -t)) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w (THeads (Flat Appl) -(lifts1 is vs) t0)))) (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind TList -(lifts1 (Ss is) (lifts (S O) O vs)) (\lambda (t0: TList).(sc3 g a0 (CHead d -(Bind b) (lift1 is v)) (THead (Flat Appl) (lift (S O) O w) (THeads (Flat -Appl) t0 (lift1 (Ss is) t))))) (eq_ind T (lift1 (Ss is) (THeads (Flat Appl) -(lifts (S O) O vs) t)) (\lambda (t0: T).(sc3 g a0 (CHead d (Bind b) (lift1 is -v)) (THead (Flat Appl) (lift (S O) O w) t0))) (H6 (CHead d (Bind b) (lift1 is -v)) (lift (S O) O w) (sc3_lift g a d w H7 (CHead d (Bind b) (lift1 is v)) (S -O) O (drop_drop (Bind b) O d d (drop_refl d) (lift1 is v))) (Ss is) -(drop1_skip_bind b c is d v H8)) (THeads (Flat Appl) (lifts1 (Ss is) (lifts -(S O) O vs)) (lift1 (Ss is) t)) (lifts1_flat Appl (Ss is) t (lifts (S O) O -vs))) (lifts (S O) O (lifts1 is vs)) (lifts1_xhg is vs)) (sc3_lift1 g c a1 is -d v H3 H8)) (lift1 is (THead (Bind b) v t)) (lift1_bind b is v t)) (lift1 is -(THeads (Flat Appl) vs (THead (Bind b) v t))) (lifts1_flat Appl is (THead -(Bind b) v t) vs))))))))))) H4)))))))))))) a2))))). - -theorem sc3_appl: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (vs: -TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a2 c (THeads -(Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: -T).((sc3 g (asucc g a1) c w) \to (sc3 g a2 c (THeads (Flat Appl) vs (THead -(Flat Appl) v (THead (Bind Abst) w t)))))))))))))) -\def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(A_ind (\lambda (a: -A).(\forall (vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 -g a c (THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) -\to (\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a c (THeads (Flat -Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))))))))))) (\lambda -(n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: -T).(\lambda (t: T).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs -(THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead -(Bind Abbr) v t))))).(\lambda (H0: (sc3 g a1 c v)).(\lambda (w: T).(\lambda -(H1: (sc3 g (asucc g a1) c w)).(let H2 \def H in (land_ind (arity g c (THeads -(Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat -Appl) vs (THead (Bind Abbr) v t))) (land (arity g c (THeads (Flat Appl) vs -(THead (Flat Appl) v (THead (Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads -(Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H3: -(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n -n0))).(\lambda (H4: (sn3 c (THeads (Flat Appl) vs (THead (Bind Abbr) v -t)))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v (THead -(Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat -Appl) v (THead (Bind Abst) w t)))) (arity_appls_appl g c v a1 (sc3_arity_gen -g c v a1 H0) w (sc3_arity_gen g c w (asucc g a1) H1) t vs (ASort n n0) H3) -(sn3_appls_beta c v t vs H4 w (sc3_sn3 g (asucc g a1) c w H1))))) -H2)))))))))))) (\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall -(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a c (THeads (Flat Appl) vs -(THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: T).((sc3 g -(asucc g a1) c w) \to (sc3 g a c (THeads (Flat Appl) vs (THead (Flat Appl) v -(THead (Bind Abst) w t)))))))))))))).(\lambda (a0: A).(\lambda (H0: ((\forall -(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 c -(THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to -(\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a0 c (THeads (Flat Appl) -vs (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))))))).(\lambda (vs: -TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H1: (land -(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (AHead a a0)) -(\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads -(Flat Appl) vs (THead (Bind Abbr) v t)))))))))))).(\lambda (H2: (sc3 g a1 c -v)).(\lambda (w: T).(\lambda (H3: (sc3 g (asucc g a1) c w)).(let H4 \def H1 -in (land_ind (arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) -(AHead a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall -(is: PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is -(THeads (Flat Appl) vs (THead (Bind Abbr) v t)))))))))) (land (arity g c -(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))) (AHead -a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is -(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w -t)))))))))))) (\lambda (H5: (arity g c (THeads (Flat Appl) vs (THead (Bind -Abbr) v t)) (AHead a a0))).(\lambda (H6: ((\forall (d: C).(\forall (w0: -T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d -(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Bind Abbr) v -t)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v -(THead (Bind Abst) w t))) (AHead a a0)) (\forall (d: C).(\forall (w0: -T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d -(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Flat Appl) v -(THead (Bind Abst) w t))))))))))) (arity_appls_appl g c v a1 (sc3_arity_gen g -c v a1 H2) w (sc3_arity_gen g c w (asucc g a1) H3) t vs (AHead a a0) H5) -(\lambda (d: C).(\lambda (w0: T).(\lambda (H7: (sc3 g a d w0)).(\lambda (is: -PList).(\lambda (H8: (drop1 is d c)).(eq_ind_r T (THeads (Flat Appl) (lifts1 -is vs) (lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t)))) (\lambda -(t0: T).(sc3 g a0 d (THead (Flat Appl) w0 t0))) (eq_ind_r T (THead (Flat -Appl) (lift1 is v) (lift1 is (THead (Bind Abst) w t))) (\lambda (t0: T).(sc3 -g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) t0)))) -(eq_ind_r T (THead (Bind Abst) (lift1 is w) (lift1 (Ss is) t)) (\lambda (t0: -T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) -(THead (Flat Appl) (lift1 is v) t0))))) (let H_y \def (H0 (TCons w0 (lifts1 -is vs))) in (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind T (lift1 is (THead -(Bind Abbr) v t)) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads -(Flat Appl) (lifts1 is vs) t0)))) (eq_ind T (lift1 is (THeads (Flat Appl) vs -(THead (Bind Abbr) v t))) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 -t0))) (H6 d w0 H7 is H8) (THeads (Flat Appl) (lifts1 is vs) (lift1 is (THead -(Bind Abbr) v t))) (lifts1_flat Appl is (THead (Bind Abbr) v t) vs)) (THead -(Bind Abbr) (lift1 is v) (lift1 (Ss is) t)) (lift1_bind Abbr is v t)) -(sc3_lift1 g c a1 is d v H2 H8) (lift1 is w) (sc3_lift1 g c (asucc g a1) is d -w H3 H8))) (lift1 is (THead (Bind Abst) w t)) (lift1_bind Abst is w t)) -(lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t))) (lift1_flat Appl is -v (THead (Bind Abst) w t))) (lift1 is (THeads (Flat Appl) vs (THead (Flat -Appl) v (THead (Bind Abst) w t)))) (lifts1_flat Appl is (THead (Flat Appl) v -(THead (Bind Abst) w t)) vs)))))))))) H4)))))))))))))) a2))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/sn3/defs.ma deleted file mode 100644 index d9ba6092c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/defs.ma +++ /dev/null @@ -1,25 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr3/defs.ma". - -inductive sn3 (c: C): T \to Prop \def -| sn3_sing: \forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2))))) \to (sn3 c t1)). - -rec definition sns3 (c: C) (ts: TList) on ts: Prop \def match ts with [TNil -\Rightarrow True | (TCons t ts0) \Rightarrow (land (sn3 c t) (sns3 c ts0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/sn3/fwd.ma deleted file mode 100644 index fe603b59c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/fwd.ma +++ /dev/null @@ -1,189 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sn3/defs.ma". - -include "basic_1/pr3/props.ma". - -implied rec lemma sn3_ind (c: C) (P: (T \to Prop)) (f: (\forall (t1: -T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall (P0: Prop).P0))) \to ((pr3 -c t1 t2) \to (sn3 c t2))))) \to (((\forall (t2: T).((((eq T t1 t2) \to -(\forall (P0: Prop).P0))) \to ((pr3 c t1 t2) \to (P t2))))) \to (P t1))))) -(t: T) (s0: sn3 c t) on s0: P t \def match s0 with [(sn3_sing t1 s1) -\Rightarrow (f t1 s1 (\lambda (t2: T).(\lambda (p: (((eq T t1 t2) \to -(\forall (P0: Prop).P0)))).(\lambda (p0: (pr3 c t1 t2)).((sn3_ind c P f) t2 -(s1 t2 p p0))))))]. - -lemma sn3_gen_bind: - \forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c -(THead (Bind b) u t)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: -(sn3 c (THead (Bind b) u t))).(insert_eq T (THead (Bind b) u t) (\lambda (t0: -T).(sn3 c t0)) (\lambda (_: T).(land (sn3 c u) (sn3 (CHead c (Bind b) u) t))) -(\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T -y (THead (Bind b) u t0)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t0)))) -(unintro T u (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Bind b) t0 x)) -\to (land (sn3 c t0) (sn3 (CHead c (Bind b) t0) x))))) (sn3_ind c (\lambda -(t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Bind b) x x0)) \to -(land (sn3 c x) (sn3 (CHead c (Bind b) x) x0)))))) (\lambda (t1: T).(\lambda -(H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 -c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) -\to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall -(x0: T).((eq T t2 (THead (Bind b) x x0)) \to (land (sn3 c x) (sn3 (CHead c -(Bind b) x) x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T -t1 (THead (Bind b) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t0: -T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c -t0 t2) \to (\forall (x1: T).(\forall (x2: T).((eq T t2 (THead (Bind b) x1 -x2)) \to (land (sn3 c x1) (sn3 (CHead c (Bind b) x1) x2))))))))) H2 (THead -(Bind b) x x0) H3) in (let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall -(t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to -(sn3 c t2))))) H1 (THead (Bind b) x x0) H3) in (conj (sn3 c x) (sn3 (CHead c -(Bind b) x) x0) (sn3_sing c x (\lambda (t2: T).(\lambda (H6: (((eq T x t2) -\to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x t2)).(let H8 \def (H4 -(THead (Bind b) t2 x0) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind -b) t2 x0))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead -_ t0 _) \Rightarrow t0])) (THead (Bind b) x x0) (THead (Bind b) t2 x0) H8) in -(let H10 \def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c x t0)) H7 x H9) in (let -H11 \def (eq_ind_r T t2 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: -Prop).P0))) H6 x H9) in (H11 (refl_equal T x) P)))))) (pr3_head_12 c x t2 H7 -(Bind b) x0 x0 (pr3_refl (CHead c (Bind b) t2) x0)) t2 x0 (refl_equal T -(THead (Bind b) t2 x0))) in (land_ind (sn3 c t2) (sn3 (CHead c (Bind b) t2) -x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda (_: (sn3 (CHead c (Bind b) -t2) x0)).H9)) H8)))))) (sn3_sing (CHead c (Bind b) x) x0 (\lambda (t2: -T).(\lambda (H6: (((eq T x0 t2) \to (\forall (P: Prop).P)))).(\lambda (H7: -(pr3 (CHead c (Bind b) x) x0 t2)).(let H8 \def (H4 (THead (Bind b) x t2) -(\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind b) x t2))).(\lambda -(P: Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) -(THead (Bind b) x x0) (THead (Bind b) x t2) H8) in (let H10 \def (eq_ind_r T -t2 (\lambda (t0: T).(pr3 (CHead c (Bind b) x) x0 t0)) H7 x0 H9) in (let H11 -\def (eq_ind_r T t2 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: -Prop).P0))) H6 x0 H9) in (H11 (refl_equal T x0) P)))))) (pr3_head_12 c x x -(pr3_refl c x) (Bind b) x0 t2 H7) x t2 (refl_equal T (THead (Bind b) x t2))) -in (land_ind (sn3 c x) (sn3 (CHead c (Bind b) x) t2) (sn3 (CHead c (Bind b) -x) t2) (\lambda (_: (sn3 c x)).(\lambda (H10: (sn3 (CHead c (Bind b) x) -t2)).H10)) H8))))))))))))))) y H0))))) H))))). - -lemma sn3_gen_flat: - \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c -(THead (Flat f) u t)) \to (land (sn3 c u) (sn3 c t)))))) -\def - \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: -(sn3 c (THead (Flat f) u t))).(insert_eq T (THead (Flat f) u t) (\lambda (t0: -T).(sn3 c t0)) (\lambda (_: T).(land (sn3 c u) (sn3 c t))) (\lambda (y: -T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T y (THead -(Flat f) u t0)) \to (land (sn3 c u) (sn3 c t0)))) (unintro T u (\lambda (t0: -T).(\forall (x: T).((eq T y (THead (Flat f) t0 x)) \to (land (sn3 c t0) (sn3 -c x))))) (sn3_ind c (\lambda (t0: T).(\forall (x: T).(\forall (x0: T).((eq T -t0 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0)))))) (\lambda (t1: -T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat f) x x0)) \to (land -(sn3 c x) (sn3 c x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: -(eq T t1 (THead (Flat f) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t0: -T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c -t0 t2) \to (\forall (x1: T).(\forall (x2: T).((eq T t2 (THead (Flat f) x1 -x2)) \to (land (sn3 c x1) (sn3 c x2))))))))) H2 (THead (Flat f) x x0) H3) in -(let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) -\to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2))))) H1 (THead -(Flat f) x x0) H3) in (conj (sn3 c x) (sn3 c x0) (sn3_sing c x (\lambda (t2: -T).(\lambda (H6: (((eq T x t2) \to (\forall (P: Prop).P)))).(\lambda (H7: -(pr3 c x t2)).(let H8 \def (H4 (THead (Flat f) t2 x0) (\lambda (H8: (eq T -(THead (Flat f) x x0) (THead (Flat f) t2 x0))).(\lambda (P: Prop).(let H9 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | -(TLRef _) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Flat f) x -x0) (THead (Flat f) t2 x0) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: -T).(pr3 c x t0)) H7 x H9) in (let H11 \def (eq_ind_r T t2 (\lambda (t0: -T).((eq T x t0) \to (\forall (P0: Prop).P0))) H6 x H9) in (H11 (refl_equal T -x) P)))))) (pr3_head_12 c x t2 H7 (Flat f) x0 x0 (pr3_refl (CHead c (Flat f) -t2) x0)) t2 x0 (refl_equal T (THead (Flat f) t2 x0))) in (land_ind (sn3 c t2) -(sn3 c x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda (_: (sn3 c x0)).H9)) -H8)))))) (sn3_sing c x0 (\lambda (t2: T).(\lambda (H6: (((eq T x0 t2) \to -(\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x0 t2)).(let H8 \def (H4 (THead -(Flat f) x t2) (\lambda (H8: (eq T (THead (Flat f) x x0) (THead (Flat f) x -t2))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) -\Rightarrow t0])) (THead (Flat f) x x0) (THead (Flat f) x t2) H8) in (let H10 -\def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c x0 t0)) H7 x0 H9) in (let H11 -\def (eq_ind_r T t2 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: -Prop).P0))) H6 x0 H9) in (H11 (refl_equal T x0) P)))))) (pr3_thin_dx c x0 t2 -H7 x f) x t2 (refl_equal T (THead (Flat f) x t2))) in (land_ind (sn3 c x) -(sn3 c t2) (sn3 c t2) (\lambda (_: (sn3 c x)).(\lambda (H10: (sn3 c -t2)).H10)) H8))))))))))))))) y H0))))) H))))). - -lemma sn3_gen_head: - \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c -(THead k u t)) \to (sn3 c u))))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (c: C).(\forall (u: -T).(\forall (t: T).((sn3 c (THead k0 u t)) \to (sn3 c u)))))) (\lambda (b: -B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead -(Bind b) u t))).(let H_x \def (sn3_gen_bind b c u t H) in (let H0 \def H_x in -(land_ind (sn3 c u) (sn3 (CHead c (Bind b) u) t) (sn3 c u) (\lambda (H1: (sn3 -c u)).(\lambda (_: (sn3 (CHead c (Bind b) u) t)).H1)) H0)))))))) (\lambda (f: -F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead -(Flat f) u t))).(let H_x \def (sn3_gen_flat f c u t H) in (let H0 \def H_x in -(land_ind (sn3 c u) (sn3 c t) (sn3 c u) (\lambda (H1: (sn3 c u)).(\lambda (_: -(sn3 c t)).H1)) H0)))))))) k). - -lemma sn3_gen_cflat: - \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 (CHead -c (Flat f) u) t) \to (sn3 c t))))) -\def - \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: -(sn3 (CHead c (Flat f) u) t)).(sn3_ind (CHead c (Flat f) u) (\lambda (t0: -T).(sn3 c t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 -t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to -(sn3 (CHead c (Flat f) u) t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T -t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to -(sn3 c t2)))))).(sn3_sing c t1 (\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) -\to (\forall (P: Prop).P)))).(\lambda (H3: (pr3 c t1 t2)).(H1 t2 H2 -(pr3_cflat c t1 t2 H3 f u))))))))) t H))))). - -lemma sn3_gen_lift: - \forall (c1: C).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((sn3 c1 -(lift h d t)) \to (\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t))))))) -\def - \lambda (c1: C).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H: (sn3 c1 (lift h d t))).(insert_eq T (lift h d t) (\lambda (t0: T).(sn3 c1 -t0)) (\lambda (_: T).(\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t)))) -(\lambda (y: T).(\lambda (H0: (sn3 c1 y)).(unintro T t (\lambda (t0: T).((eq -T y (lift h d t0)) \to (\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t0))))) -(sn3_ind c1 (\lambda (t0: T).(\forall (x: T).((eq T t0 (lift h d x)) \to -(\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 x)))))) (\lambda (t1: -T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c1 t1 t2) \to (sn3 c1 t2)))))).(\lambda (H2: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c1 t1 t2) \to -(\forall (x: T).((eq T t2 (lift h d x)) \to (\forall (c2: C).((drop h d c1 -c2) \to (sn3 c2 x)))))))))).(\lambda (x: T).(\lambda (H3: (eq T t1 (lift h d -x))).(\lambda (c2: C).(\lambda (H4: (drop h d c1 c2)).(let H5 \def (eq_ind T -t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c1 t0 t2) \to (\forall (x0: T).((eq T t2 (lift h d x0)) -\to (\forall (c3: C).((drop h d c1 c3) \to (sn3 c3 x0))))))))) H2 (lift h d -x) H3) in (let H6 \def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq -T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c1 t0 t2) \to (sn3 c1 t2))))) -H1 (lift h d x) H3) in (sn3_sing c2 x (\lambda (t2: T).(\lambda (H7: (((eq T -x t2) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr3 c2 x t2)).(H5 (lift h d -t2) (\lambda (H9: (eq T (lift h d x) (lift h d t2))).(\lambda (P: Prop).(let -H10 \def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c2 x t0)) H8 x (lift_inj x t2 h -d H9)) in (let H11 \def (eq_ind_r T t2 (\lambda (t0: T).((eq T x t0) \to -(\forall (P0: Prop).P0))) H7 x (lift_inj x t2 h d H9)) in (H11 (refl_equal T -x) P))))) (pr3_lift c1 c2 h d H4 x t2 H8) t2 (refl_equal T (lift h d t2)) c2 -H4)))))))))))))) y H0)))) H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1/sn3/lift1.ma deleted file mode 100644 index 71d9e93fe..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/lift1.ma +++ /dev/null @@ -1,43 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sn3/props.ma". - -include "basic_1/drop1/fwd.ma". - -include "basic_1/lift1/props.ma". - -lemma sns3_lifts1: - \forall (e: C).(\forall (hds: PList).(\forall (c: C).((drop1 hds c e) \to -(\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 hds ts))))))) -\def - \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall -(c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c -(lifts1 p ts))))))) (\lambda (c: C).(\lambda (H: (drop1 PNil c e)).(\lambda -(ts: TList).(\lambda (H0: (sns3 e ts)).(let H_y \def (drop1_gen_pnil c e H) -in (eq_ind_r C e (\lambda (c0: C).(sns3 c0 (lifts1 PNil ts))) (eq_ind_r TList -ts (\lambda (t: TList).(sns3 e t)) H0 (lifts1 PNil ts) (lifts1_nil ts)) c -H_y)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda -(H: ((\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to -(sns3 c (lifts1 p ts)))))))).(\lambda (c: C).(\lambda (H0: (drop1 (PCons n n0 -p) c e)).(\lambda (ts: TList).(\lambda (H1: (sns3 e ts)).(let H_x \def -(drop1_gen_pcons c e p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda -(c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 e)) (sns3 c (lifts1 -(PCons n n0 p) ts)) (\lambda (x: C).(\lambda (H3: (drop n n0 c x)).(\lambda -(H4: (drop1 p x e)).(eq_ind_r TList (lifts n n0 (lifts1 p ts)) (\lambda (t: -TList).(sns3 c t)) (sns3_lifts c x n n0 H3 (lifts1 p ts) (H x H4 ts H1)) -(lifts1 (PCons n n0 p) ts) (lifts1_cons n n0 p ts))))) H2))))))))))) hds)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1/sn3/nf2.ma deleted file mode 100644 index e00736172..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/nf2.ma +++ /dev/null @@ -1,60 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sn3/fwd.ma". - -include "basic_1/nf2/dec.ma". - -include "basic_1/nf2/pr3.ma". - -lemma sn3_nf2: - \forall (c: C).(\forall (t: T).((nf2 c t) \to (sn3 c t))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (H: (nf2 c t)).(sn3_sing c t -(\lambda (t2: T).(\lambda (H0: (((eq T t t2) \to (\forall (P: -Prop).P)))).(\lambda (H1: (pr3 c t t2)).(let H_y \def (nf2_pr3_unfold c t t2 -H1 H) in (let H2 \def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c t t0)) H1 t H_y) -in (let H3 \def (eq_ind_r T t2 (\lambda (t0: T).((eq T t t0) \to (\forall (P: -Prop).P))) H0 t H_y) in (eq_ind T t (\lambda (t0: T).(sn3 c t0)) (H3 -(refl_equal T t) (sn3 c t)) t2 H_y)))))))))). - -lemma nf2_sn3: - \forall (c: C).(\forall (t: T).((sn3 c t) \to (ex2 T (\lambda (u: T).(pr3 c -t u)) (\lambda (u: T).(nf2 c u))))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (H: (sn3 c t)).(sn3_ind c (\lambda -(t0: T).(ex2 T (\lambda (u: T).(pr3 c t0 u)) (\lambda (u: T).(nf2 c u)))) -(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(ex2 T (\lambda (u: T).(pr3 c t2 u)) (\lambda (u: T).(nf2 c u)))))))).(let -H_x \def (nf2_dec c t1) in (let H2 \def H_x in (or_ind (nf2 c t1) (ex2 T -(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr2 c t1 t2))) (ex2 T (\lambda (u: T).(pr3 c t1 u)) (\lambda (u: T).(nf2 -c u))) (\lambda (H3: (nf2 c t1)).(ex_intro2 T (\lambda (u: T).(pr3 c t1 u)) -(\lambda (u: T).(nf2 c u)) t1 (pr3_refl c t1) H3)) (\lambda (H3: (ex2 T -(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr2 c t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr2 c t1 t2)) (ex2 T (\lambda (u: T).(pr3 c -t1 u)) (\lambda (u: T).(nf2 c u))) (\lambda (x: T).(\lambda (H4: (((eq T t1 -x) \to (\forall (P: Prop).P)))).(\lambda (H5: (pr2 c t1 x)).(let H_y \def (H1 -x H4) in (let H6 \def (H_y (pr3_pr2 c t1 x H5)) in (ex2_ind T (\lambda (u: -T).(pr3 c x u)) (\lambda (u: T).(nf2 c u)) (ex2 T (\lambda (u: T).(pr3 c t1 -u)) (\lambda (u: T).(nf2 c u))) (\lambda (x0: T).(\lambda (H7: (pr3 c x -x0)).(\lambda (H8: (nf2 c x0)).(ex_intro2 T (\lambda (u: T).(pr3 c t1 u)) -(\lambda (u: T).(nf2 c u)) x0 (pr3_sing c x t1 H5 x0 H7) H8)))) H6)))))) H3)) -H2)))))) t H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sn3/props.ma b/matita/matita/contribs/lambdadelta/basic_1/sn3/props.ma deleted file mode 100644 index 1e1406155..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sn3/props.ma +++ /dev/null @@ -1,2403 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sn3/nf2.ma". - -include "basic_1/nf2/iso.ma". - -include "basic_1/pr3/iso.ma". - -lemma sn3_pr3_trans: - \forall (c: C).(\forall (t1: T).((sn3 c t1) \to (\forall (t2: T).((pr3 c t1 -t2) \to (sn3 c t2))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (H: (sn3 c t1)).(sn3_ind c (\lambda -(t: T).(\forall (t2: T).((pr3 c t t2) \to (sn3 c t2)))) (\lambda (t2: -T).(\lambda (H0: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: -Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H1: ((\forall -(t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to -(\forall (t4: T).((pr3 c t3 t4) \to (sn3 c t4)))))))).(\lambda (t3: -T).(\lambda (H2: (pr3 c t2 t3)).(sn3_sing c t3 (\lambda (t0: T).(\lambda (H3: -(((eq T t3 t0) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr3 c t3 t0)).(let -H_x \def (term_dec t2 t3) in (let H5 \def H_x in (or_ind (eq T t2 t3) ((eq T -t2 t3) \to (\forall (P: Prop).P)) (sn3 c t0) (\lambda (H6: (eq T t2 t3)).(let -H7 \def (eq_ind_r T t3 (\lambda (t: T).(pr3 c t t0)) H4 t2 H6) in (let H8 -\def (eq_ind_r T t3 (\lambda (t: T).((eq T t t0) \to (\forall (P: Prop).P))) -H3 t2 H6) in (let H9 \def (eq_ind_r T t3 (\lambda (t: T).(pr3 c t2 t)) H2 t2 -H6) in (H0 t0 H8 H7))))) (\lambda (H6: (((eq T t2 t3) \to (\forall (P: -Prop).P)))).(H1 t3 H6 H2 t0 H4)) H5)))))))))))) t1 H))). - -lemma sn3_pr2_intro: - \forall (c: C).(\forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to -(\forall (P: Prop).P))) \to ((pr2 c t1 t2) \to (sn3 c t2))))) \to (sn3 c t1))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (H: ((\forall (t2: T).((((eq T t1 -t2) \to (\forall (P: Prop).P))) \to ((pr2 c t1 t2) \to (sn3 c -t2)))))).(sn3_sing c t1 (\lambda (t2: T).(\lambda (H0: (((eq T t1 t2) \to -(\forall (P: Prop).P)))).(\lambda (H1: (pr3 c t1 t2)).(let H2 \def H0 in -((let H3 \def H in (pr3_ind c (\lambda (t: T).(\lambda (t0: T).(((\forall -(t3: T).((((eq T t t3) \to (\forall (P: Prop).P))) \to ((pr2 c t t3) \to (sn3 -c t3))))) \to ((((eq T t t0) \to (\forall (P: Prop).P))) \to (sn3 c t0))))) -(\lambda (t: T).(\lambda (H4: ((\forall (t3: T).((((eq T t t3) \to (\forall -(P: Prop).P))) \to ((pr2 c t t3) \to (sn3 c t3)))))).(\lambda (H5: (((eq T t -t) \to (\forall (P: Prop).P)))).(H4 t H5 (pr2_free c t t (pr0_refl t)))))) -(\lambda (t3: T).(\lambda (t4: T).(\lambda (H4: (pr2 c t4 t3)).(\lambda (t5: -T).(\lambda (H5: (pr3 c t3 t5)).(\lambda (H6: ((((\forall (t6: T).((((eq T t3 -t6) \to (\forall (P: Prop).P))) \to ((pr2 c t3 t6) \to (sn3 c t6))))) \to -((((eq T t3 t5) \to (\forall (P: Prop).P))) \to (sn3 c t5))))).(\lambda (H7: -((\forall (t6: T).((((eq T t4 t6) \to (\forall (P: Prop).P))) \to ((pr2 c t4 -t6) \to (sn3 c t6)))))).(\lambda (H8: (((eq T t4 t5) \to (\forall (P: -Prop).P)))).(let H_x \def (term_dec t4 t3) in (let H9 \def H_x in (or_ind (eq -T t4 t3) ((eq T t4 t3) \to (\forall (P: Prop).P)) (sn3 c t5) (\lambda (H10: -(eq T t4 t3)).(let H11 \def (eq_ind T t4 (\lambda (t: T).((eq T t t5) \to -(\forall (P: Prop).P))) H8 t3 H10) in (let H12 \def (eq_ind T t4 (\lambda (t: -T).(\forall (t6: T).((((eq T t t6) \to (\forall (P: Prop).P))) \to ((pr2 c t -t6) \to (sn3 c t6))))) H7 t3 H10) in (let H13 \def (eq_ind T t4 (\lambda (t: -T).(pr2 c t t3)) H4 t3 H10) in (H6 H12 H11))))) (\lambda (H10: (((eq T t4 t3) -\to (\forall (P: Prop).P)))).(sn3_pr3_trans c t3 (H7 t3 H10 H4) t5 H5)) -H9))))))))))) t1 t2 H1 H3)) H2)))))))). - -theorem sn3_cast: - \forall (c: C).(\forall (u: T).((sn3 c u) \to (\forall (t: T).((sn3 c t) \to -(sn3 c (THead (Flat Cast) u t)))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (H: (sn3 c u)).(sn3_ind c (\lambda -(t: T).(\forall (t0: T).((sn3 c t0) \to (sn3 c (THead (Flat Cast) t t0))))) -(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(\forall (t: T).((sn3 c t) \to (sn3 c (THead (Flat Cast) t2 -t))))))))).(\lambda (t: T).(\lambda (H2: (sn3 c t)).(sn3_ind c (\lambda (t0: -T).(sn3 c (THead (Flat Cast) t1 t0))) (\lambda (t0: T).(\lambda (H3: -((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 -t2) \to (sn3 c t2)))))).(\lambda (H4: ((\forall (t2: T).((((eq T t0 t2) \to -(\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c (THead (Flat Cast) t1 -t2))))))).(sn3_pr2_intro c (THead (Flat Cast) t1 t0) (\lambda (t2: -T).(\lambda (H5: (((eq T (THead (Flat Cast) t1 t0) t2) \to (\forall (P: -Prop).P)))).(\lambda (H6: (pr2 c (THead (Flat Cast) t1 t0) t2)).(let H7 \def -(pr2_gen_cast c t1 t0 t2 H6) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t0 t3)))) (pr2 c -t0 t2) (sn3 c t2) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t0 -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c t0 t3))) (sn3 c t2) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H9: (eq T t2 (THead (Flat Cast) x0 -x1))).(\lambda (H10: (pr2 c t1 x0)).(\lambda (H11: (pr2 c t0 x1)).(let H12 -\def (eq_ind T t2 (\lambda (t3: T).((eq T (THead (Flat Cast) t1 t0) t3) \to -(\forall (P: Prop).P))) H5 (THead (Flat Cast) x0 x1) H9) in (eq_ind_r T -(THead (Flat Cast) x0 x1) (\lambda (t3: T).(sn3 c t3)) (let H_x \def -(term_dec x0 t1) in (let H13 \def H_x in (or_ind (eq T x0 t1) ((eq T x0 t1) -\to (\forall (P: Prop).P)) (sn3 c (THead (Flat Cast) x0 x1)) (\lambda (H14: -(eq T x0 t1)).(let H15 \def (eq_ind T x0 (\lambda (t3: T).((eq T (THead (Flat -Cast) t1 t0) (THead (Flat Cast) t3 x1)) \to (\forall (P: Prop).P))) H12 t1 -H14) in (let H16 \def (eq_ind T x0 (\lambda (t3: T).(pr2 c t1 t3)) H10 t1 -H14) in (eq_ind_r T t1 (\lambda (t3: T).(sn3 c (THead (Flat Cast) t3 x1))) -(let H_x0 \def (term_dec t0 x1) in (let H17 \def H_x0 in (or_ind (eq T t0 x1) -((eq T t0 x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Cast) t1 x1)) -(\lambda (H18: (eq T t0 x1)).(let H19 \def (eq_ind_r T x1 (\lambda (t3: -T).((eq T (THead (Flat Cast) t1 t0) (THead (Flat Cast) t1 t3)) \to (\forall -(P: Prop).P))) H15 t0 H18) in (let H20 \def (eq_ind_r T x1 (\lambda (t3: -T).(pr2 c t0 t3)) H11 t0 H18) in (eq_ind T t0 (\lambda (t3: T).(sn3 c (THead -(Flat Cast) t1 t3))) (H19 (refl_equal T (THead (Flat Cast) t1 t0)) (sn3 c -(THead (Flat Cast) t1 t0))) x1 H18)))) (\lambda (H18: (((eq T t0 x1) \to -(\forall (P: Prop).P)))).(H4 x1 H18 (pr3_pr2 c t0 x1 H11))) H17))) x0 H14)))) -(\lambda (H14: (((eq T x0 t1) \to (\forall (P: Prop).P)))).(H1 x0 (\lambda -(H15: (eq T t1 x0)).(\lambda (P: Prop).(let H16 \def (eq_ind_r T x0 (\lambda -(t3: T).((eq T t3 t1) \to (\forall (P0: Prop).P0))) H14 t1 H15) in (let H17 -\def (eq_ind_r T x0 (\lambda (t3: T).((eq T (THead (Flat Cast) t1 t0) (THead -(Flat Cast) t3 x1)) \to (\forall (P0: Prop).P0))) H12 t1 H15) in (let H18 -\def (eq_ind_r T x0 (\lambda (t3: T).(pr2 c t1 t3)) H10 t1 H15) in (H16 -(refl_equal T t1) P)))))) (pr3_pr2 c t1 x0 H10) x1 (let H_x0 \def (term_dec -t0 x1) in (let H15 \def H_x0 in (or_ind (eq T t0 x1) ((eq T t0 x1) \to -(\forall (P: Prop).P)) (sn3 c x1) (\lambda (H16: (eq T t0 x1)).(let H17 \def -(eq_ind_r T x1 (\lambda (t3: T).((eq T (THead (Flat Cast) t1 t0) (THead (Flat -Cast) x0 t3)) \to (\forall (P: Prop).P))) H12 t0 H16) in (let H18 \def -(eq_ind_r T x1 (\lambda (t3: T).(pr2 c t0 t3)) H11 t0 H16) in (eq_ind T t0 -(\lambda (t3: T).(sn3 c t3)) (sn3_sing c t0 H3) x1 H16)))) (\lambda (H16: -(((eq T t0 x1) \to (\forall (P: Prop).P)))).(H3 x1 H16 (pr3_pr2 c t0 x1 -H11))) H15))))) H13))) t2 H9))))))) H8)) (\lambda (H8: (pr2 c t0 -t2)).(sn3_pr3_trans c t0 (sn3_sing c t0 H3) t2 (pr3_pr2 c t0 t2 H8))) -H7))))))))) t H2)))))) u H))). - -lemma sn3_cflat: - \forall (c: C).(\forall (t: T).((sn3 c t) \to (\forall (f: F).(\forall (u: -T).(sn3 (CHead c (Flat f) u) t))))) -\def - \lambda (c: C).(\lambda (t: T).(\lambda (H: (sn3 c t)).(\lambda (f: -F).(\lambda (u: T).(sn3_ind c (\lambda (t0: T).(sn3 (CHead c (Flat f) u) t0)) -(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(sn3 (CHead c (Flat f) u) t2)))))).(sn3_pr2_intro (CHead c (Flat f) u) t1 -(\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) \to (\forall (P: -Prop).P)))).(\lambda (H3: (pr2 (CHead c (Flat f) u) t1 t2)).(H1 t2 H2 -(pr3_pr2 c t1 t2 (pr2_gen_cflat f c u t1 t2 H3)))))))))) t H))))). - -lemma sn3_shift: - \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c -(THead (Bind b) v t)) \to (sn3 (CHead c (Bind b) v) t))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: -(sn3 c (THead (Bind b) v t))).(let H_x \def (sn3_gen_bind b c v t H) in (let -H0 \def H_x in (land_ind (sn3 c v) (sn3 (CHead c (Bind b) v) t) (sn3 (CHead c -(Bind b) v) t) (\lambda (_: (sn3 c v)).(\lambda (H2: (sn3 (CHead c (Bind b) -v) t)).H2)) H0))))))). - -lemma sn3_change: - \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: -T).(\forall (t: T).((sn3 (CHead c (Bind b) v1) t) \to (\forall (v2: T).(sn3 -(CHead c (Bind b) v2) t))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda -(v1: T).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c (Bind b) v1) t)).(\lambda -(v2: T).(sn3_ind (CHead c (Bind b) v1) (\lambda (t0: T).(sn3 (CHead c (Bind -b) v2) t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) -\to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to (sn3 -(CHead c (Bind b) v1) t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 -t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to -(sn3 (CHead c (Bind b) v2) t2)))))).(sn3_pr2_intro (CHead c (Bind b) v2) t1 -(\lambda (t2: T).(\lambda (H3: (((eq T t1 t2) \to (\forall (P: -Prop).P)))).(\lambda (H4: (pr2 (CHead c (Bind b) v2) t1 t2)).(H2 t2 H3 -(pr3_pr2 (CHead c (Bind b) v1) t1 t2 (pr2_change b H c v2 t1 t2 H4 -v1)))))))))) t H0))))))). - -lemma sn3_gen_def: - \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) v)) \to ((sn3 c (TLRef i)) \to (sn3 d v)))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 c (TLRef -i))).(sn3_gen_lift c v (S i) O (sn3_pr3_trans c (TLRef i) H0 (lift (S i) O v) -(pr3_pr2 c (TLRef i) (lift (S i) O v) (pr2_delta c d v i H (TLRef i) (TLRef -i) (pr0_refl (TLRef i)) (lift (S i) O v) (subst0_lref v i)))) d (getl_drop -Abbr c d v i H))))))). - -lemma sn3_cdelta: - \forall (v: T).(\forall (t: T).(\forall (i: nat).(((\forall (w: T).(ex T -(\lambda (u: T).(subst0 i w t u))))) \to (\forall (c: C).(\forall (d: -C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to (sn3 d v)))))))) -\def - \lambda (v: T).(\lambda (t: T).(\lambda (i: nat).(\lambda (H: ((\forall (w: -T).(ex T (\lambda (u: T).(subst0 i w t u)))))).(let H_x \def (H v) in (let H0 -\def H_x in (ex_ind T (\lambda (u: T).(subst0 i v t u)) (\forall (c: -C).(\forall (d: C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to -(sn3 d v))))) (\lambda (x: T).(\lambda (H1: (subst0 i v t x)).(subst0_ind -(\lambda (n: nat).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: T).(\forall -(c: C).(\forall (d: C).((getl n c (CHead d (Bind Abbr) t0)) \to ((sn3 c t1) -\to (sn3 d t0))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (c: -C).(\lambda (d: C).(\lambda (H2: (getl i0 c (CHead d (Bind Abbr) -v0))).(\lambda (H3: (sn3 c (TLRef i0))).(sn3_gen_def c d v0 i0 H2 H3))))))) -(\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: -nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: -C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to -(sn3 d v0))))))).(\lambda (t0: T).(\lambda (k: K).(\lambda (c: C).(\lambda -(d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) v0))).(\lambda (H5: (sn3 -c (THead k u1 t0))).(let H_y \def (sn3_gen_head k c u1 t0 H5) in (H3 c d H4 -H_y)))))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda (t2: T).(\lambda -(t1: T).(\lambda (i0: nat).(\lambda (H2: (subst0 (s k i0) v0 t1 t2)).(\lambda -(H3: ((\forall (c: C).(\forall (d: C).((getl (s k i0) c (CHead d (Bind Abbr) -v0)) \to ((sn3 c t1) \to (sn3 d v0))))))).(\lambda (u: T).(\lambda (c: -C).(\lambda (d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) -v0))).(\lambda (H5: (sn3 c (THead k u t1))).(K_ind (\lambda (k0: K).((subst0 -(s k0 i0) v0 t1 t2) \to (((\forall (c0: C).(\forall (d0: C).((getl (s k0 i0) -c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0)))))) \to ((sn3 -c (THead k0 u t1)) \to (sn3 d v0))))) (\lambda (b: B).(\lambda (_: (subst0 (s -(Bind b) i0) v0 t1 t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: -C).((getl (s (Bind b) i0) c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to -(sn3 d0 v0))))))).(\lambda (H8: (sn3 c (THead (Bind b) u t1))).(let H_x0 \def -(sn3_gen_bind b c u t1 H8) in (let H9 \def H_x0 in (land_ind (sn3 c u) (sn3 -(CHead c (Bind b) u) t1) (sn3 d v0) (\lambda (_: (sn3 c u)).(\lambda (H11: -(sn3 (CHead c (Bind b) u) t1)).(H7 (CHead c (Bind b) u) d (getl_clear_bind b -(CHead c (Bind b) u) c u (clear_bind b c u) (CHead d (Bind Abbr) v0) i0 H4) -H11))) H9))))))) (\lambda (f: F).(\lambda (_: (subst0 (s (Flat f) i0) v0 t1 -t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: C).((getl (s (Flat f) i0) -c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0))))))).(\lambda -(H8: (sn3 c (THead (Flat f) u t1))).(let H_x0 \def (sn3_gen_flat f c u t1 H8) -in (let H9 \def H_x0 in (land_ind (sn3 c u) (sn3 c t1) (sn3 d v0) (\lambda -(_: (sn3 c u)).(\lambda (H11: (sn3 c t1)).(H7 c d H4 H11))) H9))))))) k H2 H3 -H5))))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda -(i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: -C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to -(sn3 d v0))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: ((\forall (c: C).(\forall (d: -C).((getl (s k i0) c (CHead d (Bind Abbr) v0)) \to ((sn3 c t1) \to (sn3 d -v0))))))).(\lambda (c: C).(\lambda (d: C).(\lambda (H6: (getl i0 c (CHead d -(Bind Abbr) v0))).(\lambda (H7: (sn3 c (THead k u1 t1))).(let H_y \def -(sn3_gen_head k c u1 t1 H7) in (H3 c d H6 H_y))))))))))))))))) i v t x H1))) -H0)))))). - -lemma sn3_cpr3_trans: - \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall -(k: K).(\forall (t: T).((sn3 (CHead c k u1) t) \to (sn3 (CHead c k u2) -t))))))) -\def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 -u2)).(\lambda (k: K).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c k u1) -t)).(sn3_ind (CHead c k u1) (\lambda (t0: T).(sn3 (CHead c k u2) t0)) -(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u1) -t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u2) -t2)))))).(sn3_sing (CHead c k u2) t1 (\lambda (t2: T).(\lambda (H3: (((eq T -t1 t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr3 (CHead c k u2) t1 -t2)).(H2 t2 H3 (pr3_pr3_pr3_t c u1 u2 H t1 t2 k H4))))))))) t H0))))))). - -theorem sn3_bind: - \forall (b: B).(\forall (c: C).(\forall (u: T).((sn3 c u) \to (\forall (t: -T).((sn3 (CHead c (Bind b) u) t) \to (sn3 c (THead (Bind b) u t))))))) -\def - \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (sn3 c -u)).(sn3_ind c (\lambda (t: T).(\forall (t0: T).((sn3 (CHead c (Bind b) t) -t0) \to (sn3 c (THead (Bind b) t t0))))) (\lambda (t1: T).(\lambda (_: -((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 -t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to -(\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (t: T).((sn3 (CHead c -(Bind b) t2) t) \to (sn3 c (THead (Bind b) t2 t))))))))).(\lambda (t: -T).(\lambda (H2: (sn3 (CHead c (Bind b) t1) t)).(sn3_ind (CHead c (Bind b) -t1) (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (\lambda (t2: -T).(\lambda (H3: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: -Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 (CHead c (Bind b) -t1) t3)))))).(\lambda (H4: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: -Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 c (THead (Bind b) -t1 t3))))))).(sn3_sing c (THead (Bind b) t1 t2) (\lambda (t3: T).(\lambda -(H5: (((eq T (THead (Bind b) t1 t2) t3) \to (\forall (P: Prop).P)))).(\lambda -(H6: (pr3 c (THead (Bind b) t1 t2) t3)).(let H_x \def (bind_dec_not b Abst) -in (let H7 \def H_x in (or_ind (eq B b Abst) (not (eq B b Abst)) (sn3 c t3) -(\lambda (H8: (eq B b Abst)).(let H9 \def (eq_ind B b (\lambda (b0: B).(pr3 c -(THead (Bind b0) t1 t2) t3)) H6 Abst H8) in (let H10 \def (eq_ind B b -(\lambda (b0: B).((eq T (THead (Bind b0) t1 t2) t3) \to (\forall (P: -Prop).P))) H5 Abst H8) in (let H11 \def (eq_ind B b (\lambda (b0: B).(\forall -(t4: T).((((eq T t2 t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind -b0) t1) t2 t4) \to (sn3 c (THead (Bind b0) t1 t4)))))) H4 Abst H8) in (let -H12 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T t2 t4) \to -(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) t2 t4) \to (sn3 -(CHead c (Bind b0) t1) t4))))) H3 Abst H8) in (let H13 \def (eq_ind B b -(\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) \to (\forall (P: Prop).P))) -\to ((pr3 c t1 t4) \to (\forall (t0: T).((sn3 (CHead c (Bind b0) t4) t0) \to -(sn3 c (THead (Bind b0) t4 t0)))))))) H1 Abst H8) in (let H14 \def -(pr3_gen_abst c t1 t2 t3 H9) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall -(u0: T).(pr3 (CHead c (Bind b0) u0) t2 t4))))) (sn3 c t3) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H15: (eq T t3 (THead (Bind Abst) x0 -x1))).(\lambda (H16: (pr3 c t1 x0)).(\lambda (H17: ((\forall (b0: B).(\forall -(u0: T).(pr3 (CHead c (Bind b0) u0) t2 x1))))).(let H18 \def (eq_ind T t3 -(\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) t0) \to (\forall (P: -Prop).P))) H10 (THead (Bind Abst) x0 x1) H15) in (eq_ind_r T (THead (Bind -Abst) x0 x1) (\lambda (t0: T).(sn3 c t0)) (let H_x0 \def (term_dec t1 x0) in -(let H19 \def H_x0 in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: -Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H20: (eq T t1 x0)).(let -H21 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) -(THead (Bind Abst) t0 x1)) \to (\forall (P: Prop).P))) H18 t1 H20) in (let -H22 \def (eq_ind_r T x0 (\lambda (t0: T).(pr3 c t1 t0)) H16 t1 H20) in -(eq_ind T t1 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t0 x1))) (let H_x1 -\def (term_dec t2 x1) in (let H23 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 -x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind Abst) t1 x1)) (\lambda -(H24: (eq T t2 x1)).(let H25 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T -(THead (Bind Abst) t1 t2) (THead (Bind Abst) t1 t0)) \to (\forall (P: -Prop).P))) H21 t2 H24) in (let H26 \def (eq_ind_r T x1 (\lambda (t0: -T).(\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) -H17 t2 H24) in (eq_ind T t2 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t1 -t0))) (H25 (refl_equal T (THead (Bind Abst) t1 t2)) (sn3 c (THead (Bind Abst) -t1 t2))) x1 H24)))) (\lambda (H24: (((eq T t2 x1) \to (\forall (P: -Prop).P)))).(H11 x1 H24 (H17 Abst t1))) H23))) x0 H20)))) (\lambda (H20: -(((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x1 \def (term_dec t2 x1) -in (let H21 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: -Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H22: (eq T t2 x1)).(let -H23 \def (eq_ind_r T x1 (\lambda (t0: T).(\forall (b0: B).(\forall (u0: -T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) H17 t2 H22) in (eq_ind T t2 (\lambda -(t0: T).(sn3 c (THead (Bind Abst) x0 t0))) (H13 x0 H20 H16 t2 (sn3_cpr3_trans -c t1 x0 H16 (Bind Abst) t2 (sn3_sing (CHead c (Bind Abst) t1) t2 H12))) x1 -H22))) (\lambda (H22: (((eq T t2 x1) \to (\forall (P: Prop).P)))).(H13 x0 H20 -H16 x1 (sn3_cpr3_trans c t1 x0 H16 (Bind Abst) x1 (H12 x1 H22 (H17 Abst -t1))))) H21)))) H19))) t3 H15))))))) H14)))))))) (\lambda (H8: (not (eq B b -Abst))).(let H_x0 \def (pr3_gen_bind b H8 c t1 t2 t3 H6) in (let H9 \def H_x0 -in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) t2 t4)))) (pr3 (CHead c (Bind -b) t1) t2 (lift (S O) O t3)) (sn3 c t3) (\lambda (H10: (ex3_2 T T (\lambda -(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 -(CHead c (Bind b) t1) t2 t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 (CHead c (Bind b) -t1) t2 t4))) (sn3 c t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq -T t3 (THead (Bind b) x0 x1))).(\lambda (H12: (pr3 c t1 x0)).(\lambda (H13: -(pr3 (CHead c (Bind b) t1) t2 x1)).(let H14 \def (eq_ind T t3 (\lambda (t0: -T).((eq T (THead (Bind b) t1 t2) t0) \to (\forall (P: Prop).P))) H5 (THead -(Bind b) x0 x1) H11) in (eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: -T).(sn3 c t0)) (let H_x1 \def (term_dec t1 x0) in (let H15 \def H_x1 in -(or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: Prop).P)) (sn3 c (THead -(Bind b) x0 x1)) (\lambda (H16: (eq T t1 x0)).(let H17 \def (eq_ind_r T x0 -(\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t0 x1)) \to -(\forall (P: Prop).P))) H14 t1 H16) in (let H18 \def (eq_ind_r T x0 (\lambda -(t0: T).(pr3 c t1 t0)) H12 t1 H16) in (eq_ind T t1 (\lambda (t0: T).(sn3 c -(THead (Bind b) t0 x1))) (let H_x2 \def (term_dec t2 x1) in (let H19 \def -H_x2 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: Prop).P)) (sn3 c -(THead (Bind b) t1 x1)) (\lambda (H20: (eq T t2 x1)).(let H21 \def (eq_ind_r -T x1 (\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t1 t0)) -\to (\forall (P: Prop).P))) H17 t2 H20) in (let H22 \def (eq_ind_r T x1 -(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) t2 t0)) H13 t2 H20) in (eq_ind T -t2 (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (H21 (refl_equal T (THead -(Bind b) t1 t2)) (sn3 c (THead (Bind b) t1 t2))) x1 H20)))) (\lambda (H20: -(((eq T t2 x1) \to (\forall (P: Prop).P)))).(H4 x1 H20 H13)) H19))) x0 -H16)))) (\lambda (H16: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x2 -\def (term_dec t2 x1) in (let H17 \def H_x2 in (or_ind (eq T t2 x1) ((eq T t2 -x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind b) x0 x1)) (\lambda (H18: -(eq T t2 x1)).(let H19 \def (eq_ind_r T x1 (\lambda (t0: T).(pr3 (CHead c -(Bind b) t1) t2 t0)) H13 t2 H18) in (eq_ind T t2 (\lambda (t0: T).(sn3 c -(THead (Bind b) x0 t0))) (H1 x0 H16 H12 t2 (sn3_cpr3_trans c t1 x0 H12 (Bind -b) t2 (sn3_sing (CHead c (Bind b) t1) t2 H3))) x1 H18))) (\lambda (H18: (((eq -T t2 x1) \to (\forall (P: Prop).P)))).(H1 x0 H16 H12 x1 (sn3_cpr3_trans c t1 -x0 H12 (Bind b) x1 (H3 x1 H18 H13)))) H17)))) H15))) t3 H11))))))) H10)) -(\lambda (H10: (pr3 (CHead c (Bind b) t1) t2 (lift (S O) O -t3))).(sn3_gen_lift (CHead c (Bind b) t1) t3 (S O) O (sn3_pr3_trans (CHead c -(Bind b) t1) t2 (sn3_sing (CHead c (Bind b) t1) t2 H3) (lift (S O) O t3) H10) -c (drop_drop (Bind b) O c c (drop_refl c) t1))) H9)))) H7)))))))))) t -H2)))))) u H)))). - -theorem sn3_beta: - \forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c (THead (Bind Abbr) v -t)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead -(Bind Abst) w t)))))))) -\def - \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead -(Bind Abbr) v t))).(insert_eq T (THead (Bind Abbr) v t) (\lambda (t0: T).(sn3 -c t0)) (\lambda (_: T).(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat -Appl) v (THead (Bind Abst) w t)))))) (\lambda (y: T).(\lambda (H0: (sn3 c -y)).(unintro T t (\lambda (t0: T).((eq T y (THead (Bind Abbr) v t0)) \to -(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead (Bind Abst) -w t0))))))) (unintro T v (\lambda (t0: T).(\forall (x: T).((eq T y (THead -(Bind Abbr) t0 x)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat -Appl) t0 (THead (Bind Abst) w x)))))))) (sn3_ind c (\lambda (t0: T).(\forall -(x: T).(\forall (x0: T).((eq T t0 (THead (Bind Abbr) x x0)) \to (\forall (w: -T).((sn3 c w) \to (sn3 c (THead (Flat Appl) x (THead (Bind Abst) w -x0))))))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) -\to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda -(H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 -c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Bind Abbr) x -x0)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) x (THead -(Bind Abst) w x0))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: -(eq T t1 (THead (Bind Abbr) x x0))).(\lambda (w: T).(\lambda (H4: (sn3 c -w)).(let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 -t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (\forall (x1: -T).(\forall (x2: T).((eq T t2 (THead (Bind Abbr) x1 x2)) \to (\forall (w0: -T).((sn3 c w0) \to (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) w0 -x2)))))))))))) H2 (THead (Bind Abbr) x x0) H3) in (let H6 \def (eq_ind T t1 -(\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) -\to ((pr3 c t0 t2) \to (sn3 c t2))))) H1 (THead (Bind Abbr) x x0) H3) in -(sn3_ind c (\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead (Bind Abst) t0 -x0)))) (\lambda (t2: T).(\lambda (H7: ((\forall (t3: T).((((eq T t2 t3) \to -(\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H8: -((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 -t3) \to (sn3 c (THead (Flat Appl) x (THead (Bind Abst) t3 -x0)))))))).(sn3_pr2_intro c (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) -(\lambda (t3: T).(\lambda (H9: (((eq T (THead (Flat Appl) x (THead (Bind -Abst) t2 x0)) t3) \to (\forall (P: Prop).P)))).(\lambda (H10: (pr2 c (THead -(Flat Appl) x (THead (Bind Abst) t2 x0)) t3)).(let H11 \def (pr2_gen_appl c x -(THead (Bind Abst) t2 x0) t3 H10) in (or3_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c -(THead (Bind Abst) t2 x0) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) t2 x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) -y2) z1 z2)))))))) (sn3 c t3) (\lambda (H12: (ex3_2 T T (\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c -(THead (Bind Abst) t2 x0) t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) -t2 x0) t4))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H13: (eq -T t3 (THead (Flat Appl) x1 x2))).(\lambda (H14: (pr2 c x x1)).(\lambda (H15: -(pr2 c (THead (Bind Abst) t2 x0) x2)).(let H16 \def (eq_ind T t3 (\lambda -(t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to -(\forall (P: Prop).P))) H9 (THead (Flat Appl) x1 x2) H13) in (eq_ind_r T -(THead (Flat Appl) x1 x2) (\lambda (t0: T).(sn3 c t0)) (let H17 \def -(pr2_gen_abst c t2 x0 x2 H15) in (ex3_2_ind T T (\lambda (u2: T).(\lambda -(t4: T).(eq T x2 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c t2 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x0 t4))))) (sn3 c (THead (Flat Appl) x1 x2)) -(\lambda (x3: T).(\lambda (x4: T).(\lambda (H18: (eq T x2 (THead (Bind Abst) -x3 x4))).(\lambda (H19: (pr2 c t2 x3)).(\lambda (H20: ((\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 x4))))).(let H21 \def (eq_ind -T x2 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) -(THead (Flat Appl) x1 t0)) \to (\forall (P: Prop).P))) H16 (THead (Bind Abst) -x3 x4) H18) in (eq_ind_r T (THead (Bind Abst) x3 x4) (\lambda (t0: T).(sn3 c -(THead (Flat Appl) x1 t0))) (let H_x \def (term_dec t2 x3) in (let H22 \def -H_x in (or_ind (eq T t2 x3) ((eq T t2 x3) \to (\forall (P: Prop).P)) (sn3 c -(THead (Flat Appl) x1 (THead (Bind Abst) x3 x4))) (\lambda (H23: (eq T t2 -x3)).(let H24 \def (eq_ind_r T x3 (\lambda (t0: T).((eq T (THead (Flat Appl) -x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) x1 (THead (Bind Abst) t0 -x4))) \to (\forall (P: Prop).P))) H21 t2 H23) in (let H25 \def (eq_ind_r T x3 -(\lambda (t0: T).(pr2 c t2 t0)) H19 t2 H23) in (eq_ind T t2 (\lambda (t0: -T).(sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t0 x4)))) (let H_x0 \def -(term_dec x x1) in (let H26 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to -(\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t2 -x4))) (\lambda (H27: (eq T x x1)).(let H28 \def (eq_ind_r T x1 (\lambda (t0: -T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) -t0 (THead (Bind Abst) t2 x4))) \to (\forall (P: Prop).P))) H24 x H27) in (let -H29 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 x H27) in (eq_ind -T x (\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 (THead (Bind Abst) t2 -x4)))) (let H_x1 \def (term_dec x0 x4) in (let H30 \def H_x1 in (or_ind (eq T -x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x -(THead (Bind Abst) t2 x4))) (\lambda (H31: (eq T x0 x4)).(let H32 \def -(eq_ind_r T x4 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind -Abst) t2 x0)) (THead (Flat Appl) x (THead (Bind Abst) t2 t0))) \to (\forall -(P: Prop).P))) H28 x0 H31) in (let H33 \def (eq_ind_r T x4 (\lambda (t0: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 -H31) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead -(Bind Abst) t2 t0)))) (H32 (refl_equal T (THead (Flat Appl) x (THead (Bind -Abst) t2 x0))) (sn3 c (THead (Flat Appl) x (THead (Bind Abst) t2 x0)))) x4 -H31)))) (\lambda (H31: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H5 (THead -(Bind Abbr) x x4) (\lambda (H32: (eq T (THead (Bind Abbr) x x0) (THead (Bind -Abbr) x x4))).(\lambda (P: Prop).(let H33 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) -x x4) H32) in (let H34 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to -(\forall (P0: Prop).P0))) H31 x0 H33) in (let H35 \def (eq_ind_r T x4 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 -t0)))) H20 x0 H33) in (H34 (refl_equal T x0) P)))))) (pr3_pr2 c (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x x4) (pr2_head_2 c x x0 x4 (Bind Abbr) (H20 -Abbr x))) x x4 (refl_equal T (THead (Bind Abbr) x x4)) t2 (sn3_sing c t2 -H7))) H30))) x1 H27)))) (\lambda (H27: (((eq T x x1) \to (\forall (P: -Prop).P)))).(H5 (THead (Bind Abbr) x1 x4) (\lambda (H28: (eq T (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x1 x4))).(\lambda (P: Prop).(let H29 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | (TLRef -_) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) -(THead (Bind Abbr) x1 x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) -x1 x4) H28) in (\lambda (H31: (eq T x x1)).(let H32 \def (eq_ind_r T x4 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 -t0)))) H20 x0 H30) in (let H33 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T x -t0) \to (\forall (P0: Prop).P0))) H27 x H31) in (let H34 \def (eq_ind_r T x1 -(\lambda (t0: T).(pr2 c x t0)) H14 x H31) in (H33 (refl_equal T x) P)))))) -H29)))) (pr3_head_12 c x x1 (pr3_pr2 c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 -(CHead c (Bind Abbr) x1) x0 x4 (H20 Abbr x1))) x1 x4 (refl_equal T (THead -(Bind Abbr) x1 x4)) t2 (sn3_sing c t2 H7))) H26))) x3 H23)))) (\lambda (H23: -(((eq T t2 x3) \to (\forall (P: Prop).P)))).(let H_x0 \def (term_dec x x1) in -(let H24 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: -Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) x3 x4))) (\lambda -(H25: (eq T x x1)).(let H26 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x -t0)) H14 x H25) in (eq_ind T x (\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 -(THead (Bind Abst) x3 x4)))) (let H_x1 \def (term_dec x0 x4) in (let H27 \def -H_x1 in (or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c -(THead (Flat Appl) x (THead (Bind Abst) x3 x4))) (\lambda (H28: (eq T x0 -x4)).(let H29 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H28) in (eq_ind T x0 -(\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead (Bind Abst) x3 t0)))) (H8 -x3 H23 (pr3_pr2 c t2 x3 H19)) x4 H28))) (\lambda (H28: (((eq T x0 x4) \to -(\forall (P: Prop).P)))).(H5 (THead (Bind Abbr) x x4) (\lambda (H29: (eq T -(THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4))).(\lambda (P: Prop).(let -H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 -| (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x x4) H29) in (let H31 \def (eq_ind_r T x4 -(\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H28 x0 H30) in -(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: -T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H30) in (H31 (refl_equal T x0) -P)))))) (pr3_pr2 c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) -(pr2_head_2 c x x0 x4 (Bind Abbr) (H20 Abbr x))) x x4 (refl_equal T (THead -(Bind Abbr) x x4)) x3 (H7 x3 H23 (pr3_pr2 c t2 x3 H19)))) H27))) x1 H25))) -(\lambda (H25: (((eq T x x1) \to (\forall (P: Prop).P)))).(H5 (THead (Bind -Abbr) x1 x4) (\lambda (H26: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) -x1 x4))).(\lambda (P: Prop).(let H27 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t0 _) -\Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) x1 x4) H26) in -((let H28 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) -(THead (Bind Abbr) x x0) (THead (Bind Abbr) x1 x4) H26) in (\lambda (H29: (eq -T x x1)).(let H30 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H28) in (let -H31 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: -Prop).P0))) H25 x H29) in (let H32 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 -c x t0)) H14 x H29) in (H31 (refl_equal T x) P)))))) H27)))) (pr3_head_12 c x -x1 (pr3_pr2 c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x1) -x0 x4 (H20 Abbr x1))) x1 x4 (refl_equal T (THead (Bind Abbr) x1 x4)) x3 (H7 -x3 H23 (pr3_pr2 c t2 x3 H19)))) H24)))) H22))) x2 H18))))))) H17)) t3 -H13))))))) H12)) (\lambda (H12: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Bind Abst) t2 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (H13: (eq T (THead (Bind Abst) t2 x0) (THead -(Bind Abst) x1 x2))).(\lambda (H14: (eq T t3 (THead (Bind Abbr) x3 -x4))).(\lambda (H15: (pr2 c x x3)).(\lambda (H16: ((\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H17 \def (eq_ind T t3 -(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) -\to (\forall (P: Prop).P))) H9 (THead (Bind Abbr) x3 x4) H14) in (eq_ind_r T -(THead (Bind Abbr) x3 x4) (\lambda (t0: T).(sn3 c t0)) (let H18 \def (f_equal -T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t2 | (TLRef _) -\Rightarrow t2 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abst) t2 x0) -(THead (Bind Abst) x1 x2) H13) in ((let H19 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind Abst) -x1 x2) H13) in (\lambda (_: (eq T t2 x1)).(let H21 \def (eq_ind_r T x2 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t0 -x4)))) H16 x0 H19) in (let H_x \def (term_dec x x3) in (let H22 \def H_x in -(or_ind (eq T x x3) ((eq T x x3) \to (\forall (P: Prop).P)) (sn3 c (THead -(Bind Abbr) x3 x4)) (\lambda (H23: (eq T x x3)).(let H24 \def (eq_ind_r T x3 -(\lambda (t0: T).(pr2 c x t0)) H15 x H23) in (eq_ind T x (\lambda (t0: -T).(sn3 c (THead (Bind Abbr) t0 x4))) (let H_x0 \def (term_dec x0 x4) in (let -H25 \def H_x0 in (or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: -Prop).P)) (sn3 c (THead (Bind Abbr) x x4)) (\lambda (H26: (eq T x0 x4)).(let -H27 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 -(CHead c (Bind b) u) x0 t0)))) H21 x0 H26) in (eq_ind T x0 (\lambda (t0: -T).(sn3 c (THead (Bind Abbr) x t0))) (sn3_sing c (THead (Bind Abbr) x x0) H6) -x4 H26))) (\lambda (H26: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H6 -(THead (Bind Abbr) x x4) (\lambda (H27: (eq T (THead (Bind Abbr) x x0) (THead -(Bind Abbr) x x4))).(\lambda (P: Prop).(let H28 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) -x x4) H27) in (let H29 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to -(\forall (P0: Prop).P0))) H26 x0 H28) in (let H30 \def (eq_ind_r T x4 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 -t0)))) H21 x0 H28) in (H29 (refl_equal T x0) P)))))) (pr3_pr2 c (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x x4) (pr2_head_2 c x x0 x4 (Bind Abbr) (H21 -Abbr x))))) H25))) x3 H23))) (\lambda (H23: (((eq T x x3) \to (\forall (P: -Prop).P)))).(H6 (THead (Bind Abbr) x3 x4) (\lambda (H24: (eq T (THead (Bind -Abbr) x x0) (THead (Bind Abbr) x3 x4))).(\lambda (P: Prop).(let H25 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | (TLRef -_) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) -(THead (Bind Abbr) x3 x4) H24) in ((let H26 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | -(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) -x3 x4) H24) in (\lambda (H27: (eq T x x3)).(let H28 \def (eq_ind_r T x4 -(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 -t0)))) H21 x0 H26) in (let H29 \def (eq_ind_r T x3 (\lambda (t0: T).((eq T x -t0) \to (\forall (P0: Prop).P0))) H23 x H27) in (let H30 \def (eq_ind_r T x3 -(\lambda (t0: T).(pr2 c x t0)) H15 x H27) in (H29 (refl_equal T x) P)))))) -H25)))) (pr3_head_12 c x x3 (pr3_pr2 c x x3 H15) (Bind Abbr) x0 x4 (pr3_pr2 -(CHead c (Bind Abbr) x3) x0 x4 (H21 Abbr x3))))) H22)))))) H18)) t3 -H14)))))))))) H12)) (\lambda (H12: (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -Abst) t2 x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) -(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda -(x5: T).(\lambda (x6: T).(\lambda (H13: (not (eq B x1 Abst))).(\lambda (H14: -(eq T (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3))).(\lambda (H15: (eq -T t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda -(_: (pr2 c x x5)).(\lambda (H17: (pr2 c x2 x6)).(\lambda (H18: (pr2 (CHead c -(Bind x1) x6) x3 x4)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T -(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to (\forall (P: -Prop).P))) H9 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) -H15) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) -x4)) (\lambda (t0: T).(sn3 c t0)) (let H20 \def (f_equal T B (\lambda (e: -T).(match e with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | -(THead k _ _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abst])])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) -in ((let H21 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ t0 _) \Rightarrow t0])) -(THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) in ((let H22 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef -_) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) t2 -x0) (THead (Bind x1) x2 x3) H14) in (\lambda (H23: (eq T t2 x2)).(\lambda -(H24: (eq B Abst x1)).(let H25 \def (eq_ind_r T x3 (\lambda (t0: T).(pr2 -(CHead c (Bind x1) x6) t0 x4)) H18 x0 H22) in (let H26 \def (eq_ind_r T x2 -(\lambda (t0: T).(pr2 c t0 x6)) H17 t2 H23) in (let H27 \def (eq_ind_r B x1 -(\lambda (b: B).(pr2 (CHead c (Bind b) x6) x0 x4)) H25 Abst H24) in (let H28 -\def (eq_ind_r B x1 (\lambda (b: B).(not (eq B b Abst))) H13 Abst H24) in -(eq_ind B Abst (\lambda (b: B).(sn3 c (THead (Bind b) x6 (THead (Flat Appl) -(lift (S O) O x5) x4)))) (let H29 \def (match (H28 (refl_equal B Abst)) in -False with []) in H29) x1 H24)))))))) H21)) H20)) t3 H15)))))))))))))) H12)) -H11))))))))) w H4))))))))))) y H0))))) H)))). - -lemma sn3_appl_lref: - \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (v: -T).((sn3 c v) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))) -\def - \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda -(v: T).(\lambda (H0: (sn3 c v)).(sn3_ind c (\lambda (t: T).(sn3 c (THead -(Flat Appl) t (TLRef i)))) (\lambda (t1: T).(\lambda (_: ((\forall (t2: -T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c -t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c (THead (Flat Appl) t2 (TLRef -i)))))))).(sn3_pr2_intro c (THead (Flat Appl) t1 (TLRef i)) (\lambda (t2: -T).(\lambda (H3: (((eq T (THead (Flat Appl) t1 (TLRef i)) t2) \to (\forall -(P: Prop).P)))).(\lambda (H4: (pr2 c (THead (Flat Appl) t1 (TLRef i)) -t2)).(let H5 \def (pr2_gen_appl c t1 (TLRef i) t2 H4) in (or3_ind (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall -(u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T -(TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) -(sn3 c t2) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))))).(ex3_2_ind T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda -(t3: T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H7: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr2 c t1 -x0)).(\lambda (H9: (pr2 c (TLRef i) x1)).(let H10 \def (eq_ind T t2 (\lambda -(t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) -H3 (THead (Flat Appl) x0 x1) H7) in (eq_ind_r T (THead (Flat Appl) x0 x1) -(\lambda (t: T).(sn3 c t)) (let H11 \def (eq_ind_r T x1 (\lambda (t: T).((eq -T (THead (Flat Appl) t1 (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: -Prop).P))) H10 (TLRef i) (H x1 H9)) in (let H12 \def (eq_ind_r T x1 (\lambda -(t: T).(pr2 c (TLRef i) t)) H9 (TLRef i) (H x1 H9)) in (eq_ind T (TLRef i) -(\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H_x \def (term_dec t1 -x0) in (let H13 \def H_x in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall -(P: Prop).P)) (sn3 c (THead (Flat Appl) x0 (TLRef i))) (\lambda (H14: (eq T -t1 x0)).(let H15 \def (eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat -Appl) t1 (TLRef i)) (THead (Flat Appl) t (TLRef i))) \to (\forall (P: -Prop).P))) H11 t1 H14) in (let H16 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c -t1 t)) H8 t1 H14) in (eq_ind T t1 (\lambda (t: T).(sn3 c (THead (Flat Appl) t -(TLRef i)))) (H15 (refl_equal T (THead (Flat Appl) t1 (TLRef i))) (sn3 c -(THead (Flat Appl) t1 (TLRef i)))) x0 H14)))) (\lambda (H14: (((eq T t1 x0) -\to (\forall (P: Prop).P)))).(H2 x0 H14 (pr3_pr2 c t1 x0 H8))) H13))) x1 (H -x1 H9)))) t2 H7))))))) H6)) (\lambda (H6: (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))))).(ex4_4_ind T -T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) -(sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H7: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H8: -(eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c t1 x2)).(\lambda (_: -((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let -H11 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) -t) \to (\forall (P: Prop).P))) H3 (THead (Bind Abbr) x2 x3) H8) in (eq_ind_r -T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) (let H12 \def (eq_ind -T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead -(Bind Abst) x0 x1) H7) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H12)) -t2 H8)))))))))) H6)) (\lambda (H6: (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq -T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) -(sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 -Abst))).(\lambda (H8: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda (H9: -(eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) -x3)))).(\lambda (_: (pr2 c t1 x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: -(pr2 (CHead c (Bind x0) x5) x2 x3)).(let H13 \def (eq_ind T t2 (\lambda (t: -T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H9) in -(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) -(\lambda (t: T).(sn3 c t)) (let H14 \def (eq_ind T (TLRef i) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H8) in -(False_ind (sn3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) -x3))) H14)) t2 H9)))))))))))))) H6)) H5))))))))) v H0))))). - -lemma sn3_appl_abbr: - \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) w)) \to (\forall (v: T).((sn3 c (THead (Flat Appl) v -(lift (S i) O w))) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (v: T).(\lambda (H0: (sn3 c -(THead (Flat Appl) v (lift (S i) O w)))).(insert_eq T (THead (Flat Appl) v -(lift (S i) O w)) (\lambda (t: T).(sn3 c t)) (\lambda (_: T).(sn3 c (THead -(Flat Appl) v (TLRef i)))) (\lambda (y: T).(\lambda (H1: (sn3 c y)).(unintro -T v (\lambda (t: T).((eq T y (THead (Flat Appl) t (lift (S i) O w))) \to (sn3 -c (THead (Flat Appl) t (TLRef i))))) (sn3_ind c (\lambda (t: T).(\forall (x: -T).((eq T t (THead (Flat Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat -Appl) x (TLRef i)))))) (\lambda (t1: T).(\lambda (H2: ((\forall (t2: -T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c -t2)))))).(\lambda (H3: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).((eq T t2 (THead (Flat -Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat Appl) x (TLRef -i)))))))))).(\lambda (x: T).(\lambda (H4: (eq T t1 (THead (Flat Appl) x (lift -(S i) O w)))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: -T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall -(x0: T).((eq T t2 (THead (Flat Appl) x0 (lift (S i) O w))) \to (sn3 c (THead -(Flat Appl) x0 (TLRef i))))))))) H3 (THead (Flat Appl) x (lift (S i) O w)) -H4) in (let H6 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t -t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H2 -(THead (Flat Appl) x (lift (S i) O w)) H4) in (sn3_pr2_intro c (THead (Flat -Appl) x (TLRef i)) (\lambda (t2: T).(\lambda (H7: (((eq T (THead (Flat Appl) -x (TLRef i)) t2) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr2 c (THead -(Flat Appl) x (TLRef i)) t2)).(let H9 \def (pr2_gen_appl c x (TLRef i) t2 H8) -in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq -T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) -(sn3 c t2) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))))).(ex3_2_ind T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: -T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (pr2 c -x x0)).(\lambda (H13: (pr2 c (TLRef i) x1)).(let H14 \def (eq_ind T t2 -(\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: -Prop).P))) H7 (THead (Flat Appl) x0 x1) H11) in (eq_ind_r T (THead (Flat -Appl) x0 x1) (\lambda (t: T).(sn3 c t)) (let H15 \def (pr2_gen_lref c x1 i -H13) in (or_ind (eq T x1 (TLRef i)) (ex2_2 C T (\lambda (d0: C).(\lambda (u: -T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq -T x1 (lift (S i) O u))))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda (H16: -(eq T x1 (TLRef i))).(let H17 \def (eq_ind T x1 (\lambda (t: T).((eq T (THead -(Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: -Prop).P))) H14 (TLRef i) H16) in (eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c -(THead (Flat Appl) x0 t))) (let H_x \def (term_dec x x0) in (let H18 \def H_x -in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c (THead -(Flat Appl) x0 (TLRef i))) (\lambda (H19: (eq T x x0)).(let H20 \def -(eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) (THead -(Flat Appl) t (TLRef i))) \to (\forall (P: Prop).P))) H17 x H19) in (let H21 -\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H19) in (eq_ind T x -(\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (H20 (refl_equal T -(THead (Flat Appl) x (TLRef i))) (sn3 c (THead (Flat Appl) x (TLRef i)))) x0 -H19)))) (\lambda (H19: (((eq T x x0) \to (\forall (P: Prop).P)))).(H5 (THead -(Flat Appl) x0 (lift (S i) O w)) (\lambda (H20: (eq T (THead (Flat Appl) x -(lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)))).(\lambda (P: -Prop).(let H21 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) -(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O -w)) H20) in (let H22 \def (eq_ind_r T x0 (\lambda (t: T).((eq T x t) \to -(\forall (P0: Prop).P0))) H19 x H21) in (let H23 \def (eq_ind_r T x0 (\lambda -(t: T).(pr2 c x t)) H12 x H21) in (H22 (refl_equal T x) P)))))) (pr3_pr2 c -(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O -w)) (pr2_head_1 c x x0 H12 (Flat Appl) (lift (S i) O w))) x0 (refl_equal T -(THead (Flat Appl) x0 (lift (S i) O w))))) H18))) x1 H16))) (\lambda (H16: -(ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) -u)))) (\lambda (_: C).(\lambda (u: T).(eq T x1 (lift (S i) O -u)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 -(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x1 (lift (S i) O -u)))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda (x2: C).(\lambda (x3: -T).(\lambda (H17: (getl i c (CHead x2 (Bind Abbr) x3))).(\lambda (H18: (eq T -x1 (lift (S i) O x3))).(let H19 \def (eq_ind T x1 (\lambda (t: T).((eq T -(THead (Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: -Prop).P))) H14 (lift (S i) O x3) H18) in (eq_ind_r T (lift (S i) O x3) -(\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H20 \def (eq_ind C -(CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H (CHead x2 (Bind -Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 (Bind Abbr) x3) -H17)) in (let H21 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) w) -(CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 -(Bind Abbr) x3) H17)) in ((let H22 \def (f_equal C T (\lambda (e: C).(match e -with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind -Abbr) w) (CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H -(CHead x2 (Bind Abbr) x3) H17)) in (\lambda (H23: (eq C d x2)).(let H24 \def -(eq_ind_r T x3 (\lambda (t: T).(getl i c (CHead x2 (Bind Abbr) t))) H20 w -H22) in (eq_ind T w (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 (lift (S i) -O t)))) (let H25 \def (eq_ind_r C x2 (\lambda (c0: C).(getl i c (CHead c0 -(Bind Abbr) w))) H24 d H23) in (let H_x \def (term_dec x x0) in (let H26 \def -H_x in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c -(THead (Flat Appl) x0 (lift (S i) O w))) (\lambda (H27: (eq T x x0)).(let H28 -\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H27) in (eq_ind T x -(\lambda (t: T).(sn3 c (THead (Flat Appl) t (lift (S i) O w)))) (sn3_sing c -(THead (Flat Appl) x (lift (S i) O w)) H6) x0 H27))) (\lambda (H27: (((eq T x -x0) \to (\forall (P: Prop).P)))).(H6 (THead (Flat Appl) x0 (lift (S i) O w)) -(\lambda (H28: (eq T (THead (Flat Appl) x (lift (S i) O w)) (THead (Flat -Appl) x0 (lift (S i) O w)))).(\lambda (P: Prop).(let H29 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow x | (TLRef _) -\Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x (lift (S -i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)) H28) in (let H30 \def -(eq_ind_r T x0 (\lambda (t: T).((eq T x t) \to (\forall (P0: Prop).P0))) H27 -x H29) in (let H31 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x -H29) in (H30 (refl_equal T x) P)))))) (pr3_pr2 c (THead (Flat Appl) x (lift -(S i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)) (pr2_head_1 c x x0 H12 -(Flat Appl) (lift (S i) O w))))) H26)))) x3 H22)))) H21))) x1 H18)))))) H16)) -H15)) t2 H11))))))) H10)) (\lambda (H10: (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))))).(ex4_4_ind T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) -(sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H11: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H12: -(eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c x x2)).(\lambda (_: -((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let -H15 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) -t) \to (\forall (P: Prop).P))) H7 (THead (Bind Abbr) x2 x3) H12) in (eq_ind_r -T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) (let H16 \def (eq_ind -T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead -(Bind Abst) x0 x1) H11) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H16)) -t2 H12)))))))))) H10)) (\lambda (H10: (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind -B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda -(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq -T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) -(sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 -Abst))).(\lambda (H12: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda -(H13: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) -x3)))).(\lambda (_: (pr2 c x x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: -(pr2 (CHead c (Bind x0) x5) x2 x3)).(let H17 \def (eq_ind T t2 (\lambda (t: -T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: Prop).P))) H7 -(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H13) in -(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) -(\lambda (t: T).(sn3 c t)) (let H18 \def (eq_ind T (TLRef i) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H12) in -(False_ind (sn3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) -x3))) H18)) t2 H13)))))))))))))) H10)) H9))))))))))))) y H1)))) H0))))))). - -theorem sn3_appl_cast: - \forall (c: C).(\forall (v: T).(\forall (u: T).((sn3 c (THead (Flat Appl) v -u)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) v t)) \to (sn3 c (THead -(Flat Appl) v (THead (Flat Cast) u t)))))))) -\def - \lambda (c: C).(\lambda (v: T).(\lambda (u: T).(\lambda (H: (sn3 c (THead -(Flat Appl) v u))).(insert_eq T (THead (Flat Appl) v u) (\lambda (t: T).(sn3 -c t)) (\lambda (_: T).(\forall (t0: T).((sn3 c (THead (Flat Appl) v t0)) \to -(sn3 c (THead (Flat Appl) v (THead (Flat Cast) u t0)))))) (\lambda (y: -T).(\lambda (H0: (sn3 c y)).(unintro T u (\lambda (t: T).((eq T y (THead -(Flat Appl) v t)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) v t0)) \to -(sn3 c (THead (Flat Appl) v (THead (Flat Cast) t t0))))))) (unintro T v -(\lambda (t: T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to -(\forall (t0: T).((sn3 c (THead (Flat Appl) t t0)) \to (sn3 c (THead (Flat -Appl) t (THead (Flat Cast) x t0)))))))) (sn3_ind c (\lambda (t: T).(\forall -(x: T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (t0: -T).((sn3 c (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead -(Flat Cast) x0 t0))))))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: -T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c -t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 -(THead (Flat Appl) x x0)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) x -t)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 -t))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 (THead -(Flat Appl) x x0))).(\lambda (t: T).(\lambda (H4: (sn3 c (THead (Flat Appl) x -t))).(insert_eq T (THead (Flat Appl) x t) (\lambda (t0: T).(sn3 c t0)) -(\lambda (_: T).(sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t)))) -(\lambda (y0: T).(\lambda (H5: (sn3 c y0)).(unintro T t (\lambda (t0: T).((eq -T y0 (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat -Cast) x0 t0))))) (sn3_ind c (\lambda (t0: T).(\forall (x1: T).((eq T t0 -(THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) -x0 x1)))))) (\lambda (t0: T).(\lambda (H6: ((\forall (t2: T).((((eq T t0 t2) -\to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2)))))).(\lambda -(H7: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 -c t0 t2) \to (\forall (x1: T).((eq T t2 (THead (Flat Appl) x x1)) \to (sn3 c -(THead (Flat Appl) x (THead (Flat Cast) x0 x1)))))))))).(\lambda (x1: -T).(\lambda (H8: (eq T t0 (THead (Flat Appl) x x1))).(let H9 \def (eq_ind T -t0 (\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to (\forall (P: -Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x2: T).((eq T t3 (THead (Flat -Appl) x x2)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 -x2))))))))) H7 (THead (Flat Appl) x x1) H8) in (let H10 \def (eq_ind T t0 -(\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) -\to ((pr3 c t2 t3) \to (sn3 c t3))))) H6 (THead (Flat Appl) x x1) H8) in (let -H11 \def (eq_ind T t1 (\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to -(\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x2: T).(\forall (x3: -T).((eq T t3 (THead (Flat Appl) x2 x3)) \to (\forall (t4: T).((sn3 c (THead -(Flat Appl) x2 t4)) \to (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x3 -t4)))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H12 \def (eq_ind T t1 -(\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) -\to ((pr3 c t2 t3) \to (sn3 c t3))))) H1 (THead (Flat Appl) x x0) H3) in -(sn3_pr2_intro c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (\lambda -(t2: T).(\lambda (H13: (((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 -x1)) t2) \to (\forall (P: Prop).P)))).(\lambda (H14: (pr2 c (THead (Flat -Appl) x (THead (Flat Cast) x0 x1)) t2)).(let H15 \def (pr2_gen_appl c x -(THead (Flat Cast) x0 x1) t2 H14) in (or3_ind (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c -(THead (Flat Cast) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: -B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T -T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq -T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) -y2) z1 z2)))))))) (sn3 c t2) (\lambda (H16: (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c -(THead (Flat Cast) x0 x1) t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Flat Cast) -x0 x1) t3))) (sn3 c t2) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H17: (eq -T t2 (THead (Flat Appl) x2 x3))).(\lambda (H18: (pr2 c x x2)).(\lambda (H19: -(pr2 c (THead (Flat Cast) x0 x1) x3)).(let H20 \def (eq_ind T t2 (\lambda -(t3: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t3) \to -(\forall (P: Prop).P))) H13 (THead (Flat Appl) x2 x3) H17) in (eq_ind_r T -(THead (Flat Appl) x2 x3) (\lambda (t3: T).(sn3 c t3)) (let H21 \def -(pr2_gen_cast c x0 x1 x3 H19) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3)))) (pr2 c -x1 x3) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (H22: (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 -t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x3 (THead -(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) -(\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3))) (sn3 c (THead (Flat Appl) x2 -x3)) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H23: (eq T x3 (THead (Flat -Cast) x4 x5))).(\lambda (H24: (pr2 c x0 x4)).(\lambda (H25: (pr2 c x1 -x5)).(let H26 \def (eq_ind T x3 (\lambda (t3: T).((eq T (THead (Flat Appl) x -(THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t3)) \to (\forall (P: -Prop).P))) H20 (THead (Flat Cast) x4 x5) H23) in (eq_ind_r T (THead (Flat -Cast) x4 x5) (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 t3))) (let H_x -\def (term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) in (let -H27 \def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 -x4)) ((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall -(P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 x5))) -(\lambda (H28: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 -x4))).(let H29 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t3 _) \Rightarrow t3])) -(THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4) H28) in ((let H30 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef -_) \Rightarrow x0 | (THead _ _ t3) \Rightarrow t3])) (THead (Flat Appl) x x0) -(THead (Flat Appl) x2 x4) H28) in (\lambda (H31: (eq T x x2)).(let H32 \def -(eq_ind_r T x4 (\lambda (t3: T).((eq T (THead (Flat Appl) x (THead (Flat -Cast) x0 x1)) (THead (Flat Appl) x2 (THead (Flat Cast) t3 x5))) \to (\forall -(P: Prop).P))) H26 x0 H30) in (let H33 \def (eq_ind_r T x4 (\lambda (t3: -T).(pr2 c x0 t3)) H24 x0 H30) in (eq_ind T x0 (\lambda (t3: T).(sn3 c (THead -(Flat Appl) x2 (THead (Flat Cast) t3 x5)))) (let H34 \def (eq_ind_r T x2 -(\lambda (t3: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) -(THead (Flat Appl) t3 (THead (Flat Cast) x0 x5))) \to (\forall (P: Prop).P))) -H32 x H31) in (let H35 \def (eq_ind_r T x2 (\lambda (t3: T).(pr2 c x t3)) H18 -x H31) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 (THead -(Flat Cast) x0 x5)))) (let H_x0 \def (term_dec (THead (Flat Appl) x x1) -(THead (Flat Appl) x x5)) in (let H36 \def H_x0 in (or_ind (eq T (THead (Flat -Appl) x x1) (THead (Flat Appl) x x5)) ((eq T (THead (Flat Appl) x x1) (THead -(Flat Appl) x x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x -(THead (Flat Cast) x0 x5))) (\lambda (H37: (eq T (THead (Flat Appl) x x1) -(THead (Flat Appl) x x5))).(let H38 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t3) -\Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x x5) H37) in -(let H39 \def (eq_ind_r T x5 (\lambda (t3: T).((eq T (THead (Flat Appl) x -(THead (Flat Cast) x0 x1)) (THead (Flat Appl) x (THead (Flat Cast) x0 t3))) -\to (\forall (P: Prop).P))) H34 x1 H38) in (let H40 \def (eq_ind_r T x5 -(\lambda (t3: T).(pr2 c x1 t3)) H25 x1 H38) in (eq_ind T x1 (\lambda (t3: -T).(sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t3)))) (H39 (refl_equal -T (THead (Flat Appl) x (THead (Flat Cast) x0 x1))) (sn3 c (THead (Flat Appl) -x (THead (Flat Cast) x0 x1)))) x5 H38))))) (\lambda (H37: (((eq T (THead -(Flat Appl) x x1) (THead (Flat Appl) x x5)) \to (\forall (P: Prop).P)))).(H9 -(THead (Flat Appl) x x5) H37 (pr3_pr2 c (THead (Flat Appl) x x1) (THead (Flat -Appl) x x5) (pr2_thin_dx c x1 x5 H25 x Appl)) x5 (refl_equal T (THead (Flat -Appl) x x5)))) H36))) x2 H31))) x4 H30))))) H29))) (\lambda (H28: (((eq T -(THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall (P: -Prop).P)))).(let H_x0 \def (term_dec (THead (Flat Appl) x x1) (THead (Flat -Appl) x2 x5)) in (let H29 \def H_x0 in (or_ind (eq T (THead (Flat Appl) x x1) -(THead (Flat Appl) x2 x5)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) -x2 x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat -Cast) x4 x5))) (\lambda (H30: (eq T (THead (Flat Appl) x x1) (THead (Flat -Appl) x2 x5))).(let H31 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t3 _) -\Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in -((let H32 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t3) \Rightarrow t3])) -(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in (\lambda (H33: (eq -T x x2)).(let H34 \def (eq_ind_r T x5 (\lambda (t3: T).(pr2 c x1 t3)) H25 x1 -H32) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 (THead -(Flat Cast) x4 t3)))) (let H35 \def (eq_ind_r T x2 (\lambda (t3: T).((eq T -(THead (Flat Appl) x x0) (THead (Flat Appl) t3 x4)) \to (\forall (P: -Prop).P))) H28 x H33) in (let H36 \def (eq_ind_r T x2 (\lambda (t3: T).(pr2 c -x t3)) H18 x H33) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) -t3 (THead (Flat Cast) x4 x1)))) (H11 (THead (Flat Appl) x x4) H35 (pr3_pr2 c -(THead (Flat Appl) x x0) (THead (Flat Appl) x x4) (pr2_thin_dx c x0 x4 H24 x -Appl)) x x4 (refl_equal T (THead (Flat Appl) x x4)) x1 (sn3_sing c (THead -(Flat Appl) x x1) H10)) x2 H33))) x5 H32)))) H31))) (\lambda (H30: (((eq T -(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) \to (\forall (P: -Prop).P)))).(H11 (THead (Flat Appl) x2 x4) H28 (pr3_flat c x x2 (pr3_pr2 c x -x2 H18) x0 x4 (pr3_pr2 c x0 x4 H24) Appl) x2 x4 (refl_equal T (THead (Flat -Appl) x2 x4)) x5 (H10 (THead (Flat Appl) x2 x5) H30 (pr3_flat c x x2 (pr3_pr2 -c x x2 H18) x1 x5 (pr3_pr2 c x1 x5 H25) Appl)))) H29)))) H27))) x3 H23))))))) -H22)) (\lambda (H22: (pr2 c x1 x3)).(let H_x \def (term_dec (THead (Flat -Appl) x x1) (THead (Flat Appl) x2 x3)) in (let H23 \def H_x in (or_ind (eq T -(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) ((eq T (THead (Flat Appl) -x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)) (sn3 c (THead -(Flat Appl) x2 x3)) (\lambda (H24: (eq T (THead (Flat Appl) x x1) (THead -(Flat Appl) x2 x3))).(let H25 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t3 _) -\Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in -((let H26 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t3) \Rightarrow t3])) -(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in (\lambda (H27: (eq -T x x2)).(let H28 \def (eq_ind_r T x3 (\lambda (t3: T).(pr2 c x1 t3)) H22 x1 -H26) in (let H29 \def (eq_ind_r T x3 (\lambda (t3: T).((eq T (THead (Flat -Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t3)) \to (\forall -(P: Prop).P))) H20 x1 H26) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead -(Flat Appl) x2 t3))) (let H30 \def (eq_ind_r T x2 (\lambda (t3: T).((eq T -(THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) t3 x1)) -\to (\forall (P: Prop).P))) H29 x H27) in (let H31 \def (eq_ind_r T x2 -(\lambda (t3: T).(pr2 c x t3)) H18 x H27) in (eq_ind T x (\lambda (t3: -T).(sn3 c (THead (Flat Appl) t3 x1))) (sn3_sing c (THead (Flat Appl) x x1) -H10) x2 H27))) x3 H26))))) H25))) (\lambda (H24: (((eq T (THead (Flat Appl) x -x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)))).(H10 (THead (Flat -Appl) x2 x3) H24 (pr3_flat c x x2 (pr3_pr2 c x x2 H18) x1 x3 (pr3_pr2 c x1 x3 -H22) Appl))) H23)))) H21)) t2 H17))))))) H16)) (\lambda (H16: (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind -Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) -u0) z1 t3))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: -B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) (sn3 c t2) -(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda -(H17: (eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) x2 x3))).(\lambda -(H18: (eq T t2 (THead (Bind Abbr) x4 x5))).(\lambda (_: (pr2 c x -x4)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) -u0) x3 x5))))).(let H21 \def (eq_ind T t2 (\lambda (t3: T).((eq T (THead -(Flat Appl) x (THead (Flat Cast) x0 x1)) t3) \to (\forall (P: Prop).P))) H13 -(THead (Bind Abbr) x4 x5) H18) in (eq_ind_r T (THead (Bind Abbr) x4 x5) -(\lambda (t3: T).(sn3 c t3)) (let H22 \def (eq_ind T (THead (Flat Cast) x0 -x1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x2 -x3) H17) in (False_ind (sn3 c (THead (Bind Abbr) x4 x5)) H22)) t2 -H18)))))))))) H16)) (\lambda (H16: (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat -Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t2) -(\lambda (x2: B).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda -(x6: T).(\lambda (x7: T).(\lambda (_: (not (eq B x2 Abst))).(\lambda (H18: -(eq T (THead (Flat Cast) x0 x1) (THead (Bind x2) x3 x4))).(\lambda (H19: (eq -T t2 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)))).(\lambda -(_: (pr2 c x x6)).(\lambda (_: (pr2 c x3 x7)).(\lambda (_: (pr2 (CHead c -(Bind x2) x7) x4 x5)).(let H23 \def (eq_ind T t2 (\lambda (t3: T).((eq T -(THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t3) \to (\forall (P: -Prop).P))) H13 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) -H19) in (eq_ind_r T (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) -x5)) (\lambda (t3: T).(sn3 c t3)) (let H24 \def (eq_ind T (THead (Flat Cast) -x0 x1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x2) x3 x4) -H18) in (False_ind (sn3 c (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) -O x6) x5))) H24)) t2 H19)))))))))))))) H16)) H15))))))))))))))) y0 H5)))) -H4))))))))) y H0))))) H)))). - -theorem sn3_appl_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: -T).((sn3 c u) \to (\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) u) -(THead (Flat Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v -(THead (Bind b) u t)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda -(u: T).(\lambda (H0: (sn3 c u)).(sn3_ind c (\lambda (t: T).(\forall (t0: -T).(\forall (v: T).((sn3 (CHead c (Bind b) t) (THead (Flat Appl) (lift (S O) -O v) t0)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t t0))))))) -(\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) t2) (THead (Flat -Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t2 -t))))))))))).(\lambda (t: T).(\lambda (v: T).(\lambda (H3: (sn3 (CHead c -(Bind b) t1) (THead (Flat Appl) (lift (S O) O v) t))).(insert_eq T (THead -(Flat Appl) (lift (S O) O v) t) (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) -t0)) (\lambda (_: T).(sn3 c (THead (Flat Appl) v (THead (Bind b) t1 t)))) -(\lambda (y: T).(\lambda (H4: (sn3 (CHead c (Bind b) t1) y)).(unintro T t -(\lambda (t0: T).((eq T y (THead (Flat Appl) (lift (S O) O v) t0)) \to (sn3 c -(THead (Flat Appl) v (THead (Bind b) t1 t0))))) (unintro T v (\lambda (t0: -T).(\forall (x: T).((eq T y (THead (Flat Appl) (lift (S O) O t0) x)) \to (sn3 -c (THead (Flat Appl) t0 (THead (Bind b) t1 x)))))) (sn3_ind (CHead c (Bind b) -t1) (\lambda (t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Flat -Appl) (lift (S O) O x) x0)) \to (sn3 c (THead (Flat Appl) x (THead (Bind b) -t1 x0))))))) (\lambda (t2: T).(\lambda (H5: ((\forall (t3: T).((((eq T t2 t3) -\to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 -(CHead c (Bind b) t1) t3)))))).(\lambda (H6: ((\forall (t3: T).((((eq T t2 -t3) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to -(\forall (x: T).(\forall (x0: T).((eq T t3 (THead (Flat Appl) (lift (S O) O -x) x0)) \to (sn3 c (THead (Flat Appl) x (THead (Bind b) t1 -x0))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H7: (eq T t2 (THead -(Flat Appl) (lift (S O) O x) x0))).(let H8 \def (eq_ind T t2 (\lambda (t0: -T).(\forall (t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 -(CHead c (Bind b) t1) t0 t3) \to (\forall (x1: T).(\forall (x2: T).((eq T t3 -(THead (Flat Appl) (lift (S O) O x1) x2)) \to (sn3 c (THead (Flat Appl) x1 -(THead (Bind b) t1 x2)))))))))) H6 (THead (Flat Appl) (lift (S O) O x) x0) -H7) in (let H9 \def (eq_ind T t2 (\lambda (t0: T).(\forall (t3: T).((((eq T -t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t0 t3) \to -(sn3 (CHead c (Bind b) t1) t3))))) H5 (THead (Flat Appl) (lift (S O) O x) x0) -H7) in (sn3_pr2_intro c (THead (Flat Appl) x (THead (Bind b) t1 x0)) (\lambda -(t3: T).(\lambda (H10: (((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) -t3) \to (\forall (P: Prop).P)))).(\lambda (H11: (pr2 c (THead (Flat Appl) x -(THead (Bind b) t1 x0)) t3)).(let H12 \def (pr2_gen_appl c x (THead (Bind b) -t1 x0) t3 H11) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T -t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4)))) -(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: -T).(eq T (THead (Bind b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) -u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2)))))))) (sn3 c t3) -(\lambda (H13: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) -t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4))) (sn3 c -t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H14: (eq T t3 (THead (Flat -Appl) x1 x2))).(\lambda (H15: (pr2 c x x1)).(\lambda (H16: (pr2 c (THead -(Bind b) t1 x0) x2)).(let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T -(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) -H10 (THead (Flat Appl) x1 x2) H14) in (eq_ind_r T (THead (Flat Appl) x1 x2) -(\lambda (t0: T).(sn3 c t0)) (let H_x \def (pr3_gen_bind b H c t1 x0 x2) in -(let H18 \def (H_x (pr3_pr2 c (THead (Bind b) t1 x0) x2 H16)) in (or_ind -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4)))) (pr3 (CHead c (Bind -b) t1) x0 (lift (S O) O x2)) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (H19: -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: -T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 t4)))) (\lambda -(u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 -(CHead c (Bind b) t1) x0 t4))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda -(x3: T).(\lambda (x4: T).(\lambda (H20: (eq T x2 (THead (Bind b) x3 -x4))).(\lambda (H21: (pr3 c t1 x3)).(\lambda (H22: (pr3 (CHead c (Bind b) t1) -x0 x4)).(let H23 \def (eq_ind T x2 (\lambda (t0: T).((eq T (THead (Flat Appl) -x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 t0)) \to (\forall (P: -Prop).P))) H17 (THead (Bind b) x3 x4) H20) in (eq_ind_r T (THead (Bind b) x3 -x4) (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 t0))) (let H_x0 \def -(term_dec t1 x3) in (let H24 \def H_x0 in (or_ind (eq T t1 x3) ((eq T t1 x3) -\to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind b) x3 -x4))) (\lambda (H25: (eq T t1 x3)).(let H26 \def (eq_ind_r T x3 (\lambda (t0: -T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 -(THead (Bind b) t0 x4))) \to (\forall (P: Prop).P))) H23 t1 H25) in (let H27 -\def (eq_ind_r T x3 (\lambda (t0: T).(pr3 c t1 t0)) H21 t1 H25) in (eq_ind T -t1 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 (THead (Bind b) t0 x4)))) -(let H_x1 \def (term_dec x0 x4) in (let H28 \def H_x1 in (or_ind (eq T x0 x4) -((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead -(Bind b) t1 x4))) (\lambda (H29: (eq T x0 x4)).(let H30 \def (eq_ind_r T x4 -(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead -(Flat Appl) x1 (THead (Bind b) t1 t0))) \to (\forall (P: Prop).P))) H26 x0 -H29) in (let H31 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) -t1) x0 t0)) H22 x0 H29) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat -Appl) x1 (THead (Bind b) t1 t0)))) (let H_x2 \def (term_dec x x1) in (let H32 -\def H_x2 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 -c (THead (Flat Appl) x1 (THead (Bind b) t1 x0))) (\lambda (H33: (eq T x -x1)).(let H34 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T (THead (Flat Appl) -x (THead (Bind b) t1 x0)) (THead (Flat Appl) t0 (THead (Bind b) t1 x0))) \to -(\forall (P: Prop).P))) H30 x H33) in (let H35 \def (eq_ind_r T x1 (\lambda -(t0: T).(pr2 c x t0)) H15 x H33) in (eq_ind T x (\lambda (t0: T).(sn3 c -(THead (Flat Appl) t0 (THead (Bind b) t1 x0)))) (H34 (refl_equal T (THead -(Flat Appl) x (THead (Bind b) t1 x0))) (sn3 c (THead (Flat Appl) x (THead -(Bind b) t1 x0)))) x1 H33)))) (\lambda (H33: (((eq T x x1) \to (\forall (P: -Prop).P)))).(H8 (THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H34: (eq T -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) -x0))).(\lambda (P: Prop).(let H35 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O -x) | (TLRef _) \Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O x) -| (THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) -(THead (Flat Appl) (lift (S O) O x1) x0) H34) in (let H36 \def (eq_ind_r T x1 -(\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) H33 x (lift_inj x -x1 (S O) O H35)) in (let H37 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x -t0)) H15 x (lift_inj x x1 (S O) O H35)) in (H36 (refl_equal T x) P)))))) -(pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift -(CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x -x1 (pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl) x1 -x0 (refl_equal T (THead (Flat Appl) (lift (S O) O x1) x0)))) H32))) x4 -H29)))) (\lambda (H29: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H8 (THead -(Flat Appl) (lift (S O) O x1) x4) (\lambda (H30: (eq T (THead (Flat Appl) -(lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4))).(\lambda (P: -Prop).(let H31 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) -\Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 -_) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat -Appl) (lift (S O) O x1) x4) H30) in ((let H32 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | -(THead _ _ t0) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) -(THead (Flat Appl) (lift (S O) O x1) x4) H30) in (\lambda (H33: (eq T (lift -(S O) O x) (lift (S O) O x1))).(let H34 \def (eq_ind_r T x4 (\lambda (t0: -T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H29 x0 H32) in (let H35 \def -(eq_ind_r T x4 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) -t1 x0)) (THead (Flat Appl) x1 (THead (Bind b) t1 t0))) \to (\forall (P0: -Prop).P0))) H26 x0 H32) in (let H36 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 -(CHead c (Bind b) t1) x0 t0)) H22 x0 H32) in (let H37 \def (eq_ind_r T x1 -(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead -(Flat Appl) t0 (THead (Bind b) t1 x0))) \to (\forall (P0: Prop).P0))) H35 x -(lift_inj x x1 (S O) O H33)) in (let H38 \def (eq_ind_r T x1 (\lambda (t0: -T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O H33)) in (H34 (refl_equal T x0) -P)))))))) H31)))) (pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift (S -O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c c -(drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x4 H22 Appl) x1 x4 -(refl_equal T (THead (Flat Appl) (lift (S O) O x1) x4)))) H28))) x3 H25)))) -(\lambda (H25: (((eq T t1 x3) \to (\forall (P: Prop).P)))).(H2 x3 H25 H21 x4 -x1 (sn3_cpr3_trans c t1 x3 H21 (Bind b) (THead (Flat Appl) (lift (S O) O x1) -x4) (let H_x1 \def (term_dec x0 x4) in (let H26 \def H_x1 in (or_ind (eq T x0 -x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) -(THead (Flat Appl) (lift (S O) O x1) x4)) (\lambda (H27: (eq T x0 x4)).(let -H28 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) t1) x0 t0)) -H22 x0 H27) in (eq_ind T x0 (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) -(THead (Flat Appl) (lift (S O) O x1) t0))) (let H_x2 \def (term_dec x x1) in -(let H29 \def H_x2 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: -Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) -x0)) (\lambda (H30: (eq T x x1)).(let H31 \def (eq_ind_r T x1 (\lambda (t0: -T).(pr2 c x t0)) H15 x H30) in (eq_ind T x (\lambda (t0: T).(sn3 (CHead c -(Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x0))) (sn3_sing (CHead c -(Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x0) H9) x1 H30))) (\lambda -(H30: (((eq T x x1) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift -(S O) O x1) x0) (\lambda (H31: (eq T (THead (Flat Appl) (lift (S O) O x) x0) -(THead (Flat Appl) (lift (S O) O x1) x0))).(\lambda (P: Prop).(let H32 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map -(\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow (lref_map -(\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) \Rightarrow t0])) -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) -x0) H31) in (let H33 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to -(\forall (P0: Prop).P0))) H30 x (lift_inj x x1 (S O) O H32)) in (let H34 \def -(eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O -H32)) in (H33 (refl_equal T x) P)))))) (pr3_flat (CHead c (Bind b) t1) (lift -(S O) O x) (lift (S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O -(drop_drop (Bind b) O c c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x0 -(pr3_refl (CHead c (Bind b) t1) x0) Appl))) H29))) x4 H27))) (\lambda (H27: -(((eq T x0 x4) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S -O) O x1) x4) (\lambda (H28: (eq T (THead (Flat Appl) (lift (S O) O x) x0) -(THead (Flat Appl) (lift (S O) O x1) x4))).(\lambda (P: Prop).(let H29 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map -(\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow (lref_map -(\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) \Rightarrow t0])) -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) -x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow -t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) -O x1) x4) H28) in (\lambda (H31: (eq T (lift (S O) O x) (lift (S O) O -x1))).(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to -(\forall (P0: Prop).P0))) H27 x0 H30) in (let H33 \def (eq_ind_r T x4 -(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) x0 t0)) H22 x0 H30) in (let H34 -\def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) -O H31)) in (H32 (refl_equal T x0) P)))))) H29)))) (pr3_flat (CHead c (Bind b) -t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S -O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) -x0 x4 H22 Appl))) H26)))))) H24))) x2 H20))))))) H19)) (\lambda (H19: (pr3 -(CHead c (Bind b) t1) x0 (lift (S O) O x2))).(sn3_gen_lift (CHead c (Bind b) -t1) (THead (Flat Appl) x1 x2) (S O) O (eq_ind_r T (THead (Flat Appl) (lift (S -O) O x1) (lift (S O) (s (Flat Appl) O) x2)) (\lambda (t0: T).(sn3 (CHead c -(Bind b) t1) t0)) (sn3_pr3_trans (CHead c (Bind b) t1) (THead (Flat Appl) -(lift (S O) O x1) x0) (let H_x0 \def (term_dec x x1) in (let H20 \def H_x0 in -(or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 (CHead c -(Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) x0)) (\lambda (H21: (eq T x -x1)).(let H22 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x H21) -in (eq_ind T x (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) -(lift (S O) O t0) x0))) (sn3_sing (CHead c (Bind b) t1) (THead (Flat Appl) -(lift (S O) O x) x0) H9) x1 H21))) (\lambda (H21: (((eq T x x1) \to (\forall -(P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H22: -(eq T (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) -O x1) x0))).(\lambda (P: Prop).(let H23 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x3: nat).(plus x3 -(S O))) O x) | (TLRef _) \Rightarrow (lref_map (\lambda (x3: nat).(plus x3 (S -O))) O x) | (THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O -x) x0) (THead (Flat Appl) (lift (S O) O x1) x0) H22) in (let H24 \def -(eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) -H21 x (lift_inj x x1 (S O) O H23)) in (let H25 \def (eq_ind_r T x1 (\lambda -(t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O H23)) in (H24 (refl_equal -T x) P)))))) (pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O -x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c c -(drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind -b) t1) x0) Appl))) H20))) (THead (Flat Appl) (lift (S O) O x1) (lift (S O) O -x2)) (pr3_thin_dx (CHead c (Bind b) t1) x0 (lift (S O) O x2) H19 (lift (S O) -O x1) Appl)) (lift (S O) O (THead (Flat Appl) x1 x2)) (lift_head (Flat Appl) -x1 x2 (S O) O)) c (drop_drop (Bind b) O c c (drop_refl c) t1))) H18))) t3 -H14))))))) H13)) (\lambda (H13: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: -T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))))).(ex4_4_ind T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind -b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: -T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))) -(sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H14: (eq T (THead (Bind b) t1 x0) (THead (Bind Abst) x1 -x2))).(\lambda (H15: (eq T t3 (THead (Bind Abbr) x3 x4))).(\lambda (_: (pr2 c -x x3)).(\lambda (H17: ((\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind -b0) u0) x2 x4))))).(let H18 \def (eq_ind T t3 (\lambda (t0: T).((eq T (THead -(Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) H10 -(THead (Bind Abbr) x3 x4) H15) in (eq_ind_r T (THead (Bind Abbr) x3 x4) -(\lambda (t0: T).(sn3 c t0)) (let H19 \def (f_equal T B (\lambda (e: -T).(match e with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead -k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow b])])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in -((let H20 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) \Rightarrow t0])) -(THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in ((let H21 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef -_) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind b) t1 x0) -(THead (Bind Abst) x1 x2) H14) in (\lambda (_: (eq T t1 x1)).(\lambda (H23: -(eq B b Abst)).(let H24 \def (eq_ind_r T x2 (\lambda (t0: T).(\forall (b0: -B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) t0 x4)))) H17 x0 H21) in (let -H25 \def (eq_ind B b (\lambda (b0: B).((eq T (THead (Flat Appl) x (THead -(Bind b0) t1 x0)) (THead (Bind Abbr) x3 x4)) \to (\forall (P: Prop).P))) H18 -Abst H23) in (let H26 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: -T).((((eq T (THead (Flat Appl) (lift (S O) O x) x0) t4) \to (\forall (P: -Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) (THead (Flat Appl) (lift (S O) O -x) x0) t4) \to (sn3 (CHead c (Bind b0) t1) t4))))) H9 Abst H23) in (let H27 -\def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T (THead (Flat -Appl) (lift (S O) O x) x0) t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c -(Bind b0) t1) (THead (Flat Appl) (lift (S O) O x) x0) t4) \to (\forall (x5: -T).(\forall (x6: T).((eq T t4 (THead (Flat Appl) (lift (S O) O x5) x6)) \to -(sn3 c (THead (Flat Appl) x5 (THead (Bind b0) t1 x6)))))))))) H8 Abst H23) in -(let H28 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) -\to (\forall (P: Prop).P))) \to ((pr3 c t1 t4) \to (\forall (t0: T).(\forall -(v0: T).((sn3 (CHead c (Bind b0) t4) (THead (Flat Appl) (lift (S O) O v0) -t0)) \to (sn3 c (THead (Flat Appl) v0 (THead (Bind b0) t4 t0)))))))))) H2 -Abst H23) in (let H29 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) -H Abst H23) in (let H30 \def (match (H29 (refl_equal B Abst)) in False with -[]) in H30)))))))))) H20)) H19)) t3 H15)))))))))) H13)) (\lambda (H13: (ex6_6 -B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind b0) y1 z1)))))))) (\lambda -(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: -T).(\lambda (y2: T).(eq T t3 (THead (Bind b0) y2 (THead (Flat Appl) (lift (S -O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c y1 y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) -y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b0: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B -b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead -(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2))))))) (sn3 c t3) -(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda -(x5: T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H15: -(eq T (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3))).(\lambda (H16: (eq T -t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda -(H17: (pr2 c x x5)).(\lambda (H18: (pr2 c x2 x6)).(\lambda (H19: (pr2 (CHead -c (Bind x1) x6) x3 x4)).(let H20 \def (eq_ind T t3 (\lambda (t0: T).((eq T -(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) -H10 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) H16) in -(eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) -(\lambda (t0: T).(sn3 c t0)) (let H21 \def (f_equal T B (\lambda (e: -T).(match e with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead -k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow b])])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in -((let H22 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) \Rightarrow t0])) -(THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in ((let H23 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef -_) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind b) t1 x0) -(THead (Bind x1) x2 x3) H15) in (\lambda (H24: (eq T t1 x2)).(\lambda (H25: -(eq B b x1)).(let H26 \def (eq_ind_r T x3 (\lambda (t0: T).(pr2 (CHead c -(Bind x1) x6) t0 x4)) H19 x0 H23) in (let H27 \def (eq_ind_r T x2 (\lambda -(t0: T).(pr2 c t0 x6)) H18 t1 H24) in (let H28 \def (eq_ind_r B x1 (\lambda -(b0: B).(pr2 (CHead c (Bind b0) x6) x0 x4)) H26 b H25) in (eq_ind B b -(\lambda (b0: B).(sn3 c (THead (Bind b0) x6 (THead (Flat Appl) (lift (S O) O -x5) x4)))) (sn3_pr3_trans c (THead (Bind b) t1 (THead (Flat Appl) (lift (S O) -O x5) x4)) (sn3_bind b c t1 (sn3_sing c t1 H1) (THead (Flat Appl) (lift (S O) -O x5) x4) (let H_x \def (term_dec x x5) in (let H29 \def H_x in (or_ind (eq T -x x5) ((eq T x x5) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) -(THead (Flat Appl) (lift (S O) O x5) x4)) (\lambda (H30: (eq T x x5)).(let -H31 \def (eq_ind_r T x5 (\lambda (t0: T).(pr2 c x t0)) H17 x H30) in (eq_ind -T x (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S -O) O t0) x4))) (let H_x0 \def (term_dec x0 x4) in (let H32 \def H_x0 in -(or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 (CHead c -(Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x4)) (\lambda (H33: (eq T x0 -x4)).(let H34 \def (eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c (Bind b) x6) -x0 t0)) H28 x0 H33) in (eq_ind T x0 (\lambda (t0: T).(sn3 (CHead c (Bind b) -t1) (THead (Flat Appl) (lift (S O) O x) t0))) (sn3_sing (CHead c (Bind b) t1) -(THead (Flat Appl) (lift (S O) O x) x0) H9) x4 H33))) (\lambda (H33: (((eq T -x0 x4) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x) -x4) (\lambda (H34: (eq T (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat -Appl) (lift (S O) O x) x4))).(\lambda (P: Prop).(let H35 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) -\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat Appl) (lift (S -O) O x) x0) (THead (Flat Appl) (lift (S O) O x) x4) H34) in (let H36 \def -(eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) -H33 x0 H35) in (let H37 \def (eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c -(Bind b) x6) x0 t0)) H28 x0 H35) in (H36 (refl_equal T x0) P)))))) -(pr3_pr3_pr3_t c t1 x6 (pr3_pr2 c t1 x6 H27) (THead (Flat Appl) (lift (S O) O -x) x0) (THead (Flat Appl) (lift (S O) O x) x4) (Bind b) (pr3_pr2 (CHead c -(Bind b) x6) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift -(S O) O x) x4) (pr2_thin_dx (CHead c (Bind b) x6) x0 x4 H28 (lift (S O) O x) -Appl))))) H32))) x5 H30))) (\lambda (H30: (((eq T x x5) \to (\forall (P: -Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x5) x4) (\lambda (H31: (eq T -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) -x4))).(\lambda (P: Prop).(let H32 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow (lref_map (\lambda (x7: nat).(plus x7 (S O))) O -x) | (TLRef _) \Rightarrow (lref_map (\lambda (x7: nat).(plus x7 (S O))) O x) -| (THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) -(THead (Flat Appl) (lift (S O) O x5) x4) H31) in ((let H33 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) -\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat Appl) (lift (S -O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) x4) H31) in (\lambda (H34: -(eq T (lift (S O) O x) (lift (S O) O x5))).(let H35 \def (eq_ind_r T x5 -(\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) H30 x (lift_inj x -x5 (S O) O H34)) in (let H36 \def (eq_ind_r T x5 (\lambda (t0: T).(pr2 c x -t0)) H17 x (lift_inj x x5 (S O) O H34)) in (let H37 \def (eq_ind_r T x4 -(\lambda (t0: T).(pr2 (CHead c (Bind b) x6) x0 t0)) H28 x0 H33) in (H35 -(refl_equal T x) P)))))) H32)))) (pr3_pr3_pr3_t c t1 x6 (pr3_pr2 c t1 x6 H27) -(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) -x4) (Bind b) (pr3_flat (CHead c (Bind b) x6) (lift (S O) O x) (lift (S O) O -x5) (pr3_lift (CHead c (Bind b) x6) c (S O) O (drop_drop (Bind b) O c c -(drop_refl c) x6) x x5 (pr3_pr2 c x x5 H17)) x0 x4 (pr3_pr2 (CHead c (Bind b) -x6) x0 x4 H28) Appl)))) H29)))) (THead (Bind b) x6 (THead (Flat Appl) (lift -(S O) O x5) x4)) (pr3_pr2 c (THead (Bind b) t1 (THead (Flat Appl) (lift (S O) -O x5) x4)) (THead (Bind b) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) -(pr2_head_1 c t1 x6 H27 (Bind b) (THead (Flat Appl) (lift (S O) O x5) x4)))) -x1 H25))))))) H22)) H21)) t3 H16)))))))))))))) H13)) H12)))))))))))))) y -H4))))) H3))))))) u H0))))). - -theorem sn3_appl_appl: - \forall (v1: T).(\forall (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in -(\forall (c: C).((sn3 c u1) \to (\forall (v2: T).((sn3 c v2) \to (((\forall -(u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to -(sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 -u1))))))))) -\def - \lambda (v1: T).(\lambda (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in -(\lambda (c: C).(\lambda (H: (sn3 c (THead (Flat Appl) v1 t1))).(insert_eq T -(THead (Flat Appl) v1 t1) (\lambda (t: T).(sn3 c t)) (\lambda (t: T).(\forall -(v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) -\to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to -(sn3 c (THead (Flat Appl) v2 t)))))) (\lambda (y: T).(\lambda (H0: (sn3 c -y)).(unintro T t1 (\lambda (t: T).((eq T y (THead (Flat Appl) v1 t)) \to -(\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c y u2) \to ((((iso -y u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) -\to (sn3 c (THead (Flat Appl) v2 y))))))) (unintro T v1 (\lambda (t: -T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to (\forall (v2: -T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c y u2) \to ((((iso y u2) \to -(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c -(THead (Flat Appl) v2 y)))))))) (sn3_ind c (\lambda (t: T).(\forall (x: -T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (v2: -T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) \to -(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c -(THead (Flat Appl) v2 t))))))))) (\lambda (t2: T).(\lambda (H1: ((\forall -(t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to -(sn3 c t3)))))).(\lambda (H2: ((\forall (t3: T).((((eq T t2 t3) \to (\forall -(P: Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x: T).(\forall (x0: T).((eq T -t3 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall -(u2: T).((pr3 c t3 u2) \to ((((iso t3 u2) \to (\forall (P: Prop).P))) \to -(sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 -t3))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t2 -(THead (Flat Appl) x x0))).(\lambda (v2: T).(\lambda (H4: (sn3 c -v2)).(sn3_ind c (\lambda (t: T).(((\forall (u2: T).((pr3 c t2 u2) \to ((((iso -t2 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t u2)))))) -\to (sn3 c (THead (Flat Appl) t t2)))) (\lambda (t0: T).(\lambda (H5: -((\forall (t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t0 -t3) \to (sn3 c t3)))))).(\lambda (H6: ((\forall (t3: T).((((eq T t0 t3) \to -(\forall (P: Prop).P))) \to ((pr3 c t0 t3) \to (((\forall (u2: T).((pr3 c t2 -u2) \to ((((iso t2 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat -Appl) t3 u2)))))) \to (sn3 c (THead (Flat Appl) t3 t2)))))))).(\lambda (H7: -((\forall (u2: T).((pr3 c t2 u2) \to ((((iso t2 u2) \to (\forall (P: -Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2))))))).(let H8 \def (eq_ind T -t2 (\lambda (t: T).(\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) \to -(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H7 (THead -(Flat Appl) x x0) H3) in (let H9 \def (eq_ind T t2 (\lambda (t: T).(\forall -(t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t3) \to -(((\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) \to (\forall (P: -Prop).P))) \to (sn3 c (THead (Flat Appl) t3 u2)))))) \to (sn3 c (THead (Flat -Appl) t3 t))))))) H6 (THead (Flat Appl) x x0) H3) in (let H10 \def (eq_ind T -t2 (\lambda (t: T).(\forall (t3: T).((((eq T t t3) \to (\forall (P: -Prop).P))) \to ((pr3 c t t3) \to (\forall (x1: T).(\forall (x2: T).((eq T t3 -(THead (Flat Appl) x1 x2)) \to (\forall (v3: T).((sn3 c v3) \to (((\forall -(u2: T).((pr3 c t3 u2) \to ((((iso t3 u2) \to (\forall (P: Prop).P))) \to -(sn3 c (THead (Flat Appl) v3 u2)))))) \to (sn3 c (THead (Flat Appl) v3 -t3)))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H11 \def (eq_ind T t2 -(\lambda (t: T).(\forall (t3: T).((((eq T t t3) \to (\forall (P: Prop).P))) -\to ((pr3 c t t3) \to (sn3 c t3))))) H1 (THead (Flat Appl) x x0) H3) in -(eq_ind_r T (THead (Flat Appl) x x0) (\lambda (t: T).(sn3 c (THead (Flat -Appl) t0 t))) (sn3_pr2_intro c (THead (Flat Appl) t0 (THead (Flat Appl) x -x0)) (\lambda (t3: T).(\lambda (H12: (((eq T (THead (Flat Appl) t0 (THead -(Flat Appl) x x0)) t3) \to (\forall (P: Prop).P)))).(\lambda (H13: (pr2 c -(THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t3)).(let H14 \def -(pr2_gen_appl c t0 (THead (Flat Appl) x x0) t3 H13) in (or3_ind (ex3_2 T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda -(t4: T).(pr2 c (THead (Flat Appl) x x0) t4)))) (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) -x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T -T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq -T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda -(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) -z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: -B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: -T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) -y2) z1 z2)))))))) (sn3 c t3) (\lambda (H15: (ex3_2 T T (\lambda (u2: -T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c -(THead (Flat Appl) x x0) t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Flat Appl) -x x0) t4))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H16: (eq T -t3 (THead (Flat Appl) x1 x2))).(\lambda (H17: (pr2 c t0 x1)).(\lambda (H18: -(pr2 c (THead (Flat Appl) x x0) x2)).(let H19 \def (eq_ind T t3 (\lambda (t: -T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: -Prop).P))) H12 (THead (Flat Appl) x1 x2) H16) in (eq_ind_r T (THead (Flat -Appl) x1 x2) (\lambda (t: T).(sn3 c t)) (let H20 \def (pr2_gen_appl c x x0 x2 -H18) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4)))) (ex4_4 T T T T (\lambda -(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead -(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 -(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c -(THead (Flat Appl) x1 x2)) (\lambda (H21: (ex3_2 T T (\lambda (u2: -T).(\lambda (t4: T).(eq T x2 (THead (Flat Appl) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c x0 -t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead -(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) -(\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4))) (sn3 c (THead (Flat Appl) x1 -x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H22: (eq T x2 (THead (Flat -Appl) x3 x4))).(\lambda (H23: (pr2 c x x3)).(\lambda (H24: (pr2 c x0 -x4)).(let H25 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 -(THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: -Prop).P))) H19 (THead (Flat Appl) x3 x4) H22) in (eq_ind_r T (THead (Flat -Appl) x3 x4) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H_x \def -(term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) in (let H26 -\def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) -((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) \to (\forall (P: -Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x3 x4))) (\lambda -(H27: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4))).(let H28 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | -(TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x -x0) (THead (Flat Appl) x3 x4) H27) in ((let H29 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | -(THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x3 -x4) H27) in (\lambda (H30: (eq T x x3)).(let H31 \def (eq_ind_r T x4 (\lambda -(t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat -Appl) x1 (THead (Flat Appl) x3 t))) \to (\forall (P: Prop).P))) H25 x0 H29) -in (let H32 \def (eq_ind_r T x4 (\lambda (t: T).(pr2 c x0 t)) H24 x0 H29) in -(eq_ind T x0 (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) -x3 t)))) (let H33 \def (eq_ind_r T x3 (\lambda (t: T).((eq T (THead (Flat -Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 (THead (Flat Appl) t -x0))) \to (\forall (P: Prop).P))) H31 x H30) in (let H34 \def (eq_ind_r T x3 -(\lambda (t: T).(pr2 c x t)) H23 x H30) in (eq_ind T x (\lambda (t: T).(sn3 c -(THead (Flat Appl) x1 (THead (Flat Appl) t x0)))) (let H_x0 \def (term_dec t0 -x1) in (let H35 \def H_x0 in (or_ind (eq T t0 x1) ((eq T t0 x1) \to (\forall -(P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x x0))) -(\lambda (H36: (eq T t0 x1)).(let H37 \def (eq_ind_r T x1 (\lambda (t: -T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) -t (THead (Flat Appl) x x0))) \to (\forall (P: Prop).P))) H33 t0 H36) in (let -H38 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c t0 t)) H17 t0 H36) in (eq_ind -T t0 (\lambda (t: T).(sn3 c (THead (Flat Appl) t (THead (Flat Appl) x x0)))) -(H37 (refl_equal T (THead (Flat Appl) t0 (THead (Flat Appl) x x0))) (sn3 c -(THead (Flat Appl) t0 (THead (Flat Appl) x x0)))) x1 H36)))) (\lambda (H36: -(((eq T t0 x1) \to (\forall (P: Prop).P)))).(H9 x1 H36 (pr3_pr2 c t0 x1 H17) -(\lambda (u2: T).(\lambda (H37: (pr3 c (THead (Flat Appl) x x0) u2)).(\lambda -(H38: (((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: -Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H8 u2 H37 H38) (THead -(Flat Appl) x1 u2) (pr3_pr2 c (THead (Flat Appl) t0 u2) (THead (Flat Appl) x1 -u2) (pr2_head_1 c t0 x1 H17 (Flat Appl) u2)))))))) H35))) x3 H30))) x4 -H29))))) H28))) (\lambda (H27: (((eq T (THead (Flat Appl) x x0) (THead (Flat -Appl) x3 x4)) \to (\forall (P: Prop).P)))).(H10 (THead (Flat Appl) x3 x4) H27 -(pr3_flat c x x3 (pr3_pr2 c x x3 H23) x0 x4 (pr3_pr2 c x0 x4 H24) Appl) x3 x4 -(refl_equal T (THead (Flat Appl) x3 x4)) x1 (sn3_pr3_trans c t0 (sn3_sing c -t0 H5) x1 (pr3_pr2 c t0 x1 H17)) (\lambda (u2: T).(\lambda (H28: (pr3 c -(THead (Flat Appl) x3 x4) u2)).(\lambda (H29: (((iso (THead (Flat Appl) x3 -x4) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 -u2) (H8 u2 (pr3_sing c (THead (Flat Appl) x x4) (THead (Flat Appl) x x0) -(pr2_thin_dx c x0 x4 H24 x Appl) u2 (pr3_sing c (THead (Flat Appl) x3 x4) -(THead (Flat Appl) x x4) (pr2_head_1 c x x3 H23 (Flat Appl) x4) u2 H28)) -(\lambda (H30: (iso (THead (Flat Appl) x x0) u2)).(\lambda (P: Prop).(H29 -(iso_trans (THead (Flat Appl) x3 x4) (THead (Flat Appl) x x0) (iso_head x3 x -x4 x0 (Flat Appl)) u2 H30) P)))) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead -(Flat Appl) t0 u2) (THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H17 (Flat -Appl) u2)))))))) H26))) x2 H22))))))) H21)) (\lambda (H21: (ex4_4 T T T T -(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T -T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 -(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda -(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))) (sn3 c (THead (Flat -Appl) x1 x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda -(x6: T).(\lambda (H22: (eq T x0 (THead (Bind Abst) x3 x4))).(\lambda (H23: -(eq T x2 (THead (Bind Abbr) x5 x6))).(\lambda (H24: (pr2 c x x5)).(\lambda -(H25: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x4 -x6))))).(let H26 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) -t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: -Prop).P))) H19 (THead (Bind Abbr) x5 x6) H23) in (eq_ind_r T (THead (Bind -Abbr) x5 x6) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H27 \def -(eq_ind T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) -x t)) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6))) \to (\forall (P: -Prop).P))) H26 (THead (Bind Abst) x3 x4) H22) in (let H28 \def (eq_ind T x0 -(\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat Appl) x t) t4) \to -(\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t4) \to (sn3 c -t4))))) H11 (THead (Bind Abst) x3 x4) H22) in (let H29 \def (eq_ind T x0 -(\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat Appl) x t) t4) \to -(\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t4) \to (\forall -(x7: T).(\forall (x8: T).((eq T t4 (THead (Flat Appl) x7 x8)) \to (\forall -(v3: T).((sn3 c v3) \to (((\forall (u2: T).((pr3 c t4 u2) \to ((((iso t4 u2) -\to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v3 u2)))))) \to -(sn3 c (THead (Flat Appl) v3 t4)))))))))))) H10 (THead (Bind Abst) x3 x4) -H22) in (let H30 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: T).((pr3 c -(THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to -(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H8 (THead -(Bind Abst) x3 x4) H22) in (let H31 \def (eq_ind T x0 (\lambda (t: -T).(\forall (t4: T).((((eq T t0 t4) \to (\forall (P: Prop).P))) \to ((pr3 c -t0 t4) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso -(THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead -(Flat Appl) t4 u2)))))) \to (sn3 c (THead (Flat Appl) t4 (THead (Flat Appl) x -t)))))))) H9 (THead (Bind Abst) x3 x4) H22) in (sn3_pr3_trans c (THead (Flat -Appl) t0 (THead (Bind Abbr) x5 x6)) (H30 (THead (Bind Abbr) x5 x6) (pr3_sing -c (THead (Bind Abbr) x x4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) -(pr2_free c (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind -Abbr) x x4) (pr0_beta x3 x x (pr0_refl x) x4 x4 (pr0_refl x4))) (THead (Bind -Abbr) x5 x6) (pr3_head_12 c x x5 (pr3_pr2 c x x5 H24) (Bind Abbr) x4 x6 -(pr3_pr2 (CHead c (Bind Abbr) x5) x4 x6 (H25 Abbr x5)))) (\lambda (H32: (iso -(THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind Abbr) x5 -x6))).(\lambda (P: Prop).(let H33 \def (match H32 with [(iso_sort n1 n2) -\Rightarrow (\lambda (H33: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind -Abst) x3 x4)))).(\lambda (H34: (eq T (TSort n2) (THead (Bind Abbr) x5 -x6))).((let H35 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H33) -in (False_ind ((eq T (TSort n2) (THead (Bind Abbr) x5 x6)) \to P) H35)) -H34))) | (iso_lref i1 i2) \Rightarrow (\lambda (H33: (eq T (TLRef i1) (THead -(Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H34: (eq T (TLRef i2) -(THead (Bind Abbr) x5 x6))).((let H35 \def (eq_ind T (TLRef i1) (\lambda (e: -T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) -x3 x4)) H33) in (False_ind ((eq T (TLRef i2) (THead (Bind Abbr) x5 x6)) \to -P) H35)) H34))) | (iso_head v4 v5 t4 t5 k) \Rightarrow (\lambda (H33: (eq T -(THead k v4 t4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda -(H34: (eq T (THead k v5 t5) (THead (Bind Abbr) x5 x6))).((let H35 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t4 | (TLRef -_) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k v4 t4) (THead -(Flat Appl) x (THead (Bind Abst) x3 x4)) H33) in ((let H36 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow v4 | (TLRef _) -\Rightarrow v4 | (THead _ t _) \Rightarrow t])) (THead k v4 t4) (THead (Flat -Appl) x (THead (Bind Abst) x3 x4)) H33) in ((let H37 \def (f_equal T K -(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k v4 t4) (THead (Flat -Appl) x (THead (Bind Abst) x3 x4)) H33) in (eq_ind K (Flat Appl) (\lambda -(k0: K).((eq T v4 x) \to ((eq T t4 (THead (Bind Abst) x3 x4)) \to ((eq T -(THead k0 v5 t5) (THead (Bind Abbr) x5 x6)) \to P)))) (\lambda (H38: (eq T v4 -x)).(eq_ind T x (\lambda (_: T).((eq T t4 (THead (Bind Abst) x3 x4)) \to ((eq -T (THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 x6)) \to P))) (\lambda -(H39: (eq T t4 (THead (Bind Abst) x3 x4))).(eq_ind T (THead (Bind Abst) x3 -x4) (\lambda (_: T).((eq T (THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 -x6)) \to P)) (\lambda (H40: (eq T (THead (Flat Appl) v5 t5) (THead (Bind -Abbr) x5 x6))).(let H41 \def (eq_ind T (THead (Flat Appl) v5 t5) (\lambda (e: -T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead k0 _ _) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind Abbr) x5 x6) H40) in (False_ind P -H41))) t4 (sym_eq T t4 (THead (Bind Abst) x3 x4) H39))) v4 (sym_eq T v4 x -H38))) k (sym_eq K k (Flat Appl) H37))) H36)) H35)) H34)))]) in (H33 -(refl_equal T (THead (Flat Appl) x (THead (Bind Abst) x3 x4))) (refl_equal T -(THead (Bind Abbr) x5 x6))))))) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 -x6)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (THead (Flat -Appl) x1 (THead (Bind Abbr) x5 x6)) (pr2_head_1 c t0 x1 H17 (Flat Appl) -(THead (Bind Abbr) x5 x6))))))))) x2 H23)))))))))) H21)) (\lambda (H21: -(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: -B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda -(u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift -(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) -(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: -T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 -(CHead c (Bind b) y2) z1 z2))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda -(x3: B).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: -T).(\lambda (x8: T).(\lambda (H22: (not (eq B x3 Abst))).(\lambda (H23: (eq T -x0 (THead (Bind x3) x4 x5))).(\lambda (H24: (eq T x2 (THead (Bind x3) x8 -(THead (Flat Appl) (lift (S O) O x7) x6)))).(\lambda (H25: (pr2 c x -x7)).(\lambda (H26: (pr2 c x4 x8)).(\lambda (H27: (pr2 (CHead c (Bind x3) x8) -x5 x6)).(let H28 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) -t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: -Prop).P))) H19 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) -H24) in (eq_ind_r T (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) -x6)) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H29 \def (eq_ind -T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x t)) -(THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O -x7) x6)))) \to (\forall (P: Prop).P))) H28 (THead (Bind x3) x4 x5) H23) in -(let H30 \def (eq_ind T x0 (\lambda (t: T).(\forall (t4: T).((((eq T (THead -(Flat Appl) x t) t4) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat -Appl) x t) t4) \to (sn3 c t4))))) H11 (THead (Bind x3) x4 x5) H23) in (let -H31 \def (eq_ind T x0 (\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat -Appl) x t) t4) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x -t) t4) \to (\forall (x9: T).(\forall (x10: T).((eq T t4 (THead (Flat Appl) x9 -x10)) \to (\forall (v3: T).((sn3 c v3) \to (((\forall (u2: T).((pr3 c t4 u2) -\to ((((iso t4 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) -v3 u2)))))) \to (sn3 c (THead (Flat Appl) v3 t4)))))))))))) H10 (THead (Bind -x3) x4 x5) H23) in (let H32 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: -T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) -u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H8 -(THead (Bind x3) x4 x5) H23) in (let H33 \def (eq_ind T x0 (\lambda (t: -T).(\forall (t4: T).((((eq T t0 t4) \to (\forall (P: Prop).P))) \to ((pr3 c -t0 t4) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso -(THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead -(Flat Appl) t4 u2)))))) \to (sn3 c (THead (Flat Appl) t4 (THead (Flat Appl) x -t)))))))) H9 (THead (Bind x3) x4 x5) H23) in (sn3_pr3_trans c (THead (Flat -Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (H32 -(THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (pr3_sing c -(THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) x5)) (THead (Flat -Appl) x (THead (Bind x3) x4 x5)) (pr2_free c (THead (Flat Appl) x (THead -(Bind x3) x4 x5)) (THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) -x5)) (pr0_upsilon x3 H22 x x (pr0_refl x) x4 x4 (pr0_refl x4) x5 x5 (pr0_refl -x5))) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) -(pr3_head_12 c x4 x8 (pr3_pr2 c x4 x8 H26) (Bind x3) (THead (Flat Appl) (lift -(S O) O x) x5) (THead (Flat Appl) (lift (S O) O x7) x6) (pr3_head_12 (CHead c -(Bind x3) x8) (lift (S O) O x) (lift (S O) O x7) (pr3_lift (CHead c (Bind x3) -x8) c (S O) O (drop_drop (Bind x3) O c c (drop_refl c) x8) x x7 (pr3_pr2 c x -x7 H25)) (Flat Appl) x5 x6 (pr3_pr2 (CHead (CHead c (Bind x3) x8) (Flat Appl) -(lift (S O) O x7)) x5 x6 (pr2_cflat (CHead c (Bind x3) x8) x5 x6 H27 Appl -(lift (S O) O x7)))))) (\lambda (H34: (iso (THead (Flat Appl) x (THead (Bind -x3) x4 x5)) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) -x6)))).(\lambda (P: Prop).(let H35 \def (match H34 with [(iso_sort n1 n2) -\Rightarrow (\lambda (H35: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind -x3) x4 x5)))).(\lambda (H36: (eq T (TSort n2) (THead (Bind x3) x8 (THead -(Flat Appl) (lift (S O) O x7) x6)))).((let H37 \def (eq_ind T (TSort n1) -(\lambda (e: T).(match e with [(TSort _) \Rightarrow True | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x -(THead (Bind x3) x4 x5)) H35) in (False_ind ((eq T (TSort n2) (THead (Bind -x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P) H37)) H36))) | -(iso_lref i1 i2) \Rightarrow (\lambda (H35: (eq T (TLRef i1) (THead (Flat -Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H36: (eq T (TLRef i2) (THead -(Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H37 \def -(eq_ind T (TLRef i1) (\lambda (e: T).(match e with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(THead (Flat Appl) x (THead (Bind x3) x4 x5)) H35) in (False_ind ((eq T -(TLRef i2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to -P) H37)) H36))) | (iso_head v4 v5 t4 t5 k) \Rightarrow (\lambda (H35: (eq T -(THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda -(H36: (eq T (THead k v5 t5) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S -O) O x7) x6)))).((let H37 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) -\Rightarrow t])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 -x5)) H35) in ((let H38 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) -\Rightarrow t])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 -x5)) H35) in ((let H39 \def (f_equal T K (\lambda (e: T).(match e with -[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 -x5)) H35) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 x) \to ((eq T -t4 (THead (Bind x3) x4 x5)) \to ((eq T (THead k0 v5 t5) (THead (Bind x3) x8 -(THead (Flat Appl) (lift (S O) O x7) x6))) \to P)))) (\lambda (H40: (eq T v4 -x)).(eq_ind T x (\lambda (_: T).((eq T t4 (THead (Bind x3) x4 x5)) \to ((eq T -(THead (Flat Appl) v5 t5) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) -O x7) x6))) \to P))) (\lambda (H41: (eq T t4 (THead (Bind x3) x4 -x5))).(eq_ind T (THead (Bind x3) x4 x5) (\lambda (_: T).((eq T (THead (Flat -Appl) v5 t5) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) -\to P)) (\lambda (H42: (eq T (THead (Flat Appl) v5 t5) (THead (Bind x3) x8 -(THead (Flat Appl) (lift (S O) O x7) x6)))).(let H43 \def (eq_ind T (THead -(Flat Appl) v5 t5) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False -| (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) H42) in (False_ind P H43))) -t4 (sym_eq T t4 (THead (Bind x3) x4 x5) H41))) v4 (sym_eq T v4 x H40))) k -(sym_eq K k (Flat Appl) H39))) H38)) H37)) H36)))]) in (H35 (refl_equal T -(THead (Flat Appl) x (THead (Bind x3) x4 x5))) (refl_equal T (THead (Bind x3) -x8 (THead (Flat Appl) (lift (S O) O x7) x6)))))))) (THead (Flat Appl) x1 -(THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (pr3_pr2 c -(THead (Flat Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O -x7) x6))) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift -(S O) O x7) x6))) (pr2_head_1 c t0 x1 H17 (Flat Appl) (THead (Bind x3) x8 -(THead (Flat Appl) (lift (S O) O x7) x6)))))))))) x2 H24)))))))))))))) H21)) -H20)) t3 H16))))))) H15)) (\lambda (H15: (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) -x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda -(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) -(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall -(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T -T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T -(THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: -T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind -Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) -z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (x4: T).(\lambda (H16: (eq T (THead (Flat Appl) x x0) (THead -(Bind Abst) x1 x2))).(\lambda (H17: (eq T t3 (THead (Bind Abbr) x3 -x4))).(\lambda (_: (pr2 c t0 x3)).(\lambda (_: ((\forall (b: B).(\forall (u: -T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H20 \def (eq_ind T t3 (\lambda -(t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall -(P: Prop).P))) H12 (THead (Bind Abbr) x3 x4) H17) in (eq_ind_r T (THead (Bind -Abbr) x3 x4) (\lambda (t: T).(sn3 c t)) (let H21 \def (eq_ind T (THead (Flat -Appl) x x0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind -_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x1 -x2) H16) in (False_ind (sn3 c (THead (Bind Abbr) x3 x4)) H21)) t3 -H17)))))))))) H15)) (\lambda (H15: (ex6_6 B T T T T T (\lambda (b: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda -(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat -Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: -T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T -t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) -(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 -y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: -T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 -z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda -(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b -Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead -(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: -T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind -b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: -B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: -T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) -(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda -(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) -(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda -(x5: T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H17: -(eq T (THead (Flat Appl) x x0) (THead (Bind x1) x2 x3))).(\lambda (H18: (eq T -t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda -(_: (pr2 c t0 x5)).(\lambda (_: (pr2 c x2 x6)).(\lambda (_: (pr2 (CHead c -(Bind x1) x6) x3 x4)).(let H22 \def (eq_ind T t3 (\lambda (t: T).((eq T -(THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: -Prop).P))) H12 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) -H18) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) -x4)) (\lambda (t: T).(sn3 c t)) (let H23 \def (eq_ind T (THead (Flat Appl) x -x0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x1) x2 x3) -H17) in (False_ind (sn3 c (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) -O x5) x4))) H23)) t3 H18)))))))))))))) H15)) H14)))))) t2 H3))))))))) v2 -H4))))))))) y H0))))) H))))). - -theorem sn3_appl_beta: - \forall (c: C).(\forall (u: T).(\forall (v: T).(\forall (t: T).((sn3 c -(THead (Flat Appl) u (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) -\to (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind Abst) w -t)))))))))) -\def - \lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (t: T).(\lambda (H: -(sn3 c (THead (Flat Appl) u (THead (Bind Abbr) v t)))).(\lambda (w: -T).(\lambda (H0: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THead (Bind -Abbr) v t) H) in (let H1 \def H_x in (land_ind (sn3 c u) (sn3 c (THead (Bind -Abbr) v t)) (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind -Abst) w t)))) (\lambda (H2: (sn3 c u)).(\lambda (H3: (sn3 c (THead (Bind -Abbr) v t))).(sn3_appl_appl v (THead (Bind Abst) w t) c (sn3_beta c v t H3 w -H0) u H2 (\lambda (u2: T).(\lambda (H4: (pr3 c (THead (Flat Appl) v (THead -(Bind Abst) w t)) u2)).(\lambda (H5: (((iso (THead (Flat Appl) v (THead (Bind -Abst) w t)) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat -Appl) u (THead (Bind Abbr) v t)) H (THead (Flat Appl) u u2) (pr3_thin_dx c -(THead (Bind Abbr) v t) u2 (pr3_iso_beta v w t c u2 H4 H5) u Appl)))))))) -H1))))))))). - -theorem sn3_appl_appls: - \forall (v1: T).(\forall (t1: T).(\forall (vs: TList).(let u1 \def (THeads -(Flat Appl) (TCons v1 vs) t1) in (\forall (c: C).((sn3 c u1) \to (\forall -(v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) -\to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to -(sn3 c (THead (Flat Appl) v2 u1)))))))))) -\def - \lambda (v1: T).(\lambda (t1: T).(\lambda (vs: TList).(let u1 \def (THeads -(Flat Appl) (TCons v1 vs) t1) in (\lambda (c: C).(\lambda (H: (sn3 c (THead -(Flat Appl) v1 (THeads (Flat Appl) vs t1)))).(\lambda (v2: T).(\lambda (H0: -(sn3 c v2)).(\lambda (H1: ((\forall (u2: T).((pr3 c (THead (Flat Appl) v1 -(THeads (Flat Appl) vs t1)) u2) \to ((((iso (THead (Flat Appl) v1 (THeads -(Flat Appl) vs t1)) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat -Appl) v2 u2))))))).(sn3_appl_appl v1 (THeads (Flat Appl) vs t1) c H v2 H0 -H1))))))))). - -lemma sn3_appls_lref: - \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (us: -TList).((sns3 c us) \to (sn3 c (THeads (Flat Appl) us (TLRef i))))))) -\def - \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda -(us: TList).(TList_ind (\lambda (t: TList).((sns3 c t) \to (sn3 c (THeads -(Flat Appl) t (TLRef i))))) (\lambda (_: True).(sn3_nf2 c (TLRef i) H)) -(\lambda (t: T).(\lambda (t0: TList).(TList_ind (\lambda (t1: TList).((((sns3 -c t1) \to (sn3 c (THeads (Flat Appl) t1 (TLRef i))))) \to ((land (sn3 c t) -(sns3 c t1)) \to (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 (TLRef -i))))))) (\lambda (_: (((sns3 c TNil) \to (sn3 c (THeads (Flat Appl) TNil -(TLRef i)))))).(\lambda (H1: (land (sn3 c t) (sns3 c TNil))).(let H2 \def H1 -in (land_ind (sn3 c t) True (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) -TNil (TLRef i)))) (\lambda (H3: (sn3 c t)).(\lambda (_: True).(sn3_appl_lref -c i H t H3))) H2)))) (\lambda (t1: T).(\lambda (t2: TList).(\lambda (_: -(((((sns3 c t2) \to (sn3 c (THeads (Flat Appl) t2 (TLRef i))))) \to ((land -(sn3 c t) (sns3 c t2)) \to (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t2 -(TLRef i)))))))).(\lambda (H1: (((sns3 c (TCons t1 t2)) \to (sn3 c (THeads -(Flat Appl) (TCons t1 t2) (TLRef i)))))).(\lambda (H2: (land (sn3 c t) (sns3 -c (TCons t1 t2)))).(let H3 \def H2 in (land_ind (sn3 c t) (land (sn3 c t1) -(sns3 c t2)) (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) -(TLRef i)))) (\lambda (H4: (sn3 c t)).(\lambda (H5: (land (sn3 c t1) (sns3 c -t2))).(land_ind (sn3 c t1) (sns3 c t2) (sn3 c (THead (Flat Appl) t (THeads -(Flat Appl) (TCons t1 t2) (TLRef i)))) (\lambda (H6: (sn3 c t1)).(\lambda -(H7: (sns3 c t2)).(sn3_appl_appls t1 (TLRef i) t2 c (H1 (conj (sn3 c t1) -(sns3 c t2) H6 H7)) t H4 (\lambda (u2: T).(\lambda (H8: (pr3 c (THeads (Flat -Appl) (TCons t1 t2) (TLRef i)) u2)).(\lambda (H9: (((iso (THeads (Flat Appl) -(TCons t1 t2) (TLRef i)) u2) \to (\forall (P: Prop).P)))).(H9 -(nf2_iso_appls_lref c i H (TCons t1 t2) u2 H8) (sn3 c (THead (Flat Appl) t -u2))))))))) H5))) H3))))))) t0))) us)))). - -theorem sn3_appls_cast: - \forall (c: C).(\forall (vs: TList).(\forall (u: T).((sn3 c (THeads (Flat -Appl) vs u)) \to (\forall (t: T).((sn3 c (THeads (Flat Appl) vs t)) \to (sn3 -c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))) -\def - \lambda (c: C).(\lambda (vs: TList).(TList_ind (\lambda (t: TList).(\forall -(u: T).((sn3 c (THeads (Flat Appl) t u)) \to (\forall (t0: T).((sn3 c (THeads -(Flat Appl) t t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Flat Cast) u -t0)))))))) (\lambda (u: T).(\lambda (H: (sn3 c u)).(\lambda (t: T).(\lambda -(H0: (sn3 c t)).(sn3_cast c u H t H0))))) (\lambda (t: T).(\lambda (t0: -TList).(TList_ind (\lambda (t1: TList).(((\forall (u: T).((sn3 c (THeads -(Flat Appl) t1 u)) \to (\forall (t2: T).((sn3 c (THeads (Flat Appl) t1 t2)) -\to (sn3 c (THeads (Flat Appl) t1 (THead (Flat Cast) u t2)))))))) \to -(\forall (u: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 u))) \to -(\forall (t2: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 t2))) -\to (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 (THead (Flat Cast) u -t2)))))))))) (\lambda (_: ((\forall (u: T).((sn3 c (THeads (Flat Appl) TNil -u)) \to (\forall (t1: T).((sn3 c (THeads (Flat Appl) TNil t1)) \to (sn3 c -(THeads (Flat Appl) TNil (THead (Flat Cast) u t1))))))))).(\lambda (u: -T).(\lambda (H0: (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) TNil -u)))).(\lambda (t1: T).(\lambda (H1: (sn3 c (THead (Flat Appl) t (THeads -(Flat Appl) TNil t1)))).(sn3_appl_cast c t u H0 t1 H1)))))) (\lambda (t1: -T).(\lambda (t2: TList).(\lambda (_: ((((\forall (u: T).((sn3 c (THeads (Flat -Appl) t2 u)) \to (\forall (t3: T).((sn3 c (THeads (Flat Appl) t2 t3)) \to -(sn3 c (THeads (Flat Appl) t2 (THead (Flat Cast) u t3)))))))) \to (\forall -(u: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t2 u))) \to (\forall -(t3: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t2 t3))) \to (sn3 c -(THead (Flat Appl) t (THeads (Flat Appl) t2 (THead (Flat Cast) u -t3))))))))))).(\lambda (H0: ((\forall (u: T).((sn3 c (THeads (Flat Appl) -(TCons t1 t2) u)) \to (\forall (t3: T).((sn3 c (THeads (Flat Appl) (TCons t1 -t2) t3)) \to (sn3 c (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u -t3))))))))).(\lambda (u: T).(\lambda (H1: (sn3 c (THead (Flat Appl) t (THeads -(Flat Appl) (TCons t1 t2) u)))).(\lambda (t3: T).(\lambda (H2: (sn3 c (THead -(Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) t3)))).(let H_x \def -(sn3_gen_flat Appl c t (THeads (Flat Appl) (TCons t1 t2) t3) H2) in (let H3 -\def H_x in (land_ind (sn3 c t) (sn3 c (THead (Flat Appl) t1 (THeads (Flat -Appl) t2 t3))) (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) -(THead (Flat Cast) u t3)))) (\lambda (_: (sn3 c t)).(\lambda (H5: (sn3 c -(THead (Flat Appl) t1 (THeads (Flat Appl) t2 t3)))).(let H6 \def H5 in (let -H_x0 \def (sn3_gen_flat Appl c t (THeads (Flat Appl) (TCons t1 t2) u) H1) in -(let H7 \def H_x0 in (land_ind (sn3 c t) (sn3 c (THead (Flat Appl) t1 (THeads -(Flat Appl) t2 u))) (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 -t2) (THead (Flat Cast) u t3)))) (\lambda (H8: (sn3 c t)).(\lambda (H9: (sn3 c -(THead (Flat Appl) t1 (THeads (Flat Appl) t2 u)))).(let H10 \def H9 in -(sn3_appl_appls t1 (THead (Flat Cast) u t3) t2 c (H0 u H10 t3 H6) t H8 -(\lambda (u2: T).(\lambda (H11: (pr3 c (THeads (Flat Appl) (TCons t1 t2) -(THead (Flat Cast) u t3)) u2)).(\lambda (H12: (((iso (THeads (Flat Appl) -(TCons t1 t2) (THead (Flat Cast) u t3)) u2) \to (\forall (P: -Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t (THeads (Flat Appl) (TCons -t1 t2) t3)) H2 (THead (Flat Appl) t u2) (pr3_thin_dx c (THeads (Flat Appl) -(TCons t1 t2) t3) u2 (pr3_iso_appls_cast c u t3 (TCons t1 t2) u2 H11 H12) t -Appl))))))))) H7)))))) H3))))))))))) t0))) vs)). - -theorem sn3_appls_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: -T).((sn3 c u) \to (\forall (vs: TList).(\forall (t: T).((sn3 (CHead c (Bind -b) u) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to (sn3 c (THeads (Flat -Appl) vs (THead (Bind b) u t)))))))))) -\def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda -(u: T).(\lambda (H0: (sn3 c u)).(\lambda (vs: TList).(TList_ind (\lambda (t: -TList).(\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) (lifts -(S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u t0)))))) -(\lambda (t: T).(\lambda (H1: (sn3 (CHead c (Bind b) u) t)).(sn3_bind b c u -H0 t H1))) (\lambda (v: T).(\lambda (vs0: TList).(TList_ind (\lambda (t: -TList).(((\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) -(lifts (S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u -t0)))))) \to (\forall (t0: T).((sn3 (CHead c (Bind b) u) (THead (Flat Appl) -(lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t) t0))) \to (sn3 c -(THead (Flat Appl) v (THeads (Flat Appl) t (THead (Bind b) u t0)))))))) -(\lambda (_: ((\forall (t: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) -(lifts (S O) O TNil) t)) \to (sn3 c (THeads (Flat Appl) TNil (THead (Bind b) -u t))))))).(\lambda (t: T).(\lambda (H2: (sn3 (CHead c (Bind b) u) (THead -(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O TNil) -t)))).(sn3_appl_bind b H c u H0 t v H2)))) (\lambda (t: T).(\lambda (t0: -TList).(\lambda (_: ((((\forall (t1: T).((sn3 (CHead c (Bind b) u) (THeads -(Flat Appl) (lifts (S O) O t0) t1)) \to (sn3 c (THeads (Flat Appl) t0 (THead -(Bind b) u t1)))))) \to (\forall (t1: T).((sn3 (CHead c (Bind b) u) (THead -(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t0) t1))) \to -(sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (THead (Bind b) u -t1))))))))).(\lambda (H2: ((\forall (t1: T).((sn3 (CHead c (Bind b) u) -(THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)) \to (sn3 c (THeads -(Flat Appl) (TCons t t0) (THead (Bind b) u t1))))))).(\lambda (t1: -T).(\lambda (H3: (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O -v) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)))).(let H_x \def -(sn3_gen_flat Appl (CHead c (Bind b) u) (lift (S O) O v) (THeads (Flat Appl) -(lifts (S O) O (TCons t t0)) t1) H3) in (let H4 \def H_x in (land_ind (sn3 -(CHead c (Bind b) u) (lift (S O) O v)) (sn3 (CHead c (Bind b) u) (THead (Flat -Appl) (lift (S O) O t) (THeads (Flat Appl) (lifts (S O) O t0) t1))) (sn3 c -(THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (THead (Bind b) u -t1)))) (\lambda (H5: (sn3 (CHead c (Bind b) u) (lift (S O) O v))).(\lambda -(H6: (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O t) (THeads -(Flat Appl) (lifts (S O) O t0) t1)))).(let H_y \def (sn3_gen_lift (CHead c -(Bind b) u) v (S O) O H5 c) in (sn3_appl_appls t (THead (Bind b) u t1) t0 c -(H2 t1 H6) v (H_y (drop_drop (Bind b) O c c (drop_refl c) u)) (\lambda (u2: -T).(\lambda (H7: (pr3 c (THeads (Flat Appl) (TCons t t0) (THead (Bind b) u -t1)) u2)).(\lambda (H8: (((iso (THeads (Flat Appl) (TCons t t0) (THead (Bind -b) u t1)) u2) \to (\forall (P: Prop).P)))).(let H9 \def (pr3_iso_appls_bind b -H (TCons t t0) u t1 c u2 H7 H8) in (sn3_pr3_trans c (THead (Flat Appl) v -(THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1))) -(sn3_appl_bind b H c u H0 (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) -t1) v H3) (THead (Flat Appl) v u2) (pr3_flat c v v (pr3_refl c v) (THead -(Bind b) u (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)) u2 H9 -Appl)))))))))) H4))))))))) vs0))) vs)))))). - -theorem sn3_appls_beta: - \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (us: TList).((sn3 c -(THeads (Flat Appl) us (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c -w) \to (sn3 c (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) -w t)))))))))) -\def - \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (us: -TList).(TList_ind (\lambda (t0: TList).((sn3 c (THeads (Flat Appl) t0 (THead -(Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) (\lambda (H: -(sn3 c (THead (Bind Abbr) v t))).(\lambda (w: T).(\lambda (H0: (sn3 c -w)).(sn3_beta c v t H w H0)))) (\lambda (u: T).(\lambda (us0: -TList).(TList_ind (\lambda (t0: TList).((((sn3 c (THeads (Flat Appl) t0 -(THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads -(Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 -c (THead (Flat Appl) u (THeads (Flat Appl) t0 (THead (Bind Abbr) v t)))) \to -(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat -Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))) (\lambda (_: -(((sn3 c (THeads (Flat Appl) TNil (THead (Bind Abbr) v t))) \to (\forall (w: -T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) TNil (THead (Flat Appl) v (THead -(Bind Abst) w t))))))))).(\lambda (H0: (sn3 c (THead (Flat Appl) u (THeads -(Flat Appl) TNil (THead (Bind Abbr) v t))))).(\lambda (w: T).(\lambda (H1: -(sn3 c w)).(sn3_appl_beta c u v t H0 w H1))))) (\lambda (t0: T).(\lambda (t1: -TList).(\lambda (_: (((((sn3 c (THeads (Flat Appl) t1 (THead (Bind Abbr) v -t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) t1 (THead -(Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 c (THead (Flat Appl) u -(THeads (Flat Appl) t1 (THead (Bind Abbr) v t)))) \to (\forall (w: T).((sn3 c -w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) t1 (THead (Flat Appl) -v (THead (Bind Abst) w t))))))))))).(\lambda (H0: (((sn3 c (THeads (Flat -Appl) (TCons t0 t1) (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) -\to (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead -(Bind Abst) w t))))))))).(\lambda (H1: (sn3 c (THead (Flat Appl) u (THeads -(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t))))).(\lambda (w: -T).(\lambda (H2: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THeads -(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t)) H1) in (let H3 \def H_x in -(land_ind (sn3 c u) (sn3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(THead (Bind Abbr) v t)))) (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) -(TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H4: -(sn3 c u)).(\lambda (H5: (sn3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(THead (Bind Abbr) v t))))).(sn3_appl_appls t0 (THead (Flat Appl) v (THead -(Bind Abst) w t)) t1 c (H0 H5 w H2) u H4 (\lambda (u2: T).(\lambda (H6: (pr3 -c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w -t))) u2)).(\lambda (H7: (((iso (THeads (Flat Appl) (TCons t0 t1) (THead (Flat -Appl) v (THead (Bind Abst) w t))) u2) \to (\forall (P: Prop).P)))).(let H8 -\def (pr3_iso_appls_beta (TCons t0 t1) v w t c u2 H6 H7) in (sn3_pr3_trans c -(THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v -t))) H1 (THead (Flat Appl) u u2) (pr3_thin_dx c (THeads (Flat Appl) (TCons t0 -t1) (THead (Bind Abbr) v t)) u2 H8 u Appl))))))))) H3)))))))))) us0))) us)))). - -lemma sn3_lift: - \forall (d: C).(\forall (t: T).((sn3 d t) \to (\forall (c: C).(\forall (h: -nat).(\forall (i: nat).((drop h i c d) \to (sn3 c (lift h i t)))))))) -\def - \lambda (d: C).(\lambda (t: T).(\lambda (H: (sn3 d t)).(sn3_ind d (\lambda -(t0: T).(\forall (c: C).(\forall (h: nat).(\forall (i: nat).((drop h i c d) -\to (sn3 c (lift h i t0))))))) (\lambda (t1: T).(\lambda (_: ((\forall (t2: -T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 d t1 t2) \to (sn3 d -t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: -Prop).P))) \to ((pr3 d t1 t2) \to (\forall (c: C).(\forall (h: nat).(\forall -(i: nat).((drop h i c d) \to (sn3 c (lift h i t2))))))))))).(\lambda (c: -C).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H2: (drop h i c -d)).(sn3_pr2_intro c (lift h i t1) (\lambda (t2: T).(\lambda (H3: (((eq T -(lift h i t1) t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr2 c (lift h i -t1) t2)).(let H5 \def (pr2_gen_lift c t1 t2 h i H4 d H2) in (ex2_ind T -(\lambda (t3: T).(eq T t2 (lift h i t3))) (\lambda (t3: T).(pr2 d t1 t3)) -(sn3 c t2) (\lambda (x: T).(\lambda (H6: (eq T t2 (lift h i x))).(\lambda -(H7: (pr2 d t1 x)).(let H8 \def (eq_ind T t2 (\lambda (t0: T).((eq T (lift h -i t1) t0) \to (\forall (P: Prop).P))) H3 (lift h i x) H6) in (eq_ind_r T -(lift h i x) (\lambda (t0: T).(sn3 c t0)) (H1 x (\lambda (H9: (eq T t1 -x)).(\lambda (P: Prop).(let H10 \def (eq_ind_r T x (\lambda (t0: T).((eq T -(lift h i t1) (lift h i t0)) \to (\forall (P0: Prop).P0))) H8 t1 H9) in (let -H11 \def (eq_ind_r T x (\lambda (t0: T).(pr2 d t1 t0)) H7 t1 H9) in (H10 -(refl_equal T (lift h i t1)) P))))) (pr3_pr2 d t1 x H7) c h i H2) t2 H6))))) -H5))))))))))))) t H))). - -lemma sn3_abbr: - \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) v)) \to ((sn3 d v) \to (sn3 c (TLRef i))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 d -v)).(sn3_pr2_intro c (TLRef i) (\lambda (t2: T).(\lambda (H1: (((eq T (TLRef -i) t2) \to (\forall (P: Prop).P)))).(\lambda (H2: (pr2 c (TLRef i) t2)).(let -H3 \def (pr2_gen_lref c t2 i H2) in (or_ind (eq T t2 (TLRef i)) (ex2_2 C T -(\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) -(\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u))))) (sn3 c t2) -(\lambda (H4: (eq T t2 (TLRef i))).(let H5 \def (eq_ind T t2 (\lambda (t: -T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H4) in -(eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c t)) (H5 (refl_equal T (TLRef i)) -(sn3 c (TLRef i))) t2 H4))) (\lambda (H4: (ex2_2 C T (\lambda (d0: -C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda -(d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: -C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))) (sn3 c t2) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H5: (getl i c (CHead x0 (Bind Abbr) -x1))).(\lambda (H6: (eq T t2 (lift (S i) O x1))).(let H7 \def (eq_ind T t2 -(\lambda (t: T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (lift (S -i) O x1) H6) in (eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(sn3 c t)) (let -H8 \def (eq_ind C (CHead d (Bind Abbr) v) (\lambda (c0: C).(getl i c c0)) H -(CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 -(Bind Abbr) x1) H5)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d -(Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) -i H (CHead x0 (Bind Abbr) x1) H5)) in ((let H10 \def (f_equal C T (\lambda -(e: C).(match e with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow -t])) (CHead d (Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d -(Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in (\lambda (H11: (eq C d -x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c (CHead x0 (Bind -Abbr) t))) H8 v H10) in (eq_ind T v (\lambda (t: T).(sn3 c (lift (S i) O t))) -(let H13 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) -v))) H12 d H11) in (sn3_lift d v H0 c (S i) O (getl_drop Abbr c d v i H13))) -x1 H10)))) H9))) t2 H6)))))) H4)) H3))))))))))). - -lemma sn3_appls_abbr: - \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).((sn3 c (THeads (Flat Appl) -vs (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) vs (TLRef i))))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda -(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind -(\lambda (t: TList).((sn3 c (THeads (Flat Appl) t (lift (S i) O w))) \to (sn3 -c (THeads (Flat Appl) t (TLRef i))))) (\lambda (H0: (sn3 c (lift (S i) O -w))).(let H_y \def (sn3_gen_lift c w (S i) O H0 d (getl_drop Abbr c d w i H)) -in (sn3_abbr c d w i H H_y))) (\lambda (v: T).(\lambda (vs0: -TList).(TList_ind (\lambda (t: TList).((((sn3 c (THeads (Flat Appl) t (lift -(S i) O w))) \to (sn3 c (THeads (Flat Appl) t (TLRef i))))) \to ((sn3 c -(THead (Flat Appl) v (THeads (Flat Appl) t (lift (S i) O w)))) \to (sn3 c -(THead (Flat Appl) v (THeads (Flat Appl) t (TLRef i))))))) (\lambda (_: -(((sn3 c (THeads (Flat Appl) TNil (lift (S i) O w))) \to (sn3 c (THeads (Flat -Appl) TNil (TLRef i)))))).(\lambda (H1: (sn3 c (THead (Flat Appl) v (THeads -(Flat Appl) TNil (lift (S i) O w))))).(sn3_appl_abbr c d w i H v H1))) -(\lambda (t: T).(\lambda (t0: TList).(\lambda (_: (((((sn3 c (THeads (Flat -Appl) t0 (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) t0 (TLRef i))))) -\to ((sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (lift (S i) O w)))) -\to (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (TLRef -i)))))))).(\lambda (H1: (((sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) -O w))) \to (sn3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)))))).(\lambda -(H2: (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (lift (S i) -O w))))).(let H_x \def (sn3_gen_flat Appl c v (THeads (Flat Appl) (TCons t -t0) (lift (S i) O w)) H2) in (let H3 \def H_x in (land_ind (sn3 c v) (sn3 c -(THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w)))) (sn3 c (THead -(Flat Appl) v (THeads (Flat Appl) (TCons t t0) (TLRef i)))) (\lambda (H4: -(sn3 c v)).(\lambda (H5: (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 -(lift (S i) O w))))).(sn3_appl_appls t (TLRef i) t0 c (H1 H5) v H4 (\lambda -(u2: T).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)) -u2)).(\lambda (H7: (((iso (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2) \to -(\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) v (THeads (Flat -Appl) (TCons t t0) (lift (S i) O w))) H2 (THead (Flat Appl) v u2) -(pr3_thin_dx c (THeads (Flat Appl) (TCons t t0) (lift (S i) O w)) u2 -(pr3_iso_appls_abbr c d w i H (TCons t t0) u2 H6 H7) v Appl)))))))) -H3)))))))) vs0))) vs)))))). - -lemma sns3_lifts: - \forall (c: C).(\forall (d: C).(\forall (h: nat).(\forall (i: nat).((drop h -i c d) \to (\forall (ts: TList).((sns3 d ts) \to (sns3 c (lifts h i ts)))))))) -\def - \lambda (c: C).(\lambda (d: C).(\lambda (h: nat).(\lambda (i: nat).(\lambda -(H: (drop h i c d)).(\lambda (ts: TList).(TList_ind (\lambda (t: -TList).((sns3 d t) \to (sns3 c (lifts h i t)))) (\lambda (H0: True).H0) -(\lambda (t: T).(\lambda (t0: TList).(\lambda (H0: (((sns3 d t0) \to (sns3 c -(lifts h i t0))))).(\lambda (H1: (land (sn3 d t) (sns3 d t0))).(let H2 \def -H1 in (land_ind (sn3 d t) (sns3 d t0) (land (sn3 c (lift h i t)) (sns3 c -(lifts h i t0))) (\lambda (H3: (sn3 d t)).(\lambda (H4: (sns3 d t0)).(conj -(sn3 c (lift h i t)) (sns3 c (lifts h i t0)) (sn3_lift d t H3 c h i H) (H0 -H4)))) H2)))))) ts)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/spare.ma b/matita/matita/contribs/lambdadelta/basic_1/spare.ma deleted file mode 100644 index 58a624eef..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/spare.ma +++ /dev/null @@ -1,38 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/theory.ma". - -axiom pc3_gen_appls_sort_abst: - \forall (c: C).(\forall (vs: TList).(\forall (w: T).(\forall (u: T).(\forall -(n: nat).((pc3 c (THeads (Flat Appl) vs (TSort n)) (THead (Bind Abst) w u)) -\to False))))) -. - -axiom pc3_gen_appls_lref_abst: - \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abst) v)) \to (\forall (vs: TList).(\forall (w: T).(\forall -(u: T).((pc3 c (THeads (Flat Appl) vs (TLRef i)) (THead (Bind Abst) w u)) \to -False)))))))) -. - -axiom pc3_gen_appls_lref_sort: - \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abst) v)) \to (\forall (vs: TList).(\forall (ws: -TList).(\forall (n: nat).((pc3 c (THeads (Flat Appl) vs (TLRef i)) (THeads -(Flat Appl) ws (TSort n))) \to False)))))))) -. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/sty0/defs.ma deleted file mode 100644 index e4e0ca832..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sty0/defs.ma +++ /dev/null @@ -1,39 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/G/defs.ma". - -include "basic_1/getl/defs.ma". - -inductive sty0 (g: G): C \to (T \to (T \to Prop)) \def -| sty0_sort: \forall (c: C).(\forall (n: nat).(sty0 g c (TSort n) (TSort -(next g n)))) -| sty0_abbr: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: -nat).((getl i c (CHead d (Bind Abbr) v)) \to (\forall (w: T).((sty0 g d v w) -\to (sty0 g c (TLRef i) (lift (S i) O w)))))))) -| sty0_abst: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: -nat).((getl i c (CHead d (Bind Abst) v)) \to (\forall (w: T).((sty0 g d v w) -\to (sty0 g c (TLRef i) (lift (S i) O v)))))))) -| sty0_bind: \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: -T).(\forall (t2: T).((sty0 g (CHead c (Bind b) v) t1 t2) \to (sty0 g c (THead -(Bind b) v t1) (THead (Bind b) v t2))))))) -| sty0_appl: \forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall (t2: -T).((sty0 g c t1 t2) \to (sty0 g c (THead (Flat Appl) v t1) (THead (Flat -Appl) v t2)))))) -| sty0_cast: \forall (c: C).(\forall (v1: T).(\forall (v2: T).((sty0 g c v1 -v2) \to (\forall (t1: T).(\forall (t2: T).((sty0 g c t1 t2) \to (sty0 g c -(THead (Flat Cast) v1 t1) (THead (Flat Cast) v2 t2)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/sty0/fwd.ma deleted file mode 100644 index 0d05ca147..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sty0/fwd.ma +++ /dev/null @@ -1,553 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sty0/defs.ma". - -implied rec lemma sty0_ind (g: G) (P: (C \to (T \to (T \to Prop)))) (f: -(\forall (c: C).(\forall (n: nat).(P c (TSort n) (TSort (next g n)))))) (f0: -(\forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c -(CHead d (Bind Abbr) v)) \to (\forall (w: T).((sty0 g d v w) \to ((P d v w) -\to (P c (TLRef i) (lift (S i) O w))))))))))) (f1: (\forall (c: C).(\forall -(d: C).(\forall (v: T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) v)) -\to (\forall (w: T).((sty0 g d v w) \to ((P d v w) \to (P c (TLRef i) (lift -(S i) O v))))))))))) (f2: (\forall (b: B).(\forall (c: C).(\forall (v: -T).(\forall (t1: T).(\forall (t2: T).((sty0 g (CHead c (Bind b) v) t1 t2) \to -((P (CHead c (Bind b) v) t1 t2) \to (P c (THead (Bind b) v t1) (THead (Bind -b) v t2)))))))))) (f3: (\forall (c: C).(\forall (v: T).(\forall (t1: -T).(\forall (t2: T).((sty0 g c t1 t2) \to ((P c t1 t2) \to (P c (THead (Flat -Appl) v t1) (THead (Flat Appl) v t2))))))))) (f4: (\forall (c: C).(\forall -(v1: T).(\forall (v2: T).((sty0 g c v1 v2) \to ((P c v1 v2) \to (\forall (t1: -T).(\forall (t2: T).((sty0 g c t1 t2) \to ((P c t1 t2) \to (P c (THead (Flat -Cast) v1 t1) (THead (Flat Cast) v2 t2)))))))))))) (c: C) (t: T) (t0: T) (s0: -sty0 g c t t0) on s0: P c t t0 \def match s0 with [(sty0_sort c0 n) -\Rightarrow (f c0 n) | (sty0_abbr c0 d v i g0 w s1) \Rightarrow (f0 c0 d v i -g0 w s1 ((sty0_ind g P f f0 f1 f2 f3 f4) d v w s1)) | (sty0_abst c0 d v i g0 -w s1) \Rightarrow (f1 c0 d v i g0 w s1 ((sty0_ind g P f f0 f1 f2 f3 f4) d v w -s1)) | (sty0_bind b c0 v t1 t2 s1) \Rightarrow (f2 b c0 v t1 t2 s1 ((sty0_ind -g P f f0 f1 f2 f3 f4) (CHead c0 (Bind b) v) t1 t2 s1)) | (sty0_appl c0 v t1 -t2 s1) \Rightarrow (f3 c0 v t1 t2 s1 ((sty0_ind g P f f0 f1 f2 f3 f4) c0 t1 -t2 s1)) | (sty0_cast c0 v1 v2 s1 t1 t2 s2) \Rightarrow (f4 c0 v1 v2 s1 -((sty0_ind g P f f0 f1 f2 f3 f4) c0 v1 v2 s1) t1 t2 s2 ((sty0_ind g P f f0 f1 -f2 f3 f4) c0 t1 t2 s2))]. - -lemma sty0_gen_sort: - \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((sty0 g c -(TSort n) x) \to (eq T x (TSort (next g n))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda -(H: (sty0 g c (TSort n) x)).(insert_eq T (TSort n) (\lambda (t: T).(sty0 g c -t x)) (\lambda (_: T).(eq T x (TSort (next g n)))) (\lambda (y: T).(\lambda -(H0: (sty0 g c y x)).(sty0_ind g (\lambda (_: C).(\lambda (t: T).(\lambda -(t0: T).((eq T t (TSort n)) \to (eq T t0 (TSort (next g n))))))) (\lambda (_: -C).(\lambda (n0: nat).(\lambda (H1: (eq T (TSort n0) (TSort n))).(let H2 \def -(f_equal T nat (\lambda (e: T).(match e with [(TSort n1) \Rightarrow n1 | -(TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort -n) H1) in (eq_ind_r nat n (\lambda (n1: nat).(eq T (TSort (next g n1)) (TSort -(next g n)))) (refl_equal T (TSort (next g n))) n0 H2))))) (\lambda (c0: -C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 -(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v -w)).(\lambda (_: (((eq T v (TSort n)) \to (eq T w (TSort (next g -n)))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T -(TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) -H4) in (False_ind (eq T (lift (S i) O w) (TSort (next g n))) H5))))))))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda -(_: (getl i c0 (CHead d (Bind Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g -d v w)).(\lambda (_: (((eq T v (TSort n)) \to (eq T w (TSort (next g -n)))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T -(TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) -H4) in (False_ind (eq T (lift (S i) O v) (TSort (next g n))) H5))))))))))) -(\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) v) t1 t2)).(\lambda (_: (((eq -T t1 (TSort n)) \to (eq T t2 (TSort (next g n)))))).(\lambda (H3: (eq T -(THead (Bind b) v t1) (TSort n))).(let H4 \def (eq_ind T (THead (Bind b) v -t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in -(False_ind (eq T (THead (Bind b) v t2) (TSort (next g n))) H4)))))))))) -(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(_: (sty0 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 (TSort -(next g n)))))).(\lambda (H3: (eq T (THead (Flat Appl) v t1) (TSort n))).(let -H4 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TSort n) H3) in (False_ind (eq T (THead (Flat Appl) v -t2) (TSort (next g n))) H4))))))))) (\lambda (c0: C).(\lambda (v1: -T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 v2)).(\lambda (_: (((eq T v1 -(TSort n)) \to (eq T v2 (TSort (next g n)))))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (sty0 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq -T t2 (TSort (next g n)))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t1) -(TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (eq T -(THead (Flat Cast) v2 t2) (TSort (next g n))) H6)))))))))))) c y x H0))) -H))))). - -lemma sty0_gen_lref: - \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((sty0 g c -(TLRef n) x) \to (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(t: T).(eq T x (lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda -(u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq T x (lift (S n) O u))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda -(H: (sty0 g c (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(sty0 g c -t x)) (\lambda (_: T).(or (ex3_3 C T T (\lambda (e: C).(\lambda (u: -T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t0: T).(sty0 g e u t0)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(eq T x (lift (S n) O t0)))))) (ex3_3 C T -T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind -Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(sty0 g e u -t0)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T x (lift (S n) O -u)))))))) (\lambda (y: T).(\lambda (H0: (sty0 g c y x)).(sty0_ind g (\lambda -(c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (ex3_3 C -T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(sty0 g e u -t1)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t1: T).(eq T t0 (lift (S n) -O t1)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl -n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda -(t1: T).(sty0 g e u t1)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq T t0 (lift (S n) O u))))))))))) (\lambda (c0: C).(\lambda (n0: -nat).(\lambda (H1: (eq T (TSort n0) (TLRef n))).(let H2 \def (eq_ind T (TSort -n0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H1) in -(False_ind (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(t: T).(eq T (TSort (next g n0)) (lift (S n) O t)))))) (ex3_3 C T T (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq T (TSort (next g n0)) (lift (S n) -O u))))))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda -(i: nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) v))).(\lambda (w: -T).(\lambda (H2: (sty0 g d v w)).(\lambda (_: (((eq T v (TLRef n)) \to (or -(ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead -e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g -e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T w (lift (S n) -O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl -n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: -T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T w -(lift (S n) O u)))))))))).(\lambda (H4: (eq T (TLRef i) (TLRef n))).(let H5 -\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i | -(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef -n) H4) in (let H6 \def (eq_ind nat i (\lambda (n0: nat).(getl n0 c0 (CHead d -(Bind Abbr) v))) H1 n H5) in (eq_ind_r nat n (\lambda (n0: nat).(or (ex3_3 C -T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u -t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n0) O w) -(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq T (lift (S n0) O w) (lift (S n) O u)))))))) (or_introl (ex3_3 C T -T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u -t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n) O w) -(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq T (lift (S n) O w) (lift (S n) O u)))))) (ex3_3_intro C T T -(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u -t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n) O w) -(lift (S n) O t))))) d v w H6 H2 (refl_equal T (lift (S n) O w)))) i -H5)))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: -nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abst) v))).(\lambda (w: -T).(\lambda (H2: (sty0 g d v w)).(\lambda (_: (((eq T v (TLRef n)) \to (or -(ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead -e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g -e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T w (lift (S n) -O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl -n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: -T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T w -(lift (S n) O u)))))))))).(\lambda (H4: (eq T (TLRef i) (TLRef n))).(let H5 -\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i | -(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef -n) H4) in (let H6 \def (eq_ind nat i (\lambda (n0: nat).(getl n0 c0 (CHead d -(Bind Abst) v))) H1 n H5) in (eq_ind_r nat n (\lambda (n0: nat).(or (ex3_3 C -T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u -t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n0) O v) -(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq T (lift (S n0) O v) (lift (S n) O u)))))))) (or_intror (ex3_3 C T -T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u -t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n) O v) -(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq T (lift (S n) O v) (lift (S n) O u)))))) (ex3_3_intro C T T -(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u -t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T (lift (S n) O v) -(lift (S n) O u))))) d v w H6 H2 (refl_equal T (lift (S n) O v)))) i -H5)))))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) v) t1 -t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: -C).(\lambda (u: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) v) (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e -u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T t2 (lift (S n) -O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl -n (CHead c0 (Bind b) v) (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda -(u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(eq T t2 (lift (S n) O u)))))))))).(\lambda (H3: (eq T -(THead (Bind b) v t1) (TLRef n))).(let H4 \def (eq_ind T (THead (Bind b) v -t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in -(False_ind (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda -(t: T).(eq T (THead (Bind b) v t2) (lift (S n) O t)))))) (ex3_3 C T T -(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u -t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T (THead (Bind b) v -t2) (lift (S n) O u))))))) H4)))))))))) (\lambda (c0: C).(\lambda (v: -T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (sty0 g c0 t1 t2)).(\lambda -(_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda -(_: T).(\lambda (t: T).(eq T t2 (lift (S n) O t)))))) (ex3_3 C T T (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(eq T t2 (lift (S n) O -u)))))))))).(\lambda (H3: (eq T (THead (Flat Appl) v t1) (TLRef n))).(let H4 -\def (eq_ind T (THead (Flat Appl) v t1) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef n) H3) in (False_ind (or (ex3_3 C T T (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (t: T).(eq T (THead (Flat Appl) v t2) (lift -(S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq T (THead (Flat Appl) v t2) (lift (S n) O u))))))) H4))))))))) -(\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 -v2)).(\lambda (_: (((eq T v1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: -C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (t: T).(eq T v2 (lift (S n) O t)))))) (ex3_3 -C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e -u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T v2 (lift (S n) -O u)))))))))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (sty0 g c0 t1 -t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: -C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (t: T).(eq T t2 (lift (S n) O t)))))) (ex3_3 -C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e -u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T t2 (lift (S n) -O u)))))))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(let -H6 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (t: T).(eq T (THead (Flat Cast) v2 t2) (lift -(S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq T (THead (Flat Cast) v2 t2) (lift (S n) O u))))))) H6)))))))))))) -c y x H0))) H))))). - -lemma sty0_gen_bind: - \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t1: -T).(\forall (x: T).((sty0 g c (THead (Bind b) u t1) x) \to (ex2 T (\lambda -(t2: T).(sty0 g (CHead c (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T x (THead -(Bind b) u t2)))))))))) -\def - \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: -T).(\lambda (x: T).(\lambda (H: (sty0 g c (THead (Bind b) u t1) -x)).(insert_eq T (THead (Bind b) u t1) (\lambda (t: T).(sty0 g c t x)) -(\lambda (_: T).(ex2 T (\lambda (t2: T).(sty0 g (CHead c (Bind b) u) t1 t2)) -(\lambda (t2: T).(eq T x (THead (Bind b) u t2))))) (\lambda (y: T).(\lambda -(H0: (sty0 g c y x)).(sty0_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda -(t0: T).((eq T t (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g -(CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T t0 (THead (Bind b) u -t2)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) -(THead (Bind b) u t1))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H1) in (False_ind -(ex2 T (\lambda (t2: T).(sty0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: -T).(eq T (TSort (next g n)) (THead (Bind b) u t2)))) H2))))) (\lambda (c0: -C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 -(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v -w)).(\lambda (_: (((eq T v (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: -T).(sty0 g (CHead d (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T w (THead (Bind -b) u t2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Bind b) u t1))).(let H5 -\def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead (Bind b) u t1) H4) in (False_ind (ex2 T (\lambda (t2: -T).(sty0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T (lift (S i) O -w) (THead (Bind b) u t2)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind -Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v w)).(\lambda (_: (((eq T -v (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g (CHead d (Bind -b) u) t1 t2)) (\lambda (t2: T).(eq T w (THead (Bind b) u t2))))))).(\lambda -(H4: (eq T (TLRef i) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef i) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) -H4) in (False_ind (ex2 T (\lambda (t2: T).(sty0 g (CHead c0 (Bind b) u) t1 -t2)) (\lambda (t2: T).(eq T (lift (S i) O v) (THead (Bind b) u t2)))) -H5))))))))))) (\lambda (b0: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: -T).(\lambda (t2: T).(\lambda (H1: (sty0 g (CHead c0 (Bind b0) v) t0 -t2)).(\lambda (H2: (((eq T t0 (THead (Bind b) u t1)) \to (ex2 T (\lambda (t3: -T).(sty0 g (CHead (CHead c0 (Bind b0) v) (Bind b) u) t1 t3)) (\lambda (t3: -T).(eq T t2 (THead (Bind b) u t3))))))).(\lambda (H3: (eq T (THead (Bind b0) -v t0) (THead (Bind b) u t1))).(let H4 \def (f_equal T B (\lambda (e: -T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | -(THead k _ _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) -\Rightarrow b0])])) (THead (Bind b0) v t0) (THead (Bind b) u t1) H3) in ((let -H5 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v | -(TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead (Bind b0) v -t0) (THead (Bind b) u t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | -(THead _ _ t) \Rightarrow t])) (THead (Bind b0) v t0) (THead (Bind b) u t1) -H3) in (\lambda (H7: (eq T v u)).(\lambda (H8: (eq B b0 b)).(let H9 \def -(eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind b) u t1)) \to (ex2 T -(\lambda (t3: T).(sty0 g (CHead (CHead c0 (Bind b0) v) (Bind b) u) t1 t3)) -(\lambda (t3: T).(eq T t2 (THead (Bind b) u t3)))))) H2 t1 H6) in (let H10 -\def (eq_ind T t0 (\lambda (t: T).(sty0 g (CHead c0 (Bind b0) v) t t2)) H1 t1 -H6) in (let H11 \def (eq_ind T v (\lambda (t: T).((eq T t1 (THead (Bind b) u -t1)) \to (ex2 T (\lambda (t3: T).(sty0 g (CHead (CHead c0 (Bind b0) t) (Bind -b) u) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3)))))) H9 u H7) -in (let H12 \def (eq_ind T v (\lambda (t: T).(sty0 g (CHead c0 (Bind b0) t) -t1 t2)) H10 u H7) in (eq_ind_r T u (\lambda (t: T).(ex2 T (\lambda (t3: -T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T (THead (Bind -b0) t t2) (THead (Bind b) u t3))))) (let H13 \def (eq_ind B b0 (\lambda (b1: -B).((eq T t1 (THead (Bind b) u t1)) \to (ex2 T (\lambda (t3: T).(sty0 g -(CHead (CHead c0 (Bind b1) u) (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T t2 -(THead (Bind b) u t3)))))) H11 b H8) in (let H14 \def (eq_ind B b0 (\lambda -(b1: B).(sty0 g (CHead c0 (Bind b1) u) t1 t2)) H12 b H8) in (eq_ind_r B b -(\lambda (b1: B).(ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 -t3)) (\lambda (t3: T).(eq T (THead (Bind b1) u t2) (THead (Bind b) u t3))))) -(ex_intro2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda -(t3: T).(eq T (THead (Bind b) u t2) (THead (Bind b) u t3))) t2 H14 -(refl_equal T (THead (Bind b) u t2))) b0 H8))) v H7)))))))) H5)) H4)))))))))) -(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda -(_: (sty0 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u t1)) \to -(ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: -T).(eq T t2 (THead (Bind b) u t3))))))).(\lambda (H3: (eq T (THead (Flat -Appl) v t0) (THead (Bind b) u t1))).(let H4 \def (eq_ind T (THead (Flat Appl) -v t0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) -H3) in (False_ind (ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 -t3)) (\lambda (t3: T).(eq T (THead (Flat Appl) v t2) (THead (Bind b) u t3)))) -H4))))))))) (\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: -(sty0 g c0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t1)) \to (ex2 T -(\lambda (t2: T).(sty0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T -v2 (THead (Bind b) u t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: -(sty0 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u t1)) \to (ex2 T -(\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T -t2 (THead (Bind b) u t3))))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t0) -(THead (Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t0) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) -H5) in (False_ind (ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 -t3)) (\lambda (t3: T).(eq T (THead (Flat Cast) v2 t2) (THead (Bind b) u -t3)))) H6)))))))))))) c y x H0))) H))))))). - -lemma sty0_gen_appl: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (x: -T).((sty0 g c (THead (Flat Appl) u t1) x) \to (ex2 T (\lambda (t2: T).(sty0 g -c t1 t2)) (\lambda (t2: T).(eq T x (THead (Flat Appl) u t2))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (x: -T).(\lambda (H: (sty0 g c (THead (Flat Appl) u t1) x)).(insert_eq T (THead -(Flat Appl) u t1) (\lambda (t: T).(sty0 g c t x)) (\lambda (_: T).(ex2 T -(\lambda (t2: T).(sty0 g c t1 t2)) (\lambda (t2: T).(eq T x (THead (Flat -Appl) u t2))))) (\lambda (y: T).(\lambda (H0: (sty0 g c y x)).(sty0_ind g -(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) -u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g c0 t1 t2)) (\lambda (t2: T).(eq T -t0 (THead (Flat Appl) u t2)))))))) (\lambda (c0: C).(\lambda (n: -nat).(\lambda (H1: (eq T (TSort n) (THead (Flat Appl) u t1))).(let H2 \def -(eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I -(THead (Flat Appl) u t1) H1) in (False_ind (ex2 T (\lambda (t2: T).(sty0 g c0 -t1 t2)) (\lambda (t2: T).(eq T (TSort (next g n)) (THead (Flat Appl) u t2)))) -H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: -nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) v))).(\lambda (w: -T).(\lambda (_: (sty0 g d v w)).(\lambda (_: (((eq T v (THead (Flat Appl) u -t1)) \to (ex2 T (\lambda (t2: T).(sty0 g d t1 t2)) (\lambda (t2: T).(eq T w -(THead (Flat Appl) u t2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat -Appl) u t1))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ -_) \Rightarrow False])) I (THead (Flat Appl) u t1) H4) in (False_ind (ex2 T -(\lambda (t2: T).(sty0 g c0 t1 t2)) (\lambda (t2: T).(eq T (lift (S i) O w) -(THead (Flat Appl) u t2)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind -Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v w)).(\lambda (_: (((eq T -v (THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g d t1 t2)) -(\lambda (t2: T).(eq T w (THead (Flat Appl) u t2))))))).(\lambda (H4: (eq T -(TLRef i) (THead (Flat Appl) u t1))).(let H5 \def (eq_ind T (TLRef i) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u -t1) H4) in (False_ind (ex2 T (\lambda (t2: T).(sty0 g c0 t1 t2)) (\lambda -(t2: T).(eq T (lift (S i) O v) (THead (Flat Appl) u t2)))) H5))))))))))) -(\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda -(t2: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) v) t0 t2)).(\lambda (_: (((eq -T t0 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t3: T).(sty0 g (CHead c0 -(Bind b) v) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u -t3))))))).(\lambda (H3: (eq T (THead (Bind b) v t0) (THead (Flat Appl) u -t1))).(let H4 \def (eq_ind T (THead (Bind b) v t0) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) -\Rightarrow False])])) I (THead (Flat Appl) u t1) H3) in (False_ind (ex2 T -(\lambda (t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Bind b) v -t2) (THead (Flat Appl) u t3)))) H4)))))))))) (\lambda (c0: C).(\lambda (v: -T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: (sty0 g c0 t0 -t2)).(\lambda (H2: (((eq T t0 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda -(t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u -t3))))))).(\lambda (H3: (eq T (THead (Flat Appl) v t0) (THead (Flat Appl) u -t1))).(let H4 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) -(THead (Flat Appl) v t0) (THead (Flat Appl) u t1) H3) in ((let H5 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef -_) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v t0) -(THead (Flat Appl) u t1) H3) in (\lambda (H6: (eq T v u)).(let H7 \def -(eq_ind T t0 (\lambda (t: T).((eq T t (THead (Flat Appl) u t1)) \to (ex2 T -(\lambda (t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat -Appl) u t3)))))) H2 t1 H5) in (let H8 \def (eq_ind T t0 (\lambda (t: T).(sty0 -g c0 t t2)) H1 t1 H5) in (eq_ind_r T u (\lambda (t: T).(ex2 T (\lambda (t3: -T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Flat Appl) t t2) (THead -(Flat Appl) u t3))))) (ex_intro2 T (\lambda (t3: T).(sty0 g c0 t1 t3)) -(\lambda (t3: T).(eq T (THead (Flat Appl) u t2) (THead (Flat Appl) u t3))) t2 -H8 (refl_equal T (THead (Flat Appl) u t2))) v H6))))) H4))))))))) (\lambda -(c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 -v2)).(\lambda (_: (((eq T v1 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda -(t2: T).(sty0 g c0 t1 t2)) (\lambda (t2: T).(eq T v2 (THead (Flat Appl) u -t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (sty0 g c0 t0 -t2)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda -(t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u -t3))))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t0) (THead (Flat Appl) u -t1))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t0) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat -f) \Rightarrow (match f with [Appl \Rightarrow False | Cast \Rightarrow -True])])])) I (THead (Flat Appl) u t1) H5) in (False_ind (ex2 T (\lambda (t3: -T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Flat Cast) v2 t2) (THead -(Flat Appl) u t3)))) H6)))))))))))) c y x H0))) H)))))). - -lemma sty0_gen_cast: - \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (t1: T).(\forall -(x: T).((sty0 g c (THead (Flat Cast) v1 t1) x) \to (ex3_2 T T (\lambda (v2: -T).(\lambda (_: T).(sty0 g c v1 v2))) (\lambda (_: T).(\lambda (t2: T).(sty0 -g c t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) v2 -t2)))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (v1: T).(\lambda (t1: T).(\lambda -(x: T).(\lambda (H: (sty0 g c (THead (Flat Cast) v1 t1) x)).(insert_eq T -(THead (Flat Cast) v1 t1) (\lambda (t: T).(sty0 g c t x)) (\lambda (_: -T).(ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(sty0 g c v1 v2))) (\lambda -(_: T).(\lambda (t2: T).(sty0 g c t1 t2))) (\lambda (v2: T).(\lambda (t2: -T).(eq T x (THead (Flat Cast) v2 t2)))))) (\lambda (y: T).(\lambda (H0: (sty0 -g c y x)).(sty0_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq -T t (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda (_: -T).(sty0 g c0 v1 v2))) (\lambda (_: T).(\lambda (t2: T).(sty0 g c0 t1 t2))) -(\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) v2 t2))))))))) -(\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Flat -Cast) v1 t1))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ -_) \Rightarrow False])) I (THead (Flat Cast) v1 t1) H1) in (False_ind (ex3_2 -T T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: -T).(\lambda (t2: T).(sty0 g c0 t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq -T (TSort (next g n)) (THead (Flat Cast) v2 t2))))) H2))))) (\lambda (c0: -C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 -(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v -w)).(\lambda (_: (((eq T v (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda -(v2: T).(\lambda (_: T).(sty0 g d v1 v2))) (\lambda (_: T).(\lambda (t2: -T).(sty0 g d t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T w (THead (Flat -Cast) v2 t2)))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) v1 -t1))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (THead (Flat Cast) v1 t1) H4) in (False_ind (ex3_2 T T -(\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: T).(\lambda -(t2: T).(sty0 g c0 t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T (lift (S -i) O w) (THead (Flat Cast) v2 t2))))) H5))))))))))) (\lambda (c0: C).(\lambda -(d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d -(Bind Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v w)).(\lambda (_: -(((eq T v (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda -(_: T).(sty0 g d v1 v2))) (\lambda (_: T).(\lambda (t2: T).(sty0 g d t1 t2))) -(\lambda (v2: T).(\lambda (t2: T).(eq T w (THead (Flat Cast) v2 -t2)))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) v1 t1))).(let H5 -\def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead (Flat Cast) v1 t1) H4) in (False_ind (ex3_2 T T (\lambda -(v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: T).(\lambda (t2: -T).(sty0 g c0 t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T (lift (S i) O -v) (THead (Flat Cast) v2 t2))))) H5))))))))))) (\lambda (b: B).(\lambda (c0: -C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (sty0 g -(CHead c0 (Bind b) v) t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) v1 -t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(sty0 g (CHead c0 (Bind -b) v) v1 v2))) (\lambda (_: T).(\lambda (t3: T).(sty0 g (CHead c0 (Bind b) v) -t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) v2 -t3)))))))).(\lambda (H3: (eq T (THead (Bind b) v t0) (THead (Flat Cast) v1 -t1))).(let H4 \def (eq_ind T (THead (Bind b) v t0) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) -\Rightarrow False])])) I (THead (Flat Cast) v1 t1) H3) in (False_ind (ex3_2 T -T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: -T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq -T (THead (Bind b) v t2) (THead (Flat Cast) v2 t3))))) H4)))))))))) (\lambda -(c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (sty0 -g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) v1 t1)) \to (ex3_2 T -T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: -T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq -T t2 (THead (Flat Cast) v2 t3)))))))).(\lambda (H3: (eq T (THead (Flat Appl) -v t0) (THead (Flat Cast) v1 t1))).(let H4 \def (eq_ind T (THead (Flat Appl) v -t0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow True -| Cast \Rightarrow False])])])) I (THead (Flat Cast) v1 t1) H3) in (False_ind -(ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: -T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq -T (THead (Flat Appl) v t2) (THead (Flat Cast) v2 t3))))) H4))))))))) (\lambda -(c0: C).(\lambda (v0: T).(\lambda (v2: T).(\lambda (H1: (sty0 g c0 v0 -v2)).(\lambda (H2: (((eq T v0 (THead (Flat Cast) v1 t1)) \to (ex3_2 T T -(\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) (\lambda (_: T).(\lambda -(t2: T).(sty0 g c0 t1 t2))) (\lambda (v3: T).(\lambda (t2: T).(eq T v2 (THead -(Flat Cast) v3 t2)))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: -(sty0 g c0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Flat Cast) v1 t1)) \to -(ex3_2 T T (\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) (\lambda (_: -T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v3: T).(\lambda (t3: T).(eq -T t2 (THead (Flat Cast) v3 t3)))))))).(\lambda (H5: (eq T (THead (Flat Cast) -v0 t0) (THead (Flat Cast) v1 t1))).(let H6 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | -(THead _ t _) \Rightarrow t])) (THead (Flat Cast) v0 t0) (THead (Flat Cast) -v1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead (Flat Cast) v0 t0) (THead (Flat Cast) v1 t1) H5) in -(\lambda (H8: (eq T v0 v1)).(let H9 \def (eq_ind T t0 (\lambda (t: T).((eq T -t (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v3: T).(\lambda (_: -T).(sty0 g c0 v1 v3))) (\lambda (_: T).(\lambda (t3: T).(sty0 g c0 t1 t3))) -(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) v3 t3))))))) H4 -t1 H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(sty0 g c0 t t2)) H3 t1 -H7) in (let H11 \def (eq_ind T v0 (\lambda (t: T).((eq T t (THead (Flat Cast) -v1 t1)) \to (ex3_2 T T (\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) -(\lambda (_: T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v3: -T).(\lambda (t3: T).(eq T v2 (THead (Flat Cast) v3 t3))))))) H2 v1 H8) in -(let H12 \def (eq_ind T v0 (\lambda (t: T).(sty0 g c0 t v2)) H1 v1 H8) in -(ex3_2_intro T T (\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) -(\lambda (_: T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v3: -T).(\lambda (t3: T).(eq T (THead (Flat Cast) v2 t2) (THead (Flat Cast) v3 -t3)))) v2 t2 H12 H10 (refl_equal T (THead (Flat Cast) v2 t2))))))))) -H6)))))))))))) c y x H0))) H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty0/props.ma b/matita/matita/contribs/lambdadelta/basic_1/sty0/props.ma deleted file mode 100644 index f75c1c75a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sty0/props.ma +++ /dev/null @@ -1,214 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sty0/fwd.ma". - -include "basic_1/getl/drop.ma". - -lemma sty0_lift: - \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((sty0 g e -t1 t2) \to (\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c -e) \to (sty0 g c (lift h d t1) (lift h d t2)))))))))) -\def - \lambda (g: G).(\lambda (e: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (sty0 g e t1 t2)).(sty0_ind g (\lambda (c: C).(\lambda (t: T).(\lambda -(t0: T).(\forall (c0: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 c) -\to (sty0 g c0 (lift h d t) (lift h d t0))))))))) (\lambda (c: C).(\lambda -(n: nat).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: -(drop h d c0 c)).(eq_ind_r T (TSort n) (\lambda (t: T).(sty0 g c0 t (lift h d -(TSort (next g n))))) (eq_ind_r T (TSort (next g n)) (\lambda (t: T).(sty0 g -c0 (TSort n) t)) (sty0_sort g c0 n) (lift h d (TSort (next g n))) (lift_sort -(next g n) h d)) (lift h d (TSort n)) (lift_sort n h d)))))))) (\lambda (c: -C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c -(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (H1: (sty0 g d v -w)).(\lambda (H2: ((\forall (c0: C).(\forall (h: nat).(\forall (d0: -nat).((drop h d0 c0 d) \to (sty0 g c0 (lift h d0 v) (lift h d0 -w)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda (H3: -(drop h d0 c0 c)).(lt_le_e i d0 (sty0 g c0 (lift h d0 (TLRef i)) (lift h d0 -(lift (S i) O w))) (\lambda (H4: (lt i d0)).(let H5 \def (drop_getl_trans_le -i d0 (le_S_n i d0 (le_S_n (S i) (S d0) (le_S (S (S i)) (S d0) (le_n_S (S i) -d0 H4)))) c0 c h H3 (CHead d (Bind Abbr) v) H0) in (ex3_2_ind C C (\lambda -(e0: C).(\lambda (_: C).(drop i O c0 e0))) (\lambda (e0: C).(\lambda (e1: -C).(drop h (minus d0 i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 -(CHead d (Bind Abbr) v)))) (sty0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift -(S i) O w))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop i O c0 -x0)).(\lambda (H7: (drop h (minus d0 i) x0 x1)).(\lambda (H8: (clear x1 -(CHead d (Bind Abbr) v))).(let H9 \def (eq_ind nat (minus d0 i) (\lambda (n: -nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) (minus_x_Sy d0 i H4)) in (let -H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) H9 Abbr d v H8) in (ex2_ind C -(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d0 (S i)) -v)))) (\lambda (c1: C).(drop h (minus d0 (S i)) c1 d)) (sty0 g c0 (lift h d0 -(TLRef i)) (lift h d0 (lift (S i) O w))) (\lambda (x: C).(\lambda (H11: -(clear x0 (CHead x (Bind Abbr) (lift h (minus d0 (S i)) v)))).(\lambda (H12: -(drop h (minus d0 (S i)) x d)).(eq_ind_r T (TLRef i) (\lambda (t: T).(sty0 g -c0 t (lift h d0 (lift (S i) O w)))) (eq_ind nat (plus (S i) (minus d0 (S i))) -(\lambda (n: nat).(sty0 g c0 (TLRef i) (lift h n (lift (S i) O w)))) -(eq_ind_r T (lift (S i) O (lift h (minus d0 (S i)) w)) (\lambda (t: T).(sty0 -g c0 (TLRef i) t)) (eq_ind nat d0 (\lambda (_: nat).(sty0 g c0 (TLRef i) -(lift (S i) O (lift h (minus d0 (S i)) w)))) (sty0_abbr g c0 x (lift h (minus -d0 (S i)) v) i (getl_intro i c0 (CHead x (Bind Abbr) (lift h (minus d0 (S i)) -v)) x0 H6 H11) (lift h (minus d0 (S i)) w) (H2 x h (minus d0 (S i)) H12)) -(plus (S i) (minus d0 (S i))) (le_plus_minus (S i) d0 H4)) (lift h (plus (S -i) (minus d0 (S i))) (lift (S i) O w)) (lift_d w h (S i) (minus d0 (S i)) O -(le_O_n (minus d0 (S i))))) d0 (le_plus_minus_r (S i) d0 H4)) (lift h d0 -(TLRef i)) (lift_lref_lt i h d0 H4))))) H10)))))))) H5))) (\lambda (H4: (le -d0 i)).(eq_ind_r T (TLRef (plus i h)) (\lambda (t: T).(sty0 g c0 t (lift h d0 -(lift (S i) O w)))) (eq_ind nat (S i) (\lambda (_: nat).(sty0 g c0 (TLRef -(plus i h)) (lift h d0 (lift (S i) O w)))) (eq_ind_r T (lift (plus h (S i)) O -w) (\lambda (t: T).(sty0 g c0 (TLRef (plus i h)) t)) (eq_ind_r nat (plus (S -i) h) (\lambda (n: nat).(sty0 g c0 (TLRef (plus i h)) (lift n O w))) -(sty0_abbr g c0 d v (plus i h) (drop_getl_trans_ge i c0 c d0 h H3 (CHead d -(Bind Abbr) v) H0 H4) w H1) (plus h (S i)) (plus_sym h (S i))) (lift h d0 -(lift (S i) O w)) (lift_free w (S i) h O d0 (le_S_n d0 (S i) (le_S (S d0) (S -i) (le_n_S d0 i H4))) (le_O_n d0))) (plus i (S O)) (eq_ind_r nat (plus (S O) -i) (\lambda (n: nat).(eq nat (S i) n)) (le_antisym (S i) (plus (S O) i) (le_n -(plus (S O) i)) (le_n (S i))) (plus i (S O)) (plus_sym i (S O)))) (lift h d0 -(TLRef i)) (lift_lref_ge i h d0 H4)))))))))))))))) (\lambda (c: C).(\lambda -(d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d -(Bind Abst) v))).(\lambda (w: T).(\lambda (H1: (sty0 g d v w)).(\lambda (H2: -((\forall (c0: C).(\forall (h: nat).(\forall (d0: nat).((drop h d0 c0 d) \to -(sty0 g c0 (lift h d0 v) (lift h d0 w)))))))).(\lambda (c0: C).(\lambda (h: -nat).(\lambda (d0: nat).(\lambda (H3: (drop h d0 c0 c)).(lt_le_e i d0 (sty0 g -c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O v))) (\lambda (H4: (lt i -d0)).(let H5 \def (drop_getl_trans_le i d0 (le_S_n i d0 (le_S_n (S i) (S d0) -(le_S (S (S i)) (S d0) (le_n_S (S i) d0 H4)))) c0 c h H3 (CHead d (Bind Abst) -v) H0) in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c0 e0))) -(\lambda (e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) (\lambda (_: -C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abst) v)))) (sty0 g c0 (lift h -d0 (TLRef i)) (lift h d0 (lift (S i) O v))) (\lambda (x0: C).(\lambda (x1: -C).(\lambda (H6: (drop i O c0 x0)).(\lambda (H7: (drop h (minus d0 i) x0 -x1)).(\lambda (H8: (clear x1 (CHead d (Bind Abst) v))).(let H9 \def (eq_ind -nat (minus d0 i) (\lambda (n: nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) -(minus_x_Sy d0 i H4)) in (let H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) -H9 Abst d v H8) in (ex2_ind C (\lambda (c1: C).(clear x0 (CHead c1 (Bind -Abst) (lift h (minus d0 (S i)) v)))) (\lambda (c1: C).(drop h (minus d0 (S -i)) c1 d)) (sty0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O v))) -(\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abst) (lift h (minus -d0 (S i)) v)))).(\lambda (H12: (drop h (minus d0 (S i)) x d)).(eq_ind_r T -(TLRef i) (\lambda (t: T).(sty0 g c0 t (lift h d0 (lift (S i) O v)))) (eq_ind -nat (plus (S i) (minus d0 (S i))) (\lambda (n: nat).(sty0 g c0 (TLRef i) -(lift h n (lift (S i) O v)))) (eq_ind_r T (lift (S i) O (lift h (minus d0 (S -i)) v)) (\lambda (t: T).(sty0 g c0 (TLRef i) t)) (eq_ind nat d0 (\lambda (_: -nat).(sty0 g c0 (TLRef i) (lift (S i) O (lift h (minus d0 (S i)) v)))) -(sty0_abst g c0 x (lift h (minus d0 (S i)) v) i (getl_intro i c0 (CHead x -(Bind Abst) (lift h (minus d0 (S i)) v)) x0 H6 H11) (lift h (minus d0 (S i)) -w) (H2 x h (minus d0 (S i)) H12)) (plus (S i) (minus d0 (S i))) -(le_plus_minus (S i) d0 H4)) (lift h (plus (S i) (minus d0 (S i))) (lift (S -i) O v)) (lift_d v h (S i) (minus d0 (S i)) O (le_O_n (minus d0 (S i))))) d0 -(le_plus_minus_r (S i) d0 H4)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 -H4))))) H10)))))))) H5))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i -h)) (\lambda (t: T).(sty0 g c0 t (lift h d0 (lift (S i) O v)))) (eq_ind nat -(S i) (\lambda (_: nat).(sty0 g c0 (TLRef (plus i h)) (lift h d0 (lift (S i) -O v)))) (eq_ind_r T (lift (plus h (S i)) O v) (\lambda (t: T).(sty0 g c0 -(TLRef (plus i h)) t)) (eq_ind_r nat (plus (S i) h) (\lambda (n: nat).(sty0 g -c0 (TLRef (plus i h)) (lift n O v))) (sty0_abst g c0 d v (plus i h) -(drop_getl_trans_ge i c0 c d0 h H3 (CHead d (Bind Abst) v) H0 H4) w H1) (plus -h (S i)) (plus_sym h (S i))) (lift h d0 (lift (S i) O v)) (lift_free v (S i) -h O d0 (le_S_n d0 (S i) (le_S (S d0) (S i) (le_n_S d0 i H4))) (le_O_n d0))) -(plus i (S O)) (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(eq nat (S i) -n)) (le_antisym (S i) (plus (S O) i) (le_n (plus (S O) i)) (le_n (S i))) -(plus i (S O)) (plus_sym i (S O)))) (lift h d0 (TLRef i)) (lift_lref_ge i h -d0 H4)))))))))))))))) (\lambda (b: B).(\lambda (c: C).(\lambda (v: -T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (sty0 g (CHead c (Bind b) -v) t3 t4)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c0 (CHead c (Bind b) v)) \to (sty0 g c0 (lift h d t3) (lift h -d t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H2: (drop h d c0 c)).(eq_ind_r T (THead (Bind b) (lift h d v) (lift h (s -(Bind b) d) t3)) (\lambda (t: T).(sty0 g c0 t (lift h d (THead (Bind b) v -t4)))) (eq_ind_r T (THead (Bind b) (lift h d v) (lift h (s (Bind b) d) t4)) -(\lambda (t: T).(sty0 g c0 (THead (Bind b) (lift h d v) (lift h (s (Bind b) -d) t3)) t)) (sty0_bind g b c0 (lift h d v) (lift h (S d) t3) (lift h (S d) -t4) (H1 (CHead c0 (Bind b) (lift h d v)) h (S d) (drop_skip_bind h d c0 c H2 -b v))) (lift h d (THead (Bind b) v t4)) (lift_head (Bind b) v t4 h d)) (lift -h d (THead (Bind b) v t3)) (lift_head (Bind b) v t3 h d))))))))))))) (\lambda -(c: C).(\lambda (v: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (sty0 g -c t3 t4)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c0 c) \to (sty0 g c0 (lift h d t3) (lift h d -t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: -(drop h d c0 c)).(eq_ind_r T (THead (Flat Appl) (lift h d v) (lift h (s (Flat -Appl) d) t3)) (\lambda (t: T).(sty0 g c0 t (lift h d (THead (Flat Appl) v -t4)))) (eq_ind_r T (THead (Flat Appl) (lift h d v) (lift h (s (Flat Appl) d) -t4)) (\lambda (t: T).(sty0 g c0 (THead (Flat Appl) (lift h d v) (lift h (s -(Flat Appl) d) t3)) t)) (sty0_appl g c0 (lift h d v) (lift h (s (Flat Appl) -d) t3) (lift h (s (Flat Appl) d) t4) (H1 c0 h (s (Flat Appl) d) H2)) (lift h -d (THead (Flat Appl) v t4)) (lift_head (Flat Appl) v t4 h d)) (lift h d -(THead (Flat Appl) v t3)) (lift_head (Flat Appl) v t3 h d)))))))))))) -(\lambda (c: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c v1 -v2)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c0 c) \to (sty0 g c0 (lift h d v1) (lift h d -v2)))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (sty0 g c t3 -t4)).(\lambda (H3: ((\forall (c0: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c0 c) \to (sty0 g c0 (lift h d t3) (lift h d -t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H4: -(drop h d c0 c)).(eq_ind_r T (THead (Flat Cast) (lift h d v1) (lift h (s -(Flat Cast) d) t3)) (\lambda (t: T).(sty0 g c0 t (lift h d (THead (Flat Cast) -v2 t4)))) (eq_ind_r T (THead (Flat Cast) (lift h d v2) (lift h (s (Flat Cast) -d) t4)) (\lambda (t: T).(sty0 g c0 (THead (Flat Cast) (lift h d v1) (lift h -(s (Flat Cast) d) t3)) t)) (sty0_cast g c0 (lift h d v1) (lift h d v2) (H1 c0 -h d H4) (lift h (s (Flat Cast) d) t3) (lift h (s (Flat Cast) d) t4) (H3 c0 h -(s (Flat Cast) d) H4)) (lift h d (THead (Flat Cast) v2 t4)) (lift_head (Flat -Cast) v2 t4 h d)) (lift h d (THead (Flat Cast) v1 t3)) (lift_head (Flat Cast) -v1 t3 h d))))))))))))))) e t1 t2 H))))). - -lemma sty0_correct: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty0 g c -t1 t) \to (ex T (\lambda (t2: T).(sty0 g c t t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: -(sty0 g c t1 t)).(sty0_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda (t2: -T).(ex T (\lambda (t3: T).(sty0 g c0 t2 t3)))))) (\lambda (c0: C).(\lambda -(n: nat).(ex_intro T (\lambda (t2: T).(sty0 g c0 (TSort (next g n)) t2)) -(TSort (next g (next g n))) (sty0_sort g c0 (next g n))))) (\lambda (c0: -C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 -(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v -w)).(\lambda (H2: (ex T (\lambda (t2: T).(sty0 g d w t2)))).(let H3 \def H2 -in (ex_ind T (\lambda (t2: T).(sty0 g d w t2)) (ex T (\lambda (t2: T).(sty0 g -c0 (lift (S i) O w) t2))) (\lambda (x: T).(\lambda (H4: (sty0 g d w -x)).(ex_intro T (\lambda (t2: T).(sty0 g c0 (lift (S i) O w) t2)) (lift (S i) -O x) (sty0_lift g d w x H4 c0 (S i) O (getl_drop Abbr c0 d v i H0))))) -H3)))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: -nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) v))).(\lambda (w: -T).(\lambda (H1: (sty0 g d v w)).(\lambda (H2: (ex T (\lambda (t2: T).(sty0 g -d w t2)))).(let H3 \def H2 in (ex_ind T (\lambda (t2: T).(sty0 g d w t2)) (ex -T (\lambda (t2: T).(sty0 g c0 (lift (S i) O v) t2))) (\lambda (x: T).(\lambda -(_: (sty0 g d w x)).(ex_intro T (\lambda (t2: T).(sty0 g c0 (lift (S i) O v) -t2)) (lift (S i) O w) (sty0_lift g d v w H1 c0 (S i) O (getl_drop Abst c0 d v -i H0))))) H3)))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: -T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) -v) t2 t3)).(\lambda (H1: (ex T (\lambda (t4: T).(sty0 g (CHead c0 (Bind b) v) -t3 t4)))).(let H2 \def H1 in (ex_ind T (\lambda (t4: T).(sty0 g (CHead c0 -(Bind b) v) t3 t4)) (ex T (\lambda (t4: T).(sty0 g c0 (THead (Bind b) v t3) -t4))) (\lambda (x: T).(\lambda (H3: (sty0 g (CHead c0 (Bind b) v) t3 -x)).(ex_intro T (\lambda (t4: T).(sty0 g c0 (THead (Bind b) v t3) t4)) (THead -(Bind b) v x) (sty0_bind g b c0 v t3 x H3)))) H2))))))))) (\lambda (c0: -C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g c0 -t2 t3)).(\lambda (H1: (ex T (\lambda (t4: T).(sty0 g c0 t3 t4)))).(let H2 -\def H1 in (ex_ind T (\lambda (t4: T).(sty0 g c0 t3 t4)) (ex T (\lambda (t4: -T).(sty0 g c0 (THead (Flat Appl) v t3) t4))) (\lambda (x: T).(\lambda (H3: -(sty0 g c0 t3 x)).(ex_intro T (\lambda (t4: T).(sty0 g c0 (THead (Flat Appl) -v t3) t4)) (THead (Flat Appl) v x) (sty0_appl g c0 v t3 x H3)))) H2)))))))) -(\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 -v2)).(\lambda (H1: (ex T (\lambda (t2: T).(sty0 g c0 v2 t2)))).(\lambda (t2: -T).(\lambda (t3: T).(\lambda (_: (sty0 g c0 t2 t3)).(\lambda (H3: (ex T -(\lambda (t4: T).(sty0 g c0 t3 t4)))).(let H4 \def H1 in (ex_ind T (\lambda -(t4: T).(sty0 g c0 v2 t4)) (ex T (\lambda (t4: T).(sty0 g c0 (THead (Flat -Cast) v2 t3) t4))) (\lambda (x: T).(\lambda (H5: (sty0 g c0 v2 x)).(let H6 -\def H3 in (ex_ind T (\lambda (t4: T).(sty0 g c0 t3 t4)) (ex T (\lambda (t4: -T).(sty0 g c0 (THead (Flat Cast) v2 t3) t4))) (\lambda (x0: T).(\lambda (H7: -(sty0 g c0 t3 x0)).(ex_intro T (\lambda (t4: T).(sty0 g c0 (THead (Flat Cast) -v2 t3) t4)) (THead (Flat Cast) x x0) (sty0_cast g c0 v2 x H5 t3 x0 H7)))) -H6)))) H4))))))))))) c t1 t H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/cnt.ma b/matita/matita/contribs/lambdadelta/basic_1/sty1/cnt.ma deleted file mode 100644 index 54354378c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/cnt.ma +++ /dev/null @@ -1,86 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sty1/props.ma". - -include "basic_1/cnt/props.ma". - -lemma sty1_cnt: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty0 g c -t1 t) \to (ex2 T (\lambda (t2: T).(sty1 g c t1 t2)) (\lambda (t2: T).(cnt -t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: -(sty0 g c t1 t)).(sty0_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: -T).(ex2 T (\lambda (t3: T).(sty1 g c0 t0 t3)) (\lambda (t3: T).(cnt t3)))))) -(\lambda (c0: C).(\lambda (n: nat).(ex_intro2 T (\lambda (t2: T).(sty1 g c0 -(TSort n) t2)) (\lambda (t2: T).(cnt t2)) (TSort (next g n)) (sty1_sty0 g c0 -(TSort n) (TSort (next g n)) (sty0_sort g c0 n)) (cnt_sort (next g n))))) -(\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H0: (getl i c0 (CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 -g d v w)).(\lambda (H2: (ex2 T (\lambda (t2: T).(sty1 g d v t2)) (\lambda -(t2: T).(cnt t2)))).(let H3 \def H2 in (ex2_ind T (\lambda (t2: T).(sty1 g d -v t2)) (\lambda (t2: T).(cnt t2)) (ex2 T (\lambda (t2: T).(sty1 g c0 (TLRef -i) t2)) (\lambda (t2: T).(cnt t2))) (\lambda (x: T).(\lambda (H4: (sty1 g d v -x)).(\lambda (H5: (cnt x)).(ex_intro2 T (\lambda (t2: T).(sty1 g c0 (TLRef i) -t2)) (\lambda (t2: T).(cnt t2)) (lift (S i) O x) (sty1_abbr g c0 d v i H0 x -H4) (cnt_lift x H5 (S i) O))))) H3)))))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind -Abst) v))).(\lambda (w: T).(\lambda (H1: (sty0 g d v w)).(\lambda (H2: (ex2 T -(\lambda (t2: T).(sty1 g d v t2)) (\lambda (t2: T).(cnt t2)))).(let H3 \def -H2 in (ex2_ind T (\lambda (t2: T).(sty1 g d v t2)) (\lambda (t2: T).(cnt t2)) -(ex2 T (\lambda (t2: T).(sty1 g c0 (TLRef i) t2)) (\lambda (t2: T).(cnt t2))) -(\lambda (x: T).(\lambda (H4: (sty1 g d v x)).(\lambda (H5: (cnt -x)).(ex_intro2 T (\lambda (t2: T).(sty1 g c0 (TLRef i) t2)) (\lambda (t2: -T).(cnt t2)) (lift (S i) O x) (sty1_trans g c0 (TLRef i) (lift (S i) O v) -(sty1_sty0 g c0 (TLRef i) (lift (S i) O v) (sty0_abst g c0 d v i H0 w H1)) -(lift (S i) O x) (sty1_lift g d v x H4 c0 (S i) O (getl_drop Abst c0 d v i -H0))) (cnt_lift x H5 (S i) O))))) H3)))))))))) (\lambda (b: B).(\lambda (c0: -C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g -(CHead c0 (Bind b) v) t2 t3)).(\lambda (H1: (ex2 T (\lambda (t4: T).(sty1 g -(CHead c0 (Bind b) v) t2 t4)) (\lambda (t4: T).(cnt t4)))).(let H2 \def H1 in -(ex2_ind T (\lambda (t4: T).(sty1 g (CHead c0 (Bind b) v) t2 t4)) (\lambda -(t4: T).(cnt t4)) (ex2 T (\lambda (t4: T).(sty1 g c0 (THead (Bind b) v t2) -t4)) (\lambda (t4: T).(cnt t4))) (\lambda (x: T).(\lambda (H3: (sty1 g (CHead -c0 (Bind b) v) t2 x)).(\lambda (H4: (cnt x)).(ex_intro2 T (\lambda (t4: -T).(sty1 g c0 (THead (Bind b) v t2) t4)) (\lambda (t4: T).(cnt t4)) (THead -(Bind b) v x) (sty1_bind g b c0 v t2 x H3) (cnt_head x H4 (Bind b) v))))) -H2))))))))) (\lambda (c0: C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: -T).(\lambda (_: (sty0 g c0 t2 t3)).(\lambda (H1: (ex2 T (\lambda (t4: -T).(sty1 g c0 t2 t4)) (\lambda (t4: T).(cnt t4)))).(let H2 \def H1 in -(ex2_ind T (\lambda (t4: T).(sty1 g c0 t2 t4)) (\lambda (t4: T).(cnt t4)) -(ex2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Appl) v t2) t4)) (\lambda -(t4: T).(cnt t4))) (\lambda (x: T).(\lambda (H3: (sty1 g c0 t2 x)).(\lambda -(H4: (cnt x)).(ex_intro2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Appl) v -t2) t4)) (\lambda (t4: T).(cnt t4)) (THead (Flat Appl) v x) (sty1_appl g c0 v -t2 x H3) (cnt_head x H4 (Flat Appl) v))))) H2)))))))) (\lambda (c0: -C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H0: (sty0 g c0 v1 -v2)).(\lambda (_: (ex2 T (\lambda (t2: T).(sty1 g c0 v1 t2)) (\lambda (t2: -T).(cnt t2)))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g c0 t2 -t3)).(\lambda (H3: (ex2 T (\lambda (t4: T).(sty1 g c0 t2 t4)) (\lambda (t4: -T).(cnt t4)))).(let H4 \def H3 in (ex2_ind T (\lambda (t4: T).(sty1 g c0 t2 -t4)) (\lambda (t4: T).(cnt t4)) (ex2 T (\lambda (t4: T).(sty1 g c0 (THead -(Flat Cast) v1 t2) t4)) (\lambda (t4: T).(cnt t4))) (\lambda (x: T).(\lambda -(H5: (sty1 g c0 t2 x)).(\lambda (H6: (cnt x)).(let H_x \def (sty1_cast2 g c0 -t2 x H5 v1 v2 H0) in (let H7 \def H_x in (ex2_ind T (\lambda (v3: T).(sty1 g -c0 v1 v3)) (\lambda (v3: T).(sty1 g c0 (THead (Flat Cast) v1 t2) (THead (Flat -Cast) v3 x))) (ex2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Cast) v1 t2) -t4)) (\lambda (t4: T).(cnt t4))) (\lambda (x0: T).(\lambda (_: (sty1 g c0 v1 -x0)).(\lambda (H9: (sty1 g c0 (THead (Flat Cast) v1 t2) (THead (Flat Cast) x0 -x))).(ex_intro2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Cast) v1 t2) t4)) -(\lambda (t4: T).(cnt t4)) (THead (Flat Cast) x0 x) H9 (cnt_head x H6 (Flat -Cast) x0))))) H7)))))) H4))))))))))) c t1 t H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/sty1/defs.ma deleted file mode 100644 index 9b98d8a56..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/defs.ma +++ /dev/null @@ -1,23 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sty0/defs.ma". - -inductive sty1 (g: G) (c: C) (t1: T): T \to Prop \def -| sty1_sty0: \forall (t2: T).((sty0 g c t1 t2) \to (sty1 g c t1 t2)) -| sty1_sing: \forall (t: T).((sty1 g c t1 t) \to (\forall (t2: T).((sty0 g c -t t2) \to (sty1 g c t1 t2)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/sty1/fwd.ma deleted file mode 100644 index 7307b49ff..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/fwd.ma +++ /dev/null @@ -1,25 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sty1/defs.ma". - -implied rec lemma sty1_ind (g: G) (c: C) (t1: T) (P: (T \to Prop)) (f: -(\forall (t2: T).((sty0 g c t1 t2) \to (P t2)))) (f0: (\forall (t: T).((sty1 -g c t1 t) \to ((P t) \to (\forall (t2: T).((sty0 g c t t2) \to (P t2))))))) -(t: T) (s0: sty1 g c t1 t) on s0: P t \def match s0 with [(sty1_sty0 t2 s1) -\Rightarrow (f t2 s1) | (sty1_sing t0 s1 t2 s2) \Rightarrow (f0 t0 s1 -((sty1_ind g c t1 P f f0) t0 s1) t2 s2)]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/sty1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/sty1/props.ma deleted file mode 100644 index 0780b7eeb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/sty1/props.ma +++ /dev/null @@ -1,142 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/sty1/fwd.ma". - -include "basic_1/sty0/props.ma". - -theorem sty1_trans: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty1 g c -t1 t) \to (\forall (t2: T).((sty1 g c t t2) \to (sty1 g c t1 t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: -(sty1 g c t1 t)).(\lambda (t2: T).(\lambda (H0: (sty1 g c t t2)).(sty1_ind g -c t (\lambda (t0: T).(sty1 g c t1 t0)) (\lambda (t3: T).(\lambda (H1: (sty0 g -c t t3)).(sty1_sing g c t1 t H t3 H1))) (\lambda (t0: T).(\lambda (_: (sty1 g -c t t0)).(\lambda (H2: (sty1 g c t1 t0)).(\lambda (t3: T).(\lambda (H3: (sty0 -g c t0 t3)).(sty1_sing g c t1 t0 H2 t3 H3)))))) t2 H0))))))). - -lemma sty1_bind: - \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: -T).(\forall (t2: T).((sty1 g (CHead c (Bind b) v) t1 t2) \to (sty1 g c (THead -(Bind b) v t1) (THead (Bind b) v t2)))))))) -\def - \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H: (sty1 g (CHead c (Bind b) v) t1 -t2)).(sty1_ind g (CHead c (Bind b) v) t1 (\lambda (t: T).(sty1 g c (THead -(Bind b) v t1) (THead (Bind b) v t))) (\lambda (t3: T).(\lambda (H0: (sty0 g -(CHead c (Bind b) v) t1 t3)).(sty1_sty0 g c (THead (Bind b) v t1) (THead -(Bind b) v t3) (sty0_bind g b c v t1 t3 H0)))) (\lambda (t: T).(\lambda (_: -(sty1 g (CHead c (Bind b) v) t1 t)).(\lambda (H1: (sty1 g c (THead (Bind b) v -t1) (THead (Bind b) v t))).(\lambda (t3: T).(\lambda (H2: (sty0 g (CHead c -(Bind b) v) t t3)).(sty1_sing g c (THead (Bind b) v t1) (THead (Bind b) v t) -H1 (THead (Bind b) v t3) (sty0_bind g b c v t t3 H2))))))) t2 H))))))). - -lemma sty1_appl: - \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall -(t2: T).((sty1 g c t1 t2) \to (sty1 g c (THead (Flat Appl) v t1) (THead (Flat -Appl) v t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (H: (sty1 g c t1 t2)).(sty1_ind g c t1 (\lambda (t: T).(sty1 -g c (THead (Flat Appl) v t1) (THead (Flat Appl) v t))) (\lambda (t3: -T).(\lambda (H0: (sty0 g c t1 t3)).(sty1_sty0 g c (THead (Flat Appl) v t1) -(THead (Flat Appl) v t3) (sty0_appl g c v t1 t3 H0)))) (\lambda (t: -T).(\lambda (_: (sty1 g c t1 t)).(\lambda (H1: (sty1 g c (THead (Flat Appl) v -t1) (THead (Flat Appl) v t))).(\lambda (t3: T).(\lambda (H2: (sty0 g c t -t3)).(sty1_sing g c (THead (Flat Appl) v t1) (THead (Flat Appl) v t) H1 -(THead (Flat Appl) v t3) (sty0_appl g c v t t3 H2))))))) t2 H)))))). - -lemma sty1_lift: - \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((sty1 g e -t1 t2) \to (\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c -e) \to (sty1 g c (lift h d t1) (lift h d t2)))))))))) -\def - \lambda (g: G).(\lambda (e: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (sty1 g e t1 t2)).(sty1_ind g e t1 (\lambda (t: T).(\forall (c: -C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to (sty1 g c (lift h -d t1) (lift h d t))))))) (\lambda (t3: T).(\lambda (H0: (sty0 g e t1 -t3)).(\lambda (c: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop -h d c e)).(sty1_sty0 g c (lift h d t1) (lift h d t3) (sty0_lift g e t1 t3 H0 -c h d H1)))))))) (\lambda (t: T).(\lambda (_: (sty1 g e t1 t)).(\lambda (H1: -((\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to -(sty1 g c (lift h d t1) (lift h d t)))))))).(\lambda (t3: T).(\lambda (H2: -(sty0 g e t t3)).(\lambda (c: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda -(H3: (drop h d c e)).(sty1_sing g c (lift h d t1) (lift h d t) (H1 c h d H3) -(lift h d t3) (sty0_lift g e t t3 H2 c h d H3))))))))))) t2 H))))). - -lemma sty1_correct: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty1 g c -t1 t) \to (ex T (\lambda (t2: T).(sty0 g c t t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: -(sty1 g c t1 t)).(sty1_ind g c t1 (\lambda (t0: T).(ex T (\lambda (t2: -T).(sty0 g c t0 t2)))) (\lambda (t2: T).(\lambda (H0: (sty0 g c t1 -t2)).(sty0_correct g c t1 t2 H0))) (\lambda (t0: T).(\lambda (_: (sty1 g c t1 -t0)).(\lambda (_: (ex T (\lambda (t2: T).(sty0 g c t0 t2)))).(\lambda (t2: -T).(\lambda (H2: (sty0 g c t0 t2)).(sty0_correct g c t0 t2 H2)))))) t H))))). - -lemma sty1_abbr: - \forall (g: G).(\forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: -nat).((getl i c (CHead d (Bind Abbr) v)) \to (\forall (w: T).((sty1 g d v w) -\to (sty1 g c (TLRef i) (lift (S i) O w))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: -nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (w: -T).(\lambda (H0: (sty1 g d v w)).(sty1_ind g d v (\lambda (t: T).(sty1 g c -(TLRef i) (lift (S i) O t))) (\lambda (t2: T).(\lambda (H1: (sty0 g d v -t2)).(sty1_sty0 g c (TLRef i) (lift (S i) O t2) (sty0_abbr g c d v i H t2 -H1)))) (\lambda (t: T).(\lambda (_: (sty1 g d v t)).(\lambda (H2: (sty1 g c -(TLRef i) (lift (S i) O t))).(\lambda (t2: T).(\lambda (H3: (sty0 g d t -t2)).(sty1_sing g c (TLRef i) (lift (S i) O t) H2 (lift (S i) O t2) -(sty0_lift g d t t2 H3 c (S i) O (getl_drop Abbr c d v i H)))))))) w -H0)))))))). - -lemma sty1_cast2: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((sty1 g c -t1 t2) \to (\forall (v1: T).(\forall (v2: T).((sty0 g c v1 v2) \to (ex2 T -(\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat -Cast) v1 t1) (THead (Flat Cast) v3 t2))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (sty1 g c t1 t2)).(sty1_ind g c t1 (\lambda (t: T).(\forall (v1: -T).(\forall (v2: T).((sty0 g c v1 v2) \to (ex2 T (\lambda (v3: T).(sty1 g c -v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat -Cast) v3 t)))))))) (\lambda (t3: T).(\lambda (H0: (sty0 g c t1 t3)).(\lambda -(v1: T).(\lambda (v2: T).(\lambda (H1: (sty0 g c v1 v2)).(ex_intro2 T -(\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat -Cast) v1 t1) (THead (Flat Cast) v3 t3))) v2 (sty1_sty0 g c v1 v2 H1) -(sty1_sty0 g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) v2 t3) (sty0_cast -g c v1 v2 H1 t1 t3 H0)))))))) (\lambda (t: T).(\lambda (_: (sty1 g c t1 -t)).(\lambda (H1: ((\forall (v1: T).(\forall (v2: T).((sty0 g c v1 v2) \to -(ex2 T (\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead -(Flat Cast) v1 t1) (THead (Flat Cast) v3 t))))))))).(\lambda (t3: T).(\lambda -(H2: (sty0 g c t t3)).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H3: (sty0 g -c v1 v2)).(let H_x \def (H1 v1 v2 H3) in (let H4 \def H_x in (ex2_ind T -(\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat -Cast) v1 t1) (THead (Flat Cast) v3 t))) (ex2 T (\lambda (v3: T).(sty1 g c v1 -v3)) (\lambda (v3: T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) -v3 t3)))) (\lambda (x: T).(\lambda (H5: (sty1 g c v1 x)).(\lambda (H6: (sty1 -g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) x t))).(let H_x0 \def -(sty1_correct g c v1 x H5) in (let H7 \def H_x0 in (ex_ind T (\lambda (t4: -T).(sty0 g c x t4)) (ex2 T (\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: -T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) v3 t3)))) (\lambda -(x0: T).(\lambda (H8: (sty0 g c x x0)).(ex_intro2 T (\lambda (v3: T).(sty1 g -c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat -Cast) v3 t3))) x0 (sty1_sing g c v1 x H5 x0 H8) (sty1_sing g c (THead (Flat -Cast) v1 t1) (THead (Flat Cast) x t) H6 (THead (Flat Cast) x0 t3) (sty0_cast -g c x x0 H8 t t3 H2))))) H7)))))) H4))))))))))) t2 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/subst/defs.ma deleted file mode 100644 index 8d9ed5f07..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst/defs.ma +++ /dev/null @@ -1,24 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift/defs.ma". - -rec definition subst (d: nat) (v: T) (t: T) on t: T \def match t with [(TSort -n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (match (blt i d) with [true -\Rightarrow (TLRef i) | false \Rightarrow (match (blt d i) with [true -\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)])]) | (THead k -u t0) \Rightarrow (THead k (subst d v u) (subst (s k d) v t0))]. - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst/props.ma b/matita/matita/contribs/lambdadelta/basic_1/subst/props.ma deleted file mode 100644 index 3ba9fc8e6..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst/props.ma +++ /dev/null @@ -1,157 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst/defs.ma". - -include "basic_1/subst0/fwd.ma". - -lemma subst_sort: - \forall (v: T).(\forall (d: nat).(\forall (k: nat).(eq T (subst d v (TSort -k)) (TSort k)))) -\def - \lambda (_: T).(\lambda (_: nat).(\lambda (k: nat).(refl_equal T (TSort -k)))). - -lemma subst_lref_lt: - \forall (v: T).(\forall (d: nat).(\forall (i: nat).((lt i d) \to (eq T -(subst d v (TLRef i)) (TLRef i))))) -\def - \lambda (v: T).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H: (lt i -d)).(eq_ind_r bool true (\lambda (b: bool).(eq T (match b with [true -\Rightarrow (TLRef i) | false \Rightarrow (match (blt d i) with [true -\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)])]) (TLRef i))) -(refl_equal T (TLRef i)) (blt i d) (lt_blt d i H))))). - -lemma subst_lref_eq: - \forall (v: T).(\forall (i: nat).(eq T (subst i v (TLRef i)) (lift i O v))) -\def - \lambda (v: T).(\lambda (i: nat).(eq_ind_r bool false (\lambda (b: bool).(eq -T (match b with [true \Rightarrow (TLRef i) | false \Rightarrow (match b with -[true \Rightarrow (TLRef (pred i)) | false \Rightarrow (lift i O v)])]) (lift -i O v))) (refl_equal T (lift i O v)) (blt i i) (le_bge i i (le_n i)))). - -lemma subst_lref_gt: - \forall (v: T).(\forall (d: nat).(\forall (i: nat).((lt d i) \to (eq T -(subst d v (TLRef i)) (TLRef (pred i)))))) -\def - \lambda (v: T).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H: (lt d -i)).(eq_ind_r bool false (\lambda (b: bool).(eq T (match b with [true -\Rightarrow (TLRef i) | false \Rightarrow (match (blt d i) with [true -\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)])]) (TLRef -(pred i)))) (eq_ind_r bool true (\lambda (b: bool).(eq T (match b with [true -\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)]) (TLRef (pred -i)))) (refl_equal T (TLRef (pred i))) (blt d i) (lt_blt i d H)) (blt i d) -(le_bge d i (lt_le_weak d i H)))))). - -lemma subst_head: - \forall (k: K).(\forall (w: T).(\forall (u: T).(\forall (t: T).(\forall (d: -nat).(eq T (subst d w (THead k u t)) (THead k (subst d w u) (subst (s k d) w -t))))))) -\def - \lambda (k: K).(\lambda (w: T).(\lambda (u: T).(\lambda (t: T).(\lambda (d: -nat).(refl_equal T (THead k (subst d w u) (subst (s k d) w t))))))). - -lemma subst_lift_SO: - \forall (v: T).(\forall (t: T).(\forall (d: nat).(eq T (subst d v (lift (S -O) d t)) t))) -\def - \lambda (v: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(eq -T (subst d v (lift (S O) d t0)) t0))) (\lambda (n: nat).(\lambda (d: -nat).(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (subst d v t0) (TSort n))) -(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 (TSort n))) (refl_equal T -(TSort n)) (subst d v (TSort n)) (subst_sort v d n)) (lift (S O) d (TSort n)) -(lift_sort n (S O) d)))) (\lambda (n: nat).(\lambda (d: nat).(lt_le_e n d (eq -T (subst d v (lift (S O) d (TLRef n))) (TLRef n)) (\lambda (H: (lt n -d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (subst d v t0) (TLRef n))) -(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef n))) (refl_equal T -(TLRef n)) (subst d v (TLRef n)) (subst_lref_lt v d n H)) (lift (S O) d -(TLRef n)) (lift_lref_lt n (S O) d H))) (\lambda (H: (le d n)).(eq_ind_r T -(TLRef (plus n (S O))) (\lambda (t0: T).(eq T (subst d v t0) (TLRef n))) -(eq_ind nat (S (plus n O)) (\lambda (n0: nat).(eq T (subst d v (TLRef n0)) -(TLRef n))) (eq_ind_r T (TLRef (pred (S (plus n O)))) (\lambda (t0: T).(eq T -t0 (TLRef n))) (eq_ind nat (plus n O) (\lambda (n0: nat).(eq T (TLRef n0) -(TLRef n))) (f_equal nat T TLRef (plus n O) n (sym_eq nat n (plus n O) -(plus_n_O n))) (pred (S (plus n O))) (pred_Sn (plus n O))) (subst d v (TLRef -(S (plus n O)))) (subst_lref_gt v d (S (plus n O)) (le_n_S d (plus n O) -(le_plus_trans d n O H)))) (plus n (S O)) (plus_n_Sm n O)) (lift (S O) d -(TLRef n)) (lift_lref_ge n (S O) d H)))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (H: ((\forall (d: nat).(eq T (subst d v (lift (S O) d t0)) -t0)))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(eq T (subst d v -(lift (S O) d t1)) t1)))).(\lambda (d: nat).(eq_ind_r T (THead k (lift (S O) -d t0) (lift (S O) (s k d) t1)) (\lambda (t2: T).(eq T (subst d v t2) (THead k -t0 t1))) (eq_ind_r T (THead k (subst d v (lift (S O) d t0)) (subst (s k d) v -(lift (S O) (s k d) t1))) (\lambda (t2: T).(eq T t2 (THead k t0 t1))) (sym_eq -T (THead k t0 t1) (THead k (subst d v (lift (S O) d t0)) (subst (s k d) v -(lift (S O) (s k d) t1))) (sym_eq T (THead k (subst d v (lift (S O) d t0)) -(subst (s k d) v (lift (S O) (s k d) t1))) (THead k t0 t1) (f_equal3 K T T T -THead k k (subst d v (lift (S O) d t0)) t0 (subst (s k d) v (lift (S O) (s k -d) t1)) t1 (refl_equal K k) (H d) (H0 (s k d))))) (subst d v (THead k (lift -(S O) d t0) (lift (S O) (s k d) t1))) (subst_head k v (lift (S O) d t0) (lift -(S O) (s k d) t1) d)) (lift (S O) d (THead k t0 t1)) (lift_head k t0 t1 (S O) -d)))))))) t)). - -lemma subst_subst0: - \forall (v: T).(\forall (t1: T).(\forall (t2: T).(\forall (d: nat).((subst0 -d v t1 t2) \to (eq T (subst d v t1) (subst d v t2)))))) -\def - \lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (d: nat).(\lambda -(H: (subst0 d v t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t0: T).(\lambda (t3: T).(eq T (subst n t t0) (subst n t t3)))))) -(\lambda (v0: T).(\lambda (i: nat).(eq_ind_r T (lift i O v0) (\lambda (t: -T).(eq T t (subst i v0 (lift (S i) O v0)))) (eq_ind nat (plus (S O) i) -(\lambda (n: nat).(eq T (lift i O v0) (subst i v0 (lift n O v0)))) (eq_ind T -(lift (S O) i (lift i O v0)) (\lambda (t: T).(eq T (lift i O v0) (subst i v0 -t))) (eq_ind_r T (lift i O v0) (\lambda (t: T).(eq T (lift i O v0) t)) -(refl_equal T (lift i O v0)) (subst i v0 (lift (S O) i (lift i O v0))) -(subst_lift_SO v0 (lift i O v0) i)) (lift (plus (S O) i) O v0) (lift_free v0 -i (S O) O i (le_n (plus O i)) (le_O_n i))) (S i) (refl_equal nat (S i))) -(subst i v0 (TLRef i)) (subst_lref_eq v0 i)))) (\lambda (v0: T).(\lambda (u2: -T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v0 u1 -u2)).(\lambda (H1: (eq T (subst i v0 u1) (subst i v0 u2))).(\lambda (t: -T).(\lambda (k: K).(eq_ind_r T (THead k (subst i v0 u1) (subst (s k i) v0 t)) -(\lambda (t0: T).(eq T t0 (subst i v0 (THead k u2 t)))) (eq_ind_r T (THead k -(subst i v0 u2) (subst (s k i) v0 t)) (\lambda (t0: T).(eq T (THead k (subst -i v0 u1) (subst (s k i) v0 t)) t0)) (eq_ind_r T (subst i v0 u2) (\lambda (t0: -T).(eq T (THead k t0 (subst (s k i) v0 t)) (THead k (subst i v0 u2) (subst (s -k i) v0 t)))) (refl_equal T (THead k (subst i v0 u2) (subst (s k i) v0 t))) -(subst i v0 u1) H1) (subst i v0 (THead k u2 t)) (subst_head k v0 u2 t i)) -(subst i v0 (THead k u1 t)) (subst_head k v0 u1 t i)))))))))) (\lambda (k: -K).(\lambda (v0: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (i: -nat).(\lambda (_: (subst0 (s k i) v0 t4 t3)).(\lambda (H1: (eq T (subst (s k -i) v0 t4) (subst (s k i) v0 t3))).(\lambda (u: T).(eq_ind_r T (THead k (subst -i v0 u) (subst (s k i) v0 t4)) (\lambda (t: T).(eq T t (subst i v0 (THead k u -t3)))) (eq_ind_r T (THead k (subst i v0 u) (subst (s k i) v0 t3)) (\lambda -(t: T).(eq T (THead k (subst i v0 u) (subst (s k i) v0 t4)) t)) (eq_ind_r T -(subst (s k i) v0 t3) (\lambda (t: T).(eq T (THead k (subst i v0 u) t) (THead -k (subst i v0 u) (subst (s k i) v0 t3)))) (refl_equal T (THead k (subst i v0 -u) (subst (s k i) v0 t3))) (subst (s k i) v0 t4) H1) (subst i v0 (THead k u -t3)) (subst_head k v0 u t3 i)) (subst i v0 (THead k u t4)) (subst_head k v0 u -t4 i)))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda -(i: nat).(\lambda (_: (subst0 i v0 u1 u2)).(\lambda (H1: (eq T (subst i v0 -u1) (subst i v0 u2))).(\lambda (k: K).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (subst0 (s k i) v0 t3 t4)).(\lambda (H3: (eq T (subst (s k i) -v0 t3) (subst (s k i) v0 t4))).(eq_ind_r T (THead k (subst i v0 u1) (subst (s -k i) v0 t3)) (\lambda (t: T).(eq T t (subst i v0 (THead k u2 t4)))) (eq_ind_r -T (THead k (subst i v0 u2) (subst (s k i) v0 t4)) (\lambda (t: T).(eq T -(THead k (subst i v0 u1) (subst (s k i) v0 t3)) t)) (eq_ind_r T (subst i v0 -u2) (\lambda (t: T).(eq T (THead k t (subst (s k i) v0 t3)) (THead k (subst i -v0 u2) (subst (s k i) v0 t4)))) (eq_ind_r T (subst (s k i) v0 t4) (\lambda -(t: T).(eq T (THead k (subst i v0 u2) t) (THead k (subst i v0 u2) (subst (s k -i) v0 t4)))) (refl_equal T (THead k (subst i v0 u2) (subst (s k i) v0 t4))) -(subst (s k i) v0 t3) H3) (subst i v0 u1) H1) (subst i v0 (THead k u2 t4)) -(subst_head k v0 u2 t4 i)) (subst i v0 (THead k u1 t3)) (subst_head k v0 u1 -t3 i))))))))))))) d v t1 t2 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma deleted file mode 100644 index 93aa0736a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma +++ /dev/null @@ -1,176 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/defs.ma". - -include "basic_1/lift/props.ma". - -lemma dnf_dec2: - \forall (t: T).(\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S -O) d v)))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(or (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))))) (ex T (\lambda -(v: T).(eq T t0 (lift (S O) d v))))))) (\lambda (n: nat).(\lambda (d: -nat).(or_intror (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (TSort n) -(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (TSort n) (lift (S O) d -v)))) (ex_intro T (\lambda (v: T).(eq T (TSort n) (lift (S O) d v))) (TSort -n) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) (refl_equal T -(TSort n)) (lift (S O) d (TSort n)) (lift_sort n (S O) d)))))) (\lambda (n: -nat).(\lambda (d: nat).(lt_eq_gt_e n d (or (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T -(TLRef n) (lift (S O) d v))))) (\lambda (H: (lt n d)).(or_intror (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T -(\lambda (v: T).(eq T (TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: -T).(eq T (TLRef n) (lift (S O) d v))) (TLRef n) (eq_ind_r T (TLRef n) -(\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d -(TLRef n)) (lift_lref_lt n (S O) d H))))) (\lambda (H: (eq nat n d)).(eq_ind -nat n (\lambda (n0: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 n0 -w (TLRef n) (lift (S O) n0 v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift -(S O) n0 v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: T).(subst0 n w -(TLRef n) (lift (S O) n v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift (S -O) n v)))) (\lambda (w: T).(ex_intro T (\lambda (v: T).(subst0 n w (TLRef n) -(lift (S O) n v))) (lift n O w) (eq_ind_r T (lift (plus (S O) n) O w) -(\lambda (t0: T).(subst0 n w (TLRef n) t0)) (subst0_lref w n) (lift (S O) n -(lift n O w)) (lift_free w n (S O) O n (le_plus_r O n) (le_O_n n)))))) d H)) -(\lambda (H: (lt d n)).(or_intror (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T -(TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: T).(eq T (TLRef n) -(lift (S O) d v))) (TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t0: -T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d (TLRef (pred -n))) (lift_lref_gt d n H)))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda -(H: ((\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w -t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d -v)))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(or (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w t1 (lift (S O) d v))))) (ex T (\lambda -(v: T).(eq T t1 (lift (S O) d v)))))))).(\lambda (d: nat).(let H_x \def (H d) -in (let H1 \def H_x in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 -d w t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d -v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) -(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) -d v))))) (\lambda (H2: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 d w t0 -(lift (S O) d v))))))).(let H_x0 \def (H0 (s k d)) in (let H3 \def H_x0 in -(or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w t1 (lift (S -O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v)))) -(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift -(S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d -v))))) (\lambda (H4: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w -t1 (lift (S O) (s k d) v))))))).(or_introl (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq -T (THead k t0 t1) (lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H4 w) -in (let H5 \def H_x1 in (ex_ind T (\lambda (v: T).(subst0 (s k d) w t1 (lift -(S O) (s k d) v))) (ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S -O) d v)))) (\lambda (x: T).(\lambda (H6: (subst0 (s k d) w t1 (lift (S O) (s -k d) x))).(let H_x2 \def (H2 w) in (let H7 \def H_x2 in (ex_ind T (\lambda -(v: T).(subst0 d w t0 (lift (S O) d v))) (ex T (\lambda (v: T).(subst0 d w -(THead k t0 t1) (lift (S O) d v)))) (\lambda (x0: T).(\lambda (H8: (subst0 d -w t0 (lift (S O) d x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 -t1) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) -(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 t1) t2)) -(subst0_both w t0 (lift (S O) d x0) d H8 k t1 (lift (S O) (s k d) x) H6) -(lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H7))))) H5)))))) -(\lambda (H4: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) -v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or -(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) -d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) -(\lambda (x: T).(\lambda (H5: (eq T t1 (lift (S O) (s k d) x))).(eq_ind_r T -(lift (S O) (s k d) x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda -(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: -T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex -T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) -d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 (lift (S O) (s k d) x)) -(lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H2 w) in (let H6 \def -H_x1 in (ex_ind T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))) (ex T -(\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) d -v)))) (\lambda (x0: T).(\lambda (H7: (subst0 d w t0 (lift (S O) d -x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) -x)) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) -(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 (lift (S O) -(s k d) x)) t2)) (subst0_fst w (lift (S O) d x0) t0 d H7 (lift (S O) (s k d) -x) k) (lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H6))))) t1 -H5))) H4)) H3)))) (\lambda (H2: (ex T (\lambda (v: T).(eq T t0 (lift (S O) d -v))))).(ex_ind T (\lambda (v: T).(eq T t0 (lift (S O) d v))) (or (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex -T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) (\lambda (x: -T).(\lambda (H3: (eq T t0 (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in -(let H4 \def H_x0 in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s -k d) w t1 (lift (S O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S -O) (s k d) v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead -k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) -(lift (S O) d v))))) (\lambda (H5: ((\forall (w: T).(ex T (\lambda (v: -T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))))))).(eq_ind_r T (lift (S O) -d x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w -(THead k t2 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t2 -t1) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v))))) (ex T -(\lambda (v: T).(eq T (THead k (lift (S O) d x) t1) (lift (S O) d v)))) -(\lambda (w: T).(let H_x1 \def (H5 w) in (let H6 \def H_x1 in (ex_ind T -(\lambda (v: T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))) (ex T (\lambda -(v: T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v)))) (\lambda -(x0: T).(\lambda (H7: (subst0 (s k d) w t1 (lift (S O) (s k d) -x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) t1) -(lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) (lift -(S O) (s k d) x0)) (\lambda (t2: T).(subst0 d w (THead k (lift (S O) d x) t1) -t2)) (subst0_snd k w (lift (S O) (s k d) x0) t1 d H7 (lift (S O) d x)) (lift -(S O) d (THead k x x0)) (lift_head k x x0 (S O) d))))) H6))))) t0 H3)) -(\lambda (H5: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) -v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or -(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) -d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) -(\lambda (x0: T).(\lambda (H6: (eq T t1 (lift (S O) (s k d) x0))).(eq_ind_r T -(lift (S O) (s k d) x0) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda -(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: -T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (eq_ind_r T (lift (S O) d x) -(\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead -k t2 (lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq -T (THead k t2 (lift (S O) (s k d) x0)) (lift (S O) d v)))))) (or_intror -(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) -(lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T -(THead k (lift (S O) d x) (lift (S O) (s k d) x0)) (lift (S O) d v)))) -(ex_intro T (\lambda (v: T).(eq T (THead k (lift (S O) d x) (lift (S O) (s k -d) x0)) (lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d -x) (lift (S O) (s k d) x0)) (\lambda (t2: T).(eq T (THead k (lift (S O) d x) -(lift (S O) (s k d) x0)) t2)) (refl_equal T (THead k (lift (S O) d x) (lift -(S O) (s k d) x0))) (lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) -d)))) t0 H3) t1 H6))) H5)) H4))))) H2)) H1))))))))) t). - -lemma dnf_dec: - \forall (w: T).(\forall (t: T).(\forall (d: nat).(ex T (\lambda (v: T).(or -(subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d v))))))) -\def - \lambda (w: T).(\lambda (t: T).(\lambda (d: nat).(let H_x \def (dnf_dec2 t -d) in (let H \def H_x in (or_ind (\forall (w0: T).(ex T (\lambda (v: -T).(subst0 d w0 t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S -O) d v)))) (ex T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t -(lift (S O) d v))))) (\lambda (H0: ((\forall (w0: T).(ex T (\lambda (v: -T).(subst0 d w0 t (lift (S O) d v))))))).(let H_x0 \def (H0 w) in (let H1 -\def H_x0 in (ex_ind T (\lambda (v: T).(subst0 d w t (lift (S O) d v))) (ex T -(\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d -v))))) (\lambda (x: T).(\lambda (H2: (subst0 d w t (lift (S O) d -x))).(ex_intro T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t -(lift (S O) d v)))) x (or_introl (subst0 d w t (lift (S O) d x)) (eq T t -(lift (S O) d x)) H2)))) H1)))) (\lambda (H0: (ex T (\lambda (v: T).(eq T t -(lift (S O) d v))))).(ex_ind T (\lambda (v: T).(eq T t (lift (S O) d v))) (ex -T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d -v))))) (\lambda (x: T).(\lambda (H1: (eq T t (lift (S O) d x))).(eq_ind_r T -(lift (S O) d x) (\lambda (t0: T).(ex T (\lambda (v: T).(or (subst0 d w t0 -(lift (S O) d v)) (eq T t0 (lift (S O) d v)))))) (ex_intro T (\lambda (v: -T).(or (subst0 d w (lift (S O) d x) (lift (S O) d v)) (eq T (lift (S O) d x) -(lift (S O) d v)))) x (or_intror (subst0 d w (lift (S O) d x) (lift (S O) d -x)) (eq T (lift (S O) d x) (lift (S O) d x)) (refl_equal T (lift (S O) d -x)))) t H1))) H0)) H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma deleted file mode 100644 index fca79e9d9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma +++ /dev/null @@ -1,32 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/lift/defs.ma". - -inductive subst0: nat \to (T \to (T \to (T \to Prop))) \def -| subst0_lref: \forall (v: T).(\forall (i: nat).(subst0 i v (TLRef i) (lift -(S i) O v))) -| subst0_fst: \forall (v: T).(\forall (u2: T).(\forall (u1: T).(\forall (i: -nat).((subst0 i v u1 u2) \to (\forall (t: T).(\forall (k: K).(subst0 i v -(THead k u1 t) (THead k u2 t)))))))) -| subst0_snd: \forall (k: K).(\forall (v: T).(\forall (t2: T).(\forall (t1: -T).(\forall (i: nat).((subst0 (s k i) v t1 t2) \to (\forall (u: T).(subst0 i -v (THead k u t1) (THead k u t2)))))))) -| subst0_both: \forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall (i: -nat).((subst0 i v u1 u2) \to (\forall (k: K).(\forall (t1: T).(\forall (t2: -T).((subst0 (s k i) v t1 t2) \to (subst0 i v (THead k u1 t1) (THead k u2 -t2)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma deleted file mode 100644 index 930835ccb..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma +++ /dev/null @@ -1,912 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/defs.ma". - -include "basic_1/lift/fwd.ma". - -implied rec lemma subst0_ind (P: (nat \to (T \to (T \to (T \to Prop))))) (f: -(\forall (v: T).(\forall (i: nat).(P i v (TLRef i) (lift (S i) O v))))) (f0: -(\forall (v: T).(\forall (u2: T).(\forall (u1: T).(\forall (i: nat).((subst0 -i v u1 u2) \to ((P i v u1 u2) \to (\forall (t: T).(\forall (k: K).(P i v -(THead k u1 t) (THead k u2 t))))))))))) (f1: (\forall (k: K).(\forall (v: -T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k i) v t1 -t2) \to ((P (s k i) v t1 t2) \to (\forall (u: T).(P i v (THead k u t1) (THead -k u t2))))))))))) (f2: (\forall (v: T).(\forall (u1: T).(\forall (u2: -T).(\forall (i: nat).((subst0 i v u1 u2) \to ((P i v u1 u2) \to (\forall (k: -K).(\forall (t1: T).(\forall (t2: T).((subst0 (s k i) v t1 t2) \to ((P (s k -i) v t1 t2) \to (P i v (THead k u1 t1) (THead k u2 t2)))))))))))))) (n: nat) -(t: T) (t0: T) (t1: T) (s0: subst0 n t t0 t1) on s0: P n t t0 t1 \def match -s0 with [(subst0_lref v i) \Rightarrow (f v i) | (subst0_fst v u2 u1 i s1 t2 -k) \Rightarrow (f0 v u2 u1 i s1 ((subst0_ind P f f0 f1 f2) i v u1 u2 s1) t2 -k) | (subst0_snd k v t2 t3 i s1 u) \Rightarrow (f1 k v t2 t3 i s1 -((subst0_ind P f f0 f1 f2) (s k i) v t3 t2 s1) u) | (subst0_both v u1 u2 i s1 -k t2 t3 s2) \Rightarrow (f2 v u1 u2 i s1 ((subst0_ind P f f0 f1 f2) i v u1 u2 -s1) k t2 t3 s2 ((subst0_ind P f f0 f1 f2) (s k i) v t2 t3 s2))]. - -lemma subst0_gen_sort: - \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 -i v (TSort n) x) \to (\forall (P: Prop).P))))) -\def - \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (subst0 i v (TSort n) x)).(\lambda (P: Prop).(insert_eq T (TSort n) -(\lambda (t: T).(subst0 i v t x)) (\lambda (_: T).P) (\lambda (y: T).(\lambda -(H0: (subst0 i v y x)).(subst0_ind (\lambda (_: nat).(\lambda (_: T).(\lambda -(t0: T).(\lambda (_: T).((eq T t0 (TSort n)) \to P))))) (\lambda (_: -T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef i0) (TSort n))).(let H2 \def -(eq_ind T (TLRef i0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(TSort n) H1) in (False_ind P H2))))) (\lambda (v0: T).(\lambda (u2: -T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 -u2)).(\lambda (_: (((eq T u1 (TSort n)) \to P))).(\lambda (t: T).(\lambda (k: -K).(\lambda (H3: (eq T (THead k u1 t) (TSort n))).(let H4 \def (eq_ind T -(THead k u1 t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) -H3) in (False_ind P H4))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda -(t2: T).(\lambda (t1: T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v0 -t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to P))).(\lambda (u: T).(\lambda -(H3: (eq T (THead k u t1) (TSort n))).(let H4 \def (eq_ind T (THead k u t1) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in -(False_ind P H4))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T -u1 (TSort n)) \to P))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 (TSort -n)) \to P))).(\lambda (H5: (eq T (THead k u1 t1) (TSort n))).(let H6 \def -(eq_ind T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H5) in (False_ind P H6)))))))))))))) i v y x H0))) -H)))))). - -lemma subst0_gen_lref: - \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 -i v (TLRef n) x) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) -\def - \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (subst0 i v (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(subst0 -i v t x)) (\lambda (_: T).(land (eq nat n i) (eq T x (lift (S n) O v)))) -(\lambda (y: T).(\lambda (H0: (subst0 i v y x)).(subst0_ind (\lambda (n0: -nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 (TLRef n)) -\to (land (eq nat n n0) (eq T t1 (lift (S n) O t)))))))) (\lambda (v0: -T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef i0) (TLRef n))).(let H2 \def -(f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i0 | -(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef -n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(land (eq nat n n0) (eq T (lift -(S n0) O v0) (lift (S n) O v0)))) (conj (eq nat n n) (eq T (lift (S n) O v0) -(lift (S n) O v0)) (refl_equal nat n) (refl_equal T (lift (S n) O v0))) i0 -H2))))) (\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: -nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TLRef n)) -\to (land (eq nat n i0) (eq T u2 (lift (S n) O v0)))))).(\lambda (t: -T).(\lambda (k: K).(\lambda (H3: (eq T (THead k u1 t) (TLRef n))).(let H4 -\def (eq_ind T (THead k u1 t) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H3) in (False_ind (land (eq nat n i0) (eq T (THead k u2 -t) (lift (S n) O v0))) H4))))))))))) (\lambda (k: K).(\lambda (v0: -T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i0: nat).(\lambda (_: (subst0 -(s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (land (eq nat n (s -k i0)) (eq T t2 (lift (S n) O v0)))))).(\lambda (u: T).(\lambda (H3: (eq T -(THead k u t1) (TLRef n))).(let H4 \def (eq_ind T (THead k u t1) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in (False_ind (land -(eq nat n i0) (eq T (THead k u t2) (lift (S n) O v0))) H4))))))))))) (\lambda -(v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (_: -(subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TLRef n)) \to (land (eq nat n -i0) (eq T u2 (lift (S n) O v0)))))).(\lambda (k: K).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 -(TLRef n)) \to (land (eq nat n (s k i0)) (eq T t2 (lift (S n) O -v0)))))).(\lambda (H5: (eq T (THead k u1 t1) (TLRef n))).(let H6 \def (eq_ind -T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef n) H5) in (False_ind (land (eq nat n i0) (eq T (THead k u2 t2) (lift -(S n) O v0))) H6)))))))))))))) i v y x H0))) H))))). - -lemma subst0_gen_head: - \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall -(x: T).(\forall (i: nat).((subst0 i v (THead k u1 t1) x) \to (or3 (ex2 T -(\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 -u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: -T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 -u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))))) -\def - \lambda (k: K).(\lambda (v: T).(\lambda (u1: T).(\lambda (t1: T).(\lambda -(x: T).(\lambda (i: nat).(\lambda (H: (subst0 i v (THead k u1 t1) -x)).(insert_eq T (THead k u1 t1) (\lambda (t: T).(subst0 i v t x)) (\lambda -(_: T).(or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: -T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) -(\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 -t2)))))) (\lambda (y: T).(\lambda (H0: (subst0 i v y x)).(subst0_ind (\lambda -(n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t2: T).((eq T t0 (THead k -u1 t1)) \to (or3 (ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda -(u2: T).(subst0 n t u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 -t3))) (\lambda (t3: T).(subst0 (s k n) t t1 t3))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 n t u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k n) t t1 -t3)))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef -i0) (THead k u1 t1))).(let H2 \def (eq_ind T (TLRef i0) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead k u1 t1) H1) in (False_ind (or3 -(ex2 T (\lambda (u2: T).(eq T (lift (S i0) O v0) (THead k u2 t1))) (\lambda -(u2: T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t2: T).(eq T (lift (S i0) O -v0) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t2: T).(eq T (lift (S i0) O v0) (THead k u2 -t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))))) H2))))) (\lambda (v0: -T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H1: (subst0 -i0 v0 u0 u2)).(\lambda (H2: (((eq T u0 (THead k u1 t1)) \to (or3 (ex2 T -(\lambda (u3: T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 -u3))) (ex2 T (\lambda (t2: T).(eq T u2 (THead k u1 t2))) (\lambda (t2: -T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: -T).(eq T u2 (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 -u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 -t2)))))))).(\lambda (t: T).(\lambda (k0: K).(\lambda (H3: (eq T (THead k0 u0 -t) (THead k u1 t1))).(let H4 \def (f_equal T K (\lambda (e: T).(match e with -[(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) -\Rightarrow k1])) (THead k0 u0 t) (THead k u1 t1) H3) in ((let H5 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef -_) \Rightarrow u0 | (THead _ t0 _) \Rightarrow t0])) (THead k0 u0 t) (THead k -u1 t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t0) -\Rightarrow t0])) (THead k0 u0 t) (THead k u1 t1) H3) in (\lambda (H7: (eq T -u0 u1)).(\lambda (H8: (eq K k0 k)).(eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T -(\lambda (u3: T).(eq T (THead k1 u2 t) (THead k u3 t1))) (\lambda (u3: -T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T (THead k1 u2 t) -(THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T (THead k1 u2 t) (THead k u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2)))))) (eq_ind_r T t1 (\lambda -(t0: T).(or3 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t0) (THead k u3 t1))) -(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T (THead -k u2 t0) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) -(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t0) (THead k -u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda -(_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2)))))) (let H9 \def (eq_ind -T u0 (\lambda (t0: T).((eq T t0 (THead k u1 t1)) \to (or3 (ex2 T (\lambda -(u3: T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) -(ex2 T (\lambda (t2: T).(eq T u2 (THead k u1 t2))) (\lambda (t2: T).(subst0 -(s k i0) v0 t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 -(THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))))))) H2 u1 H7) -in (let H10 \def (eq_ind T u0 (\lambda (t0: T).(subst0 i0 v0 t0 u2)) H1 u1 -H7) in (or3_intro0 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 -t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T -(THead k u2 t1) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 -t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t1) -(THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2)))) (ex_intro2 T -(\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: -T).(subst0 i0 v0 u1 u3)) u2 (refl_equal T (THead k u2 t1)) H10)))) t H6) k0 -H8)))) H5)) H4))))))))))) (\lambda (k0: K).(\lambda (v0: T).(\lambda (t2: -T).(\lambda (t0: T).(\lambda (i0: nat).(\lambda (H1: (subst0 (s k0 i0) v0 t0 -t2)).(\lambda (H2: (((eq T t0 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u2: -T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 (s k0 i0) v0 u1 u2))) -(ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 -(s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s k0 i0) v0 -u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 -t3)))))))).(\lambda (u: T).(\lambda (H3: (eq T (THead k0 u t0) (THead k u1 -t1))).(let H4 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) -\Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) -(THead k0 u t0) (THead k u1 t1) H3) in ((let H5 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | -(THead _ t _) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H3) in ((let -H6 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 -| (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u t0) -(THead k u1 t1) H3) in (\lambda (H7: (eq T u u1)).(\lambda (H8: (eq K k0 -k)).(eq_ind_r T u1 (\lambda (t: T).(or3 (ex2 T (\lambda (u2: T).(eq T (THead -k0 t t2) (THead k u2 t1))) (\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T -(\lambda (t3: T).(eq T (THead k0 t t2) (THead k u1 t3))) (\lambda (t3: -T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T (THead k0 t t2) (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i0 v0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i0) -v0 t1 t3)))))) (let H9 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead k u1 -t1)) \to (or3 (ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda -(u2: T).(subst0 (s k0 i0) v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead -k u1 t3))) (\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u2))) (\lambda (_: T).(\lambda -(t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))))))) H2 t1 H6) in (let H10 \def -(eq_ind T t0 (\lambda (t: T).(subst0 (s k0 i0) v0 t t2)) H1 t1 H6) in (let -H11 \def (eq_ind K k0 (\lambda (k1: K).((eq T t1 (THead k u1 t1)) \to (or3 -(ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 -(s k1 i0) v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) -(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 (s k1 i0) v0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s -k (s k1 i0)) v0 t1 t3))))))) H9 k H8) in (let H12 \def (eq_ind K k0 (\lambda -(k1: K).(subst0 (s k1 i0) v0 t1 t2)) H10 k H8) in (eq_ind_r K k (\lambda (k1: -K).(or3 (ex2 T (\lambda (u2: T).(eq T (THead k1 u1 t2) (THead k u2 t1))) -(\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead -k1 u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead k1 u1 t2) (THead k -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda -(_: T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (or3_intro1 (ex2 T -(\lambda (u2: T).(eq T (THead k u1 t2) (THead k u2 t1))) (\lambda (u2: -T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k u1 t2) -(THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead k u1 t2) (THead k u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))) (ex_intro2 T (\lambda (t3: -T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) -v0 t1 t3)) t2 (refl_equal T (THead k u1 t2)) H12)) k0 H8))))) u H7)))) H5)) -H4))))))))))) (\lambda (v0: T).(\lambda (u0: T).(\lambda (u2: T).(\lambda -(i0: nat).(\lambda (H1: (subst0 i0 v0 u0 u2)).(\lambda (H2: (((eq T u0 (THead -k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T u2 (THead k u3 t1))) -(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T u2 -(THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead k u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s k i0) v0 t1 t2)))))))).(\lambda (k0: K).(\lambda (t0: -T).(\lambda (t2: T).(\lambda (H3: (subst0 (s k0 i0) v0 t0 t2)).(\lambda (H4: -(((eq T t0 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T t2 (THead -k u3 t1))) (\lambda (u3: T).(subst0 (s k0 i0) v0 u1 u3))) (ex2 T (\lambda -(t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k (s k0 i0)) -v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 -t3)))))))).(\lambda (H5: (eq T (THead k0 u0 t0) (THead k u1 t1))).(let H6 -\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | -(TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t0) -(THead k u1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e -with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) -\Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H5) in ((let H8 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef -_) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t0) (THead k -u1 t1) H5) in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k0 k)).(let -H11 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead k u1 t1)) \to (or3 (ex2 -T (\lambda (u3: T).(eq T t2 (THead k u3 t1))) (\lambda (u3: T).(subst0 (s k0 -i0) v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda -(t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: -T).(subst0 (s k0 i0) v0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s -k (s k0 i0)) v0 t1 t3))))))) H4 t1 H8) in (let H12 \def (eq_ind T t0 (\lambda -(t: T).(subst0 (s k0 i0) v0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind K k0 -(\lambda (k1: K).((eq T t1 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: -T).(eq T t2 (THead k u3 t1))) (\lambda (u3: T).(subst0 (s k1 i0) v0 u1 u3))) -(ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 -(s k (s k1 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq -T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s k1 i0) v0 -u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 -t3))))))) H11 k H10) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).(subst0 -(s k1 i0) v0 t1 t2)) H12 k H10) in (eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T -(\lambda (u3: T).(eq T (THead k1 u2 t2) (THead k u3 t1))) (\lambda (u3: -T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead k1 u2 t2) -(THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k1 u2 t2) (THead k u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (let H15 \def (eq_ind T -u0 (\lambda (t: T).((eq T t (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: -T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T -(\lambda (t3: T).(eq T u2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) -v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead k u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))))))) H2 u1 H9) in (let H16 -\def (eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H9) in -(or3_intro2 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t2) (THead k u3 t1))) -(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead -k u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k -u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda -(_: T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))) (ex3_2_intro T T -(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) u2 t2 (refl_equal T (THead k -u2 t2)) H16 H14)))) k0 H10)))))))) H7)) H6)))))))))))))) i v y x H0))) -H))))))). - -lemma subst0_gen_lift_lt: - \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t1) -x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst0 i u t1 t2))))))))) -\def - \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: -T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift h d -u) (lift h (S (plus i d)) t) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h -(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2))))))))) (\lambda (n: -nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S (plus i d)) (TSort n)) -x)).(let H0 \def (eq_ind T (lift h (S (plus i d)) (TSort n)) (\lambda (t: -T).(subst0 i (lift h d u) t x)) H (TSort n) (lift_sort n h (S (plus i d)))) -in (subst0_gen_sort (lift h d u) x i n H0 (ex2 T (\lambda (t2: T).(eq T x -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TSort n) -t2))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: nat).(\lambda -(h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S -(plus i d)) (TLRef n)) x)).(lt_le_e n (S (plus i d)) (ex2 T (\lambda (t2: -T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef -n) t2))) (\lambda (H0: (lt n (S (plus i d)))).(let H1 \def (eq_ind T (lift h -(S (plus i d)) (TLRef n)) (\lambda (t: T).(subst0 i (lift h d u) t x)) H -(TLRef n) (lift_lref_lt n h (S (plus i d)) H0)) in (land_ind (eq nat n i) (eq -T x (lift (S n) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S -(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: -(eq nat n i)).(\lambda (H3: (eq T x (lift (S n) O (lift h d u)))).(eq_ind_r T -(lift (S n) O (lift h d u)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2)))) -(eq_ind_r nat i (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S n0) -O (lift h d u)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(TLRef n0) t2)))) (eq_ind T (lift h (plus (S i) d) (lift (S i) O u)) (\lambda -(t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst0 i u (TLRef i) t2)))) (ex_intro2 T (\lambda (t2: T).(eq T -(lift h (S (plus i d)) (lift (S i) O u)) (lift h (S (plus i d)) t2))) -(\lambda (t2: T).(subst0 i u (TLRef i) t2)) (lift (S i) O u) (refl_equal T -(lift h (S (plus i d)) (lift (S i) O u))) (subst0_lref u i)) (lift (S i) O -(lift h d u)) (lift_d u h (S i) d O (le_O_n d))) n H2) x H3))) -(subst0_gen_lref (lift h d u) x i n H1)))) (\lambda (H0: (le (S (plus i d)) -n)).(let H1 \def (eq_ind T (lift h (S (plus i d)) (TLRef n)) (\lambda (t: -T).(subst0 i (lift h d u) t x)) H (TLRef (plus n h)) (lift_lref_ge n h (S -(plus i d)) H0)) in (land_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n -h)) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: (eq nat -(plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n h)) O (lift h d -u)))).(let H4 \def (eq_ind_r nat i (\lambda (n0: nat).(le (S (plus n0 d)) n)) -H0 (plus n h) H2) in (le_false n (plus (plus n h) d) (ex2 T (\lambda (t2: -T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef -n) t2))) (le_plus_trans n (plus n h) d (le_plus_l n h)) H4)))) -(subst0_gen_lref (lift h d u) x i (plus n h) H1))))))))))) (\lambda (k: -K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t) -x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst0 i u t t2)))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall -(x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift -h d u) (lift h (S (plus i d)) t0) x) \to (ex2 T (\lambda (t2: T).(eq T x -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t0 -t2)))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H1: (subst0 i (lift h d u) (lift h (S (plus i d)) (THead k t -t0)) x)).(let H2 \def (eq_ind T (lift h (S (plus i d)) (THead k t t0)) -(\lambda (t2: T).(subst0 i (lift h d u) t2 x)) H1 (THead k (lift h (S (plus i -d)) t) (lift h (s k (S (plus i d))) t0)) (lift_head k t t0 h (S (plus i d)))) -in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k (S (plus -i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S (plus i d)) -t) u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) -t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i -d))) t0) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k -u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S -(plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h -d u) (lift h (s k (S (plus i d))) t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) -t2))) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k -(S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S -(plus i d)) t) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h -(s k (S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h -(S (plus i d)) t) u2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: -T).(\lambda (H4: (eq T x (THead k x0 (lift h (s k (S (plus i d))) -t0)))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) t) -x0)).(eq_ind_r T (THead k x0 (lift h (s k (S (plus i d))) t0)) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda -(t3: T).(subst0 i u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T -x0 (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T -(\lambda (t2: T).(eq T (THead k x0 (lift h (s k (S (plus i d))) t0)) (lift h -(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) -(\lambda (x1: T).(\lambda (H6: (eq T x0 (lift h (S (plus i d)) x1))).(\lambda -(H7: (subst0 i u t x1)).(eq_ind_r T (lift h (S (plus i d)) x1) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 (lift h (s k (S (plus i d))) -t0)) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) -t3)))) (eq_ind T (lift h (S (plus i d)) (THead k x1 t0)) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda -(t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T -(lift h (S (plus i d)) (THead k x1 t0)) (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst0 i u (THead k t t0) t2)) (THead k x1 t0) (refl_equal T (lift h -(S (plus i d)) (THead k x1 t0))) (subst0_fst u x1 t i H7 t0 k)) (THead k -(lift h (S (plus i d)) x1) (lift h (s k (S (plus i d))) t0)) (lift_head k x1 -t0 h (S (plus i d)))) x0 H6)))) (H x0 i h d H5)) x H4)))) H3)) (\lambda (H3: -(ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) t2))) -(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) -t0) t2)))).(ex2_ind T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i -d)) t) t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S -(plus i d))) t0) t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: -T).(\lambda (H4: (eq T x (THead k (lift h (S (plus i d)) t) x0))).(\lambda -(H5: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) -x0)).(eq_ind_r T (THead k (lift h (S (plus i d)) t) x0) (\lambda (t2: T).(ex2 -T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: -T).(subst0 i u (THead k t t0) t3)))) (let H6 \def (eq_ind nat (s k (S (plus i -d))) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x0)) H5 (S -(s k (plus i d))) (s_S k (plus i d))) in (let H7 \def (eq_ind nat (s k (plus -i d)) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x0)) -H6 (plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x0 -(lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) -(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) x0) (lift h -(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) -(\lambda (x1: T).(\lambda (H8: (eq T x0 (lift h (S (plus (s k i) d)) -x1))).(\lambda (H9: (subst0 (s k i) u t0 x1)).(eq_ind_r T (lift h (S (plus (s -k i) d)) x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h -(S (plus i d)) t) t2) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i -u (THead k t t0) t3)))) (eq_ind nat (s k (plus i d)) (\lambda (n: nat).(ex2 T -(\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h (S n) x1)) -(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) -t2)))) (eq_ind nat (s k (S (plus i d))) (\lambda (n: nat).(ex2 T (\lambda -(t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h n x1)) (lift h (S -(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind -T (lift h (S (plus i d)) (THead k t x1)) (\lambda (t2: T).(ex2 T (\lambda -(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u -(THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h (S (plus i -d)) (THead k t x1)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(THead k t t0) t2)) (THead k t x1) (refl_equal T (lift h (S (plus i d)) -(THead k t x1))) (subst0_snd k u x1 t0 i H9 t)) (THead k (lift h (S (plus i -d)) t) (lift h (s k (S (plus i d))) x1)) (lift_head k t x1 h (S (plus i d)))) -(S (s k (plus i d))) (s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x0 -H8)))) (H0 x0 (s k i) h d H7)))) x H4)))) H3)) (\lambda (H3: (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S -(plus i d))) t0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq -T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d -u) (lift h (S (plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 -(s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2))) (ex2 T (\lambda -(t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(THead k t t0) t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T x -(THead k x0 x1))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) -t) x0)).(\lambda (H6: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i -d))) t0) x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T (\lambda -(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u -(THead k t t0) t3)))) (let H7 \def (eq_ind nat (s k (S (plus i d))) (\lambda -(n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x1)) H6 (S (s k (plus i -d))) (s_S k (plus i d))) in (let H8 \def (eq_ind nat (s k (plus i d)) -(\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x1)) H7 -(plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x1 -(lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) -(ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h (S (plus i d)) t2))) -(\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x2: T).(\lambda -(H9: (eq T x1 (lift h (S (plus (s k i) d)) x2))).(\lambda (H10: (subst0 (s k -i) u t0 x2)).(ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (S (plus i d)) -t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T (\lambda (t2: T).(eq T -(THead k x0 x1) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u -(THead k t t0) t2))) (\lambda (x3: T).(\lambda (H11: (eq T x0 (lift h (S -(plus i d)) x3))).(\lambda (H12: (subst0 i u t x3)).(eq_ind_r T (lift h (S -(plus i d)) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 -x1) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) -t3)))) (eq_ind_r T (lift h (S (plus (s k i) d)) x2) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T (THead k (lift h (S (plus i d)) x3) t2) (lift h (S -(plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (eq_ind -nat (s k (plus i d)) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k -(lift h (S (plus i d)) x3) (lift h (S n) x2)) (lift h (S (plus i d)) t2))) -(\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind nat (s k (S (plus -i d))) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S -(plus i d)) x3) (lift h n x2)) (lift h (S (plus i d)) t2))) (\lambda (t2: -T).(subst0 i u (THead k t t0) t2)))) (eq_ind T (lift h (S (plus i d)) (THead -k x3 x2)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus -i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T -(\lambda (t2: T).(eq T (lift h (S (plus i d)) (THead k x3 x2)) (lift h (S -(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)) (THead k -x3 x2) (refl_equal T (lift h (S (plus i d)) (THead k x3 x2))) (subst0_both u -t x3 i H12 k t0 x2 H10)) (THead k (lift h (S (plus i d)) x3) (lift h (s k (S -(plus i d))) x2)) (lift_head k x3 x2 h (S (plus i d)))) (S (s k (plus i d))) -(s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x1 H9) x0 H11)))) (H x0 -i h d H5))))) (H0 x1 (s k i) h d H8)))) x H4)))))) H3)) (subst0_gen_head k -(lift h d u) (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) t0) x i -H2))))))))))))) t1)). - -lemma subst0_gen_lift_false: - \forall (t: T).(\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall -(d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst0 i u -(lift h d t) x) \to (\forall (P: Prop).P))))))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (u: T).(\forall (x: -T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i -(plus d h)) \to ((subst0 i u (lift h d t0) x) \to (\forall (P: -Prop).P)))))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (x: T).(\lambda -(h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (_: (le d i)).(\lambda -(_: (lt i (plus d h))).(\lambda (H1: (subst0 i u (lift h d (TSort n)) -x)).(\lambda (P: Prop).(let H2 \def (eq_ind T (lift h d (TSort n)) (\lambda -(t0: T).(subst0 i u t0 x)) H1 (TSort n) (lift_sort n h d)) in -(subst0_gen_sort u x i n H2 P)))))))))))) (\lambda (n: nat).(\lambda (u: -T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: -nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d h))).(\lambda (H1: -(subst0 i u (lift h d (TLRef n)) x)).(\lambda (P: Prop).(lt_le_e n d P -(\lambda (H2: (lt n d)).(let H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda -(t0: T).(subst0 i u t0 x)) H1 (TLRef n) (lift_lref_lt n h d H2)) in (land_ind -(eq nat n i) (eq T x (lift (S n) O u)) P (\lambda (H4: (eq nat n i)).(\lambda -(_: (eq T x (lift (S n) O u))).(let H6 \def (eq_ind nat n (\lambda (n0: -nat).(lt n0 d)) H2 i H4) in (le_false d i P H H6)))) (subst0_gen_lref u x i n -H3)))) (\lambda (H2: (le d n)).(let H3 \def (eq_ind T (lift h d (TLRef n)) -(\lambda (t0: T).(subst0 i u t0 x)) H1 (TLRef (plus n h)) (lift_lref_ge n h d -H2)) in (land_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n h)) O u)) P -(\lambda (H4: (eq nat (plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n -h)) O u))).(let H6 \def (eq_ind_r nat i (\lambda (n0: nat).(lt n0 (plus d -h))) H0 (plus n h) H4) in (le_false d n P H2 (lt_le_S n d (simpl_lt_plus_r h -n d H6)))))) (subst0_gen_lref u x i (plus n h) H3))))))))))))))) (\lambda (k: -K).(\lambda (t0: T).(\lambda (H: ((\forall (u: T).(\forall (x: T).(\forall -(h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) -\to ((subst0 i u (lift h d t0) x) \to (\forall (P: -Prop).P))))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (u: T).(\forall -(x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to -((lt i (plus d h)) \to ((subst0 i u (lift h d t1) x) \to (\forall (P: -Prop).P))))))))))).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (i: nat).(\lambda (H1: (le d i)).(\lambda (H2: (lt i (plus -d h))).(\lambda (H3: (subst0 i u (lift h d (THead k t0 t1)) x)).(\lambda (P: -Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t2: -T).(subst0 i u t2 x)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) -(lift_head k t0 t1 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k -u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2))) -(ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: -T).(subst0 (s k i) u (lift h (s k d) t1) t2))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 -(s k i) u (lift h (s k d) t1) t2)))) P (\lambda (H5: (ex2 T (\lambda (u2: -T).(eq T x (THead k u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u -(lift h d t0) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h -(s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2)) P (\lambda -(x0: T).(\lambda (_: (eq T x (THead k x0 (lift h (s k d) t1)))).(\lambda (H7: -(subst0 i u (lift h d t0) x0)).(H u x0 h d i H1 H2 H7 P)))) H5)) (\lambda -(H5: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda -(t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)))).(ex2_ind T (\lambda (t2: -T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: T).(subst0 (s k i) u -(lift h (s k d) t1) t2)) P (\lambda (x0: T).(\lambda (_: (eq T x (THead k -(lift h d t0) x0))).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t1) -x0)).(H0 u x0 h (s k d) (s k i) (s_le k d i H1) (eq_ind nat (s k (plus d h)) -(\lambda (n: nat).(lt (s k i) n)) (s_lt k i (plus d h) H2) (plus (s k d) h) -(s_plus k d h)) H7 P)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 -(s k i) u (lift h (s k d) t1) t2))))).(ex3_2_ind T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 -(s k i) u (lift h (s k d) t1) t2))) P (\lambda (x0: T).(\lambda (x1: -T).(\lambda (_: (eq T x (THead k x0 x1))).(\lambda (H7: (subst0 i u (lift h d -t0) x0)).(\lambda (_: (subst0 (s k i) u (lift h (s k d) t1) x1)).(H u x0 h d -i H1 H2 H7 P)))))) H5)) (subst0_gen_head k u (lift h d t0) (lift h (s k d) -t1) x i H4))))))))))))))))) t). - -lemma subst0_gen_lift_ge: - \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst0 i u (lift h d t1) x) \to ((le (plus d h) -i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: -T).(subst0 (minus i h) u t1 t2)))))))))) -\def - \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: -T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h -d t) x) \to ((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d -t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)))))))))) (\lambda (n: -nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (subst0 i u (lift h d (TSort n)) x)).(\lambda (_: (le (plus -d h) i)).(let H1 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(subst0 -i u t x)) H (TSort n) (lift_sort n h d)) in (subst0_gen_sort u x i n H1 (ex2 -T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i -h) u (TSort n) t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: -nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i u (lift h d -(TLRef n)) x)).(\lambda (H0: (le (plus d h) i)).(lt_le_e n d (ex2 T (\lambda -(t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef -n) t2))) (\lambda (H1: (lt n d)).(let H2 \def (eq_ind T (lift h d (TLRef n)) -(\lambda (t: T).(subst0 i u t x)) H (TLRef n) (lift_lref_lt n h d H1)) in -(land_ind (eq nat n i) (eq T x (lift (S n) O u)) (ex2 T (\lambda (t2: T).(eq -T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) -(\lambda (H3: (eq nat n i)).(\lambda (_: (eq T x (lift (S n) O u))).(let H5 -\def (eq_ind nat n (\lambda (n0: nat).(lt n0 d)) H1 i H3) in (le_false (plus -d h) i (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: -T).(subst0 (minus i h) u (TLRef n) t2))) H0 (le_plus_trans (S i) d h H5))))) -(subst0_gen_lref u x i n H2)))) (\lambda (H1: (le d n)).(let H2 \def (eq_ind -T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H (TLRef (plus n h)) -(lift_lref_ge n h d H1)) in (land_ind (eq nat (plus n h) i) (eq T x (lift (S -(plus n h)) O u)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda -(t2: T).(subst0 (minus i h) u (TLRef n) t2))) (\lambda (H3: (eq nat (plus n -h) i)).(\lambda (H4: (eq T x (lift (S (plus n h)) O u))).(eq_ind nat (plus n -h) (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) -(\lambda (t2: T).(subst0 (minus n0 h) u (TLRef n) t2)))) (eq_ind_r T (lift (S -(plus n h)) O u) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h d -t2))) (\lambda (t2: T).(subst0 (minus (plus n h) h) u (TLRef n) t2)))) -(eq_ind_r nat n (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S -(plus n h)) O u) (lift h d t2))) (\lambda (t2: T).(subst0 n0 u (TLRef n) -t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift (S (plus n h)) O u) (lift h -d t2))) (\lambda (t2: T).(subst0 n u (TLRef n) t2)) (lift (S n) O u) -(eq_ind_r T (lift (plus h (S n)) O u) (\lambda (t: T).(eq T (lift (S (plus n -h)) O u) t)) (eq_ind_r nat (plus h n) (\lambda (n0: nat).(eq T (lift (S n0) O -u) (lift (plus h (S n)) O u))) (eq_ind_r nat (plus h (S n)) (\lambda (n0: -nat).(eq T (lift n0 O u) (lift (plus h (S n)) O u))) (refl_equal T (lift -(plus h (S n)) O u)) (S (plus h n)) (plus_n_Sm h n)) (plus n h) (plus_sym n -h)) (lift h d (lift (S n) O u)) (lift_free u (S n) h O d (le_trans_plus_r O d -(plus O (S n)) (le_plus_plus O O d (S n) (le_O_n O) (le_S d n H1))) (le_O_n -d))) (subst0_lref u n)) (minus (plus n h) h) (minus_plus_r n h)) x H4) i -H3))) (subst0_gen_lref u x i (plus n h) H2)))))))))))) (\lambda (k: -K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst0 i u (lift h d t) x) \to ((le (plus d h) -i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: -T).(subst0 (minus i h) u t t2))))))))))).(\lambda (t0: T).(\lambda (H0: -((\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: -nat).((subst0 i u (lift h d t0) x) \to ((le (plus d h) i) \to (ex2 T (\lambda -(t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t0 -t2))))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (H1: (subst0 i u (lift h d (THead k t t0)) x)).(\lambda -(H2: (le (plus d h) i)).(let H3 \def (eq_ind T (lift h d (THead k t t0)) -(\lambda (t2: T).(subst0 i u t2 x)) H1 (THead k (lift h d t) (lift h (s k d) -t0)) (lift_head k t t0 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x -(THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) -u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda -(t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s -k i) u (lift h (s k d) t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x (lift h d -t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda -(H4: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t0)))) -(\lambda (u2: T).(subst0 i u (lift h d t) u2)))).(ex2_ind T (\lambda (u2: -T).(eq T x (THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u -(lift h d t) u2)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda -(t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda -(H5: (eq T x (THead k x0 (lift h (s k d) t0)))).(\lambda (H6: (subst0 i u -(lift h d t) x0)).(eq_ind_r T (THead k x0 (lift h (s k d) t0)) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 -(minus i h) u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T x0 -(lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)) (ex2 T (\lambda -(t2: T).(eq T (THead k x0 (lift h (s k d) t0)) (lift h d t2))) (\lambda (t2: -T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x1: T).(\lambda (H7: -(eq T x0 (lift h d x1))).(\lambda (H8: (subst0 (minus i h) u t x1)).(eq_ind_r -T (lift h d x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 -(lift h (s k d) t0)) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u -(THead k t t0) t3)))) (eq_ind T (lift h d (THead k x1 t0)) (\lambda (t2: -T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 -(minus i h) u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift -h d (THead k x1 t0)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u -(THead k t t0) t2)) (THead k x1 t0) (refl_equal T (lift h d (THead k x1 t0))) -(subst0_fst u x1 t (minus i h) H8 t0 k)) (THead k (lift h d x1) (lift h (s k -d) t0)) (lift_head k x1 t0 h d)) x0 H7)))) (H x0 i h d H6 H2)) x H5)))) H4)) -(\lambda (H4: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) -(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2)))).(ex2_ind T -(\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 -(s k i) u (lift h (s k d) t0) t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h d -t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda -(x0: T).(\lambda (H5: (eq T x (THead k (lift h d t) x0))).(\lambda (H6: -(subst0 (s k i) u (lift h (s k d) t0) x0)).(eq_ind_r T (THead k (lift h d t) -x0) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) -(\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (ex2_ind T -(\lambda (t2: T).(eq T x0 (lift h (s k d) t2))) (\lambda (t2: T).(subst0 -(minus (s k i) h) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T (THead k (lift h d -t) x0) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) -t2))) (\lambda (x1: T).(\lambda (H7: (eq T x0 (lift h (s k d) x1))).(\lambda -(H8: (subst0 (minus (s k i) h) u t0 x1)).(eq_ind_r T (lift h (s k d) x1) -(\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h d t) t2) -(lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) -(eq_ind T (lift h d (THead k t x1)) (\lambda (t2: T).(ex2 T (\lambda (t3: -T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t -t0) t3)))) (let H9 \def (eq_ind_r nat (minus (s k i) h) (\lambda (n: -nat).(subst0 n u t0 x1)) H8 (s k (minus i h)) (s_minus k i h (le_trans_plus_r -d h i H2))) in (ex_intro2 T (\lambda (t2: T).(eq T (lift h d (THead k t x1)) -(lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2)) -(THead k t x1) (refl_equal T (lift h d (THead k t x1))) (subst0_snd k u x1 t0 -(minus i h) H9 t))) (THead k (lift h d t) (lift h (s k d) x1)) (lift_head k t -x1 h d)) x0 H7)))) (H0 x0 (s k i) h (s k d) H6 (eq_ind nat (s k (plus d h)) -(\lambda (n: nat).(le n (s k i))) (s_le k (plus d h) i H2) (plus (s k d) h) -(s_plus k d h)))) x H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s -k i) u (lift h (s k d) t0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i -u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift -h (s k d) t0) t2))) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda -(t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda -(x1: T).(\lambda (H5: (eq T x (THead k x0 x1))).(\lambda (H6: (subst0 i u -(lift h d t) x0)).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t0) -x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq -T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) -t3)))) (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h (s k d) t2))) (\lambda -(t2: T).(subst0 (minus (s k i) h) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T -(THead k x0 x1) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead -k t t0) t2))) (\lambda (x2: T).(\lambda (H8: (eq T x1 (lift h (s k d) -x2))).(\lambda (H9: (subst0 (minus (s k i) h) u t0 x2)).(ex2_ind T (\lambda -(t2: T).(eq T x0 (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t -t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h d t2))) (\lambda -(t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x3: T).(\lambda -(H10: (eq T x0 (lift h d x3))).(\lambda (H11: (subst0 (minus i h) u t -x3)).(eq_ind_r T (lift h d x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T -(THead k t2 x1) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead -k t t0) t3)))) (eq_ind_r T (lift h (s k d) x2) (\lambda (t2: T).(ex2 T -(\lambda (t3: T).(eq T (THead k (lift h d x3) t2) (lift h d t3))) (\lambda -(t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind T (lift h d -(THead k x3 x2)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d -t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (let H12 -\def (eq_ind_r nat (minus (s k i) h) (\lambda (n: nat).(subst0 n u t0 x2)) H9 -(s k (minus i h)) (s_minus k i h (le_trans_plus_r d h i H2))) in (ex_intro2 T -(\lambda (t2: T).(eq T (lift h d (THead k x3 x2)) (lift h d t2))) (\lambda -(t2: T).(subst0 (minus i h) u (THead k t t0) t2)) (THead k x3 x2) (refl_equal -T (lift h d (THead k x3 x2))) (subst0_both u t x3 (minus i h) H11 k t0 x2 -H12))) (THead k (lift h d x3) (lift h (s k d) x2)) (lift_head k x3 x2 h d)) -x1 H8) x0 H10)))) (H x0 i h d H6 H2))))) (H0 x1 (s k i) h (s k d) H7 (eq_ind -nat (s k (plus d h)) (\lambda (n: nat).(le n (s k i))) (s_le k (plus d h) i -H2) (plus (s k d) h) (s_plus k d h)))) x H5)))))) H4)) (subst0_gen_head k u -(lift h d t) (lift h (s k d) t0) x i H3)))))))))))))) t1)). - -lemma subst0_gen_lift_rev_ge: - \forall (t1: T).(\forall (v: T).(\forall (u2: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst0 i v t1 (lift h d u2)) \to ((le (plus d h) -i) \to (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: -T).(eq T t1 (lift h d u1))))))))))) -\def - \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (v: T).(\forall (u2: -T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i v t (lift -h d u2)) \to ((le (plus d h) i) \to (ex2 T (\lambda (u1: T).(subst0 (minus i -h) v u1 u2)) (\lambda (u1: T).(eq T t (lift h d u1)))))))))))) (\lambda (n: -nat).(\lambda (v: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (subst0 i v (TSort n) (lift h d -u2))).(\lambda (_: (le (plus d h) i)).(subst0_gen_sort v (lift h d u2) i n H -(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T -(TSort n) (lift h d u1))))))))))))) (\lambda (n: nat).(\lambda (v: -T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (subst0 i v (TLRef n) (lift h d u2))).(\lambda (H0: (le -(plus d h) i)).(land_ind (eq nat n i) (eq T (lift h d u2) (lift (S n) O v)) -(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T -(TLRef n) (lift h d u1)))) (\lambda (H1: (eq nat n i)).(\lambda (H2: (eq T -(lift h d u2) (lift (S n) O v))).(let H3 \def (eq_ind_r nat i (\lambda (n0: -nat).(le (plus d h) n0)) H0 n H1) in (eq_ind nat n (\lambda (n0: nat).(ex2 T -(\lambda (u1: T).(subst0 (minus n0 h) v u1 u2)) (\lambda (u1: T).(eq T (TLRef -n) (lift h d u1))))) (eq_ind_r nat (plus (minus n h) h) (\lambda (n0: -nat).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 u2)) (\lambda (u1: -T).(eq T (TLRef n0) (lift h d u1))))) (eq_ind T (lift h d (TLRef (minus n -h))) (\lambda (t: T).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 u2)) -(\lambda (u1: T).(eq T t (lift h d u1))))) (let H4 \def (eq_ind nat n -(\lambda (n0: nat).(eq T (lift h d u2) (lift (S n0) O v))) H2 (plus h (minus -n h)) (le_plus_minus h n (le_trans h (plus d h) n (le_plus_r d h) H3))) in -(let H5 \def (eq_ind nat (S (plus h (minus n h))) (\lambda (n0: nat).(eq T -(lift h d u2) (lift n0 O v))) H4 (plus h (S (minus n h))) (plus_n_Sm h (minus -n h))) in (let H6 \def (eq_ind_r T (lift (plus h (S (minus n h))) O v) -(\lambda (t: T).(eq T (lift h d u2) t)) H5 (lift h d (lift (S (minus n h)) O -v)) (lift_free v (S (minus n h)) h O d (le_S d (minus n h) (le_minus d n h -H3)) (le_O_n d))) in (eq_ind_r T (lift (S (minus n h)) O v) (\lambda (t: -T).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 t)) (\lambda (u1: T).(eq -T (lift h d (TLRef (minus n h))) (lift h d u1))))) (ex_intro2 T (\lambda (u1: -T).(subst0 (minus n h) v u1 (lift (S (minus n h)) O v))) (\lambda (u1: T).(eq -T (lift h d (TLRef (minus n h))) (lift h d u1))) (TLRef (minus n h)) -(subst0_lref v (minus n h)) (refl_equal T (lift h d (TLRef (minus n h))))) u2 -(lift_inj u2 (lift (S (minus n h)) O v) h d H6))))) (TLRef (plus (minus n h) -h)) (lift_lref_ge (minus n h) h d (le_minus d n h H3))) n (le_plus_minus_sym -h n (le_trans h (plus d h) n (le_plus_r d h) H3))) i H1)))) (subst0_gen_lref -v (lift h d u2) i n H)))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: -((\forall (v: T).(\forall (u2: T).(\forall (i: nat).(\forall (h: -nat).(\forall (d: nat).((subst0 i v t (lift h d u2)) \to ((le (plus d h) i) -\to (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: -T).(eq T t (lift h d u1))))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall -(v: T).(\forall (u2: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: -nat).((subst0 i v t0 (lift h d u2)) \to ((le (plus d h) i) \to (ex2 T -(\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T t0 -(lift h d u1))))))))))))).(\lambda (v: T).(\lambda (u2: T).(\lambda (i: -nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (subst0 i v (THead k t -t0) (lift h d u2))).(\lambda (H2: (le (plus d h) i)).(or3_ind (ex2 T (\lambda -(u3: T).(eq T (lift h d u2) (THead k u3 t0))) (\lambda (u3: T).(subst0 i v t -u3))) (ex2 T (\lambda (t2: T).(eq T (lift h d u2) (THead k t t2))) (\lambda -(t2: T).(subst0 (s k i) v t0 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: -T).(eq T (lift h d u2) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: -T).(subst0 i v t u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t0 -t2)))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: -T).(eq T (THead k t t0) (lift h d u1)))) (\lambda (H3: (ex2 T (\lambda (u3: -T).(eq T (lift h d u2) (THead k u3 t0))) (\lambda (u3: T).(subst0 i v t -u3)))).(ex2_ind T (\lambda (u3: T).(eq T (lift h d u2) (THead k u3 t0))) -(\lambda (u3: T).(subst0 i v t u3)) (ex2 T (\lambda (u1: T).(subst0 (minus i -h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda -(x: T).(\lambda (H4: (eq T (lift h d u2) (THead k x t0))).(\lambda (H5: -(subst0 i v t x)).(let H6 \def (sym_eq T (lift h d u2) (THead k x t0) H4) in -(let H_x \def (lift_gen_head k x t0 u2 h d H6) in (let H7 \def H_x in -(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T x (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t0 (lift h (s k d) z)))) (ex2 T (\lambda (u1: -T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift -h d u1)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u2 (THead k -x0 x1))).(\lambda (H9: (eq T x (lift h d x0))).(\lambda (H10: (eq T t0 (lift -h (s k d) x1))).(let H11 \def (eq_ind T x (\lambda (t2: T).(subst0 i v t t2)) -H5 (lift h d x0) H9) in (eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T -(\lambda (u1: T).(subst0 (minus i h) v u1 t2)) (\lambda (u1: T).(eq T (THead -k t t0) (lift h d u1))))) (eq_ind_r T (lift h (s k d) x1) (\lambda (t2: -T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) -(\lambda (u1: T).(eq T (THead k t t2) (lift h d u1))))) (let H_x0 \def (H v -x0 i h d H11 H2) in (let H12 \def H_x0 in (ex2_ind T (\lambda (u1: T).(subst0 -(minus i h) v u1 x0)) (\lambda (u1: T).(eq T t (lift h d u1))) (ex2 T -(\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: -T).(eq T (THead k t (lift h (s k d) x1)) (lift h d u1)))) (\lambda (x2: -T).(\lambda (H13: (subst0 (minus i h) v x2 x0)).(\lambda (H14: (eq T t (lift -h d x2))).(eq_ind_r T (lift h d x2) (\lambda (t2: T).(ex2 T (\lambda (u1: -T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T (THead k -t2 (lift h (s k d) x1)) (lift h d u1))))) (eq_ind T (lift h d (THead k x2 -x1)) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead -k x0 x1))) (\lambda (u1: T).(eq T t2 (lift h d u1))))) (ex_intro2 T (\lambda -(u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T -(lift h d (THead k x2 x1)) (lift h d u1))) (THead k x2 x1) (subst0_fst v x0 -x2 (minus i h) H13 x1 k) (refl_equal T (lift h d (THead k x2 x1)))) (THead k -(lift h d x2) (lift h (s k d) x1)) (lift_head k x2 x1 h d)) t H14)))) H12))) -t0 H10) u2 H8))))))) H7))))))) H3)) (\lambda (H3: (ex2 T (\lambda (t2: T).(eq -T (lift h d u2) (THead k t t2))) (\lambda (t2: T).(subst0 (s k i) v t0 -t2)))).(ex2_ind T (\lambda (t2: T).(eq T (lift h d u2) (THead k t t2))) -(\lambda (t2: T).(subst0 (s k i) v t0 t2)) (ex2 T (\lambda (u1: T).(subst0 -(minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) -(\lambda (x: T).(\lambda (H4: (eq T (lift h d u2) (THead k t x))).(\lambda -(H5: (subst0 (s k i) v t0 x)).(let H6 \def (sym_eq T (lift h d u2) (THead k t -x) H4) in (let H_x \def (lift_gen_head k t x u2 h d H6) in (let H7 \def H_x -in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T t (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T x (lift h (s k d) z)))) (ex2 T (\lambda (u1: -T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift -h d u1)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u2 (THead k -x0 x1))).(\lambda (H9: (eq T t (lift h d x0))).(\lambda (H10: (eq T x (lift h -(s k d) x1))).(let H11 \def (eq_ind T x (\lambda (t2: T).(subst0 (s k i) v t0 -t2)) H5 (lift h (s k d) x1) H10) in (eq_ind_r T (THead k x0 x1) (\lambda (t2: -T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 t2)) (\lambda (u1: T).(eq -T (THead k t t0) (lift h d u1))))) (eq_ind_r T (lift h d x0) (\lambda (t2: -T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) -(\lambda (u1: T).(eq T (THead k t2 t0) (lift h d u1))))) (let H_y \def (H0 v -x1 (s k i) h (s k d) H11) in (let H12 \def (eq_ind_r nat (plus (s k d) h) -(\lambda (n: nat).((le n (s k i)) \to (ex2 T (\lambda (u1: T).(subst0 (minus -(s k i) h) v u1 x1)) (\lambda (u1: T).(eq T t0 (lift h (s k d) u1)))))) H_y -(s k (plus d h)) (s_plus k d h)) in (let H13 \def (eq_ind_r nat (minus (s k -i) h) (\lambda (n: nat).((le (s k (plus d h)) (s k i)) \to (ex2 T (\lambda -(u1: T).(subst0 n v u1 x1)) (\lambda (u1: T).(eq T t0 (lift h (s k d) -u1)))))) H12 (s k (minus i h)) (s_minus k i h (le_trans h (plus d h) i -(le_plus_r d h) H2))) in (let H14 \def (H13 (s_le k (plus d h) i H2)) in -(ex2_ind T (\lambda (u1: T).(subst0 (s k (minus i h)) v u1 x1)) (\lambda (u1: -T).(eq T t0 (lift h (s k d) u1))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) -v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T (THead k (lift h d x0) t0) -(lift h d u1)))) (\lambda (x2: T).(\lambda (H15: (subst0 (s k (minus i h)) v -x2 x1)).(\lambda (H16: (eq T t0 (lift h (s k d) x2))).(eq_ind_r T (lift h (s -k d) x2) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 -(THead k x0 x1))) (\lambda (u1: T).(eq T (THead k (lift h d x0) t2) (lift h d -u1))))) (eq_ind T (lift h d (THead k x0 x2)) (\lambda (t2: T).(ex2 T (\lambda -(u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T t2 -(lift h d u1))))) (ex_intro2 T (\lambda (u1: T).(subst0 (minus i h) v u1 -(THead k x0 x1))) (\lambda (u1: T).(eq T (lift h d (THead k x0 x2)) (lift h d -u1))) (THead k x0 x2) (subst0_snd k v x1 x2 (minus i h) H15 x0) (refl_equal T -(lift h d (THead k x0 x2)))) (THead k (lift h d x0) (lift h (s k d) x2)) -(lift_head k x0 x2 h d)) t0 H16)))) H14))))) t H9) u2 H8))))))) H7))))))) -H3)) (\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (lift h -d u2) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v t u3))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t0 t2))))).(ex3_2_ind T T -(\lambda (u3: T).(\lambda (t2: T).(eq T (lift h d u2) (THead k u3 t2)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 i v t u3))) (\lambda (_: T).(\lambda -(t2: T).(subst0 (s k i) v t0 t2))) (ex2 T (\lambda (u1: T).(subst0 (minus i -h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H4: (eq T (lift h d u2) (THead k x0 -x1))).(\lambda (H5: (subst0 i v t x0)).(\lambda (H6: (subst0 (s k i) v t0 -x1)).(let H7 \def (sym_eq T (lift h d u2) (THead k x0 x1) H4) in (let H_x -\def (lift_gen_head k x0 x1 u2 h d H7) in (let H8 \def H_x in (ex3_2_ind T T -(\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) (\lambda (y: -T).(\lambda (_: T).(eq T x0 (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T x1 (lift h (s k d) z)))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) -v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda -(x2: T).(\lambda (x3: T).(\lambda (H9: (eq T u2 (THead k x2 x3))).(\lambda -(H10: (eq T x0 (lift h d x2))).(\lambda (H11: (eq T x1 (lift h (s k d) -x3))).(let H12 \def (eq_ind T x1 (\lambda (t2: T).(subst0 (s k i) v t0 t2)) -H6 (lift h (s k d) x3) H11) in (let H13 \def (eq_ind T x0 (\lambda (t2: -T).(subst0 i v t t2)) H5 (lift h d x2) H10) in (eq_ind_r T (THead k x2 x3) -(\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 t2)) -(\lambda (u1: T).(eq T (THead k t t0) (lift h d u1))))) (let H_x0 \def (H v -x2 i h d H13 H2) in (let H14 \def H_x0 in (ex2_ind T (\lambda (u1: T).(subst0 -(minus i h) v u1 x2)) (\lambda (u1: T).(eq T t (lift h d u1))) (ex2 T -(\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x2 x3))) (\lambda (u1: -T).(eq T (THead k t t0) (lift h d u1)))) (\lambda (x: T).(\lambda (H15: -(subst0 (minus i h) v x x2)).(\lambda (H16: (eq T t (lift h d x))).(eq_ind_r -T (lift h d x) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v -u1 (THead k x2 x3))) (\lambda (u1: T).(eq T (THead k t2 t0) (lift h d u1))))) -(let H_y \def (H0 v x3 (s k i) h (s k d) H12) in (let H17 \def (eq_ind_r nat -(plus (s k d) h) (\lambda (n: nat).((le n (s k i)) \to (ex2 T (\lambda (u1: -T).(subst0 (minus (s k i) h) v u1 x3)) (\lambda (u1: T).(eq T t0 (lift h (s k -d) u1)))))) H_y (s k (plus d h)) (s_plus k d h)) in (let H18 \def (eq_ind_r -nat (minus (s k i) h) (\lambda (n: nat).((le (s k (plus d h)) (s k i)) \to -(ex2 T (\lambda (u1: T).(subst0 n v u1 x3)) (\lambda (u1: T).(eq T t0 (lift h -(s k d) u1)))))) H17 (s k (minus i h)) (s_minus k i h (le_trans h (plus d h) -i (le_plus_r d h) H2))) in (let H19 \def (H18 (s_le k (plus d h) i H2)) in -(ex2_ind T (\lambda (u1: T).(subst0 (s k (minus i h)) v u1 x3)) (\lambda (u1: -T).(eq T t0 (lift h (s k d) u1))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) -v u1 (THead k x2 x3))) (\lambda (u1: T).(eq T (THead k (lift h d x) t0) (lift -h d u1)))) (\lambda (x4: T).(\lambda (H20: (subst0 (s k (minus i h)) v x4 -x3)).(\lambda (H21: (eq T t0 (lift h (s k d) x4))).(eq_ind_r T (lift h (s k -d) x4) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 -(THead k x2 x3))) (\lambda (u1: T).(eq T (THead k (lift h d x) t2) (lift h d -u1))))) (eq_ind T (lift h d (THead k x x4)) (\lambda (t2: T).(ex2 T (\lambda -(u1: T).(subst0 (minus i h) v u1 (THead k x2 x3))) (\lambda (u1: T).(eq T t2 -(lift h d u1))))) (ex_intro2 T (\lambda (u1: T).(subst0 (minus i h) v u1 -(THead k x2 x3))) (\lambda (u1: T).(eq T (lift h d (THead k x x4)) (lift h d -u1))) (THead k x x4) (subst0_both v x x2 (minus i h) H15 k x4 x3 H20) -(refl_equal T (lift h d (THead k x x4)))) (THead k (lift h d x) (lift h (s k -d) x4)) (lift_head k x x4 h d)) t0 H21)))) H19))))) t H16)))) H14))) u2 -H9)))))))) H8))))))))) H3)) (subst0_gen_head k v t t0 (lift h d u2) i -H1)))))))))))))) t1). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma deleted file mode 100644 index 762f85762..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma +++ /dev/null @@ -1,224 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/fwd.ma". - -lemma subst0_refl: - \forall (u: T).(\forall (t: T).(\forall (d: nat).((subst0 d u t t) \to -(\forall (P: Prop).P)))) -\def - \lambda (u: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: -nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P)))) (\lambda (n: -nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TSort n) (TSort -n))).(\lambda (P: Prop).(subst0_gen_sort u (TSort n) d n H P))))) (\lambda -(n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TLRef n) (TLRef -n))).(\lambda (P: Prop).(land_ind (eq nat n d) (eq T (TLRef n) (lift (S n) O -u)) P (\lambda (_: (eq nat n d)).(\lambda (H1: (eq T (TLRef n) (lift (S n) O -u))).(lift_gen_lref_false (S n) O n (le_O_n n) (le_n (plus O (S n))) u H1 -P))) (subst0_gen_lref u (TLRef n) d n H)))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (H: ((\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: -Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).((subst0 d u -t1 t1) \to (\forall (P: Prop).P))))).(\lambda (d: nat).(\lambda (H1: (subst0 -d u (THead k t0 t1) (THead k t0 t1))).(\lambda (P: Prop).(or3_ind (ex2 T -(\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: -T).(subst0 d u t0 u2))) (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead -k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda -(u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s k d) u t1 t2)))) P (\lambda (H2: (ex2 T (\lambda (u2: T).(eq T -(THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 -u2)))).(ex2_ind T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) -(\lambda (u2: T).(subst0 d u t0 u2)) P (\lambda (x: T).(\lambda (H3: (eq T -(THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 d u t0 x)).(let H5 -\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | -(TLRef _) \Rightarrow t0 | (THead _ t2 _) \Rightarrow t2])) (THead k t0 t1) -(THead k x t1) H3) in (let H6 \def (eq_ind_r T x (\lambda (t2: T).(subst0 d u -t0 t2)) H4 t0 H5) in (H d H6 P)))))) H2)) (\lambda (H2: (ex2 T (\lambda (t2: -T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u -t1 t2)))).(ex2_ind T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) -(\lambda (t2: T).(subst0 (s k d) u t1 t2)) P (\lambda (x: T).(\lambda (H3: -(eq T (THead k t0 t1) (THead k t0 x))).(\lambda (H4: (subst0 (s k d) u t1 -x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) \Rightarrow t2])) -(THead k t0 t1) (THead k t0 x) H3) in (let H6 \def (eq_ind_r T x (\lambda -(t2: T).(subst0 (s k d) u t1 t2)) H4 t1 H5) in (H0 (s k d) H6 P)))))) H2)) -(\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 -t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: T).(\lambda -(x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 x1))).(\lambda (H4: -(subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 x1)).(let H6 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef -_) \Rightarrow t0 | (THead _ t2 _) \Rightarrow t2])) (THead k t0 t1) (THead k -x0 x1) H3) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) -\Rightarrow t2])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T -t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t2: T).(subst0 (s k d) u t1 -t2)) H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t2: T).(subst0 d u -t0 t2)) H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 -t1 (THead k t0 t1) d H1)))))))))) t)). - -lemma subst0_lift_lt: - \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 -i u t1 t2) \to (\forall (d: nat).((lt i d) \to (\forall (h: nat).(subst0 i -(lift h (minus d (S i)) u) (lift h d t1) (lift h d t2))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((lt n d) \to (\forall -(h: nat).(subst0 n (lift h (minus d (S n)) t) (lift h d t0) (lift h d -t3))))))))) (\lambda (v: T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda -(H0: (lt i0 d)).(\lambda (h: nat).(eq_ind_r T (TLRef i0) (\lambda (t: -T).(subst0 i0 (lift h (minus d (S i0)) v) t (lift h d (lift (S i0) O v)))) -(let w \def (minus d (S i0)) in (eq_ind nat (plus (S i0) (minus d (S i0))) -(\lambda (n: nat).(subst0 i0 (lift h w v) (TLRef i0) (lift h n (lift (S i0) O -v)))) (eq_ind_r T (lift (S i0) O (lift h (minus d (S i0)) v)) (\lambda (t: -T).(subst0 i0 (lift h w v) (TLRef i0) t)) (subst0_lref (lift h (minus d (S -i0)) v) i0) (lift h (plus (S i0) (minus d (S i0))) (lift (S i0) O v)) (lift_d -v h (S i0) (minus d (S i0)) O (le_O_n (minus d (S i0))))) d (le_plus_minus_r -(S i0) d H0))) (lift h d (TLRef i0)) (lift_lref_lt i0 h d H0))))))) (\lambda -(v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: -(subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt i0 d) \to (\forall -(h: nat).(subst0 i0 (lift h (minus d (S i0)) v) (lift h d u1) (lift h d -u2))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (lt -i0 d)).(\lambda (h: nat).(eq_ind_r T (THead k (lift h d u1) (lift h (s k d) -t)) (\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) t0 (lift h d -(THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t)) -(\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift h d -u1) (lift h (s k d) t)) t0)) (subst0_fst (lift h (minus d (S i0)) v) (lift h -d u2) (lift h d u1) i0 (H1 d H2 h) (lift h (s k d) t) k) (lift h d (THead k -u2 t)) (lift_head k u2 t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h -d))))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: -T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: -((\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) -(lift h (minus d (S (s k i0))) v) (lift h d t3) (lift h d t0))))))).(\lambda -(u0: T).(\lambda (d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(let H3 -\def (eq_ind_r nat (S (s k i0)) (\lambda (n: nat).(\forall (d0: nat).((lt (s -k i0) d0) \to (\forall (h0: nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) -(lift h0 d0 t3) (lift h0 d0 t0)))))) H1 (s k (S i0)) (s_S k i0)) in (eq_ind_r -T (THead k (lift h d u0) (lift h (s k d) t3)) (\lambda (t: T).(subst0 i0 -(lift h (minus d (S i0)) v) t (lift h d (THead k u0 t0)))) (eq_ind_r T (THead -k (lift h d u0) (lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h -(minus d (S i0)) v) (THead k (lift h d u0) (lift h (s k d) t3)) t)) (eq_ind -nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 i0 (lift h n v) -(THead k (lift h d u0) (lift h (s k d) t3)) (THead k (lift h d u0) (lift h (s -k d) t0)))) (subst0_snd k (lift h (minus (s k d) (s k (S i0))) v) (lift h (s -k d) t0) (lift h (s k d) t3) i0 (H3 (s k d) (s_lt k i0 d H2) h) (lift h d -u0)) (minus d (S i0)) (minus_s_s k d (S i0))) (lift h d (THead k u0 t0)) -(lift_head k u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h -d)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda -(i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: -nat).((lt i0 d) \to (\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) -(lift h d u1) (lift h d u2))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda -(t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: -nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d -(S (s k i0))) v) (lift h d t0) (lift h d t3))))))).(\lambda (d: nat).(\lambda -(H4: (lt i0 d)).(\lambda (h: nat).(let H5 \def (eq_ind_r nat (S (s k i0)) -(\lambda (n: nat).(\forall (d0: nat).((lt (s k i0) d0) \to (\forall (h0: -nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) (lift h0 d0 t0) (lift h0 d0 -t3)))))) H3 (s k (S i0)) (s_S k i0)) in (eq_ind_r T (THead k (lift h d u1) -(lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t -(lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k -d) t3)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift -h d u1) (lift h (s k d) t0)) t)) (subst0_both (lift h (minus d (S i0)) v) -(lift h d u1) (lift h d u2) i0 (H1 d H4 h) k (lift h (s k d) t0) (lift h (s k -d) t3) (eq_ind nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 (s -k i0) (lift h n v) (lift h (s k d) t0) (lift h (s k d) t3))) (H5 (s k d) -(s_lt k i0 d H4) h) (minus d (S i0)) (minus_s_s k d (S i0)))) (lift h d -(THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead k u1 t0)) -(lift_head k u1 t0 h d))))))))))))))))) i u t1 t2 H))))). - -lemma subst0_lift_ge: - \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall -(h: nat).((subst0 i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst0 -(plus i h) u (lift h d t1) (lift h d t2))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(h: nat).(\lambda (H: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: -nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((le -d n) \to (subst0 (plus n h) t (lift h d t0) (lift h d t3)))))))) (\lambda (v: -T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda (H0: (le d i0)).(eq_ind_r T -(TLRef (plus i0 h)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (lift -(S i0) O v)))) (eq_ind_r T (lift (plus h (S i0)) O v) (\lambda (t: T).(subst0 -(plus i0 h) v (TLRef (plus i0 h)) t)) (eq_ind nat (S (plus h i0)) (\lambda -(n: nat).(subst0 (plus i0 h) v (TLRef (plus i0 h)) (lift n O v))) (eq_ind_r -nat (plus h i0) (\lambda (n: nat).(subst0 n v (TLRef n) (lift (S (plus h i0)) -O v))) (subst0_lref v (plus h i0)) (plus i0 h) (plus_sym i0 h)) (plus h (S -i0)) (plus_n_Sm h i0)) (lift h d (lift (S i0) O v)) (lift_free v (S i0) h O d -(le_S d i0 H0) (le_O_n d))) (lift h d (TLRef i0)) (lift_lref_ge i0 h d -H0)))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: -nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le -d i0) \to (subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (t: -T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (le d i0)).(eq_ind_r T -(THead k (lift h d u1) (lift h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 -h) v t0 (lift h d (THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift -h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 h) v (THead k (lift h d u1) -(lift h (s k d) t)) t0)) (subst0_fst v (lift h d u2) (lift h d u1) (plus i0 -h) (H1 d H2) (lift h (s k d) t) k) (lift h d (THead k u2 t)) (lift_head k u2 -t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h d)))))))))))) (\lambda -(k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: -nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: -nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t3) (lift h d -t0)))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (le d i0)).(let H3 -\def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: nat).(\forall (d0: -nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t3) (lift h d0 t0))))) H1 -(s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift h d u0) -(lift h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (THead -k u0 t0)))) (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t0)) (\lambda -(t: T).(subst0 (plus i0 h) v (THead k (lift h d u0) (lift h (s k d) t3)) t)) -(subst0_snd k v (lift h (s k d) t0) (lift h (s k d) t3) (plus i0 h) (H3 (s k -d) (s_le k d i0 H2)) (lift h d u0)) (lift h d (THead k u0 t0)) (lift_head k -u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h d))))))))))))) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda -(_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le d i0) \to -(subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (k: -K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i0) v t0 -t3)).(\lambda (H3: ((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k -i0) h) v (lift h d t0) (lift h d t3)))))).(\lambda (d: nat).(\lambda (H4: (le -d i0)).(let H5 \def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: -nat).(\forall (d0: nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t0) -(lift h d0 t3))))) H3 (s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T -(THead k (lift h d u1) (lift h (s k d) t0)) (\lambda (t: T).(subst0 (plus i0 -h) v t (lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift -h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v (THead k (lift h d u1) -(lift h (s k d) t0)) t)) (subst0_both v (lift h d u1) (lift h d u2) (plus i0 -h) (H1 d H4) k (lift h (s k d) t0) (lift h (s k d) t3) (H5 (s k d) (s_le k d -i0 H4))) (lift h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead -k u1 t0)) (lift_head k u1 t0 h d)))))))))))))))) i u t1 t2 H)))))). - -lemma subst0_lift_ge_S: - \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 -i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst0 (S i) u (lift (S O) d -t1) (lift (S O) d t2)))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(eq_ind nat -(plus i (S O)) (\lambda (n: nat).(subst0 n u (lift (S O) d t1) (lift (S O) d -t2))) (subst0_lift_ge t1 t2 u i (S O) H d H0) (S i) (eq_ind_r nat (plus (S O) -i) (\lambda (n: nat).(eq nat n (S i))) (le_antisym (plus (S O) i) (S i) (le_n -(S i)) (le_n (plus (S O) i))) (plus i (S O)) (plus_sym i (S O)))))))))). - -lemma subst0_lift_ge_s: - \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 -i u t1 t2) \to (\forall (d: nat).((le d i) \to (\forall (b: B).(subst0 (s -(Bind b) i) u (lift (S O) d t1) (lift (S O) d t2))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(\lambda -(_: B).(subst0_lift_ge_S t1 t2 u i H d H0)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma deleted file mode 100644 index 99caee518..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma +++ /dev/null @@ -1,1389 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/props.ma". - -include "basic_1/s/fwd.ma". - -theorem subst0_subst0: - \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 -j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i -u u1 u2) \to (ex2 T (\lambda (t: T).(subst0 j u1 t1 t)) (\lambda (t: -T).(subst0 (S (plus i j)) u t t2))))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda -(H: (subst0 j u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).(\forall (u: -T).(\forall (i: nat).((subst0 i u u1 t) \to (ex2 T (\lambda (t4: T).(subst0 n -u1 t0 t4)) (\lambda (t4: T).(subst0 (S (plus i n)) u t4 t3))))))))))) -(\lambda (v: T).(\lambda (i: nat).(\lambda (u1: T).(\lambda (u: T).(\lambda -(i0: nat).(\lambda (H0: (subst0 i0 u u1 v)).(eq_ind nat (plus i0 (S i)) -(\lambda (n: nat).(ex2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda -(t: T).(subst0 n u t (lift (S i) O v))))) (ex_intro2 T (\lambda (t: -T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 (plus i0 (S i)) u t -(lift (S i) O v))) (lift (S i) O u1) (subst0_lref u1 i) (subst0_lift_ge u1 v -u i0 (S i) H0 O (le_O_n i0))) (S (plus i0 i)) (sym_eq nat (S (plus i0 i)) -(plus i0 (S i)) (plus_n_Sm i0 i))))))))) (\lambda (v: T).(\lambda (u0: -T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 -u0)).(\lambda (H1: ((\forall (u3: T).(\forall (u: T).(\forall (i0: -nat).((subst0 i0 u u3 v) \to (ex2 T (\lambda (t: T).(subst0 i u3 u1 t)) -(\lambda (t: T).(subst0 (S (plus i0 i)) u t u0))))))))).(\lambda (t: -T).(\lambda (k: K).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: -nat).(\lambda (H2: (subst0 i0 u u3 v)).(ex2_ind T (\lambda (t0: T).(subst0 i -u3 u1 t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u t0 u0)) (ex2 T (\lambda -(t0: T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 -i)) u t0 (THead k u0 t)))) (\lambda (x: T).(\lambda (H3: (subst0 i u3 u1 -x)).(\lambda (H4: (subst0 (S (plus i0 i)) u x u0)).(ex_intro2 T (\lambda (t0: -T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) -u t0 (THead k u0 t))) (THead k x t) (subst0_fst u3 x u1 i H3 t k) (subst0_fst -u u0 x (S (plus i0 i)) H4 t k))))) (H1 u3 u i0 H2)))))))))))))) (\lambda (k: -K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i: -nat).(\lambda (_: (subst0 (s k i) v t3 t0)).(\lambda (H1: ((\forall (u1: -T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u1 v) \to (ex2 T (\lambda -(t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k -i))) u t t0))))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (u0: -T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u0 u1 v)).(ex2_ind T (\lambda -(t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k -i))) u0 t t0)) (ex2 T (\lambda (t: T).(subst0 i u1 (THead k u t3) t)) -(\lambda (t: T).(subst0 (S (plus i0 i)) u0 t (THead k u t0)))) (\lambda (x: -T).(\lambda (H3: (subst0 (s k i) u1 t3 x)).(\lambda (H4: (subst0 (S (plus i0 -(s k i))) u0 x t0)).(let H5 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: -nat).(subst0 (S n) u0 x t0)) H4 (s k (plus i0 i)) (s_plus_sym k i0 i)) in -(let H6 \def (eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n -u0 x t0)) H5 (s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T -(\lambda (t: T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S -(plus i0 i)) u0 t (THead k u t0))) (THead k u x) (subst0_snd k u1 x t3 i H3 -u) (subst0_snd k u0 t0 x (S (plus i0 i)) H6 u))))))) (H1 u1 u0 i0 -H2)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda -(i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: ((\forall (u3: -T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u3 v) \to (ex2 T (\lambda -(t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t -u0))))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: -(subst0 (s k i) v t0 t3)).(\lambda (H3: ((\forall (u3: T).(\forall (u: -T).(\forall (i0: nat).((subst0 i0 u u3 v) \to (ex2 T (\lambda (t: T).(subst0 -(s k i) u3 t0 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t -t3))))))))).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H4: -(subst0 i0 u u3 v)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) -(\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t t3)) (ex2 T (\lambda (t: -T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u -t (THead k u0 t3)))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i) u3 t0 -x)).(\lambda (H6: (subst0 (S (plus i0 (s k i))) u x t3)).(ex2_ind T (\lambda -(t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t u0)) -(ex2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: -T).(subst0 (S (plus i0 i)) u t (THead k u0 t3)))) (\lambda (x0: T).(\lambda -(H7: (subst0 i u3 u1 x0)).(\lambda (H8: (subst0 (S (plus i0 i)) u x0 -u0)).(let H9 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 -(S n) u x t3)) H6 (s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H10 \def -(eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n u x t3)) H9 -(s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: -T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u -t (THead k u0 t3))) (THead k x0 x) (subst0_both u3 u1 x0 i H7 k t0 x H5) -(subst0_both u x0 u0 (S (plus i0 i)) H8 k x t3 H10))))))) (H1 u3 u i0 H4))))) -(H3 u3 u i0 H4))))))))))))))))) j u2 t1 t2 H))))). - -theorem subst0_subst0_back: - \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 -j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i -u u2 u1) \to (ex2 T (\lambda (t: T).(subst0 j u1 t1 t)) (\lambda (t: -T).(subst0 (S (plus i j)) u t2 t))))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda -(H: (subst0 j u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).(\forall (u: -T).(\forall (i: nat).((subst0 i u t u1) \to (ex2 T (\lambda (t4: T).(subst0 n -u1 t0 t4)) (\lambda (t4: T).(subst0 (S (plus i n)) u t3 t4))))))))))) -(\lambda (v: T).(\lambda (i: nat).(\lambda (u1: T).(\lambda (u: T).(\lambda -(i0: nat).(\lambda (H0: (subst0 i0 u v u1)).(eq_ind nat (plus i0 (S i)) -(\lambda (n: nat).(ex2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda -(t: T).(subst0 n u (lift (S i) O v) t)))) (ex_intro2 T (\lambda (t: -T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 (plus i0 (S i)) u (lift -(S i) O v) t)) (lift (S i) O u1) (subst0_lref u1 i) (subst0_lift_ge v u1 u i0 -(S i) H0 O (le_O_n i0))) (S (plus i0 i)) (sym_eq nat (S (plus i0 i)) (plus i0 -(S i)) (plus_n_Sm i0 i))))))))) (\lambda (v: T).(\lambda (u0: T).(\lambda -(u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: -((\forall (u3: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u v u3) \to -(ex2 T (\lambda (t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus -i0 i)) u u0 t))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (u3: -T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u v -u3)).(ex2_ind T (\lambda (t0: T).(subst0 i u3 u1 t0)) (\lambda (t0: -T).(subst0 (S (plus i0 i)) u u0 t0)) (ex2 T (\lambda (t0: T).(subst0 i u3 -(THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u (THead k u0 t) -t0))) (\lambda (x: T).(\lambda (H3: (subst0 i u3 u1 x)).(\lambda (H4: (subst0 -(S (plus i0 i)) u u0 x)).(ex_intro2 T (\lambda (t0: T).(subst0 i u3 (THead k -u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u (THead k u0 t) t0)) -(THead k x t) (subst0_fst u3 x u1 i H3 t k) (subst0_fst u x u0 (S (plus i0 -i)) H4 t k))))) (H1 u3 u i0 H2)))))))))))))) (\lambda (k: K).(\lambda (v: -T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (_: (subst0 -(s k i) v t3 t0)).(\lambda (H1: ((\forall (u1: T).(\forall (u: T).(\forall -(i0: nat).((subst0 i0 u v u1) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u1 -t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t0 t))))))))).(\lambda -(u: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H2: -(subst0 i0 u0 v u1)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u1 t3 t)) -(\lambda (t: T).(subst0 (S (plus i0 (s k i))) u0 t0 t)) (ex2 T (\lambda (t: -T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 -(THead k u t0) t))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i) u1 t3 -x)).(\lambda (H4: (subst0 (S (plus i0 (s k i))) u0 t0 x)).(let H5 \def -(eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u0 t0 x)) H4 -(s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H6 \def (eq_ind_r nat (S (s k -(plus i0 i))) (\lambda (n: nat).(subst0 n u0 t0 x)) H5 (s k (S (plus i0 i))) -(s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u1 (THead k u -t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 (THead k u t0) t)) (THead -k u x) (subst0_snd k u1 x t3 i H3 u) (subst0_snd k u0 x t0 (S (plus i0 i)) H6 -u))))))) (H1 u1 u0 i0 H2)))))))))))))) (\lambda (v: T).(\lambda (u1: -T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 -u0)).(\lambda (H1: ((\forall (u3: T).(\forall (u: T).(\forall (i0: -nat).((subst0 i0 u v u3) \to (ex2 T (\lambda (t: T).(subst0 i u3 u1 t)) -(\lambda (t: T).(subst0 (S (plus i0 i)) u u0 t))))))))).(\lambda (k: -K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i) v t0 -t3)).(\lambda (H3: ((\forall (u3: T).(\forall (u: T).(\forall (i0: -nat).((subst0 i0 u v u3) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) -(\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t3 t))))))))).(\lambda (u3: -T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H4: (subst0 i0 u v -u3)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) (\lambda (t: -T).(subst0 (S (plus i0 (s k i))) u t3 t)) (ex2 T (\lambda (t: T).(subst0 i u3 -(THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) -t))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i) u3 t0 x)).(\lambda (H6: -(subst0 (S (plus i0 (s k i))) u t3 x)).(ex2_ind T (\lambda (t: T).(subst0 i -u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u u0 t)) (ex2 T (\lambda -(t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 -i)) u (THead k u0 t3) t))) (\lambda (x0: T).(\lambda (H7: (subst0 i u3 u1 -x0)).(\lambda (H8: (subst0 (S (plus i0 i)) u u0 x0)).(let H9 \def (eq_ind_r -nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u t3 x)) H6 (s k (plus -i0 i)) (s_plus_sym k i0 i)) in (let H10 \def (eq_ind_r nat (S (s k (plus i0 -i))) (\lambda (n: nat).(subst0 n u t3 x)) H9 (s k (S (plus i0 i))) (s_S k -(plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) -t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) t)) (THead k x0 -x) (subst0_both u3 u1 x0 i H7 k t0 x H5) (subst0_both u u0 x0 (S (plus i0 i)) -H8 k t3 x H10))))))) (H1 u3 u i0 H4))))) (H3 u3 u i0 H4))))))))))))))))) j u2 -t1 t2 H))))). - -theorem subst0_trans: - \forall (t2: T).(\forall (t1: T).(\forall (v: T).(\forall (i: nat).((subst0 -i v t1 t2) \to (\forall (t3: T).((subst0 i v t2 t3) \to (subst0 i v t1 -t3))))))) -\def - \lambda (t2: T).(\lambda (t1: T).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H: (subst0 i v t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t0: T).(\lambda (t3: T).(\forall (t4: T).((subst0 n t t3 t4) \to -(subst0 n t t0 t4))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (t3: -T).(\lambda (H0: (subst0 i0 v0 (lift (S i0) O v0) t3)).(subst0_gen_lift_false -v0 v0 t3 (S i0) O i0 (le_O_n i0) (le_n (plus O (S i0))) H0 (subst0 i0 v0 -(TLRef i0) t3)))))) (\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: -T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 v0 u1 u2)).(\lambda (H1: -((\forall (t3: T).((subst0 i0 v0 u2 t3) \to (subst0 i0 v0 u1 t3))))).(\lambda -(t: T).(\lambda (k: K).(\lambda (t3: T).(\lambda (H2: (subst0 i0 v0 (THead k -u2 t) t3)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t3 (THead k u3 t))) -(\lambda (u3: T).(subst0 i0 v0 u2 u3))) (ex2 T (\lambda (t4: T).(eq T t3 -(THead k u2 t4))) (\lambda (t4: T).(subst0 (s k i0) v0 t t4))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t4: T).(eq T t3 (THead k u3 t4)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t4: -T).(subst0 (s k i0) v0 t t4)))) (subst0 i0 v0 (THead k u1 t) t3) (\lambda -(H3: (ex2 T (\lambda (u3: T).(eq T t3 (THead k u3 t))) (\lambda (u3: -T).(subst0 i0 v0 u2 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t3 (THead k u3 -t))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)) (subst0 i0 v0 (THead k u1 t) t3) -(\lambda (x: T).(\lambda (H4: (eq T t3 (THead k x t))).(\lambda (H5: (subst0 -i0 v0 u2 x)).(eq_ind_r T (THead k x t) (\lambda (t0: T).(subst0 i0 v0 (THead -k u1 t) t0)) (subst0_fst v0 x u1 i0 (H1 x H5) t k) t3 H4)))) H3)) (\lambda -(H3: (ex2 T (\lambda (t4: T).(eq T t3 (THead k u2 t4))) (\lambda (t4: -T).(subst0 (s k i0) v0 t t4)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead k -u2 t4))) (\lambda (t4: T).(subst0 (s k i0) v0 t t4)) (subst0 i0 v0 (THead k -u1 t) t3) (\lambda (x: T).(\lambda (H4: (eq T t3 (THead k u2 x))).(\lambda -(H5: (subst0 (s k i0) v0 t x)).(eq_ind_r T (THead k u2 x) (\lambda (t0: -T).(subst0 i0 v0 (THead k u1 t) t0)) (subst0_both v0 u1 u2 i0 H0 k t x H5) t3 -H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t4: T).(eq T -t3 (THead k u3 t4)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) -(\lambda (_: T).(\lambda (t4: T).(subst0 (s k i0) v0 t t4))))).(ex3_2_ind T T -(\lambda (u3: T).(\lambda (t4: T).(eq T t3 (THead k u3 t4)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t4: -T).(subst0 (s k i0) v0 t t4))) (subst0 i0 v0 (THead k u1 t) t3) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H4: (eq T t3 (THead k x0 x1))).(\lambda (H5: -(subst0 i0 v0 u2 x0)).(\lambda (H6: (subst0 (s k i0) v0 t x1)).(eq_ind_r T -(THead k x0 x1) (\lambda (t0: T).(subst0 i0 v0 (THead k u1 t) t0)) -(subst0_both v0 u1 x0 i0 (H1 x0 H5) k t x1 H6) t3 H4)))))) H3)) -(subst0_gen_head k v0 u2 t t3 i0 H2)))))))))))) (\lambda (k: K).(\lambda (v0: -T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: nat).(\lambda (H0: (subst0 -(s k i0) v0 t3 t0)).(\lambda (H1: ((\forall (t4: T).((subst0 (s k i0) v0 t0 -t4) \to (subst0 (s k i0) v0 t3 t4))))).(\lambda (u: T).(\lambda (t4: -T).(\lambda (H2: (subst0 i0 v0 (THead k u t0) t4)).(or3_ind (ex2 T (\lambda -(u2: T).(eq T t4 (THead k u2 t0))) (\lambda (u2: T).(subst0 i0 v0 u u2))) -(ex2 T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s -k i0) v0 t0 t5))) (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 -(THead k u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u u2))) -(\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)))) (subst0 i0 v0 -(THead k u t3) t4) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 -t0))) (\lambda (u2: T).(subst0 i0 v0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq -T t4 (THead k u2 t0))) (\lambda (u2: T).(subst0 i0 v0 u u2)) (subst0 i0 v0 -(THead k u t3) t4) (\lambda (x: T).(\lambda (H4: (eq T t4 (THead k x -t0))).(\lambda (H5: (subst0 i0 v0 u x)).(eq_ind_r T (THead k x t0) (\lambda -(t: T).(subst0 i0 v0 (THead k u t3) t)) (subst0_both v0 u x i0 H5 k t3 t0 H0) -t4 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u -t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)))).(ex2_ind T (\lambda (t5: -T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)) -(subst0 i0 v0 (THead k u t3) t4) (\lambda (x: T).(\lambda (H4: (eq T t4 -(THead k u x))).(\lambda (H5: (subst0 (s k i0) v0 t0 x)).(eq_ind_r T (THead k -u x) (\lambda (t: T).(subst0 i0 v0 (THead k u t3) t)) (subst0_snd k v0 x t3 -i0 (H1 x H5) u) t4 H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u2: -T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i0 v0 u u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 -t0 t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k -u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u u2))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i0) v0 t0 t5))) (subst0 i0 v0 (THead k u t3) -t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t4 (THead k x0 -x1))).(\lambda (H5: (subst0 i0 v0 u x0)).(\lambda (H6: (subst0 (s k i0) v0 t0 -x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(subst0 i0 v0 (THead k u t3) -t)) (subst0_both v0 u x0 i0 H5 k t3 x1 (H1 x1 H6)) t4 H4)))))) H3)) -(subst0_gen_head k v0 u t0 t4 i0 H2)))))))))))) (\lambda (v0: T).(\lambda -(u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 v0 u1 -u2)).(\lambda (H1: ((\forall (t3: T).((subst0 i0 v0 u2 t3) \to (subst0 i0 v0 -u1 t3))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H2: -(subst0 (s k i0) v0 t0 t3)).(\lambda (H3: ((\forall (t4: T).((subst0 (s k i0) -v0 t3 t4) \to (subst0 (s k i0) v0 t0 t4))))).(\lambda (t4: T).(\lambda (H4: -(subst0 i0 v0 (THead k u2 t3) t4)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t4 -(THead k u3 t3))) (\lambda (u3: T).(subst0 i0 v0 u2 u3))) (ex2 T (\lambda -(t5: T).(eq T t4 (THead k u2 t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t3 -t5))) (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 -t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)))) (subst0 i0 v0 (THead k u1 -t0) t4) (\lambda (H5: (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) -(\lambda (u3: T).(subst0 i0 v0 u2 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 -(THead k u3 t3))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)) (subst0 i0 v0 (THead -k u1 t0) t4) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k x t3))).(\lambda -(H7: (subst0 i0 v0 u2 x)).(eq_ind_r T (THead k x t3) (\lambda (t: T).(subst0 -i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 x i0 (H1 x H7) k t0 t3 H2) t4 -H6)))) H5)) (\lambda (H5: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u2 t5))) -(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)))).(ex2_ind T (\lambda (t5: -T).(eq T t4 (THead k u2 t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)) -(subst0 i0 v0 (THead k u1 t0) t4) (\lambda (x: T).(\lambda (H6: (eq T t4 -(THead k u2 x))).(\lambda (H7: (subst0 (s k i0) v0 t3 x)).(eq_ind_r T (THead -k u2 x) (\lambda (t: T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 -u2 i0 H0 k t0 x (H3 x H7)) t4 H6)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda -(u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s k i0) v0 t3 t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda -(t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 -i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5))) -(subst0 i0 v0 (THead k u1 t0) t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(H6: (eq T t4 (THead k x0 x1))).(\lambda (H7: (subst0 i0 v0 u2 x0)).(\lambda -(H8: (subst0 (s k i0) v0 t3 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: -T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 x0 i0 (H1 x0 H7) k t0 -x1 (H3 x1 H8)) t4 H6)))))) H5)) (subst0_gen_head k v0 u2 t3 t4 i0 -H4))))))))))))))) i v t1 t2 H))))). - -theorem subst0_confluence_neq: - \forall (t0: T).(\forall (t1: T).(\forall (u1: T).(\forall (i1: -nat).((subst0 i1 u1 t0 t1) \to (\forall (t2: T).(\forall (u2: T).(\forall -(i2: nat).((subst0 i2 u2 t0 t2) \to ((not (eq nat i1 i2)) \to (ex2 T (\lambda -(t: T).(subst0 i2 u2 t1 t)) (\lambda (t: T).(subst0 i1 u1 t2 t)))))))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (u1: T).(\lambda (i1: -nat).(\lambda (H: (subst0 i1 u1 t0 t1)).(subst0_ind (\lambda (n: -nat).(\lambda (t: T).(\lambda (t2: T).(\lambda (t3: T).(\forall (t4: -T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t2 t4) \to ((not (eq -nat n i2)) \to (ex2 T (\lambda (t5: T).(subst0 i2 u2 t3 t5)) (\lambda (t5: -T).(subst0 n t t4 t5)))))))))))) (\lambda (v: T).(\lambda (i: nat).(\lambda -(t2: T).(\lambda (u2: T).(\lambda (i2: nat).(\lambda (H0: (subst0 i2 u2 -(TLRef i) t2)).(\lambda (H1: (not (eq nat i i2))).(land_ind (eq nat i i2) (eq -T t2 (lift (S i) O u2)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (lift (S i) O v) -t)) (\lambda (t: T).(subst0 i v t2 t))) (\lambda (H2: (eq nat i i2)).(\lambda -(H3: (eq T t2 (lift (S i) O u2))).(let H4 \def (eq_ind nat i (\lambda (n: -nat).(not (eq nat n i2))) H1 i2 H2) in (eq_ind_r T (lift (S i) O u2) (\lambda -(t: T).(ex2 T (\lambda (t3: T).(subst0 i2 u2 (lift (S i) O v) t3)) (\lambda -(t3: T).(subst0 i v t t3)))) (let H5 \def (match (H4 (refl_equal nat i2)) in -False with []) in H5) t2 H3)))) (subst0_gen_lref u2 t2 i2 i H0))))))))) -(\lambda (v: T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda -(H0: (subst0 i v u0 u2)).(\lambda (H1: ((\forall (t2: T).(\forall (u3: -T).(\forall (i2: nat).((subst0 i2 u3 u0 t2) \to ((not (eq nat i i2)) \to (ex2 -T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v t2 -t)))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (t2: T).(\lambda (u3: -T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u3 (THead k u0 t) -t2)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u4: T).(eq -T t2 (THead k u4 t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T (\lambda -(t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) u3 t -t3))) (ex3_2 T T (\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 -t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3)))) (ex2 T (\lambda (t3: -T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) -(\lambda (H4: (ex2 T (\lambda (u4: T).(eq T t2 (THead k u4 t))) (\lambda (u4: -T).(subst0 i2 u3 u0 u4)))).(ex2_ind T (\lambda (u4: T).(eq T t2 (THead k u4 -t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t3: T).(subst0 -i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: -T).(\lambda (H5: (eq T t2 (THead k x t))).(\lambda (H6: (subst0 i2 u3 u0 -x)).(eq_ind_r T (THead k x t) (\lambda (t3: T).(ex2 T (\lambda (t4: -T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) -(ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: T).(subst0 i -v x t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda -(t3: T).(subst0 i v (THead k x t) t3))) (\lambda (x0: T).(\lambda (H7: -(subst0 i2 u3 u2 x0)).(\lambda (H8: (subst0 i v x x0)).(ex_intro2 T (\lambda -(t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead -k x t) t3)) (THead k x0 t) (subst0_fst u3 x0 u2 i2 H7 t k) (subst0_fst v x0 x -i H8 t k))))) (H1 x u3 i2 H6 H3)) t2 H5)))) H4)) (\lambda (H4: (ex2 T -(\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) -u3 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda -(t3: T).(subst0 (s k i2) u3 t t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 -(THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: -T).(\lambda (H5: (eq T t2 (THead k u0 x))).(\lambda (H6: (subst0 (s k i2) u3 -t x)).(eq_ind_r T (THead k u0 x) (\lambda (t3: T).(ex2 T (\lambda (t4: -T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) -(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i v (THead k u0 x) t3)) (THead k u2 x) (subst0_snd k u3 x t i2 H6 -u2) (subst0_fst v u2 u0 i H0 x k)) t2 H5)))) H4)) (\lambda (H4: (ex3_2 T T -(\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: -T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s k i2) u3 t t3))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda -(t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 -i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3))) -(ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i v t2 t3))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T -t2 (THead k x0 x1))).(\lambda (H6: (subst0 i2 u3 u0 x0)).(\lambda (H7: -(subst0 (s k i2) u3 t x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t3: T).(ex2 -T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 -i v t3 t4)))) (ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: -T).(subst0 i v x0 t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) -t3)) (\lambda (t3: T).(subst0 i v (THead k x0 x1) t3))) (\lambda (x: -T).(\lambda (H8: (subst0 i2 u3 u2 x)).(\lambda (H9: (subst0 i v x0 -x)).(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda -(t3: T).(subst0 i v (THead k x0 x1) t3)) (THead k x x1) (subst0_both u3 u2 x -i2 H8 k t x1 H7) (subst0_fst v x x0 i H9 x1 k))))) (H1 x0 u3 i2 H6 H3)) t2 -H5)))))) H4)) (subst0_gen_head k u3 u0 t t2 i2 H2))))))))))))))) (\lambda (k: -K).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (i: -nat).(\lambda (H0: (subst0 (s k i) v t3 t2)).(\lambda (H1: ((\forall (t4: -T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t3 t4) \to ((not (eq -nat (s k i) i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u2 t2 t)) (\lambda (t: -T).(subst0 (s k i) v t4 t)))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda -(u2: T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u2 (THead k u t3) -t4)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u3: T).(eq -T t4 (THead k u3 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3))) (ex2 T (\lambda -(t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i2) u2 t3 -t5))) (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 -t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i2) u2 t3 t5)))) (ex2 T (\lambda (t: -T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) -(\lambda (H4: (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) (\lambda -(u3: T).(subst0 i2 u2 u u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 (THead k -u3 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3)) (ex2 T (\lambda (t: T).(subst0 -i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: -T).(\lambda (H5: (eq T t4 (THead k x t3))).(\lambda (H6: (subst0 i2 u2 u -x)).(eq_ind_r T (THead k x t3) (\lambda (t: T).(ex2 T (\lambda (t5: -T).(subst0 i2 u2 (THead k u t2) t5)) (\lambda (t5: T).(subst0 i v t t5)))) -(ex_intro2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: -T).(subst0 i v (THead k x t3) t)) (THead k x t2) (subst0_fst u2 x u i2 H6 t2 -k) (subst0_snd k v t2 t3 i H0 x)) t4 H5)))) H4)) (\lambda (H4: (ex2 T -(\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i2) -u2 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda -(t5: T).(subst0 (s k i2) u2 t3 t5)) (ex2 T (\lambda (t: T).(subst0 i2 u2 -(THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: -T).(\lambda (H5: (eq T t4 (THead k u x))).(\lambda (H6: (subst0 (s k i2) u2 -t3 x)).(eq_ind_r T (THead k u x) (\lambda (t: T).(ex2 T (\lambda (t5: -T).(subst0 i2 u2 (THead k u t2) t5)) (\lambda (t5: T).(subst0 i v t t5)))) -(ex2_ind T (\lambda (t: T).(subst0 (s k i2) u2 t2 t)) (\lambda (t: T).(subst0 -(s k i) v x t)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) -(\lambda (t: T).(subst0 i v (THead k u x) t))) (\lambda (x0: T).(\lambda (H7: -(subst0 (s k i2) u2 t2 x0)).(\lambda (H8: (subst0 (s k i) v x x0)).(ex_intro2 -T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i -v (THead k u x) t)) (THead k u x0) (subst0_snd k u2 x0 t2 i2 H7 u) -(subst0_snd k v x0 x i H8 u))))) (H1 x u2 (s k i2) H6 (ex2_ind T (\lambda (t: -T).(subst0 (s k i2) u2 t2 t)) (\lambda (t: T).(subst0 (s k i) v x t)) ((eq -nat (s k i) (s k i2)) \to False) (\lambda (x0: T).(\lambda (_: (subst0 (s k -i2) u2 t2 x0)).(\lambda (_: (subst0 (s k i) v x x0)).(\lambda (H9: (eq nat (s -k i) (s k i2))).(H3 (s_inj k i i2 H9)))))) (H1 x u2 (s k i2) H6 (\lambda (H7: -(eq nat (s k i) (s k i2))).(H3 (s_inj k i i2 H7))))))) t4 H5)))) H4)) -(\lambda (H4: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k -u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i2) u2 t3 t5))))).(ex3_2_ind T T (\lambda -(u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s k i2) u2 t3 t5))) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k -u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H5: (eq T t4 (THead k x0 x1))).(\lambda (H6: (subst0 i2 u2 u -x0)).(\lambda (H7: (subst0 (s k i2) u2 t3 x1)).(eq_ind_r T (THead k x0 x1) -(\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u2 (THead k u t2) t5)) -(\lambda (t5: T).(subst0 i v t t5)))) (ex2_ind T (\lambda (t: T).(subst0 (s k -i2) u2 t2 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) (ex2 T (\lambda (t: -T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k x0 -x1) t))) (\lambda (x: T).(\lambda (H8: (subst0 (s k i2) u2 t2 x)).(\lambda -(H9: (subst0 (s k i) v x1 x)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u2 -(THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k x0 x1) t)) (THead k -x0 x) (subst0_both u2 u x0 i2 H6 k t2 x H8) (subst0_snd k v x x1 i H9 x0))))) -(H1 x1 u2 (s k i2) H7 (ex2_ind T (\lambda (t: T).(subst0 (s k i2) u2 t2 t)) -(\lambda (t: T).(subst0 (s k i) v x1 t)) ((eq nat (s k i) (s k i2)) \to -False) (\lambda (x: T).(\lambda (_: (subst0 (s k i2) u2 t2 x)).(\lambda (_: -(subst0 (s k i) v x1 x)).(\lambda (H10: (eq nat (s k i) (s k i2))).(H3 (s_inj -k i i2 H10)))))) (H1 x1 u2 (s k i2) H7 (\lambda (H8: (eq nat (s k i) (s k -i2))).(H3 (s_inj k i i2 H8))))))) t4 H5)))))) H4)) (subst0_gen_head k u2 u t3 -t4 i2 H2))))))))))))))) (\lambda (v: T).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (i: nat).(\lambda (H0: (subst0 i v u0 u2)).(\lambda (H1: -((\forall (t2: T).(\forall (u3: T).(\forall (i2: nat).((subst0 i2 u3 u0 t2) -\to ((not (eq nat i i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u3 u2 t)) -(\lambda (t: T).(subst0 i v t2 t)))))))))).(\lambda (k: K).(\lambda (t2: -T).(\lambda (t3: T).(\lambda (H2: (subst0 (s k i) v t2 t3)).(\lambda (H3: -((\forall (t4: T).(\forall (u3: T).(\forall (i2: nat).((subst0 i2 u3 t2 t4) -\to ((not (eq nat (s k i) i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u3 t3 -t)) (\lambda (t: T).(subst0 (s k i) v t4 t)))))))))).(\lambda (t4: -T).(\lambda (u3: T).(\lambda (i2: nat).(\lambda (H4: (subst0 i2 u3 (THead k -u0 t2) t4)).(\lambda (H5: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u4: -T).(eq T t4 (THead k u4 t2))) (\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T -(\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i2) -u3 t2 t5))) (ex3_2 T T (\lambda (u4: T).(\lambda (t5: T).(eq T t4 (THead k u4 -t5)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i2) u3 t2 t5)))) (ex2 T (\lambda (t: -T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) -(\lambda (H6: (ex2 T (\lambda (u4: T).(eq T t4 (THead k u4 t2))) (\lambda -(u4: T).(subst0 i2 u3 u0 u4)))).(ex2_ind T (\lambda (u4: T).(eq T t4 (THead k -u4 t2))) (\lambda (u4: T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t: -T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) -(\lambda (x: T).(\lambda (H7: (eq T t4 (THead k x t2))).(\lambda (H8: (subst0 -i2 u3 u0 x)).(eq_ind_r T (THead k x t2) (\lambda (t: T).(ex2 T (\lambda (t5: -T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) -(ex2_ind T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v x -t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i v (THead k x t2) t))) (\lambda (x0: T).(\lambda (H9: (subst0 i2 -u3 u2 x0)).(\lambda (H10: (subst0 i v x x0)).(ex_intro2 T (\lambda (t: -T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x -t2) t)) (THead k x0 t3) (subst0_fst u3 x0 u2 i2 H9 t3 k) (subst0_both v x x0 -i H10 k t2 t3 H2))))) (H1 x u3 i2 H8 H5)) t4 H7)))) H6)) (\lambda (H6: (ex2 T -(\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i2) -u3 t2 t5)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda -(t5: T).(subst0 (s k i2) u3 t2 t5)) (ex2 T (\lambda (t: T).(subst0 i2 u3 -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: -T).(\lambda (H7: (eq T t4 (THead k u0 x))).(\lambda (H8: (subst0 (s k i2) u3 -t2 x)).(eq_ind_r T (THead k u0 x) (\lambda (t: T).(ex2 T (\lambda (t5: -T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) -(ex2_ind T (\lambda (t: T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 -(s k i) v x t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i v (THead k u0 x) t))) (\lambda (x0: T).(\lambda -(H9: (subst0 (s k i2) u3 t3 x0)).(\lambda (H10: (subst0 (s k i) v x -x0)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda -(t: T).(subst0 i v (THead k u0 x) t)) (THead k u2 x0) (subst0_snd k u3 x0 t3 -i2 H9 u2) (subst0_both v u0 u2 i H0 k x x0 H10))))) (H3 x u3 (s k i2) H8 -(ex2_ind T (\lambda (t: T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 -(s k i) v x t)) ((eq nat (s k i) (s k i2)) \to False) (\lambda (x0: -T).(\lambda (_: (subst0 (s k i2) u3 t3 x0)).(\lambda (_: (subst0 (s k i) v x -x0)).(\lambda (H11: (eq nat (s k i) (s k i2))).(H5 (s_inj k i i2 H11)))))) -(H3 x u3 (s k i2) H8 (\lambda (H9: (eq nat (s k i) (s k i2))).(H5 (s_inj k i -i2 H9))))))) t4 H7)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u4: -T).(\lambda (t5: T).(eq T t4 (THead k u4 t5)))) (\lambda (u4: T).(\lambda (_: -T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) -u3 t2 t5))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda (t5: T).(eq T t4 -(THead k u4 t5)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) -(\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) u3 t2 t5))) (ex2 T (\lambda -(t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t4 (THead k x0 -x1))).(\lambda (H8: (subst0 i2 u3 u0 x0)).(\lambda (H9: (subst0 (s k i2) u3 -t2 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(ex2 T (\lambda (t5: -T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) -(ex2_ind T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v -x0 t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i v (THead k x0 x1) t))) (\lambda (x: T).(\lambda (H10: (subst0 i2 -u3 u2 x)).(\lambda (H11: (subst0 i v x0 x)).(ex2_ind T (\lambda (t: -T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) (ex2 T -(\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v -(THead k x0 x1) t))) (\lambda (x2: T).(\lambda (H12: (subst0 (s k i2) u3 t3 -x2)).(\lambda (H13: (subst0 (s k i) v x1 x2)).(ex_intro2 T (\lambda (t: -T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x0 -x1) t)) (THead k x x2) (subst0_both u3 u2 x i2 H10 k t3 x2 H12) (subst0_both -v x0 x i H11 k x1 x2 H13))))) (H3 x1 u3 (s k i2) H9 (ex2_ind T (\lambda (t: -T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) ((eq -nat (s k i) (s k i2)) \to False) (\lambda (x2: T).(\lambda (_: (subst0 (s k -i2) u3 t3 x2)).(\lambda (_: (subst0 (s k i) v x1 x2)).(\lambda (H14: (eq nat -(s k i) (s k i2))).(H5 (s_inj k i i2 H14)))))) (H3 x1 u3 (s k i2) H9 (\lambda -(H12: (eq nat (s k i) (s k i2))).(H5 (s_inj k i i2 H12)))))))))) (H1 x0 u3 i2 -H8 H5)) t4 H7)))))) H6)) (subst0_gen_head k u3 u0 t2 t4 i2 -H4)))))))))))))))))) i1 u1 t0 t1 H))))). - -theorem subst0_confluence_eq: - \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst0 -i u t0 t1) \to (\forall (t2: T).((subst0 i u t0 t2) \to (or4 (eq T t1 t2) -(ex2 T (\lambda (t: T).(subst0 i u t1 t)) (\lambda (t: T).(subst0 i u t2 t))) -(subst0 i u t1 t2) (subst0 i u t2 t1)))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u t0 t1)).(subst0_ind (\lambda (n: nat).(\lambda (t: -T).(\lambda (t2: T).(\lambda (t3: T).(\forall (t4: T).((subst0 n t t2 t4) \to -(or4 (eq T t3 t4) (ex2 T (\lambda (t5: T).(subst0 n t t3 t5)) (\lambda (t5: -T).(subst0 n t t4 t5))) (subst0 n t t3 t4) (subst0 n t t4 t3)))))))) (\lambda -(v: T).(\lambda (i0: nat).(\lambda (t2: T).(\lambda (H0: (subst0 i0 v (TLRef -i0) t2)).(land_ind (eq nat i0 i0) (eq T t2 (lift (S i0) O v)) (or4 (eq T -(lift (S i0) O v) t2) (ex2 T (\lambda (t: T).(subst0 i0 v (lift (S i0) O v) -t)) (\lambda (t: T).(subst0 i0 v t2 t))) (subst0 i0 v (lift (S i0) O v) t2) -(subst0 i0 v t2 (lift (S i0) O v))) (\lambda (_: (eq nat i0 i0)).(\lambda -(H2: (eq T t2 (lift (S i0) O v))).(or4_intro0 (eq T (lift (S i0) O v) t2) -(ex2 T (\lambda (t: T).(subst0 i0 v (lift (S i0) O v) t)) (\lambda (t: -T).(subst0 i0 v t2 t))) (subst0 i0 v (lift (S i0) O v) t2) (subst0 i0 v t2 -(lift (S i0) O v)) (sym_eq T t2 (lift (S i0) O v) H2)))) (subst0_gen_lref v -t2 i0 i0 H0)))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda -(i0: nat).(\lambda (H0: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (t2: -T).((subst0 i0 v u1 t2) \to (or4 (eq T u2 t2) (ex2 T (\lambda (t: T).(subst0 -i0 v u2 t)) (\lambda (t: T).(subst0 i0 v t2 t))) (subst0 i0 v u2 t2) (subst0 -i0 v t2 u2)))))).(\lambda (t: T).(\lambda (k: K).(\lambda (t2: T).(\lambda -(H2: (subst0 i0 v (THead k u1 t) t2)).(or3_ind (ex2 T (\lambda (u3: T).(eq T -t2 (THead k u3 t))) (\lambda (u3: T).(subst0 i0 v u1 u3))) (ex2 T (\lambda -(t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v t -t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v t t3)))) (or4 (eq T (THead k u2 t) t2) -(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i0 v t2 t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 -(THead k u2 t))) (\lambda (H3: (ex2 T (\lambda (u3: T).(eq T t2 (THead k u3 -t))) (\lambda (u3: T).(subst0 i0 v u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq -T t2 (THead k u3 t))) (\lambda (u3: T).(subst0 i0 v u1 u3)) (or4 (eq T (THead -k u2 t) t2) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda -(t3: T).(subst0 i0 v t2 t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 -(THead k u2 t))) (\lambda (x: T).(\lambda (H4: (eq T t2 (THead k x -t))).(\lambda (H5: (subst0 i0 v u1 x)).(eq_ind_r T (THead k x t) (\lambda -(t3: T).(or4 (eq T (THead k u2 t) t3) (ex2 T (\lambda (t4: T).(subst0 i0 v -(THead k u2 t) t4)) (\lambda (t4: T).(subst0 i0 v t3 t4))) (subst0 i0 v -(THead k u2 t) t3) (subst0 i0 v t3 (THead k u2 t)))) (or4_ind (eq T u2 x) -(ex2 T (\lambda (t3: T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v x -t3))) (subst0 i0 v u2 x) (subst0 i0 v x u2) (or4 (eq T (THead k u2 t) (THead -k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda -(t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) (THead k -x t)) (subst0 i0 v (THead k x t) (THead k u2 t))) (\lambda (H6: (eq T u2 -x)).(eq_ind_r T x (\lambda (t3: T).(or4 (eq T (THead k t3 t) (THead k x t)) -(ex2 T (\lambda (t4: T).(subst0 i0 v (THead k t3 t) t4)) (\lambda (t4: -T).(subst0 i0 v (THead k x t) t4))) (subst0 i0 v (THead k t3 t) (THead k x -t)) (subst0 i0 v (THead k x t) (THead k t3 t)))) (or4_intro0 (eq T (THead k x -t) (THead k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k x t) t3)) -(\lambda (t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k x t) -(THead k x t)) (subst0 i0 v (THead k x t) (THead k x t)) (refl_equal T (THead -k x t))) u2 H6)) (\lambda (H6: (ex2 T (\lambda (t3: T).(subst0 i0 v u2 t3)) -(\lambda (t3: T).(subst0 i0 v x t3)))).(ex2_ind T (\lambda (t3: T).(subst0 i0 -v u2 t3)) (\lambda (t3: T).(subst0 i0 v x t3)) (or4 (eq T (THead k u2 t) -(THead k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) -(\lambda (t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) -(THead k x t)) (subst0 i0 v (THead k x t) (THead k u2 t))) (\lambda (x0: -T).(\lambda (H7: (subst0 i0 v u2 x0)).(\lambda (H8: (subst0 i0 v x -x0)).(or4_intro1 (eq T (THead k u2 t) (THead k x t)) (ex2 T (\lambda (t3: -T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x -t) t3))) (subst0 i0 v (THead k u2 t) (THead k x t)) (subst0 i0 v (THead k x -t) (THead k u2 t)) (ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) -t3)) (\lambda (t3: T).(subst0 i0 v (THead k x t) t3)) (THead k x0 t) -(subst0_fst v x0 u2 i0 H7 t k) (subst0_fst v x0 x i0 H8 t k)))))) H6)) -(\lambda (H6: (subst0 i0 v u2 x)).(or4_intro2 (eq T (THead k u2 t) (THead k x -t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) (THead k x -t)) (subst0 i0 v (THead k x t) (THead k u2 t)) (subst0_fst v x u2 i0 H6 t -k))) (\lambda (H6: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t) -(THead k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) -(\lambda (t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) -(THead k x t)) (subst0 i0 v (THead k x t) (THead k u2 t)) (subst0_fst v u2 x -i0 H6 t k))) (H1 x H5)) t2 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t3: -T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v t -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: -T).(subst0 (s k i0) v t t3)) (or4 (eq T (THead k u2 t) t2) (ex2 T (\lambda -(t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v t2 -t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 (THead k u2 t))) -(\lambda (x: T).(\lambda (H4: (eq T t2 (THead k u1 x))).(\lambda (H5: (subst0 -(s k i0) v t x)).(eq_ind_r T (THead k u1 x) (\lambda (t3: T).(or4 (eq T -(THead k u2 t) t3) (ex2 T (\lambda (t4: T).(subst0 i0 v (THead k u2 t) t4)) -(\lambda (t4: T).(subst0 i0 v t3 t4))) (subst0 i0 v (THead k u2 t) t3) -(subst0 i0 v t3 (THead k u2 t)))) (or4_ind (eq T u2 u2) (ex2 T (\lambda (t3: -T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v u2 t3))) (subst0 i0 v -u2 u2) (subst0 i0 v u2 u2) (or4 (eq T (THead k u2 t) (THead k u1 x)) (ex2 T -(\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 -v (THead k u1 x) t3))) (subst0 i0 v (THead k u2 t) (THead k u1 x)) (subst0 i0 -v (THead k u1 x) (THead k u2 t))) (\lambda (_: (eq T u2 u2)).(or4_intro1 (eq -T (THead k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead -k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3))) (subst0 i0 v -(THead k u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)) -(ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i0 v (THead k u1 x) t3)) (THead k u2 x) (subst0_snd k v x t i0 H5 -u2) (subst0_fst v u2 u1 i0 H0 x k)))) (\lambda (H6: (ex2 T (\lambda (t3: -T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v u2 t3)))).(ex2_ind T -(\lambda (t3: T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v u2 t3)) -(or4 (eq T (THead k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: T).(subst0 i0 -v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3))) -(subst0 i0 v (THead k u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) -(THead k u2 t))) (\lambda (x0: T).(\lambda (_: (subst0 i0 v u2 x0)).(\lambda -(_: (subst0 i0 v u2 x0)).(or4_intro1 (eq T (THead k u2 t) (THead k u1 x)) -(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i0 v (THead k u1 x) t3))) (subst0 i0 v (THead k u2 t) (THead k u1 -x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)) (ex_intro2 T (\lambda (t3: -T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 -x) t3)) (THead k u2 x) (subst0_snd k v x t i0 H5 u2) (subst0_fst v u2 u1 i0 -H0 x k)))))) H6)) (\lambda (_: (subst0 i0 v u2 u2)).(or4_intro1 (eq T (THead -k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) -t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3))) (subst0 i0 v (THead k -u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)) (ex_intro2 -T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 -i0 v (THead k u1 x) t3)) (THead k u2 x) (subst0_snd k v x t i0 H5 u2) -(subst0_fst v u2 u1 i0 H0 x k)))) (\lambda (_: (subst0 i0 v u2 -u2)).(or4_intro1 (eq T (THead k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: -T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 -x) t3))) (subst0 i0 v (THead k u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 t)) (ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) -t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3)) (THead k u2 x) -(subst0_snd k v x t i0 H5 u2) (subst0_fst v u2 u1 i0 H0 x k)))) (H1 u2 H0)) -t2 H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq -T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 -u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i0) v t -t3))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v t t3))) (or4 (eq T (THead k u2 t) t2) -(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i0 v t2 t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 -(THead k u2 t))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t2 -(THead k x0 x1))).(\lambda (H5: (subst0 i0 v u1 x0)).(\lambda (H6: (subst0 (s -k i0) v t x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t3: T).(or4 (eq T (THead -k u2 t) t3) (ex2 T (\lambda (t4: T).(subst0 i0 v (THead k u2 t) t4)) (\lambda -(t4: T).(subst0 i0 v t3 t4))) (subst0 i0 v (THead k u2 t) t3) (subst0 i0 v t3 -(THead k u2 t)))) (or4_ind (eq T u2 x0) (ex2 T (\lambda (t3: T).(subst0 i0 v -u2 t3)) (\lambda (t3: T).(subst0 i0 v x0 t3))) (subst0 i0 v u2 x0) (subst0 i0 -v x0 u2) (or4 (eq T (THead k u2 t) (THead k x0 x1)) (ex2 T (\lambda (t3: -T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 -x1) t3))) (subst0 i0 v (THead k u2 t) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k u2 t))) (\lambda (H7: (eq T u2 x0)).(eq_ind_r T x0 (\lambda -(t3: T).(or4 (eq T (THead k t3 t) (THead k x0 x1)) (ex2 T (\lambda (t4: -T).(subst0 i0 v (THead k t3 t) t4)) (\lambda (t4: T).(subst0 i0 v (THead k x0 -x1) t4))) (subst0 i0 v (THead k t3 t) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k t3 t)))) (or4_intro2 (eq T (THead k x0 t) (THead k x0 x1)) -(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k x0 t) t3)) (\lambda (t3: -T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v (THead k x0 t) (THead k x0 -x1)) (subst0 i0 v (THead k x0 x1) (THead k x0 t)) (subst0_snd k v x1 t i0 H6 -x0)) u2 H7)) (\lambda (H7: (ex2 T (\lambda (t3: T).(subst0 i0 v u2 t3)) -(\lambda (t3: T).(subst0 i0 v x0 t3)))).(ex2_ind T (\lambda (t3: T).(subst0 -i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v x0 t3)) (or4 (eq T (THead k u2 t) -(THead k x0 x1)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) -(\lambda (t3: T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v (THead k u2 -t) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t))) (\lambda -(x: T).(\lambda (H8: (subst0 i0 v u2 x)).(\lambda (H9: (subst0 i0 v x0 -x)).(or4_intro1 (eq T (THead k u2 t) (THead k x0 x1)) (ex2 T (\lambda (t3: -T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 -x1) t3))) (subst0 i0 v (THead k u2 t) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k u2 t)) (ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 -t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 x1) t3)) (THead k x x1) -(subst0_both v u2 x i0 H8 k t x1 H6) (subst0_fst v x x0 i0 H9 x1 k)))))) H7)) -(\lambda (H7: (subst0 i0 v u2 x0)).(or4_intro2 (eq T (THead k u2 t) (THead k -x0 x1)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda -(t3: T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v (THead k u2 t) (THead -k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t)) (subst0_both v u2 x0 -i0 H7 k t x1 H6))) (\lambda (H7: (subst0 i0 v x0 u2)).(or4_intro1 (eq T -(THead k u2 t) (THead k x0 x1)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k -u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v -(THead k u2 t) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t)) -(ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i0 v (THead k x0 x1) t3)) (THead k u2 x1) (subst0_snd k v x1 t i0 -H6 u2) (subst0_fst v u2 x0 i0 H7 x1 k)))) (H1 x0 H5)) t2 H4)))))) H3)) -(subst0_gen_head k v u1 t t2 i0 H2)))))))))))) (\lambda (k: K).(\lambda (v: -T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (i0: nat).(\lambda (H0: (subst0 -(s k i0) v t3 t2)).(\lambda (H1: ((\forall (t4: T).((subst0 (s k i0) v t3 t4) -\to (or4 (eq T t2 t4) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) -(\lambda (t: T).(subst0 (s k i0) v t4 t))) (subst0 (s k i0) v t2 t4) (subst0 -(s k i0) v t4 t2)))))).(\lambda (u0: T).(\lambda (t4: T).(\lambda (H2: -(subst0 i0 v (THead k u0 t3) t4)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t4 -(THead k u2 t3))) (\lambda (u2: T).(subst0 i0 v u0 u2))) (ex2 T (\lambda (t5: -T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i0) v t3 t5))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v u0 u2))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i0) v t3 t5)))) (or4 (eq T (THead k u0 t2) -t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: -T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u0 t2) t4) (subst0 i0 v t4 -(THead k u0 t2))) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 -t3))) (\lambda (u2: T).(subst0 i0 v u0 u2)))).(ex2_ind T (\lambda (u2: T).(eq -T t4 (THead k u2 t3))) (\lambda (u2: T).(subst0 i0 v u0 u2)) (or4 (eq T -(THead k u0 t2) t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) -(\lambda (t: T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u0 t2) t4) (subst0 -i0 v t4 (THead k u0 t2))) (\lambda (x: T).(\lambda (H4: (eq T t4 (THead k x -t3))).(\lambda (H5: (subst0 i0 v u0 x)).(eq_ind_r T (THead k x t3) (\lambda -(t: T).(or4 (eq T (THead k u0 t2) t) (ex2 T (\lambda (t5: T).(subst0 i0 v -(THead k u0 t2) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v -(THead k u0 t2) t) (subst0 i0 v t (THead k u0 t2)))) (or4_ind (eq T t2 t2) -(ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) (\lambda (t: T).(subst0 (s k -i0) v t2 t))) (subst0 (s k i0) v t2 t2) (subst0 (s k i0) v t2 t2) (or4 (eq T -(THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v -(THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2))) -(\lambda (_: (eq T t2 t2)).(or4_intro1 (eq T (THead k u0 t2) (THead k x t3)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v (THead k u0 t2) (THead k x -t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2)) (ex_intro2 T (\lambda (t: -T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x -t3) t)) (THead k x t2) (subst0_fst v x u0 i0 H5 t2 k) (subst0_snd k v t2 t3 -i0 H0 x)))) (\lambda (H6: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) -(\lambda (t: T).(subst0 (s k i0) v t2 t)))).(ex2_ind T (\lambda (t: -T).(subst0 (s k i0) v t2 t)) (\lambda (t: T).(subst0 (s k i0) v t2 t)) (or4 -(eq T (THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: T).(subst0 i0 v -(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t))) (subst0 -i0 v (THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x t3) (THead k u0 -t2))) (\lambda (x0: T).(\lambda (_: (subst0 (s k i0) v t2 x0)).(\lambda (_: -(subst0 (s k i0) v t2 x0)).(or4_intro1 (eq T (THead k u0 t2) (THead k x t3)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v (THead k u0 t2) (THead k x -t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2)) (ex_intro2 T (\lambda (t: -T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x -t3) t)) (THead k x t2) (subst0_fst v x u0 i0 H5 t2 k) (subst0_snd k v t2 t3 -i0 H0 x)))))) H6)) (\lambda (_: (subst0 (s k i0) v t2 t2)).(or4_intro1 (eq T -(THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v -(THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2)) -(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t3) t)) (THead k x t2) (subst0_fst v x u0 i0 H5 t2 -k) (subst0_snd k v t2 t3 i0 H0 x)))) (\lambda (_: (subst0 (s k i0) v t2 -t2)).(or4_intro1 (eq T (THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x -t3) t))) (subst0 i0 v (THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x -t3) (THead k u0 t2)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u0 -t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t)) (THead k x t2) -(subst0_fst v x u0 i0 H5 t2 k) (subst0_snd k v t2 t3 i0 H0 x)))) (H1 t2 H0)) -t4 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u0 -t5))) (\lambda (t5: T).(subst0 (s k i0) v t3 t5)))).(ex2_ind T (\lambda (t5: -T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i0) v t3 t5)) -(or4 (eq T (THead k u0 t2) t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u0 t2) t)) (\lambda (t: T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u0 t2) -t4) (subst0 i0 v t4 (THead k u0 t2))) (\lambda (x: T).(\lambda (H4: (eq T t4 -(THead k u0 x))).(\lambda (H5: (subst0 (s k i0) v t3 x)).(eq_ind_r T (THead k -u0 x) (\lambda (t: T).(or4 (eq T (THead k u0 t2) t) (ex2 T (\lambda (t5: -T).(subst0 i0 v (THead k u0 t2) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) -(subst0 i0 v (THead k u0 t2) t) (subst0 i0 v t (THead k u0 t2)))) (or4_ind -(eq T t2 x) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) (\lambda (t: -T).(subst0 (s k i0) v x t))) (subst0 (s k i0) v t2 x) (subst0 (s k i0) v x -t2) (or4 (eq T (THead k u0 t2) (THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 -i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) -(subst0 i0 v (THead k u0 t2) (THead k u0 x)) (subst0 i0 v (THead k u0 x) -(THead k u0 t2))) (\lambda (H6: (eq T t2 x)).(eq_ind_r T x (\lambda (t: -T).(or4 (eq T (THead k u0 t) (THead k u0 x)) (ex2 T (\lambda (t5: T).(subst0 -i0 v (THead k u0 t) t5)) (\lambda (t5: T).(subst0 i0 v (THead k u0 x) t5))) -(subst0 i0 v (THead k u0 t) (THead k u0 x)) (subst0 i0 v (THead k u0 x) -(THead k u0 t)))) (or4_intro0 (eq T (THead k u0 x) (THead k u0 x)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u0 x) t)) (\lambda (t: T).(subst0 i0 v -(THead k u0 x) t))) (subst0 i0 v (THead k u0 x) (THead k u0 x)) (subst0 i0 v -(THead k u0 x) (THead k u0 x)) (refl_equal T (THead k u0 x))) t2 H6)) -(\lambda (H6: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) (\lambda (t: -T).(subst0 (s k i0) v x t)))).(ex2_ind T (\lambda (t: T).(subst0 (s k i0) v -t2 t)) (\lambda (t: T).(subst0 (s k i0) v x t)) (or4 (eq T (THead k u0 t2) -(THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) -(\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) (subst0 i0 v (THead k u0 t2) -(THead k u0 x)) (subst0 i0 v (THead k u0 x) (THead k u0 t2))) (\lambda (x0: -T).(\lambda (H7: (subst0 (s k i0) v t2 x0)).(\lambda (H8: (subst0 (s k i0) v -x x0)).(or4_intro1 (eq T (THead k u0 t2) (THead k u0 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k u0 -x) t))) (subst0 i0 v (THead k u0 t2) (THead k u0 x)) (subst0 i0 v (THead k u0 -x) (THead k u0 t2)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) -t)) (\lambda (t: T).(subst0 i0 v (THead k u0 x) t)) (THead k u0 x0) -(subst0_snd k v x0 t2 i0 H7 u0) (subst0_snd k v x0 x i0 H8 u0)))))) H6)) -(\lambda (H6: (subst0 (s k i0) v t2 x)).(or4_intro2 (eq T (THead k u0 t2) -(THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) -(\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) (subst0 i0 v (THead k u0 t2) -(THead k u0 x)) (subst0 i0 v (THead k u0 x) (THead k u0 t2)) (subst0_snd k v -x t2 i0 H6 u0))) (\lambda (H6: (subst0 (s k i0) v x t2)).(or4_intro3 (eq T -(THead k u0 t2) (THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) (subst0 i0 v -(THead k u0 t2) (THead k u0 x)) (subst0 i0 v (THead k u0 x) (THead k u0 t2)) -(subst0_snd k v t2 x i0 H6 u0))) (H1 x H5)) t4 H4)))) H3)) (\lambda (H3: -(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v u0 u2))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i0) v t3 t5))))).(ex3_2_ind T T (\lambda -(u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i0 v u0 u2))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s k i0) v t3 t5))) (or4 (eq T (THead k u0 t2) t4) (ex2 T (\lambda -(t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v t4 t))) -(subst0 i0 v (THead k u0 t2) t4) (subst0 i0 v t4 (THead k u0 t2))) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t4 (THead k x0 x1))).(\lambda -(H5: (subst0 i0 v u0 x0)).(\lambda (H6: (subst0 (s k i0) v t3 x1)).(eq_ind_r -T (THead k x0 x1) (\lambda (t: T).(or4 (eq T (THead k u0 t2) t) (ex2 T -(\lambda (t5: T).(subst0 i0 v (THead k u0 t2) t5)) (\lambda (t5: T).(subst0 -i0 v t t5))) (subst0 i0 v (THead k u0 t2) t) (subst0 i0 v t (THead k u0 -t2)))) (or4_ind (eq T t2 x1) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) -(\lambda (t: T).(subst0 (s k i0) v x1 t))) (subst0 (s k i0) v t2 x1) (subst0 -(s k i0) v x1 t2) (or4 (eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T (\lambda -(t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k -x0 x1) t))) (subst0 i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 v (THead -k x0 x1) (THead k u0 t2))) (\lambda (H7: (eq T t2 x1)).(eq_ind_r T x1 -(\lambda (t: T).(or4 (eq T (THead k u0 t) (THead k x0 x1)) (ex2 T (\lambda -(t5: T).(subst0 i0 v (THead k u0 t) t5)) (\lambda (t5: T).(subst0 i0 v (THead -k x0 x1) t5))) (subst0 i0 v (THead k u0 t) (THead k x0 x1)) (subst0 i0 v -(THead k x0 x1) (THead k u0 t)))) (or4_intro2 (eq T (THead k u0 x1) (THead k -x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 x1) t)) (\lambda (t: -T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u0 x1) (THead k x0 -x1)) (subst0 i0 v (THead k x0 x1) (THead k u0 x1)) (subst0_fst v x0 u0 i0 H5 -x1 k)) t2 H7)) (\lambda (H7: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) -(\lambda (t: T).(subst0 (s k i0) v x1 t)))).(ex2_ind T (\lambda (t: -T).(subst0 (s k i0) v t2 t)) (\lambda (t: T).(subst0 (s k i0) v x1 t)) (or4 -(eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v -(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 -i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k -u0 t2))) (\lambda (x: T).(\lambda (H8: (subst0 (s k i0) v t2 x)).(\lambda -(H9: (subst0 (s k i0) v x1 x)).(or4_intro1 (eq T (THead k u0 t2) (THead k x0 -x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: -T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u0 t2) (THead k x0 -x1)) (subst0 i0 v (THead k x0 x1) (THead k u0 t2)) (ex_intro2 T (\lambda (t: -T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t)) (THead k x0 x) (subst0_both v u0 x0 i0 H5 k t2 x H8) (subst0_snd k v -x x1 i0 H9 x0)))))) H7)) (\lambda (H7: (subst0 (s k i0) v t2 x1)).(or4_intro2 -(eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v -(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 -i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k -u0 t2)) (subst0_both v u0 x0 i0 H5 k t2 x1 H7))) (\lambda (H7: (subst0 (s k -i0) v x1 t2)).(or4_intro1 (eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v -(THead k x0 x1) t))) (subst0 i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 -v (THead k x0 x1) (THead k u0 t2)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v -(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k -x0 t2) (subst0_fst v x0 u0 i0 H5 t2 k) (subst0_snd k v t2 x1 i0 H7 x0)))) (H1 -x1 H6)) t4 H4)))))) H3)) (subst0_gen_head k v u0 t3 t4 i0 H2)))))))))))) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda -(H0: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (t2: T).((subst0 i0 v u1 -t2) \to (or4 (eq T u2 t2) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda -(t: T).(subst0 i0 v t2 t))) (subst0 i0 v u2 t2) (subst0 i0 v t2 -u2)))))).(\lambda (k: K).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: -(subst0 (s k i0) v t2 t3)).(\lambda (H3: ((\forall (t4: T).((subst0 (s k i0) -v t2 t4) \to (or4 (eq T t3 t4) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 -t)) (\lambda (t: T).(subst0 (s k i0) v t4 t))) (subst0 (s k i0) v t3 t4) -(subst0 (s k i0) v t4 t3)))))).(\lambda (t4: T).(\lambda (H4: (subst0 i0 v -(THead k u1 t2) t4)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 -t2))) (\lambda (u3: T).(subst0 i0 v u1 u3))) (ex2 T (\lambda (t5: T).(eq T t4 -(THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i0) v t2 t5))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: T).(\lambda (t5: -T).(subst0 (s k i0) v t2 t5)))) (or4 (eq T (THead k u2 t3) t4) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 i0 v t4 (THead k u2 t3))) -(\lambda (H5: (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t2))) (\lambda -(u3: T).(subst0 i0 v u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 (THead k -u3 t2))) (\lambda (u3: T).(subst0 i0 v u1 u3)) (or4 (eq T (THead k u2 t3) t4) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 i0 v t4 -(THead k u2 t3))) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k x -t2))).(\lambda (H7: (subst0 i0 v u1 x)).(eq_ind_r T (THead k x t2) (\lambda -(t: T).(or4 (eq T (THead k u2 t3) t) (ex2 T (\lambda (t5: T).(subst0 i0 v -(THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v -(THead k u2 t3) t) (subst0 i0 v t (THead k u2 t3)))) (or4_ind (eq T t3 t3) -(ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k -i0) v t3 t))) (subst0 (s k i0) v t3 t3) (subst0 (s k i0) v t3 t3) (or4 (eq T -(THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v -(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) -(\lambda (_: (eq T t3 t3)).(or4_ind (eq T u2 x) (ex2 T (\lambda (t: -T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x t))) (subst0 i0 v u2 x) -(subst0 i0 v x u2) (or4 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda -(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k -x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k -x t2) (THead k u2 t3))) (\lambda (H9: (eq T u2 x)).(eq_ind_r T x (\lambda (t: -T).(or4 (eq T (THead k t t3) (THead k x t2)) (ex2 T (\lambda (t5: T).(subst0 -i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x t2) t5))) -(subst0 i0 v (THead k t t3) (THead k x t2)) (subst0 i0 v (THead k x t2) -(THead k t t3)))) (or4_intro3 (eq T (THead k x t3) (THead k x t2)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k x t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x t2) t))) (subst0 i0 v (THead k x t3) (THead k x t2)) (subst0 i0 v -(THead k x t2) (THead k x t3)) (subst0_snd k v t3 t2 i0 H2 x)) u2 H9)) -(\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v x t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) -(\lambda (t: T).(subst0 i0 v x t)) (or4 (eq T (THead k u2 t3) (THead k x t2)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x -t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (x0: T).(\lambda -(H10: (subst0 i0 v u2 x0)).(\lambda (H11: (subst0 i0 v x x0)).(or4_intro1 (eq -T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead -k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v -(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) -(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t2) t)) (THead k x0 t3) (subst0_fst v x0 u2 i0 H10 -t3 k) (subst0_both v x x0 i0 H11 k t2 t3 H2)))))) H9)) (\lambda (H9: (subst0 -i0 v u2 x)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda -(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k -x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k -x t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 -t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k x t3) -(subst0_fst v x u2 i0 H9 t3 k) (subst0_snd k v t3 t2 i0 H2 x)))) (\lambda -(H9: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k x t2)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x -t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (subst0_both v x u2 i0 H9 k -t2 t3 H2))) (H1 x H7))) (\lambda (H8: (ex2 T (\lambda (t: T).(subst0 (s k i0) -v t3 t)) (\lambda (t: T).(subst0 (s k i0) v t3 t)))).(ex2_ind T (\lambda (t: -T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k i0) v t3 t)) (or4 -(eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 -i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 -t3))) (\lambda (x0: T).(\lambda (_: (subst0 (s k i0) v t3 x0)).(\lambda (_: -(subst0 (s k i0) v t3 x0)).(or4_ind (eq T u2 x) (ex2 T (\lambda (t: -T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x t))) (subst0 i0 v u2 x) -(subst0 i0 v x u2) (or4 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda -(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k -x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k -x t2) (THead k u2 t3))) (\lambda (H11: (eq T u2 x)).(eq_ind_r T x (\lambda -(t: T).(or4 (eq T (THead k t t3) (THead k x t2)) (ex2 T (\lambda (t5: -T).(subst0 i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x -t2) t5))) (subst0 i0 v (THead k t t3) (THead k x t2)) (subst0 i0 v (THead k x -t2) (THead k t t3)))) (or4_intro3 (eq T (THead k x t3) (THead k x t2)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k x t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x t2) t))) (subst0 i0 v (THead k x t3) (THead k x t2)) (subst0 i0 v -(THead k x t2) (THead k x t3)) (subst0_snd k v t3 t2 i0 H2 x)) u2 H11)) -(\lambda (H11: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v x t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) -(\lambda (t: T).(subst0 i0 v x t)) (or4 (eq T (THead k u2 t3) (THead k x t2)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x -t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (x1: T).(\lambda -(H12: (subst0 i0 v u2 x1)).(\lambda (H13: (subst0 i0 v x x1)).(or4_intro1 (eq -T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead -k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v -(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) -(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t2) t)) (THead k x1 t3) (subst0_fst v x1 u2 i0 H12 -t3 k) (subst0_both v x x1 i0 H13 k t2 t3 H2)))))) H11)) (\lambda (H11: -(subst0 i0 v u2 x)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v -(THead k x t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k -x t3) (subst0_fst v x u2 i0 H11 t3 k) (subst0_snd k v t3 t2 i0 H2 x)))) -(\lambda (H11: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k -x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x -t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (subst0_both v x u2 i0 H11 -k t2 t3 H2))) (H1 x H7))))) H8)) (\lambda (_: (subst0 (s k i0) v t3 -t3)).(or4_ind (eq T u2 x) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda -(t: T).(subst0 i0 v x t))) (subst0 i0 v u2 x) (subst0 i0 v x u2) (or4 (eq T -(THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v -(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) -(\lambda (H9: (eq T u2 x)).(eq_ind_r T x (\lambda (t: T).(or4 (eq T (THead k -t t3) (THead k x t2)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k t t3) -t5)) (\lambda (t5: T).(subst0 i0 v (THead k x t2) t5))) (subst0 i0 v (THead k -t t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k t t3)))) -(or4_intro3 (eq T (THead k x t3) (THead k x t2)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k x t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x -t2) t))) (subst0 i0 v (THead k x t3) (THead k x t2)) (subst0 i0 v (THead k x -t2) (THead k x t3)) (subst0_snd k v t3 t2 i0 H2 x)) u2 H9)) (\lambda (H9: -(ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x -t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 -i0 v x t)) (or4 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x -t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x -t2) (THead k u2 t3))) (\lambda (x0: T).(\lambda (H10: (subst0 i0 v u2 -x0)).(\lambda (H11: (subst0 i0 v x x0)).(or4_intro1 (eq T (THead k u2 t3) -(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) -(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (ex_intro2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x t2) t)) (THead k x0 t3) (subst0_fst v x0 u2 i0 H10 t3 k) -(subst0_both v x x0 i0 H11 k t2 t3 H2)))))) H9)) (\lambda (H9: (subst0 i0 v -u2 x)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x -t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x -t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 -t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k x t3) -(subst0_fst v x u2 i0 H9 t3 k) (subst0_snd k v t3 t2 i0 H2 x)))) (\lambda -(H9: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k x t2)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x -t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (subst0_both v x u2 i0 H9 k -t2 t3 H2))) (H1 x H7))) (\lambda (_: (subst0 (s k i0) v t3 t3)).(or4_ind (eq -T u2 x) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 -v x t))) (subst0 i0 v u2 x) (subst0 i0 v x u2) (or4 (eq T (THead k u2 t3) -(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) -(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (H9: -(eq T u2 x)).(eq_ind_r T x (\lambda (t: T).(or4 (eq T (THead k t t3) (THead k -x t2)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k t t3) t5)) (\lambda (t5: -T).(subst0 i0 v (THead k x t2) t5))) (subst0 i0 v (THead k t t3) (THead k x -t2)) (subst0 i0 v (THead k x t2) (THead k t t3)))) (or4_intro3 (eq T (THead k -x t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k x t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k x t3) -(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k x t3)) (subst0_snd k v -t3 t2 i0 H2 x)) u2 H9)) (\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 -t)) (\lambda (t: T).(subst0 i0 v x t)))).(ex2_ind T (\lambda (t: T).(subst0 -i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x t)) (or4 (eq T (THead k u2 t3) -(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) -(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (x0: -T).(\lambda (H10: (subst0 i0 v u2 x0)).(\lambda (H11: (subst0 i0 v x -x0)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x -t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x -t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 -t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k x0 t3) -(subst0_fst v x0 u2 i0 H10 t3 k) (subst0_both v x x0 i0 H11 k t2 t3 H2)))))) -H9)) (\lambda (H9: (subst0 i0 v u2 x)).(or4_intro1 (eq T (THead k u2 t3) -(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) -(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (ex_intro2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x t2) t)) (THead k x t3) (subst0_fst v x u2 i0 H9 t3 k) (subst0_snd -k v t3 t2 i0 H2 x)))) (\lambda (H9: (subst0 i0 v x u2)).(or4_intro3 (eq T -(THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v -(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) -(subst0_both v x u2 i0 H9 k t2 t3 H2))) (H1 x H7))) (H3 t3 H2)) t4 H6)))) -H5)) (\lambda (H5: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u1 t5))) -(\lambda (t5: T).(subst0 (s k i0) v t2 t5)))).(ex2_ind T (\lambda (t5: T).(eq -T t4 (THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i0) v t2 t5)) (or4 (eq T -(THead k u2 t3) t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 -i0 v t4 (THead k u2 t3))) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k u1 -x))).(\lambda (H7: (subst0 (s k i0) v t2 x)).(eq_ind_r T (THead k u1 x) -(\lambda (t: T).(or4 (eq T (THead k u2 t3) t) (ex2 T (\lambda (t5: T).(subst0 -i0 v (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v -(THead k u2 t3) t) (subst0 i0 v t (THead k u2 t3)))) (or4_ind (eq T t3 x) -(ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k -i0) v x t))) (subst0 (s k i0) v t3 x) (subst0 (s k i0) v x t3) (or4 (eq T -(THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v -(THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) -(\lambda (H8: (eq T t3 x)).(eq_ind_r T x (\lambda (t: T).(or4 (eq T (THead k -u2 t) (THead k u1 x)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k u2 t) -t5)) (\lambda (t5: T).(subst0 i0 v (THead k u1 x) t5))) (subst0 i0 v (THead k -u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)))) (or4_ind -(eq T u2 u2) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v u2 t))) (subst0 i0 v u2 u2) (subst0 i0 v u2 u2) (or4 (eq T -(THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v -(THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 x))) -(\lambda (_: (eq T u2 u2)).(or4_intro3 (eq T (THead k u2 x) (THead k u1 x)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: -T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 -x)) (subst0 i0 v (THead k u1 x) (THead k u2 x)) (subst0_fst v u2 u1 i0 H0 x -k))) (\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v u2 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) -(\lambda (t: T).(subst0 i0 v u2 t)) (or4 (eq T (THead k u2 x) (THead k u1 x)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: -T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 -x)) (subst0 i0 v (THead k u1 x) (THead k u2 x))) (\lambda (x0: T).(\lambda -(_: (subst0 i0 v u2 x0)).(\lambda (_: (subst0 i0 v u2 x0)).(or4_intro3 (eq T -(THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v -(THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 x)) -(subst0_fst v u2 u1 i0 H0 x k))))) H9)) (\lambda (_: (subst0 i0 v u2 -u2)).(or4_intro3 (eq T (THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 -x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 x)) (subst0_fst v u2 u1 i0 H0 x k))) (\lambda (_: (subst0 i0 v -u2 u2)).(or4_intro3 (eq T (THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 -x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 x)) (subst0_fst v u2 u1 i0 H0 x k))) (H1 u2 H0)) t3 H8)) -(\lambda (H8: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 t)) (\lambda (t: -T).(subst0 (s k i0) v x t)))).(ex2_ind T (\lambda (t: T).(subst0 (s k i0) v -t3 t)) (\lambda (t: T).(subst0 (s k i0) v x t)) (or4 (eq T (THead k u2 t3) -(THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) -(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (x0: -T).(\lambda (H9: (subst0 (s k i0) v t3 x0)).(\lambda (H10: (subst0 (s k i0) v -x x0)).(or4_ind (eq T u2 u2) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) -(\lambda (t: T).(subst0 i0 v u2 t))) (subst0 i0 v u2 u2) (subst0 i0 v u2 u2) -(or4 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 -v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) -(subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) -(THead k u2 t3))) (\lambda (_: (eq T u2 u2)).(or4_intro1 (eq T (THead k u2 -t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) -(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) (ex_intro2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k u1 x) t)) (THead k u2 x0) (subst0_snd k v x0 t3 i0 H9 u2) -(subst0_both v u1 u2 i0 H0 k x x0 H10)))) (\lambda (H11: (ex2 T (\lambda (t: -T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 t)))).(ex2_ind T -(\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 t)) (or4 -(eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 -i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 -t3))) (\lambda (x1: T).(\lambda (_: (subst0 i0 v u2 x1)).(\lambda (_: (subst0 -i0 v u2 x1)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v -(THead k u1 x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k -u2 x0) (subst0_snd k v x0 t3 i0 H9 u2) (subst0_both v u1 u2 i0 H0 k x x0 -H10)))))) H11)) (\lambda (_: (subst0 i0 v u2 u2)).(or4_intro1 (eq T (THead k -u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) -t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 -t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) (ex_intro2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k u1 x) t)) (THead k u2 x0) (subst0_snd k v x0 t3 i0 H9 u2) -(subst0_both v u1 u2 i0 H0 k x x0 H10)))) (\lambda (_: (subst0 i0 v u2 -u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 -x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) -t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k u2 x0) -(subst0_snd k v x0 t3 i0 H9 u2) (subst0_both v u1 u2 i0 H0 k x x0 H10)))) (H1 -u2 H0))))) H8)) (\lambda (H8: (subst0 (s k i0) v t3 x)).(or4_ind (eq T u2 u2) -(ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 -t))) (subst0 i0 v u2 u2) (subst0 i0 v u2 u2) (or4 (eq T (THead k u2 t3) -(THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) -(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (_: -(eq T u2 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v -(THead k u1 x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k -u2 x) (subst0_snd k v x t3 i0 H8 u2) (subst0_fst v u2 u1 i0 H0 x k)))) -(\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v u2 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) -(\lambda (t: T).(subst0 i0 v u2 t)) (or4 (eq T (THead k u2 t3) (THead k u1 -x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 -x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (x0: T).(\lambda -(_: (subst0 i0 v u2 x0)).(\lambda (_: (subst0 i0 v u2 x0)).(or4_intro1 (eq T -(THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v -(THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) -(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k u1 x) t)) (THead k u2 x) (subst0_snd k v x t3 i0 H8 -u2) (subst0_fst v u2 u1 i0 H0 x k)))))) H9)) (\lambda (_: (subst0 i0 v u2 -u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 -x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) -t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k u2 x) -(subst0_snd k v x t3 i0 H8 u2) (subst0_fst v u2 u1 i0 H0 x k)))) (\lambda (_: -(subst0 i0 v u2 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v -(THead k u1 x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k -u2 x) (subst0_snd k v x t3 i0 H8 u2) (subst0_fst v u2 u1 i0 H0 x k)))) (H1 u2 -H0))) (\lambda (H8: (subst0 (s k i0) v x t3)).(or4_ind (eq T u2 u2) (ex2 T -(\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 t))) -(subst0 i0 v u2 u2) (subst0 i0 v u2 u2) (or4 (eq T (THead k u2 t3) (THead k -u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 -x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (_: (eq T u2 -u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 -x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 t3)) (subst0_both v u1 u2 i0 H0 k x t3 H8))) (\lambda (H9: -(ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 -t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 -i0 v u2 t)) (or4 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 -x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 t3))) (\lambda (x0: T).(\lambda (_: (subst0 i0 v u2 -x0)).(\lambda (_: (subst0 i0 v u2 x0)).(or4_intro3 (eq T (THead k u2 t3) -(THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) -(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) (subst0_both v -u1 u2 i0 H0 k x t3 H8))))) H9)) (\lambda (_: (subst0 i0 v u2 u2)).(or4_intro3 -(eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 -i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 -t3)) (subst0_both v u1 u2 i0 H0 k x t3 H8))) (\lambda (_: (subst0 i0 v u2 -u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 -x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 -x) (THead k u2 t3)) (subst0_both v u1 u2 i0 H0 k x t3 H8))) (H1 u2 H0))) (H3 -x H7)) t4 H6)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: -T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v -u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v t2 -t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 -t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: -T).(\lambda (t5: T).(subst0 (s k i0) v t2 t5))) (or4 (eq T (THead k u2 t3) -t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 i0 v t4 -(THead k u2 t3))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t4 -(THead k x0 x1))).(\lambda (H7: (subst0 i0 v u1 x0)).(\lambda (H8: (subst0 (s -k i0) v t2 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(or4 (eq T (THead -k u2 t3) t) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k u2 t3) t5)) -(\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v (THead k u2 t3) t) (subst0 -i0 v t (THead k u2 t3)))) (or4_ind (eq T t3 x1) (ex2 T (\lambda (t: -T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k i0) v x1 t))) -(subst0 (s k i0) v t3 x1) (subst0 (s k i0) v x1 t3) (or4 (eq T (THead k u2 -t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 -t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda -(H9: (eq T t3 x1)).(eq_ind_r T x1 (\lambda (t: T).(or4 (eq T (THead k u2 t) -(THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k u2 t) t5)) -(\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) (subst0 i0 v (THead k u2 -t) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t)))) (or4_ind -(eq T u2 x0) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v x0 t))) (subst0 i0 v u2 x0) (subst0 i0 v x0 u2) (or4 (eq T -(THead k u2 x1) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 x1) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v -(THead k u2 x1) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 -x1))) (\lambda (H10: (eq T u2 x0)).(eq_ind_r T x0 (\lambda (t: T).(or4 (eq T -(THead k t x1) (THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k -t x1) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) (subst0 i0 v -(THead k t x1) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k t -x1)))) (or4_intro0 (eq T (THead k x0 x1) (THead k x0 x1)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k x0 x1) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t))) (subst0 i0 v (THead k x0 x1) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k x0 x1)) (refl_equal T (THead k x0 x1))) u2 H10)) (\lambda -(H10: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v -x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 x1) (THead k x0 x1)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 v -(THead k x0 x1) t))) (subst0 i0 v (THead k u2 x1) (THead k x0 x1)) (subst0 i0 -v (THead k x0 x1) (THead k u2 x1))) (\lambda (x: T).(\lambda (H11: (subst0 i0 -v u2 x)).(\lambda (H12: (subst0 i0 v x0 x)).(or4_intro1 (eq T (THead k u2 x1) -(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) -(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 -x1) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 x1)) (ex_intro2 -T (\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 -v (THead k x0 x1) t)) (THead k x x1) (subst0_fst v x u2 i0 H11 x1 k) -(subst0_fst v x x0 i0 H12 x1 k)))))) H10)) (\lambda (H10: (subst0 i0 v u2 -x0)).(or4_intro2 (eq T (THead k u2 x1) (THead k x0 x1)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t))) (subst0 i0 v (THead k u2 x1) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k u2 x1)) (subst0_fst v x0 u2 i0 H10 x1 k))) (\lambda (H10: -(subst0 i0 v x0 u2)).(or4_intro3 (eq T (THead k u2 x1) (THead k x0 x1)) (ex2 -T (\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 -v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 x1) (THead k x0 x1)) (subst0 -i0 v (THead k x0 x1) (THead k u2 x1)) (subst0_fst v u2 x0 i0 H10 x1 k))) (H1 -x0 H7)) t3 H9)) (\lambda (H9: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 -t)) (\lambda (t: T).(subst0 (s k i0) v x1 t)))).(ex2_ind T (\lambda (t: -T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k i0) v x1 t)) (or4 -(eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v -(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 -i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k -u2 t3))) (\lambda (x: T).(\lambda (H10: (subst0 (s k i0) v t3 x)).(\lambda -(H11: (subst0 (s k i0) v x1 x)).(or4_ind (eq T u2 x0) (ex2 T (\lambda (t: -T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x0 t))) (subst0 i0 v u2 -x0) (subst0 i0 v x0 u2) (or4 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 -v (THead k x0 x1) (THead k u2 t3))) (\lambda (H12: (eq T u2 x0)).(eq_ind_r T -x0 (\lambda (t: T).(or4 (eq T (THead k t t3) (THead k x0 x1)) (ex2 T (\lambda -(t5: T).(subst0 i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead -k x0 x1) t5))) (subst0 i0 v (THead k t t3) (THead k x0 x1)) (subst0 i0 v -(THead k x0 x1) (THead k t t3)))) (or4_intro1 (eq T (THead k x0 t3) (THead k -x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k x0 t3) (THead k x0 -x1)) (subst0 i0 v (THead k x0 x1) (THead k x0 t3)) (ex_intro2 T (\lambda (t: -T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t)) (THead k x0 x) (subst0_snd k v x t3 i0 H10 x0) (subst0_snd k v x x1 -i0 H11 x0))) u2 H12)) (\lambda (H12: (ex2 T (\lambda (t: T).(subst0 i0 v u2 -t)) (\lambda (t: T).(subst0 i0 v x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 -i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 t3) -(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 -t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda -(x2: T).(\lambda (H13: (subst0 i0 v u2 x2)).(\lambda (H14: (subst0 i0 v x0 -x2)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 -t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k x2 x) -(subst0_both v u2 x2 i0 H13 k t3 x H10) (subst0_both v x0 x2 i0 H14 k x1 x -H11)))))) H12)) (\lambda (H12: (subst0 i0 v u2 x0)).(or4_intro1 (eq T (THead -k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) -t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k -u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) -(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x0 x1) t)) (THead k x0 x) (subst0_both v u2 x0 i0 -H12 k t3 x H10) (subst0_snd k v x x1 i0 H11 x0)))) (\lambda (H12: (subst0 i0 -v x0 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda -(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k -x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead -k x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k -u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k u2 x) -(subst0_snd k v x t3 i0 H10 u2) (subst0_both v x0 u2 i0 H12 k x1 x H11)))) -(H1 x0 H7))))) H9)) (\lambda (H9: (subst0 (s k i0) v t3 x1)).(or4_ind (eq T -u2 x0) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 -v x0 t))) (subst0 i0 v u2 x0) (subst0 i0 v x0 u2) (or4 (eq T (THead k u2 t3) -(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 -t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda -(H10: (eq T u2 x0)).(eq_ind_r T x0 (\lambda (t: T).(or4 (eq T (THead k t t3) -(THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k t t3) t5)) -(\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) (subst0 i0 v (THead k t -t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k t t3)))) -(or4_intro2 (eq T (THead k x0 t3) (THead k x0 x1)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t))) (subst0 i0 v (THead k x0 t3) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k x0 t3)) (subst0_snd k v x1 t3 i0 H9 x0)) u2 H10)) (\lambda -(H10: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v -x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 -v (THead k x0 x1) (THead k u2 t3))) (\lambda (x: T).(\lambda (H11: (subst0 i0 -v u2 x)).(\lambda (H12: (subst0 i0 v x0 x)).(or4_intro1 (eq T (THead k u2 t3) -(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) -(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 -t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) (ex_intro2 -T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 -v (THead k x0 x1) t)) (THead k x x1) (subst0_both v u2 x i0 H11 k t3 x1 H9) -(subst0_fst v x x0 i0 H12 x1 k)))))) H10)) (\lambda (H10: (subst0 i0 v u2 -x0)).(or4_intro2 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k -x0 x1) (THead k u2 t3)) (subst0_both v u2 x0 i0 H10 k t3 x1 H9))) (\lambda -(H10: (subst0 i0 v x0 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) -(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 -x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: -T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 -x1) t)) (THead k u2 x1) (subst0_snd k v x1 t3 i0 H9 u2) (subst0_fst v u2 x0 -i0 H10 x1 k)))) (H1 x0 H7))) (\lambda (H9: (subst0 (s k i0) v x1 -t3)).(or4_ind (eq T u2 x0) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) -(\lambda (t: T).(subst0 i0 v x0 t))) (subst0 i0 v u2 x0) (subst0 i0 v x0 u2) -(or4 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 -v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) -(subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) -(THead k u2 t3))) (\lambda (H10: (eq T u2 x0)).(eq_ind_r T x0 (\lambda (t: -T).(or4 (eq T (THead k t t3) (THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 -i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) -(subst0 i0 v (THead k t t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) -(THead k t t3)))) (or4_intro3 (eq T (THead k x0 t3) (THead k x0 x1)) (ex2 T -(\lambda (t: T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: T).(subst0 i0 v -(THead k x0 x1) t))) (subst0 i0 v (THead k x0 t3) (THead k x0 x1)) (subst0 i0 -v (THead k x0 x1) (THead k x0 t3)) (subst0_snd k v t3 x1 i0 H9 x0)) u2 H10)) -(\lambda (H10: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: -T).(subst0 i0 v x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) -(\lambda (t: T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 t3) (THead k x0 -x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: -T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 -x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda (x: T).(\lambda -(H11: (subst0 i0 v u2 x)).(\lambda (H12: (subst0 i0 v x0 x)).(or4_intro1 (eq -T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead -k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v -(THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 -t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda -(t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k x t3) (subst0_fst v x u2 i0 -H11 t3 k) (subst0_both v x0 x i0 H12 k x1 t3 H9)))))) H10)) (\lambda (H10: -(subst0 i0 v u2 x0)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 -T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 -v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 -i0 v (THead k x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 -v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead -k x0 t3) (subst0_fst v x0 u2 i0 H10 t3 k) (subst0_snd k v t3 x1 i0 H9 x0)))) -(\lambda (H10: (subst0 i0 v x0 u2)).(or4_intro3 (eq T (THead k u2 t3) (THead -k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda -(t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead -k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) (subst0_both v x0 u2 -i0 H10 k x1 t3 H9))) (H1 x0 H7))) (H3 x1 H8)) t4 H6)))))) H5)) -(subst0_gen_head k v u1 t2 t4 i0 H4))))))))))))))) i u t0 t1 H))))). - -theorem subst0_confluence_lift: - \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst0 -i u t0 (lift (S O) i t1)) \to (\forall (t2: T).((subst0 i u t0 (lift (S O) i -t2)) \to (eq T t1 t2))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u t0 (lift (S O) i t1))).(\lambda (t2: T).(\lambda (H0: (subst0 -i u t0 (lift (S O) i t2))).(or4_ind (eq T (lift (S O) i t2) (lift (S O) i -t1)) (ex2 T (\lambda (t: T).(subst0 i u (lift (S O) i t2) t)) (\lambda (t: -T).(subst0 i u (lift (S O) i t1) t))) (subst0 i u (lift (S O) i t2) (lift (S -O) i t1)) (subst0 i u (lift (S O) i t1) (lift (S O) i t2)) (eq T t1 t2) -(\lambda (H1: (eq T (lift (S O) i t2) (lift (S O) i t1))).(let H2 \def -(sym_eq T (lift (S O) i t2) (lift (S O) i t1) H1) in (lift_inj t1 t2 (S O) i -H2))) (\lambda (H1: (ex2 T (\lambda (t: T).(subst0 i u (lift (S O) i t2) t)) -(\lambda (t: T).(subst0 i u (lift (S O) i t1) t)))).(ex2_ind T (\lambda (t: -T).(subst0 i u (lift (S O) i t2) t)) (\lambda (t: T).(subst0 i u (lift (S O) -i t1) t)) (eq T t1 t2) (\lambda (x: T).(\lambda (_: (subst0 i u (lift (S O) i -t2) x)).(\lambda (H3: (subst0 i u (lift (S O) i t1) -x)).(subst0_gen_lift_false t1 u x (S O) i i (le_n i) (eq_ind_r nat (plus (S -O) i) (\lambda (n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) -(plus_sym i (S O))) H3 (eq T t1 t2))))) H1)) (\lambda (H1: (subst0 i u (lift -(S O) i t2) (lift (S O) i t1))).(subst0_gen_lift_false t2 u (lift (S O) i t1) -(S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(lt i n)) -(le_n (plus (S O) i)) (plus i (S O)) (plus_sym i (S O))) H1 (eq T t1 t2))) -(\lambda (H1: (subst0 i u (lift (S O) i t1) (lift (S O) i -t2))).(subst0_gen_lift_false t1 u (lift (S O) i t2) (S O) i i (le_n i) -(eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(lt i n)) (le_n (plus (S O) -i)) (plus i (S O)) (plus_sym i (S O))) H1 (eq T t1 t2))) -(subst0_confluence_eq t0 (lift (S O) i t2) u i H0 (lift (S O) i t1) H)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma deleted file mode 100644 index 2d32fcad4..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma +++ /dev/null @@ -1,457 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/fwd.ma". - -include "basic_1/lift/tlt.ma". - -lemma subst0_weight_le: - \forall (u: T).(\forall (t: T).(\forall (z: T).(\forall (d: nat).((subst0 d -u t z) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -d) O u)) (g d)) \to (le (weight_map f z) (weight_map g t)))))))))) -\def - \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (d: nat).(\lambda -(H: (subst0 d u t z)).(subst0_ind (\lambda (n: nat).(\lambda (t0: T).(\lambda -(t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -n) O t0)) (g n)) \to (le (weight_map f t2) (weight_map g t1)))))))))) -(\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f m) (g m))))).(\lambda -(H1: (lt (weight_map f (lift (S i) O v)) (g i))).(le_S_n (weight_map f (lift -(S i) O v)) (weight_map g (TLRef i)) (le_S_n (S (weight_map f (lift (S i) O -v))) (S (weight_map g (TLRef i))) (le_S (S (S (weight_map f (lift (S i) O -v)))) (S (weight_map g (TLRef i))) (le_n_S (S (weight_map f (lift (S i) O -v))) (weight_map g (TLRef i)) H1)))))))))) (\lambda (v: T).(\lambda (u2: -T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 -u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (le (weight_map f u2) (weight_map g u1)))))))).(\lambda -(t0: T).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead -k0 u2 t0)) (weight_map g (THead k0 u1 t0)))))))) (\lambda (b: B).(B_ind -(\lambda (b0: B).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t0)) (weight_map g -(THead (Bind b0) u1 t0)))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g -m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S -(plus (weight_map f u2) (weight_map (wadd f (S (weight_map f u2))) t0)) (plus -(weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) t0)) -(le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S -(weight_map f u2))) t0) (weight_map (wadd g (S (weight_map g u1))) t0) (H1 f -g H2 H3) (weight_le t0 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map -g u1))) (\lambda (n: nat).(wadd_le f g H2 (S (weight_map f u2)) (S -(weight_map g u1)) (le_n_S (weight_map f u2) (weight_map g u1) (H1 f g H2 -H3)) n))))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt -(weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t0)) (plus (weight_map g u1) (weight_map (wadd g O) -t0)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) -t0) (weight_map (wadd g O) t0) (H1 f g H2 H3) (weight_le t0 (wadd f O) (wadd -g O) (\lambda (n: nat).(wadd_le f g H2 O O (le_O_n O) n))))))))) (\lambda (f: -((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: -nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f O) t0)) (plus -(weight_map g u1) (weight_map (wadd g O) t0)) (le_plus_plus (weight_map f u2) -(weight_map g u1) (weight_map (wadd f O) t0) (weight_map (wadd g O) t0) (H1 f -g H2 H3) (weight_le t0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g -H2 O O (le_O_n O) n))))))))) b)) (\lambda (_: F).(\lambda (f0: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 -m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f0 u2) (weight_map f0 t0)) (plus (weight_map g -u1) (weight_map g t0)) (le_plus_plus (weight_map f0 u2) (weight_map g u1) -(weight_map f0 t0) (weight_map g t0) (H1 f0 g H2 H3) (weight_le t0 f0 g -H2)))))))) k))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (v: -T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) v t1 -t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(s k0 i)) O v)) (g (s k0 i))) \to (le (weight_map f t2) (weight_map g -t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: -((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map -f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead k0 u0 t2)) -(weight_map g (THead k0 u0 t1))))))))))))))) (\lambda (b: B).(B_ind (\lambda -(b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: -nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) -\to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: -T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: -nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to -(le (weight_map f (THead (Bind b0) u0 t2)) (weight_map g (THead (Bind b0) u0 -t1))))))))))))))) (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda -(i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le -(weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: -((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: -nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u0) (weight_map (wadd f (S (weight_map f -u0))) t2)) (plus (weight_map g u0) (weight_map (wadd g (S (weight_map g u0))) -t1)) (le_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f (S -(weight_map f u0))) t2) (weight_map (wadd g (S (weight_map g u0))) t1) -(weight_le u0 f g H2) (H1 (wadd f (S (weight_map f u0))) (wadd g (S -(weight_map g u0))) (\lambda (m: nat).(wadd_le f g H2 (S (weight_map f u0)) -(S (weight_map g u0)) (le_n_S (weight_map f u0) (weight_map g u0) (weight_le -u0 f g H2)) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: -nat).(lt n (g i))) H3 (weight_map (wadd f (S (weight_map f u0))) (lift (S (S -i)) O v)) (lift_weight_add_O (S (weight_map f u0)) v (S i) f)))))))))))))))) -(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda -(_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f -t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u0) (weight_map (wadd f O) t2)) (plus -(weight_map g u0) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map f u0) -(weight_map g u0) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) -(weight_le u0 f g H2) (H1 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f -g H2 O O (le_O_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda -(n: nat).(lt n (g i))) H3 (weight_map (wadd f O) (lift (S (S i)) O v)) -(lift_weight_add_O O v (S i) f)))))))))))))))) (\lambda (v: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 -t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g -t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: -(lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u0) -(weight_map (wadd f O) t2)) (plus (weight_map g u0) (weight_map (wadd g O) -t1)) (le_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f O) -t2) (weight_map (wadd g O) t1) (weight_le u0 f g H2) (H1 (wadd f O) (wadd g -O) (\lambda (m: nat).(wadd_le f g H2 O O (le_O_n O) m)) (eq_ind nat -(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H3 -(weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) -f)))))))))))))))) b)) (\lambda (_: F).(\lambda (v: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift -(S i) O v)) (g i)) \to (le (weight_map f0 t2) (weight_map g -t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda -(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map -f0 u0) (weight_map f0 t2)) (plus (weight_map g u0) (weight_map g t1)) -(le_plus_plus (weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) -(weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 H3))))))))))))))) k)) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda -(_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall -(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt -(weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f u2) (weight_map -g u1)))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t1: -T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (le -(weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead -k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind -(\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v -t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (le (weight_map f t2) -(weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat -\to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f -(lift (S i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t2)) -(weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda -(t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le -(weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f (S (weight_map f -u2))) t2)) (plus (weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) -t1)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S -(weight_map f u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) (H1 f -g H4 H5) (H3 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map g u1))) -(\lambda (m: nat).(wadd_le f g H4 (S (weight_map f u2)) (S (weight_map g u1)) -(le_n_S (weight_map f u2) (weight_map g u1) (H1 f g H4 H5)) m)) (eq_ind nat -(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 -(weight_map (wadd f (S (weight_map f u2))) (lift (S (S i)) O v)) -(lift_weight_add_O (S (weight_map f u2)) v (S i) f))))))))))))) (\lambda (t1: -T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: -((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: -nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S -i))) \to (le (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat -\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le -(f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f O) t2)) (plus -(weight_map g u1) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map f u2) -(weight_map g u1) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) (H1 f -g H4 H5) (H3 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f g H4 O O -(le_O_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: -nat).(lt n (g i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) -(lift_weight_add_O O v (S i) f))))))))))))) (\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f -t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: -(lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) -t1)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) -t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) -(\lambda (m: nat).(wadd_le f g H4 O O (le_O_n O) m)) (eq_ind nat (weight_map -f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) -(lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f))))))))))))) b)) -(\lambda (_: F).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H3: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift -(S i) O v)) (g i)) \to (le (weight_map f0 t2) (weight_map g -t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda (H5: -(lt (weight_map f0 (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f0 u2) -(weight_map f0 t2)) (plus (weight_map g u1) (weight_map g t1)) (le_plus_plus -(weight_map f0 u2) (weight_map g u1) (weight_map f0 t2) (weight_map g t1) (H1 -f0 g H4 H5) (H3 f0 g H4 H5)))))))))))) k)))))))) d u t z H))))). - -lemma subst0_weight_lt: - \forall (u: T).(\forall (t: T).(\forall (z: T).(\forall (d: nat).((subst0 d -u t z) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -d) O u)) (g d)) \to (lt (weight_map f z) (weight_map g t)))))))))) -\def - \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (d: nat).(\lambda -(H: (subst0 d u t z)).(subst0_ind (\lambda (n: nat).(\lambda (t0: T).(\lambda -(t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -n) O t0)) (g n)) \to (lt (weight_map f t2) (weight_map g t1)))))))))) -(\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f m) (g m))))).(\lambda -(H1: (lt (weight_map f (lift (S i) O v)) (g i))).H1)))))) (\lambda (v: -T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i -v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map g u1)))))))).(\lambda -(t0: T).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead -k0 u2 t0)) (weight_map g (THead k0 u1 t0)))))))) (\lambda (b: B).(B_ind -(\lambda (b0: B).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f (THead (Bind b0) u2 t0)) (weight_map g -(THead (Bind b0) u1 t0)))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g -m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(lt_n_S -(plus (weight_map f u2) (weight_map (wadd f (S (weight_map f u2))) t0)) (plus -(weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) t0)) -(lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S -(weight_map f u2))) t0) (weight_map (wadd g (S (weight_map g u1))) t0) (H1 f -g H2 H3) (weight_le t0 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map -g u1))) (\lambda (n: nat).(wadd_lt f g H2 (S (weight_map f u2)) (S -(weight_map g u1)) (lt_n_S (weight_map f u2) (weight_map g u1) (H1 f g H2 -H3)) n))))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt -(weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t0)) (plus (weight_map g u1) (weight_map (wadd g O) -t0)) (lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f -O) t0) (weight_map (wadd g O) t0) (H1 f g H2 H3) (weight_le t0 (wadd f O) -(wadd g O) (\lambda (n: nat).(le_S_n (wadd f O n) (wadd g O n) (le_n_S (wadd -f O n) (wadd g O n) (wadd_le f g H2 O O (le_O_n O) n))))))))))) (\lambda (f: -((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: -nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f O) t0)) (plus -(weight_map g u1) (weight_map (wadd g O) t0)) (lt_le_plus_plus (weight_map f -u2) (weight_map g u1) (weight_map (wadd f O) t0) (weight_map (wadd g O) t0) -(H1 f g H2 H3) (weight_le t0 (wadd f O) (wadd g O) (\lambda (n: nat).(le_S_n -(wadd f O n) (wadd g O n) (le_n_S (wadd f O n) (wadd g O n) (wadd_le f g H2 O -O (le_O_n O) n))))))))))) b)) (\lambda (_: F).(\lambda (f0: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 -m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f0 u2) (weight_map f0 t0)) (plus (weight_map g -u1) (weight_map g t0)) (lt_le_plus_plus (weight_map f0 u2) (weight_map g u1) -(weight_map f0 t0) (weight_map g t0) (H1 f0 g H2 H3) (weight_le t0 f0 g -H2)))))))) k))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (v: -T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) v t1 -t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(s k0 i)) O v)) (g (s k0 i))) \to (lt (weight_map f t2) (weight_map g -t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: -((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map -f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead k0 u0 t2)) -(weight_map g (THead k0 u0 t1))))))))))))))) (\lambda (b: B).(B_ind (\lambda -(b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: -nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) -\to (lt (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: -T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: -nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to -(lt (weight_map f (THead (Bind b0) u0 t2)) (weight_map g (THead (Bind b0) u0 -t1))))))))))))))) (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda -(i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt -(weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: -((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: -nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u0) (weight_map (wadd f (S (weight_map f -u0))) t2)) (plus (weight_map g u0) (weight_map (wadd g (S (weight_map g u0))) -t1)) (le_lt_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f -(S (weight_map f u0))) t2) (weight_map (wadd g (S (weight_map g u0))) t1) -(weight_le u0 f g H2) (H1 (wadd f (S (weight_map f u0))) (wadd g (S -(weight_map g u0))) (\lambda (m: nat).(wadd_le f g H2 (S (weight_map f u0)) -(S (weight_map g u0)) (le_n_S (weight_map f u0) (weight_map g u0) (weight_le -u0 f g H2)) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: -nat).(lt n (g i))) H3 (weight_map (wadd f (S (weight_map f u0))) (lift (S (S -i)) O v)) (lift_weight_add_O (S (weight_map f u0)) v (S i) f)))))))))))))))) -(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda -(_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f -t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u0) (weight_map (wadd f O) t2)) (plus -(weight_map g u0) (weight_map (wadd g O) t1)) (le_lt_plus_plus (weight_map f -u0) (weight_map g u0) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) -(weight_le u0 f g H2) (H1 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f -g H2 O O (le_O_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda -(n: nat).(lt n (g i))) H3 (weight_map (wadd f O) (lift (S (S i)) O v)) -(lift_weight_add_O O v (S i) f)))))))))))))))) (\lambda (v: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 -t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g -t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: -(lt (weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u0) -(weight_map (wadd f O) t2)) (plus (weight_map g u0) (weight_map (wadd g O) -t1)) (le_lt_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f -O) t2) (weight_map (wadd g O) t1) (weight_le u0 f g H2) (H1 (wadd f O) (wadd -g O) (\lambda (m: nat).(wadd_le f g H2 O O (le_O_n O) m)) (eq_ind nat -(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H3 -(weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) -f)))))))))))))))) b)) (\lambda (_: F).(\lambda (v: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift -(S i) O v)) (g i)) \to (lt (weight_map f0 t2) (weight_map g -t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda -(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map -f0 u0) (weight_map f0 t2)) (plus (weight_map g u0) (weight_map g t1)) -(le_lt_plus_plus (weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) -(weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 H3))))))))))))))) k)) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda -(_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall -(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt -(weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map -g u1)))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t1: -T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (lt -(weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead -k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind -(\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v -t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (lt (weight_map f t2) -(weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat -\to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f -(lift (S i) O v)) (g i)) \to (lt (weight_map f (THead (Bind b0) u2 t2)) -(weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda -(t2: T).(\lambda (H2: (subst0 (S i) v t1 t2)).(\lambda (_: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt -(weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f (S (weight_map f -u2))) t2)) (plus (weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) -t1)) (lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f -(S (weight_map f u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) (H1 -f g H4 H5) (subst0_weight_le v t1 t2 (S i) H2 (wadd f (S (weight_map f u2))) -(wadd g (S (weight_map g u1))) (\lambda (m: nat).(wadd_lt f g H4 (S -(weight_map f u2)) (S (weight_map g u1)) (lt_n_S (weight_map f u2) -(weight_map g u1) (H1 f g H4 H5)) m)) (eq_ind nat (weight_map f (lift (S i) O -v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f (S (weight_map f -u2))) (lift (S (S i)) O v)) (lift_weight_add_O (S (weight_map f u2)) v (S i) -f))))))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v -t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g -t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt -(weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) -t1)) (lt_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) -t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) -(\lambda (m: nat).(le_S_n (wadd f O m) (wadd g O m) (le_n_S (wadd f O m) -(wadd g O m) (wadd_le f g H4 O O (le_O_n O) m)))) (eq_ind nat (weight_map f -(lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) -(lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f))))))))))))) (\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: -((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: -nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S -i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat -\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le -(f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f O) t2)) (plus -(weight_map g u1) (weight_map (wadd g O) t1)) (lt_plus_plus (weight_map f u2) -(weight_map g u1) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) (H1 f -g H4 H5) (H3 (wadd f O) (wadd g O) (\lambda (m: nat).(le_S_n (wadd f O m) -(wadd g O m) (le_n_S (wadd f O m) (wadd g O m) (wadd_le f g H4 O O (le_O_n O) -m)))) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g -i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v -(S i) f))))))))))))) b)) (\lambda (_: F).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (subst0 i v t1 t2)).(\lambda (H3: ((\forall (f0: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f0 m) (g m)))) -\to ((lt (weight_map f0 (lift (S i) O v)) (g i)) \to (lt (weight_map f0 t2) -(weight_map g t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda -(H5: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map -f0 u2) (weight_map f0 t2)) (plus (weight_map g u1) (weight_map g t1)) -(lt_plus_plus (weight_map f0 u2) (weight_map g u1) (weight_map f0 t2) -(weight_map g t1) (H1 f0 g H4 H5) (H3 f0 g H4 H5)))))))))))) k)))))))) d u t -z H))))). - -lemma subst0_tlt_head: - \forall (u: T).(\forall (t: T).(\forall (z: T).((subst0 O u t z) \to (tlt -(THead (Bind Abbr) u z) (THead (Bind Abbr) u t))))) -\def - \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (H: (subst0 O u t -z)).(lt_n_S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) z)) (plus -(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S -(weight_map (\lambda (_: nat).O) u))) t)) (le_lt_plus_plus (weight_map -(\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) z) (weight_map -(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t) (le_n -(weight_map (\lambda (_: nat).O) u)) (subst0_weight_lt u t z O H (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) (wadd (\lambda -(_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) (\lambda (m: nat).(le_n -(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u)) m))) -(eq_ind nat (weight_map (\lambda (_: nat).O) (lift O O u)) (\lambda (n: -nat).(lt n (S (weight_map (\lambda (_: nat).O) u)))) (eq_ind_r T u (\lambda -(t0: T).(lt (weight_map (\lambda (_: nat).O) t0) (S (weight_map (\lambda (_: -nat).O) u)))) (le_n (S (weight_map (\lambda (_: nat).O) u))) (lift O O u) -(lift_r u O)) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda -(_: nat).O) u))) (lift (S O) O u)) (lift_weight_add_O (S (weight_map (\lambda -(_: nat).O) u)) u O (\lambda (_: nat).O))))))))). - -lemma subst0_tlt: - \forall (u: T).(\forall (t: T).(\forall (z: T).((subst0 O u t z) \to (tlt z -(THead (Bind Abbr) u t))))) -\def - \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (H: (subst0 O u t -z)).(tlt_trans (THead (Bind Abbr) u z) z (THead (Bind Abbr) u t) (tlt_head_dx -(Bind Abbr) u z) (subst0_tlt_head u t z H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/subst1/defs.ma deleted file mode 100644 index e54fcfcd3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/defs.ma +++ /dev/null @@ -1,22 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/defs.ma". - -inductive subst1 (i: nat) (v: T) (t1: T): T \to Prop \def -| subst1_refl: subst1 i v t1 t1 -| subst1_single: \forall (t2: T).((subst0 i v t1 t2) \to (subst1 i v t1 t2)). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/subst1/fwd.ma deleted file mode 100644 index 48d11a44e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/fwd.ma +++ /dev/null @@ -1,175 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst1/defs.ma". - -include "basic_1/subst0/fwd.ma". - -implied lemma subst1_ind: - \forall (i: nat).(\forall (v: T).(\forall (t1: T).(\forall (P: ((T \to -Prop))).((P t1) \to (((\forall (t2: T).((subst0 i v t1 t2) \to (P t2)))) \to -(\forall (t: T).((subst1 i v t1 t) \to (P t)))))))) -\def - \lambda (i: nat).(\lambda (v: T).(\lambda (t1: T).(\lambda (P: ((T \to -Prop))).(\lambda (f: (P t1)).(\lambda (f0: ((\forall (t2: T).((subst0 i v t1 -t2) \to (P t2))))).(\lambda (t: T).(\lambda (s0: (subst1 i v t1 t)).(match s0 -with [subst1_refl \Rightarrow f | (subst1_single x x0) \Rightarrow (f0 x -x0)])))))))). - -lemma subst1_gen_sort: - \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst1 -i v (TSort n) x) \to (eq T x (TSort n)))))) -\def - \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (subst1 i v (TSort n) x)).(subst1_ind i v (TSort n) (\lambda (t: T).(eq T -t (TSort n))) (refl_equal T (TSort n)) (\lambda (t2: T).(\lambda (H0: (subst0 -i v (TSort n) t2)).(subst0_gen_sort v t2 i n H0 (eq T t2 (TSort n))))) x -H))))). - -lemma subst1_gen_lref: - \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst1 -i v (TLRef n) x) \to (or (eq T x (TLRef n)) (land (eq nat n i) (eq T x (lift -(S n) O v)))))))) -\def - \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (subst1 i v (TLRef n) x)).(subst1_ind i v (TLRef n) (\lambda (t: T).(or -(eq T t (TLRef n)) (land (eq nat n i) (eq T t (lift (S n) O v))))) (or_introl -(eq T (TLRef n) (TLRef n)) (land (eq nat n i) (eq T (TLRef n) (lift (S n) O -v))) (refl_equal T (TLRef n))) (\lambda (t2: T).(\lambda (H0: (subst0 i v -(TLRef n) t2)).(land_ind (eq nat n i) (eq T t2 (lift (S n) O v)) (or (eq T t2 -(TLRef n)) (land (eq nat n i) (eq T t2 (lift (S n) O v)))) (\lambda (H1: (eq -nat n i)).(\lambda (H2: (eq T t2 (lift (S n) O v))).(or_intror (eq T t2 -(TLRef n)) (land (eq nat n i) (eq T t2 (lift (S n) O v))) (conj (eq nat n i) -(eq T t2 (lift (S n) O v)) H1 H2)))) (subst0_gen_lref v t2 i n H0)))) x -H))))). - -lemma subst1_gen_head: - \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall -(x: T).(\forall (i: nat).((subst1 i v (THead k u1 t1) x) \to (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(subst1 (s k i) v t1 t2)))))))))) -\def - \lambda (k: K).(\lambda (v: T).(\lambda (u1: T).(\lambda (t1: T).(\lambda -(x: T).(\lambda (i: nat).(\lambda (H: (subst1 i v (THead k u1 t1) -x)).(subst1_ind i v (THead k u1 t1) (\lambda (t: T).(ex3_2 T T (\lambda (u2: -T).(\lambda (t2: T).(eq T t (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst1 (s k i) v t1 -t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k u1 -t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(subst1 (s k i) v t1 t2))) u1 t1 (refl_equal -T (THead k u1 t1)) (subst1_refl i v u1) (subst1_refl (s k i) v t1)) (\lambda -(t2: T).(\lambda (H0: (subst0 i v (THead k u1 t1) t2)).(or3_ind (ex2 T -(\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 -u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: -T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v -u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex3_2 -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda -(u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(subst1 (s k i) v t1 t3)))) (\lambda (H1: (ex2 T (\lambda (u2: T).(eq T t2 -(THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2)))).(ex2_ind T (\lambda -(u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2)) -(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: T).(\lambda -(H2: (eq T t2 (THead k x0 t1))).(\lambda (H3: (subst0 i v u1 -x0)).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 -t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) x0 t1 H2 (subst1_single i v u1 -x0 H3) (subst1_refl (s k i) v t1))))) H1)) (\lambda (H1: (ex2 T (\lambda (t3: -T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 -t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: -T).(subst0 (s k i) v t1 t3)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) -(\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: -T).(\lambda (H2: (eq T t2 (THead k u1 x0))).(\lambda (H3: (subst0 (s k i) v -t1 x0)).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) u1 x0 H2 (subst1_refl i v u1) -(subst1_single (s k i) v t1 x0 H3))))) H1)) (\lambda (H1: (ex3_2 T T (\lambda -(u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s k i) v t1 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v -u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: -T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(H2: (eq T t2 (THead k x0 x1))).(\lambda (H3: (subst0 i v u1 x0)).(\lambda -(H4: (subst0 (s k i) v t1 x1)).(ex3_2_intro T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 -i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) x0 -x1 H2 (subst1_single i v u1 x0 H3) (subst1_single (s k i) v t1 x1 H4))))))) -H1)) (subst0_gen_head k v u1 t1 t2 i H0)))) x H))))))). - -lemma subst1_gen_lift_lt: - \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst1 i (lift h d u) (lift h (S (plus i d)) t1) -x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda -(t2: T).(subst1 i u t1 t2))))))))) -\def - \lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (i: nat).(\lambda -(h: nat).(\lambda (d: nat).(\lambda (H: (subst1 i (lift h d u) (lift h (S -(plus i d)) t1) x)).(subst1_ind i (lift h d u) (lift h (S (plus i d)) t1) -(\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) -(\lambda (t2: T).(subst1 i u t1 t2)))) (ex_intro2 T (\lambda (t2: T).(eq T -(lift h (S (plus i d)) t1) (lift h (S (plus i d)) t2))) (\lambda (t2: -T).(subst1 i u t1 t2)) t1 (refl_equal T (lift h (S (plus i d)) t1)) -(subst1_refl i u t1)) (\lambda (t2: T).(\lambda (H0: (subst0 i (lift h d u) -(lift h (S (plus i d)) t1) t2)).(ex2_ind T (\lambda (t3: T).(eq T t2 (lift h -(S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u t1 t3)) (ex2 T (\lambda -(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst1 i u t1 -t3))) (\lambda (x0: T).(\lambda (H1: (eq T t2 (lift h (S (plus i d)) -x0))).(\lambda (H2: (subst0 i u t1 x0)).(ex_intro2 T (\lambda (t3: T).(eq T -t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst1 i u t1 t3)) x0 H1 -(subst1_single i u t1 x0 H2))))) (subst0_gen_lift_lt u t1 t2 i h d H0)))) x -H))))))). - -lemma subst1_gen_lift_eq: - \forall (t: T).(\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall -(d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst1 i u -(lift h d t) x) \to (eq T x (lift h d t)))))))))) -\def - \lambda (t: T).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (i: nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d -h))).(\lambda (H1: (subst1 i u (lift h d t) x)).(subst1_ind i u (lift h d t) -(\lambda (t0: T).(eq T t0 (lift h d t))) (refl_equal T (lift h d t)) (\lambda -(t2: T).(\lambda (H2: (subst0 i u (lift h d t) t2)).(subst0_gen_lift_false t -u t2 h d i H H0 H2 (eq T t2 (lift h d t))))) x H1))))))))). - -lemma subst1_gen_lift_ge: - \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall -(h: nat).(\forall (d: nat).((subst1 i u (lift h d t1) x) \to ((le (plus d h) -i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: -T).(subst1 (minus i h) u t1 t2)))))))))) -\def - \lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (i: nat).(\lambda -(h: nat).(\lambda (d: nat).(\lambda (H: (subst1 i u (lift h d t1) -x)).(\lambda (H0: (le (plus d h) i)).(subst1_ind i u (lift h d t1) (\lambda -(t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h d t2))) (\lambda (t2: -T).(subst1 (minus i h) u t1 t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift -h d t1) (lift h d t2))) (\lambda (t2: T).(subst1 (minus i h) u t1 t2)) t1 -(refl_equal T (lift h d t1)) (subst1_refl (minus i h) u t1)) (\lambda (t2: -T).(\lambda (H1: (subst0 i u (lift h d t1) t2)).(ex2_ind T (\lambda (t3: -T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u t1 t3)) -(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst1 -(minus i h) u t1 t3))) (\lambda (x0: T).(\lambda (H2: (eq T t2 (lift h d -x0))).(\lambda (H3: (subst0 (minus i h) u t1 x0)).(ex_intro2 T (\lambda (t3: -T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst1 (minus i h) u t1 t3)) x0 -H2 (subst1_single (minus i h) u t1 x0 H3))))) (subst0_gen_lift_ge u t1 t2 i h -d H1 H0)))) x H)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/props.ma b/matita/matita/contribs/lambdadelta/basic_1/subst1/props.ma deleted file mode 100644 index f7bf1d15c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/props.ma +++ /dev/null @@ -1,165 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst1/fwd.ma". - -include "basic_1/subst0/props.ma". - -theorem subst1_head: - \forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall (i: nat).((subst1 -i v u1 u2) \to (\forall (k: K).(\forall (t1: T).(\forall (t2: T).((subst1 (s -k i) v t1 t2) \to (subst1 i v (THead k u1 t1) (THead k u2 t2)))))))))) -\def - \lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda -(H: (subst1 i v u1 u2)).(subst1_ind i v u1 (\lambda (t: T).(\forall (k: -K).(\forall (t1: T).(\forall (t2: T).((subst1 (s k i) v t1 t2) \to (subst1 i -v (THead k u1 t1) (THead k t t2))))))) (\lambda (k: K).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H0: (subst1 (s k i) v t1 t2)).(subst1_ind (s k -i) v t1 (\lambda (t: T).(subst1 i v (THead k u1 t1) (THead k u1 t))) -(subst1_refl i v (THead k u1 t1)) (\lambda (t3: T).(\lambda (H1: (subst0 (s k -i) v t1 t3)).(subst1_single i v (THead k u1 t1) (THead k u1 t3) (subst0_snd k -v t3 t1 i H1 u1)))) t2 H0))))) (\lambda (t2: T).(\lambda (H0: (subst0 i v u1 -t2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t0: T).(\lambda (H1: (subst1 -(s k i) v t1 t0)).(subst1_ind (s k i) v t1 (\lambda (t: T).(subst1 i v (THead -k u1 t1) (THead k t2 t))) (subst1_single i v (THead k u1 t1) (THead k t2 t1) -(subst0_fst v t2 u1 i H0 t1 k)) (\lambda (t3: T).(\lambda (H2: (subst0 (s k -i) v t1 t3)).(subst1_single i v (THead k u1 t1) (THead k t2 t3) (subst0_both -v u1 t2 i H0 k t1 t3 H2)))) t0 H1))))))) u2 H))))). - -lemma subst1_lift_lt: - \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst1 -i u t1 t2) \to (\forall (d: nat).((lt i d) \to (\forall (h: nat).(subst1 i -(lift h (minus d (S i)) u) (lift h d t1) (lift h d t2))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst1 i u t1 t2)).(subst1_ind i u t1 (\lambda (t: T).(\forall (d: -nat).((lt i d) \to (\forall (h: nat).(subst1 i (lift h (minus d (S i)) u) -(lift h d t1) (lift h d t)))))) (\lambda (d: nat).(\lambda (_: (lt i -d)).(\lambda (h: nat).(subst1_refl i (lift h (minus d (S i)) u) (lift h d -t1))))) (\lambda (t3: T).(\lambda (H0: (subst0 i u t1 t3)).(\lambda (d: -nat).(\lambda (H1: (lt i d)).(\lambda (h: nat).(subst1_single i (lift h -(minus d (S i)) u) (lift h d t1) (lift h d t3) (subst0_lift_lt t1 t3 u i H0 d -H1 h))))))) t2 H))))). - -lemma subst1_lift_ge: - \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall -(h: nat).((subst1 i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst1 -(plus i h) u (lift h d t1) (lift h d t2))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(h: nat).(\lambda (H: (subst1 i u t1 t2)).(subst1_ind i u t1 (\lambda (t: -T).(\forall (d: nat).((le d i) \to (subst1 (plus i h) u (lift h d t1) (lift h -d t))))) (\lambda (d: nat).(\lambda (_: (le d i)).(subst1_refl (plus i h) u -(lift h d t1)))) (\lambda (t3: T).(\lambda (H0: (subst0 i u t1 t3)).(\lambda -(d: nat).(\lambda (H1: (le d i)).(subst1_single (plus i h) u (lift h d t1) -(lift h d t3) (subst0_lift_ge t1 t3 u i h H0 d H1)))))) t2 H)))))). - -lemma subst1_ex: - \forall (u: T).(\forall (t1: T).(\forall (d: nat).(ex T (\lambda (t2: -T).(subst1 d u t1 (lift (S O) d t2)))))) -\def - \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (d: nat).(ex -T (\lambda (t2: T).(subst1 d u t (lift (S O) d t2)))))) (\lambda (n: -nat).(\lambda (d: nat).(ex_intro T (\lambda (t2: T).(subst1 d u (TSort n) -(lift (S O) d t2))) (TSort n) (eq_ind_r T (TSort n) (\lambda (t: T).(subst1 d -u (TSort n) t)) (subst1_refl d u (TSort n)) (lift (S O) d (TSort n)) -(lift_sort n (S O) d))))) (\lambda (n: nat).(\lambda (d: nat).(lt_eq_gt_e n d -(ex T (\lambda (t2: T).(subst1 d u (TLRef n) (lift (S O) d t2)))) (\lambda -(H: (lt n d)).(ex_intro T (\lambda (t2: T).(subst1 d u (TLRef n) (lift (S O) -d t2))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t: T).(subst1 d u (TLRef n) -t)) (subst1_refl d u (TLRef n)) (lift (S O) d (TLRef n)) (lift_lref_lt n (S -O) d H)))) (\lambda (H: (eq nat n d)).(eq_ind nat n (\lambda (n0: nat).(ex T -(\lambda (t2: T).(subst1 n0 u (TLRef n) (lift (S O) n0 t2))))) (ex_intro T -(\lambda (t2: T).(subst1 n u (TLRef n) (lift (S O) n t2))) (lift n O u) -(eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t: T).(subst1 n u (TLRef n) -t)) (subst1_single n u (TLRef n) (lift (S n) O u) (subst0_lref u n)) (lift (S -O) n (lift n O u)) (lift_free u n (S O) O n (le_plus_r O n) (le_O_n n)))) d -H)) (\lambda (H: (lt d n)).(ex_intro T (\lambda (t2: T).(subst1 d u (TLRef n) -(lift (S O) d t2))) (TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t: -T).(subst1 d u (TLRef n) t)) (subst1_refl d u (TLRef n)) (lift (S O) d (TLRef -(pred n))) (lift_lref_gt d n H))))))) (\lambda (k: K).(\lambda (t: -T).(\lambda (H: ((\forall (d: nat).(ex T (\lambda (t2: T).(subst1 d u t (lift -(S O) d t2))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (d: nat).(ex T -(\lambda (t2: T).(subst1 d u t0 (lift (S O) d t2))))))).(\lambda (d: -nat).(let H_x \def (H d) in (let H1 \def H_x in (ex_ind T (\lambda (t2: -T).(subst1 d u t (lift (S O) d t2))) (ex T (\lambda (t2: T).(subst1 d u -(THead k t t0) (lift (S O) d t2)))) (\lambda (x: T).(\lambda (H2: (subst1 d u -t (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in (let H3 \def H_x0 in -(ex_ind T (\lambda (t2: T).(subst1 (s k d) u t0 (lift (S O) (s k d) t2))) (ex -T (\lambda (t2: T).(subst1 d u (THead k t t0) (lift (S O) d t2)))) (\lambda -(x0: T).(\lambda (H4: (subst1 (s k d) u t0 (lift (S O) (s k d) -x0))).(ex_intro T (\lambda (t2: T).(subst1 d u (THead k t t0) (lift (S O) d -t2))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) (lift (S O) (s k -d) x0)) (\lambda (t2: T).(subst1 d u (THead k t t0) t2)) (subst1_head u t -(lift (S O) d x) d H2 k t0 (lift (S O) (s k d) x0) H4) (lift (S O) d (THead k -x x0)) (lift_head k x x0 (S O) d))))) H3))))) H1))))))))) t1)). - -lemma subst1_lift_S: - \forall (u: T).(\forall (i: nat).(\forall (h: nat).((le h i) \to (subst1 i -(TLRef h) (lift (S h) (S i) u) (lift (S h) i u))))) -\def - \lambda (u: T).(T_ind (\lambda (t: T).(\forall (i: nat).(\forall (h: -nat).((le h i) \to (subst1 i (TLRef h) (lift (S h) (S i) t) (lift (S h) i -t)))))) (\lambda (n: nat).(\lambda (i: nat).(\lambda (h: nat).(\lambda (_: -(le h i)).(eq_ind_r T (TSort n) (\lambda (t: T).(subst1 i (TLRef h) t (lift -(S h) i (TSort n)))) (eq_ind_r T (TSort n) (\lambda (t: T).(subst1 i (TLRef -h) (TSort n) t)) (subst1_refl i (TLRef h) (TSort n)) (lift (S h) i (TSort n)) -(lift_sort n (S h) i)) (lift (S h) (S i) (TSort n)) (lift_sort n (S h) (S -i))))))) (\lambda (n: nat).(\lambda (i: nat).(\lambda (h: nat).(\lambda (H: -(le h i)).(lt_eq_gt_e n i (subst1 i (TLRef h) (lift (S h) (S i) (TLRef n)) -(lift (S h) i (TLRef n))) (\lambda (H0: (lt n i)).(eq_ind_r T (TLRef n) -(\lambda (t: T).(subst1 i (TLRef h) t (lift (S h) i (TLRef n)))) (eq_ind_r T -(TLRef n) (\lambda (t: T).(subst1 i (TLRef h) (TLRef n) t)) (subst1_refl i -(TLRef h) (TLRef n)) (lift (S h) i (TLRef n)) (lift_lref_lt n (S h) i H0)) -(lift (S h) (S i) (TLRef n)) (lift_lref_lt n (S h) (S i) (le_S_n (S n) (S i) -(le_S (S (S n)) (S i) (le_n_S (S n) i H0)))))) (\lambda (H0: (eq nat n -i)).(let H1 \def (eq_ind_r nat i (\lambda (n0: nat).(le h n0)) H n H0) in -(eq_ind nat n (\lambda (n0: nat).(subst1 n0 (TLRef h) (lift (S h) (S n0) -(TLRef n)) (lift (S h) n0 (TLRef n)))) (eq_ind_r T (TLRef n) (\lambda (t: -T).(subst1 n (TLRef h) t (lift (S h) n (TLRef n)))) (eq_ind_r T (TLRef (plus -n (S h))) (\lambda (t: T).(subst1 n (TLRef h) (TLRef n) t)) (eq_ind nat (S -(plus n h)) (\lambda (n0: nat).(subst1 n (TLRef h) (TLRef n) (TLRef n0))) -(eq_ind_r nat (plus h n) (\lambda (n0: nat).(subst1 n (TLRef h) (TLRef n) -(TLRef (S n0)))) (eq_ind nat (plus h (S n)) (\lambda (n0: nat).(subst1 n -(TLRef h) (TLRef n) (TLRef n0))) (eq_ind T (lift (S n) O (TLRef h)) (\lambda -(t: T).(subst1 n (TLRef h) (TLRef n) t)) (subst1_single n (TLRef h) (TLRef n) -(lift (S n) O (TLRef h)) (subst0_lref (TLRef h) n)) (TLRef (plus h (S n))) -(lift_lref_ge h (S n) O (le_O_n h))) (S (plus h n)) (sym_eq nat (S (plus h -n)) (plus h (S n)) (plus_n_Sm h n))) (plus n h) (plus_sym n h)) (plus n (S -h)) (plus_n_Sm n h)) (lift (S h) n (TLRef n)) (lift_lref_ge n (S h) n (le_n -n))) (lift (S h) (S n) (TLRef n)) (lift_lref_lt n (S h) (S n) (le_n (S n)))) -i H0))) (\lambda (H0: (lt i n)).(eq_ind_r T (TLRef (plus n (S h))) (\lambda -(t: T).(subst1 i (TLRef h) t (lift (S h) i (TLRef n)))) (eq_ind_r T (TLRef -(plus n (S h))) (\lambda (t: T).(subst1 i (TLRef h) (TLRef (plus n (S h))) -t)) (subst1_refl i (TLRef h) (TLRef (plus n (S h)))) (lift (S h) i (TLRef n)) -(lift_lref_ge n (S h) i (le_S_n i n (le_S_n (S i) (S n) (le_S (S (S i)) (S n) -(le_n_S (S i) n H0)))))) (lift (S h) (S i) (TLRef n)) (lift_lref_ge n (S h) -(S i) H0)))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (i: -nat).(\forall (h: nat).((le h i) \to (subst1 i (TLRef h) (lift (S h) (S i) t) -(lift (S h) i t))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (i: -nat).(\forall (h: nat).((le h i) \to (subst1 i (TLRef h) (lift (S h) (S i) -t0) (lift (S h) i t0))))))).(\lambda (i: nat).(\lambda (h: nat).(\lambda (H1: -(le h i)).(eq_ind_r T (THead k (lift (S h) (S i) t) (lift (S h) (s k (S i)) -t0)) (\lambda (t1: T).(subst1 i (TLRef h) t1 (lift (S h) i (THead k t t0)))) -(eq_ind_r T (THead k (lift (S h) i t) (lift (S h) (s k i) t0)) (\lambda (t1: -T).(subst1 i (TLRef h) (THead k (lift (S h) (S i) t) (lift (S h) (s k (S i)) -t0)) t1)) (subst1_head (TLRef h) (lift (S h) (S i) t) (lift (S h) i t) i (H i -h H1) k (lift (S h) (s k (S i)) t0) (lift (S h) (s k i) t0) (eq_ind_r nat (S -(s k i)) (\lambda (n: nat).(subst1 (s k i) (TLRef h) (lift (S h) n t0) (lift -(S h) (s k i) t0))) (H0 (s k i) h (le_trans h i (s k i) H1 (s_inc k i))) (s k -(S i)) (s_S k i))) (lift (S h) i (THead k t t0)) (lift_head k t t0 (S h) i)) -(lift (S h) (S i) (THead k t t0)) (lift_head k t t0 (S h) (S i))))))))))) u). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst1/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1/subst1/subst1.ma deleted file mode 100644 index 9558c841f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/subst1/subst1.ma +++ /dev/null @@ -1,196 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst1/fwd.ma". - -include "basic_1/subst0/subst0.ma". - -theorem subst1_subst1: - \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst1 -j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst1 i -u u1 u2) \to (ex2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: -T).(subst1 (S (plus i j)) u t t2))))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda -(H: (subst1 j u2 t1 t2)).(subst1_ind j u2 t1 (\lambda (t: T).(\forall (u1: -T).(\forall (u: T).(\forall (i: nat).((subst1 i u u1 u2) \to (ex2 T (\lambda -(t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 -t)))))))) (\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: -(subst1 i u u1 u2)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda -(t: T).(subst1 (S (plus i j)) u t t1)) t1 (subst1_refl j u1 t1) (subst1_refl -(S (plus i j)) u t1)))))) (\lambda (t3: T).(\lambda (H0: (subst0 j u2 t1 -t3)).(\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (subst1 -i u u1 u2)).(insert_eq T u2 (\lambda (t: T).(subst1 i u u1 t)) (\lambda (_: -T).(ex2 T (\lambda (t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S -(plus i j)) u t0 t3)))) (\lambda (y: T).(\lambda (H2: (subst1 i u u1 -y)).(subst1_ind i u u1 (\lambda (t: T).((eq T t u2) \to (ex2 T (\lambda (t0: -T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 t3))))) -(\lambda (H3: (eq T u1 u2)).(eq_ind_r T u2 (\lambda (t: T).(ex2 T (\lambda -(t0: T).(subst1 j t t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 -t3)))) (ex_intro2 T (\lambda (t: T).(subst1 j u2 t1 t)) (\lambda (t: -T).(subst1 (S (plus i j)) u t t3)) t3 (subst1_single j u2 t1 t3 H0) -(subst1_refl (S (plus i j)) u t3)) u1 H3)) (\lambda (t0: T).(\lambda (H3: -(subst0 i u u1 t0)).(\lambda (H4: (eq T t0 u2)).(let H5 \def (eq_ind T t0 -(\lambda (t: T).(subst0 i u u1 t)) H3 u2 H4) in (ex2_ind T (\lambda (t: -T).(subst0 j u1 t1 t)) (\lambda (t: T).(subst0 (S (plus i j)) u t t3)) (ex2 T -(\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u -t t3))) (\lambda (x: T).(\lambda (H6: (subst0 j u1 t1 x)).(\lambda (H7: -(subst0 (S (plus i j)) u x t3)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 -t)) (\lambda (t: T).(subst1 (S (plus i j)) u t t3)) x (subst1_single j u1 t1 -x H6) (subst1_single (S (plus i j)) u x t3 H7))))) (subst0_subst0 t1 t3 u2 j -H0 u1 u i H5)))))) y H2))) H1))))))) t2 H))))). - -theorem subst1_subst1_back: - \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst1 -j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst1 i -u u2 u1) \to (ex2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: -T).(subst1 (S (plus i j)) u t2 t))))))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda -(H: (subst1 j u2 t1 t2)).(subst1_ind j u2 t1 (\lambda (t: T).(\forall (u1: -T).(\forall (u: T).(\forall (i: nat).((subst1 i u u2 u1) \to (ex2 T (\lambda -(t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t -t0)))))))) (\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: -(subst1 i u u2 u1)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda -(t: T).(subst1 (S (plus i j)) u t1 t)) t1 (subst1_refl j u1 t1) (subst1_refl -(S (plus i j)) u t1)))))) (\lambda (t3: T).(\lambda (H0: (subst0 j u2 t1 -t3)).(\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (subst1 -i u u2 u1)).(subst1_ind i u u2 (\lambda (t: T).(ex2 T (\lambda (t0: -T).(subst1 j t t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t3 t0)))) -(ex_intro2 T (\lambda (t: T).(subst1 j u2 t1 t)) (\lambda (t: T).(subst1 (S -(plus i j)) u t3 t)) t3 (subst1_single j u2 t1 t3 H0) (subst1_refl (S (plus i -j)) u t3)) (\lambda (t0: T).(\lambda (H2: (subst0 i u u2 t0)).(ex2_ind T -(\lambda (t: T).(subst0 j t0 t1 t)) (\lambda (t: T).(subst0 (S (plus i j)) u -t3 t)) (ex2 T (\lambda (t: T).(subst1 j t0 t1 t)) (\lambda (t: T).(subst1 (S -(plus i j)) u t3 t))) (\lambda (x: T).(\lambda (H3: (subst0 j t0 t1 -x)).(\lambda (H4: (subst0 (S (plus i j)) u t3 x)).(ex_intro2 T (\lambda (t: -T).(subst1 j t0 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u t3 t)) x -(subst1_single j t0 t1 x H3) (subst1_single (S (plus i j)) u t3 x H4))))) -(subst0_subst0_back t1 t3 u2 j H0 t0 u i H2)))) u1 H1))))))) t2 H))))). - -theorem subst1_trans: - \forall (t2: T).(\forall (t1: T).(\forall (v: T).(\forall (i: nat).((subst1 -i v t1 t2) \to (\forall (t3: T).((subst1 i v t2 t3) \to (subst1 i v t1 -t3))))))) -\def - \lambda (t2: T).(\lambda (t1: T).(\lambda (v: T).(\lambda (i: nat).(\lambda -(H: (subst1 i v t1 t2)).(subst1_ind i v t1 (\lambda (t: T).(\forall (t3: -T).((subst1 i v t t3) \to (subst1 i v t1 t3)))) (\lambda (t3: T).(\lambda -(H0: (subst1 i v t1 t3)).H0)) (\lambda (t3: T).(\lambda (H0: (subst0 i v t1 -t3)).(\lambda (t4: T).(\lambda (H1: (subst1 i v t3 t4)).(subst1_ind i v t3 -(\lambda (t: T).(subst1 i v t1 t)) (subst1_single i v t1 t3 H0) (\lambda (t0: -T).(\lambda (H2: (subst0 i v t3 t0)).(subst1_single i v t1 t0 (subst0_trans -t3 t1 v i H0 t0 H2)))) t4 H1))))) t2 H))))). - -theorem subst1_confluence_neq: - \forall (t0: T).(\forall (t1: T).(\forall (u1: T).(\forall (i1: -nat).((subst1 i1 u1 t0 t1) \to (\forall (t2: T).(\forall (u2: T).(\forall -(i2: nat).((subst1 i2 u2 t0 t2) \to ((not (eq nat i1 i2)) \to (ex2 T (\lambda -(t: T).(subst1 i2 u2 t1 t)) (\lambda (t: T).(subst1 i1 u1 t2 t)))))))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (u1: T).(\lambda (i1: -nat).(\lambda (H: (subst1 i1 u1 t0 t1)).(subst1_ind i1 u1 t0 (\lambda (t: -T).(\forall (t2: T).(\forall (u2: T).(\forall (i2: nat).((subst1 i2 u2 t0 t2) -\to ((not (eq nat i1 i2)) \to (ex2 T (\lambda (t3: T).(subst1 i2 u2 t t3)) -(\lambda (t3: T).(subst1 i1 u1 t2 t3))))))))) (\lambda (t2: T).(\lambda (u2: -T).(\lambda (i2: nat).(\lambda (H0: (subst1 i2 u2 t0 t2)).(\lambda (_: (not -(eq nat i1 i2))).(ex_intro2 T (\lambda (t: T).(subst1 i2 u2 t0 t)) (\lambda -(t: T).(subst1 i1 u1 t2 t)) t2 H0 (subst1_refl i1 u1 t2))))))) (\lambda (t2: -T).(\lambda (H0: (subst0 i1 u1 t0 t2)).(\lambda (t3: T).(\lambda (u2: -T).(\lambda (i2: nat).(\lambda (H1: (subst1 i2 u2 t0 t3)).(\lambda (H2: (not -(eq nat i1 i2))).(subst1_ind i2 u2 t0 (\lambda (t: T).(ex2 T (\lambda (t4: -T).(subst1 i2 u2 t2 t4)) (\lambda (t4: T).(subst1 i1 u1 t t4)))) (ex_intro2 T -(\lambda (t: T).(subst1 i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t0 t)) t2 -(subst1_refl i2 u2 t2) (subst1_single i1 u1 t0 t2 H0)) (\lambda (t4: -T).(\lambda (H3: (subst0 i2 u2 t0 t4)).(ex2_ind T (\lambda (t: T).(subst0 i1 -u1 t4 t)) (\lambda (t: T).(subst0 i2 u2 t2 t)) (ex2 T (\lambda (t: T).(subst1 -i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t4 t))) (\lambda (x: T).(\lambda -(H4: (subst0 i1 u1 t4 x)).(\lambda (H5: (subst0 i2 u2 t2 x)).(ex_intro2 T -(\lambda (t: T).(subst1 i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t4 t)) x -(subst1_single i2 u2 t2 x H5) (subst1_single i1 u1 t4 x H4))))) -(subst0_confluence_neq t0 t4 u2 i2 H3 t2 u1 i1 H0 (sym_not_eq nat i1 i2 -H2))))) t3 H1)))))))) t1 H))))). - -theorem subst1_confluence_eq: - \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst1 -i u t0 t1) \to (\forall (t2: T).((subst1 i u t0 t2) \to (ex2 T (\lambda (t: -T).(subst1 i u t1 t)) (\lambda (t: T).(subst1 i u t2 t))))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst1 i u t0 t1)).(subst1_ind i u t0 (\lambda (t: T).(\forall (t2: -T).((subst1 i u t0 t2) \to (ex2 T (\lambda (t3: T).(subst1 i u t t3)) -(\lambda (t3: T).(subst1 i u t2 t3)))))) (\lambda (t2: T).(\lambda (H0: -(subst1 i u t0 t2)).(ex_intro2 T (\lambda (t: T).(subst1 i u t0 t)) (\lambda -(t: T).(subst1 i u t2 t)) t2 H0 (subst1_refl i u t2)))) (\lambda (t2: -T).(\lambda (H0: (subst0 i u t0 t2)).(\lambda (t3: T).(\lambda (H1: (subst1 i -u t0 t3)).(subst1_ind i u t0 (\lambda (t: T).(ex2 T (\lambda (t4: T).(subst1 -i u t2 t4)) (\lambda (t4: T).(subst1 i u t t4)))) (ex_intro2 T (\lambda (t: -T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t0 t)) t2 (subst1_refl i u -t2) (subst1_single i u t0 t2 H0)) (\lambda (t4: T).(\lambda (H2: (subst0 i u -t0 t4)).(or4_ind (eq T t4 t2) (ex2 T (\lambda (t: T).(subst0 i u t4 t)) -(\lambda (t: T).(subst0 i u t2 t))) (subst0 i u t4 t2) (subst0 i u t2 t4) -(ex2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t4 t))) -(\lambda (H3: (eq T t4 t2)).(eq_ind_r T t2 (\lambda (t: T).(ex2 T (\lambda -(t5: T).(subst1 i u t2 t5)) (\lambda (t5: T).(subst1 i u t t5)))) (ex_intro2 -T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t2 t)) t2 -(subst1_refl i u t2) (subst1_refl i u t2)) t4 H3)) (\lambda (H3: (ex2 T -(\lambda (t: T).(subst0 i u t4 t)) (\lambda (t: T).(subst0 i u t2 -t)))).(ex2_ind T (\lambda (t: T).(subst0 i u t4 t)) (\lambda (t: T).(subst0 i -u t2 t)) (ex2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i -u t4 t))) (\lambda (x: T).(\lambda (H4: (subst0 i u t4 x)).(\lambda (H5: -(subst0 i u t2 x)).(ex_intro2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda -(t: T).(subst1 i u t4 t)) x (subst1_single i u t2 x H5) (subst1_single i u t4 -x H4))))) H3)) (\lambda (H3: (subst0 i u t4 t2)).(ex_intro2 T (\lambda (t: -T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t4 t)) t2 (subst1_refl i u -t2) (subst1_single i u t4 t2 H3))) (\lambda (H3: (subst0 i u t2 -t4)).(ex_intro2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 -i u t4 t)) t4 (subst1_single i u t2 t4 H3) (subst1_refl i u t4))) -(subst0_confluence_eq t0 t4 u i H2 t2 H0)))) t3 H1))))) t1 H))))). - -theorem subst1_confluence_lift: - \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst1 -i u t0 (lift (S O) i t1)) \to (\forall (t2: T).((subst1 i u t0 (lift (S O) i -t2)) \to (eq T t1 t2))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst1 i u t0 (lift (S O) i t1))).(insert_eq T (lift (S O) i t1) -(\lambda (t: T).(subst1 i u t0 t)) (\lambda (_: T).(\forall (t2: T).((subst1 -i u t0 (lift (S O) i t2)) \to (eq T t1 t2)))) (\lambda (y: T).(\lambda (H0: -(subst1 i u t0 y)).(subst1_ind i u t0 (\lambda (t: T).((eq T t (lift (S O) i -t1)) \to (\forall (t2: T).((subst1 i u t0 (lift (S O) i t2)) \to (eq T t1 -t2))))) (\lambda (H1: (eq T t0 (lift (S O) i t1))).(\lambda (t2: T).(\lambda -(H2: (subst1 i u t0 (lift (S O) i t2))).(let H3 \def (eq_ind T t0 (\lambda -(t: T).(subst1 i u t (lift (S O) i t2))) H2 (lift (S O) i t1) H1) in (let H4 -\def (sym_eq T (lift (S O) i t2) (lift (S O) i t1) (subst1_gen_lift_eq t1 u -(lift (S O) i t2) (S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) (\lambda -(n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) (plus_sym i (S O))) -H3)) in (lift_inj t1 t2 (S O) i H4)))))) (\lambda (t2: T).(\lambda (H1: -(subst0 i u t0 t2)).(\lambda (H2: (eq T t2 (lift (S O) i t1))).(\lambda (t3: -T).(\lambda (H3: (subst1 i u t0 (lift (S O) i t3))).(let H4 \def (eq_ind T t2 -(\lambda (t: T).(subst0 i u t0 t)) H1 (lift (S O) i t1) H2) in (insert_eq T -(lift (S O) i t3) (\lambda (t: T).(subst1 i u t0 t)) (\lambda (_: T).(eq T t1 -t3)) (\lambda (y0: T).(\lambda (H5: (subst1 i u t0 y0)).(subst1_ind i u t0 -(\lambda (t: T).((eq T t (lift (S O) i t3)) \to (eq T t1 t3))) (\lambda (H6: -(eq T t0 (lift (S O) i t3))).(let H7 \def (eq_ind T t0 (\lambda (t: -T).(subst0 i u t (lift (S O) i t1))) H4 (lift (S O) i t3) H6) in -(subst0_gen_lift_false t3 u (lift (S O) i t1) (S O) i i (le_n i) (eq_ind_r -nat (plus (S O) i) (\lambda (n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i -(S O)) (plus_sym i (S O))) H7 (eq T t1 t3)))) (\lambda (t4: T).(\lambda (H6: -(subst0 i u t0 t4)).(\lambda (H7: (eq T t4 (lift (S O) i t3))).(let H8 \def -(eq_ind T t4 (\lambda (t: T).(subst0 i u t0 t)) H6 (lift (S O) i t3) H7) in -(sym_eq T t3 t1 (subst0_confluence_lift t0 t3 u i H8 t1 H4)))))) y0 H5))) -H3))))))) y H0))) H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/theory.ma b/matita/matita/contribs/lambdadelta/basic_1/theory.ma deleted file mode 100644 index 771c60e75..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/theory.ma +++ /dev/null @@ -1,40 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/subst0/tlt.ma". - -include "basic_1/subst/props.ma". - -include "basic_1/sty1/cnt.ma". - -include "basic_1/ex0/props.ma". - -include "basic_1/pr3/wcpr0.ma". - -include "basic_1/ex2/props.ma". - -include "basic_1/ex1/props.ma". - -include "basic_1/ty3/sty0.ma". - -include "basic_1/csubt/csuba.ma". - -include "basic_1/ty3/fwd_nf2.ma". - -include "basic_1/ty3/nf2.ma". - -include "basic_1/wf3/props.ma". - diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlist/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/tlist/defs.ma deleted file mode 100644 index d0eed7f52..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/tlist/defs.ma +++ /dev/null @@ -1,38 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -inductive TList: Type[0] \def -| TNil: TList -| TCons: T \to (TList \to TList). - -rec definition THeads (k: K) (us: TList) on us: T \to T \def \lambda (t: -T).(match us with [TNil \Rightarrow t | (TCons u ul) \Rightarrow (THead k u -(THeads k ul t))]). - -rec definition TApp (ts: TList) on ts: T \to TList \def \lambda (v: T).(match -ts with [TNil \Rightarrow (TCons v TNil) | (TCons t ts0) \Rightarrow (TCons t -(TApp ts0 v))]). - -rec definition tslen (ts: TList) on ts: nat \def match ts with [TNil -\Rightarrow O | (TCons _ ts0) \Rightarrow (S (tslen ts0))]. - -definition tslt: - TList \to (TList \to Prop) -\def - \lambda (ts1: TList).(\lambda (ts2: TList).(lt (tslen ts1) (tslen ts2))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlist/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/tlist/fwd.ma deleted file mode 100644 index 65b3b604f..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/tlist/fwd.ma +++ /dev/null @@ -1,70 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/tlist/props.ma". - -fact tslt_wf__q_ind: - \forall (P: ((TList \to Prop))).(((\forall (n: nat).((\lambda (P0: ((TList -\to Prop))).(\lambda (n0: nat).(\forall (ts: TList).((eq nat (tslen ts) n0) -\to (P0 ts))))) P n))) \to (\forall (ts: TList).(P ts))) -\def - let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: -TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to -Prop))).(\lambda (H: ((\forall (n: nat).(\forall (ts: TList).((eq nat (tslen -ts) n) \to (P ts)))))).(\lambda (ts: TList).(H (tslen ts) ts (refl_equal nat -(tslen ts)))))). - -lemma tslt_wf_ind: - \forall (P: ((TList \to Prop))).(((\forall (ts2: TList).(((\forall (ts1: -TList).((tslt ts1 ts2) \to (P ts1)))) \to (P ts2)))) \to (\forall (ts: -TList).(P ts))) -\def - let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: -TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to -Prop))).(\lambda (H: ((\forall (ts2: TList).(((\forall (ts1: TList).((lt -(tslen ts1) (tslen ts2)) \to (P ts1)))) \to (P ts2))))).(\lambda (ts: -TList).(tslt_wf__q_ind (\lambda (t: TList).(P t)) (\lambda (n: -nat).(lt_wf_ind n (Q (\lambda (t: TList).(P t))) (\lambda (n0: nat).(\lambda -(H0: ((\forall (m: nat).((lt m n0) \to (Q (\lambda (t: TList).(P t)) -m))))).(\lambda (ts0: TList).(\lambda (H1: (eq nat (tslen ts0) n0)).(let H2 -\def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall (m: nat).((lt m n1) \to -(\forall (ts1: TList).((eq nat (tslen ts1) m) \to (P ts1)))))) H0 (tslen ts0) -H1) in (H ts0 (\lambda (ts1: TList).(\lambda (H3: (lt (tslen ts1) (tslen -ts0))).(H2 (tslen ts1) H3 ts1 (refl_equal nat (tslen ts1))))))))))))) ts)))). - -lemma tlist_ind_rev: - \forall (P: ((TList \to Prop))).((P TNil) \to (((\forall (ts: -TList).(\forall (t: T).((P ts) \to (P (TApp ts t)))))) \to (\forall (ts: -TList).(P ts)))) -\def - \lambda (P: ((TList \to Prop))).(\lambda (H: (P TNil)).(\lambda (H0: -((\forall (ts: TList).(\forall (t: T).((P ts) \to (P (TApp ts -t))))))).(\lambda (ts: TList).(tslt_wf_ind (\lambda (t: TList).(P t)) -(\lambda (ts2: TList).(TList_ind (\lambda (t: TList).(((\forall (ts1: -TList).((tslt ts1 t) \to (P ts1)))) \to (P t))) (\lambda (_: ((\forall (ts1: -TList).((tslt ts1 TNil) \to (P ts1))))).H) (\lambda (t: T).(\lambda (t0: -TList).(\lambda (_: ((((\forall (ts1: TList).((tslt ts1 t0) \to (P ts1)))) -\to (P t0)))).(\lambda (H2: ((\forall (ts1: TList).((tslt ts1 (TCons t t0)) -\to (P ts1))))).(let H_x \def (tcons_tapp_ex t0 t) in (let H3 \def H_x in -(ex2_2_ind TList T (\lambda (ts3: TList).(\lambda (t2: T).(eq TList (TCons t -t0) (TApp ts3 t2)))) (\lambda (ts3: TList).(\lambda (_: T).(eq nat (tslen t0) -(tslen ts3)))) (P (TCons t t0)) (\lambda (x0: TList).(\lambda (x1: -T).(\lambda (H4: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H5: (eq nat -(tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t1: TList).(P -t1)) (H0 x0 x1 (H2 x0 (eq_ind nat (tslen t0) (\lambda (n: nat).(lt n (tslen -(TCons t t0)))) (le_n (tslen (TCons t t0))) (tslen x0) H5))) (TCons t t0) -H4))))) H3))))))) ts2)) ts)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlist/props.ma b/matita/matita/contribs/lambdadelta/basic_1/tlist/props.ma deleted file mode 100644 index 267f9d9ad..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/tlist/props.ma +++ /dev/null @@ -1,64 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/tlist/defs.ma". - -lemma theads_tapp: - \forall (k: K).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).(eq T -(THeads k (TApp vs v) t) (THeads k vs (THead k v t)))))) -\def - \lambda (k: K).(\lambda (v: T).(\lambda (t: T).(\lambda (vs: -TList).(TList_ind (\lambda (t0: TList).(eq T (THeads k (TApp t0 v) t) (THeads -k t0 (THead k v t)))) (refl_equal T (THead k v t)) (\lambda (t0: T).(\lambda -(t1: TList).(\lambda (H: (eq T (THeads k (TApp t1 v) t) (THeads k t1 (THead k -v t)))).(eq_ind T (THeads k (TApp t1 v) t) (\lambda (t2: T).(eq T (THead k t0 -(THeads k (TApp t1 v) t)) (THead k t0 t2))) (refl_equal T (THead k t0 (THeads -k (TApp t1 v) t))) (THeads k t1 (THead k v t)) H)))) vs)))). - -lemma tcons_tapp_ex: - \forall (ts1: TList).(\forall (t1: T).(ex2_2 TList T (\lambda (ts2: -TList).(\lambda (t2: T).(eq TList (TCons t1 ts1) (TApp ts2 t2)))) (\lambda -(ts2: TList).(\lambda (_: T).(eq nat (tslen ts1) (tslen ts2)))))) -\def - \lambda (ts1: TList).(TList_ind (\lambda (t: TList).(\forall (t1: T).(ex2_2 -TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t) (TApp -ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t) (tslen -ts2))))))) (\lambda (t1: T).(ex2_2_intro TList T (\lambda (ts2: -TList).(\lambda (t2: T).(eq TList (TCons t1 TNil) (TApp ts2 t2)))) (\lambda -(ts2: TList).(\lambda (_: T).(eq nat O (tslen ts2)))) TNil t1 (refl_equal -TList (TApp TNil t1)) (refl_equal nat (tslen TNil)))) (\lambda (t: -T).(\lambda (t0: TList).(\lambda (H: ((\forall (t1: T).(ex2_2 TList T -(\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t0) (TApp ts2 -t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) (tslen -ts2)))))))).(\lambda (t1: T).(let H_x \def (H t) in (let H0 \def H_x in -(ex2_2_ind TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t -t0) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) -(tslen ts2)))) (ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq -TList (TCons t1 (TCons t t0)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda -(_: T).(eq nat (S (tslen t0)) (tslen ts2))))) (\lambda (x0: TList).(\lambda -(x1: T).(\lambda (H1: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H2: (eq -nat (tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t2: -TList).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t3: T).(eq TList (TCons -t1 t2) (TApp ts2 t3)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (S -(tslen t0)) (tslen ts2)))))) (eq_ind_r nat (tslen x0) (\lambda (n: -nat).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons -t1 (TApp x0 x1)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq -nat (S n) (tslen ts2)))))) (ex2_2_intro TList T (\lambda (ts2: -TList).(\lambda (t2: T).(eq TList (TCons t1 (TApp x0 x1)) (TApp ts2 t2)))) -(\lambda (ts2: TList).(\lambda (_: T).(eq nat (S (tslen x0)) (tslen ts2)))) -(TCons t1 x0) x1 (refl_equal TList (TApp (TCons t1 x0) x1)) (refl_equal nat -(tslen (TCons t1 x0)))) (tslen t0) H2) (TCons t t0) H1))))) H0))))))) ts1). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/tlt/defs.ma deleted file mode 100644 index 174740042..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/tlt/defs.ma +++ /dev/null @@ -1,43 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/defs.ma". - -definition wadd: - ((nat \to nat)) \to (nat \to (nat \to nat)) -\def - \lambda (f: ((nat \to nat))).(\lambda (w: nat).(\lambda (n: nat).(match n -with [O \Rightarrow w | (S m) \Rightarrow (f m)]))). - -rec definition weight_map (f: (nat \to nat)) (t: T) on t: nat \def match t -with [(TSort _) \Rightarrow O | (TLRef n) \Rightarrow (f n) | (THead k u t0) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow (S (plus (weight_map f u) (weight_map (wadd f (S (weight_map f -u))) t0))) | Abst \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f -O) t0))) | Void \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f O) -t0)))]) | (Flat _) \Rightarrow (S (plus (weight_map f u) (weight_map f -t0)))])]. - -definition weight: - T \to nat -\def - weight_map (\lambda (_: nat).O). - -definition tlt: - T \to (T \to Prop) -\def - \lambda (t1: T).(\lambda (t2: T).(lt (weight t1) (weight t2))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/tlt/fwd.ma deleted file mode 100644 index f53eb19dc..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/tlt/fwd.ma +++ /dev/null @@ -1,46 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/tlt/defs.ma". - -fact tlt_wf__q_ind: - \forall (P: ((T \to Prop))).(((\forall (n: nat).((\lambda (P0: ((T \to -Prop))).(\lambda (n0: nat).(\forall (t: T).((eq nat (weight t) n0) \to (P0 -t))))) P n))) \to (\forall (t: T).(P t))) -\def - let Q \def (\lambda (P: ((T \to Prop))).(\lambda (n: nat).(\forall (t: -T).((eq nat (weight t) n) \to (P t))))) in (\lambda (P: ((T \to -Prop))).(\lambda (H: ((\forall (n: nat).(\forall (t: T).((eq nat (weight t) -n) \to (P t)))))).(\lambda (t: T).(H (weight t) t (refl_equal nat (weight -t)))))). - -lemma tlt_wf_ind: - \forall (P: ((T \to Prop))).(((\forall (t: T).(((\forall (v: T).((tlt v t) -\to (P v)))) \to (P t)))) \to (\forall (t: T).(P t))) -\def - let Q \def (\lambda (P: ((T \to Prop))).(\lambda (n: nat).(\forall (t: -T).((eq nat (weight t) n) \to (P t))))) in (\lambda (P: ((T \to -Prop))).(\lambda (H: ((\forall (t: T).(((\forall (v: T).((lt (weight v) -(weight t)) \to (P v)))) \to (P t))))).(\lambda (t: T).(tlt_wf__q_ind -(\lambda (t0: T).(P t0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (t0: -T).(P t0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) -\to (Q (\lambda (t0: T).(P t0)) m))))).(\lambda (t0: T).(\lambda (H1: (eq nat -(weight t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall -(m: nat).((lt m n1) \to (\forall (t1: T).((eq nat (weight t1) m) \to (P -t1)))))) H0 (weight t0) H1) in (H t0 (\lambda (v: T).(\lambda (H3: (lt -(weight v) (weight t0))).(H2 (weight v) H3 v (refl_equal nat (weight -v))))))))))))) t)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/tlt/props.ma b/matita/matita/contribs/lambdadelta/basic_1/tlt/props.ma deleted file mode 100644 index 6df71b39e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/tlt/props.ma +++ /dev/null @@ -1,238 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/T/fwd.ma". - -include "basic_1/tlt/defs.ma". - -lemma wadd_le: - \forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: -nat).(le (f n) (g n)))) \to (\forall (v: nat).(\forall (w: nat).((le v w) \to -(\forall (n: nat).(le (wadd f v n) (wadd g w n)))))))) -\def - \lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: -((\forall (n: nat).(le (f n) (g n))))).(\lambda (v: nat).(\lambda (w: -nat).(\lambda (H0: (le v w)).(\lambda (n: nat).(nat_ind (\lambda (n0: -nat).(le (wadd f v n0) (wadd g w n0))) H0 (\lambda (n0: nat).(\lambda (_: (le -(wadd f v n0) (wadd g w n0))).(H n0))) n))))))). - -lemma wadd_lt: - \forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: -nat).(le (f n) (g n)))) \to (\forall (v: nat).(\forall (w: nat).((lt v w) \to -(\forall (n: nat).(le (wadd f v n) (wadd g w n)))))))) -\def - \lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: -((\forall (n: nat).(le (f n) (g n))))).(\lambda (v: nat).(\lambda (w: -nat).(\lambda (H0: (lt v w)).(\lambda (n: nat).(nat_ind (\lambda (n0: -nat).(le (wadd f v n0) (wadd g w n0))) (le_S_n v w (le_S_n (S v) (S w) (le_S -(S (S v)) (S w) (le_n_S (S v) w H0)))) (\lambda (n0: nat).(\lambda (_: (le -(wadd f v n0) (wadd g w n0))).(H n0))) n))))))). - -lemma wadd_O: - \forall (n: nat).(eq nat (wadd (\lambda (_: nat).O) O n) O) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat (wadd (\lambda (_: -nat).O) O n0) O)) (refl_equal nat O) (\lambda (n0: nat).(\lambda (_: (eq nat -(wadd (\lambda (_: nat).O) O n0) O)).(refl_equal nat O))) n). - -lemma weight_le: - \forall (t: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t) -(weight_map g t))))) -\def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) -\to (le (weight_map f t0) (weight_map g t0)))))) (\lambda (n: nat).(\lambda -(f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall -(n0: nat).(le (f n0) (g n0))))).(le_O_n (weight_map g (TSort n))))))) -(\lambda (n: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H: ((\forall (n0: nat).(le (f n0) (g n0))))).(H n))))) -(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t0: T).(((\forall (f: ((nat -\to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g -n)))) \to (le (weight_map f t0) (weight_map g t0)))))) \to (\forall (t1: -T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall -(n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1)))))) -\to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall -(n: nat).(le (f n) (g n)))) \to (le (weight_map f (THead k0 t0 t1)) -(weight_map g (THead k0 t0 t1))))))))))) (\lambda (b: B).(B_ind (\lambda (b0: -B).(\forall (t0: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) -(weight_map g t0)))))) \to (\forall (t1: T).(((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) -\to (le (weight_map f t1) (weight_map g t1)))))) \to (\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) -\to (le (match b0 with [Abbr \Rightarrow (S (plus (weight_map f t0) -(weight_map (wadd f (S (weight_map f t0))) t1))) | Abst \Rightarrow (S (plus -(weight_map f t0) (weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus -(weight_map f t0) (weight_map (wadd f O) t1)))]) (match b0 with [Abbr -\Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g (S (weight_map g -t0))) t1))) | Abst \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g -O) t1))) | Void \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g O) -t1)))])))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) -\to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda -(H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall -(n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g -t1))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H1: ((\forall (n: nat).(le (f n) (g n))))).(le_n_S (plus -(weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1)) (plus -(weight_map g t0) (weight_map (wadd g (S (weight_map g t0))) t1)) -(le_plus_plus (weight_map f t0) (weight_map g t0) (weight_map (wadd f (S -(weight_map f t0))) t1) (weight_map (wadd g (S (weight_map g t0))) t1) (H f g -H1) (H0 (wadd f (S (weight_map f t0))) (wadd g (S (weight_map g t0))) -(\lambda (n: nat).(wadd_le f g H1 (S (weight_map f t0)) (S (weight_map g t0)) -(le_n_S (weight_map f t0) (weight_map g t0) (H f g H1)) n)))))))))))) -(\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: -((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f -t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) -(g n)))) \to (le (weight_map f t1) (weight_map g t1))))))).(\lambda (f: ((nat -\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (n: nat).(le -(f n) (g n))))).(le_n_S (plus (weight_map f t0) (weight_map (wadd f O) t1)) -(plus (weight_map g t0) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map -f t0) (weight_map g t0) (weight_map (wadd f O) t1) (weight_map (wadd g O) t1) -(H f g H1) (H0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g H1 O O -(le_O_n O) n)))))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat -\to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g -n)))) \to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: -T).(\lambda (H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) -(weight_map g t1))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H1: ((\forall (n: nat).(le (f n) (g n))))).(le_n_S (plus -(weight_map f t0) (weight_map (wadd f O) t1)) (plus (weight_map g t0) -(weight_map (wadd g O) t1)) (le_plus_plus (weight_map f t0) (weight_map g t0) -(weight_map (wadd f O) t1) (weight_map (wadd g O) t1) (H f g H1) (H0 (wadd f -O) (wadd g O) (\lambda (n: nat).(wadd_le f g H1 O O (le_O_n O) n)))))))))))) -b)) (\lambda (_: F).(\lambda (t0: T).(\lambda (H: ((\forall (f0: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f0 n) (g n)))) -\to (le (weight_map f0 t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda -(H0: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall -(n: nat).(le (f0 n) (g n)))) \to (le (weight_map f0 t1) (weight_map g -t1))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H1: ((\forall (n: nat).(le (f0 n) (g n))))).(le_n_S (plus -(weight_map f0 t0) (weight_map f0 t1)) (plus (weight_map g t0) (weight_map g -t1)) (le_plus_plus (weight_map f0 t0) (weight_map g t0) (weight_map f0 t1) -(weight_map g t1) (H f0 g H1) (H0 f0 g H1))))))))))) k)) t). - -lemma weight_eq: - \forall (t: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (n: nat).(eq nat (f n) (g n)))) \to (eq nat (weight_map f -t) (weight_map g t))))) -\def - \lambda (t: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H: ((\forall (n: nat).(eq nat (f n) (g n))))).(le_antisym -(weight_map f t) (weight_map g t) (weight_le t f g (\lambda (n: -nat).(eq_ind_r nat (g n) (\lambda (n0: nat).(le n0 (g n))) (le_n (g n)) (f n) -(H n)))) (weight_le t g f (\lambda (n: nat).(eq_ind_r nat (g n) (\lambda (n0: -nat).(le (g n) n0)) (le_n (g n)) (f n) (H n)))))))). - -lemma weight_add_O: - \forall (t: T).(eq nat (weight_map (wadd (\lambda (_: nat).O) O) t) -(weight_map (\lambda (_: nat).O) t)) -\def - \lambda (t: T).(weight_eq t (wadd (\lambda (_: nat).O) O) (\lambda (_: -nat).O) (\lambda (n: nat).(wadd_O n))). - -lemma weight_add_S: - \forall (t: T).(\forall (m: nat).(le (weight_map (wadd (\lambda (_: nat).O) -O) t) (weight_map (wadd (\lambda (_: nat).O) (S m)) t))) -\def - \lambda (t: T).(\lambda (m: nat).(weight_le t (wadd (\lambda (_: nat).O) O) -(wadd (\lambda (_: nat).O) (S m)) (\lambda (n: nat).(wadd_le (\lambda (_: -nat).O) (\lambda (_: nat).O) (\lambda (_: nat).(le_O_n O)) O (S m) (le_O_n (S -m)) n)))). - -theorem tlt_trans: - \forall (v: T).(\forall (u: T).(\forall (t: T).((tlt u v) \to ((tlt v t) \to -(tlt u t))))) -\def - \lambda (v: T).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (lt (weight u) -(weight v))).(\lambda (H0: (lt (weight v) (weight t))).(lt_trans (weight u) -(weight v) (weight t) H H0))))). - -lemma tlt_head_sx: - \forall (k: K).(\forall (u: T).(\forall (t: T).(tlt u (THead k u t)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (t: T).(lt -(weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) (THead -k0 u t)))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (u: T).(\forall -(t: T).(lt (weight_map (\lambda (_: nat).O) u) (match b0 with [Abbr -\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) | Abst -\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) O) t))) | Void \Rightarrow (S (plus (weight_map (\lambda -(_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)))]))))) (\lambda -(u: T).(\lambda (t: T).(le_n_S (weight_map (\lambda (_: nat).O) u) (plus -(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S -(weight_map (\lambda (_: nat).O) u))) t)) (le_plus_l (weight_map (\lambda (_: -nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: -nat).O) u))) t))))) (\lambda (u: T).(\lambda (t: T).(le_n_S (weight_map -(\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) (weight_map -(wadd (\lambda (_: nat).O) O) t)) (le_plus_l (weight_map (\lambda (_: nat).O) -u) (weight_map (wadd (\lambda (_: nat).O) O) t))))) (\lambda (u: T).(\lambda -(t: T).(le_n_S (weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda -(_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)) (le_plus_l -(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) -t))))) b)) (\lambda (_: F).(\lambda (u: T).(\lambda (t: T).(le_n_S -(weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) -(weight_map (\lambda (_: nat).O) t)) (le_plus_l (weight_map (\lambda (_: -nat).O) u) (weight_map (\lambda (_: nat).O) t)))))) k). - -lemma tlt_head_dx: - \forall (k: K).(\forall (u: T).(\forall (t: T).(tlt t (THead k u t)))) -\def - \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (t: T).(lt -(weight_map (\lambda (_: nat).O) t) (weight_map (\lambda (_: nat).O) (THead -k0 u t)))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (u: T).(\forall -(t: T).(lt (weight_map (\lambda (_: nat).O) t) (match b0 with [Abbr -\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) | Abst -\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) O) t))) | Void \Rightarrow (S (plus (weight_map (\lambda -(_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)))]))))) (\lambda -(u: T).(\lambda (t: T).(lt_le_trans (weight_map (\lambda (_: nat).O) t) (S -(weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: -nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: -nat).O) u))) t))) (lt_n_Sn (weight_map (\lambda (_: nat).O) t)) (le_n_S -(weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) -(weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) -u))) t)) (le_trans (weight_map (\lambda (_: nat).O) t) (weight_map (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t) (plus -(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S -(weight_map (\lambda (_: nat).O) u))) t)) (eq_ind nat (weight_map (wadd -(\lambda (_: nat).O) O) t) (\lambda (n: nat).(le n (weight_map (wadd (\lambda -(_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) (weight_add_S t -(weight_map (\lambda (_: nat).O) u)) (weight_map (\lambda (_: nat).O) t) -(weight_add_O t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map -(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))))))) -(\lambda (u: T).(\lambda (t: T).(eq_ind_r nat (weight_map (\lambda (_: -nat).O) t) (\lambda (n: nat).(lt (weight_map (\lambda (_: nat).O) t) (S (plus -(weight_map (\lambda (_: nat).O) u) n)))) (le_n_S (weight_map (\lambda (_: -nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: -nat).O) t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map -(\lambda (_: nat).O) t))) (weight_map (wadd (\lambda (_: nat).O) O) t) -(weight_add_O t)))) (\lambda (u: T).(\lambda (t: T).(eq_ind_r nat (weight_map -(\lambda (_: nat).O) t) (\lambda (n: nat).(lt (weight_map (\lambda (_: -nat).O) t) (S (plus (weight_map (\lambda (_: nat).O) u) n)))) (le_n_S -(weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) -(weight_map (\lambda (_: nat).O) t)) (le_plus_r (weight_map (\lambda (_: -nat).O) u) (weight_map (\lambda (_: nat).O) t))) (weight_map (wadd (\lambda -(_: nat).O) O) t) (weight_add_O t)))) b)) (\lambda (_: F).(\lambda (u: -T).(\lambda (t: T).(le_n_S (weight_map (\lambda (_: nat).O) t) (plus -(weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)) -(le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: -nat).O) t)))))) k). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/arity.ma deleted file mode 100644 index 438021239..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity.ma +++ /dev/null @@ -1,182 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/pr3_props.ma". - -include "basic_1/arity/pr3.ma". - -include "basic_1/asucc/fwd.ma". - -lemma ty3_arity: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c -t1 t2) \to (ex2 A (\lambda (a1: A).(arity g c t1 a1)) (\lambda (a1: A).(arity -g c t2 (asucc g a1)))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda -(t0: T).(ex2 A (\lambda (a1: A).(arity g c0 t a1)) (\lambda (a1: A).(arity g -c0 t0 (asucc g a1))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity -g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (u: -T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: (ex2 A -(\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g -a1))))).(\lambda (H4: (pc3 c0 t4 t3)).(let H5 \def H1 in (ex2_ind A (\lambda -(a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))) -(ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 -(asucc g a1)))) (\lambda (x: A).(\lambda (H6: (arity g c0 t3 x)).(\lambda (_: -(arity g c0 t (asucc g x))).(let H8 \def H3 in (ex2_ind A (\lambda (a1: -A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A -(\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g -a1)))) (\lambda (x0: A).(\lambda (H9: (arity g c0 u x0)).(\lambda (H10: -(arity g c0 t4 (asucc g x0))).(let H11 \def H4 in (ex2_ind T (\lambda (t0: -T).(pr3 c0 t4 t0)) (\lambda (t0: T).(pr3 c0 t3 t0)) (ex2 A (\lambda (a1: -A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) -(\lambda (x1: T).(\lambda (H12: (pr3 c0 t4 x1)).(\lambda (H13: (pr3 c0 t3 -x1)).(ex_intro2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity -g c0 t3 (asucc g a1))) x0 H9 (arity_repl g c0 t3 x H6 (asucc g x0) (leq_sym g -(asucc g x0) x (arity_mono g c0 x1 (asucc g x0) (arity_sred_pr3 c0 t4 x1 H12 -g (asucc g x0) H10) x (arity_sred_pr3 c0 t3 x1 H13 g x H6)))))))) H11))))) -H8))))) H5)))))))))))) (\lambda (c0: C).(\lambda (m: nat).(ex_intro2 A -(\lambda (a1: A).(arity g c0 (TSort m) a1)) (\lambda (a1: A).(arity g c0 -(TSort (next g m)) (asucc g a1))) (ASort O m) (arity_sort g c0 m) (arity_sort -g c0 (next g m))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) -u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A -(\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g -a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) -(\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g -c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g -a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (H5: (arity g -d t (asucc g x))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) -(\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g a1))) x (arity_abbr g -c0 d u n H0 x H4) (arity_lift g d t (asucc g x) H5 c0 (S n) O (getl_drop Abbr -c0 d u n H0)))))) H3)))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda -(d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) -u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A -(\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g -a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) -(\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g -c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g -a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (_: (arity g d -t (asucc g x))).(let H_x \def (leq_asucc g x) in (let H6 \def H_x in (ex_ind -A (\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g -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_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 (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)) -(\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity -g c0 (THead (Flat Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat -Cast) t0 t4) (asucc g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 t3 -x)).(\lambda (H6: (arity g c0 t4 (asucc g x))).(let H7 \def H3 in (ex2_ind A -(\lambda (a1: A).(arity g c0 t4 a1)) (\lambda (a1: A).(arity g c0 t0 (asucc g -a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t4 t3) a1)) -(\lambda (a1: A).(arity g c0 (THead (Flat Cast) t0 t4) (asucc g a1)))) -(\lambda (x0: A).(\lambda (H8: (arity g c0 t4 x0)).(\lambda (H9: (arity g c0 -t0 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Flat -Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t0 t4) -(asucc g a1))) x (arity_cast g c0 t4 x H6 t3 H5) (arity_cast g c0 t0 (asucc g -x) (arity_repl g c0 t0 (asucc g x0) H9 (asucc g (asucc g x)) (asucc_repl g x0 -(asucc g x) (arity_mono g c0 t4 x0 H8 (asucc g x) H6))) t4 H6))))) H7))))) -H4)))))))))) c t1 t2 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity_props.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/arity_props.ma deleted file mode 100644 index fb0df9eb3..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/arity_props.ma +++ /dev/null @@ -1,105 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/arity.ma". - -include "basic_1/sc3/arity.ma". - -lemma ty3_predicative: - \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (u: -T).((ty3 g c (THead (Bind Abst) v t) u) \to ((pc3 c u v) \to (\forall (P: -Prop).P))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (u: -T).(\lambda (H: (ty3 g c (THead (Bind Abst) v t) u)).(\lambda (H0: (pc3 c u -v)).(\lambda (P: Prop).(let H1 \def H in (ex3_2_ind T T (\lambda (t2: -T).(\lambda (_: T).(pc3 c (THead (Bind Abst) v t2) u))) (\lambda (_: -T).(\lambda (t0: T).(ty3 g c v t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) v) t t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda -(_: (pc3 c (THead (Bind Abst) v x0) u)).(\lambda (H3: (ty3 g c v -x1)).(\lambda (_: (ty3 g (CHead c (Bind Abst) v) t x0)).(let H_y \def -(ty3_conv g c v x1 H3 (THead (Bind Abst) v t) u H H0) in (let H_x \def -(ty3_arity g c (THead (Bind Abst) v t) v H_y) in (let H5 \def H_x in (ex2_ind -A (\lambda (a1: A).(arity g c (THead (Bind Abst) v t) a1)) (\lambda (a1: -A).(arity g c v (asucc g a1))) P (\lambda (x: A).(\lambda (H6: (arity g c -(THead (Bind Abst) v t) x)).(\lambda (H7: (arity g c v (asucc g x))).(let H8 -\def (arity_gen_abst g c v t x H6) in (ex3_2_ind A A (\lambda (a1: -A).(\lambda (a2: A).(eq A x (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: -A).(arity g c v (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g -(CHead c (Bind Abst) v) t a2))) P (\lambda (x2: A).(\lambda (x3: A).(\lambda -(H9: (eq A x (AHead x2 x3))).(\lambda (H10: (arity g c v (asucc g -x2))).(\lambda (_: (arity g (CHead c (Bind Abst) v) t x3)).(let H12 \def -(eq_ind A x (\lambda (a: A).(arity g c v (asucc g a))) H7 (AHead x2 x3) H9) -in (leq_ahead_asucc_false g x2 (asucc g x3) (arity_mono g c v (asucc g (AHead -x2 x3)) H12 (asucc g x2) H10) P))))))) H8))))) H5))))))))) (ty3_gen_bind g -Abst c v t u H1)))))))))). - -theorem ty3_repellent: - \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (t: T).(\forall (u1: -T).((ty3 g c (THead (Bind Abst) w t) u1) \to (\forall (u2: T).((ty3 g (CHead -c (Bind Abst) w) t (lift (S O) O u2)) \to ((pc3 c u1 u2) \to (\forall (P: -Prop).P))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (t: T).(\lambda (u1: -T).(\lambda (H: (ty3 g c (THead (Bind Abst) w t) u1)).(\lambda (u2: -T).(\lambda (H0: (ty3 g (CHead c (Bind Abst) w) t (lift (S O) O -u2))).(\lambda (H1: (pc3 c u1 u2)).(\lambda (P: Prop).(ex_ind T (\lambda (t0: -T).(ty3 g (CHead c (Bind Abst) w) (lift (S O) O u2) t0)) P (\lambda (x: -T).(\lambda (H2: (ty3 g (CHead c (Bind Abst) w) (lift (S O) O u2) x)).(let H3 -\def (ty3_gen_lift g (CHead c (Bind Abst) w) u2 x (S O) O H2 c (drop_drop -(Bind Abst) O c c (drop_refl c) w)) in (ex2_ind T (\lambda (t2: T).(pc3 -(CHead c (Bind Abst) w) (lift (S O) O t2) x)) (\lambda (t2: T).(ty3 g c u2 -t2)) P (\lambda (x0: T).(\lambda (_: (pc3 (CHead c (Bind Abst) w) (lift (S O) -O x0) x)).(\lambda (H5: (ty3 g c u2 x0)).(let H_y \def (ty3_conv g c u2 x0 H5 -(THead (Bind Abst) w t) u1 H H1) in (let H_x \def (ty3_arity g (CHead c (Bind -Abst) w) t (lift (S O) O u2) H0) in (let H6 \def H_x in (ex2_ind A (\lambda -(a1: A).(arity g (CHead c (Bind Abst) w) t a1)) (\lambda (a1: A).(arity g -(CHead c (Bind Abst) w) (lift (S O) O u2) (asucc g a1))) P (\lambda (x1: -A).(\lambda (H7: (arity g (CHead c (Bind Abst) w) t x1)).(\lambda (H8: (arity -g (CHead c (Bind Abst) w) (lift (S O) O u2) (asucc g x1))).(let H_x0 \def -(ty3_arity g c (THead (Bind Abst) w t) u2 H_y) in (let H9 \def H_x0 in -(ex2_ind A (\lambda (a1: A).(arity g c (THead (Bind Abst) w t) a1)) (\lambda -(a1: A).(arity g c u2 (asucc g a1))) P (\lambda (x2: A).(\lambda (H10: (arity -g c (THead (Bind Abst) w t) x2)).(\lambda (H11: (arity g c u2 (asucc g -x2))).(arity_repellent g c w t x1 H7 x2 H10 (asucc_inj g x1 x2 (arity_mono g -c u2 (asucc g x1) (arity_gen_lift g (CHead c (Bind Abst) w) u2 (asucc g x1) -(S O) O H8 c (drop_drop (Bind Abst) O c c (drop_refl c) w)) (asucc g x2) -H11)) P)))) H9)))))) H6))))))) H3)))) (ty3_correct g (CHead c (Bind Abst) w) -t (lift (S O) O u2) H0))))))))))). - -lemma ty3_acyclic: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t -u) \to ((pc3 c u t) \to (\forall (P: Prop).P)))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: -(ty3 g c t u)).(\lambda (H0: (pc3 c u t)).(\lambda (P: Prop).(let H_y \def -(ty3_conv g c t u H t u H H0) in (let H_x \def (ty3_arity g c t t H_y) in -(let H1 \def H_x in (ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda -(a1: A).(arity g c t (asucc g a1))) P (\lambda (x: A).(\lambda (H2: (arity g -c t x)).(\lambda (H3: (arity g c t (asucc g x))).(leq_asucc_false g x -(arity_mono g c t (asucc g x) H3 x H2) P)))) H1)))))))))). - -lemma ty3_sn3: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t -u) \to (sn3 c t))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: -(ty3 g c t u)).(let H_x \def (ty3_arity g c t u H) in (let H0 \def H_x in -(ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda (a1: A).(arity g c u -(asucc g a1))) (sn3 c t) (\lambda (x: A).(\lambda (H1: (arity g c t -x)).(\lambda (_: (arity g c u (asucc g x))).(sc3_sn3 g x c t (sc3_arity g c t -x H1))))) H0))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/dec.ma deleted file mode 100644 index 7b2c899d7..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/dec.ma +++ /dev/null @@ -1,431 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pc3/dec.ma". - -include "basic_1/getl/flt.ma". - -include "basic_1/getl/dec.ma". - -include "basic_1/flt/fwd.ma". - -lemma ty3_inference: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(or (ex T (\lambda (t2: -T).(ty3 g c t1 t2))) (\forall (t2: T).((ty3 g c t1 t2) \to False))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(flt_wf_ind (\lambda (c0: -C).(\lambda (t: T).(or (ex T (\lambda (t2: T).(ty3 g c0 t t2))) (\forall (t2: -T).((ty3 g c0 t t2) \to False))))) (\lambda (c2: C).(\lambda (t2: T).(T_ind -(\lambda (t: T).(((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 t) \to (or -(ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) -\to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall -(t3: T).((ty3 g c2 t t3) \to False))))) (\lambda (n: nat).(\lambda (_: -((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (TSort n)) \to (or (ex T -(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to -False)))))))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TSort n) t3))) -(\forall (t3: T).((ty3 g c2 (TSort n) t3) \to False)) (ex_intro T (\lambda -(t3: T).(ty3 g c2 (TSort n) t3)) (TSort (next g n)) (ty3_sort g c2 n))))) -(\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 -c2 (TLRef n)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: -T).((ty3 g c1 t3 t4) \to False)))))))).(let H_x \def (getl_dec c2 n) in (let -H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda -(v: T).(getl n c2 (CHead e (Bind b) v)))))) (\forall (d: C).((getl n c2 d) -\to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) -t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False))) (\lambda (H1: -(ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead -e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda -(v: T).(getl n c2 (CHead e (Bind b) v))))) (or (ex T (\lambda (t3: T).(ty3 g -c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False))) -(\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl n c2 -(CHead x0 (Bind x1) x2))).(let H3 \def (H x0 x2 (getl_flt x1 c2 x0 x2 n H2)) -in (or_ind (ex T (\lambda (t3: T).(ty3 g x0 x2 t3))) (\forall (t3: T).((ty3 g -x0 x2 t3) \to False)) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) -(\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False))) (\lambda (H4: (ex T -(\lambda (t3: T).(ty3 g x0 x2 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g x0 x2 -t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: -T).((ty3 g c2 (TLRef n) t3) \to False))) (\lambda (x: T).(\lambda (H5: (ty3 g -x0 x2 x)).(B_ind (\lambda (b: B).((getl n c2 (CHead x0 (Bind b) x2)) \to (or -(ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 -(TLRef n) t3) \to False))))) (\lambda (H6: (getl n c2 (CHead x0 (Bind Abbr) -x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall -(t3: T).((ty3 g c2 (TLRef n) t3) \to False)) (ex_intro T (\lambda (t3: -T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x) (ty3_abbr g n c2 x0 x2 H6 x -H5)))) (\lambda (H6: (getl n c2 (CHead x0 (Bind Abst) x2))).(or_introl (ex T -(\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef -n) t3) \to False)) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) -(lift (S n) O x2) (ty3_abst g n c2 x0 x2 H6 x H5)))) (\lambda (H6: (getl n c2 -(CHead x0 (Bind Void) x2))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 -(TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False)) -(\lambda (t3: T).(\lambda (H7: (ty3 g c2 (TLRef n) t3)).(or_ind (ex3_3 C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) -t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 -(lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl -n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: -T).(ty3 g e u t))))) False (\lambda (H8: (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind -C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O -t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t)))) False (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: -(pc3 c2 (lift (S n) O x5) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind -Abbr) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 -(Bind Void) x2) (\lambda (c0: C).(getl n c2 c0)) H6 (CHead x3 (Bind Abbr) x4) -(getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) -in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match -ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k -with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst -\Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) -I (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 -(CHead x3 (Bind Abbr) x4) H10)) in (False_ind False H13))))))))) H8)) -(\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) False -(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift -(S n) O x4) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abst) -x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind -Void) x2) (\lambda (c0: C).(getl n c2 c0)) H6 (CHead x3 (Bind Abst) x4) -(getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) -in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match -ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k -with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst -\Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) -I (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 -(CHead x3 (Bind Abst) x4) H10)) in (False_ind False H13))))))))) H8)) -(ty3_gen_lref g c2 t3 n H7)))))) x1 H2))) H4)) (\lambda (H4: ((\forall (t3: -T).((ty3 g x0 x2 t3) \to False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g -c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False)) -(\lambda (t3: T).(\lambda (H5: (ty3 g c2 (TLRef n) t3)).(or_ind (ex3_3 C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) -t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 -(lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl -n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: -T).(ty3 g e u t))))) False (\lambda (H6: (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind -C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O -t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t)))) False (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: -(pc3 c2 (lift (S n) O x5) t3)).(\lambda (H8: (getl n c2 (CHead x3 (Bind Abbr) -x4))).(\lambda (H9: (ty3 g x3 x4 x5)).(let H10 \def (eq_ind C (CHead x0 (Bind -x1) x2) (\lambda (c0: C).(getl n c2 c0)) H2 (CHead x3 (Bind Abbr) x4) -(getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in -(let H11 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) -\Rightarrow x0 | (CHead c0 _ _) \Rightarrow c0])) (CHead x0 (Bind x1) x2) -(CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead -x3 (Bind Abbr) x4) H8)) in ((let H12 \def (f_equal C B (\lambda (e: C).(match -e with [(CSort _) \Rightarrow x1 | (CHead _ k _) \Rightarrow (match k with -[(Bind b) \Rightarrow b | (Flat _) \Rightarrow x1])])) (CHead x0 (Bind x1) -x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 -(CHead x3 (Bind Abbr) x4) H8)) in ((let H13 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow x2 | (CHead _ _ t) \Rightarrow t])) -(CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 -(Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in (\lambda (_: (eq B x1 -Abbr)).(\lambda (H15: (eq C x0 x3)).(let H16 \def (eq_ind_r T x4 (\lambda (t: -T).(getl n c2 (CHead x3 (Bind Abbr) t))) H10 x2 H13) in (let H17 \def -(eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 H13) in (let H18 \def -(eq_ind_r C x3 (\lambda (c0: C).(getl n c2 (CHead c0 (Bind Abbr) x2))) H16 x0 -H15) in (let H19 \def (eq_ind_r C x3 (\lambda (c0: C).(ty3 g c0 x2 x5)) H17 -x0 H15) in (H4 x5 H19)))))))) H12)) H11))))))))) H6)) (\lambda (H6: (ex3_3 C -T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) -t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 -c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: -T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(ty3 g e u t)))) False (\lambda (x3: C).(\lambda (x4: -T).(\lambda (x5: T).(\lambda (H7: (pc3 c2 (lift (S n) O x4) t3)).(\lambda -(H8: (getl n c2 (CHead x3 (Bind Abst) x4))).(\lambda (H9: (ty3 g x3 x4 -x5)).(let H10 \def (eq_ind C (CHead x0 (Bind x1) x2) (\lambda (c0: C).(getl n -c2 c0)) H2 (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n -H2 (CHead x3 (Bind Abst) x4) H8)) in (let H11 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow x0 | (CHead c0 _ _) \Rightarrow c0])) -(CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 -(Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H12 \def (f_equal -C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow x1 | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -x1])])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 -(CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H13 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow x2 | (CHead -_ _ t) \Rightarrow t])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) -(getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in -(\lambda (_: (eq B x1 Abst)).(\lambda (H15: (eq C x0 x3)).(let H16 \def -(eq_ind_r T x4 (\lambda (t: T).(getl n c2 (CHead x3 (Bind Abst) t))) H10 x2 -H13) in (let H17 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 -H13) in (let H18 \def (eq_ind_r T x4 (\lambda (t: T).(pc3 c2 (lift (S n) O t) -t3)) H7 x2 H13) in (let H19 \def (eq_ind_r C x3 (\lambda (c0: C).(getl n c2 -(CHead c0 (Bind Abst) x2))) H16 x0 H15) in (let H20 \def (eq_ind_r C x3 -(\lambda (c0: C).(ty3 g c0 x2 x5)) H17 x0 H15) in (H4 x5 H20))))))))) H12)) -H11))))))))) H6)) (ty3_gen_lref g c2 t3 n H5)))))) H3)))))) H1)) (\lambda -(H1: ((\forall (d: C).((getl n c2 d) \to (\forall (P: Prop).P))))).(or_intror -(ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 -(TLRef n) t3) \to False)) (\lambda (t3: T).(\lambda (H2: (ty3 g c2 (TLRef n) -t3)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: -T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: -C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) False -(\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: -T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) False -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (lift -(S n) O x2) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abbr) -x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abbr) x1) H5 -False))))))) H3)) (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda -(u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T -(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) -t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t)))) False (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: -(pc3 c2 (lift (S n) O x1) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abst) -x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abst) x1) H5 -False))))))) H3)) (ty3_gen_lref g c2 t3 n H2)))))) H0))))) (\lambda (k: -K).(\lambda (t: T).(\lambda (_: ((((\forall (c1: C).(\forall (t3: T).((flt c1 -t3 c2 t) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: -T).((ty3 g c1 t3 t4) \to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g -c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to False)))))).(\lambda (t0: -T).(\lambda (_: ((((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 t0) \to -(or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 -t4) \to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) -(\forall (t3: T).((ty3 g c2 t0 t3) \to False)))))).(\lambda (H1: ((\forall -(c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead k t t0)) \to (or (ex T -(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to -False)))))))).(K_ind (\lambda (k0: K).(((\forall (c1: C).(\forall (t3: -T).((flt c1 t3 c2 (THead k0 t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 -t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False))))))) \to (or (ex T -(\lambda (t3: T).(ty3 g c2 (THead k0 t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead k0 t t0) t3) \to False))))) (\lambda (b: B).(\lambda (H2: ((\forall -(c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Bind b) t t0)) \to (or (ex T -(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to -False)))))))).(let H3 \def (H2 c2 t (flt_thead_sx (Bind b) c2 t t0)) in -(or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 -t t3) \to False)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) -t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to False))) -(\lambda (H4: (ex T (\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda -(t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) -t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to -False))) (\lambda (x: T).(\lambda (H5: (ty3 g c2 t x)).(let H6 \def (H2 -(CHead c2 (Bind b) t) t0 (flt_shift (Bind b) c2 t t0)) in (or_ind (ex T -(\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3))) (\forall (t3: T).((ty3 -g (CHead c2 (Bind b) t) t0 t3) \to False)) (or (ex T (\lambda (t3: T).(ty3 g -c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t -t0) t3) \to False))) (\lambda (H7: (ex T (\lambda (t3: T).(ty3 g (CHead c2 -(Bind b) t) t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) -t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) -(\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to False))) (\lambda -(x0: T).(\lambda (H8: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(or_introl (ex T -(\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 -g c2 (THead (Bind b) t t0) t3) \to False)) (ex_intro T (\lambda (t3: T).(ty3 -g c2 (THead (Bind b) t t0) t3)) (THead (Bind b) t x0) (ty3_bind g c2 t x H5 b -t0 x0 H8))))) H7)) (\lambda (H7: ((\forall (t3: T).((ty3 g (CHead c2 (Bind b) -t) t0 t3) \to False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead -(Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) -\to False)) (\lambda (t3: T).(\lambda (H8: (ty3 g c2 (THead (Bind b) t t0) -t3)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) -t t4) t3))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c2 t t5))) (\lambda (t4: -T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4))) False (\lambda (x0: -T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda -(_: (ty3 g c2 t x1)).(\lambda (H11: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(H7 -x0 H11)))))) (ty3_gen_bind g b c2 t t0 t3 H8)))))) H6)))) H4)) (\lambda (H4: -((\forall (t3: T).((ty3 g c2 t t3) \to False)))).(or_intror (ex T (\lambda -(t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Bind b) t t0) t3) \to False)) (\lambda (t3: T).(\lambda (H5: (ty3 g -c2 (THead (Bind b) t t0) t3)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: -T).(pc3 c2 (THead (Bind b) t t4) t3))) (\lambda (_: T).(\lambda (t5: T).(ty3 -g c2 t t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 -t4))) False (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead -(Bind b) t x0) t3)).(\lambda (H7: (ty3 g c2 t x1)).(\lambda (_: (ty3 g (CHead -c2 (Bind b) t) t0 x0)).(H4 x1 H7)))))) (ty3_gen_bind g b c2 t t0 t3 H5)))))) -H3)))) (\lambda (f: F).(\lambda (H2: ((\forall (c1: C).(\forall (t3: T).((flt -c1 t3 c2 (THead (Flat f) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 -t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False)))))))).(F_ind (\lambda -(f0: F).(((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Flat f0) t -t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 -g c1 t3 t4) \to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead -(Flat f0) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat f0) t t0) t3) -\to False))))) (\lambda (H3: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 -c2 (THead (Flat Appl) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 -t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False)))))))).(let H4 \def (H3 -c2 t (flt_thead_sx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: -T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to False)) (or (ex T -(\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (H5: (ex T -(\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t -t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) -(\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) -(\lambda (x: T).(\lambda (H6: (ty3 g c2 t x)).(let H7 \def (H3 c2 t0 -(flt_thead_dx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g -c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to False)) (or (ex T (\lambda -(t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Appl) t t0) t3) \to False))) (\lambda (H8: (ex T (\lambda (t3: -T).(ty3 g c2 t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T -(\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (x0: -T).(\lambda (H9: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 -t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) -(\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) -(\lambda (x1: T).(\lambda (H10: (ty3 g c2 x0 x1)).(ex_ind T (\lambda (t3: -T).(ty3 g c2 x t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t -t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to -False))) (\lambda (x2: T).(\lambda (H11: (ty3 g c2 x x2)).(let H12 \def -(ty3_sn3 g c2 x x2 H11) in (let H_x \def (nf2_sn3 c2 x H12) in (let H13 \def -H_x in (ex2_ind T (\lambda (u: T).(pr3 c2 x u)) (\lambda (u: T).(nf2 c2 u)) -(or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall -(t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (x3: -T).(\lambda (H14: (pr3 c2 x x3)).(\lambda (H15: (nf2 c2 x3)).(let H16 \def -(ty3_sred_pr3 c2 x x3 H14 g x2 H11) in (let H_x0 \def (pc3_abst_dec g c2 x0 -x1 H10 x3 x2 H16) in (let H17 \def H_x0 in (or_ind (ex4_2 T T (\lambda (u: -T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: -T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: -T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 -v2)))) (\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to False)) (or -(ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (H18: (ex4_2 -T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) -(\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) -(\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda -(v2: T).(nf2 c2 v2))))).(ex4_2_ind T T (\lambda (u: T).(\lambda (_: T).(pc3 -c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 -(THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 -v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))) (or (ex T (\lambda (t3: -T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Appl) t t0) t3) \to False))) (\lambda (x4: T).(\lambda (x5: -T).(\lambda (H19: (pc3 c2 x0 (THead (Bind Abst) x3 x4))).(\lambda (H20: (ty3 -g c2 (THead (Bind Abst) x5 x4) x1)).(\lambda (H21: (pr3 c2 x3 x5)).(\lambda -(_: (nf2 c2 x5)).(let H_y \def (nf2_pr3_unfold c2 x3 x5 H21 H15) in (let H23 -\def (eq_ind_r T x5 (\lambda (t3: T).(pr3 c2 x3 t3)) H21 x3 H_y) in (let H24 -\def (eq_ind_r T x5 (\lambda (t3: T).(ty3 g c2 (THead (Bind Abst) t3 x4) x1)) -H20 x3 H_y) in (or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) -t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to -False)) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3)) -(THead (Flat Appl) t (THead (Bind Abst) x3 x4)) (ty3_appl g c2 t x3 (ty3_tred -g c2 t x H6 x3 H14) t0 x4 (ty3_conv g c2 (THead (Bind Abst) x3 x4) x1 H24 t0 -x0 H9 H19))))))))))))) H18)) (\lambda (H18: ((\forall (u: T).((pc3 c2 x0 -(THead (Bind Abst) x3 u)) \to False)))).(or_intror (ex T (\lambda (t3: -T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Appl) t t0) t3) \to False)) (\lambda (t3: T).(\lambda (H19: (ty3 -g c2 (THead (Flat Appl) t t0) t3)).(ex3_2_ind T T (\lambda (u: T).(\lambda -(t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda -(u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: -T).(\lambda (_: T).(ty3 g c2 t u))) False (\lambda (x4: T).(\lambda (x5: -T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x4 x5)) -t3)).(\lambda (H21: (ty3 g c2 t0 (THead (Bind Abst) x4 x5))).(\lambda (H22: -(ty3 g c2 t x4)).(let H_y \def (ty3_unique g c2 t x4 H22 x H6) in (let H_y0 -\def (ty3_unique g c2 t0 (THead (Bind Abst) x4 x5) H21 x0 H9) in (H18 x5 -(pc3_t (THead (Bind Abst) x4 x5) c2 x0 (pc3_s c2 x0 (THead (Bind Abst) x4 x5) -H_y0) (THead (Bind Abst) x3 x5) (pc3_head_1 c2 x4 x3 (pc3_t x c2 x4 H_y x3 -(pc3_pr3_r c2 x x3 H14)) (Bind Abst) x5)))))))))) (ty3_gen_appl g c2 t t0 t3 -H19)))))) H17))))))) H13)))))) (ty3_correct g c2 t x H6)))) (ty3_correct g c2 -t0 x0 H9)))) H8)) (\lambda (H8: ((\forall (t3: T).((ty3 g c2 t0 t3) \to -False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t -t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to -False)) (\lambda (t3: T).(\lambda (H9: (ty3 g c2 (THead (Flat Appl) t t0) -t3)).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat -Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 -g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 -t u))) False (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead -(Flat Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (H11: (ty3 g c2 t0 -(THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c2 t x0)).(H8 (THead (Bind -Abst) x0 x1) H11)))))) (ty3_gen_appl g c2 t t0 t3 H9)))))) H7)))) H5)) -(\lambda (H5: ((\forall (t3: T).((ty3 g c2 t t3) \to False)))).(or_intror (ex -T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False)) (\lambda (t3: -T).(\lambda (H6: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(ex3_2_ind T T -(\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind -Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind -Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) False -(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t -(THead (Bind Abst) x0 x1)) t3)).(\lambda (_: (ty3 g c2 t0 (THead (Bind Abst) -x0 x1))).(\lambda (H9: (ty3 g c2 t x0)).(H5 x0 H9)))))) (ty3_gen_appl g c2 t -t0 t3 H6)))))) H4))) (\lambda (H3: ((\forall (c1: C).(\forall (t3: T).((flt -c1 t3 c2 (THead (Flat Cast) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 -t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False)))))))).(let H4 \def -(H3 c2 t (flt_thead_sx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: -T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to False)) (or (ex T -(\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) (\lambda (H5: (ex T -(\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t -t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) -(\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) -(\lambda (x: T).(\lambda (H6: (ty3 g c2 t x)).(let H7 \def (H3 c2 t0 -(flt_thead_dx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g -c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to False)) (or (ex T (\lambda -(t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Cast) t t0) t3) \to False))) (\lambda (H8: (ex T (\lambda (t3: -T).(ty3 g c2 t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T -(\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) (\lambda (x0: -T).(\lambda (H9: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 -t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) -(\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) -(\lambda (x1: T).(\lambda (H10: (ty3 g c2 x0 x1)).(let H_x \def (pc3_dec g c2 -x0 x1 H10 t x H6) in (let H11 \def H_x in (or_ind (pc3 c2 x0 t) ((pc3 c2 x0 -t) \to False) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) -t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) -(\lambda (H12: (pc3 c2 x0 t)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 -(THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) -t t0) t3) \to False)) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat -Cast) t t0) t3)) (THead (Flat Cast) x t) (ty3_cast g c2 t0 t (ty3_conv g c2 t -x H6 t0 x0 H9 H12) x H6)))) (\lambda (H12: (((pc3 c2 x0 t) \to -False))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) -t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False)) -(\lambda (t3: T).(\lambda (H13: (ty3 g c2 (THead (Flat Cast) t t0) -t3)).(ex3_ind T (\lambda (t4: T).(pc3 c2 (THead (Flat Cast) t4 t) t3)) -(\lambda (_: T).(ty3 g c2 t0 t)) (\lambda (t4: T).(ty3 g c2 t t4)) False -(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Flat Cast) x2 t) t3)).(\lambda -(H15: (ty3 g c2 t0 t)).(\lambda (H16: (ty3 g c2 t x2)).(let H_y \def -(ty3_unique g c2 t x2 H16 x H6) in (let H_y0 \def (ty3_unique g c2 t0 t H15 -x0 H9) in (H12 (ex2_sym T (pr3 c2 t) (pr3 c2 x0) H_y0)))))))) (ty3_gen_cast g -c2 t0 t t3 H13)))))) H11))))) (ty3_correct g c2 t0 x0 H9)))) H8)) (\lambda -(H8: ((\forall (t3: T).((ty3 g c2 t0 t3) \to False)))).(or_intror (ex T -(\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False)) (\lambda (t3: -T).(\lambda (H9: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(ex3_ind T (\lambda -(t4: T).(pc3 c2 (THead (Flat Cast) t4 t) t3)) (\lambda (_: T).(ty3 g c2 t0 -t)) (\lambda (t4: T).(ty3 g c2 t t4)) False (\lambda (x0: T).(\lambda (_: -(pc3 c2 (THead (Flat Cast) x0 t) t3)).(\lambda (H11: (ty3 g c2 t0 -t)).(\lambda (_: (ty3 g c2 t x0)).(H8 t H11))))) (ty3_gen_cast g c2 t0 t t3 -H9)))))) H7)))) H5)) (\lambda (H5: ((\forall (t3: T).((ty3 g c2 t t3) \to -False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t -t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to -False)) (\lambda (t3: T).(\lambda (H6: (ty3 g c2 (THead (Flat Cast) t t0) -t3)).(ex3_ind T (\lambda (t4: T).(pc3 c2 (THead (Flat Cast) t4 t) t3)) -(\lambda (_: T).(ty3 g c2 t0 t)) (\lambda (t4: T).(ty3 g c2 t t4)) False -(\lambda (x0: T).(\lambda (_: (pc3 c2 (THead (Flat Cast) x0 t) t3)).(\lambda -(_: (ty3 g c2 t0 t)).(\lambda (H9: (ty3 g c2 t x0)).(ex_ind T (\lambda (t4: -T).(ty3 g c2 x0 t4)) False (\lambda (x: T).(\lambda (_: (ty3 g c2 x0 x)).(H5 -x0 H9))) (ty3_correct g c2 t x0 H9)))))) (ty3_gen_cast g c2 t0 t t3 H6)))))) -H4))) f H2))) k H1))))))) t2))) c t1))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/defs.ma deleted file mode 100644 index 25311087d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/defs.ma +++ /dev/null @@ -1,49 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/G/defs.ma". - -include "basic_1/pc3/defs.ma". - -inductive ty3 (g: G): C \to (T \to (T \to Prop)) \def -| ty3_conv: \forall (c: C).(\forall (t2: T).(\forall (t: T).((ty3 g c t2 t) -\to (\forall (u: T).(\forall (t1: T).((ty3 g c u t1) \to ((pc3 c t1 t2) \to -(ty3 g c u t2)))))))) -| ty3_sort: \forall (c: C).(\forall (m: nat).(ty3 g c (TSort m) (TSort (next -g m)))) -| ty3_abbr: \forall (n: nat).(\forall (c: C).(\forall (d: C).(\forall (u: -T).((getl n c (CHead d (Bind Abbr) u)) \to (\forall (t: T).((ty3 g d u t) \to -(ty3 g c (TLRef n) (lift (S n) O t)))))))) -| ty3_abst: \forall (n: nat).(\forall (c: C).(\forall (d: C).(\forall (u: -T).((getl n c (CHead d (Bind Abst) u)) \to (\forall (t: T).((ty3 g d u t) \to -(ty3 g c (TLRef n) (lift (S n) O u)))))))) -| ty3_bind: \forall (c: C).(\forall (u: T).(\forall (t: T).((ty3 g c u t) \to -(\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c (Bind b) -u) t1 t2) \to (ty3 g c (THead (Bind b) u t1) (THead (Bind b) u t2))))))))) -| ty3_appl: \forall (c: C).(\forall (w: T).(\forall (u: T).((ty3 g c w u) \to -(\forall (v: T).(\forall (t: T).((ty3 g c v (THead (Bind Abst) u t)) \to (ty3 -g c (THead (Flat Appl) w v) (THead (Flat Appl) w (THead (Bind Abst) u -t))))))))) -| ty3_cast: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c t1 t2) -\to (\forall (t0: T).((ty3 g c t2 t0) \to (ty3 g c (THead (Flat Cast) t2 t1) -(THead (Flat Cast) t0 t2))))))). - -inductive tys3 (g: G) (c: C): TList \to (T \to Prop) \def -| tys3_nil: \forall (u: T).(\forall (u0: T).((ty3 g c u u0) \to (tys3 g c -TNil u))) -| tys3_cons: \forall (t: T).(\forall (u: T).((ty3 g c t u) \to (\forall (ts: -TList).((tys3 g c ts u) \to (tys3 g c (TCons t ts) u))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/fsubst0.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/fsubst0.ma deleted file mode 100644 index d6d6beb92..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/fsubst0.ma +++ /dev/null @@ -1,975 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/props.ma". - -include "basic_1/pc3/fsubst0.ma". - -include "basic_1/getl/getl.ma". - -lemma ty3_fsubst0: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 -t1 t) \to (\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: -T).((fsubst0 i u c1 t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind -Abbr) u)) \to (ty3 g c2 t2 t)))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda -(H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda -(t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: -T).((fsubst0 i u c t0 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind -Abbr) u)) \to (ty3 g c2 t3 t2))))))))))) (\lambda (c: C).(\lambda (t2: -T).(\lambda (t0: T).(\lambda (H0: (ty3 g c t2 t0)).(\lambda (H1: ((\forall -(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 -c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 -t3 t0)))))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 g c u -t3)).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: -C).(\forall (t4: T).((fsubst0 i u0 c u c2 t4) \to (\forall (e: C).((getl i c -(CHead e (Bind Abbr) u0)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (H4: (pc3 c -t3 t2)).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: -T).(\lambda (H5: (fsubst0 i u0 c u c2 t4)).(fsubst0_ind i u0 c u (\lambda -(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) -\to (ty3 g c0 t5 t2))))) (\lambda (t5: T).(\lambda (H6: (subst0 i u0 u -t5)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) -u0))).(ty3_conv g c t2 t0 H0 t5 t3 (H3 i u0 c t5 (fsubst0_snd i u0 c u t5 H6) -e H7) H4))))) (\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda -(e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c3 t2 -t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H6) e H7) u t3 (H3 i u0 c3 u -(fsubst0_fst i u0 c u c3 H6) e H7) (pc3_fsubst0 c t3 t2 H4 i u0 c3 t3 -(fsubst0_fst i u0 c t3 c3 H6) e H7)))))) (\lambda (t5: T).(\lambda (H6: -(subst0 i u0 u t5)).(\lambda (c3: C).(\lambda (H7: (csubst0 i u0 c -c3)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) -u0))).(ty3_conv g c3 t2 t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H7) e H8) -t5 t3 (H3 i u0 c3 t5 (fsubst0_both i u0 c u t5 H6 c3 H7) e H8) (pc3_fsubst0 c -t3 t2 H4 i u0 c3 t3 (fsubst0_fst i u0 c t3 c3 H7) e H8)))))))) c2 t4 -H5)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (i: -nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H0: (fsubst0 -i u c (TSort m) c2 t2)).(fsubst0_ind i u c (TSort m) (\lambda (c0: -C).(\lambda (t0: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to -(ty3 g c0 t0 (TSort (next g m))))))) (\lambda (t3: T).(\lambda (H1: (subst0 i -u (TSort m) t3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) -u))).(subst0_gen_sort u t3 i m H1 (ty3 g c t3 (TSort (next g m)))))))) -(\lambda (c3: C).(\lambda (_: (csubst0 i u c c3)).(\lambda (e: C).(\lambda -(_: (getl i c (CHead e (Bind Abbr) u))).(ty3_sort g c3 m))))) (\lambda (t3: -T).(\lambda (H1: (subst0 i u (TSort m) t3)).(\lambda (c3: C).(\lambda (_: -(csubst0 i u c c3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind -Abbr) u))).(subst0_gen_sort u t3 i m H1 (ty3 g c3 t3 (TSort (next g -m)))))))))) c2 t2 H0)))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda -(t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: ((\forall (i: -nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 -t2) \to (\forall (e: C).((getl i d (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 -t0)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda -(t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) c2 t2)).(fsubst0_ind i u0 c -(TLRef n) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead -e (Bind Abbr) u0)) \to (ty3 g c0 t3 (lift (S n) O t0)))))) (\lambda (t3: -T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (e: C).(\lambda (H5: -(getl i c (CHead e (Bind Abbr) u0))).(land_ind (eq nat n i) (eq T t3 (lift (S -n) O u0)) (ty3 g c t3 (lift (S n) O t0)) (\lambda (H6: (eq nat n i)).(\lambda -(H7: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: -T).(ty3 g c t4 (lift (S n) O t0))) (let H8 \def (eq_ind_r nat i (\lambda (n0: -nat).(getl n0 c (CHead e (Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C -(CHead d (Bind Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind -Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) -H8)) in (let H10 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) -(CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e -(Bind Abbr) u0) H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match -e0 with [(CSort _) \Rightarrow u | (CHead _ _ t4) \Rightarrow t4])) (CHead d -(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) -n H0 (CHead e (Bind Abbr) u0) H8)) in (\lambda (H12: (eq C d e)).(let H13 -\def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H9 -d H12) in (let H14 \def (eq_ind_r T u0 (\lambda (t4: T).(getl n c (CHead d -(Bind Abbr) t4))) H13 u H11) in (eq_ind T u (\lambda (t4: T).(ty3 g c (lift -(S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c O (S n) (getl_drop -Abbr c d u n H14)) u0 H11))))) H10)))) t3 H7))) (subst0_gen_lref u0 t3 i n -H4)))))) (\lambda (c3: C).(\lambda (H4: (csubst0 i u0 c c3)).(\lambda (e: -C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(lt_le_e n i (ty3 g c3 -(TLRef n) (lift (S n) O t0)) (\lambda (H6: (lt n i)).(let H7 \def -(csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind -(getl n c3 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) -u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda -(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl -n c3 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) (ty3 g c3 (TLRef n) (lift (S -n) O t0)) (\lambda (H8: (getl n c3 (CHead d (Bind Abbr) u))).(ty3_abbr g n c3 -d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 -(Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 -w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w))))) (ty3 g c3 (TLRef n) -(lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 -(Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind x0) x3))).(\lambda -(H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda -(e0: C).(match e0 with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow -c0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in -((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u | (CHead _ _ t3) \Rightarrow t3])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: -(eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t3: T).(subst0 (minus i -(S n)) u0 t3 x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c0: -C).(getl n c3 (CHead c0 (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r -B x0 (\lambda (b: B).(getl n c3 (CHead d (Bind b) x3))) H18 Abbr H15) in (let -H20 \def (eq_ind nat (minus i n) (\lambda (n0: nat).(getl n0 (CHead d (Bind -Abbr) x3) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) -c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) -(CHead d (Bind Abbr) x3) n H19 (le_S_n n i (le_S_n (S n) (S i) (le_S (S (S -n)) (S i) (le_n_S (S n) i H6))))) (S (minus i (S n))) (minus_x_Sy i n H6)) in -(ty3_abbr g n c3 d x3 H19 t0 (H2 (minus i (S n)) u0 d x3 (fsubst0_snd (minus -i (S n)) u0 d u x3 H17) e (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) -x3 (minus i (S n)) H20)))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 -B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq -C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 -(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda -(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind -Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -u0 e1 e2))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: -B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 -(CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i (S n)) u0 x1 -x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) -\Rightarrow t3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in -(\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def -(eq_ind_r T x3 (\lambda (t3: T).(getl n c3 (CHead x2 (Bind x0) t3))) H10 u -H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus i (S -n)) u0 c0 x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: -B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abbr H15) in (let H20 \def (eq_ind -nat (minus i n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind Abbr) u) (CHead e -(Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 -(csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead -x2 (Bind Abbr) u) n H19 (le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) -(le_n_S (S n) i H6))))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr -g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) -u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n -(minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) -x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) H13)) -H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind -Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) u0 e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) -(\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda -(x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: -(subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 -x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) -(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead -d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) -\Rightarrow t3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in -(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def -(eq_ind_r T x3 (\lambda (t3: T).(subst0 (minus i (S n)) u0 t3 x4)) H11 u H15) -in (let H19 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus i (S n)) u0 -c0 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 -(CHead x2 (Bind b) x4))) H10 Abbr H16) in (let H21 \def (eq_ind nat (minus i -n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind Abbr) x4) (CHead e (Bind Abbr) -u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n -i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abbr) x4) n H20 -(le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) (le_n_S (S n) i H6))))) -(S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 x2 x4 H20 t0 (H2 -(minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) -e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S -n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) x2 (CHead e -(Bind Abbr) u0) x4 (minus i (S n)) H21))))))))))) H14)) H13))))))))))) H8)) -H7))) (\lambda (H6: (le i n)).(ty3_abbr g n c3 d u (csubst0_getl_ge i n H6 c -c3 u0 H4 (CHead d (Bind Abbr) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda -(H4: (subst0 i u0 (TLRef n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 -c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) -u0))).(land_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift -(S n) O t0)) (\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O -u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) -O t0))) (let H9 \def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c (CHead e -(Bind Abbr) u0))) H6 n H7) in (let H10 \def (eq_ind_r nat i (\lambda (n0: -nat).(csubst0 n0 u0 c c3)) H5 n H7) in (let H11 \def (eq_ind C (CHead d (Bind -Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) -(getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in -(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) -(CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e -(Bind Abbr) u0) H9)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match -e0 with [(CSort _) \Rightarrow u | (CHead _ _ t4) \Rightarrow t4])) (CHead d -(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) -n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H14: (eq C d e)).(let H15 -\def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H11 -d H14) in (let H16 \def (eq_ind_r T u0 (\lambda (t4: T).(getl n c (CHead d -(Bind Abbr) t4))) H15 u H13) in (let H17 \def (eq_ind_r T u0 (\lambda (t4: -T).(csubst0 n t4 c c3)) H10 u H13) in (eq_ind T u (\lambda (t4: T).(ty3 g c3 -(lift (S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c3 O (S n) -(getl_drop Abbr c3 d u n (csubst0_getl_ge n n (le_n n) c c3 u H17 (CHead d -(Bind Abbr) u) H16))) u0 H13)))))) H12))))) t3 H8))) (subst0_gen_lref u0 t3 i -n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (n: nat).(\lambda (c: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind -Abst) u))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: -((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: -T).((fsubst0 i u0 d u c2 t2) \to (\forall (e: C).((getl i d (CHead e (Bind -Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u0: -T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) -c2 t2)).(fsubst0_ind i u0 c (TLRef n) (\lambda (c0: C).(\lambda (t3: -T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 -(lift (S n) O u)))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) -t3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) -u0))).(land_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c t3 (lift (S -n) O u)) (\lambda (H6: (eq nat n i)).(\lambda (H7: (eq T t3 (lift (S n) O -u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c t4 (lift (S n) -O u))) (let H8 \def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c (CHead e -(Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) -(\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c -(CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (let H10 \def -(eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind -Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) -H8)) in (False_ind (ty3 g c (lift (S n) O u0) (lift (S n) O u)) H10)))) t3 -H7))) (subst0_gen_lref u0 t3 i n H4)))))) (\lambda (c3: C).(\lambda (H4: -(csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind -Abbr) u0))).(lt_le_e n i (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H6: -(lt n i)).(let H7 \def (csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind -Abst) u) H0) in (or4_ind (getl n c3 (CHead d (Bind Abst) u)) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i (S n)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 -(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) -u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(getl n c3 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) -(ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H8: (getl n c3 (CHead d (Bind -Abst) u))).(ty3_abst g n c3 d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i (S n)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead -e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) -u0 u1 w))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda -(x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind -Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind -x0) x3))).(\lambda (H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def -(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | -(CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) -x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 with -[(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with [(Bind -b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) -(CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) \Rightarrow t3])) -(CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B -Abst x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda -(t3: T).(subst0 (minus i (S n)) u0 t3 x3)) H11 u H14) in (let H18 \def -(eq_ind_r C x1 (\lambda (c0: C).(getl n c3 (CHead c0 (Bind x0) x3))) H10 d -H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead d -(Bind b) x3))) H18 Abst H15) in (let H20 \def (eq_ind nat (minus i n) -(\lambda (n0: nat).(getl n0 (CHead d (Bind Abst) x3) (CHead e (Bind Abbr) -u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n -i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead d (Bind Abst) x3) n H19 -(le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) (le_n_S (S n) i H6))))) -(S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) -(lift (S n) O t0) (ty3_lift g d u t0 H1 c3 O (S n) (getl_drop Abst c3 d x3 n -H19)) (TLRef n) (lift (S n) O x3) (ty3_abst g n c3 d x3 H19 t0 (H2 (minus i -(S n)) u0 d x3 (fsubst0_snd (minus i (S n)) u0 d u x3 H17) e (getl_gen_S -(Bind Abst) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20))) (pc3_lift c3 -d (S n) O (getl_drop Abst c3 d x3 n H19) x3 u (pc3_pr2_x d x3 u (pr2_delta d -e u0 (r (Bind Abst) (minus i (S n))) (getl_gen_S (Bind Abst) d (CHead e (Bind -Abbr) u0) x3 (minus i (S n)) H20) u u (pr0_refl u) x3 H17))))))))))) H13)) -H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 -(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 -e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 -(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))) (ty3 g c3 (TLRef n) -(lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda -(x3: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) -x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x3))).(\lambda (H11: -(csubst0 (minus i (S n)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) -(CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def -(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abst | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) -\Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in -((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow u | (CHead _ _ t3) \Rightarrow t3])) (CHead d (Bind Abst) u) -(CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abst x0)).(\lambda (H16: -(eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t3: T).(getl n c3 (CHead -x2 (Bind x0) t3))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c0: -C).(csubst0 (minus i (S n)) u0 c0 x2)) H11 d H16) in (let H19 \def (eq_ind_r -B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abst H15) in (let -H20 \def (eq_ind nat (minus i n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind -Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) -c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) -(CHead x2 (Bind Abst) u) n H19 (le_S_n n i (le_S_n (S n) (S i) (le_S (S (S -n)) (S i) (le_n_S (S n) i H6))))) (S (minus i (S n))) (minus_x_Sy i n H6)) in -(ty3_abst g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus -i (S n)) u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S -n)) (le_n (minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S -(Bind Abst) x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) -H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) u0 e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda -(x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) -x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: -(subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 -x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abst) u) -(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: -C).(match e0 with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead -d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T -(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) -\Rightarrow t3])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in -(\lambda (H16: (eq B Abst x0)).(\lambda (H17: (eq C d x1)).(let H18 \def -(eq_ind_r T x3 (\lambda (t3: T).(subst0 (minus i (S n)) u0 t3 x4)) H11 u H15) -in (let H19 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus i (S n)) u0 -c0 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 -(CHead x2 (Bind b) x4))) H10 Abst H16) in (let H21 \def (eq_ind nat (minus i -n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind Abst) x4) (CHead e (Bind Abbr) -u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n -i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abst) x4) n H20 -(le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) (le_n_S (S n) i H6))))) -(S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) -(lift (S n) O t0) (ty3_lift g x2 u t0 (H2 (minus i (S n)) u0 x2 u -(fsubst0_fst (minus i (S n)) u0 d u x2 H19) e (csubst0_getl_ge_back (minus i -(S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind -Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S -n)) H21))) c3 O (S n) (getl_drop Abst c3 x2 x4 n H20)) (TLRef n) (lift (S n) -O x4) (ty3_abst g n c3 x2 x4 H20 t0 (H2 (minus i (S n)) u0 x2 x4 -(fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back -(minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e -(Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus -i (S n)) H21)))) (pc3_lift c3 x2 (S n) O (getl_drop Abst c3 x2 x4 n H20) x4 u -(pc3_fsubst0 d u u (pc3_refl d u) (minus i (S n)) u0 x2 x4 (fsubst0_both -(minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) -(minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) -(getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) -H21)))))))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i -n)).(ty3_abst g n c3 d u (csubst0_getl_ge i n H6 c c3 u0 H4 (CHead d (Bind -Abst) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef -n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: -C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(land_ind (eq nat n i) -(eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift (S n) O u)) (\lambda (H7: (eq -nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) -O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) O u))) (let H9 \def (eq_ind_r -nat i (\lambda (n0: nat).(getl n0 c (CHead e (Bind Abbr) u0))) H6 n H7) in -(let H10 \def (eq_ind_r nat i (\lambda (n0: nat).(csubst0 n0 u0 c c3)) H5 n -H7) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl -n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n -H0 (CHead e (Bind Abbr) u0) H9)) in (let H12 \def (eq_ind C (CHead d (Bind -Abst) u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | -(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with -[Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | -(Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c -(CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ty3 -g c3 (lift (S n) O u0) (lift (S n) O u)) H12))))) t3 H8))) (subst0_gen_lref -u0 t3 i n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (c: C).(\lambda (u: -T).(\lambda (t0: T).(\lambda (H0: (ty3 g c u t0)).(\lambda (H1: ((\forall (i: -nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 -t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 -t0)))))))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: -(ty3 g (CHead c (Bind b) u) t2 t3)).(\lambda (H3: ((\forall (i: nat).(\forall -(u0: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u0 (CHead c (Bind b) u) -t2 c2 t4) \to (\forall (e: C).((getl i (CHead c (Bind b) u) (CHead e (Bind -Abbr) u0)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (i: nat).(\lambda (u0: -T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H4: (fsubst0 i u0 c (THead -(Bind b) u t2) c2 t4)).(fsubst0_ind i u0 c (THead (Bind b) u t2) (\lambda -(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) -\to (ty3 g c0 t5 (THead (Bind b) u t3)))))) (\lambda (t5: T).(\lambda (H5: -(subst0 i u0 (THead (Bind b) u t2) t5)).(\lambda (e: C).(\lambda (H6: (getl i -c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead -(Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t6: -T).(eq T t5 (THead (Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) -u0 t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead -(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6)))) (ty3 g c -t5 (THead (Bind b) u t3)) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t5 -(THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T -(\lambda (u2: T).(eq T t5 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i -u0 u u2)) (ty3 g c t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H8: -(eq T t5 (THead (Bind b) x t2))).(\lambda (H9: (subst0 i u0 u x)).(eq_ind_r T -(THead (Bind b) x t2) (\lambda (t6: T).(ty3 g c t6 (THead (Bind b) u t3))) -(ex_ind T (\lambda (t6: T).(ty3 g (CHead c (Bind b) u) t3 t6)) (ty3 g c -(THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H10: -(ty3 g (CHead c (Bind b) u) t3 x0)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead -c (Bind b) x) t3 t6)) (ty3 g c (THead (Bind b) x t2) (THead (Bind b) u t3)) -(\lambda (x1: T).(\lambda (_: (ty3 g (CHead c (Bind b) x) t3 x1)).(ty3_conv g -c (THead (Bind b) u t3) (THead (Bind b) u x0) (ty3_bind g c u t0 H0 b t3 x0 -H10) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c x t0 (H1 i u0 -c x (fsubst0_snd i u0 c u x H9) e H6) b t2 t3 (H3 (S i) u0 (CHead c (Bind b) -x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c (Bind b) x) -(csubst0_snd_bind b i u0 u x H9 c)) e (getl_head (Bind b) i c (CHead e (Bind -Abbr) u0) H6 u))) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) -(pc3_refl c (THead (Bind b) u t3)) i u0 c (THead (Bind b) x t3) (fsubst0_snd -i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) (subst0_fst u0 x u i H9 t3 -(Bind b))) e H6)))) (ty3_correct g (CHead c (Bind b) x) t2 t3 (H3 (S i) u0 -(CHead c (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead -c (Bind b) x) (csubst0_snd_bind b i u0 u x H9 c)) e (getl_head (Bind b) i c -(CHead e (Bind Abbr) u0) H6 u)))))) (ty3_correct g (CHead c (Bind b) u) t2 t3 -H2)) t5 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t6: T).(eq T t5 (THead -(Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 -t6)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Bind b) u t6))) (\lambda -(t6: T).(subst0 (s (Bind b) i) u0 t2 t6)) (ty3 g c t5 (THead (Bind b) u t3)) -(\lambda (x: T).(\lambda (H8: (eq T t5 (THead (Bind b) u x))).(\lambda (H9: -(subst0 (s (Bind b) i) u0 t2 x)).(eq_ind_r T (THead (Bind b) u x) (\lambda -(t6: T).(ty3 g c t6 (THead (Bind b) u t3))) (ex_ind T (\lambda (t6: T).(ty3 g -(CHead c (Bind b) u) t3 t6)) (ty3 g c (THead (Bind b) u x) (THead (Bind b) u -t3)) (\lambda (x0: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t3 -x0)).(ty3_bind g c u t0 H0 b x t3 (H3 (S i) u0 (CHead c (Bind b) u) x -(fsubst0_snd (S i) u0 (CHead c (Bind b) u) t2 x H9) e (getl_head (Bind b) i c -(CHead e (Bind Abbr) u0) H6 u))))) (ty3_correct g (CHead c (Bind b) u) x t3 -(H3 (S i) u0 (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) -u) t2 x H9) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H6 u)))) t5 -H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T -t5 (THead (Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u -u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 -t6))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead -(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6))) (ty3 g c -t5 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq -T t5 (THead (Bind b) x0 x1))).(\lambda (H9: (subst0 i u0 u x0)).(\lambda -(H10: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) -(\lambda (t6: T).(ty3 g c t6 (THead (Bind b) u t3))) (ex_ind T (\lambda (t6: -T).(ty3 g (CHead c (Bind b) u) t3 t6)) (ty3 g c (THead (Bind b) x0 x1) (THead -(Bind b) u t3)) (\lambda (x: T).(\lambda (H11: (ty3 g (CHead c (Bind b) u) t3 -x)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c (Bind b) x0) t3 t6)) (ty3 g c -(THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (_: -(ty3 g (CHead c (Bind b) x0) t3 x2)).(ty3_conv g c (THead (Bind b) u t3) -(THead (Bind b) u x) (ty3_bind g c u t0 H0 b t3 x H11) (THead (Bind b) x0 x1) -(THead (Bind b) x0 t3) (ty3_bind g c x0 t0 (H1 i u0 c x0 (fsubst0_snd i u0 c -u x0 H9) e H6) b x1 t3 (H3 (S i) u0 (CHead c (Bind b) x0) x1 (fsubst0_both (S -i) u0 (CHead c (Bind b) u) t2 x1 H10 (CHead c (Bind b) x0) (csubst0_snd_bind -b i u0 u x0 H9 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H6 u))) -(pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead -(Bind b) u t3)) i u0 c (THead (Bind b) x0 t3) (fsubst0_snd i u0 c (THead -(Bind b) u t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H9 t3 (Bind b))) -e H6)))) (ty3_correct g (CHead c (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c -(Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H10 (CHead -c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H9 c)) e (getl_head (Bind b) i c -(CHead e (Bind Abbr) u0) H6 u)))))) (ty3_correct g (CHead c (Bind b) u) t2 t3 -H2)) t5 H8)))))) H7)) (subst0_gen_head (Bind b) u0 u t2 t5 i H5)))))) -(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda -(H6: (getl i c (CHead e (Bind Abbr) u0))).(ex_ind T (\lambda (t5: T).(ty3 g -(CHead c3 (Bind b) u) t3 t5)) (ty3 g c3 (THead (Bind b) u t2) (THead (Bind b) -u t3)) (\lambda (x: T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) t3 -x)).(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H5) e H6) b t2 -t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind -b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H5 u)) e -(getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H6 u))))) (ty3_correct g -(CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 -(fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) -(csubst0_fst_bind b i c c3 u0 H5 u)) e (getl_head (Bind b) i c (CHead e (Bind -Abbr) u0) H6 u)))))))) (\lambda (t5: T).(\lambda (H5: (subst0 i u0 (THead -(Bind b) u t2) t5)).(\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c -c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) -u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead (Bind b) u2 t2))) -(\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead -(Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Bind b) u2 t6)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6)))) (ty3 g c3 t5 (THead -(Bind b) u t3)) (\lambda (H8: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Bind -b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: -T).(eq T t5 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)) -(ty3 g c3 t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H9: (eq T t5 -(THead (Bind b) x t2))).(\lambda (H10: (subst0 i u0 u x)).(eq_ind_r T (THead -(Bind b) x t2) (\lambda (t6: T).(ty3 g c3 t6 (THead (Bind b) u t3))) (ex_ind -T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) t3 t6)) (ty3 g c3 (THead -(Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H11: (ty3 g -(CHead c3 (Bind b) u) t3 x0)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 -(Bind b) u) x0 t6)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) -(\lambda (x1: T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) x0 x1)).(ex_ind T -(\lambda (t6: T).(ty3 g (CHead c3 (Bind b) x) t3 t6)) (ty3 g c3 (THead (Bind -b) x t2) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (_: (ty3 g (CHead -c3 (Bind b) x) t3 x2)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u -x0) (ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) b t3 -x0 H11) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c3 x t0 (H1 i -u0 c3 x (fsubst0_both i u0 c u x H10 c3 H6) e H7) b t2 t3 (H3 (S i) u0 (CHead -c3 (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 -(Bind b) x) (csubst0_both_bind b i u0 u x H10 c c3 H6)) e (getl_head (Bind b) -i c (CHead e (Bind Abbr) u0) H7 u))) (pc3_fsubst0 c (THead (Bind b) u t3) -(THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c3 (THead (Bind -b) x t3) (fsubst0_both i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) -(subst0_fst u0 x u i H10 t3 (Bind b)) c3 H6) e H7)))) (ty3_correct g (CHead -c3 (Bind b) x) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) x) t2 (fsubst0_fst (S i) -u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) x) (csubst0_both_bind b i u0 u -x H10 c c3 H6)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))))) -(ty3_correct g (CHead c3 (Bind b) u) t3 x0 H11)))) (ty3_correct g (CHead c3 -(Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 -(CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 -H6 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))) t5 H9)))) -H8)) (\lambda (H8: (ex2 T (\lambda (t6: T).(eq T t5 (THead (Bind b) u t6))) -(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6)))).(ex2_ind T (\lambda (t6: -T).(eq T t5 (THead (Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) -u0 t2 t6)) (ty3 g c3 t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H9: -(eq T t5 (THead (Bind b) u x))).(\lambda (H10: (subst0 (s (Bind b) i) u0 t2 -x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t6: T).(ty3 g c3 t6 (THead -(Bind b) u t3))) (ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) t3 -t6)) (ty3 g c3 (THead (Bind b) u x) (THead (Bind b) u t3)) (\lambda (x0: -T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) t3 x0)).(ty3_bind g c3 u t0 (H1 -i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) b x t3 (H3 (S i) u0 (CHead c3 -(Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x H10 (CHead c3 -(Bind b) u) (csubst0_fst_bind b i c c3 u0 H6 u)) e (getl_head (Bind b) i c -(CHead e (Bind Abbr) u0) H7 u))))) (ty3_correct g (CHead c3 (Bind b) u) x t3 -(H3 (S i) u0 (CHead c3 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) -u) t2 x H10 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H6 u)) e -(getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))) t5 H9)))) H8)) -(\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead -(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 -t6))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead -(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) -(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6))) (ty3 g c3 -t5 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq -T t5 (THead (Bind b) x0 x1))).(\lambda (H10: (subst0 i u0 u x0)).(\lambda -(H11: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) -(\lambda (t6: T).(ty3 g c3 t6 (THead (Bind b) u t3))) (ex_ind T (\lambda (t6: -T).(ty3 g (CHead c3 (Bind b) u) t3 t6)) (ty3 g c3 (THead (Bind b) x0 x1) -(THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H12: (ty3 g (CHead c3 (Bind -b) u) t3 x)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) x t6)) -(ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: -T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) x x2)).(ex_ind T (\lambda (t6: -T).(ty3 g (CHead c3 (Bind b) x0) t3 t6)) (ty3 g c3 (THead (Bind b) x0 x1) -(THead (Bind b) u t3)) (\lambda (x3: T).(\lambda (_: (ty3 g (CHead c3 (Bind -b) x0) t3 x3)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u x) -(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) b t3 x -H12) (THead (Bind b) x0 x1) (THead (Bind b) x0 t3) (ty3_bind g c3 x0 t0 (H1 i -u0 c3 x0 (fsubst0_both i u0 c u x0 H10 c3 H6) e H7) b x1 t3 (H3 (S i) u0 -(CHead c3 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 -H11 (CHead c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H10 c c3 H6)) e -(getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u))) (pc3_fsubst0 c -(THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u -t3)) i u0 c3 (THead (Bind b) x0 t3) (fsubst0_both i u0 c (THead (Bind b) u -t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H10 t3 (Bind b)) c3 H6) e -H7)))) (ty3_correct g (CHead c3 (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c3 -(Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H11 (CHead -c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H10 c c3 H6)) e (getl_head -(Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))))) (ty3_correct g (CHead c3 -(Bind b) u) t3 x H12)))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) -u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 -(CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H6 u)) e (getl_head (Bind -b) i c (CHead e (Bind Abbr) u0) H7 u)))) t5 H9)))))) H8)) (subst0_gen_head -(Bind b) u0 u t2 t5 i H5)))))))) c2 t4 H4)))))))))))))))) (\lambda (c: -C).(\lambda (w: T).(\lambda (u: T).(\lambda (H0: (ty3 g c w u)).(\lambda (H1: -((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: -T).((fsubst0 i u0 c w c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind -Abbr) u0)) \to (ty3 g c2 t2 u)))))))))).(\lambda (v: T).(\lambda (t0: -T).(\lambda (H2: (ty3 g c v (THead (Bind Abst) u t0))).(\lambda (H3: -((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: -T).((fsubst0 i u0 c v c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind -Abbr) u0)) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))))))).(\lambda (i: -nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: -(fsubst0 i u0 c (THead (Flat Appl) w v) c2 t2)).(fsubst0_ind i u0 c (THead -(Flat Appl) w v) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c -(CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (THead (Flat Appl) w (THead (Bind -Abst) u t0))))))) (\lambda (t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat -Appl) w v) t3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) -u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) -(\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead -(Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: -T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) (ty3 g c t3 (THead -(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H7: (ex2 T (\lambda (u2: -T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w -u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) -(\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c t3 (THead (Flat Appl) w (THead -(Bind Abst) u t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) -x v))).(\lambda (H9: (subst0 i u0 w x)).(eq_ind_r T (THead (Flat Appl) x v) -(\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) -(ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind Abst) u t0) t4)) (ty3 g c -(THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) -(\lambda (x0: T).(\lambda (H10: (ty3 g c (THead (Bind Abst) u t0) -x0)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c (THead (Bind -Abst) u t4) x0))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c u t5))) (\lambda -(t4: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 t4))) (ty3 g c -(THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) -(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c (THead (Bind Abst) u -x1) x0)).(\lambda (_: (ty3 g c u x2)).(\lambda (H13: (ty3 g (CHead c (Bind -Abst) u) t0 x1)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) (ty3 g c (THead -(Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda -(x3: T).(\lambda (H14: (ty3 g c u x3)).(ty3_conv g c (THead (Flat Appl) w -(THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) -(ty3_appl g c w u H0 (THead (Bind Abst) u t0) x1 (ty3_bind g c u x3 H14 Abst -t0 x1 H13)) (THead (Flat Appl) x v) (THead (Flat Appl) x (THead (Bind Abst) u -t0)) (ty3_appl g c x u (H1 i u0 c x (fsubst0_snd i u0 c w x H9) e H6) v t0 -H2) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead -(Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w -(THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x (THead (Bind Abst) u -t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) -(THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H9 (THead -(Bind Abst) u t0) (Flat Appl))) e H6)))) (ty3_correct g c x u (H1 i u0 c x -(fsubst0_snd i u0 c w x H9) e H6)))))))) (ty3_gen_bind g Abst c u t0 x0 -H10)))) (ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))) H7)) -(\lambda (H7: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) -(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))).(ex2_ind T (\lambda -(t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat -Appl) i) u0 v t4)) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u -t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) w -x))).(\lambda (H9: (subst0 (s (Flat Appl) i) u0 v x)).(eq_ind_r T (THead -(Flat Appl) w x) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead -(Bind Abst) u t0)))) (ty3_appl g c w u H0 x t0 (H3 (s (Flat Appl) i) u0 c x -(fsubst0_snd (s (Flat Appl) i) u0 c v x H9) e H6)) t3 H8)))) H7)) (\lambda -(H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) -u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: -T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: -T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c t3 (THead -(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H8: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H9: (subst0 i -u0 w x0)).(\lambda (H10: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T -(THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w -(THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind -Abst) u t0) t4)) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w -(THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H11: (ty3 g c (THead -(Bind Abst) u t0) x)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c -(THead (Bind Abst) u t4) x))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c u -t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 -t4))) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind -Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c (THead -(Bind Abst) u x2) x)).(\lambda (_: (ty3 g c u x3)).(\lambda (H14: (ty3 g -(CHead c (Bind Abst) u) t0 x2)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) -(ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u -t0))) (\lambda (x4: T).(\lambda (H15: (ty3 g c u x4)).(ty3_conv g c (THead -(Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind -Abst) u x2)) (ty3_appl g c w u H0 (THead (Bind Abst) u t0) x2 (ty3_bind g c u -x4 H15 Abst t0 x2 H14)) (THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 -(THead (Bind Abst) u t0)) (ty3_appl g c x0 u (H1 i u0 c x0 (fsubst0_snd i u0 -c w x0 H9) e H6) x1 t0 (H3 (s (Flat Appl) i) u0 c x1 (fsubst0_snd (s (Flat -Appl) i) u0 c v x1 H10) e H6)) (pc3_fsubst0 c (THead (Flat Appl) w (THead -(Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c -(THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x0 -(THead (Bind Abst) u t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead -(Bind Abst) u t0)) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) -(subst0_fst u0 x0 w i H9 (THead (Bind Abst) u t0) (Flat Appl))) e H6)))) -(ty3_correct g c w u H0))))))) (ty3_gen_bind g Abst c u t0 x H11)))) -(ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))))) H7)) -(subst0_gen_head (Flat Appl) u0 w v t3 i H5)))))) (\lambda (c3: C).(\lambda -(H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e -(Bind Abbr) u0))).(ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 -H5) e H6) v t0 (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H5) e H6)))))) (\lambda -(t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat Appl) w v) t3)).(\lambda (c3: -C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H7: (getl i c -(CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead -(Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda -(t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat -Appl) i) u0 v t4))) (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 -(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w -u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) -(ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H8: -(ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: -T).(subst0 i u0 w u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat -Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c3 t3 (THead (Flat -Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H9: (eq T t3 -(THead (Flat Appl) x v))).(\lambda (H10: (subst0 i u0 w x)).(eq_ind_r T -(THead (Flat Appl) x v) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w -(THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind -Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w -(THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (H11: (ty3 g c3 (THead -(Bind Abst) u t0) x0)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 -c3 (THead (Bind Abst) u t4) x0))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c3 -u t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 -t4))) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind -Abst) u t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c3 (THead -(Bind Abst) u x1) x0)).(\lambda (H13: (ty3 g c3 u x2)).(\lambda (H14: (ty3 g -(CHead c3 (Bind Abst) u) t0 x1)).(ty3_conv g c3 (THead (Flat Appl) w (THead -(Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) (ty3_appl g -c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) (THead (Bind Abst) u -t0) x1 (ty3_bind g c3 u x2 H13 Abst t0 x1 H14)) (THead (Flat Appl) x v) -(THead (Flat Appl) x (THead (Bind Abst) u t0)) (ty3_appl g c3 x u (H1 i u0 c3 -x (fsubst0_both i u0 c w x H10 c3 H6) e H7) v t0 (H3 i u0 c3 v (fsubst0_fst i -u0 c v c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u -t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat -Appl) w (THead (Bind Abst) u t0))) i u0 c3 (THead (Flat Appl) x (THead (Bind -Abst) u t0)) (fsubst0_both i u0 c (THead (Flat Appl) w (THead (Bind Abst) u -t0)) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H10 -(THead (Bind Abst) u t0) (Flat Appl)) c3 H6) e H7))))))) (ty3_gen_bind g Abst -c3 u t0 x0 H11)))) (ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v -(fsubst0_fst i u0 c v c3 H6) e H7))) t3 H9)))) H8)) (\lambda (H8: (ex2 T -(\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 -(s (Flat Appl) i) u0 v t4)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead -(Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)) (ty3 -g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: -T).(\lambda (H9: (eq T t3 (THead (Flat Appl) w x))).(\lambda (H10: (subst0 (s -(Flat Appl) i) u0 v x)).(eq_ind_r T (THead (Flat Appl) w x) (\lambda (t4: -T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g -c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) x t0 (H3 i u0 c3 x -(fsubst0_both i u0 c v x H10 c3 H6) e H7)) t3 H9)))) H8)) (\lambda (H8: -(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 -t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: -T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: -T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c3 t3 (THead -(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H9: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H10: (subst0 -i u0 w x0)).(\lambda (H11: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T -(THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w -(THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind -Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w -(THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H12: (ty3 g c3 (THead -(Bind Abst) u t0) x)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c3 -(THead (Bind Abst) u t4) x))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c3 u -t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 -t4))) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind -Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c3 (THead -(Bind Abst) u x2) x)).(\lambda (_: (ty3 g c3 u x3)).(\lambda (H15: (ty3 g -(CHead c3 (Bind Abst) u) t0 x2)).(ex_ind T (\lambda (t4: T).(ty3 g c3 u t4)) -(ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u -t0))) (\lambda (x4: T).(\lambda (H16: (ty3 g c3 u x4)).(ty3_conv g c3 (THead -(Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind -Abst) u x2)) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e -H7) (THead (Bind Abst) u t0) x2 (ty3_bind g c3 u x4 H16 Abst t0 x2 H15)) -(THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) -(ty3_appl g c3 x0 u (H1 i u0 c3 x0 (fsubst0_both i u0 c w x0 H10 c3 H6) e H7) -x1 t0 (H3 i u0 c3 x1 (fsubst0_both i u0 c v x1 H11 c3 H6) e H7)) (pc3_fsubst0 -c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead -(Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u -t0))) i u0 c3 (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (fsubst0_both i -u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x0 -(THead (Bind Abst) u t0)) (subst0_fst u0 x0 w i H10 (THead (Bind Abst) u t0) -(Flat Appl)) c3 H6) e H7)))) (ty3_correct g c3 w u (H1 i u0 c3 w (fsubst0_fst -i u0 c w c3 H6) e H7)))))))) (ty3_gen_bind g Abst c3 u t0 x H12)))) -(ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v (fsubst0_fst i u0 -c v c3 H6) e H7))) t3 H9)))))) H8)) (subst0_gen_head (Flat Appl) u0 w v t3 i -H5)))))))) c2 t2 H4))))))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda -(t3: T).(\lambda (H0: (ty3 g c t2 t3)).(\lambda (H1: ((\forall (i: -nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u c t2 c2 -t4) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t4 -t3)))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c t3 t0)).(\lambda (H3: -((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: -T).((fsubst0 i u c t3 c2 t4) \to (\forall (e: C).((getl i c (CHead e (Bind -Abbr) u)) \to (ty3 g c2 t4 t0)))))))))).(\lambda (i: nat).(\lambda (u: -T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H4: (fsubst0 i u c (THead -(Flat Cast) t3 t2) c2 t4)).(fsubst0_ind i u c (THead (Flat Cast) t3 t2) -(\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind -Abbr) u)) \to (ty3 g c0 t5 (THead (Flat Cast) t0 t3)))))) (\lambda (t5: -T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda (e: -C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda -(u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 -u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda -(t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: -T).(subst0 (s (Flat Cast) i) u t2 t6)))) (ty3 g c t5 (THead (Flat Cast) t0 -t3)) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 -t2))) (\lambda (u2: T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq -T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g -c t5 (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H8: (eq T t5 (THead -(Flat Cast) x t2))).(\lambda (H9: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat -Cast) x t2) (\lambda (t6: T).(ty3 g c t6 (THead (Flat Cast) t0 t3))) (ex_ind -T (\lambda (t6: T).(ty3 g c t0 t6)) (ty3 g c (THead (Flat Cast) x t2) (THead -(Flat Cast) t0 t3)) (\lambda (x0: T).(\lambda (H10: (ty3 g c t0 -x0)).(ty3_conv g c (THead (Flat Cast) t0 t3) (THead (Flat Cast) x0 t0) -(ty3_cast g c t3 t0 H2 x0 H10) (THead (Flat Cast) x t2) (THead (Flat Cast) t0 -x) (ty3_cast g c t2 x (ty3_conv g c x t0 (H3 i u c x (fsubst0_snd i u c t3 x -H9) e H6) t2 t3 H0 (pc3_s c t3 x (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x -(fsubst0_snd i u c t3 x H9) e H6))) t0 (H3 i u c x (fsubst0_snd i u c t3 x -H9) e H6)) (pc3_fsubst0 c (THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 t3) -(pc3_refl c (THead (Flat Cast) t0 t3)) i u c (THead (Flat Cast) t0 x) -(fsubst0_snd i u c (THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 x) -(subst0_snd (Flat Cast) u x t3 i H9 t0)) e H6)))) (ty3_correct g c x t0 (H3 i -u c x (fsubst0_snd i u c t3 x H9) e H6))) t5 H8)))) H7)) (\lambda (H7: (ex2 T -(\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: -T).(subst0 (s (Flat Cast) i) u t2 t6)))).(ex2_ind T (\lambda (t6: T).(eq T t5 -(THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 -t6)) (ty3 g c t5 (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H8: (eq -T t5 (THead (Flat Cast) t3 x))).(\lambda (H9: (subst0 (s (Flat Cast) i) u t2 -x)).(eq_ind_r T (THead (Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c t6 (THead -(Flat Cast) t0 t3))) (ty3_cast g c x t3 (H1 (s (Flat Cast) i) u c x -(fsubst0_snd (s (Flat Cast) i) u c t2 x H9) e H6) t0 H2) t5 H8)))) H7)) -(\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead -(Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) -(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 -t6))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead -(Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) -(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g -c t5 (THead (Flat Cast) t0 t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(H8: (eq T t5 (THead (Flat Cast) x0 x1))).(\lambda (H9: (subst0 i u t3 -x0)).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead -(Flat Cast) x0 x1) (\lambda (t6: T).(ty3 g c t6 (THead (Flat Cast) t0 t3))) -(ex_ind T (\lambda (t6: T).(ty3 g c t0 t6)) (ty3 g c (THead (Flat Cast) x0 -x1) (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H11: (ty3 g c t0 -x)).(ty3_conv g c (THead (Flat Cast) t0 t3) (THead (Flat Cast) x t0) -(ty3_cast g c t3 t0 H2 x H11) (THead (Flat Cast) x0 x1) (THead (Flat Cast) t0 -x0) (ty3_cast g c x1 x0 (ty3_conv g c x0 t0 (H3 i u c x0 (fsubst0_snd i u c -t3 x0 H9) e H6) x1 t3 (H1 (s (Flat Cast) i) u c x1 (fsubst0_snd (s (Flat -Cast) i) u c t2 x1 H10) e H6) (pc3_s c t3 x0 (pc3_fsubst0 c t3 t3 (pc3_refl c -t3) i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6))) t0 (H3 i u c x0 -(fsubst0_snd i u c t3 x0 H9) e H6)) (pc3_fsubst0 c (THead (Flat Cast) t0 t3) -(THead (Flat Cast) t0 t3) (pc3_refl c (THead (Flat Cast) t0 t3)) i u c (THead -(Flat Cast) t0 x0) (fsubst0_snd i u c (THead (Flat Cast) t0 t3) (THead (Flat -Cast) t0 x0) (subst0_snd (Flat Cast) u x0 t3 i H9 t0)) e H6)))) (ty3_correct -g c x0 t0 (H3 i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6))) t5 H8)))))) H7)) -(subst0_gen_head (Flat Cast) u t3 t2 t5 i H5)))))) (\lambda (c3: C).(\lambda -(H5: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e -(Bind Abbr) u))).(ty3_cast g c3 t2 t3 (H1 i u c3 t2 (fsubst0_fst i u c t2 c3 -H5) e H6) t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H5) e H6)))))) (\lambda -(t5: T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda -(c3: C).(\lambda (H6: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H7: (getl -i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 -(THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2))) (ex2 T -(\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: -T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat -Cast) i) u t2 t6)))) (ty3 g c3 t5 (THead (Flat Cast) t0 t3)) (\lambda (H8: -(ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: -T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t5 (THead (Flat -Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g c3 t5 (THead (Flat -Cast) t0 t3)) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) x -t2))).(\lambda (H10: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat Cast) x t2) -(\lambda (t6: T).(ty3 g c3 t6 (THead (Flat Cast) t0 t3))) (ex_ind T (\lambda -(t6: T).(ty3 g c3 t0 t6)) (ty3 g c3 (THead (Flat Cast) x t2) (THead (Flat -Cast) t0 t3)) (\lambda (x0: T).(\lambda (H11: (ty3 g c3 t0 x0)).(ty3_conv g -c3 (THead (Flat Cast) t0 t3) (THead (Flat Cast) x0 t0) (ty3_cast g c3 t3 t0 -(H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) x0 H11) (THead (Flat Cast) x -t2) (THead (Flat Cast) t0 x) (ty3_cast g c3 t2 x (ty3_conv g c3 x t0 (H3 i u -c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7) t2 t3 (H1 i u c3 t2 -(fsubst0_fst i u c t2 c3 H6) e H7) (pc3_s c3 t3 x (pc3_fsubst0 c t3 t3 -(pc3_refl c t3) i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7))) t0 (H3 i -u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat -Cast) t0 t3) (THead (Flat Cast) t0 t3) (pc3_refl c (THead (Flat Cast) t0 t3)) -i u c3 (THead (Flat Cast) t0 x) (fsubst0_both i u c (THead (Flat Cast) t0 t3) -(THead (Flat Cast) t0 x) (subst0_snd (Flat Cast) u x t3 i H10 t0) c3 H6) e -H7)))) (ty3_correct g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e -H7))) t5 H9)))) H8)) (\lambda (H8: (ex2 T (\lambda (t6: T).(eq T t5 (THead -(Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 -t6)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) -(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)) (ty3 g c3 t5 (THead -(Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) -t3 x))).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x)).(eq_ind_r T (THead -(Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c3 t6 (THead (Flat Cast) t0 t3))) -(ty3_cast g c3 x t3 (H1 i u c3 x (fsubst0_both i u c t2 x H10 c3 H6) e H7) t0 -(H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7)) t5 H9)))) H8)) (\lambda -(H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) -u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: -T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: -T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g c3 t5 (THead -(Flat Cast) t0 t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t5 -(THead (Flat Cast) x0 x1))).(\lambda (H10: (subst0 i u t3 x0)).(\lambda (H11: -(subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) -(\lambda (t6: T).(ty3 g c3 t6 (THead (Flat Cast) t0 t3))) (ex_ind T (\lambda -(t6: T).(ty3 g c3 t0 t6)) (ty3 g c3 (THead (Flat Cast) x0 x1) (THead (Flat -Cast) t0 t3)) (\lambda (x: T).(\lambda (H12: (ty3 g c3 t0 x)).(ty3_conv g c3 -(THead (Flat Cast) t0 t3) (THead (Flat Cast) x t0) (ty3_cast g c3 t3 t0 (H3 i -u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) x H12) (THead (Flat Cast) x0 x1) -(THead (Flat Cast) t0 x0) (ty3_cast g c3 x1 x0 (ty3_conv g c3 x0 t0 (H3 i u -c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7) x1 t3 (H1 i u c3 x1 -(fsubst0_both i u c t2 x1 H11 c3 H6) e H7) (pc3_s c3 t3 x0 (pc3_fsubst0 c t3 -t3 (pc3_refl c t3) i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7))) t0 -(H3 i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7)) (pc3_fsubst0 c -(THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 t3) (pc3_refl c (THead (Flat -Cast) t0 t3)) i u c3 (THead (Flat Cast) t0 x0) (fsubst0_both i u c (THead -(Flat Cast) t0 t3) (THead (Flat Cast) t0 x0) (subst0_snd (Flat Cast) u x0 t3 -i H10 t0) c3 H6) e H7)))) (ty3_correct g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst -i u c t3 c3 H6) e H7))) t5 H9)))))) H8)) (subst0_gen_head (Flat Cast) u t3 t2 -t5 i H5)))))))) c2 t4 H4)))))))))))))) c1 t1 t H))))). - -lemma ty3_csubst0: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 -t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c1 -(CHead e (Bind Abbr) u)) \to (\forall (c2: C).((csubst0 i u c1 c2) \to (ty3 g -c2 t1 t2))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g c1 t1 t2)).(\lambda (e: C).(\lambda (u: T).(\lambda (i: -nat).(\lambda (H0: (getl i c1 (CHead e (Bind Abbr) u))).(\lambda (c2: -C).(\lambda (H1: (csubst0 i u c1 c2)).(ty3_fsubst0 g c1 t1 t2 H i u c2 t1 -(fsubst0_fst i u c1 t1 c2 H1) e H0))))))))))). - -lemma ty3_subst0: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((ty3 g c t1 -t) \to (\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead e -(Bind Abbr) u)) \to (\forall (t2: T).((subst0 i u t1 t2) \to (ty3 g c t2 -t))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: -(ty3 g c t1 t)).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H0: (getl i c (CHead e (Bind Abbr) u))).(\lambda (t2: T).(\lambda (H1: -(subst0 i u t1 t2)).(ty3_fsubst0 g c t1 t H i u c t2 (fsubst0_snd i u c t1 t2 -H1) e H0))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd.ma deleted file mode 100644 index 318a97986..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd.ma +++ /dev/null @@ -1,923 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/defs.ma". - -include "basic_1/pc3/props.ma". - -implied rec lemma ty3_ind (g: G) (P: (C \to (T \to (T \to Prop)))) (f: -(\forall (c: C).(\forall (t2: T).(\forall (t: T).((ty3 g c t2 t) \to ((P c t2 -t) \to (\forall (u: T).(\forall (t1: T).((ty3 g c u t1) \to ((P c u t1) \to -((pc3 c t1 t2) \to (P c u t2)))))))))))) (f0: (\forall (c: C).(\forall (m: -nat).(P c (TSort m) (TSort (next g m)))))) (f1: (\forall (n: nat).(\forall -(c: C).(\forall (d: C).(\forall (u: T).((getl n c (CHead d (Bind Abbr) u)) -\to (\forall (t: T).((ty3 g d u t) \to ((P d u t) \to (P c (TLRef n) (lift (S -n) O t))))))))))) (f2: (\forall (n: nat).(\forall (c: C).(\forall (d: -C).(\forall (u: T).((getl n c (CHead d (Bind Abst) u)) \to (\forall (t: -T).((ty3 g d u t) \to ((P d u t) \to (P c (TLRef n) (lift (S n) O -u))))))))))) (f3: (\forall (c: C).(\forall (u: T).(\forall (t: T).((ty3 g c u -t) \to ((P c u t) \to (\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 -g (CHead c (Bind b) u) t1 t2) \to ((P (CHead c (Bind b) u) t1 t2) \to (P c -(THead (Bind b) u t1) (THead (Bind b) u t2))))))))))))) (f4: (\forall (c: -C).(\forall (w: T).(\forall (u: T).((ty3 g c w u) \to ((P c w u) \to (\forall -(v: T).(\forall (t: T).((ty3 g c v (THead (Bind Abst) u t)) \to ((P c v -(THead (Bind Abst) u t)) \to (P c (THead (Flat Appl) w v) (THead (Flat Appl) -w (THead (Bind Abst) u t))))))))))))) (f5: (\forall (c: C).(\forall (t1: -T).(\forall (t2: T).((ty3 g c t1 t2) \to ((P c t1 t2) \to (\forall (t0: -T).((ty3 g c t2 t0) \to ((P c t2 t0) \to (P c (THead (Flat Cast) t2 t1) -(THead (Flat Cast) t0 t2))))))))))) (c: C) (t: T) (t0: T) (t1: ty3 g c t t0) -on t1: P c t t0 \def match t1 with [(ty3_conv c0 t2 t3 t4 u t5 t6 p) -\Rightarrow (f c0 t2 t3 t4 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 t2 t3 t4) u -t5 t6 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 u t5 t6) p) | (ty3_sort c0 m) -\Rightarrow (f0 c0 m) | (ty3_abbr n c0 d u g0 t2 t3) \Rightarrow (f1 n c0 d u -g0 t2 t3 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) d u t2 t3)) | (ty3_abst n c0 d u -g0 t2 t3) \Rightarrow (f2 n c0 d u g0 t2 t3 ((ty3_ind g P f f0 f1 f2 f3 f4 -f5) d u t2 t3)) | (ty3_bind c0 u t2 t3 b t4 t5 t6) \Rightarrow (f3 c0 u t2 t3 -((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 u t2 t3) b t4 t5 t6 ((ty3_ind g P f f0 -f1 f2 f3 f4 f5) (CHead c0 (Bind b) u) t4 t5 t6)) | (ty3_appl c0 w u t2 v t3 -t4) \Rightarrow (f4 c0 w u t2 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 w u t2) v -t3 t4 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 v (THead (Bind Abst) u t3) t4)) | -(ty3_cast c0 t2 t3 t4 t5 t6) \Rightarrow (f5 c0 t2 t3 t4 ((ty3_ind g P f f0 -f1 f2 f3 f4 f5) c0 t2 t3 t4) t5 t6 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 t3 -t5 t6))]. - -implied rec lemma tys3_ind (g: G) (c: C) (P: (TList \to (T \to Prop))) (f: -(\forall (u: T).(\forall (u0: T).((ty3 g c u u0) \to (P TNil u))))) (f0: -(\forall (t: T).(\forall (u: T).((ty3 g c t u) \to (\forall (ts: -TList).((tys3 g c ts u) \to ((P ts u) \to (P (TCons t ts) u)))))))) (t: -TList) (t0: T) (t1: tys3 g c t t0) on t1: P t t0 \def match t1 with -[(tys3_nil u u0 t2) \Rightarrow (f u u0 t2) | (tys3_cons t2 u t3 ts t4) -\Rightarrow (f0 t2 u t3 ts t4 ((tys3_ind g c P f f0) ts u t4))]. - -lemma ty3_gen_sort: - \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((ty3 g c -(TSort n) x) \to (pc3 c (TSort (next g n)) x))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda -(H: (ty3 g c (TSort n) x)).(insert_eq T (TSort n) (\lambda (t: T).(ty3 g c t -x)) (\lambda (_: T).(pc3 c (TSort (next g n)) x)) (\lambda (y: T).(\lambda -(H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).((eq T t (TSort n)) \to (pc3 c0 (TSort (next g n)) t0))))) (\lambda (c0: -C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda -(_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) t)))).(\lambda (u: -T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u -(TSort n)) \to (pc3 c0 (TSort (next g n)) t1)))).(\lambda (H5: (pc3 c0 t1 -t2)).(\lambda (H6: (eq T u (TSort n))).(let H7 \def (f_equal T T (\lambda (e: -T).e) u (TSort n) H6) in (let H8 \def (eq_ind T u (\lambda (t0: T).((eq T t0 -(TSort n)) \to (pc3 c0 (TSort (next g n)) t1))) H4 (TSort n) H7) in (let H9 -\def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (TSort n) H7) in -(pc3_t t1 c0 (TSort (next g n)) (H8 (refl_equal T (TSort n))) t2 -H5))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T -(TSort m) (TSort n))).(let H2 \def (f_equal T nat (\lambda (e: T).(match e -with [(TSort n0) \Rightarrow n0 | (TLRef _) \Rightarrow m | (THead _ _ _) -\Rightarrow m])) (TSort m) (TSort n) H1) in (eq_ind_r nat n (\lambda (n0: -nat).(pc3 c0 (TSort (next g n)) (TSort (next g n0)))) (pc3_refl c0 (TSort -(next g n))) m H2))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abbr) -u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u -(TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) -(TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) -(lift (S n0) O t)) H5))))))))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda -(d: C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abst) -u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u -(TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) -(TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) -(lift (S n0) O u)) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda -(t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TSort n)) \to -(pc3 c0 (TSort (next g n)) t)))).(\lambda (b: B).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq -T t1 (TSort n)) \to (pc3 (CHead c0 (Bind b) u) (TSort (next g n)) -t2)))).(\lambda (H5: (eq T (THead (Bind b) u t1) (TSort n))).(let H6 \def -(eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) (THead (Bind -b) u t2)) H6))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: -T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TSort n)) \to (pc3 c0 -(TSort (next g n)) u)))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g -c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (TSort n)) \to (pc3 c0 -(TSort (next g n)) (THead (Bind Abst) u t))))).(\lambda (H5: (eq T (THead -(Flat Appl) w v) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in -(False_ind (pc3 c0 (TSort (next g n)) (THead (Flat Appl) w (THead (Bind Abst) -u t))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (pc3 -c0 (TSort (next g n)) t2)))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 -t0)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) -t0)))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TSort n))).(let H6 \def -(eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) -(THead (Flat Cast) t0 t2)) H6))))))))))) c y x H0))) H))))). - -lemma ty3_gen_lref: - \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((ty3 g c -(TLRef n) x) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda -(t: T).(pc3 c (lift (S n) O t) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(pc3 c (lift (S n) O u) x)))) (\lambda (e: C).(\lambda -(u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda -(H: (ty3 g c (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(ty3 g c t -x)) (\lambda (_: T).(or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda -(t0: T).(pc3 c (lift (S n) O t0) x)))) (\lambda (e: C).(\lambda (u: -T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0))))) (ex3_3 C T T (\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c (lift (S n) O u) x)))) (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0))))))) -(\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: -C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (ex3_3 C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t1: T).(pc3 c0 (lift (S n) O t1) -t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(ty3 g e -u t1))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 -c0 (lift (S n) O u) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t1: T).(ty3 g e u t1)))))))))) (\lambda (c0: C).(\lambda (t2: -T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 -(TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: -T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (t0: T).(ty3 g e u t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t)))) (\lambda (e: -C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u -t0))))))))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u -t1)).(\lambda (H4: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) -(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift -(S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t0: T).(ty3 g e u0 t0))))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: -(eq T u (TLRef n))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (TLRef n) -H6) in (let H8 \def (eq_ind T u (\lambda (t0: T).((eq T t0 (TLRef n)) \to (or -(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t3: T).(pc3 c0 (lift -(S n) O t3) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t3: T).(ty3 g e u0 t3))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t3: T).(ty3 g e u0 t3)))))))) H4 (TLRef n) H7) -in (let H9 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (TLRef n) -H7) in (let H10 \def (H8 (refl_equal T (TLRef n))) in (or_ind (ex3_3 C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) -t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g -e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: -T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0))))) (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) -(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift -(S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t0: T).(ty3 g e u0 t0)))))) (\lambda (H11: (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 -t0)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: -T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0)))) (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) -(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift -(S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t0: T).(ty3 g e u0 t0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: -T).(\lambda (H12: (pc3 c0 (lift (S n) O x2) t1)).(\lambda (H13: (getl n c0 -(CHead x0 (Bind Abbr) x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_introl -(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift -(S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) -t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g -e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 (lift (S n) O x2) H12 t2 H5) H13 -H14)))))))) H11)) (\lambda (H11: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))).(ex3_3_ind C T T -(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) -t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g -e u0 t0)))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: -T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H12: (pc3 c0 -(lift (S n) O x1) t1)).(\lambda (H13: (getl n c0 (CHead x0 (Bind Abst) -x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_intror (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) -(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift -(S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 -(lift (S n) O x1) H12 t2 H5) H13 H14)))))))) H11)) H10)))))))))))))))) -(\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (TLRef -n))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (TLRef n) H1) in (False_ind (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) (TSort (next g -m)))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 -(lift (S n) O u) (TSort (next g m)))))) (\lambda (e: C).(\lambda (u: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) H2))))) (\lambda (n0: -nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H1: (getl n0 -c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d u -t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) -(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 d (lift (S -n) O u0) t)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d -(CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: -T).(ty3 g e u0 t0))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 -\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow n0 | -(TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef -n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n1: nat).(getl n1 c0 (CHead d -(Bind Abbr) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C -T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O -t0) (lift (S n1) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O t))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 -t0))))))) (or_introl (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda -(t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O t))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 -C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O -u0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O -t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g -e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O t)) H6 H2)) n0 H5)))))))))))) -(\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda -(H1: (getl n0 c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H2: (ty3 -g d u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) -(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 d (lift (S -n) O u0) t)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d -(CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: -T).(ty3 g e u0 t0))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 -\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow n0 | -(TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef -n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n1: nat).(getl n1 c0 (CHead d -(Bind Abst) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C -T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O -t0) (lift (S n1) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O u))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 -t0))))))) (or_intror (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda -(t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O u))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 -C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O -u0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O -u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g -e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O u)) H6 H2)) n0 H5)))))))))))) -(\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u -t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda -(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) -(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift -(S n) O u0) t)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 -(CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: -T).(ty3 g e u0 t0))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 -(TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: -T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O t0) t2)))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e -(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g -e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: -T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O u0) t2)))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e -(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g -e u0 t0))))))))).(\lambda (H5: (eq T (THead (Bind b) u t1) (TLRef n))).(let -H6 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda -(_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead -(Bind b) u t2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind b) u t2))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 -t0)))))) H6))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: -T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TLRef n)) \to (or -(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S -n) O t) u)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 -(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: -T).(ty3 g e u0 t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda -(_: T).(pc3 c0 (lift (S n) O u0) u)))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t))))))))).(\lambda (v: -T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u -t))).(\lambda (_: (((eq T v (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead (Bind -Abst) u t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 -(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: -T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda -(_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind Abst) u t))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 -t0))))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TLRef n))).(let H6 -\def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda -(_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead -(Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T -(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) -(THead (Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda -(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) H6)))))))))))) -(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 -t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T -T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) -t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq -T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda -(t: T).(pc3 c0 (lift (S n) O t) t0)))) (\lambda (e: C).(\lambda (u: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda -(_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t0)))) -(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t))))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TLRef n))).(let H6 -\def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda -(_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) (THead (Flat -Cast) t0 t2))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 -(CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: -T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(pc3 c0 (lift (S n) O u) (THead (Flat Cast) t0 t2))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) -H6))))))))))) c y x H0))) H))))). - -lemma ty3_gen_bind: - \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t1: -T).(\forall (x: T).((ty3 g c (THead (Bind b) u t1) x) \to (ex3_2 T T (\lambda -(t2: T).(\lambda (_: T).(pc3 c (THead (Bind b) u t2) x))) (\lambda (_: -T).(\lambda (t: T).(ty3 g c u t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g -(CHead c (Bind b) u) t1 t2)))))))))) -\def - \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: -T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Bind b) u t1) x)).(insert_eq -T (THead (Bind b) u t1) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(ex3_2 -T T (\lambda (t2: T).(\lambda (_: T).(pc3 c (THead (Bind b) u t2) x))) -(\lambda (_: T).(\lambda (t0: T).(ty3 g c u t0))) (\lambda (t2: T).(\lambda -(_: T).(ty3 g (CHead c (Bind b) u) t1 t2))))) (\lambda (y: T).(\lambda (H0: -(ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).((eq T t (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda -(_: T).(pc3 c0 (THead (Bind b) u t2) t0))) (\lambda (_: T).(\lambda (t3: -T).(ty3 g c0 u t3))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind -b) u) t1 t2)))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (THead (Bind b) u -t1)) \to (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) -u t3) t))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u t0))) (\lambda (t3: -T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))))))).(\lambda (u0: -T).(\lambda (t0: T).(\lambda (H3: (ty3 g c0 u0 t0)).(\lambda (H4: (((eq T u0 -(THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 -c0 (THead (Bind b) u t3) t0))) (\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u -t4))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 -t3))))))).(\lambda (H5: (pc3 c0 t0 t2)).(\lambda (H6: (eq T u0 (THead (Bind -b) u t1))).(let H7 \def (f_equal T T (\lambda (e: T).e) u0 (THead (Bind b) u -t1) H6) in (let H8 \def (eq_ind T u0 (\lambda (t3: T).((eq T t3 (THead (Bind -b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 c0 (THead -(Bind b) u t4) t0))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c0 u t5))) -(\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))))) H4 -(THead (Bind b) u t1) H7) in (let H9 \def (eq_ind T u0 (\lambda (t3: T).(ty3 -g c0 t3 t0)) H3 (THead (Bind b) u t1) H7) in (let H10 \def (H8 (refl_equal T -(THead (Bind b) u t1))) in (ex3_2_ind T T (\lambda (t3: T).(\lambda (_: -T).(pc3 c0 (THead (Bind b) u t3) t0))) (\lambda (_: T).(\lambda (t4: T).(ty3 -g c0 u t4))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 -t3))) (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u -t3) t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u t4))) (\lambda (t3: -T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H11: (pc3 c0 (THead (Bind b) u x0) -t0)).(\lambda (H12: (ty3 g c0 u x1)).(\lambda (H13: (ty3 g (CHead c0 (Bind b) -u) t1 x0)).(ex3_2_intro T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead -(Bind b) u t3) t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u t4))) -(\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))) x0 x1 -(pc3_t t0 c0 (THead (Bind b) u x0) H11 t2 H5) H12 H13)))))) -H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T -(TSort m) (THead (Bind b) u t1))).(let H2 \def (eq_ind T (TSort m) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow -False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H1) in -(False_ind (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind -b) u t2) (TSort (next g m))))) (\lambda (_: T).(\lambda (t: T).(ty3 g c0 u -t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) -H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: -T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: -T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u -t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 d (THead (Bind b) u -t2) t))) (\lambda (_: T).(\lambda (t0: T).(ty3 g d u t0))) (\lambda (t2: -T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2))))))).(\lambda (H4: (eq -T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in -(False_ind (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind -b) u t2) (lift (S n) O t)))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u -t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) -H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda -(u0: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: -T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u -t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 d (THead (Bind b) u -t2) t))) (\lambda (_: T).(\lambda (t0: T).(ty3 g d u t0))) (\lambda (t2: -T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2))))))).(\lambda (H4: (eq -T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in -(False_ind (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind -b) u t2) (lift (S n) O u0)))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u -t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) -H5))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (H1: -(ty3 g c0 u0 t)).(\lambda (H2: (((eq T u0 (THead (Bind b) u t1)) \to (ex3_2 T -T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t))) -(\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u t0))) (\lambda (t2: T).(\lambda -(_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2))))))).(\lambda (b0: B).(\lambda -(t0: T).(\lambda (t2: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b0) u0) t0 -t2)).(\lambda (H4: (((eq T t0 (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda -(t3: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) -t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g (CHead c0 (Bind b0) u0) u t4))) -(\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind -b) u) t1 t3))))))).(\lambda (H5: (eq T (THead (Bind b0) u0 t0) (THead (Bind -b) u t1))).(let H6 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) -\Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match -k with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind -b0) u0 t0) (THead (Bind b) u t1) H5) in ((let H7 \def (f_equal T T (\lambda -(e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | -(THead _ t3 _) \Rightarrow t3])) (THead (Bind b0) u0 t0) (THead (Bind b) u -t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t3) \Rightarrow -t3])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H5) in (\lambda (H9: (eq -T u0 u)).(\lambda (H10: (eq B b0 b)).(let H11 \def (eq_ind T t0 (\lambda (t3: -T).((eq T t3 (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda -(_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t4) t2))) (\lambda (_: -T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b0) u0) u t5))) (\lambda (t4: -T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 -t4)))))) H4 t1 H8) in (let H12 \def (eq_ind T t0 (\lambda (t3: T).(ty3 g -(CHead c0 (Bind b0) u0) t3 t2)) H3 t1 H8) in (let H13 \def (eq_ind B b0 -(\lambda (b1: B).((eq T t1 (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda -(t3: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b1) u0) (THead (Bind b) u t3) -t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g (CHead c0 (Bind b1) u0) u t4))) -(\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b1) u0) (Bind -b) u) t1 t3)))))) H11 b H10) in (let H14 \def (eq_ind B b0 (\lambda (b1: -B).(ty3 g (CHead c0 (Bind b1) u0) t1 t2)) H12 b H10) in (eq_ind_r B b -(\lambda (b1: B).(ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead -(Bind b) u t3) (THead (Bind b1) u0 t2)))) (\lambda (_: T).(\lambda (t4: -T).(ty3 g c0 u t4))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind -b) u) t1 t3))))) (let H15 \def (eq_ind T u0 (\lambda (t3: T).((eq T t1 (THead -(Bind b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 (CHead -c0 (Bind b) t3) (THead (Bind b) u t4) t2))) (\lambda (_: T).(\lambda (t5: -T).(ty3 g (CHead c0 (Bind b) t3) u t5))) (\lambda (t4: T).(\lambda (_: -T).(ty3 g (CHead (CHead c0 (Bind b) t3) (Bind b) u) t1 t4)))))) H13 u H9) in -(let H16 \def (eq_ind T u0 (\lambda (t3: T).(ty3 g (CHead c0 (Bind b) t3) t1 -t2)) H14 u H9) in (let H17 \def (eq_ind T u0 (\lambda (t3: T).((eq T t3 -(THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 -c0 (THead (Bind b) u t4) t))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c0 u -t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 -t4)))))) H2 u H9) in (let H18 \def (eq_ind T u0 (\lambda (t3: T).(ty3 g c0 t3 -t)) H1 u H9) in (eq_ind_r T u (\lambda (t3: T).(ex3_2 T T (\lambda (t4: -T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Bind b) t3 t2)))) -(\lambda (_: T).(\lambda (t5: T).(ty3 g c0 u t5))) (\lambda (t4: T).(\lambda -(_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4))))) (ex3_2_intro T T (\lambda (t3: -T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) (THead (Bind b) u t2)))) -(\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u t4))) (\lambda (t3: T).(\lambda -(_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))) t2 t (pc3_refl c0 (THead (Bind -b) u t2)) H18 H16) u0 H9))))) b0 H10)))))))) H7)) H6))))))))))))) (\lambda -(c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w -u0)).(\lambda (_: (((eq T w (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda -(t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) u0))) (\lambda (_: -T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g -(CHead c0 (Bind b) u) t1 t2))))))).(\lambda (v: T).(\lambda (t: T).(\lambda -(_: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (_: (((eq T v (THead -(Bind b) u t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 -(THead (Bind b) u t2) (THead (Bind Abst) u0 t)))) (\lambda (_: T).(\lambda -(t0: T).(ty3 g c0 u t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 -(Bind b) u) t1 t2))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead -(Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (THead (Bind b) u t1) H5) in (False_ind (ex3_2 T T -(\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (THead (Flat -Appl) w (THead (Bind Abst) u0 t))))) (\lambda (_: T).(\lambda (t0: T).(ty3 g -c0 u t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 -t2)))) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: -T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u -t1)) \to (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) -u t3) t2))) (\lambda (_: T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t3: -T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))))))).(\lambda (t3: -T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (_: (((eq T t2 (THead (Bind b) u -t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) -u t4) t3))) (\lambda (_: T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t4: -T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4))))))).(\lambda (H5: -(eq T (THead (Flat Cast) t2 t0) (THead (Bind b) u t1))).(let H6 \def (eq_ind -T (THead (Flat Cast) t2 t0) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind b) u t1) H5) in (False_ind (ex3_2 T T (\lambda (t4: T).(\lambda -(_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Flat Cast) t3 t2)))) (\lambda -(_: T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t4: T).(\lambda (_: T).(ty3 -g (CHead c0 (Bind b) u) t1 t4)))) H6))))))))))) c y x H0))) H))))))). - -lemma ty3_gen_appl: - \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x: -T).((ty3 g c (THead (Flat Appl) w v) x) \to (ex3_2 T T (\lambda (u: -T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) -(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) -(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (v: T).(\lambda (x: -T).(\lambda (H: (ty3 g c (THead (Flat Appl) w v) x)).(insert_eq T (THead -(Flat Appl) w v) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(ex3_2 T T -(\lambda (u: T).(\lambda (t0: T).(pc3 c (THead (Flat Appl) w (THead (Bind -Abst) u t0)) x))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c v (THead (Bind -Abst) u t0)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c w u))))) (\lambda (y: -T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: -T).(\lambda (t0: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda -(u: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u -t1)) t0))) (\lambda (u: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u -t1)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))))) (\lambda (c0: -C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda -(_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: -T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) -t))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u t0)))) -(\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (u: T).(\lambda -(t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (THead (Flat -Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead -(Flat Appl) w (THead (Bind Abst) u0 t0)) t1))) (\lambda (u0: T).(\lambda (t0: -T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: -T).(ty3 g c0 w u0))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u -(THead (Flat Appl) w v))).(let H7 \def (f_equal T T (\lambda (e: T).e) u -(THead (Flat Appl) w v) H6) in (let H8 \def (eq_ind T u (\lambda (t0: T).((eq -T t0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t3: -T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t3)) t1))) (\lambda -(u0: T).(\lambda (t3: T).(ty3 g c0 v (THead (Bind Abst) u0 t3)))) (\lambda -(u0: T).(\lambda (_: T).(ty3 g c0 w u0)))))) H4 (THead (Flat Appl) w v) H7) -in (let H9 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (THead -(Flat Appl) w v) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat Appl) w -v))) in (ex3_2_ind T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat -Appl) w (THead (Bind Abst) u0 t0)) t1))) (\lambda (u0: T).(\lambda (t0: -T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: -T).(ty3 g c0 w u0))) (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 -(THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: -T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: -T).(\lambda (_: T).(ty3 g c0 w u0)))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H11: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) -t1)).(\lambda (H12: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (H13: -(ty3 g c0 w x0)).(ex3_2_intro T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 -(THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: -T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: -T).(\lambda (_: T).(ty3 g c0 w u0))) x0 x1 (pc3_t t1 c0 (THead (Flat Appl) w -(THead (Bind Abst) x0 x1)) H11 t2 H5) H12 H13)))))) H10)))))))))))))))) -(\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Flat -Appl) w v))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead (Flat Appl) w v) H1) in (False_ind (ex3_2 T T -(\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind -Abst) u t)) (TSort (next g m))))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v -(THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) -H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda -(_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 -T T (\lambda (u0: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead -(Bind Abst) u0 t0)) t))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g d v (THead -(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g d w -u0))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 -\def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: -T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) -(lift (S n) O t)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead -(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) -H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda -(_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 -T T (\lambda (u0: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead -(Bind Abst) u0 t0)) t))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g d v (THead -(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g d w -u0))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 -\def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: -T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) -(lift (S n) O u)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead -(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) -H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: -(ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T -T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind -Abst) u0 t0)) t))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind -Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w -u0))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 -g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (THead (Flat Appl) w -v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 (CHead c0 (Bind b) -u) (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: -T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) v (THead (Bind Abst) u0 -t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) w -u0))))))).(\lambda (H5: (eq T (THead (Bind b) u t1) (THead (Flat Appl) w -v))).(let H6 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) -\Rightarrow False])])) I (THead (Flat Appl) w v) H5) in (False_ind (ex3_2 T T -(\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind -Abst) u0 t0)) (THead (Bind b) u t2)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 -g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g -c0 w u0)))) H6))))))))))))) (\lambda (c0: C).(\lambda (w0: T).(\lambda (u: -T).(\lambda (H1: (ty3 g c0 w0 u)).(\lambda (H2: (((eq T w0 (THead (Flat Appl) -w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 c0 (THead (Flat -Appl) w (THead (Bind Abst) u0 t)) u))) (\lambda (u0: T).(\lambda (t: T).(ty3 -g c0 v (THead (Bind Abst) u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 -w u0))))))).(\lambda (v0: T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 v0 -(THead (Bind Abst) u t))).(\lambda (H4: (((eq T v0 (THead (Flat Appl) w v)) -\to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w -(THead (Bind Abst) u0 t0)) (THead (Bind Abst) u t)))) (\lambda (u0: -T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: -T).(\lambda (_: T).(ty3 g c0 w u0))))))).(\lambda (H5: (eq T (THead (Flat -Appl) w0 v0) (THead (Flat Appl) w v))).(let H6 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow w0 | (TLRef _) \Rightarrow w0 | -(THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) -w v) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort -_) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ _ t0) \Rightarrow -t0])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v) H5) in (\lambda (H8: -(eq T w0 w)).(let H9 \def (eq_ind T v0 (\lambda (t0: T).((eq T t0 (THead -(Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 -(THead (Flat Appl) w (THead (Bind Abst) u0 t1)) (THead (Bind Abst) u t)))) -(\lambda (u0: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) -(\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))))) H4 v H7) in (let H10 -\def (eq_ind T v0 (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H3 -v H7) in (let H11 \def (eq_ind T w0 (\lambda (t0: T).((eq T t0 (THead (Flat -Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead -(Flat Appl) w (THead (Bind Abst) u0 t1)) u))) (\lambda (u0: T).(\lambda (t1: -T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) (\lambda (u0: T).(\lambda (_: -T).(ty3 g c0 w u0)))))) H2 w H8) in (let H12 \def (eq_ind T w0 (\lambda (t0: -T).(ty3 g c0 t0 u)) H1 w H8) in (eq_ind_r T w (\lambda (t0: T).(ex3_2 T T -(\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind -Abst) u0 t1)) (THead (Flat Appl) t0 (THead (Bind Abst) u t))))) (\lambda (u0: -T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) (\lambda (u0: -T).(\lambda (_: T).(ty3 g c0 w u0))))) (ex3_2_intro T T (\lambda (u0: -T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) -(THead (Flat Appl) w (THead (Bind Abst) u t))))) (\lambda (u0: T).(\lambda -(t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda -(_: T).(ty3 g c0 w u0))) u t (pc3_refl c0 (THead (Flat Appl) w (THead (Bind -Abst) u t))) H10 H12) w0 H8))))))) H6)))))))))))) (\lambda (c0: C).(\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T -t1 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: -T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t2))) (\lambda (u: -T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: -T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (t0: T).(\lambda (_: (ty3 g -c0 t2 t0)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T -(\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind -Abst) u t)) t0))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind -Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda -(H5: (eq T (THead (Flat Cast) t2 t1) (THead (Flat Appl) w v))).(let H6 \def -(eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow -(match f with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead -(Flat Appl) w v) H5) in (False_ind (ex3_2 T T (\lambda (u: T).(\lambda (t: -T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (THead (Flat Cast) -t0 t2)))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u -t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) H6))))))))))) c y x -H0))) H)))))). - -lemma ty3_gen_cast: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall -(x: T).((ty3 g c (THead (Flat Cast) t2 t1) x) \to (ex3 T (\lambda (t0: -T).(pc3 c (THead (Flat Cast) t0 t2) x)) (\lambda (_: T).(ty3 g c t1 t2)) -(\lambda (t0: T).(ty3 g c t2 t0)))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(x: T).(\lambda (H: (ty3 g c (THead (Flat Cast) t2 t1) x)).(insert_eq T -(THead (Flat Cast) t2 t1) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(ex3 -T (\lambda (t0: T).(pc3 c (THead (Flat Cast) t0 t2) x)) (\lambda (_: T).(ty3 -g c t1 t2)) (\lambda (t0: T).(ty3 g c t2 t0)))) (\lambda (y: T).(\lambda (H0: -(ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).((eq T t (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t3: T).(pc3 c0 -(THead (Flat Cast) t3 t2) t0)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda -(t3: T).(ty3 g c0 t2 t3))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 t0 t)).(\lambda (_: (((eq T t0 (THead (Flat Cast) -t2 t1)) \to (ex3 T (\lambda (t3: T).(pc3 c0 (THead (Flat Cast) t3 t2) t)) -(\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t3: T).(ty3 g c0 t2 -t3)))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (H3: (ty3 g c0 u -t3)).(\lambda (H4: (((eq T u (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda -(t4: T).(pc3 c0 (THead (Flat Cast) t4 t2) t3)) (\lambda (_: T).(ty3 g c0 t1 -t2)) (\lambda (t4: T).(ty3 g c0 t2 t4)))))).(\lambda (H5: (pc3 c0 t3 -t0)).(\lambda (H6: (eq T u (THead (Flat Cast) t2 t1))).(let H7 \def (f_equal -T T (\lambda (e: T).e) u (THead (Flat Cast) t2 t1) H6) in (let H8 \def -(eq_ind T u (\lambda (t4: T).((eq T t4 (THead (Flat Cast) t2 t1)) \to (ex3 T -(\lambda (t5: T).(pc3 c0 (THead (Flat Cast) t5 t2) t3)) (\lambda (_: T).(ty3 -g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5))))) H4 (THead (Flat Cast) t2 -t1) H7) in (let H9 \def (eq_ind T u (\lambda (t4: T).(ty3 g c0 t4 t3)) H3 -(THead (Flat Cast) t2 t1) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat -Cast) t2 t1))) in (ex3_ind T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 -t2) t3)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t4: T).(ty3 g c0 t2 t4)) -(ex3 T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 t2) t0)) (\lambda (_: -T).(ty3 g c0 t1 t2)) (\lambda (t4: T).(ty3 g c0 t2 t4))) (\lambda (x0: -T).(\lambda (H11: (pc3 c0 (THead (Flat Cast) x0 t2) t3)).(\lambda (H12: (ty3 -g c0 t1 t2)).(\lambda (H13: (ty3 g c0 t2 x0)).(ex3_intro T (\lambda (t4: -T).(pc3 c0 (THead (Flat Cast) t4 t2) t0)) (\lambda (_: T).(ty3 g c0 t1 t2)) -(\lambda (t4: T).(ty3 g c0 t2 t4)) x0 (pc3_t t3 c0 (THead (Flat Cast) x0 t2) -H11 t0 H5) H12 H13))))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: -nat).(\lambda (H1: (eq T (TSort m) (THead (Flat Cast) t2 t1))).(let H2 \def -(eq_ind T (TSort m) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I -(THead (Flat Cast) t2 t1) H1) in (False_ind (ex3 T (\lambda (t0: T).(pc3 c0 -(THead (Flat Cast) t0 t2) (TSort (next g m)))) (\lambda (_: T).(ty3 g c0 t1 -t2)) (\lambda (t0: T).(ty3 g c0 t2 t0))) H2))))) (\lambda (n: nat).(\lambda -(c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d -(Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: -(((eq T u (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t0: T).(pc3 d -(THead (Flat Cast) t0 t2) t)) (\lambda (_: T).(ty3 g d t1 t2)) (\lambda (t0: -T).(ty3 g d t2 t0)))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Cast) t2 -t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in (False_ind (ex3 T -(\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (lift (S n) O t))) -(\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 t0))) -H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda -(_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (ex3 -T (\lambda (t0: T).(pc3 d (THead (Flat Cast) t0 t2) t)) (\lambda (_: T).(ty3 -g d t1 t2)) (\lambda (t0: T).(ty3 g d t2 t0)))))).(\lambda (H4: (eq T (TLRef -n) (THead (Flat Cast) t2 t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in -(False_ind (ex3 T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (lift (S -n) O u))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 -t0))) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda -(_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to -(ex3 T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) t)) (\lambda (_: -T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 t0)))))).(\lambda (b: -B).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) -u) t0 t3)).(\lambda (_: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (ex3 T -(\lambda (t4: T).(pc3 (CHead c0 (Bind b) u) (THead (Flat Cast) t4 t2) t3)) -(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t4: T).(ty3 g -(CHead c0 (Bind b) u) t2 t4)))))).(\lambda (H5: (eq T (THead (Bind b) u t0) -(THead (Flat Cast) t2 t1))).(let H6 \def (eq_ind T (THead (Bind b) u t0) -(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t2 -t1) H5) in (False_ind (ex3 T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 -t2) (THead (Bind b) u t3))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t4: -T).(ty3 g c0 t2 t4))) H6))))))))))))) (\lambda (c0: C).(\lambda (w: -T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (THead -(Flat Cast) t2 t1)) \to (ex3 T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 -t2) u)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 -t0)))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead -(Bind Abst) u t))).(\lambda (_: (((eq T v (THead (Flat Cast) t2 t1)) \to (ex3 -T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (THead (Bind Abst) u -t))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 -t0)))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead (Flat Cast) t2 -t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k -_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) -\Rightarrow (match f with [Appl \Rightarrow True | Cast \Rightarrow -False])])])) I (THead (Flat Cast) t2 t1) H5) in (False_ind (ex3 T (\lambda -(t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (THead (Flat Appl) w (THead (Bind -Abst) u t)))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 -t0))) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: -T).(\lambda (H1: (ty3 g c0 t0 t3)).(\lambda (H2: (((eq T t0 (THead (Flat -Cast) t2 t1)) \to (ex3 T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 t2) -t3)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t4: T).(ty3 g c0 t2 -t4)))))).(\lambda (t4: T).(\lambda (H3: (ty3 g c0 t3 t4)).(\lambda (H4: (((eq -T t3 (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t5: T).(pc3 c0 (THead -(Flat Cast) t5 t2) t4)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t5: -T).(ty3 g c0 t2 t5)))))).(\lambda (H5: (eq T (THead (Flat Cast) t3 t0) (THead -(Flat Cast) t2 t1))).(let H6 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ t _) -\Rightarrow t])) (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in -((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) -(THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in (\lambda (H8: (eq -T t3 t2)).(let H9 \def (eq_ind T t3 (\lambda (t: T).((eq T t (THead (Flat -Cast) t2 t1)) \to (ex3 T (\lambda (t5: T).(pc3 c0 (THead (Flat Cast) t5 t2) -t4)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5))))) -H4 t2 H8) in (let H10 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t t4)) H3 -t2 H8) in (let H11 \def (eq_ind T t3 (\lambda (t: T).((eq T t0 (THead (Flat -Cast) t2 t1)) \to (ex3 T (\lambda (t5: T).(pc3 c0 (THead (Flat Cast) t5 t2) -t)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5))))) -H2 t2 H8) in (let H12 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t0 t)) H1 -t2 H8) in (eq_ind_r T t2 (\lambda (t: T).(ex3 T (\lambda (t5: T).(pc3 c0 -(THead (Flat Cast) t5 t2) (THead (Flat Cast) t4 t))) (\lambda (_: T).(ty3 g -c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5)))) (let H13 \def (eq_ind T t0 -(\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t5: -T).(pc3 c0 (THead (Flat Cast) t5 t2) t2)) (\lambda (_: T).(ty3 g c0 t1 t2)) -(\lambda (t5: T).(ty3 g c0 t2 t5))))) H11 t1 H7) in (let H14 \def (eq_ind T -t0 (\lambda (t: T).(ty3 g c0 t t2)) H12 t1 H7) in (ex3_intro T (\lambda (t5: -T).(pc3 c0 (THead (Flat Cast) t5 t2) (THead (Flat Cast) t4 t2))) (\lambda (_: -T).(ty3 g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5)) t4 (pc3_refl c0 -(THead (Flat Cast) t4 t2)) H14 H10))) t3 H8))))))) H6))))))))))) c y x H0))) -H)))))). - -lemma tys3_gen_nil: - \forall (g: G).(\forall (c: C).(\forall (u: T).((tys3 g c TNil u) \to (ex T -(\lambda (u0: T).(ty3 g c u u0)))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (tys3 g c TNil -u)).(insert_eq TList TNil (\lambda (t: TList).(tys3 g c t u)) (\lambda (_: -TList).(ex T (\lambda (u0: T).(ty3 g c u u0)))) (\lambda (y: TList).(\lambda -(H0: (tys3 g c y u)).(tys3_ind g c (\lambda (t: TList).(\lambda (t0: T).((eq -TList t TNil) \to (ex T (\lambda (u0: T).(ty3 g c t0 u0)))))) (\lambda (u0: -T).(\lambda (u1: T).(\lambda (H1: (ty3 g c u0 u1)).(\lambda (_: (eq TList -TNil TNil)).(ex_intro T (\lambda (u2: T).(ty3 g c u0 u2)) u1 H1))))) (\lambda -(t: T).(\lambda (u0: T).(\lambda (_: (ty3 g c t u0)).(\lambda (ts: -TList).(\lambda (_: (tys3 g c ts u0)).(\lambda (_: (((eq TList ts TNil) \to -(ex T (\lambda (u1: T).(ty3 g c u0 u1)))))).(\lambda (H4: (eq TList (TCons t -ts) TNil)).(let H5 \def (eq_ind TList (TCons t ts) (\lambda (ee: -TList).(match ee with [TNil \Rightarrow False | (TCons _ _) \Rightarrow -True])) I TNil H4) in (False_ind (ex T (\lambda (u1: T).(ty3 g c u0 u1))) -H5))))))))) y u H0))) H)))). - -lemma tys3_gen_cons: - \forall (g: G).(\forall (c: C).(\forall (ts: TList).(\forall (t: T).(\forall -(u: T).((tys3 g c (TCons t ts) u) \to (land (ty3 g c t u) (tys3 g c ts -u))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (ts: TList).(\lambda (t: T).(\lambda -(u: T).(\lambda (H: (tys3 g c (TCons t ts) u)).(insert_eq TList (TCons t ts) -(\lambda (t0: TList).(tys3 g c t0 u)) (\lambda (_: TList).(land (ty3 g c t u) -(tys3 g c ts u))) (\lambda (y: TList).(\lambda (H0: (tys3 g c y u)).(tys3_ind -g c (\lambda (t0: TList).(\lambda (t1: T).((eq TList t0 (TCons t ts)) \to -(land (ty3 g c t t1) (tys3 g c ts t1))))) (\lambda (u0: T).(\lambda (u1: -T).(\lambda (_: (ty3 g c u0 u1)).(\lambda (H2: (eq TList TNil (TCons t -ts))).(let H3 \def (eq_ind TList TNil (\lambda (ee: TList).(match ee with -[TNil \Rightarrow True | (TCons _ _) \Rightarrow False])) I (TCons t ts) H2) -in (False_ind (land (ty3 g c t u0) (tys3 g c ts u0)) H3)))))) (\lambda (t0: -T).(\lambda (u0: T).(\lambda (H1: (ty3 g c t0 u0)).(\lambda (ts0: -TList).(\lambda (H2: (tys3 g c ts0 u0)).(\lambda (H3: (((eq TList ts0 (TCons -t ts)) \to (land (ty3 g c t u0) (tys3 g c ts u0))))).(\lambda (H4: (eq TList -(TCons t0 ts0) (TCons t ts))).(let H5 \def (f_equal TList T (\lambda (e: -TList).(match e with [TNil \Rightarrow t0 | (TCons t1 _) \Rightarrow t1])) -(TCons t0 ts0) (TCons t ts) H4) in ((let H6 \def (f_equal TList TList -(\lambda (e: TList).(match e with [TNil \Rightarrow ts0 | (TCons _ t1) -\Rightarrow t1])) (TCons t0 ts0) (TCons t ts) H4) in (\lambda (H7: (eq T t0 -t)).(let H8 \def (eq_ind TList ts0 (\lambda (t1: TList).((eq TList t1 (TCons -t ts)) \to (land (ty3 g c t u0) (tys3 g c ts u0)))) H3 ts H6) in (let H9 \def -(eq_ind TList ts0 (\lambda (t1: TList).(tys3 g c t1 u0)) H2 ts H6) in (let -H10 \def (eq_ind T t0 (\lambda (t1: T).(ty3 g c t1 u0)) H1 t H7) in (conj -(ty3 g c t u0) (tys3 g c ts u0) H10 H9)))))) H5))))))))) y u H0))) H)))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd_nf2.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd_nf2.ma deleted file mode 100644 index d98b4020c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/fwd_nf2.ma +++ /dev/null @@ -1,284 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/arity_props.ma". - -include "basic_1/pc3/nf2.ma". - -include "basic_1/nf2/fwd.ma". - -lemma ty3_gen_appl_nf2: - \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x: -T).((ty3 g c (THead (Flat Appl) w v) x) \to (ex4_2 T T (\lambda (u: -T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) -(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) -(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: -T).(nf2 c (THead (Bind Abst) u t)))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (v: T).(\lambda (x: -T).(\lambda (H: (ty3 g c (THead (Flat Appl) w v) x)).(ex3_2_ind T T (\lambda -(u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) -x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) -(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (ex4_2 T T (\lambda (u: -T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) -(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) -(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: -T).(nf2 c (THead (Bind Abst) u t))))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H0: (pc3 c (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) -x)).(\lambda (H1: (ty3 g c v (THead (Bind Abst) x0 x1))).(\lambda (H2: (ty3 g -c w x0)).(let H_x \def (ty3_correct g c v (THead (Bind Abst) x0 x1) H1) in -(let H3 \def H_x in (ex_ind T (\lambda (t: T).(ty3 g c (THead (Bind Abst) x0 -x1) t)) (ex4_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) -w (THead (Bind Abst) u t)) x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v -(THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) -(\lambda (u: T).(\lambda (t: T).(nf2 c (THead (Bind Abst) u t))))) (\lambda -(x2: T).(\lambda (H4: (ty3 g c (THead (Bind Abst) x0 x1) x2)).(let H_x0 \def -(ty3_correct g c w x0 H2) in (let H5 \def H_x0 in (ex_ind T (\lambda (t: -T).(ty3 g c x0 t)) (ex4_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c (THead -(Flat Appl) w (THead (Bind Abst) u t)) x))) (\lambda (u: T).(\lambda (t: -T).(ty3 g c v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 -g c w u))) (\lambda (u: T).(\lambda (t: T).(nf2 c (THead (Bind Abst) u t))))) -(\lambda (x3: T).(\lambda (H6: (ty3 g c x0 x3)).(let H7 \def (ty3_sn3 g c -(THead (Bind Abst) x0 x1) x2 H4) in (let H_x1 \def (nf2_sn3 c (THead (Bind -Abst) x0 x1) H7) in (let H8 \def H_x1 in (ex2_ind T (\lambda (u: T).(pr3 c -(THead (Bind Abst) x0 x1) u)) (\lambda (u: T).(nf2 c u)) (ex4_2 T T (\lambda -(u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) -x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) -(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: -T).(nf2 c (THead (Bind Abst) u t))))) (\lambda (x4: T).(\lambda (H9: (pr3 c -(THead (Bind Abst) x0 x1) x4)).(\lambda (H10: (nf2 c x4)).(let H11 \def -(pr3_gen_abst c x0 x1 x4 H9) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x4 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u: T).(pr3 (CHead c (Bind b) u) x1 t2))))) (ex4_2 T T (\lambda (u: -T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) -(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) -(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: -T).(nf2 c (THead (Bind Abst) u t))))) (\lambda (x5: T).(\lambda (x6: -T).(\lambda (H12: (eq T x4 (THead (Bind Abst) x5 x6))).(\lambda (H13: (pr3 c -x0 x5)).(\lambda (H14: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind -b) u) x1 x6))))).(let H15 \def (eq_ind T x4 (\lambda (t: T).(nf2 c t)) H10 -(THead (Bind Abst) x5 x6) H12) in (let H16 \def (pr3_head_12 c x0 x5 H13 -(Bind Abst) x1 x6 (H14 Abst x5)) in (ex4_2_intro T T (\lambda (u: T).(\lambda -(t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) (\lambda (u: -T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) (\lambda (u: -T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: T).(nf2 c -(THead (Bind Abst) u t)))) x5 x6 (pc3_pr3_conf c (THead (Flat Appl) w (THead -(Bind Abst) x0 x1)) x H0 (THead (Flat Appl) w (THead (Bind Abst) x5 x6)) -(pr3_thin_dx c (THead (Bind Abst) x0 x1) (THead (Bind Abst) x5 x6) H16 w -Appl)) (ty3_conv g c (THead (Bind Abst) x5 x6) x2 (ty3_sred_pr3 c (THead -(Bind Abst) x0 x1) (THead (Bind Abst) x5 x6) H16 g x2 H4) v (THead (Bind -Abst) x0 x1) H1 (pc3_pr3_r c (THead (Bind Abst) x0 x1) (THead (Bind Abst) x5 -x6) H16)) (ty3_conv g c x5 x3 (ty3_sred_pr3 c x0 x5 H13 g x3 H6) w x0 H2 -(pc3_pr3_r c x0 x5 H13)) H15)))))))) H11))))) H8)))))) H5))))) H3)))))))) -(ty3_gen_appl g c w v x H))))))). - -lemma ty3_inv_lref_nf2_pc3: - \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (i: nat).((ty3 g c -(TLRef i) u1) \to ((nf2 c (TLRef i)) \to (\forall (u2: T).((nf2 c u2) \to -((pc3 c u1 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift (S i) O u)))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (i: nat).(\lambda -(H: (ty3 g c (TLRef i) u1)).(insert_eq T (TLRef i) (\lambda (t: T).(ty3 g c t -u1)) (\lambda (t: T).((nf2 c t) \to (\forall (u2: T).((nf2 c u2) \to ((pc3 c -u1 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift (S i) O u))))))))) (\lambda -(y: T).(\lambda (H0: (ty3 g c y u1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: -T).(\lambda (t0: T).((eq T t (TLRef i)) \to ((nf2 c0 t) \to (\forall (u2: -T).((nf2 c0 u2) \to ((pc3 c0 t0 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift -(S i) O u)))))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (TLRef i)) \to ((nf2 -c0 t2) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 t u2) \to (ex T -(\lambda (u: T).(eq T u2 (lift (S i) O u))))))))))).(\lambda (u: T).(\lambda -(t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (TLRef i)) \to -((nf2 c0 u) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 t1 u2) \to (ex T -(\lambda (u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (H5: (pc3 c0 -t1 t2)).(\lambda (H6: (eq T u (TLRef i))).(\lambda (H7: (nf2 c0 u)).(\lambda -(u2: T).(\lambda (H8: (nf2 c0 u2)).(\lambda (H9: (pc3 c0 t2 u2)).(let H10 -\def (eq_ind T u (\lambda (t0: T).(nf2 c0 t0)) H7 (TLRef i) H6) in (let H11 -\def (eq_ind T u (\lambda (t0: T).((eq T t0 (TLRef i)) \to ((nf2 c0 t0) \to -(\forall (u3: T).((nf2 c0 u3) \to ((pc3 c0 t1 u3) \to (ex T (\lambda (u0: -T).(eq T u3 (lift (S i) O u0)))))))))) H4 (TLRef i) H6) in (let H12 \def -(eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (TLRef i) H6) in (let H_y -\def (H11 (refl_equal T (TLRef i)) H10 u2 H8) in (H_y (pc3_t t2 c0 t1 H5 u2 -H9))))))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq -T (TSort m) (TLRef i))).(\lambda (_: (nf2 c0 (TSort m))).(\lambda (u2: -T).(\lambda (_: (nf2 c0 u2)).(\lambda (_: (pc3 c0 (TSort (next g m)) -u2)).(let H5 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee with [(TSort -_) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (TLRef i) H1) in (False_ind (ex T (\lambda (u: T).(eq T u2 (lift -(S i) O u)))) H5))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (H1: (getl n c0 (CHead d (Bind Abbr) -u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u -(TLRef i)) \to ((nf2 d u) \to (\forall (u2: T).((nf2 d u2) \to ((pc3 d t u2) -\to (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (H4: -(eq T (TLRef n) (TLRef i))).(\lambda (H5: (nf2 c0 (TLRef n))).(\lambda (u2: -T).(\lambda (_: (nf2 c0 u2)).(\lambda (H7: (pc3 c0 (lift (S n) O t) u2)).(let -H8 \def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow n -| (TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef -i) H4) in (let H9 \def (eq_ind nat n (\lambda (n0: nat).(pc3 c0 (lift (S n0) -O t) u2)) H7 i H8) in (let H10 \def (eq_ind nat n (\lambda (n0: nat).(nf2 c0 -(TLRef n0))) H5 i H8) in (let H11 \def (eq_ind nat n (\lambda (n0: nat).(getl -n0 c0 (CHead d (Bind Abbr) u))) H1 i H8) in (nf2_gen_lref c0 d u i H11 H10 -(ex T (\lambda (u0: T).(eq T u2 (lift (S i) O u0)))))))))))))))))))))) -(\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda -(H1: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g -d u t)).(\lambda (_: (((eq T u (TLRef i)) \to ((nf2 d u) \to (\forall (u2: -T).((nf2 d u2) \to ((pc3 d t u2) \to (ex T (\lambda (u0: T).(eq T u2 (lift (S -i) O u0))))))))))).(\lambda (H4: (eq T (TLRef n) (TLRef i))).(\lambda (H5: -(nf2 c0 (TLRef n))).(\lambda (u2: T).(\lambda (H6: (nf2 c0 u2)).(\lambda (H7: -(pc3 c0 (lift (S n) O u) u2)).(let H8 \def (f_equal T nat (\lambda (e: -T).(match e with [(TSort _) \Rightarrow n | (TLRef n0) \Rightarrow n0 | -(THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef i) H4) in (let H9 \def -(eq_ind nat n (\lambda (n0: nat).(pc3 c0 (lift (S n0) O u) u2)) H7 i H8) in -(let H10 \def (eq_ind nat n (\lambda (n0: nat).(nf2 c0 (TLRef n0))) H5 i H8) -in (let H11 \def (eq_ind nat n (\lambda (n0: nat).(getl n0 c0 (CHead d (Bind -Abst) u))) H1 i H8) in (let H_y \def (pc3_nf2_unfold c0 (lift (S i) O u) u2 -H9 H6) in (let H12 \def (pr3_gen_lift c0 u u2 (S i) O H_y d (getl_drop Abst -c0 d u i H11)) in (ex2_ind T (\lambda (t2: T).(eq T u2 (lift (S i) O t2))) -(\lambda (t2: T).(pr3 d u t2)) (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O -u0)))) (\lambda (x: T).(\lambda (H13: (eq T u2 (lift (S i) O x))).(\lambda -(_: (pr3 d u x)).(eq_ind_r T (lift (S i) O x) (\lambda (t0: T).(ex T (\lambda -(u0: T).(eq T t0 (lift (S i) O u0))))) (ex_intro T (\lambda (u0: T).(eq T -(lift (S i) O x) (lift (S i) O u0))) x (refl_equal T (lift (S i) O x))) u2 -H13)))) H12)))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TLRef i)) \to ((nf2 -c0 u) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 t u2) \to (ex T (\lambda -(u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (b: B).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 -t2)).(\lambda (_: (((eq T t1 (TLRef i)) \to ((nf2 (CHead c0 (Bind b) u) t1) -\to (\forall (u2: T).((nf2 (CHead c0 (Bind b) u) u2) \to ((pc3 (CHead c0 -(Bind b) u) t2 u2) \to (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O -u0))))))))))).(\lambda (H5: (eq T (THead (Bind b) u t1) (TLRef i))).(\lambda -(_: (nf2 c0 (THead (Bind b) u t1))).(\lambda (u2: T).(\lambda (_: (nf2 c0 -u2)).(\lambda (_: (pc3 c0 (THead (Bind b) u t2) u2)).(let H9 \def (eq_ind T -(THead (Bind b) u t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef i) H5) in (False_ind (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O -u0)))) H9))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: -T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TLRef i)) \to ((nf2 -c0 w) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 u u2) \to (ex T (\lambda -(u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (v: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v -(TLRef i)) \to ((nf2 c0 v) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 -(THead (Bind Abst) u t) u2) \to (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O -u0))))))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TLRef -i))).(\lambda (_: (nf2 c0 (THead (Flat Appl) w v))).(\lambda (u2: T).(\lambda -(_: (nf2 c0 u2)).(\lambda (_: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) -u t)) u2)).(let H9 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (ex T -(\lambda (u0: T).(eq T u2 (lift (S i) O u0)))) H9)))))))))))))))) (\lambda -(c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 -t2)).(\lambda (_: (((eq T t1 (TLRef i)) \to ((nf2 c0 t1) \to (\forall (u2: -T).((nf2 c0 u2) \to ((pc3 c0 t2 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift -(S i) O u))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda -(_: (((eq T t2 (TLRef i)) \to ((nf2 c0 t2) \to (\forall (u2: T).((nf2 c0 u2) -\to ((pc3 c0 t0 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift (S i) O -u))))))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TLRef -i))).(\lambda (_: (nf2 c0 (THead (Flat Cast) t2 t1))).(\lambda (u2: -T).(\lambda (_: (nf2 c0 u2)).(\lambda (_: (pc3 c0 (THead (Flat Cast) t0 t2) -u2)).(let H9 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match -ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ -_ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (ex T (\lambda (u: -T).(eq T u2 (lift (S i) O u)))) H9))))))))))))))) c y u1 H0))) H))))). - -lemma ty3_inv_lref_nf2: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (i: nat).((ty3 g c -(TLRef i) u) \to ((nf2 c (TLRef i)) \to ((nf2 c u) \to (ex T (\lambda (u0: -T).(eq T u (lift (S i) O u0)))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (ty3 g c (TLRef i) u)).(\lambda (H0: (nf2 c (TLRef i))).(\lambda (H1: -(nf2 c u)).(ty3_inv_lref_nf2_pc3 g c u i H H0 u H1 (pc3_refl c u)))))))). - -lemma ty3_inv_appls_lref_nf2: - \forall (g: G).(\forall (c: C).(\forall (vs: TList).(\forall (u1: -T).(\forall (i: nat).((ty3 g c (THeads (Flat Appl) vs (TLRef i)) u1) \to -((nf2 c (TLRef i)) \to ((nf2 c u1) \to (ex2 T (\lambda (u: T).(nf2 c (lift (S -i) O u))) (\lambda (u: T).(pc3 c (THeads (Flat Appl) vs (lift (S i) O u)) -u1)))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (vs: TList).(TList_ind (\lambda (t: -TList).(\forall (u1: T).(\forall (i: nat).((ty3 g c (THeads (Flat Appl) t -(TLRef i)) u1) \to ((nf2 c (TLRef i)) \to ((nf2 c u1) \to (ex2 T (\lambda (u: -T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 c (THeads (Flat Appl) t -(lift (S i) O u)) u1))))))))) (\lambda (u1: T).(\lambda (i: nat).(\lambda (H: -(ty3 g c (TLRef i) u1)).(\lambda (H0: (nf2 c (TLRef i))).(\lambda (H1: (nf2 c -u1)).(let H_x \def (ty3_inv_lref_nf2 g c u1 i H H0 H1) in (let H2 \def H_x in -(ex_ind T (\lambda (u0: T).(eq T u1 (lift (S i) O u0))) (ex2 T (\lambda (u: -T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 c (lift (S i) O u) u1))) -(\lambda (x: T).(\lambda (H3: (eq T u1 (lift (S i) O x))).(let H4 \def -(eq_ind T u1 (\lambda (t: T).(nf2 c t)) H1 (lift (S i) O x) H3) in (eq_ind_r -T (lift (S i) O x) (\lambda (t: T).(ex2 T (\lambda (u: T).(nf2 c (lift (S i) -O u))) (\lambda (u: T).(pc3 c (lift (S i) O u) t)))) (ex_intro2 T (\lambda -(u: T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 c (lift (S i) O u) -(lift (S i) O x))) x H4 (pc3_refl c (lift (S i) O x))) u1 H3)))) H2)))))))) -(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: ((\forall (u1: T).(\forall -(i: nat).((ty3 g c (THeads (Flat Appl) t0 (TLRef i)) u1) \to ((nf2 c (TLRef -i)) \to ((nf2 c u1) \to (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) -(\lambda (u: T).(pc3 c (THeads (Flat Appl) t0 (lift (S i) O u)) -u1)))))))))).(\lambda (u1: T).(\lambda (i: nat).(\lambda (H0: (ty3 g c (THead -(Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) u1)).(\lambda (H1: (nf2 c -(TLRef i))).(\lambda (_: (nf2 c u1)).(let H_x \def (ty3_gen_appl_nf2 g c t -(THeads (Flat Appl) t0 (TLRef i)) u1 H0) in (let H3 \def H_x in (ex4_2_ind T -T (\lambda (u: T).(\lambda (t1: T).(pc3 c (THead (Flat Appl) t (THead (Bind -Abst) u t1)) u1))) (\lambda (u: T).(\lambda (t1: T).(ty3 g c (THeads (Flat -Appl) t0 (TLRef i)) (THead (Bind Abst) u t1)))) (\lambda (u: T).(\lambda (_: -T).(ty3 g c t u))) (\lambda (u: T).(\lambda (t1: T).(nf2 c (THead (Bind Abst) -u t1)))) (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) (\lambda (u: -T).(pc3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O u))) -u1))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (pc3 c (THead (Flat -Appl) t (THead (Bind Abst) x0 x1)) u1)).(\lambda (H5: (ty3 g c (THeads (Flat -Appl) t0 (TLRef i)) (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c t -x0)).(\lambda (H7: (nf2 c (THead (Bind Abst) x0 x1))).(let H8 \def -(nf2_gen_abst c x0 x1 H7) in (land_ind (nf2 c x0) (nf2 (CHead c (Bind Abst) -x0) x1) (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 -c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O u))) u1))) -(\lambda (H9: (nf2 c x0)).(\lambda (H10: (nf2 (CHead c (Bind Abst) x0) -x1)).(let H_y \def (H (THead (Bind Abst) x0 x1) i H5 H1) in (let H11 \def -(H_y (nf2_abst_shift c x0 H9 x1 H10)) in (ex2_ind T (\lambda (u: T).(nf2 c -(lift (S i) O u))) (\lambda (u: T).(pc3 c (THeads (Flat Appl) t0 (lift (S i) -O u)) (THead (Bind Abst) x0 x1))) (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O -u))) (\lambda (u: T).(pc3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift -(S i) O u))) u1))) (\lambda (x: T).(\lambda (H12: (nf2 c (lift (S i) O -x))).(\lambda (H13: (pc3 c (THeads (Flat Appl) t0 (lift (S i) O x)) (THead -(Bind Abst) x0 x1))).(ex_intro2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) -(\lambda (u: T).(pc3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S -i) O u))) u1)) x H12 (pc3_t (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) c -(THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O x))) (pc3_thin_dx c -(THeads (Flat Appl) t0 (lift (S i) O x)) (THead (Bind Abst) x0 x1) H13 t -Appl) u1 H4))))) H11))))) H8)))))))) H3))))))))))) vs))). - -lemma ty3_inv_lref_lref_nf2: - \forall (g: G).(\forall (c: C).(\forall (i: nat).(\forall (j: nat).((ty3 g c -(TLRef i) (TLRef j)) \to ((nf2 c (TLRef i)) \to ((nf2 c (TLRef j)) \to (lt i -j))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (i: nat).(\lambda (j: nat).(\lambda -(H: (ty3 g c (TLRef i) (TLRef j))).(\lambda (H0: (nf2 c (TLRef i))).(\lambda -(H1: (nf2 c (TLRef j))).(let H_x \def (ty3_inv_lref_nf2 g c (TLRef j) i H H0 -H1) in (let H2 \def H_x in (ex_ind T (\lambda (u0: T).(eq T (TLRef j) (lift -(S i) O u0))) (lt i j) (\lambda (x: T).(\lambda (H3: (eq T (TLRef j) (lift (S -i) O x))).(let H_x0 \def (lift_gen_lref x O (S i) j H3) in (let H4 \def H_x0 -in (or_ind (land (lt j O) (eq T x (TLRef j))) (land (le (S i) j) (eq T x -(TLRef (minus j (S i))))) (lt i j) (\lambda (H5: (land (lt j O) (eq T x -(TLRef j)))).(land_ind (lt j O) (eq T x (TLRef j)) (lt i j) (\lambda (H6: (lt -j O)).(\lambda (_: (eq T x (TLRef j))).(lt_x_O j H6 (lt i j)))) H5)) (\lambda -(H5: (land (le (S i) j) (eq T x (TLRef (minus j (S i)))))).(land_ind (le (S -i) j) (eq T x (TLRef (minus j (S i)))) (lt i j) (\lambda (H6: (le (S i) -j)).(\lambda (_: (eq T x (TLRef (minus j (S i))))).H6)) H5)) H4))))) -H2))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/nf2.ma deleted file mode 100644 index f5a2ebb24..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/nf2.ma +++ /dev/null @@ -1,455 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/arity.ma". - -include "basic_1/pc3/nf2.ma". - -include "basic_1/nf2/arity.ma". - -definition ty3_nf2_inv_abst_premise: - C \to (T \to (T \to Prop)) -\def - \lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\forall (d: C).(\forall (wi: -T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) wi)) \to (\forall (vs: -TList).((pc3 c (THeads (Flat Appl) vs (lift (S i) O wi)) (THead (Bind Abst) w -u)) \to False)))))))). - -lemma ty3_nf2_inv_abst_premise_csort: - \forall (w: T).(\forall (u: T).(\forall (m: nat).(ty3_nf2_inv_abst_premise -(CSort m) w u))) -\def - \lambda (w: T).(\lambda (u: T).(\lambda (m: nat).(\lambda (d: C).(\lambda -(wi: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort m) (CHead d (Bind Abst) -wi))).(\lambda (vs: TList).(\lambda (_: (pc3 (CSort m) (THeads (Flat Appl) vs -(lift (S i) O wi)) (THead (Bind Abst) w u))).(getl_gen_sort m i (CHead d -(Bind Abst) wi) H False))))))))). - -lemma ty3_nf2_inv_all: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t -u) \to ((nf2 c t) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T -t (THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) -(\lambda (w: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w) u0)))) (ex nat -(\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: -(ty3 g c t u)).(\lambda (H0: (nf2 c t)).(let H_x \def (ty3_arity g c t u H) -in (let H1 \def H_x in (ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda -(a1: A).(arity g c u (asucc g a1))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda -(u0: T).(eq T t (THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: -T).(nf2 c w))) (\lambda (w: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w) -u0)))) (ex nat (\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat -(\lambda (ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef -i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i)))))) (\lambda (x: A).(\lambda (H2: -(arity g c t x)).(\lambda (_: (arity g c u (asucc g x))).(arity_nf2_inv_all g -c t x H2 H0)))) H1)))))))). - -lemma ty3_nf2_inv_sort: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (m: nat).((ty3 g c t -(TSort m)) \to ((nf2 c t) \to (or (ex2 nat (\lambda (n: nat).(eq T t (TSort -n))) (\lambda (n: nat).(eq nat m (next g n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (m: nat).(\lambda -(H: (ty3 g c t (TSort m))).(\lambda (H0: (nf2 c t)).(let H_x \def -(ty3_nf2_inv_all g c t (TSort m) H H0) in (let H1 \def H_x in (or3_ind (ex3_2 -T T (\lambda (w: T).(\lambda (u: T).(eq T t (THead (Bind Abst) w u)))) -(\lambda (w: T).(\lambda (_: T).(nf2 c w))) (\lambda (w: T).(\lambda (u: -T).(nf2 (CHead c (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t -(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t -(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i))))) -(or (ex2 nat (\lambda (n: nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat -m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T -t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef -i)))))) (\lambda (H2: (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t -(THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) -(\lambda (w: T).(\lambda (u: T).(nf2 (CHead c (Bind Abst) w) -u))))).(ex3_2_ind T T (\lambda (w: T).(\lambda (u: T).(eq T t (THead (Bind -Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) (\lambda (w: -T).(\lambda (u: T).(nf2 (CHead c (Bind Abst) w) u))) (or (ex2 nat (\lambda -(n: nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) -ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i)))))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H3: (eq T t (THead (Bind Abst) x0 -x1))).(\lambda (_: (nf2 c x0)).(\lambda (_: (nf2 (CHead c (Bind Abst) x0) -x1)).(let H6 \def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (TSort m))) H -(THead (Bind Abst) x0 x1) H3) in (eq_ind_r T (THead (Bind Abst) x0 x1) -(\lambda (t0: T).(or (ex2 nat (\lambda (n: nat).(eq T t0 (TSort n))) (\lambda -(n: nat).(eq nat m (next g n)))) (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 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (ex3_2_ind T T (\lambda (t2: -T).(\lambda (_: T).(pc3 c (THead (Bind Abst) x0 t2) (TSort m)))) (\lambda (_: -T).(\lambda (t0: T).(ty3 g c x0 t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) x0) x1 t2))) (or (ex2 nat (\lambda (n: nat).(eq T (THead -(Bind Abst) x0 x1) (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) -(ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind -Abst) x0 x1) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c (TLRef i)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: -(pc3 c (THead (Bind Abst) x0 x2) (TSort m))).(\lambda (_: (ty3 g c x0 -x3)).(\lambda (_: (ty3 g (CHead c (Bind Abst) x0) x1 x2)).(pc3_gen_sort_abst -c x0 x2 m (pc3_s c (TSort m) (THead (Bind Abst) x0 x2) H7) (or (ex2 nat -(\lambda (n: nat).(eq T (THead (Bind Abst) x0 x1) (TSort n))) (\lambda (n: -nat).(eq nat m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda -(i: nat).(eq T (THead (Bind Abst) x0 x1) (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i)))))))))))) (ty3_gen_bind g Abst c -x0 x1 (TSort m) H6)) t H3))))))) H2)) (\lambda (H2: (ex nat (\lambda (n: -nat).(eq T t (TSort n))))).(ex_ind nat (\lambda (n: nat).(eq T t (TSort n))) -(or (ex2 nat (\lambda (n: nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat -m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T -t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef -i)))))) (\lambda (x: nat).(\lambda (H3: (eq T t (TSort x))).(let H4 \def -(eq_ind T t (\lambda (t0: T).(ty3 g c t0 (TSort m))) H (TSort x) H3) in -(eq_ind_r T (TSort x) (\lambda (t0: T).(or (ex2 nat (\lambda (n: nat).(eq T -t0 (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) (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 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (eq_ind nat (next g x) -(\lambda (n: nat).(or (ex2 nat (\lambda (n0: nat).(eq T (TSort x) (TSort -n0))) (\lambda (n0: nat).(eq nat n (next g n0)))) (ex3_2 TList nat (\lambda -(ws: TList).(\lambda (i: nat).(eq T (TSort x) (THeads (Flat Appl) ws (TLRef -i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (or_introl (ex2 nat (\lambda -(n: nat).(eq T (TSort x) (TSort n))) (\lambda (n: nat).(eq nat (next g x) -(next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T -(TSort x) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda -(_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef -i))))) (ex_intro2 nat (\lambda (n: nat).(eq T (TSort x) (TSort n))) (\lambda -(n: nat).(eq nat (next g x) (next g n))) x (refl_equal T (TSort x)) -(refl_equal nat (next g x)))) m (pc3_gen_sort c (next g x) m (ty3_gen_sort g -c (TSort m) x H4))) t H3)))) H2)) (\lambda (H2: (ex3_2 TList nat (\lambda -(ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i)))))).(ex3_2_ind TList nat (\lambda -(ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i)))) (or (ex2 nat (\lambda (n: -nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) (ex3_2 -TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) -ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) -(\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i)))))) (\lambda (x0: -TList).(\lambda (x1: nat).(\lambda (H3: (eq T t (THeads (Flat Appl) x0 (TLRef -x1)))).(\lambda (H4: (nfs2 c x0)).(\lambda (H5: (nf2 c (TLRef x1))).(let H6 -\def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (TSort m))) H (THeads (Flat -Appl) x0 (TLRef x1)) H3) in (eq_ind_r T (THeads (Flat Appl) x0 (TLRef x1)) -(\lambda (t0: T).(or (ex2 nat (\lambda (n: nat).(eq T t0 (TSort n))) (\lambda -(n: nat).(eq nat m (next g n)))) (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 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (or_intror (ex2 nat (\lambda -(n: nat).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (TSort n))) (\lambda (n: -nat).(eq nat m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda -(i: nat).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (THeads (Flat Appl) ws -(TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda -(_: TList).(\lambda (i: nat).(nf2 c (TLRef i))))) (ex3_2_intro TList nat -(\lambda (ws: TList).(\lambda (i: nat).(eq T (THeads (Flat Appl) x0 (TLRef -x1)) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: -nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i)))) -x0 x1 (refl_equal T (THeads (Flat Appl) x0 (TLRef x1))) H4 H5)) t H3))))))) -H2)) H1)))))))). - -fact ty3_nf2_gen__ty3_nf2_inv_abst_aux: - \forall (c: C).(\forall (w1: T).(\forall (u1: T).((ty3_nf2_inv_abst_premise -c w1 u1) \to (\forall (t: T).(\forall (w2: T).(\forall (u2: T).((pc3 c (THead -(Flat Appl) t (THead (Bind Abst) w2 u2)) (THead (Bind Abst) w1 u1)) \to -(ty3_nf2_inv_abst_premise c w2 u2)))))))) -\def - \lambda (c: C).(\lambda (w1: T).(\lambda (u1: T).(\lambda (H: ((\forall (d: -C).(\forall (wi: T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) wi)) -\to (\forall (vs: TList).((pc3 c (THeads (Flat Appl) vs (lift (S i) O wi)) -(THead (Bind Abst) w1 u1)) \to False)))))))).(\lambda (t: T).(\lambda (w2: -T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Flat Appl) t (THead (Bind -Abst) w2 u2)) (THead (Bind Abst) w1 u1))).(\lambda (d: C).(\lambda (wi: -T).(\lambda (i: nat).(\lambda (H1: (getl i c (CHead d (Bind Abst) -wi))).(\lambda (vs: TList).(\lambda (H2: (pc3 c (THeads (Flat Appl) vs (lift -(S i) O wi)) (THead (Bind Abst) w2 u2))).(H d wi i H1 (TCons t vs) (pc3_t -(THead (Flat Appl) t (THead (Bind Abst) w2 u2)) c (THead (Flat Appl) t -(THeads (Flat Appl) vs (lift (S i) O wi))) (pc3_thin_dx c (THeads (Flat Appl) -vs (lift (S i) O wi)) (THead (Bind Abst) w2 u2) H2 t Appl) (THead (Bind Abst) -w1 u1) H0))))))))))))))). - -lemma ty3_nf2_inv_abst: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (w: T).(\forall (u: -T).((ty3 g c t (THead (Bind Abst) w u)) \to ((nf2 c t) \to ((nf2 c w) \to -((ty3_nf2_inv_abst_premise c w u) \to (ex4_2 T T (\lambda (v: T).(\lambda (_: -T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g -c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v -u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) -v)))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (w: T).(\lambda (u: -T).(\lambda (H: (ty3 g c t (THead (Bind Abst) w u))).(\lambda (H0: (nf2 c -t)).(\lambda (H1: (nf2 c w)).(\lambda (H2: (ty3_nf2_inv_abst_premise c w -u)).(let H_x \def (ty3_nf2_inv_all g c t (THead (Bind Abst) w u) H H0) in -(let H3 \def H_x in (or3_ind (ex3_2 T T (\lambda (w0: T).(\lambda (u0: T).(eq -T t (THead (Bind Abst) w0 u0)))) (\lambda (w0: T).(\lambda (_: T).(nf2 c -w0))) (\lambda (w0: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w0) u0)))) -(ex nat (\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat (\lambda (ws: -TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) -(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: -TList).(\lambda (i: nat).(nf2 c (TLRef i))))) (ex4_2 T T (\lambda (v: -T).(\lambda (_: T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: -T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c -(Bind Abst) w) v)))) (\lambda (H4: (ex3_2 T T (\lambda (w0: T).(\lambda (u0: -T).(eq T t (THead (Bind Abst) w0 u0)))) (\lambda (w0: T).(\lambda (_: T).(nf2 -c w0))) (\lambda (w0: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w0) -u0))))).(ex3_2_ind T T (\lambda (w0: T).(\lambda (u0: T).(eq T t (THead (Bind -Abst) w0 u0)))) (\lambda (w0: T).(\lambda (_: T).(nf2 c w0))) (\lambda (w0: -T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w0) u0))) (ex4_2 T T (\lambda -(v: T).(\lambda (_: T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: -T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c -(Bind Abst) w) v)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t -(THead (Bind Abst) x0 x1))).(\lambda (H6: (nf2 c x0)).(\lambda (H7: (nf2 -(CHead c (Bind Abst) x0) x1)).(let H8 \def (eq_ind T t (\lambda (t0: T).(ty3 -g c t0 (THead (Bind Abst) w u))) H (THead (Bind Abst) x0 x1) H5) in (eq_ind_r -T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(ex4_2 T T (\lambda (v: -T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) w v)))) (\lambda (_: -T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c -(Bind Abst) w) v))))) (ex_ind T (\lambda (t0: T).(ty3 g c (THead (Bind Abst) -w u) t0)) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Bind Abst) -x0 x1) (THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w -w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) -(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda -(x: T).(\lambda (H9: (ty3 g c (THead (Bind Abst) w u) x)).(ex3_2_ind T T -(\lambda (t2: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) w t2) x))) -(\lambda (_: T).(\lambda (t0: T).(ty3 g c w t0))) (\lambda (t2: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) w) u t2))) (ex4_2 T T (\lambda (v: -T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) w v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda (x2: T).(\lambda (x3: -T).(\lambda (_: (pc3 c (THead (Bind Abst) w x2) x)).(\lambda (H11: (ty3 g c w -x3)).(\lambda (H12: (ty3 g (CHead c (Bind Abst) w) u x2)).(ex3_2_ind T T -(\lambda (t2: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) x0 t2) (THead -(Bind Abst) w u)))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c x0 t0))) -(\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x0) x1 t2))) -(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) -(THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) -(\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) -(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda -(x4: T).(\lambda (x5: T).(\lambda (H13: (pc3 c (THead (Bind Abst) x0 x4) -(THead (Bind Abst) w u))).(\lambda (_: (ty3 g c x0 x5)).(\lambda (H15: (ty3 g -(CHead c (Bind Abst) x0) x1 x4)).(land_ind (pc3 c x0 w) (\forall (b: -B).(\forall (u0: T).(pc3 (CHead c (Bind b) u0) x4 u))) (ex4_2 T T (\lambda -(v: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) w -v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: -T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: -T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda (H16: (pc3 c -x0 w)).(\lambda (H17: ((\forall (b: B).(\forall (u0: T).(pc3 (CHead c (Bind -b) u0) x4 u))))).(let H_y \def (pc3_nf2 c x0 w H16 H6 H1) in (let H18 \def -(eq_ind T x0 (\lambda (t0: T).(ty3 g (CHead c (Bind Abst) t0) x1 x4)) H15 w -H_y) in (let H19 \def (eq_ind T x0 (\lambda (t0: T).(nf2 (CHead c (Bind Abst) -t0) x1)) H7 w H_y) in (eq_ind_r T w (\lambda (t0: T).(ex4_2 T T (\lambda (v: -T).(\lambda (_: T).(eq T (THead (Bind Abst) t0 x1) (THead (Bind Abst) w v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) w) v))))) (ex4_2_intro T T (\lambda (v: -T).(\lambda (_: T).(eq T (THead (Bind Abst) w x1) (THead (Bind Abst) w v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) w) v))) x1 x3 (refl_equal T (THead (Bind Abst) w -x1)) H11 (ty3_conv g (CHead c (Bind Abst) w) u x2 H12 x1 x4 H18 (H17 Abst w)) -H19) x0 H_y)))))) (pc3_gen_abst c x0 w x4 u H13))))))) (ty3_gen_bind g Abst c -x0 x1 (THead (Bind Abst) w u) H8))))))) (ty3_gen_bind g Abst c w u x H9)))) -(ty3_correct g c (THead (Bind Abst) x0 x1) (THead (Bind Abst) w u) H8)) t -H5))))))) H4)) (\lambda (H4: (ex nat (\lambda (n: nat).(eq T t (TSort -n))))).(ex_ind nat (\lambda (n: nat).(eq T t (TSort n))) (ex4_2 T T (\lambda -(v: T).(\lambda (_: T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: -T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c -(Bind Abst) w) v)))) (\lambda (x: nat).(\lambda (H5: (eq T t (TSort x))).(let -H6 \def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (THead (Bind Abst) w u))) H -(TSort x) H5) in (eq_ind_r T (TSort x) (\lambda (t0: T).(ex4_2 T T (\lambda -(v: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) w v)))) (\lambda (_: -T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c -(Bind Abst) w) v))))) (pc3_gen_sort_abst c w u (next g x) (ty3_gen_sort g c -(THead (Bind Abst) w u) x H6) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq -T (TSort x) (THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 -g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v -u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v))))) t -H5)))) H4)) (\lambda (H4: (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: -nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c (TLRef i)))))).(ex3_2_ind TList nat (\lambda (ws: TList).(\lambda -(i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: -TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: -nat).(nf2 c (TLRef i)))) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T t -(THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) -(\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) -(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda -(x0: TList).(\lambda (x1: nat).(\lambda (H5: (eq T t (THeads (Flat Appl) x0 -(TLRef x1)))).(\lambda (_: (nfs2 c x0)).(\lambda (H7: (nf2 c (TLRef -x1))).(let H8 \def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (THead (Bind -Abst) w u))) H (THeads (Flat Appl) x0 (TLRef x1)) H5) in (eq_ind_r T (THeads -(Flat Appl) x0 (TLRef x1)) (\lambda (t0: T).(ex4_2 T T (\lambda (v: -T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) w v)))) (\lambda (_: -T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g -(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c -(Bind Abst) w) v))))) (let H9 \def H2 in ((let H10 \def H8 in (unintro T u -(\lambda (t0: T).((ty3 g c (THeads (Flat Appl) x0 (TLRef x1)) (THead (Bind -Abst) w t0)) \to ((ty3_nf2_inv_abst_premise c w t0) \to (ex4_2 T T (\lambda -(v: T).(\lambda (_: T).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (THead (Bind -Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: -T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v t0))) (\lambda (v: -T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v))))))) (unintro T w -(\lambda (t0: T).(\forall (x: T).((ty3 g c (THeads (Flat Appl) x0 (TLRef x1)) -(THead (Bind Abst) t0 x)) \to ((ty3_nf2_inv_abst_premise c t0 x) \to (ex4_2 T -T (\lambda (v: T).(\lambda (_: T).(eq T (THeads (Flat Appl) x0 (TLRef x1)) -(THead (Bind Abst) t0 v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c t0 -w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) t0) v x))) -(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) t0) v)))))))) -(TList_ind (\lambda (t0: TList).(\forall (x: T).(\forall (x2: T).((ty3 g c -(THeads (Flat Appl) t0 (TLRef x1)) (THead (Bind Abst) x x2)) \to -((ty3_nf2_inv_abst_premise c x x2) \to (ex4_2 T T (\lambda (v: T).(\lambda -(_: T).(eq T (THeads (Flat Appl) t0 (TLRef x1)) (THead (Bind Abst) x v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) x) v))))))))) (\lambda (x: T).(\lambda (x2: -T).(\lambda (H11: (ty3 g c (TLRef x1) (THead (Bind Abst) x x2))).(\lambda -(H12: (ty3_nf2_inv_abst_premise c x x2)).(or_ind (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c (lift (S x1) O t0) (THead (Bind -Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl x1 c -(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: -T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda -(_: T).(pc3 c (lift (S x1) O u0) (THead (Bind Abst) x x2))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (_: T).(getl x1 c (CHead e (Bind Abst) u0))))) -(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex4_2 -T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef x1) (THead (Bind Abst) x -v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: -T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: -T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v)))) (\lambda (H13: (ex3_3 C -T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c (lift (S x1) O -t0) (THead (Bind Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda -(_: T).(getl x1 c (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0)))))).(ex3_3_ind C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(pc3 c (lift (S x1) O t0) (THead (Bind -Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl x1 c -(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: -T).(ty3 g e u0 t0)))) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef -x1) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x -w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) -(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v)))) (\lambda -(x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c (lift (S x1) O -x5) (THead (Bind Abst) x x2))).(\lambda (H15: (getl x1 c (CHead x3 (Bind -Abbr) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(nf2_gen_lref c x3 x4 x1 H15 H7 -(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef x1) (THead (Bind -Abst) x v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: -T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: -T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v))))))))))) H13)) (\lambda -(H13: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c -(lift (S x1) O u0) (THead (Bind Abst) x x2))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (_: T).(getl x1 c (CHead e (Bind Abst) u0))))) (\lambda (e: -C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))).(ex3_3_ind C T T -(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c (lift (S x1) O u0) -(THead (Bind Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: -T).(getl x1 c (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: -T).(\lambda (t0: T).(ty3 g e u0 t0)))) (ex4_2 T T (\lambda (v: T).(\lambda -(_: T).(eq T (TLRef x1) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda -(w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c -(Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind -Abst) x) v)))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda -(H14: (pc3 c (lift (S x1) O x4) (THead (Bind Abst) x x2))).(\lambda (H15: -(getl x1 c (CHead x3 (Bind Abst) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let -H_x0 \def (H12 x3 x4 x1 H15 TNil H14) in (let H17 \def H_x0 in (False_ind -(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef x1) (THead (Bind -Abst) x v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: -T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: -T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v)))) H17))))))))) H13)) -(ty3_gen_lref g c (THead (Bind Abst) x x2) x1 H11)))))) (\lambda (t0: -T).(\lambda (t1: TList).(\lambda (H11: ((\forall (x: T).(\forall (x2: -T).((ty3 g c (THeads (Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x x2)) \to -((ty3_nf2_inv_abst_premise c x x2) \to (ex4_2 T T (\lambda (v: T).(\lambda -(_: T).(eq T (THeads (Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) x) v)))))))))).(\lambda (x: T).(\lambda (x2: -T).(\lambda (H12: (ty3 g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 -(TLRef x1))) (THead (Bind Abst) x x2))).(\lambda (H13: -(ty3_nf2_inv_abst_premise c x x2)).(ex3_2_ind T T (\lambda (u0: T).(\lambda -(t2: T).(pc3 c (THead (Flat Appl) t0 (THead (Bind Abst) u0 t2)) (THead (Bind -Abst) x x2)))) (\lambda (u0: T).(\lambda (t2: T).(ty3 g c (THeads (Flat Appl) -t1 (TLRef x1)) (THead (Bind Abst) u0 t2)))) (\lambda (u0: T).(\lambda (_: -T).(ty3 g c t0 u0))) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead -(Flat Appl) t0 (THeads (Flat Appl) t1 (TLRef x1))) (THead (Bind Abst) x v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) x) v)))) (\lambda (x3: T).(\lambda (x4: -T).(\lambda (H14: (pc3 c (THead (Flat Appl) t0 (THead (Bind Abst) x3 x4)) -(THead (Bind Abst) x x2))).(\lambda (H15: (ty3 g c (THeads (Flat Appl) t1 -(TLRef x1)) (THead (Bind Abst) x3 x4))).(\lambda (_: (ty3 g c t0 x3)).(let -H_y \def (ty3_nf2_gen__ty3_nf2_inv_abst_aux c x x2 H13 t0 x3 x4 H14) in (let -H_x0 \def (H11 x3 x4 H15 H_y) in (let H17 \def H_x0 in (ex4_2_ind T T -(\lambda (v: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t1 (TLRef x1)) -(THead (Bind Abst) x3 v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x3 -w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x3) v x4))) -(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x3) v))) (ex4_2 T T -(\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (THeads (Flat -Appl) t1 (TLRef x1))) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda -(w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c -(Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind -Abst) x) v)))) (\lambda (x5: T).(\lambda (x6: T).(\lambda (H18: (eq T (THeads -(Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x3 x5))).(\lambda (_: (ty3 g c -x3 x6)).(\lambda (_: (ty3 g (CHead c (Bind Abst) x3) x5 x4)).(\lambda (_: -(nf2 (CHead c (Bind Abst) x3) x5)).(TList_ind (\lambda (t2: TList).((eq T -(THeads (Flat Appl) t2 (TLRef x1)) (THead (Bind Abst) x3 x5)) \to (ex4_2 T T -(\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (THeads (Flat -Appl) t2 (TLRef x1))) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda -(w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c -(Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind -Abst) x) v)))))) (\lambda (H22: (eq T (THeads (Flat Appl) TNil (TLRef x1)) -(THead (Bind Abst) x3 x5))).(let H23 \def (eq_ind T (TLRef x1) (\lambda (ee: -T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x3 x5) H22) in -(False_ind (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat -Appl) t0 (THeads (Flat Appl) TNil (TLRef x1))) (THead (Bind Abst) x v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) x) v)))) H23))) (\lambda (t2: T).(\lambda (t3: -TList).(\lambda (_: (((eq T (THeads (Flat Appl) t3 (TLRef x1)) (THead (Bind -Abst) x3 x5)) \to (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead -(Flat Appl) t0 (THeads (Flat Appl) t3 (TLRef x1))) (THead (Bind Abst) x v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) x) v))))))).(\lambda (H22: (eq T (THeads (Flat -Appl) (TCons t2 t3) (TLRef x1)) (THead (Bind Abst) x3 x5))).(let H23 \def -(eq_ind T (THead (Flat Appl) t2 (THeads (Flat Appl) t3 (TLRef x1))) (\lambda -(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow -False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | -(Flat _) \Rightarrow True])])) I (THead (Bind Abst) x3 x5) H22) in (False_ind -(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 -(THeads (Flat Appl) (TCons t2 t3) (TLRef x1))) (THead (Bind Abst) x v)))) -(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda -(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: -T).(nf2 (CHead c (Bind Abst) x) v)))) H23)))))) t1 H18))))))) H17))))))))) -(ty3_gen_appl g c t0 (THeads (Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x -x2) H12))))))))) x0)) H10)) H9)) t H5))))))) H4)) H3))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3.ma deleted file mode 100644 index 33f41ebe8..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3.ma +++ /dev/null @@ -1,676 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/csubt/ty3.ma". - -include "basic_1/ty3/subst1.ma". - -include "basic_1/ty3/fsubst0.ma". - -include "basic_1/pc3/pc1.ma". - -include "basic_1/pc3/wcpr0.ma". - -include "basic_1/pc1/props.ma". - -lemma ty3_sred_wcpr0_pr0: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 -t1 t) \to (\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t2: T).((pr0 t1 t2) -\to (ty3 g c2 t2 t))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda -(H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda -(t2: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t3: T).((pr0 t0 t3) \to -(ty3 g c2 t3 t2)))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t0: -T).(\lambda (_: (ty3 g c t2 t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c -c2) \to (\forall (t3: T).((pr0 t2 t3) \to (ty3 g c2 t3 t0))))))).(\lambda (u: -T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (c2: -C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 u t4) \to (ty3 g c2 t4 -t3))))))).(\lambda (H4: (pc3 c t3 t2)).(\lambda (c2: C).(\lambda (H5: (wcpr0 -c c2)).(\lambda (t4: T).(\lambda (H6: (pr0 u t4)).(ty3_conv g c2 t2 t0 (H1 c2 -H5 t2 (pr0_refl t2)) t4 t3 (H3 c2 H5 t4 H6) (pc3_wcpr0 c c2 H5 t3 t2 -H4)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (c2: -C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort m) -t2)).(eq_ind_r T (TSort m) (\lambda (t0: T).(ty3 g c2 t0 (TSort (next g m)))) -(ty3_sort g c2 m) t2 (pr0_gen_sort t2 m H1)))))))) (\lambda (n: nat).(\lambda -(c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind -Abbr) u))).(\lambda (t0: T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: -((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g -c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: -T).(\lambda (H4: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t3: -T).(ty3 g c2 t3 (lift (S n) O t0))) (ex3_2_ind C T (\lambda (e2: C).(\lambda -(u2: T).(getl n c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: -T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 -(TLRef n) (lift (S n) O t0)) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: -(getl n c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda -(H7: (pr0 u x1)).(ty3_abbr g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7))))))) -(wcpr0_getl c c2 H3 n d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 n -H4)))))))))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda -(u: T).(\lambda (H0: (getl n c (CHead d (Bind Abst) u))).(\lambda (t0: -T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) -\to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: -C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef n) -t2)).(eq_ind_r T (TLRef n) (\lambda (t3: T).(ty3 g c2 t3 (lift (S n) O u))) -(ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl n c2 (CHead e2 (Bind -Abst) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 (TLRef n) (lift (S n) O u)) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl n c2 (CHead x0 (Bind -Abst) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(ty3_conv g -c2 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g x0 u t0 (H2 x0 H6 u -(pr0_refl u)) c2 O (S n) (getl_drop Abst c2 x0 x1 n H5)) (TLRef n) (lift (S -n) O x1) (ty3_abst g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7)) (pc3_lift c2 x0 (S n) -O (getl_drop Abst c2 x0 x1 n H5) x1 u (pc3_pr2_x x0 x1 u (pr2_free x0 u x1 -H7))))))))) (wcpr0_getl c c2 H3 n d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 n -H4)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (t0: T).(\lambda -(_: (ty3 g c u t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to -(\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (b: -B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: (ty3 g (CHead c (Bind b) -u) t2 t3)).(\lambda (H3: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) -\to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3))))))).(\lambda (c2: -C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t4: T).(\lambda (H5: (pr0 (THead -(Bind b) u t2) t4)).(let H6 \def (match H5 with [(pr0_refl t5) \Rightarrow -(\lambda (H6: (eq T t5 (THead (Bind b) u t2))).(\lambda (H7: (eq T t5 -t4)).(eq_ind T (THead (Bind b) u t2) (\lambda (t6: T).((eq T t6 t4) \to (ty3 -g c2 t4 (THead (Bind b) u t3)))) (\lambda (H8: (eq T (THead (Bind b) u t2) -t4)).(eq_ind T (THead (Bind b) u t2) (\lambda (t6: T).(ty3 g c2 t6 (THead -(Bind b) u t3))) (ty3_bind g c2 u t0 (H1 c2 H4 u (pr0_refl u)) b t2 t3 (H3 -(CHead c2 (Bind b) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind b)) t2 -(pr0_refl t2))) t4 H8)) t5 (sym_eq T t5 (THead (Bind b) u t2) H6) H7))) | -(pr0_comp u1 u2 H6 t5 t6 H7 k) \Rightarrow (\lambda (H8: (eq T (THead k u1 -t5) (THead (Bind b) u t2))).(\lambda (H9: (eq T (THead k u2 t6) t4)).((let -H10 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t5 -| (TLRef _) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t5) -(THead (Bind b) u t2) H8) in ((let H11 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | -(THead _ t7 _) \Rightarrow t7])) (THead k u1 t5) (THead (Bind b) u t2) H8) in -((let H12 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) -(THead k u1 t5) (THead (Bind b) u t2) H8) in (eq_ind K (Bind b) (\lambda (k0: -K).((eq T u1 u) \to ((eq T t5 t2) \to ((eq T (THead k0 u2 t6) t4) \to ((pr0 -u1 u2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))))) -(\lambda (H13: (eq T u1 u)).(eq_ind T u (\lambda (t7: T).((eq T t5 t2) \to -((eq T (THead (Bind b) u2 t6) t4) \to ((pr0 t7 u2) \to ((pr0 t5 t6) \to (ty3 -g c2 t4 (THead (Bind b) u t3))))))) (\lambda (H14: (eq T t5 t2)).(eq_ind T t2 -(\lambda (t7: T).((eq T (THead (Bind b) u2 t6) t4) \to ((pr0 u u2) \to ((pr0 -t7 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))) (\lambda (H15: (eq T -(THead (Bind b) u2 t6) t4)).(eq_ind T (THead (Bind b) u2 t6) (\lambda (t7: -T).((pr0 u u2) \to ((pr0 t2 t6) \to (ty3 g c2 t7 (THead (Bind b) u t3))))) -(\lambda (H16: (pr0 u u2)).(\lambda (H17: (pr0 t2 t6)).(ex_ind T (\lambda -(t7: T).(ty3 g (CHead c2 (Bind b) u) t3 t7)) (ty3 g c2 (THead (Bind b) u2 t6) -(THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H18: (ty3 g (CHead c2 (Bind -b) u) t3 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c2 (Bind b) u2) t3 t7)) -(ty3 g c2 (THead (Bind b) u2 t6) (THead (Bind b) u t3)) (\lambda (x0: -T).(\lambda (_: (ty3 g (CHead c2 (Bind b) u2) t3 x0)).(ty3_conv g c2 (THead -(Bind b) u t3) (THead (Bind b) u x) (ty3_bind g c2 u t0 (H1 c2 H4 u (pr0_refl -u)) b t3 x H18) (THead (Bind b) u2 t6) (THead (Bind b) u2 t3) (ty3_bind g c2 -u2 t0 (H1 c2 H4 u2 H16) b t6 t3 (H3 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 -H4 u u2 H16 (Bind b)) t6 H17)) (pc3_pr2_x c2 (THead (Bind b) u2 t3) (THead -(Bind b) u t3) (pr2_head_1 c2 u u2 (pr2_free c2 u u2 H16) (Bind b) t3))))) -(ty3_correct g (CHead c2 (Bind b) u2) t6 t3 (H3 (CHead c2 (Bind b) u2) -(wcpr0_comp c c2 H4 u u2 H16 (Bind b)) t6 H17))))) (ty3_correct g (CHead c2 -(Bind b) u) t2 t3 (H3 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H4 u u (pr0_refl -u) (Bind b)) t2 (pr0_refl t2)))))) t4 H15)) t5 (sym_eq T t5 t2 H14))) u1 -(sym_eq T u1 u H13))) k (sym_eq K k (Bind b) H12))) H11)) H10)) H9 H6 H7))) | -(pr0_beta u0 v1 v2 H6 t5 t6 H7) \Rightarrow (\lambda (H8: (eq T (THead (Flat -Appl) v1 (THead (Bind Abst) u0 t5)) (THead (Bind b) u t2))).(\lambda (H9: (eq -T (THead (Bind Abbr) v2 t6) t4)).((let H10 \def (eq_ind T (THead (Flat Appl) -v1 (THead (Bind Abst) u0 t5)) (\lambda (e: T).(match e with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind b) u t2) H8) in (False_ind ((eq T (THead (Bind Abbr) v2 t6) t4) -\to ((pr0 v1 v2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3))))) -H10)) H9 H6 H7))) | (pr0_upsilon b0 H6 v1 v2 H7 u1 u2 H8 t5 t6 H9) -\Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 -t5)) (THead (Bind b) u t2))).(\lambda (H11: (eq T (THead (Bind b0) u2 (THead -(Flat Appl) (lift (S O) O v2) t6)) t4)).((let H12 \def (eq_ind T (THead (Flat -Appl) v1 (THead (Bind b0) u1 t5)) (\lambda (e: T).(match e with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind b) u t2) H10) in (False_ind ((eq T (THead (Bind b0) u2 (THead -(Flat Appl) (lift (S O) O v2) t6)) t4) \to ((not (eq B b0 Abst)) \to ((pr0 v1 -v2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u -t3))))))) H12)) H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t5 t6 H7 w H8) -\Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t5) (THead (Bind b) u -t2))).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t4)).((let H11 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t5 | (TLRef -_) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind Abbr) u1 -t5) (THead (Bind b) u t2) H9) in ((let H12 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | -(THead _ t7 _) \Rightarrow t7])) (THead (Bind Abbr) u1 t5) (THead (Bind b) u -t2) H9) in ((let H13 \def (f_equal T B (\lambda (e: T).(match e with [(TSort -_) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow -(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) -(THead (Bind Abbr) u1 t5) (THead (Bind b) u t2) H9) in (eq_ind B Abbr -(\lambda (b0: B).((eq T u1 u) \to ((eq T t5 t2) \to ((eq T (THead (Bind Abbr) -u2 w) t4) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ty3 -g c2 t4 (THead (Bind b0) u t3))))))))) (\lambda (H14: (eq T u1 u)).(eq_ind T -u (\lambda (t7: T).((eq T t5 t2) \to ((eq T (THead (Bind Abbr) u2 w) t4) \to -((pr0 t7 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ty3 g c2 t4 (THead -(Bind Abbr) u t3)))))))) (\lambda (H15: (eq T t5 t2)).(eq_ind T t2 (\lambda -(t7: T).((eq T (THead (Bind Abbr) u2 w) t4) \to ((pr0 u u2) \to ((pr0 t7 t6) -\to ((subst0 O u2 t6 w) \to (ty3 g c2 t4 (THead (Bind Abbr) u t3))))))) -(\lambda (H16: (eq T (THead (Bind Abbr) u2 w) t4)).(eq_ind T (THead (Bind -Abbr) u2 w) (\lambda (t7: T).((pr0 u u2) \to ((pr0 t2 t6) \to ((subst0 O u2 -t6 w) \to (ty3 g c2 t7 (THead (Bind Abbr) u t3)))))) (\lambda (H17: (pr0 u -u2)).(\lambda (H18: (pr0 t2 t6)).(\lambda (H19: (subst0 O u2 t6 w)).(let H20 -\def (eq_ind_r B b (\lambda (b0: B).(\forall (c3: C).((wcpr0 (CHead c (Bind -b0) u) c3) \to (\forall (t7: T).((pr0 t2 t7) \to (ty3 g c3 t7 t3)))))) H3 -Abbr H13) in (let H21 \def (eq_ind_r B b (\lambda (b0: B).(ty3 g (CHead c -(Bind b0) u) t2 t3)) H2 Abbr H13) in (ex_ind T (\lambda (t7: T).(ty3 g (CHead -c2 (Bind Abbr) u) t3 t7)) (ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind -Abbr) u t3)) (\lambda (x: T).(\lambda (H22: (ty3 g (CHead c2 (Bind Abbr) u) -t3 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c2 (Bind Abbr) u2) t3 t7)) -(ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u t3)) (\lambda (x0: -T).(\lambda (_: (ty3 g (CHead c2 (Bind Abbr) u2) t3 x0)).(ty3_conv g c2 -(THead (Bind Abbr) u t3) (THead (Bind Abbr) u x) (ty3_bind g c2 u t0 (H1 c2 -H4 u (pr0_refl u)) Abbr t3 x H22) (THead (Bind Abbr) u2 w) (THead (Bind Abbr) -u2 t3) (ty3_bind g c2 u2 t0 (H1 c2 H4 u2 H17) Abbr w t3 (ty3_subst0 g (CHead -c2 (Bind Abbr) u2) t6 t3 (H20 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H4 u -u2 H17 (Bind Abbr)) t6 H18) c2 u2 O (getl_refl Abbr c2 u2) w H19)) (pc3_pr2_x -c2 (THead (Bind Abbr) u2 t3) (THead (Bind Abbr) u t3) (pr2_head_1 c2 u u2 -(pr2_free c2 u u2 H17) (Bind Abbr) t3))))) (ty3_correct g (CHead c2 (Bind -Abbr) u2) t6 t3 (H20 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H4 u u2 H17 -(Bind Abbr)) t6 H18))))) (ty3_correct g (CHead c2 (Bind Abbr) u) t2 t3 (H20 -(CHead c2 (Bind Abbr) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind Abbr)) t2 -(pr0_refl t2))))))))) t4 H16)) t5 (sym_eq T t5 t2 H15))) u1 (sym_eq T u1 u -H14))) b H13)) H12)) H11)) H10 H6 H7 H8))) | (pr0_zeta b0 H6 t5 t6 H7 u0) -\Rightarrow (\lambda (H8: (eq T (THead (Bind b0) u0 (lift (S O) O t5)) (THead -(Bind b) u t2))).(\lambda (H9: (eq T t6 t4)).((let H10 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x: -nat).(plus x (S O))) O t5) | (TLRef _) \Rightarrow (lref_map (\lambda (x: -nat).(plus x (S O))) O t5) | (THead _ _ t7) \Rightarrow t7])) (THead (Bind -b0) u0 (lift (S O) O t5)) (THead (Bind b) u t2) H8) in ((let H11 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef -_) \Rightarrow u0 | (THead _ t7 _) \Rightarrow t7])) (THead (Bind b0) u0 -(lift (S O) O t5)) (THead (Bind b) u t2) H8) in ((let H12 \def (f_equal T B -(\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) -\Rightarrow b0 | (THead k _ _) \Rightarrow (match k with [(Bind b1) -\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) -O t5)) (THead (Bind b) u t2) H8) in (eq_ind B b (\lambda (b1: B).((eq T u0 u) -\to ((eq T (lift (S O) O t5) t2) \to ((eq T t6 t4) \to ((not (eq B b1 Abst)) -\to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))))) (\lambda (H13: -(eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t5) t2) \to -((eq T t6 t4) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ty3 g c2 t4 -(THead (Bind b) u t3))))))) (\lambda (H14: (eq T (lift (S O) O t5) -t2)).(eq_ind T (lift (S O) O t5) (\lambda (_: T).((eq T t6 t4) \to ((not (eq -B b Abst)) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))) -(\lambda (H15: (eq T t6 t4)).(eq_ind T t4 (\lambda (t7: T).((not (eq B b -Abst)) \to ((pr0 t5 t7) \to (ty3 g c2 t4 (THead (Bind b) u t3))))) (\lambda -(H16: (not (eq B b Abst))).(\lambda (H17: (pr0 t5 t4)).(let H18 \def -(eq_ind_r T t2 (\lambda (t7: T).(\forall (c3: C).((wcpr0 (CHead c (Bind b) u) -c3) \to (\forall (t8: T).((pr0 t7 t8) \to (ty3 g c3 t8 t3)))))) H3 (lift (S -O) O t5) H14) in (let H19 \def (eq_ind_r T t2 (\lambda (t7: T).(ty3 g (CHead -c (Bind b) u) t7 t3)) H2 (lift (S O) O t5) H14) in (ex_ind T (\lambda (t7: -T).(ty3 g (CHead c2 (Bind b) u) t3 t7)) (ty3 g c2 t4 (THead (Bind b) u t3)) -(\lambda (x: T).(\lambda (H20: (ty3 g (CHead c2 (Bind b) u) t3 x)).(B_ind -(\lambda (b1: B).((not (eq B b1 Abst)) \to ((ty3 g (CHead c2 (Bind b1) u) t3 -x) \to ((ty3 g (CHead c2 (Bind b1) u) (lift (S O) O t4) t3) \to (ty3 g c2 t4 -(THead (Bind b1) u t3)))))) (\lambda (H21: (not (eq B Abbr Abst))).(\lambda -(H22: (ty3 g (CHead c2 (Bind Abbr) u) t3 x)).(\lambda (H23: (ty3 g (CHead c2 -(Bind Abbr) u) (lift (S O) O t4) t3)).(let H24 \def (ty3_gen_cabbr g (CHead -c2 (Bind Abbr) u) (lift (S O) O t4) t3 H23 c2 u O (getl_refl Abbr c2 u) -(CHead c2 (Bind Abbr) u) (csubst1_refl O u (CHead c2 (Bind Abbr) u)) c2 -(drop_drop (Bind Abbr) O c2 c2 (drop_refl c2) u)) in (ex3_2_ind T T (\lambda -(y1: T).(\lambda (_: T).(subst1 O u (lift (S O) O t4) (lift (S O) O y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 O u t3 (lift (S O) O y2)))) (\lambda -(y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) (ty3 g c2 t4 (THead (Bind Abbr) u -t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H25: (subst1 O u (lift (S O) -O t4) (lift (S O) O x0))).(\lambda (H26: (subst1 O u t3 (lift (S O) O -x1))).(\lambda (H27: (ty3 g c2 x0 x1)).(let H28 \def (eq_ind T x0 (\lambda -(t7: T).(ty3 g c2 t7 x1)) H27 t4 (lift_inj x0 t4 (S O) O (subst1_gen_lift_eq -t4 u (lift (S O) O x0) (S O) O O (le_O_n O) (eq_ind_r nat (plus (S O) O) -(\lambda (n: nat).(lt O n)) (le_n (plus (S O) O)) (plus O (S O)) (plus_sym O -(S O))) H25))) in (ty3_conv g c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) -u x) (ty3_bind g c2 u t0 (H1 c2 H4 u (pr0_refl u)) Abbr t3 x H22) t4 x1 H28 -(pc3_pr3_x c2 x1 (THead (Bind Abbr) u t3) (pr3_t (THead (Bind Abbr) u (lift -(S O) O x1)) (THead (Bind Abbr) u t3) c2 (pr3_pr2 c2 (THead (Bind Abbr) u t3) -(THead (Bind Abbr) u (lift (S O) O x1)) (pr2_free c2 (THead (Bind Abbr) u t3) -(THead (Bind Abbr) u (lift (S O) O x1)) (pr0_delta1 u u (pr0_refl u) t3 t3 -(pr0_refl t3) (lift (S O) O x1) H26))) x1 (pr3_pr2 c2 (THead (Bind Abbr) u -(lift (S O) O x1)) x1 (pr2_free c2 (THead (Bind Abbr) u (lift (S O) O x1)) x1 -(pr0_zeta Abbr H21 x1 x1 (pr0_refl x1) u)))))))))))) H24))))) (\lambda (H21: -(not (eq B Abst Abst))).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) t3 -x)).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) (lift (S O) O t4) t3)).(let -H24 \def (match (H21 (refl_equal B Abst)) in False with []) in H24)))) -(\lambda (H21: (not (eq B Void Abst))).(\lambda (H22: (ty3 g (CHead c2 (Bind -Void) u) t3 x)).(\lambda (H23: (ty3 g (CHead c2 (Bind Void) u) (lift (S O) O -t4) t3)).(let H24 \def (ty3_gen_cvoid g (CHead c2 (Bind Void) u) (lift (S O) -O t4) t3 H23 c2 u O (getl_refl Void c2 u) c2 (drop_drop (Bind Void) O c2 c2 -(drop_refl c2) u)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T -(lift (S O) O t4) (lift (S O) O y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T -t3 (lift (S O) O y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) -(ty3 g c2 t4 (THead (Bind Void) u t3)) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H25: (eq T (lift (S O) O t4) (lift (S O) O x0))).(\lambda (H26: -(eq T t3 (lift (S O) O x1))).(\lambda (H27: (ty3 g c2 x0 x1)).(let H28 \def -(eq_ind T t3 (\lambda (t7: T).(ty3 g (CHead c2 (Bind Void) u) t7 x)) H22 -(lift (S O) O x1) H26) in (eq_ind_r T (lift (S O) O x1) (\lambda (t7: T).(ty3 -g c2 t4 (THead (Bind Void) u t7))) (let H29 \def (eq_ind_r T x0 (\lambda (t7: -T).(ty3 g c2 t7 x1)) H27 t4 (lift_inj t4 x0 (S O) O H25)) in (ty3_conv g c2 -(THead (Bind Void) u (lift (S O) O x1)) (THead (Bind Void) u x) (ty3_bind g -c2 u t0 (H1 c2 H4 u (pr0_refl u)) Void (lift (S O) O x1) x H28) t4 x1 H29 -(pc3_s c2 x1 (THead (Bind Void) u (lift (S O) O x1)) (pc3_pr2_r c2 (THead -(Bind Void) u (lift (S O) O x1)) x1 (pr2_free c2 (THead (Bind Void) u (lift -(S O) O x1)) x1 (pr0_zeta Void H21 x1 x1 (pr0_refl x1) u)))))) t3 H26))))))) -H24))))) b H16 H20 (H18 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H4 u u -(pr0_refl u) (Bind b)) (lift (S O) O t4) (pr0_lift t5 t4 H17 (S O) O))))) -(ty3_correct g (CHead c2 (Bind b) u) (lift (S O) O t4) t3 (H18 (CHead c2 -(Bind b) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind b)) (lift (S O) O t4) -(pr0_lift t5 t4 H17 (S O) O)))))))) t6 (sym_eq T t6 t4 H15))) t2 H14)) u0 -(sym_eq T u0 u H13))) b0 (sym_eq B b0 b H12))) H11)) H10)) H9 H6 H7))) | -(pr0_tau t5 t6 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 -t5) (THead (Bind b) u t2))).(\lambda (H8: (eq T t6 t4)).((let H9 \def (eq_ind -T (THead (Flat Cast) u0 t5) (\lambda (e: T).(match e with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I -(THead (Bind b) u t2) H7) in (False_ind ((eq T t6 t4) \to ((pr0 t5 t6) \to -(ty3 g c2 t4 (THead (Bind b) u t3)))) H9)) H8 H6)))]) in (H6 (refl_equal T -(THead (Bind b) u t2)) (refl_equal T t4))))))))))))))))) (\lambda (c: -C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c w u)).(\lambda (H1: -((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 w t2) \to (ty3 g -c2 t2 u))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (H2: (ty3 g c v -(THead (Bind Abst) u t0))).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to -(\forall (t2: T).((pr0 v t2) \to (ty3 g c2 t2 (THead (Bind Abst) u -t0)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: -T).(\lambda (H5: (pr0 (THead (Flat Appl) w v) t2)).(let H6 \def (match H5 -with [(pr0_refl t3) \Rightarrow (\lambda (H6: (eq T t3 (THead (Flat Appl) w -v))).(\lambda (H7: (eq T t3 t2)).(eq_ind T (THead (Flat Appl) w v) (\lambda -(t4: T).((eq T t4 t2) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind -Abst) u t0))))) (\lambda (H8: (eq T (THead (Flat Appl) w v) t2)).(eq_ind T -(THead (Flat Appl) w v) (\lambda (t4: T).(ty3 g c2 t4 (THead (Flat Appl) w -(THead (Bind Abst) u t0)))) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) v t0 -(H3 c2 H4 v (pr0_refl v))) t2 H8)) t3 (sym_eq T t3 (THead (Flat Appl) w v) -H6) H7))) | (pr0_comp u1 u2 H6 t3 t4 H7 k) \Rightarrow (\lambda (H8: (eq T -(THead k u1 t3) (THead (Flat Appl) w v))).(\lambda (H9: (eq T (THead k u2 t4) -t2)).((let H10 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t5) \Rightarrow t5])) -(THead k u1 t3) (THead (Flat Appl) w v) H8) in ((let H11 \def (f_equal T T -(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) -\Rightarrow u1 | (THead _ t5 _) \Rightarrow t5])) (THead k u1 t3) (THead -(Flat Appl) w v) H8) in ((let H12 \def (f_equal T K (\lambda (e: T).(match e -with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k u1 t3) (THead (Flat Appl) w v) H8) in (eq_ind K -(Flat Appl) (\lambda (k0: K).((eq T u1 w) \to ((eq T t3 v) \to ((eq T (THead -k0 u2 t4) t2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat -Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H13: (eq T u1 w)).(eq_ind -T w (\lambda (t5: T).((eq T t3 v) \to ((eq T (THead (Flat Appl) u2 t4) t2) -\to ((pr0 t5 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w -(THead (Bind Abst) u t0)))))))) (\lambda (H14: (eq T t3 v)).(eq_ind T v -(\lambda (t5: T).((eq T (THead (Flat Appl) u2 t4) t2) \to ((pr0 w u2) \to -((pr0 t5 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u -t0))))))) (\lambda (H15: (eq T (THead (Flat Appl) u2 t4) t2)).(eq_ind T -(THead (Flat Appl) u2 t4) (\lambda (t5: T).((pr0 w u2) \to ((pr0 v t4) \to -(ty3 g c2 t5 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) (\lambda -(H16: (pr0 w u2)).(\lambda (H17: (pr0 v t4)).(ex_ind T (\lambda (t5: T).(ty3 -g c2 (THead (Bind Abst) u t0) t5)) (ty3 g c2 (THead (Flat Appl) u2 t4) (THead -(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H18: (ty3 -g c2 (THead (Bind Abst) u t0) x)).(ex3_2_ind T T (\lambda (t5: T).(\lambda -(_: T).(pc3 c2 (THead (Bind Abst) u t5) x))) (\lambda (_: T).(\lambda (t6: -T).(ty3 g c2 u t6))) (\lambda (t5: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind -Abst) u) t0 t5))) (ty3 g c2 (THead (Flat Appl) u2 t4) (THead (Flat Appl) w -(THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: -(pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H20: (ty3 g c2 u x1)).(\lambda -(H21: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(ty3_conv g c2 (THead (Flat -Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u -x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 -(ty3_bind g c2 u x1 H20 Abst t0 x0 H21)) (THead (Flat Appl) u2 t4) (THead -(Flat Appl) u2 (THead (Bind Abst) u t0)) (ty3_appl g c2 u2 u (H1 c2 H4 u2 -H16) t4 t0 (H3 c2 H4 t4 H17)) (pc3_pr2_x c2 (THead (Flat Appl) u2 (THead -(Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pr2_head_1 -c2 w u2 (pr2_free c2 w u2 H16) (Flat Appl) (THead (Bind Abst) u t0))))))))) -(ty3_gen_bind g Abst c2 u t0 x H18)))) (ty3_correct g c2 v (THead (Bind Abst) -u t0) (H3 c2 H4 v (pr0_refl v)))))) t2 H15)) t3 (sym_eq T t3 v H14))) u1 -(sym_eq T u1 w H13))) k (sym_eq K k (Flat Appl) H12))) H11)) H10)) H9 H6 -H7))) | (pr0_beta u0 v1 v2 H6 t3 t4 H7) \Rightarrow (\lambda (H8: (eq T -(THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) w -v))).(\lambda (H9: (eq T (THead (Bind Abbr) v2 t4) t2)).((let H10 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead -(Bind Abst) u0 t3) | (TLRef _) \Rightarrow (THead (Bind Abst) u0 t3) | (THead -_ _ t5) \Rightarrow t5])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) -(THead (Flat Appl) w v) H8) in ((let H11 \def (f_equal T T (\lambda (e: -T).(match e with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | -(THead _ t5 _) \Rightarrow t5])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 -t3)) (THead (Flat Appl) w v) H8) in (eq_ind T w (\lambda (t5: T).((eq T -(THead (Bind Abst) u0 t3) v) \to ((eq T (THead (Bind Abbr) v2 t4) t2) \to -((pr0 t5 v2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead -(Bind Abst) u t0)))))))) (\lambda (H12: (eq T (THead (Bind Abst) u0 t3) -v)).(eq_ind T (THead (Bind Abst) u0 t3) (\lambda (_: T).((eq T (THead (Bind -Abbr) v2 t4) t2) \to ((pr0 w v2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead -(Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (H13: (eq T (THead -(Bind Abbr) v2 t4) t2)).(eq_ind T (THead (Bind Abbr) v2 t4) (\lambda (t5: -T).((pr0 w v2) \to ((pr0 t3 t4) \to (ty3 g c2 t5 (THead (Flat Appl) w (THead -(Bind Abst) u t0)))))) (\lambda (H14: (pr0 w v2)).(\lambda (H15: (pr0 t3 -t4)).(let H16 \def (eq_ind_r T v (\lambda (t5: T).(\forall (c3: C).((wcpr0 c -c3) \to (\forall (t6: T).((pr0 t5 t6) \to (ty3 g c3 t6 (THead (Bind Abst) u -t0))))))) H3 (THead (Bind Abst) u0 t3) H12) in (let H17 \def (eq_ind_r T v -(\lambda (t5: T).(ty3 g c t5 (THead (Bind Abst) u t0))) H2 (THead (Bind Abst) -u0 t3) H12) in (ex_ind T (\lambda (t5: T).(ty3 g c2 (THead (Bind Abst) u t0) -t5)) (ty3 g c2 (THead (Bind Abbr) v2 t4) (THead (Flat Appl) w (THead (Bind -Abst) u t0))) (\lambda (x: T).(\lambda (H18: (ty3 g c2 (THead (Bind Abst) u -t0) x)).(ex3_2_ind T T (\lambda (t5: T).(\lambda (_: T).(pc3 c2 (THead (Bind -Abst) u t5) x))) (\lambda (_: T).(\lambda (t6: T).(ty3 g c2 u t6))) (\lambda -(t5: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t5))) (ty3 g c2 -(THead (Bind Abbr) v2 t4) (THead (Flat Appl) w (THead (Bind Abst) u t0))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u -x0) x)).(\lambda (H20: (ty3 g c2 u x1)).(\lambda (H21: (ty3 g (CHead c2 (Bind -Abst) u) t0 x0)).(ex3_2_ind T T (\lambda (t5: T).(\lambda (_: T).(pc3 c2 -(THead (Bind Abst) u0 t5) (THead (Bind Abst) u t0)))) (\lambda (_: -T).(\lambda (t6: T).(ty3 g c2 u0 t6))) (\lambda (t5: T).(\lambda (_: T).(ty3 -g (CHead c2 (Bind Abst) u0) t4 t5))) (ty3 g c2 (THead (Bind Abbr) v2 t4) -(THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x2: T).(\lambda -(x3: T).(\lambda (H22: (pc3 c2 (THead (Bind Abst) u0 x2) (THead (Bind Abst) u -t0))).(\lambda (H23: (ty3 g c2 u0 x3)).(\lambda (H24: (ty3 g (CHead c2 (Bind -Abst) u0) t4 x2)).(land_ind (pc3 c2 u0 u) (\forall (b: B).(\forall (u1: -T).(pc3 (CHead c2 (Bind b) u1) x2 t0))) (ty3 g c2 (THead (Bind Abbr) v2 t4) -(THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H25: (pc3 c2 u0 -u)).(\lambda (H26: ((\forall (b: B).(\forall (u1: T).(pc3 (CHead c2 (Bind b) -u1) x2 t0))))).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) -(THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w -(pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H20 Abst t0 x0 -H21)) (THead (Bind Abbr) v2 t4) (THead (Bind Abbr) v2 x2) (ty3_bind g c2 v2 u -(H1 c2 H4 v2 H14) Abbr t4 x2 (csubt_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x3 -H23 v2 u (H1 c2 H4 v2 H14) (pc3_s c2 u u0 H25)) t4 x2 H24)) (pc3_t (THead -(Bind Abbr) v2 t0) c2 (THead (Bind Abbr) v2 x2) (pc3_head_2 c2 v2 x2 t0 (Bind -Abbr) (H26 Abbr v2)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) -(pc3_pr2_x c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind -Abst) u t0)) (pr2_free c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) -(THead (Bind Abbr) v2 t0) (pr0_beta u w v2 H14 t0 t0 (pr0_refl t0)))))))) -(pc3_gen_abst c2 u0 u x2 t0 H22))))))) (ty3_gen_bind g Abst c2 u0 t4 (THead -(Bind Abst) u t0) (H16 c2 H4 (THead (Bind Abst) u0 t4) (pr0_comp u0 u0 -(pr0_refl u0) t3 t4 H15 (Bind Abst)))))))))) (ty3_gen_bind g Abst c2 u t0 x -H18)))) (ty3_correct g c2 (THead (Bind Abst) u0 t3) (THead (Bind Abst) u t0) -(H16 c2 H4 (THead (Bind Abst) u0 t3) (pr0_refl (THead (Bind Abst) u0 -t3))))))))) t2 H13)) v H12)) v1 (sym_eq T v1 w H11))) H10)) H9 H6 H7))) | -(pr0_upsilon b H6 v1 v2 H7 u1 u2 H8 t3 t4 H9) \Rightarrow (\lambda (H10: (eq -T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) w -v))).(\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O -v2) t4)) t2)).((let H12 \def (f_equal T T (\lambda (e: T).(match e with -[(TSort _) \Rightarrow (THead (Bind b) u1 t3) | (TLRef _) \Rightarrow (THead -(Bind b) u1 t3) | (THead _ _ t5) \Rightarrow t5])) (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (THead (Flat Appl) w v) H10) in ((let H13 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef -_) \Rightarrow v1 | (THead _ t5 _) \Rightarrow t5])) (THead (Flat Appl) v1 -(THead (Bind b) u1 t3)) (THead (Flat Appl) w v) H10) in (eq_ind T w (\lambda -(t5: T).((eq T (THead (Bind b) u1 t3) v) \to ((eq T (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) t2) \to ((not (eq B b Abst)) \to ((pr0 t5 -v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w -(THead (Bind Abst) u t0)))))))))) (\lambda (H14: (eq T (THead (Bind b) u1 t3) -v)).(eq_ind T (THead (Bind b) u1 t3) (\lambda (_: T).((eq T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2) \to ((not (eq B b Abst)) \to -((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat -Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H15: (eq T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2)).(eq_ind T (THead (Bind b) -u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (\lambda (t5: T).((not (eq B b -Abst)) \to ((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t5 -(THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H16: (not (eq -B b Abst))).(\lambda (H17: (pr0 w v2)).(\lambda (H18: (pr0 u1 u2)).(\lambda -(H19: (pr0 t3 t4)).(let H20 \def (eq_ind_r T v (\lambda (t5: T).(\forall (c3: -C).((wcpr0 c c3) \to (\forall (t6: T).((pr0 t5 t6) \to (ty3 g c3 t6 (THead -(Bind Abst) u t0))))))) H3 (THead (Bind b) u1 t3) H14) in (let H21 \def -(eq_ind_r T v (\lambda (t5: T).(ty3 g c t5 (THead (Bind Abst) u t0))) H2 -(THead (Bind b) u1 t3) H14) in (ex_ind T (\lambda (t5: T).(ty3 g c2 (THead -(Bind Abst) u t0) t5)) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift -(S O) O v2) t4)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: -T).(\lambda (H22: (ty3 g c2 (THead (Bind Abst) u t0) x)).(let H23 \def H22 in -(ex3_2_ind T T (\lambda (t5: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u -t5) x))) (\lambda (_: T).(\lambda (t6: T).(ty3 g c2 u t6))) (\lambda (t5: -T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t5))) (ty3 g c2 (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (THead (Flat Appl) w -(THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: -(pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H25: (ty3 g c2 u x1)).(\lambda -(H26: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(ex3_2_ind T T (\lambda (t5: -T).(\lambda (_: T).(pc3 c2 (THead (Bind b) u2 t5) (THead (Bind Abst) u t0)))) -(\lambda (_: T).(\lambda (t6: T).(ty3 g c2 u2 t6))) (\lambda (t5: T).(\lambda -(_: T).(ty3 g (CHead c2 (Bind b) u2) t4 t5))) (ty3 g c2 (THead (Bind b) u2 -(THead (Flat Appl) (lift (S O) O v2) t4)) (THead (Flat Appl) w (THead (Bind -Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H27: (pc3 c2 (THead -(Bind b) u2 x2) (THead (Bind Abst) u t0))).(\lambda (H28: (ty3 g c2 u2 -x3)).(\lambda (H29: (ty3 g (CHead c2 (Bind b) u2) t4 x2)).(let H30 \def -(eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t5: T).(pc3 -(CHead c2 (Bind b) u2) x2 t5)) (pc3_gen_not_abst b H16 c2 x2 t0 u2 u H27) -(THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u -t0 (S O) O)) in (let H31 \def (eq_ind T (lift (S O) O (THead (Bind Abst) u -t0)) (\lambda (t5: T).(ty3 g (CHead c2 (Bind b) u2) t5 (lift (S O) O x))) -(ty3_lift g c2 (THead (Bind Abst) u t0) x H22 (CHead c2 (Bind b) u2) O (S O) -(drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) (THead (Bind Abst) (lift (S -O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)) in (ex3_2_ind T -T (\lambda (t5: T).(\lambda (_: T).(pc3 (CHead c2 (Bind b) u2) (THead (Bind -Abst) (lift (S O) O u) t5) (lift (S O) O x)))) (\lambda (_: T).(\lambda (t6: -T).(ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) t6))) (\lambda (t5: -T).(\lambda (_: T).(ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S -O) O u)) (lift (S O) (S O) t0) t5))) (ty3 g c2 (THead (Bind b) u2 (THead -(Flat Appl) (lift (S O) O v2) t4)) (THead (Flat Appl) w (THead (Bind Abst) u -t0))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 (CHead c2 (Bind b) -u2) (THead (Bind Abst) (lift (S O) O u) x4) (lift (S O) O x))).(\lambda (H33: -(ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) x5)).(\lambda (H34: (ty3 g -(CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) (lift (S O) (S O) -t0) x4)).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead -(Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w -(pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H25 Abst t0 x0 -H26)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (THead -(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S -O) O u) (lift (S O) (S O) t0)))) (ty3_bind g c2 u2 x3 H28 b (THead (Flat -Appl) (lift (S O) O v2) t4) (THead (Flat Appl) (lift (S O) O v2) (THead (Bind -Abst) (lift (S O) O u) (lift (S O) (S O) t0))) (ty3_appl g (CHead c2 (Bind b) -u2) (lift (S O) O v2) (lift (S O) O u) (ty3_lift g c2 v2 u (H1 c2 H4 v2 H17) -(CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) -u2)) t4 (lift (S O) (S O) t0) (ty3_conv g (CHead c2 (Bind b) u2) (THead (Bind -Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (THead (Bind Abst) (lift (S O) -O u) x4) (ty3_bind g (CHead c2 (Bind b) u2) (lift (S O) O u) x5 H33 Abst -(lift (S O) (S O) t0) x4 H34) t4 x2 H29 H30))) (eq_ind T (lift (S O) O (THead -(Bind Abst) u t0)) (\lambda (t5: T).(pc3 c2 (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t5)) (THead (Flat Appl) w (THead (Bind Abst) u t0)))) -(pc3_pc1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) -O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) -(pc1_pr0_u2 (THead (Flat Appl) v2 (THead (Bind b) u2 (lift (S O) O (THead -(Bind Abst) u t0)))) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) -(lift (S O) O (THead (Bind Abst) u t0)))) (pr0_upsilon b H16 v2 v2 (pr0_refl -v2) u2 u2 (pr0_refl u2) (lift (S O) O (THead (Bind Abst) u t0)) (lift (S O) O -(THead (Bind Abst) u t0)) (pr0_refl (lift (S O) O (THead (Bind Abst) u t0)))) -(THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_head v2 w (pc1_pr0_x v2 w -H17) (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0))) (THead (Bind -Abst) u t0) (pc1_pr0_r (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u -t0))) (THead (Bind Abst) u t0) (pr0_zeta b H16 (THead (Bind Abst) u t0) -(THead (Bind Abst) u t0) (pr0_refl (THead (Bind Abst) u t0)) u2)) (Flat -Appl))) c2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) -(lift_bind Abst u t0 (S O) O)))))))) (ty3_gen_bind g Abst (CHead c2 (Bind b) -u2) (lift (S O) O u) (lift (S O) (S O) t0) (lift (S O) O x) H31))))))))) -(ty3_gen_bind g b c2 u2 t4 (THead (Bind Abst) u t0) (H20 c2 H4 (THead (Bind -b) u2 t4) (pr0_comp u1 u2 H18 t3 t4 H19 (Bind b)))))))))) (ty3_gen_bind g -Abst c2 u t0 x H23))))) (ty3_correct g c2 (THead (Bind b) u2 t4) (THead (Bind -Abst) u t0) (H20 c2 H4 (THead (Bind b) u2 t4) (pr0_comp u1 u2 H18 t3 t4 H19 -(Bind b))))))))))) t2 H15)) v H14)) v1 (sym_eq T v1 w H13))) H12)) H11 H6 H7 -H8 H9))) | (pr0_delta u1 u2 H6 t3 t4 H7 w0 H8) \Rightarrow (\lambda (H9: (eq -T (THead (Bind Abbr) u1 t3) (THead (Flat Appl) w v))).(\lambda (H10: (eq T -(THead (Bind Abbr) u2 w0) t2)).((let H11 \def (eq_ind T (THead (Bind Abbr) u1 -t3) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) -H9) in (False_ind ((eq T (THead (Bind Abbr) u2 w0) t2) \to ((pr0 u1 u2) \to -((pr0 t3 t4) \to ((subst0 O u2 t4 w0) \to (ty3 g c2 t2 (THead (Flat Appl) w -(THead (Bind Abst) u t0))))))) H11)) H10 H6 H7 H8))) | (pr0_zeta b H6 t3 t4 -H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Bind b) u0 (lift (S O) O t3)) -(THead (Flat Appl) w v))).(\lambda (H9: (eq T t4 t2)).((let H10 \def (eq_ind -T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda (e: T).(match e with [(TSort -_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow -False])])) I (THead (Flat Appl) w v) H8) in (False_ind ((eq T t4 t2) \to -((not (eq B b Abst)) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w -(THead (Bind Abst) u t0)))))) H10)) H9 H6 H7))) | (pr0_tau t3 t4 H6 u0) -\Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Appl) -w v))).(\lambda (H8: (eq T t4 t2)).((let H9 \def (eq_ind T (THead (Flat Cast) -u0 t3) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) -\Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow -False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H7) in -(False_ind ((eq T t4 t2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) -w (THead (Bind Abst) u t0))))) H9)) H8 H6)))]) in (H6 (refl_equal T (THead -(Flat Appl) w v)) (refl_equal T t2)))))))))))))))) (\lambda (c: C).(\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t2 t3)).(\lambda (H1: -((\forall (c2: C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g -c2 t4 t3))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c t3 t0)).(\lambda (H3: -((\forall (c2: C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 t3 t4) \to (ty3 g -c2 t4 t0))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t4: -T).(\lambda (H5: (pr0 (THead (Flat Cast) t3 t2) t4)).(let H6 \def (match H5 -with [(pr0_refl t5) \Rightarrow (\lambda (H6: (eq T t5 (THead (Flat Cast) t3 -t2))).(\lambda (H7: (eq T t5 t4)).(eq_ind T (THead (Flat Cast) t3 t2) -(\lambda (t6: T).((eq T t6 t4) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3)))) -(\lambda (H8: (eq T (THead (Flat Cast) t3 t2) t4)).(eq_ind T (THead (Flat -Cast) t3 t2) (\lambda (t6: T).(ty3 g c2 t6 (THead (Flat Cast) t0 t3))) -(ty3_cast g c2 t2 t3 (H1 c2 H4 t2 (pr0_refl t2)) t0 (H3 c2 H4 t3 (pr0_refl -t3))) t4 H8)) t5 (sym_eq T t5 (THead (Flat Cast) t3 t2) H6) H7))) | (pr0_comp -u1 u2 H6 t5 t6 H7 k) \Rightarrow (\lambda (H8: (eq T (THead k u1 t5) (THead -(Flat Cast) t3 t2))).(\lambda (H9: (eq T (THead k u2 t6) t4)).((let H10 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t5 | (TLRef -_) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t5) (THead -(Flat Cast) t3 t2) H8) in ((let H11 \def (f_equal T T (\lambda (e: T).(match -e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) -\Rightarrow t7])) (THead k u1 t5) (THead (Flat Cast) t3 t2) H8) in ((let H12 -\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | -(TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t5) -(THead (Flat Cast) t3 t2) H8) in (eq_ind K (Flat Cast) (\lambda (k0: K).((eq -T u1 t3) \to ((eq T t5 t2) \to ((eq T (THead k0 u2 t6) t4) \to ((pr0 u1 u2) -\to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3)))))))) (\lambda -(H13: (eq T u1 t3)).(eq_ind T t3 (\lambda (t7: T).((eq T t5 t2) \to ((eq T -(THead (Flat Cast) u2 t6) t4) \to ((pr0 t7 u2) \to ((pr0 t5 t6) \to (ty3 g c2 -t4 (THead (Flat Cast) t0 t3))))))) (\lambda (H14: (eq T t5 t2)).(eq_ind T t2 -(\lambda (t7: T).((eq T (THead (Flat Cast) u2 t6) t4) \to ((pr0 t3 u2) \to -((pr0 t7 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3)))))) (\lambda (H15: -(eq T (THead (Flat Cast) u2 t6) t4)).(eq_ind T (THead (Flat Cast) u2 t6) -(\lambda (t7: T).((pr0 t3 u2) \to ((pr0 t2 t6) \to (ty3 g c2 t7 (THead (Flat -Cast) t0 t3))))) (\lambda (H16: (pr0 t3 u2)).(\lambda (H17: (pr0 t2 -t6)).(ex_ind T (\lambda (t7: T).(ty3 g c2 t0 t7)) (ty3 g c2 (THead (Flat -Cast) u2 t6) (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H18: (ty3 g -c2 t0 x)).(ty3_conv g c2 (THead (Flat Cast) t0 t3) (THead (Flat Cast) x t0) -(ty3_cast g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3)) x H18) (THead (Flat Cast) u2 -t6) (THead (Flat Cast) t0 u2) (ty3_cast g c2 t6 u2 (ty3_conv g c2 u2 t0 (H3 -c2 H4 u2 H16) t6 t3 (H1 c2 H4 t6 H17) (pc3_pr2_r c2 t3 u2 (pr2_free c2 t3 u2 -H16))) t0 (H3 c2 H4 u2 H16)) (pc3_s c2 (THead (Flat Cast) t0 u2) (THead (Flat -Cast) t0 t3) (pc3_pr2_r c2 (THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 -u2) (pr2_thin_dx c2 t3 u2 (pr2_free c2 t3 u2 H16) t0 Cast)))))) (ty3_correct -g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3)))))) t4 H15)) t5 (sym_eq T t5 t2 H14))) -u1 (sym_eq T u1 t3 H13))) k (sym_eq K k (Flat Cast) H12))) H11)) H10)) H9 H6 -H7))) | (pr0_beta u v1 v2 H6 t5 t6 H7) \Rightarrow (\lambda (H8: (eq T (THead -(Flat Appl) v1 (THead (Bind Abst) u t5)) (THead (Flat Cast) t3 t2))).(\lambda -(H9: (eq T (THead (Bind Abbr) v2 t6) t4)).((let H10 \def (eq_ind T (THead -(Flat Appl) v1 (THead (Bind Abst) u t5)) (\lambda (e: T).(match e with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow -(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead -(Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Bind Abbr) v2 t6) t4) \to -((pr0 v1 v2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3))))) -H10)) H9 H6 H7))) | (pr0_upsilon b H6 v1 v2 H7 u1 u2 H8 t5 t6 H9) \Rightarrow -(\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) (THead -(Flat Cast) t3 t2))).(\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat -Appl) (lift (S O) O v2) t6)) t4)).((let H12 \def (eq_ind T (THead (Flat Appl) -v1 (THead (Bind b) u1 t5)) (\lambda (e: T).(match e with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f -with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat -Cast) t3 t2) H10) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) -(lift (S O) O v2) t6)) t4) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to -((pr0 u1 u2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 -t3))))))) H12)) H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t5 t6 H7 w H8) -\Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t5) (THead (Flat Cast) -t3 t2))).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t4)).((let H11 \def -(eq_ind T (THead (Bind Abbr) u1 t5) (\lambda (e: T).(match e with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I -(THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (THead (Bind Abbr) u2 w) -t4) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ty3 g c2 -t4 (THead (Flat Cast) t0 t3)))))) H11)) H10 H6 H7 H8))) | (pr0_zeta b H6 t5 -t6 H7 u) \Rightarrow (\lambda (H8: (eq T (THead (Bind b) u (lift (S O) O t5)) -(THead (Flat Cast) t3 t2))).(\lambda (H9: (eq T t6 t4)).((let H10 \def -(eq_ind T (THead (Bind b) u (lift (S O) O t5)) (\lambda (e: T).(match e with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) -\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow -False])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T t6 t4) \to -((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 -t3))))) H10)) H9 H6 H7))) | (pr0_tau t5 t6 H6 u) \Rightarrow (\lambda (H7: -(eq T (THead (Flat Cast) u t5) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq -T t6 t4)).((let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) -\Rightarrow t5 | (TLRef _) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) -(THead (Flat Cast) u t5) (THead (Flat Cast) t3 t2) H7) in ((let H10 \def -(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef -_) \Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Cast) u t5) -(THead (Flat Cast) t3 t2) H7) in (eq_ind T t3 (\lambda (_: T).((eq T t5 t2) -\to ((eq T t6 t4) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 -t3)))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t7: T).((eq T t6 -t4) \to ((pr0 t7 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3))))) (\lambda -(H12: (eq T t6 t4)).(eq_ind T t4 (\lambda (t7: T).((pr0 t2 t7) \to (ty3 g c2 -t4 (THead (Flat Cast) t0 t3)))) (\lambda (H13: (pr0 t2 t4)).(ex_ind T -(\lambda (t7: T).(ty3 g c2 t0 t7)) (ty3 g c2 t4 (THead (Flat Cast) t0 t3)) -(\lambda (x: T).(\lambda (H14: (ty3 g c2 t0 x)).(ty3_conv g c2 (THead (Flat -Cast) t0 t3) (THead (Flat Cast) x t0) (ty3_cast g c2 t3 t0 (H3 c2 H4 t3 -(pr0_refl t3)) x H14) t4 t3 (H1 c2 H4 t4 H13) (pc3_pr2_x c2 t3 (THead (Flat -Cast) t0 t3) (pr2_free c2 (THead (Flat Cast) t0 t3) t3 (pr0_tau t3 t3 -(pr0_refl t3) t0)))))) (ty3_correct g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3))))) -t6 (sym_eq T t6 t4 H12))) t5 (sym_eq T t5 t2 H11))) u (sym_eq T u t3 H10))) -H9)) H8 H6)))]) in (H6 (refl_equal T (THead (Flat Cast) t3 t2)) (refl_equal T -t4))))))))))))))) c1 t1 t H))))). - -lemma ty3_sred_pr0: - \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (g: G).(\forall -(c: C).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(\lambda (g: -G).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (ty3 g c t1 -t)).(ty3_sred_wcpr0_pr0 g c t1 t H0 c (wcpr0_refl c) t2 H))))))). - -lemma ty3_sred_pr1: - \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (g: G).(\forall -(c: C).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) -\def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda -(t: T).(\lambda (t0: T).(\forall (g: G).(\forall (c: C).(\forall (t3: -T).((ty3 g c t t3) \to (ty3 g c t0 t3))))))) (\lambda (t: T).(\lambda (g: -G).(\lambda (c: C).(\lambda (t0: T).(\lambda (H0: (ty3 g c t t0)).H0))))) -(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t4 t3)).(\lambda (t5: -T).(\lambda (_: (pr1 t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (c: -C).(\forall (t: T).((ty3 g c t3 t) \to (ty3 g c t5 t))))))).(\lambda (g: -G).(\lambda (c: C).(\lambda (t: T).(\lambda (H3: (ty3 g c t4 t)).(H2 g c t -(ty3_sred_pr0 t4 t3 H0 g c t H3)))))))))))) t1 t2 H))). - -lemma ty3_sred_pr2: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall -(g: G).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 -t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (g: -G).(\forall (t3: T).((ty3 g c0 t t3) \to (ty3 g c0 t0 t3))))))) (\lambda (c0: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (g: -G).(\lambda (t: T).(\lambda (H1: (ty3 g c0 t3 t)).(ty3_sred_wcpr0_pr0 g c0 t3 -t H1 c0 (wcpr0_refl c0) t4 H0)))))))) (\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind -Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 -t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (g: -G).(\lambda (t0: T).(\lambda (H3: (ty3 g c0 t3 t0)).(ty3_subst0 g c0 t4 t0 -(ty3_sred_wcpr0_pr0 g c0 t3 t0 H3 c0 (wcpr0_refl c0) t4 H1) d u i H0 t -H2)))))))))))))) c t1 t2 H)))). - -lemma ty3_sred_pr3: - \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall -(g: G).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) -\def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 -t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (g: G).(\forall -(t3: T).((ty3 g c t t3) \to (ty3 g c t0 t3)))))) (\lambda (t: T).(\lambda (g: -G).(\lambda (t0: T).(\lambda (H0: (ty3 g c t t0)).H0)))) (\lambda (t3: -T).(\lambda (t4: T).(\lambda (H0: (pr2 c t4 t3)).(\lambda (t5: T).(\lambda -(_: (pr3 c t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (t: T).((ty3 g c -t3 t) \to (ty3 g c t5 t)))))).(\lambda (g: G).(\lambda (t: T).(\lambda (H3: -(ty3 g c t4 t)).(H2 g t (ty3_sred_pr2 c t4 t3 H0 g t H3))))))))))) t1 t2 -H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3_props.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3_props.ma deleted file mode 100644 index 0b897b4f9..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/pr3_props.ma +++ /dev/null @@ -1,492 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/pr3.ma". - -lemma ty3_cred_pr2: - \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (v2: T).((pr2 c v1 -v2) \to (\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c -(Bind b) v1) t1 t2) \to (ty3 g (CHead c (Bind b) v2) t1 t2))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda -(H: (pr2 c v1 v2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).(\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c0 (Bind -b) t) t1 t2) \to (ty3 g (CHead c0 (Bind b) t0) t1 t2)))))))) (\lambda (c0: -C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr0 t1 t2)).(\lambda (b: -B).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (ty3 g (CHead c0 (Bind b) -t1) t0 t3)).(ty3_sred_wcpr0_pr0 g (CHead c0 (Bind b) t1) t0 t3 H1 (CHead c0 -(Bind b) t2) (wcpr0_comp c0 c0 (wcpr0_refl c0) t1 t2 H0 (Bind b)) t0 -(pr0_refl t0)))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) -u))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 t2)).(\lambda -(t: T).(\lambda (H2: (subst0 i u t2 t)).(\lambda (b: B).(\lambda (t0: -T).(\lambda (t3: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b) t1) t0 -t3)).(ty3_csubst0 g (CHead c0 (Bind b) t2) t0 t3 (ty3_sred_wcpr0_pr0 g (CHead -c0 (Bind b) t1) t0 t3 H3 (CHead c0 (Bind b) t2) (wcpr0_comp c0 c0 (wcpr0_refl -c0) t1 t2 H1 (Bind b)) t0 (pr0_refl t0)) d u (S i) (getl_clear_bind b (CHead -c0 (Bind b) t2) c0 t2 (clear_bind b c0 t2) (CHead d (Bind Abbr) u) i H0) -(CHead c0 (Bind b) t) (csubst0_snd_bind b i u t2 t H2 c0)))))))))))))))) c v1 -v2 H))))). - -lemma ty3_cred_pr3: - \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (v2: T).((pr3 c v1 -v2) \to (\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c -(Bind b) v1) t1 t2) \to (ty3 g (CHead c (Bind b) v2) t1 t2))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda -(H: (pr3 c v1 v2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (b: -B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c (Bind b) t) t1 t2) \to -(ty3 g (CHead c (Bind b) t0) t1 t2))))))) (\lambda (t: T).(\lambda (b: -B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (ty3 g (CHead c (Bind b) -t) t1 t2)).H0))))) (\lambda (t2: T).(\lambda (t1: T).(\lambda (H0: (pr2 c t1 -t2)).(\lambda (t3: T).(\lambda (_: (pr3 c t2 t3)).(\lambda (H2: ((\forall (b: -B).(\forall (t4: T).(\forall (t5: T).((ty3 g (CHead c (Bind b) t2) t4 t5) \to -(ty3 g (CHead c (Bind b) t3) t4 t5))))))).(\lambda (b: B).(\lambda (t0: -T).(\lambda (t4: T).(\lambda (H3: (ty3 g (CHead c (Bind b) t1) t0 t4)).(H2 b -t0 t4 (ty3_cred_pr2 g c t1 t2 H0 b t0 t4 H3)))))))))))) v1 v2 H))))). - -lemma ty3_gen_lift: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: -nat).(\forall (d: nat).((ty3 g c (lift h d t1) x) \to (\forall (e: C).((drop -h d c e) \to (ex2 T (\lambda (t2: T).(pc3 c (lift h d t2) x)) (\lambda (t2: -T).(ty3 g e t1 t2))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H: (ty3 g c (lift h d t1) x)).(insert_eq T -(lift h d t1) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(\forall (e: -C).((drop h d c e) \to (ex2 T (\lambda (t2: T).(pc3 c (lift h d t2) x)) -(\lambda (t2: T).(ty3 g e t1 t2)))))) (\lambda (y: T).(\lambda (H0: (ty3 g c -y x)).(unintro nat d (\lambda (n: nat).((eq T y (lift h n t1)) \to (\forall -(e: C).((drop h n c e) \to (ex2 T (\lambda (t2: T).(pc3 c (lift h n t2) x)) -(\lambda (t2: T).(ty3 g e t1 t2))))))) (unintro T t1 (\lambda (t: T).(\forall -(x0: nat).((eq T y (lift h x0 t)) \to (\forall (e: C).((drop h x0 c e) \to -(ex2 T (\lambda (t2: T).(pc3 c (lift h x0 t2) x)) (\lambda (t2: T).(ty3 g e t -t2)))))))) (ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).(\forall (x0: T).(\forall (x1: nat).((eq T t (lift h x1 x0)) \to (\forall -(e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) -t0)) (\lambda (t2: T).(ty3 g e x0 t2))))))))))) (\lambda (c0: C).(\lambda -(t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: ((\forall -(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (\forall (e: -C).((drop h x1 c0 e) \to (ex2 T (\lambda (t3: T).(pc3 c0 (lift h x1 t3) t)) -(\lambda (t3: T).(ty3 g e x0 t3)))))))))).(\lambda (u: T).(\lambda (t3: -T).(\lambda (H3: (ty3 g c0 u t3)).(\lambda (H4: ((\forall (x0: T).(\forall -(x1: nat).((eq T u (lift h x1 x0)) \to (\forall (e: C).((drop h x1 c0 e) \to -(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) t3)) (\lambda (t4: T).(ty3 g e -x0 t4)))))))))).(\lambda (H5: (pc3 c0 t3 t2)).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H6: (eq T u (lift h x1 x0))).(\lambda (e: C).(\lambda (H7: -(drop h x1 c0 e)).(let H8 \def (eq_ind T u (\lambda (t0: T).(\forall (x2: -T).(\forall (x3: nat).((eq T t0 (lift h x3 x2)) \to (\forall (e0: C).((drop h -x3 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x3 t4) t3)) (\lambda -(t4: T).(ty3 g e0 x2 t4))))))))) H4 (lift h x1 x0) H6) in (let H9 \def -(eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t3)) H3 (lift h x1 x0) H6) in (let -H10 \def (H8 x0 x1 (refl_equal T (lift h x1 x0)) e H7) in (ex2_ind T (\lambda -(t4: T).(pc3 c0 (lift h x1 t4) t3)) (\lambda (t4: T).(ty3 g e x0 t4)) (ex2 T -(\lambda (t4: T).(pc3 c0 (lift h x1 t4) t2)) (\lambda (t4: T).(ty3 g e x0 -t4))) (\lambda (x2: T).(\lambda (H11: (pc3 c0 (lift h x1 x2) t3)).(\lambda -(H12: (ty3 g e x0 x2)).(ex_intro2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) -t2)) (\lambda (t4: T).(ty3 g e x0 t4)) x2 (pc3_t t3 c0 (lift h x1 x2) H11 t2 -H5) H12)))) H10))))))))))))))))))) (\lambda (c0: C).(\lambda (m: -nat).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H1: (eq T (TSort m) (lift -h x1 x0))).(\lambda (e: C).(\lambda (_: (drop h x1 c0 e)).(eq_ind_r T (TSort -m) (\lambda (t: T).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (TSort -(next g m)))) (\lambda (t2: T).(ty3 g e t t2)))) (ex_intro2 T (\lambda (t2: -T).(pc3 c0 (lift h x1 t2) (TSort (next g m)))) (\lambda (t2: T).(ty3 g e -(TSort m) t2)) (TSort (next g m)) (eq_ind_r T (TSort (next g m)) (\lambda (t: -T).(pc3 c0 t (TSort (next g m)))) (pc3_refl c0 (TSort (next g m))) (lift h x1 -(TSort (next g m))) (lift_sort (next g m) h x1)) (ty3_sort g e m)) x0 -(lift_gen_sort h x1 m x0 H1))))))))) (\lambda (n: nat).(\lambda (c0: -C).(\lambda (d0: C).(\lambda (u: T).(\lambda (H1: (getl n c0 (CHead d0 (Bind -Abbr) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d0 u t)).(\lambda (H3: -((\forall (x0: T).(\forall (x1: nat).((eq T u (lift h x1 x0)) \to (\forall -(e: C).((drop h x1 d0 e) \to (ex2 T (\lambda (t2: T).(pc3 d0 (lift h x1 t2) -t)) (\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H4: (eq T (TLRef n) (lift h x1 x0))).(\lambda (e: C).(\lambda -(H5: (drop h x1 c0 e)).(let H_x \def (lift_gen_lref x0 x1 h n H4) in (let H6 -\def H_x in (or_ind (land (lt n x1) (eq T x0 (TLRef n))) (land (le (plus x1 -h) n) (eq T x0 (TLRef (minus n h)))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h -x1 t2) (lift (S n) O t))) (\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (H7: -(land (lt n x1) (eq T x0 (TLRef n)))).(land_ind (lt n x1) (eq T x0 (TLRef n)) -(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda -(t2: T).(ty3 g e x0 t2))) (\lambda (H8: (lt n x1)).(\lambda (H9: (eq T x0 -(TLRef n))).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ex2 T (\lambda (t2: -T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: T).(ty3 g e t0 -t2)))) (let H10 \def (eq_ind nat x1 (\lambda (n0: nat).(drop h n0 c0 e)) H5 -(S (plus n (minus x1 (S n)))) (lt_plus_minus n x1 H8)) in (ex3_2_ind T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x1 (S n)) v)))) -(\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind Abbr) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h (minus x1 (S n)) d0 e0))) (ex2 T -(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: -T).(ty3 g e (TLRef n) t2))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H11: -(eq T u (lift h (minus x1 (S n)) x2))).(\lambda (H12: (getl n e (CHead x3 -(Bind Abbr) x2))).(\lambda (H13: (drop h (minus x1 (S n)) d0 x3)).(let H14 -\def (eq_ind T u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T -t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 d0 e0) \to (ex2 T -(\lambda (t2: T).(pc3 d0 (lift h x5 t2) t)) (\lambda (t2: T).(ty3 g e0 x4 -t2))))))))) H3 (lift h (minus x1 (S n)) x2) H11) in (let H15 \def (eq_ind T u -(\lambda (t0: T).(ty3 g d0 t0 t)) H2 (lift h (minus x1 (S n)) x2) H11) in -(let H16 \def (H14 x2 (minus x1 (S n)) (refl_equal T (lift h (minus x1 (S n)) -x2)) x3 H13) in (ex2_ind T (\lambda (t2: T).(pc3 d0 (lift h (minus x1 (S n)) -t2) t)) (\lambda (t2: T).(ty3 g x3 x2 t2)) (ex2 T (\lambda (t2: T).(pc3 c0 -(lift h x1 t2) (lift (S n) O t))) (\lambda (t2: T).(ty3 g e (TLRef n) t2))) -(\lambda (x4: T).(\lambda (H17: (pc3 d0 (lift h (minus x1 (S n)) x4) -t)).(\lambda (H18: (ty3 g x3 x2 x4)).(eq_ind_r nat (plus (S n) (minus x1 (S -n))) (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h n0 t2) (lift -(S n) O t))) (\lambda (t2: T).(ty3 g e (TLRef n) t2)))) (ex_intro2 T (\lambda -(t2: T).(pc3 c0 (lift h (plus (S n) (minus x1 (S n))) t2) (lift (S n) O t))) -(\lambda (t2: T).(ty3 g e (TLRef n) t2)) (lift (S n) O x4) (eq_ind_r T (lift -(S n) O (lift h (minus x1 (S n)) x4)) (\lambda (t0: T).(pc3 c0 t0 (lift (S n) -O t))) (pc3_lift c0 d0 (S n) O (getl_drop Abbr c0 d0 u n H1) (lift h (minus -x1 (S n)) x4) t H17) (lift h (plus (S n) (minus x1 (S n))) (lift (S n) O x4)) -(lift_d x4 h (S n) (minus x1 (S n)) O (le_O_n (minus x1 (S n))))) (ty3_abbr g -n e x3 x2 H12 x4 H18)) x1 (le_plus_minus (S n) x1 H8))))) H16))))))))) -(getl_drop_conf_lt Abbr c0 d0 u n H1 e h (minus x1 (S n)) H10))) x0 H9))) -H7)) (\lambda (H7: (land (le (plus x1 h) n) (eq T x0 (TLRef (minus n -h))))).(land_ind (le (plus x1 h) n) (eq T x0 (TLRef (minus n h))) (ex2 T -(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: -T).(ty3 g e x0 t2))) (\lambda (H8: (le (plus x1 h) n)).(\lambda (H9: (eq T x0 -(TLRef (minus n h)))).(eq_ind_r T (TLRef (minus n h)) (\lambda (t0: T).(ex2 T -(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: -T).(ty3 g e t0 t2)))) (ex_intro2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) -(lift (S n) O t))) (\lambda (t2: T).(ty3 g e (TLRef (minus n h)) t2)) (lift -(S (minus n h)) O t) (eq_ind_r T (lift (plus h (S (minus n h))) O t) (\lambda -(t0: T).(pc3 c0 t0 (lift (S n) O t))) (eq_ind nat (S (plus h (minus n h))) -(\lambda (n0: nat).(pc3 c0 (lift n0 O t) (lift (S n) O t))) (eq_ind nat n -(\lambda (n0: nat).(pc3 c0 (lift (S n0) O t) (lift (S n) O t))) (pc3_refl c0 -(lift (S n) O t)) (plus h (minus n h)) (le_plus_minus h n (le_trans h (plus -x1 h) n (le_plus_r x1 h) H8))) (plus h (S (minus n h))) (plus_n_Sm h (minus n -h))) (lift h x1 (lift (S (minus n h)) O t)) (lift_free t (S (minus n h)) h O -x1 (le_trans x1 (S (minus n h)) (plus O (S (minus n h))) (le_S_minus x1 h n -H8) (le_plus_r O (S (minus n h)))) (le_O_n x1))) (ty3_abbr g (minus n h) e d0 -u (getl_drop_conf_ge n (CHead d0 (Bind Abbr) u) c0 H1 e h x1 H5 H8) t H2)) x0 -H9))) H7)) H6)))))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda -(d0: C).(\lambda (u: T).(\lambda (H1: (getl n c0 (CHead d0 (Bind Abst) -u))).(\lambda (t: T).(\lambda (H2: (ty3 g d0 u t)).(\lambda (H3: ((\forall -(x0: T).(\forall (x1: nat).((eq T u (lift h x1 x0)) \to (\forall (e: -C).((drop h x1 d0 e) \to (ex2 T (\lambda (t2: T).(pc3 d0 (lift h x1 t2) t)) -(\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (x0: T).(\lambda (x1: -nat).(\lambda (H4: (eq T (TLRef n) (lift h x1 x0))).(\lambda (e: C).(\lambda -(H5: (drop h x1 c0 e)).(let H_x \def (lift_gen_lref x0 x1 h n H4) in (let H6 -\def H_x in (or_ind (land (lt n x1) (eq T x0 (TLRef n))) (land (le (plus x1 -h) n) (eq T x0 (TLRef (minus n h)))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h -x1 t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (H7: -(land (lt n x1) (eq T x0 (TLRef n)))).(land_ind (lt n x1) (eq T x0 (TLRef n)) -(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda -(t2: T).(ty3 g e x0 t2))) (\lambda (H8: (lt n x1)).(\lambda (H9: (eq T x0 -(TLRef n))).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ex2 T (\lambda (t2: -T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e t0 -t2)))) (let H10 \def (eq_ind nat x1 (\lambda (n0: nat).(drop h n0 c0 e)) H5 -(S (plus n (minus x1 (S n)))) (lt_plus_minus n x1 H8)) in (ex3_2_ind T C -(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x1 (S n)) v)))) -(\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind Abst) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h (minus x1 (S n)) d0 e0))) (ex2 T -(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda (t2: -T).(ty3 g e (TLRef n) t2))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H11: -(eq T u (lift h (minus x1 (S n)) x2))).(\lambda (H12: (getl n e (CHead x3 -(Bind Abst) x2))).(\lambda (H13: (drop h (minus x1 (S n)) d0 x3)).(let H14 -\def (eq_ind T u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T -t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 d0 e0) \to (ex2 T -(\lambda (t2: T).(pc3 d0 (lift h x5 t2) t)) (\lambda (t2: T).(ty3 g e0 x4 -t2))))))))) H3 (lift h (minus x1 (S n)) x2) H11) in (let H15 \def (eq_ind T u -(\lambda (t0: T).(ty3 g d0 t0 t)) H2 (lift h (minus x1 (S n)) x2) H11) in -(eq_ind_r T (lift h (minus x1 (S n)) x2) (\lambda (t0: T).(ex2 T (\lambda -(t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t0))) (\lambda (t2: T).(ty3 g e -(TLRef n) t2)))) (let H16 \def (H14 x2 (minus x1 (S n)) (refl_equal T (lift h -(minus x1 (S n)) x2)) x3 H13) in (ex2_ind T (\lambda (t2: T).(pc3 d0 (lift h -(minus x1 (S n)) t2) t)) (\lambda (t2: T).(ty3 g x3 x2 t2)) (ex2 T (\lambda -(t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O (lift h (minus x1 (S n)) x2)))) -(\lambda (t2: T).(ty3 g e (TLRef n) t2))) (\lambda (x4: T).(\lambda (_: (pc3 -d0 (lift h (minus x1 (S n)) x4) t)).(\lambda (H18: (ty3 g x3 x2 -x4)).(eq_ind_r nat (plus (S n) (minus x1 (S n))) (\lambda (n0: nat).(ex2 T -(\lambda (t2: T).(pc3 c0 (lift h n0 t2) (lift (S n) O (lift h (minus n0 (S -n)) x2)))) (\lambda (t2: T).(ty3 g e (TLRef n) t2)))) (ex_intro2 T (\lambda -(t2: T).(pc3 c0 (lift h (plus (S n) (minus x1 (S n))) t2) (lift (S n) O (lift -h (minus (plus (S n) (minus x1 (S n))) (S n)) x2)))) (\lambda (t2: T).(ty3 g -e (TLRef n) t2)) (lift (S n) O x2) (eq_ind_r T (lift (S n) O (lift h (minus -x1 (S n)) x2)) (\lambda (t0: T).(pc3 c0 t0 (lift (S n) O (lift h (minus (plus -(S n) (minus x1 (S n))) (S n)) x2)))) (eq_ind nat x1 (\lambda (n0: nat).(pc3 -c0 (lift (S n) O (lift h (minus x1 (S n)) x2)) (lift (S n) O (lift h (minus -n0 (S n)) x2)))) (pc3_refl c0 (lift (S n) O (lift h (minus x1 (S n)) x2))) -(plus (S n) (minus x1 (S n))) (le_plus_minus (S n) x1 H8)) (lift h (plus (S -n) (minus x1 (S n))) (lift (S n) O x2)) (lift_d x2 h (S n) (minus x1 (S n)) O -(le_O_n (minus x1 (S n))))) (ty3_abst g n e x3 x2 H12 x4 H18)) x1 -(le_plus_minus (S n) x1 H8))))) H16)) u H11)))))))) (getl_drop_conf_lt Abst -c0 d0 u n H1 e h (minus x1 (S n)) H10))) x0 H9))) H7)) (\lambda (H7: (land -(le (plus x1 h) n) (eq T x0 (TLRef (minus n h))))).(land_ind (le (plus x1 h) -n) (eq T x0 (TLRef (minus n h))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 -t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (H8: (le -(plus x1 h) n)).(\lambda (H9: (eq T x0 (TLRef (minus n h)))).(eq_ind_r T -(TLRef (minus n h)) (\lambda (t0: T).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h -x1 t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e t0 t2)))) (ex_intro2 T -(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda (t2: -T).(ty3 g e (TLRef (minus n h)) t2)) (lift (S (minus n h)) O u) (eq_ind_r T -(lift (plus h (S (minus n h))) O u) (\lambda (t0: T).(pc3 c0 t0 (lift (S n) O -u))) (eq_ind nat (S (plus h (minus n h))) (\lambda (n0: nat).(pc3 c0 (lift n0 -O u) (lift (S n) O u))) (eq_ind nat n (\lambda (n0: nat).(pc3 c0 (lift (S n0) -O u) (lift (S n) O u))) (pc3_refl c0 (lift (S n) O u)) (plus h (minus n h)) -(le_plus_minus h n (le_trans h (plus x1 h) n (le_plus_r x1 h) H8))) (plus h -(S (minus n h))) (plus_n_Sm h (minus n h))) (lift h x1 (lift (S (minus n h)) -O u)) (lift_free u (S (minus n h)) h O x1 (le_trans x1 (S (minus n h)) (plus -O (S (minus n h))) (le_S_minus x1 h n H8) (le_plus_r O (S (minus n h)))) -(le_O_n x1))) (ty3_abst g (minus n h) e d0 u (getl_drop_conf_ge n (CHead d0 -(Bind Abst) u) c0 H1 e h x1 H5 H8) t H2)) x0 H9))) H7)) H6)))))))))))))))) -(\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H1: (ty3 g c0 u -t)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T u (lift h x1 -x0)) \to (\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 -c0 (lift h x1 t2) t)) (\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (b: -B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b) -u) t2 t3)).(\lambda (H4: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift -h x1 x0)) \to (\forall (e: C).((drop h x1 (CHead c0 (Bind b) u) e) \to (ex2 T -(\lambda (t4: T).(pc3 (CHead c0 (Bind b) u) (lift h x1 t4) t3)) (\lambda (t4: -T).(ty3 g e x0 t4)))))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: -(eq T (THead (Bind b) u t2) (lift h x1 x0))).(\lambda (e: C).(\lambda (H6: -(drop h x1 c0 e)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 -(THead (Bind b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x1 -y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T -(\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) u t3))) (\lambda (t4: -T).(ty3 g e x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 -(THead (Bind b) x2 x3))).(\lambda (H8: (eq T u (lift h x1 x2))).(\lambda (H9: -(eq T t2 (lift h (S x1) x3))).(eq_ind_r T (THead (Bind b) x2 x3) (\lambda -(t0: T).(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) u -t3))) (\lambda (t4: T).(ty3 g e t0 t4)))) (let H10 \def (eq_ind T t2 (\lambda -(t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T t0 (lift h x5 x4)) \to -(\forall (e0: C).((drop h x5 (CHead c0 (Bind b) u) e0) \to (ex2 T (\lambda -(t4: T).(pc3 (CHead c0 (Bind b) u) (lift h x5 t4) t3)) (\lambda (t4: T).(ty3 -g e0 x4 t4))))))))) H4 (lift h (S x1) x3) H9) in (let H11 \def (eq_ind T t2 -(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t0 t3)) H3 (lift h (S x1) x3) -H9) in (let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g (CHead c0 (Bind b) -t0) (lift h (S x1) x3) t3)) H11 (lift h x1 x2) H8) in (let H13 \def (eq_ind T -u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T (lift h (S x1) -x3) (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 (CHead c0 (Bind b) t0) -e0) \to (ex2 T (\lambda (t4: T).(pc3 (CHead c0 (Bind b) t0) (lift h x5 t4) -t3)) (\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H10 (lift h x1 x2) H8) in (let -H14 \def (eq_ind T u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: -nat).((eq T t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 c0 e0) \to -(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x5 t4) t)) (\lambda (t4: T).(ty3 g e0 -x4 t4))))))))) H2 (lift h x1 x2) H8) in (let H15 \def (eq_ind T u (\lambda -(t0: T).(ty3 g c0 t0 t)) H1 (lift h x1 x2) H8) in (eq_ind_r T (lift h x1 x2) -(\lambda (t0: T).(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind -b) t0 t3))) (\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4)))) (let H16 -\def (H14 x2 x1 (refl_equal T (lift h x1 x2)) e H6) in (ex2_ind T (\lambda -(t4: T).(pc3 c0 (lift h x1 t4) t)) (\lambda (t4: T).(ty3 g e x2 t4)) (ex2 T -(\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) (lift h x1 x2) t3))) -(\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4))) (\lambda (x4: -T).(\lambda (_: (pc3 c0 (lift h x1 x4) t)).(\lambda (H18: (ty3 g e x2 -x4)).(let H19 \def (H13 x3 (S x1) (refl_equal T (lift h (S x1) x3)) (CHead e -(Bind b) x2) (drop_skip_bind h x1 c0 e H6 b x2)) in (ex2_ind T (\lambda (t4: -T).(pc3 (CHead c0 (Bind b) (lift h x1 x2)) (lift h (S x1) t4) t3)) (\lambda -(t4: T).(ty3 g (CHead e (Bind b) x2) x3 t4)) (ex2 T (\lambda (t4: T).(pc3 c0 -(lift h x1 t4) (THead (Bind b) (lift h x1 x2) t3))) (\lambda (t4: T).(ty3 g e -(THead (Bind b) x2 x3) t4))) (\lambda (x5: T).(\lambda (H20: (pc3 (CHead c0 -(Bind b) (lift h x1 x2)) (lift h (S x1) x5) t3)).(\lambda (H21: (ty3 g (CHead -e (Bind b) x2) x3 x5)).(ex_ind T (\lambda (t0: T).(ty3 g (CHead e (Bind b) -x2) x5 t0)) (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) -(lift h x1 x2) t3))) (\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4))) -(\lambda (x6: T).(\lambda (_: (ty3 g (CHead e (Bind b) x2) x5 x6)).(ex_intro2 -T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) (lift h x1 x2) -t3))) (\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4)) (THead (Bind b) -x2 x5) (eq_ind_r T (THead (Bind b) (lift h x1 x2) (lift h (S x1) x5)) -(\lambda (t0: T).(pc3 c0 t0 (THead (Bind b) (lift h x1 x2) t3))) (pc3_head_2 -c0 (lift h x1 x2) (lift h (S x1) x5) t3 (Bind b) H20) (lift h x1 (THead (Bind -b) x2 x5)) (lift_bind b x2 x5 h x1)) (ty3_bind g e x2 x4 H18 b x3 x5 H21)))) -(ty3_correct g (CHead e (Bind b) x2) x3 x5 H21))))) H19))))) H16)) u -H8))))))) x0 H7)))))) (lift_gen_bind b u t2 x0 h x1 H5))))))))))))))))) -(\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (H1: (ty3 g c0 w -u)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T w (lift h x1 -x0)) \to (\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 -c0 (lift h x1 t2) u)) (\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (v: -T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 v (THead (Bind Abst) u -t))).(\lambda (H4: ((\forall (x0: T).(\forall (x1: nat).((eq T v (lift h x1 -x0)) \to (\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 -c0 (lift h x1 t2) (THead (Bind Abst) u t))) (\lambda (t2: T).(ty3 g e x0 -t2)))))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq T (THead -(Flat Appl) w v) (lift h x1 x0))).(\lambda (e: C).(\lambda (H6: (drop h x1 c0 -e)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat -Appl) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T w (lift h x1 y0)))) -(\lambda (_: T).(\lambda (z: T).(eq T v (lift h x1 z)))) (ex2 T (\lambda (t2: -T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) w (THead (Bind Abst) u t)))) -(\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda -(H7: (eq T x0 (THead (Flat Appl) x2 x3))).(\lambda (H8: (eq T w (lift h x1 -x2))).(\lambda (H9: (eq T v (lift h x1 x3))).(eq_ind_r T (THead (Flat Appl) -x2 x3) (\lambda (t0: T).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (THead -(Flat Appl) w (THead (Bind Abst) u t)))) (\lambda (t2: T).(ty3 g e t0 t2)))) -(let H10 \def (eq_ind T v (\lambda (t0: T).(\forall (x4: T).(\forall (x5: -nat).((eq T t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 c0 e0) \to -(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x5 t2) (THead (Bind Abst) u t))) -(\lambda (t2: T).(ty3 g e0 x4 t2))))))))) H4 (lift h x1 x3) H9) in (let H11 -\def (eq_ind T v (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H3 -(lift h x1 x3) H9) in (let H12 \def (eq_ind T w (\lambda (t0: T).(\forall -(x4: T).(\forall (x5: nat).((eq T t0 (lift h x5 x4)) \to (\forall (e0: -C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x5 t2) u)) -(\lambda (t2: T).(ty3 g e0 x4 t2))))))))) H2 (lift h x1 x2) H8) in (let H13 -\def (eq_ind T w (\lambda (t0: T).(ty3 g c0 t0 u)) H1 (lift h x1 x2) H8) in -(eq_ind_r T (lift h x1 x2) (\lambda (t0: T).(ex2 T (\lambda (t2: T).(pc3 c0 -(lift h x1 t2) (THead (Flat Appl) t0 (THead (Bind Abst) u t)))) (\lambda (t2: -T).(ty3 g e (THead (Flat Appl) x2 x3) t2)))) (let H14 \def (H12 x2 x1 -(refl_equal T (lift h x1 x2)) e H6) in (ex2_ind T (\lambda (t2: T).(pc3 c0 -(lift h x1 t2) u)) (\lambda (t2: T).(ty3 g e x2 t2)) (ex2 T (\lambda (t2: -T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind -Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) -(\lambda (x4: T).(\lambda (H15: (pc3 c0 (lift h x1 x4) u)).(\lambda (H16: -(ty3 g e x2 x4)).(let H17 \def (H10 x3 x1 (refl_equal T (lift h x1 x3)) e H6) -in (ex2_ind T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (THead (Bind Abst) u -t))) (\lambda (t2: T).(ty3 g e x3 t2)) (ex2 T (\lambda (t2: T).(pc3 c0 (lift -h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind Abst) u t)))) -(\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) (\lambda (x5: -T).(\lambda (H18: (pc3 c0 (lift h x1 x5) (THead (Bind Abst) u t))).(\lambda -(H19: (ty3 g e x3 x5)).(ex3_2_ind T T (\lambda (u1: T).(\lambda (t2: T).(pr3 -e x5 (THead (Bind Abst) u1 t2)))) (\lambda (u1: T).(\lambda (_: T).(pr3 c0 u -(lift h x1 u1)))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall -(u0: T).(pr3 (CHead c0 (Bind b) u0) t (lift h (S x1) t2)))))) (ex2 T (\lambda -(t2: T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind -Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) -(\lambda (x6: T).(\lambda (x7: T).(\lambda (H20: (pr3 e x5 (THead (Bind Abst) -x6 x7))).(\lambda (H21: (pr3 c0 u (lift h x1 x6))).(\lambda (H22: ((\forall -(b: B).(\forall (u0: T).(pr3 (CHead c0 (Bind b) u0) t (lift h (S x1) -x7)))))).(ex_ind T (\lambda (t0: T).(ty3 g e x5 t0)) (ex2 T (\lambda (t2: -T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind -Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) -(\lambda (x8: T).(\lambda (H23: (ty3 g e x5 x8)).(let H_y \def (ty3_sred_pr3 -e x5 (THead (Bind Abst) x6 x7) H20 g x8 H23) in (ex3_2_ind T T (\lambda (t2: -T).(\lambda (_: T).(pc3 e (THead (Bind Abst) x6 t2) x8))) (\lambda (_: -T).(\lambda (t0: T).(ty3 g e x6 t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g -(CHead e (Bind Abst) x6) x7 t2))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 -t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind Abst) u t)))) (\lambda -(t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) (\lambda (x9: T).(\lambda -(x10: T).(\lambda (_: (pc3 e (THead (Bind Abst) x6 x9) x8)).(\lambda (H25: -(ty3 g e x6 x10)).(\lambda (H26: (ty3 g (CHead e (Bind Abst) x6) x7 -x9)).(ex_intro2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) -(lift h x1 x2) (THead (Bind Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead -(Flat Appl) x2 x3) t2)) (THead (Flat Appl) x2 (THead (Bind Abst) x6 x7)) -(eq_ind_r T (THead (Flat Appl) (lift h x1 x2) (lift h x1 (THead (Bind Abst) -x6 x7))) (\lambda (t0: T).(pc3 c0 t0 (THead (Flat Appl) (lift h x1 x2) (THead -(Bind Abst) u t)))) (pc3_thin_dx c0 (lift h x1 (THead (Bind Abst) x6 x7)) -(THead (Bind Abst) u t) (eq_ind_r T (THead (Bind Abst) (lift h x1 x6) (lift h -(S x1) x7)) (\lambda (t0: T).(pc3 c0 t0 (THead (Bind Abst) u t))) -(pc3_head_21 c0 (lift h x1 x6) u (pc3_pr3_x c0 (lift h x1 x6) u H21) (Bind -Abst) (lift h (S x1) x7) t (pc3_pr3_x (CHead c0 (Bind Abst) (lift h x1 x6)) -(lift h (S x1) x7) t (H22 Abst (lift h x1 x6)))) (lift h x1 (THead (Bind -Abst) x6 x7)) (lift_bind Abst x6 x7 h x1)) (lift h x1 x2) Appl) (lift h x1 -(THead (Flat Appl) x2 (THead (Bind Abst) x6 x7))) (lift_flat Appl x2 (THead -(Bind Abst) x6 x7) h x1)) (ty3_appl g e x2 x6 (ty3_conv g e x6 x10 H25 x2 x4 -H16 (pc3_gen_lift c0 x4 x6 h x1 (pc3_t u c0 (lift h x1 x4) H15 (lift h x1 x6) -(pc3_pr3_r c0 u (lift h x1 x6) H21)) e H6)) x3 x7 (ty3_conv g e (THead (Bind -Abst) x6 x7) (THead (Bind Abst) x6 x9) (ty3_bind g e x6 x10 H25 Abst x7 x9 -H26) x3 x5 H19 (pc3_pr3_r e x5 (THead (Bind Abst) x6 x7) H20))))))))) -(ty3_gen_bind g Abst e x6 x7 x8 H_y))))) (ty3_correct g e x3 x5 H19))))))) -(pc3_gen_lift_abst c0 x5 t u h x1 H18 e H6))))) H17))))) H14)) w H8))))) x0 -H7)))))) (lift_gen_flat Appl w v x0 h x1 H5)))))))))))))))) (\lambda (c0: -C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (ty3 g c0 t2 t3)).(\lambda -(H2: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to -(\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t4: T).(pc3 c0 (lift h -x1 t4) t3)) (\lambda (t4: T).(ty3 g e x0 t4)))))))))).(\lambda (t0: -T).(\lambda (H3: (ty3 g c0 t3 t0)).(\lambda (H4: ((\forall (x0: T).(\forall -(x1: nat).((eq T t3 (lift h x1 x0)) \to (\forall (e: C).((drop h x1 c0 e) \to -(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) t0)) (\lambda (t4: T).(ty3 g e -x0 t4)))))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq T -(THead (Flat Cast) t3 t2) (lift h x1 x0))).(\lambda (e: C).(\lambda (H6: -(drop h x1 c0 e)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 -(THead (Flat Cast) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T t3 (lift h -x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h x1 z)))) (ex2 T -(\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Flat Cast) t0 t3))) (\lambda -(t4: T).(ty3 g e x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq -T x0 (THead (Flat Cast) x2 x3))).(\lambda (H8: (eq T t3 (lift h x1 -x2))).(\lambda (H9: (eq T t2 (lift h x1 x3))).(eq_ind_r T (THead (Flat Cast) -x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead -(Flat Cast) t0 t3))) (\lambda (t4: T).(ty3 g e t t4)))) (let H10 \def (eq_ind -T t3 (\lambda (t: T).(\forall (x4: T).(\forall (x5: nat).((eq T t (lift h x5 -x4)) \to (\forall (e0: C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 -c0 (lift h x5 t4) t0)) (\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H4 (lift h -x1 x2) H8) in (let H11 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t t0)) H3 -(lift h x1 x2) H8) in (let H12 \def (eq_ind T t3 (\lambda (t: T).(\forall -(x4: T).(\forall (x5: nat).((eq T t2 (lift h x5 x4)) \to (\forall (e0: -C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x5 t4) t)) -(\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H2 (lift h x1 x2) H8) in (let H13 -\def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t2 t)) H1 (lift h x1 x2) H8) in -(eq_ind_r T (lift h x1 x2) (\lambda (t: T).(ex2 T (\lambda (t4: T).(pc3 c0 -(lift h x1 t4) (THead (Flat Cast) t0 t))) (\lambda (t4: T).(ty3 g e (THead -(Flat Cast) x2 x3) t4)))) (let H14 \def (eq_ind T t2 (\lambda (t: T).(ty3 g -c0 t (lift h x1 x2))) H13 (lift h x1 x3) H9) in (let H15 \def (eq_ind T t2 -(\lambda (t: T).(\forall (x4: T).(\forall (x5: nat).((eq T t (lift h x5 x4)) -\to (\forall (e0: C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 c0 -(lift h x5 t4) (lift h x1 x2))) (\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H12 -(lift h x1 x3) H9) in (let H16 \def (H15 x3 x1 (refl_equal T (lift h x1 x3)) -e H6) in (ex2_ind T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (lift h x1 x2))) -(\lambda (t4: T).(ty3 g e x3 t4)) (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 -t4) (THead (Flat Cast) t0 (lift h x1 x2)))) (\lambda (t4: T).(ty3 g e (THead -(Flat Cast) x2 x3) t4))) (\lambda (x4: T).(\lambda (H17: (pc3 c0 (lift h x1 -x4) (lift h x1 x2))).(\lambda (H18: (ty3 g e x3 x4)).(let H19 \def (H10 x2 x1 -(refl_equal T (lift h x1 x2)) e H6) in (ex2_ind T (\lambda (t4: T).(pc3 c0 -(lift h x1 t4) t0)) (\lambda (t4: T).(ty3 g e x2 t4)) (ex2 T (\lambda (t4: -T).(pc3 c0 (lift h x1 t4) (THead (Flat Cast) t0 (lift h x1 x2)))) (\lambda -(t4: T).(ty3 g e (THead (Flat Cast) x2 x3) t4))) (\lambda (x5: T).(\lambda -(H20: (pc3 c0 (lift h x1 x5) t0)).(\lambda (H21: (ty3 g e x2 x5)).(ex_intro2 -T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Flat Cast) t0 (lift h x1 -x2)))) (\lambda (t4: T).(ty3 g e (THead (Flat Cast) x2 x3) t4)) (THead (Flat -Cast) x5 x2) (eq_ind_r T (THead (Flat Cast) (lift h x1 x5) (lift h x1 x2)) -(\lambda (t: T).(pc3 c0 t (THead (Flat Cast) t0 (lift h x1 x2)))) (pc3_head_1 -c0 (lift h x1 x5) t0 H20 (Flat Cast) (lift h x1 x2)) (lift h x1 (THead (Flat -Cast) x5 x2)) (lift_flat Cast x5 x2 h x1)) (ty3_cast g e x3 x2 (ty3_conv g e -x2 x5 H21 x3 x4 H18 (pc3_gen_lift c0 x4 x2 h x1 H17 e H6)) x5 H21))))) -H19))))) H16)))) t3 H8))))) x0 H7)))))) (lift_gen_flat Cast t3 t2 x0 h x1 -H5))))))))))))))) c y x H0))))) H))))))). - -lemma ty3_tred: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u -t1) \to (\forall (t2: T).((pr3 c t1 t2) \to (ty3 g c u t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: -(ty3 g c u t1)).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).(ex_ind T -(\lambda (t: T).(ty3 g c t1 t)) (ty3 g c u t2) (\lambda (x: T).(\lambda (H1: -(ty3 g c t1 x)).(let H_y \def (ty3_sred_pr3 c t1 t2 H0 g x H1) in (ty3_conv g -c t2 x H_y u t1 H (pc3_pr3_r c t1 t2 H0))))) (ty3_correct g c u t1 H)))))))). - -theorem ty3_sconv_pc3: - \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c -u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to ((pc3 c u1 -u2) \to (pc3 c t1 t2))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda -(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c -u2 t2)).(\lambda (H1: (pc3 c u1 u2)).(let H2 \def H1 in (ex2_ind T (\lambda -(t: T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c u2 t)) (pc3 c t1 t2) (\lambda (x: -T).(\lambda (H3: (pr3 c u1 x)).(\lambda (H4: (pr3 c u2 x)).(let H_y \def -(ty3_sred_pr3 c u2 x H4 g t2 H0) in (let H_y0 \def (ty3_sred_pr3 c u1 x H3 g -t1 H) in (ty3_unique g c x t1 H_y0 t2 H_y)))))) H2)))))))))). - -lemma ty3_sred_back: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t0: T).((ty3 g c -t1 t0) \to (\forall (t2: T).((pr3 c t1 t2) \to (\forall (t: T).((ty3 g c t2 -t) \to (ty3 g c t1 t))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t0: T).(\lambda -(H: (ty3 g c t1 t0)).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).(\lambda -(t: T).(\lambda (H1: (ty3 g c t2 t)).(ex_ind T (\lambda (t3: T).(ty3 g c t -t3)) (ty3 g c t1 t) (\lambda (x: T).(\lambda (H2: (ty3 g c t x)).(ty3_conv g -c t x H2 t1 t0 H (ty3_unique g c t2 t0 (ty3_sred_pr3 c t1 t2 H0 g t0 H) t -H1)))) (ty3_correct g c t2 t H1)))))))))). - -theorem ty3_sconv: - \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c -u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to ((pc3 c u1 -u2) \to (ty3 g c u1 t2))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda -(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c -u2 t2)).(\lambda (H1: (pc3 c u1 u2)).(let H2 \def H1 in (ex2_ind T (\lambda -(t: T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c u2 t)) (ty3 g c u1 t2) (\lambda -(x: T).(\lambda (H3: (pr3 c u1 x)).(\lambda (H4: (pr3 c u2 x)).(ty3_sred_back -g c u1 t1 H x H3 t2 (ty3_sred_pr3 c u2 x H4 g t2 H0))))) H2)))))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/props.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/props.ma deleted file mode 100644 index d9a82d40e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/props.ma +++ /dev/null @@ -1,669 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/fwd.ma". - -include "basic_1/pc3/fwd.ma". - -lemma ty3_lift: - \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((ty3 g e -t1 t2) \to (\forall (c: C).(\forall (d: nat).(\forall (h: nat).((drop h d c -e) \to (ty3 g c (lift h d t1) (lift h d t2)))))))))) -\def - \lambda (g: G).(\lambda (e: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g e t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda (t0: -T).(\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) \to -(ty3 g c0 (lift h d t) (lift h d t0))))))))) (\lambda (c: C).(\lambda (t0: -T).(\lambda (t: T).(\lambda (_: (ty3 g c t0 t)).(\lambda (H1: ((\forall (c0: -C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h -d t0) (lift h d t)))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 -g c u t3)).(\lambda (H3: ((\forall (c0: C).(\forall (d: nat).(\forall (h: -nat).((drop h d c0 c) \to (ty3 g c0 (lift h d u) (lift h d -t3)))))))).(\lambda (H4: (pc3 c t3 t0)).(\lambda (c0: C).(\lambda (d: -nat).(\lambda (h: nat).(\lambda (H5: (drop h d c0 c)).(ty3_conv g c0 (lift h -d t0) (lift h d t) (H1 c0 d h H5) (lift h d u) (lift h d t3) (H3 c0 d h H5) -(pc3_lift c0 c h d H5 t3 t0 H4)))))))))))))))) (\lambda (c: C).(\lambda (m: -nat).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (_: (drop -h d c0 c)).(eq_ind_r T (TSort m) (\lambda (t: T).(ty3 g c0 t (lift h d (TSort -(next g m))))) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(ty3 g c0 -(TSort m) t)) (ty3_sort g c0 m) (lift h d (TSort (next g m))) (lift_sort -(next g m) h d)) (lift h d (TSort m)) (lift_sort m h d)))))))) (\lambda (n: -nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c -(CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u -t)).(\lambda (H2: ((\forall (c0: C).(\forall (d0: nat).(\forall (h: -nat).((drop h d0 c0 d) \to (ty3 g c0 (lift h d0 u) (lift h d0 -t)))))))).(\lambda (c0: C).(\lambda (d0: nat).(\lambda (h: nat).(\lambda (H3: -(drop h d0 c0 c)).(lt_le_e n d0 (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 -(lift (S n) O t))) (\lambda (H4: (lt n d0)).(let H5 \def (drop_getl_trans_le -n d0 (le_S_n n d0 (le_S_n (S n) (S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) -d0 H4)))) c0 c h H3 (CHead d (Bind Abbr) u) H0) in (ex3_2_ind C C (\lambda -(e0: C).(\lambda (_: C).(drop n O c0 e0))) (\lambda (e0: C).(\lambda (e1: -C).(drop h (minus d0 n) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 -(CHead d (Bind Abbr) u)))) (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 (lift -(S n) O t))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop n O c0 -x0)).(\lambda (H7: (drop h (minus d0 n) x0 x1)).(\lambda (H8: (clear x1 -(CHead d (Bind Abbr) u))).(let H9 \def (eq_ind nat (minus d0 n) (\lambda (n0: -nat).(drop h n0 x0 x1)) H7 (S (minus d0 (S n))) (minus_x_Sy d0 n H4)) in (let -H10 \def (drop_clear_S x1 x0 h (minus d0 (S n)) H9 Abbr d u H8) in (ex2_ind C -(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d0 (S n)) -u)))) (\lambda (c1: C).(drop h (minus d0 (S n)) c1 d)) (ty3 g c0 (lift h d0 -(TLRef n)) (lift h d0 (lift (S n) O t))) (\lambda (x: C).(\lambda (H11: -(clear x0 (CHead x (Bind Abbr) (lift h (minus d0 (S n)) u)))).(\lambda (H12: -(drop h (minus d0 (S n)) x d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ty3 g -c0 t0 (lift h d0 (lift (S n) O t)))) (eq_ind nat (plus (S n) (minus d0 (S -n))) (\lambda (n0: nat).(ty3 g c0 (TLRef n) (lift h n0 (lift (S n) O t)))) -(eq_ind_r T (lift (S n) O (lift h (minus d0 (S n)) t)) (\lambda (t0: T).(ty3 -g c0 (TLRef n) t0)) (eq_ind nat d0 (\lambda (_: nat).(ty3 g c0 (TLRef n) -(lift (S n) O (lift h (minus d0 (S n)) t)))) (ty3_abbr g n c0 x (lift h -(minus d0 (S n)) u) (getl_intro n c0 (CHead x (Bind Abbr) (lift h (minus d0 -(S n)) u)) x0 H6 H11) (lift h (minus d0 (S n)) t) (H2 x (minus d0 (S n)) h -H12)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H4)) (lift h -(plus (S n) (minus d0 (S n))) (lift (S n) O t)) (lift_d t h (S n) (minus d0 -(S n)) O (le_O_n (minus d0 (S n))))) d0 (le_plus_minus_r (S n) d0 H4)) (lift -h d0 (TLRef n)) (lift_lref_lt n h d0 H4))))) H10)))))))) H5))) (\lambda (H4: -(le d0 n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(ty3 g c0 t0 (lift -h d0 (lift (S n) O t)))) (eq_ind nat (S n) (\lambda (_: nat).(ty3 g c0 (TLRef -(plus n h)) (lift h d0 (lift (S n) O t)))) (eq_ind_r T (lift (plus h (S n)) O -t) (\lambda (t0: T).(ty3 g c0 (TLRef (plus n h)) t0)) (eq_ind_r nat (plus (S -n) h) (\lambda (n0: nat).(ty3 g c0 (TLRef (plus n h)) (lift n0 O t))) -(ty3_abbr g (plus n h) c0 d u (drop_getl_trans_ge n c0 c d0 h H3 (CHead d -(Bind Abbr) u) H0 H4) t H1) (plus h (S n)) (plus_sym h (S n))) (lift h d0 -(lift (S n) O t)) (lift_free t (S n) h O d0 (le_S_n d0 (S n) (le_S (S d0) (S -n) (le_n_S d0 n H4))) (le_O_n d0))) (plus n (S O)) (eq_ind_r nat (plus (S O) -n) (\lambda (n0: nat).(eq nat (S n) n0)) (le_antisym (S n) (plus (S O) n) -(le_n (plus (S O) n)) (le_n (S n))) (plus n (S O)) (plus_sym n (S O)))) (lift -h d0 (TLRef n)) (lift_lref_ge n h d0 H4)))))))))))))))) (\lambda (n: -nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c -(CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u -t)).(\lambda (H2: ((\forall (c0: C).(\forall (d0: nat).(\forall (h: -nat).((drop h d0 c0 d) \to (ty3 g c0 (lift h d0 u) (lift h d0 -t)))))))).(\lambda (c0: C).(\lambda (d0: nat).(\lambda (h: nat).(\lambda (H3: -(drop h d0 c0 c)).(lt_le_e n d0 (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 -(lift (S n) O u))) (\lambda (H4: (lt n d0)).(let H5 \def (drop_getl_trans_le -n d0 (le_S_n n d0 (le_S_n (S n) (S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) -d0 H4)))) c0 c h H3 (CHead d (Bind Abst) u) H0) in (ex3_2_ind C C (\lambda -(e0: C).(\lambda (_: C).(drop n O c0 e0))) (\lambda (e0: C).(\lambda (e1: -C).(drop h (minus d0 n) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 -(CHead d (Bind Abst) u)))) (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 (lift -(S n) O u))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop n O c0 -x0)).(\lambda (H7: (drop h (minus d0 n) x0 x1)).(\lambda (H8: (clear x1 -(CHead d (Bind Abst) u))).(let H9 \def (eq_ind nat (minus d0 n) (\lambda (n0: -nat).(drop h n0 x0 x1)) H7 (S (minus d0 (S n))) (minus_x_Sy d0 n H4)) in (let -H10 \def (drop_clear_S x1 x0 h (minus d0 (S n)) H9 Abst d u H8) in (ex2_ind C -(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abst) (lift h (minus d0 (S n)) -u)))) (\lambda (c1: C).(drop h (minus d0 (S n)) c1 d)) (ty3 g c0 (lift h d0 -(TLRef n)) (lift h d0 (lift (S n) O u))) (\lambda (x: C).(\lambda (H11: -(clear x0 (CHead x (Bind Abst) (lift h (minus d0 (S n)) u)))).(\lambda (H12: -(drop h (minus d0 (S n)) x d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ty3 g -c0 t0 (lift h d0 (lift (S n) O u)))) (eq_ind nat (plus (S n) (minus d0 (S -n))) (\lambda (n0: nat).(ty3 g c0 (TLRef n) (lift h n0 (lift (S n) O u)))) -(eq_ind_r T (lift (S n) O (lift h (minus d0 (S n)) u)) (\lambda (t0: T).(ty3 -g c0 (TLRef n) t0)) (eq_ind nat d0 (\lambda (_: nat).(ty3 g c0 (TLRef n) -(lift (S n) O (lift h (minus d0 (S n)) u)))) (ty3_abst g n c0 x (lift h -(minus d0 (S n)) u) (getl_intro n c0 (CHead x (Bind Abst) (lift h (minus d0 -(S n)) u)) x0 H6 H11) (lift h (minus d0 (S n)) t) (H2 x (minus d0 (S n)) h -H12)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H4)) (lift h -(plus (S n) (minus d0 (S n))) (lift (S n) O u)) (lift_d u h (S n) (minus d0 -(S n)) O (le_O_n (minus d0 (S n))))) d0 (le_plus_minus_r (S n) d0 H4)) (lift -h d0 (TLRef n)) (lift_lref_lt n h d0 H4))))) H10)))))))) H5))) (\lambda (H4: -(le d0 n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(ty3 g c0 t0 (lift -h d0 (lift (S n) O u)))) (eq_ind nat (S n) (\lambda (_: nat).(ty3 g c0 (TLRef -(plus n h)) (lift h d0 (lift (S n) O u)))) (eq_ind_r T (lift (plus h (S n)) O -u) (\lambda (t0: T).(ty3 g c0 (TLRef (plus n h)) t0)) (eq_ind_r nat (plus (S -n) h) (\lambda (n0: nat).(ty3 g c0 (TLRef (plus n h)) (lift n0 O u))) -(ty3_abst g (plus n h) c0 d u (drop_getl_trans_ge n c0 c d0 h H3 (CHead d -(Bind Abst) u) H0 H4) t H1) (plus h (S n)) (plus_sym h (S n))) (lift h d0 -(lift (S n) O u)) (lift_free u (S n) h O d0 (le_S_n d0 (S n) (le_S (S d0) (S -n) (le_n_S d0 n H4))) (le_O_n d0))) (plus n (S O)) (eq_ind_r nat (plus (S O) -n) (\lambda (n0: nat).(eq nat (S n) n0)) (le_antisym (S n) (plus (S O) n) -(le_n (plus (S O) n)) (le_n (S n))) (plus n (S O)) (plus_sym n (S O)))) (lift -h d0 (TLRef n)) (lift_lref_ge n h d0 H4)))))))))))))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c u t)).(\lambda (H1: -((\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) \to -(ty3 g c0 (lift h d u) (lift h d t)))))))).(\lambda (b: B).(\lambda (t0: -T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t0 t3)).(\lambda -(H3: ((\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 -(CHead c (Bind b) u)) \to (ty3 g c0 (lift h d t0) (lift h d -t3)))))))).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H4: -(drop h d c0 c)).(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s (Bind b) -d) t0)) (\lambda (t4: T).(ty3 g c0 t4 (lift h d (THead (Bind b) u t3)))) -(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s (Bind b) d) t3)) (\lambda -(t4: T).(ty3 g c0 (THead (Bind b) (lift h d u) (lift h (s (Bind b) d) t0)) -t4)) (ty3_bind g c0 (lift h d u) (lift h d t) (H1 c0 d h H4) b (lift h (S d) -t0) (lift h (S d) t3) (H3 (CHead c0 (Bind b) (lift h d u)) (S d) h -(drop_skip_bind h d c0 c H4 b u))) (lift h d (THead (Bind b) u t3)) -(lift_head (Bind b) u t3 h d)) (lift h d (THead (Bind b) u t0)) (lift_head -(Bind b) u t0 h d)))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda -(u: T).(\lambda (_: (ty3 g c w u)).(\lambda (H1: ((\forall (c0: C).(\forall -(d: nat).(\forall (h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h d w) (lift -h d u)))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead -(Bind Abst) u t))).(\lambda (H3: ((\forall (c0: C).(\forall (d: nat).(\forall -(h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h d v) (lift h d (THead (Bind -Abst) u t))))))))).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: -nat).(\lambda (H4: (drop h d c0 c)).(eq_ind_r T (THead (Flat Appl) (lift h d -w) (lift h (s (Flat Appl) d) v)) (\lambda (t0: T).(ty3 g c0 t0 (lift h d -(THead (Flat Appl) w (THead (Bind Abst) u t))))) (eq_ind_r T (THead (Flat -Appl) (lift h d w) (lift h (s (Flat Appl) d) (THead (Bind Abst) u t))) -(\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) (lift h d w) (lift h (s (Flat -Appl) d) v)) t0)) (eq_ind_r T (THead (Bind Abst) (lift h (s (Flat Appl) d) u) -(lift h (s (Bind Abst) (s (Flat Appl) d)) t)) (\lambda (t0: T).(ty3 g c0 -(THead (Flat Appl) (lift h d w) (lift h (s (Flat Appl) d) v)) (THead (Flat -Appl) (lift h d w) t0))) (ty3_appl g c0 (lift h d w) (lift h d u) (H1 c0 d h -H4) (lift h d v) (lift h (S d) t) (eq_ind T (lift h d (THead (Bind Abst) u -t)) (\lambda (t0: T).(ty3 g c0 (lift h d v) t0)) (H3 c0 d h H4) (THead (Bind -Abst) (lift h d u) (lift h (S d) t)) (lift_bind Abst u t h d))) (lift h (s -(Flat Appl) d) (THead (Bind Abst) u t)) (lift_head (Bind Abst) u t h (s (Flat -Appl) d))) (lift h d (THead (Flat Appl) w (THead (Bind Abst) u t))) -(lift_head (Flat Appl) w (THead (Bind Abst) u t) h d)) (lift h d (THead (Flat -Appl) w v)) (lift_head (Flat Appl) w v h d))))))))))))))) (\lambda (c: -C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t0 t3)).(\lambda -(H1: ((\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) -\to (ty3 g c0 (lift h d t0) (lift h d t3)))))))).(\lambda (t4: T).(\lambda -(_: (ty3 g c t3 t4)).(\lambda (H3: ((\forall (c0: C).(\forall (d: -nat).(\forall (h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h d t3) (lift h d -t4)))))))).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H4: -(drop h d c0 c)).(eq_ind_r T (THead (Flat Cast) (lift h d t3) (lift h (s -(Flat Cast) d) t0)) (\lambda (t: T).(ty3 g c0 t (lift h d (THead (Flat Cast) -t4 t3)))) (eq_ind_r T (THead (Flat Cast) (lift h d t4) (lift h (s (Flat Cast) -d) t3)) (\lambda (t: T).(ty3 g c0 (THead (Flat Cast) (lift h d t3) (lift h (s -(Flat Cast) d) t0)) t)) (ty3_cast g c0 (lift h (s (Flat Cast) d) t0) (lift h -(s (Flat Cast) d) t3) (H1 c0 (s (Flat Cast) d) h H4) (lift h d t4) (H3 c0 d h -H4)) (lift h d (THead (Flat Cast) t4 t3)) (lift_head (Flat Cast) t4 t3 h d)) -(lift h d (THead (Flat Cast) t3 t0)) (lift_head (Flat Cast) t3 t0 h -d)))))))))))))) e t1 t2 H))))). - -lemma ty3_correct: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c -t1 t2) \to (ex T (\lambda (t: T).(ty3 g c t2 t))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda -(t0: T).(ex T (\lambda (t3: T).(ty3 g c0 t0 t3)))))) (\lambda (c0: -C).(\lambda (t0: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 t0 t)).(\lambda -(_: (ex T (\lambda (t3: T).(ty3 g c0 t t3)))).(\lambda (u: T).(\lambda (t3: -T).(\lambda (_: (ty3 g c0 u t3)).(\lambda (_: (ex T (\lambda (t4: T).(ty3 g -c0 t3 t4)))).(\lambda (_: (pc3 c0 t3 t0)).(ex_intro T (\lambda (t4: T).(ty3 g -c0 t0 t4)) t H0))))))))))) (\lambda (c0: C).(\lambda (m: nat).(ex_intro T -(\lambda (t: T).(ty3 g c0 (TSort (next g m)) t)) (TSort (next g (next g m))) -(ty3_sort g c0 (next g m))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: -C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) -u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex T (\lambda -(t0: T).(ty3 g d t t0)))).(let H3 \def H2 in (ex_ind T (\lambda (t0: T).(ty3 -g d t t0)) (ex T (\lambda (t0: T).(ty3 g c0 (lift (S n) O t) t0))) (\lambda -(x: T).(\lambda (H4: (ty3 g d t x)).(ex_intro T (\lambda (t0: T).(ty3 g c0 -(lift (S n) O t) t0)) (lift (S n) O x) (ty3_lift g d t x H4 c0 O (S n) -(getl_drop Abbr c0 d u n H0))))) H3)))))))))) (\lambda (n: nat).(\lambda (c0: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind -Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (_: (ex T -(\lambda (t0: T).(ty3 g d t t0)))).(ex_intro T (\lambda (t0: T).(ty3 g c0 -(lift (S n) O u) t0)) (lift (S n) O t) (ty3_lift g d u t H1 c0 O (S n) -(getl_drop Abst c0 d u n H0))))))))))) (\lambda (c0: C).(\lambda (u: -T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u t)).(\lambda (_: (ex T (\lambda -(t0: T).(ty3 g c0 t t0)))).(\lambda (b: B).(\lambda (t0: T).(\lambda (t3: -T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t0 t3)).(\lambda (H3: (ex T -(\lambda (t4: T).(ty3 g (CHead c0 (Bind b) u) t3 t4)))).(let H4 \def H3 in -(ex_ind T (\lambda (t4: T).(ty3 g (CHead c0 (Bind b) u) t3 t4)) (ex T -(\lambda (t4: T).(ty3 g c0 (THead (Bind b) u t3) t4))) (\lambda (x: -T).(\lambda (H5: (ty3 g (CHead c0 (Bind b) u) t3 x)).(ex_intro T (\lambda -(t4: T).(ty3 g c0 (THead (Bind b) u t3) t4)) (THead (Bind b) u x) (ty3_bind g -c0 u t H0 b t3 x H5)))) H4)))))))))))) (\lambda (c0: C).(\lambda (w: -T).(\lambda (u: T).(\lambda (H0: (ty3 g c0 w u)).(\lambda (H1: (ex T (\lambda -(t: T).(ty3 g c0 u t)))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g -c0 v (THead (Bind Abst) u t))).(\lambda (H3: (ex T (\lambda (t0: T).(ty3 g c0 -(THead (Bind Abst) u t) t0)))).(let H4 \def H1 in (ex_ind T (\lambda (t0: -T).(ty3 g c0 u t0)) (ex T (\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) w -(THead (Bind Abst) u t)) t0))) (\lambda (x: T).(\lambda (_: (ty3 g c0 u -x)).(let H6 \def H3 in (ex_ind T (\lambda (t0: T).(ty3 g c0 (THead (Bind -Abst) u t) t0)) (ex T (\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) w (THead -(Bind Abst) u t)) t0))) (\lambda (x0: T).(\lambda (H7: (ty3 g c0 (THead (Bind -Abst) u t) x0)).(ex3_2_ind T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 -(THead (Bind Abst) u t3) x0))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u -t0))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind Abst) u) t -t3))) (ex T (\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) w (THead (Bind -Abst) u t)) t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c0 -(THead (Bind Abst) u x1) x0)).(\lambda (H9: (ty3 g c0 u x2)).(\lambda (H10: -(ty3 g (CHead c0 (Bind Abst) u) t x1)).(ex_intro T (\lambda (t0: T).(ty3 g c0 -(THead (Flat Appl) w (THead (Bind Abst) u t)) t0)) (THead (Flat Appl) w -(THead (Bind Abst) u x1)) (ty3_appl g c0 w u H0 (THead (Bind Abst) u t) x1 -(ty3_bind g c0 u x2 H9 Abst t x1 H10)))))))) (ty3_gen_bind g Abst c0 u t x0 -H7)))) H6)))) H4))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: -T).(\lambda (_: (ty3 g c0 t0 t3)).(\lambda (_: (ex T (\lambda (t: T).(ty3 g -c0 t3 t)))).(\lambda (t4: T).(\lambda (H2: (ty3 g c0 t3 t4)).(\lambda (H3: -(ex T (\lambda (t: T).(ty3 g c0 t4 t)))).(let H4 \def H3 in (ex_ind T -(\lambda (t: T).(ty3 g c0 t4 t)) (ex T (\lambda (t: T).(ty3 g c0 (THead (Flat -Cast) t4 t3) t))) (\lambda (x: T).(\lambda (H5: (ty3 g c0 t4 x)).(ex_intro T -(\lambda (t: T).(ty3 g c0 (THead (Flat Cast) t4 t3) t)) (THead (Flat Cast) x -t4) (ty3_cast g c0 t3 t4 H2 x H5)))) H4)))))))))) c t1 t2 H))))). - -theorem ty3_unique: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u -t1) \to (\forall (t2: T).((ty3 g c u t2) \to (pc3 c t1 t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: -(ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: -T).(\forall (t2: T).((ty3 g c0 t t2) \to (pc3 c0 t0 t2)))))) (\lambda (c0: -C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda -(_: ((\forall (t3: T).((ty3 g c0 t2 t3) \to (pc3 c0 t t3))))).(\lambda (u0: -T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 u0 t0)).(\lambda (H3: ((\forall -(t3: T).((ty3 g c0 u0 t3) \to (pc3 c0 t0 t3))))).(\lambda (H4: (pc3 c0 t0 -t2)).(\lambda (t3: T).(\lambda (H5: (ty3 g c0 u0 t3)).(pc3_t t0 c0 t2 (pc3_s -c0 t2 t0 H4) t3 (H3 t3 H5)))))))))))))) (\lambda (c0: C).(\lambda (m: -nat).(\lambda (t2: T).(\lambda (H0: (ty3 g c0 (TSort m) t2)).(ty3_gen_sort g -c0 t2 m H0))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda -(u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: -T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall (t2: T).((ty3 g d u0 -t2) \to (pc3 d t t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) -t2)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: -T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) -(\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 -(lift (S n) O t) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: -T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda -(u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: -C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))))).(ex3_3_ind C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) -t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g -e u1 t0)))) (pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O x2) t2)).(\lambda -(H6: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 -x2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: C).(getl n -c0 c1)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n -H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: -C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) -(CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d -(Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | (CHead -_ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) -(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in -(\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t0: -T).(getl n c0 (CHead x0 (Bind Abbr) t0))) H8 u0 H10) in (let H13 \def -(eq_ind_r T x1 (\lambda (t0: T).(ty3 g x0 t0 x2)) H7 u0 H10) in (let H14 \def -(eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 (Bind Abbr) u0))) H12 d -H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c1: C).(ty3 g c1 u0 x2)) H13 d -H11) in (pc3_t (lift (S n) O x2) c0 (lift (S n) O t) (pc3_lift c0 d (S n) O -(getl_drop Abbr c0 d u0 n H14) t x2 (H2 x2 H15)) t2 H5))))))) H9))))))))) -H4)) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (t0: T).(ty3 g e u1 t0)))))).(ex3_3_ind C T T (\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda -(e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) -u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) -(pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: -T).(\lambda (_: (pc3 c0 (lift (S n) O x1) t2)).(\lambda (H6: (getl n c0 -(CHead x0 (Bind Abst) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 \def -(eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead -x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 -(Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u0) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d -(Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind (pc3 c0 -(lift (S n) O t) t2) H9))))))))) H4)) (ty3_gen_lref g c0 t2 n H3)))))))))))) -(\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda -(H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (_: (ty3 -g d u0 t)).(\lambda (_: ((\forall (t2: T).((ty3 g d u0 t2) \to (pc3 d t -t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) t2)).(or_ind -(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift -(S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n -c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda -(t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda -(u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: -C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 (lift (S n) -O u0) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda -(t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: -C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))))).(ex3_3_ind C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) -t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g -e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (_: (pc3 c0 (lift (S n) O x2) t2)).(\lambda (H6: -(getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 -\def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c1: C).(getl n c0 c1)) H0 -(CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead -x0 (Bind Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u0) -(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr -\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat -_) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d -(Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (pc3 c0 -(lift (S n) O u0) t2) H9))))))))) H4)) (\lambda (H4: (ex3_3 C T T (\lambda -(_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) -(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind -Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 -t0)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda -(_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda -(x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O -x1) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: -(ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda -(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d -(Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (f_equal -C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) -\Rightarrow c1])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) -(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in -((let H10 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abst) u0) -(CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead -x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def -(eq_ind_r T x1 (\lambda (t0: T).(getl n c0 (CHead x0 (Bind Abst) t0))) H8 u0 -H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t0: T).(ty3 g x0 t0 x2)) H7 u0 -H10) in (let H14 \def (eq_ind_r T x1 (\lambda (t0: T).(pc3 c0 (lift (S n) O -t0) t2)) H5 u0 H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c1: C).(getl n -c0 (CHead c1 (Bind Abst) u0))) H12 d H11) in (let H16 \def (eq_ind_r C x0 -(\lambda (c1: C).(ty3 g c1 u0 x2)) H13 d H11) in H14))))))) H9))))))))) H4)) -(ty3_gen_lref g c0 t2 n H3)))))))))))) (\lambda (c0: C).(\lambda (u0: -T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u0 t)).(\lambda (_: ((\forall (t2: -T).((ty3 g c0 u0 t2) \to (pc3 c0 t t2))))).(\lambda (b: B).(\lambda (t0: -T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t0 -t2)).(\lambda (H3: ((\forall (t3: T).((ty3 g (CHead c0 (Bind b) u0) t0 t3) -\to (pc3 (CHead c0 (Bind b) u0) t2 t3))))).(\lambda (t3: T).(\lambda (H4: -(ty3 g c0 (THead (Bind b) u0 t0) t3)).(ex3_2_ind T T (\lambda (t4: -T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u0 t4) t3))) (\lambda (_: -T).(\lambda (t5: T).(ty3 g c0 u0 t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 -g (CHead c0 (Bind b) u0) t0 t4))) (pc3 c0 (THead (Bind b) u0 t2) t3) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H5: (pc3 c0 (THead (Bind b) u0 x0) -t3)).(\lambda (_: (ty3 g c0 u0 x1)).(\lambda (H7: (ty3 g (CHead c0 (Bind b) -u0) t0 x0)).(pc3_t (THead (Bind b) u0 x0) c0 (THead (Bind b) u0 t2) -(pc3_head_2 c0 u0 t2 x0 (Bind b) (H3 x0 H7)) t3 H5)))))) (ty3_gen_bind g b c0 -u0 t0 t3 H4)))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: -T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((ty3 g c0 w -t2) \to (pc3 c0 u0 t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 -g c0 v (THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((ty3 g c0 -v t2) \to (pc3 c0 (THead (Bind Abst) u0 t) t2))))).(\lambda (t2: T).(\lambda -(H4: (ty3 g c0 (THead (Flat Appl) w v) t2)).(ex3_2_ind T T (\lambda (u1: -T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u1 t0)) -t2))) (\lambda (u1: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u1 -t0)))) (\lambda (u1: T).(\lambda (_: T).(ty3 g c0 w u1))) (pc3 c0 (THead -(Flat Appl) w (THead (Bind Abst) u0 t)) t2) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H5: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) -t2)).(\lambda (H6: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 -g c0 w x0)).(pc3_t (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) c0 (THead -(Flat Appl) w (THead (Bind Abst) u0 t)) (pc3_thin_dx c0 (THead (Bind Abst) u0 -t) (THead (Bind Abst) x0 x1) (H3 (THead (Bind Abst) x0 x1) H6) w Appl) t2 -H5)))))) (ty3_gen_appl g c0 w v t2 H4))))))))))))) (\lambda (c0: C).(\lambda -(t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: -((\forall (t3: T).((ty3 g c0 t0 t3) \to (pc3 c0 t2 t3))))).(\lambda (t3: -T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (H3: ((\forall (t4: T).((ty3 g c0 -t2 t4) \to (pc3 c0 t3 t4))))).(\lambda (t4: T).(\lambda (H4: (ty3 g c0 (THead -(Flat Cast) t2 t0) t4)).(ex3_ind T (\lambda (t5: T).(pc3 c0 (THead (Flat -Cast) t5 t2) t4)) (\lambda (_: T).(ty3 g c0 t0 t2)) (\lambda (t5: T).(ty3 g -c0 t2 t5)) (pc3 c0 (THead (Flat Cast) t3 t2) t4) (\lambda (x0: T).(\lambda -(H5: (pc3 c0 (THead (Flat Cast) x0 t2) t4)).(\lambda (_: (ty3 g c0 t0 -t2)).(\lambda (H7: (ty3 g c0 t2 x0)).(pc3_t (THead (Flat Cast) x0 t2) c0 -(THead (Flat Cast) t3 t2) (pc3_head_1 c0 t3 x0 (H3 x0 H7) (Flat Cast) t2) t4 -H5))))) (ty3_gen_cast g c0 t0 t2 t4 H4)))))))))))) c u t1 H))))). - -lemma ty3_gen_abst_abst: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall -(t2: T).((ty3 g c (THead (Bind Abst) u t1) (THead (Bind Abst) u t2)) \to (ex2 -T (\lambda (w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) -u) t1 t2)))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (H: (ty3 g c (THead (Bind Abst) u t1) (THead (Bind Abst) u -t2))).(ex_ind T (\lambda (t: T).(ty3 g c (THead (Bind Abst) u t2) t)) (ex2 T -(\lambda (w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) -t1 t2))) (\lambda (x: T).(\lambda (H0: (ty3 g c (THead (Bind Abst) u t2) -x)).(ex3_2_ind T T (\lambda (t3: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) -u t3) x))) (\lambda (_: T).(\lambda (t: T).(ty3 g c u t))) (\lambda (t3: -T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t2 t3))) (ex2 T (\lambda -(w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t1 t2))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c (THead (Bind Abst) u -x0) x)).(\lambda (_: (ty3 g c u x1)).(\lambda (H3: (ty3 g (CHead c (Bind -Abst) u) t2 x0)).(ex3_2_ind T T (\lambda (t3: T).(\lambda (_: T).(pc3 c -(THead (Bind Abst) u t3) (THead (Bind Abst) u t2)))) (\lambda (_: T).(\lambda -(t: T).(ty3 g c u t))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c (Bind -Abst) u) t1 t3))) (ex2 T (\lambda (w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 -g (CHead c (Bind Abst) u) t1 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda -(H4: (pc3 c (THead (Bind Abst) u x2) (THead (Bind Abst) u t2))).(\lambda (H5: -(ty3 g c u x3)).(\lambda (H6: (ty3 g (CHead c (Bind Abst) u) t1 x2)).(let H_y -\def (pc3_gen_abst_shift c u x2 t2 H4) in (ex_intro2 T (\lambda (w: T).(ty3 g -c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t1 t2)) x3 H5 -(ty3_conv g (CHead c (Bind Abst) u) t2 x0 H3 t1 x2 H6 H_y)))))))) -(ty3_gen_bind g Abst c u t1 (THead (Bind Abst) u t2) H))))))) (ty3_gen_bind g -Abst c u t2 x H0)))) (ty3_correct g c (THead (Bind Abst) u t1) (THead (Bind -Abst) u t2) H))))))). - -lemma ty3_typecheck: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (v: T).((ty3 g c t -v) \to (ex T (\lambda (u: T).(ty3 g c (THead (Flat Cast) v t) u))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (v: T).(\lambda (H: -(ty3 g c t v)).(ex_ind T (\lambda (t0: T).(ty3 g c v t0)) (ex T (\lambda (u: -T).(ty3 g c (THead (Flat Cast) v t) u))) (\lambda (x: T).(\lambda (H0: (ty3 g -c v x)).(ex_intro T (\lambda (u: T).(ty3 g c (THead (Flat Cast) v t) u)) -(THead (Flat Cast) x v) (ty3_cast g c t v H x H0)))) (ty3_correct g c t v -H)))))). - -lemma ty3_getl_subst0: - \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t -u) \to (\forall (v0: T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 t -t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c (CHead d -(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: -(ty3 g c t u)).(ty3_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: -T).(\forall (v0: T).(\forall (t2: T).(\forall (i: nat).((subst0 i v0 t0 t2) -\to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d -(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda -(c0: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 -t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: -nat).((subst0 i v0 t2 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (u0: T).(\lambda (t1: T).(\lambda (_: (ty3 g c0 u0 -t1)).(\lambda (H3: ((\forall (v0: T).(\forall (t3: T).(\forall (i: -nat).((subst0 i v0 u0 t3) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (_: (pc3 c0 t1 t2)).(\lambda (v0: T).(\lambda (t3: -T).(\lambda (i: nat).(\lambda (H5: (subst0 i v0 u0 t3)).(\lambda (b: -B).(\lambda (d: C).(\lambda (v: T).(\lambda (H6: (getl i c0 (CHead d (Bind b) -v))).(H3 v0 t3 i H5 b d v H6))))))))))))))))))) (\lambda (c0: C).(\lambda (m: -nat).(\lambda (v0: T).(\lambda (t0: T).(\lambda (i: nat).(\lambda (H0: -(subst0 i v0 (TSort m) t0)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: -T).(\lambda (_: (getl i c0 (CHead d (Bind b) v))).(subst0_gen_sort v0 t0 i m -H0 (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda (n: -nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n -c0 (CHead d (Bind Abbr) u0))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u0 -t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: -nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v: -T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v -w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda -(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda -(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(land_ind (eq nat n -i) (eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) -(\lambda (H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 -\def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) -H4 n H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: -C).(getl n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind -Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in (let H9 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) -\Rightarrow c1])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v) (getl_mono -c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in ((let H10 \def -(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | -(CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v) -(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in -((let H11 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2])) (CHead d (Bind Abbr) u0) -(CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 -(Bind b) v) H7)) in (\lambda (H12: (eq B Abbr b)).(\lambda (H13: (eq C d -d0)).(let H14 \def (eq_ind_r T v (\lambda (t2: T).(getl n c0 (CHead d0 (Bind -b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda (t2: T).(ex T (\lambda (w: -T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0 (\lambda (c1: C).(getl n -c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C d (\lambda (c1: C).(ex T -(\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def (eq_ind_r B b (\lambda (b0: -B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abbr H12) in (ex_intro T (\lambda -(w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v H11))))) H10)) H9)))))) -(subst0_gen_lref v0 t1 i n H3)))))))))))))))))) (\lambda (n: nat).(\lambda -(c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d -(Bind Abst) u0))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u0 t0)).(\lambda -(_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: nat).((subst0 i v0 u0 t1) -\to (\forall (b: B).(\forall (d0: C).(\forall (v: T).((getl i d (CHead d0 -(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v w))))))))))))).(\lambda -(v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (H3: (subst0 i v0 (TLRef -n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda (v: T).(\lambda (H4: (getl -i c0 (CHead d0 (Bind b) v))).(land_ind (eq nat n i) (eq T t1 (lift (S n) O -v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda (H5: (eq nat n -i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def (eq_ind_r nat i -(\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n H5) in (let H8 -\def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c1: C).(getl n c0 c1)) H0 -(CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 -(Bind b) v) H7)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind -Abst) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 -(CHead d0 (Bind b) v) H7)) in ((let H10 \def (f_equal C B (\lambda (e: -C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow -(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) -(CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind -Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in ((let H11 \def (f_equal C T -(\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) -\Rightarrow t2])) (CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) (getl_mono -c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: -(eq B Abst b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v -(\lambda (t2: T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T -u0 (\lambda (t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def -(eq_ind_r C d0 (\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d -H13) in (eq_ind C d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) -(let H16 \def (eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) -u0))) H15 Abst H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 -H13)) v H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n -H3)))))))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t0: -T).(\lambda (_: (ty3 g c0 u0 t0)).(\lambda (H1: ((\forall (v0: T).(\forall -(t1: T).(\forall (i: nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall -(d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda -(w: T).(ty3 g d v w))))))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t1 t2)).(\lambda (H3: -((\forall (v0: T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t1 t3) \to -(\forall (b0: B).(\forall (d: C).(\forall (v: T).((getl i (CHead c0 (Bind b) -u0) (CHead d (Bind b0) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (v0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda -(H4: (subst0 i v0 (THead (Bind b) u0 t1) t3)).(\lambda (b0: B).(\lambda (d: -C).(\lambda (v: T).(\lambda (H5: (getl i c0 (CHead d (Bind b0) v))).(or3_ind -(ex2 T (\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: -T).(subst0 i v0 u0 u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Bind b) u0 -t4))) (\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: -T).(subst0 (s (Bind b) i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) -(\lambda (H6: (ex2 T (\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) -(\lambda (u2: T).(subst0 i v0 u0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 -(THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i v0 u0 u2)) (ex T (\lambda -(w: T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b) -x t1))).(\lambda (H8: (subst0 i v0 u0 x)).(H1 v0 x i H8 b0 d v H5)))) H6)) -(\lambda (H6: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) -(\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4)))).(ex2_ind T (\lambda (t4: -T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4: T).(subst0 (s (Bind b) i) -v0 t1 t4)) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: -(eq T t3 (THead (Bind b) u0 x))).(\lambda (H8: (subst0 (s (Bind b) i) v0 t1 -x)).(H3 v0 x (S i) H8 b0 d v (getl_head (Bind b) i c0 (CHead d (Bind b0) v) -H5 u0))))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: -T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Bind b) -i) v0 t1 t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 -(THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 u0 -u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex -T (\lambda (w: T).(ty3 g d v w))) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(_: (eq T t3 (THead (Bind b) x0 x1))).(\lambda (H8: (subst0 i v0 u0 -x0)).(\lambda (_: (subst0 (s (Bind b) i) v0 t1 x1)).(H1 v0 x0 i H8 b0 d v -H5)))))) H6)) (subst0_gen_head (Bind b) v0 u0 t1 t3 i H4)))))))))))))))))))) -(\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w -u0)).(\lambda (H1: ((\forall (v0: T).(\forall (t0: T).(\forall (i: -nat).((subst0 i v0 w t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w0: T).(ty3 g d v -w0))))))))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 v -(THead (Bind Abst) u0 t0))).(\lambda (H3: ((\forall (v0: T).(\forall (t1: -T).(\forall (i: nat).((subst0 i v0 v t1) \to (\forall (b: B).(\forall (d: -C).(\forall (v1: T).((getl i c0 (CHead d (Bind b) v1)) \to (ex T (\lambda -(w0: T).(ty3 g d v1 w0))))))))))))).(\lambda (v0: T).(\lambda (t1: -T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat Appl) w v) -t1)).(\lambda (b: B).(\lambda (d: C).(\lambda (v1: T).(\lambda (H5: (getl i -c0 (CHead d (Bind b) v1))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t1 (THead -(Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w u2))) (ex2 T (\lambda -(t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat -Appl) i) v0 v t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t1 -(THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w -u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2)))) -(ex T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (H6: (ex2 T (\lambda (u2: -T).(eq T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w -u2)))).(ex2_ind T (\lambda (u2: T).(eq T t1 (THead (Flat Appl) u2 v))) -(\lambda (u2: T).(subst0 i v0 w u2)) (ex T (\lambda (w0: T).(ty3 g d v1 w0))) -(\lambda (x: T).(\lambda (_: (eq T t1 (THead (Flat Appl) x v))).(\lambda (H8: -(subst0 i v0 w x)).(H1 v0 x i H8 b d v1 H5)))) H6)) (\lambda (H6: (ex2 T -(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 -(s (Flat Appl) i) v0 v t2)))).(ex2_ind T (\lambda (t2: T).(eq T t1 (THead -(Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2)) (ex -T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (x: T).(\lambda (_: (eq T t1 -(THead (Flat Appl) w x))).(\lambda (H8: (subst0 (s (Flat Appl) i) v0 v -x)).(H3 v0 x (s (Flat Appl) i) H8 b d v1 H5)))) H6)) (\lambda (H6: (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))) (ex T (\lambda (w0: -T).(ty3 g d v1 w0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t1 -(THead (Flat Appl) x0 x1))).(\lambda (_: (subst0 i v0 w x0)).(\lambda (H9: -(subst0 (s (Flat Appl) i) v0 v x1)).(H3 v0 x1 (s (Flat Appl) i) H9 b d v1 -H5)))))) H6)) (subst0_gen_head (Flat Appl) v0 w v t1 i H4))))))))))))))))))) -(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 -t2)).(\lambda (H1: ((\forall (v0: T).(\forall (t0: T).(\forall (i: -nat).((subst0 i v0 t1 t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: -T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v -w))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (H3: -((\forall (v0: T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t2 t3) \to -(\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) -v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda (v0: -T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat -Cast) t2 t1) t3)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: T).(\lambda -(H5: (getl i c0 (CHead d (Bind b) v))).(or3_ind (ex2 T (\lambda (u2: T).(eq T -t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2))) (ex2 T -(\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: -T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t4: T).(eq T t3 (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i v0 t2 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat -Cast) i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6: -(ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: -T).(subst0 i v0 t2 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat -Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2)) (ex T (\lambda (w: -T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Flat Cast) x -t1))).(\lambda (H8: (subst0 i v0 t2 x)).(H3 v0 x i H8 b d v H5)))) H6)) -(\lambda (H6: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) -(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4)))).(ex2_ind T (\lambda -(t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: T).(subst0 (s -(Flat Cast) i) v0 t1 t4)) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (x: -T).(\lambda (_: (eq T t3 (THead (Flat Cast) t2 x))).(\lambda (H8: (subst0 (s -(Flat Cast) i) v0 t1 x)).(H1 v0 x (s (Flat Cast) i) H8 b d v H5)))) H6)) -(\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) -(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 -t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead -(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) -(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex T -(\lambda (w: T).(ty3 g d v w))) (\lambda (x0: T).(\lambda (x1: T).(\lambda -(_: (eq T t3 (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i v0 t2 -x0)).(\lambda (_: (subst0 (s (Flat Cast) i) v0 t1 x1)).(H3 v0 x0 i H8 b d v -H5)))))) H6)) (subst0_gen_head (Flat Cast) v0 t2 t1 t3 i H4)))))))))))))))))) -c t u H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/sty0.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/sty0.ma deleted file mode 100644 index e590a65e0..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/sty0.ma +++ /dev/null @@ -1,230 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/pr3_props.ma". - -include "basic_1/sty0/fwd.ma". - -lemma ty3_sty0: - \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u -t1) \to (\forall (t2: T).((sty0 g c u t2) \to (ty3 g c u t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: -(ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (_: -T).(\forall (t2: T).((sty0 g c0 t t2) \to (ty3 g c0 t t2)))))) (\lambda (c0: -C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda -(_: ((\forall (t3: T).((sty0 g c0 t2 t3) \to (ty3 g c0 t2 t3))))).(\lambda -(u0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c0 u0 t3)).(\lambda (H3: -((\forall (t4: T).((sty0 g c0 u0 t4) \to (ty3 g c0 u0 t4))))).(\lambda (_: -(pc3 c0 t3 t2)).(\lambda (t0: T).(\lambda (H5: (sty0 g c0 u0 t0)).(H3 t0 -H5))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (t2: T).(\lambda -(H0: (sty0 g c0 (TSort m) t2)).(let H_y \def (sty0_gen_sort g c0 t2 m H0) in -(let H1 \def (f_equal T T (\lambda (e: T).e) t2 (TSort (next g m)) H_y) in -(eq_ind_r T (TSort (next g m)) (\lambda (t: T).(ty3 g c0 (TSort m) t)) -(ty3_sort g c0 m) t2 H1))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda -(d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) -u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall -(t2: T).((sty0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda -(H3: (sty0 g c0 (TLRef n) t2)).(let H_x \def (sty0_gen_lref g c0 t2 n H3) in -(let H4 \def H_x in (or_ind (ex3_3 C T T (\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: -C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0)))))) (ex3_3 C -T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g -e u1 t0)))) (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift -(S n) O u1)))))) (ty3 g c0 (TLRef n) t2) (\lambda (H5: (ex3_3 C T T (\lambda -(e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O -t0))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0))))) (ty3 g c0 (TLRef n) t2) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 -(CHead x0 (Bind Abbr) x1))).(\lambda (H7: (sty0 g x0 x1 x2)).(\lambda (H8: -(eq T t2 (lift (S n) O x2))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 -(lift (S n) O x2) H8) in (eq_ind_r T (lift (S n) O x2) (\lambda (t0: T).(ty3 -g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda -(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d -(Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H11 \def (f_equal -C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) -\Rightarrow c1])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) -(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in -((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u0) -(CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead -x0 (Bind Abbr) x1) H6)) in (\lambda (H13: (eq C d x0)).(let H14 \def -(eq_ind_r T x1 (\lambda (t0: T).(getl n c0 (CHead x0 (Bind Abbr) t0))) H10 u0 -H12) in (let H15 \def (eq_ind_r T x1 (\lambda (t0: T).(sty0 g x0 t0 x2)) H7 -u0 H12) in (let H16 \def (eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 -(Bind Abbr) u0))) H14 d H13) in (let H17 \def (eq_ind_r C x0 (\lambda (c1: -C).(sty0 g c1 u0 x2)) H15 d H13) in (ty3_abbr g n c0 d u0 H16 x2 (H2 x2 -H17)))))))) H11))) t2 H9)))))))) H5)) (\lambda (H5: (ex3_3 C T T (\lambda (e: -C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) -(\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) -(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift (S n) O -u1))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq T t2 (lift (S n) O u1))))) (ty3 g c0 (TLRef n) t2) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 -(CHead x0 (Bind Abst) x1))).(\lambda (_: (sty0 g x0 x1 x2)).(\lambda (H8: (eq -T t2 (lift (S n) O x1))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 -(lift (S n) O x1) H8) in (eq_ind_r T (lift (S n) O x1) (\lambda (t0: T).(ty3 -g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda -(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d -(Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H11 \def (eq_ind -C (CHead d (Bind Abbr) u0) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind -Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) -x1) H6)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O x1)) H11))) t2 -H9)))))))) H5)) H4))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda -(d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) -u0))).(\lambda (t: T).(\lambda (H1: (ty3 g d u0 t)).(\lambda (_: ((\forall -(t2: T).((sty0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda -(H3: (sty0 g c0 (TLRef n) t2)).(let H_x \def (sty0_gen_lref g c0 t2 n H3) in -(let H4 \def H_x in (or_ind (ex3_3 C T T (\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: -C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0)))))) (ex3_3 C -T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e -(Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g -e u1 t0)))) (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift -(S n) O u1)))))) (ty3 g c0 (TLRef n) t2) (\lambda (H5: (ex3_3 C T T (\lambda -(e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) -u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O -t0))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0))))) (ty3 g c0 (TLRef n) t2) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 -(CHead x0 (Bind Abbr) x1))).(\lambda (_: (sty0 g x0 x1 x2)).(\lambda (H8: (eq -T t2 (lift (S n) O x2))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 -(lift (S n) O x2) H8) in (eq_ind_r T (lift (S n) O x2) (\lambda (t0: T).(ty3 -g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda -(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d -(Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H11 \def (eq_ind -C (CHead d (Bind Abst) u0) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind -Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) -x1) H6)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O x2)) H11))) t2 -H9)))))))) H5)) (\lambda (H5: (ex3_3 C T T (\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: -C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift (S n) O -u1))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: -T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: -T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq T t2 (lift (S n) O u1))))) (ty3 g c0 (TLRef n) t2) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 -(CHead x0 (Bind Abst) x1))).(\lambda (H7: (sty0 g x0 x1 x2)).(\lambda (H8: -(eq T t2 (lift (S n) O x1))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 -(lift (S n) O x1) H8) in (eq_ind_r T (lift (S n) O x1) (\lambda (t0: T).(ty3 -g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda -(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d -(Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H11 \def (f_equal -C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) -\Rightarrow c1])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) -(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in -((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abst) u0) -(CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead -x0 (Bind Abst) x1) H6)) in (\lambda (H13: (eq C d x0)).(let H14 \def -(eq_ind_r T x1 (\lambda (t0: T).(getl n c0 (CHead x0 (Bind Abst) t0))) H10 u0 -H12) in (let H15 \def (eq_ind_r T x1 (\lambda (t0: T).(sty0 g x0 t0 x2)) H7 -u0 H12) in (eq_ind T u0 (\lambda (t0: T).(ty3 g c0 (TLRef n) (lift (S n) O -t0))) (let H16 \def (eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 -(Bind Abst) u0))) H14 d H13) in (let H17 \def (eq_ind_r C x0 (\lambda (c1: -C).(sty0 g c1 u0 x2)) H15 d H13) in (ty3_abst g n c0 d u0 H16 t H1))) x1 -H12))))) H11))) t2 H9)))))))) H5)) H4))))))))))))) (\lambda (c0: C).(\lambda -(u0: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u0 t)).(\lambda (_: ((\forall -(t2: T).((sty0 g c0 u0 t2) \to (ty3 g c0 u0 t2))))).(\lambda (b: B).(\lambda -(t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t2 -t3)).(\lambda (H3: ((\forall (t4: T).((sty0 g (CHead c0 (Bind b) u0) t2 t4) -\to (ty3 g (CHead c0 (Bind b) u0) t2 t4))))).(\lambda (t0: T).(\lambda (H4: -(sty0 g c0 (THead (Bind b) u0 t2) t0)).(let H_x \def (sty0_gen_bind g b c0 u0 -t2 t0 H4) in (let H5 \def H_x in (ex2_ind T (\lambda (t4: T).(sty0 g (CHead -c0 (Bind b) u0) t2 t4)) (\lambda (t4: T).(eq T t0 (THead (Bind b) u0 t4))) -(ty3 g c0 (THead (Bind b) u0 t2) t0) (\lambda (x: T).(\lambda (H6: (sty0 g -(CHead c0 (Bind b) u0) t2 x)).(\lambda (H7: (eq T t0 (THead (Bind b) u0 -x))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u0 x) -H7) in (eq_ind_r T (THead (Bind b) u0 x) (\lambda (t4: T).(ty3 g c0 (THead -(Bind b) u0 t2) t4)) (ty3_bind g c0 u0 t H0 b t2 x (H3 x H6)) t0 H8))))) -H5))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda -(H0: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((sty0 g c0 w t2) \to -(ty3 g c0 w t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v -(THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((sty0 g c0 v t2) -\to (ty3 g c0 v t2))))).(\lambda (t2: T).(\lambda (H4: (sty0 g c0 (THead -(Flat Appl) w v) t2)).(let H_x \def (sty0_gen_appl g c0 w v t2 H4) in (let H5 -\def H_x in (ex2_ind T (\lambda (t3: T).(sty0 g c0 v t3)) (\lambda (t3: -T).(eq T t2 (THead (Flat Appl) w t3))) (ty3 g c0 (THead (Flat Appl) w v) t2) -(\lambda (x: T).(\lambda (H6: (sty0 g c0 v x)).(\lambda (H7: (eq T t2 (THead -(Flat Appl) w x))).(let H8 \def (f_equal T T (\lambda (e: T).e) t2 (THead -(Flat Appl) w x) H7) in (eq_ind_r T (THead (Flat Appl) w x) (\lambda (t0: -T).(ty3 g c0 (THead (Flat Appl) w v) t0)) (let H_y \def (H3 x H6) in (let H9 -\def (ty3_unique g c0 v x H_y (THead (Bind Abst) u0 t) H2) in (ex_ind T -(\lambda (t0: T).(ty3 g c0 x t0)) (ty3 g c0 (THead (Flat Appl) w v) (THead -(Flat Appl) w x)) (\lambda (x0: T).(\lambda (H10: (ty3 g c0 x x0)).(ex_ind T -(\lambda (t0: T).(ty3 g c0 u0 t0)) (ty3 g c0 (THead (Flat Appl) w v) (THead -(Flat Appl) w x)) (\lambda (x1: T).(\lambda (_: (ty3 g c0 u0 x1)).(ex_ind T -(\lambda (t0: T).(ty3 g c0 (THead (Bind Abst) u0 t) t0)) (ty3 g c0 (THead -(Flat Appl) w v) (THead (Flat Appl) w x)) (\lambda (x2: T).(\lambda (H12: -(ty3 g c0 (THead (Bind Abst) u0 t) x2)).(ex3_2_ind T T (\lambda (t3: -T).(\lambda (_: T).(pc3 c0 (THead (Bind Abst) u0 t3) x2))) (\lambda (_: -T).(\lambda (t0: T).(ty3 g c0 u0 t0))) (\lambda (t3: T).(\lambda (_: T).(ty3 -g (CHead c0 (Bind Abst) u0) t t3))) (ty3 g c0 (THead (Flat Appl) w v) (THead -(Flat Appl) w x)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c0 -(THead (Bind Abst) u0 x3) x2)).(\lambda (H14: (ty3 g c0 u0 x4)).(\lambda -(H15: (ty3 g (CHead c0 (Bind Abst) u0) t x3)).(ty3_conv g c0 (THead (Flat -Appl) w x) (THead (Flat Appl) w (THead (Bind Abst) u0 x3)) (ty3_appl g c0 w -u0 H0 x x3 (ty3_sconv g c0 x x0 H10 (THead (Bind Abst) u0 t) (THead (Bind -Abst) u0 x3) (ty3_bind g c0 u0 x4 H14 Abst t x3 H15) H9)) (THead (Flat Appl) -w v) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (ty3_appl g c0 w u0 H0 v -t H2) (pc3_thin_dx c0 (THead (Bind Abst) u0 t) x (ty3_unique g c0 v (THead -(Bind Abst) u0 t) H2 x H_y) w Appl))))))) (ty3_gen_bind g Abst c0 u0 t x2 -H12)))) (ty3_correct g c0 v (THead (Bind Abst) u0 t) H2)))) (ty3_correct g c0 -w u0 H0)))) (ty3_correct g c0 v x H_y)))) t2 H8))))) H5)))))))))))))) -(\lambda (c0: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (ty3 g c0 t2 -t3)).(\lambda (H1: ((\forall (t4: T).((sty0 g c0 t2 t4) \to (ty3 g c0 t2 -t4))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t3 t0)).(\lambda (H3: -((\forall (t4: T).((sty0 g c0 t3 t4) \to (ty3 g c0 t3 t4))))).(\lambda (t4: -T).(\lambda (H4: (sty0 g c0 (THead (Flat Cast) t3 t2) t4)).(let H_x \def -(sty0_gen_cast g c0 t3 t2 t4 H4) in (let H5 \def H_x in (ex3_2_ind T T -(\lambda (v2: T).(\lambda (_: T).(sty0 g c0 t3 v2))) (\lambda (_: T).(\lambda -(t5: T).(sty0 g c0 t2 t5))) (\lambda (v2: T).(\lambda (t5: T).(eq T t4 (THead -(Flat Cast) v2 t5)))) (ty3 g c0 (THead (Flat Cast) t3 t2) t4) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H6: (sty0 g c0 t3 x0)).(\lambda (H7: (sty0 g c0 -t2 x1)).(\lambda (H8: (eq T t4 (THead (Flat Cast) x0 x1))).(let H9 \def -(f_equal T T (\lambda (e: T).e) t4 (THead (Flat Cast) x0 x1) H8) in (eq_ind_r -T (THead (Flat Cast) x0 x1) (\lambda (t: T).(ty3 g c0 (THead (Flat Cast) t3 -t2) t)) (let H_y \def (H1 x1 H7) in (let H_y0 \def (H3 x0 H6) in (let H10 -\def (ty3_unique g c0 t2 x1 H_y t3 H0) in (ex_ind T (\lambda (t: T).(ty3 g c0 -x0 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) x0 x1)) -(\lambda (x: T).(\lambda (H11: (ty3 g c0 x0 x)).(ex_ind T (\lambda (t: -T).(ty3 g c0 x1 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) x0 -x1)) (\lambda (x2: T).(\lambda (H12: (ty3 g c0 x1 x2)).(ty3_conv g c0 (THead -(Flat Cast) x0 x1) (THead (Flat Cast) x x0) (ty3_cast g c0 x1 x0 (ty3_sconv g -c0 x1 x2 H12 t3 x0 H_y0 H10) x H11) (THead (Flat Cast) t3 t2) (THead (Flat -Cast) x0 t3) (ty3_cast g c0 t2 t3 H0 x0 H_y0) (pc3_thin_dx c0 t3 x1 -(ty3_unique g c0 t2 t3 H0 x1 H_y) x0 Cast)))) (ty3_correct g c0 t2 x1 H_y)))) -(ty3_correct g c0 t3 x0 H_y0))))) t4 H9))))))) H5))))))))))))) c u t1 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/ty3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1/ty3/subst1.ma deleted file mode 100644 index 43a6d483c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/ty3/subst1.ma +++ /dev/null @@ -1,1095 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/props.ma". - -include "basic_1/pc3/subst1.ma". - -include "basic_1/getl/getl.ma". - -lemma ty3_gen_cabbr: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c -t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c -(CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c a0) \to -(\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d u t1 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u t2 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2)))))))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda -(t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead -e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: -C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: -T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: C).(\forall (u: -T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: -C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T -T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d u t (lift (S O) d y2)))) (\lambda -(y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (u: -T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: ((\forall (e: -C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) -\to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d -a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S -O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2)))))))))))))).(\lambda (H4: (pc3 c0 t4 t3)).(\lambda (e: C).(\lambda (u0: -T).(\lambda (d: nat).(\lambda (H5: (getl d c0 (CHead e (Bind Abbr) -u0))).(\lambda (a0: C).(\lambda (H6: (csubst1 d u0 c0 a0)).(\lambda (a: -C).(\lambda (H7: (drop (S O) d a0 a)).(let H8 \def (H3 e u0 d H5 a0 H6 a H7) -in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) -d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda -(_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: -T).(\lambda (H9: (subst1 d u0 u (lift (S O) d x0))).(\lambda (H10: (subst1 d -u0 t4 (lift (S O) d x1))).(\lambda (H11: (ty3 g a x0 x1)).(let H12 \def (H1 e -u0 d H5 a0 H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift -(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: -T).(\lambda (x3: T).(\lambda (H13: (subst1 d u0 t3 (lift (S O) d -x2))).(\lambda (_: (subst1 d u0 t (lift (S O) d x3))).(\lambda (H15: (ty3 g a -x2 x3)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u -(lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift -(S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 H9 -H13 (ty3_conv g a x2 x3 H15 x0 x1 H11 (pc3_gen_cabbr c0 t4 t3 H4 e u0 d H5 a0 -H6 a H7 x1 H10 x2 H13)))))))) H12))))))) H8)))))))))))))))))))) (\lambda (c0: -C).(\lambda (m: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (d: -nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: -C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) -d a0 a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (TSort -m) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u (TSort -(next g m)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2))) (TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: -T).(subst1 d u (TSort m) t)) (subst1_refl d u (TSort m)) (lift (S O) d (TSort -m)) (lift_sort m (S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: -T).(subst1 d u (TSort (next g m)) t)) (subst1_refl d u (TSort (next g m))) -(lift (S O) d (TSort (next g m))) (lift_sort (next g m) (S O) d)) (ty3_sort g -a m)))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda -(u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: -T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: -T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: -C).((csubst1 d0 u0 d a0) \to (\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: -C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e -(Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 -a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S -O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) -(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) -(\lambda (H6: (lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n0: -nat).(getl n0 (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0))) -(getl_conf_le d0 (CHead e (Bind Abbr) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 -(le_S_n n d0 (le_S_n (S n) (S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 -H6))))) (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda -(e2: C).(csubst1 (minus d0 n) u0 (CHead d (Bind Abbr) u) e2)) (\lambda (e2: -C).(getl n a0 e2)) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 -(TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 -u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: -T).(ty3 g a y1 y2)))) (\lambda (x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 -(CHead d (Bind Abbr) u) x)).(\lambda (H9: (getl n a0 x)).(let H10 \def -(eq_ind nat (minus d0 n) (\lambda (n0: nat).(csubst1 n0 u0 (CHead d (Bind -Abbr) u) x)) H8 (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (let H11 \def -(csubst1_gen_head (Bind Abbr) d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T -C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 (Bind Abbr) u2)))) -(\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda -(_: T).(\lambda (c2: C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift -(S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda -(x0: T).(\lambda (x1: C).(\lambda (H12: (eq C x (CHead x1 (Bind Abbr) -x0))).(\lambda (H13: (subst1 (minus d0 (S n)) u0 u x0)).(\lambda (H14: -(csubst1 (minus d0 (S n)) u0 d x1)).(let H15 \def (eq_ind C x (\lambda (c1: -C).(getl n a0 c1)) H9 (CHead x1 (Bind Abbr) x0) H12) in (let H16 \def (eq_ind -nat d0 (\lambda (n0: nat).(drop (S O) n0 a0 a)) H5 (S (plus n (minus d0 (S -n)))) (lt_plus_minus n d0 H6)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: -C).(eq T x0 (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: -C).(getl n a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: -C).(drop (S O) (minus d0 (S n)) x1 e0))) (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda -(y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: -C).(\lambda (H17: (eq T x0 (lift (S O) (minus d0 (S n)) x2))).(\lambda (H18: -(getl n a (CHead x3 (Bind Abbr) x2))).(\lambda (H19: (drop (S O) (minus d0 (S -n)) x1 x3)).(let H20 \def (eq_ind T x0 (\lambda (t0: T).(subst1 (minus d0 (S -n)) u0 u t0)) H13 (lift (S O) (minus d0 (S n)) x2) H17) in (let H21 \def (H2 -e u0 (minus d0 (S n)) (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) u -(minus d0 (S n)) H7) x1 H14 x3 H19) in (ex3_2_ind T T (\lambda (y1: -T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) -y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (minus d0 (S n)) u0 t (lift -(S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x3 y1 -y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) -(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S -n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H22: (subst1 (minus d0 (S -n)) u0 u (lift (S O) (minus d0 (S n)) x4))).(\lambda (H23: (subst1 (minus d0 -(S n)) u0 t (lift (S O) (minus d0 (S n)) x5))).(\lambda (H24: (ty3 g x3 x4 -x5)).(let H25 \def (eq_ind T x4 (\lambda (t0: T).(ty3 g x3 t0 x5)) H24 x2 -(subst1_confluence_lift u x4 u0 (minus d0 (S n)) H22 x2 H20)) in (eq_ind_r -nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (S -n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda -(y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) (lift (S O) -n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro -T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) -u0 (lift (S n) O t) (lift (S O) (plus (S n) (minus d0 (S n))) y2)))) (\lambda -(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x5) -(eq_ind_r T (TLRef n) (\lambda (t0: T).(subst1 d0 u0 (TLRef n) t0)) -(subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) -d0 H6)) (eq_ind_r T (lift (S n) O (lift (S O) (minus d0 (S n)) x5)) (\lambda -(t0: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) t0)) -(subst1_lift_ge t (lift (S O) (minus d0 (S n)) x5) u0 (minus d0 (S n)) (S n) -H23 O (le_O_n (minus d0 (S n)))) (lift (S O) (plus (S n) (minus d0 (S n))) -(lift (S n) O x5)) (lift_d x5 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus -d0 (S n))))) (ty3_abbr g n a x3 x2 H18 x5 H25)) d0 (le_plus_minus (S n) d0 -H6)) d0 (le_plus_minus_sym (S n) d0 H6)))))))) H21)))))))) (getl_drop_conf_lt -Abbr a0 x1 x0 n H15 a (S O) (minus d0 (S n)) H16))))))))) H11)))))) -(csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0)))) (\lambda -(H6: (eq nat n d0)).(let H7 \def (eq_ind_r nat d0 (\lambda (n0: nat).(drop (S -O) n0 a0 a)) H5 n H6) in (let H8 \def (eq_ind_r nat d0 (\lambda (n0: -nat).(csubst1 n0 u0 c0 a0)) H4 n H6) in (let H9 \def (eq_ind_r nat d0 -(\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Abbr) u0))) H3 n H6) in (eq_ind -nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 -n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C (CHead d -(Bind Abbr) u) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind Abbr) u0) -(getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in -(let H11 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) -\Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u) -(CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e -(Bind Abbr) u0) H9)) in ((let H12 \def (f_equal C T (\lambda (e0: C).(match -e0 with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d -(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) -n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H13: (eq C d e)).(let H14 -\def (eq_ind_r T u0 (\lambda (t0: T).(getl n c0 (CHead e (Bind Abbr) t0))) -H10 u H12) in (let H15 \def (eq_ind_r T u0 (\lambda (t0: T).(csubst1 n t0 c0 -a0)) H8 u H12) in (eq_ind T u (\lambda (t0: T).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 n t0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 n t0 (lift (S n) O t) (lift (S O) n y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (eq_ind_r -C e (\lambda (c1: C).(getl n c0 (CHead c1 (Bind Abbr) u))) H14 d H13) in -(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 n u (TLRef n) (lift -(S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n u (lift (S n) O t) -(lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) -(lift n O u) (lift n O t) (subst1_single n u (TLRef n) (lift (S O) n (lift n -O u)) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(subst0 n u -(TLRef n) t0)) (subst0_lref u n) (lift (S O) n (lift n O u)) (lift_free u n -(S O) O n (le_plus_r O n) (le_O_n n)))) (eq_ind_r T (lift (plus (S O) n) O t) -(\lambda (t0: T).(subst1 n u (lift (S n) O t) t0)) (subst1_refl n u (lift (S -n) O t)) (lift (S O) n (lift n O t)) (lift_free t n (S O) O n (le_plus_r O n) -(le_O_n n))) (ty3_lift g d u t H1 a O n (getl_conf_ge_drop Abbr a0 d u n -(csubst1_getl_ge n n (le_n n) c0 a0 u H15 (CHead d (Bind Abbr) u) H16) a -H7)))) u0 H12))))) H11))) d0 H6))))) (\lambda (H6: (lt d0 n)).(eq_ind_r nat -(S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda -(_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) -(minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda -(y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) -(S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 -d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) (lift -(S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O -t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) -(TLRef (minus n (S O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) -(S O))) (\lambda (t0: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) -t0)) (subst1_refl d0 u0 (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 -(TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus -d0 n H6))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(subst1 d0 -u0 (lift (S n) O t) t0)) (subst1_refl d0 u0 (lift (S n) O t)) (lift (S O) d0 -(lift n O t)) (lift_free t n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) -(plus O n) H6)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: -nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O t))) (ty3_abbr g (minus n (S -O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abbr) u) a0 (csubst1_getl_ge d0 -n (le_S_n d0 n (le_S_n (S d0) (S n) (le_S (S (S d0)) (S n) (le_n_S (S d0) n -H6)))) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) d0 H5 (eq_ind_r nat -(plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_sym d0 -(S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus -(S O) (minus n (S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n -(S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n -(le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (n: -nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n -c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u -t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl -d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d0 u0 d a0) \to -(\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda -(u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) -u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: -C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda -(y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) -d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H6: -(lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n0: nat).(getl n0 -(CHead d (Bind Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le d0 (CHead e -(Bind Abbr) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S_n (S n) -(S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 H6))))) (S (minus d0 (S n))) -(minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 n) u0 -(CHead d (Bind Abst) u) e2)) (\lambda (e2: C).(getl n a0 e2)) (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift -(S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda -(x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 (CHead d (Bind Abst) u) -x)).(\lambda (H9: (getl n a0 x)).(let H10 \def (eq_ind nat (minus d0 n) -(\lambda (n0: nat).(csubst1 n0 u0 (CHead d (Bind Abst) u) x)) H8 (S (minus d0 -(S n))) (minus_x_Sy d0 n H6)) in (let H11 \def (csubst1_gen_head (Bind Abst) -d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T C (\lambda (u2: T).(\lambda -(c2: C).(eq C x (CHead c2 (Bind Abst) u2)))) (\lambda (u2: T).(\lambda (_: -C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda (_: T).(\lambda (c2: -C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda -(y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: -C).(\lambda (H12: (eq C x (CHead x1 (Bind Abst) x0))).(\lambda (H13: (subst1 -(minus d0 (S n)) u0 u x0)).(\lambda (H14: (csubst1 (minus d0 (S n)) u0 d -x1)).(let H15 \def (eq_ind C x (\lambda (c1: C).(getl n a0 c1)) H9 (CHead x1 -(Bind Abst) x0) H12) in (let H16 \def (eq_ind nat d0 (\lambda (n0: nat).(drop -(S O) n0 a0 a)) H5 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H6)) in -(ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x0 (lift (S O) (minus d0 -(S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) x1 e0))) -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S -O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) -(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) -(\lambda (x2: T).(\lambda (x3: C).(\lambda (H17: (eq T x0 (lift (S O) (minus -d0 (S n)) x2))).(\lambda (H18: (getl n a (CHead x3 (Bind Abst) x2))).(\lambda -(H19: (drop (S O) (minus d0 (S n)) x1 x3)).(let H20 \def (eq_ind T x0 -(\lambda (t0: T).(subst1 (minus d0 (S n)) u0 u t0)) H13 (lift (S O) (minus d0 -(S n)) x2) H17) in (let H21 \def (H2 e u0 (minus d0 (S n)) (getl_gen_S (Bind -Abst) d (CHead e (Bind Abbr) u0) u (minus d0 (S n)) H7) x1 H14 x3 H19) in -(ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u -(lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 -(minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g x3 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda -(y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: -T).(\lambda (H22: (subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) -x4))).(\lambda (_: (subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) -x5))).(\lambda (H24: (ty3 g x3 x4 x5)).(let H25 \def (eq_ind T x4 (\lambda -(t0: T).(ty3 g x3 t0 x5)) H24 x2 (subst1_confluence_lift u x4 u0 (minus d0 (S -n)) H22 x2 H20)) in (eq_ind_r nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: -nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) -(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S -n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2))))) (eq_ind_r nat (plus (S n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) -u0 (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: -T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda -(y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) (lift (S O) -(plus (S n) (minus d0 (S n))) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g -a y1 y2))) (TLRef n) (lift (S n) O x2) (eq_ind_r T (TLRef n) (\lambda (t0: -T).(subst1 d0 u0 (TLRef n) t0)) (subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 -(TLRef n)) (lift_lref_lt n (S O) d0 H6)) (eq_ind_r T (lift (S n) O (lift (S -O) (minus d0 (S n)) x2)) (\lambda (t0: T).(subst1 (plus (minus d0 (S n)) (S -n)) u0 (lift (S n) O u) t0)) (subst1_lift_ge u (lift (S O) (minus d0 (S n)) -x2) u0 (minus d0 (S n)) (S n) H20 O (le_O_n (minus d0 (S n)))) (lift (S O) -(plus (S n) (minus d0 (S n))) (lift (S n) O x2)) (lift_d x2 (S O) (S n) -(minus d0 (S n)) O (le_O_n (minus d0 (S n))))) (ty3_abst g n a x3 x2 H18 x5 -H25)) d0 (le_plus_minus (S n) d0 H6)) d0 (le_plus_minus_sym (S n) d0 -H6)))))))) H21)))))))) (getl_drop_conf_lt Abst a0 x1 x0 n H15 a (S O) (minus -d0 (S n)) H16))))))))) H11)))))) (csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead -d (Bind Abst) u) H0)))) (\lambda (H6: (eq nat n d0)).(let H7 \def (eq_ind_r -nat d0 (\lambda (n0: nat).(drop (S O) n0 a0 a)) H5 n H6) in (let H8 \def -(eq_ind_r nat d0 (\lambda (n0: nat).(csubst1 n0 u0 c0 a0)) H4 n H6) in (let -H9 \def (eq_ind_r nat d0 (\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Abbr) -u0))) H3 n H6) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O u) (lift (S O) n0 y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C -(CHead d (Bind Abst) u) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind -Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) -H9)) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: -C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow -(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | -Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow -False])])) I (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n -H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 n u0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 n u0 (lift (S n) O u) (lift (S O) n y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H11))) d0 H6))))) -(\lambda (H6: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda -(n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef -n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 -(lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: -nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) -(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S -n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift -(S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) -(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus -(minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O u) -(eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(subst1 d0 -u0 (TLRef (plus (minus n (S O)) (S O))) t0)) (subst1_refl d0 u0 (TLRef (plus -(minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) -(lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H6))) (eq_ind_r T -(lift (plus (S O) n) O u) (\lambda (t0: T).(subst1 d0 u0 (lift (S n) O u) -t0)) (subst1_refl d0 u0 (lift (S n) O u)) (lift (S O) d0 (lift n O u)) -(lift_free u n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H6)) -(le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a -(TLRef (minus n (S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u -(getl_drop_conf_ge n (CHead d (Bind Abst) u) a0 (csubst1_getl_ge d0 n (le_S_n -d0 n (le_S_n (S d0) (S n) (le_S (S (S d0)) (S n) (le_n_S (S d0) n H6)))) c0 -a0 u0 H4 (CHead d (Bind Abst) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) -d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_sym d0 (S O)))) t -H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus (S O) (minus -n (S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) -(refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n -(le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (c0: -C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (H1: -((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e -(Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: -C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2)))))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: ((\forall -(e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) -(CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 (CHead c0 (Bind -b) u) a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda -(y1: T).(\lambda (_: T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda -(u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) -u0))).(\lambda (a0: C).(\lambda (H5: (csubst1 d u0 c0 a0)).(\lambda (a: -C).(\lambda (H6: (drop (S O) d a0 a)).(let H7 \def (H1 e u0 d H4 a0 H5 a H6) -in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) -d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S -O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u0 u (lift (S O) d -x0))).(\lambda (_: (subst1 d u0 t (lift (S O) d x1))).(\lambda (H10: (ty3 g a -x0 x1)).(let H11 \def (H3 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind -Abbr) u0) H4 u) (CHead a0 (Bind b) (lift (S O) d x0)) (csubst1_bind b d u0 u -(lift (S O) d x0) H8 c0 a0 H5) (CHead a (Bind b) x0) (drop_skip_bind (S O) d -a0 a H6 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (S -d) u0 t3 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (S -d) u0 t4 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g -(CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: -T).(\lambda (x3: T).(\lambda (H12: (subst1 (S d) u0 t3 (lift (S O) (S d) -x2))).(\lambda (H13: (subst1 (S d) u0 t4 (lift (S O) (S d) x3))).(\lambda -(H14: (ty3 g (CHead a (Bind b) x0) x2 x3)).(ex3_2_intro T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S -O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Bind -b) x0 x2) (THead (Bind b) x0 x3) (eq_ind_r T (THead (Bind b) (lift (S O) d -x0) (lift (S O) (S d) x2)) (\lambda (t0: T).(subst1 d u0 (THead (Bind b) u -t3) t0)) (subst1_head u0 u (lift (S O) d x0) d H8 (Bind b) t3 (lift (S O) (S -d) x2) H12) (lift (S O) d (THead (Bind b) x0 x2)) (lift_bind b x0 x2 (S O) -d)) (eq_ind_r T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) -(\lambda (t0: T).(subst1 d u0 (THead (Bind b) u t4) t0)) (subst1_head u0 u -(lift (S O) d x0) d H8 (Bind b) t4 (lift (S O) (S d) x3) H13) (lift (S O) d -(THead (Bind b) x0 x3)) (lift_bind b x0 x3 (S O) d)) (ty3_bind g a x0 x1 H10 -b x2 x3 H14))))))) H11))))))) H7)))))))))))))))))))) (\lambda (c0: -C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: -((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e -(Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: -C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u0 w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u0 u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2)))))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g -c0 v (THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: -T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: -C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 v (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind Abst) u t) (lift -(S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda -(H4: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H5: -(csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S O) d a0 a)).(let -H7 \def (H3 e u0 d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d u0 v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u -t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u0 v (lift (S O) d -x0))).(\lambda (H9: (subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d -x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (H1 e u0 d H4 a0 H5 a H6) -in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 w (lift (S O) -d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 u (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead -(Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (subst1 d u0 w -(lift (S O) d x2))).(\lambda (H13: (subst1 d u0 u (lift (S O) d -x3))).(\lambda (H14: (ty3 g a x2 x3)).(let H_x \def (subst1_gen_head (Bind -Abst) u0 u t (lift (S O) d x1) d H9) in (let H15 \def H_x in (ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (lift (S O) d x1) (THead (Bind Abst) -u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 d u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst1 (S d) u0 t t3))) (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead -(Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H16: (eq T (lift (S -O) d x1) (THead (Bind Abst) x4 x5))).(\lambda (H17: (subst1 d u0 u -x4)).(\lambda (H18: (subst1 (S d) u0 t x5)).(let H19 \def (sym_eq T (lift (S -O) d x1) (THead (Bind Abst) x4 x5) H16) in (ex3_2_ind T T (\lambda (y: -T).(\lambda (z: T).(eq T x1 (THead (Bind Abst) y z)))) (\lambda (y: -T).(\lambda (_: T).(eq T x4 (lift (S O) d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T x5 (lift (S O) (S d) z)))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u -t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) -(\lambda (x6: T).(\lambda (x7: T).(\lambda (H20: (eq T x1 (THead (Bind Abst) -x6 x7))).(\lambda (H21: (eq T x4 (lift (S O) d x6))).(\lambda (H22: (eq T x5 -(lift (S O) (S d) x7))).(let H23 \def (eq_ind T x5 (\lambda (t0: T).(subst1 -(S d) u0 t t0)) H18 (lift (S O) (S d) x7) H22) in (let H24 \def (eq_ind T x4 -(\lambda (t0: T).(subst1 d u0 u t0)) H17 (lift (S O) d x6) H21) in (let H25 -\def (eq_ind T x1 (\lambda (t0: T).(ty3 g a x0 t0)) H10 (THead (Bind Abst) x6 -x7) H20) in (let H26 \def (eq_ind T x6 (\lambda (t0: T).(ty3 g a x0 (THead -(Bind Abst) t0 x7))) H25 x3 (subst1_confluence_lift u x6 u0 d H24 x3 H13)) in -(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat -Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 -(THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda -(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x2 x0) (THead -(Flat Appl) x2 (THead (Bind Abst) x3 x7)) (eq_ind_r T (THead (Flat Appl) -(lift (S O) d x2) (lift (S O) d x0)) (\lambda (t0: T).(subst1 d u0 (THead -(Flat Appl) w v) t0)) (subst1_head u0 w (lift (S O) d x2) d H12 (Flat Appl) v -(lift (S O) d x0) H8) (lift (S O) d (THead (Flat Appl) x2 x0)) (lift_flat -Appl x2 x0 (S O) d)) (eq_ind_r T (THead (Flat Appl) (lift (S O) d x2) (lift -(S O) d (THead (Bind Abst) x3 x7))) (\lambda (t0: T).(subst1 d u0 (THead -(Flat Appl) w (THead (Bind Abst) u t)) t0)) (subst1_head u0 w (lift (S O) d -x2) d H12 (Flat Appl) (THead (Bind Abst) u t) (lift (S O) d (THead (Bind -Abst) x3 x7)) (eq_ind_r T (THead (Bind Abst) (lift (S O) d x3) (lift (S O) (S -d) x7)) (\lambda (t0: T).(subst1 (s (Flat Appl) d) u0 (THead (Bind Abst) u t) -t0)) (subst1_head u0 u (lift (S O) d x3) (s (Flat Appl) d) H13 (Bind Abst) t -(lift (S O) (S d) x7) H23) (lift (S O) d (THead (Bind Abst) x3 x7)) -(lift_bind Abst x3 x7 (S O) d))) (lift (S O) d (THead (Flat Appl) x2 (THead -(Bind Abst) x3 x7))) (lift_flat Appl x2 (THead (Bind Abst) x3 x7) (S O) d)) -(ty3_appl g a x2 x3 H14 x0 x7 H26))))))))))) (lift_gen_bind Abst x4 x5 x1 (S -O) d H19)))))))) H15)))))))) H11))))))) H7))))))))))))))))))) (\lambda (c0: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda -(H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e -(Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: -C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2)))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t4 -t0)).(\lambda (H3: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl -d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to -(\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: -nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: -C).(\lambda (H5: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S -O) d a0 a)).(let H7 \def (H3 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda -(y1: T).(\lambda (_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda -(_: T).(\lambda (y2: T).(subst1 d u (THead (Flat Cast) t0 t4) (lift (S O) d -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H8: (subst1 d u t4 (lift (S O) d x0))).(\lambda -(H9: (subst1 d u t0 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let -H11 \def (H1 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda -(_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead -(Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(subst1 d u (THead (Flat Cast) t0 t4) (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: -T).(\lambda (H12: (subst1 d u t3 (lift (S O) d x2))).(\lambda (H13: (subst1 d -u t4 (lift (S O) d x3))).(\lambda (H14: (ty3 g a x2 x3)).(let H15 \def -(eq_ind T x3 (\lambda (t: T).(ty3 g a x2 t)) H14 x0 (subst1_confluence_lift -t4 x3 u d H13 x0 H8)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: -T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(subst1 d u (THead (Flat Cast) t0 t4) (lift (S O) d -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) -x0 x2) (THead (Flat Cast) x1 x0) (eq_ind_r T (THead (Flat Cast) (lift (S O) d -x0) (lift (S O) d x2)) (\lambda (t: T).(subst1 d u (THead (Flat Cast) t4 t3) -t)) (subst1_head u t4 (lift (S O) d x0) d H8 (Flat Cast) t3 (lift (S O) d x2) -H12) (lift (S O) d (THead (Flat Cast) x0 x2)) (lift_flat Cast x0 x2 (S O) d)) -(eq_ind_r T (THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) (\lambda -(t: T).(subst1 d u (THead (Flat Cast) t0 t4) t)) (subst1_head u t0 (lift (S -O) d x1) d H9 (Flat Cast) t4 (lift (S O) d x0) H8) (lift (S O) d (THead (Flat -Cast) x1 x0)) (lift_flat Cast x1 x0 (S O) d)) (ty3_cast g a x2 x0 H15 x1 -H10)))))))) H11))))))) H7)))))))))))))))))) c t1 t2 H))))). - -lemma ty3_gen_cvoid: - \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c -t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c -(CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c a) \to (ex3_2 T -T (\lambda (y1: T).(\lambda (_: T).(eq T t1 (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t2 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2)))))))))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda -(t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead -e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2))))))))))))) (\lambda (c0: C).(\lambda (t3: -T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: -C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to -(\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t -(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2)))))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (H2: (ty3 g c0 u -t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl -d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (H4: (pc3 c0 t4 -t3)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H5: (getl d -c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H6: (drop (S O) d c0 -a)).(let H7 \def (H3 e u0 d H5 a H6) in (ex3_2_ind T T (\lambda (y1: -T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H8: (eq T u (lift (S O) d x0))).(\lambda (H9: -(eq T t4 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def -(eq_ind T t4 (\lambda (t0: T).(pc3 c0 t0 t3)) H4 (lift (S O) d x1) H9) in -(let H12 \def (eq_ind T t4 (\lambda (t0: T).(ty3 g c0 u t0)) H2 (lift (S O) d -x1) H9) in (let H13 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 (lift (S -O) d x1))) H12 (lift (S O) d x0) H8) in (eq_ind_r T (lift (S O) d x0) -(\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift -(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H1 e u0 -d H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift -(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: -(eq T t3 (lift (S O) d x2))).(\lambda (H16: (eq T t (lift (S O) d -x3))).(\lambda (H17: (ty3 g a x2 x3)).(let H18 \def (eq_ind T t (\lambda (t0: -T).(ty3 g c0 t3 t0)) H0 (lift (S O) d x3) H16) in (let H19 \def (eq_ind T t3 -(\lambda (t0: T).(ty3 g c0 t0 (lift (S O) d x3))) H18 (lift (S O) d x2) H15) -in (let H20 \def (eq_ind T t3 (\lambda (t0: T).(pc3 c0 (lift (S O) d x1) t0)) -H11 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda (t0: -T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift -(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T -(\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 (refl_equal T (lift -(S O) d x0)) (refl_equal T (lift (S O) d x2)) (ty3_conv g a x2 x3 H17 x0 x1 -H10 (pc3_gen_lift c0 x1 x2 (S O) d H20 a H6))) t3 H15))))))))) H14)) u -H8))))))))) H7)))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda -(e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e -(Bind Void) u))).(\lambda (a: C).(\lambda (_: (drop (S O) d c0 -a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TSort m) (lift -(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (TSort (next g m)) -(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) -(TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: T).(eq T -(TSort m) t)) (refl_equal T (TSort m)) (lift (S O) d (TSort m)) (lift_sort m -(S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(eq T (TSort (next g -m)) t)) (refl_equal T (TSort (next g m))) (lift (S O) d (TSort (next g m))) -(lift_sort (next g m) (S O) d)) (ty3_sort g a m)))))))))) (\lambda (n: -nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n -c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u -t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl -d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: -T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) -u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt -n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n0: nat).(getl n0 -(CHead d (Bind Abbr) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e -(Bind Void) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 (le_S_n n d0 (le_S_n (S n) -(S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 H5))))) (S (minus d0 (S n))) -(minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n0: nat).(drop -(S O) n0 c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in -(ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 -(S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abbr) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: -T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) -x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abbr) x0))).(\lambda (H10: -(drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: -T).(\forall (e0: C).(\forall (u1: T).(\forall (d1: nat).((getl d1 d (CHead e0 -(Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d1 d a0) \to (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d1 y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t (lift (S O) d1 y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a0 y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in -(let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) -(minus d0 (S n)) x0) H8) in (let H13 \def (H11 e u0 (minus d0 (S n)) -(getl_gen_S (Bind Abbr) d (CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 -H10) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) -(minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g x1 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: -T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: -(eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) -x2))).(\lambda (H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda -(H16: (ty3 g x1 x2 x3)).(let H17 \def (eq_ind T t (\lambda (t0: T).(ty3 g d -(lift (S O) (minus d0 (S n)) x0) t0)) H12 (lift (S O) (minus d0 (S n)) x3) -H15) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x3) (\lambda (t0: T).(ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t0) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H18 \def -(eq_ind_r T x2 (\lambda (t0: T).(ty3 g x1 t0 x3)) H16 x0 (lift_inj x0 x2 (S -O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S -n))) (lift (S n) O x3)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: -T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x3)) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T -(\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x3)) -(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) -(TLRef n) (lift (S n) O x3) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T -(TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) -(lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O -x3))) (ty3_abbr g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) -(le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x3)) -(lift_d x3 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))) t -H15))))))) H13))))))))) (getl_drop_conf_lt Abbr c0 d u n H0 a (S O) (minus d0 -(S n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 -(\lambda (n0: nat).(drop (S O) n0 c0 a)) H4 n H5) in (let H7 \def (eq_ind_r -nat d0 (\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Void) u0))) H3 n H5) in -(eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq -T (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: -T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) -(\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind Void) u0) (getl_mono c0 -(CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def -(eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind -Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) -H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef -n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O -t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) -H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S -O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T -(TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift -(S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus -(minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda -(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: -T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S -O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda -(t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef -(plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) -(lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T -(lift (plus (S O) n) O t) (\lambda (t0: T).(eq T (lift (S n) O t) t0)) -(refl_equal T (lift (S n) O t)) (lift (S O) d0 (lift n O t)) (lift_free t n -(S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) -(eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n -(S O))) (lift n0 O t))) (ty3_abbr g (minus n (S O)) a d u (getl_drop_conf_ge -n (CHead d (Bind Abbr) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) -(\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_sym d0 (S O)))) t H1) -n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n -(S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) -(refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n -(le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (n: -nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n -c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u -t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl -d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: -T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) -u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt -n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n0: nat).(getl n0 -(CHead d (Bind Abst) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e -(Bind Void) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S_n (S n) -(S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 H5))))) (S (minus d0 (S n))) -(minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n0: nat).(drop -(S O) n0 c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in -(ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 -(S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) -v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: -T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) -x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abst) x0))).(\lambda (H10: -(drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: -T).(\forall (e0: C).(\forall (u1: T).(\forall (d1: nat).((getl d1 d (CHead e0 -(Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d1 d a0) \to (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d1 y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t (lift (S O) d1 y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a0 y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in -(let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) -(minus d0 (S n)) x0) H8) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x0) -(\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) -(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O -t0) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2))))) (let H13 \def (H11 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abst) d -(CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 H10) in (ex3_2_ind T T -(\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (minus d0 (S n)) x0) (lift -(S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift -(S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x1 y1 -y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) -d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O (lift (S O) -(minus d0 (S n)) x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: -T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T -(lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) x2))).(\lambda -(H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda (H16: (ty3 g x1 x2 -x3)).(let H17 \def (eq_ind T t (\lambda (t0: T).(ty3 g d (lift (S O) (minus -d0 (S n)) x0) t0)) H12 (lift (S O) (minus d0 (S n)) x3) H15) in (let H18 \def -(eq_ind_r T x2 (\lambda (t0: T).(ty3 g x1 t0 x3)) H16 x0 (lift_inj x0 x2 (S -O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S -n))) (lift (S n) O x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: -T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x0)) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T -(\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x0)) -(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) -(TLRef n) (lift (S n) O x0) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T -(TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) -(lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O -x0))) (ty3_abst g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) -(le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x0)) -(lift_d x0 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))))))))) -H13)) u H8)))))))) (getl_drop_conf_lt Abst c0 d u n H0 a (S O) (minus d0 (S -n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 -(\lambda (n0: nat).(drop (S O) n0 c0 a)) H4 n H5) in (let H7 \def (eq_ind_r -nat d0 (\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Void) u0))) H3 n H5) in -(eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq -T (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: -T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abst) u) -(\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind Void) u0) (getl_mono c0 -(CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def -(eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee with [(CSort _) -\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) -\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | -Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind -Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) -H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef -n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O -u) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) -H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S -O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T -(TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift -(S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus -(minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda -(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: -T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S -O))) (lift n O u) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda -(t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef -(plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) -(lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T -(lift (plus (S O) n) O u) (\lambda (t0: T).(eq T (lift (S n) O u) t0)) -(refl_equal T (lift (S n) O u)) (lift (S O) d0 (lift n O u)) (lift_free u n -(S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) -(eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n -(S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u (getl_drop_conf_ge -n (CHead d (Bind Abst) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) -(\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_sym d0 (S O)))) t H1) -n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n -(S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) -(refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n -(le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (c0: -C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u t)).(\lambda -(H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e -(Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda -(t4: T).(\lambda (H2: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: -((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind -b) u) (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d (CHead c0 -(Bind b) u) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift -(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: -C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind -Void) u0))).(\lambda (a: C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def -(H1 e u0 d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T -u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) u t3) (lift (S O) d -y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) u t4) (lift (S -O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H7: (eq T u (lift (S O) d x0))).(\lambda -(H8: (eq T t (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def -(eq_ind T t (\lambda (t0: T).(ty3 g c0 u t0)) H0 (lift (S O) d x1) H8) in -(let H11 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 (lift (S O) d x1))) -H10 (lift (S O) d x0) H7) in (let H12 \def (eq_ind T u (\lambda (t0: -T).(\forall (e0: C).(\forall (u1: T).(\forall (d0: nat).((getl d0 (CHead c0 -(Bind b) t0) (CHead e0 (Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d0 -(CHead c0 (Bind b) t0) a0) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(eq T t3 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 -(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a0 y1 -y2))))))))))) H3 (lift (S O) d x0) H7) in (let H13 \def (eq_ind T u (\lambda -(t0: T).(ty3 g (CHead c0 (Bind b) t0) t3 t4)) H2 (lift (S O) d x0) H7) in -(eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (THead (Bind b) t0 t3) (lift (S O) d y1)))) (\lambda -(_: T).(\lambda (y2: T).(eq T (THead (Bind b) t0 t4) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H12 e u0 -(S d) (getl_head (Bind b) d c0 (CHead e (Bind Void) u0) H4 (lift (S O) d x0)) -(CHead a (Bind b) x0) (drop_skip_bind (S O) d c0 a H5 b x0)) in (ex3_2_ind T -T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) (S d) y1)))) (\lambda -(_: T).(\lambda (y2: T).(eq T t4 (lift (S O) (S d) y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda -(y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t3) (lift (S -O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S -O) d x0) t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S -O) (S d) x2))).(\lambda (H16: (eq T t4 (lift (S O) (S d) x3))).(\lambda (H17: -(ty3 g (CHead a (Bind b) x0) x2 x3)).(eq_ind_r T (lift (S O) (S d) x3) -(\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead -(Bind b) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda -(y2: T).(eq T (THead (Bind b) (lift (S O) d x0) t0) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r T (lift (S O) -(S d) x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T -(THead (Bind b) (lift (S O) d x0) t0) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) -x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind -b) (lift (S O) d x0) (lift (S O) (S d) x2)) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) -x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) -(THead (Bind b) x0 x2) (THead (Bind b) x0 x3) (sym_eq T (lift (S O) d (THead -(Bind b) x0 x2)) (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) -(lift_bind b x0 x2 (S O) d)) (sym_eq T (lift (S O) d (THead (Bind b) x0 x3)) -(THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift_bind b x0 x3 -(S O) d)) (ty3_bind g a x0 x1 H9 b x2 x3 H17)) t3 H15) t4 H16)))))) H14)) u -H7)))))))))) H6)))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda -(u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: ((\forall (e: C).(\forall -(u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall -(a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T u -(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2)))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v -(THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: -T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: -C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T -v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind -Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda -(H4: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H5: -(drop (S O) d c0 a)).(let H6 \def (H3 e u0 d H4 a H5) in (ex3_2_ind T T -(\lambda (y1: T).(\lambda (_: T).(eq T v (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (THead (Bind Abst) u t) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (THead (Flat Appl) w v) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind -Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T v (lift (S O) -d x0))).(\lambda (H8: (eq T (THead (Bind Abst) u t) (lift (S O) d -x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def (eq_ind T v (\lambda (t0: -T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H2 (lift (S O) d x0) H7) in -(eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (THead (Flat Appl) w t0) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind -Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a -y1 y2))))) (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x1 (THead -(Bind Abst) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift (S O) d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift (S O) (S d) z)))) (ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d -x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat -Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: -T).(\lambda (H11: (eq T x1 (THead (Bind Abst) x2 x3))).(\lambda (H12: (eq T u -(lift (S O) d x2))).(\lambda (H13: (eq T t (lift (S O) (S d) x3))).(let H14 -\def (eq_ind T x1 (\lambda (t0: T).(ty3 g a x0 t0)) H9 (THead (Bind Abst) x2 -x3) H11) in (eq_ind_r T (lift (S O) (S d) x3) (\lambda (t0: T).(ex3_2 T T -(\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d -x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat -Appl) w (THead (Bind Abst) u t0)) (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H15 \def (eq_ind T u (\lambda -(t0: T).(\forall (e0: C).(\forall (u1: T).(\forall (d0: nat).((getl d0 c0 -(CHead e0 (Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d0 c0 a0) \to -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d0 y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a0 y1 y2))))))))))) H1 (lift (S O) d x2) H12) in -(eq_ind_r T (lift (S O) d x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) -d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead -(Bind Abst) t0 (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (H15 e u0 d H4 a H5) in -(ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) -d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead -(Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: -T).(\lambda (x5: T).(\lambda (H17: (eq T w (lift (S O) d x4))).(\lambda (H18: -(eq T (lift (S O) d x2) (lift (S O) d x5))).(\lambda (H19: (ty3 g a x4 -x5)).(eq_ind_r T (lift (S O) d x4) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (lift (S O) d x0)) (lift (S O) -d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) t0 (THead -(Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H20 \def (eq_ind_r -T x5 (\lambda (t0: T).(ty3 g a x4 t0)) H19 x2 (lift_inj x2 x5 (S O) d H18)) -in (eq_ind T (lift (S O) d (THead (Bind Abst) x2 x3)) (\lambda (t0: T).(ex3_2 -T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) (lift (S O) d -x4) (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(eq T (THead (Flat Appl) (lift (S O) d x4) t0) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d -(THead (Flat Appl) x4 x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T t0 (lift (S O) d y1)))) (\lambda (_: T).(\lambda -(y2: T).(eq T (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d (THead (Bind -Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g -a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) -x2 x3))) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T -(lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: -T).(eq T (lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d (THead (Flat Appl) x4 -(THead (Bind Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x4 x0) (THead (Flat Appl) x4 -(THead (Bind Abst) x2 x3)) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 -x0))) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 -x3)))) (ty3_appl g a x4 x2 H20 x0 x3 H14)) (THead (Flat Appl) (lift (S O) d -x4) (lift (S O) d (THead (Bind Abst) x2 x3))) (lift_flat Appl x4 (THead (Bind -Abst) x2 x3) (S O) d)) (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d -x0)) (lift_flat Appl x4 x0 (S O) d)) (THead (Bind Abst) (lift (S O) d x2) -(lift (S O) (S d) x3)) (lift_bind Abst x2 x3 (S O) d))) w H17)))))) H16)) u -H12)) t H13))))))) (lift_gen_bind Abst u t x1 (S O) d H8)) v H7))))))) -H6))))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (H0: (ty3 g c0 t3 t4)).(\lambda (H1: ((\forall (e: C).(\forall -(u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall -(a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 -(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 -y2)))))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c0 t4 t0)).(\lambda (H3: -((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind -Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda -(y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda -(y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda -(d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Void) u))).(\lambda (a: -C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def (H3 e u d H4 a H5) in -(ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: -T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda -(_: T).(eq T (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (THead (Flat Cast) t0 t4) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: -T).(\lambda (x1: T).(\lambda (H7: (eq T t4 (lift (S O) d x0))).(\lambda (H8: -(eq T t0 (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def -(eq_ind T t0 (\lambda (t: T).(ty3 g c0 t4 t)) H2 (lift (S O) d x1) H8) in -(eq_ind_r T (lift (S O) d x1) (\lambda (t: T).(ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Cast) t t4) (lift (S O) d -y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H11 \def -(eq_ind T t4 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H10 (lift (S O) -d x0) H7) in (let H12 \def (eq_ind T t4 (\lambda (t: T).(\forall (e0: -C).(\forall (u0: T).(\forall (d0: nat).((getl d0 c0 (CHead e0 (Bind Void) -u0)) \to (\forall (a0: C).((drop (S O) d0 c0 a0) \to (ex3_2 T T (\lambda (y1: -T).(\lambda (_: T).(eq T t3 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda -(y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 -g a0 y1 y2))))))))))) H1 (lift (S O) d x0) H7) in (let H13 \def (eq_ind T t4 -(\lambda (t: T).(ty3 g c0 t3 t)) H0 (lift (S O) d x0) H7) in (eq_ind_r T -(lift (S O) d x0) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: -T).(eq T (THead (Flat Cast) t t3) (lift (S O) d y1)))) (\lambda (_: -T).(\lambda (y2: T).(eq T (THead (Flat Cast) (lift (S O) d x1) t) (lift (S O) -d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def -(H12 e u d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T -t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d -x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) -(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) (lift (S -O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T -(THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: -T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S O) d x2))).(\lambda -(H16: (eq T (lift (S O) d x0) (lift (S O) d x3))).(\lambda (H17: (ty3 g a x2 -x3)).(let H18 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t (lift (S O) d -x0))) H13 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda -(t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) -(lift (S O) d x0) t) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: -T).(eq T (THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) (lift (S O) -d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H19 \def -(eq_ind_r T x3 (\lambda (t: T).(ty3 g a x2 t)) H17 x0 (lift_inj x0 x3 (S O) d -H16)) in (eq_ind T (lift (S O) d (THead (Flat Cast) x0 x2)) (\lambda (t: -T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) -(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Cast) (lift (S O) d x1) -(lift (S O) d x0)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: -T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Cast) x1 x0)) -(\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) -d (THead (Flat Cast) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda -(y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g -a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S -O) d (THead (Flat Cast) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda -(y2: T).(eq T (lift (S O) d (THead (Flat Cast) x1 x0)) (lift (S O) d y2)))) -(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) x0 x2) -(THead (Flat Cast) x1 x0) (refl_equal T (lift (S O) d (THead (Flat Cast) x0 -x2))) (refl_equal T (lift (S O) d (THead (Flat Cast) x1 x0))) (ty3_cast g a -x2 x0 H19 x1 H9)) (THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) -(lift_flat Cast x1 x0 (S O) d)) (THead (Flat Cast) (lift (S O) d x0) (lift (S -O) d x2)) (lift_flat Cast x0 x2 (S O) d))) t3 H15))))))) H14)) t4 H7)))) t0 -H8))))))) H6)))))))))))))))) c t1 t2 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/wcpr0/defs.ma deleted file mode 100644 index feef3e87d..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/defs.ma +++ /dev/null @@ -1,26 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/pr0/defs.ma". - -include "basic_1/C/defs.ma". - -inductive wcpr0: C \to (C \to Prop) \def -| wcpr0_refl: \forall (c: C).(wcpr0 c c) -| wcpr0_comp: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall -(u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (k: K).(wcpr0 (CHead c1 k -u1) (CHead c2 k u2)))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/wcpr0/fwd.ma deleted file mode 100644 index 8d4ccb52e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/fwd.ma +++ /dev/null @@ -1,105 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/wcpr0/defs.ma". - -implied rec lemma wcpr0_ind (P: (C \to (C \to Prop))) (f: (\forall (c: C).(P -c c))) (f0: (\forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to ((P c1 c2) -\to (\forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (k: K).(P -(CHead c1 k u1) (CHead c2 k u2))))))))))) (c: C) (c0: C) (w: wcpr0 c c0) on -w: P c c0 \def match w with [(wcpr0_refl c1) \Rightarrow (f c1) | (wcpr0_comp -c1 c2 w0 u1 u2 p k) \Rightarrow (f0 c1 c2 w0 ((wcpr0_ind P f f0) c1 c2 w0) u1 -u2 p k)]. - -lemma wcpr0_gen_sort: - \forall (x: C).(\forall (n: nat).((wcpr0 (CSort n) x) \to (eq C x (CSort -n)))) -\def - \lambda (x: C).(\lambda (n: nat).(\lambda (H: (wcpr0 (CSort n) -x)).(insert_eq C (CSort n) (\lambda (c: C).(wcpr0 c x)) (\lambda (c: C).(eq C -x c)) (\lambda (y: C).(\lambda (H0: (wcpr0 y x)).(wcpr0_ind (\lambda (c: -C).(\lambda (c0: C).((eq C c (CSort n)) \to (eq C c0 c)))) (\lambda (c: -C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: -C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(eq C c0 c0)) -(refl_equal C (CSort n)) c H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda -(_: (wcpr0 c1 c2)).(\lambda (_: (((eq C c1 (CSort n)) \to (eq C c2 -c1)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda -(k: K).(\lambda (H4: (eq C (CHead c1 k u1) (CSort n))).(let H5 \def (eq_ind C -(CHead c1 k u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False -| (CHead _ _ _) \Rightarrow True])) I (CSort n) H4) in (False_ind (eq C -(CHead c2 k u2) (CHead c1 k u1)) H5))))))))))) y x H0))) H))). - -lemma wcpr0_gen_head: - \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).((wcpr0 -(CHead c1 k u1) x) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: -C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: -T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))) -\def - \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda -(H: (wcpr0 (CHead c1 k u1) x)).(insert_eq C (CHead c1 k u1) (\lambda (c: -C).(wcpr0 c x)) (\lambda (c: C).(or (eq C x c) (ex3_2 C T (\lambda (c2: -C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: -T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))) (\lambda -(y: C).(\lambda (H0: (wcpr0 y x)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: -C).((eq C c (CHead c1 k u1)) \to (or (eq C c0 c) (ex3_2 C T (\lambda (c2: -C).(\lambda (u2: T).(eq C c0 (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: -T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))))) -(\lambda (c: C).(\lambda (H1: (eq C c (CHead c1 k u1))).(let H2 \def (f_equal -C C (\lambda (e: C).e) c (CHead c1 k u1) H1) in (eq_ind_r C (CHead c1 k u1) -(\lambda (c0: C).(or (eq C c0 c0) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: -T).(eq C c0 (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 -c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))) (or_introl (eq C -(CHead c1 k u1) (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: -T).(eq C (CHead c1 k u1) (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: -T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))) -(refl_equal C (CHead c1 k u1))) c H2)))) (\lambda (c0: C).(\lambda (c2: -C).(\lambda (H1: (wcpr0 c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 k u1)) \to -(or (eq C c2 c0) (ex3_2 C T (\lambda (c3: C).(\lambda (u2: T).(eq C c2 (CHead -c3 k u2)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u1 u2)))))))).(\lambda (u0: T).(\lambda (u2: -T).(\lambda (H3: (pr0 u0 u2)).(\lambda (k0: K).(\lambda (H4: (eq C (CHead c0 -k0 u0) (CHead c1 k u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 -u0) (CHead c1 k u1) H4) in ((let H6 \def (f_equal C K (\lambda (e: C).(match -e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 -k0 u0) (CHead c1 k u1) H4) in ((let H7 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) -(CHead c0 k0 u0) (CHead c1 k u1) H4) in (\lambda (H8: (eq K k0 k)).(\lambda -(H9: (eq C c0 c1)).(eq_ind_r K k (\lambda (k1: K).(or (eq C (CHead c2 k1 u2) -(CHead c0 k1 u0)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead -c2 k1 u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) -(\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))) (let H10 \def (eq_ind T u0 -(\lambda (t: T).(pr0 t u2)) H3 u1 H7) in (eq_ind_r T u1 (\lambda (t: T).(or -(eq C (CHead c2 k u2) (CHead c0 k t)) (ex3_2 C T (\lambda (c3: C).(\lambda -(u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda -(_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))) (let -H11 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 k u1)) \to (or (eq C -c2 c) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C c2 (CHead c3 k -u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u1 u3))))))) H2 c1 H9) in (let H12 \def (eq_ind C c0 -(\lambda (c: C).(wcpr0 c c2)) H1 c1 H9) in (eq_ind_r C c1 (\lambda (c: C).(or -(eq C (CHead c2 k u2) (CHead c k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda -(u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda -(_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))) -(or_intror (eq C (CHead c2 k u2) (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: -C).(\lambda (u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: -C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 -u3)))) (ex3_2_intro C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead c2 k -u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) -(\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c2 u2 (refl_equal C (CHead c2 -k u2)) H12 H10)) c0 H9))) u0 H7)) k0 H8)))) H6)) H5))))))))))) y x H0))) -H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/wcpr0/getl.ma deleted file mode 100644 index 2b43bb21a..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wcpr0/getl.ma +++ /dev/null @@ -1,448 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/wcpr0/fwd.ma". - -include "basic_1/getl/props.ma". - -lemma wcpr0_drop: - \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (h: -nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c1 (CHead -e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c2 -(CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda -(_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall -(u1: T).(\forall (k: K).((drop h O c (CHead e1 k u1)) \to (ex3_2 C T (\lambda -(e2: C).(\lambda (u2: T).(drop h O c0 (CHead e2 k u2)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 -u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda -(u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k -u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead -e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl -u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 -c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: -T).(\forall (k: K).((drop h O c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda -(e2: C).(\lambda (u2: T).(drop h O c4 (CHead e2 k u2)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 -u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 -u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall -(e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 k u1) (CHead -e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead -c4 k u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) -(\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: -C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c3 k u1) -(CHead e1 k0 u0))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 k u1) -(CHead e1 k0 u0) (drop_gen_refl (CHead c3 k u1) (CHead e1 k0 u0) H3)) in -((let H5 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) -\Rightarrow k | (CHead _ k1 _) \Rightarrow k1])) (CHead c3 k u1) (CHead e1 k0 -u0) (drop_gen_refl (CHead c3 k u1) (CHead e1 k0 u0) H3)) in ((let H6 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead -_ _ t) \Rightarrow t])) (CHead c3 k u1) (CHead e1 k0 u0) (drop_gen_refl -(CHead c3 k u1) (CHead e1 k0 u0) H3)) in (\lambda (H7: (eq K k k0)).(\lambda -(H8: (eq C c3 e1)).(eq_ind K k (\lambda (k1: K).(ex3_2 C T (\lambda (e2: -C).(\lambda (u3: T).(drop O O (CHead c4 k u2) (CHead e2 k1 u3)))) (\lambda -(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 -u0 u3))))) (eq_ind T u1 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda -(u3: T).(drop O O (CHead c4 k u2) (CHead e2 k u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 t -u3))))) (eq_ind C c3 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda -(u3: T).(drop O O (CHead c4 k u2) (CHead e2 k u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 c e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 -u3))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead -c4 k u2) (CHead e2 k u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c3 e2))) -(\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c4 u2 (drop_refl (CHead c4 k -u2)) H0 H2) e1 H8) u0 H6) k0 H7)))) H5)) H4)))))) (K_ind (\lambda (k0: -K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k1: -K).((drop n O (CHead c3 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(drop n O (CHead c4 k0 u2) (CHead e2 k1 u4)))) (\lambda -(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 -u3 u4))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop -(S n) O (CHead c3 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(drop (S n) O (CHead c4 k0 u2) (CHead e2 k1 u4)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u3 u4))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: -((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 -(Bind b) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: -T).(drop n O (CHead c4 (Bind b) u2) (CHead e2 k0 u4)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 -u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: -(drop (S n) O (CHead c3 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 -u0 k0 (drop_gen_drop (Bind b) c3 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T -(\lambda (e2: C).(\lambda (u3: T).(drop n O c4 (CHead e2 k0 u3)))) (\lambda -(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 -u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c4 -(Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 -e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H6: (drop n O c4 (CHead x0 k0 x1))).(\lambda -(H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: -C).(\lambda (u3: T).(drop (S n) O (CHead c4 (Bind b) u2) (CHead e2 k0 u3)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda -(u3: T).(pr0 u0 u3))) x0 x1 (drop_drop (Bind b) n c4 (CHead x0 k0 x1) H6 u2) -H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: -((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 -(Flat f) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: -T).(drop n O (CHead c4 (Flat f) u2) (CHead e2 k0 u4)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 -u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: -(drop (S n) O (CHead c3 (Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 (S -n) e1 u0 k0 (drop_gen_drop (Flat f) c3 (CHead e1 k0 u0) u1 n H4)) in -(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c4 (CHead e2 -k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(drop (S n) O (CHead c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 -u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (drop (S n) O c4 -(CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 -x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead -c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 -e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (drop_drop -(Flat f) n c4 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) k) h)))))))))) -c1 c2 H))). - -lemma wcpr0_drop_back: - \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (h: -nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c1 (CHead -e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c2 -(CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda -(_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall -(u1: T).(\forall (k: K).((drop h O c0 (CHead e1 k u1)) \to (ex3_2 C T -(\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda -(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 -u2 u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda -(u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k -u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead -e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl -u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 -c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: -T).(\forall (k: K).((drop h O c4 (CHead e1 k u1)) \to (ex3_2 C T (\lambda -(e2: C).(\lambda (u2: T).(drop h O c3 (CHead e2 k u2)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 -u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 -u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall -(e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c4 k u2) (CHead -e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead -c3 k u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) -(\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: -C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c4 k u2) -(CHead e1 k0 u0))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with -[(CSort _) \Rightarrow c4 | (CHead c _ _) \Rightarrow c])) (CHead c4 k u2) -(CHead e1 k0 u0) (drop_gen_refl (CHead c4 k u2) (CHead e1 k0 u0) H3)) in -((let H5 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) -\Rightarrow k | (CHead _ k1 _) \Rightarrow k1])) (CHead c4 k u2) (CHead e1 k0 -u0) (drop_gen_refl (CHead c4 k u2) (CHead e1 k0 u0) H3)) in ((let H6 \def -(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | (CHead -_ _ t) \Rightarrow t])) (CHead c4 k u2) (CHead e1 k0 u0) (drop_gen_refl -(CHead c4 k u2) (CHead e1 k0 u0) H3)) in (\lambda (H7: (eq K k k0)).(\lambda -(H8: (eq C c4 e1)).(eq_ind K k (\lambda (k1: K).(ex3_2 C T (\lambda (e2: -C).(\lambda (u3: T).(drop O O (CHead c3 k u1) (CHead e2 k1 u3)))) (\lambda -(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 -u3 u0))))) (eq_ind T u2 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda -(u3: T).(drop O O (CHead c3 k u1) (CHead e2 k u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -t))))) (eq_ind C c4 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(drop O O (CHead c3 k u1) (CHead e2 k u3)))) (\lambda (e2: C).(\lambda (_: -T).(wcpr0 e2 c))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))))) -(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u1) -(CHead e2 k u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c4))) (\lambda -(_: C).(\lambda (u3: T).(pr0 u3 u2))) c3 u1 (drop_refl (CHead c3 k u1)) H0 -H2) e1 H8) u0 H6) k0 H7)))) H5)) H4)))))) (K_ind (\lambda (k0: K).(\forall -(n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop n O -(CHead c4 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda -(u4: T).(drop n O (CHead c3 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 -u3))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop (S -n) O (CHead c4 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(drop (S n) O (CHead c3 k0 u1) (CHead e2 k1 u4)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u4 u3))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: -((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c4 -(Bind b) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: -T).(drop n O (CHead c3 (Bind b) u1) (CHead e2 k0 u4)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 -u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: -(drop (S n) O (CHead c4 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 -u0 k0 (drop_gen_drop (Bind b) c4 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T -(\lambda (e2: C).(\lambda (u3: T).(drop n O c3 (CHead e2 k0 u3)))) (\lambda -(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 -u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 -(Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 -e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H6: (drop n O c3 (CHead x0 k0 x1))).(\lambda -(H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: -C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Bind b) u1) (CHead e2 k0 u3)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda -(u3: T).(pr0 u3 u0))) x0 x1 (drop_drop (Bind b) n c3 (CHead x0 k0 x1) H6 u1) -H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: -((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c4 -(Flat f) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: -T).(drop n O (CHead c3 (Flat f) u1) (CHead e2 k0 u4)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 -u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: -(drop (S n) O (CHead c4 (Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 (S -n) e1 u0 k0 (drop_gen_drop (Flat f) c4 (CHead e1 k0 u0) u2 n H4)) in -(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c3 (CHead e2 -k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(drop (S n) O (CHead c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (drop (S n) O c3 -(CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 -u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead -c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 -e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (drop_drop -(Flat f) n c3 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) k) h)))))))))) -c2 c1 H))). - -lemma wcpr0_getl: - \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (h: -nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c1 (CHead e1 -k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c2 (CHead e2 -k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u1 u2))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall -(u1: T).(\forall (k: K).((getl h c (CHead e1 k u1)) \to (ex3_2 C T (\lambda -(e2: C).(\lambda (u2: T).(getl h c0 (CHead e2 k u2)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 -u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda -(u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k -u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 -k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl -u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 -c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: -T).(\forall (k: K).((getl h c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u2: T).(getl h c4 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda -(_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 -u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 -u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall -(e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c3 k u1) (CHead e1 -k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c4 k -u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) -(\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: -C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c3 k u1) -(CHead e1 k0 u0))).(K_ind (\lambda (k1: K).((clear (CHead c3 k1 u1) (CHead e1 -k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 k1 -u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) -(\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))))) (\lambda (b: B).(\lambda -(H4: (clear (CHead c3 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (f_equal C -C (\lambda (e: C).(match e with [(CSort _) \Rightarrow e1 | (CHead c _ _) -\Rightarrow c])) (CHead e1 k0 u0) (CHead c3 (Bind b) u1) (clear_gen_bind b c3 -(CHead e1 k0 u0) u1 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match -e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead e1 -k0 u0) (CHead c3 (Bind b) u1) (clear_gen_bind b c3 (CHead e1 k0 u0) u1 H4)) -in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c3 -(Bind b) u1) (clear_gen_bind b c3 (CHead e1 k0 u0) u1 H4)) in (\lambda (H8: -(eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c3)).(eq_ind_r K (Bind b) (\lambda -(k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind -b) u2) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) -(\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))))) (eq_ind_r T u1 (\lambda (t: -T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind b) -u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 -e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 t u3))))) (eq_ind_r C c3 (\lambda -(c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind -b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c -e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))) (ex3_2_intro C T -(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind b) u2) (CHead e2 -(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c3 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u1 u3))) c4 u2 (getl_refl b c4 u2) H0 H2) e1 H9) u0 -H7) k0 H8)))) H6)) H5)))) (\lambda (f: F).(\lambda (H4: (clear (CHead c3 -(Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c3 -(CHead e1 k0 u0) c3 (drop_refl c3) (clear_gen_flat f c3 (CHead e1 k0 u0) u1 -H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c4 (CHead -e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl O (CHead c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 -u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c4 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Flat f) u2) (CHead -e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_flat c4 (CHead x0 k0 x1) O H6 f -u2) H7 H8)))))) H5)))) k (getl_gen_O (CHead c3 k u1) (CHead e1 k0 u0) -H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: -C).(\forall (u3: T).(\forall (k1: K).((getl n (CHead c3 k0 u1) (CHead e1 k1 -u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c4 k0 -u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) -(\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) \to (\forall (e1: -C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c3 k0 u1) (CHead e1 -k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead -c4 k0 u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 -e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))))) (\lambda (b: -B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall -(k0: K).((getl n (CHead c3 (Bind b) u1) (CHead e1 k0 u3)) \to (ex3_2 C T -(\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c4 (Bind b) u2) (CHead e2 k0 -u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u4: T).(pr0 u3 u4)))))))))).(\lambda (e1: C).(\lambda (u0: -T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c3 (Bind b) u1) (CHead -e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c3 (CHead e1 k0 -u0) u1 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c4 -(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda -(_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda -(u3: T).(getl (S n) (CHead c4 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 -u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c4 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c4 (Bind b) u2) -(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda -(_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Bind b) n c4 (CHead -x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: -nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl -n (CHead c3 (Flat f) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(getl n (CHead c4 (Flat f) u2) (CHead e2 k0 u4)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u3 u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: -K).(\lambda (H4: (getl (S n) (CHead c3 (Flat f) u1) (CHead e1 k0 u0))).(let -H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c3 (CHead e1 k0 u0) u1 n H4)) -in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c4 (CHead e2 -k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl (S n) (CHead c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 -u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c4 (CHead -x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 -x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c4 -(Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 -e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Flat -f) n c4 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) k) h)))))))))) c1 c2 -H))). - -lemma wcpr0_getl_back: - \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (h: -nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c1 (CHead e1 -k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c2 (CHead e2 -k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u2 u1))))))))))) -\def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall -(u1: T).(\forall (k: K).((getl h c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda -(e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 -u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda -(u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k -u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 -k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl -u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 -c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: -T).(\forall (k: K).((getl h c4 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u2: T).(getl h c3 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda -(_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 -u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 -u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall -(e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c4 k u2) (CHead e1 -k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k -u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) -(\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: -C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c4 k u2) -(CHead e1 k0 u0))).(K_ind (\lambda (k1: K).((clear (CHead c4 k1 u2) (CHead e1 -k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 k1 -u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) -(\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))))) (\lambda (b: B).(\lambda -(H4: (clear (CHead c4 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (f_equal C -C (\lambda (e: C).(match e with [(CSort _) \Rightarrow e1 | (CHead c _ _) -\Rightarrow c])) (CHead e1 k0 u0) (CHead c4 (Bind b) u2) (clear_gen_bind b c4 -(CHead e1 k0 u0) u2 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match -e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead e1 -k0 u0) (CHead c4 (Bind b) u2) (clear_gen_bind b c4 (CHead e1 k0 u0) u2 H4)) -in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c4 -(Bind b) u2) (clear_gen_bind b c4 (CHead e1 k0 u0) u2 H4)) in (\lambda (H8: -(eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c4)).(eq_ind_r K (Bind b) (\lambda -(k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind -b) u1) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) -(\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))))) (eq_ind_r T u2 (\lambda (t: -T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) -u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 -e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 t))))) (eq_ind_r C c4 (\lambda -(c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind -b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 -c))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))))) (ex3_2_intro C T -(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u1) (CHead e2 -(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c4))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u2))) c3 u1 (getl_refl b c3 u1) H0 H2) e1 H9) u0 -H7) k0 H8)))) H6)) H5)))) (\lambda (f: F).(\lambda (H4: (clear (CHead c4 -(Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c4 -(CHead e1 k0 u0) c4 (drop_refl c4) (clear_gen_flat f c4 (CHead e1 k0 u0) u2 -H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c3 (CHead -e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl O (CHead c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c3 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) u1) (CHead -e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_flat c3 (CHead x0 k0 x1) O H6 f -u1) H7 H8)))))) H5)))) k (getl_gen_O (CHead c4 k u2) (CHead e1 k0 u0) -H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: -C).(\forall (u3: T).(\forall (k1: K).((getl n (CHead c4 k0 u2) (CHead e1 k1 -u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k0 -u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) -(\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) \to (\forall (e1: -C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c4 k0 u2) (CHead e1 -k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead -c3 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 -e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))))) (\lambda (b: -B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall -(k0: K).((getl n (CHead c4 (Bind b) u2) (CHead e1 k0 u3)) \to (ex3_2 C T -(\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 (Bind b) u1) (CHead e2 k0 -u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u4: T).(pr0 u4 u3)))))))))).(\lambda (e1: C).(\lambda (u0: -T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c4 (Bind b) u2) (CHead -e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c4 (CHead e1 k0 -u0) u2 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c3 -(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda -(_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda -(u3: T).(getl (S n) (CHead c3 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c3 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u1) -(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda -(_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Bind b) n c3 (CHead -x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: -nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl -n (CHead c4 (Flat f) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(getl n (CHead c3 (Flat f) u1) (CHead e2 k0 u4)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u4 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: -K).(\lambda (H4: (getl (S n) (CHead c4 (Flat f) u2) (CHead e1 k0 u0))).(let -H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c4 (CHead e1 k0 u0) u2 n H4)) -in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c3 (CHead e2 -k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl (S n) (CHead c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c3 (CHead -x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 -u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 -(Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 -e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Flat -f) n c3 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) k) h)))))))))) c2 c1 -H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/clear.ma b/matita/matita/contribs/lambdadelta/basic_1/wf3/clear.ma deleted file mode 100644 index 0199af19e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/clear.ma +++ /dev/null @@ -1,87 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/wf3/fwd.ma". - -include "basic_1/clear/fwd.ma". - -lemma wf3_clear_conf: - \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (g: G).(\forall -(c2: C).((wf3 g c1 c2) \to (wf3 g c c2)))))) -\def - \lambda (c1: C).(\lambda (c: C).(\lambda (H: (clear c1 c)).(clear_ind -(\lambda (c0: C).(\lambda (c2: C).(\forall (g: G).(\forall (c3: C).((wf3 g c0 -c3) \to (wf3 g c2 c3)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: -T).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) -c2)).H0)))))) (\lambda (e: C).(\lambda (c0: C).(\lambda (_: (clear e -c0)).(\lambda (H1: ((\forall (g: G).(\forall (c2: C).((wf3 g e c2) \to (wf3 g -c0 c2)))))).(\lambda (f: F).(\lambda (u: T).(\lambda (g: G).(\lambda (c2: -C).(\lambda (H2: (wf3 g (CHead e (Flat f) u) c2)).(let H_y \def -(wf3_gen_flat1 g e c2 u f H2) in (H1 g c2 H_y))))))))))) c1 c H))). - -lemma clear_wf3_trans: - \forall (c1: C).(\forall (d1: C).((clear c1 d1) \to (\forall (g: G).(\forall -(d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda -(c2: C).(clear c2 d2)))))))) -\def - \lambda (c1: C).(\lambda (d1: C).(\lambda (H: (clear c1 d1)).(clear_ind -(\lambda (c: C).(\lambda (c0: C).(\forall (g: G).(\forall (d2: C).((wf3 g c0 -d2) \to (ex2 C (\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(clear c2 -d2)))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (g: -G).(\lambda (d2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) d2)).(let H_x -\def (wf3_gen_bind1 g e d2 u b H0) in (let H1 \def H_x in (or_ind (ex3_2 C T -(\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda -(c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g -e u w)))) (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) -(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) -\to False)))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) -(\lambda (c2: C).(clear c2 d2))) (\lambda (H2: (ex3_2 C T (\lambda (c2: -C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda (c2: -C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g e u -w))))).(ex3_2_ind C T (\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 -(Bind b) u)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: -C).(\lambda (w: T).(ty3 g e u w))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e -(Bind b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H3: (eq C d2 (CHead x0 (Bind b) u))).(\lambda (H4: (wf3 g e -x0)).(\lambda (H5: (ty3 g e u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda -(c: C).(ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: -C).(clear c2 c)))) (ex_intro2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) -c2)) (\lambda (c2: C).(clear c2 (CHead x0 (Bind b) u))) (CHead x0 (Bind b) u) -(wf3_bind g e x0 H4 u x1 H5 b) (clear_bind b x0 u)) d2 H3)))))) H2)) (\lambda -(H2: (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) -(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) -\to False))))).(ex3_ind C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) -(TSort O)))) (\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: -T).((ty3 g e u w) \to False))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind -b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda (H3: -(eq C d2 (CHead x0 (Bind Void) (TSort O)))).(\lambda (H4: (wf3 g e -x0)).(\lambda (H5: ((\forall (w: T).((ty3 g e u w) \to False)))).(eq_ind_r C -(CHead x0 (Bind Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (c2: C).(wf3 -g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 c)))) (ex_intro2 C -(\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 -(CHead x0 (Bind Void) (TSort O)))) (CHead x0 (Bind Void) (TSort O)) (wf3_void -g e x0 H4 u H5 b) (clear_bind Void x0 (TSort O))) d2 H3))))) H2)) H1))))))))) -(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1: -((\forall (g: G).(\forall (d2: C).((wf3 g c d2) \to (ex2 C (\lambda (c2: -C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)))))))).(\lambda (f: -F).(\lambda (u: T).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g c -d2)).(let H_x \def (H1 g d2 H2) in (let H3 \def H_x in (ex2_ind C (\lambda -(c2: C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)) (ex2 C (\lambda (c2: -C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda -(x: C).(\lambda (H4: (wf3 g e x)).(\lambda (H5: (clear x d2)).(ex_intro2 C -(\lambda (c2: C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 -d2)) x (wf3_flat g e x H4 u f) H5)))) H3)))))))))))) c1 d1 H))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/wf3/defs.ma deleted file mode 100644 index df5eedc6c..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/defs.ma +++ /dev/null @@ -1,29 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/ty3/defs.ma". - -inductive wf3 (g: G): C \to (C \to Prop) \def -| wf3_sort: \forall (m: nat).(wf3 g (CSort m) (CSort m)) -| wf3_bind: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: -T).(\forall (t: T).((ty3 g c1 u t) \to (\forall (b: B).(wf3 g (CHead c1 (Bind -b) u) (CHead c2 (Bind b) u)))))))) -| wf3_void: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: -T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(wf3 g -(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)))))))) -| wf3_flat: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: -T).(\forall (f: F).(wf3 g (CHead c1 (Flat f) u) c2))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/wf3/fwd.ma deleted file mode 100644 index d4718ec6e..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/fwd.ma +++ /dev/null @@ -1,377 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/wf3/defs.ma". - -implied rec lemma wf3_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (m: -nat).(P (CSort m) (CSort m)))) (f0: (\forall (c1: C).(\forall (c2: C).((wf3 g -c1 c2) \to ((P c1 c2) \to (\forall (u: T).(\forall (t: T).((ty3 g c1 u t) \to -(\forall (b: B).(P (CHead c1 (Bind b) u) (CHead c2 (Bind b) u))))))))))) (f1: -(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to ((P c1 c2) \to (\forall -(u: T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(P -(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O))))))))))) (f2: (\forall -(c1: C).(\forall (c2: C).((wf3 g c1 c2) \to ((P c1 c2) \to (\forall (u: -T).(\forall (f2: F).(P (CHead c1 (Flat f2) u) c2)))))))) (c: C) (c0: C) (w: -wf3 g c c0) on w: P c c0 \def match w with [(wf3_sort m) \Rightarrow (f m) | -(wf3_bind c1 c2 w0 u t t0 b) \Rightarrow (f0 c1 c2 w0 ((wf3_ind g P f f0 f1 -f2) c1 c2 w0) u t t0 b) | (wf3_void c1 c2 w0 u f3 b) \Rightarrow (f1 c1 c2 w0 -((wf3_ind g P f f0 f1 f2) c1 c2 w0) u f3 b) | (wf3_flat c1 c2 w0 u f3) -\Rightarrow (f2 c1 c2 w0 ((wf3_ind g P f f0 f1 f2) c1 c2 w0) u f3)]. - -lemma wf3_gen_sort1: - \forall (g: G).(\forall (x: C).(\forall (m: nat).((wf3 g (CSort m) x) \to -(eq C x (CSort m))))) -\def - \lambda (g: G).(\lambda (x: C).(\lambda (m: nat).(\lambda (H: (wf3 g (CSort -m) x)).(insert_eq C (CSort m) (\lambda (c: C).(wf3 g c x)) (\lambda (c: -C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda -(c: C).(\lambda (c0: C).((eq C c (CSort m)) \to (eq C c0 c)))) (\lambda (m0: -nat).(\lambda (H1: (eq C (CSort m0) (CSort m))).(let H2 \def (f_equal C nat -(\lambda (e: C).(match e with [(CSort n) \Rightarrow n | (CHead _ _ _) -\Rightarrow m0])) (CSort m0) (CSort m) H1) in (eq_ind_r nat m (\lambda (n: -nat).(eq C (CSort n) (CSort n))) (refl_equal C (CSort m)) m0 H2)))) (\lambda -(c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1 c2)).(\lambda (_: (((eq C c1 -(CSort m)) \to (eq C c2 c1)))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: -(ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) -(CSort m))).(let H5 \def (eq_ind C (CHead c1 (Bind b) u) (\lambda (ee: -C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow -True])) I (CSort m) H4) in (False_ind (eq C (CHead c2 (Bind b) u) (CHead c1 -(Bind b) u)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: -(wf3 g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 -c1)))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u t) \to -False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CSort -m))).(let H5 \def (eq_ind C (CHead c1 (Bind b) u) (\lambda (ee: C).(match ee -with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I -(CSort m) H4) in (False_ind (eq C (CHead c2 (Bind Void) (TSort O)) (CHead c1 -(Bind b) u)) H5)))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 -g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u: -T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 (Flat f) u) (CSort m))).(let -H4 \def (eq_ind C (CHead c1 (Flat f) u) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort m) -H3) in (False_ind (eq C c2 (CHead c1 (Flat f) u)) H4))))))))) y x H0))) H)))). - -lemma wf3_gen_bind1: - \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (b: -B).((wf3 g (CHead c1 (Bind b) v) x) \to (or (ex3_2 C T (\lambda (c2: -C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda -(_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 -C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2: -C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to -False)))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (b: -B).(\lambda (H: (wf3 g (CHead c1 (Bind b) v) x)).(insert_eq C (CHead c1 (Bind -b) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(or (ex3_2 C T (\lambda -(c2: C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: -C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 -v w)))) (ex3 C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) -(\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v -w) \to False)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g -(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead c1 (Bind b) v)) \to (or -(ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C c0 (CHead c2 (Bind b) v)))) -(\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C c0 (CHead c2 (Bind Void) -(TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: -T).((ty3 g c1 v w) \to False)))))))) (\lambda (m: nat).(\lambda (H1: (eq C -(CSort m) (CHead c1 (Bind b) v))).(let H2 \def (eq_ind C (CSort m) (\lambda -(ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) -\Rightarrow False])) I (CHead c1 (Bind b) v) H1) in (False_ind (or (ex3_2 C T -(\lambda (c2: C).(\lambda (_: T).(eq C (CSort m) (CHead c2 (Bind b) v)))) -(\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C (CSort m) (CHead c2 (Bind -Void) (TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall -(w: T).((ty3 g c1 v w) \to False))))) H2)))) (\lambda (c0: C).(\lambda (c2: -C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Bind b) -v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 -(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead -c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: -C).(\forall (w: T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda -(t: T).(\lambda (H3: (ty3 g c0 u t)).(\lambda (b0: B).(\lambda (H4: (eq C -(CHead c0 (Bind b0) u) (CHead c1 (Bind b) v))).(let H5 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) -\Rightarrow c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H6 -\def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 | -(CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) -\Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let -H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t0) \Rightarrow t0])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) -H4) in (\lambda (H8: (eq B b0 b)).(\lambda (H9: (eq C c0 c1)).(eq_ind_r B b -(\lambda (b1: B).(or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead -c2 (Bind b1) u) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: -T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C -(\lambda (c3: C).(eq C (CHead c2 (Bind b1) u) (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g -c1 v w) \to False)))))) (let H10 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 -t0 t)) H3 v H7) in (eq_ind_r T v (\lambda (t0: T).(or (ex3_2 C T (\lambda -(c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) t0) (CHead c3 (Bind b) v)))) -(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) t0) -(CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda -(_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))))) (let H11 \def (eq_ind -C c0 (\lambda (c: C).(ty3 g c v t)) H10 c1 H9) in (let H12 \def (eq_ind C c0 -(\lambda (c: C).((eq C c (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda -(c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 -v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) -(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v -w) \to False))))))) H2 c1 H9) in (let H13 \def (eq_ind C c0 (\lambda (c: -C).(wf3 g c c2)) H1 c1 H9) in (or_introl (ex3_2 C T (\lambda (c3: C).(\lambda -(_: T).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind b) v)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 -v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind -Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall -(w: T).((ty3 g c1 v w) \to False)))) (ex3_2_intro C T (\lambda (c3: -C).(\lambda (_: T).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind b) v)))) -(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w))) c2 t (refl_equal C (CHead c2 (Bind b) v)) H13 H11))))) u -H7)) b0 H8)))) H6)) H5))))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda -(H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Bind b) v)) \to (or -(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) -(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) -(TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: -T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda (H3: ((\forall -(t: T).((ty3 g c0 u t) \to False)))).(\lambda (b0: B).(\lambda (H4: (eq C -(CHead c0 (Bind b0) u) (CHead c1 (Bind b) v))).(let H5 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) -\Rightarrow c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H6 -\def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 | -(CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) -\Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let -H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | -(CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) -H4) in (\lambda (_: (eq B b0 b)).(\lambda (H9: (eq C c0 c1)).(let H10 \def -(eq_ind T u (\lambda (t: T).(\forall (t0: T).((ty3 g c0 t t0) \to False))) H3 -v H7) in (let H11 \def (eq_ind C c0 (\lambda (c: C).(\forall (t: T).((ty3 g c -v t) \to False))) H10 c1 H9) in (let H12 \def (eq_ind C c0 (\lambda (c: -C).((eq C c (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3: -C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 -v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) -(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v -w) \to False))))))) H2 c1 H9) in (let H13 \def (eq_ind C c0 (\lambda (c: -C).(wf3 g c c2)) H1 c1 H9) in (or_intror (ex3_2 C T (\lambda (c3: C).(\lambda -(_: T).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind b) v)))) -(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: -T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind Void) -(TSort O)) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) -(\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))) (ex3_intro C -(\lambda (c3: C).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind Void) -(TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: -T).((ty3 g c1 v w) \to False))) c2 (refl_equal C (CHead c2 (Bind Void) (TSort -O))) H13 H11))))))))) H6)) H5)))))))))) (\lambda (c0: C).(\lambda (c2: -C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Bind b) v)) -\to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind -b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead -c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: -C).(\forall (w: T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda -(f: F).(\lambda (H3: (eq C (CHead c0 (Flat f) u) (CHead c1 (Bind b) v))).(let -H4 \def (eq_ind C (CHead c0 (Flat f) u) (\lambda (ee: C).(match ee with -[(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind -_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead c1 (Bind b) v) -H3) in (False_ind (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 -(CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) -(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq -C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) -(\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))))) H4))))))))) y -x H0))) H)))))). - -lemma wf3_gen_flat1: - \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (f: -F).((wf3 g (CHead c1 (Flat f) v) x) \to (wf3 g c1 x)))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (f: -F).(\lambda (H: (wf3 g (CHead c1 (Flat f) v) x)).(insert_eq C (CHead c1 (Flat -f) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(wf3 g c1 x)) (\lambda (y: -C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda (c: C).(\lambda (c0: -C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c0)))) (\lambda (m: -nat).(\lambda (H1: (eq C (CSort m) (CHead c1 (Flat f) v))).(let H2 \def -(eq_ind C (CSort m) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow -True | (CHead _ _ _) \Rightarrow False])) I (CHead c1 (Flat f) v) H1) in -(False_ind (wf3 g c1 (CSort m)) H2)))) (\lambda (c0: C).(\lambda (c2: -C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Flat f) v)) -\to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u -t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) (CHead c1 (Flat -f) v))).(let H5 \def (eq_ind C (CHead c0 (Bind b) u) (\lambda (ee: C).(match -ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k -with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead c1 -(Flat f) v) H4) in (False_ind (wf3 g c1 (CHead c2 (Bind b) u)) H5))))))))))) -(\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: -(((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u: -T).(\lambda (_: ((\forall (t: T).((ty3 g c0 u t) \to False)))).(\lambda (b: -B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) (CHead c1 (Flat f) v))).(let H5 -\def (eq_ind C (CHead c0 (Bind b) u) (\lambda (ee: C).(match ee with [(CSort -_) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead c1 (Flat f) v) -H4) in (False_ind (wf3 g c1 (CHead c2 (Bind Void) (TSort O))) H5)))))))))) -(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: -(((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u: -T).(\lambda (f0: F).(\lambda (H3: (eq C (CHead c0 (Flat f0) u) (CHead c1 -(Flat f) v))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort -_) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Flat f0) u) -(CHead c1 (Flat f) v) H3) in ((let H5 \def (f_equal C F (\lambda (e: -C).(match e with [(CSort _) \Rightarrow f0 | (CHead _ k _) \Rightarrow (match -k with [(Bind _) \Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead c0 -(Flat f0) u) (CHead c1 (Flat f) v) H3) in ((let H6 \def (f_equal C T (\lambda -(e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow -t])) (CHead c0 (Flat f0) u) (CHead c1 (Flat f) v) H3) in (\lambda (_: (eq F -f0 f)).(\lambda (H8: (eq C c0 c1)).(let H9 \def (eq_ind C c0 (\lambda (c: -C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c2))) H2 c1 H8) in (let H10 -\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H8) in H10))))) H5)) -H4))))))))) y x H0))) H)))))). - -lemma wf3_gen_head2: - \forall (g: G).(\forall (x: C).(\forall (c: C).(\forall (v: T).(\forall (k: -K).((wf3 g x (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))))) -\def - \lambda (g: G).(\lambda (x: C).(\lambda (c: C).(\lambda (v: T).(\lambda (k: -K).(\lambda (H: (wf3 g x (CHead c k v))).(insert_eq C (CHead c k v) (\lambda -(c0: C).(wf3 g x c0)) (\lambda (_: C).(ex B (\lambda (b: B).(eq K k (Bind -b))))) (\lambda (y: C).(\lambda (H0: (wf3 g x y)).(wf3_ind g (\lambda (_: -C).(\lambda (c1: C).((eq C c1 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K -k (Bind b))))))) (\lambda (m: nat).(\lambda (H1: (eq C (CSort m) (CHead c k -v))).(let H2 \def (eq_ind C (CSort m) (\lambda (ee: C).(match ee with [(CSort -_) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c k v) H1) -in (False_ind (ex B (\lambda (b: B).(eq K k (Bind b)))) H2)))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2 -(CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (u: -T).(\lambda (t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda -(H4: (eq C (CHead c2 (Bind b) u) (CHead c k v))).(let H5 \def (f_equal C C -(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) -\Rightarrow c0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in ((let H6 \def -(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind b) | -(CHead _ k0 _) \Rightarrow k0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in -((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u) (CHead -c k v) H4) in (\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c2 -c)).(let H10 \def (eq_ind T u (\lambda (t0: T).(ty3 g c1 t0 t)) H3 v H7) in -(let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex -B (\lambda (b0: B).(eq K k (Bind b0)))))) H2 c H9) in (let H12 \def (eq_ind C -c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let H13 \def (eq_ind_r K k -(\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B (\lambda (b0: B).(eq K k0 -(Bind b0)))))) H11 (Bind b) H8) in (eq_ind K (Bind b) (\lambda (k0: K).(ex B -(\lambda (b0: B).(eq K k0 (Bind b0))))) (ex_intro B (\lambda (b0: B).(eq K -(Bind b) (Bind b0))) b (refl_equal K (Bind b))) k H8)))))))) H6)) -H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 -c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K -k (Bind b))))))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u -t) \to False)))).(\lambda (_: B).(\lambda (H4: (eq C (CHead c2 (Bind Void) -(TSort O)) (CHead c k v))).(let H5 \def (f_equal C C (\lambda (e: C).(match e -with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 -(Bind Void) (TSort O)) (CHead c k v) H4) in ((let H6 \def (f_equal C K -(\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind Void) | (CHead _ -k0 _) \Rightarrow k0])) (CHead c2 (Bind Void) (TSort O)) (CHead c k v) H4) in -((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) -\Rightarrow (TSort O) | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind Void) -(TSort O)) (CHead c k v) H4) in (\lambda (H8: (eq K (Bind Void) k)).(\lambda -(H9: (eq C c2 c)).(let H10 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 -(CHead c k v)) \to (ex B (\lambda (b0: B).(eq K k (Bind b0)))))) H2 c H9) in -(let H11 \def (eq_ind C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let -H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B -(\lambda (b0: B).(eq K k0 (Bind b0)))))) H10 (Bind Void) H8) in (eq_ind K -(Bind Void) (\lambda (k0: K).(ex B (\lambda (b0: B).(eq K k0 (Bind b0))))) -(let H13 \def (eq_ind_r T v (\lambda (t: T).((eq C c (CHead c (Bind Void) t)) -\to (ex B (\lambda (b0: B).(eq K (Bind Void) (Bind b0)))))) H12 (TSort O) H7) -in (ex_intro B (\lambda (b0: B).(eq K (Bind Void) (Bind b0))) Void -(refl_equal K (Bind Void)))) k H8))))))) H6)) H5)))))))))) (\lambda (c1: -C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2 -(CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (_: -T).(\lambda (_: F).(\lambda (H3: (eq C c2 (CHead c k v))).(let H4 \def -(f_equal C C (\lambda (e: C).e) c2 (CHead c k v) H3) in (let H5 \def (eq_ind -C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b: B).(eq -K k (Bind b)))))) H2 (CHead c k v) H4) in (let H6 \def (eq_ind C c2 (\lambda -(c0: C).(wf3 g c1 c0)) H1 (CHead c k v) H4) in (H5 (refl_equal C (CHead c k -v))))))))))))) x y H0))) H)))))). - -theorem wf3_mono: - \forall (g: G).(\forall (c: C).(\forall (c1: C).((wf3 g c c1) \to (\forall -(c2: C).((wf3 g c c2) \to (eq C c1 c2)))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (c1: C).(\lambda (H: (wf3 g c -c1)).(wf3_ind g (\lambda (c0: C).(\lambda (c2: C).(\forall (c3: C).((wf3 g c0 -c3) \to (eq C c2 c3))))) (\lambda (m: nat).(\lambda (c2: C).(\lambda (H0: -(wf3 g (CSort m) c2)).(let H_y \def (wf3_gen_sort1 g c2 m H0) in (eq_ind_r C -(CSort m) (\lambda (c0: C).(eq C (CSort m) c0)) (refl_equal C (CSort m)) c2 -H_y))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 -c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 -c4))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c2 u -t)).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g (CHead c2 (Bind b) -u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in (let H4 \def H_x in -(or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind -b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq C c0 (CHead -c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: -C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 (Bind b) u) -c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead -c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda -(_: C).(\lambda (w: T).(ty3 g c2 u w))))).(ex3_2_ind C T (\lambda (c4: -C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: -C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 -u w))) (eq C (CHead c3 (Bind b) u) c0) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H6: (eq C c0 (CHead x0 (Bind b) u))).(\lambda (H7: (wf3 g c2 -x0)).(\lambda (_: (ty3 g c2 u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda -(c4: C).(eq C (CHead c3 (Bind b) u) c4)) (f_equal3 C K T C CHead c3 x0 (Bind -b) (Bind b) u u (H1 x0 H7) (refl_equal K (Bind b)) (refl_equal T u)) c0 -H6)))))) H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind -Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall -(w: T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 -(CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda -(_: C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind b) -u) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) (TSort -O)))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: ((\forall (w: T).((ty3 g c2 u -w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c4: -C).(eq C (CHead c3 (Bind b) u) c4)) (let H_x0 \def (H8 t H2) in (let H9 \def -H_x0 in (False_ind (eq C (CHead c3 (Bind b) u) (CHead x0 (Bind Void) (TSort -O))) H9))) c0 H6))))) H5)) H4))))))))))))) (\lambda (c2: C).(\lambda (c3: -C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) -\to (eq C c3 c4))))).(\lambda (u: T).(\lambda (H2: ((\forall (t: T).((ty3 g -c2 u t) \to False)))).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g -(CHead c2 (Bind b) u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in -(let H4 \def H_x in (or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C -c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) -(\lambda (_: C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq -C c0 (CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) -(\lambda (_: C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 -(Bind Void) (TSort O)) c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda -(_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: -T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 u -w))))).(ex3_2_ind C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 -(Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: -C).(\lambda (w: T).(ty3 g c2 u w))) (eq C (CHead c3 (Bind Void) (TSort O)) -c0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c0 (CHead x0 (Bind -b) u))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: (ty3 g c2 u x1)).(eq_ind_r -C (CHead x0 (Bind b) u) (\lambda (c4: C).(eq C (CHead c3 (Bind Void) (TSort -O)) c4)) (let H_x0 \def (H2 x1 H8) in (let H9 \def H_x0 in (False_ind (eq C -(CHead c3 (Bind Void) (TSort O)) (CHead x0 (Bind b) u)) H9))) c0 H6)))))) -H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind Void) -(TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall (w: -T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 (CHead -c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: -C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind Void) -(TSort O)) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) -(TSort O)))).(\lambda (H7: (wf3 g c2 x0)).(\lambda (_: ((\forall (w: T).((ty3 -g c2 u w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda -(c4: C).(eq C (CHead c3 (Bind Void) (TSort O)) c4)) (f_equal3 C K T C CHead -c3 x0 (Bind Void) (Bind Void) (TSort O) (TSort O) (H1 x0 H7) (refl_equal K -(Bind Void)) (refl_equal T (TSort O))) c0 H6))))) H5)) H4)))))))))))) -(\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: -((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 c4))))).(\lambda (u: -T).(\lambda (f: F).(\lambda (c0: C).(\lambda (H2: (wf3 g (CHead c2 (Flat f) -u) c0)).(let H_y \def (wf3_gen_flat1 g c2 c0 u f H2) in (H1 c0 H_y)))))))))) -c c1 H)))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/getl.ma b/matita/matita/contribs/lambdadelta/basic_1/wf3/getl.ma deleted file mode 100644 index 9c5fc73f5..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/getl.ma +++ /dev/null @@ -1,199 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/wf3/clear.ma". - -include "basic_1/ty3/dec.ma". - -lemma wf3_getl_conf: - \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall -(v: T).((getl i c1 (CHead d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: -C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda -(d2: C).(getl i c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2))))))))))))) -\def - \lambda (b: B).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: -C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 (Bind b) v)) \to -(\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g -d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind b) v))) -(\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda (c1: C).(\lambda (d1: -C).(\lambda (v: T).(\lambda (H: (getl O c1 (CHead d1 (Bind b) v))).(\lambda -(g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda (w: T).(\lambda -(H1: (ty3 g d1 v w)).(let H_y \def (wf3_clear_conf c1 (CHead d1 (Bind b) v) -(getl_gen_O c1 (CHead d1 (Bind b) v) H) g c2 H0) in (let H_x \def -(wf3_gen_bind1 g d1 c2 v b H_y) in (let H2 \def H_x in (or_ind (ex3_2 C T -(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda -(c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 -g d1 v w0)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 -g d1 v w0) \to False)))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind -b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H3: (ex3_2 C T (\lambda -(c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g d1 -v w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 -(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: -C).(\lambda (w0: T).(ty3 g d1 v w0))) (ex2 C (\lambda (d2: C).(getl O c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind b) v))).(\lambda -(H5: (wf3 g d1 x0)).(\lambda (_: (ty3 g d1 v x1)).(eq_ind_r C (CHead x0 (Bind -b) v) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) -v))) (\lambda (d2: C).(wf3 g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(getl O -(CHead x0 (Bind b) v) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) -x0 (getl_refl b x0 v) H5) c2 H4)))))) H3)) (\lambda (H3: (ex3 C (\lambda (c3: -C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g d1 -c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g d1 v w0) \to -False))))).(ex3_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort -O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 -g d1 v w0) \to False))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind b) -v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: C).(\lambda (H4: (eq C c2 -(CHead x0 (Bind Void) (TSort O)))).(\lambda (_: (wf3 g d1 x0)).(\lambda (H6: -((\forall (w0: T).((ty3 g d1 v w0) \to False)))).(eq_ind_r C (CHead x0 (Bind -Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 -(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H6 w H1) in -(let H7 \def H_x0 in (False_ind (ex2 C (\lambda (d2: C).(getl O (CHead x0 -(Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2))) H7))) c2 H4))))) H3)) H2))))))))))))) (\lambda (n: nat).(\lambda (H: -((\forall (c1: C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 -(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall -(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind -b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))))).(\lambda (c1: C).(C_ind -(\lambda (c: C).(\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead d1 -(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to (\forall -(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 -(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))) (\lambda (n0: -nat).(\lambda (d1: C).(\lambda (v: T).(\lambda (H0: (getl (S n) (CSort n0) -(CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (wf3 g -(CSort n0) c2)).(\lambda (w: T).(\lambda (_: (ty3 g d1 v w)).(getl_gen_sort -n0 (S n) (CHead d1 (Bind b) v) H0 (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda -(c: C).(\lambda (H0: ((\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead -d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to -(\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))).(\lambda -(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (v: T).(\lambda (H1: (getl -(S n) (CHead c k t) (CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: -C).(\lambda (H2: (wf3 g (CHead c k t) c2)).(\lambda (w: T).(\lambda (H3: (ty3 -g d1 v w)).(K_ind (\lambda (k0: K).((wf3 g (CHead c k0 t) c2) \to ((getl (r -k0 n) c (CHead d1 (Bind b) v)) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))) (\lambda (b0: -B).(\lambda (H4: (wf3 g (CHead c (Bind b0) t) c2)).(\lambda (H5: (getl (r -(Bind b0) n) c (CHead d1 (Bind b) v))).(let H_x \def (wf3_gen_bind1 g c c2 t -b0 H4) in (let H6 \def H_x in (or_ind (ex3_2 C T (\lambda (c3: C).(\lambda -(_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: C).(\lambda (_: -T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t w0)))) (ex3 C -(\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: -C).(wf3 g c c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to -False)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) -(\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H7: (ex3_2 C T (\lambda (c3: -C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: -C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t -w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 -(Bind b0) t)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: -C).(\lambda (w0: T).(ty3 g c t w0))) (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H8: (eq C c2 (CHead x0 (Bind b0) t))).(\lambda -(H9: (wf3 g c x0)).(\lambda (_: (ty3 g c t x1)).(eq_ind_r C (CHead x0 (Bind -b0) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 -(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g -x0 H9 w H3) in (let H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 -(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: -C).(getl (S n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: -C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind -b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S -n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2)) x (getl_head (Bind b0) n x0 (CHead x (Bind b) v) H12 t) H13)))) H11))) -c2 H8)))))) H7)) (\lambda (H7: (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 -(Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) (\lambda (_: -C).(\forall (w0: T).((ty3 g c t w0) \to False))))).(ex3_ind C (\lambda (c3: -C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) -(\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to False))) (ex2 C (\lambda -(d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 -d2))) (\lambda (x0: C).(\lambda (H8: (eq C c2 (CHead x0 (Bind Void) (TSort -O)))).(\lambda (H9: (wf3 g c x0)).(\lambda (_: ((\forall (w0: T).((ty3 g c t -w0) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c0: -C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 (Bind b) v))) (\lambda -(d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g x0 H9 w H3) in (let -H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 (CHead d2 (Bind b) -v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) -(CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: -C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind -b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S -n) (CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: -C).(wf3 g d1 d2)) x (getl_head (Bind Void) n x0 (CHead x (Bind b) v) H12 -(TSort O)) H13)))) H11))) c2 H8))))) H7)) H6)))))) (\lambda (f: F).(\lambda -(H4: (wf3 g (CHead c (Flat f) t) c2)).(\lambda (H5: (getl (r (Flat f) n) c -(CHead d1 (Bind b) v))).(let H_y \def (wf3_gen_flat1 g c c2 t f H4) in (H0 d1 -v H5 g c2 H_y w H3))))) k H2 (getl_gen_S k c (CHead d1 (Bind b) v) t n -H1)))))))))))))) c1)))) i)). - -lemma getl_wf3_trans: - \forall (i: nat).(\forall (c1: C).(\forall (d1: C).((getl i c1 d1) \to -(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: -C).(wf3 g c1 c2)) (\lambda (c2: C).(getl i c2 d2))))))))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: -C).((getl n c1 d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to -(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 -d2)))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (H: (getl O c1 -d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H0: (wf3 g d1 d2)).(let H_x -\def (clear_wf3_trans c1 d1 (getl_gen_O c1 d1 H) g d2 H0) in (let H1 \def H_x -in (ex2_ind C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(clear c2 d2)) -(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 d2))) -(\lambda (x: C).(\lambda (H2: (wf3 g c1 x)).(\lambda (H3: (clear x -d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 -d2)) x H2 (getl_intro O x d2 x (drop_refl x) H3))))) H1))))))))) (\lambda (n: -nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).((getl n c1 d1) \to -(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: -C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 d2))))))))))).(\lambda (c1: -C).(C_ind (\lambda (c: C).(\forall (d1: C).((getl (S n) c d1) \to (\forall -(g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c -c2)) (\lambda (c2: C).(getl (S n) c2 d2))))))))) (\lambda (n0: nat).(\lambda -(d1: C).(\lambda (H0: (getl (S n) (CSort n0) d1)).(\lambda (g: G).(\lambda -(d2: C).(\lambda (_: (wf3 g d1 d2)).(getl_gen_sort n0 (S n) d1 H0 (ex2 C -(\lambda (c2: C).(wf3 g (CSort n0) c2)) (\lambda (c2: C).(getl (S n) c2 -d2)))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).((getl (S n) c -d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda -(c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)))))))))).(\lambda -(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (H1: (getl (S n) (CHead c k -t) d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g d1 d2)).(K_ind -(\lambda (k0: K).((getl (r k0 n) c d1) \to (ex2 C (\lambda (c2: C).(wf3 g -(CHead c k0 t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))))) (\lambda (b: -B).(\lambda (H3: (getl (r (Bind b) n) c d1)).(let H_x \def (H c d1 H3 g d2 -H2) in (let H4 \def H_x in (ex2_ind C (\lambda (c2: C).(wf3 g c c2)) (\lambda -(c2: C).(getl n c2 d2)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) -c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 -g c x)).(\lambda (H6: (getl n x d2)).(let H_x0 \def (ty3_inference g c t) in -(let H7 \def H_x0 in (or_ind (ex T (\lambda (t2: T).(ty3 g c t t2))) (\forall -(t2: T).((ty3 g c t t2) \to False)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c -(Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (H8: (ex T -(\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 g c t t2)) -(ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda (c2: -C).(getl (S n) c2 d2))) (\lambda (x0: T).(\lambda (H9: (ty3 g c t -x0)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda -(c2: C).(getl (S n) c2 d2)) (CHead x (Bind b) t) (wf3_bind g c x H5 t x0 H9 -b) (getl_head (Bind b) n x d2 H6 t)))) H8)) (\lambda (H8: ((\forall (t2: -T).((ty3 g c t t2) \to False)))).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead -c (Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (CHead x (Bind Void) -(TSort O)) (wf3_void g c x H5 t H8 b) (getl_head (Bind Void) n x d2 H6 (TSort -O)))) H7)))))) H4))))) (\lambda (f: F).(\lambda (H3: (getl (r (Flat f) n) c -d1)).(let H_x \def (H0 d1 H3 g d2 H2) in (let H4 \def H_x in (ex2_ind C -(\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (ex2 C -(\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) (\lambda (c2: C).(getl (S -n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 g c x)).(\lambda (H6: (getl (S -n) x d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) -(\lambda (c2: C).(getl (S n) c2 d2)) x (wf3_flat g c x H5 t f) H6)))) H4))))) -k (getl_gen_S k c d1 t n H1))))))))))) c1)))) i). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/props.ma b/matita/matita/contribs/lambdadelta/basic_1/wf3/props.ma deleted file mode 100644 index aec1f02ef..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/props.ma +++ /dev/null @@ -1,153 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/wf3/ty3.ma". - -include "basic_1/app/defs.ma". - -lemma wf3_total: - \forall (g: G).(\forall (c1: C).(ex C (\lambda (c2: C).(wf3 g c1 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(ex C (\lambda (c2: -C).(wf3 g c c2)))) (\lambda (n: nat).(ex_intro C (\lambda (c2: C).(wf3 g -(CSort n) c2)) (CSort n) (wf3_sort g n))) (\lambda (c: C).(\lambda (H: (ex C -(\lambda (c2: C).(wf3 g c c2)))).(\lambda (k: K).(\lambda (t: T).(let H0 \def -H in (ex_ind C (\lambda (c2: C).(wf3 g c c2)) (ex C (\lambda (c2: C).(wf3 g -(CHead c k t) c2))) (\lambda (x: C).(\lambda (H1: (wf3 g c x)).(K_ind -(\lambda (k0: K).(ex C (\lambda (c2: C).(wf3 g (CHead c k0 t) c2)))) (\lambda -(b: B).(let H_x \def (ty3_inference g c t) in (let H2 \def H_x in (or_ind (ex -T (\lambda (t2: T).(ty3 g c t t2))) (\forall (t2: T).((ty3 g c t t2) \to -False)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda -(H3: (ex T (\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 -g c t t2)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda -(x0: T).(\lambda (H4: (ty3 g c t x0)).(ex_intro C (\lambda (c2: C).(wf3 g -(CHead c (Bind b) t) c2)) (CHead x (Bind b) t) (wf3_bind g c x H1 t x0 H4 -b)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c t t2) \to -False)))).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) -(CHead x (Bind Void) (TSort O)) (wf3_void g c x H1 t H3 b))) H2)))) (\lambda -(f: F).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) x -(wf3_flat g c x H1 t f))) k))) H0)))))) c1)). - -lemma ty3_shift1: - \forall (g: G).(\forall (c: C).((wf3 g c c) \to (\forall (t1: T).(\forall -(t2: T).((ty3 g c t1 t2) \to (ty3 g (CSort (cbk c)) (app1 c t1) (app1 c -t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (H: (wf3 g c c)).(insert_eq C c -(\lambda (c0: C).(wf3 g c0 c)) (\lambda (c0: C).(\forall (t1: T).(\forall -(t2: T).((ty3 g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 -t2)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y c)).(wf3_ind g (\lambda (c0: -C).(\lambda (c1: C).((eq C c0 c1) \to (\forall (t1: T).(\forall (t2: T).((ty3 -g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 t2)))))))) -(\lambda (m: nat).(\lambda (_: (eq C (CSort m) (CSort m))).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H2: (ty3 g (CSort m) t1 t2)).H2))))) (\lambda -(c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C -c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (ty3 g -(CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u: T).(\lambda -(t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C -(CHead c1 (Bind b) u) (CHead c2 (Bind b) u))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H5: (ty3 g (CHead c1 (Bind b) u) t1 t2)).(let H6 \def (f_equal C -C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead c0 _ _) -\Rightarrow c0])) (CHead c1 (Bind b) u) (CHead c2 (Bind b) u) H4) in (let H7 -\def (eq_ind_r C c2 (\lambda (c0: C).((eq C c1 c0) \to (\forall (t3: -T).(\forall (t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort (cbk c1)) (app1 c1 -t3) (app1 c1 t4))))))) H2 c1 H6) in (let H8 \def (eq_ind_r C c2 (\lambda (c0: -C).(wf3 g c1 c0)) H1 c1 H6) in (ex_ind T (\lambda (t0: T).(ty3 g (CHead c1 -(Bind b) u) t2 t0)) (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Bind b) u t1)) -(app1 c1 (THead (Bind b) u t2))) (\lambda (x: T).(\lambda (_: (ty3 g (CHead -c1 (Bind b) u) t2 x)).(H7 (refl_equal C c1) (THead (Bind b) u t1) (THead -(Bind b) u t2) (ty3_bind g c1 u t H3 b t1 t2 H5)))) (ty3_correct g (CHead c1 -(Bind b) u) t1 t2 H5))))))))))))))))) (\lambda (c1: C).(\lambda (c2: -C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c1 c2) \to (\forall -(t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (ty3 g (CSort (cbk c1)) (app1 -c1 t1) (app1 c1 t2)))))))).(\lambda (u: T).(\lambda (H3: ((\forall (t: -T).((ty3 g c1 u t) \to False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead -c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)))).(\lambda (t1: T).(\lambda -(t2: T).(\lambda (H5: (ty3 g (CHead c1 (Bind b) u) t1 t2)).(let H6 \def -(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead -c0 _ _) \Rightarrow c0])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort -O)) H4) in ((let H7 \def (f_equal C B (\lambda (e: C).(match e with [(CSort -_) \Rightarrow b | (CHead _ k _) \Rightarrow (match k with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 -(Bind Void) (TSort O)) H4) in ((let H8 \def (f_equal C T (\lambda (e: -C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) -(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) H4) in (\lambda (H9: -(eq B b Void)).(\lambda (H10: (eq C c1 c2)).(let H11 \def (eq_ind B b -(\lambda (b0: B).(ty3 g (CHead c1 (Bind b0) u) t1 t2)) H5 Void H9) in -(eq_ind_r B Void (\lambda (b0: B).(ty3 g (CSort (cbk (CHead c1 (Bind b0) u))) -(app1 (CHead c1 (Bind b0) u) t1) (app1 (CHead c1 (Bind b0) u) t2))) (let H12 -\def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) t) t1 t2)) H11 -(TSort O) H8) in (let H13 \def (eq_ind T u (\lambda (t: T).(\forall (t0: -T).((ty3 g c1 t t0) \to False))) H3 (TSort O) H8) in (eq_ind_r T (TSort O) -(\lambda (t: T).(ty3 g (CSort (cbk (CHead c1 (Bind Void) t))) (app1 (CHead c1 -(Bind Void) t) t1) (app1 (CHead c1 (Bind Void) t) t2))) (let H14 \def -(eq_ind_r C c2 (\lambda (c0: C).((eq C c1 c0) \to (\forall (t3: T).(\forall -(t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1 -t4))))))) H2 c1 H10) in (let H15 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g -c1 c0)) H1 c1 H10) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) -(TSort O)) t2 t)) (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Bind Void) (TSort -O) t1)) (app1 c1 (THead (Bind Void) (TSort O) t2))) (\lambda (x: T).(\lambda -(_: (ty3 g (CHead c1 (Bind Void) (TSort O)) t2 x)).(H14 (refl_equal C c1) -(THead (Bind Void) (TSort O) t1) (THead (Bind Void) (TSort O) t2) (ty3_bind g -c1 (TSort O) (TSort (next g O)) (ty3_sort g c1 O) Void t1 t2 H12)))) -(ty3_correct g (CHead c1 (Bind Void) (TSort O)) t1 t2 H12)))) u H8))) b -H9))))) H7)) H6))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: -(wf3 g c1 c2)).(\lambda (H2: (((eq C c1 c2) \to (\forall (t1: T).(\forall -(t2: T).((ty3 g c1 t1 t2) \to (ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1 -t2)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 -(Flat f) u) c2)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead -c1 (Flat f) u) t1 t2)).(let H5 \def (f_equal C C (\lambda (e: C).e) (CHead c1 -(Flat f) u) c2 H3) in (let H6 \def (eq_ind_r C c2 (\lambda (c0: C).((eq C c1 -c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort -(cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 (CHead c1 (Flat f) u) H5) in -(let H7 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 (CHead c1 -(Flat f) u) H5) in (let H_x \def (wf3_gen_head2 g c1 c1 u (Flat f) H7) in -(let H8 \def H_x in (ex_ind B (\lambda (b: B).(eq K (Flat f) (Bind b))) (ty3 -g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u t1)) (app1 c1 (THead (Flat f) u -t2))) (\lambda (x: B).(\lambda (H9: (eq K (Flat f) (Bind x))).(let H10 \def -(eq_ind K (Flat f) (\lambda (ee: K).(match ee with [(Bind _) \Rightarrow -False | (Flat _) \Rightarrow True])) I (Bind x) H9) in (False_ind (ty3 g -(CSort (cbk c1)) (app1 c1 (THead (Flat f) u t1)) (app1 c1 (THead (Flat f) u -t2))) H10)))) H8)))))))))))))))) y c H0))) H))). - -lemma wf3_idem: - \forall (g: G).(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (wf3 g -c2 c2)))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wf3 g c1 -c2)).(wf3_ind g (\lambda (_: C).(\lambda (c0: C).(wf3 g c0 c0))) (\lambda (m: -nat).(wf3_sort g m)) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wf3 g -c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (t: T).(\lambda -(H2: (ty3 g c3 u t)).(\lambda (b: B).(wf3_bind g c4 c4 H1 u t (wf3_ty3_conf g -c3 u t H2 c4 H0) b))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: -(wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (_: -((\forall (t: T).((ty3 g c3 u t) \to False)))).(\lambda (_: B).(wf3_bind g c4 -c4 H1 (TSort O) (TSort (next g O)) (ty3_sort g c4 O) Void)))))))) (\lambda -(c3: C).(\lambda (c4: C).(\lambda (_: (wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 -c4)).(\lambda (_: T).(\lambda (_: F).H1)))))) c1 c2 H)))). - -lemma wf3_ty3: - \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (u: T).((ty3 g c1 t -u) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t -u))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: -(ty3 g c1 t u)).(let H_x \def (wf3_total g c1) in (let H0 \def H_x in (ex_ind -C (\lambda (c2: C).(wf3 g c1 c2)) (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) -(\lambda (c2: C).(ty3 g c2 t u))) (\lambda (x: C).(\lambda (H1: (wf3 g c1 -x)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t -u)) x H1 (wf3_ty3_conf g c1 t u H x H1)))) H0))))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1/wf3/ty3.ma b/matita/matita/contribs/lambdadelta/basic_1/wf3/ty3.ma deleted file mode 100644 index 2958902bd..000000000 --- a/matita/matita/contribs/lambdadelta/basic_1/wf3/ty3.ma +++ /dev/null @@ -1,126 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "basic_1/wf3/getl.ma". - -lemma wf3_pr2_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 -t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 -u) \to (pr2 c2 t1 t2))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pr2 c1 t1 t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0: -T).(\forall (c2: C).((wf3 g c c2) \to (\forall (u: T).((ty3 g c t u) \to (pr2 -c2 t t0)))))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda -(H0: (pr0 t3 t4)).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(\lambda (u: -T).(\lambda (_: (ty3 g c t3 u)).(pr2_free c2 t3 t4 H0))))))))) (\lambda (c: -C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c -(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: -(pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c2: -C).(\lambda (H3: (wf3 g c c2)).(\lambda (u0: T).(\lambda (H4: (ty3 g c t3 -u0)).(let H_y \def (ty3_sred_pr0 t3 t4 H1 g c u0 H4) in (let H_x \def -(ty3_getl_subst0 g c t4 u0 H_y u t i H2 Abbr d u H0) in (let H5 \def H_x in -(ex_ind T (\lambda (w: T).(ty3 g d u w)) (pr2 c2 t3 t) (\lambda (x: -T).(\lambda (H6: (ty3 g d u x)).(let H_x0 \def (wf3_getl_conf Abbr i c d u H0 -g c2 H3 x H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(wf3 g d d2)) (pr2 c2 t3 t) -(\lambda (x0: C).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(\lambda -(_: (wf3 g d x0)).(pr2_delta c2 x0 u i H8 t3 t4 H1 t H2)))) H7))))) -H5)))))))))))))))))) c1 t1 t2 H))))). - -lemma wf3_pr3_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr3 c1 -t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 -u) \to (pr3 c2 t1 t2))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pr3 c1 t1 t2)).(pr3_ind c1 (\lambda (t: T).(\lambda (t0: T).(\forall -(c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t u) \to (pr3 c2 t -t0))))))) (\lambda (t: T).(\lambda (c2: C).(\lambda (_: (wf3 g c1 -c2)).(\lambda (u: T).(\lambda (_: (ty3 g c1 t u)).(pr3_refl c2 t)))))) -(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr2 c1 t4 t3)).(\lambda (t5: -T).(\lambda (_: (pr3 c1 t3 t5)).(\lambda (H2: ((\forall (c2: C).((wf3 g c1 -c2) \to (\forall (u: T).((ty3 g c1 t3 u) \to (pr3 c2 t3 t5))))))).(\lambda -(c2: C).(\lambda (H3: (wf3 g c1 c2)).(\lambda (u: T).(\lambda (H4: (ty3 g c1 -t4 u)).(pr3_sing c2 t3 t4 (wf3_pr2_conf g c1 t4 t3 H0 c2 H3 u H4) t5 (H2 c2 -H3 u (ty3_sred_pr2 c1 t4 t3 H0 g u H4))))))))))))) t1 t2 H))))). - -lemma wf3_pc3_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1 -t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u1: T).((ty3 g c1 t1 -u1) \to (\forall (u2: T).((ty3 g c1 t2 u2) \to (pc3 c2 t1 t2))))))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (pc3 c1 t1 t2)).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda -(u1: T).(\lambda (H1: (ty3 g c1 t1 u1)).(\lambda (u2: T).(\lambda (H2: (ty3 g -c1 t2 u2)).(let H3 \def H in (ex2_ind T (\lambda (t: T).(pr3 c1 t1 t)) -(\lambda (t: T).(pr3 c1 t2 t)) (pc3 c2 t1 t2) (\lambda (x: T).(\lambda (H4: -(pr3 c1 t1 x)).(\lambda (H5: (pr3 c1 t2 x)).(pc3_pr3_t c2 t1 x (wf3_pr3_conf -g c1 t1 x H4 c2 H0 u1 H1) t2 (wf3_pr3_conf g c1 t2 x H5 c2 H0 u2 H2))))) -H3)))))))))))). - -lemma wf3_ty3_conf: - \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 -t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (ty3 g c2 t1 t2))))))) -\def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(H: (ty3 g c1 t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda -(t0: T).(\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t t0)))))) (\lambda (c: -C).(\lambda (t3: T).(\lambda (t: T).(\lambda (H0: (ty3 g c t3 t)).(\lambda -(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t))))).(\lambda (u: -T).(\lambda (t4: T).(\lambda (H2: (ty3 g c u t4)).(\lambda (H3: ((\forall -(c2: C).((wf3 g c c2) \to (ty3 g c2 u t4))))).(\lambda (H4: (pc3 c t4 -t3)).(\lambda (c2: C).(\lambda (H5: (wf3 g c c2)).(ex_ind T (\lambda (t0: -T).(ty3 g c t4 t0)) (ty3 g c2 u t3) (\lambda (x: T).(\lambda (H6: (ty3 g c t4 -x)).(ty3_conv g c2 t3 t (H1 c2 H5) u t4 (H3 c2 H5) (wf3_pc3_conf g c t4 t3 H4 -c2 H5 x H6 t H0)))) (ty3_correct g c u t4 H2)))))))))))))) (\lambda (c: -C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(ty3_sort g -c2 m))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: -T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda -(H1: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g -c2 u t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def -(wf3_getl_conf Abbr n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind -C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x: -C).(\lambda (H5: (getl n c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (wf3 g d -x)).(ty3_abbr g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (n: -nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c -(CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u -t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g c2 u -t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def -(wf3_getl_conf Abst n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind -C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x: -C).(\lambda (H5: (getl n c2 (CHead x (Bind Abst) u))).(\lambda (H6: (wf3 g d -x)).(ty3_abst g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (c: -C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c u t)).(\lambda (H1: -((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 u t))))).(\lambda (b: -B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) -t3 t4)).(\lambda (H3: ((\forall (c2: C).((wf3 g (CHead c (Bind b) u) c2) \to -(ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c c2)).(ty3_bind g -c2 u t (H1 c2 H4) b t3 t4 (H3 (CHead c2 (Bind b) u) (wf3_bind g c c2 H4 u t -H0 b))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda -(_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g -c2 w u))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead -(Bind Abst) u t))).(\lambda (H3: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g -c2 v (THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c -c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c: -C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c t3 t4)).(\lambda -(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t4))))).(\lambda (t0: -T).(\lambda (_: (ty3 g c t4 t0)).(\lambda (H3: ((\forall (c2: C).((wf3 g c -c2) \to (ty3 g c2 t4 t0))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c -c2)).(ty3_cast g c2 t3 t4 (H1 c2 H4) t0 (H3 c2 H4)))))))))))) c1 t1 t2 H))))). - diff --git a/matita/matita/contribs/lambdadelta/basic_1A/A/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/A/defs.ma new file mode 100644 index 000000000..7f893aaa1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/A/defs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/preamble.ma". + +inductive A: Type[0] \def +| ASort: nat \to (nat \to A) +| AHead: A \to (A \to A). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/A/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/A/fwd.ma new file mode 100644 index 000000000..64aa776cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/A/fwd.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/A/defs.ma". + +implied rec lemma A_rect (P: (A \to Type[0])) (f: (\forall (n: nat).(\forall +(n0: nat).(P (ASort n n0))))) (f0: (\forall (a: A).((P a) \to (\forall (a0: +A).((P a0) \to (P (AHead a a0))))))) (a: A) on a: P a \def match a with +[(ASort n n0) \Rightarrow (f n n0) | (AHead a0 a1) \Rightarrow (f0 a0 +((A_rect P f f0) a0) a1 ((A_rect P f f0) a1))]. + +implied lemma A_ind: + \forall (P: ((A \to Prop))).(((\forall (n: nat).(\forall (n0: nat).(P (ASort +n n0))))) \to (((\forall (a: A).((P a) \to (\forall (a0: A).((P a0) \to (P +(AHead a a0))))))) \to (\forall (a: A).(P a)))) +\def + \lambda (P: ((A \to Prop))).(A_rect P). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/C/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/C/defs.ma new file mode 100644 index 000000000..aa1979967 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/C/defs.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +inductive C: Type[0] \def +| CSort: nat \to C +| CHead: C \to (K \to (T \to C)). + +rec definition cweight (c: C) on c: nat \def match c with [(CSort _) +\Rightarrow O | (CHead c0 _ t) \Rightarrow (plus (cweight c0) (tweight t))]. + +definition clt: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(lt (cweight c1) (cweight c2))). + +definition cle: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(le (cweight c1) (cweight c2))). + +rec definition CTail (k: K) (t: T) (c: C) on c: C \def match c with [(CSort +n) \Rightarrow (CHead (CSort n) k t) | (CHead d h u) \Rightarrow (CHead +(CTail k t d) h u)]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/C/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/C/fwd.ma new file mode 100644 index 000000000..3979a5b20 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/C/fwd.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +implied rec lemma C_rect (P: (C \to Type[0])) (f: (\forall (n: nat).(P (CSort +n)))) (f0: (\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P +(CHead c k t))))))) (c: C) on c: P c \def match c with [(CSort n) \Rightarrow +(f n) | (CHead c0 k t) \Rightarrow (f0 c0 ((C_rect P f f0) c0) k t)]. + +implied lemma C_ind: + \forall (P: ((C \to Prop))).(((\forall (n: nat).(P (CSort n)))) \to +(((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CHead c k +t))))))) \to (\forall (c: C).(P c)))) +\def + \lambda (P: ((C \to Prop))).(C_rect P). + +fact clt_wf__q_ind: + \forall (P: ((C \to Prop))).(((\forall (n: nat).((\lambda (P0: ((C \to +Prop))).(\lambda (n0: nat).(\forall (c: C).((eq nat (cweight c) n0) \to (P0 +c))))) P n))) \to (\forall (c: C).(P c))) +\def + let Q \def (\lambda (P: ((C \to Prop))).(\lambda (n: nat).(\forall (c: +C).((eq nat (cweight c) n) \to (P c))))) in (\lambda (P: ((C \to +Prop))).(\lambda (H: ((\forall (n: nat).(\forall (c: C).((eq nat (cweight c) +n) \to (P c)))))).(\lambda (c: C).(H (cweight c) c (refl_equal nat (cweight +c)))))). + +lemma clt_wf_ind: + \forall (P: ((C \to Prop))).(((\forall (c: C).(((\forall (d: C).((clt d c) +\to (P d)))) \to (P c)))) \to (\forall (c: C).(P c))) +\def + let Q \def (\lambda (P: ((C \to Prop))).(\lambda (n: nat).(\forall (c: +C).((eq nat (cweight c) n) \to (P c))))) in (\lambda (P: ((C \to +Prop))).(\lambda (H: ((\forall (c: C).(((\forall (d: C).((lt (cweight d) +(cweight c)) \to (P d)))) \to (P c))))).(\lambda (c: C).(clt_wf__q_ind +(\lambda (c0: C).(P c0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (c0: +C).(P c0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) +\to (Q (\lambda (c0: C).(P c0)) m))))).(\lambda (c0: C).(\lambda (H1: (eq nat +(cweight c0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall +(m: nat).((lt m n1) \to (\forall (c1: C).((eq nat (cweight c1) m) \to (P +c1)))))) H0 (cweight c0) H1) in (H c0 (\lambda (d: C).(\lambda (H3: (lt +(cweight d) (cweight c0))).(H2 (cweight d) H3 d (refl_equal nat (cweight +d))))))))))))) c)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/C/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/C/props.ma new file mode 100644 index 000000000..2915384c9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/C/props.ma @@ -0,0 +1,115 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/fwd.ma". + +include "basic_1A/T/props.ma". + +lemma cle_r: + \forall (c: C).(cle c c) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(le (cweight c0) (cweight c0))) +(\lambda (_: nat).(le_O_n O)) (\lambda (c0: C).(\lambda (_: (le (cweight c0) +(cweight c0))).(\lambda (_: K).(\lambda (t: T).(le_n (plus (cweight c0) +(tweight t))))))) c). + +lemma cle_head: + \forall (c1: C).(\forall (c2: C).((cle c1 c2) \to (\forall (u1: T).(\forall +(u2: T).((tle u1 u2) \to (\forall (k: K).(cle (CHead c1 k u1) (CHead c2 k +u2)))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (le (cweight c1) (cweight +c2))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (le (tweight u1) +(tweight u2))).(\lambda (_: K).(le_plus_plus (cweight c1) (cweight c2) +(tweight u1) (tweight u2) H H0))))))). + +lemma cle_trans_head: + \forall (c1: C).(\forall (c2: C).((cle c1 c2) \to (\forall (k: K).(\forall +(u: T).(cle c1 (CHead c2 k u)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (le (cweight c1) (cweight +c2))).(\lambda (_: K).(\lambda (u: T).(le_plus_trans (cweight c1) (cweight +c2) (tweight u) H))))). + +lemma clt_cong: + \forall (c: C).(\forall (d: C).((clt c d) \to (\forall (k: K).(\forall (t: +T).(clt (CHead c k t) (CHead d k t)))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (H: (lt (cweight c) (cweight +d))).(\lambda (_: K).(\lambda (t: T).(lt_reg_r (cweight c) (cweight d) +(tweight t) H))))). + +lemma clt_head: + \forall (k: K).(\forall (c: C).(\forall (u: T).(clt c (CHead c k u)))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(eq_ind_r nat (plus (cweight +c) O) (\lambda (n: nat).(lt n (plus (cweight c) (tweight u)))) (lt_reg_l O +(tweight u) (cweight c) (tweight_lt u)) (cweight c) (plus_n_O (cweight c))))). + +lemma chead_ctail: + \forall (c: C).(\forall (t: T).(\forall (k: K).(ex_3 K C T (\lambda (h: +K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c k t) (CTail h u d)))))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (t: T).(\forall (k: K).(ex_3 +K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c0 k t) +(CTail h u d))))))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (k: +K).(ex_3_intro K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C +(CHead (CSort n) k t) (CTail h u d))))) k (CSort n) t (refl_equal C (CHead +(CSort n) k t)))))) (\lambda (c0: C).(\lambda (H: ((\forall (t: T).(\forall +(k: K).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C +(CHead c0 k t) (CTail h u d)))))))))).(\lambda (k: K).(\lambda (t: +T).(\lambda (t0: T).(\lambda (k0: K).(let H_x \def (H t k) in (let H0 \def +H_x in (ex_3_ind K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C +(CHead c0 k t) (CTail h u d))))) (ex_3 K C T (\lambda (h: K).(\lambda (d: +C).(\lambda (u: T).(eq C (CHead (CHead c0 k t) k0 t0) (CTail h u d)))))) +(\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H1: (eq C (CHead +c0 k t) (CTail x0 x2 x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c1: +C).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead +c1 k0 t0) (CTail h u d))))))) (ex_3_intro K C T (\lambda (h: K).(\lambda (d: +C).(\lambda (u: T).(eq C (CHead (CTail x0 x2 x1) k0 t0) (CTail h u d))))) x0 +(CHead x1 k0 t0) x2 (refl_equal C (CHead (CTail x0 x2 x1) k0 t0))) (CHead c0 +k t) H1))))) H0))))))))) c). + +lemma clt_thead: + \forall (k: K).(\forall (u: T).(\forall (c: C).(clt c (CTail k u c)))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(clt +c0 (CTail k u c0))) (\lambda (n: nat).(clt_head k (CSort n) u)) (\lambda (c0: +C).(\lambda (H: (clt c0 (CTail k u c0))).(\lambda (k0: K).(\lambda (t: +T).(clt_cong c0 (CTail k u c0) H k0 t))))) c))). + +lemma c_tail_ind: + \forall (P: ((C \to Prop))).(((\forall (n: nat).(P (CSort n)))) \to +(((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t +c))))))) \to (\forall (c: C).(P c)))) +\def + \lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (n: nat).(P (CSort +n))))).(\lambda (H0: ((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: +T).(P (CTail k t c)))))))).(\lambda (c: C).(clt_wf_ind (\lambda (c0: C).(P +c0)) (\lambda (c0: C).(C_ind (\lambda (c1: C).(((\forall (d: C).((clt d c1) +\to (P d)))) \to (P c1))) (\lambda (n: nat).(\lambda (_: ((\forall (d: +C).((clt d (CSort n)) \to (P d))))).(H n))) (\lambda (c1: C).(\lambda (_: +((((\forall (d: C).((clt d c1) \to (P d)))) \to (P c1)))).(\lambda (k: +K).(\lambda (t: T).(\lambda (H2: ((\forall (d: C).((clt d (CHead c1 k t)) \to +(P d))))).(let H_x \def (chead_ctail c1 t k) in (let H3 \def H_x in (ex_3_ind +K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k t) +(CTail h u d))))) (P (CHead c1 k t)) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (H4: (eq C (CHead c1 k t) (CTail x0 x2 +x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c2: C).(P c2)) (let H5 \def +(eq_ind C (CHead c1 k t) (\lambda (c2: C).(\forall (d: C).((clt d c2) \to (P +d)))) H2 (CTail x0 x2 x1) H4) in (H0 x1 (H5 x1 (clt_thead x0 x2 x1)) x0 x2)) +(CHead c1 k t) H4))))) H3)))))))) c0)) c)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/G/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/G/defs.ma new file mode 100644 index 000000000..a79475028 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/G/defs.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/preamble.ma". + +record G : Type[0] \def { + next: (nat \to nat); + next_lt: (\forall (n: nat).(lt n (next n))) +}. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/T/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/dec.ma new file mode 100644 index 000000000..6760101a0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/dec.ma @@ -0,0 +1,411 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/fwd.ma". + +fact terms_props__bind_dec: + \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) ((eq B b1 b2) \to (\forall +(P: Prop).P)))) +\def + \lambda (b1: B).(B_ind (\lambda (b: B).(\forall (b2: B).(or (eq B b b2) ((eq +B b b2) \to (\forall (P: Prop).P))))) (\lambda (b2: B).(B_ind (\lambda (b: +B).(or (eq B Abbr b) ((eq B Abbr b) \to (\forall (P: Prop).P)))) (or_introl +(eq B Abbr Abbr) ((eq B Abbr Abbr) \to (\forall (P: Prop).P)) (refl_equal B +Abbr)) (or_intror (eq B Abbr Abst) ((eq B Abbr Abst) \to (\forall (P: +Prop).P)) (\lambda (H: (eq B Abbr Abst)).(\lambda (P: Prop).(let H0 \def +(eq_ind B Abbr (\lambda (ee: B).(match ee with [Abbr \Rightarrow True | Abst +\Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind P +H0))))) (or_intror (eq B Abbr Void) ((eq B Abbr Void) \to (\forall (P: +Prop).P)) (\lambda (H: (eq B Abbr Void)).(\lambda (P: Prop).(let H0 \def +(eq_ind B Abbr (\lambda (ee: B).(match ee with [Abbr \Rightarrow True | Abst +\Rightarrow False | Void \Rightarrow False])) I Void H) in (False_ind P +H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abst b) ((eq B +Abst b) \to (\forall (P: Prop).P)))) (or_intror (eq B Abst Abbr) ((eq B Abst +Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Abbr)).(\lambda (P: +Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee with [Abbr +\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Abbr +H) in (False_ind P H0))))) (or_introl (eq B Abst Abst) ((eq B Abst Abst) \to +(\forall (P: Prop).P)) (refl_equal B Abst)) (or_intror (eq B Abst Void) ((eq +B Abst Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst +Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match +ee with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow +False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind +(\lambda (b: B).(or (eq B Void b) ((eq B Void b) \to (\forall (P: Prop).P)))) +(or_intror (eq B Void Abbr) ((eq B Void Abbr) \to (\forall (P: Prop).P)) +(\lambda (H: (eq B Void Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void +(\lambda (ee: B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow +False | Void \Rightarrow True])) I Abbr H) in (False_ind P H0))))) (or_intror +(eq B Void Abst) ((eq B Void Abst) \to (\forall (P: Prop).P)) (\lambda (H: +(eq B Void Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda +(ee: B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow False | +Void \Rightarrow True])) I Abst H) in (False_ind P H0))))) (or_introl (eq B +Void Void) ((eq B Void Void) \to (\forall (P: Prop).P)) (refl_equal B Void)) +b2)) b1). + +lemma bind_dec_not: + \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) (not (eq B b1 b2)))) +\def + \lambda (b1: B).(\lambda (b2: B).(let H_x \def (terms_props__bind_dec b1 b2) +in (let H \def H_x in (or_ind (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: +Prop).P)) (or (eq B b1 b2) ((eq B b1 b2) \to False)) (\lambda (H0: (eq B b1 +b2)).(or_introl (eq B b1 b2) ((eq B b1 b2) \to False) H0)) (\lambda (H0: +(((eq B b1 b2) \to (\forall (P: Prop).P)))).(or_intror (eq B b1 b2) ((eq B b1 +b2) \to False) (\lambda (H1: (eq B b1 b2)).(H0 H1 False)))) H)))). + +fact terms_props__flat_dec: + \forall (f1: F).(\forall (f2: F).(or (eq F f1 f2) ((eq F f1 f2) \to (\forall +(P: Prop).P)))) +\def + \lambda (f1: F).(F_ind (\lambda (f: F).(\forall (f2: F).(or (eq F f f2) ((eq +F f f2) \to (\forall (P: Prop).P))))) (\lambda (f2: F).(F_ind (\lambda (f: +F).(or (eq F Appl f) ((eq F Appl f) \to (\forall (P: Prop).P)))) (or_introl +(eq F Appl Appl) ((eq F Appl Appl) \to (\forall (P: Prop).P)) (refl_equal F +Appl)) (or_intror (eq F Appl Cast) ((eq F Appl Cast) \to (\forall (P: +Prop).P)) (\lambda (H: (eq F Appl Cast)).(\lambda (P: Prop).(let H0 \def +(eq_ind F Appl (\lambda (ee: F).(match ee with [Appl \Rightarrow True | Cast +\Rightarrow False])) I Cast H) in (False_ind P H0))))) f2)) (\lambda (f2: +F).(F_ind (\lambda (f: F).(or (eq F Cast f) ((eq F Cast f) \to (\forall (P: +Prop).P)))) (or_intror (eq F Cast Appl) ((eq F Cast Appl) \to (\forall (P: +Prop).P)) (\lambda (H: (eq F Cast Appl)).(\lambda (P: Prop).(let H0 \def +(eq_ind F Cast (\lambda (ee: F).(match ee with [Appl \Rightarrow False | Cast +\Rightarrow True])) I Appl H) in (False_ind P H0))))) (or_introl (eq F Cast +Cast) ((eq F Cast Cast) \to (\forall (P: Prop).P)) (refl_equal F Cast)) f2)) +f1). + +fact terms_props__kind_dec: + \forall (k1: K).(\forall (k2: K).(or (eq K k1 k2) ((eq K k1 k2) \to (\forall +(P: Prop).P)))) +\def + \lambda (k1: K).(K_ind (\lambda (k: K).(\forall (k2: K).(or (eq K k k2) ((eq +K k k2) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (k2: K).(K_ind +(\lambda (k: K).(or (eq K (Bind b) k) ((eq K (Bind b) k) \to (\forall (P: +Prop).P)))) (\lambda (b0: B).(let H_x \def (terms_props__bind_dec b b0) in +(let H \def H_x in (or_ind (eq B b b0) ((eq B b b0) \to (\forall (P: +Prop).P)) (or (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to +(\forall (P: Prop).P))) (\lambda (H0: (eq B b b0)).(eq_ind B b (\lambda (b1: +B).(or (eq K (Bind b) (Bind b1)) ((eq K (Bind b) (Bind b1)) \to (\forall (P: +Prop).P)))) (or_introl (eq K (Bind b) (Bind b)) ((eq K (Bind b) (Bind b)) \to +(\forall (P: Prop).P)) (refl_equal K (Bind b))) b0 H0)) (\lambda (H0: (((eq B +b b0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Bind b) (Bind b0)) ((eq +K (Bind b) (Bind b0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Bind b) +(Bind b0))).(\lambda (P: Prop).(let H2 \def (f_equal K B (\lambda (e: +K).(match e with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])) (Bind +b) (Bind b0) H1) in (let H3 \def (eq_ind_r B b0 (\lambda (b1: B).((eq B b b1) +\to (\forall (P0: Prop).P0))) H0 b H2) in (H3 (refl_equal B b) P))))))) H)))) +(\lambda (f: F).(or_intror (eq K (Bind b) (Flat f)) ((eq K (Bind b) (Flat f)) +\to (\forall (P: Prop).P)) (\lambda (H: (eq K (Bind b) (Flat f))).(\lambda +(P: Prop).(let H0 \def (eq_ind K (Bind b) (\lambda (ee: K).(match ee with +[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])) I (Flat f) H) in +(False_ind P H0)))))) k2))) (\lambda (f: F).(\lambda (k2: K).(K_ind (\lambda +(k: K).(or (eq K (Flat f) k) ((eq K (Flat f) k) \to (\forall (P: Prop).P)))) +(\lambda (b: B).(or_intror (eq K (Flat f) (Bind b)) ((eq K (Flat f) (Bind b)) +\to (\forall (P: Prop).P)) (\lambda (H: (eq K (Flat f) (Bind b))).(\lambda +(P: Prop).(let H0 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind b) H) in +(False_ind P H0)))))) (\lambda (f0: F).(let H_x \def (terms_props__flat_dec f +f0) in (let H \def H_x in (or_ind (eq F f f0) ((eq F f f0) \to (\forall (P: +Prop).P)) (or (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to +(\forall (P: Prop).P))) (\lambda (H0: (eq F f f0)).(eq_ind F f (\lambda (f1: +F).(or (eq K (Flat f) (Flat f1)) ((eq K (Flat f) (Flat f1)) \to (\forall (P: +Prop).P)))) (or_introl (eq K (Flat f) (Flat f)) ((eq K (Flat f) (Flat f)) \to +(\forall (P: Prop).P)) (refl_equal K (Flat f))) f0 H0)) (\lambda (H0: (((eq F +f f0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Flat f) (Flat f0)) ((eq +K (Flat f) (Flat f0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Flat f) +(Flat f0))).(\lambda (P: Prop).(let H2 \def (f_equal K F (\lambda (e: +K).(match e with [(Bind _) \Rightarrow f | (Flat f1) \Rightarrow f1])) (Flat +f) (Flat f0) H1) in (let H3 \def (eq_ind_r F f0 (\lambda (f1: F).((eq F f f1) +\to (\forall (P0: Prop).P0))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) +k2))) k1). + +lemma term_dec: + \forall (t1: T).(\forall (t2: T).(or (eq T t1 t2) ((eq T t1 t2) \to (\forall +(P: Prop).P)))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (t2: T).(or (eq T t t2) ((eq +T t t2) \to (\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (t2: +T).(T_ind (\lambda (t: T).(or (eq T (TSort n) t) ((eq T (TSort n) t) \to +(\forall (P: Prop).P)))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in +(let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: +Prop).P)) (or (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to +(\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda +(n1: nat).(or (eq T (TSort n) (TSort n1)) ((eq T (TSort n) (TSort n1)) \to +(\forall (P: Prop).P)))) (or_introl (eq T (TSort n) (TSort n)) ((eq T (TSort +n) (TSort n)) \to (\forall (P: Prop).P)) (refl_equal T (TSort n))) n0 H0)) +(\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T +(TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P)) +(\lambda (H1: (eq T (TSort n) (TSort n0))).(\lambda (P: Prop).(let H2 \def +(f_equal T nat (\lambda (e: T).(match e with [(TSort n1) \Rightarrow n1 | +(TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort n0) +H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n1: nat).((eq nat n n1) \to +(\forall (P0: Prop).P0))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) +(\lambda (n0: nat).(or_intror (eq T (TSort n) (TLRef n0)) ((eq T (TSort n) +(TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TSort n) (TLRef +n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (TLRef n0) H) in (False_ind P H0)))))) +(\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TSort n) t) ((eq T +(TSort n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or +(eq T (TSort n) t0) ((eq T (TSort n) t0) \to (\forall (P: +Prop).P)))).(or_intror (eq T (TSort n) (THead k t t0)) ((eq T (TSort n) +(THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) +(THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TSort n) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow +False | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind +P H2)))))))))) t2))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: +T).(or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))) +(\lambda (n0: nat).(or_intror (eq T (TLRef n) (TSort n0)) ((eq T (TLRef n) +(TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TLRef n) (TSort +n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (TSort n0) H) in (False_ind P H0)))))) +(\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind +(eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TLRef n) +(TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P))) (\lambda +(H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TLRef n) +(TLRef n1)) ((eq T (TLRef n) (TLRef n1)) \to (\forall (P: Prop).P)))) +(or_introl (eq T (TLRef n) (TLRef n)) ((eq T (TLRef n) (TLRef n)) \to +(\forall (P: Prop).P)) (refl_equal T (TLRef n))) n0 H0)) (\lambda (H0: (((eq +nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (TLRef n0)) +((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T +(TLRef n) (TLRef n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat +(\lambda (e: T).(match e with [(TSort _) \Rightarrow n | (TLRef n1) +\Rightarrow n1 | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H1) in +(let H3 \def (eq_ind_r nat n0 (\lambda (n1: nat).((eq nat n n1) \to (\forall +(P0: Prop).P0))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda +(k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TLRef n) t) ((eq T (TLRef n) +t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T +(TLRef n) t0) ((eq T (TLRef n) t0) \to (\forall (P: Prop).P)))).(or_intror +(eq T (TLRef n) (THead k t t0)) ((eq T (TLRef n) (THead k t t0)) \to (\forall +(P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (THead k t t0))).(\lambda (P: +Prop).(let H2 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) +(\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).(or (eq T t +t2) ((eq T t t2) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda +(H0: ((\forall (t2: T).(or (eq T t0 t2) ((eq T t0 t2) \to (\forall (P: +Prop).P)))))).(\lambda (t2: T).(T_ind (\lambda (t3: T).(or (eq T (THead k t +t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (n: +nat).(or_intror (eq T (THead k t t0) (TSort n)) ((eq T (THead k t t0) (TSort +n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TSort +n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TSort n) H1) in (False_ind P H2)))))) +(\lambda (n: nat).(or_intror (eq T (THead k t t0) (TLRef n)) ((eq T (THead k +t t0) (TLRef n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t +t0) (TLRef n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in +(False_ind P H2)))))) (\lambda (k0: K).(\lambda (t3: T).(\lambda (H1: (or (eq +T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: +Prop).P)))).(\lambda (t4: T).(\lambda (H2: (or (eq T (THead k t t0) t4) ((eq +T (THead k t t0) t4) \to (\forall (P: Prop).P)))).(let H_x \def (H t3) in +(let H3 \def H_x in (or_ind (eq T t t3) ((eq T t t3) \to (\forall (P: +Prop).P)) (or (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) +(THead k0 t3 t4)) \to (\forall (P: Prop).P))) (\lambda (H4: (eq T t t3)).(let +H5 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T +(THead k t t0) t5) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t +(\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t5 t4)) ((eq T (THead k t +t0) (THead k0 t5 t4)) \to (\forall (P: Prop).P)))) (let H_x0 \def (H0 t4) in +(let H6 \def H_x0 in (or_ind (eq T t0 t4) ((eq T t0 t4) \to (\forall (P: +Prop).P)) (or (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) +(THead k0 t t4)) \to (\forall (P: Prop).P))) (\lambda (H7: (eq T t0 t4)).(let +H8 \def (eq_ind_r T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T +(THead k t t0) t5) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 +(\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t t5)) ((eq T (THead k t +t0) (THead k0 t t5)) \to (\forall (P: Prop).P)))) (let H_x1 \def +(terms_props__kind_dec k k0) in (let H9 \def H_x1 in (or_ind (eq K k k0) ((eq +K k k0) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t0)) +((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P))) (\lambda +(H10: (eq K k k0)).(eq_ind K k (\lambda (k1: K).(or (eq T (THead k t t0) +(THead k1 t t0)) ((eq T (THead k t t0) (THead k1 t t0)) \to (\forall (P: +Prop).P)))) (or_introl (eq T (THead k t t0) (THead k t t0)) ((eq T (THead k t +t0) (THead k t t0)) \to (\forall (P: Prop).P)) (refl_equal T (THead k t t0))) +k0 H10)) (\lambda (H10: (((eq K k k0) \to (\forall (P: Prop).P)))).(or_intror +(eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) +\to (\forall (P: Prop).P)) (\lambda (H11: (eq T (THead k t t0) (THead k0 t +t0))).(\lambda (P: Prop).(let H12 \def (f_equal T K (\lambda (e: T).(match e +with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) +\Rightarrow k1])) (THead k t t0) (THead k0 t t0) H11) in (let H13 \def +(eq_ind_r K k0 (\lambda (k1: K).((eq K k k1) \to (\forall (P0: Prop).P0))) +H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) t4 H7))) (\lambda (H7: +(((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) +(THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: +Prop).P)) (\lambda (H8: (eq T (THead k t t0) (THead k0 t t4))).(\lambda (P: +Prop).(let H9 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) +(THead k t t0) (THead k0 t t4) H8) in ((let H10 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t t4) H8) in +(\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t5: T).((eq +T t0 t5) \to (\forall (P0: Prop).P0))) H7 t0 H10) in (let H13 \def (eq_ind_r +T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k t t0) t5) +\to (\forall (P0: Prop).P0)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) +H9)))))) H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: +Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k +t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P)) (\lambda (H5: (eq T (THead +k t t0) (THead k0 t3 t4))).(\lambda (P: Prop).(let H6 \def (f_equal T K +(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k t t0) (THead k0 t3 +t4) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t5 _) \Rightarrow t5])) +(THead k t t0) (THead k0 t3 t4) H5) in ((let H8 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t3 t4) H5) in +(\lambda (H9: (eq T t t3)).(\lambda (_: (eq K k k0)).(let H11 \def (eq_ind_r +T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k t t0) t5) +\to (\forall (P0: Prop).P0)))) H2 t0 H8) in (let H12 \def (eq_ind_r T t3 +(\lambda (t5: T).((eq T t t5) \to (\forall (P0: Prop).P0))) H4 t H9) in (let +H13 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T +(THead k t t0) t5) \to (\forall (P0: Prop).P0)))) H1 t H9) in (H12 +(refl_equal T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1). + +lemma binder_dec: + \forall (t: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: +T).(eq T t (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall +(u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(or (ex_3 B T T (\lambda (b: +B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) +(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w +u)) \to (\forall (P: Prop).P))))))) (\lambda (n: nat).(or_intror (ex_3 B T T +(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TSort n) (THead (Bind +b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TSort n) +(THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda +(w: T).(\lambda (u: T).(\lambda (H: (eq T (TSort n) (THead (Bind b) w +u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P +H0))))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda +(w: T).(\lambda (u: T).(eq T (TLRef n) (THead (Bind b) w u)))))) (\forall (b: +B).(\forall (w: T).(\forall (u: T).((eq T (TLRef n) (THead (Bind b) w u)) \to +(\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: +T).(\lambda (H: (eq T (TLRef n) (THead (Bind b) w u))).(\lambda (P: +Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) +(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t0: T).((or (ex_3 B T T +(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w +u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead +(Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: T).((or (ex_3 +B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind +b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead +(Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or (ex_3 B T T (\lambda +(b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 t0 t1) (THead (Bind b) +w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead k0 t0 +t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))))))) (\lambda (b: +B).(\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b0: B).(\lambda +(w: T).(\lambda (u: T).(eq T t0 (THead (Bind b0) w u)))))) (\forall (b0: +B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b0) w u)) \to +(\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T +(\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b0) w +u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead +(Bind b0) w u)) \to (\forall (P: Prop).P))))))).(or_introl (ex_3 B T T +(\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) +(THead (Bind b0) w u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: +T).((eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)) \to (\forall (P: +Prop).P))))) (ex_3_intro B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: +T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u))))) b t0 t1 (refl_equal +T (THead (Bind b) t0 t1))))))))) (\lambda (f: F).(\lambda (t0: T).(\lambda +(_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 +(THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: +T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda +(t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda +(u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: +T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: +Prop).P))))))).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: +T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)))))) +(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Flat f) t0 t1) +(THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda +(w: T).(\lambda (u: T).(\lambda (H1: (eq T (THead (Flat f) t0 t1) (THead +(Bind b) w u))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead (Flat f) t0 +t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) w u) H1) +in (False_ind P H2))))))))))))) k)) t). + +lemma abst_dec: + \forall (u: T).(\forall (v: T).(or (ex T (\lambda (t: T).(eq T u (THead +(Bind Abst) v t)))) (\forall (t: T).((eq T u (THead (Bind Abst) v t)) \to +(\forall (P: Prop).P))))) +\def + \lambda (u: T).(T_ind (\lambda (t: T).(\forall (v: T).(or (ex T (\lambda +(t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead +(Bind Abst) v t0)) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda +(v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) (THead (Bind Abst) v +t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind Abst) v t)) \to (\forall +(P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TSort n) (THead (Bind +Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow +False | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in +(False_ind P H0)))))))) (\lambda (n: nat).(\lambda (v: T).(or_intror (ex T +(\lambda (t: T).(eq T (TLRef n) (THead (Bind Abst) v t)))) (\forall (t: +T).((eq T (TLRef n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) +(\lambda (t: T).(\lambda (H: (eq T (TLRef n) (THead (Bind Abst) v +t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind +P H0)))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: ((\forall (v: +T).(or (ex T (\lambda (t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall +(t0: T).((eq T t (THead (Bind Abst) v t0)) \to (\forall (P: +Prop).P))))))).(\lambda (t0: T).(\lambda (_: ((\forall (v: T).(or (ex T +(\lambda (t1: T).(eq T t0 (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T +t0 (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))))))).(\lambda (v: +T).(let H_x \def (terms_props__kind_dec k (Bind Abst)) in (let H1 \def H_x in +(or_ind (eq K k (Bind Abst)) ((eq K k (Bind Abst)) \to (\forall (P: Prop).P)) +(or (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) +(\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall +(P: Prop).P)))) (\lambda (H2: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) +(\lambda (k0: K).(or (ex T (\lambda (t1: T).(eq T (THead k0 t t0) (THead +(Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k0 t t0) (THead (Bind +Abst) v t1)) \to (\forall (P: Prop).P))))) (let H_x0 \def (term_dec t v) in +(let H3 \def H_x0 in (or_ind (eq T t v) ((eq T t v) \to (\forall (P: +Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead +(Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead +(Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H4: (eq T t +v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq T (THead +(Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq T (THead +(Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: Prop).P))))) +(or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind +Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind +Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t1: T).(eq T +(THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 (refl_equal T (THead +(Bind Abst) t t0)))) v H4)) (\lambda (H4: (((eq T t v) \to (\forall (P: +Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) +(THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) +(THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: +T).(\lambda (H5: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v +t1))).(\lambda (P: Prop).(let H6 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t2 _) +\Rightarrow t2])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H5) in +((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) +(THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H5) in (\lambda (H8: (eq T +t v)).(H4 H8 P))) H6))))))) H3))) k H2)) (\lambda (H2: (((eq K k (Bind Abst)) +\to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k +t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) +(THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: +T).(\lambda (H3: (eq T (THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: +Prop).(let H4 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) +(THead k t t0) (THead (Bind Abst) v t1) H3) in ((let H5 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef _) +\Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead k t t0) (THead (Bind +Abst) v t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) +\Rightarrow t2])) (THead k t t0) (THead (Bind Abst) v t1) H3) in (\lambda (_: +(eq T t v)).(\lambda (H8: (eq K k (Bind Abst))).(H2 H8 P)))) H5)) H4))))))) +H1))))))))) u). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/T/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/defs.ma new file mode 100644 index 000000000..554c4de72 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/defs.ma @@ -0,0 +1,45 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/preamble.ma". + +inductive B: Type[0] \def +| Abbr: B +| Abst: B +| Void: B. + +inductive F: Type[0] \def +| Appl: F +| Cast: F. + +inductive K: Type[0] \def +| Bind: B \to K +| Flat: F \to K. + +inductive T: Type[0] \def +| TSort: nat \to T +| TLRef: nat \to T +| THead: K \to (T \to (T \to T)). + +rec definition tweight (t: T) on t: nat \def match t with [(TSort _) +\Rightarrow (S O) | (TLRef _) \Rightarrow (S O) | (THead _ u t0) \Rightarrow +(S (plus (tweight u) (tweight t0)))]. + +definition tle: + T \to (T \to Prop) +\def + \lambda (t1: T).(\lambda (t2: T).(le (tweight t1) (tweight t2))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/T/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/fwd.ma new file mode 100644 index 000000000..570b70c3f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/fwd.ma @@ -0,0 +1,64 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +implied rec lemma T_rect (P: (T \to Type[0])) (f: (\forall (n: nat).(P (TSort +n)))) (f0: (\forall (n: nat).(P (TLRef n)))) (f1: (\forall (k: K).(\forall +(t: T).((P t) \to (\forall (t0: T).((P t0) \to (P (THead k t t0)))))))) (t: +T) on t: P t \def match t with [(TSort n) \Rightarrow (f n) | (TLRef n) +\Rightarrow (f0 n) | (THead k t0 t1) \Rightarrow (f1 k t0 ((T_rect P f f0 f1) +t0) t1 ((T_rect P f f0 f1) t1))]. + +implied lemma T_ind: + \forall (P: ((T \to Prop))).(((\forall (n: nat).(P (TSort n)))) \to +(((\forall (n: nat).(P (TLRef n)))) \to (((\forall (k: K).(\forall (t: T).((P +t) \to (\forall (t0: T).((P t0) \to (P (THead k t t0)))))))) \to (\forall (t: +T).(P t))))) +\def + \lambda (P: ((T \to Prop))).(T_rect P). + +lemma thead_x_y_y: + \forall (k: K).(\forall (v: T).(\forall (t: T).((eq T (THead k v t) t) \to +(\forall (P: Prop).P)))) +\def + \lambda (k: K).(\lambda (v: T).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq +T (THead k v t0) t0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda +(H: (eq T (THead k v (TSort n)) (TSort n))).(\lambda (P: Prop).(let H0 \def +(eq_ind T (THead k v (TSort n)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H) in (False_ind P H0))))) (\lambda (n: nat).(\lambda (H: +(eq T (THead k v (TLRef n)) (TLRef n))).(\lambda (P: Prop).(let H0 \def +(eq_ind T (THead k v (TLRef n)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TLRef n) H) in (False_ind P H0))))) (\lambda (k0: K).(\lambda (t0: +T).(\lambda (_: (((eq T (THead k v t0) t0) \to (\forall (P: +Prop).P)))).(\lambda (t1: T).(\lambda (H0: (((eq T (THead k v t1) t1) \to +(\forall (P: Prop).P)))).(\lambda (H1: (eq T (THead k v (THead k0 t0 t1)) +(THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: +T).(match e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead +k1 _ _) \Rightarrow k1])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) +in ((let H3 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t2 _) \Rightarrow t2])) +(THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T +T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead k0 t0 t1) | +(TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t2) \Rightarrow t2])) +(THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (H5: (eq T v +t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind T v (\lambda (t2: +T).((eq T (THead k t2 t1) t1) \to (\forall (P0: Prop).P0))) H0 t0 H5) in (let +H8 \def (eq_ind K k (\lambda (k1: K).((eq T (THead k1 t0 t1) t1) \to (\forall +(P0: Prop).P0))) H7 k0 H6) in (H8 H4 P)))))) H3)) H2))))))))) t))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/T/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/T/props.ma new file mode 100644 index 000000000..1011e4029 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/T/props.ma @@ -0,0 +1,64 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/fwd.ma". + +lemma not_abbr_abst: + not (eq B Abbr Abst) +\def + \lambda (H: (eq B Abbr Abst)).(let H0 \def (eq_ind B Abbr (\lambda (ee: +B).(match ee with [Abbr \Rightarrow True | Abst \Rightarrow False | Void +\Rightarrow False])) I Abst H) in (False_ind False H0)). + +lemma not_void_abst: + not (eq B Void Abst) +\def + \lambda (H: (eq B Void Abst)).(let H0 \def (eq_ind B Void (\lambda (ee: +B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow False | Void +\Rightarrow True])) I Abst H) in (False_ind False H0)). + +lemma not_abbr_void: + not (eq B Abbr Void) +\def + \lambda (H: (eq B Abbr Void)).(let H0 \def (eq_ind B Abbr (\lambda (ee: +B).(match ee with [Abbr \Rightarrow True | Abst \Rightarrow False | Void +\Rightarrow False])) I Void H) in (False_ind False H0)). + +lemma not_abst_void: + not (eq B Abst Void) +\def + \lambda (H: (eq B Abst Void)).(let H0 \def (eq_ind B Abst (\lambda (ee: +B).(match ee with [Abbr \Rightarrow False | Abst \Rightarrow True | Void +\Rightarrow False])) I Void H) in (False_ind False H0)). + +lemma tweight_lt: + \forall (t: T).(lt O (tweight t)) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(lt O (tweight t0))) (\lambda (_: +nat).(le_n (S O))) (\lambda (_: nat).(le_n (S O))) (\lambda (_: K).(\lambda +(t0: T).(\lambda (H: (lt O (tweight t0))).(\lambda (t1: T).(\lambda (_: (lt O +(tweight t1))).(le_S (S O) (plus (tweight t0) (tweight t1)) (le_plus_trans (S +O) (tweight t0) (tweight t1) H))))))) t). + +lemma tle_r: + \forall (t: T).(tle t t) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(le (tweight t0) (tweight t0))) +(\lambda (_: nat).(le_n (S O))) (\lambda (_: nat).(le_n (S O))) (\lambda (_: +K).(\lambda (t0: T).(\lambda (_: (le (tweight t0) (tweight t0))).(\lambda +(t1: T).(\lambda (_: (le (tweight t1) (tweight t1))).(le_n (S (plus (tweight +t0) (tweight t1))))))))) t). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/aplus/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/aplus/defs.ma new file mode 100644 index 000000000..39f108055 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/aplus/defs.ma @@ -0,0 +1,21 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/asucc/defs.ma". + +rec definition aplus (g: G) (a: A) (n: nat) on n: A \def match n with [O +\Rightarrow a | (S n0) \Rightarrow (asucc g (aplus g a n0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/aplus/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/aplus/props.ma new file mode 100644 index 000000000..d01417a98 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/aplus/props.ma @@ -0,0 +1,240 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/aplus/defs.ma". + +include "basic_1A/A/fwd.ma". + +include "basic_1A/next_plus/props.ma". + +lemma aplus_reg_r: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (h1: nat).(\forall +(h2: nat).((eq A (aplus g a1 h1) (aplus g a2 h2)) \to (\forall (h: nat).(eq A +(aplus g a1 (plus h h1)) (aplus g a2 (plus h h2))))))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (h1: nat).(\lambda +(h2: nat).(\lambda (H: (eq A (aplus g a1 h1) (aplus g a2 h2))).(\lambda (h: +nat).(nat_ind (\lambda (n: nat).(eq A (aplus g a1 (plus n h1)) (aplus g a2 +(plus n h2)))) H (\lambda (n: nat).(\lambda (H0: (eq A (aplus g a1 (plus n +h1)) (aplus g a2 (plus n h2)))).(f_equal2 G A A asucc g g (aplus g a1 (plus n +h1)) (aplus g a2 (plus n h2)) (refl_equal G g) H0))) h))))))). + +lemma aplus_assoc: + \forall (g: G).(\forall (a: A).(\forall (h1: nat).(\forall (h2: nat).(eq A +(aplus g (aplus g a h1) h2) (aplus g a (plus h1 h2)))))) +\def + \lambda (g: G).(\lambda (a: A).(\lambda (h1: nat).(nat_ind (\lambda (n: +nat).(\forall (h2: nat).(eq A (aplus g (aplus g a n) h2) (aplus g a (plus n +h2))))) (\lambda (h2: nat).(refl_equal A (aplus g a h2))) (\lambda (n: +nat).(\lambda (_: ((\forall (h2: nat).(eq A (aplus g (aplus g a n) h2) (aplus +g a (plus n h2)))))).(\lambda (h2: nat).(nat_ind (\lambda (n0: nat).(eq A +(aplus g (asucc g (aplus g a n)) n0) (asucc g (aplus g a (plus n n0))))) +(eq_ind nat n (\lambda (n0: nat).(eq A (asucc g (aplus g a n)) (asucc g +(aplus g a n0)))) (refl_equal A (asucc g (aplus g a n))) (plus n O) (plus_n_O +n)) (\lambda (n0: nat).(\lambda (H0: (eq A (aplus g (asucc g (aplus g a n)) +n0) (asucc g (aplus g a (plus n n0))))).(eq_ind nat (S (plus n n0)) (\lambda +(n1: nat).(eq A (asucc g (aplus g (asucc g (aplus g a n)) n0)) (asucc g +(aplus g a n1)))) (f_equal2 G A A asucc g g (aplus g (asucc g (aplus g a n)) +n0) (asucc g (aplus g a (plus n n0))) (refl_equal G g) H0) (plus n (S n0)) +(plus_n_Sm n n0)))) h2)))) h1))). + +lemma aplus_asucc: + \forall (g: G).(\forall (h: nat).(\forall (a: A).(eq A (aplus g (asucc g a) +h) (asucc g (aplus g a h))))) +\def + \lambda (g: G).(\lambda (h: nat).(\lambda (a: A).(eq_ind_r A (aplus g a +(plus (S O) h)) (\lambda (a0: A).(eq A a0 (asucc g (aplus g a h)))) +(refl_equal A (asucc g (aplus g a h))) (aplus g (aplus g a (S O)) h) +(aplus_assoc g a (S O) h)))). + +lemma aplus_sort_O_S_simpl: + \forall (g: G).(\forall (n: nat).(\forall (k: nat).(eq A (aplus g (ASort O +n) (S k)) (aplus g (ASort O (next g n)) k)))) +\def + \lambda (g: G).(\lambda (n: nat).(\lambda (k: nat).(eq_ind A (aplus g (asucc +g (ASort O n)) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n)) k))) +(refl_equal A (aplus g (ASort O (next g n)) k)) (asucc g (aplus g (ASort O n) +k)) (aplus_asucc g k (ASort O n))))). + +lemma aplus_sort_S_S_simpl: + \forall (g: G).(\forall (n: nat).(\forall (h: nat).(\forall (k: nat).(eq A +(aplus g (ASort (S h) n) (S k)) (aplus g (ASort h n) k))))) +\def + \lambda (g: G).(\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(eq_ind +A (aplus g (asucc g (ASort (S h) n)) k) (\lambda (a: A).(eq A a (aplus g +(ASort h n) k))) (refl_equal A (aplus g (ASort h n) k)) (asucc g (aplus g +(ASort (S h) n) k)) (aplus_asucc g k (ASort (S h) n)))))). + +lemma aplus_asort_O_simpl: + \forall (g: G).(\forall (h: nat).(\forall (n: nat).(eq A (aplus g (ASort O +n) h) (ASort O (next_plus g n h))))) +\def + \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (n0: +nat).(eq A (aplus g (ASort O n0) n) (ASort O (next_plus g n0 n))))) (\lambda +(n: nat).(refl_equal A (ASort O n))) (\lambda (n: nat).(\lambda (H: ((\forall +(n0: nat).(eq A (aplus g (ASort O n0) n) (ASort O (next_plus g n0 +n)))))).(\lambda (n0: nat).(eq_ind A (aplus g (asucc g (ASort O n0)) n) +(\lambda (a: A).(eq A a (ASort O (next g (next_plus g n0 n))))) (eq_ind nat +(next_plus g (next g n0) n) (\lambda (n1: nat).(eq A (aplus g (ASort O (next +g n0)) n) (ASort O n1))) (H (next g n0)) (next g (next_plus g n0 n)) +(next_plus_next g n0 n)) (asucc g (aplus g (ASort O n0) n)) (aplus_asucc g n +(ASort O n0)))))) h)). + +lemma aplus_asort_le_simpl: + \forall (g: G).(\forall (h: nat).(\forall (k: nat).(\forall (n: nat).((le h +k) \to (eq A (aplus g (ASort k n) h) (ASort (minus k h) n)))))) +\def + \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (k: +nat).(\forall (n0: nat).((le n k) \to (eq A (aplus g (ASort k n0) n) (ASort +(minus k n) n0)))))) (\lambda (k: nat).(\lambda (n: nat).(\lambda (_: (le O +k)).(eq_ind nat k (\lambda (n0: nat).(eq A (ASort k n) (ASort n0 n))) +(refl_equal A (ASort k n)) (minus k O) (minus_n_O k))))) (\lambda (h0: +nat).(\lambda (H: ((\forall (k: nat).(\forall (n: nat).((le h0 k) \to (eq A +(aplus g (ASort k n) h0) (ASort (minus k h0) n))))))).(\lambda (k: +nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le (S h0) n) \to (eq A +(asucc g (aplus g (ASort n n0) h0)) (ASort (minus n (S h0)) n0))))) (\lambda +(n: nat).(\lambda (H0: (le (S h0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat +O (S n0))) (\lambda (n0: nat).(le h0 n0)) (eq A (asucc g (aplus g (ASort O n) +h0)) (ASort (minus O (S h0)) n)) (\lambda (x: nat).(\lambda (H1: (eq nat O (S +x))).(\lambda (_: (le h0 x)).(let H3 \def (eq_ind nat O (\lambda (ee: +nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) +H1) in (False_ind (eq A (asucc g (aplus g (ASort O n) h0)) (ASort (minus O (S +h0)) n)) H3))))) (le_gen_S h0 O H0)))) (\lambda (n: nat).(\lambda (_: +((\forall (n0: nat).((le (S h0) n) \to (eq A (asucc g (aplus g (ASort n n0) +h0)) (ASort (minus n (S h0)) n0)))))).(\lambda (n0: nat).(\lambda (H1: (le (S +h0) (S n))).(eq_ind A (aplus g (asucc g (ASort (S n) n0)) h0) (\lambda (a: +A).(eq A a (ASort (minus (S n) (S h0)) n0))) (H n n0 (le_S_n h0 n H1)) (asucc +g (aplus g (ASort (S n) n0) h0)) (aplus_asucc g h0 (ASort (S n) n0))))))) +k)))) h)). + +lemma aplus_asort_simpl: + \forall (g: G).(\forall (h: nat).(\forall (k: nat).(\forall (n: nat).(eq A +(aplus g (ASort k n) h) (ASort (minus k h) (next_plus g n (minus h k))))))) +\def + \lambda (g: G).(\lambda (h: nat).(\lambda (k: nat).(\lambda (n: +nat).(lt_le_e k h (eq A (aplus g (ASort k n) h) (ASort (minus k h) (next_plus +g n (minus h k)))) (\lambda (H: (lt k h)).(eq_ind_r nat (plus k (minus h k)) +(\lambda (n0: nat).(eq A (aplus g (ASort k n) n0) (ASort (minus k h) +(next_plus g n (minus h k))))) (eq_ind A (aplus g (aplus g (ASort k n) k) +(minus h k)) (\lambda (a: A).(eq A a (ASort (minus k h) (next_plus g n (minus +h k))))) (eq_ind_r A (ASort (minus k k) n) (\lambda (a: A).(eq A (aplus g a +(minus h k)) (ASort (minus k h) (next_plus g n (minus h k))))) (eq_ind nat O +(\lambda (n0: nat).(eq A (aplus g (ASort n0 n) (minus h k)) (ASort (minus k +h) (next_plus g n (minus h k))))) (eq_ind_r nat O (\lambda (n0: nat).(eq A +(aplus g (ASort O n) (minus h k)) (ASort n0 (next_plus g n (minus h k))))) +(aplus_asort_O_simpl g (minus h k) n) (minus k h) (O_minus k h (le_S_n k h +(le_S_n (S k) (S h) (le_S (S (S k)) (S h) (le_n_S (S k) h H)))))) (minus k k) +(minus_n_n k)) (aplus g (ASort k n) k) (aplus_asort_le_simpl g k k n (le_n +k))) (aplus g (ASort k n) (plus k (minus h k))) (aplus_assoc g (ASort k n) k +(minus h k))) h (le_plus_minus k h (le_S_n k h (le_S_n (S k) (S h) (le_S (S +(S k)) (S h) (le_n_S (S k) h H))))))) (\lambda (H: (le h k)).(eq_ind_r A +(ASort (minus k h) n) (\lambda (a: A).(eq A a (ASort (minus k h) (next_plus g +n (minus h k))))) (eq_ind_r nat O (\lambda (n0: nat).(eq A (ASort (minus k h) +n) (ASort (minus k h) (next_plus g n n0)))) (refl_equal A (ASort (minus k h) +(next_plus g n O))) (minus h k) (O_minus h k H)) (aplus g (ASort k n) h) +(aplus_asort_le_simpl g h k n H))))))). + +lemma aplus_ahead_simpl: + \forall (g: G).(\forall (h: nat).(\forall (a1: A).(\forall (a2: A).(eq A +(aplus g (AHead a1 a2) h) (AHead a1 (aplus g a2 h)))))) +\def + \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (a1: +A).(\forall (a2: A).(eq A (aplus g (AHead a1 a2) n) (AHead a1 (aplus g a2 +n)))))) (\lambda (a1: A).(\lambda (a2: A).(refl_equal A (AHead a1 a2)))) +(\lambda (n: nat).(\lambda (H: ((\forall (a1: A).(\forall (a2: A).(eq A +(aplus g (AHead a1 a2) n) (AHead a1 (aplus g a2 n))))))).(\lambda (a1: +A).(\lambda (a2: A).(eq_ind A (aplus g (asucc g (AHead a1 a2)) n) (\lambda +(a: A).(eq A a (AHead a1 (asucc g (aplus g a2 n))))) (eq_ind A (aplus g +(asucc g a2) n) (\lambda (a: A).(eq A (aplus g (asucc g (AHead a1 a2)) n) +(AHead a1 a))) (H a1 (asucc g a2)) (asucc g (aplus g a2 n)) (aplus_asucc g n +a2)) (asucc g (aplus g (AHead a1 a2) n)) (aplus_asucc g n (AHead a1 a2))))))) +h)). + +lemma aplus_asucc_false: + \forall (g: G).(\forall (a: A).(\forall (h: nat).((eq A (aplus g (asucc g a) +h) a) \to (\forall (P: Prop).P)))) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (h: +nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: Prop).P)))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (h: nat).(\lambda (H: (eq A +(aplus g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h0) +\Rightarrow (ASort h0 n0)]) h) (ASort n n0))).(\lambda (P: Prop).(nat_ind +(\lambda (n1: nat).((eq A (aplus g (match n1 with [O \Rightarrow (ASort O +(next g n0)) | (S h0) \Rightarrow (ASort h0 n0)]) h) (ASort n1 n0)) \to P)) +(\lambda (H0: (eq A (aplus g (ASort O (next g n0)) h) (ASort O n0))).(let H1 +\def (eq_ind A (aplus g (ASort O (next g n0)) h) (\lambda (a0: A).(eq A a0 +(ASort O n0))) H0 (ASort (minus O h) (next_plus g (next g n0) (minus h O))) +(aplus_asort_simpl g h O (next g n0))) in (let H2 \def (f_equal A nat +(\lambda (e: A).(match e with [(ASort _ n1) \Rightarrow n1 | (AHead _ _) +\Rightarrow (next_plus g (next g n0) (minus h O))])) (ASort (minus O h) +(next_plus g (next g n0) (minus h O))) (ASort O n0) H1) in (let H3 \def +(eq_ind_r nat (minus h O) (\lambda (n1: nat).(eq nat (next_plus g (next g n0) +n1) n0)) H2 h (minus_n_O h)) in (le_lt_false n0 n0 (le_n n0) (eq_ind nat +(next_plus g (next g n0) h) (\lambda (n1: nat).(lt n0 n1)) (next_plus_lt g h +n0) n0 H3) P))))) (\lambda (n1: nat).(\lambda (_: (((eq A (aplus g (match n1 +with [O \Rightarrow (ASort O (next g n0)) | (S h0) \Rightarrow (ASort h0 +n0)]) h) (ASort n1 n0)) \to P))).(\lambda (H0: (eq A (aplus g (ASort n1 n0) +h) (ASort (S n1) n0))).(let H1 \def (eq_ind A (aplus g (ASort n1 n0) h) +(\lambda (a0: A).(eq A a0 (ASort (S n1) n0))) H0 (ASort (minus n1 h) +(next_plus g n0 (minus h n1))) (aplus_asort_simpl g h n1 n0)) in (let H2 \def +(f_equal A nat (\lambda (e: A).(match e with [(ASort n2 _) \Rightarrow n2 | +(AHead _ _) \Rightarrow (minus n1 h)])) (ASort (minus n1 h) (next_plus g n0 +(minus h n1))) (ASort (S n1) n0) H1) in ((let H3 \def (f_equal A nat (\lambda +(e: A).(match e with [(ASort _ n2) \Rightarrow n2 | (AHead _ _) \Rightarrow +(next_plus g n0 (minus h n1))])) (ASort (minus n1 h) (next_plus g n0 (minus h +n1))) (ASort (S n1) n0) H1) in (\lambda (H4: (eq nat (minus n1 h) (S +n1))).(le_Sx_x n1 (eq_ind nat (minus n1 h) (\lambda (n2: nat).(le n2 n1)) +(minus_le n1 h) (S n1) H4) P))) H2)))))) n H)))))) (\lambda (a0: A).(\lambda +(_: ((\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: +Prop).P))))).(\lambda (a1: A).(\lambda (H0: ((\forall (h: nat).((eq A (aplus +g (asucc g a1) h) a1) \to (\forall (P: Prop).P))))).(\lambda (h: +nat).(\lambda (H1: (eq A (aplus g (AHead a0 (asucc g a1)) h) (AHead a0 +a1))).(\lambda (P: Prop).(let H2 \def (eq_ind A (aplus g (AHead a0 (asucc g +a1)) h) (\lambda (a2: A).(eq A a2 (AHead a0 a1))) H1 (AHead a0 (aplus g +(asucc g a1) h)) (aplus_ahead_simpl g h a0 (asucc g a1))) in (let H3 \def +(f_equal A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow (aplus g +(asucc g a1) h) | (AHead _ a2) \Rightarrow a2])) (AHead a0 (aplus g (asucc g +a1) h)) (AHead a0 a1) H2) in (H0 h H3 P)))))))))) a)). + +lemma aplus_inj: + \forall (g: G).(\forall (h1: nat).(\forall (h2: nat).(\forall (a: A).((eq A +(aplus g a h1) (aplus g a h2)) \to (eq nat h1 h2))))) +\def + \lambda (g: G).(\lambda (h1: nat).(nat_ind (\lambda (n: nat).(\forall (h2: +nat).(\forall (a: A).((eq A (aplus g a n) (aplus g a h2)) \to (eq nat n +h2))))) (\lambda (h2: nat).(nat_ind (\lambda (n: nat).(\forall (a: A).((eq A +(aplus g a O) (aplus g a n)) \to (eq nat O n)))) (\lambda (a: A).(\lambda (_: +(eq A a a)).(refl_equal nat O))) (\lambda (n: nat).(\lambda (_: ((\forall (a: +A).((eq A a (aplus g a n)) \to (eq nat O n))))).(\lambda (a: A).(\lambda (H0: +(eq A a (asucc g (aplus g a n)))).(let H1 \def (eq_ind_r A (asucc g (aplus g +a n)) (\lambda (a0: A).(eq A a a0)) H0 (aplus g (asucc g a) n) (aplus_asucc g +n a)) in (aplus_asucc_false g a n (sym_eq A a (aplus g (asucc g a) n) H1) (eq +nat O (S n)))))))) h2)) (\lambda (n: nat).(\lambda (H: ((\forall (h2: +nat).(\forall (a: A).((eq A (aplus g a n) (aplus g a h2)) \to (eq nat n +h2)))))).(\lambda (h2: nat).(nat_ind (\lambda (n0: nat).(\forall (a: A).((eq +A (aplus g a (S n)) (aplus g a n0)) \to (eq nat (S n) n0)))) (\lambda (a: +A).(\lambda (H0: (eq A (asucc g (aplus g a n)) a)).(let H1 \def (eq_ind_r A +(asucc g (aplus g a n)) (\lambda (a0: A).(eq A a0 a)) H0 (aplus g (asucc g a) +n) (aplus_asucc g n a)) in (aplus_asucc_false g a n H1 (eq nat (S n) O))))) +(\lambda (n0: nat).(\lambda (_: ((\forall (a: A).((eq A (asucc g (aplus g a +n)) (aplus g a n0)) \to (eq nat (S n) n0))))).(\lambda (a: A).(\lambda (H1: +(eq A (asucc g (aplus g a n)) (asucc g (aplus g a n0)))).(let H2 \def +(eq_ind_r A (asucc g (aplus g a n)) (\lambda (a0: A).(eq A a0 (asucc g (aplus +g a n0)))) H1 (aplus g (asucc g a) n) (aplus_asucc g n a)) in (let H3 \def +(eq_ind_r A (asucc g (aplus g a n0)) (\lambda (a0: A).(eq A (aplus g (asucc g +a) n) a0)) H2 (aplus g (asucc g a) n0) (aplus_asucc g n0 a)) in (f_equal nat +nat S n n0 (H n0 (asucc g a) H3)))))))) h2)))) h1)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/app/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/app/defs.ma new file mode 100644 index 000000000..af8b3b299 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/app/defs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +rec definition cbk (c: C) on c: nat \def match c with [(CSort m) \Rightarrow +m | (CHead c0 _ _) \Rightarrow (cbk c0)]. + +rec definition app1 (c: C) on c: T \to T \def \lambda (t: T).(match c with +[(CSort _) \Rightarrow t | (CHead c0 k u) \Rightarrow (app1 c0 (THead k u +t))]). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/aprem/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/aprem/defs.ma new file mode 100644 index 000000000..3b979e0c4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/aprem/defs.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/A/defs.ma". + +inductive aprem: nat \to (A \to (A \to Prop)) \def +| aprem_zero: \forall (a1: A).(\forall (a2: A).(aprem O (AHead a1 a2) a1)) +| aprem_succ: \forall (a2: A).(\forall (a: A).(\forall (i: nat).((aprem i a2 +a) \to (\forall (a1: A).(aprem (S i) (AHead a1 a2) a))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/aprem/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/aprem/fwd.ma new file mode 100644 index 000000000..38eefdf78 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/aprem/fwd.ma @@ -0,0 +1,113 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/aprem/defs.ma". + +implied rec lemma aprem_ind (P: (nat \to (A \to (A \to Prop)))) (f: (\forall +(a1: A).(\forall (a2: A).(P O (AHead a1 a2) a1)))) (f0: (\forall (a2: +A).(\forall (a: A).(\forall (i: nat).((aprem i a2 a) \to ((P i a2 a) \to +(\forall (a1: A).(P (S i) (AHead a1 a2) a)))))))) (n: nat) (a: A) (a0: A) +(a1: aprem n a a0) on a1: P n a a0 \def match a1 with [(aprem_zero a2 a3) +\Rightarrow (f a2 a3) | (aprem_succ a2 a3 i a4 a5) \Rightarrow (f0 a2 a3 i a4 +((aprem_ind P f f0) i a2 a3 a4) a5)]. + +lemma aprem_gen_sort: + \forall (x: A).(\forall (i: nat).(\forall (h: nat).(\forall (n: nat).((aprem +i (ASort h n) x) \to False)))) +\def + \lambda (x: A).(\lambda (i: nat).(\lambda (h: nat).(\lambda (n: +nat).(\lambda (H: (aprem i (ASort h n) x)).(insert_eq A (ASort h n) (\lambda +(a: A).(aprem i a x)) (\lambda (_: A).False) (\lambda (y: A).(\lambda (H0: +(aprem i y x)).(aprem_ind (\lambda (_: nat).(\lambda (a: A).(\lambda (_: +A).((eq A a (ASort h n)) \to False)))) (\lambda (a1: A).(\lambda (a2: +A).(\lambda (H1: (eq A (AHead a1 a2) (ASort h n))).(let H2 \def (eq_ind A +(AHead a1 a2) (\lambda (ee: A).(match ee with [(ASort _ _) \Rightarrow False +| (AHead _ _) \Rightarrow True])) I (ASort h n) H1) in (False_ind False +H2))))) (\lambda (a2: A).(\lambda (a: A).(\lambda (i0: nat).(\lambda (_: +(aprem i0 a2 a)).(\lambda (_: (((eq A a2 (ASort h n)) \to False))).(\lambda +(a1: A).(\lambda (H3: (eq A (AHead a1 a2) (ASort h n))).(let H4 \def (eq_ind +A (AHead a1 a2) (\lambda (ee: A).(match ee with [(ASort _ _) \Rightarrow +False | (AHead _ _) \Rightarrow True])) I (ASort h n) H3) in (False_ind False +H4))))))))) i y x H0))) H))))). + +lemma aprem_gen_head_O: + \forall (a1: A).(\forall (a2: A).(\forall (x: A).((aprem O (AHead a1 a2) x) +\to (eq A x a1)))) +\def + \lambda (a1: A).(\lambda (a2: A).(\lambda (x: A).(\lambda (H: (aprem O +(AHead a1 a2) x)).(insert_eq A (AHead a1 a2) (\lambda (a: A).(aprem O a x)) +(\lambda (_: A).(eq A x a1)) (\lambda (y: A).(\lambda (H0: (aprem O y +x)).(insert_eq nat O (\lambda (n: nat).(aprem n y x)) (\lambda (_: nat).((eq +A y (AHead a1 a2)) \to (eq A x a1))) (\lambda (y0: nat).(\lambda (H1: (aprem +y0 y x)).(aprem_ind (\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).((eq +nat n O) \to ((eq A a (AHead a1 a2)) \to (eq A a0 a1)))))) (\lambda (a0: +A).(\lambda (a3: A).(\lambda (_: (eq nat O O)).(\lambda (H3: (eq A (AHead a0 +a3) (AHead a1 a2))).(let H4 \def (f_equal A A (\lambda (e: A).(match e with +[(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a3) +(AHead a1 a2) H3) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e with +[(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a0 a3) +(AHead a1 a2) H3) in (\lambda (H6: (eq A a0 a1)).H6)) H4)))))) (\lambda (a0: +A).(\lambda (a: A).(\lambda (i: nat).(\lambda (H2: (aprem i a0 a)).(\lambda +(H3: (((eq nat i O) \to ((eq A a0 (AHead a1 a2)) \to (eq A a a1))))).(\lambda +(a3: A).(\lambda (H4: (eq nat (S i) O)).(\lambda (H5: (eq A (AHead a3 a0) +(AHead a1 a2))).(let H6 \def (f_equal A A (\lambda (e: A).(match e with +[(ASort _ _) \Rightarrow a3 | (AHead a4 _) \Rightarrow a4])) (AHead a3 a0) +(AHead a1 a2) H5) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e with +[(ASort _ _) \Rightarrow a0 | (AHead _ a4) \Rightarrow a4])) (AHead a3 a0) +(AHead a1 a2) H5) in (\lambda (_: (eq A a3 a1)).(let H9 \def (eq_ind A a0 +(\lambda (a4: A).((eq nat i O) \to ((eq A a4 (AHead a1 a2)) \to (eq A a +a1)))) H3 a2 H7) in (let H10 \def (eq_ind A a0 (\lambda (a4: A).(aprem i a4 +a)) H2 a2 H7) in (let H11 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee +with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind +(eq A a a1) H11)))))) H6)))))))))) y0 y x H1))) H0))) H)))). + +lemma aprem_gen_head_S: + \forall (a1: A).(\forall (a2: A).(\forall (x: A).(\forall (i: nat).((aprem +(S i) (AHead a1 a2) x) \to (aprem i a2 x))))) +\def + \lambda (a1: A).(\lambda (a2: A).(\lambda (x: A).(\lambda (i: nat).(\lambda +(H: (aprem (S i) (AHead a1 a2) x)).(insert_eq A (AHead a1 a2) (\lambda (a: +A).(aprem (S i) a x)) (\lambda (_: A).(aprem i a2 x)) (\lambda (y: +A).(\lambda (H0: (aprem (S i) y x)).(insert_eq nat (S i) (\lambda (n: +nat).(aprem n y x)) (\lambda (_: nat).((eq A y (AHead a1 a2)) \to (aprem i a2 +x))) (\lambda (y0: nat).(\lambda (H1: (aprem y0 y x)).(aprem_ind (\lambda (n: +nat).(\lambda (a: A).(\lambda (a0: A).((eq nat n (S i)) \to ((eq A a (AHead +a1 a2)) \to (aprem i a2 a0)))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda +(H2: (eq nat O (S i))).(\lambda (H3: (eq A (AHead a0 a3) (AHead a1 a2))).(let +H4 \def (f_equal A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow +a0 | (AHead a _) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H3) in ((let H5 +\def (f_equal A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a3 | +(AHead _ a) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H3) in (\lambda (H6: +(eq A a0 a1)).(eq_ind_r A a1 (\lambda (a: A).(aprem i a2 a)) (let H7 \def +(eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True | (S _) +\Rightarrow False])) I (S i) H2) in (False_ind (aprem i a2 a1) H7)) a0 H6))) +H4)))))) (\lambda (a0: A).(\lambda (a: A).(\lambda (i0: nat).(\lambda (H2: +(aprem i0 a0 a)).(\lambda (H3: (((eq nat i0 (S i)) \to ((eq A a0 (AHead a1 +a2)) \to (aprem i a2 a))))).(\lambda (a3: A).(\lambda (H4: (eq nat (S i0) (S +i))).(\lambda (H5: (eq A (AHead a3 a0) (AHead a1 a2))).(let H6 \def (f_equal +A A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a3 | (AHead a4 _) +\Rightarrow a4])) (AHead a3 a0) (AHead a1 a2) H5) in ((let H7 \def (f_equal A +A (\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a0 | (AHead _ a4) +\Rightarrow a4])) (AHead a3 a0) (AHead a1 a2) H5) in (\lambda (_: (eq A a3 +a1)).(let H9 \def (eq_ind A a0 (\lambda (a4: A).((eq nat i0 (S i)) \to ((eq A +a4 (AHead a1 a2)) \to (aprem i a2 a)))) H3 a2 H7) in (let H10 \def (eq_ind A +a0 (\lambda (a4: A).(aprem i0 a4 a)) H2 a2 H7) in (let H11 \def (f_equal nat +nat (\lambda (e: nat).(match e with [O \Rightarrow i0 | (S n) \Rightarrow +n])) (S i0) (S i) H4) in (let H12 \def (eq_ind nat i0 (\lambda (n: nat).((eq +nat n (S i)) \to ((eq A a2 (AHead a1 a2)) \to (aprem i a2 a)))) H9 i H11) in +(let H13 \def (eq_ind nat i0 (\lambda (n: nat).(aprem n a2 a)) H10 i H11) in +H13))))))) H6)))))))))) y0 y x H1))) H0))) H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/aprem/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/aprem/props.ma new file mode 100644 index 000000000..e43f53375 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/aprem/props.ma @@ -0,0 +1,70 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/aprem/fwd.ma". + +include "basic_1A/leq/fwd.ma". + +lemma aprem_repl: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall +(i: nat).(\forall (b2: A).((aprem i a2 b2) \to (ex2 A (\lambda (b1: A).(leq g +b1 b2)) (\lambda (b1: A).(aprem i a1 b1))))))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 +a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (i: nat).(\forall +(b2: A).((aprem i a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda +(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 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 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 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)))). + +lemma aprem_asucc: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (i: nat).((aprem i +a1 a2) \to (aprem i (asucc g a1) a2))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (i: nat).(\lambda +(H: (aprem i a1 a2)).(aprem_ind (\lambda (n: nat).(\lambda (a: A).(\lambda +(a0: A).(aprem n (asucc g a) a0)))) (\lambda (a0: A).(\lambda (a3: +A).(aprem_zero a0 (asucc g a3)))) (\lambda (a0: A).(\lambda (a: A).(\lambda +(i0: nat).(\lambda (_: (aprem i0 a0 a)).(\lambda (H1: (aprem i0 (asucc g a0) +a)).(\lambda (a3: A).(aprem_succ (asucc g a0) a i0 H1 a3))))))) i a1 a2 +H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/aprem.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/aprem.ma new file mode 100644 index 000000000..22be8e8d0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/aprem.ma @@ -0,0 +1,257 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/arity/props.ma". + +include "basic_1A/arity/cimp.ma". + +include "basic_1A/aprem/props.ma". + +lemma 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 +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c)))) +(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g +b))))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda (a0: +A).(\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) +(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g +b)))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (i: nat).(\lambda +(b: A).(\lambda (H0: (aprem i (ASort O n) b)).(let H_x \def (aprem_gen_sort b +i O n H0) in (let H1 \def H_x in (False_ind (ex2_3 C T nat (\lambda (d: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: +C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) H1)))))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: +(arity g d u a0)).(\lambda (H2: ((\forall (i0: nat).(\forall (b: A).((aprem +i0 a0 b) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d0 u0 (asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: +A).(\lambda (H3: (aprem i0 a0 b)).(let H_x \def (H2 i0 b H3) in (let H4 \def +H_x in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda +(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop +(plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x0 +\def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abbr c0 u i H0) in (let H7 \def +H_x0 in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda +(c1: C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda +(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) +(\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop +(S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus +i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) +H9))))) H7)))))))) H4)))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda +(u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) +u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: +((\forall (i0: nat).(\forall (b: A).((aprem i0 (asucc g a0) b) \to (ex2_3 C T +nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 +d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 +(asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: A).(\lambda (H3: (aprem +i0 a0 b)).(let H_y \def (H2 i0 b) in (let H4 \def (H_y (aprem_asucc g a0 b i0 +H3)) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda +(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop +(plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x +\def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abst c0 u i H0) in (let H7 \def +H_x in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda (c1: +C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) +(\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop +(S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus +i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) +H9))))) H7)))))))) H4)))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b +Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity +g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall (b0: A).((aprem i a1 b0) +\to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: +nat).(arity g d u0 (asucc g b0))))))))))).(\lambda (t0: T).(\lambda (a2: +A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: +((\forall (i: nat).(\forall (b0: A).((aprem i a2 b0) \to (ex2_3 C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead +c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity +g d u0 (asucc g b0))))))))))).(\lambda (i: nat).(\lambda (b0: A).(\lambda +(H5: (aprem i a2 b0)).(let H_x \def (H4 i b0 H5) in (let H6 \def H_x in +(ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus i j) O d (CHead c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u0: +T).(\lambda (_: nat).(arity g d u0 (asucc g b0))))) (ex2_3 C T nat (\lambda +(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda +(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H7: (drop +(plus i x2) O x0 (CHead c0 (Bind b) u))).(\lambda (H8: (arity g x0 x1 (asucc +g b0))).(let H9 \def (eq_ind nat (S (plus i x2)) (\lambda (n: nat).(drop n O +x0 c0)) (drop_S b x0 c0 u (plus i x2) H7) (plus i (S x2)) (plus_n_Sm i x2)) +in (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d u0 (asucc g b0))))) x0 x1 (S x2) H9 H8))))))) +H6))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (H0: (arity g c0 u (asucc g a1))).(\lambda (_: ((\forall (i: +nat).(\forall (b: A).((aprem i (asucc g a1) b) \to (ex2_3 C T nat (\lambda +(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda +(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead +c0 (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (i: nat).(\forall (b: +A).((aprem i a2 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind Abst) u))))) +(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i (AHead +a1 a2) b)).(nat_ind (\lambda (n: nat).((aprem n (AHead a1 a2) b) \to (ex2_3 C +T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d +c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g b)))))))) (\lambda (H5: (aprem O (AHead a1 a2) b)).(let H_y \def +(aprem_gen_head_O a1 a2 b H5) in (eq_ind_r A a1 (\lambda (a0: A).(ex2_3 C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d +c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g a0))))))) (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g a1))))) c0 u O (drop_refl +c0) H0) b H_y))) (\lambda (i0: nat).(\lambda (_: (((aprem i0 (AHead a1 a2) b) +\to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus i0 j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: +nat).(arity g d u0 (asucc g b))))))))).(\lambda (H5: (aprem (S i0) (AHead a1 +a2) b)).(let H_y \def (aprem_gen_head_S a1 a2 b i0 H5) in (let H_x \def (H3 +i0 b H_y) in (let H6 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus i0 j) O d (CHead c0 (Bind Abst) u))))) +(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: +nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (x2: nat).(\lambda (H7: (drop (plus i0 x2) O x0 (CHead c0 (Bind +Abst) u))).(\lambda (H8: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d +c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g b))))) x0 x1 x2 (drop_S Abst x0 c0 u (plus i0 x2) H7) H8)))))) +H6))))))) i H4))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall +(b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (t0: +T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: +((\forall (i: nat).(\forall (b: A).((aprem i (AHead a1 a2) b) \to (ex2_3 C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d +c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem +i a2 b)).(let H_y \def (H3 (S i) b) in (let H5 \def (H_y (aprem_succ a2 b i +H4 a1)) in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (S (plus i j)) O d c0)))) (\lambda (d: C).(\lambda (u0: +T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda +(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda +(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: (drop (S +(plus i x2)) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g b))).(C_ind +(\lambda (c1: C).((drop (S (plus i x2)) O c1 c0) \to ((arity g c1 x1 (asucc g +b)) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d u0 (asucc g b))))))))) (\lambda (n: nat).(\lambda (H8: +(drop (S (plus i x2)) O (CSort n) c0)).(\lambda (_: (arity g (CSort n) x1 +(asucc g b))).(and3_ind (eq C c0 (CSort n)) (eq nat (S (plus i x2)) O) (eq +nat O O) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d u0 (asucc g b)))))) (\lambda (_: (eq C c0 (CSort +n))).(\lambda (H11: (eq nat (S (plus i x2)) O)).(\lambda (_: (eq nat O +O)).(let H13 \def (eq_ind nat (S (plus i x2)) (\lambda (ee: nat).(match ee +with [O \Rightarrow False | (S _) \Rightarrow True])) I O H11) in (False_ind +(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus +i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d +u0 (asucc g b)))))) H13))))) (drop_gen_sort n (S (plus i x2)) O c0 H8))))) +(\lambda (d: C).(\lambda (IHd: (((drop (S (plus i x2)) O d c0) \to ((arity g +d x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))))))).(\lambda (k: +K).(\lambda (t1: T).(\lambda (H8: (drop (S (plus i x2)) O (CHead d k t1) +c0)).(\lambda (H9: (arity g (CHead d k t1) x1 (asucc g b))).(K_ind (\lambda +(k0: K).((arity g (CHead d k0 t1) x1 (asucc g b)) \to ((drop (r k0 (plus i +x2)) O d c0) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d0 u0 (asucc g b))))))))) (\lambda (b0: B).(\lambda (H10: +(arity g (CHead d (Bind b0) t1) x1 (asucc g b))).(\lambda (H11: (drop (r +(Bind b0) (plus i x2)) O d c0)).(ex2_3_intro C T nat (\lambda (d0: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda +(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) +(CHead d (Bind b0) t1) x1 (S x2) (eq_ind nat (S (plus i x2)) (\lambda (n: +nat).(drop n O (CHead d (Bind b0) t1) c0)) (drop_drop (Bind b0) (plus i x2) d +c0 H11 t1) (plus i (S x2)) (plus_n_Sm i x2)) H10)))) (\lambda (f: F).(\lambda +(H10: (arity g (CHead d (Flat f) t1) x1 (asucc g b))).(\lambda (H11: (drop (r +(Flat f) (plus i x2)) O d c0)).(let H12 \def (IHd H11 (arity_cimp_conf g +(CHead d (Flat f) t1) x1 (asucc g b) H10 d (cimp_flat_sx f d t1))) in +(ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: +nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) +(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: nat).(\lambda (H13: (drop +(plus i x5) O x3 c0)).(\lambda (H14: (arity g x3 x4 (asucc g +b))).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d0 u0 (asucc g b))))) x3 x4 x5 H13 H14)))))) H12))))) k H9 +(drop_gen_drop k d c0 t1 (plus i x2) H8)))))))) x0 H6 H7)))))) +H5))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda +(_: (arity g c0 u (asucc g a0))).(\lambda (_: ((\forall (i: nat).(\forall (b: +A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (t0: +T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (i: nat).(\forall +(b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (i: +nat).(\lambda (b: A).(\lambda (H4: (aprem i a0 b)).(let H_x \def (H3 i b H4) +in (let H5 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) +(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: +(drop (plus i x2) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g +b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 H6 H7)))))) H5)))))))))))))) +(\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 +t0 a1)).(\lambda (H1: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to +(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus +i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d +u (asucc g b))))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 +a2)).(\lambda (i: nat).(\lambda (b: A).(\lambda (H3: (aprem i a2 b)).(let H_x +\def (aprem_repl g a1 a2 H2 i b H3) in (let H4 \def H_x in (ex2_ind A +(\lambda (b1: A).(leq g b1 b)) (\lambda (b1: A).(aprem i a1 b1)) (ex2_3 C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d +c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc +g b)))))) (\lambda (x: A).(\lambda (H5: (leq g x b)).(\lambda (H6: (aprem i +a1 x)).(let H_x0 \def (H1 i x H6) in (let H7 \def H_x0 in (ex2_3_ind C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) +(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g +x))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: +nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(x2: nat).(\lambda (H8: (drop (plus i x2) O x0 c0)).(\lambda (H9: (arity g x0 +x1 (asucc g x))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: +T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 H8 (arity_repl g +x0 x1 (asucc g x) H9 (asucc g b) (asucc_repl g x b H5)))))))) H7)))))) +H4))))))))))))) c t a H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/cimp.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/cimp.ma new file mode 100644 index 000000000..9cad1a931 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/cimp.ma @@ -0,0 +1,98 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/arity/fwd.ma". + +include "basic_1A/cimp/props.ma". + +lemma arity_cimp_conf: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 +t a) \to (\forall (c2: C).((cimp c1 c2) \to (arity g c2 t a))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a0)))))) (\lambda (c: +C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (cimp c c2)).(arity_sort g +c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: +A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (c2: C).((cimp d +c2) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda (H3: (cimp c +c2)).(let H_x \def (H3 Abbr d u i H0) in (let H4 \def H_x in (ex_ind C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (arity g c2 (TLRef i) +a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x (Bind Abbr) u))).(let +H_x0 \def (cimp_getl_conf c c2 H3 Abbr d u i H0) in (let H6 \def H_x0 in +(ex2_ind C (\lambda (d2: C).(cimp d d2)) (\lambda (d2: C).(getl i c2 (CHead +d2 (Bind Abbr) u))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (H7: +(cimp d x0)).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(let H9 \def +(eq_ind C (CHead x (Bind Abbr) u) (\lambda (c0: C).(getl i c2 c0)) H5 (CHead +x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 (CHead x0 (Bind +Abbr) u) H8)) in (let H10 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow x | (CHead c0 _ _) \Rightarrow c0])) (CHead x (Bind +Abbr) u) (CHead x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 +(CHead x0 (Bind Abbr) u) H8)) in (let H11 \def (eq_ind_r C x0 (\lambda (c0: +C).(getl i c2 (CHead c0 (Bind Abbr) u))) H9 x H10) in (let H12 \def (eq_ind_r +C x0 (\lambda (c0: C).(cimp d c0)) H7 x H10) in (arity_abbr g c2 x u i H11 a0 +(H2 x H12))))))))) H6))))) H4))))))))))))) (\lambda (c: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind +Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda +(H2: ((\forall (c2: C).((cimp d c2) \to (arity g c2 u (asucc g +a0)))))).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(let H_x \def (H3 Abst d +u i H0) in (let H4 \def H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead +d2 (Bind Abst) u))) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: +(getl i c2 (CHead x (Bind Abst) u))).(let H_x0 \def (cimp_getl_conf c c2 H3 +Abst d u i H0) in (let H6 \def H_x0 in (ex2_ind C (\lambda (d2: C).(cimp d +d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (arity g c2 +(TLRef i) a0) (\lambda (x0: C).(\lambda (H7: (cimp d x0)).(\lambda (H8: (getl +i c2 (CHead x0 (Bind Abst) u))).(let H9 \def (eq_ind C (CHead x (Bind Abst) +u) (\lambda (c0: C).(getl i c2 c0)) H5 (CHead x0 (Bind Abst) u) (getl_mono c2 +(CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in (let H10 \def +(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow x | (CHead +c0 _ _) \Rightarrow c0])) (CHead x (Bind Abst) u) (CHead x0 (Bind Abst) u) +(getl_mono c2 (CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in +(let H11 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c2 (CHead c0 (Bind +Abst) u))) H9 x H10) in (let H12 \def (eq_ind_r C x0 (\lambda (c0: C).(cimp d +c0)) H7 x H10) in (arity_abst g c2 x u i H11 a0 (H2 x H12))))))))) H6))))) +H4))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda +(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u +a1)).(\lambda (H2: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u +a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c +(Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((cimp (CHead c (Bind b) +u) c2) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H5: (cimp c +c2)).(arity_bind g b H0 c2 u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) u) +(cimp_bind c c2 H5 b u)))))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: +((\forall (c2: C).((cimp c c2) \to (arity g c2 u (asucc g a1)))))).(\lambda +(t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 +a2)).(\lambda (H3: ((\forall (c2: C).((cimp (CHead c (Bind Abst) u) c2) \to +(arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: (cimp c +c2)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind Abst) u) +(cimp_bind c c2 H4 Abst u)))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall +(c2: C).((cimp c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda (a2: +A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c2: +C).((cimp c c2) \to (arity g c2 t0 (AHead a1 a2)))))).(\lambda (c2: +C).(\lambda (H4: (cimp c c2)).(arity_appl g c2 u a1 (H1 c2 H4) t0 a2 (H3 c2 +H4))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: +(arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to +(arity g c2 u (asucc g a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 +a0)).(\lambda (H3: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 +a0))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_cast g c2 u a0 (H1 +c2 H4) t0 (H3 c2 H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda +(a1: A).(\lambda (_: (arity g c t0 a1)).(\lambda (H1: ((\forall (c2: +C).((cimp c c2) \to (arity g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: +(leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(arity_repl g c2 +t0 a1 (H1 c2 H3) a2 H2)))))))))) c1 t a H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/defs.ma new file mode 100644 index 000000000..e6be51c80 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/defs.ma @@ -0,0 +1,45 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/leq/defs.ma". + +include "basic_1A/getl/defs.ma". + +inductive arity (g: G): C \to (T \to (A \to Prop)) \def +| arity_sort: \forall (c: C).(\forall (n: nat).(arity g c (TSort n) (ASort O +n))) +| arity_abbr: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (a: A).((arity g d u a) +\to (arity g c (TLRef i) a))))))) +| arity_abst: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abst) u)) \to (\forall (a: A).((arity g d u +(asucc g a)) \to (arity g c (TLRef i) a))))))) +| arity_bind: \forall (b: B).((not (eq B b Abst)) \to (\forall (c: +C).(\forall (u: T).(\forall (a1: A).((arity g c u a1) \to (\forall (t: +T).(\forall (a2: A).((arity g (CHead c (Bind b) u) t a2) \to (arity g c +(THead (Bind b) u t) a2))))))))) +| arity_head: \forall (c: C).(\forall (u: T).(\forall (a1: A).((arity g c u +(asucc g a1)) \to (\forall (t: T).(\forall (a2: A).((arity g (CHead c (Bind +Abst) u) t a2) \to (arity g c (THead (Bind Abst) u t) (AHead a1 a2)))))))) +| arity_appl: \forall (c: C).(\forall (u: T).(\forall (a1: A).((arity g c u +a1) \to (\forall (t: T).(\forall (a2: A).((arity g c t (AHead a1 a2)) \to +(arity g c (THead (Flat Appl) u t) a2))))))) +| arity_cast: \forall (c: C).(\forall (u: T).(\forall (a: A).((arity g c u +(asucc g a)) \to (\forall (t: T).((arity g c t a) \to (arity g c (THead (Flat +Cast) u t) a)))))) +| arity_repl: \forall (c: C).(\forall (t: T).(\forall (a1: A).((arity g c t +a1) \to (\forall (a2: A).((leq g a1 a2) \to (arity g c t a2)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/fwd.ma new file mode 100644 index 000000000..8f6466eaf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/fwd.ma @@ -0,0 +1,1291 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/arity/defs.ma". + +include "basic_1A/leq/asucc.ma". + +include "basic_1A/getl/drop.ma". + +implied rec lemma arity_ind (g: G) (P: (C \to (T \to (A \to Prop)))) (f: +(\forall (c: C).(\forall (n: nat).(P c (TSort n) (ASort O n))))) (f0: +(\forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) u)) \to (\forall (a: A).((arity g d u a) \to ((P d u a) +\to (P c (TLRef i) a)))))))))) (f1: (\forall (c: C).(\forall (d: C).(\forall +(u: T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) u)) \to (\forall (a: +A).((arity g d u (asucc g a)) \to ((P d u (asucc g a)) \to (P c (TLRef i) +a)))))))))) (f2: (\forall (b: B).((not (eq B b Abst)) \to (\forall (c: +C).(\forall (u: T).(\forall (a1: A).((arity g c u a1) \to ((P c u a1) \to +(\forall (t: T).(\forall (a2: A).((arity g (CHead c (Bind b) u) t a2) \to ((P +(CHead c (Bind b) u) t a2) \to (P c (THead (Bind b) u t) a2))))))))))))) (f3: +(\forall (c: C).(\forall (u: T).(\forall (a1: A).((arity g c u (asucc g a1)) +\to ((P c u (asucc g a1)) \to (\forall (t: T).(\forall (a2: A).((arity g +(CHead c (Bind Abst) u) t a2) \to ((P (CHead c (Bind Abst) u) t a2) \to (P c +(THead (Bind Abst) u t) (AHead a1 a2)))))))))))) (f4: (\forall (c: +C).(\forall (u: T).(\forall (a1: A).((arity g c u a1) \to ((P c u a1) \to +(\forall (t: T).(\forall (a2: A).((arity g c t (AHead a1 a2)) \to ((P c t +(AHead a1 a2)) \to (P c (THead (Flat Appl) u t) a2))))))))))) (f5: (\forall +(c: C).(\forall (u: T).(\forall (a: A).((arity g c u (asucc g a)) \to ((P c u +(asucc g a)) \to (\forall (t: T).((arity g c t a) \to ((P c t a) \to (P c +(THead (Flat Cast) u t) a)))))))))) (f6: (\forall (c: C).(\forall (t: +T).(\forall (a1: A).((arity g c t a1) \to ((P c t a1) \to (\forall (a2: +A).((leq g a1 a2) \to (P c t a2))))))))) (c: C) (t: T) (a: A) (a0: arity g c +t a) on a0: P c t a \def match a0 with [(arity_sort c0 n) \Rightarrow (f c0 +n) | (arity_abbr c0 d u i g0 a1 a2) \Rightarrow (f0 c0 d u i g0 a1 a2 +((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) d u a1 a2)) | (arity_abst c0 d u i g0 +a1 a2) \Rightarrow (f1 c0 d u i g0 a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 +f6) d u (asucc g a1) a2)) | (arity_bind b n c0 u a1 a2 t0 a3 a4) \Rightarrow +(f2 b n c0 u a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 u a1 a2) t0 a3 +a4 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) (CHead c0 (Bind b) u) t0 a3 a4)) | +(arity_head c0 u a1 a2 t0 a3 a4) \Rightarrow (f3 c0 u a1 a2 ((arity_ind g P f +f0 f1 f2 f3 f4 f5 f6) c0 u (asucc g a1) a2) t0 a3 a4 ((arity_ind g P f f0 f1 +f2 f3 f4 f5 f6) (CHead c0 (Bind Abst) u) t0 a3 a4)) | (arity_appl c0 u a1 a2 +t0 a3 a4) \Rightarrow (f4 c0 u a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) +c0 u a1 a2) t0 a3 a4 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 t0 (AHead a1 +a3) a4)) | (arity_cast c0 u a1 a2 t0 a3) \Rightarrow (f5 c0 u a1 a2 +((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 u (asucc g a1) a2) t0 a3 +((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) c0 t0 a1 a3)) | (arity_repl c0 t0 a1 +a2 a3 l) \Rightarrow (f6 c0 t0 a1 a2 ((arity_ind g P f f0 f1 f2 f3 f4 f5 f6) +c0 t0 a1 a2) a3 l)]. + +lemma arity_gen_sort: + \forall (g: G).(\forall (c: C).(\forall (n: nat).(\forall (a: A).((arity g c +(TSort n) a) \to (leq g a (ASort O n)))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (n: nat).(\lambda (a: A).(\lambda +(H: (arity g c (TSort n) a)).(insert_eq T (TSort n) (\lambda (t: T).(arity g +c t a)) (\lambda (_: T).(leq g a (ASort O n))) (\lambda (y: T).(\lambda (H0: +(arity g c y a)).(arity_ind g (\lambda (_: C).(\lambda (t: T).(\lambda (a0: +A).((eq T t (TSort n)) \to (leq g a0 (ASort O n)))))) (\lambda (_: +C).(\lambda (n0: nat).(\lambda (H1: (eq T (TSort n0) (TSort n))).(let H2 \def +(f_equal T nat (\lambda (e: T).(match e with [(TSort n1) \Rightarrow n1 | +(TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort +n) H1) in (eq_ind_r nat n (\lambda (n1: nat).(leq g (ASort O n1) (ASort O +n))) (leq_refl g (ASort O n)) n0 H2))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: (((eq +T u (TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H4: (eq T (TLRef i) +(TSort n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) +H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: +A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: (((eq T u (TSort n)) +\to (leq g (asucc g a0) (ASort O n))))).(\lambda (H4: (eq T (TLRef i) (TSort +n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) H5))))))))))) +(\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda +(u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T +u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: T).(\lambda (a2: +A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t +(TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H6: (eq T (THead (Bind b) +u t) (TSort n))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind (leq g a2 +(ASort O n)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (_: (((eq T u (TSort +n)) \to (leq g (asucc g a1) (ASort O n))))).(\lambda (t: T).(\lambda (a2: +A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t a2)).(\lambda (_: (((eq T +t (TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H5: (eq T (THead (Bind +Abst) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Bind Abst) u t) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in +(False_ind (leq g (AHead a1 a2) (ASort O n)) H6)))))))))))) (\lambda (c0: +C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda +(_: (((eq T u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: +T).(\lambda (a2: A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: +(((eq T t (TSort n)) \to (leq g (AHead a1 a2) (ASort O n))))).(\lambda (H5: +(eq T (THead (Flat Appl) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat +Appl) u t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) +H5) in (False_ind (leq g a2 (ASort O n)) H6)))))))))))) (\lambda (c0: +C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g +a0))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a0) (ASort O +n))))).(\lambda (t: T).(\lambda (_: (arity g c0 t a0)).(\lambda (_: (((eq T t +(TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H5: (eq T (THead (Flat +Cast) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) u t) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in +(False_ind (leq g a0 (ASort O n)) H6))))))))))) (\lambda (c0: C).(\lambda (t: +T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t a1)).(\lambda (H2: (((eq T t +(TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (a2: A).(\lambda (H3: (leq +g a1 a2)).(\lambda (H4: (eq T t (TSort n))).(let H5 \def (f_equal T T +(\lambda (e: T).e) t (TSort n) H4) in (let H6 \def (eq_ind T t (\lambda (t0: +T).((eq T t0 (TSort n)) \to (leq g a1 (ASort O n)))) H2 (TSort n) H5) in (let +H7 \def (eq_ind T t (\lambda (t0: T).(arity g c0 t0 a1)) H1 (TSort n) H5) in +(leq_trans g a2 a1 (leq_sym g a1 a2 H3) (ASort O n) (H6 (refl_equal T (TSort +n))))))))))))))) c y a H0))) H))))). + +lemma arity_gen_lref: + \forall (g: G).(\forall (c: C).(\forall (i: nat).(\forall (a: A).((arity g c +(TLRef i) a) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c +(CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a)))) +(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abst) +u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (i: nat).(\lambda (a: A).(\lambda +(H: (arity g c (TLRef i) a)).(insert_eq T (TLRef i) (\lambda (t: T).(arity g +c t a)) (\lambda (_: T).(or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl +i c (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u +a)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind +Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a))))))) +(\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: +C).(\lambda (t: T).(\lambda (a0: A).((eq T t (TLRef i)) \to (or (ex2_2 C T +(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) +(\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d: +C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: +C).(\lambda (u: T).(arity g d u (asucc g a0)))))))))) (\lambda (c0: +C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (TLRef i))).(let H2 \def +(eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I +(TLRef i) H1) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u: +T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: +T).(arity g d u (ASort O n))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: +T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: +T).(arity g d u (asucc g (ASort O n))))))) H2))))) (\lambda (c0: C).(\lambda +(d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d +(Bind Abbr) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u a0)).(\lambda +(_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: C).(\lambda (u0: +T).(getl i d (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: +T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i +d (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 +u0 (asucc g a0))))))))).(\lambda (H4: (eq T (TLRef i0) (TLRef i))).(let H5 +\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i0 | +(TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef +i) H4) in (let H6 \def (eq_ind nat i0 (\lambda (n: nat).(getl n c0 (CHead d +(Bind Abbr) u))) H1 i H5) in (or_introl (ex2_2 C T (\lambda (d0: C).(\lambda +(u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda +(u0: T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: +T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: +T).(arity g d0 u0 (asucc g a0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda +(u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda +(u0: T).(arity g d0 u0 a0))) d u H6 H2))))))))))))) (\lambda (c0: C).(\lambda +(d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d +(Bind Abst) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u (asucc g +a0))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: +C).(\lambda (u0: T).(getl i d (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: +C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) (ex2_2 C T (\lambda (d0: +C).(\lambda (u0: T).(getl i d (CHead d0 (Bind Abst) u0)))) (\lambda (d0: +C).(\lambda (u0: T).(arity g d0 u0 (asucc g (asucc g a0)))))))))).(\lambda +(H4: (eq T (TLRef i0) (TLRef i))).(let H5 \def (f_equal T nat (\lambda (e: +T).(match e with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead +_ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i) H4) in (let H6 \def (eq_ind nat +i0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abst) u))) H1 i H5) in +(or_intror (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 +(Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0)))) +(ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) +u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) +(ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind +Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0)))) +d u H6 H2))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b +Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity +g c0 u a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 a1)))) (ex2_2 C T (\lambda (d: C).(\lambda +(u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: +T).(arity g d u0 (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: +A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t +(TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead +c0 (Bind b) u) (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: +T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i +(CHead c0 (Bind b) u) (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda +(u0: T).(arity g d u0 (asucc g a2))))))))).(\lambda (H6: (eq T (THead (Bind +b) u t) (TLRef i))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TLRef i) H6) in (False_ind (or (ex2_2 +C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) +(\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 (asucc g a2)))))) H7)))))))))))))) (\lambda +(c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g +a1))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 (asucc g a1))))) (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 (asucc g (asucc g a1)))))))))).(\lambda (t: +T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t +a2)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Abbr) +u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T +(\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d +(Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g +a2))))))))).(\lambda (H5: (eq T (THead (Bind Abst) u t) (TLRef i))).(let H6 +\def (eq_ind T (THead (Bind Abst) u t) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 (AHead a1 a2))))) (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 (asucc g (AHead a1 a2))))))) H6)))))))))))) +(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u +a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 a1)))) (ex2_2 C T (\lambda (d: C).(\lambda +(u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: +T).(arity g d u0 (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: +A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: (((eq T t (TLRef +i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d +(Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (AHead a1 +a2))))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind +Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g (AHead +a1 a2)))))))))).(\lambda (H5: (eq T (THead (Flat Appl) u t) (TLRef i))).(let +H6 \def (eq_ind T (THead (Flat Appl) u t) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda +(u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: +T).(arity g d u0 (asucc g a2)))))) H6)))))))))))) (\lambda (c0: C).(\lambda +(u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda +(_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: +T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: +T).(arity g d u0 (asucc g a0))))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: +T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: +T).(arity g d u0 (asucc g (asucc g a0)))))))))).(\lambda (t: T).(\lambda (_: +(arity g c0 t a0)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T +(\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) +(\lambda (d: C).(\lambda (u0: T).(arity g d u0 a0)))) (ex2_2 C T (\lambda (d: +C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: +C).(\lambda (u0: T).(arity g d u0 (asucc g a0))))))))).(\lambda (H5: (eq T +(THead (Flat Cast) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Flat Cast) +u t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in +(False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead +d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a0)))) +(ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) +u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a0)))))) +H6))))))))))) (\lambda (c0: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H1: +(arity g c0 t a1)).(\lambda (H2: (((eq T t (TLRef i)) \to (or (ex2_2 C T +(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) +(\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: +C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: +C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (a2: +A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t (TLRef i))).(let H5 +\def (f_equal T T (\lambda (e: T).e) t (TLRef i) H4) in (let H6 \def (eq_ind +T t (\lambda (t0: T).((eq T t0 (TLRef i)) \to (or (ex2_2 C T (\lambda (d: +C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: +C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda +(u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: +T).(arity g d u (asucc g a1)))))))) H2 (TLRef i) H5) in (let H7 \def (eq_ind +T t (\lambda (t0: T).(arity g c0 t0 a1)) H1 (TLRef i) H5) in (let H8 \def (H6 +(refl_equal T (TLRef i))) in (or_ind (ex2_2 C T (\lambda (d: C).(\lambda (u: +T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: +T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 +(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u +(asucc g a1))))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 +(CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u +a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind +Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) +(\lambda (H9: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d +(Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u +a1))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d +(Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1))) (or +(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) +u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda +(d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: +C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H11: +(arity g x0 x1 a1)).(or_introl (ex2_2 C T (\lambda (d: C).(\lambda (u: +T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: +T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 +(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u +(asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 +(CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))) +x0 x1 H10 (arity_repl g x0 x1 a1 H11 a2 H3))))))) H9)) (\lambda (H9: (ex2_2 C +T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) +(\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))))).(ex2_2_ind C T +(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) +(\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))) (or (ex2_2 C T +(\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) +(\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: +C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: +C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H11: +(arity g x0 x1 (asucc g a1))).(or_intror (ex2_2 C T (\lambda (d: C).(\lambda +(u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: +T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 +(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u +(asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 +(CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u +(asucc g a2)))) x0 x1 H10 (arity_repl g x0 x1 (asucc g a1) H11 (asucc g a2) +(asucc_repl g a1 a2 H3)))))))) H9)) H8))))))))))))) c y a H0))) H))))). + +lemma arity_gen_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (g: G).(\forall (c: +C).(\forall (u: T).(\forall (t: T).(\forall (a2: A).((arity g c (THead (Bind +b) u t) a2) \to (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (_: +A).(arity g (CHead c (Bind b) u) t a2)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (g: G).(\lambda +(c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: A).(\lambda (H0: (arity +g c (THead (Bind b) u t) a2)).(insert_eq T (THead (Bind b) u t) (\lambda (t0: +T).(arity g c t0 a2)) (\lambda (_: T).(ex2 A (\lambda (a1: A).(arity g c u +a1)) (\lambda (_: A).(arity g (CHead c (Bind b) u) t a2)))) (\lambda (y: +T).(\lambda (H1: (arity g c y a2)).(arity_ind g (\lambda (c0: C).(\lambda +(t0: T).(\lambda (a: A).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda +(a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t +a))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H2: (eq T (TSort n) +(THead (Bind b) u t))).(let H3 \def (eq_ind T (TSort n) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H2) in (False_ind +(ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 +(Bind b) u) t (ASort O n)))) H3))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq +T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) +(\lambda (_: A).(arity g (CHead d (Bind b) u) t a)))))).(\lambda (H5: (eq T +(TLRef i) (THead (Bind b) u t))).(let H6 \def (eq_ind T (TLRef i) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H5) in +(False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity +g (CHead c0 (Bind b) u) t a))) H6))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda +(_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u +a1)) (\lambda (_: A).(arity g (CHead d (Bind b) u) t (asucc g +a))))))).(\lambda (H5: (eq T (TLRef i) (THead (Bind b) u t))).(let H6 \def +(eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I +(THead (Bind b) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u +a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H6))))))))))) +(\lambda (b0: B).(\lambda (H2: (not (eq B b0 Abst))).(\lambda (c0: +C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H3: (arity g c0 u0 +a1)).(\lambda (H4: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: +A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t +a1)))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H5: (arity g (CHead c0 +(Bind b0) u0) t0 a0)).(\lambda (H6: (((eq T t0 (THead (Bind b) u t)) \to (ex2 +A (\lambda (a3: A).(arity g (CHead c0 (Bind b0) u0) u a3)) (\lambda (_: +A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t a0)))))).(\lambda +(H7: (eq T (THead (Bind b0) u0 t0) (THead (Bind b) u t))).(let H8 \def +(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 | (TLRef +_) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 t0) (THead +(Bind b) u t) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) +\Rightarrow t1])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in ((let +H10 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 +| (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) (THead (Bind +b0) u0 t0) (THead (Bind b) u t) H7) in (\lambda (H11: (eq T u0 u)).(\lambda +(H12: (eq B b0 b)).(let H13 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 +(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g (CHead c0 (Bind +b0) u0) u a3)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind +b) u) t a0))))) H6 t H10) in (let H14 \def (eq_ind T t0 (\lambda (t1: +T).(arity g (CHead c0 (Bind b0) u0) t1 a0)) H5 t H10) in (let H15 \def +(eq_ind T u0 (\lambda (t1: T).((eq T t (THead (Bind b) u t)) \to (ex2 A +(\lambda (a3: A).(arity g (CHead c0 (Bind b0) t1) u a3)) (\lambda (_: +A).(arity g (CHead (CHead c0 (Bind b0) t1) (Bind b) u) t a0))))) H13 u H11) +in (let H16 \def (eq_ind T u0 (\lambda (t1: T).(arity g (CHead c0 (Bind b0) +t1) t a0)) H14 u H11) in (let H17 \def (eq_ind T u0 (\lambda (t1: T).((eq T +t1 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) +(\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1))))) H4 u H11) in (let +H18 \def (eq_ind T u0 (\lambda (t1: T).(arity g c0 t1 a1)) H3 u H11) in (let +H19 \def (eq_ind B b0 (\lambda (b1: B).((eq T t (THead (Bind b) u t)) \to +(ex2 A (\lambda (a3: A).(arity g (CHead c0 (Bind b1) u) u a3)) (\lambda (_: +A).(arity g (CHead (CHead c0 (Bind b1) u) (Bind b) u) t a0))))) H15 b H12) in +(let H20 \def (eq_ind B b0 (\lambda (b1: B).(arity g (CHead c0 (Bind b1) u) t +a0)) H16 b H12) in (let H21 \def (eq_ind B b0 (\lambda (b1: B).(not (eq B b1 +Abst))) H2 b H12) in (ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) +(\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) a1 H18 H20))))))))))))) +H9)) H8)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: +A).(\lambda (H2: (arity g c0 u0 (asucc g a1))).(\lambda (H3: (((eq T u0 +(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda +(_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1))))))).(\lambda (t0: +T).(\lambda (a0: A).(\lambda (H4: (arity g (CHead c0 (Bind Abst) u0) t0 +a0)).(\lambda (H5: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: +A).(arity g (CHead c0 (Bind Abst) u0) u a3)) (\lambda (_: A).(arity g (CHead +(CHead c0 (Bind Abst) u0) (Bind b) u) t a0)))))).(\lambda (H6: (eq T (THead +(Bind Abst) u0 t0) (THead (Bind b) u t))).(let H7 \def (f_equal T B (\lambda +(e: T).(match e with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst +| (THead k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat +_) \Rightarrow Abst])])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) +in ((let H8 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) \Rightarrow t1])) +(THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in ((let H9 \def (f_equal +T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) +\Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) (THead (Bind Abst) u0 t0) +(THead (Bind b) u t) H6) in (\lambda (H10: (eq T u0 u)).(\lambda (H11: (eq B +Abst b)).(let H12 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Bind +b) u t)) \to (ex2 A (\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u0) u +a3)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind b) u) t +a0))))) H5 t H9) in (let H13 \def (eq_ind T t0 (\lambda (t1: T).(arity g +(CHead c0 (Bind Abst) u0) t1 a0)) H4 t H9) in (let H14 \def (eq_ind T u0 +(\lambda (t1: T).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: +A).(arity g (CHead c0 (Bind Abst) t1) u a3)) (\lambda (_: A).(arity g (CHead +(CHead c0 (Bind Abst) t1) (Bind b) u) t a0))))) H12 u H10) in (let H15 \def +(eq_ind T u0 (\lambda (t1: T).(arity g (CHead c0 (Bind Abst) t1) t a0)) H13 u +H10) in (let H16 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead (Bind b) +u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g +(CHead c0 (Bind b) u) t (asucc g a1)))))) H3 u H10) in (let H17 \def (eq_ind +T u0 (\lambda (t1: T).(arity g c0 t1 (asucc g a1))) H2 u H10) in (let H18 +\def (eq_ind_r B b (\lambda (b0: B).((eq T t (THead (Bind b0) u t)) \to (ex2 +A (\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) u a3)) (\lambda (_: +A).(arity g (CHead (CHead c0 (Bind Abst) u) (Bind b0) u) t a0))))) H14 Abst +H11) in (let H19 \def (eq_ind_r B b (\lambda (b0: B).((eq T u (THead (Bind +b0) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: +A).(arity g (CHead c0 (Bind b0) u) t (asucc g a1)))))) H16 Abst H11) in (let +H20 \def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H Abst H11) in +(eq_ind B Abst (\lambda (b0: B).(ex2 A (\lambda (a3: A).(arity g c0 u a3)) +(\lambda (_: A).(arity g (CHead c0 (Bind b0) u) t (AHead a1 a0))))) (let H21 +\def (match (H20 (refl_equal B Abst)) in False with []) in H21) b +H11))))))))))))) H8)) H7)))))))))))) (\lambda (c0: C).(\lambda (u0: +T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 +(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda +(_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (t0: T).(\lambda +(a0: A).(\lambda (_: (arity g c0 t0 (AHead a1 a0))).(\lambda (_: (((eq T t0 +(THead (Bind b) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda +(_: A).(arity g (CHead c0 (Bind b) u) t (AHead a1 a0))))))).(\lambda (H6: (eq +T (THead (Flat Appl) u0 t0) (THead (Bind b) u t))).(let H7 \def (eq_ind T +(THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind b) u t) H6) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u +a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0))) H7)))))))))))) +(\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: (arity g c0 u0 +(asucc g a))).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A +(\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind +b) u) t (asucc g a))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 +a)).(\lambda (_: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: +A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t +a)))))).(\lambda (H6: (eq T (THead (Flat Cast) u0 t0) (THead (Bind b) u +t))).(let H7 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k +_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (THead (Bind b) u t) H6) in (False_ind (ex2 A +(\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind +b) u) t a))) H7))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: +A).(\lambda (H2: (arity g c0 t0 a1)).(\lambda (H3: (((eq T t0 (THead (Bind b) +u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g +(CHead c0 (Bind b) u) t a1)))))).(\lambda (a0: A).(\lambda (H4: (leq g a1 +a0)).(\lambda (H5: (eq T t0 (THead (Bind b) u t))).(let H6 \def (f_equal T T +(\lambda (e: T).e) t0 (THead (Bind b) u t) H5) in (let H7 \def (eq_ind T t0 +(\lambda (t1: T).((eq T t1 (THead (Bind b) u t)) \to (ex2 A (\lambda (a3: +A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t +a1))))) H3 (THead (Bind b) u t) H6) in (let H8 \def (eq_ind T t0 (\lambda +(t1: T).(arity g c0 t1 a1)) H2 (THead (Bind b) u t) H6) in (let H9 \def (H7 +(refl_equal T (THead (Bind b) u t))) in (ex2_ind A (\lambda (a3: A).(arity g +c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)) (ex2 A +(\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind +b) u) t a0))) (\lambda (x: A).(\lambda (H10: (arity g c0 u x)).(\lambda (H11: +(arity g (CHead c0 (Bind b) u) t a1)).(ex_intro2 A (\lambda (a3: A).(arity g +c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) x H10 +(arity_repl g (CHead c0 (Bind b) u) t a1 H11 a0 H4))))) H9))))))))))))) c y +a2 H1))) H0)))))))). + +lemma arity_gen_abst: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a: +A).((arity g c (THead (Bind Abst) u t) a) \to (ex3_2 A A (\lambda (a1: +A).(\lambda (a2: A).(eq A a (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: +A).(arity g c u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g +(CHead c (Bind Abst) u) t a2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: +A).(\lambda (H: (arity g c (THead (Bind Abst) u t) a)).(insert_eq T (THead +(Bind Abst) u t) (\lambda (t0: T).(arity g c t0 a)) (\lambda (_: T).(ex3_2 A +A (\lambda (a1: A).(\lambda (a2: A).(eq A a (AHead a1 a2)))) (\lambda (a1: +A).(\lambda (_: A).(arity g c u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: +A).(arity g (CHead c (Bind Abst) u) t a2))))) (\lambda (y: T).(\lambda (H0: +(arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: +A).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: +A).(\lambda (a2: A).(eq A a0 (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)))))))) (\lambda (c0: C).(\lambda (n: +nat).(\lambda (H1: (eq T (TSort n) (THead (Bind Abst) u t))).(let H2 \def +(eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I +(THead (Bind Abst) u t) H1) in (False_ind (ex3_2 A A (\lambda (a1: +A).(\lambda (a2: A).(eq A (ASort O n) (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)))) H2))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 +(CHead d (Bind Abbr) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 +a0)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda +(a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda +(_: A).(arity g d u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g +(CHead d (Bind Abst) u) t a2))))))).(\lambda (H4: (eq T (TLRef i) (THead +(Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ +_ _) \Rightarrow False])) I (THead (Bind Abst) u t) H4) in (False_ind (ex3_2 +A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (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)))) H5))))))))))) (\lambda +(c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl +i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 +(asucc g a0))).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A +A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g a0) (AHead a1 a2)))) +(\lambda (a1: A).(\lambda (_: A).(arity g d u (asucc g a1)))) (\lambda (_: +A).(\lambda (a2: A).(arity g (CHead d (Bind Abst) u) t a2))))))).(\lambda +(H4: (eq T (TLRef i) (THead (Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef +i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u +t) H4) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 +(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)))) H5))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b +Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H2: +(arity g c0 u0 a1)).(\lambda (H3: (((eq T u0 (THead (Bind Abst) u t)) \to +(ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) +(\lambda (a2: A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: +A).(\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda +(t0: T).(\lambda (a2: A).(\lambda (H4: (arity g (CHead c0 (Bind b) u0) t0 +a2)).(\lambda (H5: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A +(\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: +A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u0) u (asucc g a3)))) (\lambda +(_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) +t a4))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Bind Abst) u +t))).(let H7 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) +\Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k +with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) +u0 t0) (THead (Bind Abst) u t) H6) in ((let H8 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | +(THead _ t1 _) \Rightarrow t1])) (THead (Bind b) u0 t0) (THead (Bind Abst) u +t) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) +(THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in (\lambda (H10: (eq T u0 +u)).(\lambda (H11: (eq B b Abst)).(let H12 \def (eq_ind T t0 (\lambda (t1: +T).((eq T t1 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: +A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: +A).(arity g (CHead c0 (Bind b) u0) u (asucc g a3)))) (\lambda (_: A).(\lambda +(a4: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) t a4)))))) H5 t +H9) in (let H13 \def (eq_ind T t0 (\lambda (t1: T).(arity g (CHead c0 (Bind +b) u0) t1 a2)) H4 t H9) in (let H14 \def (eq_ind T u0 (\lambda (t1: T).((eq T +t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: +A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g (CHead +c0 (Bind b) t1) u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g +(CHead (CHead c0 (Bind b) t1) (Bind Abst) u) t a4)))))) H12 u H10) in (let +H15 \def (eq_ind T u0 (\lambda (t1: T).(arity g (CHead c0 (Bind b) t1) t a2)) +H13 u H10) in (let H16 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead +(Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a1 +(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)))))) H3 u H10) in (let H17 \def (eq_ind T u0 (\lambda (t1: T).(arity g c0 +t1 a1)) H2 u H10) in (let H18 \def (eq_ind B b (\lambda (b0: B).((eq T t +(THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq +A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g (CHead c0 +(Bind b0) u) u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g +(CHead (CHead c0 (Bind b0) u) (Bind Abst) u) t a4)))))) H14 Abst H11) in (let +H19 \def (eq_ind B b (\lambda (b0: B).(arity g (CHead c0 (Bind b0) u) t a2)) +H15 Abst H11) in (let H20 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 +Abst))) H1 Abst H11) in (let H21 \def (match (H20 (refl_equal B Abst)) in +False with []) in H21))))))))))))) H8)) H7)))))))))))))) (\lambda (c0: +C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 (asucc g +a1))).(\lambda (H2: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A +(\lambda (a2: A).(\lambda (a3: A).(eq A (asucc g a1) (AHead a2 a3)))) +(\lambda (a2: A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: +A).(\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda +(t0: T).(\lambda (a2: A).(\lambda (H3: (arity g (CHead c0 (Bind Abst) u0) t0 +a2)).(\lambda (H4: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A +(\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: +A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) u (asucc g a3)))) +(\lambda (_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 (Bind Abst) u0) +(Bind Abst) u) t a4))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) +(THead (Bind Abst) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) +\Rightarrow t1])) (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in +((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) +(THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in (\lambda (H8: (eq T +u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Bind +Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead +a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) +u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 +(Bind Abst) u0) (Bind Abst) u) t a4)))))) H4 t H7) in (let H10 \def (eq_ind T +t0 (\lambda (t1: T).(arity g (CHead c0 (Bind Abst) u0) t1 a2)) H3 t H7) in +(let H11 \def (eq_ind T u0 (\lambda (t1: T).((eq T t (THead (Bind Abst) u t)) +\to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) +(\lambda (a3: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) t1) u (asucc +g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead (CHead c0 (Bind +Abst) t1) (Bind Abst) u) t a4)))))) H9 u H8) in (let H12 \def (eq_ind T u0 +(\lambda (t1: T).(arity g (CHead c0 (Bind Abst) t1) t a2)) H10 u H8) in (let +H13 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead (Bind Abst) u t)) \to +(ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A (asucc g a1) (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)))))) +H2 u H8) in (let H14 \def (eq_ind T u0 (\lambda (t1: T).(arity g c0 t1 (asucc +g a1))) H1 u H8) in (ex3_2_intro A A (\lambda (a3: A).(\lambda (a4: A).(eq A +(AHead a1 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))) a1 a2 (refl_equal A (AHead a1 a2)) H14 H12))))))))) +H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda +(_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to +(ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) +(\lambda (a2: A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: +A).(\lambda (a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda +(t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda +(_: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: +A).(\lambda (a4: A).(eq A (AHead a1 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 (H5: (eq T +(THead (Flat Appl) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (eq_ind T +(THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind Abst) u t) H5) in (False_ind (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)))) H6)))))))))))) (\lambda (c0: C).(\lambda +(u0: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u0 (asucc g a0))).(\lambda +(_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: +A).(\lambda (a2: A).(eq A (asucc g a0) (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))))))).(\lambda (t0: +T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (_: (((eq T t0 (THead (Bind +Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (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))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Bind Abst) u +t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k +_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (THead (Bind Abst) u t) H5) in (False_ind (ex3_2 A A +(\lambda (a1: A).(\lambda (a2: A).(eq A a0 (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)))) H6))))))))))) (\lambda +(c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 +a1)).(\lambda (H2: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A +(\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a2: +A).(\lambda (_: A).(arity g c0 u (asucc g a2)))) (\lambda (_: A).(\lambda +(a3: A).(arity g (CHead c0 (Bind Abst) u) t a3))))))).(\lambda (a2: +A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t0 (THead (Bind Abst) u +t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind Abst) u t) +H4) in (let H6 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Bind +Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a1 (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)))))) +H2 (THead (Bind Abst) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t1: +T).(arity g c0 t1 a1)) H1 (THead (Bind Abst) u t) H5) in (let H8 \def (H6 +(refl_equal T (THead (Bind Abst) u t))) in (ex3_2_ind A A (\lambda (a3: +A).(\lambda (a4: A).(eq A a1 (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 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 (x0: A).(\lambda (x1: A).(\lambda (H9: (eq A a1 +(AHead x0 x1))).(\lambda (H10: (arity g c0 u (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_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: (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: 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 H15)) +(arity_repl g (CHead c0 (Bind Abst) u) t x1 H11 x3 H16)) a2 H18))))))) +H14)))))))))) H8))))))))))))) c y a H0))) H)))))). + +lemma arity_gen_appl: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a2: +A).((arity g c (THead (Flat Appl) u t) a2) \to (ex2 A (\lambda (a1: A).(arity +g c u a1)) (\lambda (a1: A).(arity g c t (AHead a1 a2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: +A).(\lambda (H: (arity g c (THead (Flat Appl) u t) a2)).(insert_eq T (THead +(Flat Appl) u t) (\lambda (t0: T).(arity g c t0 a2)) (\lambda (_: T).(ex2 A +(\lambda (a1: A).(arity g c u a1)) (\lambda (a1: A).(arity g c t (AHead a1 +a2))))) (\lambda (y: T).(\lambda (H0: (arity g c y a2)).(arity_ind g (\lambda +(c0: C).(\lambda (t0: T).(\lambda (a: A).((eq T t0 (THead (Flat Appl) u t)) +\to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t +(AHead a1 a)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T +(TSort n) (THead (Flat Appl) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow +False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H1) in +(False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity +g c0 t (AHead a1 (ASort O n))))) H2))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq +T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) +(\lambda (a1: A).(arity g d t (AHead a1 a))))))).(\lambda (H4: (eq T (TLRef +i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H4) in +(False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity +g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda +(_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g +d u a1)) (\lambda (a1: A).(arity g d t (AHead a1 (asucc g a)))))))).(\lambda +(H4: (eq T (TLRef i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef +i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u +t) H4) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: +A).(arity g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (b: B).(\lambda (_: +(not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: +A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat +Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: +A).(arity g c0 t (AHead a3 a1))))))).(\lambda (t0: T).(\lambda (a0: +A).(\lambda (_: (arity g (CHead c0 (Bind b) u0) t0 a0)).(\lambda (_: (((eq T +t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g (CHead c0 +(Bind b) u0) u a3)) (\lambda (a3: A).(arity g (CHead c0 (Bind b) u0) t (AHead +a3 a0))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Flat Appl) u +t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ +_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) +\Rightarrow False])])) I (THead (Flat Appl) u t) H6) in (False_ind (ex2 A +(\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 +a0)))) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: +A).(\lambda (_: (arity g c0 u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead +(Flat Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda +(a3: A).(arity g c0 t (AHead a3 (asucc g a1)))))))).(\lambda (t0: T).(\lambda +(a0: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u0) t0 a0)).(\lambda (_: +(((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g +(CHead c0 (Bind Abst) u0) u a3)) (\lambda (a3: A).(arity g (CHead c0 (Bind +Abst) u0) t (AHead a3 a0))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) +(THead (Flat Appl) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) +H5) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: +A).(arity g c0 t (AHead a3 (AHead a1 a0))))) H6)))))))))))) (\lambda (c0: +C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 +a1)).(\lambda (H2: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda +(a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 +a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 +(AHead a1 a0))).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A +(\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 +(AHead a1 a0)))))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead +(Flat Appl) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t1 _) +\Rightarrow t1])) (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in +((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow t1])) +(THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in (\lambda (H8: (eq T +u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead (Flat +Appl) u t)) \to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: +A).(arity g c0 t (AHead a3 (AHead a1 a0))))))) H4 t H7) in (let H10 \def +(eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a0))) H3 t H7) in (let +H11 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead (Flat Appl) u t)) \to +(ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t +(AHead a3 a1)))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t1: +T).(arity g c0 t1 a1)) H1 u H8) in (ex_intro2 A (\lambda (a3: A).(arity g c0 +u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0))) a1 H12 H10))))))) +H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: +(arity g c0 u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) +\to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t +(AHead a1 (asucc g a)))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 +a)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: +A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 +a))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Flat Appl) u +t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k +_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) +\Rightarrow (match f with [Appl \Rightarrow False | Cast \Rightarrow +True])])])) I (THead (Flat Appl) u t) H5) in (False_ind (ex2 A (\lambda (a1: +A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) +H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda +(H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Flat Appl) u t)) +\to (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t +(AHead a3 a1))))))).(\lambda (a0: A).(\lambda (H3: (leq g a1 a0)).(\lambda +(H4: (eq T t0 (THead (Flat Appl) u t))).(let H5 \def (f_equal T T (\lambda +(e: T).e) t0 (THead (Flat Appl) u t) H4) in (let H6 \def (eq_ind T t0 +(\lambda (t1: T).((eq T t1 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a3: +A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a1)))))) H2 +(THead (Flat Appl) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t1: +T).(arity g c0 t1 a1)) H1 (THead (Flat Appl) u t) H5) in (let H8 \def (H6 +(refl_equal T (THead (Flat Appl) u t))) in (ex2_ind A (\lambda (a3: A).(arity +g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a1))) (ex2 A (\lambda +(a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0)))) +(\lambda (x: A).(\lambda (H9: (arity g c0 u x)).(\lambda (H10: (arity g c0 t +(AHead x a1))).(ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: +A).(arity g c0 t (AHead a3 a0))) x H9 (arity_repl g c0 t (AHead x a1) H10 +(AHead x a0) (leq_head g x x (leq_refl g x) a1 a0 H3)))))) H8))))))))))))) c +y a2 H0))) H)))))). + +lemma arity_gen_cast: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a: +A).((arity g c (THead (Flat Cast) u t) a) \to (land (arity g c u (asucc g a)) +(arity g c t a))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: +A).(\lambda (H: (arity g c (THead (Flat Cast) u t) a)).(insert_eq T (THead +(Flat Cast) u t) (\lambda (t0: T).(arity g c t0 a)) (\lambda (_: T).(land +(arity g c u (asucc g a)) (arity g c t a))) (\lambda (y: T).(\lambda (H0: +(arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: +A).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) +(arity g c0 t a0)))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T +(TSort n) (THead (Flat Cast) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow +False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H1) in +(False_ind (land (arity g c0 u (asucc g (ASort O n))) (arity g c0 t (ASort O +n))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: +nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a0: +A).(\lambda (_: (arity g d u0 a0)).(\lambda (_: (((eq T u0 (THead (Flat Cast) +u t)) \to (land (arity g d u (asucc g a0)) (arity g d t a0))))).(\lambda (H4: +(eq T (TLRef i) (THead (Flat Cast) u t))).(let H5 \def (eq_ind T (TLRef i) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u +t) H4) in (False_ind (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)) +H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: +nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: +A).(\lambda (_: (arity g d u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead +(Flat Cast) u t)) \to (land (arity g d u (asucc g (asucc g a0))) (arity g d t +(asucc g a0)))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) u +t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Flat Cast) u t) H4) in (False_ind (land (arity g c0 u +(asucc g a0)) (arity g c0 t a0)) H5))))))))))) (\lambda (b: B).(\lambda (_: +(not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: +A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat +Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t +a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 +(Bind b) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to +(land (arity g (CHead c0 (Bind b) u0) u (asucc g a2)) (arity g (CHead c0 +(Bind b) u0) t a2))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead +(Flat Cast) u t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | +(Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H6) in (False_ind +(land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) H7)))))))))))))) +(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 +u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land +(arity g c0 u (asucc g (asucc g a1))) (arity g c0 t (asucc g +a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 +(Bind Abst) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to +(land (arity g (CHead c0 (Bind Abst) u0) u (asucc g a2)) (arity g (CHead c0 +(Bind Abst) u0) t a2))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) +(THead (Flat Cast) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) +H5) in (False_ind (land (arity g c0 u (asucc g (AHead a1 a2))) (arity g c0 t +(AHead a1 a2))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda +(a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat +Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t +a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead +a1 a2))).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g +c0 u (asucc g (AHead a1 a2))) (arity g c0 t (AHead a1 a2)))))).(\lambda (H5: +(eq T (THead (Flat Appl) u0 t0) (THead (Flat Cast) u t))).(let H6 \def +(eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow +(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead +(Flat Cast) u t) H5) in (False_ind (land (arity g c0 u (asucc g a2)) (arity g +c0 t a2)) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a0: +A).(\lambda (H1: (arity g c0 u0 (asucc g a0))).(\lambda (H2: (((eq T u0 +(THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) +(arity g c0 t (asucc g a0)))))).(\lambda (t0: T).(\lambda (H3: (arity g c0 t0 +a0)).(\lambda (H4: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 +u (asucc g a0)) (arity g c0 t a0))))).(\lambda (H5: (eq T (THead (Flat Cast) +u0 t0) (THead (Flat Cast) u t))).(let H6 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | +(THead _ t1 _) \Rightarrow t1])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) +u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t1) \Rightarrow +t1])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t) H5) in (\lambda (H8: +(eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t1: T).((eq T t1 (THead +(Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)))) +H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 a0)) +H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t1: T).((eq T t1 (THead +(Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) (arity g c0 +t (asucc g a0))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t1: +T).(arity g c0 t1 (asucc g a0))) H1 u H8) in (conj (arity g c0 u (asucc g +a0)) (arity g c0 t a0) H12 H10))))))) H6))))))))))) (\lambda (c0: C).(\lambda +(t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: +(((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) +(arity g c0 t a1))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda +(H4: (eq T t0 (THead (Flat Cast) u t))).(let H5 \def (f_equal T T (\lambda +(e: T).e) t0 (THead (Flat Cast) u t) H4) in (let H6 \def (eq_ind T t0 +(\lambda (t1: T).((eq T t1 (THead (Flat Cast) u t)) \to (land (arity g c0 u +(asucc g a1)) (arity g c0 t a1)))) H2 (THead (Flat Cast) u t) H5) in (let H7 +\def (eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 a1)) H1 (THead (Flat Cast) +u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Flat Cast) u t))) in +(land_ind (arity g c0 u (asucc g a1)) (arity g c0 t a1) (land (arity g c0 u +(asucc g a2)) (arity g c0 t a2)) (\lambda (H9: (arity g c0 u (asucc g +a1))).(\lambda (H10: (arity g c0 t a1)).(conj (arity g c0 u (asucc g a2)) +(arity g c0 t a2) (arity_repl g c0 u (asucc g a1) H9 (asucc g a2) (asucc_repl +g a1 a2 H3)) (arity_repl g c0 t a1 H10 a2 H3)))) H8))))))))))))) c y a H0))) +H)))))). + +lemma arity_gen_appls: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (vs: TList).(\forall +(a2: A).((arity g c (THeads (Flat Appl) vs t) a2) \to (ex A (\lambda (a: +A).(arity g c t a)))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (vs: +TList).(TList_ind (\lambda (t0: TList).(\forall (a2: A).((arity g c (THeads +(Flat Appl) t0 t) a2) \to (ex A (\lambda (a: A).(arity g c t a)))))) (\lambda +(a2: A).(\lambda (H: (arity g c t a2)).(ex_intro A (\lambda (a: A).(arity g c +t a)) a2 H))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: ((\forall +(a2: A).((arity g c (THeads (Flat Appl) t1 t) a2) \to (ex A (\lambda (a: +A).(arity g c t a))))))).(\lambda (a2: A).(\lambda (H0: (arity g c (THead +(Flat Appl) t0 (THeads (Flat Appl) t1 t)) a2)).(let H1 \def (arity_gen_appl g +c t0 (THeads (Flat Appl) t1 t) a2 H0) in (ex2_ind A (\lambda (a1: A).(arity g +c t0 a1)) (\lambda (a1: A).(arity g c (THeads (Flat Appl) t1 t) (AHead a1 +a2))) (ex A (\lambda (a: A).(arity g c t a))) (\lambda (x: A).(\lambda (_: +(arity g c t0 x)).(\lambda (H3: (arity g c (THeads (Flat Appl) t1 t) (AHead x +a2))).(let H_x \def (H (AHead x a2) H3) in (let H4 \def H_x in (ex_ind A +(\lambda (a: A).(arity g c t a)) (ex A (\lambda (a: A).(arity g c t a))) +(\lambda (x0: A).(\lambda (H5: (arity g c t x0)).(ex_intro A (\lambda (a: +A).(arity g c t a)) x0 H5))) H4)))))) H1))))))) vs)))). + +lemma arity_gen_lift: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).(\forall (h: +nat).(\forall (d: nat).((arity g c1 (lift h d t) a) \to (\forall (c2: +C).((drop h d c1 c2) \to (arity g c2 t a))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (arity g c1 (lift h d t) a)).(insert_eq T +(lift h d t) (\lambda (t0: T).(arity g c1 t0 a)) (\lambda (_: T).(\forall +(c2: C).((drop h d c1 c2) \to (arity g c2 t a)))) (\lambda (y: T).(\lambda +(H0: (arity g c1 y a)).(unintro T t (\lambda (t0: T).((eq T y (lift h d t0)) +\to (\forall (c2: C).((drop h d c1 c2) \to (arity g c2 t0 a))))) (unintro nat +d (\lambda (n: nat).(\forall (x: T).((eq T y (lift h n x)) \to (\forall (c2: +C).((drop h n c1 c2) \to (arity g c2 x a)))))) (arity_ind g (\lambda (c: +C).(\lambda (t0: T).(\lambda (a0: A).(\forall (x: nat).(\forall (x0: T).((eq +T t0 (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to (arity g c2 x0 +a0))))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (x: nat).(\lambda (x0: +T).(\lambda (H1: (eq T (TSort n) (lift h x x0))).(\lambda (c2: C).(\lambda +(_: (drop h x c c2)).(eq_ind_r T (TSort n) (\lambda (t0: T).(arity g c2 t0 +(ASort O n))) (arity_sort g c2 n) x0 (lift_gen_sort h x n x0 H1))))))))) +(\lambda (c: C).(\lambda (d0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H1: (getl i c (CHead d0 (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H2: +(arity g d0 u a0)).(\lambda (H3: ((\forall (x: nat).(\forall (x0: T).((eq T u +(lift h x x0)) \to (\forall (c2: C).((drop h x d0 c2) \to (arity g c2 x0 +a0)))))))).(\lambda (x: nat).(\lambda (x0: T).(\lambda (H4: (eq T (TLRef i) +(lift h x x0))).(\lambda (c2: C).(\lambda (H5: (drop h x c c2)).(let H_x \def +(lift_gen_lref x0 x h i H4) in (let H6 \def H_x in (or_ind (land (lt i x) (eq +T x0 (TLRef i))) (land (le (plus x h) i) (eq T x0 (TLRef (minus i h)))) +(arity g c2 x0 a0) (\lambda (H7: (land (lt i x) (eq T x0 (TLRef +i)))).(land_ind (lt i x) (eq T x0 (TLRef i)) (arity g c2 x0 a0) (\lambda (H8: +(lt i x)).(\lambda (H9: (eq T x0 (TLRef i))).(eq_ind_r T (TLRef i) (\lambda +(t0: T).(arity g c2 t0 a0)) (let H10 \def (eq_ind nat x (\lambda (n: +nat).(drop h n c c2)) H5 (S (plus i (minus x (S i)))) (lt_plus_minus i x H8)) +in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x (S +i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i c2 (CHead e0 (Bind Abbr) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (minus x (S i)) d0 e0))) +(arity g c2 (TLRef i) a0) (\lambda (x1: T).(\lambda (x2: C).(\lambda (H11: +(eq T u (lift h (minus x (S i)) x1))).(\lambda (H12: (getl i c2 (CHead x2 +(Bind Abbr) x1))).(\lambda (H13: (drop h (minus x (S i)) d0 x2)).(let H14 +\def (eq_ind T u (\lambda (t0: T).(\forall (x3: nat).(\forall (x4: T).((eq T +t0 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 d0 c3) \to (arity g c3 x4 +a0))))))) H3 (lift h (minus x (S i)) x1) H11) in (let H15 \def (eq_ind T u +(\lambda (t0: T).(arity g d0 t0 a0)) H2 (lift h (minus x (S i)) x1) H11) in +(arity_abbr g c2 x2 x1 i H12 a0 (H14 (minus x (S i)) x1 (refl_equal T (lift h +(minus x (S i)) x1)) x2 H13))))))))) (getl_drop_conf_lt Abbr c d0 u i H1 c2 h +(minus x (S i)) H10))) x0 H9))) H7)) (\lambda (H7: (land (le (plus x h) i) +(eq T x0 (TLRef (minus i h))))).(land_ind (le (plus x h) i) (eq T x0 (TLRef +(minus i h))) (arity g c2 x0 a0) (\lambda (H8: (le (plus x h) i)).(\lambda +(H9: (eq T x0 (TLRef (minus i h)))).(eq_ind_r T (TLRef (minus i h)) (\lambda +(t0: T).(arity g c2 t0 a0)) (arity_abbr g c2 d0 u (minus i h) +(getl_drop_conf_ge i (CHead d0 (Bind Abbr) u) c H1 c2 h x H5 H8) a0 H2) x0 +H9))) H7)) H6)))))))))))))))) (\lambda (c: C).(\lambda (d0: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H1: (getl i c (CHead d0 (Bind Abst) +u))).(\lambda (a0: A).(\lambda (H2: (arity g d0 u (asucc g a0))).(\lambda +(H3: ((\forall (x: nat).(\forall (x0: T).((eq T u (lift h x x0)) \to (\forall +(c2: C).((drop h x d0 c2) \to (arity g c2 x0 (asucc g a0))))))))).(\lambda +(x: nat).(\lambda (x0: T).(\lambda (H4: (eq T (TLRef i) (lift h x +x0))).(\lambda (c2: C).(\lambda (H5: (drop h x c c2)).(let H_x \def +(lift_gen_lref x0 x h i H4) in (let H6 \def H_x in (or_ind (land (lt i x) (eq +T x0 (TLRef i))) (land (le (plus x h) i) (eq T x0 (TLRef (minus i h)))) +(arity g c2 x0 a0) (\lambda (H7: (land (lt i x) (eq T x0 (TLRef +i)))).(land_ind (lt i x) (eq T x0 (TLRef i)) (arity g c2 x0 a0) (\lambda (H8: +(lt i x)).(\lambda (H9: (eq T x0 (TLRef i))).(eq_ind_r T (TLRef i) (\lambda +(t0: T).(arity g c2 t0 a0)) (let H10 \def (eq_ind nat x (\lambda (n: +nat).(drop h n c c2)) H5 (S (plus i (minus x (S i)))) (lt_plus_minus i x H8)) +in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x (S +i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i c2 (CHead e0 (Bind Abst) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (minus x (S i)) d0 e0))) +(arity g c2 (TLRef i) a0) (\lambda (x1: T).(\lambda (x2: C).(\lambda (H11: +(eq T u (lift h (minus x (S i)) x1))).(\lambda (H12: (getl i c2 (CHead x2 +(Bind Abst) x1))).(\lambda (H13: (drop h (minus x (S i)) d0 x2)).(let H14 +\def (eq_ind T u (\lambda (t0: T).(\forall (x3: nat).(\forall (x4: T).((eq T +t0 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 d0 c3) \to (arity g c3 x4 +(asucc g a0)))))))) H3 (lift h (minus x (S i)) x1) H11) in (let H15 \def +(eq_ind T u (\lambda (t0: T).(arity g d0 t0 (asucc g a0))) H2 (lift h (minus +x (S i)) x1) H11) in (arity_abst g c2 x2 x1 i H12 a0 (H14 (minus x (S i)) x1 +(refl_equal T (lift h (minus x (S i)) x1)) x2 H13))))))))) (getl_drop_conf_lt +Abst c d0 u i H1 c2 h (minus x (S i)) H10))) x0 H9))) H7)) (\lambda (H7: +(land (le (plus x h) i) (eq T x0 (TLRef (minus i h))))).(land_ind (le (plus x +h) i) (eq T x0 (TLRef (minus i h))) (arity g c2 x0 a0) (\lambda (H8: (le +(plus x h) i)).(\lambda (H9: (eq T x0 (TLRef (minus i h)))).(eq_ind_r T +(TLRef (minus i h)) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_abst g c2 d0 +u (minus i h) (getl_drop_conf_ge i (CHead d0 (Bind Abst) u) c H1 c2 h x H5 +H8) a0 H2) x0 H9))) H7)) H6)))))))))))))))) (\lambda (b: B).(\lambda (H1: +(not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (H2: (arity g c u a1)).(\lambda (H3: ((\forall (x: nat).(\forall +(x0: T).((eq T u (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to +(arity g c2 x0 a1)))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H4: +(arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H5: ((\forall (x: +nat).(\forall (x0: T).((eq T t0 (lift h x x0)) \to (\forall (c2: C).((drop h +x (CHead c (Bind b) u) c2) \to (arity g c2 x0 a2)))))))).(\lambda (x: +nat).(\lambda (x0: T).(\lambda (H6: (eq T (THead (Bind b) u t0) (lift h x +x0))).(\lambda (c2: C).(\lambda (H7: (drop h x c c2)).(ex3_2_ind T T (\lambda +(y0: T).(\lambda (z: T).(eq T x0 (THead (Bind b) y0 z)))) (\lambda (y0: +T).(\lambda (_: T).(eq T u (lift h x y0)))) (\lambda (_: T).(\lambda (z: +T).(eq T t0 (lift h (S x) z)))) (arity g c2 x0 a2) (\lambda (x1: T).(\lambda +(x2: T).(\lambda (H8: (eq T x0 (THead (Bind b) x1 x2))).(\lambda (H9: (eq T u +(lift h x x1))).(\lambda (H10: (eq T t0 (lift h (S x) x2))).(eq_ind_r T +(THead (Bind b) x1 x2) (\lambda (t1: T).(arity g c2 t1 a2)) (let H11 \def +(eq_ind T t0 (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T t1 +(lift h x3 x4)) \to (\forall (c3: C).((drop h x3 (CHead c (Bind b) u) c3) \to +(arity g c3 x4 a2))))))) H5 (lift h (S x) x2) H10) in (let H12 \def (eq_ind T +t0 (\lambda (t1: T).(arity g (CHead c (Bind b) u) t1 a2)) H4 (lift h (S x) +x2) H10) in (let H13 \def (eq_ind T u (\lambda (t1: T).(arity g (CHead c +(Bind b) t1) (lift h (S x) x2) a2)) H12 (lift h x x1) H9) in (let H14 \def +(eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T (lift +h (S x) x2) (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 (CHead c (Bind +b) t1) c3) \to (arity g c3 x4 a2))))))) H11 (lift h x x1) H9) in (let H15 +\def (eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T +t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to (arity g c3 x4 +a1))))))) H3 (lift h x x1) H9) in (let H16 \def (eq_ind T u (\lambda (t1: +T).(arity g c t1 a1)) H2 (lift h x x1) H9) in (arity_bind g b H1 c2 x1 a1 +(H15 x x1 (refl_equal T (lift h x x1)) c2 H7) x2 a2 (H14 (S x) x2 (refl_equal +T (lift h (S x) x2)) (CHead c2 (Bind b) x1) (drop_skip_bind h x c c2 H7 b +x1))))))))) x0 H8)))))) (lift_gen_bind b u t0 x0 h x H6)))))))))))))))))) +(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity g c u +(asucc g a1))).(\lambda (H2: ((\forall (x: nat).(\forall (x0: T).((eq T u +(lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to (arity g c2 x0 +(asucc g a1))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H3: (arity g +(CHead c (Bind Abst) u) t0 a2)).(\lambda (H4: ((\forall (x: nat).(\forall +(x0: T).((eq T t0 (lift h x x0)) \to (\forall (c2: C).((drop h x (CHead c +(Bind Abst) u) c2) \to (arity g c2 x0 a2)))))))).(\lambda (x: nat).(\lambda +(x0: T).(\lambda (H5: (eq T (THead (Bind Abst) u t0) (lift h x x0))).(\lambda +(c2: C).(\lambda (H6: (drop h x c c2)).(ex3_2_ind T T (\lambda (y0: +T).(\lambda (z: T).(eq T x0 (THead (Bind Abst) y0 z)))) (\lambda (y0: +T).(\lambda (_: T).(eq T u (lift h x y0)))) (\lambda (_: T).(\lambda (z: +T).(eq T t0 (lift h (S x) z)))) (arity g c2 x0 (AHead a1 a2)) (\lambda (x1: +T).(\lambda (x2: T).(\lambda (H7: (eq T x0 (THead (Bind Abst) x1 +x2))).(\lambda (H8: (eq T u (lift h x x1))).(\lambda (H9: (eq T t0 (lift h (S +x) x2))).(eq_ind_r T (THead (Bind Abst) x1 x2) (\lambda (t1: T).(arity g c2 +t1 (AHead a1 a2))) (let H10 \def (eq_ind T t0 (\lambda (t1: T).(\forall (x3: +nat).(\forall (x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h +x3 (CHead c (Bind Abst) u) c3) \to (arity g c3 x4 a2))))))) H4 (lift h (S x) +x2) H9) in (let H11 \def (eq_ind T t0 (\lambda (t1: T).(arity g (CHead c +(Bind Abst) u) t1 a2)) H3 (lift h (S x) x2) H9) in (let H12 \def (eq_ind T u +(\lambda (t1: T).(arity g (CHead c (Bind Abst) t1) (lift h (S x) x2) a2)) H11 +(lift h x x1) H8) in (let H13 \def (eq_ind T u (\lambda (t1: T).(\forall (x3: +nat).(\forall (x4: T).((eq T (lift h (S x) x2) (lift h x3 x4)) \to (\forall +(c3: C).((drop h x3 (CHead c (Bind Abst) t1) c3) \to (arity g c3 x4 a2))))))) +H10 (lift h x x1) H8) in (let H14 \def (eq_ind T u (\lambda (t1: T).(\forall +(x3: nat).(\forall (x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: +C).((drop h x3 c c3) \to (arity g c3 x4 (asucc g a1)))))))) H2 (lift h x x1) +H8) in (let H15 \def (eq_ind T u (\lambda (t1: T).(arity g c t1 (asucc g +a1))) H1 (lift h x x1) H8) in (arity_head g c2 x1 a1 (H14 x x1 (refl_equal T +(lift h x x1)) c2 H6) x2 a2 (H13 (S x) x2 (refl_equal T (lift h (S x) x2)) +(CHead c2 (Bind Abst) x1) (drop_skip_bind h x c c2 H6 Abst x1))))))))) x0 +H7)))))) (lift_gen_bind Abst u t0 x0 h x H5)))))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity g c u a1)).(\lambda +(H2: ((\forall (x: nat).(\forall (x0: T).((eq T u (lift h x x0)) \to (\forall +(c2: C).((drop h x c c2) \to (arity g c2 x0 a1)))))))).(\lambda (t0: +T).(\lambda (a2: A).(\lambda (H3: (arity g c t0 (AHead a1 a2))).(\lambda (H4: +((\forall (x: nat).(\forall (x0: T).((eq T t0 (lift h x x0)) \to (\forall +(c2: C).((drop h x c c2) \to (arity g c2 x0 (AHead a1 a2))))))))).(\lambda +(x: nat).(\lambda (x0: T).(\lambda (H5: (eq T (THead (Flat Appl) u t0) (lift +h x x0))).(\lambda (c2: C).(\lambda (H6: (drop h x c c2)).(ex3_2_ind T T +(\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat Appl) y0 z)))) +(\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x y0)))) (\lambda (_: +T).(\lambda (z: T).(eq T t0 (lift h x z)))) (arity g c2 x0 a2) (\lambda (x1: +T).(\lambda (x2: T).(\lambda (H7: (eq T x0 (THead (Flat Appl) x1 +x2))).(\lambda (H8: (eq T u (lift h x x1))).(\lambda (H9: (eq T t0 (lift h x +x2))).(eq_ind_r T (THead (Flat Appl) x1 x2) (\lambda (t1: T).(arity g c2 t1 +a2)) (let H10 \def (eq_ind T t0 (\lambda (t1: T).(\forall (x3: nat).(\forall +(x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to +(arity g c3 x4 (AHead a1 a2)))))))) H4 (lift h x x2) H9) in (let H11 \def +(eq_ind T t0 (\lambda (t1: T).(arity g c t1 (AHead a1 a2))) H3 (lift h x x2) +H9) in (let H12 \def (eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall +(x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to +(arity g c3 x4 a1))))))) H2 (lift h x x1) H8) in (let H13 \def (eq_ind T u +(\lambda (t1: T).(arity g c t1 a1)) H1 (lift h x x1) H8) in (arity_appl g c2 +x1 a1 (H12 x x1 (refl_equal T (lift h x x1)) c2 H6) x2 a2 (H10 x x2 +(refl_equal T (lift h x x2)) c2 H6)))))) x0 H7)))))) (lift_gen_flat Appl u t0 +x0 h x H5)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: +A).(\lambda (H1: (arity g c u (asucc g a0))).(\lambda (H2: ((\forall (x: +nat).(\forall (x0: T).((eq T u (lift h x x0)) \to (\forall (c2: C).((drop h x +c c2) \to (arity g c2 x0 (asucc g a0))))))))).(\lambda (t0: T).(\lambda (H3: +(arity g c t0 a0)).(\lambda (H4: ((\forall (x: nat).(\forall (x0: T).((eq T +t0 (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to (arity g c2 x0 +a0)))))))).(\lambda (x: nat).(\lambda (x0: T).(\lambda (H5: (eq T (THead +(Flat Cast) u t0) (lift h x x0))).(\lambda (c2: C).(\lambda (H6: (drop h x c +c2)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat +Cast) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x y0)))) +(\lambda (_: T).(\lambda (z: T).(eq T t0 (lift h x z)))) (arity g c2 x0 a0) +(\lambda (x1: T).(\lambda (x2: T).(\lambda (H7: (eq T x0 (THead (Flat Cast) +x1 x2))).(\lambda (H8: (eq T u (lift h x x1))).(\lambda (H9: (eq T t0 (lift h +x x2))).(eq_ind_r T (THead (Flat Cast) x1 x2) (\lambda (t1: T).(arity g c2 t1 +a0)) (let H10 \def (eq_ind T t0 (\lambda (t1: T).(\forall (x3: nat).(\forall +(x4: T).((eq T t1 (lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to +(arity g c3 x4 a0))))))) H4 (lift h x x2) H9) in (let H11 \def (eq_ind T t0 +(\lambda (t1: T).(arity g c t1 a0)) H3 (lift h x x2) H9) in (let H12 \def +(eq_ind T u (\lambda (t1: T).(\forall (x3: nat).(\forall (x4: T).((eq T t1 +(lift h x3 x4)) \to (\forall (c3: C).((drop h x3 c c3) \to (arity g c3 x4 +(asucc g a0)))))))) H2 (lift h x x1) H8) in (let H13 \def (eq_ind T u +(\lambda (t1: T).(arity g c t1 (asucc g a0))) H1 (lift h x x1) H8) in +(arity_cast g c2 x1 a0 (H12 x x1 (refl_equal T (lift h x x1)) c2 H6) x2 (H10 +x x2 (refl_equal T (lift h x x2)) c2 H6)))))) x0 H7)))))) (lift_gen_flat Cast +u t0 x0 h x H5))))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: +A).(\lambda (_: (arity g c t0 a1)).(\lambda (H2: ((\forall (x: nat).(\forall +(x0: T).((eq T t0 (lift h x x0)) \to (\forall (c2: C).((drop h x c c2) \to +(arity g c2 x0 a1)))))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 +a2)).(\lambda (x: nat).(\lambda (x0: T).(\lambda (H4: (eq T t0 (lift h x +x0))).(\lambda (c2: C).(\lambda (H5: (drop h x c c2)).(arity_repl g c2 x0 a1 +(H2 x x0 H4 c2 H5) a2 H3))))))))))))) c1 y a H0))))) H))))))). + +theorem arity_mono: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a1: A).((arity g c +t a1) \to (\forall (a2: A).((arity g c t a2) \to (leq g a1 a2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H: +(arity g c t a1)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: +A).(\forall (a2: A).((arity g c0 t0 a2) \to (leq g a a2)))))) (\lambda (c0: +C).(\lambda (n: nat).(\lambda (a2: A).(\lambda (H0: (arity g c0 (TSort n) +a2)).(leq_sym g a2 (ASort O n) (arity_gen_sort g c0 n a2 H0)))))) (\lambda +(c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl +i c0 (CHead d (Bind Abbr) u))).(\lambda (a: A).(\lambda (_: (arity g d u +a)).(\lambda (H2: ((\forall (a2: A).((arity g d u a2) \to (leq g a +a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 +\def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: +C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: +C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: +C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: +C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda +(H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind +Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 +a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 +(Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) +(leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 +(CHead x0 (Bind Abbr) x1))).(\lambda (H7: (arity g x0 x1 a2)).(let H8 \def +(eq_ind C (CHead d (Bind Abbr) u) (\lambda (c1: C).(getl i c0 c1)) H0 (CHead +x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind +Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind +Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 +(CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) +(CHead d (Bind Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d +(Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (\lambda (H11: (eq C d +x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t0: T).(getl i c0 (CHead x0 (Bind +Abbr) t0))) H8 u H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t0: T).(arity +g x0 t0 a2)) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c1: C).(getl +i c0 (CHead c1 (Bind Abbr) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 +(\lambda (c1: C).(arity g c1 u a2)) H13 d H11) in (H2 a2 H15))))))) H9))))))) +H5)) (\lambda (H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 +(CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 +(asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 +(CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 +(asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: +(getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (_: (arity g x0 x1 (asucc g +a2))).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c1: C).(getl i +c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i +H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind +Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with +[Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | +(Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 +(CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind +(leq g a a2) H9))))))) H5)) H4)))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind +Abst) u))).(\lambda (a: A).(\lambda (_: (arity g d u (asucc g a))).(\lambda +(H2: ((\forall (a2: A).((arity g d u a2) \to (leq g (asucc g a) +a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 +\def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: +C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: +C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: +C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: +C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda +(H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind +Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 +a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 +(Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) +(leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 +(CHead x0 (Bind Abbr) x1))).(\lambda (_: (arity g x0 x1 a2)).(let H8 \def +(eq_ind C (CHead d (Bind Abst) u) (\lambda (c1: C).(getl i c0 c1)) H0 (CHead +x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind +Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda +(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d +(Bind Abst) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (leq g a a2) +H9))))))) H5)) (\lambda (H5: (ex2_2 C T (\lambda (d0: C).(\lambda (u0: +T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: +T).(arity g d0 u0 (asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda +(u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda +(u0: T).(arity g d0 u0 (asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: +(arity g x0 x1 (asucc g a2))).(let H8 \def (eq_ind C (CHead d (Bind Abst) u) +(\lambda (c1: C).(getl i c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 +(CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def +(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead +c1 _ _) \Rightarrow c1])) (CHead d (Bind Abst) u) (CHead x0 (Bind Abst) x1) +(getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in +((let H10 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abst) u) +(CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead +x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def +(eq_ind_r T x1 (\lambda (t0: T).(getl i c0 (CHead x0 (Bind Abst) t0))) H8 u +H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t0: T).(arity g x0 t0 (asucc g +a2))) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c1: C).(getl i c0 +(CHead c1 (Bind Abst) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 +(\lambda (c1: C).(arity g c1 u (asucc g a2))) H13 d H11) in (asucc_inj g a a2 +(H2 (asucc g a2) H15)))))))) H9))))))) H5)) H4)))))))))))) (\lambda (b: +B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: +T).(\lambda (a2: A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall +(a3: A).((arity g c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda +(a3: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a3)).(\lambda (H4: +((\forall (a4: A).((arity g (CHead c0 (Bind b) u) t0 a4) \to (leq g a3 +a4))))).(\lambda (a0: A).(\lambda (H5: (arity g c0 (THead (Bind b) u t0) +a0)).(let H6 \def (arity_gen_bind b H0 g c0 u t0 a0 H5) in (ex2_ind A +(\lambda (a4: A).(arity g c0 u a4)) (\lambda (_: A).(arity g (CHead c0 (Bind +b) u) t0 a0)) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g c0 u +x)).(\lambda (H8: (arity g (CHead c0 (Bind b) u) t0 a0)).(H4 a0 H8)))) +H6))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda +(_: (arity g c0 u (asucc g a2))).(\lambda (H1: ((\forall (a3: A).((arity g c0 +u a3) \to (leq g (asucc g a2) a3))))).(\lambda (t0: T).(\lambda (a3: +A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a3)).(\lambda (H3: +((\forall (a4: A).((arity g (CHead c0 (Bind Abst) u) t0 a4) \to (leq g a3 +a4))))).(\lambda (a0: A).(\lambda (H4: (arity g c0 (THead (Bind Abst) u t0) +a0)).(let H5 \def (arity_gen_abst g c0 u t0 a0 H4) in (ex3_2_ind A A (\lambda +(a4: A).(\lambda (a5: A).(eq A a0 (AHead a4 a5)))) (\lambda (a4: A).(\lambda +(_: A).(arity g c0 u (asucc g a4)))) (\lambda (_: A).(\lambda (a5: A).(arity +g (CHead c0 (Bind Abst) u) t0 a5))) (leq g (AHead a2 a3) a0) (\lambda (x0: +A).(\lambda (x1: A).(\lambda (H6: (eq A a0 (AHead x0 x1))).(\lambda (H7: +(arity g c0 u (asucc g x0))).(\lambda (H8: (arity g (CHead c0 (Bind Abst) u) +t0 x1)).(eq_ind_r A (AHead x0 x1) (\lambda (a: A).(leq g (AHead a2 a3) a)) +(leq_head g a2 x0 (asucc_inj g a2 x0 (H1 (asucc g x0) H7)) a3 x1 (H3 x1 H8)) +a0 H6)))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: +A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall (a3: A).((arity g +c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: +(arity g c0 t0 (AHead a2 a3))).(\lambda (H3: ((\forall (a4: A).((arity g c0 +t0 a4) \to (leq g (AHead a2 a3) a4))))).(\lambda (a0: A).(\lambda (H4: (arity +g c0 (THead (Flat Appl) u t0) a0)).(let H5 \def (arity_gen_appl g c0 u t0 a0 +H4) in (ex2_ind A (\lambda (a4: A).(arity g c0 u a4)) (\lambda (a4: A).(arity +g c0 t0 (AHead a4 a0))) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g +c0 u x)).(\lambda (H7: (arity g c0 t0 (AHead x a0))).(ahead_inj_snd g a2 a3 x +a0 (H3 (AHead x a0) H7))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: +T).(\lambda (a: A).(\lambda (_: (arity g c0 u (asucc g a))).(\lambda (_: +((\forall (a2: A).((arity g c0 u a2) \to (leq g (asucc g a) a2))))).(\lambda +(t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (H3: ((\forall (a2: +A).((arity g c0 t0 a2) \to (leq g a a2))))).(\lambda (a2: A).(\lambda (H4: +(arity g c0 (THead (Flat Cast) u t0) a2)).(let H5 \def (arity_gen_cast g c0 u +t0 a2 H4) in (land_ind (arity g c0 u (asucc g a2)) (arity g c0 t0 a2) (leq g +a a2) (\lambda (_: (arity g c0 u (asucc g a2))).(\lambda (H7: (arity g c0 t0 +a2)).(H3 a2 H7))) H5)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda +(a2: A).(\lambda (_: (arity g c0 t0 a2)).(\lambda (H1: ((\forall (a3: +A).((arity g c0 t0 a3) \to (leq g a2 a3))))).(\lambda (a3: A).(\lambda (H2: +(leq g a2 a3)).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 a0)).(leq_trans +g a3 a2 (leq_sym g a2 a3 H2) a0 (H1 a0 H3))))))))))) c t a1 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/lift1.ma new file mode 100644 index 000000000..8d52c974e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/lift1.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/arity/props.ma". + +include "basic_1A/drop1/fwd.ma". + +lemma arity_lift1: + \forall (g: G).(\forall (a: A).(\forall (c2: C).(\forall (hds: +PList).(\forall (c1: C).(\forall (t: T).((drop1 hds c1 c2) \to ((arity g c2 t +a) \to (arity g c1 (lift1 hds t) a)))))))) +\def + \lambda (g: G).(\lambda (a: A).(\lambda (c2: C).(\lambda (hds: +PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (t: +T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a)))))) +(\lambda (c1: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c1 c2)).(\lambda +(H0: (arity g c2 t a)).(let H_y \def (drop1_gen_pnil c1 c2 H) in (eq_ind_r C +c2 (\lambda (c: C).(arity g c t a)) H0 c1 H_y)))))) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: +C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 +(lift1 p t) a))))))).(\lambda (c1: C).(\lambda (t: T).(\lambda (H0: (drop1 +(PCons n n0 p) c1 c2)).(\lambda (H1: (arity g c2 t a)).(let H_x \def +(drop1_gen_pcons c1 c2 p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda +(c3: C).(drop n n0 c1 c3)) (\lambda (c3: C).(drop1 p c3 c2)) (arity g c1 +(lift n n0 (lift1 p t)) a) (\lambda (x: C).(\lambda (H3: (drop n n0 c1 +x)).(\lambda (H4: (drop1 p x c2)).(arity_lift g x (lift1 p t) a (H x t H4 H1) +c1 n n0 H3)))) H2))))))))))) hds)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/pr3.ma new file mode 100644 index 000000000..fb730bebe --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/pr3.ma @@ -0,0 +1,579 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csuba/arity.ma". + +include "basic_1A/pr3/fwd.ma". + +include "basic_1A/pr1/fwd.ma". + +include "basic_1A/wcpr0/getl.ma". + +include "basic_1A/pr0/props.ma". + +include "basic_1A/arity/subst0.ma". + +lemma arity_sred_wcpr0_pr0: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (a: A).((arity g +c1 t1 a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t2: T).((pr0 t1 +t2) \to (arity g c2 t2 a))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda +(H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda +(a0: A).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to +(arity g c2 t2 a0)))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: +C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort n) +t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) +(arity_sort g c2 n) t2 (pr0_gen_sort t2 n H1)))))))) (\lambda (c: C).(\lambda +(d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d +(Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda +(H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to +(arity g c2 t2 a0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c +c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) t2)).(eq_ind_r T (TLRef i) +(\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T (\lambda (e2: C).(\lambda +(u2: T).(getl i c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (arity g c2 +(TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c2 +(CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u +x1)).(arity_abbr g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 +H3 i d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 i H4)))))))))))))) (\lambda (c: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c +(CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g +a0))).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: +T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (c2: +C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) +t2)).(eq_ind_r T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T +(\lambda (e2: C).(\lambda (u2: T).(getl i c2 (CHead e2 (Bind Abst) u2)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: +T).(pr0 u u2))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H5: (getl i c2 (CHead x0 (Bind Abst) x1))).(\lambda (H6: (wcpr0 +d x0)).(\lambda (H7: (pr0 u x1)).(arity_abst g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 +H7))))))) (wcpr0_getl c c2 H3 i d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 i +H4)))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda +(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u +a1)).(\lambda (H2: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 +u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda +(H3: (arity g (CHead c (Bind b) u) t a2)).(\lambda (H4: ((\forall (c2: +C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to +(arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H5: (wcpr0 c +c2)).(\lambda (t2: T).(\lambda (H6: (pr0 (THead (Bind b) u t) t2)).(insert_eq +T (THead (Bind b) u t) (\lambda (t0: T).(pr0 t0 t2)) (\lambda (_: T).(arity g +c2 t2 a2)) (\lambda (y: T).(\lambda (H7: (pr0 y t2)).(pr0_ind (\lambda (t0: +T).(\lambda (t3: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t3 a2)))) +(\lambda (t0: T).(\lambda (H8: (eq T t0 (THead (Bind b) u t))).(let H9 \def +(f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u t) H8) in (eq_ind_r T +(THead (Bind b) u t) (\lambda (t3: T).(arity g c2 t3 a2)) (arity_bind g b H0 +c2 u a1 (H2 c2 H5 u (pr0_refl u)) t a2 (H4 (CHead c2 (Bind b) u) (wcpr0_comp +c c2 H5 u u (pr0_refl u) (Bind b)) t (pr0_refl t))) t0 H9)))) (\lambda (u1: +T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (((eq T u1 +(THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda +(t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda (H11: (((eq T t3 (THead (Bind b) +u t)) \to (arity g c2 t4 a2)))).(\lambda (k: K).(\lambda (H12: (eq T (THead k +u1 t3) (THead (Bind b) u t))).(let H13 \def (f_equal T K (\lambda (e: +T).(match e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead +k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Bind b) u t) H12) in ((let +H14 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 +| (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) (THead k u1 t3) +(THead (Bind b) u t) H12) in ((let H15 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | +(THead _ _ t0) \Rightarrow t0])) (THead k u1 t3) (THead (Bind b) u t) H12) in +(\lambda (H16: (eq T u1 u)).(\lambda (H17: (eq K k (Bind b))).(eq_ind_r K +(Bind b) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H18 \def +(eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 +t4 a2))) H11 t H15) in (let H19 \def (eq_ind T t3 (\lambda (t0: T).(pr0 t0 +t4)) H10 t H15) in (let H20 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 +(THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 u H16) in (let H21 \def +(eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H8 u H16) in (arity_bind g b H0 c2 +u2 a1 (H2 c2 H5 u2 H21) t4 a2 (H4 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H5 +u u2 H21 (Bind b)) t4 H19)))))) k H17)))) H14)) H13)))))))))))) (\lambda (u0: +T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: +(((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 a2)))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead +(Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H12: (eq T (THead (Flat +Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Bind b) u t))).(let H13 \def +(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind b) u t) H12) in (False_ind (arity g +c2 (THead (Bind Abbr) v2 t4) a2) H13)))))))))))) (\lambda (b0: B).(\lambda +(_: (not (eq B b0 Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 +v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 +a2)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda +(_: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead +(Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H15: (eq T (THead (Flat +Appl) v1 (THead (Bind b0) u1 t3)) (THead (Bind b) u t))).(let H16 \def +(eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t3)) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind b) u t) H15) in (False_ind (arity g +c2 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) +H16))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 +u2)).(\lambda (H9: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 +a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda +(H11: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (w: +T).(\lambda (H12: (subst0 O u2 t4 w)).(\lambda (H13: (eq T (THead (Bind Abbr) +u1 t3) (THead (Bind b) u t))).(let H14 \def (f_equal T B (\lambda (e: +T).(match e with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | +(THead k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abbr])])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in +((let H15 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) +(THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in ((let H16 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef +_) \Rightarrow t3 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) u1 +t3) (THead (Bind b) u t) H13) in (\lambda (H17: (eq T u1 u)).(\lambda (H18: +(eq B Abbr b)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead +(Bind b) u t)) \to (arity g c2 t4 a2))) H11 t H16) in (let H20 \def (eq_ind T +t3 (\lambda (t0: T).(pr0 t0 t4)) H10 t H16) in (let H21 \def (eq_ind T u1 +(\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 +u H17) in (let H22 \def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H8 u H17) +in (let H23 \def (eq_ind_r B b (\lambda (b0: B).((eq T t (THead (Bind b0) u +t)) \to (arity g c2 t4 a2))) H19 Abbr H18) in (let H24 \def (eq_ind_r B b +(\lambda (b0: B).((eq T u (THead (Bind b0) u t)) \to (arity g c2 u2 a2))) H21 +Abbr H18) in (let H25 \def (eq_ind_r B b (\lambda (b0: B).(\forall (c3: +C).((wcpr0 (CHead c (Bind b0) u) c3) \to (\forall (t5: T).((pr0 t t5) \to +(arity g c3 t5 a2)))))) H4 Abbr H18) in (let H26 \def (eq_ind_r B b (\lambda +(b0: B).(arity g (CHead c (Bind b0) u) t a2)) H3 Abbr H18) in (let H27 \def +(eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H0 Abbr H18) in +(arity_bind g Abbr H27 c2 u2 a1 (H2 c2 H5 u2 H22) w a2 (arity_subst0 g (CHead +c2 (Bind Abbr) u2) t4 a2 (H25 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H5 u +u2 H22 (Bind Abbr)) t4 H20) c2 u2 O (getl_refl Abbr c2 u2) w +H12)))))))))))))) H15)) H14))))))))))))) (\lambda (b0: B).(\lambda (H8: (not +(eq B b0 Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 +t4)).(\lambda (H10: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 +a2)))).(\lambda (u0: T).(\lambda (H11: (eq T (THead (Bind b0) u0 (lift (S O) +O t3)) (THead (Bind b) u t))).(let H12 \def (f_equal T B (\lambda (e: +T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | +(THead k _ _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) +\Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u +t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t0 _) \Rightarrow +t0])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in +((let H14 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) +\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ +t0) \Rightarrow t0])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) +u t) H11) in (\lambda (_: (eq T u0 u)).(\lambda (H16: (eq B b0 b)).(let H17 +\def (eq_ind B b0 (\lambda (b1: B).(not (eq B b1 Abst))) H8 b H16) in (let +H18 \def (eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead (Bind b) u t0)) \to +(arity g c2 t4 a2))) H10 (lift (S O) O t3) H14) in (let H19 \def (eq_ind_r T +t (\lambda (t0: T).(\forall (c3: C).((wcpr0 (CHead c (Bind b) u) c3) \to +(\forall (t5: T).((pr0 t0 t5) \to (arity g c3 t5 a2)))))) H4 (lift (S O) O +t3) H14) in (let H20 \def (eq_ind_r T t (\lambda (t0: T).(arity g (CHead c +(Bind b) u) t0 a2)) H3 (lift (S O) O t3) H14) in (arity_gen_lift g (CHead c2 +(Bind b) u) t4 a2 (S O) O (H19 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H5 u u +(pr0_refl u) (Bind b)) (lift (S O) O t4) (pr0_lift t3 t4 H9 (S O) O)) c2 +(drop_drop (Bind b) O c2 c2 (drop_refl c2) u))))))))) H13)) H12)))))))))) +(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: +(((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: +T).(\lambda (H10: (eq T (THead (Flat Cast) u0 t3) (THead (Bind b) u t))).(let +H11 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind b) u t) H10) in (False_ind (arity g c2 t4 a2) +H11)))))))) y t2 H7))) H6)))))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: +((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g +c2 t2 (asucc g a1)))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: +(arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (c2: +C).((wcpr0 (CHead c (Bind Abst) u) c2) \to (\forall (t2: T).((pr0 t t2) \to +(arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c +c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) u t) +t2)).(insert_eq T (THead (Bind Abst) u t) (\lambda (t0: T).(pr0 t0 t2)) +(\lambda (_: T).(arity g c2 t2 (AHead a1 a2))) (\lambda (y: T).(\lambda (H6: +(pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Bind +Abst) u t)) \to (arity g c2 t3 (AHead a1 a2))))) (\lambda (t0: T).(\lambda +(H7: (eq T t0 (THead (Bind Abst) u t))).(let H8 \def (f_equal T T (\lambda +(e: T).e) t0 (THead (Bind Abst) u t) H7) in (eq_ind_r T (THead (Bind Abst) u +t) (\lambda (t3: T).(arity g c2 t3 (AHead a1 a2))) (arity_head g c2 u a1 (H1 +c2 H4 u (pr0_refl u)) t a2 (H3 (CHead c2 (Bind Abst) u) (wcpr0_comp c c2 H4 u +u (pr0_refl u) (Bind Abst)) t (pr0_refl t))) t0 H8)))) (\lambda (u1: +T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 +(THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 +(THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (k: +K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Bind Abst) u t))).(let H12 +\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | +(TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) +(THead (Bind Abst) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | +(THead _ t0 _) \Rightarrow t0])) (THead k u1 t3) (THead (Bind Abst) u t) H11) +in ((let H14 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t0) \Rightarrow t0])) +(THead k u1 t3) (THead (Bind Abst) u t) H11) in (\lambda (H15: (eq T u1 +u)).(\lambda (H16: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) (\lambda +(k0: K).(arity g c2 (THead k0 u2 t4) (AHead a1 a2))) (let H17 \def (eq_ind T +t3 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 t4 +(AHead a1 a2)))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t0: +T).(pr0 t0 t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq +T t0 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2)))) H8 u H15) +in (let H20 \def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H7 u H15) in +(arity_head g c2 u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 (CHead c2 (Bind Abst) u2) +(wcpr0_comp c c2 H4 u u2 H20 (Bind Abst)) t4 H18)))))) k H16)))) H13)) +H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda +(_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity +g c2 v2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 +t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 +(AHead a1 a2))))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind +Abst) u0 t3)) (THead (Bind Abst) u t))).(let H12 \def (eq_ind T (THead (Flat +Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind Abst) u t) H11) in (False_ind (arity g c2 (THead +(Bind Abbr) v2 t4) (AHead a1 a2)) H12)))))))))))) (\lambda (b: B).(\lambda +(_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 +v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity g c2 v2 +(AHead a1 a2))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 +u2)).(\lambda (_: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 +(AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 +t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 +(AHead a1 a2))))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) +u1 t3)) (THead (Bind Abst) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) +v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind Abst) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) (AHead a1 a2)) H15))))))))))))))))) +(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: +(((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 +a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda +(_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 +a2))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T +(THead (Bind Abbr) u1 t3) (THead (Bind Abst) u t))).(let H13 \def (eq_ind T +(THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | +Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow +False])])) I (THead (Bind Abst) u t) H12) in (False_ind (arity g c2 (THead +(Bind Abbr) u2 w) (AHead a1 a2)) H13))))))))))))) (\lambda (b: B).(\lambda +(H7: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 +t3 t4)).(\lambda (H9: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 +(AHead a1 a2))))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 +(lift (S O) O t3)) (THead (Bind Abst) u t))).(let H11 \def (f_equal T B +(\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef _) +\Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O +t3)) (THead (Bind Abst) u t) H10) in ((let H12 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | +(THead _ t0 _) \Rightarrow t0])) (THead (Bind b) u0 (lift (S O) O t3)) (THead +(Bind Abst) u t) H10) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) +| (TLRef _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind b) u0 (lift (S O) O t3)) (THead +(Bind Abst) u t) H10) in (\lambda (_: (eq T u0 u)).(\lambda (H15: (eq B b +Abst)).(let H16 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H7 +Abst H15) in (let H17 \def (eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead +(Bind Abst) u t0)) \to (arity g c2 t4 (AHead a1 a2)))) H9 (lift (S O) O t3) +H13) in (let H18 \def (eq_ind_r T t (\lambda (t0: T).(\forall (c3: C).((wcpr0 +(CHead c (Bind Abst) u) c3) \to (\forall (t5: T).((pr0 t0 t5) \to (arity g c3 +t5 a2)))))) H3 (lift (S O) O t3) H13) in (let H19 \def (eq_ind_r T t (\lambda +(t0: T).(arity g (CHead c (Bind Abst) u) t0 a2)) H2 (lift (S O) O t3) H13) in +(let H20 \def (match (H16 (refl_equal B Abst)) in False with []) in +H20)))))))) H12)) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda +(_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity +g c2 t4 (AHead a1 a2))))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat +Cast) u0 t3) (THead (Bind Abst) u t))).(let H10 \def (eq_ind T (THead (Flat +Cast) u0 t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind +_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u +t) H9) in (False_ind (arity g c2 t4 (AHead a1 a2)) H10)))))))) y t2 H6))) +H5)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda +(_: (arity g c u a1)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to +(\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: +T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: +((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g +c2 t2 (AHead a1 a2)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c +c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Appl) u t) +t2)).(insert_eq T (THead (Flat Appl) u t) (\lambda (t0: T).(pr0 t0 t2)) +(\lambda (_: T).(arity g c2 t2 a2)) (\lambda (y: T).(\lambda (H6: (pr0 y +t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Flat Appl) +u t)) \to (arity g c2 t3 a2)))) (\lambda (t0: T).(\lambda (H7: (eq T t0 +(THead (Flat Appl) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 +(THead (Flat Appl) u t) H7) in (eq_ind_r T (THead (Flat Appl) u t) (\lambda +(t3: T).(arity g c2 t3 a2)) (arity_appl g c2 u a1 (H1 c2 H4 u (pr0_refl u)) t +a2 (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: +T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Flat Appl) u +t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: +(pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g +c2 t4 a2)))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead +(Flat Appl) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e with +[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in ((let H13 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | +(TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) (THead k u1 t3) +(THead (Flat Appl) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | +(THead _ _ t0) \Rightarrow t0])) (THead k u1 t3) (THead (Flat Appl) u t) H11) +in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Flat Appl))).(eq_ind_r +K (Flat Appl) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H17 +\def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to +(arity g c2 t4 a2))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t0: +T).(pr0 t0 t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq +T t0 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2))) H8 u H15) in (let H20 +\def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) H7 u H15) in (arity_appl g c2 +u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 c2 H4 t4 H18)))))) k H16)))) H13)) +H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda +(H7: (pr0 v1 v2)).(\lambda (H8: (((eq T v1 (THead (Flat Appl) u t)) \to +(arity g c2 v2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 +t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 +a2)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) +(THead (Flat Appl) u t))).(let H12 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t0 _) +\Rightarrow t0])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead +(Flat Appl) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow (THead (Bind Abst) u0 t3) | (TLRef _) \Rightarrow +(THead (Bind Abst) u0 t3) | (THead _ _ t0) \Rightarrow t0])) (THead (Flat +Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t) H11) in (\lambda +(H14: (eq T v1 u)).(let H15 \def (eq_ind T v1 (\lambda (t0: T).((eq T t0 +(THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H8 u H14) in (let H16 \def +(eq_ind T v1 (\lambda (t0: T).(pr0 t0 v2)) H7 u H14) in (let H17 \def +(eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead (Flat Appl) u t0)) \to (arity +g c2 t4 a2))) H10 (THead (Bind Abst) u0 t3) H13) in (let H18 \def (eq_ind_r T +t (\lambda (t0: T).((eq T u (THead (Flat Appl) u t0)) \to (arity g c2 v2 +a2))) H15 (THead (Bind Abst) u0 t3) H13) in (let H19 \def (eq_ind_r T t +(\lambda (t0: T).(\forall (c3: C).((wcpr0 c c3) \to (\forall (t5: T).((pr0 t0 +t5) \to (arity g c3 t5 (AHead a1 a2))))))) H3 (THead (Bind Abst) u0 t3) H13) +in (let H20 \def (eq_ind_r T t (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) +H2 (THead (Bind Abst) u0 t3) H13) in (let H21 \def (H1 c2 H4 v2 H16) in (let +H22 \def (H19 c2 H4 (THead (Bind Abst) u0 t4) (pr0_comp u0 u0 (pr0_refl u0) +t3 t4 H9 (Bind Abst))) in (let H23 \def (arity_gen_abst g c2 u0 t4 (AHead a1 +a2) H22) in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 +a2) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c2 u0 (asucc g +a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c2 (Bind Abst) u0) t4 +a4))) (arity g c2 (THead (Bind Abbr) v2 t4) a2) (\lambda (x0: A).(\lambda +(x1: A).(\lambda (H24: (eq A (AHead a1 a2) (AHead x0 x1))).(\lambda (H25: +(arity g c2 u0 (asucc g x0))).(\lambda (H26: (arity g (CHead c2 (Bind Abst) +u0) t4 x1)).(let H27 \def (f_equal A A (\lambda (e: A).(match e with [(ASort +_ _) \Rightarrow a1 | (AHead a0 _) \Rightarrow a0])) (AHead a1 a2) (AHead x0 +x1) H24) in ((let H28 \def (f_equal A A (\lambda (e: A).(match e with [(ASort +_ _) \Rightarrow a2 | (AHead _ a0) \Rightarrow a0])) (AHead a1 a2) (AHead x0 +x1) H24) in (\lambda (H29: (eq A a1 x0)).(let H30 \def (eq_ind_r A x1 +(\lambda (a0: A).(arity g (CHead c2 (Bind Abst) u0) t4 a0)) H26 a2 H28) in +(let H31 \def (eq_ind_r A x0 (\lambda (a0: A).(arity g c2 u0 (asucc g a0))) +H25 a1 H29) in (arity_bind g Abbr not_abbr_abst c2 v2 a1 H21 t4 a2 +(csuba_arity g (CHead c2 (Bind Abst) u0) t4 a2 H30 (CHead c2 (Bind Abbr) v2) +(csuba_abst g c2 c2 (csuba_refl g c2) u0 a1 H31 v2 H21))))))) H27))))))) +H23)))))))))))) H12)))))))))))) (\lambda (b: B).(\lambda (H7: (not (eq B b +Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H8: (pr0 v1 v2)).(\lambda +(H9: (((eq T v1 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2)))).(\lambda +(u1: T).(\lambda (u2: T).(\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (((eq T +u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H12: (pr0 t3 t4)).(\lambda (H13: (((eq T t3 +(THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (H14: (eq T +(THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t))).(let +H15 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 +| (TLRef _) \Rightarrow v1 | (THead _ t0 _) \Rightarrow t0])) (THead (Flat +Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t) H14) in ((let H16 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead +(Bind b) u1 t3) | (TLRef _) \Rightarrow (THead (Bind b) u1 t3) | (THead _ _ +t0) \Rightarrow t0])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead +(Flat Appl) u t) H14) in (\lambda (H17: (eq T v1 u)).(let H18 \def (eq_ind T +v1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 v2 +a2))) H9 u H17) in (let H19 \def (eq_ind T v1 (\lambda (t0: T).(pr0 t0 v2)) +H8 u H17) in (let H20 \def (eq_ind_r T t (\lambda (t0: T).((eq T t3 (THead +(Flat Appl) u t0)) \to (arity g c2 t4 a2))) H13 (THead (Bind b) u1 t3) H16) +in (let H21 \def (eq_ind_r T t (\lambda (t0: T).((eq T u1 (THead (Flat Appl) +u t0)) \to (arity g c2 u2 a2))) H11 (THead (Bind b) u1 t3) H16) in (let H22 +\def (eq_ind_r T t (\lambda (t0: T).((eq T u (THead (Flat Appl) u t0)) \to +(arity g c2 v2 a2))) H18 (THead (Bind b) u1 t3) H16) in (let H23 \def +(eq_ind_r T t (\lambda (t0: T).(\forall (c3: C).((wcpr0 c c3) \to (\forall +(t5: T).((pr0 t0 t5) \to (arity g c3 t5 (AHead a1 a2))))))) H3 (THead (Bind +b) u1 t3) H16) in (let H24 \def (eq_ind_r T t (\lambda (t0: T).(arity g c t0 +(AHead a1 a2))) H2 (THead (Bind b) u1 t3) H16) in (let H25 \def (H1 c2 H4 v2 +H19) in (let H26 \def (H23 c2 H4 (THead (Bind b) u2 t4) (pr0_comp u1 u2 H10 +t3 t4 H12 (Bind b))) in (let H27 \def (arity_gen_bind b H7 g c2 u2 t4 (AHead +a1 a2) H26) in (ex2_ind A (\lambda (a3: A).(arity g c2 u2 a3)) (\lambda (_: +A).(arity g (CHead c2 (Bind b) u2) t4 (AHead a1 a2))) (arity g c2 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) (\lambda (x: +A).(\lambda (H28: (arity g c2 u2 x)).(\lambda (H29: (arity g (CHead c2 (Bind +b) u2) t4 (AHead a1 a2))).(arity_bind g b H7 c2 u2 x H28 (THead (Flat Appl) +(lift (S O) O v2) t4) a2 (arity_appl g (CHead c2 (Bind b) u2) (lift (S O) O +v2) a1 (arity_lift g c2 v2 a1 H25 (CHead c2 (Bind b) u2) (S O) O (drop_drop +(Bind b) O c2 c2 (drop_refl c2) u2)) t4 a2 H29))))) H27))))))))))))) +H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 +u2)).(\lambda (_: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 +a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda +(_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda +(w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind +Abbr) u1 t3) (THead (Flat Appl) u t))).(let H13 \def (eq_ind T (THead (Bind +Abbr) u1 t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind +_) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u +t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) a2) +H13))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda +(t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 +(THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda +(H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Flat Appl) u +t))).(let H11 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | +(Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H10) in (False_ind +(arity g c2 t4 a2) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda +(_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity +g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) +(THead (Flat Appl) u t))).(let H10 \def (eq_ind T (THead (Flat Cast) u0 t3) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow +False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u t) H9) in +(False_ind (arity g c2 t4 a2) H10)))))))) y t2 H6))) H5)))))))))))))) +(\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u +(asucc g a0))).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall +(t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (t: +T).(\lambda (_: (arity g c t a0)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c +c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a0))))))).(\lambda +(c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 +(THead (Flat Cast) u t) t2)).(insert_eq T (THead (Flat Cast) u t) (\lambda +(t0: T).(pr0 t0 t2)) (\lambda (_: T).(arity g c2 t2 a0)) (\lambda (y: +T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq +T t0 (THead (Flat Cast) u t)) \to (arity g c2 t3 a0)))) (\lambda (t0: +T).(\lambda (H7: (eq T t0 (THead (Flat Cast) u t))).(let H8 \def (f_equal T T +(\lambda (e: T).e) t0 (THead (Flat Cast) u t) H7) in (eq_ind_r T (THead (Flat +Cast) u t) (\lambda (t3: T).(arity g c2 t3 a0)) (arity_cast g c2 u a0 (H1 c2 +H4 u (pr0_refl u)) t (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: +T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 +(THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda +(t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat +Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (k: K).(\lambda (H11: (eq T +(THead k u1 t3) (THead (Flat Cast) u t))).(let H12 \def (f_equal T K (\lambda +(e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | +(THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Flat Cast) u t) H11) +in ((let H13 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])) +(THead k u1 t3) (THead (Flat Cast) u t) H11) in ((let H14 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) +\Rightarrow t3 | (THead _ _ t0) \Rightarrow t0])) (THead k u1 t3) (THead +(Flat Cast) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k +(Flat Cast))).(eq_ind_r K (Flat Cast) (\lambda (k0: K).(arity g c2 (THead k0 +u2 t4) a0)) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead +(Flat Cast) u t)) \to (arity g c2 t4 a0))) H10 t H14) in (let H18 \def +(eq_ind T t3 (\lambda (t0: T).(pr0 t0 t4)) H9 t H14) in (let H19 \def (eq_ind +T u1 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 u2 +a0))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t0: T).(pr0 t0 u2)) +H7 u H15) in (arity_cast g c2 u2 a0 (H1 c2 H4 u2 H20) t4 (H3 c2 H4 t4 +H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: +T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead +(Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) +\to (arity g c2 t4 a0)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead +(Bind Abst) u0 t3)) (THead (Flat Cast) u t))).(let H12 \def (eq_ind T (THead +(Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow +(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead +(Flat Cast) u t) H11) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) a0) +H12)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda +(v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 +(THead (Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Cast) +u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity +g c2 t4 a0)))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 +t3)) (THead (Flat Cast) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f +with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat +Cast) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) a0) H15))))))))))))))))) (\lambda (u1: +T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead +(Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) +\to (arity g c2 t4 a0)))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 +w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Flat Cast) u +t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat +_) \Rightarrow False])])) I (THead (Flat Cast) u t) H12) in (False_ind (arity +g c2 (THead (Bind Abbr) u2 w) a0) H13))))))))))))) (\lambda (b: B).(\lambda +(_: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 +t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 +a0)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O +t3)) (THead (Flat Cast) u t))).(let H11 \def (eq_ind T (THead (Bind b) u0 +(lift (S O) O t3)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with +[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat +Cast) u t) H10) in (False_ind (arity g c2 t4 a0) H11)))))))))) (\lambda (t3: +T).(\lambda (t4: T).(\lambda (H7: (pr0 t3 t4)).(\lambda (H8: (((eq T t3 +(THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (u0: T).(\lambda +(H9: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t))).(let H10 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef +_) \Rightarrow u0 | (THead _ t0 _) \Rightarrow t0])) (THead (Flat Cast) u0 +t3) (THead (Flat Cast) u t) H9) in ((let H11 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | +(THead _ _ t0) \Rightarrow t0])) (THead (Flat Cast) u0 t3) (THead (Flat Cast) +u t) H9) in (\lambda (_: (eq T u0 u)).(let H13 \def (eq_ind T t3 (\lambda +(t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0))) H8 t H11) +in (let H14 \def (eq_ind T t3 (\lambda (t0: T).(pr0 t0 t4)) H7 t H11) in (H3 +c2 H4 t4 H14))))) H10)))))))) y t2 H6))) H5))))))))))))) (\lambda (c: +C).(\lambda (t: T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda +(H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to +(arity g c2 t2 a1))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 +a2)).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda +(H4: (pr0 t t2)).(arity_repl g c2 t2 a1 (H1 c2 H3 t2 H4) a2 H2)))))))))))) c1 +t1 a H))))). + +lemma arity_sred_wcpr0_pr1: + \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (g: G).(\forall +(c1: C).(\forall (a: A).((arity g c1 t1 a) \to (\forall (c2: C).((wcpr0 c1 +c2) \to (arity g c2 t2 a))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda +(t: T).(\lambda (t0: T).(\forall (g: G).(\forall (c1: C).(\forall (a: +A).((arity g c1 t a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (arity g c2 t0 +a))))))))) (\lambda (t: T).(\lambda (g: G).(\lambda (c1: C).(\lambda (a: +A).(\lambda (H0: (arity g c1 t a)).(\lambda (c2: C).(\lambda (H1: (wcpr0 c1 +c2)).(arity_sred_wcpr0_pr0 g c1 t a H0 c2 H1 t (pr0_refl t))))))))) (\lambda +(t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t4 t3)).(\lambda (t5: T).(\lambda +(_: (pr1 t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (c1: C).(\forall (a: +A).((arity g c1 t3 a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (arity g c2 t5 +a))))))))).(\lambda (g: G).(\lambda (c1: C).(\lambda (a: A).(\lambda (H3: +(arity g c1 t4 a)).(\lambda (c2: C).(\lambda (H4: (wcpr0 c1 c2)).(H2 g c2 a +(arity_sred_wcpr0_pr0 g c1 t4 a H3 c2 H4 t3 H0) c2 (wcpr0_refl +c2)))))))))))))) t1 t2 H))). + +lemma arity_sred_pr2: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(g: G).(\forall (a: A).((arity g c t1 a) \to (arity g c t2 a))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (g: +G).(\forall (a: A).((arity g c0 t a) \to (arity g c0 t0 a))))))) (\lambda +(c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda +(g: G).(\lambda (a: A).(\lambda (H1: (arity g c0 t3 a)).(arity_sred_wcpr0_pr0 +g c0 t3 a H1 c0 (wcpr0_refl c0) t4 H0)))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind +Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 +t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (g: +G).(\lambda (a: A).(\lambda (H3: (arity g c0 t3 a)).(arity_subst0 g c0 t4 a +(arity_sred_wcpr0_pr0 g c0 t3 a H3 c0 (wcpr0_refl c0) t4 H1) d u i H0 t +H2)))))))))))))) c t1 t2 H)))). + +lemma arity_sred_pr3: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall +(g: G).(\forall (a: A).((arity g c t1 a) \to (arity g c t2 a))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (g: G).(\forall (a: +A).((arity g c t a) \to (arity g c t0 a)))))) (\lambda (t: T).(\lambda (g: +G).(\lambda (a: A).(\lambda (H0: (arity g c t a)).H0)))) (\lambda (t3: +T).(\lambda (t4: T).(\lambda (H0: (pr2 c t4 t3)).(\lambda (t5: T).(\lambda +(_: (pr3 c t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (a: A).((arity g c +t3 a) \to (arity g c t5 a)))))).(\lambda (g: G).(\lambda (a: A).(\lambda (H3: +(arity g c t4 a)).(H2 g a (arity_sred_pr2 c t4 t3 H0 g a H3))))))))))) t1 t2 +H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/props.ma new file mode 100644 index 000000000..712c5fa68 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/props.ma @@ -0,0 +1,266 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/arity/fwd.ma". + +lemma node_inh: + \forall (g: G).(\forall (n: nat).(\forall (k: nat).(ex_2 C T (\lambda (c: +C).(\lambda (t: T).(arity g c t (ASort k n))))))) +\def + \lambda (g: G).(\lambda (n: nat).(\lambda (k: nat).(nat_ind (\lambda (n0: +nat).(ex_2 C T (\lambda (c: C).(\lambda (t: T).(arity g c t (ASort n0 n)))))) +(ex_2_intro C T (\lambda (c: C).(\lambda (t: T).(arity g c t (ASort O n)))) +(CSort O) (TSort n) (arity_sort g (CSort O) n)) (\lambda (n0: nat).(\lambda +(H: (ex_2 C T (\lambda (c: C).(\lambda (t: T).(arity g c t (ASort n0 +n)))))).(let H0 \def H in (ex_2_ind C T (\lambda (c: C).(\lambda (t: +T).(arity g c t (ASort n0 n)))) (ex_2 C T (\lambda (c: C).(\lambda (t: +T).(arity g c t (ASort (S n0) n))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H1: (arity g x0 x1 (ASort n0 n))).(ex_2_intro C T (\lambda (c: +C).(\lambda (t: T).(arity g c t (ASort (S n0) n)))) (CHead x0 (Bind Abst) x1) +(TLRef O) (arity_abst g (CHead x0 (Bind Abst) x1) x0 x1 O (getl_refl Abst x0 +x1) (ASort (S n0) n) H1))))) H0)))) k))). + +lemma arity_lift: + \forall (g: G).(\forall (c2: C).(\forall (t: T).(\forall (a: A).((arity g c2 +t a) \to (\forall (c1: C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 +c2) \to (arity g c1 (lift h d t) a))))))))) +\def + \lambda (g: G).(\lambda (c2: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c2 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (c1: C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c) \to +(arity g c1 (lift h d t0) a0)))))))) (\lambda (c: C).(\lambda (n: +nat).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop +h d c1 c)).(eq_ind_r T (TSort n) (\lambda (t0: T).(arity g c1 t0 (ASort O +n))) (arity_sort g c1 n) (lift h d (TSort n)) (lift_sort n h d)))))))) +(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H1: +(arity g d u a0)).(\lambda (H2: ((\forall (c1: C).(\forall (h: nat).(\forall +(d0: nat).((drop h d0 c1 d) \to (arity g c1 (lift h d0 u) a0))))))).(\lambda +(c1: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda (H3: (drop h d0 c1 +c)).(lt_le_e i d0 (arity g c1 (lift h d0 (TLRef i)) a0) (\lambda (H4: (lt i +d0)).(eq_ind_r T (TLRef i) (\lambda (t0: T).(arity g c1 t0 a0)) (let H5 \def +(drop_getl_trans_le i d0 (le_S_n i d0 (le_S_n (S i) (S d0) (le_S (S (S i)) (S +d0) (le_n_S (S i) d0 H4)))) c1 c h H3 (CHead d (Bind Abbr) u) H0) in +(ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda +(e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) (\lambda (_: +C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abbr) u)))) (arity g c1 (TLRef +i) a0) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop i O c1 +x0)).(\lambda (H7: (drop h (minus d0 i) x0 x1)).(\lambda (H8: (clear x1 +(CHead d (Bind Abbr) u))).(let H9 \def (eq_ind nat (minus d0 i) (\lambda (n: +nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) (minus_x_Sy d0 i H4)) in (let +H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) H9 Abbr d u H8) in (ex2_ind C +(\lambda (c3: C).(clear x0 (CHead c3 (Bind Abbr) (lift h (minus d0 (S i)) +u)))) (\lambda (c3: C).(drop h (minus d0 (S i)) c3 d)) (arity g c1 (TLRef i) +a0) (\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abbr) (lift h +(minus d0 (S i)) u)))).(\lambda (H12: (drop h (minus d0 (S i)) x +d)).(arity_abbr g c1 x (lift h (minus d0 (S i)) u) i (getl_intro i c1 (CHead +x (Bind Abbr) (lift h (minus d0 (S i)) u)) x0 H6 H11) a0 (H2 x h (minus d0 (S +i)) H12))))) H10)))))))) H5)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 +H4))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i h)) (\lambda (t0: +T).(arity g c1 t0 a0)) (arity_abbr g c1 d u (plus i h) (drop_getl_trans_ge i +c1 c d0 h H3 (CHead d (Bind Abbr) u) H0 H4) a0 H1) (lift h d0 (TLRef i)) +(lift_lref_ge i h d0 H4)))))))))))))))) (\lambda (c: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind +Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc g +a0))).(\lambda (H2: ((\forall (c1: C).(\forall (h: nat).(\forall (d0: +nat).((drop h d0 c1 d) \to (arity g c1 (lift h d0 u) (asucc g +a0)))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda +(H3: (drop h d0 c1 c)).(lt_le_e i d0 (arity g c1 (lift h d0 (TLRef i)) a0) +(\lambda (H4: (lt i d0)).(eq_ind_r T (TLRef i) (\lambda (t0: T).(arity g c1 +t0 a0)) (let H5 \def (drop_getl_trans_le i d0 (le_S_n i d0 (le_S_n (S i) (S +d0) (le_S (S (S i)) (S d0) (le_n_S (S i) d0 H4)))) c1 c h H3 (CHead d (Bind +Abst) u) H0) in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 +e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) +(\lambda (_: C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abst) u)))) (arity +g c1 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop i O +c1 x0)).(\lambda (H7: (drop h (minus d0 i) x0 x1)).(\lambda (H8: (clear x1 +(CHead d (Bind Abst) u))).(let H9 \def (eq_ind nat (minus d0 i) (\lambda (n: +nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) (minus_x_Sy d0 i H4)) in (let +H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) H9 Abst d u H8) in (ex2_ind C +(\lambda (c3: C).(clear x0 (CHead c3 (Bind Abst) (lift h (minus d0 (S i)) +u)))) (\lambda (c3: C).(drop h (minus d0 (S i)) c3 d)) (arity g c1 (TLRef i) +a0) (\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abst) (lift h +(minus d0 (S i)) u)))).(\lambda (H12: (drop h (minus d0 (S i)) x +d)).(arity_abst g c1 x (lift h (minus d0 (S i)) u) i (getl_intro i c1 (CHead +x (Bind Abst) (lift h (minus d0 (S i)) u)) x0 H6 H11) a0 (H2 x h (minus d0 (S +i)) H12))))) H10)))))))) H5)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 +H4))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i h)) (\lambda (t0: +T).(arity g c1 t0 a0)) (arity_abst g c1 d u (plus i h) (drop_getl_trans_ge i +c1 c d0 h H3 (CHead d (Bind Abst) u) H0 H4) a0 H1) (lift h d0 (TLRef i)) +(lift_lref_ge i h d0 H4)))))))))))))))) (\lambda (b: B).(\lambda (H0: (not +(eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: +(arity g c u a1)).(\lambda (H2: ((\forall (c1: C).(\forall (h: nat).(\forall +(d: nat).((drop h d c1 c) \to (arity g c1 (lift h d u) a1))))))).(\lambda +(t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 +a2)).(\lambda (H4: ((\forall (c1: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c1 (CHead c (Bind b) u)) \to (arity g c1 (lift h d t0) +a2))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H5: +(drop h d c1 c)).(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s (Bind b) +d) t0)) (\lambda (t1: T).(arity g c1 t1 a2)) (arity_bind g b H0 c1 (lift h d +u) a1 (H2 c1 h d H5) (lift h (s (Bind b) d) t0) a2 (H4 (CHead c1 (Bind b) +(lift h d u)) h (s (Bind b) d) (drop_skip_bind h d c1 c H5 b u))) (lift h d +(THead (Bind b) u t0)) (lift_head (Bind b) u t0 h d))))))))))))))))) (\lambda +(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g +a1))).(\lambda (H1: ((\forall (c1: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c1 c) \to (arity g c1 (lift h d u) (asucc g +a1)))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c +(Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (c1: C).(\forall (h: +nat).(\forall (d: nat).((drop h d c1 (CHead c (Bind Abst) u)) \to (arity g c1 +(lift h d t0) a2))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H4: (drop h d c1 c)).(eq_ind_r T (THead (Bind Abst) (lift h d +u) (lift h (s (Bind Abst) d) t0)) (\lambda (t1: T).(arity g c1 t1 (AHead a1 +a2))) (arity_head g c1 (lift h d u) a1 (H1 c1 h d H4) (lift h (s (Bind Abst) +d) t0) a2 (H3 (CHead c1 (Bind Abst) (lift h d u)) h (s (Bind Abst) d) +(drop_skip_bind h d c1 c H4 Abst u))) (lift h d (THead (Bind Abst) u t0)) +(lift_head (Bind Abst) u t0 h d))))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall +(c1: C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 +(lift h d u) a1))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity +g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c1: C).(\forall (h: +nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 (lift h d t0) (AHead +a1 a2)))))))).(\lambda (c1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H4: (drop h d c1 c)).(eq_ind_r T (THead (Flat Appl) (lift h d u) (lift h (s +(Flat Appl) d) t0)) (\lambda (t1: T).(arity g c1 t1 a2)) (arity_appl g c1 +(lift h d u) a1 (H1 c1 h d H4) (lift h (s (Flat Appl) d) t0) a2 (H3 c1 h (s +(Flat Appl) d) H4)) (lift h d (THead (Flat Appl) u t0)) (lift_head (Flat +Appl) u t0 h d))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: +A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c1: +C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 (lift +h d u) (asucc g a0)))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 +a0)).(\lambda (H3: ((\forall (c1: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c1 c) \to (arity g c1 (lift h d t0) a0))))))).(\lambda (c1: +C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H4: (drop h d c1 +c)).(eq_ind_r T (THead (Flat Cast) (lift h d u) (lift h (s (Flat Cast) d) +t0)) (\lambda (t1: T).(arity g c1 t1 a0)) (arity_cast g c1 (lift h d u) a0 +(H1 c1 h d H4) (lift h (s (Flat Cast) d) t0) (H3 c1 h (s (Flat Cast) d) H4)) +(lift h d (THead (Flat Cast) u t0)) (lift_head (Flat Cast) u t0 h +d)))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda +(_: (arity g c t0 a1)).(\lambda (H1: ((\forall (c1: C).(\forall (h: +nat).(\forall (d: nat).((drop h d c1 c) \to (arity g c1 (lift h d t0) +a1))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c1: +C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H3: (drop h d c1 +c)).(arity_repl g c1 (lift h d t0) a1 (H1 c1 h d H3) a2 H2)))))))))))) c2 t a +H))))). + +lemma arity_repellent: + \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (t: T).(\forall (a1: +A).((arity g (CHead c (Bind Abst) w) t a1) \to (\forall (a2: A).((arity g c +(THead (Bind Abst) w t) a2) \to ((leq g a1 a2) \to (\forall (P: +Prop).P))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (t: T).(\lambda (a1: +A).(\lambda (H: (arity g (CHead c (Bind Abst) w) t a1)).(\lambda (a2: +A).(\lambda (H0: (arity g c (THead (Bind Abst) w t) a2)).(\lambda (H1: (leq g +a1 a2)).(\lambda (P: Prop).(let H_y \def (arity_repl g (CHead c (Bind Abst) +w) t a1 H a2 H1) in (let H2 \def (arity_gen_abst g c w t a2 H0) in (ex3_2_ind +A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: +A).(\lambda (_: A).(arity g c w (asucc g a3)))) (\lambda (_: A).(\lambda (a4: +A).(arity g (CHead c (Bind Abst) w) t a4))) P (\lambda (x0: A).(\lambda (x1: +A).(\lambda (H3: (eq A a2 (AHead x0 x1))).(\lambda (_: (arity g c w (asucc g +x0))).(\lambda (H5: (arity g (CHead c (Bind Abst) w) t x1)).(let H6 \def +(eq_ind A a2 (\lambda (a: A).(arity g (CHead c (Bind Abst) w) t a)) H_y +(AHead x0 x1) H3) in (leq_ahead_false_2 g x1 x0 (arity_mono g (CHead c (Bind +Abst) w) t (AHead x0 x1) H6 x1 H5) P))))))) H2)))))))))))). + +theorem arity_appls_cast: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (vs: +TList).(\forall (a: A).((arity g c (THeads (Flat Appl) vs u) (asucc g a)) \to +((arity g c (THeads (Flat Appl) vs t) a) \to (arity g c (THeads (Flat Appl) +vs (THead (Flat Cast) u t)) a)))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (vs: +TList).(TList_ind (\lambda (t0: TList).(\forall (a: A).((arity g c (THeads +(Flat Appl) t0 u) (asucc g a)) \to ((arity g c (THeads (Flat Appl) t0 t) a) +\to (arity g c (THeads (Flat Appl) t0 (THead (Flat Cast) u t)) a))))) +(\lambda (a: A).(\lambda (H: (arity g c u (asucc g a))).(\lambda (H0: (arity +g c t a)).(arity_cast g c u a H t H0)))) (\lambda (t0: T).(\lambda (t1: +TList).(\lambda (H: ((\forall (a: A).((arity g c (THeads (Flat Appl) t1 u) +(asucc g a)) \to ((arity g c (THeads (Flat Appl) t1 t) a) \to (arity g c +(THeads (Flat Appl) t1 (THead (Flat Cast) u t)) a)))))).(\lambda (a: +A).(\lambda (H0: (arity g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 u)) +(asucc g a))).(\lambda (H1: (arity g c (THead (Flat Appl) t0 (THeads (Flat +Appl) t1 t)) a)).(let H2 \def (arity_gen_appl g c t0 (THeads (Flat Appl) t1 +t) a H1) in (ex2_ind A (\lambda (a1: A).(arity g c t0 a1)) (\lambda (a1: +A).(arity g c (THeads (Flat Appl) t1 t) (AHead a1 a))) (arity g c (THead +(Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Cast) u t))) a) (\lambda +(x: A).(\lambda (H3: (arity g c t0 x)).(\lambda (H4: (arity g c (THeads (Flat +Appl) t1 t) (AHead x a))).(let H5 \def (arity_gen_appl g c t0 (THeads (Flat +Appl) t1 u) (asucc g a) H0) in (ex2_ind A (\lambda (a1: A).(arity g c t0 a1)) +(\lambda (a1: A).(arity g c (THeads (Flat Appl) t1 u) (AHead a1 (asucc g +a)))) (arity g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat +Cast) u t))) a) (\lambda (x0: A).(\lambda (H6: (arity g c t0 x0)).(\lambda +(H7: (arity g c (THeads (Flat Appl) t1 u) (AHead x0 (asucc g +a)))).(arity_appl g c t0 x H3 (THeads (Flat Appl) t1 (THead (Flat Cast) u t)) +a (H (AHead x a) (arity_repl g c (THeads (Flat Appl) t1 u) (AHead x (asucc g +a)) (arity_repl g c (THeads (Flat Appl) t1 u) (AHead x0 (asucc g a)) H7 +(AHead x (asucc g a)) (leq_head g x0 x (arity_mono g c t0 x0 H6 x H3) (asucc +g a) (asucc g a) (leq_refl g (asucc g a)))) (asucc g (AHead x a)) (leq_refl g +(asucc g (AHead x a)))) H4))))) H5))))) H2)))))))) vs))))). + +lemma arity_appls_abbr: + \forall (g: G).(\forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abbr) v)) \to (\forall (vs: TList).(\forall +(a: A).((arity g c (THeads (Flat Appl) vs (lift (S i) O v)) a) \to (arity g c +(THeads (Flat Appl) vs (TLRef i)) a))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (vs: +TList).(TList_ind (\lambda (t: TList).(\forall (a: A).((arity g c (THeads +(Flat Appl) t (lift (S i) O v)) a) \to (arity g c (THeads (Flat Appl) t +(TLRef i)) a)))) (\lambda (a: A).(\lambda (H0: (arity g c (lift (S i) O v) +a)).(arity_abbr g c d v i H a (arity_gen_lift g c v a (S i) O H0 d (getl_drop +Abbr c d v i H))))) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H0: +((\forall (a: A).((arity g c (THeads (Flat Appl) t0 (lift (S i) O v)) a) \to +(arity g c (THeads (Flat Appl) t0 (TLRef i)) a))))).(\lambda (a: A).(\lambda +(H1: (arity g c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O +v))) a)).(let H2 \def (arity_gen_appl g c t (THeads (Flat Appl) t0 (lift (S +i) O v)) a H1) in (ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda (a1: +A).(arity g c (THeads (Flat Appl) t0 (lift (S i) O v)) (AHead a1 a))) (arity +g c (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) a) (\lambda (x: +A).(\lambda (H3: (arity g c t x)).(\lambda (H4: (arity g c (THeads (Flat +Appl) t0 (lift (S i) O v)) (AHead x a))).(arity_appl g c t x H3 (THeads (Flat +Appl) t0 (TLRef i)) a (H0 (AHead x a) H4))))) H2))))))) vs))))))). + +theorem arity_appls_bind: + \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (c: +C).(\forall (v: T).(\forall (a1: A).((arity g c v a1) \to (\forall (t: +T).(\forall (vs: TList).(\forall (a2: A).((arity g (CHead c (Bind b) v) +(THeads (Flat Appl) (lifts (S O) O vs) t) a2) \to (arity g c (THeads (Flat +Appl) vs (THead (Bind b) v t)) a2))))))))))) +\def + \lambda (g: G).(\lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda +(c: C).(\lambda (v: T).(\lambda (a1: A).(\lambda (H0: (arity g c v +a1)).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: +TList).(\forall (a2: A).((arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O t0) t) a2) \to (arity g c (THeads (Flat Appl) t0 (THead (Bind +b) v t)) a2)))) (\lambda (a2: A).(\lambda (H1: (arity g (CHead c (Bind b) v) +t a2)).(arity_bind g b H c v a1 H0 t a2 H1))) (\lambda (t0: T).(\lambda (t1: +TList).(\lambda (H1: ((\forall (a2: A).((arity g (CHead c (Bind b) v) (THeads +(Flat Appl) (lifts (S O) O t1) t) a2) \to (arity g c (THeads (Flat Appl) t1 +(THead (Bind b) v t)) a2))))).(\lambda (a2: A).(\lambda (H2: (arity g (CHead +c (Bind b) v) (THead (Flat Appl) (lift (S O) O t0) (THeads (Flat Appl) (lifts +(S O) O t1) t)) a2)).(let H3 \def (arity_gen_appl g (CHead c (Bind b) v) +(lift (S O) O t0) (THeads (Flat Appl) (lifts (S O) O t1) t) a2 H2) in +(ex2_ind A (\lambda (a3: A).(arity g (CHead c (Bind b) v) (lift (S O) O t0) +a3)) (\lambda (a3: A).(arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O t1) t) (AHead a3 a2))) (arity g c (THead (Flat Appl) t0 +(THeads (Flat Appl) t1 (THead (Bind b) v t))) a2) (\lambda (x: A).(\lambda +(H4: (arity g (CHead c (Bind b) v) (lift (S O) O t0) x)).(\lambda (H5: (arity +g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O t1) t) (AHead x +a2))).(arity_appl g c t0 x (arity_gen_lift g (CHead c (Bind b) v) t0 x (S O) +O H4 c (drop_drop (Bind b) O c c (drop_refl c) v)) (THeads (Flat Appl) t1 +(THead (Bind b) v t)) a2 (H1 (AHead x a2) H5))))) H3))))))) vs))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/arity/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/arity/subst0.ma new file mode 100644 index 000000000..bdfb5e5ad --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/arity/subst0.ma @@ -0,0 +1,1115 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/arity/props.ma". + +include "basic_1A/fsubst0/fwd.ma". + +include "basic_1A/csubst0/getl.ma". + +include "basic_1A/subst0/dec.ma". + +include "basic_1A/subst0/fwd.ma". + +include "basic_1A/getl/getl.ma". + +lemma arity_gen_cvoid_subst0: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t +a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d +(Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t v) \to +(\forall (P: Prop).P)))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: +A).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d +(Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to +(\forall (P: Prop).P))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda +(d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d +(Bind Void) u))).(\lambda (w: T).(\lambda (v: T).(\lambda (H1: (subst0 i w +(TSort n) v)).(\lambda (P: Prop).(subst0_gen_sort w v i n H1 P))))))))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: +(arity g d u a0)).(\lambda (_: ((\forall (d0: C).(\forall (u0: T).(\forall +(i0: nat).((getl i0 d (CHead d0 (Bind Void) u0)) \to (\forall (w: T).(\forall +(v: T).((subst0 i0 w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (d0: +C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 +(Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w +(TLRef i) v)).(\lambda (P: Prop).(land_ind (eq nat i i0) (eq T v (lift (S i) +O w)) P (\lambda (H5: (eq nat i i0)).(\lambda (_: (eq T v (lift (S i) O +w))).(let H7 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c0 (CHead d0 +(Bind Void) u0))) H3 i H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) +(\lambda (c1: C).(getl i c0 c1)) H0 (CHead d0 (Bind Void) u0) (getl_mono c0 +(CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (let H9 \def +(eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind +Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) +u0) H7)) in (False_ind P H9)))))) (subst0_gen_lref w v i0 i +H4)))))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) +u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: +((\forall (d0: C).(\forall (u0: T).(\forall (i0: nat).((getl i0 d (CHead d0 +(Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i0 w u v) \to +(\forall (P: Prop).P)))))))))).(\lambda (d0: C).(\lambda (u0: T).(\lambda +(i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 (Bind Void) u0))).(\lambda (w: +T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w (TLRef i) v)).(\lambda (P: +Prop).(land_ind (eq nat i i0) (eq T v (lift (S i) O w)) P (\lambda (H5: (eq +nat i i0)).(\lambda (_: (eq T v (lift (S i) O w))).(let H7 \def (eq_ind_r nat +i0 (\lambda (n: nat).(getl n c0 (CHead d0 (Bind Void) u0))) H3 i H5) in (let +H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c1: C).(getl i c0 c1)) H0 +(CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead +d0 (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d +(Bind Abst) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (False_ind P H9)))))) +(subst0_gen_lref w v i0 i H4)))))))))))))))))) (\lambda (b: B).(\lambda (_: +(not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (_: (arity g c0 u a1)).(\lambda (H2: ((\forall (d: C).(\forall +(u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall +(w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: +Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g +(CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (d: C).(\forall (u0: +T).(\forall (i: nat).((getl i (CHead c0 (Bind b) u) (CHead d (Bind Void) u0)) +\to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: +Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda +(H5: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: +T).(\lambda (H6: (subst0 i w (THead (Bind b) u t0) v)).(\lambda (P: +Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) +(\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead +(Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda +(t2: T).(subst0 (s (Bind b) i) w t0 t2)))) P (\lambda (H7: (ex2 T (\lambda +(u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u +u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda +(u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead +(Bind b) x t0))).(\lambda (H9: (subst0 i w u x)).(H2 d u0 i H5 w x H9 P)))) +H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) +(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)))).(ex2_ind T (\lambda (t2: +T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w +t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind b) u +x))).(\lambda (H9: (subst0 (s (Bind b) i) w t0 x)).(H4 d u0 (S i) +(getl_clear_bind b (CHead c0 (Bind b) u) c0 u (clear_bind b c0 u) (CHead d +(Bind Void) u0) i H5) w x H9 P)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda +(u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: +T).(subst0 (s (Bind b) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: +T).(subst0 (s (Bind b) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (_: (eq T v (THead (Bind b) x0 x1))).(\lambda (H9: (subst0 i w u +x0)).(\lambda (_: (subst0 (s (Bind b) i) w t0 x1)).(H2 d u0 i H5 w x0 H9 +P)))))) H7)) (subst0_gen_head (Bind b) w u t0 v i H6))))))))))))))))))))) +(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u +(asucc g a1))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: +nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: +T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: +T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 +a2)).(\lambda (H3: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl +i (CHead c0 (Bind Abst) u) (CHead d (Bind Void) u0)) \to (\forall (w: +T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: +Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda +(H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: +T).(\lambda (H5: (subst0 i w (THead (Bind Abst) u t0) v)).(\lambda (P: +Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) +(\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead +(Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)))) P (\lambda (H6: +(ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: +T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind +Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda +(_: (eq T v (THead (Bind Abst) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d +u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v +(THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 +t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) +(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)) P (\lambda (x: +T).(\lambda (_: (eq T v (THead (Bind Abst) u x))).(\lambda (H8: (subst0 (s +(Bind Abst) i) w t0 x)).(H3 d u0 (S i) (getl_clear_bind Abst (CHead c0 (Bind +Abst) u) c0 u (clear_bind Abst c0 u) (CHead d (Bind Void) u0) i H4) w x H8 +P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v +(THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u +u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 +t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind +Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda +(_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) P (\lambda (x0: +T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Bind Abst) x0 x1))).(\lambda +(H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Bind Abst) i) w t0 x1)).(H1 +d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Bind Abst) w u t0 v i +H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (_: (arity g c0 u a1)).(\lambda (H1: ((\forall (d: C).(\forall +(u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall +(w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: +Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 +t0 (AHead a1 a2))).(\lambda (H3: ((\forall (d: C).(\forall (u0: T).(\forall +(i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall +(v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind +Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead +(Flat Appl) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq +T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T +(\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 +(s (Flat Appl) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq +T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w +u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 +t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 +t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T +v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda +(x: T).(\lambda (_: (eq T v (THead (Flat Appl) x t0))).(\lambda (H8: (subst0 +i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: +T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) +i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) +(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)) P (\lambda (x: +T).(\lambda (_: (eq T v (THead (Flat Appl) u x))).(\lambda (H8: (subst0 (s +(Flat Appl) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 +T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda +(t2: T).(subst0 (s (Flat Appl) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: +T).(subst0 (s (Flat Appl) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (_: (eq T v (THead (Flat Appl) x0 x1))).(\lambda (H8: (subst0 i w +u x0)).(\lambda (_: (subst0 (s (Flat Appl) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 +P)))))) H6)) (subst0_gen_head (Flat Appl) w u t0 v i H5))))))))))))))))))) +(\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u +(asucc g a0))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: +nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: +T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: +T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (d: C).(\forall +(u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall +(w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: +Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda +(H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: +T).(\lambda (H5: (subst0 i w (THead (Flat Cast) u t0) v)).(\lambda (P: +Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) +(\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead +(Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)))) P (\lambda (H6: +(ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: +T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Flat +Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda +(_: (eq T v (THead (Flat Cast) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d +u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v +(THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 +t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) +(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)) P (\lambda (x: +T).(\lambda (_: (eq T v (THead (Flat Cast) u x))).(\lambda (H8: (subst0 (s +(Flat Cast) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 +T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda +(t2: T).(subst0 (s (Flat Cast) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: +T).(subst0 (s (Flat Cast) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (_: (eq T v (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i w +u x0)).(\lambda (_: (subst0 (s (Flat Cast) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 +P)))))) H6)) (subst0_gen_head (Flat Cast) w u t0 v i H5)))))))))))))))))) +(\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 +t0 a1)).(\lambda (H1: ((\forall (d: C).(\forall (u: T).(\forall (i: +nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: +T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (a2: +A).(\lambda (_: (leq g a1 a2)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H3: (getl i c0 (CHead d (Bind Void) u))).(\lambda (w: +T).(\lambda (v: T).(\lambda (H4: (subst0 i w t0 v)).(\lambda (P: Prop).(H1 d +u i H3 w v H4 P)))))))))))))))) c t a H))))). + +lemma arity_gen_cvoid: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t +a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d +(Bind Void) u)) \to (ex T (\lambda (v: T).(eq T t (lift (S O) i v)))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c t a)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c (CHead d (Bind Void) u))).(let H_x \def (dnf_dec u t i) in +(let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 i u t (lift (S O) i +v)) (eq T t (lift (S O) i v)))) (ex T (\lambda (v: T).(eq T t (lift (S O) i +v)))) (\lambda (x: T).(\lambda (H2: (or (subst0 i u t (lift (S O) i x)) (eq T +t (lift (S O) i x)))).(or_ind (subst0 i u t (lift (S O) i x)) (eq T t (lift +(S O) i x)) (ex T (\lambda (v: T).(eq T t (lift (S O) i v)))) (\lambda (H3: +(subst0 i u t (lift (S O) i x))).(arity_gen_cvoid_subst0 g c t a H d u i H0 u +(lift (S O) i x) H3 (ex T (\lambda (v: T).(eq T t (lift (S O) i v)))))) +(\lambda (H3: (eq T t (lift (S O) i x))).(let H4 \def (eq_ind T t (\lambda +(t0: T).(arity g c t0 a)) H (lift (S O) i x) H3) in (eq_ind_r T (lift (S O) i +x) (\lambda (t0: T).(ex T (\lambda (v: T).(eq T t0 (lift (S O) i v))))) +(ex_intro T (\lambda (v: T).(eq T (lift (S O) i x) (lift (S O) i v))) x +(refl_equal T (lift (S O) i x))) t H3))) H2))) H1))))))))))). + +lemma arity_fsubst0: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (a: A).((arity g +c1 t1 a) \to (\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c1 +(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u +c1 t1 c2 t2) \to (arity g c2 t2 a)))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda +(H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda +(a0: A).(\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead +d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 +t2) \to (arity g c2 t2 a0))))))))))) (\lambda (c: C).(\lambda (n: +nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i +c (CHead d1 (Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H1: +(fsubst0 i u c (TSort n) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (TSort +n) t2 u i H1) in (let H2 \def H_x in (or3_ind (land (eq C c c2) (subst0 i u +(TSort n) t2)) (land (eq T (TSort n) t2) (csubst0 i u c c2)) (land (subst0 i +u (TSort n) t2) (csubst0 i u c c2)) (arity g c2 t2 (ASort O n)) (\lambda (H3: +(land (eq C c c2) (subst0 i u (TSort n) t2))).(land_ind (eq C c c2) (subst0 i +u (TSort n) t2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq C c +c2)).(\lambda (H5: (subst0 i u (TSort n) t2)).(eq_ind C c (\lambda (c0: +C).(arity g c0 t2 (ASort O n))) (subst0_gen_sort u t2 i n H5 (arity g c t2 +(ASort O n))) c2 H4))) H3)) (\lambda (H3: (land (eq T (TSort n) t2) (csubst0 +i u c c2))).(land_ind (eq T (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 +(ASort O n)) (\lambda (H4: (eq T (TSort n) t2)).(\lambda (_: (csubst0 i u c +c2)).(eq_ind T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) +(arity_sort g c2 n) t2 H4))) H3)) (\lambda (H3: (land (subst0 i u (TSort n) +t2) (csubst0 i u c c2))).(land_ind (subst0 i u (TSort n) t2) (csubst0 i u c +c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (subst0 i u (TSort n) +t2)).(\lambda (_: (csubst0 i u c c2)).(subst0_gen_sort u t2 i n H4 (arity g +c2 t2 (ASort O n))))) H3)) H2)))))))))))) (\lambda (c: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind +Abbr) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u a0)).(\lambda (H2: +((\forall (d1: C).(\forall (u0: T).(\forall (i0: nat).((getl i0 d (CHead d1 +(Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i0 u0 d u c2 +t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: +T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) +u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef +i) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in +(let H5 \def H_x in (or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) +(land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) +t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) +(subst0 i0 u0 (TLRef i) t2))).(land_ind (eq C c c2) (subst0 i0 u0 (TLRef i) +t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 +(TLRef i) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (land_ind (eq +nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat +i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O +u0) (\lambda (t: T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda +(n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def +(eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead +d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind +Abbr) u0) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind +Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 +(CHead d1 (Bind Abbr) u0) H11)) in ((let H14 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) +(CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind +Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (\lambda (H15: (eq C d +d1)).(let H16 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind +Abbr) t))) H12 u H14) in (eq_ind T u (\lambda (t: T).(arity g c (lift (S i) O +t) a0)) (let H17 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c (CHead c0 +(Bind Abbr) u))) H16 d H15) in (arity_lift g d u a0 H1 c (S i) O (getl_drop +Abbr c d u i H17))) u0 H14)))) H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i +H8)) c2 H7))) H6)) (\lambda (H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c +c2))).(land_ind (eq T (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) +(\lambda (H7: (eq T (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c +c2)).(eq_ind T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (lt_le_e i i0 +(arity g c2 (TLRef i) a0) (\lambda (H9: (lt i i0)).(let H10 \def +(csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind Abbr) u) H0) in (or4_ind +(getl i c2 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (arity g c2 (TLRef i) a0) +(\lambda (H11: (getl i c2 (CHead d (Bind Abbr) u))).(let H12 \def (eq_ind nat +(minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 +(Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d +(Bind Abbr) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S i)) (S i0) +(le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in +(arity_abbr g c2 d u i H11 a0 H1))) (\lambda (H11: (ex3_4 B C T T (\lambda +(b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind +Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind +Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind +x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def +(eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) +(CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 +(CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S +i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i +H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) +\Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in +(\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let H21 \def +(eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) +in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(getl i c2 (CHead c0 (Bind +x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i +c2 (CHead d (Bind b) x3))) H22 Abbr H19) in (arity_abbr g c2 d x3 i H23 a0 +(H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead +d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abbr) +(minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda +(H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C +(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) +u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda +(x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq +C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 +(CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 +x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead +d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind +Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) +(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) +(minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d +(Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B +(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let +H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) +H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus +i0 (S i)) u0 c0 x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abbr H19) in (arity_abbr g c2 x2 u +i H23 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d +(CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind +Abbr) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) +(\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 +e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) +(arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind +Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind +x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: +(csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) +(\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) +(getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 +(le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S i)) (S i0) (le_n_S (S i) i0 +H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal +C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c0 _ _) +\Rightarrow c0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in +((let H18 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead +x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e +with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind +Abbr) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abbr +x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: +T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C +x1 (\lambda (c0: C).(csubst0 (minus i0 (S i)) u0 c0 x2)) H15 d H21) in (let +H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) +H13 Abbr H20) in (arity_abbr g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abbr) +(minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u +(minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abbr) (minus i0 (S i))) u0 +d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: +(le i0 i)).(arity_abbr g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead +d (Bind Abbr) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 +(TLRef i) t2) (csubst0 i0 u0 c c2))).(land_ind (subst0 i0 u0 (TLRef i) t2) +(csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) +t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(land_ind (eq nat i i0) (eq T t2 +(lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda +(H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: +T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: +nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda +(n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def +(eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead +d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind +Abbr) u0) H12)) in (let H14 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind +Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 +(CHead d1 (Bind Abbr) u0) H12)) in ((let H15 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) +(CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind +Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (\lambda (H16: (eq C d +d1)).(let H17 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind +Abbr) t))) H13 u H15) in (let H18 \def (eq_ind_r T u0 (\lambda (t: +T).(csubst0 i t c c2)) H11 u H15) in (eq_ind T u (\lambda (t: T).(arity g c2 +(lift (S i) O t) a0)) (let H19 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c +(CHead c0 (Bind Abbr) u))) H17 d H16) in (arity_lift g d u a0 H1 c2 (S i) O +(getl_drop Abbr c2 d u i (csubst0_getl_ge i i (le_n i) c c2 u H18 (CHead d +(Bind Abbr) u) H19)))) u0 H15))))) H14))))) t2 H10))) (subst0_gen_lref u0 t2 +i0 i H7)))) H6)) H5)))))))))))))))))) (\lambda (c: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind +Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc g +a0))).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i0: +nat).((getl i0 d (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall +(t2: T).((fsubst0 i0 u0 d u c2 t2) \to (arity g c2 t2 (asucc g +a0))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda +(H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: +T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H_x \def +(fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (let H5 \def H_x in (or3_ind +(land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) +(csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) +(arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) +t2))).(land_ind (eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) +(\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind +C c (\lambda (c0: C).(arity g c0 t2 a0)) (land_ind (eq nat i i0) (eq T t2 +(lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda +(H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: +T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n +c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d +(Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) +(getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in +(let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with +[(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst +\Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) +I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead +d1 (Bind Abbr) u0) H11)) in (False_ind (arity g c (lift (S i) O u0) a0) +H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) H6)) (\lambda +(H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2))).(land_ind (eq T (TLRef +i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq T (TLRef i) +t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) (\lambda (t: +T).(arity g c2 t a0)) (lt_le_e i i0 (arity g c2 (TLRef i) a0) (\lambda (H9: +(lt i i0)).(let H10 \def (csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind +Abst) u) H0) in (or4_ind (getl i c2 (CHead d (Bind Abst) u)) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 +(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) +u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) +(arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d (Bind Abst) +u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead +d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind +Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) +(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) +(minus_x_Sy i0 i H9)) in (arity_abst g c2 d u i H11 a0 H1))) (\lambda (H11: +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(w: T).(subst0 (minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda +(b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind +Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C +(CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 +(CHead x1 (Bind x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 +x3)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead +d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind +Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) +(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) +(minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d +(Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B +(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) +x2) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let +H21 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) +H14 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(getl i c2 (CHead +c0 (Bind x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c2 (CHead d (Bind b) x3))) H22 Abst H19) in (arity_abst g c2 d x3 +i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d +(CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind +Abst) (minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) +(\lambda (H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C +(CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) +u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda +(x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq +C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 +(CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 +x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead +d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind +Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S_n (S i) (S i0) +(le_S (S (S i)) (S i0) (le_n_S (S i) i0 H9))))) (S (minus i0 (S i))) +(minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d +(Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B +(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) +x3) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let +H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) +H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus +i0 (S i)) u0 c0 x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abst H19) in (arity_abst g c2 x2 u +i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d +(CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind +Abst) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) +(\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 +e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) +(arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind +Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind +x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: +(csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) +(\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) +(getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 +(le_S_n i i0 (le_S_n (S i) (S i0) (le_S (S (S i)) (S i0) (le_n_S (S i) i0 +H9))))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal +C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c0 _ _) +\Rightarrow c0])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in +((let H18 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead +x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e +with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind +Abst) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abst +x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: +T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C +x1 (\lambda (c0: C).(csubst0 (minus i0 (S i)) u0 c0 x2)) H15 d H21) in (let +H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) +H13 Abst H20) in (arity_abst g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abst) +(minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u +(minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abst) (minus i0 (S i))) u0 +d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: +(le i0 i)).(arity_abst g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead +d (Bind Abst) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 +(TLRef i) t2) (csubst0 i0 u0 c c2))).(land_ind (subst0 i0 u0 (TLRef i) t2) +(csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) +t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(land_ind (eq nat i i0) (eq T t2 +(lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda +(H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: +T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: +nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda +(n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def +(eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead +d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind +Abbr) u0) H12)) in (let H14 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda +(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d +(Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (False_ind (arity g c2 +(lift (S i) O u0) a0) H14))))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H7)))) +H6)) H5)))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b +Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity +g c u a1)).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: +nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: +T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: +T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t +a2)).(\lambda (H4: ((\forall (d1: C).(\forall (u0: T).(\forall (i: +nat).((getl i (CHead c (Bind b) u) (CHead d1 (Bind Abbr) u0)) \to (\forall +(c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind b) u) t c2 t2) \to +(arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: +nat).(\lambda (H5: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: +C).(\lambda (t2: T).(\lambda (H6: (fsubst0 i u0 c (THead (Bind b) u t) c2 +t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Bind b) u t) t2 u0 i H6) in +(let H7 \def H_x in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Bind b) u +t) t2)) (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (land +(subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a2) +(\lambda (H8: (land (eq C c c2) (subst0 i u0 (THead (Bind b) u t) +t2))).(land_ind (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2) (arity g c2 +t2 a2) (\lambda (H9: (eq C c c2)).(\lambda (H10: (subst0 i u0 (THead (Bind b) +u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T +(\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i +u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda +(t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c t2 a2) (\lambda (H11: (ex2 T +(\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i +u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) +(\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a2) (\lambda (x: +T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 +u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c t0 a2)) +(arity_bind g b H0 c x a1 (H2 d1 u0 i H5 c x (fsubst0_snd i u0 c u x H13)) t +a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b +c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x) t (fsubst0_fst (S +i) u0 (CHead c (Bind b) u) t (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u +x H13 c)))) t2 H12)))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t2 +(THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda +(t3: T).(subst0 (s (Bind b) i) u0 t t3)) (arity g c t2 a2) (\lambda (x: +T).(\lambda (H12: (eq T t2 (THead (Bind b) u x))).(\lambda (H13: (subst0 (s +(Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t0: T).(arity +g c t0 a2)) (arity_bind g b H0 c u a1 H1 x a2 (H4 d1 u0 (S i) +(getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 +(Bind Abbr) u0) i H5) (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c +(Bind b) u) t x H13))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Bind b) i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Bind b) i) u0 t t3))) (arity g c t2 a2) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Bind b) x0 x1))).(\lambda +(H13: (subst0 i u0 u x0)).(\lambda (H14: (subst0 (s (Bind b) i) u0 t +x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: T).(arity g c t0 a2)) +(arity_bind g b H0 c x0 a1 (H2 d1 u0 i H5 c x0 (fsubst0_snd i u0 c u x0 H13)) +x1 a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind +b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x0) x1 (fsubst0_both +(S i) u0 (CHead c (Bind b) u) t x1 H14 (CHead c (Bind b) x0) +(csubst0_snd_bind b i u0 u x0 H13 c)))) t2 H12)))))) H11)) (subst0_gen_head +(Bind b) u0 u t t2 i H10)) c2 H9))) H8)) (\lambda (H8: (land (eq T (THead +(Bind b) u t) t2) (csubst0 i u0 c c2))).(land_ind (eq T (THead (Bind b) u t) +t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (eq T (THead (Bind +b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(eq_ind T (THead (Bind b) u +t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 d1 u0 +i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) t a2 (H4 d1 u0 (S i) +(getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 +(Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) t (fsubst0_fst (S i) u0 (CHead c +(Bind b) u) t (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 u)))) +t2 H9))) H8)) (\lambda (H8: (land (subst0 i u0 (THead (Bind b) u t) t2) +(csubst0 i u0 c c2))).(land_ind (subst0 i u0 (THead (Bind b) u t) t2) +(csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (subst0 i u0 (THead +(Bind b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(or3_ind (ex2 T +(\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i +u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda +(t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H11: (ex2 +T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) +(\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) (\lambda (x: +T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 +u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c2 t0 a2)) +(arity_bind g b H0 c2 x a1 (H2 d1 u0 i H5 c2 x (fsubst0_both i u0 c u x H13 +c2 H10)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u +(clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) x) t +(fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c2 (Bind b) x) +(csubst0_both_bind b i u0 u x H13 c c2 H10)))) t2 H12)))) H11)) (\lambda +(H11: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: +T).(subst0 (s (Bind b) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 +(THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)) +(arity g c2 t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) u +x))).(\lambda (H13: (subst0 (s (Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind +b) u x) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 +d1 u0 i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) x a2 (H4 d1 u0 (S i) +(getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 +(Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c +(Bind b) u) t x H13 (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 +u)))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) +i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u +u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) +(arity g c2 t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 +(THead (Bind b) x0 x1))).(\lambda (H13: (subst0 i u0 u x0)).(\lambda (H14: +(subst0 (s (Bind b) i) u0 t x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda +(t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 x0 a1 (H2 d1 u0 i H5 c2 x0 +(fsubst0_both i u0 c u x0 H13 c2 H10)) x1 a2 (H4 d1 u0 (S i) (getl_clear_bind +b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) +(CHead c2 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x1 +H14 (CHead c2 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H13 c c2 H10)))) t2 +H12)))))) H11)) (subst0_gen_head (Bind b) u0 u t t2 i H9)))) H8)) +H7))))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (H0: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (d1: +C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) +\to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g +c2 t2 (asucc g a1))))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: +(arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (d1: +C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c (Bind Abst) u) (CHead +d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 +(CHead c (Bind Abst) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda +(d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 +(Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i +u0 c (THead (Bind Abst) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 +(THead (Bind Abst) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq +C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2)) (land (eq T (THead (Bind +Abst) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Bind Abst) u +t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (H7: (land +(eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2))).(land_ind (eq C c c2) +(subst0 i u0 (THead (Bind Abst) u t) t2) (arity g c2 t2 (AHead a1 a2)) +(\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Bind Abst) u t) +t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 (AHead a1 a2))) (or3_ind +(ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: +T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u +t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))) (arity g c t2 +(AHead a1 a2)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind +Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: +T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) +(arity g c t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead +(Bind Abst) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind +Abst) x t) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x +a1 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 (H3 d1 u0 (S i) +(getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) +(CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x) t (fsubst0_fst (S i) +u0 (CHead c (Bind Abst) u) t (CHead c (Bind Abst) x) (csubst0_snd_bind Abst i +u0 u x H12 c)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq +T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 +t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) +(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c t2 (AHead a1 +a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u +x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead +(Bind Abst) u x) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g +c u a1 H0 x a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) +c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind +Abst) u) x (fsubst0_snd (S i) u0 (CHead c (Bind Abst) u) t x H12))) t2 +H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i +u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity +g c t2 (AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T +t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda +(H13: (subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 +x1) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x0 a1 (H1 +d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 (S i) +(getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) +(CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x0) x1 (fsubst0_both (S +i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c (Bind Abst) x0) +(csubst0_snd_bind Abst i u0 u x0 H12 c)))) t2 H11)))))) H10)) +(subst0_gen_head (Bind Abst) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: +(land (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2))).(land_ind (eq T +(THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 (AHead a1 a2)) +(\lambda (H8: (eq T (THead (Bind Abst) u t) t2)).(\lambda (H9: (csubst0 i u0 +c c2)).(eq_ind T (THead (Bind Abst) u t) (\lambda (t0: T).(arity g c2 t0 +(AHead a1 a2))) (arity_head g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c +u c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) +c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind +Abst) u) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c2 (Bind +Abst) u) (csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H8))) H7)) (\lambda +(H7: (land (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c +c2))).(land_ind (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) +(arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (subst0 i u0 (THead (Bind Abst) u +t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: +T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) +(ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: +T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind +Abst) i) u0 t t3)))) (arity g c2 t2 (AHead a1 a2)) (\lambda (H10: (ex2 T +(\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) +(\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 (AHead a1 a2)) (\lambda +(x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x t))).(\lambda (H12: +(subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) (\lambda (t0: +T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x a1 (H1 d1 u0 i H4 c2 x +(fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind +Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) +u0) i H4) (CHead c2 (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind +Abst) u) t (CHead c2 (Bind Abst) x) (csubst0_both_bind Abst i u0 u x H12 c c2 +H9)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 +(THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) +(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c2 t2 (AHead a1 +a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u +x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead +(Bind Abst) u x) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head +g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 (S +i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) +(CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) u) x (fsubst0_both (S +i) u0 (CHead c (Bind Abst) u) t x H12 (CHead c2 (Bind Abst) u) +(csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H11)))) H10)) (\lambda (H10: +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity g c2 t2 +(AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 +(THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: +(subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) +(\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x0 a1 (H1 d1 +u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 (S i) +(getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) +(CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) x0) x1 (fsubst0_both (S +i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c2 (Bind Abst) x0) +(csubst0_both_bind Abst i u0 u x0 H12 c c2 H9)))) t2 H11)))))) H10)) +(subst0_gen_head (Bind Abst) u0 u t t2 i H8)))) H7)) H6))))))))))))))))))) +(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u +a1)).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: +nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: +T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: +T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: +((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 +(Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c t c2 +t2) \to (arity g c2 t2 (AHead a1 a2))))))))))).(\lambda (d1: C).(\lambda (u0: +T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) +u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead +(Flat Appl) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Flat +Appl) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq C c c2) +(subst0 i u0 (THead (Flat Appl) u t) t2)) (land (eq T (THead (Flat Appl) u t) +t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Appl) u t) t2) +(csubst0 i u0 c c2)) (arity g c2 t2 a2) (\lambda (H7: (land (eq C c c2) +(subst0 i u0 (THead (Flat Appl) u t) t2))).(land_ind (eq C c c2) (subst0 i u0 +(THead (Flat Appl) u t) t2) (arity g c2 t2 a2) (\lambda (H8: (eq C c +c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Appl) u t) t2)).(eq_ind C c +(\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T (\lambda (u2: T).(eq T +t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T +(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 +(s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i +u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t +t3)))) (arity g c t2 a2) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 +(THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead +(Flat Appl) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat +Appl) x t) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x a1 (H1 d1 u0 +i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 H2) t2 H11)))) H10)) (\lambda +(H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda +(t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq +T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 +t t3)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat +Appl) u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T +(THead (Flat Appl) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c u +a1 H0 x a2 (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) +(\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity +g c t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead +(Flat Appl) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: +(subst0 (s (Flat Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) +(\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x0 a1 (H1 d1 u0 i H4 c x0 +(fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c +t x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Appl) u0 u t t2 i H9)) +c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Appl) u t) t2) (csubst0 +i u0 c c2))).(land_ind (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2) +(arity g c2 t2 a2) (\lambda (H8: (eq T (THead (Flat Appl) u t) t2)).(\lambda +(H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Appl) u t) (\lambda (t0: +T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst +i u0 c u c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 +H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Appl) u t) t2) +(csubst0 i u0 c c2))).(land_ind (subst0 i u0 (THead (Flat Appl) u t) t2) +(csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H8: (subst0 i u0 (THead +(Flat Appl) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T +(\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) +(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Appl) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H10: +(ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: +T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat +Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) +(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x t))).(\lambda +(H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Appl) x t) (\lambda (t0: +T).(arity g c2 t0 a2)) (arity_appl g c2 x a1 (H1 d1 u0 i H4 c2 x +(fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i +u0 c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T +t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) +(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)) (arity g c2 t2 a2) +(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) u x))).(\lambda +(H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T (THead (Flat Appl) u x) +(\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 +u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c +t x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Appl) i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity g c2 t2 a2) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 +x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat +Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t0: +T).(arity g c2 t0 a2)) (arity_appl g c2 x0 a1 (H1 d1 u0 i H4 c2 x0 +(fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 i H4 c2 x1 +(fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head +(Flat Appl) u0 u t t2 i H8)))) H7)) H6))))))))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (a0: A).(\lambda (H0: (arity g c u (asucc g +a0))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: +nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: +T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 (asucc g +a0))))))))))).(\lambda (t: T).(\lambda (H2: (arity g c t a0)).(\lambda (H3: +((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 +(Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c t c2 +t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: +T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) +u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead +(Flat Cast) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Flat +Cast) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq C c c2) +(subst0 i u0 (THead (Flat Cast) u t) t2)) (land (eq T (THead (Flat Cast) u t) +t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Cast) u t) t2) +(csubst0 i u0 c c2)) (arity g c2 t2 a0) (\lambda (H7: (land (eq C c c2) +(subst0 i u0 (THead (Flat Cast) u t) t2))).(land_ind (eq C c c2) (subst0 i u0 +(THead (Flat Cast) u t) t2) (arity g c2 t2 a0) (\lambda (H8: (eq C c +c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Cast) u t) t2)).(eq_ind C c +(\lambda (c0: C).(arity g c0 t2 a0)) (or3_ind (ex2 T (\lambda (u2: T).(eq T +t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T +(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 +(s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i +u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t +t3)))) (arity g c t2 a0) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 +(THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead +(Flat Cast) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat +Cast) x t) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x a0 (H1 d1 u0 +i H4 c x (fsubst0_snd i u0 c u x H12)) t H2) t2 H11)))) H10)) (\lambda (H10: +(ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: +T).(subst0 (s (Flat Cast) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 +(THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t +t3)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat +Cast) u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T +(THead (Flat Cast) u x) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c u +a0 H0 x (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) +(\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity +g c t2 a0) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead +(Flat Cast) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: +(subst0 (s (Flat Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) +(\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x0 a0 (H1 d1 u0 i H4 c x0 +(fsubst0_snd i u0 c u x0 H12)) x1 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c t +x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t t2 i H9)) c2 +H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Cast) u t) t2) (csubst0 i +u0 c c2))).(land_ind (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2) +(arity g c2 t2 a0) (\lambda (H8: (eq T (THead (Flat Cast) u t) t2)).(\lambda +(H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Cast) u t) (\lambda (t0: +T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 u (fsubst0_fst +i u0 c u c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 +H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Cast) u t) t2) +(csubst0 i u0 c c2))).(land_ind (subst0 i u0 (THead (Flat Cast) u t) t2) +(csubst0 i u0 c c2) (arity g c2 t2 a0) (\lambda (H8: (subst0 i u0 (THead +(Flat Cast) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T +(\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) +(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Cast) i) u0 t t3)))) (arity g c2 t2 a0) (\lambda (H10: +(ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: +T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat +Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a0) +(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x t))).(\lambda +(H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Cast) x t) (\lambda (t0: +T).(arity g c2 t0 a0)) (arity_cast g c2 x a0 (H1 d1 u0 i H4 c2 x +(fsubst0_both i u0 c u x H12 c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 +c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 +(THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) +(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)) (arity g c2 t2 a0) +(\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) u x))).(\lambda +(H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T (THead (Flat Cast) u x) +(\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 +u (fsubst0_fst i u0 c u c2 H9)) x (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c t +x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Cast) i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity g c2 t2 a0) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x0 +x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat +Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: +T).(arity g c2 t0 a0)) (arity_cast g c2 x0 a0 (H1 d1 u0 i H4 c2 x0 +(fsubst0_both i u0 c u x0 H12 c2 H9)) x1 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i +u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t +t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: C).(\lambda (t: +T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall +(d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) +u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity +g c2 t2 a1)))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda +(d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c (CHead d1 +(Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u +c t c2 t2)).(let H_x \def (fsubst0_gen_base c c2 t t2 u i H4) in (let H5 \def +H_x in (or3_ind (land (eq C c c2) (subst0 i u t t2)) (land (eq T t t2) +(csubst0 i u c c2)) (land (subst0 i u t t2) (csubst0 i u c c2)) (arity g c2 +t2 a2) (\lambda (H6: (land (eq C c c2) (subst0 i u t t2))).(land_ind (eq C c +c2) (subst0 i u t t2) (arity g c2 t2 a2) (\lambda (H7: (eq C c c2)).(\lambda +(H8: (subst0 i u t t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) +(arity_repl g c t2 a1 (H1 d1 u i H3 c t2 (fsubst0_snd i u c t t2 H8)) a2 H2) +c2 H7))) H6)) (\lambda (H6: (land (eq T t t2) (csubst0 i u c c2))).(land_ind +(eq T t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (eq T t +t2)).(\lambda (H8: (csubst0 i u c c2)).(eq_ind T t (\lambda (t0: T).(arity g +c2 t0 a2)) (arity_repl g c2 t a1 (H1 d1 u i H3 c2 t (fsubst0_fst i u c t c2 +H8)) a2 H2) t2 H7))) H6)) (\lambda (H6: (land (subst0 i u t t2) (csubst0 i u +c c2))).(land_ind (subst0 i u t t2) (csubst0 i u c c2) (arity g c2 t2 a2) +(\lambda (H7: (subst0 i u t t2)).(\lambda (H8: (csubst0 i u c +c2)).(arity_repl g c2 t2 a1 (H1 d1 u i H3 c2 t2 (fsubst0_both i u c t t2 H7 +c2 H8)) a2 H2))) H6)) H5))))))))))))))))) c1 t1 a H))))). + +lemma arity_subst0: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (a: A).((arity g c +t1 a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead +d (Bind Abbr) u)) \to (\forall (t2: T).((subst0 i u t1 t2) \to (arity g c t2 +a))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (a: A).(\lambda (H: +(arity g c t1 a)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (H1: +(subst0 i u t1 t2)).(arity_fsubst0 g c t1 a H d u i H0 c t2 (fsubst0_snd i u +c t1 t2 H1)))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/asucc/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/asucc/defs.ma new file mode 100644 index 000000000..182967265 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/asucc/defs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/A/defs.ma". + +include "basic_1A/G/defs.ma". + +rec definition asucc (g: G) (l: A) on l: A \def match l with [(ASort n0 n) +\Rightarrow (match n0 with [O \Rightarrow (ASort O (next g n)) | (S h) +\Rightarrow (ASort h n)]) | (AHead a1 a2) \Rightarrow (AHead a1 (asucc g +a2))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/asucc/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/asucc/fwd.ma new file mode 100644 index 000000000..98dd03afd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/asucc/fwd.ma @@ -0,0 +1,92 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/asucc/defs.ma". + +include "basic_1A/A/fwd.ma". + +lemma asucc_gen_sort: + \forall (g: G).(\forall (h: nat).(\forall (n: nat).(\forall (a: A).((eq A +(ASort h n) (asucc g a)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: +nat).(eq A a (ASort h0 n0))))))))) +\def + \lambda (g: G).(\lambda (h: nat).(\lambda (n: nat).(\lambda (a: A).(A_ind +(\lambda (a0: A).((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat nat (\lambda +(h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0))))))) (\lambda (n0: +nat).(\lambda (n1: nat).(\lambda (H: (eq A (ASort h n) (asucc g (ASort n0 +n1)))).(let H0 \def (f_equal A A (\lambda (e: A).e) (ASort h n) (match n0 +with [O \Rightarrow (ASort O (next g n1)) | (S h0) \Rightarrow (ASort h0 +n1)]) H) in (ex_2_intro nat nat (\lambda (h0: nat).(\lambda (n2: nat).(eq A +(ASort n0 n1) (ASort h0 n2)))) n0 n1 (refl_equal A (ASort n0 n1))))))) +(\lambda (a0: A).(\lambda (_: (((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat +nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 +n0)))))))).(\lambda (a1: A).(\lambda (_: (((eq A (ASort h n) (asucc g a1)) +\to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a1 (ASort h0 +n0)))))))).(\lambda (H1: (eq A (ASort h n) (asucc g (AHead a0 a1)))).(let H2 +\def (eq_ind A (ASort h n) (\lambda (ee: A).(match ee with [(ASort _ _) +\Rightarrow True | (AHead _ _) \Rightarrow False])) I (asucc g (AHead a0 a1)) +H1) in (False_ind (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A +(AHead a0 a1) (ASort h0 n0))))) H2))))))) a)))). + +lemma asucc_gen_head: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a: A).((eq A +(AHead a1 a2) (asucc g a)) \to (ex2 A (\lambda (a0: A).(eq A a (AHead a1 +a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(A_ind +(\lambda (a0: A).((eq A (AHead a1 a2) (asucc g a0)) \to (ex2 A (\lambda (a3: +A).(eq A a0 (AHead a1 a3))) (\lambda (a3: A).(eq A a2 (asucc g a3)))))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (H: (eq A (AHead a1 a2) (asucc +g (ASort n n0)))).(nat_ind (\lambda (n1: nat).((eq A (AHead a1 a2) (asucc g +(ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 +a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))) (\lambda (H0: (eq A (AHead +a1 a2) (asucc g (ASort O n0)))).(let H1 \def (eq_ind A (AHead a1 a2) (\lambda +(ee: A).(match ee with [(ASort _ _) \Rightarrow False | (AHead _ _) +\Rightarrow True])) I (ASort O (next g n0)) H0) in (False_ind (ex2 A (\lambda +(a0: A).(eq A (ASort O n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g +a0)))) H1))) (\lambda (n1: nat).(\lambda (_: (((eq A (AHead a1 a2) (asucc g +(ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 +a0))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (H0: (eq A (AHead +a1 a2) (asucc g (ASort (S n1) n0)))).(let H1 \def (eq_ind A (AHead a1 a2) +(\lambda (ee: A).(match ee with [(ASort _ _) \Rightarrow False | (AHead _ _) +\Rightarrow True])) I (ASort n1 n0) H0) in (False_ind (ex2 A (\lambda (a0: +A).(eq A (ASort (S n1) n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g +a0)))) H1))))) n H)))) (\lambda (a0: A).(\lambda (H: (((eq A (AHead a1 a2) +(asucc g a0)) \to (ex2 A (\lambda (a3: A).(eq A a0 (AHead a1 a3))) (\lambda +(a3: A).(eq A a2 (asucc g a3))))))).(\lambda (a3: A).(\lambda (H0: (((eq A +(AHead a1 a2) (asucc g a3)) \to (ex2 A (\lambda (a4: A).(eq A a3 (AHead a1 +a4))) (\lambda (a4: A).(eq A a2 (asucc g a4))))))).(\lambda (H1: (eq A (AHead +a1 a2) (asucc g (AHead a0 a3)))).(let H2 \def (f_equal A A (\lambda (e: +A).(match e with [(ASort _ _) \Rightarrow a1 | (AHead a4 _) \Rightarrow a4])) +(AHead a1 a2) (AHead a0 (asucc g a3)) H1) in ((let H3 \def (f_equal A A +(\lambda (e: A).(match e with [(ASort _ _) \Rightarrow a2 | (AHead _ a4) +\Rightarrow a4])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in (\lambda (H4: +(eq A a1 a0)).(let H5 \def (eq_ind_r A a0 (\lambda (a4: A).((eq A (AHead a1 +a2) (asucc g a4)) \to (ex2 A (\lambda (a5: A).(eq A a4 (AHead a1 a5))) +(\lambda (a5: A).(eq A a2 (asucc g a5)))))) H a1 H4) in (eq_ind A a1 (\lambda +(a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a4 a3) (AHead a1 a5))) (\lambda +(a5: A).(eq A a2 (asucc g a5))))) (let H6 \def (eq_ind A a2 (\lambda (a4: +A).((eq A (AHead a1 a4) (asucc g a3)) \to (ex2 A (\lambda (a5: A).(eq A a3 +(AHead a1 a5))) (\lambda (a5: A).(eq A a4 (asucc g a5)))))) H0 (asucc g a3) +H3) in (let H7 \def (eq_ind A a2 (\lambda (a4: A).((eq A (AHead a1 a4) (asucc +g a1)) \to (ex2 A (\lambda (a5: A).(eq A a1 (AHead a1 a5))) (\lambda (a5: +A).(eq A a4 (asucc g a5)))))) H5 (asucc g a3) H3) in (eq_ind_r A (asucc g a3) +(\lambda (a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a1 a3) (AHead a1 a5))) +(\lambda (a5: A).(eq A a4 (asucc g a5))))) (ex_intro2 A (\lambda (a4: A).(eq +A (AHead a1 a3) (AHead a1 a4))) (\lambda (a4: A).(eq A (asucc g a3) (asucc g +a4))) a3 (refl_equal A (AHead a1 a3)) (refl_equal A (asucc g a3))) a2 H3))) +a0 H4)))) H2))))))) a)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/cimp/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/cimp/defs.ma new file mode 100644 index 000000000..d39a85be6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/cimp/defs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/defs.ma". + +definition cimp: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(\forall (b: B).(\forall (d1: C).(\forall +(w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to (ex C +(\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/cimp/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/cimp/props.ma new file mode 100644 index 000000000..231609f0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/cimp/props.ma @@ -0,0 +1,125 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/cimp/defs.ma". + +include "basic_1A/getl/getl.ma". + +lemma cimp_flat_sx: + \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp (CHead c (Flat f) v) +c))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: +C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h (CHead c (Flat f) +v) (CHead d1 (Bind b) w))).(nat_ind (\lambda (n: nat).((getl n (CHead c (Flat +f) v) (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl n c (CHead d2 +(Bind b) w)))))) (\lambda (H0: (getl O (CHead c (Flat f) v) (CHead d1 (Bind +b) w))).(ex_intro C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) w))) d1 +(getl_intro O c (CHead d1 (Bind b) w) c (drop_refl c) (clear_gen_flat f c +(CHead d1 (Bind b) w) v (getl_gen_O (CHead c (Flat f) v) (CHead d1 (Bind b) +w) H0))))) (\lambda (h0: nat).(\lambda (_: (((getl h0 (CHead c (Flat f) v) +(CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h0 c (CHead d2 (Bind +b) w))))))).(\lambda (H0: (getl (S h0) (CHead c (Flat f) v) (CHead d1 (Bind +b) w))).(ex_intro C (\lambda (d2: C).(getl (S h0) c (CHead d2 (Bind b) w))) +d1 (getl_gen_S (Flat f) c (CHead d1 (Bind b) w) v h0 H0))))) h H)))))))). + +lemma cimp_flat_dx: + \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp c (CHead c (Flat f) +v)))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: +C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h c (CHead d1 (Bind +b) w))).(ex_intro C (\lambda (d2: C).(getl h (CHead c (Flat f) v) (CHead d2 +(Bind b) w))) d1 (getl_flat c (CHead d1 (Bind b) w) h H f v))))))))). + +lemma cimp_bind: + \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall +(v: T).(cimp (CHead c1 (Bind b) v) (CHead c2 (Bind b) v)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: ((\forall (b: B).(\forall (d1: +C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to +(ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda +(b: B).(\lambda (v: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (w: +T).(\lambda (h: nat).(\lambda (H0: (getl h (CHead c1 (Bind b) v) (CHead d1 +(Bind b0) w))).(nat_ind (\lambda (n: nat).((getl n (CHead c1 (Bind b) v) +(CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl n (CHead c2 (Bind b) +v) (CHead d2 (Bind b0) w)))))) (\lambda (H1: (getl O (CHead c1 (Bind b) v) +(CHead d1 (Bind b0) w))).(let H2 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 +(Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) +w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let +H3 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 +| (CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat +_) \Rightarrow b0])])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) +(clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) +v) (CHead d1 (Bind b0) w) H1))) in ((let H4 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) +(CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 +(Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) +in (\lambda (H5: (eq B b0 b)).(\lambda (_: (eq C d1 c1)).(eq_ind_r T v +(\lambda (t: T).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead +d2 (Bind b0) t))))) (eq_ind_r B b (\lambda (b1: B).(ex C (\lambda (d2: +C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b1) v))))) (ex_intro C +(\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b) v))) c2 +(getl_refl b c2 v)) b0 H5) w H4)))) H3)) H2))) (\lambda (h0: nat).(\lambda +(_: (((getl h0 (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w)) \to (ex C +(\lambda (d2: C).(getl h0 (CHead c2 (Bind b) v) (CHead d2 (Bind b0) +w))))))).(\lambda (H1: (getl (S h0) (CHead c1 (Bind b) v) (CHead d1 (Bind b0) +w))).(let H_x \def (H b0 d1 w (r (Bind b) h0) (getl_gen_S (Bind b) c1 (CHead +d1 (Bind b0) w) v h0 H1)) in (let H2 \def H_x in (ex_ind C (\lambda (d2: +C).(getl h0 c2 (CHead d2 (Bind b0) w))) (ex C (\lambda (d2: C).(getl (S h0) +(CHead c2 (Bind b) v) (CHead d2 (Bind b0) w)))) (\lambda (x: C).(\lambda (H3: +(getl h0 c2 (CHead x (Bind b0) w))).(ex_intro C (\lambda (d2: C).(getl (S h0) +(CHead c2 (Bind b) v) (CHead d2 (Bind b0) w))) x (getl_head (Bind b) h0 c2 +(CHead x (Bind b0) w) H3 v)))) H2)))))) h H0)))))))))). + +lemma cimp_getl_conf: + \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall +(d1: C).(\forall (w: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind b) w)) +\to (ex2 C (\lambda (d2: C).(cimp d1 d2)) (\lambda (d2: C).(getl i c2 (CHead +d2 (Bind b) w))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: ((\forall (b: B).(\forall (d1: +C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to +(ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda +(b: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (i: nat).(\lambda (H0: (getl +i c1 (CHead d1 (Bind b) w))).(let H_x \def (H b d1 w i H0) in (let H1 \def +H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind b) w))) (ex2 C +(\lambda (d2: C).(\forall (b0: B).(\forall (d3: C).(\forall (w0: T).(\forall +(h: nat).((getl h d1 (CHead d3 (Bind b0) w0)) \to (ex C (\lambda (d4: +C).(getl h d2 (CHead d4 (Bind b0) w0)))))))))) (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind b) w)))) (\lambda (x: C).(\lambda (H2: (getl i c2 (CHead x +(Bind b) w))).(ex_intro2 C (\lambda (d2: C).(\forall (b0: B).(\forall (d3: +C).(\forall (w0: T).(\forall (h: nat).((getl h d1 (CHead d3 (Bind b0) w0)) +\to (ex C (\lambda (d4: C).(getl h d2 (CHead d4 (Bind b0) w0)))))))))) +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind b) w))) x (\lambda (b0: +B).(\lambda (d0: C).(\lambda (w0: T).(\lambda (h: nat).(\lambda (H3: (getl h +d1 (CHead d0 (Bind b0) w0))).(let H_y \def (getl_trans (S h) c1 (CHead d1 +(Bind b) w) i H0) in (let H_x0 \def (H b0 d0 w0 (plus (S h) i) (H_y (CHead d0 +(Bind b0) w0) (getl_head (Bind b) h d1 (CHead d0 (Bind b0) w0) H3 w))) in +(let H4 \def H_x0 in (ex_ind C (\lambda (d2: C).(getl (S (plus h i)) c2 +(CHead d2 (Bind b0) w0))) (ex C (\lambda (d2: C).(getl h x (CHead d2 (Bind +b0) w0)))) (\lambda (x0: C).(\lambda (H5: (getl (S (plus h i)) c2 (CHead x0 +(Bind b0) w0))).(let H_y0 \def (getl_conf_le (S (plus h i)) (CHead x0 (Bind +b0) w0) c2 H5 (CHead x (Bind b) w) i H2) in (let H6 \def (refl_equal nat +(plus (S h) i)) in (let H7 \def (eq_ind nat (S (plus h i)) (\lambda (n: +nat).(getl (minus n i) (CHead x (Bind b) w) (CHead x0 (Bind b0) w0))) (H_y0 +(le_S i (plus h i) (le_plus_r h i))) (plus (S h) i) H6) in (let H8 \def +(eq_ind nat (minus (plus (S h) i) i) (\lambda (n: nat).(getl n (CHead x (Bind +b) w) (CHead x0 (Bind b0) w0))) H7 (S h) (minus_plus_r (S h) i)) in (ex_intro +C (\lambda (d2: C).(getl h x (CHead d2 (Bind b0) w0))) x0 (getl_gen_S (Bind +b) x (CHead x0 (Bind b0) w0) w h H8)))))))) H4))))))))) H2))) H1)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/clear/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/defs.ma new file mode 100644 index 000000000..ce009d9ab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +inductive clear: C \to (C \to Prop) \def +| clear_bind: \forall (b: B).(\forall (e: C).(\forall (u: T).(clear (CHead e +(Bind b) u) (CHead e (Bind b) u)))) +| clear_flat: \forall (e: C).(\forall (c: C).((clear e c) \to (\forall (f: +F).(\forall (u: T).(clear (CHead e (Flat f) u) c))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/clear/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/drop.ma new file mode 100644 index 000000000..4ecf9776a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/drop.ma @@ -0,0 +1,168 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/clear/fwd.ma". + +include "basic_1A/drop/fwd.ma". + +lemma drop_clear: + \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c1 c2) \to +(ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c1 (CHead +e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e +c2)))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (i: +nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: +C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda +(e: C).(\lambda (_: T).(drop i O e c2))))))))) (\lambda (n: nat).(\lambda +(c2: C).(\lambda (i: nat).(\lambda (H: (drop (S i) O (CSort n) c2)).(and3_ind +(eq C c2 (CSort n)) (eq nat (S i) O) (eq nat O O) (ex2_3 B C T (\lambda (b: +B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) +(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda +(_: (eq C c2 (CSort n))).(\lambda (H1: (eq nat (S i) O)).(\lambda (_: (eq nat +O O)).(let H3 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (ex2_3 B +C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e +(Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e +c2))))) H3))))) (drop_gen_sort n (S i) O c2 H)))))) (\lambda (c: C).(\lambda +(H: ((\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T +(\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) +v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e +c2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (i: +nat).(\lambda (H0: (drop (S i) O (CHead c k t) c2)).(K_ind (\lambda (k0: +K).((drop (r k0 i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: +C).(\lambda (v: T).(clear (CHead c k0 t) (CHead e (Bind b) v))))) (\lambda +(_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))))) (\lambda (b: +B).(\lambda (H1: (drop (r (Bind b) i) O c c2)).(ex2_3_intro B C T (\lambda +(b0: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Bind b) t) (CHead e +(Bind b0) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e +c2)))) b c t (clear_bind b c t) H1))) (\lambda (f: F).(\lambda (H1: (drop (r +(Flat f) i) O c c2)).(let H2 \def (H c2 i H1) in (ex2_3_ind B C T (\lambda +(b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) +(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) (ex2_3 B C +T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) +(CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: +T).(drop i O e c2))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (H3: (clear c (CHead x1 (Bind x0) x2))).(\lambda (H4: (drop i O +x1 c2)).(ex2_3_intro B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: +T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: +B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) x0 x1 x2 (clear_flat c +(CHead x1 (Bind x0) x2) H3 f t) H4)))))) H2)))) k (drop_gen_drop k c c2 t i +H0))))))))) c1). + +lemma drop_clear_O: + \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (u: T).((clear c +(CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 +e2) \to (drop (S i) O c e2)))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: +C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: +C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2)))))))) +(\lambda (n: nat).(\lambda (e1: C).(\lambda (u: T).(\lambda (H: (clear (CSort +n) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (_: +(drop i O e1 e2)).(clear_gen_sort (CHead e1 (Bind b) u) n H (drop (S i) O +(CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: +C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: +C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 +e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (u: +T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) u))).(\lambda (e2: +C).(\lambda (i: nat).(\lambda (H1: (drop i O e1 e2)).(K_ind (\lambda (k0: +K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) u)) \to (drop (S i) O (CHead c0 +k0 t) e2))) (\lambda (b0: B).(\lambda (H2: (clear (CHead c0 (Bind b0) t) +(CHead e1 (Bind b) u))).(let H3 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow e1 | (CHead c1 _ _) \Rightarrow c1])) (CHead e1 +(Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) +u) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e with [(CSort +_) \Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) u) (CHead c0 +(Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H5 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t0) \Rightarrow t0])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) +(clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in (\lambda (H6: (eq B b +b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c1: +C).(drop i O c1 e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(drop (S i) O +(CHead c0 (Bind b1) t) e2)) (drop_drop (Bind b) i c0 e2 H8 t) b0 H6))))) H4)) +H3)))) (\lambda (f: F).(\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 +(Bind b) u))).(drop_drop (Flat f) i c0 e2 (H e1 u (clear_gen_flat f c0 (CHead +e1 (Bind b) u) t H2) e2 i H1) t))) k H0))))))))))) c)). + +lemma drop_clear_S: + \forall (x2: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop +h (S d) x1 x2) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear +x2 (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 +(Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))) +\def + \lambda (x2: C).(C_ind (\lambda (c: C).(\forall (x1: C).(\forall (h: +nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: +C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: +C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 +c2)))))))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (_: (drop h (S d) x1 (CSort n))).(\lambda (b: B).(\lambda +(c2: C).(\lambda (u: T).(\lambda (H0: (clear (CSort n) (CHead c2 (Bind b) +u))).(clear_gen_sort (CHead c2 (Bind b) u) n H0 (ex2 C (\lambda (c1: +C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 +c2))))))))))))) (\lambda (c: C).(\lambda (H: ((\forall (x1: C).(\forall (h: +nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: +C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: +C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 +c2))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H0: (drop h (S d) x1 (CHead c k +t))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H1: (clear +(CHead c k t) (CHead c2 (Bind b) u))).(ex2_ind C (\lambda (e: C).(eq C x1 +(CHead e k (lift h (r k d) t)))) (\lambda (e: C).(drop h (r k d) e c)) (ex2 C +(\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: +C).(drop h d c1 c2))) (\lambda (x: C).(\lambda (H2: (eq C x1 (CHead x k (lift +h (r k d) t)))).(\lambda (H3: (drop h (r k d) x c)).(eq_ind_r C (CHead x k +(lift h (r k d) t)) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear c0 (CHead +c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))) (K_ind +(\lambda (k0: K).((clear (CHead c k0 t) (CHead c2 (Bind b) u)) \to ((drop h +(r k0 d) x c) \to (ex2 C (\lambda (c1: C).(clear (CHead x k0 (lift h (r k0 d) +t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))) +(\lambda (b0: B).(\lambda (H4: (clear (CHead c (Bind b0) t) (CHead c2 (Bind +b) u))).(\lambda (H5: (drop h (r (Bind b0) d) x c)).(let H6 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind +b0 c (CHead c2 (Bind b) u) t H4)) in ((let H7 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow b | (CHead _ k0 _) \Rightarrow (match +k0 with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead c2 +(Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) +t H4)) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u) (CHead +c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in (\lambda +(H9: (eq B b b0)).(\lambda (H10: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: +T).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) +t)) (CHead c1 (Bind b) (lift h d t0)))) (\lambda (c1: C).(drop h d c1 c2)))) +(eq_ind_r C c (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind +b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t)))) (\lambda +(c1: C).(drop h d c1 c0)))) (eq_ind_r B b0 (\lambda (b1: B).(ex2 C (\lambda +(c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind +b1) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)))) (ex_intro2 C (\lambda +(c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind +b0) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)) x (clear_bind b0 x +(lift h d t)) H5) b H9) c2 H10) u H8)))) H7)) H6))))) (\lambda (f: +F).(\lambda (H4: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u))).(\lambda +(H5: (drop h (r (Flat f) d) x c)).(let H6 \def (H x h d H5 b c2 u +(clear_gen_flat f c (CHead c2 (Bind b) u) t H4)) in (ex2_ind C (\lambda (c1: +C).(clear x (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 +c2)) (ex2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) +t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) +(\lambda (x0: C).(\lambda (H7: (clear x (CHead x0 (Bind b) (lift h d +u)))).(\lambda (H8: (drop h d x0 c2)).(ex_intro2 C (\lambda (c1: C).(clear +(CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d +u)))) (\lambda (c1: C).(drop h d c1 c2)) x0 (clear_flat x (CHead x0 (Bind b) +(lift h d u)) H7 f (lift h (r (Flat f) d) t)) H8)))) H6))))) k H1 H3) x1 +H2)))) (drop_gen_skip_r c x1 t h d k H0)))))))))))))) x2). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/clear/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/fwd.ma new file mode 100644 index 000000000..1b12b5f7f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/fwd.ma @@ -0,0 +1,192 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/clear/defs.ma". + +include "basic_1A/C/fwd.ma". + +implied rec lemma clear_ind (P: (C \to (C \to Prop))) (f: (\forall (b: +B).(\forall (e: C).(\forall (u: T).(P (CHead e (Bind b) u) (CHead e (Bind b) +u)))))) (f0: (\forall (e: C).(\forall (c: C).((clear e c) \to ((P e c) \to +(\forall (f0: F).(\forall (u: T).(P (CHead e (Flat f0) u) c)))))))) (c: C) +(c0: C) (c1: clear c c0) on c1: P c c0 \def match c1 with [(clear_bind b e u) +\Rightarrow (f b e u) | (clear_flat e c2 c3 f1 u) \Rightarrow (f0 e c2 c3 +((clear_ind P f f0) e c2 c3) f1 u)]. + +lemma clear_gen_sort: + \forall (x: C).(\forall (n: nat).((clear (CSort n) x) \to (\forall (P: +Prop).P))) +\def + \lambda (x: C).(\lambda (n: nat).(\lambda (H: (clear (CSort n) x)).(\lambda +(P: Prop).(insert_eq C (CSort n) (\lambda (c: C).(clear c x)) (\lambda (_: +C).P) (\lambda (y: C).(\lambda (H0: (clear y x)).(clear_ind (\lambda (c: +C).(\lambda (_: C).((eq C c (CSort n)) \to P))) (\lambda (b: B).(\lambda (e: +C).(\lambda (u: T).(\lambda (H1: (eq C (CHead e (Bind b) u) (CSort n))).(let +H2 \def (eq_ind C (CHead e (Bind b) u) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) +H1) in (False_ind P H2)))))) (\lambda (e: C).(\lambda (c: C).(\lambda (_: +(clear e c)).(\lambda (_: (((eq C e (CSort n)) \to P))).(\lambda (f: +F).(\lambda (u: T).(\lambda (H3: (eq C (CHead e (Flat f) u) (CSort n))).(let +H4 \def (eq_ind C (CHead e (Flat f) u) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) +H3) in (False_ind P H4))))))))) y x H0))) H)))). + +lemma clear_gen_bind: + \forall (b: B).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear +(CHead e (Bind b) u) x) \to (eq C x (CHead e (Bind b) u)))))) +\def + \lambda (b: B).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: +(clear (CHead e (Bind b) u) x)).(insert_eq C (CHead e (Bind b) u) (\lambda +(c: C).(clear c x)) (\lambda (c: C).(eq C x c)) (\lambda (y: C).(\lambda (H0: +(clear y x)).(clear_ind (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e +(Bind b) u)) \to (eq C c0 c)))) (\lambda (b0: B).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b0) u0) (CHead e (Bind b) +u))).(let H2 \def (f_equal C C (\lambda (e1: C).(match e1 with [(CSort _) +\Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Bind b0) u0) +(CHead e (Bind b) u) H1) in ((let H3 \def (f_equal C B (\lambda (e1: +C).(match e1 with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow +(match k with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (CHead +e0 (Bind b0) u0) (CHead e (Bind b) u) H1) in ((let H4 \def (f_equal C T +(\lambda (e1: C).(match e1 with [(CSort _) \Rightarrow u0 | (CHead _ _ t) +\Rightarrow t])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H1) in (\lambda +(H5: (eq B b0 b)).(\lambda (H6: (eq C e0 e)).(eq_ind_r T u (\lambda (t: +T).(eq C (CHead e0 (Bind b0) t) (CHead e0 (Bind b0) t))) (eq_ind_r C e +(\lambda (c: C).(eq C (CHead c (Bind b0) u) (CHead c (Bind b0) u))) (eq_ind_r +B b (\lambda (b1: B).(eq C (CHead e (Bind b1) u) (CHead e (Bind b1) u))) +(refl_equal C (CHead e (Bind b) u)) b0 H5) e0 H6) u0 H4)))) H3)) H2)))))) +(\lambda (e0: C).(\lambda (c: C).(\lambda (_: (clear e0 c)).(\lambda (_: +(((eq C e0 (CHead e (Bind b) u)) \to (eq C c e0)))).(\lambda (f: F).(\lambda +(u0: T).(\lambda (H3: (eq C (CHead e0 (Flat f) u0) (CHead e (Bind b) +u))).(let H4 \def (eq_ind C (CHead e0 (Flat f) u0) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead e (Bind +b) u) H3) in (False_ind (eq C c (CHead e0 (Flat f) u0)) H4))))))))) y x H0))) +H))))). + +lemma clear_gen_flat: + \forall (f: F).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear +(CHead e (Flat f) u) x) \to (clear e x))))) +\def + \lambda (f: F).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: +(clear (CHead e (Flat f) u) x)).(insert_eq C (CHead e (Flat f) u) (\lambda +(c: C).(clear c x)) (\lambda (_: C).(clear e x)) (\lambda (y: C).(\lambda +(H0: (clear y x)).(clear_ind (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead +e (Flat f) u)) \to (clear e c0)))) (\lambda (b: B).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) +u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with +[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat +f) u) H1) in (False_ind (clear e (CHead e0 (Bind b) u0)) H2)))))) (\lambda +(e0: C).(\lambda (c: C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C e0 +(CHead e (Flat f) u)) \to (clear e c)))).(\lambda (f0: F).(\lambda (u0: +T).(\lambda (H3: (eq C (CHead e0 (Flat f0) u0) (CHead e (Flat f) u))).(let H4 +\def (f_equal C C (\lambda (e1: C).(match e1 with [(CSort _) \Rightarrow e0 | +(CHead c0 _ _) \Rightarrow c0])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) +H3) in ((let H5 \def (f_equal C F (\lambda (e1: C).(match e1 with [(CSort _) +\Rightarrow f0 | (CHead _ k _) \Rightarrow (match k with [(Bind _) +\Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead e0 (Flat f0) u0) (CHead +e (Flat f) u) H3) in ((let H6 \def (f_equal C T (\lambda (e1: C).(match e1 +with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 +(Flat f0) u0) (CHead e (Flat f) u) H3) in (\lambda (_: (eq F f0 f)).(\lambda +(H8: (eq C e0 e)).(let H9 \def (eq_ind C e0 (\lambda (c0: C).((eq C c0 (CHead +e (Flat f) u)) \to (clear e c))) H2 e H8) in (let H10 \def (eq_ind C e0 +(\lambda (c0: C).(clear c0 c)) H1 e H8) in H10))))) H5)) H4))))))))) y x +H0))) H))))). + +lemma clear_gen_flat_r: + \forall (f: F).(\forall (x: C).(\forall (e: C).(\forall (u: T).((clear x +(CHead e (Flat f) u)) \to (\forall (P: Prop).P))))) +\def + \lambda (f: F).(\lambda (x: C).(\lambda (e: C).(\lambda (u: T).(\lambda (H: +(clear x (CHead e (Flat f) u))).(\lambda (P: Prop).(insert_eq C (CHead e +(Flat f) u) (\lambda (c: C).(clear x c)) (\lambda (_: C).P) (\lambda (y: +C).(\lambda (H0: (clear x y)).(clear_ind (\lambda (_: C).(\lambda (c0: +C).((eq C c0 (CHead e (Flat f) u)) \to P))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat +f) u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (ee: C).(match +ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k +with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e +(Flat f) u) H1) in (False_ind P H2)))))) (\lambda (e0: C).(\lambda (c: +C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C c (CHead e (Flat f) u)) +\to P))).(\lambda (_: F).(\lambda (_: T).(\lambda (H3: (eq C c (CHead e (Flat +f) u))).(let H4 \def (eq_ind C c (\lambda (c0: C).((eq C c0 (CHead e (Flat f) +u)) \to P)) H2 (CHead e (Flat f) u) H3) in (let H5 \def (eq_ind C c (\lambda +(c0: C).(clear e0 c0)) H1 (CHead e (Flat f) u) H3) in (H4 (refl_equal C +(CHead e (Flat f) u)))))))))))) x y H0))) H)))))). + +lemma clear_gen_all: + \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (ex_3 B C T (\lambda (b: +B).(\lambda (e: C).(\lambda (u: T).(eq C c2 (CHead e (Bind b) u)))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (clear c1 c2)).(clear_ind +(\lambda (_: C).(\lambda (c0: C).(ex_3 B C T (\lambda (b: B).(\lambda (e: +C).(\lambda (u: T).(eq C c0 (CHead e (Bind b) u)))))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (u: T).(ex_3_intro B C T (\lambda (b0: +B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead e (Bind b) u) (CHead e0 +(Bind b0) u0))))) b e u (refl_equal C (CHead e (Bind b) u)))))) (\lambda (e: +C).(\lambda (c: C).(\lambda (H0: (clear e c)).(\lambda (H1: (ex_3 B C T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(eq C c (CHead e0 (Bind b) +u))))))).(\lambda (_: F).(\lambda (_: T).(let H2 \def H1 in (ex_3_ind B C T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c (CHead e0 (Bind b) +u0))))) (ex_3 B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c +(CHead e0 (Bind b) u0)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (H3: (eq C c (CHead x1 (Bind x0) x2))).(let H4 \def (eq_ind C c +(\lambda (c0: C).(clear e c0)) H0 (CHead x1 (Bind x0) x2) H3) in (eq_ind_r C +(CHead x1 (Bind x0) x2) (\lambda (c0: C).(ex_3 B C T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u0: T).(eq C c0 (CHead e0 (Bind b) u0))))))) (ex_3_intro B +C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead x1 (Bind +x0) x2) (CHead e0 (Bind b) u0))))) x0 x1 x2 (refl_equal C (CHead x1 (Bind x0) +x2))) c H3)))))) H2)))))))) c1 c2 H))). + +theorem clear_mono: + \forall (c: C).(\forall (c1: C).((clear c c1) \to (\forall (c2: C).((clear c +c2) \to (eq C c1 c2))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).((clear c0 c1) \to +(\forall (c2: C).((clear c0 c2) \to (eq C c1 c2)))))) (\lambda (n: +nat).(\lambda (c1: C).(\lambda (_: (clear (CSort n) c1)).(\lambda (c2: +C).(\lambda (H0: (clear (CSort n) c2)).(clear_gen_sort c2 n H0 (eq C c1 +c2))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).((clear c0 c1) \to +(\forall (c2: C).((clear c0 c2) \to (eq C c1 c2))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (c1: C).(\lambda (H0: (clear (CHead c0 k t) +c1)).(\lambda (c2: C).(\lambda (H1: (clear (CHead c0 k t) c2)).(K_ind +(\lambda (k0: K).((clear (CHead c0 k0 t) c1) \to ((clear (CHead c0 k0 t) c2) +\to (eq C c1 c2)))) (\lambda (b: B).(\lambda (H2: (clear (CHead c0 (Bind b) +t) c1)).(\lambda (H3: (clear (CHead c0 (Bind b) t) c2)).(eq_ind_r C (CHead c0 +(Bind b) t) (\lambda (c3: C).(eq C c1 c3)) (eq_ind_r C (CHead c0 (Bind b) t) +(\lambda (c3: C).(eq C c3 (CHead c0 (Bind b) t))) (refl_equal C (CHead c0 +(Bind b) t)) c1 (clear_gen_bind b c0 c1 t H2)) c2 (clear_gen_bind b c0 c2 t +H3))))) (\lambda (f: F).(\lambda (H2: (clear (CHead c0 (Flat f) t) +c1)).(\lambda (H3: (clear (CHead c0 (Flat f) t) c2)).(H c1 (clear_gen_flat f +c0 c1 t H2) c2 (clear_gen_flat f c0 c2 t H3))))) k H0 H1))))))))) c). + +lemma clear_cle: + \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (cle c2 c1))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to +(le (cweight c2) (cweight c))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda +(H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (le (cweight c2) O))))) +(\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (le (cweight +c2) (cweight c)))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: +C).(\lambda (H0: (clear (CHead c k t) c2)).(K_ind (\lambda (k0: K).((clear +(CHead c k0 t) c2) \to (le (cweight c2) (plus (cweight c) (tweight t))))) +(\lambda (b: B).(\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C +(CHead c (Bind b) t) (\lambda (c0: C).(le (cweight c0) (plus (cweight c) +(tweight t)))) (le_n (plus (cweight c) (tweight t))) c2 (clear_gen_bind b c +c2 t H1)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c (Flat f) t) +c2)).(le_plus_trans (cweight c2) (cweight c) (tweight t) (H c2 +(clear_gen_flat f c c2 t H1))))) k H0))))))) c1). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/clear/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/clear/props.ma new file mode 100644 index 000000000..e556d59a2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/clear/props.ma @@ -0,0 +1,96 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/clear/fwd.ma". + +lemma clear_clear: + \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (clear c2 c2))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to +(clear c2 c2)))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear +(CSort n) c2)).(clear_gen_sort c2 n H (clear c2 c2))))) (\lambda (c: +C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (clear c2 +c2))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear +(CHead c k t) c2)).(K_ind (\lambda (k0: K).((clear (CHead c k0 t) c2) \to +(clear c2 c2))) (\lambda (b: B).(\lambda (H1: (clear (CHead c (Bind b) t) +c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(clear c0 c0)) +(clear_bind b c t) c2 (clear_gen_bind b c c2 t H1)))) (\lambda (f: +F).(\lambda (H1: (clear (CHead c (Flat f) t) c2)).(H c2 (clear_gen_flat f c +c2 t H1)))) k H0))))))) c1). + +theorem clear_trans: + \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (c2: C).((clear c +c2) \to (clear c1 c2))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c0: C).((clear c c0) \to +(\forall (c2: C).((clear c0 c2) \to (clear c c2)))))) (\lambda (n: +nat).(\lambda (c: C).(\lambda (H: (clear (CSort n) c)).(\lambda (c2: +C).(\lambda (_: (clear c c2)).(clear_gen_sort c n H (clear (CSort n) +c2))))))) (\lambda (c: C).(\lambda (H: ((\forall (c0: C).((clear c c0) \to +(\forall (c2: C).((clear c0 c2) \to (clear c c2))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (c0: C).(\lambda (H0: (clear (CHead c k t) +c0)).(\lambda (c2: C).(\lambda (H1: (clear c0 c2)).(K_ind (\lambda (k0: +K).((clear (CHead c k0 t) c0) \to (clear (CHead c k0 t) c2))) (\lambda (b: +B).(\lambda (H2: (clear (CHead c (Bind b) t) c0)).(let H3 \def (eq_ind C c0 +(\lambda (c3: C).(clear c3 c2)) H1 (CHead c (Bind b) t) (clear_gen_bind b c +c0 t H2)) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(clear (CHead +c (Bind b) t) c3)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H3))))) +(\lambda (f: F).(\lambda (H2: (clear (CHead c (Flat f) t) c0)).(clear_flat c +c2 (H c0 (clear_gen_flat f c c0 t H2) c2 H1) f t))) k H0))))))))) c1). + +lemma clear_ctail: + \forall (b: B).(\forall (c1: C).(\forall (c2: C).(\forall (u2: T).((clear c1 +(CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k +u1 c1) (CHead (CTail k u1 c2) (Bind b) u2)))))))) +\def + \lambda (b: B).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: +C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: +K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) +u2)))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H: +(clear (CSort n) (CHead c2 (Bind b) u2))).(\lambda (k: K).(\lambda (u1: +T).(K_ind (\lambda (k0: K).(clear (CHead (CSort n) k0 u1) (CHead (CTail k0 u1 +c2) (Bind b) u2))) (\lambda (b0: B).(clear_gen_sort (CHead c2 (Bind b) u2) n +H (clear (CHead (CSort n) (Bind b0) u1) (CHead (CTail (Bind b0) u1 c2) (Bind +b) u2)))) (\lambda (f: F).(clear_gen_sort (CHead c2 (Bind b) u2) n H (clear +(CHead (CSort n) (Flat f) u1) (CHead (CTail (Flat f) u1 c2) (Bind b) u2)))) +k))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (u2: +T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: +T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2))))))))).(\lambda +(k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H0: (clear +(CHead c k t) (CHead c2 (Bind b) u2))).(\lambda (k0: K).(\lambda (u1: +T).(K_ind (\lambda (k1: K).((clear (CHead c k1 t) (CHead c2 (Bind b) u2)) \to +(clear (CHead (CTail k0 u1 c) k1 t) (CHead (CTail k0 u1 c2) (Bind b) u2)))) +(\lambda (b0: B).(\lambda (H1: (clear (CHead c (Bind b0) t) (CHead c2 (Bind +b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) u2) +(CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in +((let H3 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow b | (CHead _ k1 _) \Rightarrow (match k1 with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead c +(Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H4 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | +(CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) +(clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b +b0)).(\lambda (H6: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(clear (CHead +(CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c2) (Bind b) t0))) (eq_ind_r +C c (\lambda (c0: C).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail +k0 u1 c0) (Bind b) t))) (eq_ind B b (\lambda (b1: B).(clear (CHead (CTail k0 +u1 c) (Bind b1) t) (CHead (CTail k0 u1 c) (Bind b) t))) (clear_bind b (CTail +k0 u1 c) t) b0 H5) c2 H6) u2 H4)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: +(clear (CHead c (Flat f) t) (CHead c2 (Bind b) u2))).(clear_flat (CTail k0 u1 +c) (CHead (CTail k0 u1 c2) (Bind b) u2) (H c2 u2 (clear_gen_flat f c (CHead +c2 (Bind b) u2) t H1) k0 u1) f t))) k H0)))))))))) c1)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/clen/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/clen/defs.ma new file mode 100644 index 000000000..ce6bcbfce --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/clen/defs.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +include "basic_1A/s/defs.ma". + +rec definition clen (c: C) on c: nat \def match c with [(CSort _) \Rightarrow +O | (CHead c0 k _) \Rightarrow (s k (clen c0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/clen/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/clen/getl.ma new file mode 100644 index 000000000..665581c28 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/clen/getl.ma @@ -0,0 +1,351 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/clen/defs.ma". + +include "basic_1A/getl/props.ma". + +lemma getl_ctail_clen: + \forall (b: B).(\forall (t: T).(\forall (c: C).(ex nat (\lambda (n: +nat).(getl (clen c) (CTail (Bind b) t c) (CHead (CSort n) (Bind b) t)))))) +\def + \lambda (b: B).(\lambda (t: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(ex +nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) +(Bind b) t))))) (\lambda (n: nat).(ex_intro nat (\lambda (n0: nat).(getl O +(CHead (CSort n) (Bind b) t) (CHead (CSort n0) (Bind b) t))) n (getl_refl b +(CSort n) t))) (\lambda (c0: C).(\lambda (H: (ex nat (\lambda (n: nat).(getl +(clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))).(\lambda (k: +K).(\lambda (t0: T).(let H0 \def H in (ex_ind nat (\lambda (n: nat).(getl +(clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))) (ex nat +(\lambda (n: nat).(getl (s k (clen c0)) (CHead (CTail (Bind b) t c0) k t0) +(CHead (CSort n) (Bind b) t)))) (\lambda (x: nat).(\lambda (H1: (getl (clen +c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t))).(K_ind (\lambda (k0: +K).(ex nat (\lambda (n: nat).(getl (s k0 (clen c0)) (CHead (CTail (Bind b) t +c0) k0 t0) (CHead (CSort n) (Bind b) t))))) (\lambda (b0: B).(ex_intro nat +(\lambda (n: nat).(getl (S (clen c0)) (CHead (CTail (Bind b) t c0) (Bind b0) +t0) (CHead (CSort n) (Bind b) t))) x (getl_head (Bind b0) (clen c0) (CTail +(Bind b) t c0) (CHead (CSort x) (Bind b) t) H1 t0))) (\lambda (f: +F).(ex_intro nat (\lambda (n: nat).(getl (clen c0) (CHead (CTail (Bind b) t +c0) (Flat f) t0) (CHead (CSort n) (Bind b) t))) x (getl_flat (CTail (Bind b) +t c0) (CHead (CSort x) (Bind b) t) (clen c0) H1 f t0))) k))) H0)))))) c))). + +lemma getl_gen_tail: + \forall (k: K).(\forall (b: B).(\forall (u1: T).(\forall (u2: T).(\forall +(c2: C).(\forall (c1: C).(\forall (i: nat).((getl i (CTail k u1 c1) (CHead c2 +(Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) +(\lambda (e: C).(getl i c1 (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: +nat).(eq nat i (clen c1))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: +nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))))))) +\def + \lambda (k: K).(\lambda (b: B).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(c2: C).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (i: nat).((getl i +(CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C +c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 +nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort +n)))))))) (\lambda (n: nat).(\lambda (i: nat).(nat_ind (\lambda (n0: +nat).((getl n0 (CTail k u1 (CSort n)) (CHead c2 (Bind b) u2)) \to (or (ex2 C +(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 (clen (CSort +n)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) +(\lambda (n1: nat).(eq C c2 (CSort n1))))))) (\lambda (H: (getl O (CHead +(CSort n) k u1) (CHead c2 (Bind b) u2))).(K_ind (\lambda (k0: K).((clear +(CHead (CSort n) k0 u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: +C).(eq C c2 (CTail k0 u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: +nat).(eq K k0 (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: +nat).(eq C c2 (CSort n0))))))) (\lambda (b0: B).(\lambda (H0: (clear (CHead +(CSort n) (Bind b0) u1) (CHead c2 (Bind b) u2))).(let H1 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c _ _) +\Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) +(clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H2 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead +_ k0 _) \Rightarrow (match k0 with [(Bind b1) \Rightarrow b1 | (Flat _) +\Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) +(clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H3 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | (CHead +_ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) +(clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in (\lambda (H4: +(eq B b b0)).(\lambda (H5: (eq C c2 (CSort n))).(eq_ind_r C (CSort n) +(\lambda (c: C).(or (ex2 C (\lambda (e: C).(eq C c (CTail (Bind b0) u1 e))) +(\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda +(_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda +(_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c (CSort n0)))))) (eq_ind_r T +u1 (\lambda (t: T).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind +b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) t)))) (ex4 +nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind +b))) (\lambda (_: nat).(eq T u1 t)) (\lambda (n0: nat).(eq C (CSort n) (CSort +n0)))))) (eq_ind_r B b0 (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C +(CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e +(Bind b1) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: +nat).(eq K (Bind b0) (Bind b1))) (\lambda (_: nat).(eq T u1 u1)) (\lambda +(n0: nat).(eq C (CSort n) (CSort n0)))))) (or_intror (ex2 C (\lambda (e: +C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) +(CHead e (Bind b0) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda +(_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda +(n0: nat).(eq C (CSort n) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq +nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq +T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0))) n (refl_equal nat +O) (refl_equal K (Bind b0)) (refl_equal T u1) (refl_equal C (CSort n)))) b +H4) u2 H3) c2 H5)))) H2)) H1)))) (\lambda (f: F).(\lambda (H0: (clear (CHead +(CSort n) (Flat f) u1) (CHead c2 (Bind b) u2))).(clear_gen_sort (CHead c2 +(Bind b) u2) n (clear_gen_flat f (CSort n) (CHead c2 (Bind b) u2) u1 H0) (or +(ex2 C (\lambda (e: C).(eq C c2 (CTail (Flat f) u1 e))) (\lambda (e: C).(getl +O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) +(\lambda (_: nat).(eq K (Flat f) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) +(\lambda (n0: nat).(eq C c2 (CSort n0)))))))) k (getl_gen_O (CHead (CSort n) +k u1) (CHead c2 (Bind b) u2) H))) (\lambda (n0: nat).(\lambda (_: (((getl n0 +(CHead (CSort n) k u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: +C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 O)) (\lambda (_: +nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: +nat).(eq C c2 (CSort n1)))))))).(\lambda (H0: (getl (S n0) (CHead (CSort n) k +u1) (CHead c2 (Bind b) u2))).(getl_gen_sort n (r k n0) (CHead c2 (Bind b) u2) +(getl_gen_S k (CSort n) (CHead c2 (Bind b) u2) u1 n0 H0) (or (ex2 C (\lambda +(e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n0) (CSort n) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n0) O)) +(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n1: nat).(eq C c2 (CSort n1))))))))) i))) (\lambda (c: C).(\lambda (H: +((\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or +(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) +(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n: nat).(eq C c2 (CSort n))))))))).(\lambda (k0: K).(\lambda (t: T).(\lambda +(i: nat).(nat_ind (\lambda (n: nat).((getl n (CTail k u1 (CHead c k0 t)) +(CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 +e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat n (clen (CHead c k0 t)))) (\lambda (_: nat).(eq K k +(Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort +n0))))))) (\lambda (H0: (getl O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind +b) u2))).(K_ind (\lambda (k1: K).((clear (CHead (CTail k u1 c) k1 t) (CHead +c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) +(\lambda (e: C).(getl O (CHead c k1 t) (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat O (s k1 (clen c)))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort +n))))))) (\lambda (b0: B).(\lambda (H1: (clear (CHead (CTail k u1 c) (Bind +b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) +(CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 +(CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B +(\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead _ k1 _) +\Rightarrow (match k1 with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow +b])])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) +(clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H4 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | +(CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) +(Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) +in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 (CTail k u1 c))).(eq_ind +T u2 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) +(\lambda (e: C).(getl O (CHead c (Bind b0) t0) (CHead e (Bind b) u2)))) (ex4 +nat (\lambda (_: nat).(eq nat O (s (Bind b0) (clen c)))) (\lambda (_: +nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq +C c2 (CSort n)))))) (eq_ind B b (\lambda (b1: B).(or (ex2 C (\lambda (e: +C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b1) u2) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b1) +(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 +u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (let H7 \def (eq_ind C c2 +(\lambda (c0: C).(\forall (i0: nat).((getl i0 (CTail k u1 c) (CHead c0 (Bind +b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: +C).(getl i0 c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i0 +(clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 +u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))))) H (CTail k u1 c) H6) in +(eq_ind_r C (CTail k u1 c) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C +c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) +(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C +(CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) +(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 +u2)) (\lambda (n: nat).(eq C (CTail k u1 c) (CSort n)))) (ex_intro2 C +(\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O +(CHead c (Bind b) u2) (CHead e (Bind b) u2))) c (refl_equal C (CTail k u1 c)) +(getl_refl b c u2))) c2 H6)) b0 H5) t H4)))) H3)) H2)))) (\lambda (f: +F).(\lambda (H1: (clear (CHead (CTail k u1 c) (Flat f) t) (CHead c2 (Bind b) +u2))).(let H2 \def (H O (getl_intro O (CTail k u1 c) (CHead c2 (Bind b) u2) +(CTail k u1 c) (drop_refl (CTail k u1 c)) (clear_gen_flat f (CTail k u1 c) +(CHead c2 (Bind b) u2) t H1))) in (or_ind (ex2 C (\lambda (e: C).(eq C c2 +(CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) +(\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))) (or +(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O +(CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq +nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda +(_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (H3: +(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c +(CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 +e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))) (or (ex2 C (\lambda +(e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) +(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 +u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x: C).(\lambda (H4: +(eq C c2 (CTail k u1 x))).(\lambda (H5: (getl O c (CHead x (Bind b) +u2))).(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: +C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) +(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 +u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: +C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c +(Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s +(Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: +nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 x) (CSort n)))) +(ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda +(e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2))) x (refl_equal C +(CTail k u1 x)) (getl_flat c (CHead x (Bind b) u2) O H5 f t))) c2 H4)))) H3)) +(\lambda (H3: (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: +nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq +C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat O (clen c))) +(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n: nat).(eq C c2 (CSort n))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 +e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) +(ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: +nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq +C c2 (CSort n))))) (\lambda (x0: nat).(\lambda (H4: (eq nat O (clen +c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda +(H7: (eq C c2 (CSort x0))).(eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C +(\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c +(Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s +(Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: +nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (eq_ind T u1 +(\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) +(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) t0)))) (ex4 +nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq +K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n: nat).(eq C (CSort +x0) (CSort n)))))) (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda +(e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl O (CHead c +(Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s +(Flat f) (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: +nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) +(or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) +(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 +nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq +K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C +(CSort x0) (CSort n)))) (ex4_intro nat (\lambda (_: nat).(eq nat O (s (Flat +f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: +nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n))) x0 H4 +(refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) k H5) +u2 H6) c2 H7)))))) H3)) H2)))) k0 (getl_gen_O (CHead (CTail k u1 c) k0 t) +(CHead c2 (Bind b) u2) H0))) (\lambda (n: nat).(\lambda (H0: (((getl n (CHead +(CTail k u1 c) k0 t) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: +C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (s k0 (clen c)))) +(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n0: nat).(eq C c2 (CSort n0)))))))).(\lambda (H1: (getl (S n) (CHead (CTail +k u1 c) k0 t) (CHead c2 (Bind b) u2))).(let H_x \def (H (r k0 n) (getl_gen_S +k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H1)) in (let H2 \def H_x in +(or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: +C).(getl (r k0 n) c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq +nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: +nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))) (or (ex2 C +(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead +c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s +k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T +u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (H3: (ex2 C +(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c +(CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 +e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))) (or (ex2 C +(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead +c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s +k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T +u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x: C).(\lambda +(H4: (eq C c2 (CTail k u1 x))).(\lambda (H5: (getl (r k0 n) c (CHead x (Bind +b) u2))).(let H6 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k +u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind +b) u2) t n H1) (CTail k u1 x) H4) in (let H7 \def (eq_ind C c2 (\lambda (c0: +C).((getl n (CHead (CTail k u1 c) k0 t) (CHead c0 (Bind b) u2)) \to (or (ex2 +C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c +k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (s k0 +(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 +u2)) (\lambda (n0: nat).(eq C c0 (CSort n0))))))) H0 (CTail k u1 x) H4) in +(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C +c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind +b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda +(_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: +nat).(eq C c0 (CSort n0)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail +k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) +(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n0: nat).(eq C (CTail k u1 x) (CSort n0)))) (ex_intro2 C (\lambda (e: C).(eq +C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) +(CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_head k0 n c +(CHead x (Bind b) u2) H5 t))) c2 H4)))))) H3)) (\lambda (H3: (ex4 nat +(\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort +n0))))).(ex4_ind nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda +(_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: +nat).(eq C c2 (CSort n0))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 +e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 +nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K +k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 +(CSort n0))))) (\lambda (x0: nat).(\lambda (H4: (eq nat (r k0 n) (clen +c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda +(H7: (eq C c2 (CSort x0))).(let H8 \def (eq_ind C c2 (\lambda (c0: C).(getl +(r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 +c) (CHead c2 (Bind b) u2) t n H1) (CSort x0) H7) in (let H9 \def (eq_ind C c2 +(\lambda (c0: C).((getl n (CHead (CTail k u1 c) k0 t) (CHead c0 (Bind b) u2)) +\to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: +C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: +nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) +(\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0))))))) +H0 (CSort x0) H7) in (eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C +(\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead +c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s +k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T +u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (let H10 \def (eq_ind_r T +u2 (\lambda (t0: T).((getl n (CHead (CTail k u1 c) k0 t) (CHead (CSort x0) +(Bind b) t0)) \to (or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 +e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) t0)))) (ex4 nat +(\lambda (_: nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n0: nat).(eq C (CSort x0) +(CSort n0))))))) H9 u1 H6) in (let H11 \def (eq_ind_r T u2 (\lambda (t0: +T).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) t0))) H8 u1 H6) +in (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) +(CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) +t0)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda +(_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n0: +nat).(eq C (CSort x0) (CSort n0)))))) (let H12 \def (eq_ind K k (\lambda (k1: +K).((getl n (CHead (CTail k1 u1 c) k0 t) (CHead (CSort x0) (Bind b) u1)) \to +(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: +C).(getl n (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: +nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) +(\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort +n0))))))) H10 (Bind b) H5) in (let H13 \def (eq_ind K k (\lambda (k1: +K).(getl (r k0 n) (CTail k1 u1 c) (CHead (CSort x0) (Bind b) u1))) H11 (Bind +b) H5) in (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: +C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 +t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 +(clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 +u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (eq_ind nat (r k0 n) +(\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind +b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) +u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 n0))) (\lambda (_: +nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: +nat).(eq C (CSort x0) (CSort n1)))))) (eq_ind_r nat (S n) (\lambda (n0: +nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) +(\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat +(\lambda (_: nat).(eq nat (S n) n0)) (\lambda (_: nat).(eq K (Bind b) (Bind +b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) +(CSort n1)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail +(Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) +u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq +K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq +C (CSort x0) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat (S n) (S +n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 +u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0))) x0 (refl_equal nat (S +n)) (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) (s +k0 (r k0 n)) (s_r k0 n)) (clen c) H4) k H5))) u2 H6))) c2 H7)))))))) H3)) +H2)))))) i)))))) c1)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/cnt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/cnt/defs.ma new file mode 100644 index 000000000..f6a0dc54a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/cnt/defs.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +inductive cnt: T \to Prop \def +| cnt_sort: \forall (n: nat).(cnt (TSort n)) +| cnt_head: \forall (t: T).((cnt t) \to (\forall (k: K).(\forall (v: T).(cnt +(THead k v t))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/cnt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/cnt/fwd.ma new file mode 100644 index 000000000..aadf1d739 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/cnt/fwd.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/cnt/defs.ma". + +implied rec lemma cnt_ind (P: (T \to Prop)) (f: (\forall (n: nat).(P (TSort +n)))) (f0: (\forall (t: T).((cnt t) \to ((P t) \to (\forall (k: K).(\forall +(v: T).(P (THead k v t)))))))) (t: T) (c: cnt t) on c: P t \def match c with +[(cnt_sort n) \Rightarrow (f n) | (cnt_head t0 c0 k v) \Rightarrow (f0 t0 c0 +((cnt_ind P f f0) t0 c0) k v)]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/cnt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/cnt/props.ma new file mode 100644 index 000000000..531fe7263 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/cnt/props.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/cnt/fwd.ma". + +include "basic_1A/lift/props.ma". + +lemma cnt_lift: + \forall (t: T).((cnt t) \to (\forall (i: nat).(\forall (d: nat).(cnt (lift i +d t))))) +\def + \lambda (t: T).(\lambda (H: (cnt t)).(cnt_ind (\lambda (t0: T).(\forall (i: +nat).(\forall (d: nat).(cnt (lift i d t0))))) (\lambda (n: nat).(\lambda (i: +nat).(\lambda (d: nat).(eq_ind_r T (TSort n) (\lambda (t0: T).(cnt t0)) +(cnt_sort n) (lift i d (TSort n)) (lift_sort n i d))))) (\lambda (t0: +T).(\lambda (_: (cnt t0)).(\lambda (H1: ((\forall (i: nat).(\forall (d: +nat).(cnt (lift i d t0)))))).(\lambda (k: K).(\lambda (v: T).(\lambda (i: +nat).(\lambda (d: nat).(eq_ind_r T (THead k (lift i d v) (lift i (s k d) t0)) +(\lambda (t1: T).(cnt t1)) (cnt_head (lift i (s k d) t0) (H1 i (s k d)) k +(lift i d v)) (lift i d (THead k v t0)) (lift_head k v t0 i d))))))))) t H)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csuba/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/arity.ma new file mode 100644 index 000000000..088ac63bb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/arity.ma @@ -0,0 +1,319 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csuba/getl.ma". + +include "basic_1A/csuba/props.ma". + +include "basic_1A/arity/fwd.ma". + +include "basic_1A/csubv/getl.ma". + +lemma csuba_arity: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 +t a) \to (\forall (c2: C).((csuba g c1 c2) \to (arity g c2 t a))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 a0)))))) (\lambda (c: +C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (csuba g c +c2)).(arity_sort g c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) +u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall +(c2: C).((csuba g d c2) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda +(H3: (csuba g c c2)).(let H4 \def (csuba_getl_abbr g c d u i H0 c2 H3) in +(ex2_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d d2)) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda +(H5: (getl i c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (csuba g d +x)).(arity_abbr g c2 x u i H5 a0 (H2 x H6))))) H4)))))))))))) (\lambda (c: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c +(CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc +g a0))).(\lambda (H2: ((\forall (c2: C).((csuba g d c2) \to (arity g c2 u +(asucc g a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c c2)).(let H4 \def +(csuba_getl_abst g c d u i H0 c2 H3) in (or_ind (ex2 C (\lambda (d2: C).(getl +i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u (asucc +g a1))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 +a1))))) (arity g c2 (TLRef i) a0) (\lambda (H5: (ex2 C (\lambda (d2: C).(getl +i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d d2)))).(ex2_ind C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d d2)) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H6: +(getl i c2 (CHead x (Bind Abst) u))).(\lambda (H7: (csuba g d x)).(arity_abst +g c2 x u i H6 a0 (H2 x H7))))) H5)) (\lambda (H5: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u (asucc g a1))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 +a1)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a1: A).(arity g d u (asucc g a1))))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a1: A).(arity g d2 u2 a1)))) (arity g c2 (TLRef i) a0) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H6: (getl i c2 (CHead x0 +(Bind Abbr) x1))).(\lambda (_: (csuba g d x0)).(\lambda (H8: (arity g d u +(asucc g x2))).(\lambda (H9: (arity g x0 x1 x2)).(arity_repl g c2 (TLRef i) +x2 (arity_abbr g c2 x0 x1 i H6 x2 H9) a0 (asucc_inj g x2 a0 (arity_mono g d u +(asucc g x2) H8 (asucc g a0) H1)))))))))) H5)) H4)))))))))))) (\lambda (b: +B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall +(c2: C).((csuba g c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda +(a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: +((\forall (c2: C).((csuba g (CHead c (Bind b) u) c2) \to (arity g c2 t0 +a2))))).(\lambda (c2: C).(\lambda (H5: (csuba g c c2)).(arity_bind g b H0 c2 +u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) u) (csuba_head g c c2 H5 (Bind +b) u)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: +A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: +C).((csuba g c c2) \to (arity g c2 u (asucc g a1)))))).(\lambda (t0: +T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 +a2)).(\lambda (H3: ((\forall (c2: C).((csuba g (CHead c (Bind Abst) u) c2) +\to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: (csuba g c +c2)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind Abst) u) +(csuba_head g c c2 H4 (Bind Abst) u)))))))))))))) (\lambda (c: C).(\lambda +(u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: +((\forall (c2: C).((csuba g c c2) \to (arity g c2 u a1))))).(\lambda (t0: +T).(\lambda (a2: A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: +((\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 (AHead a1 +a2)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c c2)).(arity_appl g c2 u a1 +(H1 c2 H4) t0 a2 (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: +((\forall (c2: C).((csuba g c c2) \to (arity g c2 u (asucc g +a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: +((\forall (c2: C).((csuba g c c2) \to (arity g c2 t0 a0))))).(\lambda (c2: +C).(\lambda (H4: (csuba g c c2)).(arity_cast g c2 u a0 (H1 c2 H4) t0 (H3 c2 +H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: +(arity g c t0 a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c c2) \to (arity +g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: +C).(\lambda (H3: (csuba g c c2)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 +H2)))))))))) c1 t a H))))). + +lemma csuba_arity_rev: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 +t a) \to (\forall (c2: C).((csuba g c2 c1) \to ((csubv c2 c1) \to (arity g c2 +t a)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 t0 +a0))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: +(csuba g c2 c)).(\lambda (_: (csubv c2 c)).(arity_sort g c2 n)))))) (\lambda +(c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl +i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u +a0)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 d) \to ((csubv c2 d) \to +(arity g c2 u a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2 +c)).(\lambda (H4: (csubv c2 c)).(let H_x \def (csuba_getl_abbr_rev g c d u i +H0 c2 H3) in (let H5 \def H_x in (or3_ind (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 +(asucc g a1))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d +u a1))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d)))) (arity +g c2 (TLRef i) a0) (\lambda (H6: (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)) +(arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H7: (getl i c2 (CHead x +(Bind Abbr) u))).(\lambda (H8: (csuba g x d)).(let H_x0 \def (csubv_getl_conf +c2 c H4 Abbr x u i H7) in (let H9 \def H_x0 in (ex2_3_ind B C T (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csubv x d2)))) (\lambda (b2: B).(\lambda +(d2: C).(\lambda (v2: T).(getl i c (CHead d2 (Bind b2) v2))))) (arity g c2 +(TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda +(H10: (csubv x x1)).(\lambda (H11: (getl i c (CHead x1 (Bind x0) x2))).(let +H12 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 +(CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x1 +(Bind x0) x2) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d +(Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) i +H0 (CHead x1 (Bind x0) x2) H11)) in ((let H14 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abbr) u) +i H0 (CHead x1 (Bind x0) x2) H11)) in ((let H15 \def (f_equal C T (\lambda +(e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow +t0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d +(Bind Abbr) u) i H0 (CHead x1 (Bind x0) x2) H11)) in (\lambda (H16: (eq B +Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda +(t0: T).(getl i c (CHead x1 (Bind x0) t0))) H12 u H15) in (let H19 \def +(eq_ind_r C x1 (\lambda (c0: C).(getl i c (CHead c0 (Bind x0) u))) H18 d H17) +in (let H20 \def (eq_ind_r C x1 (\lambda (c0: C).(csubv x c0)) H10 d H17) in +(let H21 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c (CHead d (Bind b) u))) +H19 Abbr H16) in (arity_abbr g c2 x u i H7 a0 (H2 x H8 H20))))))))) H14)) +H13)))))))) H9)))))) H6)) (\lambda (H6: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u +a1)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a1: A).(arity g d u a1)))) (arity g c2 (TLRef i) a0) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H7: (getl i c2 +(CHead x0 (Bind Abst) x1))).(\lambda (_: (csuba g x0 d)).(\lambda (H9: (arity +g x0 x1 (asucc g x2))).(\lambda (H10: (arity g d u x2)).(arity_repl g c2 +(TLRef i) x2 (arity_abst g c2 x0 x1 i H7 x2 H9) a0 (arity_mono g d u x2 H10 +a0 H1))))))))) H6)) (\lambda (H6: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl +i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H7: (getl i c2 (CHead x0 (Bind Void) x1))).(\lambda (_: (csuba g x0 d)).(let +H_x0 \def (csubv_getl_conf_void c2 c H4 x0 x1 i H7) in (let H9 \def H_x0 in +(ex2_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubv x0 d2))) (\lambda (d2: +C).(\lambda (v2: T).(getl i c (CHead d2 (Bind Void) v2)))) (arity g c2 (TLRef +i) a0) (\lambda (x2: C).(\lambda (x3: T).(\lambda (_: (csubv x0 x2)).(\lambda +(H11: (getl i c (CHead x2 (Bind Void) x3))).(let H12 \def (eq_ind C (CHead d +(Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x2 (Bind Void) x3) +(getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x2 (Bind Void) x3) H11)) in +(let H13 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with +[(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow +False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead +x2 (Bind Void) x3) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead x2 (Bind +Void) x3) H11)) in (False_ind (arity g c2 (TLRef i) a0) H13))))))) H9))))))) +H6)) H5)))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) +u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: +((\forall (c2: C).((csuba g c2 d) \to ((csubv c2 d) \to (arity g c2 u (asucc +g a0))))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(\lambda (H4: +(csubv c2 c)).(let H_x \def (csuba_getl_abst_rev g c d u i H0 c2 H3) in (let +H5 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d)))) (arity g c2 (TLRef i) a0) (\lambda (H6: +(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d)) (arity g c2 (TLRef i) a0) +(\lambda (x: C).(\lambda (H7: (getl i c2 (CHead x (Bind Abst) u))).(\lambda +(H8: (csuba g x d)).(let H_x0 \def (csubv_getl_conf c2 c H4 Abst x u i H7) in +(let H9 \def H_x0 in (ex2_3_ind B C T (\lambda (_: B).(\lambda (d2: +C).(\lambda (_: T).(csubv x d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda +(v2: T).(getl i c (CHead d2 (Bind b2) v2))))) (arity g c2 (TLRef i) a0) +(\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H10: (csubv x +x1)).(\lambda (H11: (getl i c (CHead x1 (Bind x0) x2))).(let H12 \def (eq_ind +C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x1 (Bind +x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x1 (Bind x0) x2) +H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abst) u) +(CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x1 +(Bind x0) x2) H11)) in ((let H14 \def (f_equal C B (\lambda (e: C).(match e +with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with +[(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) +u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead +x1 (Bind x0) x2) H11)) in ((let H15 \def (f_equal C T (\lambda (e: C).(match +e with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d +(Bind Abst) u) (CHead x1 (Bind x0) x2) (getl_mono c (CHead d (Bind Abst) u) i +H0 (CHead x1 (Bind x0) x2) H11)) in (\lambda (H16: (eq B Abst x0)).(\lambda +(H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t0: T).(getl i c +(CHead x1 (Bind x0) t0))) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda +(c0: C).(getl i c (CHead c0 (Bind x0) u))) H18 d H17) in (let H20 \def +(eq_ind_r C x1 (\lambda (c0: C).(csubv x c0)) H10 d H17) in (let H21 \def +(eq_ind_r B x0 (\lambda (b: B).(getl i c (CHead d (Bind b) u))) H19 Abst H16) +in (arity_abst g c2 x u i H7 a0 (H2 x H8 H20))))))))) H14)) H13)))))))) +H9)))))) H6)) (\lambda (H6: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl +i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H7: (getl i c2 (CHead x0 (Bind Void) x1))).(\lambda (_: (csuba g x0 d)).(let +H_x0 \def (csubv_getl_conf_void c2 c H4 x0 x1 i H7) in (let H9 \def H_x0 in +(ex2_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubv x0 d2))) (\lambda (d2: +C).(\lambda (v2: T).(getl i c (CHead d2 (Bind Void) v2)))) (arity g c2 (TLRef +i) a0) (\lambda (x2: C).(\lambda (x3: T).(\lambda (_: (csubv x0 x2)).(\lambda +(H11: (getl i c (CHead x2 (Bind Void) x3))).(let H12 \def (eq_ind C (CHead d +(Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead x2 (Bind Void) x3) +(getl_mono c (CHead d (Bind Abst) u) i H0 (CHead x2 (Bind Void) x3) H11)) in +(let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with +[(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst +\Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) +I (CHead x2 (Bind Void) x3) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead +x2 (Bind Void) x3) H11)) in (False_ind (arity g c2 (TLRef i) a0) H13))))))) +H9))))))) H6)) H5)))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b +Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity +g c u a1)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) +\to (arity g c2 u a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: +(arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((csuba +g c2 (CHead c (Bind b) u)) \to ((csubv c2 (CHead c (Bind b) u)) \to (arity g +c2 t0 a2)))))).(\lambda (c2: C).(\lambda (H5: (csuba g c2 c)).(\lambda (H6: +(csubv c2 c)).(arity_bind g b H0 c2 u a1 (H2 c2 H5 H6) t0 a2 (H4 (CHead c2 +(Bind b) u) (csuba_head g c2 c H5 (Bind b) u) (csubv_bind_same c2 c H6 b u +u))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda +(_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: C).((csuba g c2 +c) \to ((csubv c2 c) \to (arity g c2 u (asucc g a1))))))).(\lambda (t0: +T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 +a2)).(\lambda (H3: ((\forall (c2: C).((csuba g c2 (CHead c (Bind Abst) u)) +\to ((csubv c2 (CHead c (Bind Abst) u)) \to (arity g c2 t0 a2)))))).(\lambda +(c2: C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv c2 c)).(arity_head +g c2 u a1 (H1 c2 H4 H5) t0 a2 (H3 (CHead c2 (Bind Abst) u) (csuba_head g c2 c +H4 (Bind Abst) u) (csubv_bind_same c2 c H5 Abst u u))))))))))))))) (\lambda +(c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u +a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to +(arity g c2 u a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity +g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c2: C).((csuba g c2 c) \to +((csubv c2 c) \to (arity g c2 t0 (AHead a1 a2))))))).(\lambda (c2: +C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv c2 c)).(arity_appl g c2 +u a1 (H1 c2 H4 H5) t0 a2 (H3 c2 H4 H5)))))))))))))) (\lambda (c: C).(\lambda +(u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda +(H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 u +(asucc g a0))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda +(H3: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to (arity g c2 t0 +a0)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c2 c)).(\lambda (H5: (csubv +c2 c)).(arity_cast g c2 u a0 (H1 c2 H4 H5) t0 (H3 c2 H4 H5))))))))))))) +(\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c t0 +a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to ((csubv c2 c) \to +(arity g c2 t0 a1)))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 +a2)).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(\lambda (H4: (csubv c2 +c)).(arity_repl g c2 t0 a1 (H1 c2 H3 H4) a2 H2))))))))))) c1 t a H))))). + +theorem arity_appls_appl: + \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (a1: A).((arity g c +v a1) \to (\forall (u: T).((arity g c u (asucc g a1)) \to (\forall (t: +T).(\forall (vs: TList).(\forall (a2: A).((arity g c (THeads (Flat Appl) vs +(THead (Bind Abbr) v t)) a2) \to (arity g c (THeads (Flat Appl) vs (THead +(Flat Appl) v (THead (Bind Abst) u t))) a2))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (v: T).(\lambda (a1: A).(\lambda (H: +(arity g c v a1)).(\lambda (u: T).(\lambda (H0: (arity g c u (asucc g +a1))).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: +TList).(\forall (a2: A).((arity g c (THeads (Flat Appl) t0 (THead (Bind Abbr) +v t)) a2) \to (arity g c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead +(Bind Abst) u t))) a2)))) (\lambda (a2: A).(\lambda (H1: (arity g c (THead +(Bind Abbr) v t) a2)).(let H_x \def (arity_gen_bind Abbr not_abbr_abst g c v +t a2 H1) in (let H2 \def H_x in (ex2_ind A (\lambda (a3: A).(arity g c v a3)) +(\lambda (_: A).(arity g (CHead c (Bind Abbr) v) t a2)) (arity g c (THead +(Flat Appl) v (THead (Bind Abst) u t)) a2) (\lambda (x: A).(\lambda (_: +(arity g c v x)).(\lambda (H4: (arity g (CHead c (Bind Abbr) v) t +a2)).(arity_appl g c v a1 H (THead (Bind Abst) u t) a2 (arity_head g c u a1 +H0 t a2 (csuba_arity_rev g (CHead c (Bind Abbr) v) t a2 H4 (CHead c (Bind +Abst) u) (csuba_abst g c c (csuba_refl g c) u a1 H0 v H) (csubv_bind c c +(csubv_refl c) Abst not_abst_void Abbr u v))))))) H2))))) (\lambda (t0: +T).(\lambda (t1: TList).(\lambda (H1: ((\forall (a2: A).((arity g c (THeads +(Flat Appl) t1 (THead (Bind Abbr) v t)) a2) \to (arity g c (THeads (Flat +Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u t))) a2))))).(\lambda (a2: +A).(\lambda (H2: (arity g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(THead (Bind Abbr) v t))) a2)).(let H3 \def (arity_gen_appl g c t0 (THeads +(Flat Appl) t1 (THead (Bind Abbr) v t)) a2 H2) in (ex2_ind A (\lambda (a3: +A).(arity g c t0 a3)) (\lambda (a3: A).(arity g c (THeads (Flat Appl) t1 +(THead (Bind Abbr) v t)) (AHead a3 a2))) (arity g c (THead (Flat Appl) t0 +(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u t)))) a2) +(\lambda (x: A).(\lambda (H4: (arity g c t0 x)).(\lambda (H5: (arity g c +(THeads (Flat Appl) t1 (THead (Bind Abbr) v t)) (AHead x a2))).(arity_appl g +c t0 x H4 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind Abst) u +t))) a2 (H1 (AHead x a2) H5))))) H3))))))) vs))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csuba/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/clear.ma new file mode 100644 index 000000000..69f9d2f08 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/clear.ma @@ -0,0 +1,122 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csuba/fwd.ma". + +include "basic_1A/clear/fwd.ma". + +lemma csuba_clear_conf: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to +(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) +(\lambda (e2: C).(clear c2 e2)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c1 +c2)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c +e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c0 +e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) +e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e1 e2)) +(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 +e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 +e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: +(clear (CHead c3 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c3 k0 u) +e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear +(CHead c4 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c3 (Bind +b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind b) u) e2)) (\lambda +(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csuba_head g +c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3)))) +(\lambda (f: F).(\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def +(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g +e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csuba g e1 +e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: +C).(\lambda (H5: (csuba g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C +(\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) +u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: +C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda +(e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: +(clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) +(\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) (\lambda (e2: +C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba +g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) +u2) e2)) (CHead c4 (Bind b) u2) (csuba_void g c3 c4 H0 b H2 u1 u2) +(clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: +((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) +(\lambda (e2: C).(clear c4 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda +(H2: (arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u +a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c3 (Bind Abst) t) +e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) +e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind Abst) t) e2)) +(\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) +u) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abbr c4 u)) e1 +(clear_gen_bind Abst c3 e1 t H4))))))))))))) c1 c2 H)))). + +lemma csuba_clear_trans: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c2 c1) \to +(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) +(\lambda (e2: C).(clear c2 e2)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c2 +c1)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear +c0 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c +e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) +e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e2 e1)) +(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c4 +e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c3 +e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: +(clear (CHead c4 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c4 k0 u) +e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear +(CHead c3 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c4 (Bind +b) u) e1)).(eq_ind_r C (CHead c4 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind b) u))) (\lambda +(e2: C).(clear (CHead c3 (Bind b) u) e2)) (CHead c3 (Bind b) u) (csuba_head g +c3 c4 H0 (Bind b) u) (clear_bind b c3 u)) e1 (clear_gen_bind b c4 e1 u H3)))) +(\lambda (f: F).(\lambda (H3: (clear (CHead c4 (Flat f) u) e1)).(let H4 \def +(H1 e1 (clear_gen_flat f c4 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g +e2 e1)) (\lambda (e2: C).(clear c3 e2)) (ex2 C (\lambda (e2: C).(csuba g e2 +e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) u) e2))) (\lambda (x: +C).(\lambda (H5: (csuba g x e1)).(\lambda (H6: (clear c3 x)).(ex_intro2 C +(\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) +u) e2)) x H5 (clear_flat c3 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: +C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda +(e2: C).(clear c3 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: +(clear (CHead c4 (Bind b) u2) e1)).(eq_ind_r C (CHead c4 (Bind b) u2) +(\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g e2 c)) (\lambda (e2: +C).(clear (CHead c3 (Bind Void) u1) e2)))) (ex_intro2 C (\lambda (e2: +C).(csuba g e2 (CHead c4 (Bind b) u2))) (\lambda (e2: C).(clear (CHead c3 +(Bind Void) u1) e2)) (CHead c3 (Bind Void) u1) (csuba_void g c3 c4 H0 b H2 u1 +u2) (clear_bind Void c3 u1)) e1 (clear_gen_bind b c4 e1 u2 H3)))))))))))) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: +((\forall (e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) +(\lambda (e2: C).(clear c3 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda +(H2: (arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u +a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c4 (Bind Abbr) u) +e1)).(eq_ind_r C (CHead c4 (Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) +e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind Abbr) u))) +(\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) e2)) (CHead c3 (Bind Abst) +t) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abst c3 t)) e1 +(clear_gen_bind Abbr c4 e1 u H4))))))))))))) c2 c1 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csuba/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/defs.ma new file mode 100644 index 000000000..59c2c7149 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/defs.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/arity/defs.ma". + +inductive csuba (g: G): C \to (C \to Prop) \def +| csuba_sort: \forall (n: nat).(csuba g (CSort n) (CSort n)) +| csuba_head: \forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall +(k: K).(\forall (u: T).(csuba g (CHead c1 k u) (CHead c2 k u)))))) +| csuba_void: \forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall +(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csuba g +(CHead c1 (Bind Void) u1) (CHead c2 (Bind b) u2)))))))) +| csuba_abst: \forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall +(t: T).(\forall (a: A).((arity g c1 t (asucc g a)) \to (\forall (u: +T).((arity g c2 u a) \to (csuba g (CHead c1 (Bind Abst) t) (CHead c2 (Bind +Abbr) u))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csuba/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/drop.ma new file mode 100644 index 000000000..74b30cec6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/drop.ma @@ -0,0 +1,2453 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csuba/fwd.ma". + +include "basic_1A/drop/fwd.ma". + +lemma csuba_drop_abbr: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i +O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g +c1 c2) \to (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: +G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))))) +(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 +(CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: +(csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 +(CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H)) in +(let H_x \def (csuba_gen_abbr g d1 c2 u H1) in (let H2 \def H_x in (ex2_ind C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba +g d1 d2)) (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H3: (eq C c2 +(CHead x (Bind Abbr) u))).(\lambda (H4: (csuba g d1 x)).(eq_ind_r C (CHead x +(Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (ex_intro2 C (\lambda +(d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abbr) u)) H4) c2 H3)))) +H2))))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: +C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: +G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2)))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: +C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) \to (\forall +(g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: C).(drop (S +n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))) +(\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) +O (CSort n0) (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: +C).(\lambda (_: (csuba g (CSort n0) c2)).(and3_ind (eq C (CHead d1 (Bind +Abbr) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u) (CSort n0))).(\lambda (H3: +(eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n) +(\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H3) in (False_ind (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead +d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H5))))) (drop_gen_sort +n0 (S n) O (CHead d1 (Bind Abbr) u) H0))))))))) (\lambda (c: C).(\lambda (H0: +((\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) +\to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u: +T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abbr) +u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) +c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) +O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (b: +B).(\lambda (H3: (csuba g (CHead c (Bind b) t) c2)).(\lambda (H4: (drop (r +(Bind b) n) O c (CHead d1 (Bind Abbr) u))).(B_ind (\lambda (b0: B).((csuba g +(CHead c (Bind b0) t) c2) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind +Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) +u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H5: (csuba g (CHead c +(Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 (Bind +Abbr) u))).(let H_x \def (csuba_gen_abbr g c c2 t H5) in (let H7 \def H_x in +(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: +C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H8: +(eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C +(CHead x (Bind Abbr) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) +O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 +\def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead +d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead +x0 (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x0)).(let H13 \def (refl_equal +nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: +nat).(drop n0 O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) +n x (CHead x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) +(\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda (H6: (drop (r +(Bind Abst) n) O c (CHead d1 (Bind Abbr) u))).(let H_x \def (csuba_gen_abst g +c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 +(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq +C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba +g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H9: (eq C c2 +(CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x +(Bind Abst) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H11 \def +(H c d1 u H6 g x H10) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead +x0 (Bind Abbr) u))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal +nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: +nat).(drop n0 O x (CHead x0 (Bind Abbr) u))) H12 (r (Bind Abbr) n) H14) in +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) +n x (CHead x0 (Bind Abbr) u) H15 t) H13)))))) H11)) c2 H9)))) H8)) (\lambda +(H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g +c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity +g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 a)))) (ex2 C (\lambda (d2: C).(drop (S n) O +c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 +(Bind Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t +(asucc g x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind +Abbr) x1) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H13 \def (H c d1 u +H6 g x0 H10) in (ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S +n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H14: (drop n O x0 (CHead x +(Bind Abbr) u))).(\lambda (H15: (csuba g d1 x)).(let H16 \def (refl_equal nat +(r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 +O x0 (CHead x (Bind Abbr) u))) H14 (r (Bind Abbr) n) H16) in (ex_intro2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 +(CHead x (Bind Abbr) u) H17 x1) H15)))))) H13)) c2 H9)))))))) H8)) H7))))) +(\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r +(Bind Void) n) O c (CHead d1 (Bind Abbr) u))).(let H_x \def (csuba_gen_void g +c c2 t H5) in (let H7 \def H_x in (ex2_3_ind B C T (\lambda (b0: B).(\lambda +(d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b0) u2))))) (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csuba g c d2)))) (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H8: (eq C +c2 (CHead x1 (Bind x0) x2))).(\lambda (H9: (csuba g c x1)).(eq_ind_r C (CHead +x1 (Bind x0) x2) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def +(H c d1 u H6 g x1 H9) in (ex2_ind C (\lambda (d2: C).(drop n O x1 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H11: (drop n O x1 (CHead +x (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x)).(let H13 \def (refl_equal +nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: +nat).(drop n0 O x1 (CHead x (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind x0) n +x1 (CHead x (Bind Abbr) u) H14 x2) H12)))))) H10)) c2 H8)))))) H7))))) b H3 +H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) +c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) u))).(let +H_x \def (csuba_gen_flat g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T +(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g c d2))) (ex2 C (\lambda (d2: C).(drop (S n) +O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) +x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) x1) +(\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H8 \def (H0 d1 u H4 g x0 +H7) in (ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) +u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g +d1 d2))) (\lambda (x: C).(\lambda (H9: (drop (S n) O x0 (CHead x (Bind Abbr) +u))).(\lambda (H10: (csuba g d1 x)).(ex_intro2 C (\lambda (d2: C).(drop (S n) +O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g +d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abbr) u) H9 x1) H10)))) +H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u) t n +H1)))))))))))) c1)))) i). + +lemma csuba_drop_abst: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop i +O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba +g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: +G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop n +O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: +T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abst) u1))).(\lambda (g: +G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 +(\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abst) u1) (drop_gen_refl +c1 (CHead d1 (Bind Abst) u1) H)) in (let H_x \def (csuba_gen_abst g d1 c2 u1 +H1) in (let H2 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H3: +(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O +O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x +(Bind Abst) u1))).(\lambda (H5: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind +Abst) u1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) +u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind +Abst) u1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abst) u1)) H5)) c2 +H4)))) H3)) (\lambda (H3: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind +Abbr) x1))).(\lambda (H5: (csuba g d1 x0)).(\lambda (H6: (arity g d1 u1 +(asucc g x2))).(\lambda (H7: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind +Abbr) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abbr) +x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind +Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))) x0 x1 x2 (drop_refl (CHead x0 (Bind Abbr) x1)) H5 H6 +H7)) c2 H4)))))))) H3)) H2))))))))))) (\lambda (n: nat).(\lambda (H: +((\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 +(Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to +(or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: +C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall +(g: G).(\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop +(S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a))))))))))))) (\lambda (n0: nat).(\lambda (d1: +C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind +Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g (CSort n0) +c2)).(and3_ind (eq C (CHead d1 (Bind Abst) u1) (CSort n0)) (eq nat (S n) O) +(eq nat O O) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (_: (eq C (CHead d1 (Bind Abst) u1) (CSort n0))).(\lambda +(H3: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S +n) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H3) in (False_ind (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))) H5))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u1) +H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u1: +T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall +(c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda +(u1: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abst) +u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) +c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) +O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O +c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead +d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a))))))))) (\lambda (b: B).(\lambda (H3: (csuba g (CHead c +(Bind b) t) c2)).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abst) +u1))).(B_ind (\lambda (b0: B).((csuba g (CHead c (Bind b0) t) c2) \to ((drop +(r (Bind b0) n) O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (H5: (csuba g +(CHead c (Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead +d1 (Bind Abst) u1))).(let H_x \def (csuba_gen_abbr g c c2 t H5) in (let H7 +\def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) +(\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) +t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) +(\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda (d2: +C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead +x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def +(refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda +(n0: nat).(drop n0 O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) +in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abst) +u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: +(drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H13: (csuba g d1 +x0)).(\lambda (H14: (arity g d1 u1 (asucc g x2))).(\lambda (H15: (arity g x0 +x1 x2)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def +(eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) x1))) H12 +(r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g +d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop +(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abbr) +n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 +H8)))) H7))))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda +(H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) u1))).(let H_x \def +(csuba_gen_abst g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C (\lambda +(d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g +c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity +g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) +t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 +(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: +C).(\lambda (H9: (eq C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c +x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H11 \def (H c d1 u1 H6 g +x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C +(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: +C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H14: +(csuba g d1 x0)).(let H15 \def (refl_equal nat (r (Bind Abbr) n)) in (let H16 +\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) +u1))) H13 (r (Bind Abbr) n) H15) in (or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) +n x (CHead x0 (Bind Abst) u1) H16 t) H14))))))) H12)) (\lambda (H12: (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: +(drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H14: (csuba g d1 +x0)).(\lambda (H15: (arity g d1 u1 (asucc g x2))).(\lambda (H16: (arity g x0 +x1 x2)).(let H17 \def (refl_equal nat (r (Bind Abbr) n)) in (let H18 \def +(eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) x1))) H13 +(r (Bind Abbr) n) H17) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g +d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop +(S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abst) +n x (CHead x0 (Bind Abbr) x1) H18 t) H14 H15 H16))))))))))) H12)) H11)) c2 +H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind +Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t (asucc g +x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) +(\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in (or_ind (ex2 C (\lambda +(d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead +x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H15: (drop n O x0 (CHead +x (Bind Abst) u1))).(\lambda (H16: (csuba g d1 x)).(let H17 \def (refl_equal +nat (r (Bind Abbr) n)) in (let H18 \def (eq_ind nat n (\lambda (n0: +nat).(drop n0 O x0 (CHead x (Bind Abst) u1))) H15 (r (Bind Abbr) n) H17) in +(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 (CHead x +(Bind Abst) u1) H18 x1) H16))))))) H14)) (\lambda (H14: (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H15: +(drop n O x0 (CHead x3 (Bind Abbr) x4))).(\lambda (H16: (csuba g d1 +x3)).(\lambda (H17: (arity g d1 u1 (asucc g x5))).(\lambda (H18: (arity g x3 +x4 x5)).(let H19 \def (refl_equal nat (r (Bind Abbr) n)) in (let H20 \def +(eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x3 (Bind Abbr) x4))) +H15 (r (Bind Abbr) n) H19) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) +O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 +(drop_drop (Bind Abbr) n x0 (CHead x3 (Bind Abbr) x4) H20 x1) H16 H17 +H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g +(CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead +d1 (Bind Abst) u1))).(let H_x \def (csuba_gen_void g c c2 t H5) in (let H7 +\def H_x in (ex2_3_ind B C T (\lambda (b0: B).(\lambda (d2: C).(\lambda (u2: +T).(eq C c2 (CHead d2 (Bind b0) u2))))) (\lambda (_: B).(\lambda (d2: +C).(\lambda (_: T).(csuba g c d2)))) (or (ex2 C (\lambda (d2: C).(drop (S n) +O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead +d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (H8: (eq C c2 (CHead x1 (Bind x0) x2))).(\lambda (H9: (csuba g c +x1)).(eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c0: C).(or (ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g +x1 H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x1 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x1 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x1 (Bind x0) x2) +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x1 +(Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H11: (ex2 C (\lambda +(d2: C).(drop n O x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x1 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g +d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop +(S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: +C).(\lambda (H12: (drop n O x1 (CHead x (Bind Abst) u1))).(\lambda (H13: +(csuba g d1 x)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 +\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x1 (CHead x (Bind Abst) +u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind x0) n +x1 (CHead x (Bind Abst) u1) H15 x2) H13))))))) H11)) (\lambda (H11: (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x1 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H12: +(drop n O x1 (CHead x3 (Bind Abbr) x4))).(\lambda (H13: (csuba g d1 +x3)).(\lambda (H14: (arity g d1 u1 (asucc g x5))).(\lambda (H15: (arity g x3 +x4 x5)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def +(eq_ind nat n (\lambda (n0: nat).(drop n0 O x1 (CHead x3 (Bind Abbr) x4))) +H12 (r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) +O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x1 (Bind x0) x2) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 +(drop_drop (Bind x0) n x1 (CHead x3 (Bind Abbr) x4) H17 x2) H13 H14 +H15))))))))))) H11)) H10)) c2 H8)))))) H7))))) b H3 H4)))) (\lambda (f: +F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda (H4: (drop (r +(Flat f) n) O c (CHead d1 (Bind Abst) u1))).(let H_x \def (csuba_gen_flat g c +c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T (\lambda (d2: C).(\lambda +(u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g c d2))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 +(Flat f) x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) +x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))) (let H8 \def (H0 d1 u1 H4 g x0 H7) in (or_ind (ex2 C (\lambda (d2: +C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda +(d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H10: +(drop (S n) O x0 (CHead x (Bind Abst) u1))).(\lambda (H11: (csuba g d1 +x)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u1) +H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H10: +(drop (S n) O x0 (CHead x2 (Bind Abbr) x3))).(\lambda (H11: (csuba g d1 +x2)).(\lambda (H12: (arity g d1 u1 (asucc g x4))).(\lambda (H13: (arity g x2 +x3 x4)).(or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) +x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind +Abbr) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5)))))) k H2 +(drop_gen_drop k c (CHead d1 (Bind Abst) u1) t n H1)))))))))))) c1)))) i). + +lemma csuba_drop_abst_rev: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i +O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g +c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abst) u)) \to (\forall (g: +G).(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(drop n +O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop n O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))))) (\lambda (c1: +C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 (CHead d1 (Bind +Abst) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c2 +c1)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c2 c)) H0 (CHead d1 +(Bind Abst) u) (drop_gen_refl c1 (CHead d1 (Bind Abst) u) H)) in (let H_x +\def (csuba_gen_abst_rev g d1 c2 u H1) in (let H2 \def H_x in (or_ind (ex2 C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba +g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or +(ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (H3: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C +(\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) +u))).(\lambda (H5: (csuba g x d1)).(eq_ind_r C (CHead x (Bind Abst) u) +(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O +(CHead x (Bind Abst) u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g +d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x +(Bind Abst) u) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind +Abst) u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x +(drop_refl (CHead x (Bind Abst) u)) H5)) c2 H4)))) H3)) (\lambda (H3: (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda +(d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop O O c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop O O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind Void) +x1))).(\lambda (H5: (csuba g x0 d1)).(eq_ind_r C (CHead x0 (Bind Void) x1) +(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O +(CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba +g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x0 +(Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop O O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_refl (CHead x0 (Bind +Void) x1)) H5)) c2 H4))))) H3)) H2))))))))))) (\lambda (n: nat).(\lambda (H: +((\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 +(Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c1) \to (or +(ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: +C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abst) u)) \to (\forall +(g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop +(S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) +(\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) +O (CSort n0) (CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: +C).(\lambda (_: (csuba g c2 (CSort n0))).(and3_ind (eq C (CHead d1 (Bind +Abst) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (or (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) +(\lambda (_: (eq C (CHead d1 (Bind Abst) u) (CSort n0))).(\lambda (H3: (eq +nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n) +(\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H3) in (False_ind (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) H5))))) +(drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u) H0))))))))) (\lambda (c: +C).(\lambda (H0: ((\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 +(Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c) \to (or +(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda +(d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop +(S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: +C).(\lambda (u: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind +Abst) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g c2 (CHead +c k t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead c k0 t)) \to ((drop (r +k0 n) O c (CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(drop (S +n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (b: +B).(\lambda (H3: (csuba g c2 (CHead c (Bind b) t))).(\lambda (H4: (drop (r +(Bind b) n) O c (CHead d1 (Bind Abst) u))).(B_ind (\lambda (b0: B).((csuba g +c2 (CHead c (Bind b0) t)) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind +Abst) u)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (H5: (csuba g c2 +(CHead c (Bind Abbr) t))).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 +(Bind Abst) u))).(let H_x \def (csuba_gen_abbr_rev g c c2 t H5) in (let H7 +\def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) +t))) (\lambda (d2: C).(csuba g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 c)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) +(\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) +(\lambda (d2: C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 +(CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) +O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind Abbr) +t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C (CHead x (Bind Abbr) t) +(\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H11 \def (H c d1 u H6 g x +H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind +Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba +g d2 d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: +C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) +(or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x0: C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) u))).(\lambda (H14: +(csuba g x0 d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind +Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba +g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) +t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop +(Bind Abbr) n x (CHead x0 (Bind Abst) u) H13 t) H14))))) H12)) (\lambda (H12: +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind +C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or (ex2 C (\lambda +(d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead x0 (Bind Void) +x1))).(\lambda (H14: (csuba g x0 d1)).(or_intror (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u))) (\lambda +(d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop +(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 +(drop_drop (Bind Abbr) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) +H11)) c2 H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc +g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) +(or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: +A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g +x0 c)).(\lambda (_: (arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t +x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) (\lambda (c0: C).(or (ex2 C +(\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) +O c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1)))))) (let H13 \def (H c d1 u H6 g x0 H10) in (or_ind (ex2 C (\lambda +(d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x: C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H16: +(csuba g x d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 +(Bind Abst) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind +Abst) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 +(Bind Abst) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) +x (drop_drop (Bind Abst) n x0 (CHead x (Bind Abst) u) H15 x1) H16))))) H14)) +(\lambda (H14: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x3: C).(\lambda (x4: T).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Void) +x4))).(\lambda (H16: (csuba g x3 d1)).(or_intror (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda +(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x3 x4 +(drop_drop (Bind Abst) n x0 (CHead x3 (Bind Void) x4) H15 x1) H16)))))) H14)) +H13)) c2 H9)))))))) H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +c))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H9: +(eq C c2 (CHead x0 (Bind Void) x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r +C (CHead x0 (Bind Void) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: +C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let +H11 \def (H c d1 u H6 g x0 H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O +x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H12: (ex2 C +(\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda +(H13: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H14: (csuba g x +d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) +x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop +(Bind Void) n x0 (CHead x (Bind Abst) u) H13 x1) H14))))) H12)) (\lambda +(H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) +x3))).(\lambda (H14: (csuba g x2 d1)).(or_intror (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda +(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 +(drop_drop (Bind Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) +H11)) c2 H9))))) H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abst) +t))).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) +u))).(let H_x \def (csuba_gen_abst_rev g c c2 t H5) in (let H7 \def H_x in +(or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda +(d2: C).(csuba g d2 c))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +c)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 +(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g d2 c)))).(ex2_ind C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba +g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq C c2 +(CHead x (Bind Abst) t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C (CHead x +(Bind Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H11 \def (H +c d1 u H6 g x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) +O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba +g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C +(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x0: C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) +u))).(\lambda (H14: (csuba g x0 d1)).(or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) +O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S +n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abst) u) +H13 t) H14))))) H12)) (\lambda (H12: (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Abst) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead +x0 (Bind Void) x1))).(\lambda (H14: (csuba g x0 d1)).(or_intror (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda +(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 +(drop_drop (Bind Abst) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) +H11)) c2 H9)))) H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +c))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H9: +(eq C c2 (CHead x0 (Bind Void) x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r +C (CHead x0 (Bind Void) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: +C).(drop (S n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let +H11 \def (H c d1 u H6 g x0 H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O +x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H12: (ex2 C +(\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda +(H13: (drop n O x0 (CHead x (Bind Abst) u))).(\lambda (H14: (csuba g x +d1)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) +x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop +(Bind Void) n x0 (CHead x (Bind Abst) u) H13 x1) H14))))) H12)) (\lambda +(H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x0 (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) +x3))).(\lambda (H14: (csuba g x2 d1)).(or_intror (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda +(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 +(drop_drop (Bind Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) +H11)) c2 H9))))) H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Void) +t))).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abst) +u))).(let H_x \def (csuba_gen_void_rev g c c2 t H5) in (let H7 \def H_x in +(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: +C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H8: (eq +C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C +(CHead x (Bind Void) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S +n) O c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H10 \def (H +c d1 u H6 g x H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) +O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba +g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x (Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C +(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) +u))).(\lambda (H13: (csuba g x0 d1)).(or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) +O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S +n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abst) u) +H12 t) H13))))) H11)) (\lambda (H11: (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Void) t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H12: (drop n O x (CHead +x0 (Bind Void) x1))).(\lambda (H13: (csuba g x0 d1)).(or_intror (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda +(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 +(drop_drop (Bind Void) n x (CHead x0 (Bind Void) x1) H12 t) H13)))))) H11)) +H10)) c2 H8)))) H7))))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g c2 +(CHead c (Flat f) t))).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind +Abst) u))).(let H_x \def (csuba_gen_flat_rev g c c2 t f H3) in (let H5 \def +H_x in (ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 +(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c))) (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) +O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 +(Flat f) x1))).(\lambda (H7: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Flat f) +x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H8 \def (H0 d1 u H4 g x0 +H7) in (or_ind (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(drop (S n) +O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g +d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 +(Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S n) O x0 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C +(\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat +f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C +T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abst) +u))).(\lambda (H11: (csuba g x d1)).(or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) +O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S +n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u) H10 +x1) H11))))) H9)) (\lambda (H9: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 +(Flat f) x1) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) +x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (drop (S n) O x0 +(CHead x2 (Bind Void) x3))).(\lambda (H11: (csuba g x2 d1)).(or_intror (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda +(d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 +(drop_drop (Flat f) n x0 (CHead x2 (Bind Void) x3) H10 x1) H11)))))) H9)) +H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u) t n +H1)))))))))))) c1)))) i). + +lemma csuba_drop_abbr_rev: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop i +O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba +g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: +G).(\forall (c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(drop n +O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda +(H: (drop O O c1 (CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: +C).(\lambda (H0: (csuba g c2 c1)).(let H1 \def (eq_ind C c1 (\lambda (c: +C).(csuba g c2 c)) H0 (CHead d1 (Bind Abbr) u1) (drop_gen_refl c1 (CHead d1 +(Bind Abbr) u1) H)) in (let H_x \def (csuba_gen_abbr_rev g d1 c2 u1 H1) in +(let H2 \def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O +O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop O O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H3: (ex2 C (\lambda (d2: C).(eq C c2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda +(d2: C).(eq C c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1)) (or3 (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop O O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda +(H4: (eq C c2 (CHead x (Bind Abbr) u1))).(\lambda (H5: (csuba g x +d1)).(eq_ind_r C (CHead x (Bind Abbr) u1) (\lambda (c: C).(or3 (ex2 C +(\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop O O c (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))))) (or3_intro0 (ex2 C (\lambda (d2: +C).(drop O O (CHead x (Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop O O (CHead x (Bind Abbr) u1) (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x (Bind Abbr) +u1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) u1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_refl +(CHead x (Bind Abbr) u1)) H5)) c2 H4)))) H3)) (\lambda (H3: (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O +O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop O O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: +A).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abst) x1))).(\lambda (H5: (csuba g +x0 d1)).(\lambda (H6: (arity g x0 x1 (asucc g x2))).(\lambda (H7: (arity g d1 +u1 x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) (\lambda (c: C).(or3 (ex2 C +(\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop O O c (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop O O c (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))))) (or3_intro1 (ex2 C (\lambda (d2: +C).(drop O O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x0 (Bind Abst) +x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop O O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 +(drop_refl (CHead x0 (Bind Abst) x1)) H5 H6 H7)) c2 H4)))))))) H3)) (\lambda +(H3: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind +C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O +O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop O O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H4: (eq C +c2 (CHead x0 (Bind Void) x1))).(\lambda (H5: (csuba g x0 d1)).(eq_ind_r C +(CHead x0 (Bind Void) x1) (\lambda (c: C).(or3 (ex2 C (\lambda (d2: C).(drop +O O c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop O O c (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) +(or3_intro2 (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind +Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop O O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T +(\lambda (d2: C).(\lambda (u2: T).(drop O O (CHead x0 (Bind Void) x1) (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 +x1 (drop_refl (CHead x0 (Bind Void) x1)) H5)) c2 H4))))) H3)) H2))))))))))) +(\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).(\forall +(u1: T).((drop n O c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (g: G).(\forall +(c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(drop n O c2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: +C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to (\forall +(g: G).(\forall (c2: C).((csuba g c2 c) \to (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) (\lambda (n0: +nat).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) +(CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: +(csuba g c2 (CSort n0))).(and3_ind (eq C (CHead d1 (Bind Abbr) u1) (CSort +n0)) (eq nat (S n) O) (eq nat O O) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O +c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u1) +(CSort n0))).(\lambda (H3: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let +H5 \def (eq_ind nat (S n) (\lambda (ee: nat).(match ee with [O \Rightarrow +False | (S _) \Rightarrow True])) I O H3) in (False_ind (or3 (ex2 C (\lambda +(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) H5))))) (drop_gen_sort n0 (S n) O +(CHead d1 (Bind Abbr) u1) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall +(d1: C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to +(\forall (g: G).(\forall (c2: C).((csuba g c2 c) \to (or3 (ex2 C (\lambda +(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H1: (drop (S n) O (CHead c +k t) (CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda +(H2: (csuba g c2 (CHead c k t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead +c k0 t)) \to ((drop (r k0 n) O c (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (b: +B).(\lambda (H3: (csuba g c2 (CHead c (Bind b) t))).(\lambda (H4: (drop (r +(Bind b) n) O c (CHead d1 (Bind Abbr) u1))).(B_ind (\lambda (b0: B).((csuba g +c2 (CHead c (Bind b0) t)) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind +Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda +(H5: (csuba g c2 (CHead c (Bind Abbr) t))).(\lambda (H6: (drop (r (Bind Abbr) +n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_abbr_rev g c c2 t +H5) in (let H7 \def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead +d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g d2 c))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c)))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H8: +(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: +C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq +C c2 (CHead x (Bind Abbr) t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C +(CHead x (Bind Abbr) t) (\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop +(S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))))) (let H11 \def (H c d1 u1 H6 g x H10) in (or3_ind +(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S +n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: +C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) +(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) +t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H14: +(csuba g x0 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop +(Bind Abbr) n x (CHead x0 (Bind Abbr) u1) H13 t) H14))))) H12)) (\lambda +(H12: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x (CHead x0 +(Bind Abst) x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: (arity g x0 +x1 (asucc g x2))).(\lambda (H16: (arity g d1 u1 x2)).(or3_intro1 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n +x (CHead x0 (Bind Abst) x1) H13 t) H14 H15 H16))))))))) H12)) (\lambda (H12: +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind +C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead x0 (Bind Void) +x1))).(\lambda (H14: (csuba g x0 d1)).(or3_intro2 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_drop (Bind +Abbr) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) H11)) c2 H9)))) +H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) (or3 (ex2 +C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind +Abst) x1))).(\lambda (H10: (csuba g x0 c)).(\lambda (_: (arity g x0 x1 (asucc +g x2))).(\lambda (_: (arity g c t x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) +(\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in (or3_ind (ex2 C (\lambda +(d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 +(Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: +C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) +(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) +x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda +(H15: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H16: (csuba g x +d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) +x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind Abst) n x0 +(CHead x (Bind Abbr) u1) H15 x1) H16))))) H14)) (\lambda (H14: (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abst) x4))).(\lambda (H16: +(csuba g x3 d1)).(\lambda (H17: (arity g x3 x4 (asucc g x5))).(\lambda (H18: +(arity g d1 u1 x5)).(or3_intro1 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead +x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x3 x4 x5 +(drop_drop (Bind Abst) n x0 (CHead x3 (Bind Abst) x4) H15 x1) H16 H17 +H18))))))))) H14)) (\lambda (H14: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop +n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x3: C).(\lambda (x4: T).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Void) +x4))).(\lambda (H16: (csuba g x3 d1)).(or3_intro2 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x3 x4 (drop_drop (Bind +Abst) n x0 (CHead x3 (Bind Void) x4) H15 x1) H16)))))) H14)) H13)) c2 +H9)))))))) H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +c))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (H9: (eq C c2 (CHead x0 (Bind Void) +x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Bind Void) x1) +(\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))) (let H11 \def (H c d1 u1 H6 g x0 H10) in (or3_ind (ex2 C (\lambda +(d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 +(Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: +C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) +(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) +x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda +(H13: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H14: (csuba g x +d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) +x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind Void) n x0 +(CHead x (Bind Abbr) u1) H13 x1) H14))))) H12)) (\lambda (H12: (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +A).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Abst) x3))).(\lambda (H14: +(csuba g x2 d1)).(\lambda (H15: (arity g x2 x3 (asucc g x4))).(\lambda (H16: +(arity g d1 u1 x4)).(or3_intro1 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead +x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x2 x3 x4 +(drop_drop (Bind Void) n x0 (CHead x2 (Bind Abst) x3) H13 x1) H14 H15 +H16))))))))) H12)) (\lambda (H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop +n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) +x3))).(\lambda (H14: (csuba g x2 d1)).(or3_intro2 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 (drop_drop (Bind +Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) H11)) c2 H9))))) +H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abst) t))).(\lambda +(H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def +(csuba_gen_abst_rev g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba +g d2 c))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c)))) (or3 +(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H8: +(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: +C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abst) t))) (\lambda (d2: C).(csuba g d2 c)) (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H9: (eq +C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g x c)).(eq_ind_r C +(CHead x (Bind Abst) t) (\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop +(S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))))) (let H11 \def (H c d1 u1 H6 g x H10) in (or3_ind +(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S +n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: +C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) +(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) +t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H14: +(csuba g x0 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop +(Bind Abst) n x (CHead x0 (Bind Abbr) u1) H13 t) H14))))) H12)) (\lambda +(H12: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x (CHead x0 +(Bind Abst) x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: (arity g x0 +x1 (asucc g x2))).(\lambda (H16: (arity g d1 u1 x2)).(or3_intro1 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abst) n +x (CHead x0 (Bind Abst) x1) H13 t) H14 H15 H16))))))))) H12)) (\lambda (H12: +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind +C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H13: (drop n O x (CHead x0 (Bind Void) +x1))).(\lambda (H14: (csuba g x0 d1)).(or3_intro2 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_drop (Bind +Abst) n x (CHead x0 (Bind Void) x1) H13 t) H14)))))) H12)) H11)) c2 H9)))) +H8)) (\lambda (H8: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +c))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c))) (or3 +(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H9: (eq C c2 (CHead x0 (Bind Void) +x1))).(\lambda (H10: (csuba g x0 c)).(eq_ind_r C (CHead x0 (Bind Void) x1) +(\lambda (c0: C).(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c0 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))) (let H11 \def (H c d1 u1 H6 g x0 H10) in (or3_ind (ex2 C (\lambda +(d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n +O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 +(Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: +C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) +(or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) +x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: C).(\lambda +(H13: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H14: (csuba g x +d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) +x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind Void) n x0 +(CHead x (Bind Abbr) u1) H13 x1) H14))))) H12)) (\lambda (H12: (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +A).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Abst) x3))).(\lambda (H14: +(csuba g x2 d1)).(\lambda (H15: (arity g x2 x3 (asucc g x4))).(\lambda (H16: +(arity g d1 u1 x4)).(or3_intro1 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead +x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x2 x3 x4 +(drop_drop (Bind Void) n x0 (CHead x2 (Bind Abst) x3) H13 x1) H14 H15 +H16))))))))) H12)) (\lambda (H12: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop +n O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Void) x1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Void) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x2: C).(\lambda (x3: T).(\lambda (H13: (drop n O x0 (CHead x2 (Bind Void) +x3))).(\lambda (H14: (csuba g x2 d1)).(or3_intro2 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Bind Void) x1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 (drop_drop (Bind +Void) n x0 (CHead x2 (Bind Void) x3) H13 x1) H14)))))) H12)) H11)) c2 H9))))) +H8)) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Void) t))).(\lambda +(H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def +(csuba_gen_void_rev g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda +(d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g d2 c)) +(or3 (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x: +C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g x +c)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(or3 (ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H10 \def (H c d1 u1 H6 g x +H9) in (or3_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H11: (ex2 C +(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 +(Bind Abbr) u1))).(\lambda (H13: (csuba g x0 d1)).(or3_intro0 (ex2 C (\lambda +(d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) +x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) u1) H12 t) H13))))) H11)) +(\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 +(Bind Abst) x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 +x1 (asucc g x2))).(\lambda (H15: (arity g d1 u1 x2)).(or3_intro1 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Void) n +x (CHead x0 (Bind Abst) x1) H12 t) H13 H14 H15))))))))) H11)) (\lambda (H11: +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind +C T (\lambda (d2: C).(\lambda (u2: T).(drop n O x (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H12: (drop n O x (CHead x0 (Bind Void) +x1))).(\lambda (H13: (csuba g x0 d1)).(or3_intro2 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x0 x1 (drop_drop (Bind +Void) n x (CHead x0 (Bind Void) x1) H12 t) H13)))))) H11)) H10)) c2 H8)))) +H7))))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g c2 (CHead c (Flat +f) t))).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) +u1))).(let H_x \def (csuba_gen_flat_rev g c c2 t f H3) in (let H5 \def H_x in +(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c))) (or3 (ex2 C (\lambda +(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g x0 +c)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c0: C).(or3 (ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(drop (S n) O c0 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H8 \def (H0 d1 u1 H4 g x0 +H7) in (or3_ind (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O x0 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H9: (ex2 C (\lambda +(d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) +x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abbr) +u1))).(\lambda (H11: (csuba g x d1)).(or3_intro0 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) +x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop +(Flat f) n x0 (CHead x (Bind Abbr) u1) H10 x1) H11))))) H9)) (\lambda (H9: +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x2: C).(\lambda (x3: +T).(\lambda (x4: A).(\lambda (H10: (drop (S n) O x0 (CHead x2 (Bind Abst) +x3))).(\lambda (H11: (csuba g x2 d1)).(\lambda (H12: (arity g x2 x3 (asucc g +x4))).(\lambda (H13: (arity g d1 u1 x4)).(or3_intro1 (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) +x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x2 x3 x4 +(drop_drop (Flat f) n x0 (CHead x2 (Bind Abst) x3) H10 x1) H11 H12 +H13))))))))) H9)) (\lambda (H9: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O x0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 +(Flat f) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) +(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (drop (S n) O x0 (CHead x2 +(Bind Void) x3))).(\lambda (H11: (csuba g x2 d1)).(or3_intro2 (ex2 C (\lambda +(d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop (S n) O (CHead +x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))) x2 x3 (drop_drop (Flat f) n x0 +(CHead x2 (Bind Void) x3) H10 x1) H11)))))) H9)) H8)) c2 H6))))) H5)))))) k +H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u1) t n H1)))))))))))) c1)))) i). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csuba/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/fwd.ma new file mode 100644 index 000000000..b99cd5945 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/fwd.ma @@ -0,0 +1,1024 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csuba/defs.ma". + +implied rec lemma csuba_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: +nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csuba +g c1 c2) \to ((P c1 c2) \to (\forall (k: K).(\forall (u: T).(P (CHead c1 k u) +(CHead c2 k u))))))))) (f1: (\forall (c1: C).(\forall (c2: C).((csuba g c1 +c2) \to ((P c1 c2) \to (\forall (b: B).((not (eq B b Void)) \to (\forall (u1: +T).(\forall (u2: T).(P (CHead c1 (Bind Void) u1) (CHead c2 (Bind b) +u2))))))))))) (f2: (\forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to ((P +c1 c2) \to (\forall (t: T).(\forall (a: A).((arity g c1 t (asucc g a)) \to +(\forall (u: T).((arity g c2 u a) \to (P (CHead c1 (Bind Abst) t) (CHead c2 +(Bind Abbr) u)))))))))))) (c: C) (c0: C) (c1: csuba g c c0) on c1: P c c0 +\def match c1 with [(csuba_sort n) \Rightarrow (f n) | (csuba_head c2 c3 c4 k +u) \Rightarrow (f0 c2 c3 c4 ((csuba_ind g P f f0 f1 f2) c2 c3 c4) k u) | +(csuba_void c2 c3 c4 b n u1 u2) \Rightarrow (f1 c2 c3 c4 ((csuba_ind g P f f0 +f1 f2) c2 c3 c4) b n u1 u2) | (csuba_abst c2 c3 c4 t a a0 u a1) \Rightarrow +(f2 c2 c3 c4 ((csuba_ind g P f f0 f1 f2) c2 c3 c4) t a a0 u a1)]. + +lemma csuba_gen_abbr: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g +(CHead d1 (Bind Abbr) u) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: +(csuba g (CHead d1 (Bind Abbr) u) c)).(insert_eq C (CHead d1 (Bind Abbr) u) +(\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2 C (\lambda (d2: C).(eq +C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (\lambda +(y: C).(\lambda (H0: (csuba g y c)).(csuba_ind g (\lambda (c0: C).(\lambda +(c1: C).((eq C c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C +c1 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda +(n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abbr) u))).(let H2 +\def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) +u) H1) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H2)))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1 +(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (k: +K).(\lambda (u0: T).(\lambda (H3: (eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) +u))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u0) (CHead d1 +(Bind Abbr) u) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e +with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k +u0) (CHead d1 (Bind Abbr) u) H3) in ((let H6 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) +(CHead c1 k u0) (CHead d1 (Bind Abbr) u) H3) in (\lambda (H7: (eq K k (Bind +Abbr))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u (\lambda (t: T).(ex2 C +(\lambda (d2: C).(eq C (CHead c2 k t) (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2)))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 C +(\lambda (d2: C).(eq C (CHead c2 k0 u) (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2)))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C +c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) H2 d1 H8) in (let H10 +\def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in (ex_intro2 C +(\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Abbr) u)) +H10))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind +Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (b: B).(\lambda (_: (not (eq B +b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 +(Bind Void) u1) (CHead d1 (Bind Abbr) u))).(let H5 \def (eq_ind C (CHead c1 +(Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False +| (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0 +with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow +True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H4) in +(False_ind (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind b) u2) (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H5))))))))))) (\lambda +(c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C +c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))).(\lambda (t: +T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0: +T).(\lambda (_: (arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) +t) (CHead d1 (Bind Abbr) u))).(let H6 \def (eq_ind C (CHead c1 (Bind Abst) t) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H5) in (False_ind (ex2 C +(\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u0) (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2))) H6)))))))))))) y c H0))) H))))). + +lemma csuba_gen_void: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g +(CHead d1 (Bind Void) u1) c) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: +C).(\lambda (u2: T).(eq C c (CHead d2 (Bind b) u2))))) (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda +(H: (csuba g (CHead d1 (Bind Void) u1) c)).(insert_eq C (CHead d1 (Bind Void) +u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2_3 B C T (\lambda +(b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind b) u2))))) +(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))) +(\lambda (y: C).(\lambda (H0: (csuba g y c)).(csuba_ind g (\lambda (c0: +C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T +(\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind b) +u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 +d2)))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind +Void) u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 +(Bind Void) u1) H1) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (d2: +C).(\lambda (u2: T).(eq C (CSort n) (CHead d2 (Bind b) u2))))) (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) H2)))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1 +(CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: +C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))).(\lambda (k: +K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead d1 (Bind Void) +u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u) (CHead d1 +(Bind Void) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e +with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k +u) (CHead d1 (Bind Void) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) +(CHead c1 k u) (CHead d1 (Bind Void) u1) H3) in (\lambda (H7: (eq K k (Bind +Void))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_3 B C +T (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k t) +(CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: +T).(csuba g d1 d2)))))) (eq_ind_r K (Bind Void) (\lambda (k0: K).(ex2_3 B C T +(\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k0 u1) +(CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: +T).(csuba g d1 d2)))))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 +(CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: +C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))) H2 d1 H8) in (let +H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in +(ex2_3_intro B C T (\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C +(CHead c2 (Bind Void) u1) (CHead d2 (Bind b) u2))))) (\lambda (_: B).(\lambda +(d2: C).(\lambda (_: T).(csuba g d1 d2)))) Void c2 u1 (refl_equal C (CHead c2 +(Bind Void) u1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c1 +(CHead d1 (Bind Void) u1)) \to (ex2_3 B C T (\lambda (b: B).(\lambda (d2: +C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) u2))))) (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))).(\lambda (b: +B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u0) (CHead d1 (Bind Void) +u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind Void) u0) +(CHead d1 (Bind Void) u1) H4) in ((let H6 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) +(CHead c1 (Bind Void) u0) (CHead d1 (Bind Void) u1) H4) in (\lambda (H7: (eq +C c1 d1)).(let H8 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1 +(Bind Void) u1)) \to (ex2_3 B C T (\lambda (b0: B).(\lambda (d2: C).(\lambda +(u3: T).(eq C c2 (CHead d2 (Bind b0) u3))))) (\lambda (_: B).(\lambda (d2: +C).(\lambda (_: T).(csuba g d1 d2))))))) H2 d1 H7) in (let H9 \def (eq_ind C +c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H7) in (ex2_3_intro B C T (\lambda +(b0: B).(\lambda (d2: C).(\lambda (u3: T).(eq C (CHead c2 (Bind b) u2) (CHead +d2 (Bind b0) u3))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba +g d1 d2)))) b c2 u2 (refl_equal C (CHead c2 (Bind b) u2)) H9))))) +H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 +c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind Void) u1)) \to (ex2_3 B C T +(\lambda (b: B).(\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Bind b) +u2))))) (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 +d2)))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc +g a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C +(CHead c1 (Bind Abst) t) (CHead d1 (Bind Void) u1))).(let H6 \def (eq_ind C +(CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind +Void) u1) H5) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (d2: +C).(\lambda (u2: T).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind b) u2))))) +(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) +H6)))))))))))) y c H0))) H))))). + +lemma csuba_gen_abst: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g +(CHead d1 (Bind Abst) u1) c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead +d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda +(H: (csuba g (CHead d1 (Bind Abst) u1) c)).(insert_eq C (CHead d1 (Bind Abst) +u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(or (ex2 C (\lambda (d2: +C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead +d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a))))))) (\lambda (y: C).(\lambda (H0: (csuba g y +c)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind +Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) +(\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst) +u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 +(Bind Abst) u1) H1) in (False_ind (or (ex2 C (\lambda (d2: C).(eq C (CSort n) +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CSort n) (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 +c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a))))))))).(\lambda (k: K).(\lambda (u: T).(\lambda +(H3: (eq C (CHead c1 k u) (CHead d1 (Bind Abst) u1))).(let H4 \def (f_equal C +C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H3) in ((let H5 +\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k | +(CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H3) +in ((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead d1 (Bind +Abst) u1) H3) in (\lambda (H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C c1 +d1)).(eq_ind_r T u1 (\lambda (t: T).(or (ex2 C (\lambda (d2: C).(eq C (CHead +c2 k t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 +C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 k t) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a))))))) (eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2 +C (\lambda (d2: C).(eq C (CHead c2 k0 u1) (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(eq C (CHead c2 k0 u1) (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) +(let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abst) +u1)) \to (or (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) H2 d1 H8) +in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 c2)) H1 d1 H8) in +(or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abst) u1) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind +Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) c2 +(refl_equal C (CHead c2 (Bind Abst) u1)) H10)))) k H7) u H6)))) H5)) +H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 +c2)).(\lambda (_: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b +Void))).(\lambda (u0: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 (Bind +Void) u0) (CHead d1 (Bind Abst) u1))).(let H5 \def (eq_ind C (CHead c1 (Bind +Void) u0) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | +(CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0 with +[Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | +(Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abst) u1) H4) in (False_ind +(or (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind b) u2) (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u3: T).(\lambda (_: A).(eq C (CHead c2 (Bind b) u2) (CHead d2 +(Bind Abbr) u3))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 +u3 a)))))) H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: +(csuba g c1 c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Bind Abst) u1)) \to (or +(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))).(\lambda (t: T).(\lambda +(a: A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: T).(\lambda +(H4: (arity g c2 u a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead d1 +(Bind Abst) u1))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind +Abst) t) (CHead d1 (Bind Abst) u1) H5) in ((let H7 \def (f_equal C T (\lambda +(e: C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0) \Rightarrow +t0])) (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1) H5) in (\lambda (H8: +(eq C c1 d1)).(let H9 \def (eq_ind T t (\lambda (t0: T).(arity g c1 t0 (asucc +g a))) H3 u1 H7) in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(arity g c0 +u1 (asucc g a))) H9 d1 H8) in (let H11 \def (eq_ind C c1 (\lambda (c0: +C).((eq C c0 (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(eq C +c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc +g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 +a0)))))))) H2 d1 H8) in (let H12 \def (eq_ind C c1 (\lambda (c0: C).(csuba g +c0 c2)) H1 d1 H8) in (or_intror (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind +Abbr) u) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead +c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a0: A).(arity g d2 u2 a0))))) (ex4_3_intro C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) u) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity +g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: +A).(arity g d2 u2 a0)))) c2 u a (refl_equal C (CHead c2 (Bind Abbr) u)) H12 +H10 H4)))))))) H6)))))))))))) y c H0))) H))))). + +lemma csuba_gen_flat: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall +(f: F).((csuba g (CHead d1 (Flat f) u1) c) \to (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d1 d2))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda +(f: F).(\lambda (H: (csuba g (CHead d1 (Flat f) u1) c)).(insert_eq C (CHead +d1 (Flat f) u1) (\lambda (c0: C).(csuba g c0 c)) (\lambda (_: C).(ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d1 d2))))) (\lambda (y: C).(\lambda (H0: +(csuba g y c)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c0 +(CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq +C c1 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 +d2))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Flat f) +u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 +(Flat f) u1) H1) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d1 d2)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: +(csuba g c1 c2)).(\lambda (H2: (((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))).(\lambda (k: +K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead d1 (Flat f) +u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 k u) (CHead d1 +(Flat f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e with +[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) +(CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) +(CHead c1 k u) (CHead d1 (Flat f) u1) H3) in (\lambda (H7: (eq K k (Flat +f))).(\lambda (H8: (eq C c1 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 k t) (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) (eq_ind_r K (Flat +f) (\lambda (k0: K).(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead +c2 k0 u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d1 d2))))) (let H9 \def (eq_ind C c1 (\lambda (c0: C).((eq C c0 (CHead d1 +(Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 +(CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 +d2)))))) H2 d1 H8) in (let H10 \def (eq_ind C c1 (\lambda (c0: C).(csuba g c0 +c2)) H1 d1 H8) in (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C +(CHead c2 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d1 d2))) c2 u1 (refl_equal C (CHead c2 (Flat f) u1)) H10))) k +H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: +(csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Flat f) u1)) \to (ex2_2 C +T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))).(\lambda (b: +B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u0) (CHead d1 (Flat f) +u1))).(let H5 \def (eq_ind C (CHead c1 (Bind Void) u0) (\lambda (ee: +C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow +(match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I +(CHead d1 (Flat f) u1) H4) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda +(u3: T).(eq C (CHead c2 (Bind b) u2) (CHead d2 (Flat f) u3)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d1 d2)))) H5))))))))))) (\lambda (c1: C).(\lambda +(c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c1 (CHead d1 (Flat +f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 +(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 +d2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g +a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C +(CHead c1 (Bind Abst) t) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind C +(CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1) +H5) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead +c2 (Bind Abbr) u) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d1 d2)))) H6)))))))))))) y c H0))) H)))))). + +lemma csuba_gen_bind: + \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall +(v1: T).((csuba g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) +\def + \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda +(v1: T).(\lambda (H: (csuba g (CHead e1 (Bind b1) v1) c2)).(insert_eq C +(CHead e1 (Bind b1) v1) (\lambda (c: C).(csuba g c c2)) (\lambda (_: +C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 +(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: +T).(csuba g e1 e2)))))) (\lambda (y: C).(\lambda (H0: (csuba g y +c2)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind +b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C c0 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e1 e2)))))))) (\lambda (n: nat).(\lambda (H1: (eq +C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 +(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g +e1 e2))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 +c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 +e2)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) +(CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k +u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: +C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) +(CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) +\Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7: +(eq K k (Bind b1))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v1 (\lambda (t: +T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c3 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e1 e2)))))) (eq_ind_r K (Bind b1) (\lambda (k0: +K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c3 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e1 e2)))))) (let H9 \def (eq_ind C c1 (\lambda +(c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) H2 e1 +H8) in (let H10 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c3)) H1 e1 H8) +in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq +C (CHead c3 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) b1 c3 v1 (refl_equal C +(CHead c3 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: +C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c1 +(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))).(\lambda (b: +B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) +v1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1) +(CHead e1 (Bind b1) v1) H4) in ((let H6 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Void | (CHead _ k _) \Rightarrow +(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Void])])) +(CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) in ((let H7 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead +_ _ t) \Rightarrow t])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) +in (\lambda (H8: (eq B Void b1)).(\lambda (H9: (eq C c1 e1)).(let H10 \def +(eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C +T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 +e2))))))) H2 e1 H9) in (let H11 \def (eq_ind C c1 (\lambda (c: C).(csuba g c +c3)) H1 e1 H9) in (let H12 \def (eq_ind_r B b1 (\lambda (b0: B).((eq C e1 +(CHead e1 (Bind b0) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) H10 Void H8) in +(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c3 (Bind b) u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda +(e2: C).(\lambda (_: T).(csuba g e1 e2)))) b c3 u2 (refl_equal C (CHead c3 +(Bind b) u2)) H11))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c3: +C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind +b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e1 e2)))))))).(\lambda (t: T).(\lambda (a: +A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: T).(\lambda (_: +(arity g c3 u a)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead e1 +(Bind b1) v1))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind +Abst) t) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def (f_equal C B (\lambda +(e: C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead +c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in ((let H8 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0) +\Rightarrow t0])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in +(\lambda (H9: (eq B Abst b1)).(\lambda (H10: (eq C c1 e1)).(let H11 \def +(eq_ind T t (\lambda (t0: T).(arity g c1 t0 (asucc g a))) H3 v1 H8) in (let +H12 \def (eq_ind C c1 (\lambda (c: C).(arity g c v1 (asucc g a))) H11 e1 H10) +in (let H13 \def (eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) +v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq +C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda +(_: T).(csuba g e1 e2))))))) H2 e1 H10) in (let H14 \def (eq_ind C c1 +(\lambda (c: C).(csuba g c c3)) H1 e1 H10) in (let H15 \def (eq_ind_r B b1 +(\lambda (b: B).((eq C e1 (CHead e1 (Bind b) v1)) \to (ex2_3 B C T (\lambda +(b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) +v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 +e2))))))) H13 Abst H9) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) (CHead e2 (Bind b2) +v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) +Abbr c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H14))))))))) H7)) +H6)))))))))))) y c2 H0))) H)))))). + +lemma csuba_gen_abst_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c +(CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: +(csuba g c (CHead d1 (Bind Abst) u))).(insert_eq C (CHead d1 (Bind Abst) u) +(\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(or (ex2 C (\lambda (d2: +C).(eq C c (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (\lambda (y: +C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: +C).((eq C c1 (CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C +c0 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C c0 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))) (\lambda (n: +nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst) u))).(let H2 \def +(eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow +True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) u) H1) in +(False_ind (or (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(eq C (CSort n) (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))))) H2)))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind +Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))))))).(\lambda (k: K).(\lambda (u0: T).(\lambda (H3: (eq +C (CHead c2 k u0) (CHead d1 (Bind Abst) u))).(let H4 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) in ((let H5 +\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k | +(CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u0) (CHead d1 (Bind Abst) u) H3) +in ((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c2 k u0) (CHead d1 +(Bind Abst) u) H3) in (\lambda (H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C +c2 d1)).(eq_ind_r T u (\lambda (t: T).(or (ex2 C (\lambda (d2: C).(eq C +(CHead c1 k t) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) +(eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2 C (\lambda (d2: C).(eq C +(CHead c1 k0 u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k0 u) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let +H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abst) u)) \to +(or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba g +c1 c0)) H1 d1 H8) in (or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind +Abst) u) (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abst) u) (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) +(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) u) (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind +Abst) u)) H10)))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda +(c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 +(Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (b: B).(\lambda (H3: (not +(eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead +c2 (Bind b) u2) (CHead d1 (Bind Abst) u))).(let H5 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow +c0])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abst) u) H4) in ((let H6 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead +_ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abst) u) H4) in +((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead +d1 (Bind Abst) u) H4) in (\lambda (H8: (eq B b Abst)).(\lambda (H9: (eq C c2 +d1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Abst +H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind +Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: +T).(eq C c1 (CHead d2 (Bind Void) u3)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))))) H2 d1 H9) in (let H12 \def (eq_ind C c2 (\lambda +(c0: C).(csuba g c1 c0)) H1 d1 H9) in (or_intror (ex2 C (\lambda (d2: C).(eq +C (CHead c1 (Bind Void) u1) (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C +(CHead c1 (Bind Void) u1) (CHead d2 (Bind Void) u3)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: +C).(\lambda (u3: T).(eq C (CHead c1 (Bind Void) u1) (CHead d2 (Bind Void) +u3)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) c1 u1 (refl_equal C +(CHead c1 (Bind Void) u1)) H12)))))))) H6)) H5))))))))))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c2 +(CHead d1 (Bind Abst) u)) \to (or (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (t: T).(\lambda (a: +A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0: T).(\lambda (_: +(arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr) u0) (CHead d1 +(Bind Abst) u))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr) u0) (\lambda +(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead d1 (Bind Abst) u) H5) in (False_ind (or +(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) H6)))))))))))) c y H0))) H))))). + +lemma csuba_gen_void_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g c +(CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind +Void) u))) (\lambda (d2: C).(csuba g d2 d1))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: +(csuba g c (CHead d1 (Bind Void) u))).(insert_eq C (CHead d1 (Bind Void) u) +(\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(ex2 C (\lambda (d2: C).(eq +C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))) (\lambda +(y: C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda +(c1: C).((eq C c1 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C +c0 (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))) (\lambda +(n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Void) u))).(let H2 +\def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Void) +u) H1) in (False_ind (ex2 C (\lambda (d2: C).(eq C (CSort n) (CHead d2 (Bind +Void) u))) (\lambda (d2: C).(csuba g d2 d1))) H2)))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 +(CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 +(Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (k: +K).(\lambda (u0: T).(\lambda (H3: (eq C (CHead c2 k u0) (CHead d1 (Bind Void) +u))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u0) (CHead d1 +(Bind Void) u) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e +with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 k +u0) (CHead d1 (Bind Void) u) H3) in ((let H6 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) +(CHead c2 k u0) (CHead d1 (Bind Void) u) H3) in (\lambda (H7: (eq K k (Bind +Void))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r T u (\lambda (t: T).(ex2 C +(\lambda (d2: C).(eq C (CHead c1 k t) (CHead d2 (Bind Void) u))) (\lambda +(d2: C).(csuba g d2 d1)))) (eq_ind_r K (Bind Void) (\lambda (k0: K).(ex2 C +(\lambda (d2: C).(eq C (CHead c1 k0 u) (CHead d2 (Bind Void) u))) (\lambda +(d2: C).(csuba g d2 d1)))) (let H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C +c0 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 +(Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1))))) H2 d1 H8) in (let H10 +\def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 H8) in (ex_intro2 C +(\lambda (d2: C).(eq C (CHead c1 (Bind Void) u) (CHead d2 (Bind Void) u))) +(\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 (Bind Void) u)) +H10))) k H7) u0 H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind +Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Void) u))) +(\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (b: B).(\lambda (H3: (not (eq +B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c2 +(Bind b) u2) (CHead d1 (Bind Void) u))).(let H5 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow +c0])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Void) u) H4) in ((let H6 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b | (CHead +_ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Void) u) H4) in +((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead +d1 (Bind Void) u) H4) in (\lambda (H8: (eq B b Void)).(\lambda (H9: (eq C c2 +d1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Void +H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind +Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Void) u))) +(\lambda (d2: C).(csuba g d2 d1))))) H2 d1 H9) in (let H12 \def (eq_ind C c2 +(\lambda (c0: C).(csuba g c1 c0)) H1 d1 H9) in (let H13 \def (match (H10 +(refl_equal B Void)) in False with []) in H13))))))) H6)) H5))))))))))) +(\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: +(((eq C c2 (CHead d1 (Bind Void) u)) \to (ex2 C (\lambda (d2: C).(eq C c1 +(CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d2 d1)))))).(\lambda (t: +T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u0: +T).(\lambda (_: (arity g c2 u0 a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr) +u0) (CHead d1 (Bind Void) u))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr) +u0) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k +_) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead d1 (Bind Void) u) H5) in (False_ind (ex2 C +(\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u))) +(\lambda (d2: C).(csuba g d2 d1))) H6)))))))))))) c y H0))) H))))). + +lemma csuba_gen_abbr_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g c +(CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda +(H: (csuba g c (CHead d1 (Bind Abbr) u1))).(insert_eq C (CHead d1 (Bind Abbr) +u1) (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(or3 (ex2 C (\lambda +(d2: C).(eq C c (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq +C c (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))) (\lambda (y: C).(\lambda (H0: (csuba g c y)).(csuba_ind g (\lambda +(c0: C).(\lambda (c1: C).((eq C c1 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C +(\lambda (d2: C).(eq C c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq +C c0 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1)))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Bind +Abbr) u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 +(Bind Abbr) u1) H1) in (False_ind (or3 (ex2 C (\lambda (d2: C).(eq C (CSort +n) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CSort n) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CSort n) (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) +H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 +c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C +(\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C c1 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq +C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c2 k +u) (CHead d1 (Bind Abbr) u1))).(let H4 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) +(CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in ((let H5 \def (f_equal C K +(\lambda (e: C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) +\Rightarrow k0])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) in ((let H6 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t) \Rightarrow t])) (CHead c2 k u) (CHead d1 (Bind Abbr) u1) H3) +in (\lambda (H7: (eq K k (Bind Abbr))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r +T u1 (\lambda (t: T).(or3 (ex2 C (\lambda (d2: C).(eq C (CHead c1 k t) (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 k t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(or3 (ex2 C (\lambda (d2: +C).(eq C (CHead c1 k0 u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C (CHead c1 k0 u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C (CHead c1 k0 u1) (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))) (let H9 \def (eq_ind C +c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C +(\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq +C c1 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq +C c1 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba +g c1 c0)) H1 d1 H8) in (or3_intro0 (ex2 C (\lambda (d2: C).(eq C (CHead c1 +(Bind Abbr) u1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C +(CHead c1 (Bind Abbr) u1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) +(ex_intro2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abbr) u1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) c1 (refl_equal C (CHead c1 +(Bind Abbr) u1)) H10)))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 +(CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (b: +B).(\lambda (H3: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c2 (Bind b) u2) (CHead d1 (Bind Abbr) +u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) u2) +(CHead d1 (Bind Abbr) u1) H4) in ((let H6 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match +k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c2 +(Bind b) u2) (CHead d1 (Bind Abbr) u1) H4) in ((let H7 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | (CHead _ _ t) +\Rightarrow t])) (CHead c2 (Bind b) u2) (CHead d1 (Bind Abbr) u1) H4) in +(\lambda (H8: (eq B b Abbr)).(\lambda (H9: (eq C c2 d1)).(let H10 \def +(eq_ind B b (\lambda (b0: B).(not (eq B b0 Void))) H3 Abbr H8) in (let H11 +\def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to +(or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u3: +T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) u3))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 u3 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u3: T).(eq C c1 (CHead d2 (Bind Void) u3)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H2 d1 H9) in (let H12 +\def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 H9) in (or3_intro2 +(ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Void) u0) (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u3: T).(\lambda (_: A).(eq C (CHead c1 (Bind Void) u0) (CHead d2 +(Bind Abst) u3))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u3: T).(\lambda (a: A).(arity g d2 u3 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C (CHead c1 (Bind +Void) u0) (CHead d2 (Bind Void) u3)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u3: T).(eq +C (CHead c1 (Bind Void) u0) (CHead d2 (Bind Void) u3)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))) c1 u0 (refl_equal C (CHead c1 (Bind +Void) u0)) H12)))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (H1: (csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Bind +Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq C c1 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))).(\lambda (t: +T).(\lambda (a: A).(\lambda (H3: (arity g c1 t (asucc g a))).(\lambda (u: +T).(\lambda (H4: (arity g c2 u a)).(\lambda (H5: (eq C (CHead c2 (Bind Abbr) +u) (CHead d1 (Bind Abbr) u1))).(let H6 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) +(CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1) H5) in ((let H7 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead +_ _ t0) \Rightarrow t0])) (CHead c2 (Bind Abbr) u) (CHead d1 (Bind Abbr) u1) +H5) in (\lambda (H8: (eq C c2 d1)).(let H9 \def (eq_ind T u (\lambda (t0: +T).(arity g c2 t0 a)) H4 u1 H7) in (let H10 \def (eq_ind C c2 (\lambda (c0: +C).(arity g c0 u1 a)) H9 d1 H8) in (let H11 \def (eq_ind C c2 (\lambda (c0: +C).((eq C c0 (CHead d1 (Bind Abbr) u1)) \to (or3 (ex2 C (\lambda (d2: C).(eq +C c1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c1 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 +(asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 +u1 a0))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) H2 +d1 H8) in (let H12 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 c0)) H1 d1 +H8) in (or3_intro1 (ex2 C (\lambda (d2: C).(eq C (CHead c1 (Bind Abst) t) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) +t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: +A).(arity g d2 u2 (asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a0: A).(arity g d1 u1 a0))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C (CHead c1 (Bind Abst) t) (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (ex4_3_intro C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) t) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 +(asucc g a0))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 +u1 a0)))) c1 t a (refl_equal C (CHead c1 (Bind Abst) t)) H12 H3 H10)))))))) +H6)))))))))))) c y H0))) H))))). + +lemma csuba_gen_flat_rev: + \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall +(f: F).((csuba g c (CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))))))))) +\def + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda +(f: F).(\lambda (H: (csuba g c (CHead d1 (Flat f) u1))).(insert_eq C (CHead +d1 (Flat f) u1) (\lambda (c0: C).(csuba g c c0)) (\lambda (_: C).(ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (y: C).(\lambda (H0: +(csuba g c y)).(csuba_ind g (\lambda (c0: C).(\lambda (c1: C).((eq C c1 +(CHead d1 (Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq +C c0 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead d1 (Flat f) +u1))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 +(Flat f) u1) H1) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C (CSort n) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: +(csuba g c1 c2)).(\lambda (H2: (((eq C c2 (CHead d1 (Flat f) u1)) \to (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Flat f) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))).(\lambda (k: +K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c2 k u) (CHead d1 (Flat f) +u1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 k u) (CHead d1 +(Flat f) u1) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e with +[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 k u) +(CHead d1 (Flat f) u1) H3) in ((let H6 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) +(CHead c2 k u) (CHead d1 (Flat f) u1) H3) in (\lambda (H7: (eq K k (Flat +f))).(\lambda (H8: (eq C c2 d1)).(eq_ind_r T u1 (\lambda (t: T).(ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c1 k t) (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (eq_ind_r K (Flat +f) (\lambda (k0: K).(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead +c1 k0 u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))))) (let H9 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead d1 +(Flat f) u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 +(CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))))) H2 d1 H8) in (let H10 \def (eq_ind C c2 (\lambda (c0: C).(csuba g c1 +c0)) H1 d1 H8) in (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C +(CHead c1 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))) c1 u1 (refl_equal C (CHead c1 (Flat f) u1)) H10))) k +H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: +(csuba g c1 c2)).(\lambda (_: (((eq C c2 (CHead d1 (Flat f) u1)) \to (ex2_2 C +T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 (Flat f) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))).(\lambda (b: +B).(\lambda (_: (not (eq B b Void))).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c2 (Bind b) u2) (CHead d1 (Flat f) u1))).(let +H5 \def (eq_ind C (CHead c2 (Bind b) u2) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind +_) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) +u1) H4) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u3: T).(eq C +(CHead c1 (Bind Void) u0) (CHead d2 (Flat f) u3)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))) H5))))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (_: (csuba g c1 c2)).(\lambda (_: (((eq C c2 (CHead d1 (Flat f) +u1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c1 (CHead d2 +(Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g +a))).(\lambda (u: T).(\lambda (_: (arity g c2 u a)).(\lambda (H5: (eq C +(CHead c2 (Bind Abbr) u) (CHead d1 (Flat f) u1))).(let H6 \def (eq_ind C +(CHead c2 (Bind Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1) +H5) in (False_ind (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead +c1 (Bind Abst) t) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) H6)))))))))))) c y H0))) H)))))). + +lemma csuba_gen_bind_rev: + \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall +(v1: T).((csuba g c2 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))))) +\def + \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda +(v1: T).(\lambda (H: (csuba g c2 (CHead e1 (Bind b1) v1))).(insert_eq C +(CHead e1 (Bind b1) v1) (\lambda (c: C).(csuba g c2 c)) (\lambda (_: +C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 +(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: +T).(csuba g e2 e1)))))) (\lambda (y: C).(\lambda (H0: (csuba g c2 +y)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c0 (CHead e1 (Bind +b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e2 e1)))))))) (\lambda (n: nat).(\lambda (H1: (eq +C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 +(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g +e2 e1))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 +c3)).(\lambda (H2: (((eq C c3 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 +e1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c3 k u) +(CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 k +u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: +C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) +(CHead c3 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) +\Rightarrow t])) (CHead c3 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7: +(eq K k (Bind b1))).(\lambda (H8: (eq C c3 e1)).(eq_ind_r T v1 (\lambda (t: +T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c1 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e2 e1)))))) (eq_ind_r K (Bind b1) (\lambda (k0: +K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c1 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e2 e1)))))) (let H9 \def (eq_ind C c3 (\lambda +(c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H2 e1 +H8) in (let H10 \def (eq_ind C c3 (\lambda (c: C).(csuba g c1 c)) H1 e1 H8) +in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq +C (CHead c1 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) b1 c1 v1 (refl_equal C +(CHead c1 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: +C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c3 +(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))).(\lambda (b: +B).(\lambda (H3: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c3 (Bind b) u2) (CHead e1 (Bind b1) v1))).(let +H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c3 +| (CHead c _ _) \Rightarrow c])) (CHead c3 (Bind b) u2) (CHead e1 (Bind b1) +v1) H4) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e with [(CSort +_) \Rightarrow b | (CHead _ k _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c3 (Bind b) u2) (CHead e1 +(Bind b1) v1) H4) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with +[(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c3 (Bind b) +u2) (CHead e1 (Bind b1) v1) H4) in (\lambda (H8: (eq B b b1)).(\lambda (H9: +(eq C c3 e1)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 +Void))) H3 b1 H8) in (let H11 \def (eq_ind C c3 (\lambda (c: C).((eq C c +(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H2 e1 H9) in (let +H12 \def (eq_ind C c3 (\lambda (c: C).(csuba g c1 c)) H1 e1 H9) in +(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c1 (Bind Void) u1) (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) Void c1 u1 (refl_equal +C (CHead c1 (Bind Void) u1)) H12))))))) H6)) H5))))))))))) (\lambda (c1: +C).(\lambda (c3: C).(\lambda (H1: (csuba g c1 c3)).(\lambda (H2: (((eq C c3 +(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))))))).(\lambda (t: +T).(\lambda (a: A).(\lambda (_: (arity g c1 t (asucc g a))).(\lambda (u: +T).(\lambda (H4: (arity g c3 u a)).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) +u) (CHead e1 (Bind b1) v1))).(let H6 \def (f_equal C C (\lambda (e: C).(match +e with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 +(Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H7 \def (f_equal C B +(\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +Abbr])])) (CHead c3 (Bind Abbr) u) (CHead e1 (Bind b1) v1) H5) in ((let H8 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t0) \Rightarrow t0])) (CHead c3 (Bind Abbr) u) (CHead e1 (Bind b1) +v1) H5) in (\lambda (H9: (eq B Abbr b1)).(\lambda (H10: (eq C c3 e1)).(let +H11 \def (eq_ind T u (\lambda (t0: T).(arity g c3 t0 a)) H4 v1 H8) in (let +H12 \def (eq_ind C c3 (\lambda (c: C).(arity g c v1 a)) H11 e1 H10) in (let +H13 \def (eq_ind C c3 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to +(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 +(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: +T).(csuba g e2 e1))))))) H2 e1 H10) in (let H14 \def (eq_ind C c3 (\lambda +(c: C).(csuba g c1 c)) H1 e1 H10) in (let H15 \def (eq_ind_r B b1 (\lambda +(b: B).((eq C e1 (CHead e1 (Bind b) v1)) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c1 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1))))))) H13 +Abbr H9) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda +(v2: T).(eq C (CHead c1 (Bind Abst) t) (CHead e2 (Bind b2) v2))))) (\lambda +(_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 e1)))) Abst c1 t +(refl_equal C (CHead c1 (Bind Abst) t)) H14))))))))) H7)) H6)))))))))))) c2 y +H0))) H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csuba/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/getl.ma new file mode 100644 index 000000000..a8591bf15 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/getl.ma @@ -0,0 +1,1160 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csuba/drop.ma". + +include "basic_1A/csuba/clear.ma". + +include "basic_1A/getl/clear.ma". + +lemma csuba_getl_abbr: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall +(i: nat).((getl i c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g +c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abbr) u) i H) in (ex2_ind C (\lambda (e: +C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) +(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (x: +C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind +Abbr) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 +(Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2)))))))) (\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda +(H4: (clear (CSort n) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 +(Bind Abbr) u) n H4 (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: +(drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 +(Bind Abbr) u))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to +((clear (CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: +C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (b: B).(\lambda +(H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 +(Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) +(CHead d1 (Bind Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 +(Bind Abbr) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e +with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with +[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind +Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) +t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abbr) u) +(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in +(\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: +C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: +T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def (eq_ind_r +B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u))) H13 Abbr H10) in +(let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind +Abbr) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abbr i c1 d1 u H15 g c2 +H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl i c2 (CHead +d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x1: +C).(\lambda (H17: (drop i O c2 (CHead x1 (Bind Abbr) u))).(\lambda (H18: +(csuba g d1 x1)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x1 (getl_intro i c2 (CHead x1 +(Bind Abbr) u) (CHead x1 (Bind Abbr) u) H17 (clear_bind Abbr x1 u)) H18)))) +H16)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead +x0 (Flat f) t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind +Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c +(CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c c2) \to (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop n +O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) \to (ex2 C +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2)))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead +x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x1 c2)).(let H10 +\def (eq_ind C x1 (\lambda (c: C).(csuba g c c2)) H9 (CHead x0 (Flat f) t) +(drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def (clear_flat x0 +(CHead d1 (Bind Abbr) u) (clear_gen_flat f x0 (CHead d1 (Bind Abbr) u) t H6) +f t) in (let H11 \def (csuba_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead +d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 +(Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) +(\lambda (x2: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abbr) u) +x2)).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abbr g d1 x2 u +H12) in (let H14 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) +(\lambda (x3: C).(\lambda (H15: (eq C x2 (CHead x3 (Bind Abbr) u))).(\lambda +(H16: (csuba g d1 x3)).(let H17 \def (eq_ind C x2 (\lambda (c: C).(clear c2 +c)) H13 (CHead x3 (Bind Abbr) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl +O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x3 +(getl_intro O c2 (CHead x3 (Bind Abbr) u) c2 (drop_refl c2) H17) H16))))) +H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) +\to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O +x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x1 +c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B +C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind +b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead +x0 (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x2: B).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) +x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 \def +(csuba_clear_conf g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind C +(\lambda (e2: C).(csuba g (CHead x3 (Bind x2) x4) e2)) (\lambda (e2: +C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x5: C).(\lambda (H15: +(csuba g (CHead x3 (Bind x2) x4) x5)).(\lambda (H16: (clear c2 x5)).(let H_x +\def (csuba_gen_bind g x2 x3 x5 x4 H15) in (let H17 \def H_x in (ex2_3_ind B +C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 +(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g +x3 e2)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x6: B).(\lambda (x7: C).(\lambda +(x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) x8))).(\lambda (H19: +(csuba g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 +(CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 x7 H19) in (ex2_ind +C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x9: C).(\lambda (H22: +(getl n x7 (CHead x9 (Bind Abbr) u))).(\lambda (H23: (csuba g d1 +x9)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead +x9 (Bind Abbr) u) n H22) H23)))) H21)))))))) H17)))))) H14))))))) H11)))))))) +i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). + +lemma csuba_getl_abst: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall +(i: nat).((getl i c1 (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba +g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda +(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u1))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abst) u1) i H) in (ex2_ind C (\lambda (e: +C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u1))) +(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear +x (CHead d1 (Bind Abst) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) \to +((clear c (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) +\to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda +(n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) +(CHead d1 (Bind Abst) u1))).(clear_gen_sort (CHead d1 (Bind Abst) u1) n H4 +(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 +C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear +(CHead x0 k t) (CHead d1 (Bind Abst) u1))).(K_ind (\lambda (k0: K).((drop i O +c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind Abst) u1)) +\to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i +c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a))))))))))) (\lambda (b: B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) +t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 (Bind Abst) +u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) u1) +(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u1) t H6)) +in ((let H8 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow Abst | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind Abst) u1) +(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u1) t H6)) +in ((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u1 | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abst) u1) +(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u1) t H6)) +in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: +C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: +T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r +B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abst H10) in +(let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind +Abst) u1))) H14 d1 H11) in (let H16 \def (csuba_drop_abst i c1 d1 u1 H15 g c2 +H12) in (or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H17: (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: C).(\lambda +(H18: (drop i O c2 (CHead x1 (Bind Abst) u1))).(\lambda (H19: (csuba g d1 +x1)).(or_introl (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) +(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)) x1 (getl_intro i c2 (CHead x1 (Bind Abst) u1) (CHead +x1 (Bind Abst) u1) H18 (clear_bind Abst x1 u1)) H19))))) H17)) (\lambda (H17: +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: C).(\lambda (x2: +T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abbr) +x2))).(\lambda (H19: (csuba g d1 x1)).(\lambda (H20: (arity g d1 u1 (asucc g +x3))).(\lambda (H21: (arity g x1 x2 x3)).(or_intror (ex2 C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x1 x2 x3 +(getl_intro i c2 (CHead x1 (Bind Abbr) x2) (CHead x1 (Bind Abbr) x2) H18 +(clear_bind Abbr x1 x2)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) +H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) +t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abst) +u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i +c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) +\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda +(x1: C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H9: (csuba g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: +C).(csuba g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat +f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abst) u1) +(clear_gen_flat f x0 (CHead d1 (Bind Abst) u1) t H6) f t) in (let H11 \def +(csuba_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abst) u1) +H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind Abst) u1) e2)) +(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead +d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x2: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abst) u1) +x2)).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst g d1 x2 u1 +H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 (CHead +d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H15: (ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead x3 +(Bind Abst) u1))).(\lambda (H17: (csuba g d1 x3)).(let H18 \def (eq_ind C x2 +(\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) u1) H16) in +(or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2)) x3 (getl_intro O c2 (CHead x3 (Bind Abst) u1) c2 +(drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(eq C x2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +A).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abbr) x4))).(\lambda (H17: (csuba +g d1 x3)).(\lambda (H18: (arity g d1 u1 (asucc g x5))).(\lambda (H19: (arity +g x3 x4 x5)).(let H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 +(CHead x3 (Bind Abbr) x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O +c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 (getl_intro O c2 (CHead +x3 (Bind Abbr) x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) +H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) +\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O x1 (CHead x0 (Flat +f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x1 c2)).(let H11 \def +(drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: +B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) +(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead x0 (Flat +f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: +(clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 +(Flat f) t))).(let H14 \def (csuba_clear_conf g x1 c2 H10 (CHead x3 (Bind x2) +x4) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead x3 (Bind x2) x4) e2)) +(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))) (\lambda (x5: C).(\lambda (H15: (csuba g (CHead x3 (Bind x2) x4) +x5)).(\lambda (H16: (clear c2 x5)).(let H_x \def (csuba_gen_bind g x2 x3 x5 +x4 H15) in (let H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda +(e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g x3 e2)))) (or (ex2 C (\lambda +(d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g +d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl +(S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x6: B).(\lambda (x7: +C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) +x8))).(\lambda (H19: (csuba g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: +C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 +x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or +(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H22: (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S +n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a)))))) (\lambda (x9: C).(\lambda (H23: (getl n x7 +(CHead x9 (Bind Abst) u1))).(\lambda (H24: (csuba g d1 x9)).(or_introl (ex2 C +(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abst) u1) n H23) +H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: A).(\lambda (H23: +(getl n x7 (CHead x9 (Bind Abbr) x10))).(\lambda (H24: (csuba g d1 +x9)).(\lambda (H25: (arity g d1 u1 (asucc g x11))).(\lambda (H26: (arity g x9 +x10 x11)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x9 x10 x11 (getl_clear_bind x6 +c2 x7 x8 H20 (CHead x9 (Bind Abbr) x10) n H23) H24 H25 H26))))))))) H22)) +H21)))))))) H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) x H1 +H2)))) H0))))))). + +lemma csuba_getl_abst_rev: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall +(i: nat).((getl i c1 (CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g +c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abst) u) i H) in (ex2_ind C (\lambda (e: +C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u))) +(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) (\lambda (x: +C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind +Abst) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 +(Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))) +(\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear +(CSort n) (CHead d1 (Bind Abst) u))).(clear_gen_sort (CHead d1 (Bind Abst) u) +n H4 (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl +i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))) (\lambda (x0: +C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 (CHead d1 (Bind Abst) u)) +\to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i +c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: +(clear (CHead x0 k t) (CHead d1 (Bind Abst) u))).(K_ind (\lambda (k0: +K).((drop i O c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind +Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (b: +B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear +(CHead x0 (Bind b) t) (CHead d1 (Bind Abst) u))).(let H7 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) +\Rightarrow c])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H8 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abst | +(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat +_) \Rightarrow Abst])])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H9 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead +_ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in (\lambda (H10: (eq B +Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba +g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 +(Bind b) t0))) H5 u H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: B).(drop +i O c1 (CHead x0 (Bind b0) u))) H13 Abst H10) in (let H15 \def (eq_ind_r C x0 +(\lambda (c: C).(drop i O c1 (CHead c (Bind Abst) u))) H14 d1 H11) in (let +H16 \def (csuba_drop_abst_rev i c1 d1 u H15 g c2 H12) in (or_ind (ex2 C +(\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop i O +c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H17: (ex2 C (\lambda (d2: C).(drop i O c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C +(\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x1: C).(\lambda (H18: (drop +i O c2 (CHead x1 (Bind Abst) u))).(\lambda (H19: (csuba g x1 d1)).(or_introl +(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 (CHead x1 (Bind Abst) +u) (CHead x1 (Bind Abst) u) H18 (clear_bind Abst x1 u)) H19))))) H17)) +(\lambda (H17: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(drop i O c2 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or +(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (H18: (drop i O c2 (CHead +x1 (Bind Void) x2))).(\lambda (H19: (csuba g x1 d1)).(or_intror (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x1 +x2 (getl_intro i c2 (CHead x1 (Bind Void) x2) (CHead x1 (Bind Void) x2) H18 +(clear_bind Void x1 x2)) H19)))))) H17)) H16)))))))))) H8)) H7))))) (\lambda +(f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) t))).(\lambda (H6: +(clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abst) u))).(let H7 \def H5 in +(unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 (Flat f) t)) \to +(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))) (nat_ind (\lambda +(n: nat).(\forall (x1: C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall +(c2: C).((csuba g c2 x1) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 +(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl n c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (x1: C).(\lambda (H8: +(drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g +c2 x1)).(let H10 \def (eq_ind C x1 (\lambda (c: C).(csuba g c2 c)) H9 (CHead +x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def +(clear_flat x0 (CHead d1 (Bind Abst) u) (clear_gen_flat f x0 (CHead d1 (Bind +Abst) u) t H6) f t) in (let H11 \def (csuba_clear_trans g (CHead x0 (Flat f) +t) c2 H10 (CHead d1 (Bind Abst) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba +g e2 (CHead d1 (Bind Abst) u))) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 +(CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))) (\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abst) +u))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst_rev g d1 x2 +u H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H15: +(ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x3: +C).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abst) u))).(\lambda (H17: (csuba g +x3 d1)).(let H18 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead +x3 (Bind Abst) u) H16) in (or_introl (ex2 C (\lambda (d2: C).(getl O c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C (\lambda +(d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1)) x3 (getl_intro O c2 (CHead x3 (Bind Abst) u) c2 (drop_refl c2) H18) +H17)))))) H15)) (\lambda (H15: (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(eq C x2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C +x2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C +x2 (CHead x3 (Bind Void) x4))).(\lambda (H17: (csuba g x3 d1)).(let H18 \def +(eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Void) x4) H16) +in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))) x3 x4 (getl_intro O c2 (CHead x3 (Bind Void) x4) c2 +(drop_refl c2) H18) H17))))))) H15)) H14)))))) H11)))))))) (\lambda (n: +nat).(\lambda (H8: ((\forall (x1: C).((drop n O x1 (CHead x0 (Flat f) t)) \to +(\forall (c2: C).((csuba g c2 x1) \to (or (ex2 C (\lambda (d2: C).(getl n c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl n c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))).(\lambda (x1: +C).(\lambda (H9: (drop (S n) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H10: (csuba g c2 x1)).(let H11 \def (drop_clear x1 (CHead x0 +(Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: +C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: +B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead x0 (Flat f) t))))) (or +(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u))) (\lambda +(d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl +(S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba +g d2 d1))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda +(H12: (clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead +x0 (Flat f) t))).(let H14 \def (csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind +x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) +x4))) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) +c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x5: +C).(\lambda (H15: (csuba g x5 (CHead x3 (Bind x2) x4))).(\lambda (H16: (clear +c2 x5)).(let H_x \def (csuba_gen_bind_rev g x2 x3 x5 x4 H15) in (let H17 \def +H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e2 x3)))) (or (ex2 C (\lambda (d2: C).(getl (S n) +c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x6: +B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind +x6) x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda +(c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 +H13 x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (or (ex2 C (\lambda (d2: C).(getl (S n) +c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (H22: (ex2 C +(\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) +(\lambda (x9: C).(\lambda (H23: (getl n x7 (CHead x9 (Bind Abst) +u))).(\lambda (H24: (csuba g x9 d1)).(or_introl (ex2 C (\lambda (d2: C).(getl +(S n) c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C +(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abst) +u) n H23) H24))))) H22)) (\lambda (H22: (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(getl +n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g +d2 d1))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (H23: +(getl n x7 (CHead x9 (Bind Void) x10))).(\lambda (H24: (csuba g x9 +d1)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1))) (ex2_2 C T (\lambda (d2: C).(\lambda +(u2: T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda +(_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))) x9 x10 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind +Void) x10) n H23) H24)))))) H22)) H21)))))))) H17)))))) H14))))))) +H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). + +lemma csuba_getl_abbr_rev: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall +(i: nat).((getl i c1 (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba +g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda +(i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u1))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abbr) u1) i H) in (ex2_ind C (\lambda (e: +C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u1))) +(\forall (c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))) +(\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead +d1 (Bind Abbr) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c +(CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 c1) \to (or3 +(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (n: nat).(\lambda (_: +(drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abbr) +u1))).(clear_gen_sort (CHead d1 (Bind Abbr) u1) n H4 (\forall (c2: C).((csuba +g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))))))))) (\lambda (x0: +C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 (CHead d1 (Bind Abbr) u1)) +\to (\forall (c2: C).((csuba g c2 c1) \to (or3 (ex2 C (\lambda (d2: C).(getl +i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 +d1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: (drop i O c1 +(CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 (Bind Abbr) +u1))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to ((clear +(CHead x0 k0 t) (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 +c1) \to (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (b: +B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear +(CHead x0 (Bind b) t) (CHead d1 (Bind Abbr) u1))).(let H7 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) +\Rightarrow c])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in ((let H8 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | +(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat +_) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in ((let H9 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead +_ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in (\lambda (H10: (eq B +Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba +g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 +(Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: +B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abbr H10) in (let H15 \def +(eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind Abbr) u1))) H14 d1 +H11) in (let H16 \def (csuba_drop_abbr_rev i c1 d1 u1 H15 g c2 H12) in +(or3_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H17: (ex2 C (\lambda (d2: C).(drop i O c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C +(\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x1: +C).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abbr) u1))).(\lambda (H19: +(csuba g x1 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) x1 (getl_intro i c2 (CHead x1 (Bind Abbr) u1) (CHead x1 +(Bind Abbr) u1) H18 (clear_bind Abbr x1 u1)) H19))))) H17)) (\lambda (H17: +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x1: C).(\lambda (x2: +T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abst) +x2))).(\lambda (H19: (csuba g x1 d1)).(\lambda (H20: (arity g x1 x2 (asucc g +x3))).(\lambda (H21: (arity g d1 u1 x3)).(or3_intro1 (ex2 C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x1 x2 x3 +(getl_intro i c2 (CHead x1 (Bind Abst) x2) (CHead x1 (Bind Abst) x2) H18 +(clear_bind Abst x1 x2)) H19 H20 H21))))))))) H17)) (\lambda (H17: (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda +(d2: C).(\lambda (u2: T).(drop i O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: C).(getl +i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl i c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) +(\lambda (x1: C).(\lambda (x2: T).(\lambda (H18: (drop i O c2 (CHead x1 (Bind +Void) x2))).(\lambda (H19: (csuba g x1 d1)).(or3_intro2 (ex2 C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))) x1 x2 (getl_intro i c2 (CHead x1 (Bind Void) x2) (CHead +x1 (Bind Void) x2) H18 (clear_bind Void x1 x2)) H19)))))) H17)) H16)))))))))) +H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) +t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) +u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (or3 (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl i c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop +n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (or3 +(ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl n c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl n c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))))))))) (\lambda (x1: C).(\lambda (H8: +(drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g +c2 x1)).(let H10 \def (eq_ind C x1 (\lambda (c: C).(csuba g c2 c)) H9 (CHead +x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def +(clear_flat x0 (CHead d1 (Bind Abbr) u1) (clear_gen_flat f x0 (CHead d1 (Bind +Abbr) u1) t H6) f t) in (let H11 \def (csuba_clear_trans g (CHead x0 (Flat f) +t) c2 H10 (CHead d1 (Bind Abbr) u1) H_y) in (ex2_ind C (\lambda (e2: +C).(csuba g e2 (CHead d1 (Bind Abbr) u1))) (\lambda (e2: C).(clear c2 e2)) +(or3 (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x2: +C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abbr) u1))).(\lambda (H13: +(clear c2 x2)).(let H_x \def (csuba_gen_abbr_rev g d1 x2 u1 H12) in (let H14 +\def H_x in (or3_ind (ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H15: (ex2 C (\lambda (d2: C).(eq C x2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda +(d2: C).(eq C x2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1)) (or3 (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda (x3: +C).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abbr) u1))).(\lambda (H17: (csuba +g x3 d1)).(let H18 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead +x3 (Bind Abbr) u1) H16) in (or3_intro0 (ex2 C (\lambda (d2: C).(getl O c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) +(ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1)) x3 (getl_intro O c2 (CHead x3 (Bind Abbr) u1) c2 +(drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(eq C x2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 +(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +A).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abst) x4))).(\lambda (H17: (csuba +g x3 d1)).(\lambda (H18: (arity g x3 x4 (asucc g x5))).(\lambda (H19: (arity +g d1 u1 x5)).(let H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 +(CHead x3 (Bind Abst) x4) H16) in (or3_intro1 (ex2 C (\lambda (d2: C).(getl O +c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))) x3 x4 x5 (getl_intro O c2 (CHead x3 (Bind Abst) +x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) (\lambda (H15: (ex2_2 +C T (\lambda (d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T (\lambda +(d2: C).(\lambda (u2: T).(eq C x2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: C).(getl O c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 +(Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) +(\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C x2 (CHead x3 (Bind +Void) x4))).(\lambda (H17: (csuba g x3 d1)).(let H18 \def (eq_ind C x2 +(\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Void) x4) H16) in +(or3_intro2 (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T +(\lambda (d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro C T (\lambda +(d2: C).(\lambda (u2: T).(getl O c2 (CHead d2 (Bind Void) u2)))) (\lambda +(d2: C).(\lambda (_: T).(csuba g d2 d1))) x3 x4 (getl_intro O c2 (CHead x3 +(Bind Void) x4) c2 (drop_refl c2) H18) H17))))))) H15)) H14)))))) H11)))))))) +(\lambda (n: nat).(\lambda (H8: ((\forall (x1: C).((drop n O x1 (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (or3 (ex2 C (\lambda +(d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl n c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O x1 +(CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 x1)).(let +H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B C T +(\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) +v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead x0 +(Flat f) t))))) (or3 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 +(Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 +\def (csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind +C (\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) (\lambda (e2: +C).(clear c2 e2)) (or3 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x5: C).(\lambda (H15: (csuba g x5 (CHead x3 (Bind x2) x4))).(\lambda (H16: +(clear c2 x5)).(let H_x \def (csuba_gen_bind_rev g x2 x3 x5 x4 H15) in (let +H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda +(v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csuba g e2 x3)))) (or3 (ex2 C (\lambda (d2: C).(getl (S +n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x6: B).(\lambda (x7: C).(\lambda (x8: +T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) x8))).(\lambda (H19: (csuba g +x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 (CHead +x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 x7 H19) in (or3_ind (ex2 C +(\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: +C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) (\lambda (d2: +C).(\lambda (_: T).(csuba g d2 d1)))) (or3 (ex2 C (\lambda (d2: C).(getl (S +n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(getl n x7 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C +(\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) (or3 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))) (\lambda +(x9: C).(\lambda (H23: (getl n x7 (CHead x9 (Bind Abbr) u1))).(\lambda (H24: +(csuba g x9 d1)).(or3_intro0 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex_intro2 C +(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) +u1) n H23) H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or3 (ex2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S +n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: +A).(\lambda (H23: (getl n x7 (CHead x9 (Bind Abst) x10))).(\lambda (H24: +(csuba g x9 d1)).(\lambda (H25: (arity g x9 x10 (asucc g x11))).(\lambda +(H26: (arity g d1 u1 x11)).(or3_intro1 (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead +d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S +n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))) x9 x10 x11 (getl_clear_bind x6 c2 x7 x8 H20 +(CHead x9 (Bind Abst) x10) n H23) H24 H25 H26))))))))) H22)) (\lambda (H22: +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))))).(ex2_2_ind C T +(\lambda (d2: C).(\lambda (u2: T).(getl n x7 (CHead d2 (Bind Void) u2)))) +(\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) (or3 (ex2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S +n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a))))) (ex2_2 C T (\lambda (d2: C).(\lambda (u2: +T).(getl (S n) c2 (CHead d2 (Bind Void) u2)))) (\lambda (d2: C).(\lambda (_: +T).(csuba g d2 d1))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (H23: +(getl n x7 (CHead x9 (Bind Void) x10))).(\lambda (H24: (csuba g x9 +d1)).(or3_intro2 (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind +Void) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1)))) (ex2_2_intro +C T (\lambda (d2: C).(\lambda (u2: T).(getl (S n) c2 (CHead d2 (Bind Void) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 d1))) x9 x10 +(getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Void) x10) n H23) H24)))))) +H22)) H21)))))))) H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) +x H1 H2)))) H0))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csuba/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csuba/props.ma new file mode 100644 index 000000000..145b0f179 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csuba/props.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csuba/defs.ma". + +include "basic_1A/C/fwd.ma". + +lemma csuba_refl: + \forall (g: G).(\forall (c: C).(csuba g c c)) +\def + \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csuba g c0 c0)) +(\lambda (n: nat).(csuba_sort g n)) (\lambda (c0: C).(\lambda (H: (csuba g c0 +c0)).(\lambda (k: K).(\lambda (t: T).(csuba_head g c0 c0 H k t))))) c)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/arity.ma new file mode 100644 index 000000000..7871555c3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/arity.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/csuba.ma". + +lemma csubc_arity_conf: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to +(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (arity g c2 t a))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(\lambda (t: T).(\lambda (a: A).(\lambda (H0: (arity g c1 t +a)).(csuba_arity g c1 t a H0 c2 (csubc_csuba g c1 c2 H)))))))). + +lemma csubc_arity_trans: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to +((csubv c1 c2) \to (\forall (t: T).(\forall (a: A).((arity g c2 t a) \to +(arity g c1 t a)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(\lambda (H0: (csubv c1 c2)).(\lambda (t: T).(\lambda (a: A).(\lambda +(H1: (arity g c2 t a)).(csuba_arity_rev g c2 t a H1 c1 (csubc_csuba g c1 c2 +H) H0)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/clear.ma new file mode 100644 index 000000000..5650cc9e7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/clear.ma @@ -0,0 +1,167 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/fwd.ma". + +include "basic_1A/clear/fwd.ma". + +lemma csubc_clear_conf: + \forall (g: G).(\forall (c1: C).(\forall (e1: C).((clear c1 e1) \to (\forall +(c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda +(e2: C).(csubc g e1 e2)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (e1: C).(\lambda (H: (clear c1 +e1)).(clear_ind (\lambda (c: C).(\lambda (c0: C).(\forall (c2: C).((csubc g c +c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c0 +e2))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (c2: +C).(\lambda (H0: (csubc g (CHead e (Bind b) u) c2)).(let H_x \def +(csubc_gen_head_l g e c2 u (Bind b) H0) in (let H1 \def H_x in (or3_ind (ex2 +C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind b) u))) (\lambda (c3: C).(csubc g +e c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K +(Bind b) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq +C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda +(_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 +g (asucc g a) e u)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g +a c3 w))))) (ex4_3 B C T (\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: +T).(eq C c2 (CHead c3 (Bind b0) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K (Bind b) (Bind Void))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g e c3))))) (ex2 C (\lambda (e2: C).(clear c2 e2)) +(\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2))) (\lambda (H2: (ex2 C +(\lambda (c3: C).(eq C c2 (CHead c3 (Bind b) u))) (\lambda (c3: C).(csubc g e +c3)))).(ex2_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind b) u))) (\lambda +(c3: C).(csubc g e c3)) (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: +C).(csubc g (CHead e (Bind b) u) e2))) (\lambda (x: C).(\lambda (H3: (eq C c2 +(CHead x (Bind b) u))).(\lambda (H4: (csubc g e x)).(eq_ind_r C (CHead x +(Bind b) u) (\lambda (c: C).(ex2 C (\lambda (e2: C).(clear c e2)) (\lambda +(e2: C).(csubc g (CHead e (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: +C).(clear (CHead x (Bind b) u) e2)) (\lambda (e2: C).(csubc g (CHead e (Bind +b) u) e2)) (CHead x (Bind b) u) (clear_bind b x u) (csubc_head g e x H4 (Bind +b) u)) c2 H3)))) H2)) (\lambda (H2: (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K (Bind b) (Bind Abst))))) (\lambda (c3: C).(\lambda +(w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: +C).(\lambda (_: T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda +(w: T).(\lambda (a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind b) (Bind Abst))))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g e c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) e u)))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))) (ex2 C (\lambda +(e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H3: (eq K (Bind +b) (Bind Abst))).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda +(H5: (csubc g e x0)).(\lambda (H6: (sc3 g (asucc g x2) e u)).(\lambda (H7: +(sc3 g x2 x0 x1)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c: C).(ex2 +C (\lambda (e2: C).(clear c e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) +u) e2)))) (let H8 \def (f_equal K B (\lambda (e0: K).(match e0 with [(Bind +b0) \Rightarrow b0 | (Flat _) \Rightarrow b])) (Bind b) (Bind Abst) H3) in +(eq_ind_r B Abst (\lambda (b0: B).(ex2 C (\lambda (e2: C).(clear (CHead x0 +(Bind Abbr) x1) e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b0) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(clear (CHead x0 (Bind Abbr) x1) e2)) (\lambda +(e2: C).(csubc g (CHead e (Bind Abst) u) e2)) (CHead x0 (Bind Abbr) x1) +(clear_bind Abbr x0 x1) (csubc_abst g e x0 H5 u x2 H6 x1 H7)) b H8)) c2 +H4))))))))) H2)) (\lambda (H2: (ex4_3 B C T (\lambda (b0: B).(\lambda (c3: +C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b0) v2))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind b) (Bind Void))))) (\lambda +(b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3)))))).(ex4_3_ind B C T +(\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind +b0) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind b) +(Bind Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B +b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g e +c3)))) (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g +(CHead e (Bind b) u) e2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (H3: (eq C c2 (CHead x1 (Bind x0) x2))).(\lambda (H4: (eq K (Bind +b) (Bind Void))).(\lambda (H5: (not (eq B x0 Void))).(\lambda (H6: (csubc g e +x1)).(eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(ex2 C (\lambda (e2: +C).(clear c e2)) (\lambda (e2: C).(csubc g (CHead e (Bind b) u) e2)))) (let +H7 \def (f_equal K B (\lambda (e0: K).(match e0 with [(Bind b0) \Rightarrow +b0 | (Flat _) \Rightarrow b])) (Bind b) (Bind Void) H4) in (eq_ind_r B Void +(\lambda (b0: B).(ex2 C (\lambda (e2: C).(clear (CHead x1 (Bind x0) x2) e2)) +(\lambda (e2: C).(csubc g (CHead e (Bind b0) u) e2)))) (ex_intro2 C (\lambda +(e2: C).(clear (CHead x1 (Bind x0) x2) e2)) (\lambda (e2: C).(csubc g (CHead +e (Bind Void) u) e2)) (CHead x1 (Bind x0) x2) (clear_bind x0 x1 x2) +(csubc_void g e x1 H6 x0 H5 u x2)) b H7)) c2 H3)))))))) H2)) H1)))))))) +(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1: +((\forall (c2: C).((csubc g e c2) \to (ex2 C (\lambda (e2: C).(clear c2 e2)) +(\lambda (e2: C).(csubc g c e2))))))).(\lambda (f: F).(\lambda (u: +T).(\lambda (c2: C).(\lambda (H2: (csubc g (CHead e (Flat f) u) c2)).(let H_x +\def (csubc_gen_head_l g e c2 u (Flat f) H2) in (let H3 \def H_x in (or3_ind +(ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 (Flat f) u))) (\lambda (c3: +C).(csubc g e c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: +A).(eq K (Flat f) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda +(_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda (w: T).(\lambda +(a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: +C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: T).(eq K (Flat f) (Bind Void))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3))))) (ex2 C (\lambda (e2: +C).(clear c2 e2)) (\lambda (e2: C).(csubc g c e2))) (\lambda (H4: (ex2 C +(\lambda (c3: C).(eq C c2 (CHead c3 (Flat f) u))) (\lambda (c3: C).(csubc g e +c3)))).(ex2_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Flat f) u))) (\lambda +(c3: C).(csubc g e c3)) (ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: +C).(csubc g c e2))) (\lambda (x: C).(\lambda (H5: (eq C c2 (CHead x (Flat f) +u))).(\lambda (H6: (csubc g e x)).(eq_ind_r C (CHead x (Flat f) u) (\lambda +(c0: C).(ex2 C (\lambda (e2: C).(clear c0 e2)) (\lambda (e2: C).(csubc g c +e2)))) (let H_x0 \def (H1 x H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda +(e2: C).(clear x e2)) (\lambda (e2: C).(csubc g c e2)) (ex2 C (\lambda (e2: +C).(clear (CHead x (Flat f) u) e2)) (\lambda (e2: C).(csubc g c e2))) +(\lambda (x0: C).(\lambda (H8: (clear x x0)).(\lambda (H9: (csubc g c +x0)).(ex_intro2 C (\lambda (e2: C).(clear (CHead x (Flat f) u) e2)) (\lambda +(e2: C).(csubc g c e2)) x0 (clear_flat x x0 H8 f u) H9)))) H7))) c2 H5)))) +H4)) (\lambda (H4: (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: +A).(eq K (Flat f) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda +(_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda (w: T).(\lambda +(a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K (Flat f) (Bind Abst))))) (\lambda (c3: C).(\lambda +(w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: +C).(\lambda (_: T).(\lambda (_: A).(csubc g e c3)))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(sc3 g (asucc g a) e u)))) (\lambda (c3: C).(\lambda +(w: T).(\lambda (a: A).(sc3 g a c3 w)))) (ex2 C (\lambda (e2: C).(clear c2 +e2)) (\lambda (e2: C).(csubc g c e2))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (x2: A).(\lambda (H5: (eq K (Flat f) (Bind Abst))).(\lambda (H6: +(eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (csubc g e x0)).(\lambda +(_: (sc3 g (asucc g x2) e u)).(\lambda (_: (sc3 g x2 x0 x1)).(eq_ind_r C +(CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(clear c0 +e2)) (\lambda (e2: C).(csubc g c e2)))) (let H10 \def (eq_ind K (Flat f) +(\lambda (ee: K).(match ee with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])) I (Bind Abst) H5) in (False_ind (ex2 C (\lambda (e2: +C).(clear (CHead x0 (Bind Abbr) x1) e2)) (\lambda (e2: C).(csubc g c e2))) +H10)) c2 H6))))))))) H4)) (\lambda (H4: (ex4_3 B C T (\lambda (b: B).(\lambda +(c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: T).(eq K (Flat f) (Bind Void))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3)))))).(ex4_3_ind B C T +(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) +v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Flat f) (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g e c3)))) +(ex2 C (\lambda (e2: C).(clear c2 e2)) (\lambda (e2: C).(csubc g c e2))) +(\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H5: (eq C c2 +(CHead x1 (Bind x0) x2))).(\lambda (H6: (eq K (Flat f) (Bind Void))).(\lambda +(_: (not (eq B x0 Void))).(\lambda (_: (csubc g e x1)).(eq_ind_r C (CHead x1 +(Bind x0) x2) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(clear c0 e2)) +(\lambda (e2: C).(csubc g c e2)))) (let H9 \def (eq_ind K (Flat f) (\lambda +(ee: K).(match ee with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])) I (Bind Void) H6) in (False_ind (ex2 C (\lambda (e2: C).(clear (CHead +x1 (Bind x0) x2) e2)) (\lambda (e2: C).(csubc g c e2))) H9)) c2 H5)))))))) +H4)) H3))))))))))) c1 e1 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/csuba.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/csuba.ma new file mode 100644 index 000000000..48b71ed9d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/csuba.ma @@ -0,0 +1,37 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/fwd.ma". + +include "basic_1A/sc3/props.ma". + +lemma csubc_csuba: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csuba +g c1 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(csubc_ind g (\lambda (c: C).(\lambda (c0: C).(csuba g c c0))) (\lambda +(n: nat).(csuba_refl g (CSort n))) (\lambda (c3: C).(\lambda (c4: C).(\lambda +(_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (k: K).(\lambda +(v: T).(csuba_head g c3 c4 H1 k v))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (b: +B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: +T).(csuba_void g c3 c4 H1 b H2 u1 u2))))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (v: +T).(\lambda (a: A).(\lambda (H2: (sc3 g (asucc g a) c3 v)).(\lambda (w: +T).(\lambda (H3: (sc3 g a c4 w)).(csuba_abst g c3 c4 H1 v a (sc3_arity_gen g +c3 v (asucc g a) H2) w (sc3_arity_gen g c4 w a H3))))))))))) c1 c2 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/defs.ma new file mode 100644 index 000000000..e28634ebe --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/defs.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sc3/defs.ma". + +inductive csubc (g: G): C \to (C \to Prop) \def +| csubc_sort: \forall (n: nat).(csubc g (CSort n) (CSort n)) +| csubc_head: \forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (\forall +(k: K).(\forall (v: T).(csubc g (CHead c1 k v) (CHead c2 k v)))))) +| csubc_void: \forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (\forall +(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csubc g +(CHead c1 (Bind Void) u1) (CHead c2 (Bind b) u2)))))))) +| csubc_abst: \forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (\forall +(v: T).(\forall (a: A).((sc3 g (asucc g a) c1 v) \to (\forall (w: T).((sc3 g +a c2 w) \to (csubc g (CHead c1 (Bind Abst) v) (CHead c2 (Bind Abbr) +w))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop.ma new file mode 100644 index 000000000..995cfee55 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop.ma @@ -0,0 +1,466 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/fwd.ma". + +include "basic_1A/sc3/props.ma". + +lemma csubc_drop_conf_O: + \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (h: nat).((drop h +O c1 e1) \to (\forall (c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: +C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (e1: +C).(\forall (h: nat).((drop h O c e1) \to (\forall (c2: C).((csubc g c c2) +\to (ex2 C (\lambda (e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2))))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (h: nat).(\lambda (H: +(drop h O (CSort n) e1)).(\lambda (c2: C).(\lambda (H0: (csubc g (CSort n) +c2)).(and3_ind (eq C e1 (CSort n)) (eq nat h O) (eq nat O O) (ex2 C (\lambda +(e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (H1: +(eq C e1 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (_: (eq nat O +O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (e2: C).(drop n0 O c2 +e2)) (\lambda (e2: C).(csubc g e1 e2)))) (eq_ind_r C (CSort n) (\lambda (c: +C).(ex2 C (\lambda (e2: C).(drop O O c2 e2)) (\lambda (e2: C).(csubc g c +e2)))) (ex_intro2 C (\lambda (e2: C).(drop O O c2 e2)) (\lambda (e2: +C).(csubc g (CSort n) e2)) c2 (drop_refl c2) H0) e1 H1) h H2)))) +(drop_gen_sort n h O e1 H)))))))) (\lambda (c: C).(\lambda (H: ((\forall (e1: +C).(\forall (h: nat).((drop h O c e1) \to (\forall (c2: C).((csubc g c c2) +\to (ex2 C (\lambda (e2: C).(drop h O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (h: +nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e1) \to (\forall +(c2: C).((csubc g (CHead c k t) c2) \to (ex2 C (\lambda (e2: C).(drop n O c2 +e2)) (\lambda (e2: C).(csubc g e1 e2))))))) (\lambda (H0: (drop O O (CHead c +k t) e1)).(\lambda (c2: C).(\lambda (H1: (csubc g (CHead c k t) c2)).(eq_ind +C (CHead c k t) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop O O c2 e2)) +(\lambda (e2: C).(csubc g c0 e2)))) (ex_intro2 C (\lambda (e2: C).(drop O O +c2 e2)) (\lambda (e2: C).(csubc g (CHead c k t) e2)) c2 (drop_refl c2) H1) e1 +(drop_gen_refl (CHead c k t) e1 H0))))) (\lambda (n: nat).(\lambda (H0: +(((drop n O (CHead c k t) e1) \to (\forall (c2: C).((csubc g (CHead c k t) +c2) \to (ex2 C (\lambda (e2: C).(drop n O c2 e2)) (\lambda (e2: C).(csubc g +e1 e2)))))))).(\lambda (H1: (drop (S n) O (CHead c k t) e1)).(\lambda (c2: +C).(\lambda (H2: (csubc g (CHead c k t) c2)).(let H_x \def (csubc_gen_head_l +g c c2 t k H2) in (let H3 \def H_x in (or3_ind (ex2 C (\lambda (c3: C).(eq C +c2 (CHead c3 k t))) (\lambda (c3: C).(csubc g c c3))) (ex5_3 C T A (\lambda +(_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c t)))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T +(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) +v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c c3))))) +(ex2 C (\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 +e2))) (\lambda (H4: (ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 k t))) +(\lambda (c3: C).(csubc g c c3)))).(ex2_ind C (\lambda (c3: C).(eq C c2 +(CHead c3 k t))) (\lambda (c3: C).(csubc g c c3)) (ex2 C (\lambda (e2: +C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (x: +C).(\lambda (H5: (eq C c2 (CHead x k t))).(\lambda (H6: (csubc g c +x)).(eq_ind_r C (CHead x k t) (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop +(S n) O c0 e2)) (\lambda (e2: C).(csubc g e1 e2)))) (let H_x0 \def (H e1 (r k +n) (drop_gen_drop k c e1 t n H1) x H6) in (let H7 \def H_x0 in (ex2_ind C +(\lambda (e2: C).(drop (r k n) O x e2)) (\lambda (e2: C).(csubc g e1 e2)) +(ex2 C (\lambda (e2: C).(drop (S n) O (CHead x k t) e2)) (\lambda (e2: +C).(csubc g e1 e2))) (\lambda (x0: C).(\lambda (H8: (drop (r k n) O x +x0)).(\lambda (H9: (csubc g e1 x0)).(ex_intro2 C (\lambda (e2: C).(drop (S n) +O (CHead x k t) e2)) (\lambda (e2: C).(csubc g e1 e2)) x0 (drop_drop k n x x0 +H8 t) H9)))) H7))) c2 H5)))) H4)) (\lambda (H4: (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c t)))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind +Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c +c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c +t)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))) (ex2 +C (\lambda (e2: C).(drop (S n) O c2 e2)) (\lambda (e2: C).(csubc g e1 e2))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H5: (eq K k +(Bind Abst))).(\lambda (H6: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda +(H7: (csubc g c x0)).(\lambda (_: (sc3 g (asucc g x2) c t)).(\lambda (_: (sc3 +g x2 x0 x1)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(ex2 C +(\lambda (e2: C).(drop (S n) O c0 e2)) (\lambda (e2: C).(csubc g e1 e2)))) +(let H10 \def (eq_ind K k (\lambda (k0: K).(drop (r k0 n) O c e1)) +(drop_gen_drop k c e1 t n H1) (Bind Abst) H5) in (let H11 \def (eq_ind K k +(\lambda (k0: K).((drop n O (CHead c k0 t) e1) \to (\forall (c3: C).((csubc g +(CHead c k0 t) c3) \to (ex2 C (\lambda (e2: C).(drop n O c3 e2)) (\lambda +(e2: C).(csubc g e1 e2))))))) H0 (Bind Abst) H5) in (let H_x0 \def (H e1 (r +(Bind Abst) n) H10 x0 H7) in (let H12 \def H_x0 in (ex2_ind C (\lambda (e2: +C).(drop n O x0 e2)) (\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: +C).(drop (S n) O (CHead x0 (Bind Abbr) x1) e2)) (\lambda (e2: C).(csubc g e1 +e2))) (\lambda (x: C).(\lambda (H13: (drop n O x0 x)).(\lambda (H14: (csubc g +e1 x)).(ex_intro2 C (\lambda (e2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) +e2)) (\lambda (e2: C).(csubc g e1 e2)) x (drop_drop (Bind Abbr) n x0 x H13 +x1) H14)))) H12))))) c2 H6))))))))) H4)) (\lambda (H4: (ex4_3 B C T (\lambda +(b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind Void))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) +(\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c +c3)))))).(ex4_3_ind B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: +T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c c3)))) (ex2 C (\lambda (e2: C).(drop (S n) O c2 +e2)) (\lambda (e2: C).(csubc g e1 e2))) (\lambda (x0: B).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (H5: (eq C c2 (CHead x1 (Bind x0) x2))).(\lambda +(H6: (eq K k (Bind Void))).(\lambda (_: (not (eq B x0 Void))).(\lambda (H8: +(csubc g c x1)).(eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c0: C).(ex2 C +(\lambda (e2: C).(drop (S n) O c0 e2)) (\lambda (e2: C).(csubc g e1 e2)))) +(let H9 \def (eq_ind K k (\lambda (k0: K).(drop (r k0 n) O c e1)) +(drop_gen_drop k c e1 t n H1) (Bind Void) H6) in (let H10 \def (eq_ind K k +(\lambda (k0: K).((drop n O (CHead c k0 t) e1) \to (\forall (c3: C).((csubc g +(CHead c k0 t) c3) \to (ex2 C (\lambda (e2: C).(drop n O c3 e2)) (\lambda +(e2: C).(csubc g e1 e2))))))) H0 (Bind Void) H6) in (let H_x0 \def (H e1 (r +(Bind Void) n) H9 x1 H8) in (let H11 \def H_x0 in (ex2_ind C (\lambda (e2: +C).(drop n O x1 e2)) (\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: +C).(drop (S n) O (CHead x1 (Bind x0) x2) e2)) (\lambda (e2: C).(csubc g e1 +e2))) (\lambda (x: C).(\lambda (H12: (drop n O x1 x)).(\lambda (H13: (csubc g +e1 x)).(ex_intro2 C (\lambda (e2: C).(drop (S n) O (CHead x1 (Bind x0) x2) +e2)) (\lambda (e2: C).(csubc g e1 e2)) x (drop_drop (Bind x0) n x1 x H12 x2) +H13)))) H11))))) c2 H5)))))))) H4)) H3)))))))) h))))))) c1)). + +lemma drop_csubc_trans: + \forall (g: G).(\forall (c2: C).(\forall (e2: C).(\forall (d: nat).(\forall +(h: nat).((drop h d c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C +(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))) +\def + \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: +C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: +C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda +(c1: C).(csubc g c c1)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda +(d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda +(e1: C).(\lambda (H0: (csubc g e2 e1)).(and3_ind (eq C e2 (CSort n)) (eq nat +h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: +C).(csubc g (CSort n) c1))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: +(eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: +nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g +(CSort n) c1)))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: +C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)))) (let H4 \def +(eq_ind C e2 (\lambda (c: C).(csubc g c e1)) H0 (CSort n) H1) in (ex_intro2 C +(\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)) +e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) +(\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C +(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c +c1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: +nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) +e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h +n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) (\lambda (h: +nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall +(e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) +(\lambda (c1: C).(csubc g (CHead c k t) c1))))))) (\lambda (H0: (drop O O +(CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 +\def (eq_ind_r C e2 (\lambda (c0: C).(csubc g c0 e1)) H1 (CHead c k t) +(drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O +O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)) e1 (drop_refl e1) +H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to +(\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 +e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))).(\lambda (H1: (drop +(S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 +e1)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in +(let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) +(\lambda (c1: C).(csubc g c c1)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 +e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))) (\lambda (x: C).(\lambda +(H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g c x)).(ex_intro2 C +(\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k +t) c1)) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g c x H5 k t))))) +H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n +(CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda +(c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) +c1))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) +e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 e1)).(ex3_2_ind C T (\lambda +(e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k +n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: +C).(csubc g (CHead c k t) c1))) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) +x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda +(c0: C).(csubc g c0 e1)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 +(\lambda (c0: C).(\forall (h0: nat).((drop h0 n (CHead c k t) c0) \to +(\forall (e3: C).((csubc g c0 e3) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 +e3)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) H0 (CHead x0 k x1) +H3) in (let H8 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: nat).((drop h0 +n (CHead c k t0) (CHead x0 k x1)) \to (\forall (e3: C).((csubc g (CHead x0 k +x1) e3) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda (c1: +C).(csubc g (CHead c k t0) c1)))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r +T (lift h (r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) +c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t0) c1)))) (let H_x \def +(csubc_gen_head_l g x0 e1 x1 k H6) in (let H9 \def H_x in (or3_ind (ex2 C +(\lambda (c3: C).(eq C e1 (CHead c3 k x1))) (\lambda (c3: C).(csubc g x0 +c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k +(Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C e1 +(CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: +A).(csubc g x0 c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g +(asucc g a) x0 x1)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g +a c3 w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: +T).(eq C e1 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g x0 c3))))) (ex2 C (\lambda (c1: C).(drop h (S n) +c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1))) +(\lambda (H10: (ex2 C (\lambda (c3: C).(eq C e1 (CHead c3 k x1))) (\lambda +(c3: C).(csubc g x0 c3)))).(ex2_ind C (\lambda (c3: C).(eq C e1 (CHead c3 k +x1))) (\lambda (c3: C).(csubc g x0 c3)) (ex2 C (\lambda (c1: C).(drop h (S n) +c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1))) +(\lambda (x: C).(\lambda (H11: (eq C e1 (CHead x k x1))).(\lambda (H12: +(csubc g x0 x)).(eq_ind_r C (CHead x k x1) (\lambda (c0: C).(ex2 C (\lambda +(c1: C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r +k n) x1)) c1)))) (let H_x0 \def (H x0 (r k n) h H5 x H12) in (let H13 \def +H_x0 in (ex2_ind C (\lambda (c1: C).(drop h (r k n) c1 x)) (\lambda (c1: +C).(csubc g c c1)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) +(\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1))) (\lambda (x2: +C).(\lambda (H14: (drop h (r k n) x2 x)).(\lambda (H15: (csubc g c +x2)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) (\lambda +(c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)) (CHead x2 k (lift h (r +k n) x1)) (drop_skip k h n x2 x H14 x1) (csubc_head g c x2 H15 k (lift h (r k +n) x1)))))) H13))) e1 H11)))) H10)) (\lambda (H10: (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C e1 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x0 c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) x0 x1)))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))))).(ex5_3_ind C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C e1 (CHead c3 (Bind +Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x0 +c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) x0 +x1)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w)))) +(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g +(CHead c k (lift h (r k n) x1)) c1))) (\lambda (x2: C).(\lambda (x3: +T).(\lambda (x4: A).(\lambda (H11: (eq K k (Bind Abst))).(\lambda (H12: (eq C +e1 (CHead x2 (Bind Abbr) x3))).(\lambda (H13: (csubc g x0 x2)).(\lambda (H14: +(sc3 g (asucc g x4) x0 x1)).(\lambda (H15: (sc3 g x4 x2 x3)).(eq_ind_r C +(CHead x2 (Bind Abbr) x3) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop h (S +n) c1 c0)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)))) +(let H16 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: nat).((drop h0 n +(CHead c k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to (\forall (e3: +C).((csubc g (CHead x0 k0 x1) e3) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 +e3)) (\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) x1)) c1)))))))) +H8 (Bind Abst) H11) in (let H17 \def (eq_ind K k (\lambda (k0: K).(drop h (r +k0 n) c x0)) H5 (Bind Abst) H11) in (eq_ind_r K (Bind Abst) (\lambda (k0: +K).(ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abbr) x3))) +(\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) x1)) c1)))) (let H_x0 +\def (H x0 (r (Bind Abst) n) h H17 x2 H13) in (let H18 \def H_x0 in (ex2_ind +C (\lambda (c1: C).(drop h n c1 x2)) (\lambda (c1: C).(csubc g c c1)) (ex2 C +(\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abbr) x3))) (\lambda (c1: +C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c1))) +(\lambda (x: C).(\lambda (H19: (drop h n x x2)).(\lambda (H20: (csubc g c +x)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abbr) +x3))) (\lambda (c1: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) +n) x1)) c1)) (CHead x (Bind Abbr) (lift h n x3)) (drop_skip_bind h n x x2 H19 +Abbr x3) (csubc_abst g c x H20 (lift h (r (Bind Abst) n) x1) x4 (sc3_lift g +(asucc g x4) x0 x1 H14 c h (r (Bind Abst) n) H17) (lift h n x3) (sc3_lift g +x4 x2 x3 H15 x h n H19)))))) H18))) k H11))) e1 H12))))))))) H10)) (\lambda +(H10: (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C e1 +(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g x0 c3)))))).(ex4_3_ind B C T (\lambda (b: B).(\lambda (c3: +C).(\lambda (v2: T).(eq C e1 (CHead c3 (Bind b) v2))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g x0 c3)))) (ex2 C (\lambda (c1: +C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) +x1)) c1))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H11: +(eq C e1 (CHead x3 (Bind x2) x4))).(\lambda (H12: (eq K k (Bind +Void))).(\lambda (H13: (not (eq B x2 Void))).(\lambda (H14: (csubc g x0 +x3)).(eq_ind_r C (CHead x3 (Bind x2) x4) (\lambda (c0: C).(ex2 C (\lambda +(c1: C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r +k n) x1)) c1)))) (let H15 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: +nat).((drop h0 n (CHead c k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to +(\forall (e3: C).((csubc g (CHead x0 k0 x1) e3) \to (ex2 C (\lambda (c1: +C).(drop h0 n c1 e3)) (\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) +x1)) c1)))))))) H8 (Bind Void) H12) in (let H16 \def (eq_ind K k (\lambda +(k0: K).(drop h (r k0 n) c x0)) H5 (Bind Void) H12) in (eq_ind_r K (Bind +Void) (\lambda (k0: K).(ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x3 +(Bind x2) x4))) (\lambda (c1: C).(csubc g (CHead c k0 (lift h (r k0 n) x1)) +c1)))) (let H_x0 \def (H x0 (r (Bind Void) n) h H16 x3 H14) in (let H17 \def +H_x0 in (ex2_ind C (\lambda (c1: C).(drop h n c1 x3)) (\lambda (c1: C).(csubc +g c c1)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x3 (Bind x2) x4))) +(\lambda (c1: C).(csubc g (CHead c (Bind Void) (lift h (r (Bind Void) n) x1)) +c1))) (\lambda (x: C).(\lambda (H18: (drop h n x x3)).(\lambda (H19: (csubc g +c x)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x3 (Bind x2) +x4))) (\lambda (c1: C).(csubc g (CHead c (Bind Void) (lift h (r (Bind Void) +n) x1)) c1)) (CHead x (Bind x2) (lift h n x4)) (drop_skip_bind h n x x3 H18 +x2 x4) (csubc_void g c x H19 x2 H13 (lift h (r (Bind Void) n) x1) (lift h n +x4)))))) H17))) k H12))) e1 H11)))))))) H10)) H9))) t H4))))))))) +(drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). + +lemma csubc_drop_conf_rev: + \forall (g: G).(\forall (c2: C).(\forall (e2: C).(\forall (d: nat).(\forall +(h: nat).((drop h d c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C +(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))) +\def + \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: +C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: +C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda +(c1: C).(csubc g c1 c)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda +(d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda +(e1: C).(\lambda (H0: (csubc g e1 e2)).(and3_ind (eq C e2 (CSort n)) (eq nat +h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: +C).(csubc g c1 (CSort n)))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: +(eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: +nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g c1 +(CSort n))))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: +C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))))) (let H4 \def +(eq_ind C e2 (\lambda (c: C).(csubc g e1 c)) H0 (CSort n) H1) in (ex_intro2 C +(\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))) +e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) +(\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C +(\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 +c))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: +nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) +e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h +n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) (\lambda (h: +nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall +(e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) +(\lambda (c1: C).(csubc g c1 (CHead c k t)))))))) (\lambda (H0: (drop O O +(CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 +\def (eq_ind_r C e2 (\lambda (c0: C).(csubc g e1 c0)) H1 (CHead c k t) +(drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O +O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))) e1 (drop_refl e1) +H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to +(\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 +e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))).(\lambda (H1: (drop +(S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 +e2)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in +(let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) +(\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 +e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))) (\lambda (x: C).(\lambda +(H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g x c)).(ex_intro2 C +(\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c +k t))) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g x c H5 k t))))) +H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n +(CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda +(c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k +t)))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) +e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 e2)).(ex3_2_ind C T (\lambda +(e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k +n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: +C).(csubc g c1 (CHead c k t)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) +x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda +(c0: C).(csubc g e1 c0)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 +(\lambda (c0: C).(\forall (h0: nat).((drop h0 n (CHead c k t) c0) \to +(\forall (e3: C).((csubc g e3 c0) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 +e3)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) H0 (CHead x0 k x1) +H3) in (let H8 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: nat).((drop h0 +n (CHead c k t0) (CHead x0 k x1)) \to (\forall (e3: C).((csubc g e3 (CHead x0 +k x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda (c1: C).(csubc +g c1 (CHead c k t0))))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r T (lift h +(r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) +(\lambda (c1: C).(csubc g c1 (CHead c k t0))))) (let H_x \def +(csubc_gen_head_r g x0 e1 x1 k H6) in (let H9 \def H_x in (or3_ind (ex2 C +(\lambda (c1: C).(eq C e1 (CHead c1 k x1))) (\lambda (c1: C).(csubc g c1 +x0))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k +(Bind Abbr))))) (\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C e1 +(CHead c1 (Bind Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: +A).(csubc g c1 x0)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g +(asucc g a) c1 v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a +x0 x1))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq +C e1 (CHead c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda +(_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c1: C).(\lambda (_: +T).(csubc g c1 x0))))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda +(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) (\lambda (H10: (ex2 C +(\lambda (c1: C).(eq C e1 (CHead c1 k x1))) (\lambda (c1: C).(csubc g c1 +x0)))).(ex2_ind C (\lambda (c1: C).(eq C e1 (CHead c1 k x1))) (\lambda (c1: +C).(csubc g c1 x0)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda +(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) (\lambda (x: +C).(\lambda (H11: (eq C e1 (CHead x k x1))).(\lambda (H12: (csubc g x +x0)).(eq_ind_r C (CHead x k x1) (\lambda (c0: C).(ex2 C (\lambda (c1: +C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k +n) x1)))))) (let H_x0 \def (H x0 (r k n) h H5 x H12) in (let H13 \def H_x0 in +(ex2_ind C (\lambda (c1: C).(drop h (r k n) c1 x)) (\lambda (c1: C).(csubc g +c1 c)) (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) (\lambda +(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) (\lambda (x2: +C).(\lambda (H14: (drop h (r k n) x2 x)).(\lambda (H15: (csubc g x2 +c)).(ex_intro2 C (\lambda (c1: C).(drop h (S n) c1 (CHead x k x1))) (\lambda +(c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))) (CHead x2 k (lift h (r +k n) x1)) (drop_skip k h n x2 x H14 x1) (csubc_head g x2 c H15 k (lift h (r k +n) x1)))))) H13))) e1 H11)))) H10)) (\lambda (H10: (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c1: +C).(\lambda (v: T).(\lambda (_: A).(eq C e1 (CHead c1 (Bind Abst) v))))) +(\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 x0)))) (\lambda +(c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a x0 x1)))))).(ex5_3_ind C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) +(\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C e1 (CHead c1 (Bind +Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +x0)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 +v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a x0 x1)))) (ex2 +C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead +c k (lift h (r k n) x1))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +A).(\lambda (H11: (eq K k (Bind Abbr))).(\lambda (H12: (eq C e1 (CHead x2 +(Bind Abst) x3))).(\lambda (H13: (csubc g x2 x0)).(\lambda (H14: (sc3 g +(asucc g x4) x2 x3)).(\lambda (H15: (sc3 g x4 x0 x1)).(eq_ind_r C (CHead x2 +(Bind Abst) x3) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop h (S n) c1 +c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))))) (let +H16 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: nat).((drop h0 n (CHead c +k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to (\forall (e3: C).((csubc g e3 +(CHead x0 k0 x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda +(c1: C).(csubc g c1 (CHead c k0 (lift h (r k0 n) x1)))))))))) H8 (Bind Abbr) +H11) in (let H17 \def (eq_ind K k (\lambda (k0: K).(drop h (r k0 n) c x0)) H5 +(Bind Abbr) H11) in (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 C (\lambda +(c1: C).(drop h (S n) c1 (CHead x2 (Bind Abst) x3))) (\lambda (c1: C).(csubc +g c1 (CHead c k0 (lift h (r k0 n) x1)))))) (let H_x0 \def (H x0 (r (Bind +Abbr) n) h H17 x2 H13) in (let H18 \def H_x0 in (ex2_ind C (\lambda (c1: +C).(drop h n c1 x2)) (\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: +C).(drop h (S n) c1 (CHead x2 (Bind Abst) x3))) (\lambda (c1: C).(csubc g c1 +(CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1))))) (\lambda (x: +C).(\lambda (H19: (drop h n x x2)).(\lambda (H20: (csubc g x c)).(ex_intro2 C +(\lambda (c1: C).(drop h (S n) c1 (CHead x2 (Bind Abst) x3))) (\lambda (c1: +C).(csubc g c1 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1)))) (CHead x +(Bind Abst) (lift h n x3)) (drop_skip_bind h n x x2 H19 Abst x3) (csubc_abst +g x c H20 (lift h n x3) x4 (sc3_lift g (asucc g x4) x2 x3 H14 x h n H19) +(lift h (r (Bind Abbr) n) x1) (sc3_lift g x4 x0 x1 H15 c h (r (Bind Abbr) n) +H17)))))) H18))) k H11))) e1 H12))))))))) H10)) (\lambda (H10: (ex4_3 B C T +(\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C e1 (CHead c1 (Bind +Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) +(\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 +x0)))))).(ex4_3_ind B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: +T).(eq C e1 (CHead c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c1: +C).(\lambda (_: T).(csubc g c1 x0)))) (ex2 C (\lambda (c1: C).(drop h (S n) +c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) +(\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H11: (eq C e1 +(CHead x3 (Bind Void) x4))).(\lambda (H12: (eq K k (Bind x2))).(\lambda (H13: +(not (eq B x2 Void))).(\lambda (H14: (csubc g x3 x0)).(eq_ind_r C (CHead x3 +(Bind Void) x4) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop h (S n) c1 +c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))))) (let +H15 \def (eq_ind K k (\lambda (k0: K).(\forall (h0: nat).((drop h0 n (CHead c +k0 (lift h (r k0 n) x1)) (CHead x0 k0 x1)) \to (\forall (e3: C).((csubc g e3 +(CHead x0 k0 x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e3)) (\lambda +(c1: C).(csubc g c1 (CHead c k0 (lift h (r k0 n) x1)))))))))) H8 (Bind x2) +H12) in (let H16 \def (eq_ind K k (\lambda (k0: K).(drop h (r k0 n) c x0)) H5 +(Bind x2) H12) in (eq_ind_r K (Bind x2) (\lambda (k0: K).(ex2 C (\lambda (c1: +C).(drop h (S n) c1 (CHead x3 (Bind Void) x4))) (\lambda (c1: C).(csubc g c1 +(CHead c k0 (lift h (r k0 n) x1)))))) (let H_x0 \def (H x0 (r (Bind x2) n) h +H16 x3 H14) in (let H17 \def H_x0 in (ex2_ind C (\lambda (c1: C).(drop h n c1 +x3)) (\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: C).(drop h (S n) +c1 (CHead x3 (Bind Void) x4))) (\lambda (c1: C).(csubc g c1 (CHead c (Bind +x2) (lift h (r (Bind x2) n) x1))))) (\lambda (x: C).(\lambda (H18: (drop h n +x x3)).(\lambda (H19: (csubc g x c)).(ex_intro2 C (\lambda (c1: C).(drop h (S +n) c1 (CHead x3 (Bind Void) x4))) (\lambda (c1: C).(csubc g c1 (CHead c (Bind +x2) (lift h (r (Bind x2) n) x1)))) (CHead x (Bind Void) (lift h n x4)) +(drop_skip_bind h n x x3 H18 Void x4) (csubc_void g x c H19 x2 H13 (lift h n +x4) (lift h (r (Bind x2) n) x1)))))) H17))) k H12))) e1 H11)))))))) H10)) +H9))) t H4))))))))) (drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop1.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop1.ma new file mode 100644 index 000000000..18a783c1e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/drop1.ma @@ -0,0 +1,86 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/drop.ma". + +lemma drop1_csubc_trans: + \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: +C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C +(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))))))) +\def + \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 +e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 +c1))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 +e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(let H_y \def +(drop1_gen_pnil c2 e2 H) in (let H1 \def (eq_ind_r C e2 (\lambda (c: +C).(csubc g c e1)) H0 c2 H_y) in (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 +e1)) (\lambda (c1: C).(csubc g c2 c1)) e1 (drop1_nil e1) H1)))))))) (\lambda +(n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: +C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) +\to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 +c1)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n +n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H_x \def +(drop1_gen_pcons c2 e2 p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda +(c3: C).(drop n n0 c2 c3)) (\lambda (c3: C).(drop1 p c3 e2)) (ex2 C (\lambda +(c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1))) +(\lambda (x: C).(\lambda (H3: (drop n n0 c2 x)).(\lambda (H4: (drop1 p x +e2)).(let H_x0 \def (H x e2 H4 e1 H1) in (let H5 \def H_x0 in (ex2_ind C +(\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g x c1)) (ex2 C +(\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 +c1))) (\lambda (x0: C).(\lambda (H6: (drop1 p x0 e1)).(\lambda (H7: (csubc g +x x0)).(let H_x1 \def (drop_csubc_trans g c2 x n0 n H3 x0 H7) in (let H8 \def +H_x1 in (ex2_ind C (\lambda (c1: C).(drop n n0 c1 x0)) (\lambda (c1: +C).(csubc g c2 c1)) (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) +(\lambda (c1: C).(csubc g c2 c1))) (\lambda (x1: C).(\lambda (H9: (drop n n0 +x1 x0)).(\lambda (H10: (csubc g c2 x1)).(ex_intro2 C (\lambda (c1: C).(drop1 +(PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1)) x1 (drop1_cons x1 x0 +n n0 H9 e1 p H6) H10)))) H8)))))) H5)))))) H2)))))))))))) hds)). + +lemma csubc_drop1_conf_rev: + \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: +C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C +(\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))))))) +\def + \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 +e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 +c2))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 +e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(let H_y \def +(drop1_gen_pnil c2 e2 H) in (let H1 \def (eq_ind_r C e2 (\lambda (c: +C).(csubc g e1 c)) H0 c2 H_y) in (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 +e1)) (\lambda (c1: C).(csubc g c1 c2)) e1 (drop1_nil e1) H1)))))))) (\lambda +(n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: +C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) +\to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 +c2)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n +n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H_x \def +(drop1_gen_pcons c2 e2 p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda +(c3: C).(drop n n0 c2 c3)) (\lambda (c3: C).(drop1 p c3 e2)) (ex2 C (\lambda +(c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2))) +(\lambda (x: C).(\lambda (H3: (drop n n0 c2 x)).(\lambda (H4: (drop1 p x +e2)).(let H_x0 \def (H x e2 H4 e1 H1) in (let H5 \def H_x0 in (ex2_ind C +(\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 x)) (ex2 C +(\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 +c2))) (\lambda (x0: C).(\lambda (H6: (drop1 p x0 e1)).(\lambda (H7: (csubc g +x0 x)).(let H_x1 \def (csubc_drop_conf_rev g c2 x n0 n H3 x0 H7) in (let H8 +\def H_x1 in (ex2_ind C (\lambda (c1: C).(drop n n0 c1 x0)) (\lambda (c1: +C).(csubc g c1 c2)) (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) +(\lambda (c1: C).(csubc g c1 c2))) (\lambda (x1: C).(\lambda (H9: (drop n n0 +x1 x0)).(\lambda (H10: (csubc g x1 c2)).(ex_intro2 C (\lambda (c1: C).(drop1 +(PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2)) x1 (drop1_cons x1 x0 +n n0 H9 e1 p H6) H10)))) H8)))))) H5)))))) H2)))))))))))) hds)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/fwd.ma new file mode 100644 index 000000000..872521609 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/fwd.ma @@ -0,0 +1,664 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/defs.ma". + +implied rec lemma csubc_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: +nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubc +g c1 c2) \to ((P c1 c2) \to (\forall (k: K).(\forall (v: T).(P (CHead c1 k v) +(CHead c2 k v))))))))) (f1: (\forall (c1: C).(\forall (c2: C).((csubc g c1 +c2) \to ((P c1 c2) \to (\forall (b: B).((not (eq B b Void)) \to (\forall (u1: +T).(\forall (u2: T).(P (CHead c1 (Bind Void) u1) (CHead c2 (Bind b) +u2))))))))))) (f2: (\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to ((P +c1 c2) \to (\forall (v: T).(\forall (a: A).((sc3 g (asucc g a) c1 v) \to +(\forall (w: T).((sc3 g a c2 w) \to (P (CHead c1 (Bind Abst) v) (CHead c2 +(Bind Abbr) w)))))))))))) (c: C) (c0: C) (c1: csubc g c c0) on c1: P c c0 +\def match c1 with [(csubc_sort n) \Rightarrow (f n) | (csubc_head c2 c3 c4 k +v) \Rightarrow (f0 c2 c3 c4 ((csubc_ind g P f f0 f1 f2) c2 c3 c4) k v) | +(csubc_void c2 c3 c4 b n u1 u2) \Rightarrow (f1 c2 c3 c4 ((csubc_ind g P f f0 +f1 f2) c2 c3 c4) b n u1 u2) | (csubc_abst c2 c3 c4 v a s0 w s1) \Rightarrow +(f2 c2 c3 c4 ((csubc_ind g P f f0 f1 f2) c2 c3 c4) v a s0 w s1)]. + +lemma csubc_gen_sort_l: + \forall (g: G).(\forall (x: C).(\forall (n: nat).((csubc g (CSort n) x) \to +(eq C x (CSort n))))) +\def + \lambda (g: G).(\lambda (x: C).(\lambda (n: nat).(\lambda (H: (csubc g +(CSort n) x)).(insert_eq C (CSort n) (\lambda (c: C).(csubc g c x)) (\lambda +(c: C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (csubc g y x)).(csubc_ind g +(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) \to (eq C c0 c)))) +(\lambda (n0: nat).(\lambda (H1: (eq C (CSort n0) (CSort n))).(let H2 \def +(f_equal C nat (\lambda (e: C).(match e with [(CSort n1) \Rightarrow n1 | +(CHead _ _ _) \Rightarrow n0])) (CSort n0) (CSort n) H1) in (eq_ind_r nat n +(\lambda (n1: nat).(eq C (CSort n1) (CSort n1))) (refl_equal C (CSort n)) n0 +H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csubc g c1 +c2)).(\lambda (_: (((eq C c1 (CSort n)) \to (eq C c2 c1)))).(\lambda (k: +K).(\lambda (v: T).(\lambda (H3: (eq C (CHead c1 k v) (CSort n))).(let H4 +\def (eq_ind C (CHead c1 k v) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in +(False_ind (eq C (CHead c2 k v) (CHead c1 k v)) H4))))))))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c1 +(CSort n)) \to (eq C c2 c1)))).(\lambda (b: B).(\lambda (_: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 (Bind +Void) u1) (CSort n))).(let H5 \def (eq_ind C (CHead c1 (Bind Void) u1) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) +\Rightarrow True])) I (CSort n) H4) in (False_ind (eq C (CHead c2 (Bind b) +u2) (CHead c1 (Bind Void) u1)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c1 (CSort n)) \to (eq C +c2 c1)))).(\lambda (v: T).(\lambda (a: A).(\lambda (_: (sc3 g (asucc g a) c1 +v)).(\lambda (w: T).(\lambda (_: (sc3 g a c2 w)).(\lambda (H5: (eq C (CHead +c1 (Bind Abst) v) (CSort n))).(let H6 \def (eq_ind C (CHead c1 (Bind Abst) v) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) +\Rightarrow True])) I (CSort n) H5) in (False_ind (eq C (CHead c2 (Bind Abbr) +w) (CHead c1 (Bind Abst) v)) H6)))))))))))) y x H0))) H)))). + +lemma csubc_gen_head_l: + \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (k: +K).((csubc g (CHead c1 k v) x) \to (or3 (ex2 C (\lambda (c2: C).(eq C x +(CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c2: +C).(\lambda (w: T).(\lambda (_: A).(eq C x (CHead c2 (Bind Abbr) w))))) +(\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda +(c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T +(\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C x (CHead c2 (Bind b) +v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: T).(csubc g c1 +c2))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (k: +K).(\lambda (H: (csubc g (CHead c1 k v) x)).(insert_eq C (CHead c1 k v) +(\lambda (c: C).(csubc g c x)) (\lambda (_: C).(or3 (ex2 C (\lambda (c2: +C).(eq C x (CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c2: C).(\lambda (w: T).(\lambda (_: A).(eq C x (CHead c2 (Bind +Abbr) w))))) (\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +c2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 +v)))) (\lambda (c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) +(ex4_3 B C T (\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C x (CHead +c2 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k +(Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: T).(csubc g c1 +c2))))))) (\lambda (y: C).(\lambda (H0: (csubc g y x)).(csubc_ind g (\lambda +(c: C).(\lambda (c0: C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda +(c2: C).(eq C c0 (CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C +T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c2: C).(\lambda (w: T).(\lambda (_: A).(eq C c0 (CHead c2 (Bind +Abbr) w))))) (\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +c2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 +v)))) (\lambda (c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) +(ex4_3 B C T (\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C c0 +(CHead c2 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: +T).(csubc g c1 c2))))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) +(CHead c1 k v))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I +(CHead c1 k v) H1) in (False_ind (or3 (ex2 C (\lambda (c2: C).(eq C (CSort n) +(CHead c2 k v))) (\lambda (c2: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c2: +C).(\lambda (w: T).(\lambda (_: A).(eq C (CSort n) (CHead c2 (Bind Abbr) +w))))) (\lambda (c2: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) +(\lambda (c2: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B +C T (\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(eq C (CSort n) (CHead +c2 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k +(Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c2: C).(\lambda (_: T).(csubc g c1 +c2)))))) H2)))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (csubc g c0 +c2)).(\lambda (H2: (((eq C c0 (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: +C).(eq C c2 (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind +Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 +v)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) +(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 +(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g c1 c3))))))))).(\lambda (k0: K).(\lambda (v0: T).(\lambda (H3: +(eq C (CHead c0 k0 v0) (CHead c1 k v))).(let H4 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow +c])) (CHead c0 k0 v0) (CHead c1 k v) H3) in ((let H5 \def (f_equal C K +(\lambda (e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) +\Rightarrow k1])) (CHead c0 k0 v0) (CHead c1 k v) H3) in ((let H6 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v0 | (CHead +_ _ t) \Rightarrow t])) (CHead c0 k0 v0) (CHead c1 k v) H3) in (\lambda (H7: +(eq K k0 k)).(\lambda (H8: (eq C c0 c1)).(eq_ind_r T v (\lambda (t: T).(or3 +(ex2 C (\lambda (c3: C).(eq C (CHead c2 k0 t) (CHead c3 k v))) (\lambda (c3: +C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K k (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: +A).(eq C (CHead c2 k0 t) (CHead c3 (Bind Abbr) w))))) (\lambda (c3: +C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda +(b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead c2 k0 t) (CHead c3 +(Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k +(Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 +c3))))))) (eq_ind_r K k (\lambda (k1: K).(or3 (ex2 C (\lambda (c3: C).(eq C +(CHead c2 k1 v) (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C +T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C (CHead c2 k1 v) (CHead +c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc +g c1 c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g +a) c1 v)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 +w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C +(CHead c2 k1 v) (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c1 c3))))))) (let H9 \def (eq_ind C c0 (\lambda +(c: C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 +(CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T +(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) +v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 +c3)))))))) H2 c1 H8) in (let H10 \def (eq_ind C c0 (\lambda (c: C).(csubc g c +c2)) H1 c1 H8) in (or3_intro0 (ex2 C (\lambda (c3: C).(eq C (CHead c2 k v) +(CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C (CHead c2 k v) (CHead c3 (Bind Abbr) +w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) +(\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B +C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead c2 k v) +(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g c1 c3))))) (ex_intro2 C (\lambda (c3: C).(eq C (CHead c2 k v) +(CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3)) c2 (refl_equal C (CHead c2 +k v)) H10)))) k0 H7) v0 H6)))) H5)) H4))))))))) (\lambda (c0: C).(\lambda +(c2: C).(\lambda (H1: (csubc g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 k +v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 k v))) (\lambda (c3: +C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K k (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: +A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: C).(\lambda (w: +T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda (b: B).(\lambda +(c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) v2))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind Void))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 c3))))))))).(\lambda (b: +B).(\lambda (H3: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c0 (Bind Void) u1) (CHead c1 k v))).(let H5 +\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | +(CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Void) u1) (CHead c1 k v) H4) +in ((let H6 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) +\Rightarrow (Bind Void) | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 (Bind +Void) u1) (CHead c1 k v) H4) in ((let H7 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) +(CHead c0 (Bind Void) u1) (CHead c1 k v) H4) in (\lambda (H8: (eq K (Bind +Void) k)).(\lambda (H9: (eq C c0 c1)).(let H10 \def (eq_ind C c0 (\lambda (c: +C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 (CHead +c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T +(\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind +b0) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 +c3)))))))) H2 c1 H9) in (let H11 \def (eq_ind C c0 (\lambda (c: C).(csubc g c +c2)) H1 c1 H9) in (let H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c1 +(CHead c1 k0 v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 (CHead c3 k0 v))) +(\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: C).(\lambda (w: +T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: +C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda +(b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b0) +v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k0 (Bind +Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 +c3)))))))) H10 (Bind Void) H8) in (eq_ind K (Bind Void) (\lambda (k0: K).(or3 +(ex2 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) u2) (CHead c3 k0 v))) +(\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: C).(\lambda (w: +T).(\lambda (_: A).(eq C (CHead c2 (Bind b) u2) (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T +(\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead c2 (Bind b) +u2) (CHead c3 (Bind b0) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K k0 (Bind Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g c1 c3))))))) (or3_intro2 (ex2 C (\lambda (c3: C).(eq C (CHead c2 +(Bind b) u2) (CHead c3 (Bind Void) v))) (\lambda (c3: C).(csubc g c1 c3))) +(ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind +Void) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C +(CHead c2 (Bind b) u2) (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda +(_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (c3: C).(\lambda (w: +T).(\lambda (a: A).(sc3 g a c3 w))))) (ex4_3 B C T (\lambda (b0: B).(\lambda +(c3: C).(\lambda (v2: T).(eq C (CHead c2 (Bind b) u2) (CHead c3 (Bind b0) +v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Void) +(Bind Void))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B +b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 +c3))))) (ex4_3_intro B C T (\lambda (b0: B).(\lambda (c3: C).(\lambda (v2: +T).(eq C (CHead c2 (Bind b) u2) (CHead c3 (Bind b0) v2))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Void) (Bind Void))))) (\lambda +(b0: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 c3)))) b c2 u2 (refl_equal C +(CHead c2 (Bind b) u2)) (refl_equal K (Bind Void)) H3 H11)) k H8))))))) H6)) +H5))))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (csubc g c0 +c2)).(\lambda (H2: (((eq C c0 (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: +C).(eq C c2 (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c3: C).(\lambda (w: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind +Abbr) w))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g (asucc g a) c1 +v)))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a: A).(sc3 g a c3 w))))) +(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 +(CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g c1 c3))))))))).(\lambda (v0: T).(\lambda (a: A).(\lambda (H3: +(sc3 g (asucc g a) c0 v0)).(\lambda (w: T).(\lambda (H4: (sc3 g a c2 +w)).(\lambda (H5: (eq C (CHead c0 (Bind Abst) v0) (CHead c1 k v))).(let H6 +\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | +(CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Abst) v0) (CHead c1 k v) H5) +in ((let H7 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) +\Rightarrow (Bind Abst) | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 (Bind +Abst) v0) (CHead c1 k v) H5) in ((let H8 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) +(CHead c0 (Bind Abst) v0) (CHead c1 k v) H5) in (\lambda (H9: (eq K (Bind +Abst) k)).(\lambda (H10: (eq C c0 c1)).(let H11 \def (eq_ind T v0 (\lambda +(t: T).(sc3 g (asucc g a) c0 t)) H3 v H8) in (let H12 \def (eq_ind C c0 +(\lambda (c: C).(sc3 g (asucc g a) c v)) H11 c1 H10) in (let H13 \def (eq_ind +C c0 (\lambda (c: C).((eq C c (CHead c1 k v)) \to (or3 (ex2 C (\lambda (c3: +C).(eq C c2 (CHead c3 k v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abst))))) +(\lambda (c3: C).(\lambda (w0: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind +Abbr) w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) +c1 v)))) (\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 +w0))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C +c2 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K k (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g c1 c3)))))))) H2 c1 H10) in (let H14 \def (eq_ind C c0 (\lambda +(c: C).(csubc g c c2)) H1 c1 H10) in (let H15 \def (eq_ind_r K k (\lambda +(k0: K).((eq C c1 (CHead c1 k0 v)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c2 +(CHead c3 k0 v))) (\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda +(_: C).(\lambda (_: T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: +C).(\lambda (w0: T).(\lambda (_: A).(eq C c2 (CHead c3 (Bind Abbr) w0))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) c1 v)))) (\lambda +(c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 w0))))) (ex4_3 B C T +(\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C c2 (CHead c3 (Bind b) +v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K k0 (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c1 +c3)))))))) H13 (Bind Abst) H9) in (eq_ind K (Bind Abst) (\lambda (k0: K).(or3 +(ex2 C (\lambda (c3: C).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 k0 v))) +(\lambda (c3: C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K k0 (Bind Abst))))) (\lambda (c3: C).(\lambda (w0: +T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 (Bind Abbr) +w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) c1 v)))) +(\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 w0))))) +(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead +c2 (Bind Abbr) w) (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K k0 (Bind Void))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c1 c3))))))) (or3_intro1 (ex2 C (\lambda (c3: +C).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 (Bind Abst) v))) (\lambda (c3: +C).(csubc g c1 c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda (c3: C).(\lambda (w0: +T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) w) (CHead c3 (Bind Abbr) +w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c3)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g (asucc g a0) c1 v)))) +(\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 g a0 c3 w0))))) +(ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C (CHead +c2 (Bind Abbr) w) (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K (Bind Abst) (Bind Void))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c1 c3))))) (ex5_3_intro C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda +(c3: C).(\lambda (w0: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) w) +(CHead c3 (Bind Abbr) w0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: +A).(csubc g c1 c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g +(asucc g a0) c1 v)))) (\lambda (c3: C).(\lambda (w0: T).(\lambda (a0: A).(sc3 +g a0 c3 w0)))) c2 w a (refl_equal K (Bind Abst)) (refl_equal C (CHead c2 +(Bind Abbr) w)) H14 H12 H4)) k H9))))))))) H7)) H6)))))))))))) y x H0))) +H)))))). + +lemma csubc_gen_sort_r: + \forall (g: G).(\forall (x: C).(\forall (n: nat).((csubc g x (CSort n)) \to +(eq C x (CSort n))))) +\def + \lambda (g: G).(\lambda (x: C).(\lambda (n: nat).(\lambda (H: (csubc g x +(CSort n))).(insert_eq C (CSort n) (\lambda (c: C).(csubc g x c)) (\lambda +(c: C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (csubc g x y)).(csubc_ind g +(\lambda (c: C).(\lambda (c0: C).((eq C c0 (CSort n)) \to (eq C c c0)))) +(\lambda (n0: nat).(\lambda (H1: (eq C (CSort n0) (CSort n))).(let H2 \def +(f_equal C nat (\lambda (e: C).(match e with [(CSort n1) \Rightarrow n1 | +(CHead _ _ _) \Rightarrow n0])) (CSort n0) (CSort n) H1) in (eq_ind_r nat n +(\lambda (n1: nat).(eq C (CSort n1) (CSort n1))) (refl_equal C (CSort n)) n0 +H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csubc g c1 +c2)).(\lambda (_: (((eq C c2 (CSort n)) \to (eq C c1 c2)))).(\lambda (k: +K).(\lambda (v: T).(\lambda (H3: (eq C (CHead c2 k v) (CSort n))).(let H4 +\def (eq_ind C (CHead c2 k v) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in +(False_ind (eq C (CHead c1 k v) (CHead c2 k v)) H4))))))))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c2 +(CSort n)) \to (eq C c1 c2)))).(\lambda (b: B).(\lambda (_: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c2 (Bind +b) u2) (CSort n))).(let H5 \def (eq_ind C (CHead c2 (Bind b) u2) (\lambda +(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) +\Rightarrow True])) I (CSort n) H4) in (False_ind (eq C (CHead c1 (Bind Void) +u1) (CHead c2 (Bind b) u2)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (_: (csubc g c1 c2)).(\lambda (_: (((eq C c2 (CSort n)) \to (eq C +c1 c2)))).(\lambda (v: T).(\lambda (a: A).(\lambda (_: (sc3 g (asucc g a) c1 +v)).(\lambda (w: T).(\lambda (_: (sc3 g a c2 w)).(\lambda (H5: (eq C (CHead +c2 (Bind Abbr) w) (CSort n))).(let H6 \def (eq_ind C (CHead c2 (Bind Abbr) w) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) +\Rightarrow True])) I (CSort n) H5) in (False_ind (eq C (CHead c1 (Bind Abst) +v) (CHead c2 (Bind Abbr) w)) H6)))))))))))) x y H0))) H)))). + +lemma csubc_gen_head_r: + \forall (g: G).(\forall (c2: C).(\forall (x: C).(\forall (w: T).(\forall (k: +K).((csubc g x (CHead c2 k w)) \to (or3 (ex2 C (\lambda (c1: C).(eq C x +(CHead c1 k w))) (\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c1: +C).(\lambda (v: T).(\lambda (_: A).(eq C x (CHead c1 (Bind Abst) v))))) +(\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) (\lambda +(c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T +(\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C x (CHead c1 (Bind +Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) +(\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 c2))))))))))) +\def + \lambda (g: G).(\lambda (c2: C).(\lambda (x: C).(\lambda (w: T).(\lambda (k: +K).(\lambda (H: (csubc g x (CHead c2 k w))).(insert_eq C (CHead c2 k w) +(\lambda (c: C).(csubc g x c)) (\lambda (_: C).(or3 (ex2 C (\lambda (c1: +C).(eq C x (CHead c1 k w))) (\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) +(\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C x (CHead c1 (Bind +Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +c2)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 +v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) +(ex4_3 B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C x (CHead +c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K +k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 +c2))))))) (\lambda (y: C).(\lambda (H0: (csubc g x y)).(csubc_ind g (\lambda +(c: C).(\lambda (c0: C).((eq C c0 (CHead c2 k w)) \to (or3 (ex2 C (\lambda +(c1: C).(eq C c (CHead c1 k w))) (\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C +T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) +(\lambda (c1: C).(\lambda (v: T).(\lambda (_: A).(eq C c (CHead c1 (Bind +Abst) v))))) (\lambda (c1: C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 +c2)))) (\lambda (c1: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 +v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) +(ex4_3 B C T (\lambda (_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C c (CHead +c1 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K +k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 +c2))))))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead c2 k +w))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort +_) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c2 k w) H1) +in (False_ind (or3 (ex2 C (\lambda (c1: C).(eq C (CSort n) (CHead c1 k w))) +(\lambda (c1: C).(csubc g c1 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c1: C).(\lambda (v: +T).(\lambda (_: A).(eq C (CSort n) (CHead c1 (Bind Abst) v))))) (\lambda (c1: +C).(\lambda (_: T).(\lambda (_: A).(csubc g c1 c2)))) (\lambda (c1: +C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c1 v)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda +(_: B).(\lambda (c1: C).(\lambda (v1: T).(eq C (CSort n) (CHead c1 (Bind +Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) +(\lambda (_: B).(\lambda (c1: C).(\lambda (_: T).(csubc g c1 c2)))))) H2)))) +(\lambda (c1: C).(\lambda (c0: C).(\lambda (H1: (csubc g c1 c0)).(\lambda +(H2: (((eq C c0 (CHead c2 k w)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c1 +(CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: +C).(\lambda (v: T).(\lambda (_: A).(eq C c1 (CHead c3 (Bind Abst) v))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda +(c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T +(\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind +Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) +(\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 +c2))))))))).(\lambda (k0: K).(\lambda (v: T).(\lambda (H3: (eq C (CHead c0 k0 +v) (CHead c2 k w))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 v) +(CHead c2 k w) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e +with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 +k0 v) (CHead c2 k w) H3) in ((let H6 \def (f_equal C T (\lambda (e: C).(match +e with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 +v) (CHead c2 k w) H3) in (\lambda (H7: (eq K k0 k)).(\lambda (H8: (eq C c0 +c2)).(eq_ind_r T w (\lambda (t: T).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead +c1 k0 t) (CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) +(\lambda (c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C (CHead c1 k0 t) +(CHead c3 (Bind Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: +A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 +g (asucc g a) c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 +g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: +T).(eq C (CHead c1 k0 t) (CHead c3 (Bind Void) v1))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2))))))) (eq_ind_r K k +(\lambda (k1: K).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead c1 k1 w) (CHead c3 +k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: +C).(\lambda (v0: T).(\lambda (_: A).(eq C (CHead c1 k1 w) (CHead c3 (Bind +Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 +c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 g (asucc g a) +c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) +(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead +c1 k1 w) (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c3 c2))))))) (let H9 \def (eq_ind C c0 (\lambda +(c: C).((eq C c (CHead c2 k w)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c1 +(CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: +C).(\lambda (v0: T).(\lambda (_: A).(eq C c1 (CHead c3 (Bind Abst) v0))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda +(c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v0)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C +T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind +Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind +b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) +(\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2)))))))) H2 c2 +H8) in (let H10 \def (eq_ind C c0 (\lambda (c: C).(csubc g c1 c)) H1 c2 H8) +in (or3_intro0 (ex2 C (\lambda (c3: C).(eq C (CHead c1 k w) (CHead c3 k w))) +(\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v0: +T).(\lambda (_: A).(eq C (CHead c1 k w) (CHead c3 (Bind Abst) v0))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda +(c3: C).(\lambda (v0: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v0)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C +T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead c1 k w) +(CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not +(eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g +c3 c2))))) (ex_intro2 C (\lambda (c3: C).(eq C (CHead c1 k w) (CHead c3 k +w))) (\lambda (c3: C).(csubc g c3 c2)) c1 (refl_equal C (CHead c1 k w)) +H10)))) k0 H7) v H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c0: +C).(\lambda (H1: (csubc g c1 c0)).(\lambda (H2: (((eq C c0 (CHead c2 k w)) +\to (or3 (ex2 C (\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: +C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: +A).(eq C c1 (CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: +T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda +(c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2))))))))).(\lambda (b: +B).(\lambda (H3: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c0 (Bind b) u2) (CHead c2 k w))).(let H5 \def +(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead +c _ _) \Rightarrow c])) (CHead c0 (Bind b) u2) (CHead c2 k w) H4) in ((let H6 +\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind +b) | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 (Bind b) u2) (CHead c2 k w) +H4) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind b) u2) (CHead +c2 k w) H4) in (\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c0 +c2)).(let H10 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c2 k w)) \to +(or3 (ex2 C (\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: +C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: +A).(eq C c1 (CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: +T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda +(c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b0))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2)))))))) H2 c2 H9) in (let +H11 \def (eq_ind C c0 (\lambda (c: C).(csubc g c1 c)) H1 c2 H9) in (let H12 +\def (eq_ind_r K k (\lambda (k0: K).((eq C c2 (CHead c2 k0 w)) \to (or3 (ex2 +C (\lambda (c3: C).(eq C c1 (CHead c3 k0 w))) (\lambda (c3: C).(csubc g c3 +c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k0 +(Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: A).(eq C c1 +(CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: +A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g +(asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a +c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq +C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda (_: C).(\lambda +(_: T).(eq K k0 (Bind b0))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: +T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g c3 c2)))))))) H10 (Bind b) H8) in (eq_ind K (Bind b) (\lambda +(k0: K).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead c1 (Bind Void) u1) (CHead +c3 k0 w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K k0 (Bind Abbr))))) (\lambda (c3: +C).(\lambda (v: T).(\lambda (_: A).(eq C (CHead c1 (Bind Void) u1) (CHead c3 +(Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g +c3 c2)))) (\lambda (c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) +c3 v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) +(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead +c1 (Bind Void) u1) (CHead c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (_: T).(eq K k0 (Bind b0))))) (\lambda (b0: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c3 c2))))))) (or3_intro2 (ex2 C (\lambda (c3: +C).(eq C (CHead c1 (Bind Void) u1) (CHead c3 (Bind b) w))) (\lambda (c3: +C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K (Bind b) (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: +T).(\lambda (_: A).(eq C (CHead c1 (Bind Void) u1) (CHead c3 (Bind Abst) +v))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) +(\lambda (c3: C).(\lambda (v: T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C +T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead c1 (Bind +Void) u1) (CHead c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda (_: +C).(\lambda (_: T).(eq K (Bind b) (Bind b0))))) (\lambda (b0: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c3 c2))))) (ex4_3_intro B C T (\lambda (_: +B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead c1 (Bind Void) u1) (CHead +c3 (Bind Void) v1))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(eq K +(Bind b) (Bind b0))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (_: T).(not +(eq B b0 Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g +c3 c2)))) b c1 u1 (refl_equal C (CHead c1 (Bind Void) u1)) (refl_equal K +(Bind b)) H3 H11)) k H8))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda +(c0: C).(\lambda (H1: (csubc g c1 c0)).(\lambda (H2: (((eq C c0 (CHead c2 k +w)) \to (or3 (ex2 C (\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: +C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K k (Bind Abbr))))) (\lambda (c3: C).(\lambda (v: T).(\lambda (_: +A).(eq C c1 (CHead c3 (Bind Abst) v))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v: +T).(\lambda (a: A).(sc3 g (asucc g a) c3 v)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(sc3 g a c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda +(c3: C).(\lambda (v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: +B).(\lambda (c3: C).(\lambda (_: T).(csubc g c3 c2))))))))).(\lambda (v: +T).(\lambda (a: A).(\lambda (H3: (sc3 g (asucc g a) c1 v)).(\lambda (w0: +T).(\lambda (H4: (sc3 g a c0 w0)).(\lambda (H5: (eq C (CHead c0 (Bind Abbr) +w0) (CHead c2 k w))).(let H6 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Bind +Abbr) w0) (CHead c2 k w) H5) in ((let H7 \def (f_equal C K (\lambda (e: +C).(match e with [(CSort _) \Rightarrow (Bind Abbr) | (CHead _ k0 _) +\Rightarrow k0])) (CHead c0 (Bind Abbr) w0) (CHead c2 k w) H5) in ((let H8 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow w0 | +(CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind Abbr) w0) (CHead c2 k w) H5) +in (\lambda (H9: (eq K (Bind Abbr) k)).(\lambda (H10: (eq C c0 c2)).(let H11 +\def (eq_ind T w0 (\lambda (t: T).(sc3 g a c0 t)) H4 w H8) in (let H12 \def +(eq_ind C c0 (\lambda (c: C).(sc3 g a c w)) H11 c2 H10) in (let H13 \def +(eq_ind C c0 (\lambda (c: C).((eq C c (CHead c2 k w)) \to (or3 (ex2 C +(\lambda (c3: C).(eq C c1 (CHead c3 k w))) (\lambda (c3: C).(csubc g c3 c2))) +(ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k (Bind +Abbr))))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C c1 (CHead +c3 (Bind Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: +A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 +g (asucc g a0) c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: +A).(sc3 g a0 c2 w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda +(v1: T).(eq C c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(eq K k (Bind b))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c3 c2)))))))) H2 c2 H10) in (let H14 \def (eq_ind +C c0 (\lambda (c: C).(csubc g c1 c)) H1 c2 H10) in (let H15 \def (eq_ind_r K +k (\lambda (k0: K).((eq C c2 (CHead c2 k0 w)) \to (or3 (ex2 C (\lambda (c3: +C).(eq C c1 (CHead c3 k0 w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A +(\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K k0 (Bind Abbr))))) +(\lambda (c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C c1 (CHead c3 (Bind +Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 +c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 g (asucc g a0) +c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g a0 c2 +w))))) (ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C +c1 (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: +T).(eq K k0 (Bind b))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not +(eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g +c3 c2)))))))) H13 (Bind Abbr) H9) in (eq_ind K (Bind Abbr) (\lambda (k0: +K).(or3 (ex2 C (\lambda (c3: C).(eq C (CHead c1 (Bind Abst) v) (CHead c3 k0 +w))) (\lambda (c3: C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda +(_: T).(\lambda (_: A).(eq K k0 (Bind Abbr))))) (\lambda (c3: C).(\lambda +(v0: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) v) (CHead c3 (Bind Abst) +v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) +(\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 g (asucc g a0) c3 +v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g a0 c2 w))))) +(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead +c1 (Bind Abst) v) (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(eq K k0 (Bind b))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c3 c2))))))) (or3_intro1 (ex2 C (\lambda (c3: +C).(eq C (CHead c1 (Bind Abst) v) (CHead c3 (Bind Abbr) w))) (\lambda (c3: +C).(csubc g c3 c2))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda +(_: A).(eq K (Bind Abbr) (Bind Abbr))))) (\lambda (c3: C).(\lambda (v0: +T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) v) (CHead c3 (Bind Abst) +v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g c3 c2)))) +(\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 g (asucc g a0) c3 +v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(sc3 g a0 c2 w))))) +(ex4_3 B C T (\lambda (_: B).(\lambda (c3: C).(\lambda (v1: T).(eq C (CHead +c1 (Bind Abst) v) (CHead c3 (Bind Void) v1))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (_: T).(eq K (Bind Abbr) (Bind b))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g c3 c2))))) (ex5_3_intro C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind Abbr) (Bind Abbr))))) (\lambda +(c3: C).(\lambda (v0: T).(\lambda (_: A).(eq C (CHead c1 (Bind Abst) v) +(CHead c3 (Bind Abst) v0))))) (\lambda (c3: C).(\lambda (_: T).(\lambda (_: +A).(csubc g c3 c2)))) (\lambda (c3: C).(\lambda (v0: T).(\lambda (a0: A).(sc3 +g (asucc g a0) c3 v0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: +A).(sc3 g a0 c2 w)))) c1 v a (refl_equal K (Bind Abbr)) (refl_equal C (CHead +c1 (Bind Abst) v)) H14 H3 H12)) k H9))))))))) H7)) H6)))))))))))) x y H0))) +H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/getl.ma new file mode 100644 index 000000000..16c59d2d7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/getl.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/drop.ma". + +include "basic_1A/csubc/clear.ma". + +lemma csubc_getl_conf: + \forall (g: G).(\forall (c1: C).(\forall (e1: C).(\forall (i: nat).((getl i +c1 e1) \to (\forall (c2: C).((csubc g c1 c2) \to (ex2 C (\lambda (e2: +C).(getl i c2 e2)) (\lambda (e2: C).(csubc g e1 e2))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (e1: C).(\lambda (i: nat).(\lambda +(H: (getl i c1 e1)).(\lambda (c2: C).(\lambda (H0: (csubc g c1 c2)).(let H1 +\def (getl_gen_all c1 e1 i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) +(\lambda (e: C).(clear e e1)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) +(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x: C).(\lambda (H2: (drop i O c1 +x)).(\lambda (H3: (clear x e1)).(let H_x \def (csubc_drop_conf_O g c1 x i H2 +c2 H0) in (let H4 \def H_x in (ex2_ind C (\lambda (e2: C).(drop i O c2 e2)) +(\lambda (e2: C).(csubc g x e2)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) +(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x0: C).(\lambda (H5: (drop i O +c2 x0)).(\lambda (H6: (csubc g x x0)).(let H_x0 \def (csubc_clear_conf g x e1 +H3 x0 H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (e2: C).(clear x0 e2)) +(\lambda (e2: C).(csubc g e1 e2)) (ex2 C (\lambda (e2: C).(getl i c2 e2)) +(\lambda (e2: C).(csubc g e1 e2))) (\lambda (x1: C).(\lambda (H8: (clear x0 +x1)).(\lambda (H9: (csubc g e1 x1)).(ex_intro2 C (\lambda (e2: C).(getl i c2 +e2)) (\lambda (e2: C).(csubc g e1 e2)) x1 (getl_intro i c2 x1 x0 H5 H8) +H9)))) H7)))))) H4)))))) H1)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubc/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubc/props.ma new file mode 100644 index 000000000..8daf40269 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubc/props.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/defs.ma". + +include "basic_1A/sc3/props.ma". + +lemma csubc_refl: + \forall (g: G).(\forall (c: C).(csubc g c c)) +\def + \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csubc g c0 c0)) +(\lambda (n: nat).(csubc_sort g n)) (\lambda (c0: C).(\lambda (H: (csubc g c0 +c0)).(\lambda (k: K).(\lambda (t: T).(csubc_head g c0 c0 H k t))))) c)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst0/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/clear.ma new file mode 100644 index 000000000..ab3e38cb4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/clear.ma @@ -0,0 +1,1170 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst0/props.ma". + +include "basic_1A/csubst0/fwd.ma". + +include "basic_1A/clear/fwd.ma". + +lemma csubst0_clear_O: + \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to +(\forall (c: C).((clear c1 c) \to (clear c2 c)))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: +T).((csubst0 O v c c2) \to (\forall (c0: C).((clear c c0) \to (clear c2 +c0))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: +(csubst0 O v (CSort n) c2)).(\lambda (c: C).(\lambda (_: (clear (CSort n) +c)).(csubst0_gen_sort c2 v O n H (clear c2 c)))))))) (\lambda (c: C).(\lambda +(H: ((\forall (c2: C).(\forall (v: T).((csubst0 O v c c2) \to (\forall (c0: +C).((clear c c0) \to (clear c2 c0)))))))).(\lambda (k: K).(\lambda (t: +T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 O v (CHead c k t) +c2)).(\lambda (c0: C).(\lambda (H1: (clear (CHead c k t) c0)).(let H2 \def +(csubst0_gen_head k c c2 t v O H0) in (or3_ind (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (clear c2 c0) +(\lambda (H3: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat O (s k +j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda +(u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2))) (clear c2 c0) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: (eq +nat O (s k x1))).(\lambda (H5: (eq C c2 (CHead c k x0))).(\lambda (H6: +(subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c3: C).(clear c3 +c0)) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 +x1)) \to (clear (CHead c k0 x0) c0)))) (\lambda (b: B).(\lambda (_: (clear +(CHead c (Bind b) t) c0)).(\lambda (H8: (eq nat O (s (Bind b) x1))).(let H9 +\def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True | (S +_) \Rightarrow False])) I (S x1) H8) in (False_ind (clear (CHead c (Bind b) +x0) c0) H9))))) (\lambda (f: F).(\lambda (H7: (clear (CHead c (Flat f) t) +c0)).(\lambda (H8: (eq nat O (s (Flat f) x1))).(let H9 \def (eq_ind_r nat x1 +(\lambda (n: nat).(subst0 n v t x0)) H6 O H8) in (clear_flat c c0 +(clear_gen_flat f c c0 t H7) f x0))))) k H1 H4) c2 H5)))))) H3)) (\lambda +(H3: (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j)))) +(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3))) (clear c2 c0) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq +nat O (s k x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: +(csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c3: C).(clear c3 +c0)) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 +x1)) \to (clear (CHead x0 k0 t) c0)))) (\lambda (b: B).(\lambda (_: (clear +(CHead c (Bind b) t) c0)).(\lambda (H8: (eq nat O (s (Bind b) x1))).(let H9 +\def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True | (S +_) \Rightarrow False])) I (S x1) H8) in (False_ind (clear (CHead x0 (Bind b) +t) c0) H9))))) (\lambda (f: F).(\lambda (H7: (clear (CHead c (Flat f) t) +c0)).(\lambda (H8: (eq nat O (s (Flat f) x1))).(let H9 \def (eq_ind_r nat x1 +(\lambda (n: nat).(csubst0 n v c x0)) H6 O H8) in (clear_flat x0 c0 (H x0 v +H9 c0 (clear_gen_flat f c c0 t H7)) f t))))) k H1 H4) c2 H5)))))) H3)) +(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (clear c2 c0) (\lambda (x0: +T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H4: (eq nat O (s k +x2))).(\lambda (H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t +x0)).(\lambda (H7: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda +(c3: C).(clear c3 c0)) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to +((eq nat O (s k0 x2)) \to (clear (CHead x1 k0 x0) c0)))) (\lambda (b: +B).(\lambda (_: (clear (CHead c (Bind b) t) c0)).(\lambda (H9: (eq nat O (s +(Bind b) x2))).(let H10 \def (eq_ind nat O (\lambda (ee: nat).(match ee with +[O \Rightarrow True | (S _) \Rightarrow False])) I (S x2) H9) in (False_ind +(clear (CHead x1 (Bind b) x0) c0) H10))))) (\lambda (f: F).(\lambda (H8: +(clear (CHead c (Flat f) t) c0)).(\lambda (H9: (eq nat O (s (Flat f) +x2))).(let H10 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H7 +O H9) in (let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) +H6 O H9) in (clear_flat x1 c0 (H x1 v H10 c0 (clear_gen_flat f c c0 t H8)) f +x0)))))) k H1 H4) c2 H5)))))))) H3)) H2))))))))))) c1). + +lemma csubst0_clear_O_back: + \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to +(\forall (c: C).((clear c2 c) \to (clear c1 c)))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: +T).((csubst0 O v c c2) \to (\forall (c0: C).((clear c2 c0) \to (clear c +c0))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: +(csubst0 O v (CSort n) c2)).(\lambda (c: C).(\lambda (_: (clear c2 +c)).(csubst0_gen_sort c2 v O n H (clear (CSort n) c)))))))) (\lambda (c: +C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).((csubst0 O v c c2) \to +(\forall (c0: C).((clear c2 c0) \to (clear c c0)))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 O +v (CHead c k t) c2)).(\lambda (c0: C).(\lambda (H1: (clear c2 c0)).(let H2 +\def (csubst0_gen_head k c c2 t v O H0) in (or3_ind (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (clear (CHead c +k t) c0) (\lambda (H3: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat +O (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) +(\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))) (clear (CHead c k t) c0) (\lambda (x0: T).(\lambda +(x1: nat).(\lambda (H4: (eq nat O (s k x1))).(\lambda (H5: (eq C c2 (CHead c +k x0))).(\lambda (H6: (subst0 x1 v t x0)).(let H7 \def (eq_ind C c2 (\lambda +(c3: C).(clear c3 c0)) H1 (CHead c k x0) H5) in (K_ind (\lambda (k0: K).((eq +nat O (s k0 x1)) \to ((clear (CHead c k0 x0) c0) \to (clear (CHead c k0 t) +c0)))) (\lambda (b: B).(\lambda (H8: (eq nat O (s (Bind b) x1))).(\lambda (_: +(clear (CHead c (Bind b) x0) c0)).(let H10 \def (eq_ind nat O (\lambda (ee: +nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) +H8) in (False_ind (clear (CHead c (Bind b) t) c0) H10))))) (\lambda (f: +F).(\lambda (H8: (eq nat O (s (Flat f) x1))).(\lambda (H9: (clear (CHead c +(Flat f) x0) c0)).(let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n +v t x0)) H6 O H8) in (clear_flat c c0 (clear_gen_flat f c c0 x0 H9) f t))))) +k H4 H7))))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (clear (CHead c k t) c0) +(\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat O (s k +x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 v c +x0)).(let H7 \def (eq_ind C c2 (\lambda (c3: C).(clear c3 c0)) H1 (CHead x0 k +t) H5) in (K_ind (\lambda (k0: K).((eq nat O (s k0 x1)) \to ((clear (CHead x0 +k0 t) c0) \to (clear (CHead c k0 t) c0)))) (\lambda (b: B).(\lambda (H8: (eq +nat O (s (Bind b) x1))).(\lambda (_: (clear (CHead x0 (Bind b) t) c0)).(let +H10 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow True +| (S _) \Rightarrow False])) I (S x1) H8) in (False_ind (clear (CHead c (Bind +b) t) c0) H10))))) (\lambda (f: F).(\lambda (H8: (eq nat O (s (Flat f) +x1))).(\lambda (H9: (clear (CHead x0 (Flat f) t) c0)).(let H10 \def (eq_ind_r +nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H6 O H8) in (clear_flat c c0 (H +x0 v H10 c0 (clear_gen_flat f x0 c0 t H9)) f t))))) k H4 H7))))))) H3)) +(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (clear (CHead c k t) c0) (\lambda +(x0: T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H4: (eq nat O (s k +x2))).(\lambda (H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t +x0)).(\lambda (H7: (csubst0 x2 v c x1)).(let H8 \def (eq_ind C c2 (\lambda +(c3: C).(clear c3 c0)) H1 (CHead x1 k x0) H5) in (K_ind (\lambda (k0: K).((eq +nat O (s k0 x2)) \to ((clear (CHead x1 k0 x0) c0) \to (clear (CHead c k0 t) +c0)))) (\lambda (b: B).(\lambda (H9: (eq nat O (s (Bind b) x2))).(\lambda (_: +(clear (CHead x1 (Bind b) x0) c0)).(let H11 \def (eq_ind nat O (\lambda (ee: +nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x2) +H9) in (False_ind (clear (CHead c (Bind b) t) c0) H11))))) (\lambda (f: +F).(\lambda (H9: (eq nat O (s (Flat f) x2))).(\lambda (H10: (clear (CHead x1 +(Flat f) x0) c0)).(let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n +v c x1)) H7 O H9) in (let H12 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 +n v t x0)) H6 O H9) in (clear_flat c c0 (H x1 v H11 c0 (clear_gen_flat f x1 +c0 x0 H10)) f t)))))) k H4 H8))))))))) H3)) H2))))))))))) c1). + +lemma csubst0_clear_S: + \forall (c1: C).(\forall (c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 +(S i) v c1 c2) \to (\forall (c: C).((clear c1 c) \to (or4 (clear c2 c) (ex3_4 +B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq +C c (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2)))))))))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: +T).(\forall (i: nat).((csubst0 (S i) v c c2) \to (\forall (c0: C).((clear c +c0) \to (or4 (clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda +(i: nat).(\lambda (H: (csubst0 (S i) v (CSort n) c2)).(\lambda (c: +C).(\lambda (_: (clear (CSort n) c)).(csubst0_gen_sort c2 v (S i) n H (or4 +(clear c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))))))))))) +(\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).(\forall (i: +nat).((csubst0 (S i) v c c2) \to (\forall (c0: C).((clear c c0) \to (or4 +(clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda +(v: T).(\lambda (i: nat).(\lambda (H0: (csubst0 (S i) v (CHead c k t) +c2)).(\lambda (c0: C).(\lambda (H1: (clear (CHead c k t) c0)).(let H2 \def +(csubst0_gen_head k c c2 t v (S i) H0) in (or3_ind (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (clear c2 +c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (H3: (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 +(CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or4 +(clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda +(x0: T).(\lambda (x1: nat).(\lambda (H4: (eq nat (S i) (s k x1))).(\lambda +(H5: (eq C c2 (CHead c k x0))).(\lambda (H6: (subst0 x1 v t x0)).(eq_ind_r C +(CHead c k x0) (\lambda (c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear c3 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +c3 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +i v e1 e2))))))))) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to +((eq nat (S i) (s k0 x1)) \to (or4 (clear (CHead c k0 x0) c0) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c k0 x0) +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))))) (\lambda (b: B).(\lambda (H7: (clear (CHead c (Bind b) t) +c0)).(\lambda (H8: (eq nat (S i) (s (Bind b) x1))).(let H9 \def (f_equal nat +nat (\lambda (e: nat).(match e with [O \Rightarrow i | (S n) \Rightarrow n])) +(S i) (S x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 +n v t x0)) H6 i H9) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 +(clear (CHead c (Bind b) x0) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) +(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 +(CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro1 +(clear (CHead c (Bind b) x0) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda +(b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind +b) t) (CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e (Bind b0) +u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) +u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) +(ex3_4_intro B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e (Bind b0) u1)))))) +(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2))))) b c t x0 +(refl_equal C (CHead c (Bind b) t)) (clear_bind b c x0) H10)) c0 +(clear_gen_bind b c c0 t H7))))))) (\lambda (f: F).(\lambda (H7: (clear +(CHead c (Flat f) t) c0)).(\lambda (H8: (eq nat (S i) (s (Flat f) x1))).(let +H9 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) x1) H8) in +(let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H6 (S i) +H9) in (or4_intro0 (clear (CHead c (Flat f) x0) c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead c (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c (Flat f) x0) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead c (Flat f) x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) +(clear_flat c c0 (clear_gen_flat f c c0 t H7) f x0))))))) k H1 H4) c2 +H5)))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 +(CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or4 (clear c2 c0) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: +nat).(\lambda (H4: (eq nat (S i) (s k x1))).(\lambda (H5: (eq C c2 (CHead x0 +k t))).(\lambda (H6: (csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda +(c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat +(S i) (s k0 x1)) \to (or4 (clear (CHead x0 k0 t) c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 k0 t) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 k0 t) (CHead e2 (Bind b) +u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x0 k0 t) (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) +(\lambda (b: B).(\lambda (H7: (clear (CHead c (Bind b) t) c0)).(\lambda (H8: +(eq nat (S i) (s (Bind b) x1))).(let H9 \def (f_equal nat nat (\lambda (e: +nat).(match e with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H8) +in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H6 i +H9) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead +x0 (Bind b) t) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Bind b) +t) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro2 (clear (CHead x0 +(Bind b) t) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e +(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 (Bind b) t) (CHead e (Bind b0) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Bind b) +t) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 +(Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) +t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2))))) b c x0 t (refl_equal C (CHead c (Bind b) t)) (clear_bind b x0 t) +H10)) c0 (clear_gen_bind b c c0 t H7))))))) (\lambda (f: F).(\lambda (H7: +(clear (CHead c (Flat f) t) c0)).(\lambda (H8: (eq nat (S i) (s (Flat f) +x1))).(let H9 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) +x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c +x0)) H6 (S i) H9) in (let H11 \def (H x0 v i H10 c0 (clear_gen_flat f c c0 t +H7)) in (or4_ind (clear x0 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (H12: (clear x0 c0)).(or4_intro0 (clear (CHead x0 (Flat +f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) +t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat x0 c0 H12 f t))) +(\lambda (H12: (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) (or4 (clear (CHead x0 (Flat f) t) +c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x2: B).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H13: (eq C c0 (CHead x3 (Bind +x2) x4))).(\lambda (H14: (clear x0 (CHead x3 (Bind x2) x5))).(\lambda (H15: +(subst0 i v x4 x5)).(or4_intro1 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T +T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) +t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) +t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) x2 x3 x4 x5 H13 (clear_flat x0 +(CHead x3 (Bind x2) x5) H14 f t) H15))))))))) H12)) (\lambda (H12: (ex3_4 B C +C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear x0 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x0 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T +T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) +t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (H13: (eq C c0 (CHead x3 (Bind x2) x5))).(\lambda (H14: (clear x0 +(CHead x4 (Bind x2) x5))).(\lambda (H15: (csubst0 i v x3 x4)).(or4_intro2 +(clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C +C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2))))) x2 x3 x4 x5 H13 (clear_flat x0 (CHead x4 (Bind x2) x5) H14 f t) +H15))))))))) H12)) (\lambda (H12: (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear x0 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))).(ex4_5_ind B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H13: (eq C c0 (CHead x3 (Bind x2) +x5))).(\lambda (H14: (clear x0 (CHead x4 (Bind x2) x6))).(\lambda (H15: +(subst0 i v x5 x6)).(\lambda (H16: (csubst0 i v x3 x4)).(or4_intro3 (clear +(CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x2 x3 x4 x5 x6 H13 (clear_flat x0 +(CHead x4 (Bind x2) x6) H14 f t) H15 H16))))))))))) H12)) H11))))))) k H1 H4) +c2 H5)))))) H3)) (\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (clear c2 +c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x0: T).(\lambda +(x1: C).(\lambda (x2: nat).(\lambda (H4: (eq nat (S i) (s k x2))).(\lambda +(H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t x0)).(\lambda +(H7: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c3: C).(or4 +(clear c3 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c3 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (K_ind +(\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat (S i) (s k0 x2)) \to +(or4 (clear (CHead x1 k0 x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 k0 x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) (\lambda (b: B).(\lambda +(H8: (clear (CHead c (Bind b) t) c0)).(\lambda (H9: (eq nat (S i) (s (Bind b) +x2))).(let H10 \def (f_equal nat nat (\lambda (e: nat).(match e with [O +\Rightarrow i | (S n) \Rightarrow n])) (S i) (S x2) H9) in (let H11 \def +(eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H7 i H10) in (let H12 +\def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) H6 i H10) in +(eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead x1 (Bind +b) x0) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Bind b) +x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro3 (clear (CHead x1 +(Bind b) x0) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e +(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C +C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C +C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))) b c x1 t x0 +(refl_equal C (CHead c (Bind b) t)) (clear_bind b x1 x0) H12 H11)) c0 +(clear_gen_bind b c c0 t H8)))))))) (\lambda (f: F).(\lambda (H8: (clear +(CHead c (Flat f) t) c0)).(\lambda (H9: (eq nat (S i) (s (Flat f) x2))).(let +H10 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) x2) H9) in +(let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H7 (S i) +H10) in (let H12 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) +H6 (S i) H10) in (let H13 \def (H x1 v i H11 c0 (clear_gen_flat f c c0 t H8)) +in (or4_ind (clear x1 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (H14: (clear x1 c0)).(or4_intro0 (clear (CHead x1 (Flat +f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) +x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat x1 c0 H14 f x0))) +(\lambda (H14: (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) (or4 (clear (CHead x1 (Flat f) x0) +c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x3: B).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H15: (eq C c0 (CHead x4 (Bind +x3) x5))).(\lambda (H16: (clear x1 (CHead x4 (Bind x3) x6))).(\lambda (H17: +(subst0 i v x5 x6)).(or4_intro1 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) +x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) +x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) x3 x4 x5 x6 H15 (clear_flat x1 +(CHead x4 (Bind x3) x6) H16 f x0) H17))))))))) H14)) (\lambda (H14: (ex3_4 B +C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C +c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x1 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) +x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (H15: (eq C c0 (CHead x4 (Bind x3) x6))).(\lambda (H16: (clear x1 +(CHead x5 (Bind x3) x6))).(\lambda (H17: (csubst0 i v x4 x5)).(or4_intro2 +(clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C +C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2))))) x3 x4 x5 x6 H15 (clear_flat x1 (CHead x5 (Bind x3) x6) H16 f x0) +H17))))))))) H14)) (\lambda (H14: (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear x1 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))).(ex4_5_ind B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (x7: T).(\lambda (H15: (eq C c0 (CHead x4 (Bind x3) +x6))).(\lambda (H16: (clear x1 (CHead x5 (Bind x3) x7))).(\lambda (H17: +(subst0 i v x6 x7)).(\lambda (H18: (csubst0 i v x4 x5)).(or4_intro3 (clear +(CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x3 x4 x5 x6 x7 H15 (clear_flat x1 +(CHead x5 (Bind x3) x7) H16 f x0) H17 H18))))))))))) H14)) H13)))))))) k H1 +H4) c2 H5)))))))) H3)) H2)))))))))))) c1). + +lemma csubst0_clear_trans: + \forall (c1: C).(\forall (c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 +i v c1 c2) \to (\forall (e2: C).((clear c2 e2) \to (or (clear c1 e2) (ex2 C +(\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: C).(clear c1 e1)))))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: +T).(\forall (i: nat).((csubst0 i v c c2) \to (\forall (e2: C).((clear c2 e2) +\to (or (clear c e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda +(e1: C).(clear c e1))))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda +(v: T).(\lambda (i: nat).(\lambda (H: (csubst0 i v (CSort n) c2)).(\lambda +(e2: C).(\lambda (_: (clear c2 e2)).(csubst0_gen_sort c2 v i n H (or (clear +(CSort n) e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: +C).(clear (CSort n) e1)))))))))))) (\lambda (c: C).(\lambda (H: ((\forall +(c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 i v c c2) \to (\forall +(e2: C).((clear c2 e2) \to (or (clear c e2) (ex2 C (\lambda (e1: C).(csubst0 +i v e1 e2)) (\lambda (e1: C).(clear c e1)))))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: +(csubst0 i v (CHead c k t) c2)).(\lambda (e2: C).(\lambda (H1: (clear c2 +e2)).(let H2 \def (csubst0_gen_head k c c2 t v i H0) in (or3_ind (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq +nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat +(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) +(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))) (or (clear (CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 +e2)) (\lambda (e1: C).(clear (CHead c k t) e1)))) (\lambda (H3: (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead +c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or (clear +(CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: +C).(clear (CHead c k t) e1)))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda +(H4: (eq nat i (s k x1))).(\lambda (H5: (eq C c2 (CHead c k x0))).(\lambda +(H6: (subst0 x1 v t x0)).(eq_ind_r nat (s k x1) (\lambda (n: nat).(or (clear +(CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 n v e1 e2)) (\lambda (e1: +C).(clear (CHead c k t) e1))))) (let H7 \def (eq_ind C c2 (\lambda (c0: +C).(clear c0 e2)) H1 (CHead c k x0) H5) in (K_ind (\lambda (k0: K).((clear +(CHead c k0 x0) e2) \to (or (clear (CHead c k0 t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (s k0 x1) v e1 e2)) (\lambda (e1: C).(clear (CHead c k0 t) +e1)))))) (\lambda (b: B).(\lambda (H8: (clear (CHead c (Bind b) x0) +e2)).(eq_ind_r C (CHead c (Bind b) x0) (\lambda (c0: C).(or (clear (CHead c +(Bind b) t) c0) (ex2 C (\lambda (e1: C).(csubst0 (s (Bind b) x1) v e1 c0)) +(\lambda (e1: C).(clear (CHead c (Bind b) t) e1))))) (or_intror (clear (CHead +c (Bind b) t) (CHead c (Bind b) x0)) (ex2 C (\lambda (e1: C).(csubst0 (s +(Bind b) x1) v e1 (CHead c (Bind b) x0))) (\lambda (e1: C).(clear (CHead c +(Bind b) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 (s (Bind b) x1) v e1 +(CHead c (Bind b) x0))) (\lambda (e1: C).(clear (CHead c (Bind b) t) e1)) +(CHead c (Bind b) t) (csubst0_snd (Bind b) x1 v t x0 H6 c) (clear_bind b c +t))) e2 (clear_gen_bind b c e2 x0 H8)))) (\lambda (f: F).(\lambda (H8: (clear +(CHead c (Flat f) x0) e2)).(or_introl (clear (CHead c (Flat f) t) e2) (ex2 C +(\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear +(CHead c (Flat f) t) e1))) (clear_flat c e2 (clear_gen_flat f c e2 x0 H8) f +t)))) k H7)) i H4)))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or (clear (CHead c k t) e2) +(ex2 C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: C).(clear (CHead c +k t) e1)))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat i (s k +x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 v c +x0)).(eq_ind_r nat (s k x1) (\lambda (n: nat).(or (clear (CHead c k t) e2) +(ex2 C (\lambda (e1: C).(csubst0 n v e1 e2)) (\lambda (e1: C).(clear (CHead c +k t) e1))))) (let H7 \def (eq_ind C c2 (\lambda (c0: C).(clear c0 e2)) H1 +(CHead x0 k t) H5) in (K_ind (\lambda (k0: K).((clear (CHead x0 k0 t) e2) \to +(or (clear (CHead c k0 t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s k0 x1) v e1 +e2)) (\lambda (e1: C).(clear (CHead c k0 t) e1)))))) (\lambda (b: B).(\lambda +(H8: (clear (CHead x0 (Bind b) t) e2)).(eq_ind_r C (CHead x0 (Bind b) t) +(\lambda (c0: C).(or (clear (CHead c (Bind b) t) c0) (ex2 C (\lambda (e1: +C).(csubst0 (s (Bind b) x1) v e1 c0)) (\lambda (e1: C).(clear (CHead c (Bind +b) t) e1))))) (or_intror (clear (CHead c (Bind b) t) (CHead x0 (Bind b) t)) +(ex2 C (\lambda (e1: C).(csubst0 (s (Bind b) x1) v e1 (CHead x0 (Bind b) t))) +(\lambda (e1: C).(clear (CHead c (Bind b) t) e1))) (ex_intro2 C (\lambda (e1: +C).(csubst0 (s (Bind b) x1) v e1 (CHead x0 (Bind b) t))) (\lambda (e1: +C).(clear (CHead c (Bind b) t) e1)) (CHead c (Bind b) t) (csubst0_fst (Bind +b) x1 c x0 v H6 t) (clear_bind b c t))) e2 (clear_gen_bind b x0 e2 t H8)))) +(\lambda (f: F).(\lambda (H8: (clear (CHead x0 (Flat f) t) e2)).(let H_x \def +(H x0 v x1 H6 e2 (clear_gen_flat f x0 e2 t H8)) in (let H9 \def H_x in +(or_ind (clear c e2) (ex2 C (\lambda (e1: C).(csubst0 x1 v e1 e2)) (\lambda +(e1: C).(clear c e1))) (or (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda +(e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear (CHead c +(Flat f) t) e1)))) (\lambda (H10: (clear c e2)).(or_introl (clear (CHead c +(Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) +(\lambda (e1: C).(clear (CHead c (Flat f) t) e1))) (clear_flat c e2 H10 f +t))) (\lambda (H10: (ex2 C (\lambda (e1: C).(csubst0 x1 v e1 e2)) (\lambda +(e1: C).(clear c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 x1 v e1 e2)) +(\lambda (e1: C).(clear c e1)) (or (clear (CHead c (Flat f) t) e2) (ex2 C +(\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear +(CHead c (Flat f) t) e1)))) (\lambda (x: C).(\lambda (H11: (csubst0 x1 v x +e2)).(\lambda (H12: (clear c x)).(or_intror (clear (CHead c (Flat f) t) e2) +(ex2 C (\lambda (e1: C).(csubst0 (s (Flat f) x1) v e1 e2)) (\lambda (e1: +C).(clear (CHead c (Flat f) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 +(s (Flat f) x1) v e1 e2)) (\lambda (e1: C).(clear (CHead c (Flat f) t) e1)) x +H11 (clear_flat c x H12 f t)))))) H10)) H9))))) k H7)) i H4)))))) H3)) +(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (or (clear (CHead c k t) e2) (ex2 +C (\lambda (e1: C).(csubst0 i v e1 e2)) (\lambda (e1: C).(clear (CHead c k t) +e1)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H4: (eq +nat i (s k x2))).(\lambda (H5: (eq C c2 (CHead x1 k x0))).(\lambda (H6: +(subst0 x2 v t x0)).(\lambda (H7: (csubst0 x2 v c x1)).(eq_ind_r nat (s k x2) +(\lambda (n: nat).(or (clear (CHead c k t) e2) (ex2 C (\lambda (e1: +C).(csubst0 n v e1 e2)) (\lambda (e1: C).(clear (CHead c k t) e1))))) (let H8 +\def (eq_ind C c2 (\lambda (c0: C).(clear c0 e2)) H1 (CHead x1 k x0) H5) in +(K_ind (\lambda (k0: K).((clear (CHead x1 k0 x0) e2) \to (or (clear (CHead c +k0 t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s k0 x2) v e1 e2)) (\lambda (e1: +C).(clear (CHead c k0 t) e1)))))) (\lambda (b: B).(\lambda (H9: (clear (CHead +x1 (Bind b) x0) e2)).(eq_ind_r C (CHead x1 (Bind b) x0) (\lambda (c0: C).(or +(clear (CHead c (Bind b) t) c0) (ex2 C (\lambda (e1: C).(csubst0 (s (Bind b) +x2) v e1 c0)) (\lambda (e1: C).(clear (CHead c (Bind b) t) e1))))) (or_intror +(clear (CHead c (Bind b) t) (CHead x1 (Bind b) x0)) (ex2 C (\lambda (e1: +C).(csubst0 (s (Bind b) x2) v e1 (CHead x1 (Bind b) x0))) (\lambda (e1: +C).(clear (CHead c (Bind b) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 +(s (Bind b) x2) v e1 (CHead x1 (Bind b) x0))) (\lambda (e1: C).(clear (CHead +c (Bind b) t) e1)) (CHead c (Bind b) t) (csubst0_both (Bind b) x2 v t x0 H6 c +x1 H7) (clear_bind b c t))) e2 (clear_gen_bind b x1 e2 x0 H9)))) (\lambda (f: +F).(\lambda (H9: (clear (CHead x1 (Flat f) x0) e2)).(let H_x \def (H x1 v x2 +H7 e2 (clear_gen_flat f x1 e2 x0 H9)) in (let H10 \def H_x in (or_ind (clear +c e2) (ex2 C (\lambda (e1: C).(csubst0 x2 v e1 e2)) (\lambda (e1: C).(clear c +e1))) (or (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (s +(Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear (CHead c (Flat f) t) e1)))) +(\lambda (H11: (clear c e2)).(or_introl (clear (CHead c (Flat f) t) e2) (ex2 +C (\lambda (e1: C).(csubst0 (s (Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear +(CHead c (Flat f) t) e1))) (clear_flat c e2 H11 f t))) (\lambda (H11: (ex2 C +(\lambda (e1: C).(csubst0 x2 v e1 e2)) (\lambda (e1: C).(clear c +e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 x2 v e1 e2)) (\lambda (e1: +C).(clear c e1)) (or (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (s (Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear (CHead c (Flat +f) t) e1)))) (\lambda (x: C).(\lambda (H12: (csubst0 x2 v x e2)).(\lambda +(H13: (clear c x)).(or_intror (clear (CHead c (Flat f) t) e2) (ex2 C (\lambda +(e1: C).(csubst0 (s (Flat f) x2) v e1 e2)) (\lambda (e1: C).(clear (CHead c +(Flat f) t) e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 (s (Flat f) x2) v e1 +e2)) (\lambda (e1: C).(clear (CHead c (Flat f) t) e1)) x H12 (clear_flat c x +H13 f t)))))) H11)) H10))))) k H8)) i H4)))))))) H3)) H2)))))))))))) c1). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/defs.ma new file mode 100644 index 000000000..c25dafe0a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/defs.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/defs.ma". + +include "basic_1A/C/defs.ma". + +inductive csubst0: nat \to (T \to (C \to (C \to Prop))) \def +| csubst0_snd: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: +T).(\forall (u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(csubst0 (s k i) +v (CHead c k u1) (CHead c k u2)))))))) +| csubst0_fst: \forall (k: K).(\forall (i: nat).(\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (u: T).(csubst0 (s +k i) v (CHead c1 k u) (CHead c2 k u)))))))) +| csubst0_both: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall +(u1: T).(\forall (u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall +(c2: C).((csubst0 i v c1 c2) \to (csubst0 (s k i) v (CHead c1 k u1) (CHead c2 +k u2)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst0/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/drop.ma new file mode 100644 index 000000000..4e2337b45 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/drop.ma @@ -0,0 +1,6291 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst0/fwd.ma". + +include "basic_1A/drop/fwd.ma". + +lemma csubst0_drop_gt: + \forall (n: nat).(\forall (i: nat).((lt i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O +c1 e) \to (drop n O c2 e))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt i n0) +\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) +\to (\forall (e: C).((drop n0 O c1 e) \to (drop n0 O c2 e)))))))))) (\lambda +(i: nat).(\lambda (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O +O c1 e)).(lt_x_O i H (drop O O c2 e)))))))))) (\lambda (n0: nat).(\lambda (H: +((\forall (i: nat).((lt i n0) \to (\forall (c1: C).(\forall (c2: C).(\forall +(v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n0 O c1 e) \to (drop +n0 O c2 e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda +(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v +c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) +(\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v +(CSort n1) c2)).(\lambda (e: C).(\lambda (H2: (drop (S n0) O (CSort n1) +e)).(and3_ind (eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (drop (S n0) +O c2 e) (\lambda (H3: (eq C e (CSort n1))).(\lambda (H4: (eq nat (S n0) +O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: C).(drop +(S n0) O c2 c)) (let H6 \def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee +with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind +(drop (S n0) O c2 (CSort n1)) H6)) e H3)))) (drop_gen_sort n1 (S n0) O e +H2)))))))) (\lambda (c: C).(\lambda (H1: ((\forall (c2: C).(\forall (v: +T).((csubst0 i v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S +n0) O c2 e)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H2: (csubst0 i v (CHead c k t) c2)).(\lambda (e: C).(\lambda +(H3: (drop (S n0) O (CHead c k t) e)).(let H4 \def (csubst0_gen_head k c c2 t +v i H2) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i +(s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) +(\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda +(_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))))) (drop (S n0) O c2 e) (\lambda (H5: (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead +c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (drop (S +n0) O c2 e) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H6: (eq nat i (s k +x1))).(\lambda (H7: (eq C c2 (CHead c k x0))).(\lambda (_: (subst0 x1 v t +x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(drop (S n0) O c0 e)) (let +H9 \def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: +T).((csubst0 n1 v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop +(S n0) O c3 e0))))))) H1 (s k x1) H6) in (let H10 \def (eq_ind nat i (\lambda +(n1: nat).(lt n1 (S n0))) H0 (s k x1) H6) in (K_ind (\lambda (k0: K).((drop +(r k0 n0) O c e) \to (((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) +v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead c k0 x0) +e))))) (\lambda (b: B).(\lambda (H11: (drop (r (Bind b) n0) O c e)).(\lambda +(_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to +(\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 c +e H11 x0))))) (\lambda (f: F).(\lambda (H11: (drop (r (Flat f) n0) O c +e)).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x1) +v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (H13: (lt (s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) +(ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead c (Flat f) x0) e) (\lambda (_: (eq nat x1 +O)).(drop_drop (Flat f) n0 c e H11 x0)) (\lambda (H14: (ex2 nat (\lambda (m: +nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda +(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O +(CHead c (Flat f) x0) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S +x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e H11 x0)))) H14)) +(lt_gen_xS x1 n0 H13)))))) k (drop_gen_drop k c e t n0 H3) H9 H10))) c2 +H7)))))) H5)) (\lambda (H5: (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S n0) O c2 e) (\lambda +(x0: C).(\lambda (x1: nat).(\lambda (H6: (eq nat i (s k x1))).(\lambda (H7: +(eq C c2 (CHead x0 k t))).(\lambda (H8: (csubst0 x1 v c x0)).(eq_ind_r C +(CHead x0 k t) (\lambda (c0: C).(drop (S n0) O c0 e)) (let H9 \def (eq_ind +nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c +c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0))))))) H1 (s k x1) H6) in (let H10 \def (eq_ind nat i (\lambda (n1: +nat).(lt n1 (S n0))) H0 (s k x1) H6) in (K_ind (\lambda (k0: K).((drop (r k0 +n0) O c e) \to (((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c +c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead x0 k0 t) +e))))) (\lambda (b: B).(\lambda (H11: (drop (r (Bind b) n0) O c e)).(\lambda +(_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to +(\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (H13: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 +x0 e (H x1 (lt_S_n x1 n0 H13) c x0 v H8 e H11) t))))) (\lambda (f: +F).(\lambda (H11: (drop (r (Flat f) n0) O c e)).(\lambda (H12: ((\forall (c3: +C).(\forall (v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (drop (S n0) O c3 e0)))))))).(\lambda (H13: (lt +(s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq +nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead x0 (Flat +f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 x0 e (H12 x0 v H8 +e H11) t)) (\lambda (H14: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) +(\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S +m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead x0 (Flat f) t) e) +(\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x +n0)).(drop_drop (Flat f) n0 x0 e (H12 x0 v H8 e H11) t)))) H14)) (lt_gen_xS +x1 n0 H13)))))) k (drop_gen_drop k c e t n0 H3) H9 H10))) c2 H7)))))) H5)) +(\lambda (H5: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (drop (S n0) O c2 e) (\lambda (x0: +T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H6: (eq nat i (s k +x2))).(\lambda (H7: (eq C c2 (CHead x1 k x0))).(\lambda (_: (subst0 x2 v t +x0)).(\lambda (H9: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda +(c0: C).(drop (S n0) O c0 e)) (let H10 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 e0))))))) H1 (s k x2) H6) +in (let H11 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x2) +H6) in (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to (((\forall (c3: +C).(\forall (v0: T).((csubst0 (s k0 x2) v0 c c3) \to (\forall (e0: C).((drop +(S n0) O c e0) \to (drop (S n0) O c3 e0))))))) \to ((lt (s k0 x2) (S n0)) \to +(drop (S n0) O (CHead x1 k0 x0) e))))) (\lambda (b: B).(\lambda (H12: (drop +(r (Bind b) n0) O c e)).(\lambda (_: ((\forall (c3: C).(\forall (v0: +T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c +e0) \to (drop (S n0) O c3 e0)))))))).(\lambda (H14: (lt (s (Bind b) x2) (S +n0))).(drop_drop (Bind b) n0 x1 e (H x2 (lt_S_n x2 n0 H14) c x1 v H9 e H12) +x0))))) (\lambda (f: F).(\lambda (H12: (drop (r (Flat f) n0) O c e)).(\lambda +(H13: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x2) v0 c c3) +\to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (H14: (lt (s (Flat f) x2) (S n0))).(or_ind (eq nat x2 O) +(ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (_: (eq nat x2 +O)).(drop_drop (Flat f) n0 x1 e (H13 x1 v H9 e H12) x0)) (\lambda (H15: (ex2 +nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m +n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: +nat).(lt m n0)) (drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (x: +nat).(\lambda (_: (eq nat x2 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat +f) n0 x1 e (H13 x1 v H9 e H12) x0)))) H15)) (lt_gen_xS x2 n0 H14)))))) k +(drop_gen_drop k c e t n0 H3) H10 H11))) c2 H7)))))))) H5)) H4))))))))))) +c1)))))) n). + +lemma csubst0_drop_gt_back: + \forall (n: nat).(\forall (i: nat).((lt i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O +c2 e) \to (drop n O c1 e))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt i n0) +\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) +\to (\forall (e: C).((drop n0 O c2 e) \to (drop n0 O c1 e)))))))))) (\lambda +(i: nat).(\lambda (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O +O c2 e)).(lt_x_O i H (drop O O c1 e)))))))))) (\lambda (n0: nat).(\lambda (H: +((\forall (i: nat).((lt i n0) \to (\forall (c1: C).(\forall (c2: C).(\forall +(v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n0 O c2 e) \to (drop +n0 O c1 e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda +(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v +c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) +(\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H1: (csubst0 i +v (CSort n1) c2)).(\lambda (e: C).(\lambda (_: (drop (S n0) O c2 +e)).(csubst0_gen_sort c2 v i n1 H1 (drop (S n0) O (CSort n1) e)))))))) +(\lambda (c: C).(\lambda (H1: ((\forall (c2: C).(\forall (v: T).((csubst0 i v +c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c +e)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: +T).(\lambda (H2: (csubst0 i v (CHead c k t) c2)).(\lambda (e: C).(\lambda +(H3: (drop (S n0) O c2 e)).(let H4 \def (csubst0_gen_head k c c2 t v i H2) in +(or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) +(\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: +T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))))) (drop (S n0) O (CHead c k t) e) (\lambda (H5: +(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda +(u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: +T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2))) (drop (S n0) O (CHead c k t) e) (\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H6: (eq nat i (s k x1))).(\lambda (H7: (eq C c2 (CHead c k +x0))).(\lambda (_: (subst0 x1 v t x0)).(let H9 \def (eq_ind C c2 (\lambda +(c0: C).(drop (S n0) O c0 e)) H3 (CHead c k x0) H7) in (let H10 \def (eq_ind +nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c +c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c +e0))))))) H1 (s k x1) H6) in (let H11 \def (eq_ind nat i (\lambda (n1: +nat).(lt n1 (S n0))) H0 (s k x1) H6) in (K_ind (\lambda (k0: K).(((\forall +(c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) \to ((lt (s k0 x1) +(S n0)) \to ((drop (r k0 n0) O c e) \to (drop (S n0) O (CHead c k0 t) e))))) +(\lambda (b: B).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s +(Bind b) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop +(S n0) O c e0)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(\lambda +(H14: (drop (r (Bind b) n0) O c e)).(drop_drop (Bind b) n0 c e H14 t))))) +(\lambda (f: F).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s +(Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop +(S n0) O c e0)))))))).(\lambda (H13: (lt (s (Flat f) x1) (S n0))).(\lambda +(H14: (drop (r (Flat f) n0) O c e)).(or_ind (eq nat x1 O) (ex2 nat (\lambda +(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O +(CHead c (Flat f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 c +e H14 t)) (\lambda (H15: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) +(\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S +m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) t) e) +(\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x +n0)).(drop_drop (Flat f) n0 c e H14 t)))) H15)) (lt_gen_xS x1 n0 H13)))))) k +H10 H11 (drop_gen_drop k c e x0 n0 H9)))))))))) H5)) (\lambda (H5: (ex3_2 C +nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S +n0) O (CHead c k t) e) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H6: (eq +nat i (s k x1))).(\lambda (H7: (eq C c2 (CHead x0 k t))).(\lambda (H8: +(csubst0 x1 v c x0)).(let H9 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) +O c0 e)) H3 (CHead x0 k t) H7) in (let H10 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) H1 (s k x1) H6) +in (let H11 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x1) +H6) in (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 +(s k0 x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S +n0) O c e0))))))) \to ((lt (s k0 x1) (S n0)) \to ((drop (r k0 n0) O x0 e) \to +(drop (S n0) O (CHead c k0 t) e))))) (\lambda (b: B).(\lambda (_: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0)))))))).(\lambda (H13: (lt +(s (Bind b) x1) (S n0))).(\lambda (H14: (drop (r (Bind b) n0) O x0 +e)).(drop_drop (Bind b) n0 c e (H x1 (lt_S_n x1 n0 H13) c x0 v H8 e H14) +t))))) (\lambda (f: F).(\lambda (H12: ((\forall (c3: C).(\forall (v0: +T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 +e0) \to (drop (S n0) O c e0)))))))).(\lambda (H13: (lt (s (Flat f) x1) (S +n0))).(\lambda (H14: (drop (r (Flat f) n0) O x0 e)).(or_ind (eq nat x1 O) +(ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop +(Flat f) n0 c e (H12 x0 v H8 e H14) t)) (\lambda (H15: (ex2 nat (\lambda (m: +nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda +(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O +(CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S +x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H12 x0 v H8 e H14) +t)))) H15)) (lt_gen_xS x1 n0 H13)))))) k H10 H11 (drop_gen_drop k x0 e t n0 +H9)))))))))) H5)) (\lambda (H5: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (drop (S n0) O +(CHead c k t) e) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: +nat).(\lambda (H6: (eq nat i (s k x2))).(\lambda (H7: (eq C c2 (CHead x1 k +x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H9: (csubst0 x2 v c +x1)).(let H10 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H3 +(CHead x1 k x0) H7) in (let H11 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) H1 (s k x2) H6) +in (let H12 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x2) +H6) in (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 +(s k0 x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S +n0) O c e0))))))) \to ((lt (s k0 x2) (S n0)) \to ((drop (r k0 n0) O x1 e) \to +(drop (S n0) O (CHead c k0 t) e))))) (\lambda (b: B).(\lambda (_: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0)))))))).(\lambda (H14: (lt +(s (Bind b) x2) (S n0))).(\lambda (H15: (drop (r (Bind b) n0) O x1 +e)).(drop_drop (Bind b) n0 c e (H x2 (lt_S_n x2 n0 H14) c x1 v H9 e H15) +t))))) (\lambda (f: F).(\lambda (H13: ((\forall (c3: C).(\forall (v0: +T).((csubst0 (s (Flat f) x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 +e0) \to (drop (S n0) O c e0)))))))).(\lambda (H14: (lt (s (Flat f) x2) (S +n0))).(\lambda (H15: (drop (r (Flat f) n0) O x1 e)).(or_ind (eq nat x2 O) +(ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x2 O)).(drop_drop +(Flat f) n0 c e (H13 x1 v H9 e H15) t)) (\lambda (H16: (ex2 nat (\lambda (m: +nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda +(m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O +(CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x2 (S +x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H13 x1 v H9 e H15) +t)))) H16)) (lt_gen_xS x2 n0 H14)))))) k H11 H12 (drop_gen_drop k x1 e x0 n0 +H10)))))))))))) H5)) H4))))))))))) c1)))))) n). + +lemma csubst0_drop_lt: + \forall (n: nat).(\forall (i: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O +c1 e) \to (or4 (drop n O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 k +w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k n)) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k n)) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k +n)) v e1 e2)))))))))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt n0 i) +\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) +\to (\forall (e: C).((drop n0 O c1 e) \to (or4 (drop n0 O c2 e) (ex3_4 K C T +T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n0 O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n0)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 +O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k n0)) v e1 e2))))))))))))))))) (\lambda (i: +nat).(\lambda (_: (lt O i)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (v: +T).(\lambda (H0: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (H1: (drop O O +c1 e)).(eq_ind C c1 (\lambda (c: C).(or4 (drop O O c2 c) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k O)) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k O)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O +c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k O)) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k O)) v e1 e2))))))))) (csubst0_ind (\lambda (n0: +nat).(\lambda (t: T).(\lambda (c: C).(\lambda (c0: C).(or4 (drop O O c0 c) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n0 (s k O)) t u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n0 (s k O)) t e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O +c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n0 (s k O)) t u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus n0 (s k O)) t e1 e2)))))))))))) (\lambda (k: +K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H2: (subst0 i0 v0 u1 u2)).(\lambda (c: C).(let H3 \def (eq_ind_r +nat i0 (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 (minus (s k i0) (s k O)) +(s_arith0 k i0)) in (or4_intro1 (drop O O (CHead c k u2) (CHead c k u1)) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead c k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c k u1) +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O (CHead c k u2) (CHead e2 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s +k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c k u1) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead c k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u w))))) k c u1 u2 (refl_equal C +(CHead c k u1)) (drop_refl (CHead c k u2)) H3)))))))))) (\lambda (k: +K).(\lambda (i0: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: +T).(\lambda (H2: (csubst0 i0 v0 c3 c4)).(\lambda (H3: (or4 (drop O O c4 c3) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c3 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k0 +O)) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c3 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k0 O)) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k0 +O)) v0 e1 e2))))))))).(\lambda (u: T).(let H4 \def (eq_ind_r nat i0 (\lambda +(n0: nat).(csubst0 n0 v0 c3 c4)) H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) +in (let H5 \def (eq_ind_r nat i0 (\lambda (n0: nat).(or4 (drop O O c4 c3) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda +(_: T).(eq C c3 (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n0 (s +k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C c3 (CHead e1 k0 u0)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O c4 (CHead +e2 k0 u0)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus n0 (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C c3 (CHead e1 k0 u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus n0 (s k0 O)) v0 u0 w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n0 +(s k0 O)) v0 e1 e2))))))))) H3 (minus (s k i0) (s k O)) (s_arith0 k i0)) in +(or4_intro2 (drop O O (CHead c4 k u) (CHead c3 k u)) (ex3_4 K C T T (\lambda +(k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k +u) (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e0 k0 w)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k +i0) (s k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k u) (CHead e1 k0 +u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) +v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k u) (CHead e1 k0 +u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e2 k0 w))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u0 w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k +i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k u) (CHead e1 k0 +u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) +v0 e1 e2))))) k c3 c4 u (refl_equal C (CHead c3 k u)) (drop_refl (CHead c4 k +u)) H4)))))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i0 v0 u1 +u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i0 v0 c3 +c4)).(\lambda (_: (or4 (drop O O c4 c3) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k0 O)) v0 u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k0 +O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i0 (s k0 O)) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k0 O)) v0 e1 +e2))))))))).(let H5 \def (eq_ind_r nat i0 (\lambda (n0: nat).(subst0 n0 v0 u1 +u2)) H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) in (let H6 \def (eq_ind_r +nat i0 (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H3 (minus (s k i0) (s k O)) +(s_arith0 k i0)) in (or4_intro3 (drop O O (CHead c4 k u2) (CHead c3 k u1)) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead c3 k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u2) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 k +u1) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O (CHead c4 k u2) (CHead e2 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s +k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 k u1) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u2) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex4_5_intro K C C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead c3 k u1) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k +u2) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u +w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2)))))) k c3 c4 +u1 u2 (refl_equal C (CHead c3 k u1)) (drop_refl (CHead c4 k u2)) H5 +H6)))))))))))))) i v c1 c2 H0) e (drop_gen_refl c1 e H1)))))))))) (\lambda +(n0: nat).(\lambda (IHn: ((\forall (i: nat).((lt n0 i) \to (\forall (c1: +C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: +C).((drop n0 O c1 e) \to (or4 (drop n0 O c2 e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) (ex3_4 K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop n0 O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n0)) v e1 e2)))))) +(ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c2 (CHead +e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (s k n0)) v e1 e2)))))))))))))))))).(\lambda (i: nat).(\lambda (H: +(lt (S n0) i)).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: +C).(\forall (v: T).((csubst0 i v c c2) \to (\forall (e: C).((drop (S n0) O c +e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k (S n0))) v e1 e2)))))))))))))) (\lambda (n1: +nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v (CSort n1) +c2)).(\lambda (e: C).(\lambda (H1: (drop (S n0) O (CSort n1) e)).(and3_ind +(eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (or4 (drop (S n0) O c2 e) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S +n0))) v e1 e2)))))))) (\lambda (H2: (eq C e (CSort n1))).(\lambda (H3: (eq +nat (S n0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: +C).(or4 (drop (S n0) O c2 c) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k (S n0))) v e1 e2))))))))) (let H5 \def (eq_ind +nat (S n0) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H3) in (False_ind (or4 (drop (S n0) O c2 (CSort n1)) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CSort n1) (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CSort n1) (CHead e1 k u)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CSort n1) (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (s k (S n0))) v e1 e2)))))))) H5)) e H2)))) (drop_gen_sort n1 (S n0) +O e H1)))))))) (\lambda (c: C).(\lambda (H0: ((\forall (c2: C).(\forall (v: +T).((csubst0 i v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 +(drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 +(CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k +w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (s k (S n0))) v e1 e2))))))))))))))).(\lambda (k: K).(\lambda (t: +T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H1: (csubst0 i v (CHead c k t) +c2)).(\lambda (e: C).(\lambda (H2: (drop (S n0) O (CHead c k t) e)).(let H3 +\def (csubst0_gen_head k c c2 t v i H1) in (or3_ind (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (drop (S +n0) O c2 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 e2)))))))) +(\lambda (H4: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda +(u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2))) (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: +(eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead c k x0))).(\lambda (_: +(subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(or4 (drop (S +n0) O c0 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c0 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c0 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 e2))))))))) (let +H8 \def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: +T).((csubst0 n1 v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 +(drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C +T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v0 e1 e2)))))))))))))) H0 (s k x1) H5) in (let H9 \def (eq_ind nat i +(\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in (eq_ind_r nat (s k x1) +(\lambda (n1: nat).(or4 (drop (S n0) O (CHead c k x0) e) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c k x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead c k x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c k x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v e1 e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to +(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) +(s k1 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 e2)))))) +(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v0 +u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 +e2)))))))))))))) \to ((lt (S n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead c +k0 x0) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead c k0 x0) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead e2 +k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(b: B).(\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Bind b) +x1))).(or4_intro0 (drop (S n0) O (CHead c (Bind b) x0) e) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Bind b) n0 c e H10 x0)))))) (\lambda (f: F).(\lambda +(H10: (drop (r (Flat f) n0) O c e)).(\lambda (_: ((\forall (c3: C).(\forall +(v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) +O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +x1))).(or4_intro0 (drop (S n0) O (CHead c (Flat f) x0) e) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Flat f) n0 c e H10 x0)))))) k (drop_gen_drop k c e t n0 +H2) H8 H9) i H5))) c2 H6)))))) H4)) (\lambda (H4: (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or4 (drop (S n0) O c2 e) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H5: +(eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead x0 k t))).(\lambda (H7: +(csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c0: C).(or4 (drop +(S n0) O c0 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c0 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c0 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i (s k0 (S n0))) v e1 e2))))))))) (let +H8 \def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: +T).((csubst0 n1 v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 +(drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C +T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v0 e1 e2)))))))))))))) H0 (s k x1) H5) in (let H9 \def (eq_ind nat i +(\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in (eq_ind_r nat (s k x1) +(\lambda (n1: nat).(or4 (drop (S n0) O (CHead x0 k t) e) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 k t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x0 k t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 k t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v e1 e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to +(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) +(s k1 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 e2)))))) +(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v0 +u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 +e2)))))))))))))) \to ((lt (S n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead x0 +k0 t) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 +k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(b: B).(\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (H12: (lt (S n0) (s (Bind b) +x1))).(let H13 \def (IHn x1 (le_S_n (S n0) x1 H12) c x0 v H7 e H10) in +(or4_ind (drop n0 O x0 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (ex3_4 K C C T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n0 O x0 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 n0)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O x0 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 +n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 n0)) v e1 e2))))))) (or4 +(drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x1) (s k0 (S n0))) v e1 e2)))))))) (\lambda (H14: (drop n0 O x0 +e)).(or4_intro0 (drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Bind b) n0 x0 e H14 t))) (\lambda (H14: (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O x0 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 +n0)) v u w))))))).(ex3_4_ind K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 n0)) v u w))))) (or4 (drop (S n0) O (CHead x0 +(Bind b) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: +T).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 x4))).(\lambda (H16: +(drop n0 O x0 (CHead x3 x2 x5))).(\lambda (H17: (subst0 (minus x1 (s x2 n0)) +v x4 x5)).(eq_ind_r C (CHead x3 x2 x4) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Bind b) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead x0 (Bind b) t) (CHead x3 x2 x4)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 +x4) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x3 x2 x4) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 x4)) +(drop_drop (Bind b) n0 x0 (CHead x3 x2 x5) H16 t) (eq_ind_r nat (S (s x2 n0)) +(\lambda (n1: nat).(subst0 (minus (s (Bind b) x1) n1) v x4 x5)) H17 (s x2 (S +n0)) (s_S x2 n0)))) e H15)))))))) H14)) (\lambda (H14: (ex3_4 K C C T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n0 O x0 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 +n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x0 (CHead e2 +k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x1 (s k0 n0)) v e1 e2))))) (or4 (drop (S n0) O (CHead x0 +(Bind b) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: +(drop n0 O x0 (CHead x4 x2 x5))).(\lambda (H17: (csubst0 (minus x1 (s x2 n0)) +v x3 x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Bind b) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead x0 (Bind b) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x1) (s k0 (S n0))) v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 +x5)) (drop_drop (Bind b) n0 x0 (CHead x4 x2 x5) H16 t) (eq_ind_r nat (S (s x2 +n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x1) n1) v x3 x4)) H17 (s +x2 (S n0)) (s_S x2 n0)))) e H15)))))))) H14)) (\lambda (H14: (ex4_5 K C C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 +k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus x1 (s k0 n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 +n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 K C T +T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: +(drop n0 O x0 (CHead x4 x2 x6))).(\lambda (H17: (subst0 (minus x1 (s x2 n0)) +v x5 x6)).(\lambda (H18: (csubst0 (minus x1 (s x2 n0)) v x3 x4)).(eq_ind_r C +(CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind b) t) +c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead x0 (Bind b) t) +(CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) x2 x3 x4 x5 x6 +(refl_equal C (CHead x3 x2 x5)) (drop_drop (Bind b) n0 x0 (CHead x4 x2 x6) +H16 t) (eq_ind_r nat (S (s x2 n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind +b) x1) n1) v x5 x6)) H17 (s x2 (S n0)) (s_S x2 n0)) (eq_ind_r nat (S (s x2 +n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x1) n1) v x3 x4)) H18 (s +x2 (S n0)) (s_S x2 n0)))) e H15)))))))))) H14)) H13)))))) (\lambda (f: +F).(\lambda (H10: (drop (r (Flat f) n0) O c e)).(\lambda (H11: ((\forall (c3: +C).(\forall (v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +x1))).(let H13 \def (H11 x0 v H7 e H10) in (or4_ind (drop (S n0) O x0 e) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x1 (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 +(s k0 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (H14: (drop (S n0) O x0 e)).(or4_intro0 (drop (S n0) O +(CHead x0 (Flat f) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x1) (s k0 (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 x0 e H14 +t))) (\lambda (H14: (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda +(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O x0 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 (S n0))) v u +w))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) (ex3_4 K C T T (\lambda +(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x1) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 +x4))).(\lambda (H16: (drop (S n0) O x0 (CHead x3 x2 x5))).(\lambda (H17: +(subst0 (minus x1 (s x2 (S n0))) v x4 x5)).(eq_ind_r C (CHead x3 x2 x4) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 +k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 x2 +x4)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x3 x2 x4) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2))))))) (ex3_4_intro K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x3 x2 x4) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w))))) +x2 x3 x4 x5 (refl_equal C (CHead x3 x2 x4)) (drop_drop (Flat f) n0 x0 (CHead +x3 x2 x5) H16 t) H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 K C C T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 +(S n0))) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x0 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x1 (s k0 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead +x0 (Flat f) t) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: +(drop (S n0) O x0 (CHead x4 x2 x5))).(\lambda (H17: (csubst0 (minus x1 (s x2 +(S n0))) v x3 x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop +(S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) +(\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S +n0) O (CHead x0 (Flat f) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x1) (s k0 (S n0))) v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 +x5)) (drop_drop (Flat f) n0 x0 (CHead x4 x2 x5) H16 t) H17)) e H15)))))))) +H14)) (\lambda (H14: (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 +(S n0))) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 +(S n0))) v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) (ex3_4 K +C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x3 x2 x5))).(\lambda (H16: +(drop (S n0) O x0 (CHead x4 x2 x6))).(\lambda (H17: (subst0 (minus x1 (s x2 +(S n0))) v x5 x6)).(\lambda (H18: (csubst0 (minus x1 (s x2 (S n0))) v x3 +x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead +x0 (Flat f) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead x0 (Flat f) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v e1 e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))) x2 x3 x4 x5 x6 (refl_equal C (CHead x3 x2 x5)) (drop_drop (Flat f) +n0 x0 (CHead x4 x2 x6) H16 t) H17 H18)) e H15)))))))))) H14)) H13)))))) k +(drop_gen_drop k c e t n0 H2) H8 H9) i H5))) c2 H6)))))) H4)) (\lambda (H4: +(ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s +k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))) (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda +(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: +nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: (eq C c2 (CHead x1 k +x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: (csubst0 x2 v c +x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(or4 (drop (S n0) O c0 e) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 +(S n0))) v e1 e2))))))))) (let H9 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S +n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus n1 (s k0 (S n0))) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 +(s k0 (S n0))) v0 e1 e2)))))))))))))) H0 (s k x2) H5) in (let H10 \def +(eq_ind nat i (\lambda (n1: nat).(lt (S n0) n1)) H (s k x2) H5) in (eq_ind_r +nat (s k x2) (\lambda (n1: nat).(or4 (drop (S n0) O (CHead x1 k x0) e) (ex3_4 +K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 k x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x1 k x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 k x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v e1 e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to +(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x2) v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x2) +(s k1 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v0 e1 e2)))))) +(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x2) (s k1 (S n0))) v0 +u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v0 e1 +e2)))))))))))))) \to ((lt (S n0) (s k0 x2)) \to (or4 (drop (S n0) O (CHead x1 +k0 x0) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x2) (s k1 (S n0))) v u w)))))) (ex3_4 +K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 x2) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e2 +k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x2) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(b: B).(\lambda (H11: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (H13: (lt (S n0) (s (Bind b) +x2))).(let H14 \def (IHn x2 (le_S_n (S n0) x2 H13) c x1 v H8 e H11) in +(or4_ind (drop n0 O x1 e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (ex3_4 K C C T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n0 O x1 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 n0)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O x1 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 +n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 n0)) v e1 e2))))))) (or4 +(drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (H15: (drop n0 O x1 +e)).(or4_intro0 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Bind b) n0 x1 e H15 x0))) (\lambda (H15: (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O x1 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 +n0)) v u w))))))).(ex3_4_ind K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 n0)) v u w))))) (or4 (drop (S n0) O (CHead x1 +(Bind b) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 x5))).(\lambda (H17: +(drop n0 O x1 (CHead x4 x3 x6))).(\lambda (H18: (subst0 (minus x2 (s x3 n0)) +v x5 x6)).(eq_ind_r C (CHead x4 x3 x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x1 (Bind b) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x2) (s k0 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead x1 (Bind b) x0) (CHead x4 x3 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 x3 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x4 x3 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x5)) +(drop_drop (Bind b) n0 x1 (CHead x4 x3 x6) H17 x0) (eq_ind_r nat (S (s x3 +n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind b) x2) n1) v x5 x6)) H18 (s +x3 (S n0)) (s_S x3 n0)))) e H16)))))))) H15)) (\lambda (H15: (ex3_4 K C C T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n0 O x1 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 +n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x1 (CHead e2 +k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x2 (s k0 n0)) v e1 e2))))) (or4 (drop (S n0) O (CHead x1 +(Bind b) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: +C).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 x6))).(\lambda (H17: +(drop n0 O x1 (CHead x5 x3 x6))).(\lambda (H18: (csubst0 (minus x2 (s x3 n0)) +v x4 x5)).(eq_ind_r C (CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x1 (Bind b) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x2) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead x1 (Bind b) x0) (CHead x4 x3 x6)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 x3 +x6) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x4 x3 x6) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x2) (s k0 (S n0))) v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 +x6)) (drop_drop (Bind b) n0 x1 (CHead x5 x3 x6) H17 x0) (eq_ind_r nat (S (s +x3 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x2) n1) v x4 x5)) H18 +(s x3 (S n0)) (s_S x3 n0)))) e H16)))))))) H15)) (\lambda (H15: (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead +e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus x2 (s k0 n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 +n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 K C T +T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (x7: T).(\lambda (H16: (eq C e (CHead x4 x3 x6))).(\lambda (H17: +(drop n0 O x1 (CHead x5 x3 x7))).(\lambda (H18: (subst0 (minus x2 (s x3 n0)) +v x6 x7)).(\lambda (H19: (csubst0 (minus x2 (s x3 n0)) v x4 x5)).(eq_ind_r C +(CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind b) x0) +c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Bind b) x0) +(CHead x4 x3 x6)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) x3 x4 x5 +x6 x7 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Bind b) n0 x1 (CHead x5 x3 +x7) H17 x0) (eq_ind_r nat (S (s x3 n0)) (\lambda (n1: nat).(subst0 (minus (s +(Bind b) x2) n1) v x6 x7)) H18 (s x3 (S n0)) (s_S x3 n0)) (eq_ind_r nat (S (s +x3 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x2) n1) v x4 x5)) H19 +(s x3 (S n0)) (s_S x3 n0)))) e H16)))))))))) H15)) H14)))))) (\lambda (f: +F).(\lambda (H11: (drop (r (Flat f) n0) O c e)).(\lambda (H12: ((\forall (c3: +C).(\forall (v0: T).((csubst0 (s (Flat f) x2) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +x2))).(let H14 \def (H12 x1 v H8 e H11) in (or4_ind (drop (S n0) O x1 e) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x1 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x2 +(s k0 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (H15: (drop (S n0) O x1 e)).(or4_intro0 (drop (S n0) O +(CHead x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x2) (s k0 (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 x1 e H15 +x0))) (\lambda (H15: (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead +e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda +(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O x1 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S n0))) v u +w))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda +(k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 +x5))).(\lambda (H17: (drop (S n0) O x1 (CHead x4 x3 x6))).(\lambda (H18: +(subst0 (minus x2 (s x3 (S n0))) v x5 x6)).(eq_ind_r C (CHead x4 x3 x5) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K C T +T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 +k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 +x5)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x4 x3 x5) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) +(ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u +w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x5)) (drop_drop (Flat f) n0 x1 +(CHead x4 x3 x6) H17 x0) H18)) e H16)))))))) H15)) (\lambda (H15: (ex3_4 K C +C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O x1 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 +(S n0))) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O x1 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead +x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: +C).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x4 x3 x6))).(\lambda (H17: +(drop (S n0) O x1 (CHead x5 x3 x6))).(\lambda (H18: (csubst0 (minus x2 (s x3 +(S n0))) v x4 x5)).(eq_ind_r C (CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop +(S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) +(\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 +(S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))))) +(or4_intro2 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 x6)) (ex3_4 K +C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) +(ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Flat f) n0 x1 +(CHead x5 x3 x6) H17 x0) H18)) e H16)))))))) H15)) (\lambda (H15: (ex4_5 K C +C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S n0))) v u +w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus x2 (s k0 (S n0))) v e1 +e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O x1 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2)))))) (or4 +(drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: +C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H16: (eq C e +(CHead x4 x3 x6))).(\lambda (H17: (drop (S n0) O x1 (CHead x5 x3 +x7))).(\lambda (H18: (subst0 (minus x2 (s x3 (S n0))) v x6 x7)).(\lambda +(H19: (csubst0 (minus x2 (s x3 (S n0))) v x4 x5)).(eq_ind_r C (CHead x4 x3 +x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K +C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 +k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x2) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 +x6)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) +(ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)))))) x3 x4 x5 +x6 x7 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Flat f) n0 x1 (CHead x5 x3 +x7) H17 x0) H18 H19)) e H16)))))))))) H15)) H14)))))) k (drop_gen_drop k c e +t n0 H2) H9 H10) i H5))) c2 H6)))))))) H4)) H3))))))))))) c1)))))) n). + +lemma csubst0_drop_eq: + \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 +n v c1 c2) \to (\forall (e: C).((drop n O c1 e) \to (or4 (drop n O c2 e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n O c2 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop n O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: +C).(\forall (v: T).((csubst0 n0 v c1 c2) \to (\forall (e: C).((drop n0 O c1 +e) \to (or4 (drop n0 O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O +c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n0 O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c2 (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda +(H: (csubst0 O v c1 c2)).(\lambda (e: C).(\lambda (H0: (drop O O c1 +e)).(eq_ind C c1 (\lambda (c: C).(or4 (drop O O c2 c) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O +c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (insert_eq nat O (\lambda (n0: nat).(csubst0 n0 v c1 c2)) +(\lambda (n0: nat).(or4 (drop n0 n0 c2 c1) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c1 (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 n0 c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c1 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n0 n0 c2 (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c1 (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 n0 c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 n0 v e1 e2))))))))) (\lambda (y: nat).(\lambda (H1: (csubst0 +y v c1 c2)).(csubst0_ind (\lambda (n0: nat).(\lambda (t: T).(\lambda (c: +C).(\lambda (c0: C).((eq nat n0 O) \to (or4 (drop n0 n0 c0 c) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 n0 c0 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 t u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 c0 (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 +t e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 n0 c0 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 t u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 n0 t e1 e2))))))))))))) (\lambda (k: K).(K_ind (\lambda (k0: +K).(\forall (i: nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: +T).((subst0 i v0 u1 u2) \to (\forall (c: C).((eq nat (s k0 i) O) \to (or4 +(drop (s k0 i) (s k0 i) (CHead c k0 u2) (CHead c k0 u1)) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead +c k0 u1) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (s k0 i) (s k0 i) (CHead c k0 u2) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (s k0 i) v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c k0 u1) (CHead e1 (Flat f) +u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s k0 i) (s k0 i) (CHead c k0 u2) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s +k0 i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c k0 u1) +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) (s k0 i) (CHead c k0 u2) +(CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (s k0 i) v0 u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(s k0 i) v0 e1 e2)))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda +(v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i v0 u1 +u2)).(\lambda (c: C).(\lambda (H3: (eq nat (S i) O)).(let H4 \def (eq_ind nat +(S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H3) in (False_ind (or4 (drop (S i) (S i) (CHead c +(Bind b) u2) (CHead c (Bind b) u1)) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Bind b) u1) (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S i) (S i) (CHead c (Bind b) u2) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (S i) +v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead c (Bind b) u1) (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S i) +(S i) (CHead c (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S i) v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Bind b) u1) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S i) (S i) (CHead c (Bind b) u2) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (S i) v0 u w)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (S i) v0 e1 +e2)))))))) H4)))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 +u2)).(\lambda (c: C).(\lambda (H3: (eq nat i O)).(let H4 \def (eq_ind nat i +(\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O H3) in (eq_ind_r nat O (\lambda +(n0: nat).(or4 (drop n0 n0 (CHead c (Flat f) u2) (CHead c (Flat f) u1)) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead c (Flat f) u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 (CHead c +(Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C +(CHead c (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 (CHead c (Flat f) u2) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead c (Flat f) u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 (CHead c +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro1 (drop O O (CHead c (Flat f) +u2) (CHead c (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Flat f) u1) (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O O (CHead c (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead c (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O (CHead c (Flat +f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda +(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead c (Flat f) u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O +(CHead c (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Flat f) +u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop O O (CHead c (Flat f) u2) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v0 u w))))) f c u1 u2 (refl_equal C (CHead c (Flat f) u1)) +(drop_refl (CHead c (Flat f) u2)) H4)) i H3)))))))))) k)) (\lambda (k: +K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (c3: C).(\forall (c4: +C).(\forall (v0: T).((csubst0 i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop +i i c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 i v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 i v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 e2)))))))))) \to (\forall +(u: T).((eq nat (s k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead c4 k0 u) +(CHead c3 k0 u)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead c3 k0 u) (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 +i) (s k0 i) (CHead c4 k0 u) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (s k0 i) v0 u0 +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead c3 k0 u) (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k0 +i) (s k0 i) (CHead c4 k0 u) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k0 u) (CHead e1 (Flat f) +u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s k0 i) (s k0 i) (CHead c4 k0 u) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (s k0 i) v0 u0 w)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (s k0 i) v0 +e1 e2))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (c3: +C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (_: (csubst0 i v0 c3 +c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop i i c4 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop i i c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat +(S i) O)).(let H5 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (or4 +(drop (S i) (S i) (CHead c4 (Bind b) u) (CHead c3 (Bind b) u)) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C +(CHead c3 (Bind b) u) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S i) (S i) (CHead c4 (Bind b) +u) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (S i) v0 u0 w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 (Bind b) +u) (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S i) (S i) (CHead c4 (Bind b) u) (CHead e2 (Flat +f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (S i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 +(Bind b) u) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S i) (S i) (CHead +c4 (Bind b) u) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (S i) v0 u0 +w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (S i) v0 e1 e2)))))))) H5))))))))))) (\lambda (f: +F).(\lambda (i: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: +T).(\lambda (H2: (csubst0 i v0 c3 c4)).(\lambda (H3: (((eq nat i O) \to (or4 +(drop i i c4 c3) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e0 +(Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 i v0 u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i i +c4 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 i v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda +(u: T).(\lambda (H4: (eq nat i O)).(let H5 \def (eq_ind nat i (\lambda (n0: +nat).((eq nat n0 O) \to (or4 (drop n0 n0 c4 c3) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 n0 c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c3 +(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop n0 n0 c4 (CHead e2 (Flat f0) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 n0 c4 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 +w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))))))) H3 O H4) in (let H6 \def +(eq_ind nat i (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H2 O H4) in (eq_ind_r +nat O (\lambda (n0: nat).(or4 (drop n0 n0 (CHead c4 (Flat f) u) (CHead c3 +(Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e0 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 +(CHead c4 (Flat f) u) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 w)))))) (ex3_4 F C C +T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C +(CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 n0 (CHead c4 (Flat f) u) +(CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C +(CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 (CHead c4 +(Flat f) u) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 n0 v0 u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro2 (drop O O (CHead c4 (Flat f) +u) (CHead c3 (Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e0 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O O (CHead c4 (Flat f) u) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 u0 +w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O +(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop O O (CHead c4 (Flat f) u) (CHead e2 (Flat f0) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v0 u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F +C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq +C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O (CHead c4 +(Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2))))) f c3 c4 u +(refl_equal C (CHead c3 (Flat f) u)) (drop_refl (CHead c4 (Flat f) u)) H6)) i +H4)))))))))))) k)) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: +nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: T).((subst0 i v0 u1 u2) +\to (\forall (c3: C).(\forall (c4: C).((csubst0 i v0 c3 c4) \to ((((eq nat i +O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 +(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 i v0 u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop i i c4 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T +T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C c3 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop i i c4 (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 i v0 u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 +e2)))))))))) \to ((eq nat (s k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead +c4 k0 u2) (CHead c3 k0 u1)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 k0 u1) (CHead e0 (Flat f) +u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k0 i) (s k0 i) (CHead c4 k0 u2) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (s k0 +i) v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead c3 k0 u1) (CHead e1 (Flat f) u)))))) (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k0 i) (s k0 +i) (CHead c4 k0 u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 e2)))))) (ex4_5 F +C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead c3 k0 u1) (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k0 i) (s k0 i) (CHead c4 k0 u2) (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (s k0 i) v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 +e2))))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i v0 u1 +u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubst0 i v0 c3 +c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop i i c4 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop i i c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (H5: (eq nat (S i) O)).(let H6 +\def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False +| (S _) \Rightarrow True])) I O H5) in (False_ind (or4 (drop (S i) (S i) +(CHead c4 (Bind b) u2) (CHead c3 (Bind b) u1)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Bind b) +u1) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S i) (S i) (CHead c4 (Bind b) u2) (CHead e0 (Flat +f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (S i) v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 (Bind b) u1) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S i) (S i) (CHead c4 (Bind b) u2) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S +i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Bind b) u1) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S i) (S i) (CHead c4 (Bind b) u2) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (S i) v0 u w)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (S i) v0 e1 +e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 +u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i v0 c3 +c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop i i c4 c3) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop i i c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop i i c4 (CHead e2 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop i i c4 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 i v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 +\def (eq_ind nat i (\lambda (n0: nat).((eq nat n0 O) \to (or4 (drop n0 n0 c4 +c3) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c3 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 n0 c4 (CHead e0 (Flat f0) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 +u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 c4 (CHead e2 +(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop n0 n0 c4 (CHead e2 (Flat f0) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 n0 v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))))))) H4 O H5) in +(let H7 \def (eq_ind nat i (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H3 O H5) +in (let H8 \def (eq_ind nat i (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O +H5) in (eq_ind_r nat O (\lambda (n0: nat).(or4 (drop n0 n0 (CHead c4 (Flat f) +u2) (CHead c3 (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u1) (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 n0 (CHead c4 (Flat f) u2) (CHead e0 (Flat f0) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 n0 v0 +u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 n0 +(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F +C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 n0 (CHead c4 (Flat f) u2) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 n0 v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro3 +(drop O O (CHead c4 (Flat f) u2) (CHead c3 (Flat f) u1)) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead c3 (Flat f) u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 (Flat f) +u1) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop O O (CHead c4 (Flat f) u2) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) +u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) +u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2)))))) f c3 c4 u1 u2 (refl_equal C (CHead c3 (Flat f) u1)) +(drop_refl (CHead c4 (Flat f) u2)) H8 H7)) i H5))))))))))))))) k)) y v c1 c2 +H1))) H) e (drop_gen_refl c1 e H0)))))))) (\lambda (n0: nat).(\lambda (IHn: +((\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 n0 v c1 c2) \to +(\forall (e: C).((drop n0 O c1 e) \to (or4 (drop n0 O c2 e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c2 (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))))))))))).(\lambda (c1: C).(C_ind (\lambda +(c: C).(\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to (\forall +(e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (n1: +nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 (S n0) v (CSort +n1) c2)).(\lambda (e: C).(\lambda (H0: (drop (S n0) O (CSort n1) +e)).(and3_ind (eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (or4 (drop +(S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (H1: (eq C e (CSort n1))).(\lambda (H2: (eq nat (S n0) +O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: C).(or4 +(drop (S n0) O c2 c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +c (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (let H4 \def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee with +[O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (or4 +(drop (S n0) O c2 (CSort n1)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CSort n1) (CHead e0 (Flat f) +u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CSort +n1) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CSort n1) (CHead e1 (Flat f) u))))))) (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop +(S n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) H4)) e H1)))) (drop_gen_sort n1 (S n0) O e +H0)))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: +T).((csubst0 (S n0) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 +(drop (S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) c2)).(\lambda (e: +C).(\lambda (H1: (drop (S n0) O (CHead c k t) e)).(let H2 \def +(csubst0_gen_head k c c2 t v (S n0) H0) in (or3_ind (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (drop (S +n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (H3: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq +nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k +u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T +nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))) (or4 (drop (S n0) O c2 e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: (eq nat +(S n0) (s k x1))).(\lambda (H5: (eq C c2 (CHead c k x0))).(\lambda (H6: +(subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(or4 (drop (S +n0) O c0 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S +n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead c k0 x0) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c +k0 x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c k0 x0) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))) (\lambda (b: B).(\lambda (H7: (drop (r (Bind b) n0) O c +e)).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(let H9 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow +n1])) (S n0) (S x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n1: +nat).(subst0 n1 v t x0)) H6 n0 H9) in (or4_intro0 (drop (S n0) O (CHead c +(Bind b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c +(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c (Bind b) x0) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(drop_drop (Bind b) n0 c e H7 x0))))))) (\lambda (f: F).(\lambda (H7: (drop +(r (Flat f) n0) O c e)).(\lambda (H8: (eq nat (S n0) (s (Flat f) x1))).(let +H9 \def (f_equal nat nat (\lambda (e0: nat).e0) (S n0) (s (Flat f) x1) H8) in +(let H10 \def (eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S +n0) H9) in (or4_intro0 (drop (S n0) O (CHead c (Flat f) x0) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) x0) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e H7 +x0))))))) k (drop_gen_drop k c e t n0 H1) H4) c2 H5)))))) H3)) (\lambda (H3: +(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) +(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3))) (or4 (drop (S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat (S n0) +(s k x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 +v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c0: C).(or4 (drop (S n0) O c0 +e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S +n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead x0 k0 t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +k0 t) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))) (\lambda (b: B).(\lambda (H7: (drop (r (Bind b) n0) O c +e)).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(let H9 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow +n1])) (S n0) (S x1) H8) in (let H10 \def (eq_ind_r nat x1 (\lambda (n1: +nat).(csubst0 n1 v c x0)) H6 n0 H9) in (let H11 \def (IHn c x0 v H10 e H7) in +(or4_ind (drop n0 O x0 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O +x0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n0 O x0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(or4 (drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (H12: (drop n0 O x0 e)).(or4_intro0 (drop (S n0) O +(CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(drop_drop (Bind b) n0 x0 e H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 O x0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O x0 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 +(drop (S n0) O (CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda +(x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x4))).(\lambda (H14: (drop +n0 O x0 (CHead x3 (Flat x2) x5))).(\lambda (H15: (subst0 O v x4 +x5)).(eq_ind_r C (CHead x3 (Flat x2) x4) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 (Flat +x2) x4)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x3 (Flat x2) x4) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x3 (Flat x2) x4) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) +x4) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x4)) +(drop_drop (Bind b) n0 x0 (CHead x3 (Flat x2) x5) H14 t) H15)) e H13)))))))) +H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x0 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O +x0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead x0 +(Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H14: (drop n0 O +x0 (CHead x4 (Flat x2) x5))).(\lambda (H15: (csubst0 O v x3 x4)).(eq_ind_r C +(CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind +b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro2 (drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 (Flat +x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x3 (Flat x2) x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x3 (Flat x2) x5) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) +x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) +(drop_drop (Bind b) n0 x0 (CHead x4 (Flat x2) x5) H14 t) H15)) e H13)))))))) +H12)) (\lambda (H12: (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O x0 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) +O (CHead x0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda +(H14: (drop n0 O x0 (CHead x4 (Flat x2) x6))).(\lambda (H15: (subst0 O v x5 +x6)).(\lambda (H16: (csubst0 O v x3 x4)).(eq_ind_r C (CHead x3 (Flat x2) x5) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind b) t) c0) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O (CHead x0 (Bind b) t) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead x0 (Bind b) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) +x5) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat +f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat +f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x2 x3 x4 x5 x6 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Bind b) n0 +x0 (CHead x4 (Flat x2) x6) H14 t) H15 H16)) e H13)))))))))) H12)) H11))))))) +(\lambda (f: F).(\lambda (H7: (drop (r (Flat f) n0) O c e)).(\lambda (H8: (eq +nat (S n0) (s (Flat f) x1))).(let H9 \def (f_equal nat nat (\lambda (e0: +nat).e0) (S n0) (s (Flat f) x1) H8) in (let H10 \def (eq_ind_r nat x1 +(\lambda (n1: nat).(csubst0 n1 v c x0)) H6 (S n0) H9) in (let H11 \def (H x0 +v H10 e H7) in (or4_ind (drop (S n0) O x0 e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O x0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O x0 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H12: +(drop (S n0) O x0 e)).(or4_intro0 (drop (S n0) O (CHead x0 (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat +f) n0 x0 e H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda (f0: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O x0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O x0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) +O (CHead x0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda +(x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x4))).(\lambda (H14: (drop +(S n0) O x0 (CHead x3 (Flat x2) x5))).(\lambda (H15: (subst0 O v x4 +x5)).(eq_ind_r C (CHead x3 (Flat x2) x4) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 +(Flat x2) x4)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead x3 (Flat x2) x4) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x3 (Flat x2) x4) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 +(Flat x2) x4)) (drop_drop (Flat f) n0 x0 (CHead x3 (Flat x2) x5) H14 t) H15)) +e H13)))))))) H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O x0 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C +C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O x0 (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +(or4 (drop (S n0) O (CHead x0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda +(x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H14: (drop +(S n0) O x0 (CHead x4 (Flat x2) x5))).(\lambda (H15: (csubst0 O v x3 +x4)).(eq_ind_r C (CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 +(Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C +C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C +(CHead x3 (Flat x2) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead +x3 (Flat x2) x5)) (drop_drop (Flat f) n0 x0 (CHead x4 (Flat x2) x5) H14 t) +H15)) e H13)))))))) H12)) (\lambda (H12: (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x0 (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O x0 (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 +(Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat +f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda +(H14: (drop (S n0) O x0 (CHead x4 (Flat x2) x6))).(\lambda (H15: (subst0 O v +x5 x6)).(\lambda (H16: (csubst0 O v x3 x4)).(eq_ind_r C (CHead x3 (Flat x2) +x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +c0 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead x0 (Flat f) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) +x5) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 (Flat +f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat +f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e1 +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 (Flat +f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x2 x3 x4 x5 x6 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Flat f) n0 +x0 (CHead x4 (Flat x2) x6) H14 t) H15 H16)) e H13)))))))))) H12)) H11))))))) +k (drop_gen_drop k c e t n0 H1) H4) c2 H5)))))) H3)) (\lambda (H3: (ex4_3 T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k +j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 +k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda +(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: +C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (drop (S n0) O c2 e) (ex3_4 F +C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: +C).(\lambda (x2: nat).(\lambda (H4: (eq nat (S n0) (s k x2))).(\lambda (H5: +(eq C c2 (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v t x0)).(\lambda (H7: +(csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(or4 (drop +(S n0) O c0 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S +n0) (s k0 x2)) \to (or4 (drop (S n0) O (CHead x1 k0 x0) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +k0 x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 k0 x0) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))) (\lambda (b: B).(\lambda (H8: (drop (r (Bind b) n0) O c +e)).(\lambda (H9: (eq nat (S n0) (s (Bind b) x2))).(let H10 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow +n1])) (S n0) (S x2) H9) in (let H11 \def (eq_ind_r nat x2 (\lambda (n1: +nat).(csubst0 n1 v c x1)) H7 n0 H10) in (let H12 \def (eq_ind_r nat x2 +(\lambda (n1: nat).(subst0 n1 v t x0)) H6 n0 H10) in (let H13 \def (IHn c x1 +v H11 e H8) in (or4_ind (drop n0 O x1 e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O x1 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n0 O x1 (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 +O x1 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (or4 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H14: (drop n0 O x1 +e)).(or4_intro0 (drop (S n0) O (CHead x1 (Bind b) x0) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 x1 e H14 +x0))) (\lambda (H14: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O +x1 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) O (CHead x1 (Bind +b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x5))).(\lambda (H16: (drop n0 O +x1 (CHead x4 (Flat x3) x6))).(\lambda (H17: (subst0 O v x5 x6)).(eq_ind_r C +(CHead x4 (Flat x3) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind +b) x0) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 (Flat +x3) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x4 (Flat x3) x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x4 (Flat x3) x5) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) +x5) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x5)) +(drop_drop (Bind b) n0 x1 (CHead x4 (Flat x3) x6) H16 x0) H17)) e H15)))))))) +H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x1 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O +x1 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead x1 +(Bind b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H16: (drop n0 O +x1 (CHead x5 (Flat x3) x6))).(\lambda (H17: (csubst0 O v x4 x5)).(eq_ind_r C +(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind +b) x0) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro2 (drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 (Flat +x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x4 (Flat x3) x6) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x4 (Flat x3) x6) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) +x6) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) +(drop_drop (Bind b) n0 x1 (CHead x5 (Flat x3) x6) H16 x0) H17)) e H15)))))))) +H14)) (\lambda (H14: (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O x1 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) +O (CHead x1 (Bind b) x0) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (x7: T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x6))).(\lambda +(H16: (drop n0 O x1 (CHead x5 (Flat x3) x7))).(\lambda (H17: (subst0 O v x6 +x7)).(\lambda (H18: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x4 (Flat x3) x6) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind b) x0) c0) (ex3_4 F C T +T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead x1 (Bind b) x0) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) +x6) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat +f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 (Flat +f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x3 x4 x5 x6 x7 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Bind b) n0 +x1 (CHead x5 (Flat x3) x7) H16 x0) H17 H18)) e H15)))))))))) H14)) +H13)))))))) (\lambda (f: F).(\lambda (H8: (drop (r (Flat f) n0) O c +e)).(\lambda (H9: (eq nat (S n0) (s (Flat f) x2))).(let H10 \def (f_equal nat +nat (\lambda (e0: nat).e0) (S n0) (s (Flat f) x2) H9) in (let H11 \def +(eq_ind_r nat x2 (\lambda (n1: nat).(csubst0 n1 v c x1)) H7 (S n0) H10) in +(let H12 \def (eq_ind_r nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S +n0) H10) in (let H13 \def (H x1 v H11 e H8) in (or4_ind (drop (S n0) O x1 e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O x1 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead +e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H14: (drop (S n0) O +x1 e)).(or4_intro0 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 x1 e H14 +x0))) (\lambda (H14: (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O x1 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O x1 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) +O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda +(x6: T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x5))).(\lambda (H16: (drop +(S n0) O x1 (CHead x4 (Flat x3) x6))).(\lambda (H17: (subst0 O v x5 +x6)).(eq_ind_r C (CHead x4 (Flat x3) x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x1 (Flat f) x0) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead +x4 (Flat x3) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e0 (Flat f0) +u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead x4 (Flat x3) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x4 (Flat x3) x5) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 +(Flat x3) x5)) (drop_drop (Flat f) n0 x1 (CHead x4 (Flat x3) x6) H16 x0) +H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O x1 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind +F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O x1 (CHead e2 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: +C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 (Flat +x3) x6))).(\lambda (H16: (drop (S n0) O x1 (CHead x5 (Flat x3) x6))).(\lambda +(H17: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead x1 (Flat +f) x0) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) +u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Flat f) n0 x1 +(CHead x5 (Flat x3) x6) H16 x0) H17)) e H15)))))))) H14)) (\lambda (H14: +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O x1 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(or4 (drop (S n0) O (CHead x1 (Flat f) x0) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda +(x6: T).(\lambda (x7: T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) +x6))).(\lambda (H16: (drop (S n0) O x1 (CHead x5 (Flat x3) x7))).(\lambda +(H17: (subst0 O v x6 x7)).(\lambda (H18: (csubst0 O v x4 x5)).(eq_ind_r C +(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat +f) x0) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat +f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 (Flat +x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e0 (Flat f0) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x3 x4 x5 x6 x7 +(refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Flat f) n0 x1 (CHead x5 +(Flat x3) x7) H16 x0) H17 H18)) e H15)))))))))) H14)) H13)))))))) k +(drop_gen_drop k c e t n0 H1) H4) c2 H5)))))))) H3)) H2))))))))))) c1)))) n). + +lemma csubst0_drop_eq_back: + \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 +n v c1 c2) \to (\forall (e: C).((drop n O c2 e) \to (or4 (drop n O c1 e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop n O c1 (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n O c1 (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop n O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: +C).(\forall (v: T).((csubst0 n0 v c1 c2) \to (\forall (e: C).((drop n0 O c2 +e) \to (or4 (drop n0 O c1 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O +c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop n0 O c1 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c1 (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda +(H: (csubst0 O v c1 c2)).(\lambda (e: C).(\lambda (H0: (drop O O c2 +e)).(eq_ind C c2 (\lambda (c: C).(or4 (drop O O c1 c) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop O O c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop O O c1 (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C c (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O +O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (insert_eq nat O (\lambda (n0: nat).(csubst0 n0 v c1 c2)) +(\lambda (n0: nat).(or4 (drop n0 n0 c1 c2) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c2 (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop n0 n0 c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c2 +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop n0 n0 c1 (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c2 (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 n0 c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 v u1 +u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 n0 v e1 e2))))))))) (\lambda (y: nat).(\lambda +(H1: (csubst0 y v c1 c2)).(csubst0_ind (\lambda (n0: nat).(\lambda (t: +T).(\lambda (c: C).(\lambda (c0: C).((eq nat n0 O) \to (or4 (drop n0 n0 c c0) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 c (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 +t u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 c (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 n0 t e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop n0 n0 c (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 n0 t u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 t e1 e2))))))))))))) (\lambda +(k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (v0: T).(\forall +(u1: T).(\forall (u2: T).((subst0 i v0 u1 u2) \to (\forall (c: C).((eq nat (s +k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead c k0 u1) (CHead c k0 u2)) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: +T).(eq C (CHead c k0 u2) (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda +(e0: C).(\lambda (u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c k0 +u1) (CHead e0 (Flat f) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: +T).(\lambda (u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c k0 u2) +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (s k0 i) (s k0 i) (CHead c k0 u1) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (s k0 i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c k0 +u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c k0 +u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (s k0 i) v0 e1 e2)))))))))))))))) (\lambda (b: B).(\lambda (i: +nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 +i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq nat (S i) O)).(let H4 \def +(eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S +_) \Rightarrow True])) I O H3) in (False_ind (or4 (drop (S i) (S i) (CHead c +(Bind b) u1) (CHead c (Bind b) u2)) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Bind b) u2) (CHead +e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop (S i) (S i) (CHead c (Bind b) u1) (CHead e0 (Flat f) +u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: +T).(subst0 (S i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c (Bind b) u2) (CHead e2 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S i) (S i) (CHead c (Bind b) u1) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S +i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Bind b) u2) (CHead +e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (_: T).(drop (S i) (S i) (CHead c (Bind b) u1) +(CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (S i) v0 u3 u4)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (S i) v0 e1 e2)))))))) H4)))))))))) (\lambda (f: F).(\lambda (i: +nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 +i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq nat i O)).(let H4 \def (eq_ind +nat i (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O H3) in (eq_ind_r nat O +(\lambda (n0: nat).(or4 (drop n0 n0 (CHead c (Flat f) u1) (CHead c (Flat f) +u2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e0 (Flat f0) u4)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop n0 +n0 (CHead c (Flat f) u1) (CHead e0 (Flat f0) u3)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 n0 v0 u3 +u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead c (Flat f) u2) (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 +(CHead c (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F +C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e2 (Flat f0) u4))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(_: T).(drop n0 n0 (CHead c (Flat f) u1) (CHead e1 (Flat f0) u3))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(u4: T).(subst0 n0 v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2))))))))) +(or4_intro1 (drop O O (CHead c (Flat f) u1) (CHead c (Flat f) u2)) (ex3_4 F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C +(CHead c (Flat f) u2) (CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c (Flat f) u1) +(CHead e0 (Flat f0) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: +T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c (Flat f) +u2) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(drop O O (CHead c (Flat f) u1) (CHead e1 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Flat f) +u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c (Flat f) u1) +(CHead e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e0 +(Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop O O (CHead c (Flat f) u1) (CHead e0 (Flat f0) +u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: +T).(subst0 O v0 u3 u4))))) f c u1 u2 (refl_equal C (CHead c (Flat f) u2)) +(drop_refl (CHead c (Flat f) u1)) H4)) i H3)))))))))) k)) (\lambda (k: +K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (c3: C).(\forall (c4: +C).(\forall (v0: T).((csubst0 i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop +i i c3 c4) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 +(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 e2)))))))))) \to +(\forall (u: T).((eq nat (s k0 i) O) \to (or4 (drop (s k0 i) (s k0 i) (CHead +c3 k0 u) (CHead c4 k0 u)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 k0 u) (CHead e0 (Flat f) +u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (s +k0 i) v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u0: T).(eq C (CHead c4 k0 u) (CHead e2 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(drop (s k0 +i) (s k0 i) (CHead c3 k0 u) (CHead e1 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (s k0 i) v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 k0 u) (CHead e2 (Flat f) +u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 (s k0 i) v0 u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (s k0 i) v0 +e1 e2))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (c3: +C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (_: (csubst0 i v0 c3 +c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v0 u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop i i c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v0 u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat +(S i) O)).(let H5 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (or4 +(drop (S i) (S i) (CHead c3 (Bind b) u) (CHead c4 (Bind b) u)) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead c4 (Bind b) u) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S i) (S i) (CHead c3 (Bind b) +u) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 (S i) v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Bind b) +u) (CHead e2 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(drop (S i) (S i) (CHead c3 (Bind b) u) (CHead e1 (Flat +f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (S i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 +(Bind b) u) (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S i) (S i) (CHead +c3 (Bind b) u) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (S i) v0 u1 +u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (S i) v0 e1 e2)))))))) H5))))))))))) (\lambda (f: +F).(\lambda (i: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: +T).(\lambda (H2: (csubst0 i v0 c3 c4)).(\lambda (H3: (((eq nat i O) \to (or4 +(drop i i c3 c4) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e0 +(Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i i +c3 (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop i i c3 (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 +e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat i O)).(let H5 \def +(eq_ind nat i (\lambda (n0: nat).((eq nat n0 O) \to (or4 (drop n0 n0 c3 c4) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c4 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 c3 (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 n0 v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(eq C c4 (CHead e2 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(drop n0 +n0 c3 (CHead e1 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq +C c4 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 c3 (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 n0 v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 +e2)))))))))) H3 O H4) in (let H6 \def (eq_ind nat i (\lambda (n0: +nat).(csubst0 n0 v0 c3 c4)) H2 O H4) in (eq_ind_r nat O (\lambda (n0: +nat).(or4 (drop n0 n0 (CHead c3 (Flat f) u) (CHead c4 (Flat f) u)) (ex3_4 F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead c4 (Flat f) u) (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 (CHead c3 (Flat f) u) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 n0 v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Flat f) +u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(drop n0 n0 (CHead c3 (Flat f) u) (CHead e1 (Flat f0) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 (Flat f) +u) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 n0 (CHead c3 (Flat f) u) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 n0 v0 u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +n0 v0 e1 e2))))))))) (or4_intro2 (drop O O (CHead c3 (Flat f) u) (CHead c4 +(Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead c4 (Flat f) u) (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O +(CHead c3 (Flat f) u) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C +C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C +(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) +(CHead e1 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 +(Flat f) u) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Flat f) +u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) (CHead e1 (Flat f0) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v0 e1 e2))))) f c3 c4 u (refl_equal C (CHead c4 (Flat f) u)) +(drop_refl (CHead c3 (Flat f) u)) H6)) i H4)))))))))))) k)) (\lambda (k: +K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (v0: T).(\forall (u1: +T).(\forall (u2: T).((subst0 i v0 u1 u2) \to (\forall (c3: C).(\forall (c4: +C).((csubst0 i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 +F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq +C c4 (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u3: T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f) u3)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 (Flat f) u4))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(_: T).(drop i i c3 (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v0 e1 e2)))))))))) \to ((eq nat (s k0 i) O) \to (or4 (drop +(s k0 i) (s k0 i) (CHead c3 k0 u1) (CHead c4 k0 u2)) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 k0 +u2) (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u1) (CHead e0 +(Flat f) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda +(u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c4 k0 u2) +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 u1) (CHead e1 (Flat +f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (s k0 i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 k0 +u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u3: T).(\lambda (_: T).(drop (s k0 i) (s k0 i) (CHead c3 k0 +u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (s k0 i) v0 u3 u4)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (s k0 i) v0 e1 e2))))))))))))))))))) (\lambda (b: B).(\lambda (i: +nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 +i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubst0 i v0 c3 +c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 +(CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f) u3)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 (Flat f) u4))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(_: T).(drop i i c3 (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v0 e1 e2))))))))))).(\lambda (H5: (eq nat (S i) O)).(let H6 +\def (eq_ind nat (S i) (\lambda (ee: nat).(match ee with [O \Rightarrow False +| (S _) \Rightarrow True])) I O H5) in (False_ind (or4 (drop (S i) (S i) +(CHead c3 (Bind b) u1) (CHead c4 (Bind b) u2)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Bind b) +u2) (CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u3: T).(\lambda (_: T).(drop (S i) (S i) (CHead c3 (Bind b) u1) (CHead e0 +(Flat f) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda +(u4: T).(subst0 (S i) v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c4 (Bind b) u2) (CHead +e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S i) (S i) (CHead c3 (Bind b) u1) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (S +i) v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Bind b) u2) (CHead +e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (_: T).(drop (S i) (S i) (CHead c3 (Bind b) u1) +(CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 (S i) v0 u3 u4)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (S i) v0 e1 e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda +(i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: +(subst0 i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 +i v0 c3 c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop i i c3 c4) (ex3_4 F +C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq +C c4 (CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u3: T).(\lambda (_: T).(drop i i c3 (CHead e0 (Flat f0) u3)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 i v0 u3 +u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i i c3 (CHead e1 +(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 +(Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (_: T).(drop i i c3 (CHead e1 (Flat f0) +u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: +T).(\lambda (u4: T).(subst0 i v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v0 e1 +e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 \def (eq_ind nat i (\lambda +(n0: nat).((eq nat n0 O) \to (or4 (drop n0 n0 c3 c4) (ex3_4 F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e0 +(Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop n0 n0 c3 (CHead e0 (Flat f0) u3)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 n0 v0 u3 +u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 c3 (CHead e1 +(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 +(Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (_: T).(drop n0 n0 c3 (CHead e1 (Flat f0) +u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: +T).(\lambda (u4: T).(subst0 n0 v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 n0 v0 e1 +e2)))))))))) H4 O H5) in (let H7 \def (eq_ind nat i (\lambda (n0: +nat).(csubst0 n0 v0 c3 c4)) H3 O H5) in (let H8 \def (eq_ind nat i (\lambda +(n0: nat).(subst0 n0 v0 u1 u2)) H2 O H5) in (eq_ind_r nat O (\lambda (n0: +nat).(or4 (drop n0 n0 (CHead c3 (Flat f) u1) (CHead c4 (Flat f) u2)) (ex3_4 F +C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq +C (CHead c4 (Flat f) u2) (CHead e0 (Flat f0) u4)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop n0 n0 (CHead c3 +(Flat f) u1) (CHead e0 (Flat f0) u3)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 n0 v0 u3 u4)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C +(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 n0 (CHead c3 (Flat f) u1) +(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 n0 v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C +(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop n0 +n0 (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u3))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 +n0 v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 n0 v0 e1 e2))))))))) (or4_intro3 (drop O O +(CHead c3 (Flat f) u1) (CHead c4 (Flat f) u2)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) +u2) (CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) (CHead e0 (Flat f0) +u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: +T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop O O (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 +(Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) (CHead +e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) +u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) +(CHead e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2)))))) f c3 c4 u1 u2 (refl_equal C (CHead c4 (Flat f) u2)) +(drop_refl (CHead c3 (Flat f) u1)) H8 H7)) i H5))))))))))))))) k)) y v c1 c2 +H1))) H) e (drop_gen_refl c2 e H0)))))))) (\lambda (n0: nat).(\lambda (IHn: +((\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 n0 v c1 c2) \to +(\forall (e: C).((drop n0 O c2 e) \to (or4 (drop n0 O c1 e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c1 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))))).(\lambda (c1: C).(C_ind +(\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to +(\forall (e: C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O c e) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (n1: +nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: (csubst0 (S n0) v (CSort +n1) c2)).(\lambda (e: C).(\lambda (_: (drop (S n0) O c2 e)).(csubst0_gen_sort +c2 v (S n0) n1 H (or4 (drop (S n0) O (CSort n1) e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CSort n1) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead e1 (Flat +f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CSort n1) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))))))) +(\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).((csubst0 (S +n0) v c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O +c e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) c2)).(\lambda (e: +C).(\lambda (H1: (drop (S n0) O c2 e)).(let H2 \def (csubst0_gen_head k c c2 +t v (S n0) H0) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq +nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k +u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda +(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: +T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (drop (S +n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H3: (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 +(CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or4 +(drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda +(x1: nat).(\lambda (H4: (eq nat (S n0) (s k x1))).(\lambda (H5: (eq C c2 +(CHead c k x0))).(\lambda (H6: (subst0 x1 v t x0)).(let H7 \def (eq_ind C c2 +(\lambda (c0: C).(drop (S n0) O c0 e)) H1 (CHead c k x0) H5) in (K_ind +(\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop (r k0 n0) O c e) \to +(or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) (\lambda (b: +B).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(\lambda (H9: (drop (r +(Bind b) n0) O c e)).(let H10 \def (f_equal nat nat (\lambda (e0: nat).(match +e0 with [O \Rightarrow n0 | (S n1) \Rightarrow n1])) (S n0) (S x1) H8) in +(let H11 \def (eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 n0 +H10) in (or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e +H9 t))))))) (\lambda (f: F).(\lambda (H8: (eq nat (S n0) (s (Flat f) +x1))).(\lambda (H9: (drop (r (Flat f) n0) O c e)).(let H10 \def (f_equal nat +nat (\lambda (e0: nat).e0) (S n0) (s (Flat f) x1) H8) in (let H11 \def +(eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S n0) H10) in +(or4_intro0 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e +H9 t))))))) k H4 (drop_gen_drop k c e x0 n0 H7)))))))) H3)) (\lambda (H3: +(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) +(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3))) (or4 (drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x0: C).(\lambda (x1: nat).(\lambda (H4: (eq nat (S n0) (s k x1))).(\lambda +(H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: (csubst0 x1 v c x0)).(let H7 +\def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H1 (CHead x0 k t) +H5) in (K_ind (\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop (r k0 +n0) O x0 e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k0 t) (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) +(\lambda (b: B).(\lambda (H8: (eq nat (S n0) (s (Bind b) x1))).(\lambda (H9: +(drop (r (Bind b) n0) O x0 e)).(let H10 \def (f_equal nat nat (\lambda (e0: +nat).(match e0 with [O \Rightarrow n0 | (S n1) \Rightarrow n1])) (S n0) (S +x1) H8) in (let H11 \def (eq_ind_r nat x1 (\lambda (n1: nat).(csubst0 n1 v c +x0)) H6 n0 H10) in (let H12 \def (IHn c x0 v H11 e H9) in (or4_ind (drop n0 O +c e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead c +(Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (H13: (drop n0 O c e)).(or4_intro0 (drop (S n0) O (CHead +c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(drop_drop (Bind b) n0 c e H13 t))) (\lambda (H13: (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) +(or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda +(x4: T).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 (Flat x2) +x5))).(\lambda (H15: (drop n0 O c (CHead x3 (Flat x2) x4))).(\lambda (H16: +(subst0 O v x4 x5)).(let H17 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x0 +c0)) H9 (CHead x3 (Flat x2) x5) H14) in (eq_ind_r C (CHead x3 (Flat x2) x5) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead c (Bind b) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat +x2) x5) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat +f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) +x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Bind b) n0 c +(CHead x3 (Flat x2) x4) H15 t) H16)) e H14))))))))) H13)) (\lambda (H13: +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (H14: (eq +C e (CHead x4 (Flat x2) x5))).(\lambda (H15: (drop n0 O c (CHead x3 (Flat x2) +x5))).(\lambda (H16: (csubst0 O v x3 x4)).(let H17 \def (eq_ind C e (\lambda +(c0: C).(drop n0 O x0 c0)) H9 (CHead x4 (Flat x2) x5) H14) in (eq_ind_r C +(CHead x4 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind +b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Bind b) t) (CHead x4 (Flat +x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u2))))))) (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C +C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C +(CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead +x4 (Flat x2) x5)) (drop_drop (Bind b) n0 c (CHead x3 (Flat x2) x5) H15 t) +H16)) e H14))))))))) H13)) (\lambda (H13: (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind +F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 +O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda +(x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H14: (eq +C e (CHead x4 (Flat x2) x6))).(\lambda (H15: (drop n0 O c (CHead x3 (Flat x2) +x5))).(\lambda (H16: (subst0 O v x5 x6)).(\lambda (H17: (csubst0 O v x3 +x4)).(let H18 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x0 c0)) H9 (CHead +x4 (Flat x2) x6) H14) in (eq_ind_r C (CHead x4 (Flat x2) x6) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Bind +b) t) (CHead x4 (Flat x2) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f) +u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x2 x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x2) x6)) (drop_drop (Bind b) n0 +c (CHead x3 (Flat x2) x5) H15 t) H16 H17)) e H14))))))))))) H13)) H12))))))) +(\lambda (f: F).(\lambda (H8: (eq nat (S n0) (s (Flat f) x1))).(\lambda (H9: +(drop (r (Flat f) n0) O x0 e)).(let H10 \def (f_equal nat nat (\lambda (e0: +nat).e0) (S n0) (s (Flat f) x1) H8) in (let H11 \def (eq_ind_r nat x1 +(\lambda (n1: nat).(csubst0 n1 v c x0)) H6 (S n0) H10) in (let H12 \def (H x0 +v H11 e H9) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(H13: (drop (S n0) O c e)).(or4_intro0 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop +(Flat f) n0 c e H13 t))) (\lambda (H13: (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda +(x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 +(Flat x2) x5))).(\lambda (H15: (drop (S n0) O c (CHead x3 (Flat x2) +x4))).(\lambda (H16: (subst0 O v x4 x5)).(let H17 \def (eq_ind C e (\lambda +(c0: C).(drop (S n0) O x0 c0)) H9 (CHead x3 (Flat x2) x5) H14) in (eq_ind_r C +(CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat +f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 +(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat +f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Flat f) t) (CHead x3 (Flat +x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f0) +u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f0) +u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Flat +f) n0 c (CHead x3 (Flat x2) x4) H15 t) H16)) e H14))))))))) H13)) (\lambda +(H13: (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) +O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda +(x5: T).(\lambda (H14: (eq C e (CHead x4 (Flat x2) x5))).(\lambda (H15: (drop +(S n0) O c (CHead x3 (Flat x2) x5))).(\lambda (H16: (csubst0 O v x3 x4)).(let +H17 \def (eq_ind C e (\lambda (c0: C).(drop (S n0) O x0 c0)) H9 (CHead x4 +(Flat x2) x5) H14) in (eq_ind_r C (CHead x4 (Flat x2) x5) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Flat +f) t) (CHead x4 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 +(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x4 (Flat x2) x5)) (drop_drop +(Flat f) n0 c (CHead x3 (Flat x2) x5) H15 t) H16)) e H14))))))))) H13)) +(\lambda (H13: (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C +C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (H14: (eq C e (CHead x4 (Flat x2) x6))).(\lambda (H15: (drop (S +n0) O c (CHead x3 (Flat x2) x5))).(\lambda (H16: (subst0 O v x5 x6)).(\lambda +(H17: (csubst0 O v x3 x4)).(let H18 \def (eq_ind C e (\lambda (c0: C).(drop +(S n0) O x0 c0)) H9 (CHead x4 (Flat x2) x6) H14) in (eq_ind_r C (CHead x4 +(Flat x2) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) +(or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x4 (Flat x2) x6)) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e0 (Flat f0) u2)))))) (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O +(CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C +T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C +(CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) u2))))))) (\lambda +(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x2 x3 x4 x5 x6 +(refl_equal C (CHead x4 (Flat x2) x6)) (drop_drop (Flat f) n0 c (CHead x3 +(Flat x2) x5) H15 t) H16 H17)) e H14))))))))))) H13)) H12))))))) k H4 +(drop_gen_drop k x0 e t n0 H7)))))))) H3)) (\lambda (H3: (ex4_3 T C nat +(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) +(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda +(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: +C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (drop (S n0) O (CHead c k t) +e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c k t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k +t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: +nat).(\lambda (H4: (eq nat (S n0) (s k x2))).(\lambda (H5: (eq C c2 (CHead x1 +k x0))).(\lambda (H6: (subst0 x2 v t x0)).(\lambda (H7: (csubst0 x2 v c +x1)).(let H8 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H1 +(CHead x1 k x0) H5) in (K_ind (\lambda (k0: K).((eq nat (S n0) (s k0 x2)) \to +((drop (r k0 n0) O x1 e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq +C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead +e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))))) (\lambda (b: B).(\lambda (H9: (eq nat (S n0) (s (Bind b) +x2))).(\lambda (H10: (drop (r (Bind b) n0) O x1 e)).(let H11 \def (f_equal +nat nat (\lambda (e0: nat).(match e0 with [O \Rightarrow n0 | (S n1) +\Rightarrow n1])) (S n0) (S x2) H9) in (let H12 \def (eq_ind_r nat x2 +(\lambda (n1: nat).(csubst0 n1 v c x1)) H7 n0 H11) in (let H13 \def (eq_ind_r +nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 n0 H11) in (let H14 \def +(IHn c x1 v H12 e H10) in (or4_ind (drop n0 O c e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 +O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H15: (drop n0 O c +e)).(or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e +H15 t))) (\lambda (H15: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O +c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) +O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead +e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda +(x6: T).(\lambda (H16: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H17: (drop +n0 O c (CHead x4 (Flat x3) x5))).(\lambda (H18: (subst0 O v x5 x6)).(let H19 +\def (eq_ind C e (\lambda (c0: C).(drop n0 O x1 c0)) H10 (CHead x4 (Flat x3) +x6) H16) in (eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop +(S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead +e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind b) t) (CHead x4 +(Flat x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u2))))))) (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead +x4 (Flat x3) x6)) (drop_drop (Bind b) n0 c (CHead x4 (Flat x3) x5) H17 t) +H18)) e H16))))))))) H15)) (\lambda (H15: (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C +C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +(or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda +(x5: C).(\lambda (x6: T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) +x6))).(\lambda (H17: (drop n0 O c (CHead x4 (Flat x3) x6))).(\lambda (H18: +(csubst0 O v x4 x5)).(let H19 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x1 +c0)) H10 (CHead x5 (Flat x3) x6) H16) in (eq_ind_r C (CHead x5 (Flat x3) x6) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead c (Bind b) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat +x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat +f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x3 x4 x5 x6 +(refl_equal C (CHead x5 (Flat x3) x6)) (drop_drop (Bind b) n0 c (CHead x4 +(Flat x3) x6) H17 t) H18)) e H16))))))))) H15)) (\lambda (H15: (ex4_5 F C C T +T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: +T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) x7))).(\lambda (H17: (drop n0 O +c (CHead x4 (Flat x3) x6))).(\lambda (H18: (subst0 O v x6 x7)).(\lambda (H19: +(csubst0 O v x4 x5)).(let H20 \def (eq_ind C e (\lambda (c0: C).(drop n0 O x1 +c0)) H10 (CHead x5 (Flat x3) x7) H16) in (eq_ind_r C (CHead x5 (Flat x3) x7) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead c (Bind b) t) (CHead x5 (Flat x3) x7)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat +x3) x7) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat +f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x3 x4 x5 x6 x7 (refl_equal C (CHead x5 (Flat x3) x7)) (drop_drop (Bind b) n0 +c (CHead x4 (Flat x3) x6) H17 t) H18 H19)) e H16))))))))))) H15)) H14)))))))) +(\lambda (f: F).(\lambda (H9: (eq nat (S n0) (s (Flat f) x2))).(\lambda (H10: +(drop (r (Flat f) n0) O x1 e)).(let H11 \def (f_equal nat nat (\lambda (e0: +nat).e0) (S n0) (s (Flat f) x2) H9) in (let H12 \def (eq_ind_r nat x2 +(\lambda (n1: nat).(csubst0 n1 v c x1)) H7 (S n0) H11) in (let H13 \def +(eq_ind_r nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H6 (S n0) H11) in +(let H14 \def (H x1 v H12 e H10) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T +T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S +n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (H15: (drop (S n0) O c e)).(or4_intro0 (drop (S +n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (drop_drop (Flat f) n0 c e H15 t))) (\lambda (H15: (ex3_4 F +C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq +C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead +e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Flat +f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (H16: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H17: (drop (S +n0) O c (CHead x4 (Flat x3) x5))).(\lambda (H18: (subst0 O v x5 x6)).(let H19 +\def (eq_ind C e (\lambda (c0: C).(drop (S n0) O x1 c0)) H10 (CHead x4 (Flat +x3) x6) H16) in (eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 +(drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Flat +f) t) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 +(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) +(drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x5) H17 t) H18)) e H16))))))))) +H15)) (\lambda (H15: (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) +O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda +(x6: T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) x6))).(\lambda (H17: (drop +(S n0) O c (CHead x4 (Flat x3) x6))).(\lambda (H18: (csubst0 O v x4 x5)).(let +H19 \def (eq_ind C e (\lambda (c0: C).(drop (S n0) O x1 c0)) H10 (CHead x5 +(Flat x3) x6) H16) in (eq_ind_r C (CHead x5 (Flat x3) x6) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Flat +f) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x5 (Flat x3) x6)) (drop_drop +(Flat f) n0 c (CHead x4 (Flat x3) x6) H17 t) H18)) e H16))))))))) H15)) +(\lambda (H15: (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C +C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: +T).(\lambda (H16: (eq C e (CHead x5 (Flat x3) x7))).(\lambda (H17: (drop (S +n0) O c (CHead x4 (Flat x3) x6))).(\lambda (H18: (subst0 O v x6 x7)).(\lambda +(H19: (csubst0 O v x4 x5)).(let H20 \def (eq_ind C e (\lambda (c0: C).(drop +(S n0) O x1 c0)) H10 (CHead x5 (Flat x3) x7) H16) in (eq_ind_r C (CHead x5 +(Flat x3) x7) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) +(or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x5 (Flat x3) x7)) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e0 (Flat f0) u2)))))) (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O +(CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C +T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C +(CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u2))))))) (\lambda +(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x3 x4 x5 x6 x7 +(refl_equal C (CHead x5 (Flat x3) x7)) (drop_drop (Flat f) n0 c (CHead x4 +(Flat x3) x6) H17 t) H18 H19)) e H16))))))))))) H15)) H14)))))))) k H4 +(drop_gen_drop k x1 e x0 n0 H8)))))))))) H3)) H2))))))))))) c1)))) n). + +lemma csubst0_drop_lt_back: + \forall (n: nat).(\forall (i: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e2: C).((drop n O +c2 e2) \to (or (drop n O c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) +v e1 e2)) (\lambda (e1: C).(drop n O c1 e1)))))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt n0 i) +\to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) +\to (\forall (e2: C).((drop n0 O c2 e2) \to (or (drop n0 O c1 e2) (ex2 C +(\lambda (e1: C).(csubst0 (minus i n0) v e1 e2)) (\lambda (e1: C).(drop n0 O +c1 e1))))))))))))) (\lambda (i: nat).(\lambda (_: (lt O i)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e2: C).(\lambda (H1: (drop O O c2 e2)).(eq_ind C c2 (\lambda +(c: C).(or (drop O O c1 c) (ex2 C (\lambda (e1: C).(csubst0 (minus i O) v e1 +c)) (\lambda (e1: C).(drop O O c1 e1))))) (eq_ind nat i (\lambda (n0: +nat).(or (drop O O c1 c2) (ex2 C (\lambda (e1: C).(csubst0 n0 v e1 c2)) +(\lambda (e1: C).(drop O O c1 e1))))) (or_intror (drop O O c1 c2) (ex2 C +(\lambda (e1: C).(csubst0 i v e1 c2)) (\lambda (e1: C).(drop O O c1 e1))) +(ex_intro2 C (\lambda (e1: C).(csubst0 i v e1 c2)) (\lambda (e1: C).(drop O O +c1 e1)) c1 H0 (drop_refl c1))) (minus i O) (minus_n_O i)) e2 (drop_gen_refl +c2 e2 H1)))))))))) (\lambda (n0: nat).(\lambda (IHn: ((\forall (i: nat).((lt +n0 i) \to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 +c2) \to (\forall (e2: C).((drop n0 O c2 e2) \to (or (drop n0 O c1 e2) (ex2 C +(\lambda (e1: C).(csubst0 (minus i n0) v e1 e2)) (\lambda (e1: C).(drop n0 O +c1 e1)))))))))))))).(\lambda (i: nat).(\lambda (H: (lt (S n0) i)).(\lambda +(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v +c c2) \to (\forall (e2: C).((drop (S n0) O c2 e2) \to (or (drop (S n0) O c +e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: +C).(drop (S n0) O c e1)))))))))) (\lambda (n1: nat).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H0: (csubst0 i v (CSort n1) c2)).(\lambda (e2: C).(\lambda +(_: (drop (S n0) O c2 e2)).(csubst0_gen_sort c2 v i n1 H0 (or (drop (S n0) O +(CSort n1) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) +(\lambda (e1: C).(drop (S n0) O (CSort n1) e1))))))))))) (\lambda (c: +C).(\lambda (H0: ((\forall (c2: C).(\forall (v: T).((csubst0 i v c c2) \to +(\forall (e2: C).((drop (S n0) O c2 e2) \to (or (drop (S n0) O c e2) (ex2 C +(\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O c e1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: +C).(\lambda (v: T).(\lambda (H1: (csubst0 i v (CHead c k t) c2)).(\lambda +(e2: C).(\lambda (H2: (drop (S n0) O c2 e2)).(let H3 \def (csubst0_gen_head k +c c2 t v i H1) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq +nat i (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k +u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3))))) (or (drop (S n0) O (CHead c k t) +e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: +C).(drop (S n0) O (CHead c k t) e1)))) (\lambda (H4: (ex3_2 T nat (\lambda +(_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda +(u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or (drop (S n0) O (CHead c k +t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda +(e1: C).(drop (S n0) O (CHead c k t) e1)))) (\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead c k +x0))).(\lambda (_: (subst0 x1 v t x0)).(let H8 \def (eq_ind C c2 (\lambda +(c0: C).(drop (S n0) O c0 e2)) H2 (CHead c k x0) H6) in (let H9 \def (eq_ind +nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c +c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) +(ex2 C (\lambda (e1: C).(csubst0 (minus n1 (S n0)) v0 e1 e3)) (\lambda (e1: +C).(drop (S n0) O c e1)))))))))) H0 (s k x1) H5) in (let H10 \def (eq_ind nat +i (\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in (eq_ind_r nat (s k x1) +(\lambda (n1: nat).(or (drop (S n0) O (CHead c k t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus n1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O +(CHead c k t) e1))))) (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall +(v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 +e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s +k0 x1) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop (S n0) O c e1)))))))))) \to +((lt (S n0) (s k0 x1)) \to ((drop (r k0 n0) O c e2) \to (or (drop (S n0) O +(CHead c k0 t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s k0 x1) (S n0)) +v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c k0 t) e1)))))))) (\lambda +(b: B).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) +x1) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) +O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x1) (S n0)) v0 e1 +e3)) (\lambda (e1: C).(drop (S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) +(s (Bind b) x1))).(\lambda (H13: (drop (r (Bind b) n0) O c e2)).(or_introl +(drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 +(minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O +(CHead c (Bind b) t) e1))) (drop_drop (Bind b) n0 c e2 H13 t)))))) (\lambda +(f: F).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) +x1) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) +O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x1) (S n0)) v0 e1 +e3)) (\lambda (e1: C).(drop (S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) +(s (Flat f) x1))).(\lambda (H13: (drop (r (Flat f) n0) O c e2)).(or_introl +(drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 +(minus (s (Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O +(CHead c (Flat f) t) e1))) (drop_drop (Flat f) n0 c e2 H13 t)))))) k H9 H10 +(drop_gen_drop k c e2 x0 n0 H8)) i H5))))))))) H4)) (\lambda (H4: (ex3_2 C +nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or (drop +(S n0) O (CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i (S n0)) +v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c k t) e1)))) (\lambda (x0: +C).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C +c2 (CHead x0 k t))).(\lambda (H7: (csubst0 x1 v c x0)).(let H8 \def (eq_ind C +c2 (\lambda (c0: C).(drop (S n0) O c0 e2)) H2 (CHead x0 k t) H6) in (let H9 +\def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: +T).((csubst0 n1 v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or +(drop (S n0) O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus n1 (S n0)) v0 e1 +e3)) (\lambda (e1: C).(drop (S n0) O c e1)))))))))) H0 (s k x1) H5) in (let +H10 \def (eq_ind nat i (\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H5) in +(eq_ind_r nat (s k x1) (\lambda (n1: nat).(or (drop (S n0) O (CHead c k t) +e2) (ex2 C (\lambda (e1: C).(csubst0 (minus n1 (S n0)) v e1 e2)) (\lambda +(e1: C).(drop (S n0) O (CHead c k t) e1))))) (K_ind (\lambda (k0: +K).(((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to +(\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C +(\lambda (e1: C).(csubst0 (minus (s k0 x1) (S n0)) v0 e1 e3)) (\lambda (e1: +C).(drop (S n0) O c e1)))))))))) \to ((lt (S n0) (s k0 x1)) \to ((drop (r k0 +n0) O x0 e2) \to (or (drop (S n0) O (CHead c k0 t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s k0 x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) +O (CHead c k0 t) e1)))))))) (\lambda (b: B).(\lambda (_: ((\forall (c3: +C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e3: +C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Bind b) x1) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop +(S n0) O c e1))))))))))).(\lambda (H12: (lt (S n0) (s (Bind b) x1))).(\lambda +(H13: (drop (r (Bind b) n0) O x0 e2)).(let H_x \def (IHn x1 (lt_S_n n0 x1 +H12) c x0 v H7 e2 H13) in (let H14 \def H_x in (or_ind (drop n0 O c e2) (ex2 +C (\lambda (e1: C).(csubst0 (minus x1 n0) v e1 e2)) (\lambda (e1: C).(drop n0 +O c e1))) (or (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O (CHead c (Bind b) t) e1)))) (\lambda (H15: (drop n0 O c +e2)).(or_introl (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O (CHead c (Bind b) t) e1))) (drop_drop (Bind b) n0 c e2 H15 t))) +(\lambda (H15: (ex2 C (\lambda (e1: C).(csubst0 (minus x1 n0) v e1 e2)) +(\lambda (e1: C).(drop n0 O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 +(minus x1 n0) v e1 e2)) (\lambda (e1: C).(drop n0 O c e1)) (or (drop (S n0) O +(CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) +x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) +e1)))) (\lambda (x: C).(\lambda (H16: (csubst0 (minus x1 n0) v x +e2)).(\lambda (H17: (drop n0 O c x)).(or_intror (drop (S n0) O (CHead c (Bind +b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x1) (S n0)) v +e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) e1))) (ex_intro2 +C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x1) (S n0)) v e1 e2)) (\lambda +(e1: C).(drop (S n0) O (CHead c (Bind b) t) e1)) x H16 (drop_drop (Bind b) n0 +c x H17 t)))))) H15)) H14))))))) (\lambda (f: F).(\lambda (H11: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e3: +C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Flat f) x1) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop +(S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) x1))).(\lambda +(H13: (drop (r (Flat f) n0) O x0 e2)).(let H_x \def (H11 x0 v H7 e2 H13) in +(let H14 \def H_x in (or_ind (drop (S n0) O c e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus x1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c +e1))) (or (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O (CHead c (Flat f) t) e1)))) (\lambda (H15: (drop (S n0) O c +e2)).(or_introl (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O (CHead c (Flat f) t) e1))) (drop_drop (Flat f) n0 c e2 H15 t))) +(\lambda (H15: (ex2 C (\lambda (e1: C).(csubst0 (minus x1 (S n0)) v e1 e2)) +(\lambda (e1: C).(drop (S n0) O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 +(minus x1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c e1)) (or (drop +(S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s +(Flat f) x1) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat +f) t) e1)))) (\lambda (x: C).(\lambda (H16: (csubst0 (minus x1 (S n0)) v x +e2)).(\lambda (H17: (drop (S n0) O c x)).(or_intror (drop (S n0) O (CHead c +(Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x1) (S +n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1))) +(ex_intro2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x1) (S n0)) v e1 +e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1)) x H16 +(drop_drop (Flat f) n0 c x H17 t)))))) H15)) H14))))))) k H9 H10 +(drop_gen_drop k x0 e2 t n0 H8)) i H5))))))))) H4)) (\lambda (H4: (ex4_3 T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) +(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))) (or (drop (S n0) O (CHead c k t) e2) (ex2 C +(\lambda (e1: C).(csubst0 (minus i (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O (CHead c k t) e1)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: +nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: (eq C c2 (CHead x1 k +x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: (csubst0 x2 v c +x1)).(let H9 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e2)) H2 +(CHead x1 k x0) H6) in (let H10 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda +(e1: C).(csubst0 (minus n1 (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop (S n0) O +c e1)))))))))) H0 (s k x2) H5) in (let H11 \def (eq_ind nat i (\lambda (n1: +nat).(lt (S n0) n1)) H (s k x2) H5) in (eq_ind_r nat (s k x2) (\lambda (n1: +nat).(or (drop (S n0) O (CHead c k t) e2) (ex2 C (\lambda (e1: C).(csubst0 +(minus n1 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c k t) +e1))))) (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 +(s k0 x2) v0 c c3) \to (\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop +(S n0) O c e3) (ex2 C (\lambda (e1: C).(csubst0 (minus (s k0 x2) (S n0)) v0 +e1 e3)) (\lambda (e1: C).(drop (S n0) O c e1)))))))))) \to ((lt (S n0) (s k0 +x2)) \to ((drop (r k0 n0) O x1 e2) \to (or (drop (S n0) O (CHead c k0 t) e2) +(ex2 C (\lambda (e1: C).(csubst0 (minus (s k0 x2) (S n0)) v e1 e2)) (\lambda +(e1: C).(drop (S n0) O (CHead c k0 t) e1)))))))) (\lambda (b: B).(\lambda (_: +((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x2) v0 c c3) \to +(\forall (e3: C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C +(\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v0 e1 e3)) (\lambda +(e1: C).(drop (S n0) O c e1))))))))))).(\lambda (H13: (lt (S n0) (s (Bind b) +x2))).(\lambda (H14: (drop (r (Bind b) n0) O x1 e2)).(let H_x \def (IHn x2 +(lt_S_n n0 x2 H13) c x1 v H8 e2 H14) in (let H15 \def H_x in (or_ind (drop n0 +O c e2) (ex2 C (\lambda (e1: C).(csubst0 (minus x2 n0) v e1 e2)) (\lambda +(e1: C).(drop n0 O c e1))) (or (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C +(\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v e1 e2)) (\lambda +(e1: C).(drop (S n0) O (CHead c (Bind b) t) e1)))) (\lambda (H16: (drop n0 O +c e2)).(or_introl (drop (S n0) O (CHead c (Bind b) t) e2) (ex2 C (\lambda +(e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v e1 e2)) (\lambda (e1: +C).(drop (S n0) O (CHead c (Bind b) t) e1))) (drop_drop (Bind b) n0 c e2 H16 +t))) (\lambda (H16: (ex2 C (\lambda (e1: C).(csubst0 (minus x2 n0) v e1 e2)) +(\lambda (e1: C).(drop n0 O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 +(minus x2 n0) v e1 e2)) (\lambda (e1: C).(drop n0 O c e1)) (or (drop (S n0) O +(CHead c (Bind b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) +x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) +e1)))) (\lambda (x: C).(\lambda (H17: (csubst0 (minus x2 n0) v x +e2)).(\lambda (H18: (drop n0 O c x)).(or_intror (drop (S n0) O (CHead c (Bind +b) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v +e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Bind b) t) e1))) (ex_intro2 +C (\lambda (e1: C).(csubst0 (minus (s (Bind b) x2) (S n0)) v e1 e2)) (\lambda +(e1: C).(drop (S n0) O (CHead c (Bind b) t) e1)) x H17 (drop_drop (Bind b) n0 +c x H18 t)))))) H16)) H15))))))) (\lambda (f: F).(\lambda (H12: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x2) v0 c c3) \to (\forall (e3: +C).((drop (S n0) O c3 e3) \to (or (drop (S n0) O c e3) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Flat f) x2) (S n0)) v0 e1 e3)) (\lambda (e1: C).(drop +(S n0) O c e1))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) x2))).(\lambda +(H14: (drop (r (Flat f) n0) O x1 e2)).(let H_x \def (H12 x1 v H8 e2 H14) in +(let H15 \def H_x in (or_ind (drop (S n0) O c e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus x2 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c +e1))) (or (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Flat f) x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O (CHead c (Flat f) t) e1)))) (\lambda (H16: (drop (S n0) O c +e2)).(or_introl (drop (S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus (s (Flat f) x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop +(S n0) O (CHead c (Flat f) t) e1))) (drop_drop (Flat f) n0 c e2 H16 t))) +(\lambda (H16: (ex2 C (\lambda (e1: C).(csubst0 (minus x2 (S n0)) v e1 e2)) +(\lambda (e1: C).(drop (S n0) O c e1)))).(ex2_ind C (\lambda (e1: C).(csubst0 +(minus x2 (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O c e1)) (or (drop +(S n0) O (CHead c (Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s +(Flat f) x2) (S n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat +f) t) e1)))) (\lambda (x: C).(\lambda (H17: (csubst0 (minus x2 (S n0)) v x +e2)).(\lambda (H18: (drop (S n0) O c x)).(or_intror (drop (S n0) O (CHead c +(Flat f) t) e2) (ex2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x2) (S +n0)) v e1 e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1))) +(ex_intro2 C (\lambda (e1: C).(csubst0 (minus (s (Flat f) x2) (S n0)) v e1 +e2)) (\lambda (e1: C).(drop (S n0) O (CHead c (Flat f) t) e1)) x H17 +(drop_drop (Flat f) n0 c x H18 t)))))) H16)) H15))))))) k H10 H11 +(drop_gen_drop k x1 e2 x0 n0 H9)) i H5))))))))))) H4)) H3))))))))))) c1)))))) +n). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/fwd.ma new file mode 100644 index 000000000..3a888e17e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/fwd.ma @@ -0,0 +1,473 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst0/defs.ma". + +include "basic_1A/C/fwd.ma". + +implied rec lemma csubst0_ind (P: (nat \to (T \to (C \to (C \to Prop))))) (f: +(\forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(P (s k i) v (CHead c k u1) +(CHead c k u2)))))))))) (f0: (\forall (k: K).(\forall (i: nat).(\forall (c1: +C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to ((P i v c1 c2) +\to (\forall (u: T).(P (s k i) v (CHead c1 k u) (CHead c2 k u))))))))))) (f1: +(\forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst0 i +v c1 c2) \to ((P i v c1 c2) \to (P (s k i) v (CHead c1 k u1) (CHead c2 k +u2))))))))))))) (n: nat) (t: T) (c: C) (c0: C) (c1: csubst0 n t c c0) on c1: +P n t c c0 \def match c1 with [(csubst0_snd k i v u1 u2 s0 c2) \Rightarrow (f +k i v u1 u2 s0 c2) | (csubst0_fst k i c2 c3 v c4 u) \Rightarrow (f0 k i c2 c3 +v c4 ((csubst0_ind P f f0 f1) i v c2 c3 c4) u) | (csubst0_both k i v u1 u2 s0 +c2 c3 c4) \Rightarrow (f1 k i v u1 u2 s0 c2 c3 c4 ((csubst0_ind P f f0 f1) i +v c2 c3 c4))]. + +lemma csubst0_gen_sort: + \forall (x: C).(\forall (v: T).(\forall (i: nat).(\forall (n: nat).((csubst0 +i v (CSort n) x) \to (\forall (P: Prop).P))))) +\def + \lambda (x: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda +(H: (csubst0 i v (CSort n) x)).(\lambda (P: Prop).(insert_eq C (CSort n) +(\lambda (c: C).(csubst0 i v c x)) (\lambda (_: C).P) (\lambda (y: +C).(\lambda (H0: (csubst0 i v y x)).(csubst0_ind (\lambda (_: nat).(\lambda +(_: T).(\lambda (c: C).(\lambda (_: C).((eq C c (CSort n)) \to P))))) +(\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (c: C).(\lambda (H2: (eq +C (CHead c k u1) (CSort n))).(let H3 \def (eq_ind C (CHead c k u1) (\lambda +(ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) +\Rightarrow True])) I (CSort n) H2) in (False_ind P H3)))))))))) (\lambda (k: +K).(\lambda (i0: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (v0: +T).(\lambda (_: (csubst0 i0 v0 c1 c2)).(\lambda (_: (((eq C c1 (CSort n)) \to +P))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CSort n))).(let H4 +\def (eq_ind C (CHead c1 k u) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in +(False_ind P H4))))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i0 v0 u1 +u2)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csubst0 i0 v0 c1 +c2)).(\lambda (_: (((eq C c1 (CSort n)) \to P))).(\lambda (H4: (eq C (CHead +c1 k u1) (CSort n))).(let H5 \def (eq_ind C (CHead c1 k u1) (\lambda (ee: +C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow +True])) I (CSort n) H4) in (False_ind P H5))))))))))))) i v y x H0))) H)))))). + +lemma csubst0_gen_head: + \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).(\forall +(v: T).(\forall (i: nat).((csubst0 i v (CHead c1 k u1) x) \to (or3 (ex3_2 T +nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq +nat i (s k j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C x (CHead c2 k +u1)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c1 c2)))) (ex4_3 T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) +(\lambda (u2: T).(\lambda (c2: C).(\lambda (_: nat).(eq C x (CHead c2 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 +u2)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c1 +c2)))))))))))) +\def + \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda +(v: T).(\lambda (i: nat).(\lambda (H: (csubst0 i v (CHead c1 k u1) +x)).(insert_eq C (CHead c1 k u1) (\lambda (c: C).(csubst0 i v c x)) (\lambda +(_: C).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda +(u2: T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c2: C).(\lambda (_: +nat).(eq C x (CHead c2 k u1)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j +v c1 c2)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c2: C).(\lambda (_: +nat).(eq C x (CHead c2 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v u1 u2)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: +nat).(csubst0 j v c1 c2))))))) (\lambda (y: C).(\lambda (H0: (csubst0 i v y +x)).(csubst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (c: C).(\lambda +(c0: C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat n (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c0 (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +t u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat n (s k +j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 k u1)))) (\lambda +(c2: C).(\lambda (j: nat).(csubst0 j t c1 c2)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat n (s k j))))) (\lambda (u2: +T).(\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j t u1 u2)))) (\lambda (_: +T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j t c1 c2))))))))))) (\lambda +(k0: K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (H1: (subst0 i0 v0 u0 u2)).(\lambda (c: C).(\lambda (H2: (eq C +(CHead c k0 u0) (CHead c1 k u1))).(let H3 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow c | (CHead c0 _ _) \Rightarrow c0])) +(CHead c k0 u0) (CHead c1 k u1) H2) in ((let H4 \def (f_equal C K (\lambda +(e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow +k1])) (CHead c k0 u0) (CHead c1 k u1) H2) in ((let H5 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) +\Rightarrow t])) (CHead c k0 u0) (CHead c1 k u1) H2) in (\lambda (H6: (eq K +k0 k)).(\lambda (H7: (eq C c c1)).(eq_ind_r C c1 (\lambda (c0: C).(or3 (ex3_2 +T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda +(u3: T).(\lambda (_: nat).(eq C (CHead c0 k0 u2) (CHead c1 k u3)))) (\lambda +(u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda (c2: C).(\lambda +(_: nat).(eq C (CHead c0 k0 u2) (CHead c2 k u1)))) (\lambda (c2: C).(\lambda +(j: nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j))))) (\lambda (u3: T).(\lambda +(c2: C).(\lambda (_: nat).(eq C (CHead c0 k0 u2) (CHead c2 k u3))))) (\lambda +(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: +T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 c2))))))) (let H8 \def +(eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H5) in (eq_ind_r K k +(\lambda (k1: K).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat +(s k1 i0) (s k j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c1 k1 +u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j v0 u1 +u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (s k +j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C (CHead c1 k1 u2) (CHead c2 k +u1)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (s k +j))))) (\lambda (u3: T).(\lambda (c2: C).(\lambda (_: nat).(eq C (CHead c1 k1 +u2) (CHead c2 k u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: +nat).(subst0 j v0 u1 u3)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: +nat).(csubst0 j v0 c1 c2))))))) (or3_intro0 (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u3: T).(\lambda +(_: nat).(eq C (CHead c1 k u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda +(j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (s k i0) (s k j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C +(CHead c1 k u2) (CHead c2 k u1)))) (\lambda (c2: C).(\lambda (j: +nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: T).(\lambda +(c2: C).(\lambda (_: nat).(eq C (CHead c1 k u2) (CHead c2 k u3))))) (\lambda +(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: +T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 c2))))) (ex3_2_intro T +nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda +(u3: T).(\lambda (_: nat).(eq C (CHead c1 k u2) (CHead c1 k u3)))) (\lambda +(u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3))) u2 i0 (refl_equal nat (s k +i0)) (refl_equal C (CHead c1 k u2)) H8)) k0 H6)) c H7)))) H4)) H3)))))))))) +(\lambda (k0: K).(\lambda (i0: nat).(\lambda (c0: C).(\lambda (c2: +C).(\lambda (v0: T).(\lambda (H1: (csubst0 i0 v0 c0 c2)).(\lambda (H2: (((eq +C c0 (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat i0 (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead +c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (ex3_2 +C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda +(j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))))).(\lambda (u: T).(\lambda +(H3: (eq C (CHead c0 k0 u) (CHead c1 k u1))).(let H4 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) +\Rightarrow c])) (CHead c0 k0 u) (CHead c1 k u1) H3) in ((let H5 \def +(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead +_ k1 _) \Rightarrow k1])) (CHead c0 k0 u) (CHead c1 k u1) H3) in ((let H6 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u) (CHead c1 k u1) H3) in +(\lambda (H7: (eq K k0 k)).(\lambda (H8: (eq C c0 c1)).(eq_ind_r T u1 +(\lambda (t: T).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat +(s k0 i0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 k0 t) +(CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) +(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) +(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k0 t) (CHead c3 k u1)))) +(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat +(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k +j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k0 +t) (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: +nat).(subst0 j v0 u1 u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v0 c1 c3))))))) (let H9 \def (eq_ind C c0 (\lambda (c: +C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda +(j: nat).(eq nat i0 (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 +(CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) +(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda +(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))))))) H2 c1 H8) +in (let H10 \def (eq_ind C c0 (\lambda (c: C).(csubst0 i0 v0 c c2)) H1 c1 H8) +in (eq_ind_r K k (\lambda (k1: K).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda +(j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq +C (CHead c2 k1 u1) (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (s k1 i0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C +(CHead c2 k1 u1) (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda (u2: T).(\lambda +(c3: C).(\lambda (_: nat).(eq C (CHead c2 k1 u1) (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))) (or3_intro1 +(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) +(\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c1 k u2)))) +(\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 k u1)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda +(u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 +c3))))) (ex3_2_intro C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) +(s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 +k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))) c2 i0 +(refl_equal nat (s k i0)) (refl_equal C (CHead c2 k u1)) H10)) k0 H7))) u +H6)))) H5)) H4))))))))))) (\lambda (k0: K).(\lambda (i0: nat).(\lambda (v0: +T).(\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (subst0 i0 v0 u0 +u2)).(\lambda (c0: C).(\lambda (c2: C).(\lambda (H2: (csubst0 i0 v0 c0 +c2)).(\lambda (H3: (((eq C c0 (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda +(_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (u3: T).(\lambda (_: +nat).(eq C c2 (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j +v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u3: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u3))))) (\lambda +(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))))).(\lambda +(H4: (eq C (CHead c0 k0 u0) (CHead c1 k u1))).(let H5 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) +\Rightarrow c])) (CHead c0 k0 u0) (CHead c1 k u1) H4) in ((let H6 \def +(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k0 | (CHead +_ k1 _) \Rightarrow k1])) (CHead c0 k0 u0) (CHead c1 k u1) H4) in ((let H7 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | +(CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c1 k u1) H4) in +(\lambda (H8: (eq K k0 k)).(\lambda (H9: (eq C c0 c1)).(let H10 \def (eq_ind +C c0 (\lambda (c: C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda +(_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (u3: T).(\lambda (_: +nat).(eq C c2 (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j +v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u3: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u3))))) (\lambda +(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))))))) H3 c1 H9) +in (let H11 \def (eq_ind C c0 (\lambda (c: C).(csubst0 i0 v0 c c2)) H2 c1 H9) +in (let H12 \def (eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H7) +in (eq_ind_r K k (\lambda (k1: K).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda +(j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u3: T).(\lambda (_: nat).(eq +C (CHead c2 k1 u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: +nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (s k1 i0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C +(CHead c2 k1 u2) (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda (u3: T).(\lambda +(c3: C).(\lambda (_: nat).(eq C (CHead c2 k1 u2) (CHead c3 k u3))))) (\lambda +(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))) (or3_intro2 +(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) +(\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c1 k u3)))) +(\lambda (u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c3 k u1)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda +(u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c3 k +u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 +u3)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 +c3))))) (ex4_3_intro T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda +(_: nat).(eq C (CHead c2 k u2) (CHead c3 k u3))))) (\lambda (u3: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) u2 c2 i0 (refl_equal nat (s k +i0)) (refl_equal C (CHead c2 k u2)) H12 H11)) k0 H8))))))) H6)) +H5))))))))))))) i v y x H0))) H))))))). + +lemma csubst0_gen_S_bind_2: + \forall (b: B).(\forall (x: C).(\forall (c2: C).(\forall (v: T).(\forall +(v2: T).(\forall (i: nat).((csubst0 (S i) v x (CHead c2 (Bind b) v2)) \to +(or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C x +(CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) +(\lambda (c1: C).(eq C x (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: +C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: +T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C x (CHead c1 +(Bind b) v1)))))))))))) +\def + \lambda (b: B).(\lambda (x: C).(C_ind (\lambda (c: C).(\forall (c2: +C).(\forall (v: T).(\forall (v2: T).(\forall (i: nat).((csubst0 (S i) v c +(CHead c2 (Bind b) v2)) \to (or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) +(\lambda (v1: T).(eq C c (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: +C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C c (CHead c1 (Bind b) v2)))) +(ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda +(c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: +T).(eq C c (CHead c1 (Bind b) v1)))))))))))) (\lambda (n: nat).(\lambda (c2: +C).(\lambda (v: T).(\lambda (v2: T).(\lambda (i: nat).(\lambda (H: (csubst0 +(S i) v (CSort n) (CHead c2 (Bind b) v2))).(csubst0_gen_sort (CHead c2 (Bind +b) v2) v (S i) n H (or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda +(v1: T).(eq C (CSort n) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: +C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C (CSort n) (CHead c1 (Bind b) +v2)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) +(\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: +C).(\lambda (v1: T).(eq C (CSort n) (CHead c1 (Bind b) v1))))))))))))) +(\lambda (c: C).(\lambda (_: ((\forall (c2: C).(\forall (v: T).(\forall (v2: +T).(\forall (i: nat).((csubst0 (S i) v c (CHead c2 (Bind b) v2)) \to (or3 +(ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C c (CHead +c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: +C).(eq C c (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: +T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 +c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C c (CHead c1 (Bind b) +v1))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: +T).(\lambda (v2: T).(\lambda (i: nat).(\lambda (H0: (csubst0 (S i) v (CHead c +k t) (CHead c2 (Bind b) v2))).(let H1 \def (csubst0_gen_head k c (CHead c2 +(Bind b) v2) t v (S i) H0) in (or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda +(j: nat).(eq nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C +(CHead c2 (Bind b) v2) (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq +nat (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 (Bind +b) v2) (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq +nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq +C (CHead c2 (Bind b) v2) (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: +C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3))))) (or3 (ex2 T (\lambda (v1: +T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) (CHead c2 (Bind +b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C +(CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda +(v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 +c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind +b) v1)))))) (\lambda (H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq +nat (S i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 (Bind +b) v2) (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t +u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S i) (s k +j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead +c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or3 (ex2 T +(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) +(CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) +(\lambda (c1: C).(eq C (CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T +(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: +C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: +T).(eq C (CHead c k t) (CHead c1 (Bind b) v1)))))) (\lambda (x0: T).(\lambda +(x1: nat).(\lambda (H3: (eq nat (S i) (s k x1))).(\lambda (H4: (eq C (CHead +c2 (Bind b) v2) (CHead c k x0))).(\lambda (H5: (subst0 x1 v t x0)).(let H6 +\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | +(CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) v2) (CHead c k x0) H4) in +((let H7 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) +\Rightarrow (Bind b) | (CHead _ k0 _) \Rightarrow k0])) (CHead c2 (Bind b) +v2) (CHead c k x0) H4) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e +with [(CSort _) \Rightarrow v2 | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 +(Bind b) v2) (CHead c k x0) H4) in (\lambda (H9: (eq K (Bind b) k)).(\lambda +(H10: (eq C c2 c)).(let H11 \def (eq_ind_r T x0 (\lambda (t0: T).(subst0 x1 v +t t0)) H5 v2 H8) in (eq_ind_r C c (\lambda (c0: C).(or3 (ex2 T (\lambda (v1: +T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) (CHead c0 (Bind +b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c0)) (\lambda (c1: C).(eq C +(CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda +(v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 +c0))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind +b) v1))))))) (let H12 \def (eq_ind_r K k (\lambda (k0: K).(eq nat (S i) (s k0 +x1))) H3 (Bind b) H9) in (eq_ind K (Bind b) (\lambda (k0: K).(or3 (ex2 T +(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k0 t) +(CHead c (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c)) (\lambda +(c1: C).(eq C (CHead c k0 t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda +(_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: +T).(csubst0 i v c1 c))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k0 +t) (CHead c1 (Bind b) v1))))))) (let H13 \def (f_equal nat nat (\lambda (e: +nat).(match e with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) +H12) in (let H14 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t v2)) +H11 i H13) in (or3_intro0 (ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) +(\lambda (v1: T).(eq C (CHead c (Bind b) t) (CHead c (Bind b) v1)))) (ex2 C +(\lambda (c1: C).(csubst0 i v c1 c)) (\lambda (c1: C).(eq C (CHead c (Bind b) +t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: +T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c))) +(\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind +b) v1))))) (ex_intro2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: +T).(eq C (CHead c (Bind b) t) (CHead c (Bind b) v1))) t H14 (refl_equal C +(CHead c (Bind b) t)))))) k H9)) c2 H10))))) H7)) H6))))))) H2)) (\lambda +(H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j)))) +(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead c3 k +t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C +nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or3 (ex2 T (\lambda (v1: +T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k t) (CHead c2 (Bind +b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C +(CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T (\lambda (_: C).(\lambda +(v1: T).(subst0 i v v1 v2))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 +c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind +b) v1)))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H3: (eq nat (S i) +(s k x1))).(\lambda (H4: (eq C (CHead c2 (Bind b) v2) (CHead x0 k +t))).(\lambda (H5: (csubst0 x1 v c x0)).(let H6 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow +c0])) (CHead c2 (Bind b) v2) (CHead x0 k t) H4) in ((let H7 \def (f_equal C K +(\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind b) | (CHead _ k0 +_) \Rightarrow k0])) (CHead c2 (Bind b) v2) (CHead x0 k t) H4) in ((let H8 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v2 | +(CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) v2) (CHead x0 k t) H4) in +(\lambda (H9: (eq K (Bind b) k)).(\lambda (H10: (eq C c2 x0)).(let H11 \def +(eq_ind_r C x0 (\lambda (c0: C).(csubst0 x1 v c c0)) H5 c2 H10) in (eq_ind_r +T t (\lambda (t0: T).(or3 (ex2 T (\lambda (v1: T).(subst0 i v v1 t0)) +(\lambda (v1: T).(eq C (CHead c k t) (CHead c2 (Bind b) v1)))) (ex2 C +(\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C (CHead c k t) +(CHead c1 (Bind b) t0)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 +i v v1 t0))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda +(c1: C).(\lambda (v1: T).(eq C (CHead c k t) (CHead c1 (Bind b) v1))))))) +(let H12 \def (eq_ind_r K k (\lambda (k0: K).(eq nat (S i) (s k0 x1))) H3 +(Bind b) H9) in (eq_ind K (Bind b) (\lambda (k0: K).(or3 (ex2 T (\lambda (v1: +T).(subst0 i v v1 t)) (\lambda (v1: T).(eq C (CHead c k0 t) (CHead c2 (Bind +b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C +(CHead c k0 t) (CHead c1 (Bind b) t)))) (ex3_2 C T (\lambda (_: C).(\lambda +(v1: T).(subst0 i v v1 t))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 +c2))) (\lambda (c1: C).(\lambda (v1: T).(eq C (CHead c k0 t) (CHead c1 (Bind +b) v1))))))) (let H13 \def (f_equal nat nat (\lambda (e: nat).(match e with +[O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H12) in (let H14 \def +(eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c c2)) H11 i H13) in +(or3_intro1 (ex2 T (\lambda (v1: T).(subst0 i v v1 t)) (\lambda (v1: T).(eq C +(CHead c (Bind b) t) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: +C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C (CHead c (Bind b) t) (CHead c1 +(Bind b) t)))) (ex3_2 C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 +t))) (\lambda (c1: C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: +C).(\lambda (v1: T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v1))))) +(ex_intro2 C (\lambda (c1: C).(csubst0 i v c1 c2)) (\lambda (c1: C).(eq C +(CHead c (Bind b) t) (CHead c1 (Bind b) t))) c H14 (refl_equal C (CHead c +(Bind b) t)))))) k H9)) v2 H8))))) H7)) H6))))))) H2)) (\lambda (H2: (ex4_3 T +C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k +j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 +(Bind b) v2) (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C (CHead c2 (Bind b) v2) (CHead c3 k u2))))) +(\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) +(\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (or3 +(ex2 T (\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k +t) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) +(\lambda (c1: C).(eq C (CHead c k t) (CHead c1 (Bind b) v2)))) (ex3_2 C T +(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: +C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: +T).(eq C (CHead c k t) (CHead c1 (Bind b) v1)))))) (\lambda (x0: T).(\lambda +(x1: C).(\lambda (x2: nat).(\lambda (H3: (eq nat (S i) (s k x2))).(\lambda +(H4: (eq C (CHead c2 (Bind b) v2) (CHead x1 k x0))).(\lambda (H5: (subst0 x2 +v t x0)).(\lambda (H6: (csubst0 x2 v c x1)).(let H7 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c2 (Bind b) v2) (CHead x1 k x0) H4) in ((let H8 \def +(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind b) | +(CHead _ k0 _) \Rightarrow k0])) (CHead c2 (Bind b) v2) (CHead x1 k x0) H4) +in ((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow v2 | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) v2) +(CHead x1 k x0) H4) in (\lambda (H10: (eq K (Bind b) k)).(\lambda (H11: (eq C +c2 x1)).(let H12 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 x2 v c c0)) H6 +c2 H11) in (let H13 \def (eq_ind_r T x0 (\lambda (t0: T).(subst0 x2 v t t0)) +H5 v2 H9) in (let H14 \def (eq_ind_r K k (\lambda (k0: K).(eq nat (S i) (s k0 +x2))) H3 (Bind b) H10) in (eq_ind K (Bind b) (\lambda (k0: K).(or3 (ex2 T +(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c k0 t) +(CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) +(\lambda (c1: C).(eq C (CHead c k0 t) (CHead c1 (Bind b) v2)))) (ex3_2 C T +(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: +C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: +T).(eq C (CHead c k0 t) (CHead c1 (Bind b) v1))))))) (let H15 \def (f_equal +nat nat (\lambda (e: nat).(match e with [O \Rightarrow i | (S n) \Rightarrow +n])) (S i) (S x2) H14) in (let H16 \def (eq_ind_r nat x2 (\lambda (n: +nat).(csubst0 n v c c2)) H12 i H15) in (let H17 \def (eq_ind_r nat x2 +(\lambda (n: nat).(subst0 n v t v2)) H13 i H15) in (or3_intro2 (ex2 T +(\lambda (v1: T).(subst0 i v v1 v2)) (\lambda (v1: T).(eq C (CHead c (Bind b) +t) (CHead c2 (Bind b) v1)))) (ex2 C (\lambda (c1: C).(csubst0 i v c1 c2)) +(\lambda (c1: C).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v2)))) (ex3_2 +C T (\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: +C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: +T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v1))))) (ex3_2_intro C T +(\lambda (_: C).(\lambda (v1: T).(subst0 i v v1 v2))) (\lambda (c1: +C).(\lambda (_: T).(csubst0 i v c1 c2))) (\lambda (c1: C).(\lambda (v1: +T).(eq C (CHead c (Bind b) t) (CHead c1 (Bind b) v1)))) c t H17 H16 +(refl_equal C (CHead c (Bind b) t))))))) k H10))))))) H8)) H7))))))))) H2)) +H1))))))))))) x)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst0/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/getl.ma new file mode 100644 index 000000000..ae6794f3c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/getl.ma @@ -0,0 +1,1145 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst0/clear.ma". + +include "basic_1A/csubst0/drop.ma". + +include "basic_1A/getl/fwd.ma". + +lemma csubst0_getl_ge: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c1 +e) \to (getl n c2 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e: C).(\lambda (H1: (getl n c1 e)).(let H2 \def (getl_gen_all +c1 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c1 e0)) (\lambda (e0: +C).(clear e0 e)) (getl n c2 e) (\lambda (x: C).(\lambda (H3: (drop n O c1 +x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c2 e) (\lambda (H5: +(lt i n)).(getl_intro n c2 e x (csubst0_drop_gt n i H5 c1 c2 v H0 x H3) H4)) +(\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n0: +nat).(drop n0 O c1 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n0: +nat).(le i n0)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c2 e)) +(let H8 \def (csubst0_drop_eq i c1 c2 v H0 x H6) in (or4_ind (drop i O c2 x) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C x (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop i O c2 (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C x (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop i O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (getl i c2 e) (\lambda (H9: +(drop i O c2 x)).(getl_intro i c2 e x H9 H4)) (\lambda (H9: (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C x +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop i O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C x (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i O c2 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))) (getl i c2 e) (\lambda (x0: F).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C x (CHead x1 (Flat +x0) x2))).(\lambda (H11: (drop i O c2 (CHead x1 (Flat x0) x3))).(\lambda (_: +(subst0 O v x2 x3)).(let H13 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 +(CHead x1 (Flat x0) x2) H10) in (getl_intro i c2 e (CHead x1 (Flat x0) x3) +H11 (clear_flat x1 e (clear_gen_flat x0 x1 e x2 H13) x0 x3)))))))))) H9)) +(\lambda (H9: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C x (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C x (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (getl i c2 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C x +(CHead x1 (Flat x0) x3))).(\lambda (H11: (drop i O c2 (CHead x2 (Flat x0) +x3))).(\lambda (H12: (csubst0 O v x1 x2)).(let H13 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x1 (Flat x0) x3) H10) in (getl_intro i c2 e +(CHead x2 (Flat x0) x3) H11 (clear_flat x2 e (csubst0_clear_O x1 x2 v H12 e +(clear_gen_flat x0 x1 e x3 H13)) x0 x3)))))))))) H9)) (\lambda (H9: (ex4_5 F +C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C x (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop i O +c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop i O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (getl i c2 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H10: (eq C x (CHead x1 (Flat x0) x3))).(\lambda (H11: (drop i O +c2 (CHead x2 (Flat x0) x4))).(\lambda (_: (subst0 O v x3 x4)).(\lambda (H13: +(csubst0 O v x1 x2)).(let H14 \def (eq_ind C x (\lambda (c: C).(clear c e)) +H4 (CHead x1 (Flat x0) x3) H10) in (getl_intro i c2 e (CHead x2 (Flat x0) x4) +H11 (clear_flat x2 e (csubst0_clear_O x1 x2 v H13 e (clear_gen_flat x0 x1 e +x3 H14)) x0 x4)))))))))))) H9)) H8)) n H5)))) (\lambda (H5: (lt n +i)).(le_lt_false i n H H5 (getl n c2 e))))))) H2)))))))))). + +lemma csubst0_getl_lt: + \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c1 +e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e: C).(\lambda (H1: (getl n c1 e)).(let H2 \def (getl_gen_all +c1 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c1 e0)) (\lambda (e0: +C).(clear e0 e)) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x: +C).(\lambda (H3: (drop n O c1 x)).(\lambda (H4: (clear x e)).(let H5 \def +(csubst0_drop_lt n i H c1 c2 v H0 x H3) in (or4_ind (drop n O c2 x) (ex3_4 K +C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C x (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O +c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k n)) v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B +C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (H6: (drop n O c2 x)).(or4_intro0 (getl n c2 e) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))) (getl_intro n c2 e x H6 H4))) (\lambda (H6: +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u +w))))))).(ex3_4_ind K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k +n)) v u w))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq C x +(CHead x1 x0 x2))).(\lambda (H8: (drop n O c2 (CHead x1 x0 x3))).(\lambda +(H9: (subst0 (minus i (s x0 n)) v x2 x3)).(let H10 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x1 x0 x2) H7) in (K_ind (\lambda (k: K).((drop +n O c2 (CHead x1 k x3)) \to ((subst0 (minus i (s k n)) v x2 x3) \to ((clear +(CHead x1 k x2) e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))) (\lambda (b: +B).(\lambda (H11: (drop n O c2 (CHead x1 (Bind b) x3))).(\lambda (H12: +(subst0 (minus i (s (Bind b) n)) v x2 x3)).(\lambda (H13: (clear (CHead x1 +(Bind b) x2) e)).(eq_ind_r C (CHead x1 (Bind b) x2) (\lambda (c: C).(or4 +(getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 (getl n c2 +(CHead x1 (Bind b) x2)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead e0 +(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead +e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w))))) b x1 x2 x3 (refl_equal C (CHead x1 (Bind b) x2)) (getl_intro n c2 +(CHead x1 (Bind b) x3) (CHead x1 (Bind b) x3) H11 (clear_bind b x1 x3)) H12)) +e (clear_gen_bind b x1 e x2 H13)))))) (\lambda (f: F).(\lambda (H11: (drop n +O c2 (CHead x1 (Flat f) x3))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v +x2 x3)).(\lambda (H13: (clear (CHead x1 (Flat f) x2) e)).(or4_intro0 (getl n +c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e (CHead x1 +(Flat f) x3) H11 (clear_flat x1 e (clear_gen_flat f x1 e x2 H13) f x3))))))) +x0 H8 H9 H10))))))))) H6)) (\lambda (H6: (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C x (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2))))))).(ex3_4_ind +K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C x (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 +e2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H7: (eq C x +(CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x3))).(\lambda +(H9: (csubst0 (minus i (s x0 n)) v x1 x2)).(let H10 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x1 x0 x3) H7) in (K_ind (\lambda (k: K).((drop +n O c2 (CHead x2 k x3)) \to ((csubst0 (minus i (s k n)) v x1 x2) \to ((clear +(CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))) (\lambda (b: +B).(\lambda (H11: (drop n O c2 (CHead x2 (Bind b) x3))).(\lambda (H12: +(csubst0 (minus i (s (Bind b) n)) v x1 x2)).(\lambda (H13: (clear (CHead x1 +(Bind b) x3) e)).(eq_ind_r C (CHead x1 (Bind b) x3) (\lambda (c: C).(or4 +(getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 +(CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead e0 +(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b0: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead +e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))) b x1 x2 x3 (refl_equal C (CHead x1 (Bind b) x3)) (getl_intro n +c2 (CHead x2 (Bind b) x3) (CHead x2 (Bind b) x3) H11 (clear_bind b x2 x3)) +H12)) e (clear_gen_bind b x1 e x3 H13)))))) (\lambda (f: F).(\lambda (H11: +(drop n O c2 (CHead x2 (Flat f) x3))).(\lambda (H12: (csubst0 (minus i (s +(Flat f) n)) v x1 x2)).(\lambda (H13: (clear (CHead x1 (Flat f) x3) e)).(let +H14 \def (eq_ind nat (minus i n) (\lambda (n0: nat).(csubst0 n0 v x1 x2)) H12 +(S (minus i (S n))) (minus_x_Sy i n H)) in (let H15 \def (csubst0_clear_S x1 +x2 v (minus i (S n)) H14 e (clear_gen_flat f x1 e x3 H13)) in (or4_ind (clear +x2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (H16: (clear x2 e)).(or4_intro0 (getl n c2 e) (ex3_4 +B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (getl_intro n c2 e (CHead x2 (Flat f) x3) H11 (clear_flat x2 e +H16 f x3)))) (\lambda (H16: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 +(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2))))))).(ex3_4_ind B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) +v u1 u2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x4: +B).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H17: (eq C e +(CHead x5 (Bind x4) x6))).(\lambda (H18: (clear x2 (CHead x5 (Bind x4) +x7))).(\lambda (H19: (subst0 (minus i (S n)) v x6 x7)).(eq_ind_r C (CHead x5 +(Bind x4) x6) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C c (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 +(getl n c2 (CHead x5 (Bind x4) x6)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x5 (Bind x4) x6) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) +x6) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) +u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x4 x5 +x6 x7 (refl_equal C (CHead x5 (Bind x4) x6)) (getl_intro n c2 (CHead x5 (Bind +x4) x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x5 (Bind x4) x7) H18 +f x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (S n)) v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (x4: B).(\lambda (x5: C).(\lambda (x6: C).(\lambda +(x7: T).(\lambda (H17: (eq C e (CHead x5 (Bind x4) x7))).(\lambda (H18: +(clear x2 (CHead x6 (Bind x4) x7))).(\lambda (H19: (csubst0 (minus i (S n)) v +x5 x6)).(eq_ind_r C (CHead x5 (Bind x4) x7) (\lambda (c: C).(or4 (getl n c2 +c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 (CHead x5 (Bind x4) +x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x5 (Bind x4) x7) (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) +x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 +(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) +(ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x4 x5 x6 x7 +(refl_equal C (CHead x5 (Bind x4) x7)) (getl_intro n c2 (CHead x6 (Bind x4) +x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x6 (Bind x4) x7) H18 f +x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +(minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x4: B).(\lambda +(x5: C).(\lambda (x6: C).(\lambda (x7: T).(\lambda (x8: T).(\lambda (H17: (eq +C e (CHead x5 (Bind x4) x7))).(\lambda (H18: (clear x2 (CHead x6 (Bind x4) +x8))).(\lambda (H19: (subst0 (minus i (S n)) v x7 x8)).(\lambda (H20: +(csubst0 (minus i (S n)) v x5 x6)).(eq_ind_r C (CHead x5 (Bind x4) x7) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 +(getl n c2 (CHead x5 (Bind x4) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) +x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) +x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) x4 x5 x6 x7 x8 (refl_equal C (CHead x5 (Bind x4) x7)) +(getl_intro n c2 (CHead x6 (Bind x4) x8) (CHead x2 (Flat f) x3) H11 +(clear_flat x2 (CHead x6 (Bind x4) x8) H18 f x3)) H19 H20)) e H17)))))))))) +H16)) H15))))))) x0 H8 H9 H10))))))))) H6)) (\lambda (H6: (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C x (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k n)) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k +n)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k +n)) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2)))))) (or4 (getl n +c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: K).(\lambda +(x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H7: (eq +C x (CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x4))).(\lambda +(H9: (subst0 (minus i (s x0 n)) v x3 x4)).(\lambda (H10: (csubst0 (minus i (s +x0 n)) v x1 x2)).(let H11 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 +(CHead x1 x0 x3) H7) in (K_ind (\lambda (k: K).((drop n O c2 (CHead x2 k x4)) +\to ((subst0 (minus i (s k n)) v x3 x4) \to ((csubst0 (minus i (s k n)) v x1 +x2) \to ((clear (CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))))))))) (\lambda (b: B).(\lambda (H12: (drop n O c2 (CHead x2 +(Bind b) x4))).(\lambda (H13: (subst0 (minus i (s (Bind b) n)) v x3 +x4)).(\lambda (H14: (csubst0 (minus i (s (Bind b) n)) v x1 x2)).(\lambda +(H15: (clear (CHead x1 (Bind b) x3) e)).(eq_ind_r C (CHead x1 (Bind b) x3) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 +(getl n c2 (CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead +e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda +(b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (ex4_5_intro B C C +T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) b x1 x2 x3 x4 +(refl_equal C (CHead x1 (Bind b) x3)) (getl_intro n c2 (CHead x2 (Bind b) x4) +(CHead x2 (Bind b) x4) H12 (clear_bind b x2 x4)) H13 H14)) e (clear_gen_bind +b x1 e x3 H15))))))) (\lambda (f: F).(\lambda (H12: (drop n O c2 (CHead x2 +(Flat f) x4))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v x3 +x4)).(\lambda (H14: (csubst0 (minus i (s (Flat f) n)) v x1 x2)).(\lambda +(H15: (clear (CHead x1 (Flat f) x3) e)).(let H16 \def (eq_ind nat (minus i n) +(\lambda (n0: nat).(csubst0 n0 v x1 x2)) H14 (S (minus i (S n))) (minus_x_Sy +i n H)) in (let H17 \def (csubst0_clear_S x1 x2 v (minus i (S n)) H16 e +(clear_gen_flat f x1 e x3 H15)) in (or4_ind (clear x2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) +v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (H18: +(clear x2 e)).(or4_intro0 (getl n c2 e) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e +(CHead x2 (Flat f) x4) H12 (clear_flat x2 e H18 f x4)))) (\lambda (H18: +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +(minus i (S n)) v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 +(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2))))) (or4 (getl n c2 e) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda +(x7: T).(\lambda (x8: T).(\lambda (H19: (eq C e (CHead x6 (Bind x5) +x7))).(\lambda (H20: (clear x2 (CHead x6 (Bind x5) x8))).(\lambda (H21: +(subst0 (minus i (S n)) v x7 x8)).(eq_ind_r C (CHead x6 (Bind x5) x7) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 +(getl n c2 (CHead x6 (Bind x5) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x7) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x6 (Bind x5) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) +x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x7) (CHead e0 (Bind b) +u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x5 x6 +x7 x8 (refl_equal C (CHead x6 (Bind x5) x7)) (getl_intro n c2 (CHead x6 (Bind +x5) x8) (CHead x2 (Flat f) x4) H12 (clear_flat x2 (CHead x6 (Bind x5) x8) H20 +f x4)) H21)) e H19)))))))) H18)) (\lambda (H18: (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (S n)) v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: C).(\lambda +(x8: T).(\lambda (H19: (eq C e (CHead x6 (Bind x5) x8))).(\lambda (H20: +(clear x2 (CHead x7 (Bind x5) x8))).(\lambda (H21: (csubst0 (minus i (S n)) v +x6 x7)).(eq_ind_r C (CHead x6 (Bind x5) x8) (\lambda (c: C).(or4 (getl n c2 +c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 (CHead x6 (Bind x5) +x8)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x6 (Bind x5) x8) (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x6 (Bind x5) +x8) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x8) (CHead e1 +(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) +(ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x6 (Bind x5) x8) (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x5 x6 x7 x8 +(refl_equal C (CHead x6 (Bind x5) x8)) (getl_intro n c2 (CHead x7 (Bind x5) +x8) (CHead x2 (Flat f) x4) H12 (clear_flat x2 (CHead x7 (Bind x5) x8) H20 f +x4)) H21)) e H19)))))))) H18)) (\lambda (H18: (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +(minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x5: B).(\lambda +(x6: C).(\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: T).(\lambda (H19: (eq +C e (CHead x6 (Bind x5) x8))).(\lambda (H20: (clear x2 (CHead x7 (Bind x5) +x9))).(\lambda (H21: (subst0 (minus i (S n)) v x8 x9)).(\lambda (H22: +(csubst0 (minus i (S n)) v x6 x7)).(eq_ind_r C (CHead x6 (Bind x5) x8) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 +(getl n c2 (CHead x6 (Bind x5) x8)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x8) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x6 (Bind x5) x8) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) +x8) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) +x8) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) x5 x6 x7 x8 x9 (refl_equal C (CHead x6 (Bind x5) x8)) +(getl_intro n c2 (CHead x7 (Bind x5) x9) (CHead x2 (Flat f) x4) H12 +(clear_flat x2 (CHead x7 (Bind x5) x9) H20 f x4)) H21 H22)) e H19)))))))))) +H18)) H17)))))))) x0 H8 H9 H10 H11))))))))))) H6)) H5))))) H2)))))))))). + +lemma csubst0_getl_ge_back: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c2 +e) \to (getl n c1 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e: C).(\lambda (H1: (getl n c2 e)).(let H2 \def (getl_gen_all +c2 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c2 e0)) (\lambda (e0: +C).(clear e0 e)) (getl n c1 e) (\lambda (x: C).(\lambda (H3: (drop n O c2 +x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c1 e) (\lambda (H5: +(lt i n)).(getl_intro n c1 e x (csubst0_drop_gt_back n i H5 c1 c2 v H0 x H3) +H4)) (\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n0: +nat).(drop n0 O c2 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n0: +nat).(le i n0)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c1 e)) +(let H8 \def (csubst0_drop_eq_back i c1 c2 v H0 x H6) in (or4_ind (drop i O +c1 x) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 +(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C x +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (getl i c1 +e) (\lambda (H9: (drop i O c1 x)).(getl_intro i c1 e x H9 H4)) (\lambda (H9: +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2))))) (getl i c1 e) (\lambda (x0: F).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C x (CHead x1 (Flat +x0) x3))).(\lambda (H11: (drop i O c1 (CHead x1 (Flat x0) x2))).(\lambda (_: +(subst0 O v x2 x3)).(let H13 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 +(CHead x1 (Flat x0) x3) H10) in (getl_intro i c1 e (CHead x1 (Flat x0) x2) +H11 (clear_flat x1 e (clear_gen_flat x0 x1 e x3 H13) x0 x2)))))))))) H9)) +(\lambda (H9: (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 +(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (getl i c1 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C x +(CHead x2 (Flat x0) x3))).(\lambda (H11: (drop i O c1 (CHead x1 (Flat x0) +x3))).(\lambda (H12: (csubst0 O v x1 x2)).(let H13 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x2 (Flat x0) x3) H10) in (getl_intro i c1 e +(CHead x1 (Flat x0) x3) H11 (clear_flat x1 e (csubst0_clear_O_back x1 x2 v +H12 e (clear_gen_flat x0 x2 e x3 H13)) x0 x3)))))))))) H9)) (\lambda (H9: +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C x (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop i +O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C x (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop i O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (getl i c1 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H10: (eq C x (CHead x2 (Flat x0) x4))).(\lambda (H11: (drop i O +c1 (CHead x1 (Flat x0) x3))).(\lambda (_: (subst0 O v x3 x4)).(\lambda (H13: +(csubst0 O v x1 x2)).(let H14 \def (eq_ind C x (\lambda (c: C).(clear c e)) +H4 (CHead x2 (Flat x0) x4) H10) in (getl_intro i c1 e (CHead x1 (Flat x0) x3) +H11 (clear_flat x1 e (csubst0_clear_O_back x1 x2 v H13 e (clear_gen_flat x0 +x2 e x4 H14)) x0 x3)))))))))))) H9)) H8)) n H5)))) (\lambda (H5: (lt n +i)).(le_lt_false i n H H5 (getl n c1 e))))))) H2)))))))))). + +lemma csubst0_getl_lt_back: + \forall (n: nat).(\forall (i: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e2: C).((getl n c2 +e2) \to (or (getl n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 +e2)) (\lambda (e1: C).(getl n c1 e1)))))))))))) +\def + \lambda (n: nat).(\lambda (i: nat).(\lambda (H: (lt n i)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e2: C).(\lambda (H1: (getl n c2 e2)).(let H2 \def +(getl_gen_all c2 e2 n H1) in (ex2_ind C (\lambda (e: C).(drop n O c2 e)) +(\lambda (e: C).(clear e e2)) (or (getl n c1 e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda +(x: C).(\lambda (H3: (drop n O c2 x)).(\lambda (H4: (clear x e2)).(let H_x +\def (csubst0_drop_lt_back n i H c1 c2 v H0 x H3) in (let H5 \def H_x in +(or_ind (drop n O c1 x) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 x)) +(\lambda (e1: C).(drop n O c1 e1))) (or (getl n c1 e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda +(H6: (drop n O c1 x)).(or_introl (getl n c1 e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1))) +(getl_intro n c1 e2 x H6 H4))) (\lambda (H6: (ex2 C (\lambda (e1: C).(csubst0 +(minus i n) v e1 x)) (\lambda (e1: C).(drop n O c1 e1)))).(ex2_ind C (\lambda +(e1: C).(csubst0 (minus i n) v e1 x)) (\lambda (e1: C).(drop n O c1 e1)) (or +(getl n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) +(\lambda (e1: C).(getl n c1 e1)))) (\lambda (x0: C).(\lambda (H7: (csubst0 +(minus i n) v x0 x)).(\lambda (H8: (drop n O c1 x0)).(let H_x0 \def +(csubst0_clear_trans x0 x v (minus i n) H7 e2 H4) in (let H9 \def H_x0 in +(or_ind (clear x0 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) +(\lambda (e1: C).(clear x0 e1))) (or (getl n c1 e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda +(H10: (clear x0 e2)).(or_introl (getl n c1 e2) (ex2 C (\lambda (e1: +C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(getl n c1 e1))) +(getl_intro n c1 e2 x0 H8 H10))) (\lambda (H10: (ex2 C (\lambda (e1: +C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(clear x0 e1)))).(ex2_ind +C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: C).(clear x0 +e1)) (or (getl n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 +e2)) (\lambda (e1: C).(getl n c1 e1)))) (\lambda (x1: C).(\lambda (H11: +(csubst0 (minus i n) v x1 e2)).(\lambda (H12: (clear x0 x1)).(or_intror (getl +n c1 e2) (ex2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 e2)) (\lambda (e1: +C).(getl n c1 e1))) (ex_intro2 C (\lambda (e1: C).(csubst0 (minus i n) v e1 +e2)) (\lambda (e1: C).(getl n c1 e1)) x1 H11 (getl_intro n c1 x1 x0 H8 +H12)))))) H10)) H9)))))) H6)) H5)))))) H2)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/props.ma new file mode 100644 index 000000000..a681912c7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst0/props.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst0/defs.ma". + +lemma csubst0_snd_bind: + \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(csubst0 (S i) v (CHead c +(Bind b) u1) (CHead c (Bind b) u2)))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst0 i v u1 u2)).(\lambda (c: C).(eq_ind nat (s (Bind +b) i) (\lambda (n: nat).(csubst0 n v (CHead c (Bind b) u1) (CHead c (Bind b) +u2))) (csubst0_snd (Bind b) i v u1 u2 H c) (S i) (refl_equal nat (S +i))))))))). + +lemma csubst0_fst_bind: + \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall +(v: T).((csubst0 i v c1 c2) \to (\forall (u: T).(csubst0 (S i) v (CHead c1 +(Bind b) u) (CHead c2 (Bind b) u)))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H: (csubst0 i v c1 c2)).(\lambda (u: T).(eq_ind nat (s (Bind +b) i) (\lambda (n: nat).(csubst0 n v (CHead c1 (Bind b) u) (CHead c2 (Bind b) +u))) (csubst0_fst (Bind b) i c1 c2 v H u) (S i) (refl_equal nat (S i))))))))). + +theorem csubst0_both_bind: + \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst0 i +v c1 c2) \to (csubst0 (S i) v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) +u2)))))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst0 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst0 i v c1 c2)).(eq_ind nat (s (Bind b) i) (\lambda (n: +nat).(csubst0 n v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) u2))) +(csubst0_both (Bind b) i v u1 u2 H c1 c2 H0) (S i) (refl_equal nat (S +i))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/defs.ma new file mode 100644 index 000000000..8a384490b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/defs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst0/defs.ma". + +inductive csubst1 (i: nat) (v: T) (c1: C): C \to Prop \def +| csubst1_refl: csubst1 i v c1 c1 +| csubst1_sing: \forall (c2: C).((csubst0 i v c1 c2) \to (csubst1 i v c1 c2)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/fwd.ma new file mode 100644 index 000000000..16c018af6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/fwd.ma @@ -0,0 +1,128 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst1/defs.ma". + +include "basic_1A/csubst0/fwd.ma". + +include "basic_1A/subst1/defs.ma". + +include "basic_1A/s/fwd.ma". + +implied lemma csubst1_ind: + \forall (i: nat).(\forall (v: T).(\forall (c1: C).(\forall (P: ((C \to +Prop))).((P c1) \to (((\forall (c2: C).((csubst0 i v c1 c2) \to (P c2)))) \to +(\forall (c: C).((csubst1 i v c1 c) \to (P c)))))))) +\def + \lambda (i: nat).(\lambda (v: T).(\lambda (c1: C).(\lambda (P: ((C \to +Prop))).(\lambda (f: (P c1)).(\lambda (f0: ((\forall (c2: C).((csubst0 i v c1 +c2) \to (P c2))))).(\lambda (c: C).(\lambda (c0: (csubst1 i v c1 c)).(match +c0 with [csubst1_refl \Rightarrow f | (csubst1_sing x x0) \Rightarrow (f0 x +x0)])))))))). + +lemma csubst1_gen_head: + \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).(\forall +(v: T).(\forall (i: nat).((csubst1 (s k i) v (CHead c1 k u1) x) \to (ex3_2 T +C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 k u2)))) (\lambda (u2: +T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: +C).(csubst1 i v c1 c2)))))))))) +\def + \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda +(v: T).(\lambda (i: nat).(\lambda (H: (csubst1 (s k i) v (CHead c1 k u1) +x)).(csubst1_ind (s k i) v (CHead c1 k u1) (\lambda (c: C).(ex3_2 T C +(\lambda (u2: T).(\lambda (c2: C).(eq C c (CHead c2 k u2)))) (\lambda (u2: +T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: +C).(csubst1 i v c1 c2))))) (ex3_2_intro T C (\lambda (u2: T).(\lambda (c2: +C).(eq C (CHead c1 k u1) (CHead c2 k u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 i v c1 +c2))) u1 c1 (refl_equal C (CHead c1 k u1)) (subst1_refl i v u1) (csubst1_refl +i v c1)) (\lambda (c2: C).(\lambda (H0: (csubst0 (s k i) v (CHead c1 k u1) +c2)).(let H1 \def (csubst0_gen_head k c1 c2 u1 v (s k i) H0) in (or3_ind +(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s k j)))) +(\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k u2)))) (\lambda (u2: +T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 +j v c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat (s k i) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda +(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: +C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c1 c3))))) (ex3_2 T C (\lambda (u2: +T).(\lambda (c3: C).(eq C c2 (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 +c3)))) (\lambda (H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat +(s k i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k +u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v u1 u2))))).(ex3_2_ind T +nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda +(u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k u2)))) (\lambda (u2: +T).(\lambda (j: nat).(subst0 j v u1 u2))) (ex3_2 T C (\lambda (u2: +T).(\lambda (c3: C).(eq C c2 (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 +c3)))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H3: (eq nat (s k i) (s k +x1))).(\lambda (H4: (eq C c2 (CHead c1 k x0))).(\lambda (H5: (subst0 x1 v u1 +x0)).(eq_ind_r C (CHead c1 k x0) (\lambda (c: C).(ex3_2 T C (\lambda (u2: +T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 +c3))))) (let H_y \def (s_inj k i x1 H3) in (let H6 \def (eq_ind_r nat x1 +(\lambda (n: nat).(subst0 n v u1 x0)) H5 i H_y) in (ex3_2_intro T C (\lambda +(u2: T).(\lambda (c3: C).(eq C (CHead c1 k x0) (CHead c3 k u2)))) (\lambda +(u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: +C).(csubst1 i v c1 c3))) x0 c1 (refl_equal C (CHead c1 k x0)) (subst1_single +i v u1 x0 H6) (csubst1_refl i v c1)))) c2 H4)))))) H2)) (\lambda (H2: (ex3_2 +C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda +(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c1 c3))))).(ex3_2_ind C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 +j v c1 c3))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c2 (CHead c3 +k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: C).(\lambda (x1: +nat).(\lambda (H3: (eq nat (s k i) (s k x1))).(\lambda (H4: (eq C c2 (CHead +x0 k u1))).(\lambda (H5: (csubst0 x1 v c1 x0)).(eq_ind_r C (CHead x0 k u1) +(\lambda (c: C).(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead +c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda +(_: T).(\lambda (c3: C).(csubst1 i v c1 c3))))) (let H_y \def (s_inj k i x1 +H3) in (let H6 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c1 x0)) +H5 i H_y) in (ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead +x0 k u1) (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 +u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3))) u1 x0 +(refl_equal C (CHead x0 k u1)) (subst1_refl i v u1) (csubst1_sing i v c1 x0 +H6)))) c2 H4)))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda +(_: C).(\lambda (j: nat).(eq nat (s k i) (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3)))))).(ex4_3_ind T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k +j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 +k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 +c3)))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c2 (CHead c3 k +u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: T).(\lambda (x1: +C).(\lambda (x2: nat).(\lambda (H3: (eq nat (s k i) (s k x2))).(\lambda (H4: +(eq C c2 (CHead x1 k x0))).(\lambda (H5: (subst0 x2 v u1 x0)).(\lambda (H6: +(csubst0 x2 v c1 x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c: C).(ex3_2 T C +(\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: +T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: +C).(csubst1 i v c1 c3))))) (let H_y \def (s_inj k i x2 H3) in (let H7 \def +(eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c1 x1)) H6 i H_y) in (let H8 +\def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v u1 x0)) H5 i H_y) in +(ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead x1 k x0) +(CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) +(\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3))) x0 x1 (refl_equal C +(CHead x1 k x0)) (subst1_single i v u1 x0 H8) (csubst1_sing i v c1 x1 H7))))) +c2 H4)))))))) H2)) H1)))) x H))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst1/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/getl.ma new file mode 100644 index 000000000..4805e5f09 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/getl.ma @@ -0,0 +1,269 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst1/props.ma". + +include "basic_1A/csubst0/getl.ma". + +include "basic_1A/subst1/props.ma". + +include "basic_1A/drop/props.ma". + +lemma csubst1_getl_ge: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c1 +e) \to (getl n c2 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c1 e) \to +(getl n c e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda +(c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2: +(getl n c1 e)).(csubst0_getl_ge i n H c1 c3 v H1 e H2))))) c2 H0))))))). + +lemma csubst1_getl_lt: + \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e1: C).((getl n c1 +e1) \to (ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2: +C).(getl n c2 e2))))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e1: C).((getl n c1 e1) \to +(ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2: C).(getl +n c e2)))))) (\lambda (e1: C).(\lambda (H1: (getl n c1 e1)).(eq_ind_r nat (S +(minus i (S n))) (\lambda (n0: nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1 +e2)) (\lambda (e2: C).(getl n c1 e2)))) (ex_intro2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c1 e2)) e1 +(csubst1_refl (S (minus i (S n))) v e1) H1) (minus i n) (minus_x_Sy i n H)))) +(\lambda (c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e1: C).(\lambda +(H2: (getl n c1 e1)).(eq_ind_r nat (S (minus i (S n))) (\lambda (n0: +nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1 e2)) (\lambda (e2: C).(getl n +c3 e2)))) (let H3 \def (csubst0_getl_lt i n H c1 c3 v H1 e1 H2) in (or4_ind +(getl n c3 e1) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: +T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n +c3 (CHead e3 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e2 e3))))))) (ex2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) +(\lambda (H4: (getl n c3 e1)).(ex_intro2 C (\lambda (e2: C).(csubst1 (S +(minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2)) e1 (csubst1_refl +(S (minus i (S n))) v e1) H4)) (\lambda (H4: (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u +w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w))))) (ex2 C (\lambda (e2: C).(csubst1 (S +(minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H5: (eq C e1 +(CHead x1 (Bind x0) x2))).(\lambda (H6: (getl n c3 (CHead x1 (Bind x0) +x3))).(\lambda (H7: (subst0 (minus i (S n)) v x2 x3)).(eq_ind_r C (CHead x1 +(Bind x0) x2) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S +n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x2) e2)) (\lambda (e2: +C).(getl n c3 e2)) (CHead x1 (Bind x0) x3) (csubst1_sing (S (minus i (S n))) +v (CHead x1 (Bind x0) x2) (CHead x1 (Bind x0) x3) (csubst0_snd_bind x0 (minus +i (S n)) v x2 x3 H7 x1)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex3_4 B C C T +(\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 +(CHead e2 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: +C).(\lambda (u: T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e2 e3))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e2: C).(\lambda +(_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: T).(getl n c3 (CHead e3 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e2 e3))))) (ex2 C (\lambda (e2: C).(csubst1 +(S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H5: (eq C e1 +(CHead x1 (Bind x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0) +x3))).(\lambda (H7: (csubst0 (minus i (S n)) v x1 x2)).(eq_ind_r C (CHead x1 +(Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S +n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x3) e2)) (\lambda (e2: +C).(getl n c3 e2)) (CHead x2 (Bind x0) x3) (csubst1_sing (S (minus i (S n))) +v (CHead x1 (Bind x0) x3) (CHead x2 (Bind x0) x3) (csubst0_fst_bind x0 (minus +i (S n)) x1 x2 v H7 x3)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex4_5 B C C T +T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e3 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e2 e3)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda +(e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e2 +(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda +(_: T).(\lambda (w: T).(getl n c3 (CHead e3 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3)))))) +(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: +C).(getl n c3 e2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H5: (eq C e1 (CHead x1 (Bind +x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H7: +(subst0 (minus i (S n)) v x3 x4)).(\lambda (H8: (csubst0 (minus i (S n)) v x1 +x2)).(eq_ind_r C (CHead x1 (Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) +(ex_intro2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind +x0) x3) e2)) (\lambda (e2: C).(getl n c3 e2)) (CHead x2 (Bind x0) x4) +(csubst1_sing (S (minus i (S n))) v (CHead x1 (Bind x0) x3) (CHead x2 (Bind +x0) x4) (csubst0_both_bind x0 (minus i (S n)) v x3 x4 H7 x1 x2 H8)) H6) e1 +H5)))))))))) H4)) H3)) (minus i n) (minus_x_Sy i n H)))))) c2 H0))))))). + +lemma csubst1_getl_ge_back: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c2 +e) \to (getl n c1 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c e) \to +(getl n c1 e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda +(c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2: +(getl n c3 e)).(csubst0_getl_ge_back i n H c1 c3 v H1 e H2))))) c2 H0))))))). + +lemma getl_csubst1: + \forall (d: nat).(\forall (c: C).(\forall (e: C).(\forall (u: T).((getl d c +(CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: +C).(csubst1 d u c a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) d a0 +a)))))))) +\def + \lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (c: C).(\forall (e: +C).(\forall (u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) n a0 a))))))))) (\lambda (c: C).(C_ind +(\lambda (c0: C).(\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind +Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 +a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a)))))))) (\lambda +(n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H: (getl O (CSort n) +(CHead e (Bind Abbr) u))).(getl_gen_sort n O (CHead e (Bind Abbr) u) H (ex2_2 +C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CSort n) a0))) (\lambda +(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (c0: C).(\lambda +(H: ((\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind Abbr) u)) \to +(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda +(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))).(\lambda (k: K).(K_ind +(\lambda (k0: K).(\forall (t: T).(\forall (e: C).(\forall (u: T).((getl O +(CHead c0 k0 t) (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 O u (CHead c0 k0 t) a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (b: B).(\lambda (t: +T).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl O (CHead c0 (Bind b) +t) (CHead e (Bind Abbr) u))).(let H1 \def (f_equal C C (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) +(CHead e (Bind Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e +(Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) +H0))) in ((let H2 \def (f_equal C B (\lambda (e0: C).(match e0 with [(CSort +_) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead e (Bind Abbr) u) +(CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t +(getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in ((let H3 +\def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | +(CHead _ _ t0) \Rightarrow t0])) (CHead e (Bind Abbr) u) (CHead c0 (Bind b) +t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind +b) t) (CHead e (Bind Abbr) u) H0))) in (\lambda (H4: (eq B Abbr b)).(\lambda +(_: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 O t0 (CHead c0 (Bind b) t) a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) O a0 a))))) (eq_ind B Abbr (\lambda (b0: +B).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t (CHead c0 (Bind +b0) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))))) +(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t (CHead c0 +(Bind Abbr) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) +(CHead c0 (Bind Abbr) t) c0 (csubst1_refl O t (CHead c0 (Bind Abbr) t)) +(drop_drop (Bind Abbr) O c0 c0 (drop_refl c0) t)) b H4) u H3)))) H2)) +H1))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (e: C).(\lambda (u: +T).(\lambda (H0: (getl O (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u))).(let +H_x \def (subst1_ex u t O) in (let H1 \def H_x in (ex_ind T (\lambda (t2: +T).(subst1 O u t (lift (S O) O t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: +C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) O a0 a)))) (\lambda (x: T).(\lambda (H2: (subst1 O u t (lift +(S O) O x))).(let H3 \def (H e u (getl_intro O c0 (CHead e (Bind Abbr) u) c0 +(drop_refl c0) (clear_gen_flat f c0 (CHead e (Bind Abbr) u) t (getl_gen_O +(CHead c0 (Flat f) t) (CHead e (Bind Abbr) u) H0)))) in (ex2_2_ind C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) O a0 a))) (ex2_2 C C (\lambda (a0: C).(\lambda +(_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) O a0 a)))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H4: +(csubst1 O u c0 x0)).(\lambda (H5: (drop (S O) O x0 x1)).(ex2_2_intro C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) (CHead x0 (Flat f) +(lift (S O) O x)) x1 (csubst1_flat f O u t (lift (S O) O x) H2 c0 x0 H4) +(drop_drop (Flat f) O x0 x1 H5 (lift (S O) O x))))))) H3)))) H1)))))))) k)))) +c)) (\lambda (n: nat).(\lambda (H: ((\forall (c: C).(\forall (e: C).(\forall +(u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) n a0 a)))))))))).(\lambda (c: C).(C_ind (\lambda (c0: +C).(\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead e (Bind Abbr) u)) +\to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))))))) (\lambda (n0: +nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl (S n) (CSort n0) +(CHead e (Bind Abbr) u))).(getl_gen_sort n0 (S n) (CHead e (Bind Abbr) u) H0 +(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CSort n0) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))))))))) (\lambda +(c0: C).(\lambda (H0: ((\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead +e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S +n) u c0 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 +a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall +(e: C).(\forall (u: T).((getl (S n) (CHead c0 k0 t) (CHead e (Bind Abbr) u)) +\to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 k0 +t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))))))))) +(\lambda (b: B).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (H1: +(getl (S n) (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u))).(let H_x \def +(subst1_ex u t n) in (let H2 \def H_x in (ex_ind T (\lambda (t2: T).(subst1 n +u t (lift (S O) n t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 +(S n) u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S +O) (S n) a0 a)))) (\lambda (x: T).(\lambda (H3: (subst1 n u t (lift (S O) n +x))).(let H4 \def (H c0 e u (getl_gen_S (Bind b) c0 (CHead e (Bind Abbr) u) t +n H1)) in (ex2_2_ind C C (\lambda (a0: C).(\lambda (_: C).(csubst1 n u c0 +a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) n a0 a))) (ex2_2 C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0: +C).(\lambda (x1: C).(\lambda (H5: (csubst1 n u c0 x0)).(\lambda (H6: (drop (S +O) n x0 x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) +u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S +n) a0 a))) (CHead x0 (Bind b) (lift (S O) n x)) (CHead x1 (Bind b) x) +(csubst1_bind b n u t (lift (S O) n x) H3 c0 x0 H5) (drop_skip_bind (S O) n +x0 x1 H6 b x)))))) H4)))) H2)))))))) (\lambda (f: F).(\lambda (t: T).(\lambda +(e: C).(\lambda (u: T).(\lambda (H1: (getl (S n) (CHead c0 (Flat f) t) (CHead +e (Bind Abbr) u))).(let H_x \def (subst1_ex u t (S n)) in (let H2 \def H_x in +(ex_ind T (\lambda (t2: T).(subst1 (S n) u t (lift (S O) (S n) t2))) (ex2_2 C +C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) +a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda +(x: T).(\lambda (H3: (subst1 (S n) u t (lift (S O) (S n) x))).(let H4 \def +(H0 e u (getl_gen_S (Flat f) c0 (CHead e (Bind Abbr) u) t n H1)) in +(ex2_2_ind C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))) (ex2_2 C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0: +C).(\lambda (x1: C).(\lambda (H5: (csubst1 (S n) u c0 x0)).(\lambda (H6: +(drop (S O) (S n) x0 x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: +C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) (S n) a0 a))) (CHead x0 (Flat f) (lift (S O) (S n) x)) (CHead +x1 (Flat f) x) (csubst1_flat f (S n) u t (lift (S O) (S n) x) H3 c0 x0 H5) +(drop_skip_flat (S O) n x0 x1 H6 f x)))))) H4)))) H2)))))))) k)))) c)))) d). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubst1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/props.ma new file mode 100644 index 000000000..283eb28a4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubst1/props.ma @@ -0,0 +1,66 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst1/fwd.ma". + +include "basic_1A/subst1/fwd.ma". + +theorem csubst1_head: + \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i +v c1 c2) \to (csubst1 (s k i) v (CHead c1 k u1) (CHead c2 k u2)))))))))) +\def + \lambda (k: K).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst1 i v u1 u2)).(subst1_ind i v u1 (\lambda (t: +T).(\forall (c1: C).(\forall (c2: C).((csubst1 i v c1 c2) \to (csubst1 (s k +i) v (CHead c1 k u1) (CHead c2 k t)))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst1 i v c1 c2)).(csubst1_ind i v c1 (\lambda (c: +C).(csubst1 (s k i) v (CHead c1 k u1) (CHead c k u1))) (csubst1_refl (s k i) +v (CHead c1 k u1)) (\lambda (c3: C).(\lambda (H1: (csubst0 i v c1 +c3)).(csubst1_sing (s k i) v (CHead c1 k u1) (CHead c3 k u1) (csubst0_fst k i +c1 c3 v H1 u1)))) c2 H0)))) (\lambda (t2: T).(\lambda (H0: (subst0 i v u1 +t2)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(csubst1 (s k i) v (CHead c1 k u1) +(CHead c k t2))) (csubst1_sing (s k i) v (CHead c1 k u1) (CHead c1 k t2) +(csubst0_snd k i v u1 t2 H0 c1)) (\lambda (c3: C).(\lambda (H2: (csubst0 i v +c1 c3)).(csubst1_sing (s k i) v (CHead c1 k u1) (CHead c3 k t2) (csubst0_both +k i v u1 t2 H0 c1 c3 H2)))) c2 H1)))))) u2 H)))))). + +theorem csubst1_bind: + \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i +v c1 c2) \to (csubst1 (S i) v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) +u2)))))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst1 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst1 i v c1 c2)).(eq_ind nat (s (Bind b) i) (\lambda (n: +nat).(csubst1 n v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) u2))) +(csubst1_head (Bind b) i v u1 u2 H c1 c2 H0) (S i) (refl_equal nat (S +i))))))))))). + +theorem csubst1_flat: + \forall (f: F).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i +v c1 c2) \to (csubst1 i v (CHead c1 (Flat f) u1) (CHead c2 (Flat f) +u2)))))))))) +\def + \lambda (f: F).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst1 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst1 i v c1 c2)).(eq_ind nat (s (Flat f) i) (\lambda (n: +nat).(csubst1 n v (CHead c1 (Flat f) u1) (CHead c2 (Flat f) u2))) +(csubst1_head (Flat f) i v u1 u2 H c1 c2 H0) i (refl_equal nat i)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/clear.ma new file mode 100644 index 000000000..86e44ecee --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/clear.ma @@ -0,0 +1,71 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/fwd.ma". + +include "basic_1A/clear/fwd.ma". + +lemma csubt_clear_conf: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to +(\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) +(\lambda (e2: C).(clear c2 e2)))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 +c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c +e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c0 +e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) +e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csubt g e1 e2)) +(\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (H0: (csubt g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 +e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear c4 +e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: +(clear (CHead c3 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c3 k0 u) +e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear +(CHead c4 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c3 (Bind +b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csubt g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csubt g (CHead c3 (Bind b) u) e2)) (\lambda +(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csubt_head g +c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3)))) +(\lambda (f: F).(\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def +(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csubt g +e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csubt g e1 +e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: +C).(\lambda (H5: (csubt g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C +(\lambda (e2: C).(csubt g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) +u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: +C).(\lambda (c4: C).(\lambda (H0: (csubt g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) (\lambda +(e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: +(clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) +(\lambda (c: C).(ex2 C (\lambda (e2: C).(csubt g c e2)) (\lambda (e2: +C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csubt +g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) +u2) e2)) (CHead c4 (Bind b) u2) (csubt_void g c3 c4 H0 b H2 u1 u2) +(clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubt g c3 c4)).(\lambda (_: +((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csubt g e1 e2)) +(\lambda (e2: C).(clear c4 e2))))))).(\lambda (u: T).(\lambda (t: T).(\lambda +(H2: (ty3 g c3 u t)).(\lambda (H3: (ty3 g c4 u t)).(\lambda (e1: C).(\lambda +(H4: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) +t) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubt g c e2)) (\lambda (e2: +C).(clear (CHead c4 (Bind Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: +C).(csubt g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead c4 +(Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) u) (csubt_abst g c3 c4 H0 u t H2 +H3) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H4)))))))))))) c1 +c2 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/csuba.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/csuba.ma new file mode 100644 index 000000000..965116ee6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/csuba.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/arity.ma". + +lemma csubt_csuba: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (csuba +g c1 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 +c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(csuba g c c0))) (\lambda +(n: nat).(csuba_refl g (CSort n))) (\lambda (c3: C).(\lambda (c4: C).(\lambda +(_: (csubt g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (k: K).(\lambda +(u: T).(csuba_head g c3 c4 H1 k u))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (_: (csubt g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (b: +B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: +T).(csuba_void g c3 c4 H1 b H2 u1 u2))))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (_: (csubt g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (u: +T).(\lambda (t: T).(\lambda (H2: (ty3 g c3 u t)).(\lambda (_: (ty3 g c4 u +t)).(let H_x \def (ty3_arity g c3 u t H2) in (let H4 \def H_x in (ex2_ind A +(\lambda (a1: A).(arity g c3 u a1)) (\lambda (a1: A).(arity g c3 t (asucc g +a1))) (csuba g (CHead c3 (Bind Abst) t) (CHead c4 (Bind Abbr) u)) (\lambda +(x: A).(\lambda (H5: (arity g c3 u x)).(\lambda (H6: (arity g c3 t (asucc g +x))).(csuba_abst g c3 c4 H1 t x H6 u (csuba_arity g c3 u x H5 c4 H1))))) +H4))))))))))) c1 c2 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/defs.ma new file mode 100644 index 000000000..f129a7477 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/defs.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/defs.ma". + +inductive csubt (g: G): C \to (C \to Prop) \def +| csubt_sort: \forall (n: nat).(csubt g (CSort n) (CSort n)) +| csubt_head: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall +(k: K).(\forall (u: T).(csubt g (CHead c1 k u) (CHead c2 k u)))))) +| csubt_void: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall +(b: B).((not (eq B b Void)) \to (\forall (u1: T).(\forall (u2: T).(csubt g +(CHead c1 (Bind Void) u1) (CHead c2 (Bind b) u2)))))))) +| csubt_abst: \forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall +(u: T).(\forall (t: T).((ty3 g c1 u t) \to ((ty3 g c2 u t) \to (csubt g +(CHead c1 (Bind Abst) t) (CHead c2 (Bind Abbr) u)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/drop.ma new file mode 100644 index 000000000..1dc494d93 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/drop.ma @@ -0,0 +1,579 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/fwd.ma". + +include "basic_1A/drop/fwd.ma". + +lemma csubt_drop_flat: + \forall (g: G).(\forall (f: F).(\forall (n: nat).(\forall (c1: C).(\forall +(c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 +(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop n O c2 (CHead d2 (Flat f) u)))))))))))) +\def + \lambda (g: G).(\lambda (f: F).(\lambda (n: nat).(nat_ind (\lambda (n0: +nat).(\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: +C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) +u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 +c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 +(Flat f) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H +(CHead d1 (Flat f) u) (drop_gen_refl c1 (CHead d1 (Flat f) u) H0)) in (let +H_x \def (csubt_gen_flat g d1 c2 u f H1) in (let H2 \def H_x in (ex2_ind C +(\lambda (e2: C).(eq C c2 (CHead e2 (Flat f) u))) (\lambda (e2: C).(csubt g +d1 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O +c2 (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x +(Flat f) u))).(\lambda (H4: (csubt g d1 x)).(eq_ind_r C (CHead x (Flat f) u) +(\lambda (c: C).(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop O O c (CHead d2 (Flat f) u))))) (ex_intro2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Flat f) u) (CHead d2 (Flat f) +u))) x H4 (drop_refl (CHead x (Flat f) u))) c2 H3)))) H2)))))))))) (\lambda +(n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) +\to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) +\to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 +(CHead d2 (Flat f) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall +(d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Flat f) u)) \to (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead +d2 (Flat f) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: +T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Flat f) u))).(and3_ind +(eq C (CHead d1 (Flat f) u) (CSort n1)) (eq nat (S n0) O) (eq nat O O) (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) +(CHead d2 (Flat f) u)))) (\lambda (_: (eq C (CHead d1 (Flat f) u) (CSort +n1))).(\lambda (H3: (eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 +\def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee with [O \Rightarrow +False | (S _) \Rightarrow True])) I O H3) in (False_ind (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 +(Flat f) u)))) H5))))) (drop_gen_sort n1 (S n0) O (CHead d1 (Flat f) u) +H1)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 +c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 +(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (k: +K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: +T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Flat f) u0)) \to (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +k0 u) (CHead d2 (Flat f) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda +(d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) +(CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) +(CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 +x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) +u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) +u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Flat f) +u0) u n0 H3)))))))) (\lambda (f0: F).(\lambda (u: T).(\lambda (d1: +C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f0) u) +(CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) +u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 +x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Flat f) u0))).(ex_intro2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Flat f0) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Flat f0) n0 c3 (CHead +x (Flat f) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f0) c0 (CHead d1 +(Flat f) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: +T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) +u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: +T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S +n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Flat f) u))).(ex2_ind C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) +u))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(CHead c3 (Bind b) u2) (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H5: +(csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u))).(ex_intro2 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind b) u2) (CHead d2 (Flat f) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x +(Flat f) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead +d1 (Flat f) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: +T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) +u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u +t)).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda +(H5: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Flat f) +u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 +O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) +u0)))) (\lambda (x: C).(\lambda (H6: (csubt g d1 x)).(\lambda (H7: (drop n0 O +c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) +u0))) x H6 (drop_drop (Bind Abbr) n0 c3 (CHead x (Flat f) u0) H7 u))))) (H c0 +c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Flat f) u0) t n0 +H5)))))))))))))) c1 c2 H0)))))) n))). + +lemma csubt_drop_abbr: + \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csubt g +c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind +Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop +n O c2 (CHead d2 (Bind Abbr) u))))))))))) +\def + \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: +C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: +T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) +u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 +c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 +(Bind Abbr) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H +(CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H0)) in +(let H2 \def (csubt_gen_abbr g d1 c2 u H1) in (ex2_ind C (\lambda (e2: C).(eq +C c2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csubt g d1 e2)) (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 +(Bind Abbr) u)))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x (Bind Abbr) +u))).(\lambda (H4: (csubt g d1 x)).(eq_ind_r C (CHead x (Bind Abbr) u) +(\lambda (c: C).(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop O O c (CHead d2 (Bind Abbr) u))))) (ex_intro2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead +d2 (Bind Abbr) u))) x H4 (drop_refl (CHead x (Bind Abbr) u))) c2 H3)))) +H2))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: +C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 +(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))))))))))).(\lambda +(c1: C).(\lambda (c2: C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda +(c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c +(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u))))))))) (\lambda +(n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O +(CSort n1) (CHead d1 (Bind Abbr) u))).(and3_ind (eq C (CHead d1 (Bind Abbr) +u) (CSort n1)) (eq nat (S n0) O) (eq nat O O) (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) +u)))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u) (CSort n1))).(\lambda (H3: +(eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n0) +(\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H3) in (False_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) +H5))))) (drop_gen_sort n1 (S n0) O (CHead d1 (Bind Abbr) u) H1)))))) (\lambda +(c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (H2: +((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) +u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S +n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (k: K).(K_ind (\lambda +(k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O +(CHead c0 k0 u) (CHead d1 (Bind Abbr) u0)) \to (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind +Abbr) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda +(u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind +Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csubt g +d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind +Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 x)).(\lambda (H5: +(drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 +(Bind Abbr) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u0) H5 +u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abbr) u0) +u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda +(u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead d1 (Bind +Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) +(CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 +x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Flat f) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Flat f) n0 c3 (CHead +x (Bind Abbr) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f) c0 (CHead d1 +(Bind Abbr) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: +T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) +u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: +T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S +n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(ex2_ind C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 +(Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda +(x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x +(Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u))) x H5 +(drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u) H6 u2))))) (H c0 c3 H1 d1 u +(drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abbr) u) u1 n0 H4)))))))))))))) +(\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: +((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) +u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S +n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (u: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: +C).(\lambda (u0: T).(\lambda (H5: (drop (S n0) O (CHead c0 (Bind Abst) t) +(CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind +Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H6: (csubt g +d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind Abbr) u) (CHead d2 (Bind Abbr) u0))) x H6 (drop_drop (Bind Abbr) n0 c3 +(CHead x (Bind Abbr) u0) H7 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind +Abst) c0 (CHead d1 (Bind Abbr) u0) t n0 H5)))))))))))))) c1 c2 H0)))))) n)). + +lemma csubt_drop_abst: + \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csubt g +c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n O c1 (CHead d1 (Bind +Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop n O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n +O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) +\def + \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: +C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (t: +T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) +t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda +(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 +g d2 u t)))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g +c1 c2)).(\lambda (d1: C).(\lambda (t: T).(\lambda (H0: (drop O O c1 (CHead d1 +(Bind Abst) t))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H +(CHead d1 (Bind Abst) t) (drop_gen_refl c1 (CHead d1 (Bind Abst) t) H0)) in +(let H2 \def (csubt_gen_abst g d1 c2 t H1) in (or_ind (ex2 C (\lambda (e2: +C).(eq C c2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2))) +(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) +v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (_: +C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda (v2: T).(ty3 +g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O +O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H3: (ex2 C +(\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt +g d1 e2)))).(ex2_ind C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) t))) +(\lambda (e2: C).(csubt g d1 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) t))).(\lambda +(H5: (csubt g d1 x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c: C).(or +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead +d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c (CHead d2 (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t)))))) (or_introl (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind Abst) t) (CHead +d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) +(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind Abst) t) (CHead +d2 (Bind Abst) t))) x H5 (drop_refl (CHead x (Bind Abst) t)))) c2 H4)))) H3)) +(\lambda (H3: (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 +(Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) +(\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda +(v2: T).(ty3 g e2 v2 t))))).(ex4_2_ind C T (\lambda (e2: C).(\lambda (v2: +T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: +T).(csubt g d1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) +(\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) +(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g +d2 u t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead +x0 (Bind Abbr) x1))).(\lambda (H5: (csubt g d1 x0)).(\lambda (H6: (ty3 g d1 +x1 t)).(\lambda (H7: (ty3 g x0 x1 t)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) +(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O +O c (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))) (or_intror (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x0 (Bind +Abbr) x1) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O (CHead x0 +(Bind Abbr) x1) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) +(ex4_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind +Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H5 (drop_refl (CHead x0 (Bind Abbr) +x1)) H6 H7)) c2 H4))))))) H3)) H2))))))))) (\lambda (n0: nat).(\lambda (H: +((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: +C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t))))))))))))).(\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: +C).(\forall (d1: C).(\forall (t: T).((drop (S n0) O c (CHead d1 (Bind Abst) +t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop +(S n0) O c0 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c0 +(CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) +(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (n1: +nat).(\lambda (d1: C).(\lambda (t: T).(\lambda (H1: (drop (S n0) O (CSort n1) +(CHead d1 (Bind Abst) t))).(and3_ind (eq C (CHead d1 (Bind Abst) t) (CSort +n1)) (eq nat (S n0) O) (eq nat O O) (or (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) +(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t))))) (\lambda (_: (eq C (CHead d1 (Bind Abst) t) (CSort +n1))).(\lambda (H3: (eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 +\def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee with [O \Rightarrow +False | (S _) \Rightarrow True])) I O H3) in (False_ind (or (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 +(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda +(d2: C).(\lambda (u: T).(ty3 g d2 u t))))) H5))))) (drop_gen_sort n1 (S n0) O +(CHead d1 (Bind Abst) t) H1)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda +(H1: (csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (t: T).((drop +(S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) +(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g +d2 u t)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: +T).(\forall (d1: C).(\forall (t: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 +(Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u0: T).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0)))) (\lambda +(_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: +T).(ty3 g d2 u0 t)))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: +C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead +d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g +d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind b) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O +(CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda +(u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 +t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +(S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: +C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 +g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: +(drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) +(CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: +T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) +(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) +O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Bind b) +n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda (H4: (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda +(u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 +t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) +(\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) +(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda +(u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) +t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind +Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: +C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H5: (csubt g d1 x0)).(\lambda (H6: (drop n0 O c3 (CHead x0 (Bind +Abbr) x1))).(\lambda (H7: (ty3 g d1 x1 t)).(\lambda (H8: (ty3 g x0 x1 +t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C +T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind +Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: +C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex4_2_intro C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +(S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: +C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 +g d2 u0 t))) x0 x1 H5 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H6 +u) H7 H8)))))))) H4)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind b) c0 (CHead d1 +(Bind Abst) t) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: +C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead +d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: +T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda +(u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 +t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S +n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda +(_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: +T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead +d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) +(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind +Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: +C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csubt +g d1 x)).(\lambda (H6: (drop (S n0) O c3 (CHead x (Bind Abst) t))).(or_introl +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O +(CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +(S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: +C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 +g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t))) x H5 +(drop_drop (Flat f) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda +(H4: (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) +(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda +(u0: T).(ty3 g d2 u0 t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 +(CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 +t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) +u) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: +T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csubt g d1 x0)).(\lambda +(H6: (drop (S n0) O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g d1 x1 +t)).(\lambda (H8: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) +(CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 +t))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex4_2_intro C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) +(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t))) (\lambda (d2: C).(\lambda +(u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Flat f) n0 c3 (CHead x0 (Bind +Abbr) x1) H6 u) H7 H8)))))))) H4)) (H2 d1 t (drop_gen_drop (Flat f) c0 (CHead +d1 (Bind Abst) t) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: +T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) +t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t)))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (t: +T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind +Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop +n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 +u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) +u2) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead +c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (H5: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop +n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O +(CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda +(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (x: C).(\lambda (H6: (csubt g d1 x)).(\lambda (H7: (drop n0 O c3 +(CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) +t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind +Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g +d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 +(Bind Abst) t))) x H6 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H7 +u2)))))) H5)) (\lambda (H5: (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 +(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda +(d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex4_2_ind C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop +n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 +u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) +u2) (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead +c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (csubt g d1 x0)).(\lambda +(H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g d1 x1 +t)).(\lambda (H9: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) +(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex4_2_intro C T (\lambda +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: +T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda +(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 +g d2 u t))) x0 x1 H6 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H7 +u2) H8 H9)))))))) H5)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind Void) c0 (CHead +d1 (Bind Abst) t) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: +C).(\lambda (H1: (csubt g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: +T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) +t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t)))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: +(ty3 g c0 u t)).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (t0: +T).(\lambda (H5: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind +Abst) t0))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop n0 O c3 (CHead d2 (Bind Abst) t0)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g +d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (or (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +(S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: +C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 +g d2 u0 t0))))) (\lambda (H6: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0))))).(ex2_ind C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 +(Bind Abst) t0))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) +(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind +Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda +(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (x: C).(\lambda (H7: +(csubt g d1 x)).(\lambda (H8: (drop n0 O c3 (CHead x (Bind Abst) +t0))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) +(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind +Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda +(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex_intro2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) +(CHead d2 (Bind Abst) t0))) x H7 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind +Abst) t0) H8 u)))))) H6)) (\lambda (H6: (ex4_2 C T (\lambda (d2: C).(\lambda +(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 +(CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 +t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))).(ex4_2_ind C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda +(u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 +t0))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S +n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) +(\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda +(u0: T).(ty3 g d2 u0 t0))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H7: +(csubt g d1 x0)).(\lambda (H8: (drop n0 O c3 (CHead x0 (Bind Abbr) +x1))).(\lambda (H9: (ty3 g d1 x1 t0)).(\lambda (H10: (ty3 g x0 x1 +t0)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) +(ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind +Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda +(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex4_2_intro C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop +(S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (_: +C).(\lambda (u0: T).(ty3 g d1 u0 t0))) (\lambda (d2: C).(\lambda (u0: T).(ty3 +g d2 u0 t0))) x0 x1 H7 (drop_drop (Bind Abbr) n0 c3 (CHead x0 (Bind Abbr) x1) +H8 u) H9 H10)))))))) H6)) (H c0 c3 H1 d1 t0 (drop_gen_drop (Bind Abst) c0 +(CHead d1 (Bind Abst) t0) t n0 H5)))))))))))))) c1 c2 H0)))))) n)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/fwd.ma new file mode 100644 index 000000000..e3f35298d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/fwd.ma @@ -0,0 +1,386 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/defs.ma". + +implied rec lemma csubt_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (n: +nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubt +g c1 c2) \to ((P c1 c2) \to (\forall (k: K).(\forall (u: T).(P (CHead c1 k u) +(CHead c2 k u))))))))) (f1: (\forall (c1: C).(\forall (c2: C).((csubt g c1 +c2) \to ((P c1 c2) \to (\forall (b: B).((not (eq B b Void)) \to (\forall (u1: +T).(\forall (u2: T).(P (CHead c1 (Bind Void) u1) (CHead c2 (Bind b) +u2))))))))))) (f2: (\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to ((P +c1 c2) \to (\forall (u: T).(\forall (t: T).((ty3 g c1 u t) \to ((ty3 g c2 u +t) \to (P (CHead c1 (Bind Abst) t) (CHead c2 (Bind Abbr) u))))))))))) (c: C) +(c0: C) (c1: csubt g c c0) on c1: P c c0 \def match c1 with [(csubt_sort n) +\Rightarrow (f n) | (csubt_head c2 c3 c4 k u) \Rightarrow (f0 c2 c3 c4 +((csubt_ind g P f f0 f1 f2) c2 c3 c4) k u) | (csubt_void c2 c3 c4 b n u1 u2) +\Rightarrow (f1 c2 c3 c4 ((csubt_ind g P f f0 f1 f2) c2 c3 c4) b n u1 u2) | +(csubt_abst c2 c3 c4 u t t0 t1) \Rightarrow (f2 c2 c3 c4 ((csubt_ind g P f f0 +f1 f2) c2 c3 c4) u t t0 t1)]. + +lemma csubt_gen_abbr: + \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).((csubt g +(CHead e1 (Bind Abbr) v) c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 +(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))))))) +\def + \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda +(H: (csubt g (CHead e1 (Bind Abbr) v) c2)).(insert_eq C (CHead e1 (Bind Abbr) +v) (\lambda (c: C).(csubt g c c2)) (\lambda (_: C).(ex2 C (\lambda (e2: +C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2)))) +(\lambda (y: C).(\lambda (H0: (csubt g y c2)).(csubt_ind g (\lambda (c: +C).(\lambda (c0: C).((eq C c (CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda +(e2: C).(eq C c0 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 +e2)))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead e1 (Bind +Abbr) v))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 +(Bind Abbr) v) H1) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CSort n) +(CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))) H2)))) (\lambda +(c1: C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C +c1 (CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 +(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (k: +K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) (CHead e1 (Bind Abbr) +v))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 +(Bind Abbr) v) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e +with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k +u) (CHead e1 (Bind Abbr) v) H3) in ((let H6 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) +(CHead c1 k u) (CHead e1 (Bind Abbr) v) H3) in (\lambda (H7: (eq K k (Bind +Abbr))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v (\lambda (t: T).(ex2 C +(\lambda (e2: C).(eq C (CHead c3 k t) (CHead e2 (Bind Abbr) v))) (\lambda +(e2: C).(csubt g e1 e2)))) (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 C +(\lambda (e2: C).(eq C (CHead c3 k0 v) (CHead e2 (Bind Abbr) v))) (\lambda +(e2: C).(csubt g e1 e2)))) (let H9 \def (eq_ind C c1 (\lambda (c: C).((eq C c +(CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 +(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))))) H2 e1 H8) in (let H10 +\def (eq_ind C c1 (\lambda (c: C).(csubt g c c3)) H1 e1 H8) in (ex_intro2 C +(\lambda (e2: C).(eq C (CHead c3 (Bind Abbr) v) (CHead e2 (Bind Abbr) v))) +(\lambda (e2: C).(csubt g e1 e2)) c3 (refl_equal C (CHead c3 (Bind Abbr) v)) +H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c3: +C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 (CHead e1 (Bind +Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Bind Abbr) v))) +(\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (b: B).(\lambda (_: (not (eq B +b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 +(Bind Void) u1) (CHead e1 (Bind Abbr) v))).(let H5 \def (eq_ind C (CHead c1 +(Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False +| (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match b0 +with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow +True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) v) H4) in +(False_ind (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind b) u2) (CHead e2 +(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2))) H5))))))))))) (\lambda +(c1: C).(\lambda (c3: C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C +c1 (CHead e1 (Bind Abbr) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 +(Bind Abbr) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (u: +T).(\lambda (t: T).(\lambda (_: (ty3 g c1 u t)).(\lambda (_: (ty3 g c3 u +t)).(\lambda (H5: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abbr) +v))).(let H6 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (ee: C).(match +ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k +with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst +\Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) +I (CHead e1 (Bind Abbr) v) H5) in (False_ind (ex2 C (\lambda (e2: C).(eq C +(CHead c3 (Bind Abbr) u) (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csubt g +e1 e2))) H6))))))))))) y c2 H0))) H))))). + +lemma csubt_gen_abst: + \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csubt g +(CHead e1 (Bind Abst) v1) c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead +e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda +(e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: +C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g +e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))))) +\def + \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda +(H: (csubt g (CHead e1 (Bind Abst) v1) c2)).(insert_eq C (CHead e1 (Bind +Abst) v1) (\lambda (c: C).(csubt g c c2)) (\lambda (_: C).(or (ex2 C (\lambda +(e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 +e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind +Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: +C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 +g e2 v2 v1)))))) (\lambda (y: C).(\lambda (H0: (csubt g y c2)).(csubt_ind g +(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind Abst) v1)) \to (or +(ex2 C (\lambda (e2: C).(eq C c0 (CHead e2 (Bind Abst) v1))) (\lambda (e2: +C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c0 +(CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 +e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: +C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) (\lambda (n: nat).(\lambda (H1: +(eq C (CSort n) (CHead e1 (Bind Abst) v1))).(let H2 \def (eq_ind C (CSort n) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead e1 (Bind Abst) v1) H1) in (False_ind (or (ex2 C +(\lambda (e2: C).(eq C (CSort n) (CHead e2 (Bind Abst) v1))) (\lambda (e2: +C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C +(CSort n) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: +T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) +(\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))) H2)))) (\lambda (c1: +C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 +(CHead e1 (Bind Abst) v1)) \to (or (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 +(Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: +C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: +C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g +e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 +v1)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) +(CHead e1 (Bind Abst) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match +e with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k +u) (CHead e1 (Bind Abst) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: +C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) +(CHead c1 k u) (CHead e1 (Bind Abst) v1) H3) in ((let H6 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) +\Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H3) in (\lambda +(H7: (eq K k (Bind Abst))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v1 +(\lambda (t: T).(or (ex2 C (\lambda (e2: C).(eq C (CHead c3 k t) (CHead e2 +(Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: +C).(\lambda (v2: T).(eq C (CHead c3 k t) (CHead e2 (Bind Abbr) v2)))) +(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda +(v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 +v1)))))) (eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex2 C (\lambda (e2: +C).(eq C (CHead c3 k0 v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt +g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 k0 +v1) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 +e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: +C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))) (let H9 \def (eq_ind C c1 (\lambda +(c: C).((eq C c (CHead e1 (Bind Abst) v1)) \to (or (ex2 C (\lambda (e2: +C).(eq C c3 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) +(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind Abbr) +v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: +C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 +g e2 v2 v1))))))) H2 e1 H8) in (let H10 \def (eq_ind C c1 (\lambda (c: +C).(csubt g c c3)) H1 e1 H8) in (or_introl (ex2 C (\lambda (e2: C).(eq C +(CHead c3 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt +g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 (Bind +Abst) v1) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: +T).(csubt g e1 e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) +(\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex_intro2 C (\lambda +(e2: C).(eq C (CHead c3 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda +(e2: C).(csubt g e1 e2)) c3 (refl_equal C (CHead c3 (Bind Abst) v1)) H10)))) +k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda +(_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 (CHead e1 (Bind Abst) v1)) \to +(or (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Bind Abst) v1))) (\lambda +(e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C +c3 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 +e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: +C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))).(\lambda (b: B).(\lambda (_: (not +(eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead +c1 (Bind Void) u1) (CHead e1 (Bind Abst) v1))).(let H5 \def (eq_ind C (CHead +c1 (Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow +False | (CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow (match +b0 with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow +True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abst) v1) H4) in +(False_ind (or (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind b) u2) (CHead e2 +(Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T (\lambda (e2: +C).(\lambda (v2: T).(eq C (CHead c3 (Bind b) u2) (CHead e2 (Bind Abbr) v2)))) +(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda +(v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 +v1))))) H5))))))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csubt +g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind Abst) v1)) \to (or (ex2 C +(\lambda (e2: C).(eq C c3 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt +g e1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 +(Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) +(\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda +(v2: T).(ty3 g e2 v2 v1)))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: +(ty3 g c1 u t)).(\lambda (H4: (ty3 g c3 u t)).(\lambda (H5: (eq C (CHead c1 +(Bind Abst) t) (CHead e1 (Bind Abst) v1))).(let H6 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow +c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H5) in ((let H7 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow t | (CHead +_ _ t0) \Rightarrow t0])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) +H5) in (\lambda (H8: (eq C c1 e1)).(let H9 \def (eq_ind T t (\lambda (t0: +T).(ty3 g c3 u t0)) H4 v1 H7) in (let H10 \def (eq_ind T t (\lambda (t0: +T).(ty3 g c1 u t0)) H3 v1 H7) in (let H11 \def (eq_ind C c1 (\lambda (c: +C).(ty3 g c u v1)) H10 e1 H8) in (let H12 \def (eq_ind C c1 (\lambda (c: +C).((eq C c (CHead e1 (Bind Abst) v1)) \to (or (ex2 C (\lambda (e2: C).(eq C +c3 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) (ex4_2 C T +(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind Abbr) v2)))) +(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: C).(\lambda +(v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 +v1))))))) H2 e1 H8) in (let H13 \def (eq_ind C c1 (\lambda (c: C).(csubt g c +c3)) H1 e1 H8) in (or_intror (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind +Abbr) u) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csubt g e1 e2))) +(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) +(CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 +e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: +C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex4_2_intro C T (\lambda (e2: +C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) (CHead e2 (Bind Abbr) +v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (_: +C).(\lambda (v2: T).(ty3 g e1 v2 v1))) (\lambda (e2: C).(\lambda (v2: T).(ty3 +g e2 v2 v1))) c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H13 H11 +H9))))))))) H6))))))))))) y c2 H0))) H))))). + +lemma csubt_gen_flat: + \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).(\forall +(f: F).((csubt g (CHead e1 (Flat f) v) c2) \to (ex2 C (\lambda (e2: C).(eq C +c2 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))))))) +\def + \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda +(f: F).(\lambda (H: (csubt g (CHead e1 (Flat f) v) c2)).(insert_eq C (CHead +e1 (Flat f) v) (\lambda (c: C).(csubt g c c2)) (\lambda (_: C).(ex2 C +(\lambda (e2: C).(eq C c2 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g +e1 e2)))) (\lambda (y: C).(\lambda (H0: (csubt g y c2)).(csubt_ind g (\lambda +(c: C).(\lambda (c0: C).((eq C c (CHead e1 (Flat f) v)) \to (ex2 C (\lambda +(e2: C).(eq C c0 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 +e2)))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead e1 (Flat f) +v))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee with [(CSort +_) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Flat f) +v) H1) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CSort n) (CHead e2 (Flat +f) v))) (\lambda (e2: C).(csubt g e1 e2))) H2)))) (\lambda (c1: C).(\lambda +(c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 +(Flat f) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Flat f) v))) +(\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (k: K).(\lambda (u: +T).(\lambda (H3: (eq C (CHead c1 k u) (CHead e1 (Flat f) v))).(let H4 \def +(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead +c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Flat f) v) H3) in ((let H5 +\def (f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow k | +(CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) (CHead e1 (Flat f) v) H3) in +((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Flat +f) v) H3) in (\lambda (H7: (eq K k (Flat f))).(\lambda (H8: (eq C c1 +e1)).(eq_ind_r T v (\lambda (t: T).(ex2 C (\lambda (e2: C).(eq C (CHead c3 k +t) (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))) (eq_ind_r K +(Flat f) (\lambda (k0: K).(ex2 C (\lambda (e2: C).(eq C (CHead c3 k0 v) +(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))) (let H9 \def +(eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Flat f) v)) \to (ex2 C +(\lambda (e2: C).(eq C c3 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g +e1 e2))))) H2 e1 H8) in (let H10 \def (eq_ind C c1 (\lambda (c: C).(csubt g c +c3)) H1 e1 H8) in (ex_intro2 C (\lambda (e2: C).(eq C (CHead c3 (Flat f) v) +(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)) c3 (refl_equal C +(CHead c3 (Flat f) v)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: +C).(\lambda (c3: C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 +(CHead e1 (Flat f) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Flat +f) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (b: B).(\lambda (_: +(not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C +(CHead c1 (Bind Void) u1) (CHead e1 (Flat f) v))).(let H5 \def (eq_ind C +(CHead c1 (Bind Void) u1) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e1 (Flat f) v) +H4) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind b) u2) (CHead +e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2))) H5))))))))))) (\lambda +(c1: C).(\lambda (c3: C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C +c1 (CHead e1 (Flat f) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 +(Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))))).(\lambda (u: T).(\lambda +(t: T).(\lambda (_: (ty3 g c1 u t)).(\lambda (_: (ty3 g c3 u t)).(\lambda +(H5: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Flat f) v))).(let H6 \def +(eq_ind C (CHead c1 (Bind Abst) t) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e1 (Flat f) v) +H5) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind Abbr) u) +(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2))) H6))))))))))) y c2 +H0))) H)))))). + +lemma csubt_gen_bind: + \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall +(v1: T).((csubt g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2)))))))))) +\def + \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda +(v1: T).(\lambda (H: (csubt g (CHead e1 (Bind b1) v1) c2)).(insert_eq C +(CHead e1 (Bind b1) v1) (\lambda (c: C).(csubt g c c2)) (\lambda (_: +C).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 +(CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: +T).(csubt g e1 e2)))))) (\lambda (y: C).(\lambda (H0: (csubt g y +c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind +b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C c0 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csubt g e1 e2)))))))) (\lambda (n: nat).(\lambda (H1: (eq +C (CSort n) (CHead e1 (Bind b1) v1))).(let H2 \def (eq_ind C (CSort n) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead e1 (Bind b1) v1) H1) in (False_ind (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CSort n) (CHead e2 +(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g +e1 e2))))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 +c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T +(\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 +e2)))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k u) +(CHead e1 (Bind b1) v1))).(let H4 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k +u) (CHead e1 (Bind b1) v1) H3) in ((let H5 \def (f_equal C K (\lambda (e: +C).(match e with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) +(CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) +\Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H3) in (\lambda (H7: +(eq K k (Bind b1))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v1 (\lambda (t: +T).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c3 k t) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csubt g e1 e2)))))) (eq_ind_r K (Bind b1) (\lambda (k0: +K).(ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c3 k0 v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csubt g e1 e2)))))) (let H9 \def (eq_ind C c1 (\lambda +(c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))))))) H2 e1 +H8) in (let H10 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c3)) H1 e1 H8) +in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq +C (CHead c3 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2)))) b1 c3 v1 (refl_equal C +(CHead c3 (Bind b1) v1)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: +C).(\lambda (c3: C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 +(CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2)))))))).(\lambda (b: +B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H4: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) +v1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1) +(CHead e1 (Bind b1) v1) H4) in ((let H6 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Void | (CHead _ k _) \Rightarrow +(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Void])])) +(CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) in ((let H7 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead +_ _ t) \Rightarrow t])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H4) +in (\lambda (H8: (eq B Void b1)).(\lambda (H9: (eq C c1 e1)).(let H10 \def +(eq_ind C c1 (\lambda (c: C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C +T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind +b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 +e2))))))) H2 e1 H9) in (let H11 \def (eq_ind C c1 (\lambda (c: C).(csubt g c +c3)) H1 e1 H9) in (let H12 \def (eq_ind_r B b1 (\lambda (b0: B).((eq C e1 +(CHead e1 (Bind b0) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: +C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))))))) H10 Void H8) in +(ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C +(CHead c3 (Bind b) u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda +(e2: C).(\lambda (_: T).(csubt g e1 e2)))) b c3 u2 (refl_equal C (CHead c3 +(Bind b) u2)) H11))))))) H6)) H5))))))))))) (\lambda (c1: C).(\lambda (c3: +C).(\lambda (H1: (csubt g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Bind +b1) v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csubt g e1 e2)))))))).(\lambda (u: T).(\lambda (t: +T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (H4: (ty3 g c3 u t)).(\lambda (H5: +(eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1))).(let H6 \def +(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead +c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) +in ((let H7 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead c1 (Bind Abst) t) +(CHead e1 (Bind b1) v1) H5) in ((let H8 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t0) \Rightarrow t0])) +(CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H5) in (\lambda (H9: (eq B +Abst b1)).(\lambda (H10: (eq C c1 e1)).(let H11 \def (eq_ind T t (\lambda +(t0: T).(ty3 g c3 u t0)) H4 v1 H8) in (let H12 \def (eq_ind T t (\lambda (t0: +T).(ty3 g c1 u t0)) H3 v1 H8) in (let H13 \def (eq_ind C c1 (\lambda (c: +C).(ty3 g c u v1)) H12 e1 H10) in (let H14 \def (eq_ind C c1 (\lambda (c: +C).((eq C c (CHead e1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C c3 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))))))) H2 e1 +H10) in (let H15 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c3)) H1 e1 H10) +in (let H16 \def (eq_ind_r B b1 (\lambda (b: B).((eq C e1 (CHead e1 (Bind b) +v1)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq +C c3 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda +(_: T).(csubt g e1 e2))))))) H14 Abst H9) in (ex2_3_intro B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c3 (Bind Abbr) u) (CHead e2 +(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csubt g +e1 e2)))) Abbr c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H15)))))))))) +H7)) H6))))))))))) y c2 H0))) H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/getl.ma new file mode 100644 index 000000000..14060308e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/getl.ma @@ -0,0 +1,417 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/clear.ma". + +include "basic_1A/csubt/drop.ma". + +include "basic_1A/getl/clear.ma". + +lemma csubt_getl_abbr: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall +(n: nat).((getl n c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g +c1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n +c2 (CHead d2 (Bind Abbr) u))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda +(n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abbr) u))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abbr) u) n H) in (ex2_ind C (\lambda (e: +C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) +(\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))) (\lambda (x: +C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind +Abbr) u))).(C_ind (\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 +(Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +u))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 (CSort n0))).(\lambda +(H4: (clear (CSort n0) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 +(Bind Abbr) u) n0 H4 (\forall (c2: C).((csubt g c1 c2) \to (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +u)))))))))) (\lambda (x0: C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 c2) \to (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind +Abbr) u)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: (drop n O c1 +(CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 (Bind Abbr) +u))).(K_ind (\lambda (k0: K).((drop n O c1 (CHead x0 k0 t)) \to ((clear +(CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csubt g c1 +c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 +(CHead d2 (Bind Abbr) u))))))))) (\lambda (b: B).(\lambda (H5: (drop n O c1 +(CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 +(Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind +Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) +t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) +(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in +((let H9 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind Abbr) u) +(CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in +(\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: +C).(\lambda (H12: (csubt g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: +T).(drop n O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def (eq_ind_r +B b (\lambda (b0: B).(drop n O c1 (CHead x0 (Bind b0) u))) H13 Abbr H10) in +(let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop n O c1 (CHead c (Bind +Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (x1: C).(\lambda (H16: (csubt g d1 x1)).(\lambda (H17: (drop n O c2 +(CHead x1 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) x1 H16 (getl_intro n +c2 (CHead x1 (Bind Abbr) u) (CHead x1 (Bind Abbr) u) H17 (clear_bind Abbr x1 +u)))))) (csubt_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) H8)) H7))))) +(\lambda (f: F).(\lambda (H5: (drop n O c1 (CHead x0 (Flat f) t))).(\lambda +(H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 +in (unintro C c1 (\lambda (c: C).((drop n O c (CHead x0 (Flat f) t)) \to +(\forall (c2: C).((csubt g c c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))) (nat_ind (\lambda +(n0: nat).(\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall +(c2: C).((csubt g x1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (x1: +C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H9: (csubt g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: +C).(csubt g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat +f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abbr) u) +(clear_gen_flat f x0 (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def +(csubt_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) +H_y) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead d1 (Bind Abbr) u) e2)) +(\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: +C).(\lambda (H12: (csubt g (CHead d1 (Bind Abbr) u) x2)).(\lambda (H13: +(clear c2 x2)).(let H14 \def (csubt_gen_abbr g d1 x2 u H12) in (ex2_ind C +(\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csubt +g d1 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x3: C).(\lambda (H15: (eq C x2 +(CHead x3 (Bind Abbr) u))).(\lambda (H16: (csubt g d1 x3)).(let H17 \def +(eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) u) H15) +in (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 +(CHead d2 (Bind Abbr) u))) x3 H16 (getl_intro O c2 (CHead x3 (Bind Abbr) u) +c2 (drop_refl c2) H17)))))) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda +(H8: ((\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall +(c2: C).((csubt g x1 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda (x1: +C).(\lambda (H9: (drop (S n0) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H10: (csubt g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 +(Flat f) t) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: +C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: +B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead x0 (Flat f) t))))) +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 +(CHead d2 (Bind Abbr) u)))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: +T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 +O x3 (CHead x0 (Flat f) t))).(let H14 \def (csubt_clear_conf g x1 c2 H10 +(CHead x3 (Bind x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead +x3 (Bind x2) x4) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (x5: C).(\lambda (H15: (csubt g (CHead x3 (Bind x2) x4) +x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def (csubt_gen_bind g x2 x3 x5 +x4 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csubt g x3 e2)))) (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda +(x6: B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 +(Bind x6) x8))).(\lambda (H19: (csubt g x3 x7)).(let H20 \def (eq_ind C x5 +(\lambda (c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 +\def (H8 x3 H13 x7 H19) in (ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (x9: C).(\lambda (H22: (csubt g d1 x9)).(\lambda (H23: (getl +n0 x7 (CHead x9 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u))) x9 H22 +(getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) u) n0 H23))))) +H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))) k H3 H4))))))) x H1 +H2)))) H0))))))). + +lemma csubt_getl_abst: + \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (t: T).(\forall +(n: nat).((getl n c1 (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g +c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (t: T).(\lambda +(n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abst) t))).(let H0 \def +(getl_gen_all c1 (CHead d1 (Bind Abst) t) n H) in (ex2_ind C (\lambda (e: +C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) t))) +(\forall (c2: C).((csubt g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))) +(\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead +d1 (Bind Abst) t))).(C_ind (\lambda (c: C).((drop n O c1 c) \to ((clear c +(CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g c1 c2) \to (or (ex2 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t)))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 +(CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abst) +t))).(clear_gen_sort (CHead d1 (Bind Abst) t) n0 H4 (\forall (c2: C).((csubt +g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))) (\lambda (x0: +C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 (CHead d1 (Bind Abst) t)) +\to (\forall (c2: C).((csubt g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u +t))))))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (H3: (drop n O c1 +(CHead x0 k t0))).(\lambda (H4: (clear (CHead x0 k t0) (CHead d1 (Bind Abst) +t))).(K_ind (\lambda (k0: K).((drop n O c1 (CHead x0 k0 t0)) \to ((clear +(CHead x0 k0 t0) (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csubt g c1 +c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n +c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 +(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda +(d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (b: B).(\lambda (H5: +(drop n O c1 (CHead x0 (Bind b) t0))).(\lambda (H6: (clear (CHead x0 (Bind b) +t0) (CHead d1 (Bind Abst) t))).(let H7 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) +(CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead +d1 (Bind Abst) t) t0 H6)) in ((let H8 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k0 _) \Rightarrow +(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) +(CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead +d1 (Bind Abst) t) t0 H6)) in ((let H9 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow t | (CHead _ _ t1) \Rightarrow t1])) +(CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead +d1 (Bind Abst) t) t0 H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq +C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csubt g c1 c2)).(let H13 \def +(eq_ind_r T t0 (\lambda (t1: T).(drop n O c1 (CHead x0 (Bind b) t1))) H5 t +H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead x0 +(Bind b0) t))) H13 Abst H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: +C).(drop n O c1 (CHead c (Bind Abst) t))) H14 d1 H11) in (or_ind (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (H16: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop n O c2 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))) +(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 +(CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 +(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda +(d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: C).(\lambda (H17: +(csubt g d1 x1)).(\lambda (H18: (drop n O c2 (CHead x1 (Bind Abst) +t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) +t))) x1 H17 (getl_intro n c2 (CHead x1 (Bind Abst) t) (CHead x1 (Bind Abst) +t) H18 (clear_bind Abst x1 t))))))) H16)) (\lambda (H16: (ex4_2 C T (\lambda +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: +T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u +t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) +(\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: +C).(\lambda (x2: T).(\lambda (H17: (csubt g d1 x1)).(\lambda (H18: (drop n O +c2 (CHead x1 (Bind Abbr) x2))).(\lambda (H19: (ty3 g d1 x2 t)).(\lambda (H20: +(ty3 g x1 x2 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex4_2_intro C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x1 x2 +H17 (getl_intro n c2 (CHead x1 (Bind Abbr) x2) (CHead x1 (Bind Abbr) x2) H18 +(clear_bind Abbr x1 x2)) H19 H20)))))))) H16)) (csubt_drop_abst g n c1 c2 H12 +d1 t H15)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop n O c1 +(CHead x0 (Flat f) t0))).(\lambda (H6: (clear (CHead x0 (Flat f) t0) (CHead +d1 (Bind Abst) t))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop n +O c (CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csubt g c c2) \to (or (ex2 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t))))))))) (nat_ind (\lambda (n0: nat).(\forall (x1: +C).((drop n0 O x1 (CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csubt g x1 +c2) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl +n0 c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 +(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda +(d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (x1: C).(\lambda +(H8: (drop O O x1 (CHead x0 (Flat f) t0))).(\lambda (c2: C).(\lambda (H9: +(csubt g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: C).(csubt g c c2)) +H9 (CHead x0 (Flat f) t0) (drop_gen_refl x1 (CHead x0 (Flat f) t0) H8)) in +(let H_y \def (clear_flat x0 (CHead d1 (Bind Abst) t) (clear_gen_flat f x0 +(CHead d1 (Bind Abst) t) t0 H6) f t0) in (let H11 \def (csubt_clear_conf g +(CHead x0 (Flat f) t0) c2 H10 (CHead d1 (Bind Abst) t) H_y) in (ex2_ind C +(\lambda (e2: C).(csubt g (CHead d1 (Bind Abst) t) e2)) (\lambda (e2: +C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u +t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: +C).(\lambda (H12: (csubt g (CHead d1 (Bind Abst) t) x2)).(\lambda (H13: +(clear c2 x2)).(let H14 \def (csubt_gen_abst g d1 x2 t H12) in (or_ind (ex2 C +(\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt +g d1 e2))) (ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 +(Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) +(\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda +(v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: +T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (H15: (ex2 C (\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) +(\lambda (e2: C).(csubt g d1 e2)))).(ex2_ind C (\lambda (e2: C).(eq C x2 +(CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2)) (or (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind +Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) +(\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead x3 +(Bind Abst) t))).(\lambda (H17: (csubt g d1 x3)).(let H18 \def (eq_ind C x2 +(\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) t) H16) in (or_introl +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead +d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t))) x3 H17 (getl_intro O +c2 (CHead x3 (Bind Abst) t) c2 (drop_refl c2) H18))))))) H15)) (\lambda (H15: +(ex4_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 (Bind Abbr) +v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (_: +C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: C).(\lambda (v2: T).(ty3 +g e2 v2 t))))).(ex4_2_ind C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 +(CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g d1 +e2))) (\lambda (_: C).(\lambda (v2: T).(ty3 g d1 v2 t))) (\lambda (e2: +C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C x2 (CHead x3 (Bind +Abbr) x4))).(\lambda (H17: (csubt g d1 x3)).(\lambda (H18: (ty3 g d1 x4 +t)).(\lambda (H19: (ty3 g x3 x4 t)).(let H20 \def (eq_ind C x2 (\lambda (c: +C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) x4) H16) in (or_intror (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind +Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) +(\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t)))) (ex4_2_intro C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 +(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda +(d2: C).(\lambda (u: T).(ty3 g d2 u t))) x3 x4 H17 (getl_intro O c2 (CHead x3 +(Bind Abbr) x4) c2 (drop_refl c2) H20) H18 H19))))))))) H15)) H14))))) +H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x1: C).((drop n0 O x1 +(CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csubt g x1 c2) \to (or (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 +(Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t))))))))))).(\lambda (x1: C).(\lambda (H9: +(drop (S n0) O x1 (CHead x0 (Flat f) t0))).(\lambda (c2: C).(\lambda (H10: +(csubt g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t0) n0 H9) +in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 +(CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: +T).(drop n0 O e (CHead x0 (Flat f) t0))))) (or (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 +C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g +d2 u t))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: +(clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 O x3 (CHead x0 +(Flat f) t0))).(let H14 \def (csubt_clear_conf g x1 c2 H10 (CHead x3 (Bind +x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csubt g (CHead x3 (Bind x2) x4) +e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda +(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (x5: C).(\lambda (H15: (csubt g (CHead x3 (Bind x2) x4) +x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def (csubt_gen_bind g x2 x3 x5 +x4 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csubt g x3 e2)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda +(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (x6: B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 +(CHead x7 (Bind x6) x8))).(\lambda (H19: (csubt g x3 x7)).(let H20 \def +(eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) +in (let H21 \def (H8 x3 H13 x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: +T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 +(CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead +d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) +(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H22: (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 +(Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(getl n0 x7 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 +C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g +d2 u t))))) (\lambda (x9: C).(\lambda (H23: (csubt g d1 x9)).(\lambda (H24: +(getl n0 x7 (CHead x9 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) +t)))) (ex4_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda +(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 +g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(getl (S n0) c2 (CHead d2 (Bind Abst) t))) x9 H23 (getl_clear_bind x6 c2 +x7 x8 H20 (CHead x9 (Bind Abst) t) n0 H24)))))) H22)) (\lambda (H22: (ex4_2 C +T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g +d2 u t))))).(ex4_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) +(\lambda (d2: C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl +(S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(ty3 g +d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x9: +C).(\lambda (x10: T).(\lambda (H23: (csubt g d1 x9)).(\lambda (H24: (getl n0 +x7 (CHead x9 (Bind Abbr) x10))).(\lambda (H25: (ty3 g d1 x10 t)).(\lambda +(H26: (ty3 g x9 x10 t)).(or_intror (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex4_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (_: C).(\lambda +(u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) +(ex4_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda +(_: C).(\lambda (u: T).(ty3 g d1 u t))) (\lambda (d2: C).(\lambda (u: T).(ty3 +g d2 u t))) x9 x10 H23 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) +x10) n0 H24) H25 H26)))))))) H22)) H21)))))))) H17))))) H14))))))) +H11)))))))) n) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/pc3.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/pc3.ma new file mode 100644 index 000000000..ee965e4c6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/pc3.ma @@ -0,0 +1,56 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/getl.ma". + +include "basic_1A/pc3/left.ma". + +lemma csubt_pr2: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 +t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (pr2 c2 t1 t2))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pr2 c1 t1 t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0: +T).(\forall (c2: C).((csubt g c c2) \to (pr2 c2 t t0)))))) (\lambda (c: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (c2: +C).(\lambda (_: (csubt g c c2)).(pr2_free c2 t3 t4 H0))))))) (\lambda (c: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c +(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: +(pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c2: +C).(\lambda (H3: (csubt g c c2)).(let H4 \def (csubt_getl_abbr g c d u i H0 +c2 H3) in (ex2_ind C (\lambda (d2: C).(csubt g d d2)) (\lambda (d2: C).(getl +i c2 (CHead d2 (Bind Abbr) u))) (pr2 c2 t3 t) (\lambda (x: C).(\lambda (_: +(csubt g d x)).(\lambda (H6: (getl i c2 (CHead x (Bind Abbr) u))).(pr2_delta +c2 x u i H6 t3 t4 H1 t H2)))) H4)))))))))))))) c1 t1 t2 H))))). + +lemma csubt_pc3: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1 +t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (pc3 c2 t1 t2))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pc3 c1 t1 t2)).(pc3_ind_left c1 (\lambda (t: T).(\lambda (t0: +T).(\forall (c2: C).((csubt g c1 c2) \to (pc3 c2 t t0))))) (\lambda (t: +T).(\lambda (c2: C).(\lambda (_: (csubt g c1 c2)).(pc3_refl c2 t)))) (\lambda +(t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c1 t0 t3)).(\lambda (t4: +T).(\lambda (_: (pc3 c1 t3 t4)).(\lambda (H2: ((\forall (c2: C).((csubt g c1 +c2) \to (pc3 c2 t3 t4))))).(\lambda (c2: C).(\lambda (H3: (csubt g c1 +c2)).(pc3_t t3 c2 t0 (pc3_pr2_r c2 t0 t3 (csubt_pr2 g c1 t0 t3 H0 c2 H3)) t4 +(H2 c2 H3)))))))))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c1 +t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3 c1 t0 t4)).(\lambda (H2: ((\forall +(c2: C).((csubt g c1 c2) \to (pc3 c2 t0 t4))))).(\lambda (c2: C).(\lambda +(H3: (csubt g c1 c2)).(pc3_t t0 c2 t3 (pc3_pr2_x c2 t3 t0 (csubt_pr2 g c1 t0 +t3 H0 c2 H3)) t4 (H2 c2 H3)))))))))) t1 t2 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/props.ma new file mode 100644 index 000000000..c129b355a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/props.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/defs.ma". + +include "basic_1A/C/fwd.ma". + +lemma csubt_refl: + \forall (g: G).(\forall (c: C).(csubt g c c)) +\def + \lambda (g: G).(\lambda (c: C).(C_ind (\lambda (c0: C).(csubt g c0 c0)) +(\lambda (n: nat).(csubt_sort g n)) (\lambda (c0: C).(\lambda (H: (csubt g c0 +c0)).(\lambda (k: K).(\lambda (t: T).(csubt_head g c0 c0 H k t))))) c)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubt/ty3.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubt/ty3.ma new file mode 100644 index 000000000..e78356cb4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubt/ty3.ma @@ -0,0 +1,98 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/pc3.ma". + +include "basic_1A/csubt/props.ma". + +include "basic_1A/ty3/fwd.ma". + +lemma csubt_ty3: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 +t1 t2) \to (\forall (c2: C).((csubt g c1 c2) \to (ty3 g c2 t1 t2))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g c1 t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda +(t0: T).(\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t t0)))))) (\lambda +(c: C).(\lambda (t0: T).(\lambda (t: T).(\lambda (_: (ty3 g c t0 t)).(\lambda +(H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t0 t))))).(\lambda (u: +T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (c2: +C).((csubt g c c2) \to (ty3 g c2 u t3))))).(\lambda (H4: (pc3 c t3 +t0)).(\lambda (c2: C).(\lambda (H5: (csubt g c c2)).(ty3_conv g c2 t0 t (H1 +c2 H5) u t3 (H3 c2 H5) (csubt_pc3 g c t3 t0 H4 c2 H5)))))))))))))) (\lambda +(c: C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (csubt g c +c2)).(ty3_sort g c2 m))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda +(t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((csubt g +d c2) \to (ty3 g c2 u t))))).(\lambda (c2: C).(\lambda (H3: (csubt g c +c2)).(let H4 \def (csubt_getl_abbr g c d u n H0 c2 H3) in (ex2_ind C (\lambda +(d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +u))) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x: C).(\lambda (H5: +(csubt g d x)).(\lambda (H6: (getl n c2 (CHead x (Bind Abbr) u))).(ty3_abbr g +n c2 x u H6 t (H2 x H5))))) H4)))))))))))) (\lambda (n: nat).(\lambda (c: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind +Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: +((\forall (c2: C).((csubt g d c2) \to (ty3 g c2 u t))))).(\lambda (c2: +C).(\lambda (H3: (csubt g c c2)).(let H4 \def (csubt_getl_abst g c d u n H0 +c2 H3) in (or_ind (ex2 C (\lambda (d2: C).(csubt g d d2)) (\lambda (d2: +C).(getl n c2 (CHead d2 (Bind Abst) u)))) (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n +c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d u0 +u))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u)))) (ty3 g c2 (TLRef n) +(lift (S n) O u)) (\lambda (H5: (ex2 C (\lambda (d2: C).(csubt g d d2)) +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))))).(ex2_ind C (\lambda +(d2: C).(csubt g d d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) +u))) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x: C).(\lambda (H6: +(csubt g d x)).(\lambda (H7: (getl n c2 (CHead x (Bind Abst) u))).(ty3_abst g +n c2 x u H7 t (H2 x H6))))) H5)) (\lambda (H5: (ex4_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda (u0: T).(getl n +c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(ty3 g d u0 +u))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u))))).(ex4_2_ind C T +(\lambda (d2: C).(\lambda (_: T).(csubt g d d2))) (\lambda (d2: C).(\lambda +(u0: T).(getl n c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: +T).(ty3 g d u0 u))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 u))) (ty3 +g c2 (TLRef n) (lift (S n) O u)) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(_: (csubt g d x0)).(\lambda (H7: (getl n c2 (CHead x0 (Bind Abbr) +x1))).(\lambda (_: (ty3 g d x1 u)).(\lambda (H9: (ty3 g x0 x1 u)).(ty3_abbr g +n c2 x0 x1 H7 u H9))))))) H5)) H4)))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (t: T).(\lambda (_: (ty3 g c u t)).(\lambda (H1: ((\forall (c2: +C).((csubt g c c2) \to (ty3 g c2 u t))))).(\lambda (b: B).(\lambda (t0: +T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t0 t3)).(\lambda +(H3: ((\forall (c2: C).((csubt g (CHead c (Bind b) u) c2) \to (ty3 g c2 t0 +t3))))).(\lambda (c2: C).(\lambda (H4: (csubt g c c2)).(ty3_bind g c2 u t (H1 +c2 H4) b t0 t3 (H3 (CHead c2 (Bind b) u) (csubt_head g c c2 H4 (Bind b) +u))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: +(ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 +w u))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead (Bind +Abst) u t))).(\lambda (H3: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 v +(THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (csubt g c +c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c: +C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t0 t3)).(\lambda +(H1: ((\forall (c2: C).((csubt g c c2) \to (ty3 g c2 t0 t3))))).(\lambda (t4: +T).(\lambda (_: (ty3 g c t3 t4)).(\lambda (H3: ((\forall (c2: C).((csubt g c +c2) \to (ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (csubt g c +c2)).(ty3_cast g c2 t0 t3 (H1 c2 H4) t4 (H3 c2 H4)))))))))))) c1 t1 t2 H))))). + +lemma csubt_ty3_ld: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (v: T).((ty3 g c u +v) \to (\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c (Bind Abst) v) t1 +t2) \to (ty3 g (CHead c (Bind Abbr) u) t1 t2)))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (H: +(ty3 g c u v)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (ty3 g (CHead +c (Bind Abst) v) t1 t2)).(csubt_ty3 g (CHead c (Bind Abst) v) t1 t2 H0 (CHead +c (Bind Abbr) u) (csubt_abst g c c (csubt_refl g c) u v H H))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubv/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/clear.ma new file mode 100644 index 000000000..549995bff --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/clear.ma @@ -0,0 +1,179 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubv/fwd.ma". + +include "basic_1A/clear/fwd.ma". + +lemma csubv_clear_conf: + \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b1: +B).(\forall (d1: C).(\forall (v1: T).((clear c1 (CHead d1 (Bind b1) v1)) \to +(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 +d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(clear c2 (CHead d2 +(Bind b2) v2)))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(csubv_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (b1: B).(\forall (d1: C).(\forall +(v1: T).((clear c (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: +B).(\lambda (d2: C).(\lambda (v2: T).(clear c0 (CHead d2 (Bind b2) +v2)))))))))))) (\lambda (n: nat).(\lambda (b1: B).(\lambda (d1: C).(\lambda +(v1: T).(\lambda (H0: (clear (CSort n) (CHead d1 (Bind b1) +v1))).(clear_gen_sort (CHead d1 (Bind b1) v1) n H0 (ex2_3 B C T (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: +B).(\lambda (d2: C).(\lambda (v2: T).(clear (CSort n) (CHead d2 (Bind b2) +v2)))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 +c4)).(\lambda (_: ((\forall (b1: B).(\forall (d1: C).(\forall (v1: T).((clear +c3 (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: B).(\lambda (d2: +C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: +C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind b2) v2)))))))))))).(\lambda +(v1: T).(\lambda (v2: T).(\lambda (b1: B).(\lambda (d1: C).(\lambda (v0: +T).(\lambda (H2: (clear (CHead c3 (Bind Void) v1) (CHead d1 (Bind b1) +v0))).(let H3 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b1) v0) +(CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind b1) v0) v1 +H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow b1 | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow b | (Flat _) \Rightarrow b1])])) (CHead d1 (Bind b1) v0) (CHead +c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind b1) v0) v1 H2)) in +((let H5 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b1) v0) +(CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind b1) v0) v1 +H2)) in (\lambda (_: (eq B b1 Void)).(\lambda (H7: (eq C d1 c3)).(eq_ind_r C +c3 (\lambda (c: C).(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: +T).(csubv c d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear +(CHead c4 (Bind Void) v2) (CHead d2 (Bind b2) v3))))))) (ex2_3_intro B C T +(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv c3 d2)))) (\lambda +(b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Bind Void) v2) +(CHead d2 (Bind b2) v3))))) Void c4 v2 H0 (clear_bind Void c4 v2)) d1 H7)))) +H4)) H3)))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 +c4)).(\lambda (_: ((\forall (b1: B).(\forall (d1: C).(\forall (v1: T).((clear +c3 (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: B).(\lambda (d2: +C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: +C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind b2) v2)))))))))))).(\lambda +(b1: B).(\lambda (_: (not (eq B b1 Void))).(\lambda (b2: B).(\lambda (v1: +T).(\lambda (v2: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (v0: +T).(\lambda (H3: (clear (CHead c3 (Bind b1) v1) (CHead d1 (Bind b0) +v0))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b0) v0) +(CHead c3 (Bind b1) v1) (clear_gen_bind b1 c3 (CHead d1 (Bind b0) v0) v1 H3)) +in ((let H5 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow b0 | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead d1 (Bind b0) v0) (CHead +c3 (Bind b1) v1) (clear_gen_bind b1 c3 (CHead d1 (Bind b0) v0) v1 H3)) in +((let H6 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b0) v0) +(CHead c3 (Bind b1) v1) (clear_gen_bind b1 c3 (CHead d1 (Bind b0) v0) v1 H3)) +in (\lambda (_: (eq B b0 b1)).(\lambda (H8: (eq C d1 c3)).(eq_ind_r C c3 +(\lambda (c: C).(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: +T).(csubv c d2)))) (\lambda (b3: B).(\lambda (d2: C).(\lambda (v3: T).(clear +(CHead c4 (Bind b2) v2) (CHead d2 (Bind b3) v3))))))) (ex2_3_intro B C T +(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv c3 d2)))) (\lambda +(b3: B).(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Bind b2) v2) +(CHead d2 (Bind b3) v3))))) b2 c4 v2 H0 (clear_bind b2 c4 v2)) d1 H8)))) H5)) +H4))))))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubv c3 +c4)).(\lambda (H1: ((\forall (b1: B).(\forall (d1: C).(\forall (v1: +T).((clear c3 (CHead d1 (Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: +B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: +B).(\lambda (d2: C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind b2) +v2)))))))))))).(\lambda (f1: F).(\lambda (f2: F).(\lambda (v1: T).(\lambda +(v2: T).(\lambda (b1: B).(\lambda (d1: C).(\lambda (v0: T).(\lambda (H2: +(clear (CHead c3 (Flat f1) v1) (CHead d1 (Bind b1) v0))).(let H_x \def (H1 b1 +d1 v0 (clear_gen_flat f1 c3 (CHead d1 (Bind b1) v0) v1 H2)) in (let H3 \def +H_x in (ex2_3_ind B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear +c4 (CHead d2 (Bind b2) v3))))) (ex2_3 B C T (\lambda (_: B).(\lambda (d2: +C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: +C).(\lambda (v3: T).(clear (CHead c4 (Flat f2) v2) (CHead d2 (Bind b2) +v3)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H4: +(csubv d1 x1)).(\lambda (H5: (clear c4 (CHead x1 (Bind x0) x2))).(ex2_3_intro +B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) +(\lambda (b2: B).(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Flat f2) +v2) (CHead d2 (Bind b2) v3))))) x0 x1 x2 H4 (clear_flat c4 (CHead x1 (Bind +x0) x2) H5 f2 v2))))))) H3))))))))))))))) c1 c2 H))). + +lemma csubv_clear_conf_void: + \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (d1: +C).(\forall (v1: T).((clear c1 (CHead d1 (Bind Void) v1)) \to (ex2_2 C T +(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda +(v2: T).(clear c2 (CHead d2 (Bind Void) v2)))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(csubv_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (v1: T).((clear c +(CHead d1 (Bind Void) v1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear c0 (CHead d2 +(Bind Void) v2)))))))))) (\lambda (n: nat).(\lambda (d1: C).(\lambda (v1: +T).(\lambda (H0: (clear (CSort n) (CHead d1 (Bind Void) v1))).(clear_gen_sort +(CHead d1 (Bind Void) v1) n H0 (ex2_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear (CSort n) (CHead +d2 (Bind Void) v2)))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: +(csubv c3 c4)).(\lambda (_: ((\forall (d1: C).(\forall (v1: T).((clear c3 +(CHead d1 (Bind Void) v1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear c4 (CHead d2 +(Bind Void) v2)))))))))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (d1: +C).(\lambda (v0: T).(\lambda (H2: (clear (CHead c3 (Bind Void) v1) (CHead d1 +(Bind Void) v0))).(let H3 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind +Void) v0) (CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind +Void) v0) v1 H2)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e with +[(CSort _) \Rightarrow v0 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind +Void) v0) (CHead c3 (Bind Void) v1) (clear_gen_bind Void c3 (CHead d1 (Bind +Void) v0) v1 H2)) in (\lambda (H5: (eq C d1 c3)).(eq_ind_r C c3 (\lambda (c: +C).(ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv c d2))) (\lambda (d2: +C).(\lambda (v3: T).(clear (CHead c4 (Bind Void) v2) (CHead d2 (Bind Void) +v3)))))) (ex2_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubv c3 d2))) +(\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Bind Void) v2) (CHead d2 +(Bind Void) v3)))) c4 v2 H0 (clear_bind Void c4 v2)) d1 H5))) H3))))))))))) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubv c3 c4)).(\lambda (_: +((\forall (d1: C).(\forall (v1: T).((clear c3 (CHead d1 (Bind Void) v1)) \to +(ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: +C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind Void) v2)))))))))).(\lambda +(b1: B).(\lambda (H2: (not (eq B b1 Void))).(\lambda (b2: B).(\lambda (v1: +T).(\lambda (v2: T).(\lambda (d1: C).(\lambda (v0: T).(\lambda (H3: (clear +(CHead c3 (Bind b1) v1) (CHead d1 (Bind Void) v0))).(let H4 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow d1 | (CHead c _ _) +\Rightarrow c])) (CHead d1 (Bind Void) v0) (CHead c3 (Bind b1) v1) +(clear_gen_bind b1 c3 (CHead d1 (Bind Void) v0) v1 H3)) in ((let H5 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Void | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Void])])) (CHead d1 (Bind Void) v0) (CHead c3 (Bind b1) v1) +(clear_gen_bind b1 c3 (CHead d1 (Bind Void) v0) v1 H3)) in ((let H6 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v0 | (CHead +_ _ t) \Rightarrow t])) (CHead d1 (Bind Void) v0) (CHead c3 (Bind b1) v1) +(clear_gen_bind b1 c3 (CHead d1 (Bind Void) v0) v1 H3)) in (\lambda (H7: (eq +B Void b1)).(\lambda (H8: (eq C d1 c3)).(eq_ind_r C c3 (\lambda (c: C).(ex2_2 +C T (\lambda (d2: C).(\lambda (_: T).(csubv c d2))) (\lambda (d2: C).(\lambda +(v3: T).(clear (CHead c4 (Bind b2) v2) (CHead d2 (Bind Void) v3)))))) (let H9 +\def (eq_ind_r B b1 (\lambda (b: B).(not (eq B b Void))) H2 Void H7) in (let +H10 \def (match (H9 (refl_equal B Void)) in False with []) in H10)) d1 H8)))) +H5)) H4)))))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubv +c3 c4)).(\lambda (H1: ((\forall (d1: C).(\forall (v1: T).((clear c3 (CHead d1 +(Bind Void) v1)) \to (ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 +d2))) (\lambda (d2: C).(\lambda (v2: T).(clear c4 (CHead d2 (Bind Void) +v2)))))))))).(\lambda (f1: F).(\lambda (f2: F).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (d1: C).(\lambda (v0: T).(\lambda (H2: (clear (CHead c3 (Flat f1) +v1) (CHead d1 (Bind Void) v0))).(let H_x \def (H1 d1 v0 (clear_gen_flat f1 c3 +(CHead d1 (Bind Void) v0) v1 H2)) in (let H3 \def H_x in (ex2_2_ind C T +(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda +(v3: T).(clear c4 (CHead d2 (Bind Void) v3)))) (ex2_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v3: T).(clear +(CHead c4 (Flat f2) v2) (CHead d2 (Bind Void) v3))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H4: (csubv d1 x0)).(\lambda (H5: (clear c4 +(CHead x0 (Bind Void) x1))).(ex2_2_intro C T (\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v3: T).(clear (CHead c4 (Flat +f2) v2) (CHead d2 (Bind Void) v3)))) x0 x1 H4 (clear_flat c4 (CHead x0 (Bind +Void) x1) H5 f2 v2)))))) H3)))))))))))))) c1 c2 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubv/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/defs.ma new file mode 100644 index 000000000..35e9715ed --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/defs.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +inductive csubv: C \to (C \to Prop) \def +| csubv_sort: \forall (n: nat).(csubv (CSort n) (CSort n)) +| csubv_void: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall +(v1: T).(\forall (v2: T).(csubv (CHead c1 (Bind Void) v1) (CHead c2 (Bind +Void) v2)))))) +| csubv_bind: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall +(b1: B).((not (eq B b1 Void)) \to (\forall (b2: B).(\forall (v1: T).(\forall +(v2: T).(csubv (CHead c1 (Bind b1) v1) (CHead c2 (Bind b2) v2))))))))) +| csubv_flat: \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall +(f1: F).(\forall (f2: F).(\forall (v1: T).(\forall (v2: T).(csubv (CHead c1 +(Flat f1) v1) (CHead c2 (Flat f2) v2)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubv/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/drop.ma new file mode 100644 index 000000000..dacf29d95 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/drop.ma @@ -0,0 +1,114 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubv/props.ma". + +include "basic_1A/csubv/fwd.ma". + +include "basic_1A/drop/fwd.ma". + +lemma csubv_drop_conf: + \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (e1: +C).(\forall (h: nat).((drop h O c1 e1) \to (ex2 C (\lambda (e2: C).(csubv e1 +e2)) (\lambda (e2: C).(drop h O c2 e2)))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(csubv_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).(\forall (h: nat).((drop h +O c e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O +c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (h: nat).(\lambda +(H0: (drop h O (CSort n) e1)).(and3_ind (eq C e1 (CSort n)) (eq nat h O) (eq +nat O O) (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O +(CSort n) e2))) (\lambda (H1: (eq C e1 (CSort n))).(\lambda (H2: (eq nat h +O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C +(\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop n0 O (CSort n) e2)))) +(eq_ind_r C (CSort n) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubv c e2)) +(\lambda (e2: C).(drop O O (CSort n) e2)))) (ex_intro2 C (\lambda (e2: +C).(csubv (CSort n) e2)) (\lambda (e2: C).(drop O O (CSort n) e2)) (CSort n) +(csubv_refl (CSort n)) (drop_refl (CSort n))) e1 H1) h H2)))) (drop_gen_sort +n h O e1 H0)))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 +c4)).(\lambda (H1: ((\forall (e1: C).(\forall (h: nat).((drop h O c3 e1) \to +(ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O c4 +e2)))))))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (e1: C).(\lambda (h: +nat).(\lambda (H2: (drop h O (CHead c3 (Bind Void) v1) e1)).(nat_ind (\lambda +(n: nat).((drop n O (CHead c3 (Bind Void) v1) e1) \to (ex2 C (\lambda (e2: +C).(csubv e1 e2)) (\lambda (e2: C).(drop n O (CHead c4 (Bind Void) v2) +e2))))) (\lambda (H3: (drop O O (CHead c3 (Bind Void) v1) e1)).(eq_ind C +(CHead c3 (Bind Void) v1) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubv c +e2)) (\lambda (e2: C).(drop O O (CHead c4 (Bind Void) v2) e2)))) (ex_intro2 C +(\lambda (e2: C).(csubv (CHead c3 (Bind Void) v1) e2)) (\lambda (e2: C).(drop +O O (CHead c4 (Bind Void) v2) e2)) (CHead c4 (Bind Void) v2) (csubv_bind_same +c3 c4 H0 Void v1 v2) (drop_refl (CHead c4 (Bind Void) v2))) e1 (drop_gen_refl +(CHead c3 (Bind Void) v1) e1 H3))) (\lambda (h0: nat).(\lambda (_: (((drop h0 +O (CHead c3 (Bind Void) v1) e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) +(\lambda (e2: C).(drop h0 O (CHead c4 (Bind Void) v2) e2)))))).(\lambda (H3: +(drop (S h0) O (CHead c3 (Bind Void) v1) e1)).(let H_x \def (H1 e1 (r (Bind +Void) h0) (drop_gen_drop (Bind Void) c3 e1 v1 h0 H3)) in (let H4 \def H_x in +(ex2_ind C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h0 O c4 +e2)) (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop (S h0) O +(CHead c4 (Bind Void) v2) e2))) (\lambda (x: C).(\lambda (H5: (csubv e1 +x)).(\lambda (H6: (drop h0 O c4 x)).(ex_intro2 C (\lambda (e2: C).(csubv e1 +e2)) (\lambda (e2: C).(drop (S h0) O (CHead c4 (Bind Void) v2) e2)) x H5 +(drop_drop (Bind Void) h0 c4 x H6 v2))))) H4)))))) h H2)))))))))) (\lambda +(c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 c4)).(\lambda (H1: ((\forall +(e1: C).(\forall (h: nat).((drop h O c3 e1) \to (ex2 C (\lambda (e2: +C).(csubv e1 e2)) (\lambda (e2: C).(drop h O c4 e2)))))))).(\lambda (b1: +B).(\lambda (H2: (not (eq B b1 Void))).(\lambda (b2: B).(\lambda (v1: +T).(\lambda (v2: T).(\lambda (e1: C).(\lambda (h: nat).(\lambda (H3: (drop h +O (CHead c3 (Bind b1) v1) e1)).(nat_ind (\lambda (n: nat).((drop n O (CHead +c3 (Bind b1) v1) e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: +C).(drop n O (CHead c4 (Bind b2) v2) e2))))) (\lambda (H4: (drop O O (CHead +c3 (Bind b1) v1) e1)).(eq_ind C (CHead c3 (Bind b1) v1) (\lambda (c: C).(ex2 +C (\lambda (e2: C).(csubv c e2)) (\lambda (e2: C).(drop O O (CHead c4 (Bind +b2) v2) e2)))) (ex_intro2 C (\lambda (e2: C).(csubv (CHead c3 (Bind b1) v1) +e2)) (\lambda (e2: C).(drop O O (CHead c4 (Bind b2) v2) e2)) (CHead c4 (Bind +b2) v2) (csubv_bind c3 c4 H0 b1 H2 b2 v1 v2) (drop_refl (CHead c4 (Bind b2) +v2))) e1 (drop_gen_refl (CHead c3 (Bind b1) v1) e1 H4))) (\lambda (h0: +nat).(\lambda (_: (((drop h0 O (CHead c3 (Bind b1) v1) e1) \to (ex2 C +(\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h0 O (CHead c4 (Bind +b2) v2) e2)))))).(\lambda (H4: (drop (S h0) O (CHead c3 (Bind b1) v1) +e1)).(let H_x \def (H1 e1 (r (Bind b1) h0) (drop_gen_drop (Bind b1) c3 e1 v1 +h0 H4)) in (let H5 \def H_x in (ex2_ind C (\lambda (e2: C).(csubv e1 e2)) +(\lambda (e2: C).(drop h0 O c4 e2)) (ex2 C (\lambda (e2: C).(csubv e1 e2)) +(\lambda (e2: C).(drop (S h0) O (CHead c4 (Bind b2) v2) e2))) (\lambda (x: +C).(\lambda (H6: (csubv e1 x)).(\lambda (H7: (drop h0 O c4 x)).(ex_intro2 C +(\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop (S h0) O (CHead c4 +(Bind b2) v2) e2)) x H6 (drop_drop (Bind b2) h0 c4 x H7 v2))))) H5)))))) h +H3))))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csubv c3 +c4)).(\lambda (H1: ((\forall (e1: C).(\forall (h: nat).((drop h O c3 e1) \to +(ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop h O c4 +e2)))))))).(\lambda (f1: F).(\lambda (f2: F).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (e1: C).(\lambda (h: nat).(\lambda (H2: (drop h O (CHead c3 (Flat +f1) v1) e1)).(nat_ind (\lambda (n: nat).((drop n O (CHead c3 (Flat f1) v1) +e1) \to (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop n O +(CHead c4 (Flat f2) v2) e2))))) (\lambda (H3: (drop O O (CHead c3 (Flat f1) +v1) e1)).(eq_ind C (CHead c3 (Flat f1) v1) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csubv c e2)) (\lambda (e2: C).(drop O O (CHead c4 (Flat f2) v2) +e2)))) (ex_intro2 C (\lambda (e2: C).(csubv (CHead c3 (Flat f1) v1) e2)) +(\lambda (e2: C).(drop O O (CHead c4 (Flat f2) v2) e2)) (CHead c4 (Flat f2) +v2) (csubv_flat c3 c4 H0 f1 f2 v1 v2) (drop_refl (CHead c4 (Flat f2) v2))) e1 +(drop_gen_refl (CHead c3 (Flat f1) v1) e1 H3))) (\lambda (h0: nat).(\lambda +(_: (((drop h0 O (CHead c3 (Flat f1) v1) e1) \to (ex2 C (\lambda (e2: +C).(csubv e1 e2)) (\lambda (e2: C).(drop h0 O (CHead c4 (Flat f2) v2) +e2)))))).(\lambda (H3: (drop (S h0) O (CHead c3 (Flat f1) v1) e1)).(let H_x +\def (H1 e1 (r (Flat f1) h0) (drop_gen_drop (Flat f1) c3 e1 v1 h0 H3)) in +(let H4 \def H_x in (ex2_ind C (\lambda (e2: C).(csubv e1 e2)) (\lambda (e2: +C).(drop (S h0) O c4 e2)) (ex2 C (\lambda (e2: C).(csubv e1 e2)) (\lambda +(e2: C).(drop (S h0) O (CHead c4 (Flat f2) v2) e2))) (\lambda (x: C).(\lambda +(H5: (csubv e1 x)).(\lambda (H6: (drop (S h0) O c4 x)).(ex_intro2 C (\lambda +(e2: C).(csubv e1 e2)) (\lambda (e2: C).(drop (S h0) O (CHead c4 (Flat f2) +v2) e2)) x H5 (drop_drop (Flat f2) h0 c4 x H6 v2))))) H4)))))) h +H2)))))))))))) c1 c2 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubv/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/fwd.ma new file mode 100644 index 000000000..9c09f1921 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/fwd.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubv/defs.ma". + +implied rec lemma csubv_ind (P: (C \to (C \to Prop))) (f: (\forall (n: +nat).(P (CSort n) (CSort n)))) (f0: (\forall (c1: C).(\forall (c2: C).((csubv +c1 c2) \to ((P c1 c2) \to (\forall (v1: T).(\forall (v2: T).(P (CHead c1 +(Bind Void) v1) (CHead c2 (Bind Void) v2))))))))) (f1: (\forall (c1: +C).(\forall (c2: C).((csubv c1 c2) \to ((P c1 c2) \to (\forall (b1: B).((not +(eq B b1 Void)) \to (\forall (b2: B).(\forall (v1: T).(\forall (v2: T).(P +(CHead c1 (Bind b1) v1) (CHead c2 (Bind b2) v2)))))))))))) (f2: (\forall (c1: +C).(\forall (c2: C).((csubv c1 c2) \to ((P c1 c2) \to (\forall (f2: +F).(\forall (f3: F).(\forall (v1: T).(\forall (v2: T).(P (CHead c1 (Flat f2) +v1) (CHead c2 (Flat f3) v2))))))))))) (c: C) (c0: C) (c1: csubv c c0) on c1: +P c c0 \def match c1 with [(csubv_sort n) \Rightarrow (f n) | (csubv_void c2 +c3 c4 v1 v2) \Rightarrow (f0 c2 c3 c4 ((csubv_ind P f f0 f1 f2) c2 c3 c4) v1 +v2) | (csubv_bind c2 c3 c4 b1 n b2 v1 v2) \Rightarrow (f1 c2 c3 c4 +((csubv_ind P f f0 f1 f2) c2 c3 c4) b1 n b2 v1 v2) | (csubv_flat c2 c3 c4 f3 +f4 v1 v2) \Rightarrow (f2 c2 c3 c4 ((csubv_ind P f f0 f1 f2) c2 c3 c4) f3 f4 +v1 v2)]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubv/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/getl.ma new file mode 100644 index 000000000..42214ebae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/getl.ma @@ -0,0 +1,84 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubv/clear.ma". + +include "basic_1A/csubv/drop.ma". + +include "basic_1A/getl/fwd.ma". + +lemma csubv_getl_conf: + \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b1: +B).(\forall (d1: C).(\forall (v1: T).(\forall (i: nat).((getl i c1 (CHead d1 +(Bind b1) v1)) \to (ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl +i c2 (CHead d2 (Bind b2) v2))))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(\lambda (b1: +B).(\lambda (d1: C).(\lambda (v1: T).(\lambda (i: nat).(\lambda (H0: (getl i +c1 (CHead d1 (Bind b1) v1))).(let H1 \def (getl_gen_all c1 (CHead d1 (Bind +b1) v1) i H0) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: +C).(clear e (CHead d1 (Bind b1) v1))) (ex2_3 B C T (\lambda (_: B).(\lambda +(d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: +C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind b2) v2)))))) (\lambda (x: +C).(\lambda (H2: (drop i O c1 x)).(\lambda (H3: (clear x (CHead d1 (Bind b1) +v1))).(let H_x \def (csubv_drop_conf c1 c2 H x i H2) in (let H4 \def H_x in +(ex2_ind C (\lambda (e2: C).(csubv x e2)) (\lambda (e2: C).(drop i O c2 e2)) +(ex2_3 B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 +d2)))) (\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead +d2 (Bind b2) v2)))))) (\lambda (x0: C).(\lambda (H5: (csubv x x0)).(\lambda +(H6: (drop i O c2 x0)).(let H_x0 \def (csubv_clear_conf x x0 H5 b1 d1 v1 H3) +in (let H7 \def H_x0 in (ex2_3_ind B C T (\lambda (_: B).(\lambda (d2: +C).(\lambda (_: T).(csubv d1 d2)))) (\lambda (b2: B).(\lambda (d2: +C).(\lambda (v2: T).(clear x0 (CHead d2 (Bind b2) v2))))) (ex2_3 B C T +(\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) (\lambda +(b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind b2) +v2)))))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H8: +(csubv d1 x2)).(\lambda (H9: (clear x0 (CHead x2 (Bind x1) x3))).(ex2_3_intro +B C T (\lambda (_: B).(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2)))) +(\lambda (b2: B).(\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind +b2) v2))))) x1 x2 x3 H8 (getl_intro i c2 (CHead x2 (Bind x1) x3) x0 H6 +H9))))))) H7)))))) H4)))))) H1))))))))). + +lemma csubv_getl_conf_void: + \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (d1: +C).(\forall (v1: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind Void) v1)) +\to (ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: +C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind Void) v2))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(\lambda (d1: +C).(\lambda (v1: T).(\lambda (i: nat).(\lambda (H0: (getl i c1 (CHead d1 +(Bind Void) v1))).(let H1 \def (getl_gen_all c1 (CHead d1 (Bind Void) v1) i +H0) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e +(CHead d1 (Bind Void) v1))) (ex2_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 +(Bind Void) v2))))) (\lambda (x: C).(\lambda (H2: (drop i O c1 x)).(\lambda +(H3: (clear x (CHead d1 (Bind Void) v1))).(let H_x \def (csubv_drop_conf c1 +c2 H x i H2) in (let H4 \def H_x in (ex2_ind C (\lambda (e2: C).(csubv x e2)) +(\lambda (e2: C).(drop i O c2 e2)) (ex2_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 +(Bind Void) v2))))) (\lambda (x0: C).(\lambda (H5: (csubv x x0)).(\lambda +(H6: (drop i O c2 x0)).(let H_x0 \def (csubv_clear_conf_void x x0 H5 d1 v1 +H3) in (let H7 \def H_x0 in (ex2_2_ind C T (\lambda (d2: C).(\lambda (_: +T).(csubv d1 d2))) (\lambda (d2: C).(\lambda (v2: T).(clear x0 (CHead d2 +(Bind Void) v2)))) (ex2_2 C T (\lambda (d2: C).(\lambda (_: T).(csubv d1 +d2))) (\lambda (d2: C).(\lambda (v2: T).(getl i c2 (CHead d2 (Bind Void) +v2))))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (H8: (csubv d1 +x1)).(\lambda (H9: (clear x0 (CHead x1 (Bind Void) x2))).(ex2_2_intro C T +(\lambda (d2: C).(\lambda (_: T).(csubv d1 d2))) (\lambda (d2: C).(\lambda +(v2: T).(getl i c2 (CHead d2 (Bind Void) v2)))) x1 x2 H8 (getl_intro i c2 +(CHead x1 (Bind Void) x2) x0 H6 H9)))))) H7)))))) H4)))))) H1)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/csubv/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/csubv/props.ma new file mode 100644 index 000000000..126841bd2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/csubv/props.ma @@ -0,0 +1,43 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubv/defs.ma". + +include "basic_1A/C/fwd.ma". + +include "basic_1A/T/props.ma". + +lemma csubv_bind_same: + \forall (c1: C).(\forall (c2: C).((csubv c1 c2) \to (\forall (b: B).(\forall +(v1: T).(\forall (v2: T).(csubv (CHead c1 (Bind b) v1) (CHead c2 (Bind b) +v2))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubv c1 c2)).(\lambda (b: +B).(B_ind (\lambda (b0: B).(\forall (v1: T).(\forall (v2: T).(csubv (CHead c1 +(Bind b0) v1) (CHead c2 (Bind b0) v2))))) (\lambda (v1: T).(\lambda (v2: +T).(csubv_bind c1 c2 H Abbr not_abbr_void Abbr v1 v2))) (\lambda (v1: +T).(\lambda (v2: T).(csubv_bind c1 c2 H Abst not_abst_void Abst v1 v2))) +(\lambda (v1: T).(\lambda (v2: T).(csubv_void c1 c2 H v1 v2))) b)))). + +lemma csubv_refl: + \forall (c: C).(csubv c c) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(csubv c0 c0)) (\lambda (n: +nat).(csubv_sort n)) (\lambda (c0: C).(\lambda (H: (csubv c0 c0)).(\lambda +(k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(csubv (CHead c0 k0 t) (CHead +c0 k0 t)))) (\lambda (b: B).(\lambda (t: T).(csubv_bind_same c0 c0 H b t t))) +(\lambda (f: F).(\lambda (t: T).(csubv_flat c0 c0 H f f t t))) k)))) c). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/definitions.ma b/matita/matita/contribs/lambdadelta/basic_1A/definitions.ma new file mode 100644 index 000000000..5d67783d9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/definitions.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/tlt/defs.ma". + +include "basic_1A/iso/defs.ma". + +include "basic_1A/clen/defs.ma". + +include "basic_1A/flt/defs.ma". + +include "basic_1A/app/defs.ma". + +include "basic_1A/cnt/defs.ma". + +include "basic_1A/cimp/defs.ma". + +include "basic_1A/subst1/defs.ma". + +include "basic_1A/subst/defs.ma". + +include "basic_1A/csubst1/defs.ma". + +include "basic_1A/fsubst0/defs.ma". + +include "basic_1A/next_plus/defs.ma". + +include "basic_1A/sty1/defs.ma". + +include "basic_1A/llt/defs.ma". + +include "basic_1A/aprem/defs.ma". + +include "basic_1A/ex0/defs.ma". + +include "basic_1A/wcpr0/defs.ma". + +include "basic_1A/csubv/defs.ma". + +include "basic_1A/csuba/defs.ma". + +include "basic_1A/nf2/defs.ma". + +include "basic_1A/ex2/defs.ma". + +include "basic_1A/csubc/defs.ma". + +include "basic_1A/pc1/defs.ma". + +include "basic_1A/ex1/defs.ma". + +include "basic_1A/csubt/defs.ma". + +include "basic_1A/wf3/defs.ma". + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/drop/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop/defs.ma new file mode 100644 index 000000000..84e6796ae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop/defs.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +include "basic_1A/lift/defs.ma". + +include "basic_1A/r/defs.ma". + +inductive drop: nat \to (nat \to (C \to (C \to Prop))) \def +| drop_refl: \forall (c: C).(drop O O c c) +| drop_drop: \forall (k: K).(\forall (h: nat).(\forall (c: C).(\forall (e: +C).((drop (r k h) O c e) \to (\forall (u: T).(drop (S h) O (CHead c k u) +e)))))) +| drop_skip: \forall (k: K).(\forall (h: nat).(\forall (d: nat).(\forall (c: +C).(\forall (e: C).((drop h (r k d) c e) \to (\forall (u: T).(drop h (S d) +(CHead c k (lift h (r k d) u)) (CHead e k u)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/drop/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop/fwd.ma new file mode 100644 index 000000000..eba1cbd80 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop/fwd.ma @@ -0,0 +1,475 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/drop/defs.ma". + +include "basic_1A/lift/fwd.ma". + +include "basic_1A/r/props.ma". + +include "basic_1A/C/fwd.ma". + +implied rec lemma drop_ind (P: (nat \to (nat \to (C \to (C \to Prop))))) (f: +(\forall (c: C).(P O O c c))) (f0: (\forall (k: K).(\forall (h: nat).(\forall +(c: C).(\forall (e: C).((drop (r k h) O c e) \to ((P (r k h) O c e) \to +(\forall (u: T).(P (S h) O (CHead c k u) e))))))))) (f1: (\forall (k: +K).(\forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop +h (r k d) c e) \to ((P h (r k d) c e) \to (\forall (u: T).(P h (S d) (CHead c +k (lift h (r k d) u)) (CHead e k u))))))))))) (n: nat) (n0: nat) (c: C) (c0: +C) (d: drop n n0 c c0) on d: P n n0 c c0 \def match d with [(drop_refl c1) +\Rightarrow (f c1) | (drop_drop k h c1 e d0 u) \Rightarrow (f0 k h c1 e d0 +((drop_ind P f f0 f1) (r k h) O c1 e d0) u) | (drop_skip k h d0 c1 e d1 u) +\Rightarrow (f1 k h d0 c1 e d1 ((drop_ind P f f0 f1) h (r k d0) c1 e d1) u)]. + +lemma drop_gen_sort: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(\forall (x: C).((drop +h d (CSort n) x) \to (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (x: +C).(\lambda (H: (drop h d (CSort n) x)).(insert_eq C (CSort n) (\lambda (c: +C).(drop h d c x)) (\lambda (c: C).(and3 (eq C x c) (eq nat h O) (eq nat d +O))) (\lambda (y: C).(\lambda (H0: (drop h d y x)).(drop_ind (\lambda (n0: +nat).(\lambda (n1: nat).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) +\to (and3 (eq C c0 c) (eq nat n0 O) (eq nat n1 O))))))) (\lambda (c: +C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: +C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(and3 (eq C +c0 c0) (eq nat O O) (eq nat O O))) (and3_intro (eq C (CSort n) (CSort n)) (eq +nat O O) (eq nat O O) (refl_equal C (CSort n)) (refl_equal nat O) (refl_equal +nat O)) c H2)))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (c: C).(\lambda +(e: C).(\lambda (_: (drop (r k h0) O c e)).(\lambda (_: (((eq C c (CSort n)) +\to (and3 (eq C e c) (eq nat (r k h0) O) (eq nat O O))))).(\lambda (u: +T).(\lambda (H3: (eq C (CHead c k u) (CSort n))).(let H4 \def (eq_ind C +(CHead c k u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | +(CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C e +(CHead c k u)) (eq nat (S h0) O) (eq nat O O)) H4)))))))))) (\lambda (k: +K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c: C).(\lambda (e: +C).(\lambda (_: (drop h0 (r k d0) c e)).(\lambda (_: (((eq C c (CSort n)) \to +(and3 (eq C e c) (eq nat h0 O) (eq nat (r k d0) O))))).(\lambda (u: +T).(\lambda (H3: (eq C (CHead c k (lift h0 (r k d0) u)) (CSort n))).(let H4 +\def (eq_ind C (CHead c k (lift h0 (r k d0) u)) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I +(CSort n) H3) in (False_ind (and3 (eq C (CHead e k u) (CHead c k (lift h0 (r +k d0) u))) (eq nat h0 O) (eq nat (S d0) O)) H4))))))))))) h d y x H0))) +H))))). + +lemma drop_gen_refl: + \forall (x: C).(\forall (e: C).((drop O O x e) \to (eq C x e))) +\def + \lambda (x: C).(\lambda (e: C).(\lambda (H: (drop O O x e)).(insert_eq nat O +(\lambda (n: nat).(drop n O x e)) (\lambda (_: nat).(eq C x e)) (\lambda (y: +nat).(\lambda (H0: (drop y O x e)).(insert_eq nat O (\lambda (n: nat).(drop y +n x e)) (\lambda (n: nat).((eq nat y n) \to (eq C x e))) (\lambda (y0: +nat).(\lambda (H1: (drop y y0 x e)).(drop_ind (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n0 O) \to ((eq nat n n0) \to +(eq C c c0))))))) (\lambda (c: C).(\lambda (_: (eq nat O O)).(\lambda (_: (eq +nat O O)).(refl_equal C c)))) (\lambda (k: K).(\lambda (h: nat).(\lambda (c: +C).(\lambda (e0: C).(\lambda (_: (drop (r k h) O c e0)).(\lambda (_: (((eq +nat O O) \to ((eq nat (r k h) O) \to (eq C c e0))))).(\lambda (u: T).(\lambda +(_: (eq nat O O)).(\lambda (H5: (eq nat (S h) O)).(let H6 \def (eq_ind nat (S +h) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H5) in (False_ind (eq C (CHead c k u) e0) H6))))))))))) (\lambda +(k: K).(\lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e0: +C).(\lambda (H2: (drop h (r k d) c e0)).(\lambda (H3: (((eq nat (r k d) O) +\to ((eq nat h (r k d)) \to (eq C c e0))))).(\lambda (u: T).(\lambda (H4: (eq +nat (S d) O)).(\lambda (H5: (eq nat h (S d))).(let H6 \def (f_equal nat nat +(\lambda (e1: nat).e1) h (S d) H5) in (let H7 \def (eq_ind nat h (\lambda (n: +nat).((eq nat (r k d) O) \to ((eq nat n (r k d)) \to (eq C c e0)))) H3 (S d) +H6) in (let H8 \def (eq_ind nat h (\lambda (n: nat).(drop n (r k d) c e0)) H2 +(S d) H6) in (eq_ind_r nat (S d) (\lambda (n: nat).(eq C (CHead c k (lift n +(r k d) u)) (CHead e0 k u))) (let H9 \def (eq_ind nat (S d) (\lambda (ee: +nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) +in (False_ind (eq C (CHead c k (lift (S d) (r k d) u)) (CHead e0 k u)) H9)) h +H6)))))))))))))) y y0 x e H1))) H0))) H))). + +lemma drop_gen_drop: + \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: +nat).((drop (S h) O (CHead c k u) x) \to (drop (r k h) O c x)))))) +\def + \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: +nat).(\lambda (H: (drop (S h) O (CHead c k u) x)).(insert_eq C (CHead c k u) +(\lambda (c0: C).(drop (S h) O c0 x)) (\lambda (_: C).(drop (r k h) O c x)) +(\lambda (y: C).(\lambda (H0: (drop (S h) O y x)).(insert_eq nat O (\lambda +(n: nat).(drop (S h) n y x)) (\lambda (n: nat).((eq C y (CHead c k u)) \to +(drop (r k h) n c x))) (\lambda (y0: nat).(\lambda (H1: (drop (S h) y0 y +x)).(insert_eq nat (S h) (\lambda (n: nat).(drop n y0 y x)) (\lambda (_: +nat).((eq nat y0 O) \to ((eq C y (CHead c k u)) \to (drop (r k h) y0 c x)))) +(\lambda (y1: nat).(\lambda (H2: (drop y1 y0 y x)).(drop_ind (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n (S h)) +\to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) n0 c +c1)))))))) (\lambda (c0: C).(\lambda (H3: (eq nat O (S h))).(\lambda (_: (eq +nat O O)).(\lambda (H5: (eq C c0 (CHead c k u))).(eq_ind_r C (CHead c k u) +(\lambda (c1: C).(drop (r k h) O c c1)) (let H6 \def (eq_ind nat O (\lambda +(ee: nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I +(S h) H3) in (False_ind (drop (r k h) O c (CHead c k u)) H6)) c0 H5))))) +(\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda +(H3: (drop (r k0 h0) O c0 e)).(\lambda (H4: (((eq nat (r k0 h0) (S h)) \to +((eq nat O O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c +e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S h))).(\lambda (_: +(eq nat O O)).(\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H8 +\def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | +(CHead c1 _ _) \Rightarrow c1])) (CHead c0 k0 u0) (CHead c k u) H7) in ((let +H9 \def (f_equal C K (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow +k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 u0) (CHead c k u) H7) in +((let H10 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c k +u) H7) in (\lambda (H11: (eq K k0 k)).(\lambda (H12: (eq C c0 c)).(let H13 +\def (eq_ind C c0 (\lambda (c1: C).((eq nat (r k0 h0) (S h)) \to ((eq nat O +O) \to ((eq C c1 (CHead c k u)) \to (drop (r k h) O c e))))) H4 c H12) in +(let H14 \def (eq_ind C c0 (\lambda (c1: C).(drop (r k0 h0) O c1 e)) H3 c +H12) in (let H15 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 h0) (S h)) +\to ((eq nat O O) \to ((eq C c (CHead c k u)) \to (drop (r k h) O c e))))) +H13 k H11) in (let H16 \def (eq_ind K k0 (\lambda (k1: K).(drop (r k1 h0) O c +e)) H14 k H11) in (let H17 \def (f_equal nat nat (\lambda (e0: nat).(match e0 +with [O \Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H5) in (let H18 +\def (eq_ind nat h0 (\lambda (n: nat).((eq nat (r k n) (S h)) \to ((eq nat O +O) \to ((eq C c (CHead c k u)) \to (drop (r k h) O c e))))) H15 h H17) in +(let H19 \def (eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) H16 h +H17) in H19)))))))))) H9)) H8)))))))))))) (\lambda (k0: K).(\lambda (h0: +nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H3: (drop +h0 (r k0 d) c0 e)).(\lambda (H4: (((eq nat h0 (S h)) \to ((eq nat (r k0 d) O) +\to ((eq C c0 (CHead c k u)) \to (drop (r k h) (r k0 d) c e)))))).(\lambda +(u0: T).(\lambda (H5: (eq nat h0 (S h))).(\lambda (H6: (eq nat (S d) +O)).(\lambda (H7: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c k +u))).(let H8 \def (eq_ind nat h0 (\lambda (n: nat).(eq C (CHead c0 k0 (lift n +(r k0 d) u0)) (CHead c k u))) H7 (S h) H5) in (let H9 \def (eq_ind nat h0 +(\lambda (n: nat).((eq nat n (S h)) \to ((eq nat (r k0 d) O) \to ((eq C c0 +(CHead c k u)) \to (drop (r k h) (r k0 d) c e))))) H4 (S h) H5) in (let H10 +\def (eq_ind nat h0 (\lambda (n: nat).(drop n (r k0 d) c0 e)) H3 (S h) H5) in +(let H11 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow c0 | (CHead c1 _ _) \Rightarrow c1])) (CHead c0 k0 (lift (S h) (r +k0 d) u0)) (CHead c k u) H8) in ((let H12 \def (f_equal C K (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow +k1])) (CHead c0 k0 (lift (S h) (r k0 d) u0)) (CHead c k u) H8) in ((let H13 +\def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow +(lref_map (\lambda (x0: nat).(plus x0 (S h))) (r k0 d) u0) | (CHead _ _ t) +\Rightarrow t])) (CHead c0 k0 (lift (S h) (r k0 d) u0)) (CHead c k u) H8) in +(\lambda (H14: (eq K k0 k)).(\lambda (H15: (eq C c0 c)).(let H16 \def (eq_ind +C c0 (\lambda (c1: C).((eq nat (S h) (S h)) \to ((eq nat (r k0 d) O) \to ((eq +C c1 (CHead c k u)) \to (drop (r k h) (r k0 d) c e))))) H9 c H15) in (let H17 +\def (eq_ind C c0 (\lambda (c1: C).(drop (S h) (r k0 d) c1 e)) H10 c H15) in +(let H18 \def (eq_ind K k0 (\lambda (k1: K).(eq T (lift (S h) (r k1 d) u0) +u)) H13 k H14) in (let H19 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (S h) +(S h)) \to ((eq nat (r k1 d) O) \to ((eq C c (CHead c k u)) \to (drop (r k h) +(r k1 d) c e))))) H16 k H14) in (let H20 \def (eq_ind K k0 (\lambda (k1: +K).(drop (S h) (r k1 d) c e)) H17 k H14) in (eq_ind_r K k (\lambda (k1: +K).(drop (r k h) (S d) c (CHead e k1 u0))) (let H21 \def (eq_ind_r T u +(\lambda (t: T).((eq nat (S h) (S h)) \to ((eq nat (r k d) O) \to ((eq C c +(CHead c k t)) \to (drop (r k h) (r k d) c e))))) H19 (lift (S h) (r k d) u0) +H18) in (let H22 \def (eq_ind nat (S d) (\lambda (ee: nat).(match ee with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind (drop (r +k h) (S d) c (CHead e k u0)) H22))) k0 H14))))))))) H12)) H11)))))))))))))))) +y1 y0 y x H2))) H1))) H0))) H)))))). + +lemma drop_gen_skip_r: + \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall +(d: nat).(\forall (k: K).((drop h (S d) x (CHead c k u)) \to (ex2 C (\lambda +(e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k +d) e c))))))))) +\def + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k +u))).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop h (S d) x c0)) +(\lambda (_: C).(ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) +u)))) (\lambda (e: C).(drop h (r k d) e c)))) (\lambda (y: C).(\lambda (H0: +(drop h (S d) x y)).(insert_eq nat (S d) (\lambda (n: nat).(drop h n x y)) +(\lambda (_: nat).((eq C y (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x +(CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c))))) +(\lambda (y0: nat).(\lambda (H1: (drop h y0 x y)).(drop_ind (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n0 (S d)) +\to ((eq C c1 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C c0 (CHead e k +(lift n (r k d) u)))) (\lambda (e: C).(drop n (r k d) e c))))))))) (\lambda +(c0: C).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C c0 (CHead c k +u))).(eq_ind_r C (CHead c k u) (\lambda (c1: C).(ex2 C (\lambda (e: C).(eq C +c1 (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k d) e c)))) +(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O \Rightarrow +True | (S _) \Rightarrow False])) I (S d) H2) in (False_ind (ex2 C (\lambda +(e: C).(eq C (CHead c k u) (CHead e k (lift O (r k d) u)))) (\lambda (e: +C).(drop O (r k d) e c))) H4)) c0 H3)))) (\lambda (k0: K).(\lambda (h0: +nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H2: (drop (r k0 h0) O c0 +e)).(\lambda (H3: (((eq nat O (S d)) \to ((eq C e (CHead c k u)) \to (ex2 C +(\lambda (e0: C).(eq C c0 (CHead e0 k (lift (r k0 h0) (r k d) u)))) (\lambda +(e0: C).(drop (r k0 h0) (r k d) e0 c))))))).(\lambda (u0: T).(\lambda (H4: +(eq nat O (S d))).(\lambda (H5: (eq C e (CHead c k u))).(let H6 \def (eq_ind +C e (\lambda (c1: C).((eq nat O (S d)) \to ((eq C c1 (CHead c k u)) \to (ex2 +C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift (r k0 h0) (r k d) u)))) +(\lambda (e0: C).(drop (r k0 h0) (r k d) e0 c)))))) H3 (CHead c k u) H5) in +(let H7 \def (eq_ind C e (\lambda (c1: C).(drop (r k0 h0) O c0 c1)) H2 (CHead +c k u) H5) in (let H8 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O +\Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind (ex2 +C (\lambda (e0: C).(eq C (CHead c0 k0 u0) (CHead e0 k (lift (S h0) (r k d) +u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 c))) H8))))))))))))) (\lambda +(k0: K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c0: C).(\lambda (e: +C).(\lambda (H2: (drop h0 (r k0 d0) c0 e)).(\lambda (H3: (((eq nat (r k0 d0) +(S d)) \to ((eq C e (CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 +(CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 +c))))))).(\lambda (u0: T).(\lambda (H4: (eq nat (S d0) (S d))).(\lambda (H5: +(eq C (CHead e k0 u0) (CHead c k u))).(let H6 \def (f_equal C C (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) +(CHead e k0 u0) (CHead c k u) H5) in ((let H7 \def (f_equal C K (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow +k1])) (CHead e k0 u0) (CHead c k u) H5) in ((let H8 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u0 | (CHead _ _ t) +\Rightarrow t])) (CHead e k0 u0) (CHead c k u) H5) in (\lambda (H9: (eq K k0 +k)).(\lambda (H10: (eq C e c)).(eq_ind_r T u (\lambda (t: T).(ex2 C (\lambda +(e0: C).(eq C (CHead c0 k0 (lift h0 (r k0 d0) t)) (CHead e0 k (lift h0 (r k +d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)))) (let H11 \def (eq_ind C e +(\lambda (c1: C).((eq nat (r k0 d0) (S d)) \to ((eq C c1 (CHead c k u)) \to +(ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift h0 (r k d) u)))) (\lambda +(e0: C).(drop h0 (r k d) e0 c)))))) H3 c H10) in (let H12 \def (eq_ind C e +(\lambda (c1: C).(drop h0 (r k0 d0) c0 c1)) H2 c H10) in (let H13 \def +(eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 d0) (S d)) \to ((eq C c (CHead c +k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift h0 (r k d) u)))) +(\lambda (e0: C).(drop h0 (r k d) e0 c)))))) H11 k H9) in (let H14 \def +(eq_ind K k0 (\lambda (k1: K).(drop h0 (r k1 d0) c0 c)) H12 k H9) in +(eq_ind_r K k (\lambda (k1: K).(ex2 C (\lambda (e0: C).(eq C (CHead c0 k1 +(lift h0 (r k1 d0) u)) (CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: +C).(drop h0 (r k d) e0 c)))) (let H15 \def (f_equal nat nat (\lambda (e0: +nat).(match e0 with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) +H4) in (let H16 \def (eq_ind nat d0 (\lambda (n: nat).((eq nat (r k n) (S d)) +\to ((eq C c (CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k +(lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)))))) H13 d +H15) in (let H17 \def (eq_ind nat d0 (\lambda (n: nat).(drop h0 (r k n) c0 +c)) H14 d H15) in (eq_ind_r nat d (\lambda (n: nat).(ex2 C (\lambda (e0: +C).(eq C (CHead c0 k (lift h0 (r k n) u)) (CHead e0 k (lift h0 (r k d) u)))) +(\lambda (e0: C).(drop h0 (r k d) e0 c)))) (ex_intro2 C (\lambda (e0: C).(eq +C (CHead c0 k (lift h0 (r k d) u)) (CHead e0 k (lift h0 (r k d) u)))) +(\lambda (e0: C).(drop h0 (r k d) e0 c)) c0 (refl_equal C (CHead c0 k (lift +h0 (r k d) u))) H17) d0 H15)))) k0 H9))))) u0 H8)))) H7)) H6)))))))))))) h y0 +x y H1))) H0))) H))))))). + +lemma drop_gen_skip_l: + \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall +(d: nat).(\forall (k: K).((drop h (S d) (CHead c k u) x) \to (ex3_2 C T +(\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: +T).(drop h (r k d) c e)))))))))) +\def + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) +x)).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop h (S d) c0 x)) (\lambda +(_: C).(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r k d) c e))))) (\lambda (y: C).(\lambda (H0: +(drop h (S d) y x)).(insert_eq nat (S d) (\lambda (n: nat).(drop h n y x)) +(\lambda (_: nat).((eq C y (CHead c k u)) \to (ex3_2 C T (\lambda (e: +C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k +d) c e)))))) (\lambda (y0: nat).(\lambda (H1: (drop h y0 y x)).(drop_ind +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq +nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to (ex3_2 C T (\lambda (e: +C).(\lambda (v: T).(eq C c1 (CHead e k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop n (r k +d) c e)))))))))) (\lambda (c0: C).(\lambda (H2: (eq nat O (S d))).(\lambda +(H3: (eq C c0 (CHead c k u))).(eq_ind_r C (CHead c k u) (\lambda (c1: +C).(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C c1 (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: +C).(\lambda (_: T).(drop O (r k d) c e))))) (let H4 \def (eq_ind nat O +(\lambda (ee: nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow +False])) I (S d) H2) in (False_ind (ex3_2 C T (\lambda (e: C).(\lambda (v: +T).(eq C (CHead c k u) (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T +u (lift O (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop O (r k d) c +e)))) H4)) c0 H3)))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: +C).(\lambda (e: C).(\lambda (H2: (drop (r k0 h0) O c0 e)).(\lambda (H3: (((eq +nat O (S d)) \to ((eq C c0 (CHead c k u)) \to (ex3_2 C T (\lambda (e0: +C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T u (lift (r k0 h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: +T).(drop (r k0 h0) (r k d) c e0)))))))).(\lambda (u0: T).(\lambda (H4: (eq +nat O (S d))).(\lambda (H5: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H6 +\def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | +(CHead c1 _ _) \Rightarrow c1])) (CHead c0 k0 u0) (CHead c k u) H5) in ((let +H7 \def (f_equal C K (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow +k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 u0) (CHead c k u) H5) in +((let H8 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c k +u) H5) in (\lambda (H9: (eq K k0 k)).(\lambda (H10: (eq C c0 c)).(let H11 +\def (eq_ind C c0 (\lambda (c1: C).((eq nat O (S d)) \to ((eq C c1 (CHead c k +u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift (r k0 h0) (r k d) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop (r k0 h0) (r k d) c e0))))))) H3 c +H10) in (let H12 \def (eq_ind C c0 (\lambda (c1: C).(drop (r k0 h0) O c1 e)) +H2 c H10) in (let H13 \def (eq_ind K k0 (\lambda (k1: K).((eq nat O (S d)) +\to ((eq C c (CHead c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: +T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (r +k1 h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (r k1 h0) (r k d) +c e0))))))) H11 k H9) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).(drop (r +k1 h0) O c e)) H12 k H9) in (let H15 \def (eq_ind nat O (\lambda (ee: +nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) +H4) in (False_ind (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead +e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (S h0) (r k d) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop (S h0) (r k d) c e0)))) H15))))))))) +H7)) H6))))))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (d0: +nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H2: (drop h0 (r k0 d0) c0 +e)).(\lambda (H3: (((eq nat (r k0 d0) (S d)) \to ((eq C c0 (CHead c k u)) \to +(ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 (r k d) v)))) (\lambda (e0: +C).(\lambda (_: T).(drop h0 (r k d) c e0)))))))).(\lambda (u0: T).(\lambda +(H4: (eq nat (S d0) (S d))).(\lambda (H5: (eq C (CHead c0 k0 (lift h0 (r k0 +d0) u0)) (CHead c k u))).(let H6 \def (f_equal C C (\lambda (e0: C).(match e0 +with [(CSort _) \Rightarrow c0 | (CHead c1 _ _) \Rightarrow c1])) (CHead c0 +k0 (lift h0 (r k0 d0) u0)) (CHead c k u) H5) in ((let H7 \def (f_equal C K +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) +\Rightarrow k1])) (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u) H5) in +((let H8 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow (lref_map (\lambda (x0: nat).(plus x0 h0)) (r k0 d0) u0) | (CHead +_ _ t) \Rightarrow t])) (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u) +H5) in (\lambda (H9: (eq K k0 k)).(\lambda (H10: (eq C c0 c)).(let H11 \def +(eq_ind C c0 (\lambda (c1: C).((eq nat (r k0 d0) (S d)) \to ((eq C c1 (CHead +c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k +v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 (r k d) v)))) (\lambda +(e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))))) H3 c H10) in (let H12 +\def (eq_ind C c0 (\lambda (c1: C).(drop h0 (r k0 d0) c1 e)) H2 c H10) in +(let H13 \def (eq_ind K k0 (\lambda (k1: K).(eq T (lift h0 (r k1 d0) u0) u)) +H8 k H9) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 d0) (S +d)) \to ((eq C c (CHead c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: +T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 +(r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))))) +H11 k H9) in (let H15 \def (eq_ind K k0 (\lambda (k1: K).(drop h0 (r k1 d0) c +e)) H12 k H9) in (eq_ind_r K k (\lambda (k1: K).(ex3_2 C T (\lambda (e0: +C).(\lambda (v: T).(eq C (CHead e k1 u0) (CHead e0 k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T u (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda +(_: T).(drop h0 (r k d) c e0))))) (let H16 \def (eq_ind_r T u (\lambda (t: +T).((eq nat (r k d0) (S d)) \to ((eq C c (CHead c k t)) \to (ex3_2 C T +(\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T t (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda +(_: T).(drop h0 (r k d) c e0))))))) H14 (lift h0 (r k d0) u0) H13) in (eq_ind +T (lift h0 (r k d0) u0) (\lambda (t: T).(ex3_2 C T (\lambda (e0: C).(\lambda +(v: T).(eq C (CHead e k u0) (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T t (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 +(r k d) c e0))))) (let H17 \def (f_equal nat nat (\lambda (e0: nat).(match e0 +with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H4) in (let H18 +\def (eq_ind nat d0 (\lambda (n: nat).((eq nat (r k n) (S d)) \to ((eq C c +(CHead c k (lift h0 (r k n) u0))) \to (ex3_2 C T (\lambda (e0: C).(\lambda +(v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift +h0 (r k n) u0) (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop +h0 (r k d) c e0))))))) H16 d H17) in (let H19 \def (eq_ind nat d0 (\lambda +(n: nat).(drop h0 (r k n) c e)) H15 d H17) in (eq_ind_r nat d (\lambda (n: +nat).(ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) (CHead +e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h0 (r k n) u0) (lift +h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))) +(ex3_2_intro C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) (CHead +e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h0 (r k d) u0) (lift +h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))) e +u0 (refl_equal C (CHead e k u0)) (refl_equal T (lift h0 (r k d) u0)) H19) d0 +H17)))) u H13)) k0 H9))))))))) H7)) H6)))))))))))) h y0 y x H1))) H0))) +H))))))). + +lemma drop_S: + \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: +nat).((drop h O c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: +C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to +(drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: +T).(\lambda (h: nat).(\lambda (H: (drop h O (CSort n) (CHead e (Bind b) +u))).(and3_ind (eq C (CHead e (Bind b) u) (CSort n)) (eq nat h O) (eq nat O +O) (drop (S h) O (CSort n) e) (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort +n))).(\lambda (H1: (eq nat h O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O +(\lambda (n0: nat).(drop (S n0) O (CSort n) e)) (let H3 \def (eq_ind C (CHead +e (Bind b) u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | +(CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind (drop (S O) O +(CSort n) e) H3)) h H1)))) (drop_gen_sort n h O (CHead e (Bind b) u) H))))))) +(\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: +nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 +e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: +T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) +(CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: +(drop O O (CHead c0 k t) (CHead e (Bind b) u))).(let H1 \def (f_equal C C +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | (CHead c1 _ _) +\Rightarrow c1])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead +c0 k t) (CHead e (Bind b) u) H0)) in ((let H2 \def (f_equal C K (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) +(CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e +(Bind b) u) H0)) in ((let H3 \def (f_equal C T (\lambda (e0: C).(match e0 +with [(CSort _) \Rightarrow t | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 k +t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) +H0)) in (\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq C c0 e)).(eq_ind C +c0 (\lambda (c1: C).(drop (S O) O (CHead c0 k t) c1)) (eq_ind_r K (Bind b) +(\lambda (k0: K).(drop (S O) O (CHead c0 k0 t) c0)) (drop_drop (Bind b) O c0 +c0 (drop_refl c0) t) k H4) e H5)))) H2)) H1))) (\lambda (n: nat).(\lambda (_: +(((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 +k t) e)))).(\lambda (H1: (drop (S n) O (CHead c0 k t) (CHead e (Bind b) +u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: +nat).(drop n0 O c0 e)) (H e u (r k n) (drop_gen_drop k c0 (CHead e (Bind b) +u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). + +theorem drop_mono: + \forall (c: C).(\forall (x1: C).(\forall (d: nat).(\forall (h: nat).((drop h +d c x1) \to (\forall (x2: C).((drop h d c x2) \to (eq C x1 x2))))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (x1: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 +x2) \to (eq C x1 x2)))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (d: +nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) x1)).(\lambda (x2: +C).(\lambda (H0: (drop h d (CSort n) x2)).(and3_ind (eq C x2 (CSort n)) (eq +nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H1: (eq C x2 (CSort +n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(and3_ind (eq C +x1 (CSort n)) (eq nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H4: (eq C x1 +(CSort n))).(\lambda (H5: (eq nat h O)).(\lambda (H6: (eq nat d O)).(eq_ind_r +C (CSort n) (\lambda (c0: C).(eq C x1 c0)) (let H7 \def (eq_ind nat h +(\lambda (n0: nat).(eq nat n0 O)) H2 O H5) in (let H8 \def (eq_ind nat d +(\lambda (n0: nat).(eq nat n0 O)) H3 O H6) in (eq_ind_r C (CSort n) (\lambda +(c0: C).(eq C c0 (CSort n))) (refl_equal C (CSort n)) x1 H4))) x2 H1)))) +(drop_gen_sort n h d x1 H))))) (drop_gen_sort n h d x2 H0))))))))) (\lambda +(c0: C).(\lambda (H: ((\forall (x1: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 x2) \to (eq C x1 +x2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (d: +nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c0 k t) +x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq C x1 x2)))))) +(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) x1) +\to (\forall (x2: C).((drop n O (CHead c0 k t) x2) \to (eq C x1 x2))))) +(\lambda (H0: (drop O O (CHead c0 k t) x1)).(\lambda (x2: C).(\lambda (H1: +(drop O O (CHead c0 k t) x2)).(eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C +x1 c1)) (eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C c1 (CHead c0 k t))) +(refl_equal C (CHead c0 k t)) x1 (drop_gen_refl (CHead c0 k t) x1 H0)) x2 +(drop_gen_refl (CHead c0 k t) x2 H1))))) (\lambda (n: nat).(\lambda (_: +(((drop n O (CHead c0 k t) x1) \to (\forall (x2: C).((drop n O (CHead c0 k t) +x2) \to (eq C x1 x2)))))).(\lambda (H1: (drop (S n) O (CHead c0 k t) +x1)).(\lambda (x2: C).(\lambda (H2: (drop (S n) O (CHead c0 k t) x2)).(H x1 O +(r k n) (drop_gen_drop k c0 x1 t n H1) x2 (drop_gen_drop k c0 x2 t n +H2))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n +(CHead c0 k t) x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq +C x1 x2))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c0 k t) +x1)).(\lambda (x2: C).(\lambda (H2: (drop h (S n) (CHead c0 k t) +x2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x2 (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x0: +C).(\lambda (x3: T).(\lambda (H3: (eq C x2 (CHead x0 k x3))).(\lambda (H4: +(eq T t (lift h (r k n) x3))).(\lambda (H5: (drop h (r k n) c0 +x0)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x1 (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x4: +C).(\lambda (x5: T).(\lambda (H6: (eq C x1 (CHead x4 k x5))).(\lambda (H7: +(eq T t (lift h (r k n) x5))).(\lambda (H8: (drop h (r k n) c0 x4)).(eq_ind_r +C (CHead x0 k x3) (\lambda (c1: C).(eq C x1 c1)) (let H9 \def (eq_ind C x1 +(\lambda (c1: C).(\forall (h0: nat).((drop h0 n (CHead c0 k t) c1) \to +(\forall (x6: C).((drop h0 n (CHead c0 k t) x6) \to (eq C c1 x6)))))) H0 +(CHead x4 k x5) H6) in (eq_ind_r C (CHead x4 k x5) (\lambda (c1: C).(eq C c1 +(CHead x0 k x3))) (let H10 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: +nat).((drop h0 n (CHead c0 k t0) (CHead x4 k x5)) \to (\forall (x6: C).((drop +h0 n (CHead c0 k t0) x6) \to (eq C (CHead x4 k x5) x6)))))) H9 (lift h (r k +n) x5) H7) in (let H11 \def (eq_ind T t (\lambda (t0: T).(eq T t0 (lift h (r +k n) x3))) H4 (lift h (r k n) x5) H7) in (let H12 \def (eq_ind T x5 (\lambda +(t0: T).(\forall (h0: nat).((drop h0 n (CHead c0 k (lift h (r k n) t0)) +(CHead x4 k t0)) \to (\forall (x6: C).((drop h0 n (CHead c0 k (lift h (r k n) +t0)) x6) \to (eq C (CHead x4 k t0) x6)))))) H10 x3 (lift_inj x5 x3 h (r k n) +H11)) in (eq_ind_r T x3 (\lambda (t0: T).(eq C (CHead x4 k t0) (CHead x0 k +x3))) (sym_eq C (CHead x0 k x3) (CHead x4 k x3) (sym_eq C (CHead x4 k x3) +(CHead x0 k x3) (sym_eq C (CHead x0 k x3) (CHead x4 k x3) (f_equal3 C K T C +CHead x0 x4 k k x3 x3 (H x0 (r k n) h H5 x4 H8) (refl_equal K k) (refl_equal +T x3))))) x5 (lift_inj x5 x3 h (r k n) H11))))) x1 H6)) x2 H3)))))) +(drop_gen_skip_l c0 x1 t h n k H1))))))) (drop_gen_skip_l c0 x2 t h n k +H2)))))))) d))))))) c). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/drop/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop/props.ma new file mode 100644 index 000000000..2e17e17a3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop/props.ma @@ -0,0 +1,594 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/drop/fwd.ma". + +lemma drop_skip_bind: + \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h +d c e) \to (\forall (b: B).(\forall (u: T).(drop h (S d) (CHead c (Bind b) +(lift h d u)) (CHead e (Bind b) u)))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda +(H: (drop h d c e)).(\lambda (b: B).(\lambda (u: T).(eq_ind nat (r (Bind b) +d) (\lambda (n: nat).(drop h (S d) (CHead c (Bind b) (lift h n u)) (CHead e +(Bind b) u))) (drop_skip (Bind b) h d c e H u) d (refl_equal nat d)))))))). + +lemma drop_skip_flat: + \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h +(S d) c e) \to (\forall (f: F).(\forall (u: T).(drop h (S d) (CHead c (Flat +f) (lift h (S d) u)) (CHead e (Flat f) u)))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda +(H: (drop h (S d) c e)).(\lambda (f: F).(\lambda (u: T).(eq_ind nat (r (Flat +f) d) (\lambda (n: nat).(drop h (S d) (CHead c (Flat f) (lift h n u)) (CHead +e (Flat f) u))) (drop_skip (Flat f) h d c e H u) (S d) (refl_equal nat (S +d))))))))). + +lemma drop_ctail: + \forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop +h d c1 c2) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k u c1) +(CTail k u c2)))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c c2) \to (\forall (k: K).(\forall (u: +T).(drop h d (CTail k u c) (CTail k u c2))))))))) (\lambda (n: nat).(\lambda +(c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) +c2)).(\lambda (k: K).(\lambda (u: T).(and3_ind (eq C c2 (CSort n)) (eq nat h +O) (eq nat d O) (drop h d (CTail k u (CSort n)) (CTail k u c2)) (\lambda (H0: +(eq C c2 (CSort n))).(\lambda (H1: (eq nat h O)).(\lambda (H2: (eq nat d +O)).(eq_ind_r nat O (\lambda (n0: nat).(drop n0 d (CTail k u (CSort n)) +(CTail k u c2))) (eq_ind_r nat O (\lambda (n0: nat).(drop O n0 (CTail k u +(CSort n)) (CTail k u c2))) (eq_ind_r C (CSort n) (\lambda (c: C).(drop O O +(CTail k u (CSort n)) (CTail k u c))) (drop_refl (CTail k u (CSort n))) c2 +H0) d H2) h H1)))) (drop_gen_sort n h d c2 H))))))))) (\lambda (c2: +C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c2 c3) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k +u c2) (CTail k u c3)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: +C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n +(CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u +(CHead c2 k t)) (CTail k0 u c3))))))) (\lambda (h: nat).(nat_ind (\lambda (n: +nat).((drop n O (CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop +n O (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)))))) (\lambda (H: (drop O O +(CHead c2 k t) c3)).(\lambda (k0: K).(\lambda (u: T).(eq_ind C (CHead c2 k t) +(\lambda (c: C).(drop O O (CTail k0 u (CHead c2 k t)) (CTail k0 u c))) +(drop_refl (CTail k0 u (CHead c2 k t))) c3 (drop_gen_refl (CHead c2 k t) c3 +H))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to +(\forall (k0: K).(\forall (u: T).(drop n O (CTail k0 u (CHead c2 k t)) (CTail +k0 u c3))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (k0: +K).(\lambda (u: T).(drop_drop k n (CTail k0 u c2) (CTail k0 u c3) (IHc c3 O +(r k n) (drop_gen_drop k c2 c3 t n H0) k0 u) t)))))) h)) (\lambda (n: +nat).(\lambda (H: ((\forall (h: nat).((drop h n (CHead c2 k t) c3) \to +(\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) (CTail +k0 u c3)))))))).(\lambda (h: nat).(\lambda (H0: (drop h (S n) (CHead c2 k t) +c3)).(\lambda (k0: K).(\lambda (u: T).(ex3_2_ind C T (\lambda (e: C).(\lambda +(v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t +(lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c2 e))) +(drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H1: (eq C c3 (CHead x0 k x1))).(\lambda (H2: +(eq T t (lift h (r k n) x1))).(\lambda (H3: (drop h (r k n) c2 x0)).(let H4 +\def (eq_ind C c3 (\lambda (c: C).(\forall (h0: nat).((drop h0 n (CHead c2 k +t) c) \to (\forall (k1: K).(\forall (u0: T).(drop h0 n (CTail k1 u0 (CHead c2 +k t)) (CTail k1 u0 c))))))) H (CHead x0 k x1) H1) in (eq_ind_r C (CHead x0 k +x1) (\lambda (c: C).(drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u +c))) (let H5 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: nat).((drop h0 n +(CHead c2 k t0) (CHead x0 k x1)) \to (\forall (k1: K).(\forall (u0: T).(drop +h0 n (CTail k1 u0 (CHead c2 k t0)) (CTail k1 u0 (CHead x0 k x1)))))))) H4 +(lift h (r k n) x1) H2) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: +T).(drop h (S n) (CTail k0 u (CHead c2 k t0)) (CTail k0 u (CHead x0 k x1)))) +(drop_skip k h n (CTail k0 u c2) (CTail k0 u x0) (IHc x0 (r k n) h H3 k0 u) +x1) t H2)) c3 H1))))))) (drop_gen_skip_l c2 c3 t h n k H0)))))))) d))))))) +c1). + +theorem drop_conf_lt: + \forall (k: K).(\forall (i: nat).(\forall (u: T).(\forall (c0: C).(\forall +(c: C).((drop i O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: +nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop i O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop +h (r k d) c0 e0))))))))))))) +\def + \lambda (k: K).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (u: +T).(\forall (c0: C).(\forall (c: C).((drop n O c (CHead c0 k u)) \to (\forall +(e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus n d)) c e) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) +(\lambda (v: T).(\lambda (e0: C).(drop n O e (CHead e0 k v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) (\lambda (u: +T).(\lambda (c0: C).(\lambda (c: C).(\lambda (H: (drop O O c (CHead c0 k +u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop +h (S (plus O d)) c e)).(let H1 \def (eq_ind C c (\lambda (c1: C).(drop h (S +(plus O d)) c1 e)) H0 (CHead c0 k u) (drop_gen_refl c (CHead c0 k u) H)) in +(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k (plus O d)) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus O d)) c0 e0))) (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: +T).(\lambda (e0: C).(drop O O e (CHead e0 k v)))) (\lambda (_: T).(\lambda +(e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H2: (eq C e (CHead x0 k x1))).(\lambda (H3: (eq T u (lift h (r k (plus O d)) +x1))).(\lambda (H4: (drop h (r k (plus O d)) c0 x0)).(eq_ind_r C (CHead x0 k +x1) (\lambda (c1: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift +h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O c1 (CHead e0 k +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (eq_ind_r T +(lift h (r k (plus O d)) x1) (\lambda (t: T).(ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T t (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda +(e0: C).(drop h (r k d) c0 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda +(_: C).(eq T (lift h (r k (plus O d)) x1) (lift h (r k d) v)))) (\lambda (v: +T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x1 x0 (refl_equal T (lift h (r k +d) x1)) (drop_refl (CHead x0 k x1)) H4) u H3) e H2)))))) (drop_gen_skip_l c0 +e u h (plus O d) k H1))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall +(u: T).(\forall (c0: C).(\forall (c: C).((drop i0 O c (CHead c0 k u)) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i0 d)) +c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) +v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O e (CHead e0 k v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))))))).(\lambda +(u: T).(\lambda (c0: C).(\lambda (c: C).(C_ind (\lambda (c1: C).((drop (S i0) +O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0)))))))))) (\lambda (n: nat).(\lambda (_: (drop (S +i0) O (CSort n) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (H1: (drop h (S (plus (S i0) d)) (CSort n) e)).(and3_ind +(eq C e (CSort n)) (eq nat h O) (eq nat (S (plus (S i0) d)) O) (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: +T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (_: (eq C e (CSort +n))).(\lambda (_: (eq nat h O)).(\lambda (H4: (eq nat (S (plus (S i0) d)) +O)).(let H5 \def (eq_ind nat (S (plus (S i0) d)) (\lambda (ee: nat).(match ee +with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) +(\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) H5))))) (drop_gen_sort n h +(S (plus (S i0) d)) e H1)))))))) (\lambda (c1: C).(\lambda (H0: (((drop (S +i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0))))))))))).(\lambda (k0: K).(K_ind (\lambda (k1: +K).(\forall (t: T).((drop (S i0) O (CHead c1 k1 t) (CHead c0 k u)) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) +d)) (CHead c1 k1 t) e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e +(CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 +e0))))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O +(CHead c1 (Bind b) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 +(Bind b) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e +(CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r +(Bind b) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r +(Bind b) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S +i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 +e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 +(Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) (plus (S i0) d)) +x1))).(\lambda (H5: (drop h (r (Bind b) (plus (S i0) d)) c1 x0)).(eq_ind_r C +(CHead x0 (Bind b) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda +(_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop +(S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k +d) c0 e0))))) (let H6 \def (H u c0 c1 (drop_gen_drop (Bind b) c1 (CHead c0 k +u) t i0 H1) x0 h d H5) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq +T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O x0 +(CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) +(\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead +e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) +(\lambda (x2: T).(\lambda (x3: C).(\lambda (H7: (eq T u (lift h (r k d) +x2))).(\lambda (H8: (drop i0 O x0 (CHead x3 k x2))).(\lambda (H9: (drop h (r +k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h +(r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind +b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 +e0))) x2 x3 H7 (drop_drop (Bind b) i0 x0 (CHead x3 k x2) H8 x1) H9)))))) H6)) +e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Bind b) H2))))))))) +(\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Flat +f) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Flat f) t) +e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat +f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus (S +i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus (S +i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h +(r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Flat f) +x1))).(\lambda (_: (eq T t (lift h (r (Flat f) (plus (S i0) d)) +x1))).(\lambda (H5: (drop h (r (Flat f) (plus (S i0) d)) c1 x0)).(eq_ind_r C +(CHead x0 (Flat f) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda +(_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop +(S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k +d) c0 e0))))) (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h +(r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O x0 (CHead e0 k +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: +T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: +T).(\lambda (x3: C).(\lambda (H6: (eq T u (lift h (r k d) x2))).(\lambda (H7: +(drop (S i0) O x0 (CHead x3 k x2))).(\lambda (H8: (drop h (r k d) c0 +x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) +v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) +(CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) +x2 x3 H6 (drop_drop (Flat f) i0 x0 (CHead x3 k x2) H7 x1) H8)))))) (H0 +(drop_gen_drop (Flat f) c1 (CHead c0 k u) t i0 H1) x0 h d H5)) e H3)))))) +(drop_gen_skip_l c1 e t h (plus (S i0) d) (Flat f) H2))))))))) k0)))) c)))))) +i)). + +theorem drop_conf_ge: + \forall (i: nat).(\forall (a: C).(\forall (c: C).((drop i O c a) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le +(plus d h) i) \to (drop (minus i h) O e a))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (a: C).(\forall (c: +C).((drop n O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c e) \to ((le (plus d h) n) \to (drop (minus n h) O e +a)))))))))) (\lambda (a: C).(\lambda (c: C).(\lambda (H: (drop O O c +a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h +d c e)).(\lambda (H1: (le (plus d h) O)).(let H2 \def (eq_ind C c (\lambda +(c0: C).(drop h d c0 e)) H0 a (drop_gen_refl c a H)) in (let H_y \def +(le_n_O_eq (plus d h) H1) in (land_ind (eq nat d O) (eq nat h O) (drop (minus +O h) O e a) (\lambda (H3: (eq nat d O)).(\lambda (H4: (eq nat h O)).(let H5 +\def (eq_ind nat d (\lambda (n: nat).(drop h n a e)) H2 O H3) in (let H6 \def +(eq_ind nat h (\lambda (n: nat).(drop n O a e)) H5 O H4) in (eq_ind_r nat O +(\lambda (n: nat).(drop (minus O n) O e a)) (eq_ind C a (\lambda (c0: +C).(drop (minus O O) O c0 a)) (drop_refl a) e (drop_gen_refl a e H6)) h +H4))))) (plus_O d h (sym_eq nat O (plus d h) H_y))))))))))))) (\lambda (i0: +nat).(\lambda (H: ((\forall (a: C).(\forall (c: C).((drop i0 O c a) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le +(plus d h) i0) \to (drop (minus i0 h) O e a))))))))))).(\lambda (a: +C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop (S i0) O c0 a) \to (\forall +(e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d +h) (S i0)) \to (drop (minus (S i0) h) O e a)))))))) (\lambda (n: +nat).(\lambda (H0: (drop (S i0) O (CSort n) a)).(\lambda (e: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (drop h d (CSort n) e)).(\lambda (H2: +(le (plus d h) (S i0))).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat d +O) (drop (minus (S i0) h) O e a) (\lambda (H3: (eq C e (CSort n))).(\lambda +(H4: (eq nat h O)).(\lambda (H5: (eq nat d O)).(and3_ind (eq C a (CSort n)) +(eq nat (S i0) O) (eq nat O O) (drop (minus (S i0) h) O e a) (\lambda (H6: +(eq C a (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O +O)).(let H9 \def (eq_ind nat d (\lambda (n0: nat).(le (plus n0 h) (S i0))) H2 +O H5) in (let H10 \def (eq_ind nat h (\lambda (n0: nat).(le (plus O n0) (S +i0))) H9 O H4) in (eq_ind_r nat O (\lambda (n0: nat).(drop (minus (S i0) n0) +O e a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O c0 +a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) +c0)) (let H11 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (drop +(minus (S i0) O) O (CSort n) (CSort n)) H11)) a H6) e H3) h H4)))))) +(drop_gen_sort n (S i0) O a H0))))) (drop_gen_sort n h d e H1))))))))) +(\lambda (c0: C).(\lambda (H0: (((drop (S i0) O c0 a) \to (\forall (e: +C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) +(S i0)) \to (drop (minus (S i0) h) O e a))))))))).(\lambda (k: K).(K_ind +(\lambda (k0: K).(\forall (t: T).((drop (S i0) O (CHead c0 k0 t) a) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d (CHead c0 k0 +t) e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))) +(\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Bind +b) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: +(drop h d (CHead c0 (Bind b) t) e)).(\lambda (H3: (le (plus d h) (S +i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Bind b) t) e) \to ((le +(plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h +O (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind +(\lambda (n: nat).((drop n O (CHead c0 (Bind b) t) e) \to ((le (plus O n) (S +i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 +(Bind b) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 +(Bind b) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Bind +b) i0 c0 a (drop_gen_drop (Bind b) c0 a t i0 H1) t) e (drop_gen_refl (CHead +c0 (Bind b) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead +c0 (Bind b) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O +e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Bind b) t) e)).(\lambda (H7: +(le (plus O (S h0)) (S i0))).(H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) e +h0 O (drop_gen_drop (Bind b) c0 e t h0 H6) (le_S_n (plus O h0) i0 H7)))))) h +H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Bind b) t) +e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e +a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Bind b) t) e)).(\lambda (H5: +(le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: +T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t +(lift h (r (Bind b) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r +(Bind b) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H6: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t +(lift h (r (Bind b) d0) x1))).(\lambda (H8: (drop h (r (Bind b) d0) c0 +x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c1: C).(drop (minus (S i0) +h) O c1 a)) (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead +x0 (Bind b) x1) a)) (drop_drop (Bind b) (minus i0 h) x0 a (H a c0 +(drop_gen_drop (Bind b) c0 a t i0 H1) x0 h d0 H8 (le_S_n (plus d0 h) i0 H5)) +x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus +d0 h) i0 H5)))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Bind b) H4)))))) d +H2 H3))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O +(CHead c0 (Flat f) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H2: (drop h d (CHead c0 (Flat f) t) e)).(\lambda (H3: (le +(plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Flat f) +t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) +(\lambda (H4: (drop h O (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus O +h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Flat f) t) e) +\to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda +(H6: (drop O O (CHead c0 (Flat f) t) e)).(\lambda (_: (le (plus O O) (S +i0))).(eq_ind C (CHead c0 (Flat f) t) (\lambda (c1: C).(drop (minus (S i0) O) +O c1 a)) (drop_drop (Flat f) i0 c0 a (drop_gen_drop (Flat f) c0 a t i0 H1) t) +e (drop_gen_refl (CHead c0 (Flat f) t) e H6)))) (\lambda (h0: nat).(\lambda +(_: (((drop h0 O (CHead c0 (Flat f) t) e) \to ((le (plus O h0) (S i0)) \to +(drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 +(Flat f) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H0 (drop_gen_drop +(Flat f) c0 a t i0 H1) e (S h0) O (drop_gen_drop (Flat f) c0 e t h0 H6) +H7))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 +(Flat f) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e +a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Flat f) t) e)).(\lambda (H5: +(le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: +T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t +(lift h (r (Flat f) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r +(Flat f) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H6: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t +(lift h (r (Flat f) d0) x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 +x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) +h) O c1 a)) (let H9 \def (eq_ind_r nat (minus (S i0) h) (\lambda (n: +nat).(drop n O x0 a)) (H0 (drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) +H8 H5) (S (minus i0 h)) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n +(plus d0 h) i0 H5)))) in (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop +n O (CHead x0 (Flat f) x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) +(minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 +h) i0 H5))))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 +H3))))))))) k)))) c))))) i). + +theorem drop_conf_rev: + \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to +(\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: +C).(drop j O c1 c2)) (\lambda (c1: C).(drop i j c1 e1))))))))) +\def + \lambda (j: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (e2: +C).((drop n O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) +\to (ex2 C (\lambda (c1: C).(drop n O c1 c2)) (\lambda (c1: C).(drop i n c1 +e1)))))))))) (\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop O O e1 +e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(let +H1 \def (eq_ind_r C e2 (\lambda (c: C).(drop i O c2 c)) H0 e1 (drop_gen_refl +e1 e2 H)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 c2)) (\lambda (c1: +C).(drop i O c1 e1)) c2 (drop_refl c2) H1)))))))) (\lambda (j0: nat).(\lambda +(IHj: ((\forall (e1: C).(\forall (e2: C).((drop j0 O e1 e2) \to (\forall (c2: +C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j0 O +c1 c2)) (\lambda (c1: C).(drop i j0 c1 e1))))))))))).(\lambda (e1: C).(C_ind +(\lambda (c: C).(\forall (e2: C).((drop (S j0) O c e2) \to (\forall (c2: +C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop (S +j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 c))))))))) (\lambda (n: +nat).(\lambda (e2: C).(\lambda (H: (drop (S j0) O (CSort n) e2)).(\lambda +(c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(and3_ind (eq C e2 +(CSort n)) (eq nat (S j0) O) (eq nat O O) (ex2 C (\lambda (c1: C).(drop (S +j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) (\lambda (H1: +(eq C e2 (CSort n))).(\lambda (H2: (eq nat (S j0) O)).(\lambda (_: (eq nat O +O)).(let H4 \def (eq_ind C e2 (\lambda (c: C).(drop i O c2 c)) H0 (CSort n) +H1) in (let H5 \def (eq_ind nat (S j0) (\lambda (ee: nat).(match ee with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C +(\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 +(CSort n)))) H5)))))) (drop_gen_sort n (S j0) O e2 H)))))))) (\lambda (e2: +C).(\lambda (IHe1: ((\forall (e3: C).((drop (S j0) O e2 e3) \to (\forall (c2: +C).(\forall (i: nat).((drop i O c2 e3) \to (ex2 C (\lambda (c1: C).(drop (S +j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)))))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (e3: C).(\lambda (H: (drop (S j0) O (CHead e2 k +t) e3)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 +e3)).(K_ind (\lambda (k0: K).((drop (r k0 j0) O e2 e3) \to (ex2 C (\lambda +(c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 +k0 t)))))) (\lambda (b: B).(\lambda (H1: (drop (r (Bind b) j0) O e2 e3)).(let +H_x \def (IHj e2 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda +(c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e2)) (ex2 C +(\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 +(CHead e2 (Bind b) t)))) (\lambda (x: C).(\lambda (H3: (drop j0 O x +c2)).(\lambda (H4: (drop i j0 x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S +j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t))) +(CHead x (Bind b) (lift i (r (Bind b) j0) t)) (drop_drop (Bind b) j0 x c2 H3 +(lift i (r (Bind b) j0) t)) (drop_skip (Bind b) i j0 x e2 H4 t))))) H2))))) +(\lambda (f: F).(\lambda (H1: (drop (r (Flat f) j0) O e2 e3)).(let H_x \def +(IHe1 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop +(S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)) (ex2 C (\lambda (c1: +C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat +f) t)))) (\lambda (x: C).(\lambda (H3: (drop (S j0) O x c2)).(\lambda (H4: +(drop i (S j0) x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) +(\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t))) (CHead x (Flat f) +(lift i (r (Flat f) j0) t)) (drop_drop (Flat f) j0 x c2 H3 (lift i (r (Flat +f) j0) t)) (drop_skip (Flat f) i j0 x e2 H4 t))))) H2))))) k (drop_gen_drop k +e2 e3 t j0 H))))))))))) e1)))) j). + +theorem drop_trans_le: + \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall +(c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O +c2 e2) \to (ex2 C (\lambda (e1: C).(drop i O c1 e1)) (\lambda (e1: C).(drop h +(minus d i) e1 e2))))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (d: nat).((le n d) \to +(\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to +(\forall (e2: C).((drop n O c2 e2) \to (ex2 C (\lambda (e1: C).(drop n O c1 +e1)) (\lambda (e1: C).(drop h (minus d n) e1 e2)))))))))))) (\lambda (d: +nat).(\lambda (_: (le O d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: +nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H1: (drop O O +c2 e2)).(let H2 \def (eq_ind C c2 (\lambda (c: C).(drop h d c1 c)) H0 e2 +(drop_gen_refl c2 e2 H1)) in (eq_ind nat d (\lambda (n: nat).(ex2 C (\lambda +(e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h n e1 e2)))) (ex_intro2 C +(\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h d e1 e2)) c1 +(drop_refl c1) H2) (minus d O) (minus_n_O d))))))))))) (\lambda (i0: +nat).(\lambda (IHi: ((\forall (d: nat).((le i0 d) \to (\forall (c1: +C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: +C).((drop i0 O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i0 O c1 e1)) (\lambda +(e1: C).(drop h (minus d i0) e1 e2))))))))))))).(\lambda (d: nat).(nat_ind +(\lambda (n: nat).((le (S i0) n) \to (\forall (c1: C).(\forall (c2: +C).(\forall (h: nat).((drop h n c1 c2) \to (\forall (e2: C).((drop (S i0) O +c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: +C).(drop h (minus n (S i0)) e1 e2))))))))))) (\lambda (H: (le (S i0) +O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (_: (drop h +O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(ex2_ind nat +(\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le i0 n)) (ex2 C +(\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S +i0)) e1 e2))) (\lambda (x: nat).(\lambda (H2: (eq nat O (S x))).(\lambda (_: +(le i0 x)).(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O +\Rightarrow True | (S _) \Rightarrow False])) I (S x) H2) in (False_ind (ex2 +C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O +(S i0)) e1 e2))) H4))))) (le_gen_S i0 O H))))))))) (\lambda (d0: +nat).(\lambda (_: (((le (S i0) d0) \to (\forall (c1: C).(\forall (c2: +C).(\forall (h: nat).((drop h d0 c1 c2) \to (\forall (e2: C).((drop (S i0) O +c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: +C).(drop h (minus d0 (S i0)) e1 e2)))))))))))).(\lambda (H: (le (S i0) (S +d0))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: +nat).((drop h (S d0) c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to +(ex2 C (\lambda (e1: C).(drop (S i0) O c e1)) (\lambda (e1: C).(drop h (minus +(S d0) (S i0)) e1 e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (h: +nat).(\lambda (H0: (drop h (S d0) (CSort n) c2)).(\lambda (e2: C).(\lambda +(H1: (drop (S i0) O c2 e2)).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq +nat (S d0) O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda +(e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H2: (eq C c2 (CSort +n))).(\lambda (_: (eq nat h O)).(\lambda (_: (eq nat (S d0) O)).(let H5 \def +(eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CSort n) H2) in +(and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (ex2 C (\lambda +(e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) +(S i0)) e1 e2))) (\lambda (H6: (eq C e2 (CSort n))).(\lambda (H7: (eq nat (S +i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(ex2 +C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h +(minus (S d0) (S i0)) e1 c)))) (let H9 \def (eq_ind nat (S i0) (\lambda (ee: +nat).(match ee with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) +in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda +(e1: C).(drop h (minus (S d0) (S i0)) e1 (CSort n)))) H9)) e2 H6)))) +(drop_gen_sort n (S i0) O e2 H5)))))) (drop_gen_sort n h (S d0) c2 H0)))))))) +(\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (h: nat).((drop h +(S d0) c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda +(e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) +e1 e2)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: +T).(\forall (c3: C).(\forall (h: nat).((drop h (S d0) (CHead c2 k0 t) c3) \to +(\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S +i0) O (CHead c2 k0 t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 +e2)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: +nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Bind b) t) c3)).(\lambda (e2: +C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: +C).(\lambda (v: T).(eq C c3 (CHead e (Bind b) v)))) (\lambda (_: C).(\lambda +(v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e: C).(\lambda (_: +T).(drop h (r (Bind b) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O +(CHead c2 (Bind b) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 +e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 +(Bind b) x1))).(\lambda (H3: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda +(H4: (drop h (r (Bind b) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: +C).(drop (S i0) O c e2)) H1 (CHead x0 (Bind b) x1) H2) in (eq_ind_r T (lift h +(r (Bind b) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O +(CHead c2 (Bind b) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 +e2)))) (ex2_ind C (\lambda (e1: C).(drop i0 O c2 e1)) (\lambda (e1: C).(drop +h (minus d0 i0) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 +(Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S +d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop i0 O c2 x)).(\lambda +(H7: (drop h (minus d0 i0) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) +O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop +h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Bind b) i0 c2 x H6 (lift h (r +(Bind b) d0) x1)) H7)))) (IHi d0 (le_S_n i0 d0 H) c2 x0 h H4 e2 +(drop_gen_drop (Bind b) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 +t h d0 (Bind b) H0))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (c3: +C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Flat f) t) +c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T +(\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Flat f) v)))) (\lambda (_: +C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r (Flat f) d0) c2 e))) (ex2 C (\lambda (e1: +C).(drop (S i0) O (CHead c2 (Flat f) t) e1)) (\lambda (e1: C).(drop h (minus +(S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C +c3 (CHead x0 (Flat f) x1))).(\lambda (H3: (eq T t (lift h (r (Flat f) d0) +x1))).(\lambda (H4: (drop h (r (Flat f) d0) c2 x0)).(let H5 \def (eq_ind C c3 +(\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Flat f) x1) H2) in +(eq_ind_r T (lift h (r (Flat f) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: +C).(drop (S i0) O (CHead c2 (Flat f) t0) e1)) (\lambda (e1: C).(drop h (minus +(S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop (S i0) O c2 e1)) +(\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) (ex2 C (\lambda (e1: +C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) +(\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: +C).(\lambda (H6: (drop (S i0) O c2 x)).(\lambda (H7: (drop h (minus (S d0) (S +i0)) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) +(lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S +i0)) e1 e2)) x (drop_drop (Flat f) i0 c2 x H6 (lift h (r (Flat f) d0) x1)) +H7)))) (IHc x0 h H4 e2 (drop_gen_drop (Flat f) x0 e2 x1 i0 H5))) t H3))))))) +(drop_gen_skip_l c2 c3 t h d0 (Flat f) H0))))))))) k)))) c1))))) d)))) i). + +theorem drop_trans_ge: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O c2 +e2) \to ((le d i) \to (drop (plus i h) O c1 e2))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c2: +C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: +C).((drop n O c2 e2) \to ((le d n) \to (drop (plus n h) O c1 e2)))))))))) +(\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: +nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (drop O O +c2 e2)).(\lambda (H1: (le d O)).(eq_ind C c2 (\lambda (c: C).(drop (plus O h) +O c1 c)) (let H_y \def (le_n_O_eq d H1) in (let H2 \def (eq_ind_r nat d +(\lambda (n: nat).(drop h n c1 c2)) H O H_y) in H2)) e2 (drop_gen_refl c2 e2 +H0)))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (c1: C).(\forall +(c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall +(e2: C).((drop i0 O c2 e2) \to ((le d i0) \to (drop (plus i0 h) O c1 +e2))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: +C).(\forall (d: nat).(\forall (h: nat).((drop h d c c2) \to (\forall (e2: +C).((drop (S i0) O c2 e2) \to ((le d (S i0)) \to (drop (plus (S i0) h) O c +e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: +nat).(\lambda (H: (drop h d (CSort n) c2)).(\lambda (e2: C).(\lambda (H0: +(drop (S i0) O c2 e2)).(\lambda (H1: (le d (S i0))).(and3_ind (eq C c2 (CSort +n)) (eq nat h O) (eq nat d O) (drop (S (plus i0 h)) O (CSort n) e2) (\lambda +(H2: (eq C c2 (CSort n))).(\lambda (H3: (eq nat h O)).(\lambda (H4: (eq nat d +O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S (plus i0 n0)) O (CSort n) +e2)) (let H5 \def (eq_ind nat d (\lambda (n0: nat).(le n0 (S i0))) H1 O H4) +in (let H6 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CSort +n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop +(S (plus i0 O)) O (CSort n) e2) (\lambda (H7: (eq C e2 (CSort n))).(\lambda +(H8: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) +(\lambda (c: C).(drop (S (plus i0 O)) O (CSort n) c)) (let H10 \def (eq_ind +nat (S i0) (\lambda (ee: nat).(match ee with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H8) in (False_ind (drop (S (plus i0 O)) O (CSort n) +(CSort n)) H10)) e2 H7)))) (drop_gen_sort n (S i0) O e2 H6)))) h H3)))) +(drop_gen_sort n h d c2 H)))))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall +(c3: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 c3) \to (\forall +(e2: C).((drop (S i0) O c3 e2) \to ((le d (S i0)) \to (drop (S (plus i0 h)) O +c2 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (d: +nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c2 k t) +c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le n (S i0)) \to (drop +(S (plus i0 h)) O (CHead c2 k t) e2))))))) (\lambda (h: nat).(nat_ind +(\lambda (n: nat).((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop +(S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) +e2)))))) (\lambda (H: (drop O O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda +(H0: (drop (S i0) O c3 e2)).(\lambda (_: (le O (S i0))).(let H2 \def +(eq_ind_r C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead c2 k t) +(drop_gen_refl (CHead c2 k t) c3 H)) in (eq_ind nat i0 (\lambda (n: +nat).(drop (S n) O (CHead c2 k t) e2)) (drop_drop k i0 c2 e2 (drop_gen_drop k +c2 e2 t i0 H2) t) (plus i0 O) (plus_n_O i0))))))) (\lambda (n: nat).(\lambda +(_: (((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 +e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) +e2))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (e2: +C).(\lambda (H1: (drop (S i0) O c3 e2)).(\lambda (H2: (le O (S i0))).(eq_ind +nat (S (plus i0 n)) (\lambda (n0: nat).(drop (S n0) O (CHead c2 k t) e2)) +(drop_drop k (S (plus i0 n)) c2 e2 (eq_ind_r nat (S (r k (plus i0 n))) +(\lambda (n0: nat).(drop n0 O c2 e2)) (eq_ind_r nat (plus i0 (r k n)) +(\lambda (n0: nat).(drop (S n0) O c2 e2)) (IHc c3 O (r k n) (drop_gen_drop k +c2 c3 t n H0) e2 H1 H2) (r k (plus i0 n)) (r_plus_sym k i0 n)) (r k (S (plus +i0 n))) (r_S k (plus i0 n))) t) (plus i0 (S n)) (plus_n_Sm i0 n)))))))) h)) +(\lambda (d0: nat).(\lambda (IHd: ((\forall (h: nat).((drop h d0 (CHead c2 k +t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d0 (S i0)) \to +(drop (S (plus i0 h)) O (CHead c2 k t) e2)))))))).(\lambda (h: nat).(\lambda +(H: (drop h (S d0) (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop +(S i0) O c3 e2)).(\lambda (H1: (le (S d0) (S i0))).(ex3_2_ind C T (\lambda +(e: C).(\lambda (v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T t (lift h (r k d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r +k d0) c2 e))) (drop (S (plus i0 h)) O (CHead c2 k t) e2) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 k x1))).(\lambda (H3: +(eq T t (lift h (r k d0) x1))).(\lambda (H4: (drop h (r k d0) c2 x0)).(let H5 +\def (eq_ind C c3 (\lambda (c: C).(\forall (h0: nat).((drop h0 d0 (CHead c2 k +t) c) \to (\forall (e3: C).((drop (S i0) O c e3) \to ((le d0 (S i0)) \to +(drop (S (plus i0 h0)) O (CHead c2 k t) e3))))))) IHd (CHead x0 k x1) H2) in +(let H6 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead x0 +k x1) H2) in (let H7 \def (eq_ind T t (\lambda (t0: T).(\forall (h0: +nat).((drop h0 d0 (CHead c2 k t0) (CHead x0 k x1)) \to (\forall (e3: +C).((drop (S i0) O (CHead x0 k x1) e3) \to ((le d0 (S i0)) \to (drop (S (plus +i0 h0)) O (CHead c2 k t0) e3))))))) H5 (lift h (r k d0) x1) H3) in (eq_ind_r +T (lift h (r k d0) x1) (\lambda (t0: T).(drop (S (plus i0 h)) O (CHead c2 k +t0) e2)) (drop_drop k (plus i0 h) c2 e2 (K_ind (\lambda (k0: K).((drop h (r +k0 d0) c2 x0) \to ((drop (r k0 i0) O x0 e2) \to (drop (r k0 (plus i0 h)) O c2 +e2)))) (\lambda (b: B).(\lambda (H8: (drop h (r (Bind b) d0) c2 x0)).(\lambda +(H9: (drop (r (Bind b) i0) O x0 e2)).(IHi c2 x0 (r (Bind b) d0) h H8 e2 H9 +(le_S_n (r (Bind b) d0) i0 H1))))) (\lambda (f: F).(\lambda (H8: (drop h (r +(Flat f) d0) c2 x0)).(\lambda (H9: (drop (r (Flat f) i0) O x0 e2)).(IHc x0 (r +(Flat f) d0) h H8 e2 H9 H1)))) k H4 (drop_gen_drop k x0 e2 x1 i0 H6)) (lift h +(r k d0) x1)) t H3))))))))) (drop_gen_skip_l c2 c3 t h d0 k H))))))))) +d))))))) c1)))) i). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/drop1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/defs.ma new file mode 100644 index 000000000..629dba9cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/defs.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/drop/defs.ma". + +include "basic_1A/lift1/defs.ma". + +inductive drop1: PList \to (C \to (C \to Prop)) \def +| drop1_nil: \forall (c: C).(drop1 PNil c c) +| drop1_cons: \forall (c1: C).(\forall (c2: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c1 c2) \to (\forall (c3: C).(\forall (hds: PList).((drop1 hds +c2 c3) \to (drop1 (PCons h d hds) c1 c3)))))))). + +rec definition ptrans (hds: PList) on hds: nat \to PList \def \lambda (i: +nat).(match hds with [PNil \Rightarrow PNil | (PCons h d hds0) \Rightarrow +(let j \def (trans hds0 i) in (let q \def (ptrans hds0 i) in (match (blt j d) +with [true \Rightarrow (PCons h (minus d (S j)) q) | false \Rightarrow +q])))]). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/drop1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/fwd.ma new file mode 100644 index 000000000..33ff6983b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/fwd.ma @@ -0,0 +1,81 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/drop1/defs.ma". + +implied rec lemma drop1_ind (P: (PList \to (C \to (C \to Prop)))) (f: +(\forall (c: C).(P PNil c c))) (f0: (\forall (c1: C).(\forall (c2: +C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c2) \to (\forall (c3: +C).(\forall (hds: PList).((drop1 hds c2 c3) \to ((P hds c2 c3) \to (P (PCons +h d hds) c1 c3))))))))))) (p: PList) (c: C) (c0: C) (d: drop1 p c c0) on d: P +p c c0 \def match d with [(drop1_nil c1) \Rightarrow (f c1) | (drop1_cons c1 +c2 h d0 d1 c3 hds d2) \Rightarrow (f0 c1 c2 h d0 d1 c3 hds d2 ((drop1_ind P f +f0) hds c2 c3 d2))]. + +lemma drop1_gen_pnil: + \forall (c1: C).(\forall (c2: C).((drop1 PNil c1 c2) \to (eq C c1 c2))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c1 c2)).(insert_eq +PList PNil (\lambda (p: PList).(drop1 p c1 c2)) (\lambda (_: PList).(eq C c1 +c2)) (\lambda (y: PList).(\lambda (H0: (drop1 y c1 c2)).(drop1_ind (\lambda +(p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to (eq C c +c0))))) (\lambda (c: C).(\lambda (_: (eq PList PNil PNil)).(refl_equal C c))) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (_: (drop h d c3 c4)).(\lambda (c5: C).(\lambda (hds: +PList).(\lambda (_: (drop1 hds c4 c5)).(\lambda (_: (((eq PList hds PNil) \to +(eq C c4 c5)))).(\lambda (H4: (eq PList (PCons h d hds) PNil)).(let H5 \def +(eq_ind PList (PCons h d hds) (\lambda (ee: PList).(match ee with [PNil +\Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H4) in +(False_ind (eq C c3 c5) H5)))))))))))) y c1 c2 H0))) H))). + +lemma drop1_gen_pcons: + \forall (c1: C).(\forall (c3: C).(\forall (hds: PList).(\forall (h: +nat).(\forall (d: nat).((drop1 (PCons h d hds) c1 c3) \to (ex2 C (\lambda +(c2: C).(drop h d c1 c2)) (\lambda (c2: C).(drop1 hds c2 c3)))))))) +\def + \lambda (c1: C).(\lambda (c3: C).(\lambda (hds: PList).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (drop1 (PCons h d hds) c1 c3)).(insert_eq +PList (PCons h d hds) (\lambda (p: PList).(drop1 p c1 c3)) (\lambda (_: +PList).(ex2 C (\lambda (c2: C).(drop h d c1 c2)) (\lambda (c2: C).(drop1 hds +c2 c3)))) (\lambda (y: PList).(\lambda (H0: (drop1 y c1 c3)).(drop1_ind +(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p (PCons h d +hds)) \to (ex2 C (\lambda (c2: C).(drop h d c c2)) (\lambda (c2: C).(drop1 +hds c2 c0))))))) (\lambda (c: C).(\lambda (H1: (eq PList PNil (PCons h d +hds))).(let H2 \def (eq_ind PList PNil (\lambda (ee: PList).(match ee with +[PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons h d hds) +H1) in (False_ind (ex2 C (\lambda (c2: C).(drop h d c c2)) (\lambda (c2: +C).(drop1 hds c2 c))) H2)))) (\lambda (c2: C).(\lambda (c4: C).(\lambda (h0: +nat).(\lambda (d0: nat).(\lambda (H1: (drop h0 d0 c2 c4)).(\lambda (c5: +C).(\lambda (hds0: PList).(\lambda (H2: (drop1 hds0 c4 c5)).(\lambda (H3: +(((eq PList hds0 (PCons h d hds)) \to (ex2 C (\lambda (c6: C).(drop h d c4 +c6)) (\lambda (c6: C).(drop1 hds c6 c5)))))).(\lambda (H4: (eq PList (PCons +h0 d0 hds0) (PCons h d hds))).(let H5 \def (f_equal PList nat (\lambda (e: +PList).(match e with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) +(PCons h0 d0 hds0) (PCons h d hds) H4) in ((let H6 \def (f_equal PList nat +(\lambda (e: PList).(match e with [PNil \Rightarrow d0 | (PCons _ n _) +\Rightarrow n])) (PCons h0 d0 hds0) (PCons h d hds) H4) in ((let H7 \def +(f_equal PList PList (\lambda (e: PList).(match e with [PNil \Rightarrow hds0 +| (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds0) (PCons h d hds) H4) in +(\lambda (H8: (eq nat d0 d)).(\lambda (H9: (eq nat h0 h)).(let H10 \def +(eq_ind PList hds0 (\lambda (p: PList).((eq PList p (PCons h d hds)) \to (ex2 +C (\lambda (c6: C).(drop h d c4 c6)) (\lambda (c6: C).(drop1 hds c6 c5))))) +H3 hds H7) in (let H11 \def (eq_ind PList hds0 (\lambda (p: PList).(drop1 p +c4 c5)) H2 hds H7) in (let H12 \def (eq_ind nat d0 (\lambda (n: nat).(drop h0 +n c2 c4)) H1 d H8) in (let H13 \def (eq_ind nat h0 (\lambda (n: nat).(drop n +d c2 c4)) H12 h H9) in (ex_intro2 C (\lambda (c6: C).(drop h d c2 c6)) +(\lambda (c6: C).(drop1 hds c6 c5)) c4 H13 H11)))))))) H6)) H5)))))))))))) y +c1 c3 H0))) H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/drop1/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/getl.ma new file mode 100644 index 000000000..6b0ed898d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/getl.ma @@ -0,0 +1,107 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/drop1/fwd.ma". + +include "basic_1A/getl/drop.ma". + +lemma drop1_getl_trans: + \forall (hds: PList).(\forall (c1: C).(\forall (c2: C).((drop1 hds c2 c1) +\to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl +i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda (e2: C).(drop1 (ptrans hds i) +e2 e1)) (\lambda (e2: C).(getl (trans hds i) c2 (CHead e2 (Bind b) (lift1 +(ptrans hds i) v))))))))))))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: +C).(\forall (c2: C).((drop1 p c2 c1) \to (\forall (b: B).(\forall (e1: +C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to +(ex2 C (\lambda (e2: C).(drop1 (ptrans p i) e2 e1)) (\lambda (e2: C).(getl +(trans p i) c2 (CHead e2 (Bind b) (lift1 (ptrans p i) v)))))))))))))) +(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 c1)).(\lambda +(b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl +i c1 (CHead e1 (Bind b) v))).(let H_y \def (drop1_gen_pnil c2 c1 H) in +(eq_ind_r C c1 (\lambda (c: C).(ex2 C (\lambda (e2: C).(drop1 PNil e2 e1)) +(\lambda (e2: C).(getl i c (CHead e2 (Bind b) v))))) (ex_intro2 C (\lambda +(e2: C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c1 (CHead e2 (Bind b) +v))) e1 (drop1_nil e1) H0) c2 H_y)))))))))) (\lambda (h: nat).(\lambda (d: +nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2: +C).((drop1 hds0 c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: +T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda +(e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) +c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))))))))))))).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2 c1)).(\lambda +(b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl +i c1 (CHead e1 (Bind b) v))).(let H_x \def (drop1_gen_pcons c2 c1 hds0 h d +H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h d c2 c3)) +(\lambda (c3: C).(drop1 hds0 c3 c1)) (ex2 C (\lambda (e2: C).(drop1 (match +(blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) +(\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow +(trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 +(Bind b) (lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans +hds0 i)]) v))))) (\lambda (x: C).(\lambda (H3: (drop h d c2 x)).(\lambda (H4: +(drop1 hds0 x c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: +bool).(ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons +h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans +hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow +(trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 +(Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v)))))) +(\lambda (x_x: bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 +i) d) b0) \to (ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow +(PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow +(ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true +\Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 +(CHead e2 (Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d +(S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) +v))))))) (\lambda (H5: (eq bool (blt (trans hds0 i) d) true)).(let H_x0 \def +(H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in (ex2_ind C (\lambda (e2: +C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) x +(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: +C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) +(\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h +(minus d (S (trans hds0 i))) (ptrans hds0 i)) v))))) (\lambda (x0: +C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8: (getl (trans +hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let H_x1 \def +(drop_getl_trans_lt (trans hds0 i) d (blt_lt d (trans hds0 i) H5) c2 x h H3 b +x0 (lift1 (ptrans hds0 i) v) H8) in (let H9 \def H_x1 in (ex2_ind C (\lambda +(e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans +hds0 i))) (lift1 (ptrans hds0 i) v))))) (\lambda (e2: C).(drop h (minus d (S +(trans hds0 i))) e2 x0)) (ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S +(trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 +i) c2 (CHead e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans +hds0 i)) v))))) (\lambda (x1: C).(\lambda (H10: (getl (trans hds0 i) c2 +(CHead x1 (Bind b) (lift h (minus d (S (trans hds0 i))) (lift1 (ptrans hds0 +i) v))))).(\lambda (H11: (drop h (minus d (S (trans hds0 i))) x1 +x0)).(ex_intro2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0 +i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead +e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) +v)))) x1 (drop1_cons x1 x0 h (minus d (S (trans hds0 i))) H11 e1 (ptrans hds0 +i) H7) H10)))) H9)))))) H6)))) (\lambda (H5: (eq bool (blt (trans hds0 i) d) +false)).(let H_x0 \def (H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in +(ex2_ind C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: +C).(getl (trans hds0 i) x (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) +(ex2 C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl +(plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))) +(\lambda (x0: C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8: +(getl (trans hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let +H9 \def (drop_getl_trans_ge (trans hds0 i) c2 x d h H3 (CHead x0 (Bind b) +(lift1 (ptrans hds0 i) v)) H8) in (ex_intro2 C (\lambda (e2: C).(drop1 +(ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 +(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) x0 H7 (H9 (bge_le d (trans +hds0 i) H5))))))) H6)))) x_x)))))) H2))))))))))))))) hds). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/drop1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/drop1/props.ma new file mode 100644 index 000000000..b604d7d79 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/drop1/props.ma @@ -0,0 +1,88 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/drop1/fwd.ma". + +include "basic_1A/drop/props.ma". + +include "basic_1A/getl/defs.ma". + +lemma drop1_skip_bind: + \forall (b: B).(\forall (e: C).(\forall (hds: PList).(\forall (c: +C).(\forall (u: T).((drop1 hds c e) \to (drop1 (Ss hds) (CHead c (Bind b) +(lift1 hds u)) (CHead e (Bind b) u))))))) +\def + \lambda (b: B).(\lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: +PList).(\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) +(CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u)))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (H: (drop1 PNil c e)).(let H_y \def +(drop1_gen_pnil c e H) in (eq_ind_r C e (\lambda (c0: C).(drop1 PNil (CHead +c0 (Bind b) u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c +H_y))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda +(H: ((\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead +c (Bind b) (lift1 p u)) (CHead e (Bind b) u))))))).(\lambda (c: C).(\lambda +(u: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(let H_x \def +(drop1_gen_pcons c e p n n0 H0) in (let H1 \def H_x in (ex2_ind C (\lambda +(c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 e)) (drop1 (PCons n (S +n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)) +(\lambda (x: C).(\lambda (H2: (drop n n0 c x)).(\lambda (H3: (drop1 p x +e)).(drop1_cons (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead x (Bind b) +(lift1 p u)) n (S n0) (drop_skip_bind n n0 c x H2 b (lift1 p u)) (CHead e +(Bind b) u) (Ss p) (H x u H3))))) H1)))))))))) hds))). + +lemma drop1_cons_tail: + \forall (c2: C).(\forall (c3: C).(\forall (h: nat).(\forall (d: nat).((drop +h d c2 c3) \to (\forall (hds: PList).(\forall (c1: C).((drop1 hds c1 c2) \to +(drop1 (PConsTail hds h d) c1 c3)))))))) +\def + \lambda (c2: C).(\lambda (c3: C).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (drop h d c2 c3)).(\lambda (hds: PList).(PList_ind (\lambda +(p: PList).(\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 +c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H_y \def +(drop1_gen_pnil c1 c2 H0) in (eq_ind_r C c2 (\lambda (c: C).(drop1 (PCons h d +PNil) c c3)) (drop1_cons c2 c3 h d H c3 PNil (drop1_nil c3)) c1 H_y)))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H0: +((\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 +c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 (PCons n n0 p) c1 c2)).(let H_x +\def (drop1_gen_pcons c1 c2 p n n0 H1) in (let H2 \def H_x in (ex2_ind C +(\lambda (c4: C).(drop n n0 c1 c4)) (\lambda (c4: C).(drop1 p c4 c2)) (drop1 +(PCons n n0 (PConsTail p h d)) c1 c3) (\lambda (x: C).(\lambda (H3: (drop n +n0 c1 x)).(\lambda (H4: (drop1 p x c2)).(drop1_cons c1 x n n0 H3 c3 +(PConsTail p h d) (H0 x H4))))) H2))))))))) hds)))))). + +theorem drop1_trans: + \forall (is1: PList).(\forall (c1: C).(\forall (c0: C).((drop1 is1 c1 c0) +\to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1 +(papp is1 is2) c1 c2))))))) +\def + \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (c1: +C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2: +C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1 c2)))))))) (\lambda (c1: +C).(\lambda (c0: C).(\lambda (H: (drop1 PNil c1 c0)).(\lambda (is2: +PList).(\lambda (c2: C).(\lambda (H0: (drop1 is2 c0 c2)).(let H_y \def +(drop1_gen_pnil c1 c0 H) in (let H1 \def (eq_ind_r C c0 (\lambda (c: +C).(drop1 is2 c c2)) H0 c1 H_y) in H1)))))))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: C).(\forall (c0: +C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 +c2) \to (drop1 (papp p is2) c1 c2))))))))).(\lambda (c1: C).(\lambda (c0: +C).(\lambda (H0: (drop1 (PCons n n0 p) c1 c0)).(\lambda (is2: PList).(\lambda +(c2: C).(\lambda (H1: (drop1 is2 c0 c2)).(let H_x \def (drop1_gen_pcons c1 c0 +p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c3: C).(drop n n0 c1 +c3)) (\lambda (c3: C).(drop1 p c3 c0)) (drop1 (PCons n n0 (papp p is2)) c1 +c2) (\lambda (x: C).(\lambda (H3: (drop n n0 c1 x)).(\lambda (H4: (drop1 p x +c0)).(drop1_cons c1 x n n0 H3 c2 (papp p is2) (H x c0 H4 is2 c2 H1))))) +H2))))))))))))) is1). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/etc/performance.txt b/matita/matita/contribs/lambdadelta/basic_1A/etc/performance.txt new file mode 100644 index 000000000..6c46086ea --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/etc/performance.txt @@ -0,0 +1,17 @@ +full validation of lambdadelta_1 + +command: time ../../matitac.opt basic_1 + +- machine: "monica" + date : ven 6 mar 2015, 20.31.46, CET + + real 4m39.904s + user 3m58.580s + sys 0m11.473s + +- machine: "dev.helm" + date : Sat Mar 7 16:41:46 CET 2015 + + real 30m36.357s + user 6m35.749s + sys 0m31.518s diff --git a/matita/matita/contribs/lambdadelta/basic_1A/etc/planes.txt b/matita/matita/contribs/lambdadelta/basic_1A/etc/planes.txt new file mode 100644 index 000000000..d4b66b373 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/etc/planes.txt @@ -0,0 +1,13 @@ +T s tlist tlt iso +C r flt app +lift cnt drop clear getl clen cimp +lift1 drop1 +subst0 subst1 subst csubst0 csubst1 fsubst0 +G next_plus +sty0 sty1 +A asucc aplus leq llt aprem ex0 +pr0 wcpr0 pr1 pr2 pr3 +csubv arity csuba +nf2 sn3 sc3 csubc ex2 +pc1 pc3 +ty3 csubt wf3 ex1 diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ex0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex0/defs.ma new file mode 100644 index 000000000..43bdf85e1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex0/defs.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/A/defs.ma". + +include "basic_1A/G/defs.ma". + +definition gz: + G +\def + mk_G S lt_n_Sn. + +inductive leqz: A \to (A \to Prop) \def +| leqz_sort: \forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall +(n2: nat).((eq nat (plus h1 n2) (plus h2 n1)) \to (leqz (ASort h1 n1) (ASort +h2 n2)))))) +| leqz_head: \forall (a1: A).(\forall (a2: A).((leqz a1 a2) \to (\forall (a3: +A).(\forall (a4: A).((leqz a3 a4) \to (leqz (AHead a1 a3) (AHead a2 a4))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ex0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex0/fwd.ma new file mode 100644 index 000000000..e0236a516 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex0/fwd.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ex0/defs.ma". + +implied rec lemma leqz_ind (P: (A \to (A \to Prop))) (f: (\forall (h1: +nat).(\forall (h2: nat).(\forall (n1: nat).(\forall (n2: nat).((eq nat (plus +h1 n2) (plus h2 n1)) \to (P (ASort h1 n1) (ASort h2 n2)))))))) (f0: (\forall +(a1: A).(\forall (a2: A).((leqz a1 a2) \to ((P a1 a2) \to (\forall (a3: +A).(\forall (a4: A).((leqz a3 a4) \to ((P a3 a4) \to (P (AHead a1 a3) (AHead +a2 a4))))))))))) (a: A) (a0: A) (l: leqz a a0) on l: P a a0 \def match l with +[(leqz_sort h1 h2 n1 n2 e) \Rightarrow (f h1 h2 n1 n2 e) | (leqz_head a1 a2 +l0 a3 a4 l1) \Rightarrow (f0 a1 a2 l0 ((leqz_ind P f f0) a1 a2 l0) a3 a4 l1 +((leqz_ind P f f0) a3 a4 l1))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ex0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex0/props.ma new file mode 100644 index 000000000..072b79e7a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex0/props.ma @@ -0,0 +1,188 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ex0/fwd.ma". + +include "basic_1A/leq/fwd.ma". + +include "basic_1A/aplus/props.ma". + +lemma aplus_gz_le: + \forall (k: nat).(\forall (h: nat).(\forall (n: nat).((le h k) \to (eq A +(aplus gz (ASort h n) k) (ASort O (plus (minus k h) n)))))) +\def + \lambda (k: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).(\forall (n0: +nat).((le h n) \to (eq A (aplus gz (ASort h n0) n) (ASort O (plus (minus n h) +n0))))))) (\lambda (h: nat).(\lambda (n: nat).(\lambda (H: (le h O)).(let H_y +\def (le_n_O_eq h H) in (eq_ind nat O (\lambda (n0: nat).(eq A (ASort n0 n) +(ASort O n))) (refl_equal A (ASort O n)) h H_y))))) (\lambda (k0: +nat).(\lambda (IH: ((\forall (h: nat).(\forall (n: nat).((le h k0) \to (eq A +(aplus gz (ASort h n) k0) (ASort O (plus (minus k0 h) n)))))))).(\lambda (h: +nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le n (S k0)) \to (eq A +(asucc gz (aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O +\Rightarrow (S k0) | (S l) \Rightarrow (minus k0 l)]) n0)))))) (\lambda (n: +nat).(\lambda (_: (le O (S k0))).(eq_ind A (aplus gz (asucc gz (ASort O n)) +k0) (\lambda (a: A).(eq A a (ASort O (S (plus k0 n))))) (eq_ind_r A (ASort O +(plus (minus k0 O) (S n))) (\lambda (a: A).(eq A a (ASort O (S (plus k0 +n))))) (eq_ind nat k0 (\lambda (n0: nat).(eq A (ASort O (plus n0 (S n))) +(ASort O (S (plus k0 n))))) (eq_ind nat (S (plus k0 n)) (\lambda (n0: +nat).(eq A (ASort O n0) (ASort O (S (plus k0 n))))) (refl_equal A (ASort O (S +(plus k0 n)))) (plus k0 (S n)) (plus_n_Sm k0 n)) (minus k0 O) (minus_n_O k0)) +(aplus gz (ASort O (S n)) k0) (IH O (S n) (le_O_n k0))) (asucc gz (aplus gz +(ASort O n) k0)) (aplus_asucc gz k0 (ASort O n))))) (\lambda (n: +nat).(\lambda (_: ((\forall (n0: nat).((le n (S k0)) \to (eq A (asucc gz +(aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O \Rightarrow (S +k0) | (S l) \Rightarrow (minus k0 l)]) n0))))))).(\lambda (n0: nat).(\lambda +(H0: (le (S n) (S k0))).(let H_y \def (le_S_n n k0 H0) in (eq_ind A (aplus gz +(ASort n n0) k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n) n0) +k0)) a)) (eq_ind A (aplus gz (asucc gz (ASort (S n) n0)) k0) (\lambda (a: +A).(eq A a (aplus gz (ASort n n0) k0))) (refl_equal A (aplus gz (ASort n n0) +k0)) (asucc gz (aplus gz (ASort (S n) n0) k0)) (aplus_asucc gz k0 (ASort (S +n) n0))) (ASort O (plus (minus k0 n) n0)) (IH n n0 H_y))))))) h)))) k). + +lemma aplus_gz_ge: + \forall (n: nat).(\forall (k: nat).(\forall (h: nat).((le k h) \to (eq A +(aplus gz (ASort h n) k) (ASort (minus h k) n))))) +\def + \lambda (n: nat).(\lambda (k: nat).(nat_ind (\lambda (n0: nat).(\forall (h: +nat).((le n0 h) \to (eq A (aplus gz (ASort h n) n0) (ASort (minus h n0) +n))))) (\lambda (h: nat).(\lambda (_: (le O h)).(eq_ind nat h (\lambda (n0: +nat).(eq A (ASort h n) (ASort n0 n))) (refl_equal A (ASort h n)) (minus h O) +(minus_n_O h)))) (\lambda (k0: nat).(\lambda (IH: ((\forall (h: nat).((le k0 +h) \to (eq A (aplus gz (ASort h n) k0) (ASort (minus h k0) n)))))).(\lambda +(h: nat).(nat_ind (\lambda (n0: nat).((le (S k0) n0) \to (eq A (asucc gz +(aplus gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n)))) (\lambda (H: (le +(S k0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat O (S n0))) (\lambda (n0: +nat).(le k0 n0)) (eq A (asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) +(\lambda (x: nat).(\lambda (H0: (eq nat O (S x))).(\lambda (_: (le k0 +x)).(let H2 \def (eq_ind nat O (\lambda (ee: nat).(match ee with [O +\Rightarrow True | (S _) \Rightarrow False])) I (S x) H0) in (False_ind (eq A +(asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) H2))))) (le_gen_S k0 O H))) +(\lambda (n0: nat).(\lambda (_: (((le (S k0) n0) \to (eq A (asucc gz (aplus +gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n))))).(\lambda (H0: (le (S k0) +(S n0))).(let H_y \def (le_S_n k0 n0 H0) in (eq_ind A (aplus gz (ASort n0 n) +k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n0) n) k0)) a)) +(eq_ind A (aplus gz (asucc gz (ASort (S n0) n)) k0) (\lambda (a: A).(eq A a +(aplus gz (ASort n0 n) k0))) (refl_equal A (aplus gz (ASort n0 n) k0)) (asucc +gz (aplus gz (ASort (S n0) n) k0)) (aplus_asucc gz k0 (ASort (S n0) n))) +(ASort (minus n0 k0) n) (IH n0 H_y)))))) h)))) k)). + +lemma next_plus_gz: + \forall (n: nat).(\forall (h: nat).(eq nat (next_plus gz n h) (plus h n))) +\def + \lambda (n: nat).(\lambda (h: nat).(nat_ind (\lambda (n0: nat).(eq nat +(next_plus gz n n0) (plus n0 n))) (refl_equal nat n) (\lambda (n0: +nat).(\lambda (H: (eq nat (next_plus gz n n0) (plus n0 n))).(f_equal nat nat +S (next_plus gz n n0) (plus n0 n) H))) h)). + +lemma leqz_leq: + \forall (a1: A).(\forall (a2: A).((leq gz a1 a2) \to (leqz a1 a2))) +\def + \lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq gz a1 a2)).(leq_ind gz +(\lambda (a: A).(\lambda (a0: A).(leqz a a0))) (\lambda (h1: nat).(\lambda +(h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda +(H0: (eq A (aplus gz (ASort h1 n1) k) (aplus gz (ASort h2 n2) k))).(lt_le_e k +h1 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H1: (lt k h1)).(lt_le_e k h2 +(leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k h2)).(let H3 \def +(eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort +h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 (le_S_n k h1 +(le_S_n (S k) (S h1) (le_S (S (S k)) (S h1) (le_n_S (S k) h1 H1)))))) in (let +H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort +(minus h1 k) n1) a)) H3 (ASort (minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n +k h2 (le_S_n (S k) (S h2) (le_S (S (S k)) (S h2) (le_n_S (S k) h2 H2)))))) in +(let H5 \def (f_equal A nat (\lambda (e: A).(match e with [(ASort n _) +\Rightarrow n | (AHead _ _) \Rightarrow (minus h1 k)])) (ASort (minus h1 k) +n1) (ASort (minus h2 k) n2) H4) in ((let H6 \def (f_equal A nat (\lambda (e: +A).(match e with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) +(ASort (minus h1 k) n1) (ASort (minus h2 k) n2) H4) in (\lambda (H7: (eq nat +(minus h1 k) (minus h2 k))).(eq_ind nat n1 (\lambda (n: nat).(leqz (ASort h1 +n1) (ASort h2 n))) (eq_ind nat h1 (\lambda (n: nat).(leqz (ASort h1 n1) +(ASort n n1))) (leqz_sort h1 h1 n1 n1 (refl_equal nat (plus h1 n1))) h2 +(minus_minus k h1 h2 (le_S_n k h1 (le_S_n (S k) (S h1) (le_S (S (S k)) (S h1) +(le_n_S (S k) h1 H1)))) (le_S_n k h2 (le_S_n (S k) (S h2) (le_S (S (S k)) (S +h2) (le_n_S (S k) h2 H2)))) H7)) n2 H6))) H5))))) (\lambda (H2: (le h2 +k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a +(aplus gz (ASort h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 +(le_S_n k h1 (le_S_n (S k) (S h1) (le_S (S (S k)) (S h1) (le_n_S (S k) h1 +H1)))))) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: +A).(eq A (ASort (minus h1 k) n1) a)) H3 (ASort O (plus (minus k h2) n2)) +(aplus_gz_le k h2 n2 H2)) in (let H5 \def (eq_ind nat (minus h1 k) (\lambda +(n: nat).(eq A (ASort n n1) (ASort O (plus (minus k h2) n2)))) H4 (S (minus +h1 (S k))) (minus_x_Sy h1 k H1)) in (let H6 \def (eq_ind A (ASort (S (minus +h1 (S k))) n1) (\lambda (ee: A).(match ee with [(ASort n _) \Rightarrow +(match n with [O \Rightarrow False | (S _) \Rightarrow True]) | (AHead _ _) +\Rightarrow False])) I (ASort O (plus (minus k h2) n2)) H5) in (False_ind +(leqz (ASort h1 n1) (ASort h2 n2)) H6)))))))) (\lambda (H1: (le h1 +k)).(lt_le_e k h2 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k +h2)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A +a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus k h1) n1)) +(aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) +k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) H3 (ASort +(minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n k h2 (le_S_n (S k) (S h2) (le_S +(S (S k)) (S h2) (le_n_S (S k) h2 H2)))))) in (let H5 \def (sym_eq A (ASort O +(plus (minus k h1) n1)) (ASort (minus h2 k) n2) H4) in (let H6 \def (eq_ind +nat (minus h2 k) (\lambda (n: nat).(eq A (ASort n n2) (ASort O (plus (minus k +h1) n1)))) H5 (S (minus h2 (S k))) (minus_x_Sy h2 k H2)) in (let H7 \def +(eq_ind A (ASort (S (minus h2 (S k))) n2) (\lambda (ee: A).(match ee with +[(ASort n _) \Rightarrow (match n with [O \Rightarrow False | (S _) +\Rightarrow True]) | (AHead _ _) \Rightarrow False])) I (ASort O (plus (minus +k h1) n1)) H6) in (False_ind (leqz (ASort h1 n1) (ASort h2 n2)) H7))))))) +(\lambda (H2: (le h2 k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) +(\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus +k h1) n1)) (aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz +(ASort h2 n2) k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) +H3 (ASort O (plus (minus k h2) n2)) (aplus_gz_le k h2 n2 H2)) in (let H5 \def +(f_equal A nat (\lambda (e: A).(match e with [(ASort _ n) \Rightarrow n | +(AHead _ _) \Rightarrow (plus (minus k h1) n1)])) (ASort O (plus (minus k h1) +n1)) (ASort O (plus (minus k h2) n2)) H4) in (let H_y \def (plus_plus k h1 h2 +n1 n2 H1 H2 H5) in (leqz_sort h1 h2 n1 n2 H_y))))))))))))))) (\lambda (a0: +A).(\lambda (a3: A).(\lambda (_: (leq gz a0 a3)).(\lambda (H1: (leqz a0 +a3)).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq gz a4 a5)).(\lambda +(H3: (leqz a4 a5)).(leqz_head a0 a3 H1 a4 a5 H3))))))))) a1 a2 H))). + +lemma leq_leqz: + \forall (a1: A).(\forall (a2: A).((leqz a1 a2) \to (leq gz a1 a2))) +\def + \lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leqz a1 a2)).(leqz_ind +(\lambda (a: A).(\lambda (a0: A).(leq gz a a0))) (\lambda (h1: nat).(\lambda +(h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H0: (eq nat (plus +h1 n2) (plus h2 n1))).(leq_sort gz h1 h2 n1 n2 (plus h1 h2) (eq_ind_r A +(ASort (minus h1 (plus h1 h2)) (next_plus gz n1 (minus (plus h1 h2) h1))) +(\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) (plus h1 h2)))) (eq_ind_r A +(ASort (minus h2 (plus h1 h2)) (next_plus gz n2 (minus (plus h1 h2) h2))) +(\lambda (a: A).(eq A (ASort (minus h1 (plus h1 h2)) (next_plus gz n1 (minus +(plus h1 h2) h1))) a)) (eq_ind_r nat h2 (\lambda (n: nat).(eq A (ASort (minus +h1 (plus h1 h2)) (next_plus gz n1 n)) (ASort (minus h2 (plus h1 h2)) +(next_plus gz n2 (minus (plus h1 h2) h2))))) (eq_ind_r nat h1 (\lambda (n: +nat).(eq A (ASort (minus h1 (plus h1 h2)) (next_plus gz n1 h2)) (ASort (minus +h2 (plus h1 h2)) (next_plus gz n2 n)))) (eq_ind_r nat O (\lambda (n: nat).(eq +A (ASort n (next_plus gz n1 h2)) (ASort (minus h2 (plus h1 h2)) (next_plus gz +n2 h1)))) (eq_ind_r nat O (\lambda (n: nat).(eq A (ASort O (next_plus gz n1 +h2)) (ASort n (next_plus gz n2 h1)))) (eq_ind_r nat (plus h2 n1) (\lambda (n: +nat).(eq A (ASort O n) (ASort O (next_plus gz n2 h1)))) (eq_ind_r nat (plus +h1 n2) (\lambda (n: nat).(eq A (ASort O (plus h2 n1)) (ASort O n))) (f_equal +nat A (ASort O) (plus h2 n1) (plus h1 n2) (sym_eq nat (plus h1 n2) (plus h2 +n1) H0)) (next_plus gz n2 h1) (next_plus_gz n2 h1)) (next_plus gz n1 h2) +(next_plus_gz n1 h2)) (minus h2 (plus h1 h2)) (O_minus h2 (plus h1 h2) +(le_plus_r h1 h2))) (minus h1 (plus h1 h2)) (O_minus h1 (plus h1 h2) +(le_plus_l h1 h2))) (minus (plus h1 h2) h2) (minus_plus_r h1 h2)) (minus +(plus h1 h2) h1) (minus_plus h1 h2)) (aplus gz (ASort h2 n2) (plus h1 h2)) +(aplus_asort_simpl gz (plus h1 h2) h2 n2)) (aplus gz (ASort h1 n1) (plus h1 +h2)) (aplus_asort_simpl gz (plus h1 h2) h1 n1)))))))) (\lambda (a0: +A).(\lambda (a3: A).(\lambda (_: (leqz a0 a3)).(\lambda (H1: (leq gz a0 +a3)).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leqz a4 a5)).(\lambda +(H3: (leq gz a4 a5)).(leq_head gz a0 a3 H1 a4 a5 H3))))))))) a1 a2 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ex1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex1/defs.ma new file mode 100644 index 000000000..bf7a59159 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex1/defs.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +definition ex1_c: + C +\def + CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O). + +definition ex1_t: + T +\def + THead (Flat Appl) (TLRef O) (THead (Bind Abst) (TLRef (S (S O))) (TSort O)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ex1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex1/props.ma new file mode 100644 index 000000000..aea8bcbf1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex1/props.ma @@ -0,0 +1,516 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ex1/defs.ma". + +include "basic_1A/ty3/fwd.ma". + +include "basic_1A/pc3/fwd.ma". + +include "basic_1A/nf2/pr3.ma". + +include "basic_1A/nf2/props.ma". + +include "basic_1A/arity/defs.ma". + +include "basic_1A/leq/props.ma". + +fact ex1__leq_sort_SS: + \forall (g: G).(\forall (k: nat).(\forall (n: nat).(leq g (ASort k n) (asucc +g (asucc g (ASort (S (S k)) n)))))) +\def + \lambda (g: G).(\lambda (k: nat).(\lambda (n: nat).(leq_refl g (asucc g +(asucc g (ASort (S (S k)) n)))))). + +lemma ex1_arity: + \forall (g: G).(arity g ex1_c ex1_t (ASort O O)) +\def + \lambda (g: G).(arity_appl g (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef O) (ASort (S +(S O)) O) (arity_abst g (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (TLRef O) O (getl_refl Abst (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (TLRef O)) +(ASort (S (S O)) O) (arity_abst g (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (CHead (CSort O) (Bind Abst) (TSort O)) (TSort O) +O (getl_refl Abst (CHead (CSort O) (Bind Abst) (TSort O)) (TSort O)) (asucc g +(ASort (S (S O)) O)) (arity_repl g (CHead (CSort O) (Bind Abst) (TSort O)) +(TSort O) (ASort O O) (arity_sort g (CHead (CSort O) (Bind Abst) (TSort O)) +O) (asucc g (asucc g (ASort (S (S O)) O))) (ex1__leq_sort_SS g O O)))) (THead +(Bind Abst) (TLRef (S (S O))) (TSort O)) (ASort O O) (arity_head g (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (TLRef (S (S O))) (ASort (S (S O)) O) (arity_abst g (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (CSort O) (TSort O) (S (S O)) (getl_clear_bind Abst (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (TLRef O) (clear_bind Abst (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (TLRef O)) (CHead (CSort O) (Bind Abst) +(TSort O)) (S O) (getl_head (Bind Abst) O (CHead (CSort O) (Bind Abst) (TSort +O)) (CHead (CSort O) (Bind Abst) (TSort O)) (getl_refl Abst (CSort O) (TSort +O)) (TSort O))) (asucc g (ASort (S (S O)) O)) (arity_repl g (CSort O) (TSort +O) (ASort O O) (arity_sort g (CSort O) O) (asucc g (asucc g (ASort (S (S O)) +O))) (ex1__leq_sort_SS g O O))) (TSort O) (ASort O O) (arity_sort g (CHead +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (Bind Abst) (TLRef (S (S O)))) O))). + +lemma ex1_ty3: + \forall (g: G).(\forall (u: T).((ty3 g ex1_c ex1_t u) \to (\forall (P: +Prop).P))) +\def + \lambda (g: G).(\lambda (u: T).(\lambda (H: (ty3 g (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (THead (Flat Appl) (TLRef O) (THead (Bind Abst) (TLRef (S (S O))) (TSort +O))) u)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u0: T).(\lambda (t: +T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (THead (Flat Appl) (TLRef O) (THead (Bind +Abst) u0 t)) u))) (\lambda (u0: T).(\lambda (t: T).(ty3 g (CHead (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) +(TLRef O)) (THead (Bind Abst) (TLRef (S (S O))) (TSort O)) (THead (Bind Abst) +u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead (CHead (CHead (CSort +O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) +(TLRef O) u0))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (THead (Flat Appl) (TLRef O) (THead (Bind Abst) x0 x1)) +u)).(\lambda (H1: (ty3 g (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (THead (Bind Abst) (TLRef +(S (S O))) (TSort O)) (THead (Bind Abst) x0 x1))).(\lambda (H2: (ty3 g (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (TLRef O) x0)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda +(_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O t) x0)))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O u0) x0)))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t))))) P (\lambda (H3: (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O +t) x0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O +t) x0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda (x2: C).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (_: (pc3 (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O +x4) x0)).(\lambda (H5: (getl O (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind +Abbr) x3))).(\lambda (_: (ty3 g x2 x3 x4)).(ex3_2_ind T T (\lambda (t2: +T).(\lambda (_: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (THead (Bind Abst) (TLRef (S (S +O))) t2) (THead (Bind Abst) x0 x1)))) (\lambda (_: T).(\lambda (t: T).(ty3 g +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (TLRef (S (S O))) t))) (\lambda (t2: T).(\lambda (_: +T).(ty3 g (CHead (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (Bind Abst) (TLRef O)) (Bind Abst) (TLRef (S (S O)))) (TSort +O) t2))) P (\lambda (x5: T).(\lambda (x6: T).(\lambda (_: (pc3 (CHead (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) +(TLRef O)) (THead (Bind Abst) (TLRef (S (S O))) x5) (THead (Bind Abst) x0 +x1))).(\lambda (H8: (ty3 g (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) +x6)).(\lambda (_: (ty3 g (CHead (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (Bind Abst) (TLRef +(S (S O)))) (TSort O) x5)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: +T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O t) x6)))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t: T).(ty3 g e u0 t))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) +O u0) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (t: T).(ty3 g e u0 t))))) P (\lambda (H10: (ex3_3 C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 +t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t)))) P (\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: +T).(\lambda (_: (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O x9) +x6)).(\lambda (H12: (getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x7 +(Bind Abbr) x8))).(\lambda (_: (ty3 g x7 x8 x9)).(let H14 \def (getl_gen_all +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead +x7 (Bind Abbr) x8) (r (Bind Abst) (S O)) (getl_gen_S (Bind Abst) (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x7 +(Bind Abbr) x8) (TLRef O) (S O) H12)) in (ex2_ind C (\lambda (e: C).(drop (S +O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abbr) x8))) P (\lambda (x: +C).(\lambda (_: (drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) x)).(\lambda (_: (clear x (CHead x7 (Bind Abbr) +x8))).(let H17 \def (eq_ind C (CHead x2 (Bind Abbr) x3) (\lambda (ee: +C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | +Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow +False])])) I (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abbr) +x3) (TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abbr) x3) +H5))) in (False_ind P H17))))) H14)))))))) H10)) (\lambda (H10: (ex3_3 C T T +(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (lift (S (S (S O))) O u0) x6)))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abst) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 +t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: +T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O u0) x6)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t)))) P (\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: +T).(\lambda (_: (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O x8) +x6)).(\lambda (H12: (getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x7 +(Bind Abst) x8))).(\lambda (_: (ty3 g x7 x8 x9)).(let H14 \def (getl_gen_all +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead +x7 (Bind Abst) x8) (r (Bind Abst) (S O)) (getl_gen_S (Bind Abst) (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x7 +(Bind Abst) x8) (TLRef O) (S O) H12)) in (ex2_ind C (\lambda (e: C).(drop (S +O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abst) x8))) P (\lambda (x: +C).(\lambda (_: (drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) x)).(\lambda (_: (clear x (CHead x7 (Bind Abst) +x8))).(let H17 \def (eq_ind C (CHead x2 (Bind Abbr) x3) (\lambda (ee: +C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | +Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow +False])])) I (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abbr) +x3) (TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abbr) x3) +H5))) in (False_ind P H17))))) H14)))))))) H10)) (ty3_gen_lref g (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) x6 (S (S O)) H8))))))) (ty3_gen_bind g Abst (CHead (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) +(TLRef O)) (TLRef (S (S O))) (TSort O) (THead (Bind Abst) x0 x1) H1)))))))) +H3)) (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: +T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O u0) x0)))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e +(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e +u0 t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: +T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O u0) x0)))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e +(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e +u0 t)))) P (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H4: +(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort +O)) (Bind Abst) (TLRef O)) (lift (S O) O x3) x0)).(\lambda (H5: (getl O +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3))).(\lambda (H6: (ty3 g x2 x3 +x4)).(ex3_2_ind T T (\lambda (t2: T).(\lambda (_: T).(pc3 (CHead (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) +(TLRef O)) (THead (Bind Abst) (TLRef (S (S O))) t2) (THead (Bind Abst) x0 +x1)))) (\lambda (_: T).(\lambda (t: T).(ty3 g (CHead (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef +(S (S O))) t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead (CHead (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) +(TLRef O)) (Bind Abst) (TLRef (S (S O)))) (TSort O) t2))) P (\lambda (x5: +T).(\lambda (x6: T).(\lambda (H7: (pc3 (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (THead (Bind +Abst) (TLRef (S (S O))) x5) (THead (Bind Abst) x0 x1))).(\lambda (H8: (ty3 g +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (TLRef (S (S O))) x6)).(\lambda (_: (ty3 g (CHead +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (Bind Abst) (TLRef (S (S O)))) (TSort O) x5)).(or_ind +(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind +Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 +t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (lift (S (S (S O))) O u0) x6)))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t))))) P (\lambda (H10: (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S +O))) O t) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S +O)) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort +O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (lift (S (S (S O))) O t) x6)))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abbr) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda +(x7: C).(\lambda (x8: T).(\lambda (x9: T).(\lambda (_: (pc3 (CHead (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) +(TLRef O)) (lift (S (S (S O))) O x9) x6)).(\lambda (H12: (getl (S (S O)) +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (CHead x7 (Bind Abbr) x8))).(\lambda (_: (ty3 g x7 x8 +x9)).(let H14 \def (getl_gen_all (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (CHead x7 (Bind Abbr) x8) (r (Bind Abst) (S O)) +(getl_gen_S (Bind Abst) (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (CHead x7 (Bind Abbr) x8) (TLRef O) (S O) H12)) in (ex2_ind +C (\lambda (e: C).(drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abbr) +x8))) P (\lambda (x: C).(\lambda (H15: (drop (S O) O (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) x)).(\lambda (H16: (clear x +(CHead x7 (Bind Abbr) x8))).(let H17 \def (f_equal C C (\lambda (e: C).(match +e with [(CSort _) \Rightarrow x2 | (CHead c _ _) \Rightarrow c])) (CHead x2 +(Bind Abst) x3) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) +x3) (TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) +H5))) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow x3 | (CHead _ _ t) \Rightarrow t])) (CHead x2 (Bind Abst) x3) +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) x3) (TLRef O) +(getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) H5))) in (\lambda +(H19: (eq C x2 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)))).(let H20 \def (eq_ind T x3 (\lambda (t: T).(ty3 g x2 t x4)) H6 +(TLRef O) H18) in (let H21 \def (eq_ind T x3 (\lambda (t: T).(pc3 (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (lift (S O) O t) x0)) H4 (TLRef O) H18) in (let H22 \def +(eq_ind C x2 (\lambda (c: C).(ty3 g c (TLRef O) x4)) H20 (CHead (CHead (CSort +O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) H19) in (let H23 \def +(eq_ind_r C x (\lambda (c: C).(clear c (CHead x7 (Bind Abbr) x8))) H16 (CHead +(CSort O) (Bind Abst) (TSort O)) (drop_gen_refl (CHead (CSort O) (Bind Abst) +(TSort O)) x (drop_gen_drop (Bind Abst) (CHead (CSort O) (Bind Abst) (TSort +O)) x (TSort O) O H15))) in (let H24 \def (eq_ind C (CHead x7 (Bind Abbr) x8) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead (CSort O) (Bind Abst) (TSort O)) +(clear_gen_bind Abst (CSort O) (CHead x7 (Bind Abbr) x8) (TSort O) H23)) in +(False_ind P H24)))))))) H17))))) H14)))))))) H10)) (\lambda (H10: (ex3_3 C T +T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (lift (S (S (S O))) O u0) x6)))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead e (Bind Abst) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 +t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: +T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O u0) x6)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl (S (S O)) (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t)))) P (\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: +T).(\lambda (H11: (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) O x8) +x6)).(\lambda (H12: (getl (S (S O)) (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x7 +(Bind Abst) x8))).(\lambda (H13: (ty3 g x7 x8 x9)).(let H14 \def +(getl_gen_all (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (CHead x7 (Bind Abst) x8) (r (Bind Abst) (S O)) (getl_gen_S (Bind +Abst) (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(CHead x7 (Bind Abst) x8) (TLRef O) (S O) H12)) in (ex2_ind C (\lambda (e: +C).(drop (S O) O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) e)) (\lambda (e: C).(clear e (CHead x7 (Bind Abst) x8))) P +(\lambda (x: C).(\lambda (H15: (drop (S O) O (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) x)).(\lambda (H16: (clear x (CHead x7 +(Bind Abst) x8))).(let H17 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow x2 | (CHead c _ _) \Rightarrow c])) (CHead x2 (Bind +Abst) x3) (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead (CSort +O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) x3) +(TLRef O) (getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) H5))) +in ((let H18 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow x3 | (CHead _ _ t) \Rightarrow t])) (CHead x2 (Bind Abst) x3) +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (clear_gen_bind Abst (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead x2 (Bind Abst) x3) (TLRef O) +(getl_gen_O (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (Bind Abst) (TLRef O)) (CHead x2 (Bind Abst) x3) H5))) in (\lambda +(H19: (eq C x2 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)))).(let H20 \def (eq_ind T x3 (\lambda (t: T).(ty3 g x2 t x4)) H6 +(TLRef O) H18) in (let H21 \def (eq_ind T x3 (\lambda (t: T).(pc3 (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (lift (S O) O t) x0)) H4 (TLRef O) H18) in (let H22 \def +(eq_ind C x2 (\lambda (c: C).(ty3 g c (TLRef O) x4)) H20 (CHead (CHead (CSort +O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) H19) in (let H23 \def +(eq_ind_r C x (\lambda (c: C).(clear c (CHead x7 (Bind Abst) x8))) H16 (CHead +(CSort O) (Bind Abst) (TSort O)) (drop_gen_refl (CHead (CSort O) (Bind Abst) +(TSort O)) x (drop_gen_drop (Bind Abst) (CHead (CSort O) (Bind Abst) (TSort +O)) x (TSort O) O H15))) in (let H24 \def (f_equal C C (\lambda (e: C).(match +e with [(CSort _) \Rightarrow x7 | (CHead c _ _) \Rightarrow c])) (CHead x7 +(Bind Abst) x8) (CHead (CSort O) (Bind Abst) (TSort O)) (clear_gen_bind Abst +(CSort O) (CHead x7 (Bind Abst) x8) (TSort O) H23)) in ((let H25 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow x8 | (CHead +_ _ t) \Rightarrow t])) (CHead x7 (Bind Abst) x8) (CHead (CSort O) (Bind +Abst) (TSort O)) (clear_gen_bind Abst (CSort O) (CHead x7 (Bind Abst) x8) +(TSort O) H23)) in (\lambda (H26: (eq C x7 (CSort O))).(let H27 \def (eq_ind +T x8 (\lambda (t: T).(ty3 g x7 t x9)) H13 (TSort O) H25) in (let H28 \def +(eq_ind T x8 (\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S (S (S O))) +O t) x6)) H11 (TSort O) H25) in (let H29 \def (eq_ind C x7 (\lambda (c: +C).(ty3 g c (TSort O) x9)) H27 (CSort O) H26) in (or_ind (ex3_3 C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (lift (S O) O t) x4)))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead (CSort +O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead e (Bind Abbr) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t))))) (ex3_3 C +T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (lift (S O) O u0) +x4)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl O (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead e (Bind Abst) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t))))) P +(\lambda (H30: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: +T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(lift (S O) O t) x4)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: +T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort +O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: +T).(\lambda (t: T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (lift (S O) O t) x4)))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (_: T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda (x10: C).(\lambda (x11: +T).(\lambda (x12: T).(\lambda (_: (pc3 (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (lift (S O) O x12) x4)).(\lambda (H32: +(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(CHead x10 (Bind Abbr) x11))).(\lambda (_: (ty3 g x10 x11 x12)).(let H34 \def +(eq_ind C (CHead x10 (Bind Abbr) x11) (\lambda (ee: C).(match ee with [(CSort +_) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (clear_gen_bind Abst +(CHead (CSort O) (Bind Abst) (TSort O)) (CHead x10 (Bind Abbr) x11) (TSort O) +(getl_gen_O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort +O)) (CHead x10 (Bind Abbr) x11) H32))) in (False_ind P H34)))))))) H30)) +(\lambda (H30: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: +T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(lift (S O) O u0) x4)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: +T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort +O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t: T).(ty3 g e u0 t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (lift (S O) O u0) x4)))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (_: T).(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (t: T).(ty3 g e u0 t)))) P (\lambda (x10: C).(\lambda (x11: +T).(\lambda (x12: T).(\lambda (H31: (pc3 (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (lift (S O) O x11) x4)).(\lambda (H32: +(getl O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(CHead x10 (Bind Abst) x11))).(\lambda (H33: (ty3 g x10 x11 x12)).(let H34 +\def (f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow x10 | +(CHead c _ _) \Rightarrow c])) (CHead x10 (Bind Abst) x11) (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (clear_gen_bind Abst +(CHead (CSort O) (Bind Abst) (TSort O)) (CHead x10 (Bind Abst) x11) (TSort O) +(getl_gen_O (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort +O)) (CHead x10 (Bind Abst) x11) H32))) in ((let H35 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow x11 | (CHead _ _ t) +\Rightarrow t])) (CHead x10 (Bind Abst) x11) (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (clear_gen_bind Abst (CHead (CSort O) +(Bind Abst) (TSort O)) (CHead x10 (Bind Abst) x11) (TSort O) (getl_gen_O +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead +x10 (Bind Abst) x11) H32))) in (\lambda (H36: (eq C x10 (CHead (CSort O) +(Bind Abst) (TSort O)))).(let H37 \def (eq_ind T x11 (\lambda (t: T).(ty3 g +x10 t x12)) H33 (TSort O) H35) in (let H38 \def (eq_ind T x11 (\lambda (t: +T).(pc3 (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(lift (S O) O t) x4)) H31 (TSort O) H35) in (let H39 \def (eq_ind C x10 +(\lambda (c: C).(ty3 g c (TSort O) x12)) H37 (CHead (CSort O) (Bind Abst) +(TSort O)) H36) in (land_ind (pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) +x0) (\forall (b: B).(\forall (u0: T).(pc3 (CHead (CHead (CHead (CHead (CSort +O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (Bind +b) u0) x5 x1))) P (\lambda (H40: (pc3 (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S +O))) x0)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pc3 (CHead (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (Bind b) u0) x5 x1))))).(let H42 \def (eq_ind T (lift (S O) +O (TLRef O)) (\lambda (t: T).(pc3 (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) +t)) (pc3_t x0 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind +Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) H40 (lift (S O) O +(TLRef O)) (ex2_sym T (pr3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort +O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (lift (S O) O (TLRef O))) +(pr3 (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort +O)) (Bind Abst) (TLRef O)) x0) H21)) (TLRef (plus O (S O))) (lift_lref_ge O +(S O) O (le_O_n O))) in (let H43 \def H42 in (ex2_ind T (\lambda (t: T).(pr3 +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (TLRef (S (S O))) t)) (\lambda (t: T).(pr3 (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (TLRef (S O)) t)) P (\lambda (x13: T).(\lambda (H44: (pr3 +(CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) +(Bind Abst) (TLRef O)) (TLRef (S (S O))) x13)).(\lambda (H45: (pr3 (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) (TLRef (S O)) x13)).(let H46 \def (eq_ind_r T x13 (\lambda +(t: T).(eq T (TLRef (S (S O))) t)) (nf2_pr3_unfold (CHead (CHead (CHead +(CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef +O)) (TLRef (S (S O))) x13 H44 (nf2_lref_abst (CHead (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CSort +O) (TSort O) (S (S O)) (getl_clear_bind Abst (CHead (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead +(CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (TLRef O) +(clear_bind Abst (CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) +(TSort O)) (TLRef O)) (CHead (CSort O) (Bind Abst) (TSort O)) (S O) +(getl_head (Bind Abst) O (CHead (CSort O) (Bind Abst) (TSort O)) (CHead +(CSort O) (Bind Abst) (TSort O)) (getl_refl Abst (CSort O) (TSort O)) (TSort +O))))) (TLRef (S O)) (nf2_pr3_unfold (CHead (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S O)) +x13 H45 (nf2_lref_abst (CHead (CHead (CHead (CSort O) (Bind Abst) (TSort O)) +(Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (CHead (CSort O) (Bind Abst) +(TSort O)) (TSort O) (S O) (getl_head (Bind Abst) O (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (CHead (CHead (CSort O) (Bind +Abst) (TSort O)) (Bind Abst) (TSort O)) (getl_refl Abst (CHead (CSort O) +(Bind Abst) (TSort O)) (TSort O)) (TLRef O))))) in (let H47 \def (eq_ind T +(TLRef (S (S O))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef n) \Rightarrow (match n with [O \Rightarrow False | (S n0) +\Rightarrow (match n0 with [O \Rightarrow False | (S _) \Rightarrow True])]) +| (THead _ _ _) \Rightarrow False])) I (TLRef (S O)) H46) in (False_ind P +H47)))))) H43))))) (pc3_gen_abst (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) x0 +x5 x1 H7))))))) H34)))))))) H30)) (ty3_gen_lref g (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) x4 O H22))))))) H24)))))))) +H17))))) H14)))))))) H10)) (ty3_gen_lref g (CHead (CHead (CHead (CSort O) +(Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) x6 (S (S +O)) H8))))))) (ty3_gen_bind g Abst (CHead (CHead (CHead (CSort O) (Bind Abst) +(TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) (TLRef (S (S O))) +(TSort O) (THead (Bind Abst) x0 x1) H1)))))))) H3)) (ty3_gen_lref g (CHead +(CHead (CHead (CSort O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind +Abst) (TLRef O)) x0 O H2))))))) (ty3_gen_appl g (CHead (CHead (CHead (CSort +O) (Bind Abst) (TSort O)) (Bind Abst) (TSort O)) (Bind Abst) (TLRef O)) +(TLRef O) (THead (Bind Abst) (TLRef (S (S O))) (TSort O)) u H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ex2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex2/defs.ma new file mode 100644 index 000000000..29b444d1b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex2/defs.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +definition ex2_c: + C +\def + CSort O. + +definition ex2_t: + T +\def + THead (Flat Appl) (TSort O) (TSort O). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ex2/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ex2/props.ma new file mode 100644 index 000000000..01c8eed26 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ex2/props.ma @@ -0,0 +1,152 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ex2/defs.ma". + +include "basic_1A/nf2/defs.ma". + +include "basic_1A/pr2/fwd.ma". + +include "basic_1A/arity/fwd.ma". + +lemma ex2_nf2: + nf2 ex2_c ex2_t +\def + \lambda (t2: T).(\lambda (H: (pr2 (CSort O) (THead (Flat Appl) (TSort O) +(TSort O)) t2)).(let H0 \def (pr2_gen_appl (CSort O) (TSort O) (TSort O) t2 +H) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 (CSort O) (TSort +O) u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 (CSort O) (TSort O) t3)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (TSort O) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 (CSort O) (TSort O) u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead (CSort O) +(Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat +Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 (CSort O) (TSort +O) u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CSort O) y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead (CSort O) (Bind b) y2) z1 z2)))))))) (eq T (THead (Flat +Appl) (TSort O) (TSort O)) t2) (\lambda (H1: (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 (CSort O) (TSort O) u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 (CSort O) (TSort O) t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 (CSort O) (TSort O) u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 (CSort O) (TSort O) t3))) (eq T (THead (Flat Appl) (TSort O) +(TSort O)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T t2 +(THead (Flat Appl) x0 x1))).(\lambda (H3: (pr2 (CSort O) (TSort O) +x0)).(\lambda (H4: (pr2 (CSort O) (TSort O) x1)).(let H5 \def (eq_ind T x1 +(\lambda (t: T).(eq T t2 (THead (Flat Appl) x0 t))) H2 (TSort O) +(pr2_gen_sort (CSort O) x1 O H4)) in (let H6 \def (eq_ind T x0 (\lambda (t: +T).(eq T t2 (THead (Flat Appl) t (TSort O)))) H5 (TSort O) (pr2_gen_sort +(CSort O) x0 O H3)) in (eq_ind_r T (THead (Flat Appl) (TSort O) (TSort O)) +(\lambda (t: T).(eq T (THead (Flat Appl) (TSort O) (TSort O)) t)) (refl_equal +T (THead (Flat Appl) (TSort O) (TSort O))) t2 H6)))))))) H1)) (\lambda (H1: +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (TSort O) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 (CSort O) (TSort O) u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead (CSort O) +(Bind b) u) z1 t3))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 (CSort O) (TSort O) u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead (CSort O) (Bind b) u) z1 t3))))))) (eq T +(THead (Flat Appl) (TSort O) (TSort O)) t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H2: (eq T (TSort O) (THead +(Bind Abst) x0 x1))).(\lambda (H3: (eq T t2 (THead (Bind Abbr) x2 +x3))).(\lambda (H4: (pr2 (CSort O) (TSort O) x2)).(\lambda (_: ((\forall (b: +B).(\forall (u: T).(pr2 (CHead (CSort O) (Bind b) u) x1 x3))))).(let H6 \def +(eq_ind T x2 (\lambda (t: T).(eq T t2 (THead (Bind Abbr) t x3))) H3 (TSort O) +(pr2_gen_sort (CSort O) x2 O H4)) in (eq_ind_r T (THead (Bind Abbr) (TSort O) +x3) (\lambda (t: T).(eq T (THead (Flat Appl) (TSort O) (TSort O)) t)) (let H7 +\def (eq_ind T (TSort O) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (THead (Bind Abst) x0 x1) H2) in (False_ind (eq T (THead (Flat +Appl) (TSort O) (TSort O)) (THead (Bind Abbr) (TSort O) x3)) H7)) t2 +H6)))))))))) H1)) (\lambda (H1: (ex6_6 B T T T T T (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not +(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 (CSort O) (TSort O) u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CSort O) y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead (CSort O) +(Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not +(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TSort O) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 (CSort O) (TSort O) u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CSort O) y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead (CSort O) +(Bind b) y2) z1 z2))))))) (eq T (THead (Flat Appl) (TSort O) (TSort O)) t2) +(\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda +(x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H3: (eq +T (TSort O) (THead (Bind x0) x1 x2))).(\lambda (H4: (eq T t2 (THead (Bind x0) +x5 (THead (Flat Appl) (lift (S O) O x4) x3)))).(\lambda (H5: (pr2 (CSort O) +(TSort O) x4)).(\lambda (H6: (pr2 (CSort O) x1 x5)).(\lambda (_: (pr2 (CHead +(CSort O) (Bind x0) x5) x2 x3)).(let H_y \def (pr2_gen_csort x1 x5 O H6) in +(let H8 \def (eq_ind T x4 (\lambda (t: T).(eq T t2 (THead (Bind x0) x5 (THead +(Flat Appl) (lift (S O) O t) x3)))) H4 (TSort O) (pr2_gen_sort (CSort O) x4 O +H5)) in (eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O +(TSort O)) x3)) (\lambda (t: T).(eq T (THead (Flat Appl) (TSort O) (TSort O)) +t)) (let H9 \def (eq_ind T (TSort O) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (THead (Bind x0) x1 x2) H3) in (False_ind (eq T (THead (Flat Appl) +(TSort O) (TSort O)) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O +(TSort O)) x3))) H9)) t2 H8))))))))))))))) H1)) H0))). + +lemma ex2_arity: + \forall (g: G).(\forall (a: A).((arity g ex2_c ex2_t a) \to (\forall (P: +Prop).P))) +\def + \lambda (g: G).(\lambda (a: A).(\lambda (H: (arity g (CSort O) (THead (Flat +Appl) (TSort O) (TSort O)) a)).(\lambda (P: Prop).(let H0 \def +(arity_gen_appl g (CSort O) (TSort O) (TSort O) a H) in (ex2_ind A (\lambda +(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 +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 with [(ASort _ _) +\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead x0 x1) H6) in +(False_ind P H7))))))) H3)))))) H0))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/flt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/flt/defs.ma new file mode 100644 index 000000000..58047be6c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/flt/defs.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/C/defs.ma". + +definition fweight: + C \to (T \to nat) +\def + \lambda (c: C).(\lambda (t: T).(plus (cweight c) (tweight t))). + +definition flt: + C \to (T \to (C \to (T \to Prop))) +\def + \lambda (c1: C).(\lambda (t1: T).(\lambda (c2: C).(\lambda (t2: T).(lt +(fweight c1 t1) (fweight c2 t2))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/flt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/flt/fwd.ma new file mode 100644 index 000000000..77fc7fa48 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/flt/fwd.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/flt/defs.ma". + +fact flt_wf__q_ind: + \forall (P: ((C \to (T \to Prop)))).(((\forall (n: nat).((\lambda (P0: ((C +\to (T \to Prop)))).(\lambda (n0: nat).(\forall (c: C).(\forall (t: T).((eq +nat (fweight c t) n0) \to (P0 c t)))))) P n))) \to (\forall (c: C).(\forall +(t: T).(P c t)))) +\def + let Q \def (\lambda (P: ((C \to (T \to Prop)))).(\lambda (n: nat).(\forall +(c: C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t)))))) in (\lambda +(P: ((C \to (T \to Prop)))).(\lambda (H: ((\forall (n: nat).(\forall (c: +C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t))))))).(\lambda (c: +C).(\lambda (t: T).(H (fweight c t) c t (refl_equal nat (fweight c t))))))). + +lemma flt_wf_ind: + \forall (P: ((C \to (T \to Prop)))).(((\forall (c2: C).(\forall (t2: +T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t2) \to (P c1 t1))))) +\to (P c2 t2))))) \to (\forall (c: C).(\forall (t: T).(P c t)))) +\def + let Q \def (\lambda (P: ((C \to (T \to Prop)))).(\lambda (n: nat).(\forall +(c: C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t)))))) in (\lambda +(P: ((C \to (T \to Prop)))).(\lambda (H: ((\forall (c2: C).(\forall (t2: +T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t2) \to (P c1 t1))))) +\to (P c2 t2)))))).(\lambda (c: C).(\lambda (t: T).(flt_wf__q_ind P (\lambda +(n: nat).(lt_wf_ind n (Q P) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: +nat).((lt m n0) \to (Q P m))))).(\lambda (c0: C).(\lambda (t0: T).(\lambda +(H1: (eq nat (fweight c0 t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: +nat).(\forall (m: nat).((lt m n1) \to (\forall (c1: C).(\forall (t1: T).((eq +nat (fweight c1 t1) m) \to (P c1 t1))))))) H0 (fweight c0 t0) H1) in (H c0 t0 +(\lambda (c1: C).(\lambda (t1: T).(\lambda (H3: (flt c1 t1 c0 t0)).(H2 +(fweight c1 t1) H3 c1 t1 (refl_equal nat (fweight c1 t1))))))))))))))) c +t))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/flt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/flt/props.ma new file mode 100644 index 000000000..e81e73404 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/flt/props.ma @@ -0,0 +1,105 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/flt/defs.ma". + +include "basic_1A/C/props.ma". + +lemma flt_thead_sx: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt c u c +(THead k u t))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(lt_reg_l +(tweight u) (S (plus (tweight u) (tweight t))) (cweight c) (le_n_S (tweight +u) (plus (tweight u) (tweight t)) (le_plus_l (tweight u) (tweight t))))))). + +lemma flt_thead_dx: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt c t c +(THead k u t))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(lt_reg_l +(tweight t) (S (plus (tweight u) (tweight t))) (cweight c) (le_n_S (tweight +t) (plus (tweight u) (tweight t)) (le_plus_r (tweight u) (tweight t))))))). + +lemma flt_shift: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt (CHead c +k u) t c (THead k u t))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(eq_ind nat +(S (plus (cweight c) (plus (tweight u) (tweight t)))) (\lambda (n: nat).(lt +(plus (plus (cweight c) (tweight u)) (tweight t)) n)) (eq_ind_r nat (plus +(plus (cweight c) (tweight u)) (tweight t)) (\lambda (n: nat).(lt (plus (plus +(cweight c) (tweight u)) (tweight t)) (S n))) (le_n (S (plus (plus (cweight +c) (tweight u)) (tweight t)))) (plus (cweight c) (plus (tweight u) (tweight +t))) (plus_assoc_l (cweight c) (tweight u) (tweight t))) (plus (cweight c) (S +(plus (tweight u) (tweight t)))) (plus_n_Sm (cweight c) (plus (tweight u) +(tweight t))))))). + +lemma flt_arith0: + \forall (k: K).(\forall (c: C).(\forall (t: T).(\forall (i: nat).(flt c t +(CHead c k t) (TLRef i))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (t: T).(\lambda (_: +nat).(lt_x_plus_x_Sy (plus (cweight c) (tweight t)) O)))). + +lemma flt_arith1: + \forall (k1: K).(\forall (c1: C).(\forall (c2: C).(\forall (t1: T).((cle +(CHead c1 k1 t1) c2) \to (\forall (k2: K).(\forall (t2: T).(\forall (i: +nat).(flt c1 t1 (CHead c2 k2 t2) (TLRef i))))))))) +\def + \lambda (_: K).(\lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda +(H: (le (plus (cweight c1) (tweight t1)) (cweight c2))).(\lambda (_: +K).(\lambda (t2: T).(\lambda (_: nat).(le_lt_trans (plus (cweight c1) +(tweight t1)) (cweight c2) (plus (plus (cweight c2) (tweight t2)) (S O)) H +(eq_ind_r nat (plus (S O) (plus (cweight c2) (tweight t2))) (\lambda (n: +nat).(lt (cweight c2) n)) (le_lt_n_Sm (cweight c2) (plus (cweight c2) +(tweight t2)) (le_plus_l (cweight c2) (tweight t2))) (plus (plus (cweight c2) +(tweight t2)) (S O)) (plus_sym (plus (cweight c2) (tweight t2)) (S +O))))))))))). + +lemma flt_arith2: + \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (i: nat).((flt c1 +t1 c2 (TLRef i)) \to (\forall (k2: K).(\forall (t2: T).(\forall (j: nat).(flt +c1 t1 (CHead c2 k2 t2) (TLRef j))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (_: nat).(\lambda +(H: (lt (plus (cweight c1) (tweight t1)) (plus (cweight c2) (S O)))).(\lambda +(_: K).(\lambda (t2: T).(\lambda (_: nat).(lt_le_trans (plus (cweight c1) +(tweight t1)) (plus (cweight c2) (S O)) (plus (plus (cweight c2) (tweight +t2)) (S O)) H (le_plus_plus (cweight c2) (plus (cweight c2) (tweight t2)) (S +O) (S O) (le_plus_l (cweight c2) (tweight t2)) (le_n (S O))))))))))). + +lemma cle_flt_trans: + \forall (c1: C).(\forall (c2: C).((cle c1 c2) \to (\forall (c3: C).(\forall +(u2: T).(\forall (u3: T).((flt c2 u2 c3 u3) \to (flt c1 u2 c3 u3))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (le (cweight c1) (cweight +c2))).(\lambda (c3: C).(\lambda (u2: T).(\lambda (u3: T).(\lambda (H0: (lt +(plus (cweight c2) (tweight u2)) (plus (cweight c3) (tweight +u3)))).(le_lt_trans (plus (cweight c1) (tweight u2)) (plus (cweight c2) +(tweight u2)) (plus (cweight c3) (tweight u3)) (le_plus_plus (cweight c1) +(cweight c2) (tweight u2) (tweight u2) H (le_n (tweight u2))) H0))))))). + +theorem flt_trans: + \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (t2: T).((flt c1 +t1 c2 t2) \to (\forall (c3: C).(\forall (t3: T).((flt c2 t2 c3 t3) \to (flt +c1 t1 c3 t3)))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (lt (fweight c1 t1) (fweight c2 t2))).(\lambda (c3: C).(\lambda (t3: +T).(\lambda (H0: (lt (fweight c2 t2) (fweight c3 t3))).(lt_trans (fweight c1 +t1) (fweight c2 t2) (fweight c3 t3) H H0)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/defs.ma new file mode 100644 index 000000000..d7b32c4e4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/defs.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubst0/defs.ma". + +inductive fsubst0 (i: nat) (v: T) (c1: C) (t1: T): C \to (T \to Prop) \def +| fsubst0_snd: \forall (t2: T).((subst0 i v t1 t2) \to (fsubst0 i v c1 t1 c1 +t2)) +| fsubst0_fst: \forall (c2: C).((csubst0 i v c1 c2) \to (fsubst0 i v c1 t1 c2 +t1)) +| fsubst0_both: \forall (t2: T).((subst0 i v t1 t2) \to (\forall (c2: +C).((csubst0 i v c1 c2) \to (fsubst0 i v c1 t1 c2 t2)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/fwd.ma new file mode 100644 index 000000000..f47769718 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/fsubst0/fwd.ma @@ -0,0 +1,57 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/fsubst0/defs.ma". + +implied lemma fsubst0_ind: + \forall (i: nat).(\forall (v: T).(\forall (c1: C).(\forall (t1: T).(\forall +(P: ((C \to (T \to Prop)))).(((\forall (t2: T).((subst0 i v t1 t2) \to (P c1 +t2)))) \to (((\forall (c2: C).((csubst0 i v c1 c2) \to (P c2 t1)))) \to +(((\forall (t2: T).((subst0 i v t1 t2) \to (\forall (c2: C).((csubst0 i v c1 +c2) \to (P c2 t2)))))) \to (\forall (c: C).(\forall (t: T).((fsubst0 i v c1 +t1 c t) \to (P c t))))))))))) +\def + \lambda (i: nat).(\lambda (v: T).(\lambda (c1: C).(\lambda (t1: T).(\lambda +(P: ((C \to (T \to Prop)))).(\lambda (f: ((\forall (t2: T).((subst0 i v t1 +t2) \to (P c1 t2))))).(\lambda (f0: ((\forall (c2: C).((csubst0 i v c1 c2) +\to (P c2 t1))))).(\lambda (f1: ((\forall (t2: T).((subst0 i v t1 t2) \to +(\forall (c2: C).((csubst0 i v c1 c2) \to (P c2 t2))))))).(\lambda (c: +C).(\lambda (t: T).(\lambda (f2: (fsubst0 i v c1 t1 c t)).(match f2 with +[(fsubst0_snd x x0) \Rightarrow (f x x0) | (fsubst0_fst x x0) \Rightarrow (f0 +x x0) | (fsubst0_both x x0 x1 x2) \Rightarrow (f1 x x0 x1 x2)]))))))))))). + +lemma fsubst0_gen_base: + \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (t2: T).(\forall +(v: T).(\forall (i: nat).((fsubst0 i v c1 t1 c2 t2) \to (or3 (land (eq C c1 +c2) (subst0 i v t1 t2)) (land (eq T t1 t2) (csubst0 i v c1 c2)) (land (subst0 +i v t1 t2) (csubst0 i v c1 c2))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(v: T).(\lambda (i: nat).(\lambda (H: (fsubst0 i v c1 t1 c2 t2)).(fsubst0_ind +i v c1 t1 (\lambda (c: C).(\lambda (t: T).(or3 (land (eq C c1 c) (subst0 i v +t1 t)) (land (eq T t1 t) (csubst0 i v c1 c)) (land (subst0 i v t1 t) (csubst0 +i v c1 c))))) (\lambda (t0: T).(\lambda (H0: (subst0 i v t1 t0)).(or3_intro0 +(land (eq C c1 c1) (subst0 i v t1 t0)) (land (eq T t1 t0) (csubst0 i v c1 +c1)) (land (subst0 i v t1 t0) (csubst0 i v c1 c1)) (conj (eq C c1 c1) (subst0 +i v t1 t0) (refl_equal C c1) H0)))) (\lambda (c0: C).(\lambda (H0: (csubst0 i +v c1 c0)).(or3_intro1 (land (eq C c1 c0) (subst0 i v t1 t1)) (land (eq T t1 +t1) (csubst0 i v c1 c0)) (land (subst0 i v t1 t1) (csubst0 i v c1 c0)) (conj +(eq T t1 t1) (csubst0 i v c1 c0) (refl_equal T t1) H0)))) (\lambda (t0: +T).(\lambda (H0: (subst0 i v t1 t0)).(\lambda (c0: C).(\lambda (H1: (csubst0 +i v c1 c0)).(or3_intro2 (land (eq C c1 c0) (subst0 i v t1 t0)) (land (eq T t1 +t0) (csubst0 i v c1 c0)) (land (subst0 i v t1 t0) (csubst0 i v c1 c0)) (conj +(subst0 i v t1 t0) (csubst0 i v c1 c0) H0 H1)))))) c2 t2 H))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/clear.ma new file mode 100644 index 000000000..86081168b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/clear.ma @@ -0,0 +1,139 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/props.ma". + +include "basic_1A/clear/drop.ma". + +lemma clear_getl_trans: + \forall (i: nat).(\forall (c2: C).(\forall (c3: C).((getl i c2 c3) \to +(\forall (c1: C).((clear c1 c2) \to (getl i c1 c3)))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c2: C).(\forall (c3: +C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 +c3))))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (H: (getl O c2 +c3)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(getl_intro O c1 c3 c1 +(drop_refl c1) (clear_trans c1 c2 H0 c3 (getl_gen_O c2 c3 H)))))))) (\lambda +(n: nat).(\lambda (_: ((\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to +(\forall (c1: C).((clear c1 c2) \to (getl n c1 c3)))))))).(\lambda (c2: +C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall +(c1: C).((clear c1 c) \to (getl (S n) c1 c3)))))) (\lambda (n0: nat).(\lambda +(c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c1: C).(\lambda +(_: (clear c1 (CSort n0))).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c1 +c3))))))) (\lambda (c: C).(\lambda (_: ((\forall (c3: C).((getl (S n) c c3) +\to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) +c3)).(\lambda (c1: C).(\lambda (H2: (clear c1 (CHead c k t))).(K_ind (\lambda +(k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear c1 (CHead c k0 t)) \to +(getl (S n) c1 c3)))) (\lambda (b: B).(\lambda (H3: (getl (S n) (CHead c +(Bind b) t) c3)).(\lambda (H4: (clear c1 (CHead c (Bind b) t))).(let H5 \def +(getl_gen_all c c3 (r (Bind b) n) (getl_gen_S (Bind b) c c3 t n H3)) in +(ex2_ind C (\lambda (e: C).(drop n O c e)) (\lambda (e: C).(clear e c3)) +(getl (S n) c1 c3) (\lambda (x: C).(\lambda (H6: (drop n O c x)).(\lambda +(H7: (clear x c3)).(getl_intro (S n) c1 c3 x (drop_clear_O b c1 c t H4 x n +H6) H7)))) H5))))) (\lambda (f: F).(\lambda (_: (getl (S n) (CHead c (Flat f) +t) c3)).(\lambda (H4: (clear c1 (CHead c (Flat f) t))).(clear_gen_flat_r f c1 +c t H4 (getl (S n) c1 c3))))) k H1 H2))))))))) c2)))) i). + +lemma getl_clear_trans: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).((getl i c1 c2) \to +(\forall (c3: C).((clear c2 c3) \to (getl i c1 c3)))))) +\def + \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (getl i c1 +c2)).(\lambda (c3: C).(\lambda (H0: (clear c2 c3)).(let H1 \def (getl_gen_all +c1 c2 i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: +C).(clear e c2)) (getl i c1 c3) (\lambda (x: C).(\lambda (H2: (drop i O c1 +x)).(\lambda (H3: (clear x c2)).(let H4 \def (clear_gen_all x c2 H3) in +(ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c2 +(CHead e (Bind b) u))))) (getl i c1 c3) (\lambda (x0: B).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (H5: (eq C c2 (CHead x1 (Bind x0) x2))).(let H6 +\def (eq_ind C c2 (\lambda (c: C).(clear x c)) H3 (CHead x1 (Bind x0) x2) H5) +in (let H7 \def (eq_ind C c2 (\lambda (c: C).(clear c c3)) H0 (CHead x1 (Bind +x0) x2) H5) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(getl i c1 +c)) (getl_intro i c1 (CHead x1 (Bind x0) x2) x H2 H6) c3 (clear_gen_bind x0 +x1 c3 x2 H7)))))))) H4))))) H1))))))). + +lemma getl_clear_bind: + \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (v: T).((clear c +(CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) +\to (getl (S n) c e2)))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: +C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: +C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2)))))))) (\lambda +(n: nat).(\lambda (e1: C).(\lambda (v: T).(\lambda (H: (clear (CSort n) +(CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n0: nat).(\lambda (_: +(getl n0 e1 e2)).(clear_gen_sort (CHead e1 (Bind b) v) n H (getl (S n0) +(CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: +C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: +C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2))))))))).(\lambda +(k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (v: T).(\lambda (H0: (clear +(CHead c0 k t) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n: +nat).(\lambda (H1: (getl n e1 e2)).(K_ind (\lambda (k0: K).((clear (CHead c0 +k0 t) (CHead e1 (Bind b) v)) \to (getl (S n) (CHead c0 k0 t) e2))) (\lambda +(b0: B).(\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) +v))).(let H3 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow e1 | (CHead c1 _ _) \Rightarrow c1])) (CHead e1 (Bind b) v) +(CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in +((let H4 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) v) (CHead c0 +(Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H5 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow v | +(CHead _ _ t0) \Rightarrow t0])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) +(clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in (\lambda (H6: (eq B b +b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c1: +C).(getl n c1 e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(getl (S n) +(CHead c0 (Bind b1) t) e2)) (getl_head (Bind b) n c0 e2 H8 t) b0 H6))))) H4)) +H3)))) (\lambda (f: F).(\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 +(Bind b) v))).(getl_flat c0 e2 (S n) (H e1 v (clear_gen_flat f c0 (CHead e1 +(Bind b) v) t H2) e2 n H1) f t))) k H0))))))))))) c)). + +lemma getl_clear_conf: + \forall (i: nat).(\forall (c1: C).(\forall (c3: C).((getl i c1 c3) \to +(\forall (c2: C).((clear c1 c2) \to (getl i c2 c3)))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c3: +C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 +c3))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H: (getl O c1 +c3)).(\lambda (c2: C).(\lambda (H0: (clear c1 c2)).(eq_ind C c3 (\lambda (c: +C).(getl O c c3)) (let H1 \def (clear_gen_all c1 c3 (getl_gen_O c1 c3 H)) in +(ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c3 +(CHead e (Bind b) u))))) (getl O c3 c3) (\lambda (x0: B).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (H2: (eq C c3 (CHead x1 (Bind x0) x2))).(let H3 +\def (eq_ind C c3 (\lambda (c: C).(clear c1 c)) (getl_gen_O c1 c3 H) (CHead +x1 (Bind x0) x2) H2) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: +C).(getl O c c)) (getl_refl x0 x1 x2) c3 H2)))))) H1)) c2 (clear_mono c1 c3 +(getl_gen_O c1 c3 H) c2 H0))))))) (\lambda (n: nat).(\lambda (_: ((\forall +(c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) +\to (getl n c2 c3)))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall +(c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) +c2 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) +(CSort n0) c3)).(\lambda (c2: C).(\lambda (_: (clear (CSort n0) +c2)).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c2 c3))))))) (\lambda (c: +C).(\lambda (H0: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: +C).((clear c c2) \to (getl (S n) c2 c3))))))).(\lambda (k: K).(\lambda (t: +T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda +(c2: C).(\lambda (H2: (clear (CHead c k t) c2)).(K_ind (\lambda (k0: +K).((getl (S n) (CHead c k0 t) c3) \to ((clear (CHead c k0 t) c2) \to (getl +(S n) c2 c3)))) (\lambda (b: B).(\lambda (H3: (getl (S n) (CHead c (Bind b) +t) c3)).(\lambda (H4: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c +(Bind b) t) (\lambda (c0: C).(getl (S n) c0 c3)) (getl_head (Bind b) n c c3 +(getl_gen_S (Bind b) c c3 t n H3) t) c2 (clear_gen_bind b c c2 t H4))))) +(\lambda (f: F).(\lambda (H3: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda +(H4: (clear (CHead c (Flat f) t) c2)).(H0 c3 (getl_gen_S (Flat f) c c3 t n +H3) c2 (clear_gen_flat f c c2 t H4))))) k H1 H2))))))))) c1)))) i). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/dec.ma new file mode 100644 index 000000000..1a4ebcbe4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/dec.ma @@ -0,0 +1,97 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/props.ma". + +lemma getl_dec: + \forall (c: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda +(b: B).(\lambda (v: T).(getl i c (CHead e (Bind b) v)))))) (\forall (d: +C).((getl i c d) \to (\forall (P: Prop).P))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (i: nat).(or (ex_3 C B T +(\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) +v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P)))))) +(\lambda (n: nat).(\lambda (i: nat).(or_intror (ex_3 C B T (\lambda (e: +C).(\lambda (b: B).(\lambda (v: T).(getl i (CSort n) (CHead e (Bind b) +v)))))) (\forall (d: C).((getl i (CSort n) d) \to (\forall (P: Prop).P))) +(\lambda (d: C).(\lambda (H: (getl i (CSort n) d)).(\lambda (P: +Prop).(getl_gen_sort n i d H P))))))) (\lambda (c0: C).(\lambda (H: ((\forall +(i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: +T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to +(\forall (P: Prop).P))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (i: +nat).(nat_ind (\lambda (n: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: +B).(\lambda (v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall +(d: C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))) (K_ind +(\lambda (k0: K).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: +T).(getl O (CHead c0 k0 t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O +(CHead c0 k0 t) d) \to (\forall (P: Prop).P))))) (\lambda (b: B).(or_introl +(ex_3 C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead +c0 (Bind b) t) (CHead e (Bind b0) v)))))) (\forall (d: C).((getl O (CHead c0 +(Bind b) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: +C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e +(Bind b0) v))))) c0 b t (getl_refl b c0 t)))) (\lambda (f: F).(let H_x \def +(H O) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: +B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v)))))) (\forall (d: +C).((getl O c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: +C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e +(Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to +(\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda +(b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T +(\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) +v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl +O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O +(CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: +C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl O c0 (CHead x0 (Bind +x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: +T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: +C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (ex_3_intro +C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat +f) t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_flat c0 (CHead x0 (Bind x1) x2) +O H2 f t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl O c0 d) \to +(\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: +B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) +(\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) +(\lambda (d: C).(\lambda (H2: (getl O (CHead c0 (Flat f) t) d)).(\lambda (P: +Prop).(H1 d (getl_intro O c0 d c0 (drop_refl c0) (clear_gen_flat f c0 d t +(getl_gen_O (CHead c0 (Flat f) t) d H2))) P)))))) H0)))) k) (\lambda (n: +nat).(\lambda (_: (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda +(v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: +C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))).(let H_x \def (H +(r k n)) in (let H1 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda +(b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v)))))) (\forall +(d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T +(\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) +(CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to +(\forall (P: Prop).P)))) (\lambda (H2: (ex_3 C B T (\lambda (e: C).(\lambda +(b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))))).(ex_3_ind +C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead +e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda +(v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: +C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: +C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H3: (getl (r k n) c0 (CHead x0 +(Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: +B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) +(\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) +(ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) +(CHead c0 k t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_head k n c0 (CHead x0 +(Bind x1) x2) H3 t))))))) H2)) (\lambda (H2: ((\forall (d: C).((getl (r k n) +c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: +C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind +b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: +Prop).P))) (\lambda (d: C).(\lambda (H3: (getl (S n) (CHead c0 k t) +d)).(\lambda (P: Prop).(H2 d (getl_gen_S k c0 d t n H3) P)))))) H1))))) +i)))))) c). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/defs.ma new file mode 100644 index 000000000..e9efe1073 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/drop/defs.ma". + +include "basic_1A/clear/defs.ma". + +inductive getl (h: nat) (c1: C) (c2: C): Prop \def +| getl_intro: \forall (e: C).((drop h O c1 e) \to ((clear e c2) \to (getl h +c1 c2))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/drop.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/drop.ma new file mode 100644 index 000000000..3e1444c37 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/drop.ma @@ -0,0 +1,483 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/props.ma". + +include "basic_1A/clear/drop.ma". + +lemma getl_drop: + \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: +nat).((getl h c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: +C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to +(drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: +T).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) (CHead e (Bind b) +u))).(getl_gen_sort n h (CHead e (Bind b) u) H (drop (S h) O (CSort n) +e))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: +T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 +e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: +T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) +(CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: +(getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear +(CHead c0 k0 t) (CHead e (Bind b) u)) \to (drop (S O) O (CHead c0 k0 t) e))) +(\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind +b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) (CHead e (Bind b) u) (CHead +c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 +\def (f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow b | +(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) \Rightarrow b1 | (Flat +_) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) +(clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C +T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t0) +\Rightarrow t0])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind +b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: +(eq C e c0)).(eq_ind_r C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 (Bind +b0) t) c1)) (eq_ind B b (\lambda (b1: B).(drop (S O) O (CHead c0 (Bind b1) t) +c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) b0 H5) e H6)))) H3)) +H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e +(Bind b) u))).(drop_clear_O b (CHead c0 (Flat f) t) e u (clear_flat c0 (CHead +e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1) f t) e O +(drop_refl e)))) k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) +(\lambda (n: nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) +\to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (getl (S n) (CHead c0 k +t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) +(\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (getl_gen_S k c0 (CHead e +(Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). + +lemma getl_drop_conf_lt: + \forall (b: B).(\forall (c: C).(\forall (c0: C).(\forall (u: T).(\forall (i: +nat).((getl i c (CHead c0 (Bind b) u)) \to (\forall (e: C).(\forall (h: +nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: +C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop +h d c0 e0))))))))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: +C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) +c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0))))))))))))) (\lambda (n: +nat).(\lambda (c0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i +(CSort n) (CHead c0 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (_: (drop h (S (plus i d)) (CSort n) e)).(getl_gen_sort n i +(CHead c0 (Bind b) u) H (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c0 e0)))))))))))))) (\lambda +(c0: C).(\lambda (H: ((\forall (c1: C).(\forall (u: T).(\forall (i: +nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: +nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: +C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop +h d c1 e0)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i (CHead c0 k t) +(CHead c1 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H1: (drop h (S (plus i d)) (CHead c0 k t) e)).(let H2 \def +(getl_gen_all (CHead c0 k t) (CHead c1 (Bind b) u) i H0) in (ex2_ind C +(\lambda (e0: C).(drop i O (CHead c0 k t) e0)) (\lambda (e0: C).(clear e0 +(CHead c1 (Bind b) u))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x: +C).(\lambda (H3: (drop i O (CHead c0 k t) x)).(\lambda (H4: (clear x (CHead +c1 (Bind b) u))).(C_ind (\lambda (c2: C).((drop i O (CHead c0 k t) c2) \to +((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead +e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) +(\lambda (n: nat).(\lambda (_: (drop i O (CHead c0 k t) (CSort n))).(\lambda +(H6: (clear (CSort n) (CHead c1 (Bind b) u))).(clear_gen_sort (CHead c1 (Bind +b) u) n H6 (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) (\lambda (x0: C).(\lambda +(IHx: (((drop i O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) +\to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))).(\lambda (k0: K).(\lambda +(t0: T).(\lambda (H5: (drop i O (CHead c0 k t) (CHead x0 k0 t0))).(\lambda +(H6: (clear (CHead x0 k0 t0) (CHead c1 (Bind b) u))).(K_ind (\lambda (k1: +K).((drop i O (CHead c0 k t) (CHead x0 k1 t0)) \to ((clear (CHead x0 k1 t0) +(CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) (\lambda (b0: +B).(\lambda (H7: (drop i O (CHead c0 k t) (CHead x0 (Bind b0) t0))).(\lambda +(H8: (clear (CHead x0 (Bind b0) t0) (CHead c1 (Bind b) u))).(let H9 \def +(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c1 | +(CHead c2 _ _) \Rightarrow c2])) (CHead c1 (Bind b) u) (CHead x0 (Bind b0) +t0) (clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in ((let H10 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow b | +(CHead _ k1 _) \Rightarrow (match k1 with [(Bind b1) \Rightarrow b1 | (Flat +_) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead x0 (Bind b0) t0) +(clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in ((let H11 \def +(f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | +(CHead _ _ t1) \Rightarrow t1])) (CHead c1 (Bind b) u) (CHead x0 (Bind b0) +t0) (clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in (\lambda (H12: (eq +B b b0)).(\lambda (H13: (eq C c1 x0)).(let H14 \def (eq_ind_r T t0 (\lambda +(t1: T).(drop i O (CHead c0 k t) (CHead x0 (Bind b0) t1))) H7 u H11) in (let +H15 \def (eq_ind_r B b0 (\lambda (b1: B).(drop i O (CHead c0 k t) (CHead x0 +(Bind b1) u))) H14 b H12) in (let H16 \def (eq_ind_r C x0 (\lambda (c2: +C).((drop i O (CHead c0 k t) c2) \to ((clear c2 (CHead c1 (Bind b) u)) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))) IHx c1 H13) in (let H17 \def +(eq_ind_r C x0 (\lambda (c2: C).(drop i O (CHead c0 k t) (CHead c2 (Bind b) +u))) H15 c1 H13) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h (r (Bind b) d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r (Bind b) +d) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d +v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: +T).(\lambda (x2: C).(\lambda (H18: (eq T u (lift h (r (Bind b) d) +x1))).(\lambda (H19: (drop i O e (CHead x2 (Bind b) x1))).(\lambda (H20: +(drop h (r (Bind b) d) c1 x2)).(let H21 \def (eq_ind T u (\lambda (t1: +T).((drop i O (CHead c0 k t) c1) \to ((clear c1 (CHead c1 (Bind b) t1)) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))) H16 (lift h (r (Bind b) d) x1) +H18) in (eq_ind_r T (lift h (r (Bind b) d) x1) (\lambda (t1: T).(ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: +T).(\lambda (_: C).(eq T (lift h (r (Bind b) d) x1) (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))) x1 x2 (refl_equal T (lift h d x1)) +(getl_intro i e (CHead x2 (Bind b) x1) (CHead x2 (Bind b) x1) H19 (clear_bind +b x2 x1)) H20) u H18))))))) (drop_conf_lt (Bind b) i u c1 (CHead c0 k t) H17 +e h d H1))))))))) H10)) H9))))) (\lambda (f: F).(\lambda (H7: (drop i O +(CHead c0 k t) (CHead x0 (Flat f) t0))).(\lambda (H8: (clear (CHead x0 (Flat +f) t0) (CHead c1 (Bind b) u))).(nat_ind (\lambda (n: nat).((drop h (S (plus n +d)) (CHead c0 k t) e) \to ((drop n O (CHead c0 k t) (CHead x0 (Flat f) t0)) +\to ((((drop n O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: +C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop +h d c1 e0)))))))) (\lambda (H9: (drop h (S (plus O d)) (CHead c0 k t) +e)).(\lambda (H10: (drop O O (CHead c0 k t) (CHead x0 (Flat f) t0))).(\lambda +(IHx0: (((drop O O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) +\to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))).(let H11 \def (f_equal C C +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow c0 | (CHead c2 _ _) +\Rightarrow c2])) (CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead +c0 k t) (CHead x0 (Flat f) t0) H10)) in ((let H12 \def (f_equal C K (\lambda +(e0: C).(match e0 with [(CSort _) \Rightarrow k | (CHead _ k1 _) \Rightarrow +k1])) (CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead c0 k t) +(CHead x0 (Flat f) t0) H10)) in ((let H13 \def (f_equal C T (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow t | (CHead _ _ t1) \Rightarrow t1])) +(CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead x0 +(Flat f) t0) H10)) in (\lambda (H14: (eq K k (Flat f))).(\lambda (H15: (eq C +c0 x0)).(let H16 \def (eq_ind_r C x0 (\lambda (c2: C).(clear c2 (CHead c1 +(Bind b) u))) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) c0 H15) in +(let H17 \def (eq_ind_r C x0 (\lambda (c2: C).((drop O O (CHead c0 k t) c2) +\to ((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda +(_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))))))) IHx0 c0 H15) in (let H18 \def (eq_ind K k (\lambda (k1: K).((drop O +O (CHead c0 k1 t) c0) \to ((clear c0 (CHead c1 (Bind b) u)) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))) H17 (Flat f) H14) in (let H19 \def +(eq_ind K k (\lambda (k1: K).(drop h (S (plus O d)) (CHead c0 k1 t) e)) H9 +(Flat f) H14) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e +(CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r +(Flat f) (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat +f) (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: +C).(\lambda (x2: T).(\lambda (H20: (eq C e (CHead x1 (Flat f) x2))).(\lambda +(H21: (eq T t (lift h (r (Flat f) (plus O d)) x2))).(\lambda (H22: (drop h (r +(Flat f) (plus O d)) c0 x1)).(let H23 \def (f_equal T T (\lambda (e0: T).e0) +t (lift h (r (Flat f) (plus O d)) x2) H21) in (let H24 \def (eq_ind C e +(\lambda (c2: C).((drop O O (CHead c0 (Flat f) t) c0) \to ((clear c0 (CHead +c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift +h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O c2 (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H18 (CHead x1 +(Flat f) x2) H20) in (eq_ind_r C (CHead x1 (Flat f) x2) (\lambda (c2: +C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl O c2 (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H25 \def (eq_ind T t +(\lambda (t1: T).((drop O O (CHead c0 (Flat f) t1) c0) \to ((clear c0 (CHead +c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift +h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))))))) H24 (lift h (S d) x2) H23) in (let H26 \def (H c1 u O (getl_intro O +c0 (CHead c1 (Bind b) u) c0 (drop_refl c0) H16) x1 h d H22) in (ex3_2_ind T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl O x1 (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda +(_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O +(CHead x1 (Flat f) x2) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h d c1 e0)))) (\lambda (x3: T).(\lambda (x4: C).(\lambda (H27: (eq T +u (lift h d x3))).(\lambda (H28: (getl O x1 (CHead x4 (Bind b) x3))).(\lambda +(H29: (drop h d c1 x4)).(let H30 \def (eq_ind T u (\lambda (t1: T).((drop O O +(CHead c0 (Flat f) (lift h (S d) x2)) c0) \to ((clear c0 (CHead c1 (Bind b) +t1)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) (CHead e0 +(Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H25 +(lift h d x3) H27) in (let H31 \def (eq_ind T u (\lambda (t1: T).(clear c0 +(CHead c1 (Bind b) t1))) H16 (lift h d x3) H27) in (eq_ind_r T (lift h d x3) +(\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h +d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x3) +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) +x2) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))) x3 x4 (refl_equal T (lift h d x3)) (getl_flat x1 (CHead x4 (Bind b) x3) +O H28 f x2) H29) u H27)))))))) H26))) e H20)))))))) (drop_gen_skip_l c0 e t h +(plus O d) (Flat f) H19))))))))) H12)) H11))))) (\lambda (i0: nat).(\lambda +(IHi: (((drop h (S (plus i0 d)) (CHead c0 k t) e) \to ((drop i0 O (CHead c0 k +t) (CHead x0 (Flat f) t0)) \to ((((drop i0 O (CHead c0 k t) x0) \to ((clear +x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq +T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i0 e (CHead e0 +(Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl i0 e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))))).(\lambda (H9: (drop h (S (plus +(S i0) d)) (CHead c0 k t) e)).(\lambda (H10: (drop (S i0) O (CHead c0 k t) +(CHead x0 (Flat f) t0))).(\lambda (IHx0: (((drop (S i0) O (CHead c0 k t) x0) +\to ((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda +(_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) +e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0)))))))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 +k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k (plus (S i0) d)) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus (S i0) d)) c0 e0))) +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl (S i0) e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: C).(\lambda (x2: +T).(\lambda (H11: (eq C e (CHead x1 k x2))).(\lambda (H12: (eq T t (lift h (r +k (plus (S i0) d)) x2))).(\lambda (H13: (drop h (r k (plus (S i0) d)) c0 +x1)).(let H14 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r k (plus (S +i0) d)) x2) H12) in (let H15 \def (eq_ind C e (\lambda (c2: C).((drop h (S +(plus i0 d)) (CHead c0 k t) c2) \to ((drop i0 O (CHead c0 k t) (CHead x0 +(Flat f) t0)) \to ((((drop i0 O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 +(Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d +v)))) (\lambda (v: T).(\lambda (e0: C).(getl i0 c2 (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i0 c2 (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0)))))))) IHi (CHead x1 k x2) H11) in (let +H16 \def (eq_ind C e (\lambda (c2: C).((drop (S i0) O (CHead c0 k t) x0) \to +((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) c2 +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))))))) IHx0 (CHead x1 k x2) H11) in (eq_ind_r C (CHead x1 k x2) (\lambda +(c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl (S i0) c2 (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H17 \def (eq_ind T +t (\lambda (t1: T).((drop (S i0) O (CHead c0 k t1) x0) \to ((clear x0 (CHead +c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift +h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))))))) H16 (lift h (r k (S (plus i0 d))) x2) H14) in (let H18 \def (eq_ind +T t (\lambda (t1: T).((drop h (S (plus i0 d)) (CHead c0 k t1) (CHead x1 k +x2)) \to ((drop i0 O (CHead c0 k t1) (CHead x0 (Flat f) t0)) \to ((((drop i0 +O (CHead c0 k t1) x0) \to ((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i0 (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i0 (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) H15 (lift h (r k (S +(plus i0 d))) x2) H14) in (let H19 \def (eq_ind nat (r k (plus (S i0) d)) +(\lambda (n: nat).(drop h n c0 x1)) H13 (plus (r k (S i0)) d) (r_plus k (S +i0) d)) in (let H20 \def (eq_ind nat (r k (S i0)) (\lambda (n: nat).(drop h +(plus n d) c0 x1)) H19 (S (r k i0)) (r_S k i0)) in (let H21 \def (H c1 u (r k +i0) (getl_intro (r k i0) c0 (CHead c1 (Bind b) u) (CHead x0 (Flat f) t0) +(drop_gen_drop k c0 (CHead x0 (Flat f) t0) t i0 H10) (clear_flat x0 (CHead c1 +(Bind b) u) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) f t0)) x1 h d +H20) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d +v)))) (\lambda (v: T).(\lambda (e0: C).(getl (r k i0) x1 (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: +C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x3: T).(\lambda (x4: +C).(\lambda (H22: (eq T u (lift h d x3))).(\lambda (H23: (getl (r k i0) x1 +(CHead x4 (Bind b) x3))).(\lambda (H24: (drop h d c1 x4)).(let H25 \def +(eq_ind T u (\lambda (t1: T).((drop (S i0) O (CHead c0 k (lift h (r k (S +(plus i0 d))) x2)) x0) \to ((clear x0 (CHead c1 (Bind b) t1)) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H17 (lift h d x3) +H22) in (let H26 \def (eq_ind T u (\lambda (t1: T).(clear x0 (CHead c1 (Bind +b) t1))) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) (lift h d x3) H22) +in (eq_ind_r T (lift h d x3) (\lambda (t1: T).(ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: +C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: +T).(\lambda (_: C).(eq T (lift h d x3) (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x3 x4 (refl_equal T (lift +h d x3)) (getl_head k i0 x1 (CHead x4 (Bind b) x3) H23 x2) H24) u H22)))))))) +H21)))))) e H11))))))))) (drop_gen_skip_l c0 e t h (plus (S i0) d) k +H9))))))) i H1 H7 IHx)))) k0 H5 H6))))))) x H3 H4)))) H2)))))))))))))) c)). + +lemma getl_drop_conf_ge: + \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall +(e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d +h) i) \to (getl (minus i h) e a))))))))) +\def + \lambda (i: nat).(\lambda (a: C).(\lambda (c: C).(\lambda (H: (getl i c +a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h +d c e)).(\lambda (H1: (le (plus d h) i)).(let H2 \def (getl_gen_all c a i H) +in (ex2_ind C (\lambda (e0: C).(drop i O c e0)) (\lambda (e0: C).(clear e0 +a)) (getl (minus i h) e a) (\lambda (x: C).(\lambda (H3: (drop i O c +x)).(\lambda (H4: (clear x a)).(getl_intro (minus i h) e a x (drop_conf_ge i +x c H3 e h d H0 H1) H4)))) H2)))))))))). + +lemma getl_conf_ge_drop: + \forall (b: B).(\forall (c1: C).(\forall (e: C).(\forall (u: T).(\forall (i: +nat).((getl i c1 (CHead e (Bind b) u)) \to (\forall (c2: C).((drop (S O) i c1 +c2) \to (drop i O c2 e)))))))) +\def + \lambda (b: B).(\lambda (c1: C).(\lambda (e: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H: (getl i c1 (CHead e (Bind b) u))).(\lambda (c2: C).(\lambda +(H0: (drop (S O) i c1 c2)).(let H3 \def (eq_ind nat (minus (S i) (S O)) +(\lambda (n: nat).(drop n O c2 e)) (drop_conf_ge (S i) e c1 (getl_drop b c1 e +u i H) c2 (S O) i H0 (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(le n (S +i))) (le_n (S i)) (plus i (S O)) (plus_sym i (S O)))) i (minus_Sx_SO i)) in +H3)))))))). + +lemma getl_drop_conf_rev: + \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to +(\forall (b: B).(\forall (c2: C).(\forall (v2: T).(\forall (i: nat).((getl i +c2 (CHead e2 (Bind b) v2)) \to (ex2 C (\lambda (c1: C).(drop j O c1 c2)) +(\lambda (c1: C).(drop (S i) j c1 e1))))))))))) +\def + \lambda (j: nat).(\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop j O e1 +e2)).(\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(\lambda (i: +nat).(\lambda (H0: (getl i c2 (CHead e2 (Bind b) v2))).(drop_conf_rev j e1 e2 +H c2 (S i) (getl_drop b c2 e2 v2 i H0)))))))))). + +lemma drop_getl_trans_lt: + \forall (i: nat).(\forall (d: nat).((lt i d) \to (\forall (c1: C).(\forall +(c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (b: B).(\forall (e2: +C).(\forall (v: T).((getl i c2 (CHead e2 (Bind b) v)) \to (ex2 C (\lambda +(e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda +(e1: C).(drop h (minus d (S i)) e1 e2))))))))))))) +\def + \lambda (i: nat).(\lambda (d: nat).(\lambda (H: (lt i d)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 +c2)).(\lambda (b: B).(\lambda (e2: C).(\lambda (v: T).(\lambda (H1: (getl i +c2 (CHead e2 (Bind b) v))).(let H2 \def (getl_gen_all c2 (CHead e2 (Bind b) +v) i H1) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: +C).(clear e (CHead e2 (Bind b) v))) (ex2 C (\lambda (e1: C).(getl i c1 (CHead +e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h (minus d +(S i)) e1 e2))) (\lambda (x: C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: +(clear x (CHead e2 (Bind b) v))).(ex2_ind C (\lambda (e1: C).(drop i O c1 +e1)) (\lambda (e1: C).(drop h (minus d i) e1 x)) (ex2 C (\lambda (e1: +C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: +C).(drop h (minus d (S i)) e1 e2))) (\lambda (x0: C).(\lambda (H5: (drop i O +c1 x0)).(\lambda (H6: (drop h (minus d i) x0 x)).(let H7 \def (eq_ind nat +(minus d i) (\lambda (n: nat).(drop h n x0 x)) H6 (S (minus d (S i))) +(minus_x_Sy d i H)) in (let H8 \def (drop_clear_S x x0 h (minus d (S i)) H7 b +e2 v H4) in (ex2_ind C (\lambda (c3: C).(clear x0 (CHead c3 (Bind b) (lift h +(minus d (S i)) v)))) (\lambda (c3: C).(drop h (minus d (S i)) c3 e2)) (ex2 C +(\lambda (e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) +(\lambda (e1: C).(drop h (minus d (S i)) e1 e2))) (\lambda (x1: C).(\lambda +(H9: (clear x0 (CHead x1 (Bind b) (lift h (minus d (S i)) v)))).(\lambda +(H10: (drop h (minus d (S i)) x1 e2)).(ex_intro2 C (\lambda (e1: C).(getl i +c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h +(minus d (S i)) e1 e2)) x1 (getl_intro i c1 (CHead x1 (Bind b) (lift h (minus +d (S i)) v)) x0 H5 H9) H10)))) H8)))))) (drop_trans_le i d (le_S_n i d +(le_S_n (S i) (S d) (le_S (S (S i)) (S d) (le_n_S (S i) d H)))) c1 c2 h H0 x +H3))))) H2)))))))))))). + +lemma drop_getl_trans_le: + \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall +(c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((getl i c2 +e2) \to (ex3_2 C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) +(\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: +C).(\lambda (e1: C).(clear e1 e2)))))))))))) +\def + \lambda (i: nat).(\lambda (d: nat).(\lambda (H: (le i d)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 +c2)).(\lambda (e2: C).(\lambda (H1: (getl i c2 e2)).(let H2 \def +(getl_gen_all c2 e2 i H1) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) +(\lambda (e: C).(clear e e2)) (ex3_2 C C (\lambda (e0: C).(\lambda (_: +C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) +e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 e2)))) (\lambda (x: +C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: (clear x e2)).(let H5 \def +(drop_trans_le i d H c1 c2 h H0 x H3) in (ex2_ind C (\lambda (e1: C).(drop i +O c1 e1)) (\lambda (e1: C).(drop h (minus d i) e1 x)) (ex3_2 C C (\lambda +(e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: +C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 +e2)))) (\lambda (x0: C).(\lambda (H6: (drop i O c1 x0)).(\lambda (H7: (drop h +(minus d i) x0 x)).(ex3_2_intro C C (\lambda (e0: C).(\lambda (_: C).(drop i +O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) +(\lambda (_: C).(\lambda (e1: C).(clear e1 e2))) x0 x H6 H7 H4)))) H5))))) +H2)))))))))). + +lemma drop_getl_trans_ge: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((getl i c2 e2) +\to ((le d i) \to (getl (plus i h) c1 e2))))))))) +\def + \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (d: +nat).(\lambda (h: nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: +C).(\lambda (H0: (getl i c2 e2)).(\lambda (H1: (le d i)).(let H2 \def +(getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) +(\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) (\lambda (x: +C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: (clear x e2)).(getl_intro +(plus i h) c1 e2 x (drop_trans_ge i c1 c2 d h H x H3 H1) H4)))) H2)))))))))). + +lemma getl_drop_trans: + \forall (c1: C).(\forall (c2: C).(\forall (h: nat).((getl h c1 c2) \to +(\forall (e2: C).(\forall (i: nat).((drop (S i) O c2 e2) \to (drop (S (plus i +h)) O c1 e2))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: +nat).((getl h c c2) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c2 +e2) \to (drop (S (plus i h)) O c e2)))))))) (\lambda (n: nat).(\lambda (c2: +C).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) c2)).(\lambda (e2: +C).(\lambda (i: nat).(\lambda (_: (drop (S i) O c2 e2)).(getl_gen_sort n h c2 +H (drop (S (plus i h)) O (CSort n) e2))))))))) (\lambda (c2: C).(\lambda +(IHc: ((\forall (c3: C).(\forall (h: nat).((getl h c2 c3) \to (\forall (e2: +C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i h)) O c2 +e2))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall +(c3: C).(\forall (h: nat).((getl h (CHead c2 k0 t) c3) \to (\forall (e2: +C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i h)) O (CHead +c2 k0 t) e2))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: +C).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c2 (Bind b) +t) c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop +(S (plus i n)) O (CHead c2 (Bind b) t) e2)))))) (\lambda (H: (getl O (CHead +c2 (Bind b) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H0: (drop (S +i) O c3 e2)).(let H1 \def (eq_ind C c3 (\lambda (c: C).(drop (S i) O c e2)) +H0 (CHead c2 (Bind b) t) (clear_gen_bind b c2 c3 t (getl_gen_O (CHead c2 +(Bind b) t) c3 H))) in (eq_ind nat i (\lambda (n: nat).(drop (S n) O (CHead +c2 (Bind b) t) e2)) (drop_drop (Bind b) i c2 e2 (drop_gen_drop (Bind b) c2 e2 +t i H1) t) (plus i O) (plus_n_O i))))))) (\lambda (n: nat).(\lambda (_: +(((getl n (CHead c2 (Bind b) t) c3) \to (\forall (e2: C).(\forall (i: +nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Bind b) t) +e2))))))).(\lambda (H0: (getl (S n) (CHead c2 (Bind b) t) c3)).(\lambda (e2: +C).(\lambda (i: nat).(\lambda (H1: (drop (S i) O c3 e2)).(eq_ind nat (plus (S +i) n) (\lambda (n0: nat).(drop (S n0) O (CHead c2 (Bind b) t) e2)) (drop_drop +(Bind b) (plus (S i) n) c2 e2 (IHc c3 n (getl_gen_S (Bind b) c2 c3 t n H0) e2 +i H1) t) (plus i (S n)) (plus_Snm_nSm i n)))))))) h))))) (\lambda (f: +F).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(nat_ind (\lambda (n: +nat).((getl n (CHead c2 (Flat f) t) c3) \to (\forall (e2: C).(\forall (i: +nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Flat f) t) +e2)))))) (\lambda (H: (getl O (CHead c2 (Flat f) t) c3)).(\lambda (e2: +C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O c3 e2)).(drop_drop (Flat f) +(plus i O) c2 e2 (IHc c3 O (getl_intro O c2 c3 c2 (drop_refl c2) +(clear_gen_flat f c2 c3 t (getl_gen_O (CHead c2 (Flat f) t) c3 H))) e2 i H0) +t))))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead c2 (Flat f) t) c3) \to +(\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i +n)) O (CHead c2 (Flat f) t) e2))))))).(\lambda (H0: (getl (S n) (CHead c2 +(Flat f) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H1: (drop (S i) +O c3 e2)).(drop_drop (Flat f) (plus i (S n)) c2 e2 (IHc c3 (S n) (getl_gen_S +(Flat f) c2 c3 t n H0) e2 i H1) t))))))) h))))) k)))) c1). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/flt.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/flt.ma new file mode 100644 index 000000000..a6161f484 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/flt.ma @@ -0,0 +1,60 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/fwd.ma". + +include "basic_1A/flt/props.ma". + +lemma getl_flt: + \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: +nat).((getl i c (CHead e (Bind b) u)) \to (flt e u c (TLRef i))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: +C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to +(flt e u c0 (TLRef i))))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead e (Bind b) +u))).(getl_gen_sort n i (CHead e (Bind b) u) H (flt e u (CSort n) (TLRef +i)))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: +T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef +i)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: +T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) +(CHead e (Bind b) u)) \to (flt e u (CHead c0 k t) (TLRef n)))) (\lambda (H0: +(getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear +(CHead c0 k0 t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k0 t) (TLRef +O)))) (\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e +(Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 with +[(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow c1])) (CHead e (Bind b) +u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) +in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 +(Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 +\def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | +(CHead _ _ t0) \Rightarrow t0])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) +(clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b +b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(flt e t0 +(CHead c0 (Bind b0) t) (TLRef O))) (eq_ind_r C c0 (\lambda (c1: C).(flt c1 t +(CHead c0 (Bind b0) t) (TLRef O))) (eq_ind B b (\lambda (b1: B).(flt c0 t +(CHead c0 (Bind b1) t) (TLRef O))) (flt_arith0 (Bind b) c0 t O) b0 H5) e H6) +u H4)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) +t) (CHead e (Bind b) u))).(flt_arith1 (Bind b) e c0 u (clear_cle c0 (CHead e +(Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1)) (Flat f) t O))) +k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) (\lambda (n: +nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (flt e u +(CHead c0 k t) (TLRef n))))).(\lambda (H1: (getl (S n) (CHead c0 k t) (CHead +e (Bind b) u))).(let H_y \def (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind +b) u) t n H1)) in (flt_arith2 e c0 u (r k n) H_y k t (S n)))))) i)))))))) c)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/fwd.ma new file mode 100644 index 000000000..ef6d598c4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/fwd.ma @@ -0,0 +1,154 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/defs.ma". + +include "basic_1A/drop/fwd.ma". + +include "basic_1A/clear/fwd.ma". + +implied lemma getl_ind: + \forall (h: nat).(\forall (c1: C).(\forall (c2: C).(\forall (P: +Prop).(((\forall (e: C).((drop h O c1 e) \to ((clear e c2) \to P)))) \to +((getl h c1 c2) \to P))))) +\def + \lambda (h: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (P: +Prop).(\lambda (f: ((\forall (e: C).((drop h O c1 e) \to ((clear e c2) \to +P))))).(\lambda (g: (getl h c1 c2)).(match g with [(getl_intro x x0 x1) +\Rightarrow (f x x0 x1)])))))). + +lemma getl_gen_all: + \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((getl i c1 c2) \to (ex2 +C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 +c2)).(getl_ind i c1 c2 (ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: +C).(clear e c2))) (\lambda (e: C).(\lambda (H0: (drop i O c1 e)).(\lambda +(H1: (clear e c2)).(ex_intro2 C (\lambda (e0: C).(drop i O c1 e0)) (\lambda +(e0: C).(clear e0 c2)) e H0 H1)))) H)))). + +lemma getl_gen_sort: + \forall (n: nat).(\forall (h: nat).(\forall (x: C).((getl h (CSort n) x) \to +(\forall (P: Prop).P)))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (x: C).(\lambda (H: (getl h +(CSort n) x)).(\lambda (P: Prop).(let H0 \def (getl_gen_all (CSort n) x h H) +in (ex2_ind C (\lambda (e: C).(drop h O (CSort n) e)) (\lambda (e: C).(clear +e x)) P (\lambda (x0: C).(\lambda (H1: (drop h O (CSort n) x0)).(\lambda (H2: +(clear x0 x)).(and3_ind (eq C x0 (CSort n)) (eq nat h O) (eq nat O O) P +(\lambda (H3: (eq C x0 (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (_: +(eq nat O O)).(let H6 \def (eq_ind C x0 (\lambda (c: C).(clear c x)) H2 +(CSort n) H3) in (clear_gen_sort x n H6 P))))) (drop_gen_sort n h O x0 +H1))))) H0)))))). + +lemma getl_gen_O: + \forall (e: C).(\forall (x: C).((getl O e x) \to (clear e x))) +\def + \lambda (e: C).(\lambda (x: C).(\lambda (H: (getl O e x)).(let H0 \def +(getl_gen_all e x O H) in (ex2_ind C (\lambda (e0: C).(drop O O e e0)) +(\lambda (e0: C).(clear e0 x)) (clear e x) (\lambda (x0: C).(\lambda (H1: +(drop O O e x0)).(\lambda (H2: (clear x0 x)).(let H3 \def (eq_ind_r C x0 +(\lambda (c: C).(clear c x)) H2 e (drop_gen_refl e x0 H1)) in H3)))) H0)))). + +lemma getl_gen_S: + \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: +nat).((getl (S h) (CHead c k u) x) \to (getl (r k h) c x)))))) +\def + \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: +nat).(\lambda (H: (getl (S h) (CHead c k u) x)).(let H0 \def (getl_gen_all +(CHead c k u) x (S h) H) in (ex2_ind C (\lambda (e: C).(drop (S h) O (CHead c +k u) e)) (\lambda (e: C).(clear e x)) (getl (r k h) c x) (\lambda (x0: +C).(\lambda (H1: (drop (S h) O (CHead c k u) x0)).(\lambda (H2: (clear x0 +x)).(getl_intro (r k h) c x x0 (drop_gen_drop k c x0 u h H1) H2)))) H0))))))). + +lemma getl_gen_2: + \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((getl i c1 c2) \to (ex_3 +B C T (\lambda (b: B).(\lambda (c: C).(\lambda (v: T).(eq C c2 (CHead c (Bind +b) v))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 +c2)).(let H0 \def (getl_gen_all c1 c2 i H) in (ex2_ind C (\lambda (e: +C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)) (ex_3 B C T (\lambda (b: +B).(\lambda (c: C).(\lambda (v: T).(eq C c2 (CHead c (Bind b) v)))))) +(\lambda (x: C).(\lambda (_: (drop i O c1 x)).(\lambda (H2: (clear x +c2)).(let H3 \def (clear_gen_all x c2 H2) in (ex_3_ind B C T (\lambda (b: +B).(\lambda (e: C).(\lambda (u: T).(eq C c2 (CHead e (Bind b) u))))) (ex_3 B +C T (\lambda (b: B).(\lambda (c: C).(\lambda (v: T).(eq C c2 (CHead c (Bind +b) v)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H4: +(eq C c2 (CHead x1 (Bind x0) x2))).(let H5 \def (eq_ind C c2 (\lambda (c: +C).(clear x c)) H2 (CHead x1 (Bind x0) x2) H4) in (eq_ind_r C (CHead x1 (Bind +x0) x2) (\lambda (c: C).(ex_3 B C T (\lambda (b: B).(\lambda (c0: C).(\lambda +(v: T).(eq C c (CHead c0 (Bind b) v))))))) (ex_3_intro B C T (\lambda (b: +B).(\lambda (c: C).(\lambda (v: T).(eq C (CHead x1 (Bind x0) x2) (CHead c +(Bind b) v))))) x0 x1 x2 (refl_equal C (CHead x1 (Bind x0) x2))) c2 H4)))))) +H3))))) H0))))). + +lemma getl_gen_flat: + \forall (f: F).(\forall (e: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i (CHead e (Flat f) v) d) \to (getl i e d)))))) +\def + \lambda (f: F).(\lambda (e: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(nat_ind (\lambda (n: nat).((getl n (CHead e (Flat f) v) d) \to (getl n +e d))) (\lambda (H: (getl O (CHead e (Flat f) v) d)).(getl_intro O e d e +(drop_refl e) (clear_gen_flat f e d v (getl_gen_O (CHead e (Flat f) v) d +H)))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead e (Flat f) v) d) \to +(getl n e d)))).(\lambda (H0: (getl (S n) (CHead e (Flat f) v) +d)).(getl_gen_S (Flat f) e d v n H0)))) i))))). + +lemma getl_gen_bind: + \forall (b: B).(\forall (e: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i (CHead e (Bind b) v) d) \to (or (land (eq nat i O) (eq C d +(CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda +(j: nat).(getl j e d))))))))) +\def + \lambda (b: B).(\lambda (e: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(nat_ind (\lambda (n: nat).((getl n (CHead e (Bind b) v) d) \to (or +(land (eq nat n O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: +nat).(eq nat n (S j))) (\lambda (j: nat).(getl j e d)))))) (\lambda (H: (getl +O (CHead e (Bind b) v) d)).(eq_ind_r C (CHead e (Bind b) v) (\lambda (c: +C).(or (land (eq nat O O) (eq C c (CHead e (Bind b) v))) (ex2 nat (\lambda +(j: nat).(eq nat O (S j))) (\lambda (j: nat).(getl j e c))))) (or_introl +(land (eq nat O O) (eq C (CHead e (Bind b) v) (CHead e (Bind b) v))) (ex2 nat +(\lambda (j: nat).(eq nat O (S j))) (\lambda (j: nat).(getl j e (CHead e +(Bind b) v)))) (conj (eq nat O O) (eq C (CHead e (Bind b) v) (CHead e (Bind +b) v)) (refl_equal nat O) (refl_equal C (CHead e (Bind b) v)))) d +(clear_gen_bind b e d v (getl_gen_O (CHead e (Bind b) v) d H)))) (\lambda (n: +nat).(\lambda (_: (((getl n (CHead e (Bind b) v) d) \to (or (land (eq nat n +O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat n (S +j))) (\lambda (j: nat).(getl j e d))))))).(\lambda (H0: (getl (S n) (CHead e +(Bind b) v) d)).(or_intror (land (eq nat (S n) O) (eq C d (CHead e (Bind b) +v))) (ex2 nat (\lambda (j: nat).(eq nat (S n) (S j))) (\lambda (j: nat).(getl +j e d))) (ex_intro2 nat (\lambda (j: nat).(eq nat (S n) (S j))) (\lambda (j: +nat).(getl j e d)) n (refl_equal nat (S n)) (getl_gen_S (Bind b) e d v n +H0)))))) i))))). + +theorem getl_mono: + \forall (c: C).(\forall (x1: C).(\forall (h: nat).((getl h c x1) \to +(\forall (x2: C).((getl h c x2) \to (eq C x1 x2)))))) +\def + \lambda (c: C).(\lambda (x1: C).(\lambda (h: nat).(\lambda (H: (getl h c +x1)).(\lambda (x2: C).(\lambda (H0: (getl h c x2)).(let H1 \def (getl_gen_all +c x2 h H0) in (ex2_ind C (\lambda (e: C).(drop h O c e)) (\lambda (e: +C).(clear e x2)) (eq C x1 x2) (\lambda (x: C).(\lambda (H2: (drop h O c +x)).(\lambda (H3: (clear x x2)).(let H4 \def (getl_gen_all c x1 h H) in +(ex2_ind C (\lambda (e: C).(drop h O c e)) (\lambda (e: C).(clear e x1)) (eq +C x1 x2) (\lambda (x0: C).(\lambda (H5: (drop h O c x0)).(\lambda (H6: (clear +x0 x1)).(let H7 \def (eq_ind C x (\lambda (c0: C).(drop h O c c0)) H2 x0 +(drop_mono c x O h H2 x0 H5)) in (let H8 \def (eq_ind_r C x0 (\lambda (c0: +C).(drop h O c c0)) H7 x (drop_mono c x O h H2 x0 H5)) in (let H9 \def +(eq_ind_r C x0 (\lambda (c0: C).(clear c0 x1)) H6 x (drop_mono c x O h H2 x0 +H5)) in (clear_mono x x1 H9 x2 H3))))))) H4))))) H1))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/getl.ma new file mode 100644 index 000000000..389ee523e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/getl.ma @@ -0,0 +1,51 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/drop.ma". + +include "basic_1A/getl/clear.ma". + +lemma getl_conf_le: + \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall +(e: C).(\forall (h: nat).((getl h c e) \to ((le h i) \to (getl (minus i h) e +a)))))))) +\def + \lambda (i: nat).(\lambda (a: C).(\lambda (c: C).(\lambda (H: (getl i c +a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (H0: (getl h c e)).(\lambda +(H1: (le h i)).(let H2 \def (getl_gen_all c e h H0) in (ex2_ind C (\lambda +(e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) (getl (minus i h) e +a) (\lambda (x: C).(\lambda (H3: (drop h O c x)).(\lambda (H4: (clear x +e)).(getl_clear_conf (minus i h) x a (getl_drop_conf_ge i a c H x h O H3 H1) +e H4)))) H2))))))))). + +theorem getl_trans: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((getl +h c1 c2) \to (\forall (e2: C).((getl i c2 e2) \to (getl (plus i h) c1 +e2))))))) +\def + \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: +nat).(\lambda (H: (getl h c1 c2)).(\lambda (e2: C).(\lambda (H0: (getl i c2 +e2)).(let H1 \def (getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: +C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) +(\lambda (x: C).(\lambda (H2: (drop i O c2 x)).(\lambda (H3: (clear x +e2)).(nat_ind (\lambda (n: nat).((drop n O c2 x) \to (getl (plus n h) c1 +e2))) (\lambda (H4: (drop O O c2 x)).(let H5 \def (eq_ind_r C x (\lambda (c: +C).(clear c e2)) H3 c2 (drop_gen_refl c2 x H4)) in (getl_clear_trans (plus O +h) c1 c2 H e2 H5))) (\lambda (i0: nat).(\lambda (_: (((drop i0 O c2 x) \to +(getl (plus i0 h) c1 e2)))).(\lambda (H4: (drop (S i0) O c2 x)).(let H_y \def +(getl_drop_trans c1 c2 h H x i0 H4) in (getl_intro (plus (S i0) h) c1 e2 x +H_y H3))))) i H2)))) H1)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/getl/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/getl/props.ma new file mode 100644 index 000000000..5ae39bf77 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/getl/props.ma @@ -0,0 +1,72 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/getl/fwd.ma". + +include "basic_1A/clear/props.ma". + +include "basic_1A/drop/props.ma". + +lemma getl_refl: + \forall (b: B).(\forall (c: C).(\forall (u: T).(getl O (CHead c (Bind b) u) +(CHead c (Bind b) u)))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(getl_intro O (CHead c (Bind +b) u) (CHead c (Bind b) u) (CHead c (Bind b) u) (drop_refl (CHead c (Bind b) +u)) (clear_bind b c u)))). + +lemma getl_head: + \forall (k: K).(\forall (h: nat).(\forall (c: C).(\forall (e: C).((getl (r k +h) c e) \to (\forall (u: T).(getl (S h) (CHead c k u) e)))))) +\def + \lambda (k: K).(\lambda (h: nat).(\lambda (c: C).(\lambda (e: C).(\lambda +(H: (getl (r k h) c e)).(\lambda (u: T).(let H0 \def (getl_gen_all c e (r k +h) H) in (ex2_ind C (\lambda (e0: C).(drop (r k h) O c e0)) (\lambda (e0: +C).(clear e0 e)) (getl (S h) (CHead c k u) e) (\lambda (x: C).(\lambda (H1: +(drop (r k h) O c x)).(\lambda (H2: (clear x e)).(getl_intro (S h) (CHead c k +u) e x (drop_drop k h c x H1 u) H2)))) H0))))))). + +lemma getl_flat: + \forall (c: C).(\forall (e: C).(\forall (h: nat).((getl h c e) \to (\forall +(f: F).(\forall (u: T).(getl h (CHead c (Flat f) u) e)))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (H: (getl h c +e)).(\lambda (f: F).(\lambda (u: T).(let H0 \def (getl_gen_all c e h H) in +(ex2_ind C (\lambda (e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) +(getl h (CHead c (Flat f) u) e) (\lambda (x: C).(\lambda (H1: (drop h O c +x)).(\lambda (H2: (clear x e)).(nat_ind (\lambda (n: nat).((drop n O c x) \to +(getl n (CHead c (Flat f) u) e))) (\lambda (H3: (drop O O c x)).(let H4 \def +(eq_ind_r C x (\lambda (c0: C).(clear c0 e)) H2 c (drop_gen_refl c x H3)) in +(getl_intro O (CHead c (Flat f) u) e (CHead c (Flat f) u) (drop_refl (CHead c +(Flat f) u)) (clear_flat c e H4 f u)))) (\lambda (h0: nat).(\lambda (_: +(((drop h0 O c x) \to (getl h0 (CHead c (Flat f) u) e)))).(\lambda (H3: (drop +(S h0) O c x)).(getl_intro (S h0) (CHead c (Flat f) u) e x (drop_drop (Flat +f) h0 c x H3 u) H2)))) h H1)))) H0))))))). + +lemma getl_ctail: + \forall (b: B).(\forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: +nat).((getl i c (CHead d (Bind b) u)) \to (\forall (k: K).(\forall (v: +T).(getl i (CTail k v c) (CHead (CTail k v d) (Bind b) u))))))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H: (getl i c (CHead d (Bind b) u))).(\lambda (k: K).(\lambda +(v: T).(let H0 \def (getl_gen_all c (CHead d (Bind b) u) i H) in (ex2_ind C +(\lambda (e: C).(drop i O c e)) (\lambda (e: C).(clear e (CHead d (Bind b) +u))) (getl i (CTail k v c) (CHead (CTail k v d) (Bind b) u)) (\lambda (x: +C).(\lambda (H1: (drop i O c x)).(\lambda (H2: (clear x (CHead d (Bind b) +u))).(getl_intro i (CTail k v c) (CHead (CTail k v d) (Bind b) u) (CTail k v +x) (drop_ctail c x O i H1 k v) (clear_ctail b x d u H2 k v))))) H0))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/iso/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/iso/defs.ma new file mode 100644 index 000000000..46050e257 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/iso/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +inductive iso: T \to (T \to Prop) \def +| iso_sort: \forall (n1: nat).(\forall (n2: nat).(iso (TSort n1) (TSort n2))) +| iso_lref: \forall (i1: nat).(\forall (i2: nat).(iso (TLRef i1) (TLRef i2))) +| iso_head: \forall (v1: T).(\forall (v2: T).(\forall (t1: T).(\forall (t2: +T).(\forall (k: K).(iso (THead k v1 t1) (THead k v2 t2)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/iso/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/iso/fwd.ma new file mode 100644 index 000000000..99770710f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/iso/fwd.ma @@ -0,0 +1,184 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/iso/defs.ma". + +include "basic_1A/tlist/defs.ma". + +implied lemma iso_ind: + \forall (P: ((T \to (T \to Prop)))).(((\forall (n1: nat).(\forall (n2: +nat).(P (TSort n1) (TSort n2))))) \to (((\forall (i1: nat).(\forall (i2: +nat).(P (TLRef i1) (TLRef i2))))) \to (((\forall (v1: T).(\forall (v2: +T).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).(P (THead k v1 t1) +(THead k v2 t2)))))))) \to (\forall (t: T).(\forall (t0: T).((iso t t0) \to +(P t t0))))))) +\def + \lambda (P: ((T \to (T \to Prop)))).(\lambda (f: ((\forall (n1: +nat).(\forall (n2: nat).(P (TSort n1) (TSort n2)))))).(\lambda (f0: ((\forall +(i1: nat).(\forall (i2: nat).(P (TLRef i1) (TLRef i2)))))).(\lambda (f1: +((\forall (v1: T).(\forall (v2: T).(\forall (t1: T).(\forall (t2: T).(\forall +(k: K).(P (THead k v1 t1) (THead k v2 t2))))))))).(\lambda (t: T).(\lambda +(t0: T).(\lambda (i: (iso t t0)).(match i with [(iso_sort x x0) \Rightarrow +(f x x0) | (iso_lref x x0) \Rightarrow (f0 x x0) | (iso_head x x0 x1 x2 x3) +\Rightarrow (f1 x x0 x1 x2 x3)]))))))). + +lemma iso_gen_sort: + \forall (u2: T).(\forall (n1: nat).((iso (TSort n1) u2) \to (ex nat (\lambda +(n2: nat).(eq T u2 (TSort n2)))))) +\def + \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TSort n1) +u2)).(insert_eq T (TSort n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex +nat (\lambda (n2: nat).(eq T u2 (TSort n2))))) (\lambda (y: T).(\lambda (H0: +(iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n1)) +\to (ex nat (\lambda (n2: nat).(eq T t0 (TSort n2))))))) (\lambda (n0: +nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TSort n1))).(let H2 +\def (f_equal T nat (\lambda (e: T).(match e with [(TSort n) \Rightarrow n | +(TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort +n1) H1) in (ex_intro nat (\lambda (n3: nat).(eq T (TSort n2) (TSort n3))) n2 +(refl_equal T (TSort n2))))))) (\lambda (i1: nat).(\lambda (i2: nat).(\lambda +(H1: (eq T (TLRef i1) (TSort n1))).(let H2 \def (eq_ind T (TLRef i1) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +True | (THead _ _ _) \Rightarrow False])) I (TSort n1) H1) in (False_ind (ex +nat (\lambda (n2: nat).(eq T (TLRef i2) (TSort n2)))) H2))))) (\lambda (v1: +T).(\lambda (v2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: +K).(\lambda (H1: (eq T (THead k v1 t1) (TSort n1))).(let H2 \def (eq_ind T +(THead k v1 t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False +| (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort +n1) H1) in (False_ind (ex nat (\lambda (n2: nat).(eq T (THead k v2 t2) (TSort +n2)))) H2)))))))) y u2 H0))) H))). + +lemma iso_gen_lref: + \forall (u2: T).(\forall (n1: nat).((iso (TLRef n1) u2) \to (ex nat (\lambda +(n2: nat).(eq T u2 (TLRef n2)))))) +\def + \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TLRef n1) +u2)).(insert_eq T (TLRef n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex +nat (\lambda (n2: nat).(eq T u2 (TLRef n2))))) (\lambda (y: T).(\lambda (H0: +(iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n1)) +\to (ex nat (\lambda (n2: nat).(eq T t0 (TLRef n2))))))) (\lambda (n0: +nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TLRef n1))).(let H2 +\def (eq_ind T (TSort n0) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (TLRef n1) H1) in (False_ind (ex nat (\lambda (n3: nat).(eq T +(TSort n2) (TLRef n3)))) H2))))) (\lambda (i1: nat).(\lambda (i2: +nat).(\lambda (H1: (eq T (TLRef i1) (TLRef n1))).(let H2 \def (f_equal T nat +(\lambda (e: T).(match e with [(TSort _) \Rightarrow i1 | (TLRef n) +\Rightarrow n | (THead _ _ _) \Rightarrow i1])) (TLRef i1) (TLRef n1) H1) in +(ex_intro nat (\lambda (n2: nat).(eq T (TLRef i2) (TLRef n2))) i2 (refl_equal +T (TLRef i2))))))) (\lambda (v1: T).(\lambda (v2: T).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H1: (eq T (THead k v1 t1) +(TLRef n1))).(let H2 \def (eq_ind T (THead k v1 t1) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ +_ _) \Rightarrow True])) I (TLRef n1) H1) in (False_ind (ex nat (\lambda (n2: +nat).(eq T (THead k v2 t2) (TLRef n2)))) H2)))))))) y u2 H0))) H))). + +lemma iso_gen_head: + \forall (k: K).(\forall (v1: T).(\forall (t1: T).(\forall (u2: T).((iso +(THead k v1 t1) u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2 +(THead k v2 t2))))))))) +\def + \lambda (k: K).(\lambda (v1: T).(\lambda (t1: T).(\lambda (u2: T).(\lambda +(H: (iso (THead k v1 t1) u2)).(insert_eq T (THead k v1 t1) (\lambda (t: +T).(iso t u2)) (\lambda (_: T).(ex_2 T T (\lambda (v2: T).(\lambda (t2: +T).(eq T u2 (THead k v2 t2)))))) (\lambda (y: T).(\lambda (H0: (iso y +u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (THead k v1 t1)) \to +(ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead k v2 t2)))))))) +(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n1) (THead k +v1 t1))).(let H2 \def (eq_ind T (TSort n1) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow False])) I (THead k v1 t1) H1) in (False_ind (ex_2 T T (\lambda +(v2: T).(\lambda (t2: T).(eq T (TSort n2) (THead k v2 t2))))) H2))))) +(\lambda (i1: nat).(\lambda (i2: nat).(\lambda (H1: (eq T (TLRef i1) (THead k +v1 t1))).(let H2 \def (eq_ind T (TLRef i1) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (THead k v1 t1) H1) in (False_ind (ex_2 T T (\lambda +(v2: T).(\lambda (t2: T).(eq T (TLRef i2) (THead k v2 t2))))) H2))))) +(\lambda (v0: T).(\lambda (v2: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda +(k0: K).(\lambda (H1: (eq T (THead k0 v0 t0) (THead k v1 t1))).(let H2 \def +(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | (TLRef +_) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 v0 t0) (THead +k v1 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _) +\Rightarrow t])) (THead k0 v0 t0) (THead k v1 t1) H1) in ((let H4 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef +_) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 v0 t0) (THead k +v1 t1) H1) in (\lambda (_: (eq T v0 v1)).(\lambda (H6: (eq K k0 k)).(eq_ind_r +K k (\lambda (k1: K).(ex_2 T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead +k1 v2 t2) (THead k v3 t3)))))) (ex_2_intro T T (\lambda (v3: T).(\lambda (t3: +T).(eq T (THead k v2 t2) (THead k v3 t3)))) v2 t2 (refl_equal T (THead k v2 +t2))) k0 H6)))) H3)) H2)))))))) y u2 H0))) H))))). + +lemma iso_flats_lref_bind_false: + \forall (f: F).(\forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall +(t: T).(\forall (vs: TList).((iso (THeads (Flat f) vs (TLRef i)) (THead (Bind +b) v t)) \to (\forall (P: Prop).P))))))) +\def + \lambda (f: F).(\lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda +(t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads +(Flat f) t0 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) +(\lambda (H: (iso (TLRef i) (THead (Bind b) v t))).(\lambda (P: Prop).(let +H_x \def (iso_gen_lref (THead (Bind b) v t) i H) in (let H0 \def H_x in +(ex_ind nat (\lambda (n2: nat).(eq T (THead (Bind b) v t) (TLRef n2))) P +(\lambda (x: nat).(\lambda (H1: (eq T (THead (Bind b) v t) (TLRef x))).(let +H2 \def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef x) H1) in (False_ind P H2)))) H0))))) (\lambda +(t0: T).(\lambda (t1: TList).(\lambda (_: (((iso (THeads (Flat f) t1 (TLRef +i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso +(THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) (THead (Bind b) v +t))).(\lambda (P: Prop).(let H_x \def (iso_gen_head (Flat f) t0 (THeads (Flat +f) t1 (TLRef i)) (THead (Bind b) v t) H0) in (let H1 \def H_x in (ex_2_ind T +T (\lambda (v2: T).(\lambda (t2: T).(eq T (THead (Bind b) v t) (THead (Flat +f) v2 t2)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T (THead +(Bind b) v t) (THead (Flat f) x0 x1))).(let H3 \def (eq_ind T (THead (Bind b) +v t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat f) x0 x1) +H2) in (False_ind P H3))))) H1)))))))) vs)))))). + +lemma iso_flats_flat_bind_false: + \forall (f1: F).(\forall (f2: F).(\forall (b: B).(\forall (v: T).(\forall +(v2: T).(\forall (t: T).(\forall (t2: T).(\forall (vs: TList).((iso (THeads +(Flat f1) vs (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: +Prop).P))))))))) +\def + \lambda (f1: F).(\lambda (f2: F).(\lambda (b: B).(\lambda (v: T).(\lambda +(v2: T).(\lambda (t: T).(\lambda (t2: T).(\lambda (vs: TList).(TList_ind +(\lambda (t0: TList).((iso (THeads (Flat f1) t0 (THead (Flat f2) v2 t2)) +(THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (THead +(Flat f2) v2 t2) (THead (Bind b) v t))).(\lambda (P: Prop).(let H_x \def +(iso_gen_head (Flat f2) v2 t2 (THead (Bind b) v t) H) in (let H0 \def H_x in +(ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) v t) +(THead (Flat f2) v3 t3)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: +(eq T (THead (Bind b) v t) (THead (Flat f2) x0 x1))).(let H2 \def (eq_ind T +(THead (Bind b) v t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with +[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat +f2) x0 x1) H1) in (False_ind P H2))))) H0))))) (\lambda (t0: T).(\lambda (t1: +TList).(\lambda (_: (((iso (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) +(THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead +(Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) (THead (Bind b) v +t))).(\lambda (P: Prop).(let H_x \def (iso_gen_head (Flat f1) t0 (THeads +(Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t) H0) in (let H1 +\def H_x in (ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead +(Bind b) v t) (THead (Flat f1) v3 t3)))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H2: (eq T (THead (Bind b) v t) (THead (Flat f1) x0 x1))).(let H3 +\def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat f1) x0 x1) H2) in (False_ind P H3))))) H1)))))))) +vs)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/iso/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/iso/props.ma new file mode 100644 index 000000000..8accf58ec --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/iso/props.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/fwd.ma". + +include "basic_1A/iso/fwd.ma". + +lemma iso_refl: + \forall (t: T).(iso t t) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(iso t0 t0)) (\lambda (n: +nat).(iso_sort n n)) (\lambda (n: nat).(iso_lref n n)) (\lambda (k: +K).(\lambda (t0: T).(\lambda (_: (iso t0 t0)).(\lambda (t1: T).(\lambda (_: +(iso t1 t1)).(iso_head t0 t0 t1 t1 k)))))) t). + +theorem iso_trans: + \forall (t1: T).(\forall (t2: T).((iso t1 t2) \to (\forall (t3: T).((iso t2 +t3) \to (iso t1 t3))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (iso t1 t2)).(iso_ind (\lambda +(t: T).(\lambda (t0: T).(\forall (t3: T).((iso t0 t3) \to (iso t t3))))) +(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (t3: T).(\lambda (H0: (iso +(TSort n2) t3)).(let H_x \def (iso_gen_sort t3 n2 H0) in (let H1 \def H_x in +(ex_ind nat (\lambda (n3: nat).(eq T t3 (TSort n3))) (iso (TSort n1) t3) +(\lambda (x: nat).(\lambda (H2: (eq T t3 (TSort x))).(eq_ind_r T (TSort x) +(\lambda (t: T).(iso (TSort n1) t)) (iso_sort n1 x) t3 H2))) H1))))))) +(\lambda (i1: nat).(\lambda (i2: nat).(\lambda (t3: T).(\lambda (H0: (iso +(TLRef i2) t3)).(let H_x \def (iso_gen_lref t3 i2 H0) in (let H1 \def H_x in +(ex_ind nat (\lambda (n2: nat).(eq T t3 (TLRef n2))) (iso (TLRef i1) t3) +(\lambda (x: nat).(\lambda (H2: (eq T t3 (TLRef x))).(eq_ind_r T (TLRef x) +(\lambda (t: T).(iso (TLRef i1) t)) (iso_lref i1 x) t3 H2))) H1))))))) +(\lambda (v1: T).(\lambda (v2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(k: K).(\lambda (t5: T).(\lambda (H0: (iso (THead k v2 t4) t5)).(let H_x \def +(iso_gen_head k v2 t4 t5 H0) in (let H1 \def H_x in (ex_2_ind T T (\lambda +(v3: T).(\lambda (t6: T).(eq T t5 (THead k v3 t6)))) (iso (THead k v1 t3) t5) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T t5 (THead k x0 +x1))).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(iso (THead k v1 t3) t)) +(iso_head v1 x0 t3 x1 k) t5 H2)))) H1)))))))))) t1 t2 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/leq/asucc.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/asucc.ma new file mode 100644 index 000000000..9453c4136 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/asucc.ma @@ -0,0 +1,447 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/leq/props.ma". + +lemma asucc_repl: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (leq g +(asucc g a1) (asucc g a2))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 +a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(leq g (asucc g a) (asucc g +a0)))) (\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))).(nat_ind (\lambda (n: nat).((eq A (aplus g (ASort n n1) k) +(aplus g (ASort h2 n2) k)) \to (leq g (match n with [O \Rightarrow (ASort O +(next g n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow +(ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)])))) (\lambda (H1: (eq +A (aplus g (ASort O n1) k) (aplus g (ASort h2 n2) k))).(nat_ind (\lambda (n: +nat).((eq A (aplus g (ASort O n1) k) (aplus g (ASort n n2) k)) \to (leq g +(ASort O (next g n1)) (match n with [O \Rightarrow (ASort O (next g n2)) | (S +h) \Rightarrow (ASort h n2)])))) (\lambda (H2: (eq A (aplus g (ASort O n1) k) +(aplus g (ASort O n2) k))).(leq_sort g O O (next g n1) (next g n2) k (eq_ind +A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O +(next g n2)) k))) (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq +A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort O n2) k) +(\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) +(refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort O n1) k) +H2) (aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k)) (aplus g +(ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))) (\lambda (h3: +nat).(\lambda (_: (((eq A (aplus g (ASort O n1) k) (aplus g (ASort h3 n2) k)) +\to (leq g (ASort O (next g n1)) (match h3 with [O \Rightarrow (ASort O (next +g n2)) | (S h) \Rightarrow (ASort h n2)]))))).(\lambda (H2: (eq A (aplus g +(ASort O n1) k) (aplus g (ASort (S h3) n2) k))).(leq_sort g O h3 (next g n1) +n2 k (eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g +(ASort h3 n2) k))) (eq_ind A (aplus g (ASort (S h3) n2) (S k)) (\lambda (a: +A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort (S h3) +n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort (S h3) n2) +k)))) (refl_equal A (asucc g (aplus g (ASort (S h3) n2) k))) (aplus g (ASort +O n1) k) H2) (aplus g (ASort h3 n2) k) (aplus_sort_S_S_simpl g n2 h3 k)) +(aplus g (ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))))) h2 H1)) +(\lambda (h3: nat).(\lambda (IHh1: (((eq A (aplus g (ASort h3 n1) k) (aplus g +(ASort h2 n2) k)) \to (leq g (match h3 with [O \Rightarrow (ASort O (next g +n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow (ASort +O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))).(\lambda (H1: (eq A +(aplus g (ASort (S h3) n1) k) (aplus g (ASort h2 n2) k))).(nat_ind (\lambda +(n: nat).((eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort n n2) k)) \to +((((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort n n2) k)) \to (leq g +(match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow +(ASort h n1)]) (match n with [O \Rightarrow (ASort O (next g n2)) | (S h) +\Rightarrow (ASort h n2)])))) \to (leq g (ASort h3 n1) (match n with [O +\Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))) +(\lambda (H2: (eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort O n2) +k))).(\lambda (_: (((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort O n2) k)) +\to (leq g (match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) +\Rightarrow (ASort h n1)]) (ASort O (next g n2)))))).(leq_sort g h3 O n1 +(next g n2) k (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq A +(aplus g (ASort h3 n1) k) a)) (eq_ind A (aplus g (ASort (S h3) n1) (S k)) +(\lambda (a: A).(eq A a (aplus g (ASort O n2) (S k)))) (eq_ind_r A (aplus g +(ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O +n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort +(S h3) n1) k) H2) (aplus g (ASort h3 n1) k) (aplus_sort_S_S_simpl g n1 h3 k)) +(aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k))))) (\lambda +(h4: nat).(\lambda (_: (((eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort +h4 n2) k)) \to ((((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort h4 n2) k)) +\to (leq g (match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) +\Rightarrow (ASort h n1)]) (match h4 with [O \Rightarrow (ASort O (next g +n2)) | (S h) \Rightarrow (ASort h n2)])))) \to (leq g (ASort h3 n1) (match h4 +with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h +n2)])))))).(\lambda (H2: (eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort +(S h4) n2) k))).(\lambda (_: (((eq A (aplus g (ASort h3 n1) k) (aplus g +(ASort (S h4) n2) k)) \to (leq g (match h3 with [O \Rightarrow (ASort O (next +g n1)) | (S h) \Rightarrow (ASort h n1)]) (ASort h4 n2))))).(leq_sort g h3 h4 +n1 n2 k (eq_ind A (aplus g (ASort (S h3) n1) (S k)) (\lambda (a: A).(eq A a +(aplus g (ASort h4 n2) k))) (eq_ind A (aplus g (ASort (S h4) n2) (S k)) +(\lambda (a: A).(eq A (aplus g (ASort (S h3) n1) (S k)) a)) (eq_ind_r A +(aplus g (ASort (S h4) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g +(aplus g (ASort (S h4) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S +h4) n2) k))) (aplus g (ASort (S h3) n1) k) H2) (aplus g (ASort h4 n2) k) +(aplus_sort_S_S_simpl g n2 h4 k)) (aplus g (ASort h3 n1) k) +(aplus_sort_S_S_simpl g n1 h3 k))))))) h2 H1 IHh1)))) h1 H0))))))) (\lambda +(a3: A).(\lambda (a4: A).(\lambda (H0: (leq g a3 a4)).(\lambda (_: (leq g +(asucc g a3) (asucc g a4))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: +(leq g a5 a6)).(\lambda (H3: (leq g (asucc g a5) (asucc g a6))).(leq_head g +a3 a4 H0 (asucc g a5) (asucc g a6) H3))))))))) a1 a2 H)))). + +lemma asucc_inj: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (asucc g a1) (asucc +g a2)) \to (leq g a1 a2)))) +\def + \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: +A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2)))) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (a2: A).(A_ind (\lambda (a: A).((leq g +(asucc g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a))) (\lambda +(n1: nat).(\lambda (n2: nat).(\lambda (H: (leq g (asucc g (ASort n n0)) +(asucc g (ASort n1 n2)))).(nat_ind (\lambda (n3: nat).((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 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 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 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 with [(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 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 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 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 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 with [(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 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 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 +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)) +(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 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 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 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 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 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 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 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 with [(ASort _ _) \Rightarrow (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)). + +lemma leq_asucc: + \forall (g: G).(\forall (a: A).(ex A (\lambda (a0: A).(leq g a (asucc g +a0))))) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(ex A (\lambda (a1: +A).(leq g a0 (asucc g a1))))) (\lambda (n: nat).(\lambda (n0: nat).(ex_intro +A (\lambda (a0: A).(leq g (ASort n n0) (asucc g a0))) (ASort (S n) n0) +(leq_refl g (ASort n n0))))) (\lambda (a0: A).(\lambda (_: (ex A (\lambda +(a1: A).(leq g a0 (asucc g a1))))).(\lambda (a1: A).(\lambda (H0: (ex A +(\lambda (a2: A).(leq g a1 (asucc g a2))))).(let H1 \def H0 in (ex_ind A +(\lambda (a2: A).(leq g a1 (asucc g a2))) (ex A (\lambda (a2: A).(leq g +(AHead a0 a1) (asucc g a2)))) (\lambda (x: A).(\lambda (H2: (leq g a1 (asucc +g x))).(ex_intro A (\lambda (a2: A).(leq g (AHead a0 a1) (asucc g a2))) +(AHead a0 x) (leq_head g a0 a0 (leq_refl g a0) a1 (asucc g x) H2)))) H1)))))) +a)). + +lemma leq_ahead_asucc_false: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (AHead a1 a2) +(asucc g a1)) \to (\forall (P: Prop).P)))) +\def + \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: +A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P)))) (\lambda +(n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead +(ASort n n0) a2) (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) +\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 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 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 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 with [(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 with [(ASort _ _) +\Rightarrow (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)). + +lemma leq_asucc_false: + \forall (g: G).(\forall (a: A).((leq g (asucc g a) a) \to (\forall (P: +Prop).P))) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).((leq g (asucc g a0) +a0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda +(H: (leq g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) +\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 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 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 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 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 with [(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 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 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/matita/matita/contribs/lambdadelta/basic_1A/leq/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/defs.ma new file mode 100644 index 000000000..8c0605c64 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/defs.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/aplus/defs.ma". + +inductive leq (g: G): A \to (A \to Prop) \def +| leq_sort: \forall (h1: nat).(\forall (h2: nat).(\forall (n1: nat).(\forall +(n2: nat).(\forall (k: nat).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort +h2 n2) k)) \to (leq g (ASort h1 n1) (ASort h2 n2))))))) +| leq_head: \forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall (a3: +A).(\forall (a4: A).((leq g a3 a4) \to (leq g (AHead a1 a3) (AHead a2 +a4))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/leq/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/fwd.ma new file mode 100644 index 000000000..939990ad0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/fwd.ma @@ -0,0 +1,254 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/leq/defs.ma". + +implied rec lemma leq_ind (g: G) (P: (A \to (A \to Prop))) (f: (\forall (h1: +nat).(\forall (h2: nat).(\forall (n1: nat).(\forall (n2: nat).(\forall (k: +nat).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (P +(ASort h1 n1) (ASort h2 n2))))))))) (f0: (\forall (a1: A).(\forall (a2: +A).((leq g a1 a2) \to ((P a1 a2) \to (\forall (a3: A).(\forall (a4: A).((leq +g a3 a4) \to ((P a3 a4) \to (P (AHead a1 a3) (AHead a2 a4))))))))))) (a: A) +(a0: A) (l: leq g a a0) on l: P a a0 \def match l with [(leq_sort h1 h2 n1 n2 +k e) \Rightarrow (f h1 h2 n1 n2 k e) | (leq_head a1 a2 l0 a3 a4 l1) +\Rightarrow (f0 a1 a2 l0 ((leq_ind g P f f0) a1 a2 l0) a3 a4 l1 ((leq_ind g P +f f0) a3 a4 l1))]. + +lemma 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 (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)).(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 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 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 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))))). + +lemma 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 (_: 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 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 +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 +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))))). + +lemma 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 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 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 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))))). + +lemma 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 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 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 +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 +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))))). + +lemma ahead_inj_snd: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a3: A).(\forall +(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 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 +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 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)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/leq/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/leq/props.ma new file mode 100644 index 000000000..624a3b829 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/leq/props.ma @@ -0,0 +1,188 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/leq/fwd.ma". + +include "basic_1A/aplus/props.ma". + +lemma leq_refl: + \forall (g: G).(\forall (a: A).(leq g a a)) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(leq g a0 a0)) +(\lambda (n: nat).(\lambda (n0: nat).(leq_sort g n n n0 n0 O (refl_equal A +(aplus g (ASort n n0) O))))) (\lambda (a0: A).(\lambda (H: (leq g a0 +a0)).(\lambda (a1: A).(\lambda (H0: (leq g a1 a1)).(leq_head g a0 a0 H a1 a1 +H0))))) a)). + +lemma leq_eq: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((eq A a1 a2) \to (leq g a1 +a2)))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (eq A a1 +a2)).(eq_ind A a1 (\lambda (a: A).(leq g a1 a)) (leq_refl g a1) a2 H)))). + +lemma leq_sym: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (leq g +a2 a1)))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 +a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(leq g a0 a))) (\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))).(leq_sort g h2 h1 n2 n1 k (sym_eq A (aplus g (ASort h1 n1) k) (aplus g +(ASort h2 n2) k) H0)))))))) (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: +(leq g a3 a4)).(\lambda (H1: (leq g a4 a3)).(\lambda (a5: A).(\lambda (a6: +A).(\lambda (_: (leq g a5 a6)).(\lambda (H3: (leq g a6 a5)).(leq_head g a4 a3 +H1 a6 a5 H3))))))))) a1 a2 H)))). + +theorem leq_trans: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall +(a3: A).((leq g a2 a3) \to (leq g a1 a3)))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 +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 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)))). + +lemma leq_ahead_false_1: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (AHead a1 a2) a1) +\to (\forall (P: Prop).P)))) +\def + \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: +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 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 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 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 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 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 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)). + +lemma leq_ahead_false_2: + \forall (g: G).(\forall (a2: A).(\forall (a1: A).((leq g (AHead a1 a2) a2) +\to (\forall (P: Prop).P)))) +\def + \lambda (g: G).(\lambda (a2: A).(A_ind (\lambda (a: A).(\forall (a1: +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 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 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 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 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 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/matita/matita/contribs/lambdadelta/basic_1A/lift/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/defs.ma new file mode 100644 index 000000000..4f50119b7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/defs.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/tlist/defs.ma". + +include "basic_1A/s/defs.ma". + +rec definition lref_map (f: (nat \to nat)) (d: nat) (t: T) on t: T \def match +t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match +(blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u +t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]. + +definition lift: + nat \to (nat \to (T \to T)) +\def + \lambda (h: nat).(\lambda (i: nat).(\lambda (t: T).(lref_map (\lambda (x: +nat).(plus x h)) i t))). + +rec definition lifts (h: nat) (d: nat) (ts: TList) on ts: TList \def match ts +with [TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift h d t) +(lifts h d ts0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/lift/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/fwd.ma new file mode 100644 index 000000000..88a0ecbe5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/fwd.ma @@ -0,0 +1,634 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift/props.ma". + +lemma lift_gen_sort: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).(\forall (t: T).((eq T +(TSort n) (lift h d t)) \to (eq T t (TSort n)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (t: T).(T_ind +(\lambda (t0: T).((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n)))) +(\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TSort +n0)))).(sym_eq T (TSort n) (TSort n0) H))) (\lambda (n0: nat).(\lambda (H: +(eq T (TSort n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TSort +n)) (\lambda (_: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) +(\lambda (t0: T).(eq T (TSort n) t0)) H (TLRef n0) (lift_lref_lt n0 h d (let +H1 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (lift h d (TLRef n0)) H) in (False_ind (lt n0 d) H1)))) in (let H2 +\def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (TLRef n0) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))) +(\lambda (_: (le d n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda +(t0: T).(eq T (TSort n) t0)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d (let +H1 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (lift h d (TLRef n0)) H) in (False_ind (le d n0) H1)))) in (let H2 +\def (eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (TLRef (plus n0 h)) H1) in (False_ind (eq T (TLRef n0) (TSort n)) +H2))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TSort n) +(lift h d t0)) \to (eq T t0 (TSort n))))).(\lambda (t1: T).(\lambda (_: (((eq +T (TSort n) (lift h d t1)) \to (eq T t1 (TSort n))))).(\lambda (H1: (eq T +(TSort n) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d +(THead k t0 t1)) (\lambda (t2: T).(eq T (TSort n) t2)) H1 (THead k (lift h d +t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (eq_ind T +(TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow True | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k +(lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (eq T (THead k t0 t1) +(TSort n)) H3))))))))) t)))). + +lemma lift_gen_lref: + \forall (t: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T +(TLRef i) (lift h d t)) \to (or (land (lt i d) (eq T t (TLRef i))) (land (le +(plus d h) i) (eq T t (TLRef (minus i h))))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(\forall (h: +nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) +(eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i +h)))))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda +(i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TSort n)))).(let H0 \def +(eq_ind T (lift h d (TSort n)) (\lambda (t0: T).(eq T (TLRef i) t0)) H (TSort +n) (lift_sort n h d)) in (let H1 \def (eq_ind T (TLRef i) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (TSort n) H0) in (False_ind (or (land +(lt i d) (eq T (TSort n) (TLRef i))) (land (le (plus d h) i) (eq T (TSort n) +(TLRef (minus i h))))) H1)))))))) (\lambda (n: nat).(\lambda (d: +nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h +d (TLRef n)))).(lt_le_e n d (or (land (lt i d) (eq T (TLRef n) (TLRef i))) +(land (le (plus d h) i) (eq T (TLRef n) (TLRef (minus i h))))) (\lambda (H0: +(lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T +(TLRef i) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (f_equal +T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i | (TLRef n0) +\Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H1) in +(eq_ind_r nat n (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef +n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) +(or_introl (land (lt n d) (eq T (TLRef n) (TLRef n))) (land (le (plus d h) n) +(eq T (TLRef n) (TLRef (minus n h)))) (conj (lt n d) (eq T (TLRef n) (TLRef +n)) H0 (refl_equal T (TLRef n)))) i H2)))) (\lambda (H0: (le d n)).(let H1 +\def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (TLRef i) t0)) H +(TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (f_equal T nat +(\lambda (e: T).(match e with [(TSort _) \Rightarrow i | (TLRef n0) +\Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef (plus n h)) +H1) in (eq_ind_r nat (plus n h) (\lambda (n0: nat).(or (land (lt n0 d) (eq T +(TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus +n0 h)))))) (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt (plus n h) d) (eq +T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T +(TLRef n) (TLRef n0))))) (or_intror (land (lt (plus n h) d) (eq T (TLRef n) +(TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef +n))) (conj (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n)) +(le_plus_plus d n h h H0 (le_n h)) (refl_equal T (TLRef n)))) (minus (plus n +h) h) (minus_plus_r n h)) i H2)))))))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T +(TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land +(le (plus d h) i) (eq T t0 (TLRef (minus i h))))))))))).(\lambda (t1: +T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T +(TLRef i) (lift h d t1)) \to (or (land (lt i d) (eq T t1 (TLRef i))) (land +(le (plus d h) i) (eq T t1 (TLRef (minus i h))))))))))).(\lambda (d: +nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H1: (eq T (TLRef i) (lift +h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) +(\lambda (t2: T).(eq T (TLRef i) t2)) H1 (THead k (lift h d t0) (lift h (s k +d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (eq_ind T (TLRef i) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s +k d) t1)) H2) in (False_ind (or (land (lt i d) (eq T (THead k t0 t1) (TLRef +i))) (land (le (plus d h) i) (eq T (THead k t0 t1) (TLRef (minus i h))))) +H3)))))))))))) t). + +lemma lift_gen_lref_lt: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((lt n d) \to (\forall +(t: T).((eq T (TLRef n) (lift h d t)) \to (eq T t (TLRef n))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt n +d)).(\lambda (t: T).(\lambda (H0: (eq T (TLRef n) (lift h d t))).(let H_x +\def (lift_gen_lref t d h n H0) in (let H1 \def H_x in (or_ind (land (lt n d) +(eq T t (TLRef n))) (land (le (plus d h) n) (eq T t (TLRef (minus n h)))) (eq +T t (TLRef n)) (\lambda (H2: (land (lt n d) (eq T t (TLRef n)))).(land_ind +(lt n d) (eq T t (TLRef n)) (eq T t (TLRef n)) (\lambda (_: (lt n +d)).(\lambda (H4: (eq T t (TLRef n))).(eq_ind_r T (TLRef n) (\lambda (t0: +T).(eq T t0 (TLRef n))) (refl_equal T (TLRef n)) t H4))) H2)) (\lambda (H2: +(land (le (plus d h) n) (eq T t (TLRef (minus n h))))).(land_ind (le (plus d +h) n) (eq T t (TLRef (minus n h))) (eq T t (TLRef n)) (\lambda (H3: (le (plus +d h) n)).(\lambda (H4: (eq T t (TLRef (minus n h)))).(eq_ind_r T (TLRef +(minus n h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (le_false (plus d h) n (eq +T (TLRef (minus n h)) (TLRef n)) H3 (lt_le_S n (plus d h) (le_plus_trans (S +n) d h H))) t H4))) H2)) H1)))))))). + +lemma lift_gen_lref_false: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to ((lt n +(plus d h)) \to (\forall (t: T).((eq T (TLRef n) (lift h d t)) \to (\forall +(P: Prop).P))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d +n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(\lambda (H1: (eq T +(TLRef n) (lift h d t))).(\lambda (P: Prop).(let H_x \def (lift_gen_lref t d +h n H1) in (let H2 \def H_x in (or_ind (land (lt n d) (eq T t (TLRef n))) +(land (le (plus d h) n) (eq T t (TLRef (minus n h)))) P (\lambda (H3: (land +(lt n d) (eq T t (TLRef n)))).(land_ind (lt n d) (eq T t (TLRef n)) P +(\lambda (H4: (lt n d)).(\lambda (_: (eq T t (TLRef n))).(le_false d n P H +H4))) H3)) (\lambda (H3: (land (le (plus d h) n) (eq T t (TLRef (minus n +h))))).(land_ind (le (plus d h) n) (eq T t (TLRef (minus n h))) P (\lambda +(H4: (le (plus d h) n)).(\lambda (_: (eq T t (TLRef (minus n h)))).(le_false +(plus d h) n P H4 H0))) H3)) H2)))))))))). + +lemma lift_gen_lref_ge: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to (\forall +(t: T).((eq T (TLRef (plus n h)) (lift h d t)) \to (eq T t (TLRef n))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d +n)).(\lambda (t: T).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d +t))).(let H_x \def (lift_gen_lref t d h (plus n h) H0) in (let H1 \def H_x in +(or_ind (land (lt (plus n h) d) (eq T t (TLRef (plus n h)))) (land (le (plus +d h) (plus n h)) (eq T t (TLRef (minus (plus n h) h)))) (eq T t (TLRef n)) +(\lambda (H2: (land (lt (plus n h) d) (eq T t (TLRef (plus n h))))).(land_ind +(lt (plus n h) d) (eq T t (TLRef (plus n h))) (eq T t (TLRef n)) (\lambda +(H3: (lt (plus n h) d)).(\lambda (H4: (eq T t (TLRef (plus n h)))).(eq_ind_r +T (TLRef (plus n h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (le_false d n (eq +T (TLRef (plus n h)) (TLRef n)) H (lt_le_S n d (simpl_lt_plus_r h n d +(lt_le_trans (plus n h) d (plus d h) H3 (le_plus_l d h))))) t H4))) H2)) +(\lambda (H2: (land (le (plus d h) (plus n h)) (eq T t (TLRef (minus (plus n +h) h))))).(land_ind (le (plus d h) (plus n h)) (eq T t (TLRef (minus (plus n +h) h))) (eq T t (TLRef n)) (\lambda (_: (le (plus d h) (plus n h))).(\lambda +(H4: (eq T t (TLRef (minus (plus n h) h)))).(eq_ind_r T (TLRef (minus (plus n +h) h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (f_equal nat T TLRef (minus +(plus n h) h) n (minus_plus_r n h)) t H4))) H2)) H1)))))))). + +lemma lift_gen_head: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: +nat).(\forall (d: nat).((eq T (THead k u t) (lift h d x)) \to (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T x (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z))))))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind +(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) +(lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead +k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))) (\lambda (n: +nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) +(lift h d (TSort n)))).(let H0 \def (eq_ind T (lift h d (TSort n)) (\lambda +(t0: T).(eq T (THead k u t) t0)) H (TSort n) (lift_sort n h d)) in (let H1 +\def (eq_ind T (THead k u t) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: +T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) +z))))) H1))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef n)))).(lt_le_e n d +(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: (lt n +d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead +k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (eq_ind T +(THead k u t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) +H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) +(THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) +(\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))) +(\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda +(t0: T).(eq T (THead k u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d +H0)) in (let H2 \def (eq_ind T (THead k u t) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z))))) H2))))))))) (\lambda (k0: K).(\lambda (t0: +T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) +(lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead +k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (t1: +T).(\lambda (H0: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) +(lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead +k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k u t) (lift h d (THead k0 +t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t2: +T).(eq T (THead k u t) t2)) H1 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) +(lift_head k0 t0 t1 h d)) in (let H3 \def (f_equal T K (\lambda (e: T).(match +e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) +\Rightarrow k1])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) +H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t2 _) \Rightarrow t2])) +(THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H5 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | +(TLRef _) \Rightarrow t | (THead _ _ t2) \Rightarrow t2])) (THead k u t) +(THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in (\lambda (H6: (eq T u +(lift h d t0))).(\lambda (H7: (eq K k k0)).(let H8 \def (eq_ind_r K k0 +(\lambda (k1: K).(eq T t (lift h (s k1 d) t1))) H5 k H7) in (eq_ind K k +(\lambda (k1: K).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k1 +t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))) (let H9 +\def (eq_ind T t (\lambda (t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq +T (THead k u t2) (lift h0 d0 t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: +T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h0 +d0 y)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h0 (s k d0) +z))))))))) H0 (lift h (s k d) t1) H8) in (let H10 \def (eq_ind T t (\lambda +(t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq T (THead k u t2) (lift h0 +d0 t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h0 d0 y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t2 (lift h0 (s k d0) z))))))))) H (lift h (s k d) +t1) H8) in (eq_ind_r T (lift h (s k d) t1) (\lambda (t2: T).(ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t2 (lift h (s k d) z)))))) (let H11 \def (eq_ind T u +(\lambda (t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq T (THead k t2 +(lift h (s k d) t1)) (lift h0 d0 t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda +(z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 +(lift h0 d0 y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) +(lift h0 (s k d0) z))))))))) H10 (lift h d t0) H6) in (let H12 \def (eq_ind T +u (\lambda (t2: T).(\forall (h0: nat).(\forall (d0: nat).((eq T (THead k t2 +(lift h (s k d) t1)) (lift h0 d0 t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda +(z: T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 +(lift h0 d0 y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) +(lift h0 (s k d0) z))))))))) H9 (lift h d t0) H6) in (eq_ind_r T (lift h d +t0) (\lambda (t2: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead +k t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) (lift h (s k +d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 +t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) +(lift h (s k d) z)))) t0 t1 (refl_equal T (THead k t0 t1)) (refl_equal T +(lift h d t0)) (refl_equal T (lift h (s k d) t1))) u H6))) t H8))) k0 H7))))) +H4)) H3))))))))))) x)))). + +lemma lift_gen_bind: + \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: +nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d x)) \to (ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda +(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (S d) z))))))))))) +\def + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d +x))).(let H_x \def (lift_gen_head (Bind b) u t x h d H) in (let H0 \def H_x +in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (S d) z)))) (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda +(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift +h (S d) z))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: (eq T x (THead +(Bind b) x0 x1))).(\lambda (H2: (eq T u (lift h d x0))).(\lambda (H3: (eq T t +(lift h (S d) x1))).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: +T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (S d) z)))))) (eq_ind_r T (lift h (S d) +x1) (\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead +(Bind b) x0 x1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T +u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t0 (lift h (S d) +z)))))) (eq_ind_r T (lift h d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T (THead (Bind b) x0 x1) (THead (Bind b) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T t0 (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T (lift h (S d) x1) (lift h (S d) z)))))) (ex3_2_intro +T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) x0 x1) (THead (Bind +b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d x0) (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (S d) x1) (lift h (S d) +z)))) x0 x1 (refl_equal T (THead (Bind b) x0 x1)) (refl_equal T (lift h d +x0)) (refl_equal T (lift h (S d) x1))) u H2) t H3) x H1)))))) H0))))))))). + +lemma lift_gen_flat: + \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: +nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d x)) \to (ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda +(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h d z))))))))))) +\def + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d +x))).(let H_x \def (lift_gen_head (Flat f) u t x h d H) in (let H0 \def H_x +in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z)))) (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: T).(\lambda +(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift +h d z))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: (eq T x (THead +(Flat f) x0 x1))).(\lambda (H2: (eq T u (lift h d x0))).(\lambda (H3: (eq T t +(lift h d x1))).(eq_ind_r T (THead (Flat f) x0 x1) (\lambda (t0: T).(ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda +(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h d z)))))) (eq_ind_r T (lift h d x1) (\lambda (t0: +T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) x0 x1) +(THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t0 (lift h d z)))))) (eq_ind_r T +(lift h d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq +T (THead (Flat f) x0 x1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T t0 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h d +x1) (lift h d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T +(THead (Flat f) x0 x1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T (lift h d x0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T +(lift h d x1) (lift h d z)))) x0 x1 (refl_equal T (THead (Flat f) x0 x1)) +(refl_equal T (lift h d x0)) (refl_equal T (lift h d x1))) u H2) t H3) x +H1)))))) H0))))))))). + +lemma lift_inj: + \forall (x: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T +(lift h d x) (lift h d t)) \to (eq T x t))))) +\def + \lambda (x: T).(T_ind (\lambda (t: T).(\forall (t0: T).(\forall (h: +nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to (eq T t +t0)))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (eq T (lift h d (TSort n)) (lift h d t))).(let H0 \def +(eq_ind T (lift h d (TSort n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H +(TSort n) (lift_sort n h d)) in (sym_eq T t (TSort n) (lift_gen_sort h d n t +H0)))))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (eq T (lift h d (TLRef n)) (lift h d t))).(lt_le_e n d (eq +T (TLRef n) t) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d +(TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef n) (lift_lref_lt +n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_lt h d n (lt_le_trans n d +d H0 (le_n d)) t H1)))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift +h d (TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef (plus n h)) +(lift_lref_ge n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_ge h d n H0 +t H1)))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: +T).(((\forall (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) +(lift h d t0)) \to (eq T t t0)))))) \to (\forall (t0: T).(((\forall (t1: +T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t1)) +\to (eq T t0 t1)))))) \to (\forall (t1: T).(\forall (h: nat).(\forall (d: +nat).((eq T (lift h d (THead k0 t t0)) (lift h d t1)) \to (eq T (THead k0 t +t0) t1)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H: ((\forall (t0: +T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to +(eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t1: T).(\forall +(h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t1)) \to (eq T t0 +t1))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: +(eq T (lift h d (THead (Bind b) t t0)) (lift h d t1))).(let H2 \def (eq_ind T +(lift h d (THead (Bind b) t t0)) (\lambda (t2: T).(eq T t2 (lift h d t1))) H1 +(THead (Bind b) (lift h d t) (lift h (S d) t0)) (lift_bind b t t0 h d)) in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Bind b) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t) (lift h d y)))) +(\lambda (_: T).(\lambda (z: T).(eq T (lift h (S d) t0) (lift h (S d) z)))) +(eq T (THead (Bind b) t t0) t1) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H3: (eq T t1 (THead (Bind b) x0 x1))).(\lambda (H4: (eq T (lift h d t) (lift +h d x0))).(\lambda (H5: (eq T (lift h (S d) t0) (lift h (S d) x1))).(eq_ind_r +T (THead (Bind b) x0 x1) (\lambda (t2: T).(eq T (THead (Bind b) t t0) t2)) +(sym_eq T (THead (Bind b) x0 x1) (THead (Bind b) t t0) (sym_eq T (THead (Bind +b) t t0) (THead (Bind b) x0 x1) (f_equal3 K T T T THead (Bind b) (Bind b) t +x0 t0 x1 (refl_equal K (Bind b)) (H x0 h d H4) (H0 x1 h (S d) H5)))) t1 +H3)))))) (lift_gen_bind b (lift h d t) (lift h (S d) t0) t1 h d +H2)))))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H: ((\forall (t0: +T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to +(eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t1: T).(\forall +(h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t1)) \to (eq T t0 +t1))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: +(eq T (lift h d (THead (Flat f) t t0)) (lift h d t1))).(let H2 \def (eq_ind T +(lift h d (THead (Flat f) t t0)) (\lambda (t2: T).(eq T t2 (lift h d t1))) H1 +(THead (Flat f) (lift h d t) (lift h d t0)) (lift_flat f t t0 h d)) in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat f) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t) (lift h d y)))) +(\lambda (_: T).(\lambda (z: T).(eq T (lift h d t0) (lift h d z)))) (eq T +(THead (Flat f) t t0) t1) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq +T t1 (THead (Flat f) x0 x1))).(\lambda (H4: (eq T (lift h d t) (lift h d +x0))).(\lambda (H5: (eq T (lift h d t0) (lift h d x1))).(eq_ind_r T (THead +(Flat f) x0 x1) (\lambda (t2: T).(eq T (THead (Flat f) t t0) t2)) (sym_eq T +(THead (Flat f) x0 x1) (THead (Flat f) t t0) (sym_eq T (THead (Flat f) t t0) +(THead (Flat f) x0 x1) (f_equal3 K T T T THead (Flat f) (Flat f) t x0 t0 x1 +(refl_equal K (Flat f)) (H x0 h d H4) (H0 x1 h d H5)))) t1 H3)))))) +(lift_gen_flat f (lift h d t) (lift h d t0) t1 h d H2)))))))))))) k)) x). + +lemma lift_gen_lift: + \forall (t1: T).(\forall (x: T).(\forall (h1: nat).(\forall (h2: +nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 +t1) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 +t2))) (\lambda (t2: T).(eq T t1 (lift h2 d2 t2))))))))))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: T).(\forall (h1: +nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to +((eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: +T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 +t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (h1: nat).(\lambda +(h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (_: (le d1 +d2)).(\lambda (H0: (eq T (lift h1 d1 (TSort n)) (lift h2 (plus d2 h1) +x))).(let H1 \def (eq_ind T (lift h1 d1 (TSort n)) (\lambda (t: T).(eq T t +(lift h2 (plus d2 h1) x))) H0 (TSort n) (lift_sort n h1 d1)) in (eq_ind_r T +(TSort n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) +(\lambda (t2: T).(eq T (TSort n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda +(t2: T).(eq T (TSort n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TSort n) +(lift h2 d2 t2))) (TSort n) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T +(TSort n) t)) (refl_equal T (TSort n)) (lift h1 d1 (TSort n)) (lift_sort n h1 +d1)) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T +(TSort n)) (lift h2 d2 (TSort n)) (lift_sort n h2 d2))) x (lift_gen_sort h2 +(plus d2 h1) n x H1))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda +(h1: nat).(\lambda (h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda +(H: (le d1 d2)).(\lambda (H0: (eq T (lift h1 d1 (TLRef n)) (lift h2 (plus d2 +h1) x))).(lt_le_e n d1 (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) +(\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) (\lambda (H1: (lt n +d1)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) (\lambda (t: T).(eq T t +(lift h2 (plus d2 h1) x))) H0 (TLRef n) (lift_lref_lt n h1 d1 H1)) in +(eq_ind_r T (TLRef n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift +h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) (ex_intro2 T +(\lambda (t2: T).(eq T (TLRef n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T +(TLRef n) (lift h2 d2 t2))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t: +T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) (lift h1 d1 (TLRef n)) +(lift_lref_lt n h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef +n) t)) (refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 +(lt_le_trans n d1 d2 H1 H)))) x (lift_gen_lref_lt h2 (plus d2 h1) n +(lt_le_trans n d1 (plus d2 h1) H1 (le_plus_trans d1 d2 h1 H)) x H2)))) +(\lambda (H1: (le d1 n)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) +(\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H0 (TLRef (plus n h1)) +(lift_lref_ge n h1 d1 H1)) in (lt_le_e n d2 (ex2 T (\lambda (t2: T).(eq T x +(lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) +(\lambda (H3: (lt n d2)).(eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(ex2 +T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) +(lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq T (TLRef (plus n h1)) +(lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef +n) (eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(eq T (TLRef (plus n h1)) +t)) (refl_equal T (TLRef (plus n h1))) (lift h1 d1 (TLRef n)) (lift_lref_ge n +h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) +(refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 H3))) x +(lift_gen_lref_lt h2 (plus d2 h1) (plus n h1) (lt_reg_r n d2 h1 H3) x H2))) +(\lambda (H3: (le d2 n)).(lt_le_e n (plus d2 h2) (ex2 T (\lambda (t2: T).(eq +T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) +(\lambda (H4: (lt n (plus d2 h2))).(lift_gen_lref_false h2 (plus d2 h1) (plus +n h1) (le_plus_plus d2 n h1 h1 H3 (le_n h1)) (eq_ind_r nat (plus (plus d2 h2) +h1) (\lambda (n0: nat).(lt (plus n h1) n0)) (lt_reg_r n (plus d2 h2) h1 H4) +(plus (plus d2 h1) h2) (plus_permute_2_in_3 d2 h1 h2)) x H2 (ex2 T (\lambda +(t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 +d2 t2)))))) (\lambda (H4: (le (plus d2 h2) n)).(let H5 \def (eq_ind nat (plus +n h1) (\lambda (n0: nat).(eq T (TLRef n0) (lift h2 (plus d2 h1) x))) H2 (plus +(minus (plus n h1) h2) h2) (le_plus_minus_sym h2 (plus n h1) (le_plus_trans +h2 n h1 (le_trans h2 (plus d2 h2) n (le_plus_r d2 h2) H4)))) in (eq_ind_r T +(TLRef (minus (plus n h1) h2)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T +t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) +(ex_intro2 T (\lambda (t2: T).(eq T (TLRef (minus (plus n h1) h2)) (lift h1 +d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef (minus n +h2)) (eq_ind_r nat (plus (minus n h2) h1) (\lambda (n0: nat).(eq T (TLRef n0) +(lift h1 d1 (TLRef (minus n h2))))) (eq_ind_r T (TLRef (plus (minus n h2) +h1)) (\lambda (t: T).(eq T (TLRef (plus (minus n h2) h1)) t)) (refl_equal T +(TLRef (plus (minus n h2) h1))) (lift h1 d1 (TLRef (minus n h2))) +(lift_lref_ge (minus n h2) h1 d1 (le_trans d1 d2 (minus n h2) H (le_minus d2 +n h2 H4)))) (minus (plus n h1) h2) (le_minus_plus h2 n (le_trans h2 (plus d2 +h2) n (le_plus_r d2 h2) H4) h1)) (eq_ind_r nat (plus (minus n h2) h2) +(\lambda (n0: nat).(eq T (TLRef n0) (lift h2 d2 (TLRef (minus n0 h2))))) +(eq_ind_r T (TLRef (plus (minus (plus (minus n h2) h2) h2) h2)) (\lambda (t: +T).(eq T (TLRef (plus (minus n h2) h2)) t)) (sym_eq T (TLRef (plus (minus +(plus (minus n h2) h2) h2) h2)) (TLRef (plus (minus n h2) h2)) (f_equal nat T +TLRef (plus (minus (plus (minus n h2) h2) h2) h2) (plus (minus n h2) h2) +(f_equal2 nat nat nat plus (minus (plus (minus n h2) h2) h2) (minus n h2) h2 +h2 (minus_plus_r (minus n h2) h2) (refl_equal nat h2)))) (lift h2 d2 (TLRef +(minus (plus (minus n h2) h2) h2))) (lift_lref_ge (minus (plus (minus n h2) +h2) h2) h2 d2 (le_minus d2 (plus (minus n h2) h2) h2 (le_plus_plus d2 (minus +n h2) h2 h2 (le_minus d2 n h2 H4) (le_n h2))))) n (le_plus_minus_sym h2 n +(le_trans h2 (plus d2 h2) n (le_plus_r d2 h2) H4)))) x (lift_gen_lref_ge h2 +(plus d2 h1) (minus (plus n h1) h2) (arith0 h2 d2 n H4 h1) x +H5)))))))))))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall +(x: T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: +nat).((le d1 d2) \to ((eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 +T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift +h2 d2 t2))))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (x: +T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: +nat).((le d1 d2) \to ((eq T (lift h1 d1 t0) (lift h2 (plus d2 h1) x)) \to +(ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t0 +(lift h2 d2 t2))))))))))))).(\lambda (x: T).(\lambda (h1: nat).(\lambda (h2: +nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (H1: (le d1 d2)).(\lambda +(H2: (eq T (lift h1 d1 (THead k t t0)) (lift h2 (plus d2 h1) x))).(K_ind +(\lambda (k0: K).((eq T (lift h1 d1 (THead k0 t t0)) (lift h2 (plus d2 h1) +x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: +T).(eq T (THead k0 t t0) (lift h2 d2 t2)))))) (\lambda (b: B).(\lambda (H3: +(eq T (lift h1 d1 (THead (Bind b) t t0)) (lift h2 (plus d2 h1) x))).(let H4 +\def (eq_ind T (lift h1 d1 (THead (Bind b) t t0)) (\lambda (t2: T).(eq T t2 +(lift h2 (plus d2 h1) x))) H3 (THead (Bind b) (lift h1 d1 t) (lift h1 (S d1) +t0)) (lift_bind b t t0 h1 d1)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: +T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T +(lift h1 d1 t) (lift h2 (plus d2 h1) y)))) (\lambda (_: T).(\lambda (z: +T).(eq T (lift h1 (S d1) t0) (lift h2 (S (plus d2 h1)) z)))) (ex2 T (\lambda +(t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) t +t0) (lift h2 d2 t2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T +x (THead (Bind b) x0 x1))).(\lambda (H6: (eq T (lift h1 d1 t) (lift h2 (plus +d2 h1) x0))).(\lambda (H7: (eq T (lift h1 (S d1) t0) (lift h2 (S (plus d2 +h1)) x1))).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead +(Bind b) t t0) (lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift +h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 t2))) (ex2 T (\lambda (t2: +T).(eq T (THead (Bind b) x0 x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T +(THead (Bind b) t t0) (lift h2 d2 t2)))) (\lambda (x2: T).(\lambda (H8: (eq T +x0 (lift h1 d1 x2))).(\lambda (H9: (eq T t (lift h2 d2 x2))).(eq_ind_r T +(lift h1 d1 x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind +b) t2 x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) t t0) +(lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 x2) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) x1) (lift h1 d1 t3))) +(\lambda (t3: T).(eq T (THead (Bind b) t2 t0) (lift h2 d2 t3))))) (let H10 +\def (refl_equal nat (plus (S d2) h1)) in (let H11 \def (eq_ind nat (S (plus +d2 h1)) (\lambda (n: nat).(eq T (lift h1 (S d1) t0) (lift h2 n x1))) H7 (plus +(S d2) h1) H10) in (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h1 (S d1) t2))) +(\lambda (t2: T).(eq T t0 (lift h2 (S d2) t2))) (ex2 T (\lambda (t2: T).(eq T +(THead (Bind b) (lift h1 d1 x2) x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T +(THead (Bind b) (lift h2 d2 x2) t0) (lift h2 d2 t2)))) (\lambda (x3: +T).(\lambda (H12: (eq T x1 (lift h1 (S d1) x3))).(\lambda (H13: (eq T t0 +(lift h2 (S d2) x3))).(eq_ind_r T (lift h1 (S d1) x3) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) t2) (lift h1 d1 t3))) +(\lambda (t3: T).(eq T (THead (Bind b) (lift h2 d2 x2) t0) (lift h2 d2 +t3))))) (eq_ind_r T (lift h2 (S d2) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: +T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (lift h1 d1 +t3))) (\lambda (t3: T).(eq T (THead (Bind b) (lift h2 d2 x2) t2) (lift h2 d2 +t3))))) (ex_intro2 T (\lambda (t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) +(lift h1 (S d1) x3)) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) +(lift h2 d2 x2) (lift h2 (S d2) x3)) (lift h2 d2 t2))) (THead (Bind b) x2 x3) +(eq_ind_r T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (\lambda +(t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) t2)) +(refl_equal T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3))) (lift h1 +d1 (THead (Bind b) x2 x3)) (lift_bind b x2 x3 h1 d1)) (eq_ind_r T (THead +(Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) (\lambda (t2: T).(eq T (THead +(Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) t2)) (refl_equal T (THead (Bind +b) (lift h2 d2 x2) (lift h2 (S d2) x3))) (lift h2 d2 (THead (Bind b) x2 x3)) +(lift_bind b x2 x3 h2 d2))) t0 H13) x1 H12)))) (H0 x1 h1 h2 (S d1) (S d2) +(le_n_S d1 d2 H1) H11)))) t H9) x0 H8)))) (H x0 h1 h2 d1 d2 H1 H6)) x +H5)))))) (lift_gen_bind b (lift h1 d1 t) (lift h1 (S d1) t0) x h2 (plus d2 +h1) H4))))) (\lambda (f: F).(\lambda (H3: (eq T (lift h1 d1 (THead (Flat f) t +t0)) (lift h2 (plus d2 h1) x))).(let H4 \def (eq_ind T (lift h1 d1 (THead +(Flat f) t t0)) (\lambda (t2: T).(eq T t2 (lift h2 (plus d2 h1) x))) H3 +(THead (Flat f) (lift h1 d1 t) (lift h1 d1 t0)) (lift_flat f t t0 h1 d1)) in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h1 d1 t) (lift h2 (plus d2 +h1) y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h1 d1 t0) (lift h2 +(plus d2 h1) z)))) (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda +(t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H5: (eq T x (THead (Flat f) x0 x1))).(\lambda +(H6: (eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x0))).(\lambda (H7: (eq T +(lift h1 d1 t0) (lift h2 (plus d2 h1) x1))).(eq_ind_r T (THead (Flat f) x0 +x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) +(\lambda (t3: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (ex2_ind T +(\lambda (t2: T).(eq T x0 (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 +d2 t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Flat f) x0 x1) (lift h1 d1 +t2))) (\lambda (t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) +(\lambda (x2: T).(\lambda (H8: (eq T x0 (lift h1 d1 x2))).(\lambda (H9: (eq T +t (lift h2 d2 x2))).(eq_ind_r T (lift h1 d1 x2) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T (THead (Flat f) t2 x1) (lift h1 d1 t3))) (\lambda (t3: +T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 +x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat f) (lift h1 +d1 x2) x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) t2 t0) +(lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h1 d1 t2))) +(\lambda (t2: T).(eq T t0 (lift h2 d2 t2))) (ex2 T (\lambda (t2: T).(eq T +(THead (Flat f) (lift h1 d1 x2) x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T +(THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t2)))) (\lambda (x3: +T).(\lambda (H10: (eq T x1 (lift h1 d1 x3))).(\lambda (H11: (eq T t0 (lift h2 +d2 x3))).(eq_ind_r T (lift h1 d1 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: +T).(eq T (THead (Flat f) (lift h1 d1 x2) t2) (lift h1 d1 t3))) (\lambda (t3: +T).(eq T (THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t3))))) (eq_ind_r T +(lift h2 d2 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat +f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 t3))) (\lambda (t3: T).(eq T +(THead (Flat f) (lift h2 d2 x2) t2) (lift h2 d2 t3))))) (ex_intro2 T (\lambda +(t2: T).(eq T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 +t2))) (\lambda (t2: T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) +(lift h2 d2 t2))) (THead (Flat f) x2 x3) (eq_ind_r T (THead (Flat f) (lift h1 +d1 x2) (lift h1 d1 x3)) (\lambda (t2: T).(eq T (THead (Flat f) (lift h1 d1 +x2) (lift h1 d1 x3)) t2)) (refl_equal T (THead (Flat f) (lift h1 d1 x2) (lift +h1 d1 x3))) (lift h1 d1 (THead (Flat f) x2 x3)) (lift_flat f x2 x3 h1 d1)) +(eq_ind_r T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) (\lambda (t2: +T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) t2)) (refl_equal T +(THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3))) (lift h2 d2 (THead (Flat f) +x2 x3)) (lift_flat f x2 x3 h2 d2))) t0 H11) x1 H10)))) (H0 x1 h1 h2 d1 d2 H1 +H7)) t H9) x0 H8)))) (H x0 h1 h2 d1 d2 H1 H6)) x H5)))))) (lift_gen_flat f +(lift h1 d1 t) (lift h1 d1 t0) x h2 (plus d2 h1) H4))))) k H2))))))))))))) +t1). + +lemma lifts_inj: + \forall (xs: TList).(\forall (ts: TList).(\forall (h: nat).(\forall (d: +nat).((eq TList (lifts h d xs) (lifts h d ts)) \to (eq TList xs ts))))) +\def + \lambda (xs: TList).(TList_ind (\lambda (t: TList).(\forall (ts: +TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h d t) (lifts h +d ts)) \to (eq TList t ts)))))) (\lambda (ts: TList).(TList_ind (\lambda (t: +TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h d TNil) (lifts +h d t)) \to (eq TList TNil t))))) (\lambda (_: nat).(\lambda (_: +nat).(\lambda (_: (eq TList TNil TNil)).(refl_equal TList TNil)))) (\lambda +(t: T).(\lambda (t0: TList).(\lambda (_: ((\forall (h: nat).(\forall (d: +nat).((eq TList TNil (lifts h d t0)) \to (eq TList TNil t0)))))).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H0: (eq TList TNil (TCons (lift h d t) +(lifts h d t0)))).(let H1 \def (eq_ind TList TNil (\lambda (ee: TList).(match +ee with [TNil \Rightarrow True | (TCons _ _) \Rightarrow False])) I (TCons +(lift h d t) (lifts h d t0)) H0) in (False_ind (eq TList TNil (TCons t t0)) +H1)))))))) ts)) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: ((\forall +(ts: TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h d t0) +(lifts h d ts)) \to (eq TList t0 ts))))))).(\lambda (ts: TList).(TList_ind +(\lambda (t1: TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h +d (TCons t t0)) (lifts h d t1)) \to (eq TList (TCons t t0) t1))))) (\lambda +(h: nat).(\lambda (d: nat).(\lambda (H0: (eq TList (TCons (lift h d t) (lifts +h d t0)) TNil)).(let H1 \def (eq_ind TList (TCons (lift h d t) (lifts h d +t0)) (\lambda (ee: TList).(match ee with [TNil \Rightarrow False | (TCons _ +_) \Rightarrow True])) I TNil H0) in (False_ind (eq TList (TCons t t0) TNil) +H1))))) (\lambda (t1: T).(\lambda (t2: TList).(\lambda (_: ((\forall (h: +nat).(\forall (d: nat).((eq TList (TCons (lift h d t) (lifts h d t0)) (lifts +h d t2)) \to (eq TList (TCons t t0) t2)))))).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H1: (eq TList (TCons (lift h d t) (lifts h d t0)) (TCons (lift +h d t1) (lifts h d t2)))).(let H2 \def (f_equal TList T (\lambda (e: +TList).(match e with [TNil \Rightarrow (lref_map (\lambda (x: nat).(plus x +h)) d t) | (TCons t3 _) \Rightarrow t3])) (TCons (lift h d t) (lifts h d t0)) +(TCons (lift h d t1) (lifts h d t2)) H1) in ((let H3 \def (f_equal TList +TList (\lambda (e: TList).(match e with [TNil \Rightarrow (lifts h d t0) | +(TCons _ t3) \Rightarrow t3])) (TCons (lift h d t) (lifts h d t0)) (TCons +(lift h d t1) (lifts h d t2)) H1) in (\lambda (H4: (eq T (lift h d t) (lift h +d t1))).(eq_ind T t (\lambda (t3: T).(eq TList (TCons t t0) (TCons t3 t2))) +(f_equal2 T TList TList TCons t t t0 t2 (refl_equal T t) (H t2 h d H3)) t1 +(lift_inj t t1 h d H4)))) H2)))))))) ts))))) xs). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/lift/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/props.ma new file mode 100644 index 000000000..7df81819d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/props.ma @@ -0,0 +1,323 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift/defs.ma". + +include "basic_1A/s/props.ma". + +include "basic_1A/T/fwd.ma". + +lemma lift_sort: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (TSort +n)) (TSort n)))) +\def + \lambda (n: nat).(\lambda (_: nat).(\lambda (_: nat).(refl_equal T (TSort +n)))). + +lemma lift_lref_lt: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((lt n d) \to (eq T +(lift h d (TLRef n)) (TLRef n))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (lt n +d)).(eq_ind bool true (\lambda (b: bool).(eq T (TLRef (match b with [true +\Rightarrow n | false \Rightarrow (plus n h)])) (TLRef n))) (refl_equal T +(TLRef n)) (blt n d) (sym_eq bool (blt n d) true (lt_blt d n H)))))). + +lemma lift_lref_ge: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((le d n) \to (eq T +(lift h d (TLRef n)) (TLRef (plus n h)))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (le d +n)).(eq_ind bool false (\lambda (b: bool).(eq T (TLRef (match b with [true +\Rightarrow n | false \Rightarrow (plus n h)])) (TLRef (plus n h)))) +(refl_equal T (TLRef (plus n h))) (blt n d) (sym_eq bool (blt n d) false +(le_bge d n H)))))). + +lemma lift_head: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(eq T (lift h d (THead k u t)) (THead k (lift h d u) (lift h (s k d) +t))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(refl_equal T (THead k (lift h d u) (lift h (s k d) t))))))). + +lemma lift_bind: + \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(eq T (lift h d (THead (Bind b) u t)) (THead (Bind b) (lift h d u) +(lift h (S d) t))))))) +\def + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(refl_equal T (THead (Bind b) (lift h d u) (lift h (S d) t))))))). + +lemma lift_flat: + \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(eq T (lift h d (THead (Flat f) u t)) (THead (Flat f) (lift h d u) +(lift h d t))))))) +\def + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(refl_equal T (THead (Flat f) (lift h d u) (lift h d t))))))). + +lemma thead_x_lift_y_y: + \forall (k: K).(\forall (t: T).(\forall (v: T).(\forall (h: nat).(\forall +(d: nat).((eq T (THead k v (lift h d t)) t) \to (\forall (P: Prop).P)))))) +\def + \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (v: +T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) +\to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TSort n))) +(TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d +(TSort n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) +H) in (False_ind P H0)))))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TLRef n))) +(TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d +(TLRef n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) +H) in (False_ind P H0)))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: +((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift +h d t0)) t0) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (H0: +((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift +h d t1)) t1) \to (\forall (P: Prop).P))))))).(\lambda (v: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k v (lift h d (THead k0 t0 +t1))) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K +(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k v (lift h d (THead +k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead +_ t2 _) \Rightarrow t2])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 +t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow (THead k0 (lref_map (\lambda (x: nat).(plus x h)) d +t0) (lref_map (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (TLRef _) +\Rightarrow (THead k0 (lref_map (\lambda (x: nat).(plus x h)) d t0) (lref_map +(\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (THead _ _ t2) \Rightarrow +t2])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in +(\lambda (_: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind K k +(\lambda (k1: K).(\forall (v0: T).(\forall (h0: nat).(\forall (d0: nat).((eq +T (THead k1 v0 (lift h0 d0 t1)) t1) \to (\forall (P0: Prop).P0)))))) H0 k0 +H6) in (let H8 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t2: +T).(eq T t2 t1)) H4 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head +k0 t0 t1 h d)) in (H7 (lift h d t0) h (s k0 d) H8 P)))))) H3)) H2)))))))))))) +t)). + +lemma lift_r: + \forall (t: T).(\forall (d: nat).(eq T (lift O d t) t)) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(eq T (lift O d t0) +t0))) (\lambda (n: nat).(\lambda (_: nat).(refl_equal T (TSort n)))) (\lambda +(n: nat).(\lambda (d: nat).(lt_le_e n d (eq T (lift O d (TLRef n)) (TLRef n)) +(\lambda (H: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef +n))) (refl_equal T (TLRef n)) (lift O d (TLRef n)) (lift_lref_lt n O d H))) +(\lambda (H: (le d n)).(eq_ind_r T (TLRef (plus n O)) (\lambda (t0: T).(eq T +t0 (TLRef n))) (f_equal nat T TLRef (plus n O) n (sym_eq nat n (plus n O) +(plus_n_O n))) (lift O d (TLRef n)) (lift_lref_ge n O d H)))))) (\lambda (k: +K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).(eq T (lift O d t0) +t0)))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(eq T (lift O d t1) +t1)))).(\lambda (d: nat).(eq_ind_r T (THead k (lift O d t0) (lift O (s k d) +t1)) (\lambda (t2: T).(eq T t2 (THead k t0 t1))) (sym_eq T (THead k t0 t1) +(THead k (lift O d t0) (lift O (s k d) t1)) (sym_eq T (THead k (lift O d t0) +(lift O (s k d) t1)) (THead k t0 t1) (f_equal3 K T T T THead k k (lift O d +t0) t0 (lift O (s k d) t1) t1 (refl_equal K k) (H d) (H0 (s k d))))) (lift O +d (THead k t0 t1)) (lift_head k t0 t1 O d)))))))) t). + +lemma lift_lref_gt: + \forall (d: nat).(\forall (n: nat).((lt d n) \to (eq T (lift (S O) d (TLRef +(pred n))) (TLRef n)))) +\def + \lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt d n)).(eq_ind_r T (TLRef +(plus (pred n) (S O))) (\lambda (t: T).(eq T t (TLRef n))) (eq_ind nat (plus +(S O) (pred n)) (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (eq_ind nat n +(\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (refl_equal T (TLRef n)) (S +(pred n)) (S_pred n d H)) (plus (pred n) (S O)) (plus_sym (S O) (pred n))) +(lift (S O) d (TLRef (pred n))) (lift_lref_ge (pred n) (S O) d (le_S_n d +(pred n) (eq_ind nat n (\lambda (n0: nat).(le (S d) n0)) H (S (pred n)) +(S_pred n d H))))))). + +lemma lift_tle: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(tle t (lift h d t)))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: +nat).(le (tweight t0) (tweight (lift h d t0)))))) (\lambda (_: nat).(\lambda +(_: nat).(\lambda (_: nat).(le_n (S O))))) (\lambda (_: nat).(\lambda (_: +nat).(\lambda (_: nat).(le_n (S O))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(le (tweight t0) +(tweight (lift h d t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: +nat).(\forall (d: nat).(le (tweight t1) (tweight (lift h d t1))))))).(\lambda +(h: nat).(\lambda (d: nat).(let H_y \def (H h d) in (let H_y0 \def (H0 h (s k +d)) in (le_n_S (plus (tweight t0) (tweight t1)) (plus (tweight (lref_map +(\lambda (x: nat).(plus x h)) d t0)) (tweight (lref_map (\lambda (x: +nat).(plus x h)) (s k d) t1))) (le_plus_plus (tweight t0) (tweight (lref_map +(\lambda (x: nat).(plus x h)) d t0)) (tweight t1) (tweight (lref_map (\lambda +(x: nat).(plus x h)) (s k d) t1)) H_y H_y0))))))))))) t). + +lemma lifts_tapp: + \forall (h: nat).(\forall (d: nat).(\forall (v: T).(\forall (vs: TList).(eq +TList (lifts h d (TApp vs v)) (TApp (lifts h d vs) (lift h d v)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (v: T).(\lambda (vs: +TList).(TList_ind (\lambda (t: TList).(eq TList (lifts h d (TApp t v)) (TApp +(lifts h d t) (lift h d v)))) (refl_equal TList (TCons (lift h d v) TNil)) +(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq TList (lifts h d (TApp +t0 v)) (TApp (lifts h d t0) (lift h d v)))).(eq_ind_r TList (TApp (lifts h d +t0) (lift h d v)) (\lambda (t1: TList).(eq TList (TCons (lift h d t) t1) +(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v))))) (refl_equal TList +(TCons (lift h d t) (TApp (lifts h d t0) (lift h d v)))) (lifts h d (TApp t0 +v)) H)))) vs)))). + +lemma lift_free: + \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: +nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e +(lift h d t)) (lift (plus k h) d t)))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: +nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to +(eq T (lift k e (lift h d t0)) (lift (plus k h) d t0))))))))) (\lambda (n: +nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: +nat).(\lambda (_: (le e (plus d h))).(\lambda (_: (le d e)).(eq_ind_r T +(TSort n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TSort +n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d +(TSort n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) +(refl_equal T (TSort n)) (lift (plus k h) d (TSort n)) (lift_sort n (plus k +h) d)) (lift k e (TSort n)) (lift_sort n k e)) (lift h d (TSort n)) +(lift_sort n h d))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (k: +nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H: (le e (plus d +h))).(\lambda (H0: (le d e)).(lt_le_e n d (eq T (lift k e (lift h d (TLRef +n))) (lift (plus k h) d (TLRef n))) (\lambda (H1: (lt n d)).(eq_ind_r T +(TLRef n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TLRef +n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d +(TLRef n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) +(refl_equal T (TLRef n)) (lift (plus k h) d (TLRef n)) (lift_lref_lt n (plus +k h) d H1)) (lift k e (TLRef n)) (lift_lref_lt n k e (lt_le_trans n d e H1 +H0))) (lift h d (TLRef n)) (lift_lref_lt n h d H1))) (\lambda (H1: (le d +n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq T (lift k e t0) (lift +(plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus (plus n h) k)) (\lambda +(t0: T).(eq T t0 (lift (plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus n +(plus k h))) (\lambda (t0: T).(eq T (TLRef (plus (plus n h) k)) t0)) (f_equal +nat T TLRef (plus (plus n h) k) (plus n (plus k h)) +(plus_permute_2_in_3_assoc n h k)) (lift (plus k h) d (TLRef n)) +(lift_lref_ge n (plus k h) d H1)) (lift k e (TLRef (plus n h))) (lift_lref_ge +(plus n h) k e (le_trans e (plus d h) (plus n h) H (le_plus_plus d n h h H1 +(le_n h))))) (lift h d (TLRef n)) (lift_lref_ge n h d H1))))))))))) (\lambda +(k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (k0: +nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to +(eq T (lift k0 e (lift h d t0)) (lift (plus k0 h) d t0)))))))))).(\lambda +(t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (k0: nat).(\forall (d: +nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k0 e +(lift h d t1)) (lift (plus k0 h) d t1)))))))))).(\lambda (h: nat).(\lambda +(k0: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e (plus d +h))).(\lambda (H2: (le d e)).(eq_ind_r T (THead k (lift h d t0) (lift h (s k +d) t1)) (\lambda (t2: T).(eq T (lift k0 e t2) (lift (plus k0 h) d (THead k t0 +t1)))) (eq_ind_r T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift +h (s k d) t1))) (\lambda (t2: T).(eq T t2 (lift (plus k0 h) d (THead k t0 +t1)))) (eq_ind_r T (THead k (lift (plus k0 h) d t0) (lift (plus k0 h) (s k d) +t1)) (\lambda (t2: T).(eq T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k +e) (lift h (s k d) t1))) t2)) (f_equal3 K T T T THead k k (lift k0 e (lift h +d t0)) (lift (plus k0 h) d t0) (lift k0 (s k e) (lift h (s k d) t1)) (lift +(plus k0 h) (s k d) t1) (refl_equal K k) (H h k0 d e H1 H2) (H0 h k0 (s k d) +(s k e) (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le (s k e) n)) (s_le +k e (plus d h) H1) (plus (s k d) h) (s_plus k d h)) (s_le k d e H2))) (lift +(plus k0 h) d (THead k t0 t1)) (lift_head k t0 t1 (plus k0 h) d)) (lift k0 e +(THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k (lift h d t0) (lift +h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) (lift_head k t0 t1 h +d))))))))))))) t). + +lemma lift_free_sym: + \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: +nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e +(lift h d t)) (lift (plus h k) d t)))))))) +\def + \lambda (t: T).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: +nat).(\lambda (e: nat).(\lambda (H: (le e (plus d h))).(\lambda (H0: (le d +e)).(eq_ind_r nat (plus k h) (\lambda (n: nat).(eq T (lift k e (lift h d t)) +(lift n d t))) (lift_free t h k d e H H0) (plus h k) (plus_sym h k)))))))). + +lemma lift_d: + \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: +nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t)) +(lift k e (lift h d t)))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: +nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k +d) (lift k e t0)) (lift k e (lift h d t0))))))))) (\lambda (n: nat).(\lambda +(h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (_: +(le e d)).(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (lift h (plus k d) t0) +(lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq +T t0 (lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: +T).(eq T (TSort n) (lift k e t0))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq +T (TSort n) t0)) (refl_equal T (TSort n)) (lift k e (TSort n)) (lift_sort n k +e)) (lift h d (TSort n)) (lift_sort n h d)) (lift h (plus k d) (TSort n)) +(lift_sort n h (plus k d))) (lift k e (TSort n)) (lift_sort n k e)))))))) +(\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: +nat).(\lambda (e: nat).(\lambda (H: (le e d)).(lt_le_e n e (eq T (lift h +(plus k d) (lift k e (TLRef n))) (lift k e (lift h d (TLRef n)))) (\lambda +(H0: (lt n e)).(let H1 \def (lt_le_trans n e d H0 H) in (eq_ind_r T (TLRef n) +(\lambda (t0: T).(eq T (lift h (plus k d) t0) (lift k e (lift h d (TLRef +n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift k e (lift h d +(TLRef n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) (lift k +e t0))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) +(refl_equal T (TLRef n)) (lift k e (TLRef n)) (lift_lref_lt n k e H0)) (lift +h d (TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus k d) (TLRef n)) +(lift_lref_lt n h (plus k d) (lt_le_trans n d (plus k d) H1 (le_plus_r k +d)))) (lift k e (TLRef n)) (lift_lref_lt n k e H0)))) (\lambda (H0: (le e +n)).(eq_ind_r T (TLRef (plus n k)) (\lambda (t0: T).(eq T (lift h (plus k d) +t0) (lift k e (lift h d (TLRef n))))) (eq_ind_r nat (plus d k) (\lambda (n0: +nat).(eq T (lift h n0 (TLRef (plus n k))) (lift k e (lift h d (TLRef n))))) +(lt_le_e n d (eq T (lift h (plus d k) (TLRef (plus n k))) (lift k e (lift h d +(TLRef n)))) (\lambda (H1: (lt n d)).(eq_ind_r T (TLRef (plus n k)) (\lambda +(t0: T).(eq T t0 (lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef n) +(\lambda (t0: T).(eq T (TLRef (plus n k)) (lift k e t0))) (eq_ind_r T (TLRef +(plus n k)) (\lambda (t0: T).(eq T (TLRef (plus n k)) t0)) (refl_equal T +(TLRef (plus n k))) (lift k e (TLRef n)) (lift_lref_ge n k e H0)) (lift h d +(TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus d k) (TLRef (plus n k))) +(lift_lref_lt (plus n k) h (plus d k) (lt_reg_r n d k H1)))) (\lambda (H1: +(le d n)).(eq_ind_r T (TLRef (plus (plus n k) h)) (\lambda (t0: T).(eq T t0 +(lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef (plus n h)) (\lambda +(t0: T).(eq T (TLRef (plus (plus n k) h)) (lift k e t0))) (eq_ind_r T (TLRef +(plus (plus n h) k)) (\lambda (t0: T).(eq T (TLRef (plus (plus n k) h)) t0)) +(f_equal nat T TLRef (plus (plus n k) h) (plus (plus n h) k) +(plus_permute_2_in_3 n k h)) (lift k e (TLRef (plus n h))) (lift_lref_ge +(plus n h) k e (le_plus_trans e n h H0))) (lift h d (TLRef n)) (lift_lref_ge +n h d H1)) (lift h (plus d k) (TLRef (plus n k))) (lift_lref_ge (plus n k) h +(plus d k) (le_plus_plus d n k k H1 (le_n k)))))) (plus k d) (plus_sym k d)) +(lift k e (TLRef n)) (lift_lref_ge n k e H0)))))))))) (\lambda (k: +K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (k0: +nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k0 +d) (lift k0 e t0)) (lift k0 e (lift h d t0)))))))))).(\lambda (t1: +T).(\lambda (H0: ((\forall (h: nat).(\forall (k0: nat).(\forall (d: +nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k0 d) (lift k0 e +t1)) (lift k0 e (lift h d t1)))))))))).(\lambda (h: nat).(\lambda (k0: +nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e d)).(eq_ind_r T +(THead k (lift k0 e t0) (lift k0 (s k e) t1)) (\lambda (t2: T).(eq T (lift h +(plus k0 d) t2) (lift k0 e (lift h d (THead k t0 t1))))) (eq_ind_r T (THead k +(lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) (lift k0 (s k +e) t1))) (\lambda (t2: T).(eq T t2 (lift k0 e (lift h d (THead k t0 t1))))) +(eq_ind_r T (THead k (lift h d t0) (lift h (s k d) t1)) (\lambda (t2: T).(eq +T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) +(lift k0 (s k e) t1))) (lift k0 e t2))) (eq_ind_r T (THead k (lift k0 e (lift +h d t0)) (lift k0 (s k e) (lift h (s k d) t1))) (\lambda (t2: T).(eq T (THead +k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) (lift k0 (s k +e) t1))) t2)) (eq_ind_r nat (plus k0 (s k d)) (\lambda (n: nat).(eq T (THead +k (lift h (plus k0 d) (lift k0 e t0)) (lift h n (lift k0 (s k e) t1))) (THead +k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h (s k d) t1))))) +(f_equal3 K T T T THead k k (lift h (plus k0 d) (lift k0 e t0)) (lift k0 e +(lift h d t0)) (lift h (plus k0 (s k d)) (lift k0 (s k e) t1)) (lift k0 (s k +e) (lift h (s k d) t1)) (refl_equal K k) (H h k0 d e H1) (H0 h k0 (s k d) (s +k e) (s_le k e d H1))) (s k (plus k0 d)) (s_plus_sym k k0 d)) (lift k0 e +(THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k (lift h d t0) (lift +h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) (lift_head k t0 t1 h d)) +(lift h (plus k0 d) (THead k (lift k0 e t0) (lift k0 (s k e) t1))) (lift_head +k (lift k0 e t0) (lift k0 (s k e) t1) h (plus k0 d))) (lift k0 e (THead k t0 +t1)) (lift_head k t0 t1 k0 e)))))))))))) t). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/lift/tlt.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift/tlt.ma new file mode 100644 index 000000000..bc2ad0ac6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift/tlt.ma @@ -0,0 +1,284 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift/props.ma". + +include "basic_1A/tlt/props.ma". + +lemma lift_weight_map: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to +nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat +(weight_map f (lift h d t)) (weight_map f t)))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: +nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat +(f m) O)))) \to (eq nat (weight_map f (lift h d t0)) (weight_map f t0))))))) +(\lambda (n: nat).(\lambda (_: nat).(\lambda (d: nat).(\lambda (f: ((nat \to +nat))).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (f m) +O))))).(refl_equal nat (weight_map f (TSort n)))))))) (\lambda (n: +nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to +nat))).(\lambda (H: ((\forall (m: nat).((le d m) \to (eq nat (f m) +O))))).(lt_le_e n d (eq nat (weight_map f (lift h d (TLRef n))) (weight_map f +(TLRef n))) (\lambda (H0: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: +T).(eq nat (weight_map f t0) (weight_map f (TLRef n)))) (refl_equal nat +(weight_map f (TLRef n))) (lift h d (TLRef n)) (lift_lref_lt n h d H0))) +(\lambda (H0: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq +nat (weight_map f t0) (weight_map f (TLRef n)))) (eq_ind_r nat O (\lambda +(n0: nat).(eq nat (f (plus n h)) n0)) (H (plus n h) (le_plus_trans d n h H0)) +(f n) (H n H0)) (lift h d (TLRef n)) (lift_lref_ge n h d H0))))))))) (\lambda +(k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (d: +nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat +(f m) O)))) \to (eq nat (weight_map f (lift h d t0)) (weight_map f +t0)))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (d: +nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat +(f m) O)))) \to (eq nat (weight_map f (lift h d t1)) (weight_map f +t1)))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to +nat))).(\lambda (H1: ((\forall (m: nat).((le d m) \to (eq nat (f m) +O))))).(K_ind (\lambda (k0: K).(eq nat (weight_map f (lift h d (THead k0 t0 +t1))) (weight_map f (THead k0 t0 t1)))) (\lambda (b: B).(eq_ind_r T (THead +(Bind b) (lift h d t0) (lift h (s (Bind b) d) t1)) (\lambda (t2: T).(eq nat +(weight_map f t2) (weight_map f (THead (Bind b) t0 t1)))) (B_ind (\lambda +(b0: B).(eq nat (match b0 with [Abbr \Rightarrow (S (plus (weight_map f (lift +h d t0)) (weight_map (wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) +t1)))) | Abst \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map +(wadd f O) (lift h (S d) t1)))) | Void \Rightarrow (S (plus (weight_map f +(lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))))]) (match b0 with +[Abbr \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f (S +(weight_map f t0))) t1))) | Abst \Rightarrow (S (plus (weight_map f t0) +(weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus (weight_map f t0) +(weight_map (wadd f O) t1)))]))) (eq_ind_r nat (weight_map f t0) (\lambda (n: +nat).(eq nat (S (plus n (weight_map (wadd f (S n)) (lift h (S d) t1)))) (S +(plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1))))) +(eq_ind_r nat (weight_map (wadd f (S (weight_map f t0))) t1) (\lambda (n: +nat).(eq nat (S (plus (weight_map f t0) n)) (S (plus (weight_map f t0) +(weight_map (wadd f (S (weight_map f t0))) t1))))) (refl_equal nat (S (plus +(weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1)))) +(weight_map (wadd f (S (weight_map f t0))) (lift h (S d) t1)) (H0 h (S d) +(wadd f (S (weight_map f t0))) (\lambda (m: nat).(\lambda (H2: (le (S d) +m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d +n)) (eq nat (wadd f (S (weight_map f t0)) m) O) (\lambda (x: nat).(\lambda +(H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S x) (\lambda +(n: nat).(eq nat (wadd f (S (weight_map f t0)) n) O)) (H1 x H4) m H3)))) +(le_gen_S d m H2)))))) (weight_map f (lift h d t0)) (H h d f H1)) (eq_ind_r +nat (weight_map (wadd f O) t1) (\lambda (n: nat).(eq nat (S (plus (weight_map +f (lift h d t0)) n)) (S (plus (weight_map f t0) (weight_map (wadd f O) +t1))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map +(wadd f O) t1)) (plus (weight_map f t0) (weight_map (wadd f O) t1)) (f_equal2 +nat nat nat plus (weight_map f (lift h d t0)) (weight_map f t0) (weight_map +(wadd f O) t1) (weight_map (wadd f O) t1) (H h d f H1) (refl_equal nat +(weight_map (wadd f O) t1)))) (weight_map (wadd f O) (lift h (S d) t1)) (H0 h +(S d) (wadd f O) (\lambda (m: nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat +(\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (wadd +f O m) O) (\lambda (x: nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le +d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd f O n) O)) (H1 x +H4) m H3)))) (le_gen_S d m H2)))))) (eq_ind_r nat (weight_map (wadd f O) t1) +(\lambda (n: nat).(eq nat (S (plus (weight_map f (lift h d t0)) n)) (S (plus +(weight_map f t0) (weight_map (wadd f O) t1))))) (f_equal nat nat S (plus +(weight_map f (lift h d t0)) (weight_map (wadd f O) t1)) (plus (weight_map f +t0) (weight_map (wadd f O) t1)) (f_equal2 nat nat nat plus (weight_map f +(lift h d t0)) (weight_map f t0) (weight_map (wadd f O) t1) (weight_map (wadd +f O) t1) (H h d f H1) (refl_equal nat (weight_map (wadd f O) t1)))) +(weight_map (wadd f O) (lift h (S d) t1)) (H0 h (S d) (wadd f O) (\lambda (m: +nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S +n))) (\lambda (n: nat).(le d n)) (eq nat (wadd f O m) O) (\lambda (x: +nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S +x) (\lambda (n: nat).(eq nat (wadd f O n) O)) (H1 x H4) m H3)))) (le_gen_S d +m H2)))))) b) (lift h d (THead (Bind b) t0 t1)) (lift_head (Bind b) t0 t1 h +d))) (\lambda (f0: F).(eq_ind_r T (THead (Flat f0) (lift h d t0) (lift h (s +(Flat f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) (weight_map f +(THead (Flat f0) t0 t1)))) (f_equal nat nat S (plus (weight_map f (lift h d +t0)) (weight_map f (lift h d t1))) (plus (weight_map f t0) (weight_map f t1)) +(f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map f t0) +(weight_map f (lift h d t1)) (weight_map f t1) (H h d f H1) (H0 h d f H1))) +(lift h d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 h d))) +k)))))))))) t). + +lemma lift_weight: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(eq nat (weight (lift h d +t)) (weight t)))) +\def + \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(lift_weight_map t h d +(\lambda (_: nat).O) (\lambda (m: nat).(\lambda (_: (le d m)).(refl_equal nat +O)))))). + +lemma lift_weight_add: + \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (d: +nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to +(((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) \to (eq nat +(weight_map f (lift h d t)) (weight_map g (lift (S h) d t))))))))))) +\def + \lambda (w: nat).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: +nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat +(g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) +\to (eq nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d +t0))))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (m: +nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) +w)).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f +m)))))).(refl_equal nat (weight_map g (lift (S h) d (TSort n)))))))))))) +(\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (m: nat).((lt m +d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) w)).(\lambda (H1: +((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m)))))).(lt_le_e n d +(eq nat (weight_map f (lift h d (TLRef n))) (weight_map g (lift (S h) d +(TLRef n)))) (\lambda (H2: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: +T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) +(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq nat (weight_map f (TLRef n)) +(weight_map g t0))) (sym_eq nat (g n) (f n) (H n H2)) (lift (S h) d (TLRef +n)) (lift_lref_lt n (S h) d H2)) (lift h d (TLRef n)) (lift_lref_lt n h d +H2))) (\lambda (H2: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: +T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) +(eq_ind_r T (TLRef (plus n (S h))) (\lambda (t0: T).(eq nat (weight_map f +(TLRef (plus n h))) (weight_map g t0))) (eq_ind nat (S (plus n h)) (\lambda +(n0: nat).(eq nat (f (plus n h)) (g n0))) (sym_eq nat (g (S (plus n h))) (f +(plus n h)) (H1 (plus n h) (le_plus_trans d n h H2))) (plus n (S h)) +(plus_n_Sm n h)) (lift (S h) d (TLRef n)) (lift_lref_ge n (S h) d H2)) (lift +h d (TLRef n)) (lift_lref_ge n h d H2)))))))))))) (\lambda (k: K).(\lambda +(t0: T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat +\to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to +(eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d +m) \to (eq nat (g (S m)) (f m))))) \to (eq nat (weight_map f (lift h d t0)) +(weight_map g (lift (S h) d t0)))))))))))).(\lambda (t1: T).(\lambda (H0: +((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f +m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g +(S m)) (f m))))) \to (eq nat (weight_map f (lift h d t1)) (weight_map g (lift +(S h) d t1)))))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat +\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (m: +nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (H2: (eq nat (g d) +w)).(\lambda (H3: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f +m)))))).(K_ind (\lambda (k0: K).(eq nat (weight_map f (lift h d (THead k0 t0 +t1))) (weight_map g (lift (S h) d (THead k0 t0 t1))))) (\lambda (b: +B).(eq_ind_r T (THead (Bind b) (lift h d t0) (lift h (s (Bind b) d) t1)) +(\lambda (t2: T).(eq nat (weight_map f t2) (weight_map g (lift (S h) d (THead +(Bind b) t0 t1))))) (eq_ind_r T (THead (Bind b) (lift (S h) d t0) (lift (S h) +(s (Bind b) d) t1)) (\lambda (t2: T).(eq nat (weight_map f (THead (Bind b) +(lift h d t0) (lift h (s (Bind b) d) t1))) (weight_map g t2))) (B_ind +(\lambda (b0: B).(eq nat (match b0 with [Abbr \Rightarrow (S (plus +(weight_map f (lift h d t0)) (weight_map (wadd f (S (weight_map f (lift h d +t0)))) (lift h (S d) t1)))) | Abst \Rightarrow (S (plus (weight_map f (lift h +d t0)) (weight_map (wadd f O) (lift h (S d) t1)))) | Void \Rightarrow (S +(plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) +t1))))]) (match b0 with [Abbr \Rightarrow (S (plus (weight_map g (lift (S h) +d t0)) (weight_map (wadd g (S (weight_map g (lift (S h) d t0)))) (lift (S h) +(S d) t1)))) | Abst \Rightarrow (S (plus (weight_map g (lift (S h) d t0)) +(weight_map (wadd g O) (lift (S h) (S d) t1)))) | Void \Rightarrow (S (plus +(weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) +t1))))]))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map +(wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) t1))) (plus +(weight_map g (lift (S h) d t0)) (weight_map (wadd g (S (weight_map g (lift +(S h) d t0)))) (lift (S h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map +f (lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map (wadd f (S +(weight_map f (lift h d t0)))) (lift h (S d) t1)) (weight_map (wadd g (S +(weight_map g (lift (S h) d t0)))) (lift (S h) (S d) t1)) (H h d f g H1 H2 +H3) (H0 h (S d) (wadd f (S (weight_map f (lift h d t0)))) (wadd g (S +(weight_map g (lift (S h) d t0)))) (\lambda (m: nat).(\lambda (H4: (lt m (S +d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) +(\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g (S (weight_map g (lift (S h) d +t0))) m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (H5: (eq nat m +O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g (S (weight_map g (lift +(S h) d t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (f_equal nat +nat S (weight_map g (lift (S h) d t0)) (weight_map f (lift h d t0)) (sym_eq +nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) (H h d f g +H1 H2 H3))) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S +m0))) (\lambda (m0: nat).(lt m0 d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat +m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g (S (weight_map g +(lift (S h) d t0))) m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda +(x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r +nat (S x) (\lambda (n: nat).(eq nat (wadd g (S (weight_map g (lift (S h) d +t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (H1 x H7) m H6)))) +H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) +m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d +n)) (eq nat (g m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (x: +nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S +x) (\lambda (n: nat).(eq nat (g n) (wadd f (S (weight_map f (lift h d t0))) +n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) (f_equal nat nat S (plus +(weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))) (plus +(weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) +t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map g +(lift (S h) d t0)) (weight_map (wadd f O) (lift h (S d) t1)) (weight_map +(wadd g O) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h (S d) (wadd f O) +(wadd g O) (\lambda (m: nat).(\lambda (H4: (lt m (S d))).(or_ind (eq nat m O) +(ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d))) +(eq nat (wadd g O m) (wadd f O m)) (\lambda (H5: (eq nat m O)).(eq_ind_r nat +O (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (refl_equal nat O) m +H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda +(m0: nat).(lt m0 d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat m (S m0))) +(\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g O m) (wadd f O m)) (\lambda (x: +nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r nat (S +x) (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (H1 x H7) m H6)))) +H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) +m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d +n)) (eq nat (g m) (wadd f O m)) (\lambda (x: nat).(\lambda (H5: (eq nat m (S +x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (g +n) (wadd f O n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) (f_equal nat nat +S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) +t1))) (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S +h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) +(weight_map g (lift (S h) d t0)) (weight_map (wadd f O) (lift h (S d) t1)) +(weight_map (wadd g O) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h (S +d) (wadd f O) (wadd g O) (\lambda (m: nat).(\lambda (H4: (lt m (S +d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) +(\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g O m) (wadd f O m)) (\lambda +(H5: (eq nat m O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g O n) +(wadd f O n))) (refl_equal nat O) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: +nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)))).(ex2_ind nat (\lambda +(m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g O +m) (wadd f O m)) (\lambda (x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda +(H7: (lt x d)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd g O n) +(wadd f O n))) (H1 x H7) m H6)))) H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: +nat).(\lambda (H4: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S +n))) (\lambda (n: nat).(le d n)) (eq nat (g m) (wadd f O m)) (\lambda (x: +nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S +x) (\lambda (n: nat).(eq nat (g n) (wadd f O n))) (H3 x H6) m H5)))) +(le_gen_S d m H4))))))) b) (lift (S h) d (THead (Bind b) t0 t1)) (lift_head +(Bind b) t0 t1 (S h) d)) (lift h d (THead (Bind b) t0 t1)) (lift_head (Bind +b) t0 t1 h d))) (\lambda (f0: F).(eq_ind_r T (THead (Flat f0) (lift h d t0) +(lift h (s (Flat f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) +(weight_map g (lift (S h) d (THead (Flat f0) t0 t1))))) (eq_ind_r T (THead +(Flat f0) (lift (S h) d t0) (lift (S h) (s (Flat f0) d) t1)) (\lambda (t2: +T).(eq nat (weight_map f (THead (Flat f0) (lift h d t0) (lift h (s (Flat f0) +d) t1))) (weight_map g t2))) (f_equal nat nat S (plus (weight_map f (lift h d +t0)) (weight_map f (lift h d t1))) (plus (weight_map g (lift (S h) d t0)) +(weight_map g (lift (S h) d t1))) (f_equal2 nat nat nat plus (weight_map f +(lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map f (lift h d t1)) +(weight_map g (lift (S h) d t1)) (H h d f g H1 H2 H3) (H0 h d f g H1 H2 H3))) +(lift (S h) d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 (S h) d)) +(lift h d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 h d))) +k))))))))))))) t)). + +lemma lift_weight_add_O: + \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (f: ((nat \to +nat))).(eq nat (weight_map f (lift h O t)) (weight_map (wadd f w) (lift (S h) +O t)))))) +\def + \lambda (w: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (f: ((nat \to +nat))).(lift_weight_add (minus (wadd f w O) O) t h O f (wadd f w) (\lambda +(m: nat).(\lambda (H: (lt m O)).(lt_x_O m H (eq nat (wadd f w m) (f m))))) +(minus_n_O (wadd f w O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal +nat (f m)))))))). + +lemma lift_tlt_dx: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(tlt t (THead k u (lift h d t))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(eq_ind nat (weight (lift h d t)) (\lambda (n: nat).(lt n (weight +(THead k u (lift h d t))))) (tlt_head_dx k u (lift h d t)) (weight t) +(lift_weight t h d)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/lift1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift1/defs.ma new file mode 100644 index 000000000..c65accaae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift1/defs.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift/defs.ma". + +rec definition trans (hds: PList) on hds: nat \to nat \def \lambda (i: +nat).(match hds with [PNil \Rightarrow i | (PCons h d hds0) \Rightarrow (let +j \def (trans hds0 i) in (match (blt j d) with [true \Rightarrow j | false +\Rightarrow (plus j h)]))]). + +rec definition lift1 (hds: PList) on hds: T \to T \def \lambda (t: T).(match +hds with [PNil \Rightarrow t | (PCons h d hds0) \Rightarrow (lift h d (lift1 +hds0 t))]). + +rec definition lifts1 (hds: PList) (ts: TList) on ts: TList \def match ts +with [TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift1 hds t) +(lifts1 hds ts0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/lift1/drop1.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift1/drop1.ma new file mode 100644 index 000000000..d15754dc0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift1/drop1.ma @@ -0,0 +1,127 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift/props.ma". + +include "basic_1A/drop1/defs.ma". + +lemma lift1_lift1: + \forall (is1: PList).(\forall (is2: PList).(\forall (t: T).(eq T (lift1 is1 +(lift1 is2 t)) (lift1 (papp is1 is2) t)))) +\def + \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (is2: +PList).(\forall (t: T).(eq T (lift1 p (lift1 is2 t)) (lift1 (papp p is2) +t))))) (\lambda (is2: PList).(\lambda (t: T).(refl_equal T (lift1 is2 t)))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: +((\forall (is2: PList).(\forall (t: T).(eq T (lift1 p (lift1 is2 t)) (lift1 +(papp p is2) t)))))).(\lambda (is2: PList).(\lambda (t: T).(f_equal3 nat nat +T T lift n n n0 n0 (lift1 p (lift1 is2 t)) (lift1 (papp p is2) t) (refl_equal +nat n) (refl_equal nat n0) (H is2 t)))))))) is1). + +lemma lift1_xhg: + \forall (hds: PList).(\forall (t: T).(eq T (lift1 (Ss hds) (lift (S O) O t)) +(lift (S O) O (lift1 hds t)))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (t: T).(eq T +(lift1 (Ss p) (lift (S O) O t)) (lift (S O) O (lift1 p t))))) (\lambda (t: +T).(refl_equal T (lift (S O) O t))) (\lambda (h: nat).(\lambda (d: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (t: T).(eq T (lift1 (Ss p) +(lift (S O) O t)) (lift (S O) O (lift1 p t)))))).(\lambda (t: T).(eq_ind_r T +(lift (S O) O (lift1 p t)) (\lambda (t0: T).(eq T (lift h (S d) t0) (lift (S +O) O (lift h d (lift1 p t))))) (eq_ind nat (plus (S O) d) (\lambda (n: +nat).(eq T (lift h n (lift (S O) O (lift1 p t))) (lift (S O) O (lift h d +(lift1 p t))))) (eq_ind_r T (lift (S O) O (lift h d (lift1 p t))) (\lambda +(t0: T).(eq T t0 (lift (S O) O (lift h d (lift1 p t))))) (refl_equal T (lift +(S O) O (lift h d (lift1 p t)))) (lift h (plus (S O) d) (lift (S O) O (lift1 +p t))) (lift_d (lift1 p t) h (S O) d O (le_O_n d))) (S d) (refl_equal nat (S +d))) (lift1 (Ss p) (lift (S O) O t)) (H t))))))) hds). + +lemma lifts1_xhg: + \forall (hds: PList).(\forall (ts: TList).(eq TList (lifts1 (Ss hds) (lifts +(S O) O ts)) (lifts (S O) O (lifts1 hds ts)))) +\def + \lambda (hds: PList).(\lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq +TList (lifts1 (Ss hds) (lifts (S O) O t)) (lifts (S O) O (lifts1 hds t)))) +(refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq +TList (lifts1 (Ss hds) (lifts (S O) O t0)) (lifts (S O) O (lifts1 hds +t0)))).(eq_ind_r T (lift (S O) O (lift1 hds t)) (\lambda (t1: T).(eq TList +(TCons t1 (lifts1 (Ss hds) (lifts (S O) O t0))) (TCons (lift (S O) O (lift1 +hds t)) (lifts (S O) O (lifts1 hds t0))))) (eq_ind_r TList (lifts (S O) O +(lifts1 hds t0)) (\lambda (t1: TList).(eq TList (TCons (lift (S O) O (lift1 +hds t)) t1) (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O (lifts1 hds +t0))))) (refl_equal TList (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O +(lifts1 hds t0)))) (lifts1 (Ss hds) (lifts (S O) O t0)) H) (lift1 (Ss hds) +(lift (S O) O t)) (lift1_xhg hds t))))) ts)). + +lemma lift1_free: + \forall (hds: PList).(\forall (i: nat).(\forall (t: T).(eq T (lift1 hds +(lift (S i) O t)) (lift (S (trans hds i)) O (lift1 (ptrans hds i) t))))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: +nat).(\forall (t: T).(eq T (lift1 p (lift (S i) O t)) (lift (S (trans p i)) O +(lift1 (ptrans p i) t)))))) (\lambda (i: nat).(\lambda (t: T).(refl_equal T +(lift (S i) O t)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: +PList).(\lambda (H: ((\forall (i: nat).(\forall (t: T).(eq T (lift1 hds0 +(lift (S i) O t)) (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) +t))))))).(\lambda (i: nat).(\lambda (t: T).(eq_ind_r T (lift (S (trans hds0 +i)) O (lift1 (ptrans hds0 i) t)) (\lambda (t0: T).(eq T (lift h d t0) (lift +(S (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | +false \Rightarrow (plus (trans hds0 i) h)])) O (lift1 (match (blt (trans hds0 +i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans +hds0 i)) | false \Rightarrow (ptrans hds0 i)]) t)))) (xinduction bool (blt +(trans hds0 i) d) (\lambda (b: bool).(eq T (lift h d (lift (S (trans hds0 i)) +O (lift1 (ptrans hds0 i) t))) (lift (S (match b with [true \Rightarrow (trans +hds0 i) | false \Rightarrow (plus (trans hds0 i) h)])) O (lift1 (match b with +[true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | +false \Rightarrow (ptrans hds0 i)]) t)))) (\lambda (x_x: bool).(bool_ind +(\lambda (b: bool).((eq bool (blt (trans hds0 i) d) b) \to (eq T (lift h d +(lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift (S (match b with +[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) +h)])) O (lift1 (match b with [true \Rightarrow (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) t))))) +(\lambda (H0: (eq bool (blt (trans hds0 i) d) true)).(eq_ind_r nat (plus (S +(trans hds0 i)) (minus d (S (trans hds0 i)))) (\lambda (n: nat).(eq T (lift h +n (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift (S (trans hds0 +i)) O (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) t)))) +(eq_ind_r T (lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) +(lift1 (ptrans hds0 i) t))) (\lambda (t0: T).(eq T t0 (lift (S (trans hds0 +i)) O (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) t)))) +(refl_equal T (lift (S (trans hds0 i)) O (lift1 (PCons h (minus d (S (trans +hds0 i))) (ptrans hds0 i)) t))) (lift h (plus (S (trans hds0 i)) (minus d (S +(trans hds0 i)))) (lift (S (trans hds0 i)) O (lift1 (ptrans hds0 i) t))) +(lift_d (lift1 (ptrans hds0 i) t) h (S (trans hds0 i)) (minus d (S (trans +hds0 i))) O (le_O_n (minus d (S (trans hds0 i)))))) d (le_plus_minus (S +(trans hds0 i)) d (bge_le (S (trans hds0 i)) d (le_bge (S (trans hds0 i)) d +(lt_le_S (trans hds0 i) d (blt_lt d (trans hds0 i) H0))))))) (\lambda (H0: +(eq bool (blt (trans hds0 i) d) false)).(eq_ind_r T (lift (plus h (S (trans +hds0 i))) O (lift1 (ptrans hds0 i) t)) (\lambda (t0: T).(eq T t0 (lift (S +(plus (trans hds0 i) h)) O (lift1 (ptrans hds0 i) t)))) (eq_ind nat (S (plus +h (trans hds0 i))) (\lambda (n: nat).(eq T (lift n O (lift1 (ptrans hds0 i) +t)) (lift (S (plus (trans hds0 i) h)) O (lift1 (ptrans hds0 i) t)))) +(eq_ind_r nat (plus (trans hds0 i) h) (\lambda (n: nat).(eq T (lift (S n) O +(lift1 (ptrans hds0 i) t)) (lift (S (plus (trans hds0 i) h)) O (lift1 (ptrans +hds0 i) t)))) (refl_equal T (lift (S (plus (trans hds0 i) h)) O (lift1 +(ptrans hds0 i) t))) (plus h (trans hds0 i)) (plus_sym h (trans hds0 i))) +(plus h (S (trans hds0 i))) (plus_n_Sm h (trans hds0 i))) (lift h d (lift (S +(trans hds0 i)) O (lift1 (ptrans hds0 i) t))) (lift_free (lift1 (ptrans hds0 +i) t) (S (trans hds0 i)) h O d (eq_ind nat (S (plus O (trans hds0 i))) +(\lambda (n: nat).(le d n)) (eq_ind_r nat (plus (trans hds0 i) O) (\lambda +(n: nat).(le d (S n))) (le_S d (plus (trans hds0 i) O) (le_plus_trans d +(trans hds0 i) O (bge_le d (trans hds0 i) H0))) (plus O (trans hds0 i)) +(plus_sym O (trans hds0 i))) (plus O (S (trans hds0 i))) (plus_n_Sm O (trans +hds0 i))) (le_O_n d)))) x_x))) (lift1 hds0 (lift (S i) O t)) (H i t)))))))) +hds). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/lift1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/lift1/props.ma new file mode 100644 index 000000000..8ff7f4d96 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/lift1/props.ma @@ -0,0 +1,140 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift1/defs.ma". + +include "basic_1A/lift/props.ma". + +lemma lift1_sort: + \forall (n: nat).(\forall (is: PList).(eq T (lift1 is (TSort n)) (TSort n))) +\def + \lambda (n: nat).(\lambda (is: PList).(PList_ind (\lambda (p: PList).(eq T +(lift1 p (TSort n)) (TSort n))) (refl_equal T (TSort n)) (\lambda (n0: +nat).(\lambda (n1: nat).(\lambda (p: PList).(\lambda (H: (eq T (lift1 p +(TSort n)) (TSort n))).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (lift n0 +n1 t) (TSort n))) (refl_equal T (TSort n)) (lift1 p (TSort n)) H))))) is)). + +lemma lift1_lref: + \forall (hds: PList).(\forall (i: nat).(eq T (lift1 hds (TLRef i)) (TLRef +(trans hds i)))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: nat).(eq T +(lift1 p (TLRef i)) (TLRef (trans p i))))) (\lambda (i: nat).(refl_equal T +(TLRef i))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda +(H: ((\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef (trans p +i)))))).(\lambda (i: nat).(eq_ind_r T (TLRef (trans p i)) (\lambda (t: T).(eq +T (lift n n0 t) (TLRef (match (blt (trans p i) n0) with [true \Rightarrow +(trans p i) | false \Rightarrow (plus (trans p i) n)])))) (refl_equal T +(TLRef (match (blt (trans p i) n0) with [true \Rightarrow (trans p i) | false +\Rightarrow (plus (trans p i) n)]))) (lift1 p (TLRef i)) (H i))))))) hds). + +lemma lift1_bind: + \forall (b: B).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T +(lift1 hds (THead (Bind b) u t)) (THead (Bind b) (lift1 hds u) (lift1 (Ss +hds) t)))))) +\def + \lambda (b: B).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(u: T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) +(lift1 p u) (lift1 (Ss p) t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal +T (THead (Bind b) u t)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: +PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead +(Bind b) u t)) (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))))))).(\lambda +(u: T).(\lambda (t: T).(eq_ind_r T (THead (Bind b) (lift1 p u) (lift1 (Ss p) +t)) (\lambda (t0: T).(eq T (lift n n0 t0) (THead (Bind b) (lift n n0 (lift1 p +u)) (lift n (S n0) (lift1 (Ss p) t))))) (eq_ind_r T (THead (Bind b) (lift n +n0 (lift1 p u)) (lift n (S n0) (lift1 (Ss p) t))) (\lambda (t0: T).(eq T t0 +(THead (Bind b) (lift n n0 (lift1 p u)) (lift n (S n0) (lift1 (Ss p) t))))) +(refl_equal T (THead (Bind b) (lift n n0 (lift1 p u)) (lift n (S n0) (lift1 +(Ss p) t)))) (lift n n0 (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))) +(lift_bind b (lift1 p u) (lift1 (Ss p) t) n n0)) (lift1 p (THead (Bind b) u +t)) (H u t)))))))) hds)). + +lemma lift1_flat: + \forall (f: F).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T +(lift1 hds (THead (Flat f) u t)) (THead (Flat f) (lift1 hds u) (lift1 hds +t)))))) +\def + \lambda (f: F).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(u: T).(\forall (t: T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) +(lift1 p u) (lift1 p t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal T +(THead (Flat f) u t)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: +PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead +(Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p t))))))).(\lambda (u: +T).(\lambda (t: T).(eq_ind_r T (THead (Flat f) (lift1 p u) (lift1 p t)) +(\lambda (t0: T).(eq T (lift n n0 t0) (THead (Flat f) (lift n n0 (lift1 p u)) +(lift n n0 (lift1 p t))))) (eq_ind_r T (THead (Flat f) (lift n n0 (lift1 p +u)) (lift n n0 (lift1 p t))) (\lambda (t0: T).(eq T t0 (THead (Flat f) (lift +n n0 (lift1 p u)) (lift n n0 (lift1 p t))))) (refl_equal T (THead (Flat f) +(lift n n0 (lift1 p u)) (lift n n0 (lift1 p t)))) (lift n n0 (THead (Flat f) +(lift1 p u) (lift1 p t))) (lift_flat f (lift1 p u) (lift1 p t) n n0)) (lift1 +p (THead (Flat f) u t)) (H u t)))))))) hds)). + +lemma lift1_cons_tail: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(eq +T (lift1 (PConsTail hds h d) t) (lift1 hds (lift h d t)))))) +\def + \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (hds: +PList).(PList_ind (\lambda (p: PList).(eq T (lift1 (PConsTail p h d) t) +(lift1 p (lift h d t)))) (refl_equal T (lift h d t)) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: (eq T (lift1 +(PConsTail p h d) t) (lift1 p (lift h d t)))).(eq_ind_r T (lift1 p (lift h d +t)) (\lambda (t0: T).(eq T (lift n n0 t0) (lift n n0 (lift1 p (lift h d +t))))) (refl_equal T (lift n n0 (lift1 p (lift h d t)))) (lift1 (PConsTail p +h d) t) H))))) hds)))). + +lemma lifts1_flat: + \forall (f: F).(\forall (hds: PList).(\forall (t: T).(\forall (ts: +TList).(eq T (lift1 hds (THeads (Flat f) ts t)) (THeads (Flat f) (lifts1 hds +ts) (lift1 hds t)))))) +\def + \lambda (f: F).(\lambda (hds: PList).(\lambda (t: T).(\lambda (ts: +TList).(TList_ind (\lambda (t0: TList).(eq T (lift1 hds (THeads (Flat f) t0 +t)) (THeads (Flat f) (lifts1 hds t0) (lift1 hds t)))) (refl_equal T (lift1 +hds t)) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: (eq T (lift1 hds +(THeads (Flat f) t1 t)) (THeads (Flat f) (lifts1 hds t1) (lift1 hds +t)))).(eq_ind_r T (THead (Flat f) (lift1 hds t0) (lift1 hds (THeads (Flat f) +t1 t))) (\lambda (t2: T).(eq T t2 (THead (Flat f) (lift1 hds t0) (THeads +(Flat f) (lifts1 hds t1) (lift1 hds t))))) (eq_ind_r T (THeads (Flat f) +(lifts1 hds t1) (lift1 hds t)) (\lambda (t2: T).(eq T (THead (Flat f) (lift1 +hds t0) t2) (THead (Flat f) (lift1 hds t0) (THeads (Flat f) (lifts1 hds t1) +(lift1 hds t))))) (refl_equal T (THead (Flat f) (lift1 hds t0) (THeads (Flat +f) (lifts1 hds t1) (lift1 hds t)))) (lift1 hds (THeads (Flat f) t1 t)) H) +(lift1 hds (THead (Flat f) t0 (THeads (Flat f) t1 t))) (lift1_flat f hds t0 +(THeads (Flat f) t1 t)))))) ts)))). + +lemma lifts1_nil: + \forall (ts: TList).(eq TList (lifts1 PNil ts) ts) +\def + \lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 PNil t) +t)) (refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: +(eq TList (lifts1 PNil t0) t0)).(eq_ind_r TList t0 (\lambda (t1: TList).(eq +TList (TCons t t1) (TCons t t0))) (refl_equal TList (TCons t t0)) (lifts1 +PNil t0) H)))) ts). + +lemma lifts1_cons: + \forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(\forall (ts: +TList).(eq TList (lifts1 (PCons h d hds) ts) (lifts h d (lifts1 hds ts)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (hds: PList).(\lambda (ts: +TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 (PCons h d hds) t) +(lifts h d (lifts1 hds t)))) (refl_equal TList TNil) (\lambda (t: T).(\lambda +(t0: TList).(\lambda (H: (eq TList (lifts1 (PCons h d hds) t0) (lifts h d +(lifts1 hds t0)))).(eq_ind_r TList (lifts h d (lifts1 hds t0)) (\lambda (t1: +TList).(eq TList (TCons (lift h d (lift1 hds t)) t1) (TCons (lift h d (lift1 +hds t)) (lifts h d (lifts1 hds t0))))) (refl_equal TList (TCons (lift h d +(lift1 hds t)) (lifts h d (lifts1 hds t0)))) (lifts1 (PCons h d hds) t0) +H)))) ts)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/llt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/llt/defs.ma new file mode 100644 index 000000000..819ba1b1e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/llt/defs.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/A/defs.ma". + +rec definition lweight (a: A) on a: nat \def match a with [(ASort _ _) +\Rightarrow O | (AHead a1 a2) \Rightarrow (S (plus (lweight a1) (lweight +a2)))]. + +definition llt: + A \to (A \to Prop) +\def + \lambda (a1: A).(\lambda (a2: A).(lt (lweight a1) (lweight a2))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/llt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/llt/fwd.ma new file mode 100644 index 000000000..65e029b8d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/llt/fwd.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/llt/defs.ma". + +fact llt_wf__q_ind: + \forall (P: ((A \to Prop))).(((\forall (n: nat).((\lambda (P0: ((A \to +Prop))).(\lambda (n0: nat).(\forall (a: A).((eq nat (lweight a) n0) \to (P0 +a))))) P n))) \to (\forall (a: A).(P a))) +\def + let Q \def (\lambda (P: ((A \to Prop))).(\lambda (n: nat).(\forall (a: +A).((eq nat (lweight a) n) \to (P a))))) in (\lambda (P: ((A \to +Prop))).(\lambda (H: ((\forall (n: nat).(\forall (a: A).((eq nat (lweight a) +n) \to (P a)))))).(\lambda (a: A).(H (lweight a) a (refl_equal nat (lweight +a)))))). + +lemma llt_wf_ind: + \forall (P: ((A \to Prop))).(((\forall (a2: A).(((\forall (a1: A).((llt a1 +a2) \to (P a1)))) \to (P a2)))) \to (\forall (a: A).(P a))) +\def + let Q \def (\lambda (P: ((A \to Prop))).(\lambda (n: nat).(\forall (a: +A).((eq nat (lweight a) n) \to (P a))))) in (\lambda (P: ((A \to +Prop))).(\lambda (H: ((\forall (a2: A).(((\forall (a1: A).((lt (lweight a1) +(lweight a2)) \to (P a1)))) \to (P a2))))).(\lambda (a: A).(llt_wf__q_ind +(\lambda (a0: A).(P a0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (a0: +A).(P a0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) +\to (Q (\lambda (a0: A).(P a0)) m))))).(\lambda (a0: A).(\lambda (H1: (eq nat +(lweight a0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall +(m: nat).((lt m n1) \to (\forall (a1: A).((eq nat (lweight a1) m) \to (P +a1)))))) H0 (lweight a0) H1) in (H a0 (\lambda (a1: A).(\lambda (H3: (lt +(lweight a1) (lweight a0))).(H2 (lweight a1) H3 a1 (refl_equal nat (lweight +a1))))))))))))) a)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/llt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/llt/props.ma new file mode 100644 index 000000000..4e7b48eb4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/llt/props.ma @@ -0,0 +1,65 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/llt/defs.ma". + +include "basic_1A/leq/fwd.ma". + +lemma lweight_repl: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (eq nat +(lweight a1) (lweight a2))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 +a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(eq nat (lweight a) (lweight +a0)))) (\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))).(refl_equal nat O))))))) (\lambda (a0: A).(\lambda (a3: +A).(\lambda (_: (leq g a0 a3)).(\lambda (H1: (eq nat (lweight a0) (lweight +a3))).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq g a4 a5)).(\lambda +(H3: (eq nat (lweight a4) (lweight a5))).(f_equal nat nat S (plus (lweight +a0) (lweight a4)) (plus (lweight a3) (lweight a5)) (f_equal2 nat nat nat plus +(lweight a0) (lweight a3) (lweight a4) (lweight a5) H1 H3)))))))))) a1 a2 +H)))). + +lemma llt_repl: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall +(a3: A).((llt a1 a3) \to (llt a2 a3)))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 +a2)).(\lambda (a3: A).(\lambda (H0: (lt (lweight a1) (lweight a3))).(let H1 +\def (eq_ind nat (lweight a1) (\lambda (n: nat).(lt n (lweight a3))) H0 +(lweight a2) (lweight_repl g a1 a2 H)) in H1)))))). + +theorem llt_trans: + \forall (a1: A).(\forall (a2: A).(\forall (a3: A).((llt a1 a2) \to ((llt a2 +a3) \to (llt a1 a3))))) +\def + \lambda (a1: A).(\lambda (a2: A).(\lambda (a3: A).(\lambda (H: (lt (lweight +a1) (lweight a2))).(\lambda (H0: (lt (lweight a2) (lweight a3))).(lt_trans +(lweight a1) (lweight a2) (lweight a3) H H0))))). + +lemma llt_head_sx: + \forall (a1: A).(\forall (a2: A).(llt a1 (AHead a1 a2))) +\def + \lambda (a1: A).(\lambda (a2: A).(le_n_S (lweight a1) (plus (lweight a1) +(lweight a2)) (le_plus_l (lweight a1) (lweight a2)))). + +lemma llt_head_dx: + \forall (a1: A).(\forall (a2: A).(llt a2 (AHead a1 a2))) +\def + \lambda (a1: A).(\lambda (a2: A).(le_n_S (lweight a2) (plus (lweight a1) +(lweight a2)) (le_plus_r (lweight a1) (lweight a2)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/next_plus/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/defs.ma new file mode 100644 index 000000000..ee23d9f32 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/defs.ma @@ -0,0 +1,21 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/G/defs.ma". + +rec definition next_plus (g: G) (n: nat) (i: nat) on i: nat \def match i with +[O \Rightarrow n | (S i0) \Rightarrow (next g (next_plus g n i0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/next_plus/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/props.ma new file mode 100644 index 000000000..52d078554 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/next_plus/props.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/next_plus/defs.ma". + +lemma next_plus_assoc: + \forall (g: G).(\forall (n: nat).(\forall (h1: nat).(\forall (h2: nat).(eq +nat (next_plus g (next_plus g n h1) h2) (next_plus g n (plus h1 h2)))))) +\def + \lambda (g: G).(\lambda (n: nat).(\lambda (h1: nat).(nat_ind (\lambda (n0: +nat).(\forall (h2: nat).(eq nat (next_plus g (next_plus g n n0) h2) +(next_plus g n (plus n0 h2))))) (\lambda (h2: nat).(refl_equal nat (next_plus +g n h2))) (\lambda (n0: nat).(\lambda (_: ((\forall (h2: nat).(eq nat +(next_plus g (next_plus g n n0) h2) (next_plus g n (plus n0 h2)))))).(\lambda +(h2: nat).(nat_ind (\lambda (n1: nat).(eq nat (next_plus g (next g (next_plus +g n n0)) n1) (next g (next_plus g n (plus n0 n1))))) (eq_ind nat n0 (\lambda +(n1: nat).(eq nat (next g (next_plus g n n0)) (next g (next_plus g n n1)))) +(refl_equal nat (next g (next_plus g n n0))) (plus n0 O) (plus_n_O n0)) +(\lambda (n1: nat).(\lambda (H0: (eq nat (next_plus g (next g (next_plus g n +n0)) n1) (next g (next_plus g n (plus n0 n1))))).(eq_ind nat (S (plus n0 n1)) +(\lambda (n2: nat).(eq nat (next g (next_plus g (next g (next_plus g n n0)) +n1)) (next g (next_plus g n n2)))) (f_equal nat nat (next g) (next_plus g +(next g (next_plus g n n0)) n1) (next g (next_plus g n (plus n0 n1))) H0) +(plus n0 (S n1)) (plus_n_Sm n0 n1)))) h2)))) h1))). + +lemma next_plus_next: + \forall (g: G).(\forall (n: nat).(\forall (h: nat).(eq nat (next_plus g +(next g n) h) (next g (next_plus g n h))))) +\def + \lambda (g: G).(\lambda (n: nat).(\lambda (h: nat).(eq_ind_r nat (next_plus +g n (plus (S O) h)) (\lambda (n0: nat).(eq nat n0 (next g (next_plus g n +h)))) (refl_equal nat (next g (next_plus g n h))) (next_plus g (next_plus g n +(S O)) h) (next_plus_assoc g n (S O) h)))). + +lemma next_plus_lt: + \forall (g: G).(\forall (h: nat).(\forall (n: nat).(lt n (next_plus g (next +g n) h)))) +\def + \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (n0: +nat).(lt n0 (next_plus g (next g n0) n)))) (\lambda (n: nat).(next_lt g n)) +(\lambda (n: nat).(\lambda (H: ((\forall (n0: nat).(lt n0 (next_plus g (next +g n0) n))))).(\lambda (n0: nat).(eq_ind nat (next_plus g (next g (next g n0)) +n) (\lambda (n1: nat).(lt n0 n1)) (lt_trans n0 (next g n0) (next_plus g (next +g (next g n0)) n) (next_lt g n0) (H (next g n0))) (next g (next_plus g (next +g n0) n)) (next_plus_next g (next g n0) n))))) h)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/arity.ma new file mode 100644 index 000000000..dd9b38e42 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/arity.ma @@ -0,0 +1,486 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/nf2/fwd.ma". + +include "basic_1A/arity/subst0.ma". + +lemma arity_nf2_inv_all: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t +a) \to ((nf2 c t) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t +(THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) +(\lambda (w: T).(\lambda (u: T).(nf2 (CHead c (Bind Abst) w) u)))) (ex nat +(\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: +A).((nf2 c0 t0) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t0 +(THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) +(\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat +(\lambda (n: nat).(eq T t0 (TSort n)))) (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)))))))))) (\lambda (c0: C).(\lambda +(n: nat).(\lambda (_: (nf2 c0 (TSort n))).(or3_intro1 (ex3_2 T T (\lambda (w: +T).(\lambda (u: T).(eq T (TSort n) (THead (Bind Abst) w u)))) (\lambda (w: +T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead +c0 (Bind Abst) w) u)))) (ex nat (\lambda (n0: nat).(eq T (TSort n) (TSort +n0)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (TSort +n) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i))))) (ex_intro nat (\lambda (n0: nat).(eq T (TSort n) (TSort n0))) n +(refl_equal T (TSort n))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) +u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: (((nf2 d u) +\to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (THead (Bind +Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 d w))) (\lambda (w: +T).(\lambda (u0: T).(nf2 (CHead d (Bind Abst) w) u0)))) (ex nat (\lambda (n: +nat).(eq T u (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i0: +nat).(eq T u (THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 d ws))) (\lambda (_: TList).(\lambda (i0: +nat).(nf2 d (TLRef i0))))))))).(\lambda (H3: (nf2 c0 (TLRef +i))).(nf2_gen_lref c0 d u i H0 H3 (or3 (ex3_2 T T (\lambda (w: T).(\lambda +(u0: T).(eq T (TLRef i) (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 (TLRef i) (TSort n)))) (ex3_2 +TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T (TLRef i) (THeads +(Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 +ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 c0 (TLRef +i0)))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: +A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: (((nf2 d u) \to (or3 +(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (THead (Bind Abst) w +u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 d w))) (\lambda (w: T).(\lambda +(u0: T).(nf2 (CHead d (Bind Abst) w) u0)))) (ex nat (\lambda (n: nat).(eq T u +(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T u +(THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 d ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 d (TLRef +i0))))))))).(\lambda (H3: (nf2 c0 (TLRef i))).(or3_intro2 (ex3_2 T T (\lambda +(w: T).(\lambda (u0: T).(eq T (TLRef i) (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 (TLRef i) +(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T +(TLRef i) (THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda +(_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 c0 (TLRef +i0))))) (ex3_2_intro TList nat (\lambda (ws: TList).(\lambda (i0: nat).(eq T +(TLRef i) (THeads (Flat Appl) ws (TLRef i0))))) (\lambda (ws: TList).(\lambda +(_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i0: nat).(nf2 c0 (TLRef +i0)))) TNil i (refl_equal T (TLRef i)) I H3))))))))))) (\lambda (b: +B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((nf2 c0 u) +\to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: +nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda +(H3: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (_: (((nf2 (CHead c0 +(Bind b) u) t0) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T t0 +(THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 (CHead c0 +(Bind b) u) w))) (\lambda (w: T).(\lambda (u0: T).(nf2 (CHead (CHead c0 (Bind +b) u) (Bind Abst) w) u0)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort n)))) +(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 +(CHead c0 (Bind b) u) ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 (CHead +c0 (Bind b) u) (TLRef i))))))))).(\lambda (H5: (nf2 c0 (THead (Bind b) u +t0))).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to ((arity g (CHead c0 +(Bind b0) u) t0 a2) \to ((nf2 c0 (THead (Bind b0) u t0)) \to (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind b0) u t0) (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 (Bind b0) u t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T (THead (Bind b0) u t0) (THeads (Flat Appl) ws +(TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda +(_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))))))) (\lambda (_: (not (eq +B Abbr Abst))).(\lambda (_: (arity g (CHead c0 (Bind Abbr) u) t0 +a2)).(\lambda (H8: (nf2 c0 (THead (Bind Abbr) u t0))).(nf2_gen_abbr c0 u t0 +H8 (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind Abbr) +u t0) (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 (Bind Abbr) u t0) (TSort n)))) (ex3_2 +TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind Abbr) u +t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i)))))))))) (\lambda (H6: (not (eq B Abst Abst))).(\lambda (_: (arity g +(CHead c0 (Bind Abst) u) t0 a2)).(\lambda (_: (nf2 c0 (THead (Bind Abst) u +t0))).(let H9 \def (match (H6 (refl_equal B Abst)) in False with []) in +H9)))) (\lambda (_: (not (eq B Void Abst))).(\lambda (H7: (arity g (CHead c0 +(Bind Void) u) t0 a2)).(\lambda (H8: (nf2 c0 (THead (Bind Void) u t0))).(let +H9 \def (arity_gen_cvoid g (CHead c0 (Bind Void) u) t0 a2 H7 c0 u O +(getl_refl Void c0 u)) in (ex_ind T (\lambda (v: T).(eq T t0 (lift (S O) O +v))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind +Void) u t0) (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 (Bind Void) u t0) (TSort n)))) (ex3_2 +TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind Void) u +t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i)))))) (\lambda (x: T).(\lambda (H10: (eq T t0 (lift (S O) O x))).(let H11 +\def (eq_ind T t0 (\lambda (t1: T).(nf2 c0 (THead (Bind Void) u t1))) H8 +(lift (S O) O x) H10) in (eq_ind_r T (lift (S O) O x) (\lambda (t1: T).(or3 +(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Bind Void) u t1) +(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 (Bind Void) u t1) (TSort n)))) (ex3_2 TList +nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind Void) 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))))))) (nf2_gen_void c0 u x H11 (or3 (ex3_2 T T (\lambda (w: T).(\lambda +(u0: T).(eq T (THead (Bind Void) u (lift (S O) O 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 (Bind Void) u (lift (S O) O x)) (TSort n)))) (ex3_2 TList nat (\lambda +(ws: TList).(\lambda (i: nat).(eq T (THead (Bind Void) u (lift (S O) O x)) +(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i))))))) t0 H10)))) H9))))) b H0 H3 H5))))))))))))) (\lambda (c0: C).(\lambda +(u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda +(_: (((nf2 c0 u) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u +(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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda +(a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a2)).(\lambda (_: +(((nf2 (CHead c0 (Bind Abst) u) t0) \to (or3 (ex3_2 T T (\lambda (w: +T).(\lambda (u0: T).(eq T t0 (THead (Bind Abst) w u0)))) (\lambda (w: +T).(\lambda (_: T).(nf2 (CHead c0 (Bind Abst) u) w))) (\lambda (w: +T).(\lambda (u0: T).(nf2 (CHead (CHead c0 (Bind Abst) u) (Bind Abst) w) +u0)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort n)))) (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 (CHead c0 (Bind Abst) u) +ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 (CHead c0 (Bind Abst) u) +(TLRef i))))))))).(\lambda (H4: (nf2 c0 (THead (Bind Abst) u t0))).(let H5 +\def (nf2_gen_abst c0 u t0 H4) in (land_ind (nf2 c0 u) (nf2 (CHead c0 (Bind +Abst) u) t0) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead +(Bind Abst) u t0) (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 (Bind Abst) u t0) (TSort +n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead +(Bind Abst) u t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c0 (TLRef i)))))) (\lambda (H6: (nf2 c0 u)).(\lambda (H7: (nf2 +(CHead c0 (Bind Abst) u) t0)).(or3_intro0 (ex3_2 T T (\lambda (w: T).(\lambda +(u0: T).(eq T (THead (Bind Abst) u t0) (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 (Bind +Abst) u t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: +nat).(eq T (THead (Bind Abst) u 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_intro T T (\lambda (w: +T).(\lambda (u0: T).(eq T (THead (Bind Abst) u t0) (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))) u t0 (refl_equal T (THead (Bind +Abst) u t0)) H6 H7)))) H5)))))))))))) (\lambda (c0: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((nf2 c0 u) +\to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u (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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: +nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda +(H2: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: (((nf2 c0 t0) \to (or3 +(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T t0 (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 +t0 (TSort n)))) (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))))))))).(\lambda (H4: (nf2 c0 (THead (Flat Appl) u t0))).(let H5 \def +(nf2_gen_flat Appl c0 u t0 H4) in (land_ind (nf2 c0 u) (nf2 c0 t0) (or3 +(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) +(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 t0) (TSort n)))) (ex3_2 TList +nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) +(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i)))))) (\lambda (H6: (nf2 c0 u)).(\lambda (H7: (nf2 c0 t0)).(let H_x \def +(H3 H7) in (let H8 \def H_x in (or3_ind (ex3_2 T T (\lambda (w: T).(\lambda +(u0: T).(eq T t0 (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 t0 (TSort n)))) (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))))) (or3 (ex3_2 T T (\lambda (w: +T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) (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 t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) (THeads (Flat Appl) +ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) +(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))) (\lambda (H9: +(ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T t0 (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))))).(ex3_2_ind T T (\lambda (w: +T).(\lambda (u0: T).(eq T t0 (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))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq +T (THead (Flat Appl) u t0) (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 +t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq +T (THead (Flat Appl) u t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c0 (TLRef i)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: +(eq T t0 (THead (Bind Abst) x0 x1))).(\lambda (_: (nf2 c0 x0)).(\lambda (_: +(nf2 (CHead c0 (Bind Abst) x0) x1)).(let H13 \def (eq_ind T t0 (\lambda (t1: +T).(nf2 c0 (THead (Flat Appl) u t1))) H4 (THead (Bind Abst) x0 x1) H10) in +(let H14 \def (eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a2))) H2 +(THead (Bind Abst) x0 x1) H10) in (eq_ind_r T (THead (Bind Abst) x0 x1) +(\lambda (t1: T).(or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T +(THead (Flat Appl) u t1) (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 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))))))) (nf2_gen_beta c0 u x0 x1 H13 (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat Appl) u (THead (Bind +Abst) x0 x1)) (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 (THead (Bind +Abst) x0 x1)) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: +nat).(eq T (THead (Flat Appl) u (THead (Bind Abst) x0 x1)) (THeads (Flat +Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) +(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))) t0 H10)))))))) +H9)) (\lambda (H9: (ex nat (\lambda (n: nat).(eq T t0 (TSort n))))).(ex_ind +nat (\lambda (n: nat).(eq T t0 (TSort n))) (or3 (ex3_2 T T (\lambda (w: +T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) (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 t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) (THeads (Flat Appl) +ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) +(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))) (\lambda (x: +nat).(\lambda (H10: (eq T t0 (TSort x))).(let H11 \def (eq_ind T t0 (\lambda +(t1: T).(nf2 c0 (THead (Flat Appl) u t1))) H4 (TSort x) H10) in (let H12 \def +(eq_ind T t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a2))) H2 (TSort x) +H10) in (eq_ind_r T (TSort x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (w: +T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t1) (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 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 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)))))) (\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 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 (_: +TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))) (or3 (ex3_2 T T (\lambda (w: +T).(\lambda (u0: T).(eq T (THead (Flat Appl) u t0) (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 t0) (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u t0) (THeads (Flat Appl) +ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) +(\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))))) (\lambda (x0: +TList).(\lambda (x1: nat).(\lambda (H10: (eq T t0 (THeads (Flat Appl) x0 +(TLRef x1)))).(\lambda (H11: (nfs2 c0 x0)).(\lambda (H12: (nf2 c0 (TLRef +x1))).(let H13 \def (eq_ind T t0 (\lambda (t1: T).(nf2 c0 (THead (Flat Appl) +u t1))) H4 (THeads (Flat Appl) x0 (TLRef x1)) H10) in (let H14 \def (eq_ind T +t0 (\lambda (t1: T).(arity g c0 t1 (AHead a1 a2))) H2 (THeads (Flat Appl) x0 +(TLRef x1)) H10) in (eq_ind_r T (THeads (Flat Appl) x0 (TLRef x1)) (\lambda +(t1: T).(or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat +Appl) u t1) (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 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))))))) (or3_intro2 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead +(Flat Appl) u (THeads (Flat Appl) x0 (TLRef x1))) (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 (THeads (Flat Appl) x0 (TLRef x1))) (TSort n)))) (ex3_2 +TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u +(THeads (Flat Appl) x0 (TLRef x1))) (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_intro TList nat +(\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Appl) u (THeads +(Flat Appl) x0 (TLRef x1))) (THeads (Flat Appl) ws (TLRef i))))) (\lambda +(ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c0 (TLRef i)))) (TCons u x0) x1 (refl_equal T (THead (Flat Appl) u +(THeads (Flat Appl) x0 (TLRef x1)))) (conj (nf2 c0 u) (nfs2 c0 x0) H6 H11) +H12)) t0 H10)))))))) H9)) H8))))) H5)))))))))))) (\lambda (c0: C).(\lambda +(u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda +(_: (((nf2 c0 u) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T u +(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 u (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T u (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))))).(\lambda (t0: T).(\lambda +(_: (arity g c0 t0 a0)).(\lambda (_: (((nf2 c0 t0) \to (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u0: T).(eq T t0 (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 t0 +(TSort n)))) (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))))))))).(\lambda (H4: (nf2 c0 (THead (Flat Cast) u t0))).(nf2_gen_cast c0 +u t0 H4 (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T (THead (Flat +Cast) u t0) (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 Cast) u t0) (TSort n)))) (ex3_2 +TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Flat Cast) u +t0) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i)))))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda +(_: (arity g c0 t0 a1)).(\lambda (H1: (((nf2 c0 t0) \to (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda +(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 +(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort +n)))) (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))))))))).(\lambda (a2: A).(\lambda (_: (leq g a1 a2)).(\lambda (H3: (nf2 c0 +t0)).(let H_x \def (H1 H3) in (let H4 \def H_x in (or3_ind (ex3_2 T T +(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda +(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 +(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort +n)))) (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))))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind +Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: +T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: +nat).(eq T t0 (TSort n)))) (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)))))) (\lambda (H5: (ex3_2 T T (\lambda (w: T).(\lambda +(u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: +T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) +u))))).(ex3_2_ind T T (\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind +Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: +T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u))) (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda +(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 +(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort +n)))) (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)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t0 (THead (Bind +Abst) x0 x1))).(\lambda (H7: (nf2 c0 x0)).(\lambda (H8: (nf2 (CHead c0 (Bind +Abst) x0) x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t1: T).(or3 +(ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind Abst) w +u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda +(u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t1 +(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t1 +(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i))))))) (or3_intro0 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T (THead +(Bind Abst) x0 x1) (THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: +T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) +u)))) (ex nat (\lambda (n: nat).(eq T (THead (Bind Abst) x0 x1) (TSort n)))) +(ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind +Abst) x0 x1) (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_intro T T (\lambda (w: T).(\lambda (u: +T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) w u)))) (\lambda (w: +T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead +c0 (Bind Abst) w) u))) x0 x1 (refl_equal T (THead (Bind Abst) x0 x1)) H7 H8)) +t0 H6)))))) H5)) (\lambda (H5: (ex nat (\lambda (n: nat).(eq T t0 (TSort +n))))).(ex_ind nat (\lambda (n: nat).(eq T t0 (TSort n))) (or3 (ex3_2 T T +(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda +(w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 +(CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort +n)))) (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)))))) (\lambda (x: nat).(\lambda (H6: (eq T t0 (TSort x))).(eq_ind_r T +(TSort x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (w: T).(\lambda (u: +T).(eq T t1 (THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 +c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) +(ex nat (\lambda (n: nat).(eq T t1 (TSort n)))) (ex3_2 TList nat (\lambda +(ws: TList).(\lambda (i: nat).(eq T t1 (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c0 ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c0 (TLRef i))))))) (or3_intro1 (ex3_2 T T +(\lambda (w: T).(\lambda (u: T).(eq T (TSort x) (THead (Bind Abst) w u)))) +(\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: +T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T (TSort +x) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T +(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))))) (ex_intro nat (\lambda (n: nat).(eq T (TSort x) (TSort n))) x +(refl_equal T (TSort x)))) t0 H6))) H5)) (\lambda (H5: (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 (_: +TList).(\lambda (i: nat).(nf2 c0 (TLRef i)))) (or3 (ex3_2 T T (\lambda (w: +T).(\lambda (u: T).(eq T t0 (THead (Bind Abst) w u)))) (\lambda (w: +T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead +c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t0 (TSort n)))) +(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)))))) (\lambda +(x0: TList).(\lambda (x1: nat).(\lambda (H6: (eq T t0 (THeads (Flat Appl) x0 +(TLRef x1)))).(\lambda (H7: (nfs2 c0 x0)).(\lambda (H8: (nf2 c0 (TLRef +x1))).(eq_ind_r T (THeads (Flat Appl) x0 (TLRef x1)) (\lambda (t1: T).(or3 +(ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind Abst) w +u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda +(u: T).(nf2 (CHead c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t1 +(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t1 +(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i))))))) (or3_intro2 (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T (THeads +(Flat Appl) x0 (TLRef x1)) (THead (Bind Abst) w u)))) (\lambda (w: +T).(\lambda (_: T).(nf2 c0 w))) (\lambda (w: T).(\lambda (u: T).(nf2 (CHead +c0 (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T (THeads (Flat Appl) +x0 (TLRef x1)) (TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda +(i: nat).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (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_intro TList nat +(\lambda (ws: TList).(\lambda (i: nat).(eq T (THeads (Flat Appl) x0 (TLRef +x1)) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c0 ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c0 (TLRef +i)))) x0 x1 (refl_equal T (THeads (Flat Appl) x0 (TLRef x1))) H7 H8)) t0 +H6)))))) H5)) H4))))))))))) c t a H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/dec.ma new file mode 100644 index 000000000..6f100f932 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/dec.ma @@ -0,0 +1,193 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/nf2/defs.ma". + +include "basic_1A/pr2/clen.ma". + +include "basic_1A/pr0/dec.ma". + +include "basic_1A/C/props.ma". + +lemma nf2_dec: + \forall (c: C).(\forall (t1: T).(or (nf2 c t1) (ex2 T (\lambda (t2: T).((eq +T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c t1 t2))))) +\def + \lambda (c: C).(c_tail_ind (\lambda (c0: C).(\forall (t1: T).(or (\forall +(t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 +t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))))) (\lambda +(n: nat).(\lambda (t1: T).(let H_x \def (nf0_dec t1) in (let H \def H_x in +(or_ind (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2))) +(or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T +(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr2 (CSort n) t1 t2)))) (\lambda (H0: ((\forall (t2: T).((pr0 t1 t2) \to +(eq T t1 t2))))).(or_introl (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T +t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CSort n) t1 t2))) (\lambda (t2: T).(\lambda (H1: (pr2 +(CSort n) t1 t2)).(let H_y \def (pr2_gen_csort t1 t2 n H1) in (H0 t2 +H_y)))))) (\lambda (H0: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)))).(ex2_ind T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)) +(or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T +(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr2 (CSort n) t1 t2)))) (\lambda (x: T).(\lambda (H1: (((eq T t1 x) \to +(\forall (P: Prop).P)))).(\lambda (H2: (pr0 t1 x)).(or_intror (\forall (t2: +T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T +t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2))) +(ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CSort n) t1 t2)) x H1 (pr2_free (CSort n) t1 x +H2)))))) H0)) H))))) (\lambda (c0: C).(\lambda (H: ((\forall (t1: T).(or +(\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 +t2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (t1: T).(let H_x \def (H +t1) in (let H0 \def H_x in (or_ind (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T +t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 c0 t1 t2))) (or (\forall (t2: T).((pr2 (CTail k t c0) +t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (H1: +((\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))))).(K_ind (\lambda (k0: +K).(or (\forall (t2: T).((pr2 (CTail k0 t c0) t1 t2) \to (eq T t1 t2))) (ex2 +T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr2 (CTail k0 t c0) t1 t2))))) (\lambda (b: B).(B_ind (\lambda (b0: +B).(or (\forall (t2: T).((pr2 (CTail (Bind b0) t c0) t1 t2) \to (eq T t1 +t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CTail (Bind b0) t c0) t1 t2))))) (let H_x0 \def +(dnf_dec t t1 (clen c0)) in (let H2 \def H_x0 in (ex_ind T (\lambda (v: +T).(or (subst0 (clen c0) t t1 (lift (S O) (clen c0) v)) (eq T t1 (lift (S O) +(clen c0) v)))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) +\to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda +(x: T).(\lambda (H3: (or (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq +T t1 (lift (S O) (clen c0) x)))).(or_ind (subst0 (clen c0) t t1 (lift (S O) +(clen c0) x)) (eq T t1 (lift (S O) (clen c0) x)) (or (\forall (t2: T).((pr2 +(CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail +(Bind Abbr) t c0) t1 t2)))) (\lambda (H4: (subst0 (clen c0) t t1 (lift (S O) +(clen c0) x))).(let H_x1 \def (getl_ctail_clen Abbr t c0) in (let H5 \def +H_x1 in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind Abbr) t +c0) (CHead (CSort n) (Bind Abbr) t))) (or (\forall (t2: T).((pr2 (CTail (Bind +Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) +\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 +t2)))) (\lambda (x0: nat).(\lambda (H6: (getl (clen c0) (CTail (Bind Abbr) t +c0) (CHead (CSort x0) (Bind Abbr) t))).(or_intror (\forall (t2: T).((pr2 +(CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail +(Bind Abbr) t c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 +t2)) (lift (S O) (clen c0) x) (\lambda (H7: (eq T t1 (lift (S O) (clen c0) +x))).(\lambda (P: Prop).(let H8 \def (eq_ind T t1 (\lambda (t0: T).(subst0 +(clen c0) t t0 (lift (S O) (clen c0) x))) H4 (lift (S O) (clen c0) x) H7) in +(subst0_gen_lift_false x t (lift (S O) (clen c0) x) (S O) (clen c0) (clen c0) +(le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt +(clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_sym +(clen c0) (S O))) H8 P)))) (pr2_delta (CTail (Bind Abbr) t c0) (CSort x0) t +(clen c0) H6 t1 t1 (pr0_refl t1) (lift (S O) (clen c0) x) H4))))) H5)))) +(\lambda (H4: (eq T t1 (lift (S O) (clen c0) x))).(let H5 \def (eq_ind T t1 +(\lambda (t0: T).(\forall (t2: T).((pr2 c0 t0 t2) \to (eq T t0 t2)))) H1 +(lift (S O) (clen c0) x) H4) in (eq_ind_r T (lift (S O) (clen c0) x) (\lambda +(t0: T).(or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t0 t2) \to (eq T +t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t0 t2))))) (or_introl (\forall +(t2: T).((pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2) \to (eq T +(lift (S O) (clen c0) x) t2))) (ex2 T (\lambda (t2: T).((eq T (lift (S O) +(clen c0) x) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail +(Bind Abbr) t c0) (lift (S O) (clen c0) x) t2))) (\lambda (t2: T).(\lambda +(H6: (pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2)).(let H_x1 +\def (pr2_gen_ctail (Bind Abbr) c0 t (lift (S O) (clen c0) x) t2 H6) in (let +H7 \def H_x1 in (or_ind (pr2 c0 (lift (S O) (clen c0) x) t2) (ex3 T (\lambda +(_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) +(clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T (lift +(S O) (clen c0) x) t2) (\lambda (H8: (pr2 c0 (lift (S O) (clen c0) x) +t2)).(H5 t2 H8)) (\lambda (H8: (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind +Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: +T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abbr) +(Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda +(t0: T).(subst0 (clen c0) t t0 t2)) (eq T (lift (S O) (clen c0) x) t2) +(\lambda (x0: T).(\lambda (_: (eq K (Bind Abbr) (Bind Abbr))).(\lambda (H10: +(pr0 (lift (S O) (clen c0) x) x0)).(\lambda (H11: (subst0 (clen c0) t x0 +t2)).(ex2_ind T (\lambda (t3: T).(eq T x0 (lift (S O) (clen c0) t3))) +(\lambda (t3: T).(pr0 x t3)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x1: +T).(\lambda (H12: (eq T x0 (lift (S O) (clen c0) x1))).(\lambda (_: (pr0 x +x1)).(let H14 \def (eq_ind T x0 (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) +H11 (lift (S O) (clen c0) x1) H12) in (subst0_gen_lift_false x1 t t2 (S O) +(clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) +(\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen +c0) (S O)) (plus_sym (clen c0) (S O))) H14 (eq T (lift (S O) (clen c0) x) +t2)))))) (pr0_gen_lift x x0 (S O) (clen c0) H10)))))) H8)) H7)))))) t1 H4))) +H3))) H2))) (or_introl (\forall (t2: T).((pr2 (CTail (Bind Abst) t c0) t1 t2) +\to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abst) t c0) t1 t2))) (\lambda +(t2: T).(\lambda (H2: (pr2 (CTail (Bind Abst) t c0) t1 t2)).(let H_x0 \def +(pr2_gen_ctail (Bind Abst) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind +(pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) +(\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) +(eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T +(\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) +(\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq +K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: +T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: +(eq K (Bind Abst) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: +(subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Abst) (\lambda (ee: +K).(match ee with [(Bind b0) \Rightarrow (match b0 with [Abbr \Rightarrow +False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) +\Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) +H4)) H3)))))) (or_introl (\forall (t2: T).((pr2 (CTail (Bind Void) t c0) t1 +t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Void) t c0) t1 t2))) (\lambda +(t2: T).(\lambda (H2: (pr2 (CTail (Bind Void) t c0) t1 t2)).(let H_x0 \def +(pr2_gen_ctail (Bind Void) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind +(pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) +(\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) +(eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T +(\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) +(\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq +K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: +T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: +(eq K (Bind Void) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: +(subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Void) (\lambda (ee: +K).(match ee with [(Bind b0) \Rightarrow (match b0 with [Abbr \Rightarrow +False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) +\Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) +H4)) H3)))))) b)) (\lambda (f: F).(or_introl (\forall (t2: T).((pr2 (CTail +(Flat f) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 +t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Flat f) t c0) +t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Flat f) t c0) t1 +t2)).(let H_x0 \def (pr2_gen_ctail (Flat f) c0 t t1 t2 H2) in (let H3 \def +H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind +Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 +t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: +(ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 +t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: +T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: +T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: +(eq K (Flat f) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 +(clen c0) t x0 t2)).(let H8 \def (eq_ind K (Flat f) (\lambda (ee: K).(match +ee with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind +Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3))))))) k)) (\lambda +(H1: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 c0 t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) +\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)) (or (\forall +(t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t +c0) t1 t2)))) (\lambda (x: T).(\lambda (H2: (((eq T t1 x) \to (\forall (P: +Prop).P)))).(\lambda (H3: (pr2 c0 t1 x)).(or_intror (\forall (t2: T).((pr2 +(CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 +t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2))) +(ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)) x H2 (pr2_ctail c0 t1 x H3 k +t)))))) H1)) H0)))))))) c). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/defs.ma new file mode 100644 index 000000000..de146696c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/defs.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr2/defs.ma". + +definition nf2: + C \to (T \to Prop) +\def + \lambda (c: C).(\lambda (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (eq T t1 +t2)))). + +rec definition nfs2 (c: C) (ts: TList) on ts: Prop \def match ts with [TNil +\Rightarrow True | (TCons t ts0) \Rightarrow (land (nf2 c t) (nfs2 c ts0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/fwd.ma new file mode 100644 index 000000000..6173e8670 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/fwd.ma @@ -0,0 +1,173 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/nf2/defs.ma". + +include "basic_1A/pr2/clen.ma". + +include "basic_1A/subst0/dec.ma". + +include "basic_1A/T/props.ma". + +lemma nf2_gen_lref: + \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) u)) \to ((nf2 c (TLRef i)) \to (\forall (P: Prop).P)))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H0: ((\forall (t2: T).((pr2 +c (TLRef i) t2) \to (eq T (TLRef i) t2))))).(\lambda (P: +Prop).(lift_gen_lref_false (S i) O i (le_O_n i) (le_n (plus O (S i))) u (H0 +(lift (S i) O u) (pr2_delta c d u i H (TLRef i) (TLRef i) (pr0_refl (TLRef +i)) (lift (S i) O u) (subst0_lref u i))) P))))))). + +lemma nf2_gen_abst: + \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Bind Abst) u +t)) \to (land (nf2 c u) (nf2 (CHead c (Bind Abst) u) t))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: +T).((pr2 c (THead (Bind Abst) u t) t2) \to (eq T (THead (Bind Abst) u t) +t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall (t2: +T).((pr2 (CHead c (Bind Abst) u) t t2) \to (eq T t t2))) (\lambda (t2: +T).(\lambda (H0: (pr2 c u t2)).(let H1 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead +_ t0 _) \Rightarrow t0])) (THead (Bind Abst) u t) (THead (Bind Abst) t2 t) (H +(THead (Bind Abst) t2 t) (pr2_head_1 c u t2 H0 (Bind Abst) t))) in (let H2 +\def (eq_ind_r T t2 (\lambda (t0: T).(pr2 c u t0)) H0 u H1) in (eq_ind T u +(\lambda (t0: T).(eq T u t0)) (refl_equal T u) t2 H1))))) (\lambda (t2: +T).(\lambda (H0: (pr2 (CHead c (Bind Abst) u) t t2)).(let H1 \def (f_equal T +T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef _) +\Rightarrow t | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) u t) +(THead (Bind Abst) u t2) (H (THead (Bind Abst) u t2) (let H_y \def +(pr2_gen_cbind Abst c u t t2 H0) in H_y))) in (let H2 \def (eq_ind_r T t2 +(\lambda (t0: T).(pr2 (CHead c (Bind Abst) u) t t0)) H0 t H1) in (eq_ind T t +(\lambda (t0: T).(eq T t t0)) (refl_equal T t) t2 H1))))))))). + +lemma nf2_gen_cast: + \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Flat Cast) u +t)) \to (\forall (P: Prop).P)))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (nf2 c (THead +(Flat Cast) u t))).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) u t (H t +(pr2_free c (THead (Flat Cast) u t) t (pr0_tau t t (pr0_refl t) u))) P))))). + +lemma nf2_gen_beta: + \forall (c: C).(\forall (u: T).(\forall (v: T).(\forall (t: T).((nf2 c +(THead (Flat Appl) u (THead (Bind Abst) v t))) \to (\forall (P: Prop).P))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (t: T).(\lambda (H: +((\forall (t2: T).((pr2 c (THead (Flat Appl) u (THead (Bind Abst) v t)) t2) +\to (eq T (THead (Flat Appl) u (THead (Bind Abst) v t)) t2))))).(\lambda (P: +Prop).(let H0 \def (eq_ind T (THead (Flat Appl) u (THead (Bind Abst) v t)) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u t) +(H (THead (Bind Abbr) u t) (pr2_free c (THead (Flat Appl) u (THead (Bind +Abst) v t)) (THead (Bind Abbr) u t) (pr0_beta v u u (pr0_refl u) t t +(pr0_refl t))))) in (False_ind P H0))))))). + +lemma nf2_gen_flat: + \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c +(THead (Flat f) u t)) \to (land (nf2 c u) (nf2 c t)))))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +((\forall (t2: T).((pr2 c (THead (Flat f) u t) t2) \to (eq T (THead (Flat f) +u t) t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall +(t2: T).((pr2 c t t2) \to (eq T t t2))) (\lambda (t2: T).(\lambda (H0: (pr2 c +u t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t0 _) \Rightarrow t0])) +(THead (Flat f) u t) (THead (Flat f) t2 t) (H (THead (Flat f) t2 t) +(pr2_head_1 c u t2 H0 (Flat f) t))) in H1))) (\lambda (t2: T).(\lambda (H0: +(pr2 c t t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t0) \Rightarrow t0])) +(THead (Flat f) u t) (THead (Flat f) u t2) (H (THead (Flat f) u t2) +(pr2_head_2 c u t t2 (Flat f) (pr2_cflat c t t2 H0 f u)))) in H1)))))))). + +fact nf2_gen__nf2_gen_aux: + \forall (b: B).(\forall (x: T).(\forall (u: T).(\forall (d: nat).((eq T +(THead (Bind b) u (lift (S O) d x)) x) \to (\forall (P: Prop).P))))) +\def + \lambda (b: B).(\lambda (x: T).(T_ind (\lambda (t: T).(\forall (u: +T).(\forall (d: nat).((eq T (THead (Bind b) u (lift (S O) d t)) t) \to +(\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (d: +nat).(\lambda (H: (eq T (THead (Bind b) u (lift (S O) d (TSort n))) (TSort +n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead (Bind b) u (lift (S O) +d (TSort n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) +H) in (False_ind P H0))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (d: +nat).(\lambda (H: (eq T (THead (Bind b) u (lift (S O) d (TLRef n))) (TLRef +n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead (Bind b) u (lift (S O) +d (TLRef n))) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) +H) in (False_ind P H0))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: +((\forall (u: T).(\forall (d: nat).((eq T (THead (Bind b) u (lift (S O) d t)) +t) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda (H0: ((\forall +(u: T).(\forall (d: nat).((eq T (THead (Bind b) u (lift (S O) d t0)) t0) \to +(\forall (P: Prop).P)))))).(\lambda (u: T).(\lambda (d: nat).(\lambda (H1: +(eq T (THead (Bind b) u (lift (S O) d (THead k t t0))) (THead k t +t0))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e +with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | +(THead k0 _ _) \Rightarrow k0])) (THead (Bind b) u (lift (S O) d (THead k t +t0))) (THead k t t0) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t1 _) +\Rightarrow t1])) (THead (Bind b) u (lift (S O) d (THead k t t0))) (THead k t +t0) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow (THead k (lref_map (\lambda (x0: nat).(plus x0 (S O))) d t) +(lref_map (\lambda (x0: nat).(plus x0 (S O))) (s k d) t0)) | (TLRef _) +\Rightarrow (THead k (lref_map (\lambda (x0: nat).(plus x0 (S O))) d t) +(lref_map (\lambda (x0: nat).(plus x0 (S O))) (s k d) t0)) | (THead _ _ t1) +\Rightarrow t1])) (THead (Bind b) u (lift (S O) d (THead k t t0))) (THead k t +t0) H1) in (\lambda (_: (eq T u t)).(\lambda (H6: (eq K (Bind b) k)).(let H7 +\def (eq_ind_r K k (\lambda (k0: K).(eq T (lift (S O) d (THead k0 t t0)) t0)) +H4 (Bind b) H6) in (let H8 \def (eq_ind T (lift (S O) d (THead (Bind b) t +t0)) (\lambda (t1: T).(eq T t1 t0)) H7 (THead (Bind b) (lift (S O) d t) (lift +(S O) (S d) t0)) (lift_bind b t t0 (S O) d)) in (H0 (lift (S O) d t) (S d) H8 +P)))))) H3)) H2))))))))))) x)). + +lemma nf2_gen_abbr: + \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Bind Abbr) u +t)) \to (\forall (P: Prop).P)))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: +T).((pr2 c (THead (Bind Abbr) u t) t2) \to (eq T (THead (Bind Abbr) u t) +t2))))).(\lambda (P: Prop).(let H_x \def (dnf_dec u t O) in (let H0 \def H_x +in (ex_ind T (\lambda (v: T).(or (subst0 O u t (lift (S O) O v)) (eq T t +(lift (S O) O v)))) P (\lambda (x: T).(\lambda (H1: (or (subst0 O u t (lift +(S O) O x)) (eq T t (lift (S O) O x)))).(or_ind (subst0 O u t (lift (S O) O +x)) (eq T t (lift (S O) O x)) P (\lambda (H2: (subst0 O u t (lift (S O) O +x))).(let H3 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t0) \Rightarrow t0])) +(THead (Bind Abbr) u t) (THead (Bind Abbr) u (lift (S O) O x)) (H (THead +(Bind Abbr) u (lift (S O) O x)) (pr2_free c (THead (Bind Abbr) u t) (THead +(Bind Abbr) u (lift (S O) O x)) (pr0_delta u u (pr0_refl u) t t (pr0_refl t) +(lift (S O) O x) H2)))) in (let H4 \def (eq_ind T t (\lambda (t0: T).(subst0 +O u t0 (lift (S O) O x))) H2 (lift (S O) O x) H3) in (subst0_refl u (lift (S +O) O x) O H4 P)))) (\lambda (H2: (eq T t (lift (S O) O x))).(let H3 \def +(eq_ind T t (\lambda (t0: T).(\forall (t2: T).((pr2 c (THead (Bind Abbr) u +t0) t2) \to (eq T (THead (Bind Abbr) u t0) t2)))) H (lift (S O) O x) H2) in +(nf2_gen__nf2_gen_aux Abbr x u O (H3 x (pr2_free c (THead (Bind Abbr) u (lift +(S O) O x)) x (pr0_zeta Abbr not_abbr_abst x x (pr0_refl x) u))) P))) H1))) +H0))))))). + +lemma nf2_gen_void: + \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Bind Void) u +(lift (S O) O t))) \to (\forall (P: Prop).P)))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: +T).((pr2 c (THead (Bind Void) u (lift (S O) O t)) t2) \to (eq T (THead (Bind +Void) u (lift (S O) O t)) t2))))).(\lambda (P: Prop).(nf2_gen__nf2_gen_aux +Void t u O (H t (pr2_free c (THead (Bind Void) u (lift (S O) O t)) t +(pr0_zeta Void not_void_abst t t (pr0_refl t) u))) P))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/iso.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/iso.ma new file mode 100644 index 000000000..84c0293ee --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/iso.ma @@ -0,0 +1,125 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/nf2/pr3.ma". + +include "basic_1A/iso/props.ma". + +lemma nf2_iso_appls_lref: + \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (vs: +TList).(\forall (u: T).((pr3 c (THeads (Flat Appl) vs (TLRef i)) u) \to (iso +(THeads (Flat Appl) vs (TLRef i)) u)))))) +\def + \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda +(vs: TList).(TList_ind (\lambda (t: TList).(\forall (u: T).((pr3 c (THeads +(Flat Appl) t (TLRef i)) u) \to (iso (THeads (Flat Appl) t (TLRef i)) u)))) +(\lambda (u: T).(\lambda (H0: (pr3 c (TLRef i) u)).(let H_y \def +(nf2_pr3_unfold c (TLRef i) u H0 H) in (let H1 \def (eq_ind_r T u (\lambda +(t: T).(pr3 c (TLRef i) t)) H0 (TLRef i) H_y) in (eq_ind T (TLRef i) (\lambda +(t: T).(iso (TLRef i) t)) (iso_refl (TLRef i)) u H_y))))) (\lambda (t: +T).(\lambda (t0: TList).(\lambda (H0: ((\forall (u: T).((pr3 c (THeads (Flat +Appl) t0 (TLRef i)) u) \to (iso (THeads (Flat Appl) t0 (TLRef i)) +u))))).(\lambda (u: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads +(Flat Appl) t0 (TLRef i))) u)).(let H2 \def (pr3_gen_appl c t (THeads (Flat +Appl) t0 (TLRef i)) u H1) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T u (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) +t0 (TLRef i)) t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) u))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat +Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u0: +T).(pr3 (CHead c (Bind b) u0) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat +Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: +T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +u))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2)))))))) (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef +i))) u) (\lambda (H3: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T u +(THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) +t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T u (THead (Flat +Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2))) (iso +(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) u) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H4: (eq T u (THead (Flat Appl) x0 +x1))).(\lambda (_: (pr3 c t x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) t0 +(TLRef i)) x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t1: T).(iso +(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t1)) (iso_head t x0 +(THeads (Flat Appl) t0 (TLRef i)) x1 (Flat Appl)) u H4)))))) H3)) (\lambda +(H3: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t2: T).(pr3 c (THead (Bind Abbr) u2 t2) u))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat +Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u0: +T).(pr3 (CHead c (Bind b) u0) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u2 t2) u))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c t u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t2: T).(\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) u0) z1 +t2))))))) (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) u) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda +(_: (pr3 c (THead (Bind Abbr) x2 x3) u)).(\lambda (_: (pr3 c t x2)).(\lambda +(H6: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) x0 +x1))).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) +u0) x1 x3))))).(let H_y \def (H0 (THead (Bind Abst) x0 x1) H6) in +(iso_flats_lref_bind_false Appl Abst i x0 x1 t0 H_y (iso (THead (Flat Appl) t +(THeads (Flat Appl) t0 (TLRef i))) u))))))))))) H3)) (\lambda (H3: (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2)) u))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 +(CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat +Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: +T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +u))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2))))))) (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) +u) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 +Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind +x0) x1 x2))).(\lambda (_: (pr3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift +(S O) O x4) x3)) u)).(\lambda (_: (pr3 c t x4)).(\lambda (_: (pr3 c x1 +x5)).(\lambda (_: (pr3 (CHead c (Bind x0) x5) x2 x3)).(let H_y \def (H0 +(THead (Bind x0) x1 x2) H5) in (iso_flats_lref_bind_false Appl x0 i x1 x2 t0 +H_y (iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) +u))))))))))))))) H3)) H2))))))) vs)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/lift1.ma new file mode 100644 index 000000000..99d265419 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/lift1.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/nf2/props.ma". + +include "basic_1A/drop1/fwd.ma". + +lemma nf2_lift1: + \forall (e: C).(\forall (hds: PList).(\forall (c: C).(\forall (t: T).((drop1 +hds c e) \to ((nf2 e t) \to (nf2 c (lift1 hds t))))))) +\def + \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(c: C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p +t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c +e)).(\lambda (H0: (nf2 e t)).(let H_y \def (drop1_gen_pnil c e H) in +(eq_ind_r C e (\lambda (c0: C).(nf2 c0 t)) H0 c H_y)))))) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: +C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p +t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) +c e)).(\lambda (H1: (nf2 e t)).(let H_x \def (drop1_gen_pcons c e p n n0 H0) +in (let H2 \def H_x in (ex2_ind C (\lambda (c2: C).(drop n n0 c c2)) (\lambda +(c2: C).(drop1 p c2 e)) (nf2 c (lift n n0 (lift1 p t))) (\lambda (x: +C).(\lambda (H3: (drop n n0 c x)).(\lambda (H4: (drop1 p x e)).(nf2_lift x +(lift1 p t) (H x t H4 H1) c n n0 H3)))) H2))))))))))) hds)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/pr3.ma new file mode 100644 index 000000000..962d57b44 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/pr3.ma @@ -0,0 +1,50 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/nf2/defs.ma". + +include "basic_1A/pr3/pr3.ma". + +lemma nf2_pr3_unfold: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to ((nf2 c +t1) \to (eq T t1 t2))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).((nf2 c t) \to (eq T t +t0)))) (\lambda (t: T).(\lambda (H0: (nf2 c t)).(H0 t (pr2_free c t t +(pr0_refl t))))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c t3 +t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: (((nf2 c t0) +\to (eq T t0 t4)))).(\lambda (H3: (nf2 c t3)).(let H4 \def H3 in (let H5 \def +(eq_ind T t3 (\lambda (t: T).(nf2 c t)) H3 t0 (H4 t0 H0)) in (let H6 \def +(eq_ind T t3 (\lambda (t: T).(pr2 c t t0)) H0 t0 (H4 t0 H0)) in (eq_ind_r T +t0 (\lambda (t: T).(eq T t t4)) (H2 H5) t3 (H4 t0 H0)))))))))))) t1 t2 H)))). + +theorem nf2_pr3_confluence: + \forall (c: C).(\forall (t1: T).((nf2 c t1) \to (\forall (t2: T).((nf2 c t2) +\to (\forall (t: T).((pr3 c t t1) \to ((pr3 c t t2) \to (eq T t1 t2)))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (H: (nf2 c t1)).(\lambda (t2: +T).(\lambda (H0: (nf2 c t2)).(\lambda (t: T).(\lambda (H1: (pr3 c t +t1)).(\lambda (H2: (pr3 c t t2)).(ex2_ind T (\lambda (t0: T).(pr3 c t2 t0)) +(\lambda (t0: T).(pr3 c t1 t0)) (eq T t1 t2) (\lambda (x: T).(\lambda (H3: +(pr3 c t2 x)).(\lambda (H4: (pr3 c t1 x)).(let H_y \def (nf2_pr3_unfold c t1 +x H4 H) in (let H5 \def (eq_ind_r T x (\lambda (t0: T).(pr3 c t1 t0)) H4 t1 +H_y) in (let H6 \def (eq_ind_r T x (\lambda (t0: T).(pr3 c t2 t0)) H3 t1 H_y) +in (let H_y0 \def (nf2_pr3_unfold c t2 t1 H6 H0) in (let H7 \def (eq_ind T t2 +(\lambda (t0: T).(pr3 c t0 t1)) H6 t1 H_y0) in (eq_ind_r T t1 (\lambda (t0: +T).(eq T t1 t0)) (refl_equal T t1) t2 H_y0))))))))) (pr3_confluence c t t2 H2 +t1 H1))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/nf2/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/nf2/props.ma new file mode 100644 index 000000000..61c1e8eaa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/nf2/props.ma @@ -0,0 +1,309 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/nf2/defs.ma". + +include "basic_1A/pr2/fwd.ma". + +lemma nf2_sort: + \forall (c: C).(\forall (n: nat).(nf2 c (TSort n))) +\def + \lambda (c: C).(\lambda (n: nat).(\lambda (t2: T).(\lambda (H: (pr2 c (TSort +n) t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal +T (TSort n)) t2 (pr2_gen_sort c t2 n H))))). + +lemma nf2_csort_lref: + \forall (n: nat).(\forall (i: nat).(nf2 (CSort n) (TLRef i))) +\def + \lambda (n: nat).(\lambda (i: nat).(\lambda (t2: T).(\lambda (H: (pr2 (CSort +n) (TLRef i) t2)).(let H0 \def (pr2_gen_lref (CSort n) t2 i H) in (or_ind (eq +T t2 (TLRef i)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i (CSort n) +(CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S +i) O u))))) (eq T (TLRef i) t2) (\lambda (H1: (eq T t2 (TLRef i))).(eq_ind_r +T (TLRef i) (\lambda (t: T).(eq T (TLRef i) t)) (refl_equal T (TLRef i)) t2 +H1)) (\lambda (H1: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i (CSort +n) (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift +(S i) O u)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i (CSort +n) (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift +(S i) O u)))) (eq T (TLRef i) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H2: (getl i (CSort n) (CHead x0 (Bind Abbr) x1))).(\lambda (H3: (eq T t2 +(lift (S i) O x1))).(eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(eq T +(TLRef i) t)) (getl_gen_sort n i (CHead x0 (Bind Abbr) x1) H2 (eq T (TLRef i) +(lift (S i) O x1))) t2 H3))))) H1)) H0))))). + +theorem nf2_abst: + \forall (c: C).(\forall (u: T).((nf2 c u) \to (\forall (b: B).(\forall (v: +T).(\forall (t: T).((nf2 (CHead c (Bind b) v) t) \to (nf2 c (THead (Bind +Abst) u t)))))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (H: ((\forall (t2: T).((pr2 c u t2) +\to (eq T u t2))))).(\lambda (b: B).(\lambda (v: T).(\lambda (t: T).(\lambda +(H0: ((\forall (t2: T).((pr2 (CHead c (Bind b) v) t t2) \to (eq T t +t2))))).(\lambda (t2: T).(\lambda (H1: (pr2 c (THead (Bind Abst) u t) +t2)).(let H2 \def (pr2_gen_abst c u t t2 H1) in (ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) t t3))))) (eq T (THead +(Bind Abst) u t) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T t2 +(THead (Bind Abst) x0 x1))).(\lambda (H4: (pr2 c u x0)).(\lambda (H5: +((\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) t +x1))))).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(eq T (THead +(Bind Abst) u t) t0)) (f_equal3 K T T T THead (Bind Abst) (Bind Abst) u x0 t +x1 (refl_equal K (Bind Abst)) (H x0 H4) (H0 x1 (H5 b v))) t2 H3)))))) +H2)))))))))). + +theorem nf2_abst_shift: + \forall (c: C).(\forall (u: T).((nf2 c u) \to (\forall (t: T).((nf2 (CHead c +(Bind Abst) u) t) \to (nf2 c (THead (Bind Abst) u t)))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (H: ((\forall (t2: T).((pr2 c u t2) +\to (eq T u t2))))).(\lambda (t: T).(\lambda (H0: ((\forall (t2: T).((pr2 +(CHead c (Bind Abst) u) t t2) \to (eq T t t2))))).(\lambda (t2: T).(\lambda +(H1: (pr2 c (THead (Bind Abst) u t) t2)).(let H2 \def (pr2_gen_abst c u t t2 +H1) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) +u0) t t3))))) (eq T (THead (Bind Abst) u t) t2) (\lambda (x0: T).(\lambda +(x1: T).(\lambda (H3: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H4: (pr2 +c u x0)).(\lambda (H5: ((\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind +b) u0) t x1))))).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(eq T +(THead (Bind Abst) u t) t0)) (f_equal3 K T T T THead (Bind Abst) (Bind Abst) +u x0 t x1 (refl_equal K (Bind Abst)) (H x0 H4) (H0 x1 (H5 Abst u))) t2 +H3)))))) H2)))))))). + +lemma nfs2_tapp: + \forall (c: C).(\forall (t: T).(\forall (ts: TList).((nfs2 c (TApp ts t)) +\to (land (nfs2 c ts) (nf2 c t))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (ts: TList).(TList_ind (\lambda (t0: +TList).((nfs2 c (TApp t0 t)) \to (land (nfs2 c t0) (nf2 c t)))) (\lambda (H: +(land (nf2 c t) True)).(let H0 \def H in (land_ind (nf2 c t) True (land True +(nf2 c t)) (\lambda (H1: (nf2 c t)).(\lambda (_: True).(conj True (nf2 c t) I +H1))) H0))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: (((nfs2 c +(TApp t1 t)) \to (land (nfs2 c t1) (nf2 c t))))).(\lambda (H0: (land (nf2 c +t0) (nfs2 c (TApp t1 t)))).(let H1 \def H0 in (land_ind (nf2 c t0) (nfs2 c +(TApp t1 t)) (land (land (nf2 c t0) (nfs2 c t1)) (nf2 c t)) (\lambda (H2: +(nf2 c t0)).(\lambda (H3: (nfs2 c (TApp t1 t))).(let H_x \def (H H3) in (let +H4 \def H_x in (land_ind (nfs2 c t1) (nf2 c t) (land (land (nf2 c t0) (nfs2 c +t1)) (nf2 c t)) (\lambda (H5: (nfs2 c t1)).(\lambda (H6: (nf2 c t)).(conj +(land (nf2 c t0) (nfs2 c t1)) (nf2 c t) (conj (nf2 c t0) (nfs2 c t1) H2 H5) +H6))) H4))))) H1)))))) ts))). + +lemma nf2_appls_lref: + \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (vs: +TList).((nfs2 c vs) \to (nf2 c (THeads (Flat Appl) vs (TLRef i))))))) +\def + \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda +(vs: TList).(TList_ind (\lambda (t: TList).((nfs2 c t) \to (nf2 c (THeads +(Flat Appl) t (TLRef i))))) (\lambda (_: True).H) (\lambda (t: T).(\lambda +(t0: TList).(\lambda (H0: (((nfs2 c t0) \to (nf2 c (THeads (Flat Appl) t0 +(TLRef i)))))).(\lambda (H1: (land (nf2 c t) (nfs2 c t0))).(let H2 \def H1 in +(land_ind (nf2 c t) (nfs2 c t0) (nf2 c (THead (Flat Appl) t (THeads (Flat +Appl) t0 (TLRef i)))) (\lambda (H3: (nf2 c t)).(\lambda (H4: (nfs2 c +t0)).(let H_y \def (H0 H4) in (\lambda (t2: T).(\lambda (H5: (pr2 c (THead +(Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t2)).(let H6 \def +(pr2_gen_appl c t (THeads (Flat Appl) t0 (TLRef i)) t2 H5) in (or3_ind (ex3_2 +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c t u2))) (\lambda (_: T).(\lambda (t3: +T).(pr2 c (THeads (Flat Appl) t0 (TLRef i)) t3)))) (ex4_4 T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat +Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 +t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (eq T (THead (Flat Appl) t +(THeads (Flat Appl) t0 (TLRef i))) t2) (\lambda (H7: (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c t u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c +(THeads (Flat Appl) t0 (TLRef i)) t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c t u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c +(THeads (Flat Appl) t0 (TLRef i)) t3))) (eq T (THead (Flat Appl) t (THeads +(Flat Appl) t0 (TLRef i))) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H8: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H9: (pr2 c t +x0)).(\lambda (H10: (pr2 c (THeads (Flat Appl) t0 (TLRef i)) x1)).(eq_ind_r T +(THead (Flat Appl) x0 x1) (\lambda (t1: T).(eq T (THead (Flat Appl) t (THeads +(Flat Appl) t0 (TLRef i))) t1)) (let H11 \def (eq_ind_r T x1 (\lambda (t1: +T).(pr2 c (THeads (Flat Appl) t0 (TLRef i)) t1)) H10 (THeads (Flat Appl) t0 +(TLRef i)) (H_y x1 H10)) in (eq_ind T (THeads (Flat Appl) t0 (TLRef i)) +(\lambda (t1: T).(eq T (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef +i))) (THead (Flat Appl) x0 t1))) (let H12 \def (eq_ind_r T x0 (\lambda (t1: +T).(pr2 c t t1)) H9 t (H3 x0 H9)) in (eq_ind T t (\lambda (t1: T).(eq T +(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) (THead (Flat Appl) t1 +(THeads (Flat Appl) t0 (TLRef i))))) (refl_equal T (THead (Flat Appl) t +(THeads (Flat Appl) t0 (TLRef i)))) x0 (H3 x0 H9))) x1 (H_y x1 H10))) t2 +H8)))))) H7)) (\lambda (H7: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))))).(ex4_4_ind T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +z1 t3))))))) (eq T (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) +t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H8: (eq T (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) +x0 x1))).(\lambda (H9: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 +c t x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) +u) x1 x3))))).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t1: T).(eq T +(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t1)) (TList_ind +(\lambda (t1: TList).((nf2 c (THeads (Flat Appl) t1 (TLRef i))) \to ((eq T +(THeads (Flat Appl) t1 (TLRef i)) (THead (Bind Abst) x0 x1)) \to (eq T (THead +(Flat Appl) t (THeads (Flat Appl) t1 (TLRef i))) (THead (Bind Abbr) x2 +x3))))) (\lambda (_: (nf2 c (THeads (Flat Appl) TNil (TLRef i)))).(\lambda +(H13: (eq T (THeads (Flat Appl) TNil (TLRef i)) (THead (Bind Abst) x0 +x1))).(let H14 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (THead (Bind Abst) x0 x1) H13) in (False_ind (eq T +(THead (Flat Appl) t (THeads (Flat Appl) TNil (TLRef i))) (THead (Bind Abbr) +x2 x3)) H14)))) (\lambda (t1: T).(\lambda (t3: TList).(\lambda (_: (((nf2 c +(THeads (Flat Appl) t3 (TLRef i))) \to ((eq T (THeads (Flat Appl) t3 (TLRef +i)) (THead (Bind Abst) x0 x1)) \to (eq T (THead (Flat Appl) t (THeads (Flat +Appl) t3 (TLRef i))) (THead (Bind Abbr) x2 x3)))))).(\lambda (_: (nf2 c +(THeads (Flat Appl) (TCons t1 t3) (TLRef i)))).(\lambda (H13: (eq T (THeads +(Flat Appl) (TCons t1 t3) (TLRef i)) (THead (Bind Abst) x0 x1))).(let H14 +\def (eq_ind T (THead (Flat Appl) t1 (THeads (Flat Appl) t3 (TLRef i))) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x0 +x1) H13) in (False_ind (eq T (THead (Flat Appl) t (THeads (Flat Appl) (TCons +t1 t3) (TLRef i))) (THead (Bind Abbr) x2 x3)) H14))))))) t0 H_y H8) t2 +H9))))))))) H7)) (\lambda (H7: (ex6_6 B T T T T T (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not +(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) +t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c t u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (eq T (THead +(Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t2) (\lambda (x0: +B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H9: (eq T +(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind x0) x1 x2))).(\lambda (H10: +(eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) +x3)))).(\lambda (_: (pr2 c t x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: +(pr2 (CHead c (Bind x0) x5) x2 x3)).(eq_ind_r T (THead (Bind x0) x5 (THead +(Flat Appl) (lift (S O) O x4) x3)) (\lambda (t1: T).(eq T (THead (Flat Appl) +t (THeads (Flat Appl) t0 (TLRef i))) t1)) (TList_ind (\lambda (t1: +TList).((nf2 c (THeads (Flat Appl) t1 (TLRef i))) \to ((eq T (THeads (Flat +Appl) t1 (TLRef i)) (THead (Bind x0) x1 x2)) \to (eq T (THead (Flat Appl) t +(THeads (Flat Appl) t1 (TLRef i))) (THead (Bind x0) x5 (THead (Flat Appl) +(lift (S O) O x4) x3)))))) (\lambda (_: (nf2 c (THeads (Flat Appl) TNil +(TLRef i)))).(\lambda (H15: (eq T (THeads (Flat Appl) TNil (TLRef i)) (THead +(Bind x0) x1 x2))).(let H16 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ +_ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H15) in (False_ind (eq T +(THead (Flat Appl) t (THeads (Flat Appl) TNil (TLRef i))) (THead (Bind x0) x5 +(THead (Flat Appl) (lift (S O) O x4) x3))) H16)))) (\lambda (t1: T).(\lambda +(t3: TList).(\lambda (_: (((nf2 c (THeads (Flat Appl) t3 (TLRef i))) \to ((eq +T (THeads (Flat Appl) t3 (TLRef i)) (THead (Bind x0) x1 x2)) \to (eq T (THead +(Flat Appl) t (THeads (Flat Appl) t3 (TLRef i))) (THead (Bind x0) x5 (THead +(Flat Appl) (lift (S O) O x4) x3))))))).(\lambda (_: (nf2 c (THeads (Flat +Appl) (TCons t1 t3) (TLRef i)))).(\lambda (H15: (eq T (THeads (Flat Appl) +(TCons t1 t3) (TLRef i)) (THead (Bind x0) x1 x2))).(let H16 \def (eq_ind T +(THead (Flat Appl) t1 (THeads (Flat Appl) t3 (TLRef i))) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind x0) x1 x2) H15) in (False_ind (eq T +(THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t3) (TLRef i))) (THead +(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) H16))))))) t0 H_y H9) +t2 H10))))))))))))) H7)) H6))))))) H2)))))) vs)))). + +theorem nf2_appl_lref: + \forall (c: C).(\forall (u: T).((nf2 c u) \to (\forall (i: nat).((nf2 c +(TLRef i)) \to (nf2 c (THead (Flat Appl) u (TLRef i))))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (H: (nf2 c u)).(\lambda (i: +nat).(\lambda (H0: (nf2 c (TLRef i))).(let H_y \def (nf2_appls_lref c i H0 +(TCons u TNil)) in (H_y (conj (nf2 c u) True H I))))))). + +lemma nf2_lref_abst: + \forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c +(CHead e (Bind Abst) u)) \to (nf2 c (TLRef i)))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead e (Bind Abst) u))).(\lambda (t2: T).(\lambda (H0: (pr2 c +(TLRef i) t2)).(let H1 \def (pr2_gen_lref c t2 i H0) in (or_ind (eq T t2 +(TLRef i)) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c (CHead d +(Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift (S i) O +u0))))) (eq T (TLRef i) t2) (\lambda (H2: (eq T t2 (TLRef i))).(eq_ind_r T +(TLRef i) (\lambda (t: T).(eq T (TLRef i) t)) (refl_equal T (TLRef i)) t2 +H2)) (\lambda (H2: (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c +(CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift +(S i) O u0)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u0: T).(getl i c +(CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift +(S i) O u0)))) (eq T (TLRef i) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H3: (getl i c (CHead x0 (Bind Abbr) x1))).(\lambda (H4: (eq T t2 (lift (S i) +O x1))).(eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(eq T (TLRef i) t)) +(let H5 \def (eq_ind C (CHead e (Bind Abst) u) (\lambda (c0: C).(getl i c +c0)) H (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e (Bind Abst) u) i H +(CHead x0 (Bind Abbr) x1) H3)) in (let H6 \def (eq_ind C (CHead e (Bind Abst) +u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k +_) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e +(Bind Abst) u) i H (CHead x0 (Bind Abbr) x1) H3)) in (False_ind (eq T (TLRef +i) (lift (S i) O x1)) H6))) t2 H4))))) H2)) H1)))))))). + +lemma nf2_lift: + \forall (d: C).(\forall (t: T).((nf2 d t) \to (\forall (c: C).(\forall (h: +nat).(\forall (i: nat).((drop h i c d) \to (nf2 c (lift h i t)))))))) +\def + \lambda (d: C).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).((pr2 d t t2) +\to (eq T t t2))))).(\lambda (c: C).(\lambda (h: nat).(\lambda (i: +nat).(\lambda (H0: (drop h i c d)).(\lambda (t2: T).(\lambda (H1: (pr2 c +(lift h i t) t2)).(let H2 \def (pr2_gen_lift c t t2 h i H1 d H0) in (ex2_ind +T (\lambda (t3: T).(eq T t2 (lift h i t3))) (\lambda (t3: T).(pr2 d t t3)) +(eq T (lift h i t) t2) (\lambda (x: T).(\lambda (H3: (eq T t2 (lift h i +x))).(\lambda (H4: (pr2 d t x)).(eq_ind_r T (lift h i x) (\lambda (t0: T).(eq +T (lift h i t) t0)) (let H_y \def (H x H4) in (let H5 \def (eq_ind_r T x +(\lambda (t0: T).(pr2 d t t0)) H4 t H_y) in (eq_ind T t (\lambda (t0: T).(eq +T (lift h i t) (lift h i t0))) (refl_equal T (lift h i t)) x H_y))) t2 H3)))) +H2)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc1/defs.ma new file mode 100644 index 000000000..264293dc7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc1/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr1/defs.ma". + +definition pc1: + T \to (T \to Prop) +\def + \lambda (t1: T).(\lambda (t2: T).(ex2 T (\lambda (t: T).(pr1 t1 t)) (\lambda +(t: T).(pr1 t2 t)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc1/props.ma new file mode 100644 index 000000000..57a605088 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc1/props.ma @@ -0,0 +1,116 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc1/defs.ma". + +include "basic_1A/pr1/pr1.ma". + +lemma pc1_pr0_r: + \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pc1 t1 t2))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(ex_intro2 T +(\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) t2 (pr1_pr0 t1 t2 H) +(pr1_refl t2)))). + +lemma pc1_pr0_x: + \forall (t1: T).(\forall (t2: T).((pr0 t2 t1) \to (pc1 t1 t2))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t2 t1)).(ex_intro2 T +(\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) t1 (pr1_refl t1) +(pr1_pr0 t2 t1 H)))). + +lemma pc1_refl: + \forall (t: T).(pc1 t t) +\def + \lambda (t: T).(ex_intro2 T (\lambda (t0: T).(pr1 t t0)) (\lambda (t0: +T).(pr1 t t0)) t (pr1_refl t) (pr1_refl t)). + +lemma pc1_pr0_u: + \forall (t2: T).(\forall (t1: T).((pr0 t1 t2) \to (\forall (t3: T).((pc1 t2 +t3) \to (pc1 t1 t3))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pr0 t1 t2)).(\lambda (t3: +T).(\lambda (H0: (pc1 t2 t3)).(let H1 \def H0 in (ex2_ind T (\lambda (t: +T).(pr1 t2 t)) (\lambda (t: T).(pr1 t3 t)) (pc1 t1 t3) (\lambda (x: +T).(\lambda (H2: (pr1 t2 x)).(\lambda (H3: (pr1 t3 x)).(ex_intro2 T (\lambda +(t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t3 t)) x (pr1_sing t2 t1 H x H2) +H3)))) H1)))))). + +lemma pc1_s: + \forall (t2: T).(\forall (t1: T).((pc1 t1 t2) \to (pc1 t2 t1))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pc1 t1 t2)).(let H0 \def H in +(ex2_ind T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) (pc1 t2 +t1) (\lambda (x: T).(\lambda (H1: (pr1 t1 x)).(\lambda (H2: (pr1 t2 +x)).(ex_intro2 T (\lambda (t: T).(pr1 t2 t)) (\lambda (t: T).(pr1 t1 t)) x H2 +H1)))) H0)))). + +lemma pc1_head_1: + \forall (u1: T).(\forall (u2: T).((pc1 u1 u2) \to (\forall (t: T).(\forall +(k: K).(pc1 (THead k u1 t) (THead k u2 t)))))) +\def + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc1 u1 u2)).(\lambda (t: +T).(\lambda (k: K).(let H0 \def H in (ex2_ind T (\lambda (t0: T).(pr1 u1 t0)) +(\lambda (t0: T).(pr1 u2 t0)) (pc1 (THead k u1 t) (THead k u2 t)) (\lambda +(x: T).(\lambda (H1: (pr1 u1 x)).(\lambda (H2: (pr1 u2 x)).(ex_intro2 T +(\lambda (t0: T).(pr1 (THead k u1 t) t0)) (\lambda (t0: T).(pr1 (THead k u2 +t) t0)) (THead k x t) (pr1_head_1 u1 x H1 t k) (pr1_head_1 u2 x H2 t k))))) +H0)))))). + +lemma pc1_head_2: + \forall (t1: T).(\forall (t2: T).((pc1 t1 t2) \to (\forall (u: T).(\forall +(k: K).(pc1 (THead k u t1) (THead k u t2)))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc1 t1 t2)).(\lambda (u: +T).(\lambda (k: K).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr1 t1 t)) +(\lambda (t: T).(pr1 t2 t)) (pc1 (THead k u t1) (THead k u t2)) (\lambda (x: +T).(\lambda (H1: (pr1 t1 x)).(\lambda (H2: (pr1 t2 x)).(ex_intro2 T (\lambda +(t: T).(pr1 (THead k u t1) t)) (\lambda (t: T).(pr1 (THead k u t2) t)) (THead +k u x) (pr1_head_2 t1 x H1 u k) (pr1_head_2 t2 x H2 u k))))) H0)))))). + +theorem pc1_t: + \forall (t2: T).(\forall (t1: T).((pc1 t1 t2) \to (\forall (t3: T).((pc1 t2 +t3) \to (pc1 t1 t3))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pc1 t1 t2)).(\lambda (t3: +T).(\lambda (H0: (pc1 t2 t3)).(let H1 \def H0 in (ex2_ind T (\lambda (t: +T).(pr1 t2 t)) (\lambda (t: T).(pr1 t3 t)) (pc1 t1 t3) (\lambda (x: +T).(\lambda (H2: (pr1 t2 x)).(\lambda (H3: (pr1 t3 x)).(let H4 \def H in +(ex2_ind T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t)) (pc1 t1 +t3) (\lambda (x0: T).(\lambda (H5: (pr1 t1 x0)).(\lambda (H6: (pr1 t2 +x0)).(ex2_ind T (\lambda (t: T).(pr1 x0 t)) (\lambda (t: T).(pr1 x t)) (pc1 +t1 t3) (\lambda (x1: T).(\lambda (H7: (pr1 x0 x1)).(\lambda (H8: (pr1 x +x1)).(ex_intro2 T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t3 t)) x1 +(pr1_t x0 t1 H5 x1 H7) (pr1_t x t3 H3 x1 H8))))) (pr1_confluence t2 x0 H6 x +H2))))) H4))))) H1)))))). + +lemma pc1_pr0_u2: + \forall (t0: T).(\forall (t1: T).((pr0 t0 t1) \to (\forall (t2: T).((pc1 t0 +t2) \to (pc1 t1 t2))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr0 t0 t1)).(\lambda (t2: +T).(\lambda (H0: (pc1 t0 t2)).(pc1_t t0 t1 (pc1_pr0_x t1 t0 H) t2 H0))))). + +theorem pc1_head: + \forall (u1: T).(\forall (u2: T).((pc1 u1 u2) \to (\forall (t1: T).(\forall +(t2: T).((pc1 t1 t2) \to (\forall (k: K).(pc1 (THead k u1 t1) (THead k u2 +t2)))))))) +\def + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc1 u1 u2)).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H0: (pc1 t1 t2)).(\lambda (k: K).(pc1_t (THead +k u2 t1) (THead k u1 t1) (pc1_head_1 u1 u2 H t1 k) (THead k u2 t2) +(pc1_head_2 t1 t2 H0 u2 k)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/dec.ma new file mode 100644 index 000000000..55ed35fb8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/dec.ma @@ -0,0 +1,146 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/arity_props.ma". + +include "basic_1A/nf2/fwd.ma". + +theorem pc3_dec: + \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c +u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to (or (pc3 c +u1 u2) ((pc3 c u1 u2) \to False))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda +(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c +u2 t2)).(let H_y \def (ty3_sn3 g c u1 t1 H) in (let H_y0 \def (ty3_sn3 g c u2 +t2 H0) in (let H_x \def (nf2_sn3 c u1 H_y) in (let H1 \def H_x in (ex2_ind T +(\lambda (u: T).(pr3 c u1 u)) (\lambda (u: T).(nf2 c u)) (or (pc3 c u1 u2) +((pc3 c u1 u2) \to False)) (\lambda (x: T).(\lambda (H2: (pr3 c u1 +x)).(\lambda (H3: (nf2 c x)).(let H_x0 \def (nf2_sn3 c u2 H_y0) in (let H4 +\def H_x0 in (ex2_ind T (\lambda (u: T).(pr3 c u2 u)) (\lambda (u: T).(nf2 c +u)) (or (pc3 c u1 u2) ((pc3 c u1 u2) \to False)) (\lambda (x0: T).(\lambda +(H5: (pr3 c u2 x0)).(\lambda (H6: (nf2 c x0)).(let H_x1 \def (term_dec x x0) +in (let H7 \def H_x1 in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: +Prop).P)) (or (pc3 c u1 u2) ((pc3 c u1 u2) \to False)) (\lambda (H8: (eq T x +x0)).(let H9 \def (eq_ind_r T x0 (\lambda (t: T).(nf2 c t)) H6 x H8) in (let +H10 \def (eq_ind_r T x0 (\lambda (t: T).(pr3 c u2 t)) H5 x H8) in (or_introl +(pc3 c u1 u2) ((pc3 c u1 u2) \to False) (pc3_pr3_t c u1 x H2 u2 H10))))) +(\lambda (H8: (((eq T x x0) \to (\forall (P: Prop).P)))).(or_intror (pc3 c u1 +u2) ((pc3 c u1 u2) \to False) (\lambda (H9: (pc3 c u1 u2)).(let H10 \def H9 +in (ex2_ind T (\lambda (t: T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c u2 t)) +False (\lambda (x1: T).(\lambda (H11: (pr3 c u1 x1)).(\lambda (H12: (pr3 c u2 +x1)).(let H_x2 \def (pr3_confluence c u2 x0 H5 x1 H12) in (let H13 \def H_x2 +in (ex2_ind T (\lambda (t: T).(pr3 c x0 t)) (\lambda (t: T).(pr3 c x1 t)) +False (\lambda (x2: T).(\lambda (H14: (pr3 c x0 x2)).(\lambda (H15: (pr3 c x1 +x2)).(let H_y1 \def (nf2_pr3_unfold c x0 x2 H14 H6) in (let H16 \def +(eq_ind_r T x2 (\lambda (t: T).(pr3 c x1 t)) H15 x0 H_y1) in (let H17 \def +(nf2_pr3_confluence c x H3 x0 H6 u1 H2) in (H8 (H17 (pr3_t x1 u1 c H11 x0 +H16)) False))))))) H13)))))) H10))))) H7)))))) H4)))))) H1)))))))))))). + +theorem pc3_abst_dec: + \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c +u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to (or (ex4_2 +T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) +(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) +(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda +(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) +\to False)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda +(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c +u2 t2)).(let H1 \def (ty3_sn3 g c u1 t1 H) in (let H2 \def (ty3_sn3 g c u2 t2 +H0) in (let H_x \def (nf2_sn3 c u1 H1) in (let H3 \def H_x in (ex2_ind T +(\lambda (u: T).(pr3 c u1 u)) (\lambda (u: T).(nf2 c u)) (or (ex4_2 T T +(\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) +(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) +(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda +(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) +\to False))) (\lambda (x: T).(\lambda (H4: (pr3 c u1 x)).(\lambda (H5: (nf2 c +x)).(let H_x0 \def (nf2_sn3 c u2 H2) in (let H6 \def H_x0 in (ex2_ind T +(\lambda (u: T).(pr3 c u2 u)) (\lambda (u: T).(nf2 c u)) (or (ex4_2 T T +(\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) +(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) +(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda +(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) +\to False))) (\lambda (x0: T).(\lambda (H7: (pr3 c u2 x0)).(\lambda (H8: (nf2 +c x0)).(let H_x1 \def (abst_dec x x0) in (let H9 \def H_x1 in (or_ind (ex T +(\lambda (t: T).(eq T x (THead (Bind Abst) x0 t)))) (\forall (t: T).((eq T x +(THead (Bind Abst) x0 t)) \to (\forall (P: Prop).P))) (or (ex4_2 T T (\lambda +(u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) (\lambda (u: +T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) (\lambda (_: +T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c +v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) \to False))) +(\lambda (H10: (ex T (\lambda (t: T).(eq T x (THead (Bind Abst) x0 +t))))).(ex_ind T (\lambda (t: T).(eq T x (THead (Bind Abst) x0 t))) (or +(ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 +u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) +t1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: +T).(\lambda (v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind +Abst) u2 u)) \to False))) (\lambda (x1: T).(\lambda (H11: (eq T x (THead +(Bind Abst) x0 x1))).(let H12 \def (eq_ind T x (\lambda (t: T).(nf2 c t)) H5 +(THead (Bind Abst) x0 x1) H11) in (let H13 \def (eq_ind T x (\lambda (t: +T).(pr3 c u1 t)) H4 (THead (Bind Abst) x0 x1) H11) in (let H_y \def +(ty3_sred_pr3 c u1 (THead (Bind Abst) x0 x1) H13 g t1 H) in (or_introl (ex4_2 +T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead (Bind Abst) u2 u)))) +(\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind Abst) v2 u) t1))) +(\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda (_: T).(\lambda +(v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 (THead (Bind Abst) u2 u)) +\to False)) (ex4_2_intro T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 (THead +(Bind Abst) u2 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead (Bind +Abst) v2 u) t1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) (\lambda +(_: T).(\lambda (v2: T).(nf2 c v2))) x1 x0 (pc3_pr3_t c u1 (THead (Bind Abst) +x0 x1) H13 (THead (Bind Abst) u2 x1) (pr3_head_12 c u2 x0 H7 (Bind Abst) x1 +x1 (pr3_refl (CHead c (Bind Abst) x0) x1))) H_y H7 H8))))))) H10)) (\lambda +(H10: ((\forall (t: T).((eq T x (THead (Bind Abst) x0 t)) \to (\forall (P: +Prop).P))))).(or_intror (ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c u1 +(THead (Bind Abst) u2 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c (THead +(Bind Abst) v2 u) t1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c u2 v2))) +(\lambda (_: T).(\lambda (v2: T).(nf2 c v2)))) (\forall (u: T).((pc3 c u1 +(THead (Bind Abst) u2 u)) \to False)) (\lambda (u: T).(\lambda (H11: (pc3 c +u1 (THead (Bind Abst) u2 u))).(let H12 \def H11 in (ex2_ind T (\lambda (t: +T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 u) t)) False +(\lambda (x1: T).(\lambda (H13: (pr3 c u1 x1)).(\lambda (H14: (pr3 c (THead +(Bind Abst) u2 u) x1)).(ex2_ind T (\lambda (t: T).(pr3 c x1 t)) (\lambda (t: +T).(pr3 c x t)) False (\lambda (x2: T).(\lambda (H15: (pr3 c x1 x2)).(\lambda +(H16: (pr3 c x x2)).(let H_y \def (nf2_pr3_unfold c x x2 H16 H5) in (let H17 +\def (eq_ind_r T x2 (\lambda (t: T).(pr3 c x1 t)) H15 x H_y) in (let H18 \def +(pr3_gen_abst c u2 u x1 H14) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: +T).(eq T x1 (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr3 (CHead c (Bind b) u0) u t3))))) False (\lambda (x3: T).(\lambda +(x4: T).(\lambda (H19: (eq T x1 (THead (Bind Abst) x3 x4))).(\lambda (H20: +(pr3 c u2 x3)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c +(Bind b) u0) u x4))))).(let H22 \def (eq_ind T x1 (\lambda (t: T).(pr3 c t +x)) H17 (THead (Bind Abst) x3 x4) H19) in (let H23 \def (pr3_gen_abst c x3 x4 +x H22) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead +(Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c x3 u3))) +(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr3 (CHead +c (Bind b) u0) x4 t3))))) False (\lambda (x5: T).(\lambda (x6: T).(\lambda +(H24: (eq T x (THead (Bind Abst) x5 x6))).(\lambda (H25: (pr3 c x3 +x5)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) +u0) x4 x6))))).(let H27 \def (eq_ind T x (\lambda (t: T).(\forall (t0: +T).((eq T t (THead (Bind Abst) x0 t0)) \to (\forall (P: Prop).P)))) H10 +(THead (Bind Abst) x5 x6) H24) in (let H28 \def (eq_ind T x (\lambda (t: +T).(nf2 c t)) H5 (THead (Bind Abst) x5 x6) H24) in (let H29 \def +(nf2_gen_abst c x5 x6 H28) in (land_ind (nf2 c x5) (nf2 (CHead c (Bind Abst) +x5) x6) False (\lambda (H30: (nf2 c x5)).(\lambda (_: (nf2 (CHead c (Bind +Abst) x5) x6)).(let H32 \def (nf2_pr3_confluence c x0 H8 x5 H30 u2 H7) in +(H27 x6 (sym_eq T (THead (Bind Abst) x0 x6) (THead (Bind Abst) x5 x6) +(f_equal3 K T T T THead (Bind Abst) (Bind Abst) x0 x5 x6 x6 (refl_equal K +(Bind Abst)) (H32 (pr3_t x3 u2 c H20 x5 H25)) (refl_equal T x6))) False)))) +H29))))))))) H23)))))))) H18))))))) (pr3_confluence c u1 x1 H13 x H4))))) +H12)))))) H9)))))) H6)))))) H3)))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/defs.ma new file mode 100644 index 000000000..22679602b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/defs.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/defs.ma". + +definition pc3: + C \to (T \to (T \to Prop)) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(ex2 T (\lambda (t: T).(pr3 +c t1 t)) (\lambda (t: T).(pr3 c t2 t))))). + +inductive pc3_left (c: C): T \to (T \to Prop) \def +| pc3_left_r: \forall (t: T).(pc3_left c t t) +| pc3_left_ur: \forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(t3: T).((pc3_left c t2 t3) \to (pc3_left c t1 t3))))) +| pc3_left_ux: \forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(t3: T).((pc3_left c t1 t3) \to (pc3_left c t2 t3))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/fsubst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fsubst0.ma new file mode 100644 index 000000000..f8f6eb313 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fsubst0.ma @@ -0,0 +1,697 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/left.ma". + +include "basic_1A/fsubst0/fwd.ma". + +include "basic_1A/csubst0/getl.ma". + +lemma pc3_pr2_fsubst0: + \forall (c1: C).(\forall (t1: T).(\forall (t: T).((pr2 c1 t1 t) \to (\forall +(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 +t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 +c2 t2 t))))))))))) +\def + \lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (pr2 c1 t1 +t)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: +nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t0 c2 +t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t3 +t2))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: +(pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: +T).(\lambda (H1: (fsubst0 i u c t2 c2 t0)).(fsubst0_ind i u c t2 (\lambda +(c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) +\to (pc3 c0 t4 t3))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 +t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) +u))).(or_ind (pr0 t4 t3) (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: +T).(subst0 i u t3 w2))) (pc3 c t4 t3) (\lambda (H4: (pr0 t4 t3)).(pc3_pr2_r c +t4 t3 (pr2_free c t4 t3 H4))) (\lambda (H4: (ex2 T (\lambda (w2: T).(pr0 t4 +w2)) (\lambda (w2: T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 +t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)) (pc3 c t4 t3) (\lambda (x: +T).(\lambda (H5: (pr0 t4 x)).(\lambda (H6: (subst0 i u t3 x)).(pc3_pr2_u c x +t4 (pr2_free c t4 x H5) t3 (pc3_pr2_x c x t3 (pr2_delta c e u i H3 t3 t3 +(pr0_refl t3) x H6)))))) H4)) (pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl +u))))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: +C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 +(pr2_free c0 t2 t3 H0)))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 +t4)).(\lambda (c0: C).(\lambda (H3: (csubst0 i u c c0)).(\lambda (e: +C).(\lambda (H4: (getl i c (CHead e (Bind Abbr) u))).(or_ind (pr0 t4 t3) (ex2 +T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2))) (pc3 c0 +t4 t3) (\lambda (H5: (pr0 t4 t3)).(pc3_pr2_r c0 t4 t3 (pr2_free c0 t4 t3 +H5))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: +T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t4 w2)) (\lambda +(w2: T).(subst0 i u t3 w2)) (pc3 c0 t4 t3) (\lambda (x: T).(\lambda (H6: (pr0 +t4 x)).(\lambda (H7: (subst0 i u t3 x)).(pc3_pr2_u c0 x t4 (pr2_free c0 t4 x +H6) t3 (pc3_pr2_x c0 x t3 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c +c0 u H3 (CHead e (Bind Abbr) u) H4) t3 t3 (pr0_refl t3) x H7)))))) H5)) +(pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl u))))))))) c2 t0 H1)))))))))) +(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: +T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 +t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: +T).(\lambda (H3: (fsubst0 i0 u0 c t2 c2 t4)).(fsubst0_ind i0 u0 c t2 (\lambda +(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) +u0)) \to (pc3 c0 t5 t0))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t2 +t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) +u0))).(pc3_t t2 c t5 (pc3_s c t5 t2 (pc3_pr2_r c t2 t5 (pr2_delta c e u0 i0 +H5 t2 t2 (pr0_refl t2) t5 H4))) t0 (pc3_pr2_r c t2 t0 (pr2_delta c d u i H0 +t2 t3 H1 t0 H2))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c +c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) +u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def +(csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind +(getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: +(getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i +H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) +u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) +(pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda +(x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: +(subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in +((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: +(eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t5: T).(subst0 (minus i0 +(S i)) u0 t5 x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c3: +C).(getl i c0 (CHead c3 (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r +B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in +(ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S +(plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda +(H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) +i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) +(\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in +(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 +x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead +e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 +t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda +(H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 +(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda +(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind +Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S +i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda +(x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead +x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) +x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def +(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | +(CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 with +[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind +b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B +Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda +(t5: T).(getl i c0 (CHead x2 (Bind x0) t5))) H10 u H14) in (let H18 \def +(eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H11 d +H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 +(Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 +t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))))).(ex4_5_ind B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: +(subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) +u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort +_) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) +\Rightarrow t5])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in +(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def +(eq_ind_r T x3 (\lambda (t5: T).(subst0 (minus i0 (S i)) u0 t5 x4)) H11 u +H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S +i)) u0 c3 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda +(t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S +i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 +t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let +H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: +nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x +t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta +c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) +u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 +u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: +(le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c +c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: +T).(\lambda (H4: (subst0 i0 u0 t2 t5)).(\lambda (c0: C).(\lambda (H5: +(csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind +Abbr) u0))).(lt_le_e i i0 (pc3 c0 t5 t0) (\lambda (H7: (lt i i0)).(let H8 +\def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in +(or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind +Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 +(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) +u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) +(pc3 c0 t5 t0) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u2 +c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 +(CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 +t0 (pr2_delta c0 d u i H9 t2 t3 H1 t0 H2)))) (\lambda (H9: (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 +(Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda +(H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda +(e0: C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow +c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in +((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: +(eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t6: T).(subst0 (minus i0 +(S i)) u0 t6 x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: +C).(getl i c0 (CHead c3 (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r +B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in +(ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S +(plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda +(H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) +i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) +(\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in +(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c +c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 +(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 +x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead +e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23)))))))) (subst0_subst0_back +t3 t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) +(\lambda (H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C +(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) +u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t5 t0) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 +(CHead x2 (Bind x0) x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 +x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t6) +\Rightarrow t6])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in +(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def +(eq_ind_r T x3 (\lambda (t6: T).(getl i c0 (CHead x2 (Bind x0) t6))) H11 u +H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S +i)) u0 c3 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c0 (CHead x2 (Bind b) u))) H18 Abbr H16) in (pc3_pr2_u2 c0 t2 t5 +(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e +(Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 +(pr2_delta c0 x2 u i H20 t2 t3 H1 t0 H2))))))))) H14)) H13))))))))) H9)) +(\lambda (H9: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 +e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) +(pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda +(x3: T).(\lambda (x4: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead +x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) +x4))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: +(csubst0 (minus i0 (S i)) u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in +((let H16 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H10) in (\lambda (H17: (eq B Abbr x0)).(\lambda (H18: +(eq C d x1)).(let H19 \def (eq_ind_r T x3 (\lambda (t6: T).(subst0 (minus i0 +(S i)) u0 t6 x4)) H12 u H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c3: +C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H13 d H18) in (let H21 \def (eq_ind_r +B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in +(ex2_ind T (\lambda (t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S +(plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda +(H22: (subst0 i x4 t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) +i)) u0 t0 x)).(let H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) +(\lambda (n: nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in +(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c +c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 +(pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t0 (pc3_pr2_x c0 +x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead +e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24)))))))) (subst0_subst0_back +t3 t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) +H8))) (\lambda (H7: (le i0 i)).(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 +(csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 +t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i +(csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 +H2))))))))))) c2 t4 H3)))))))))))))))) c1 t1 t H)))). + +lemma pc3_pr2_fsubst0_back: + \forall (c1: C).(\forall (t: T).(\forall (t1: T).((pr2 c1 t t1) \to (\forall +(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 +t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 +c2 t t2))))))))))) +\def + \lambda (c1: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (H: (pr2 c1 t +t1)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: +nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 c2 +t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t0 +t3))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: +(pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: +T).(\lambda (H1: (fsubst0 i u c t3 c2 t0)).(fsubst0_ind i u c t3 (\lambda +(c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) +\to (pc3 c0 t2 t4))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t3 +t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) +u))).(pc3_pr2_u c t3 t2 (pr2_free c t2 t3 H0) t4 (pc3_pr2_r c t3 t4 +(pr2_delta c e u i H3 t3 t3 (pr0_refl t3) t4 H2))))))) (\lambda (c0: +C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (_: (getl i c +(CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 (pr2_free c0 t2 t3 H0)))))) +(\lambda (t4: T).(\lambda (H2: (subst0 i u t3 t4)).(\lambda (c0: C).(\lambda +(H3: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (H4: (getl i c (CHead e +(Bind Abbr) u))).(pc3_pr2_u c0 t3 t2 (pr2_free c0 t2 t3 H0) t4 (pc3_pr2_r c0 +t3 t4 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c c0 u H3 (CHead e +(Bind Abbr) u) H4) t3 t3 (pr0_refl t3) t4 H2))))))))) c2 t0 H1)))))))))) +(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: +T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 +t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: +T).(\lambda (H3: (fsubst0 i0 u0 c t0 c2 t4)).(fsubst0_ind i0 u0 c t0 (\lambda +(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) +u0)) \to (pc3 c0 t2 t5))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t0 +t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) +u0))).(pc3_t t3 c t2 (pc3_pr3_r c t2 t3 (pr3_pr2 c t2 t3 (pr2_free c t2 t3 +H1))) t5 (pc3_pr3_r c t3 t5 (pr3_sing c t0 t3 (pr2_delta c d u i H0 t3 t3 +(pr0_refl t3) t0 H2) t5 (pr3_pr2 c t0 t5 (pr2_delta c e u0 i0 H5 t0 t0 +(pr0_refl t0) t5 H4))))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c +c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) +u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def +(csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind +(getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: +(getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i +H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) +u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) +(pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda +(x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: +(subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in +((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: +(eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t5: T).(subst0 (minus i0 +(S i)) u0 t5 x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c3: +C).(getl i c0 (CHead c3 (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r +B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in +(ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S +(plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda +(H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) +i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) +(\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in +(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 +x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead +e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 +t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda +(H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 +(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda +(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind +Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S +i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda +(x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead +x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) +x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def +(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | +(CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 with +[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind +b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) \Rightarrow t5])) +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B +Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda +(t5: T).(getl i c0 (CHead x2 (Bind x0) t5))) H10 u H14) in (let H18 \def +(eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H11 d +H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 +(Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 +t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))))).(ex4_5_ind B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: +(subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) +u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort +_) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t5) +\Rightarrow t5])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in +(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def +(eq_ind_r T x3 (\lambda (t5: T).(subst0 (minus i0 (S i)) u0 t5 x4)) H11 u +H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S +i)) u0 c3 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda +(t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S +i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 +t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let +H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: +nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x +t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta +c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) +u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 +u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: +(le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c +c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: +T).(\lambda (H4: (subst0 i0 u0 t0 t5)).(\lambda (c0: C).(\lambda (H5: +(csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind +Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t5) (\lambda (H7: (lt i i0)).(let H8 +\def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in +(or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind +Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 +(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) +u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) +(pc3 c0 t2 t5) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u +c0 t3 t2 (pr2_free c0 t2 t3 H1) t5 (pc3_pr3_r c0 t3 t5 (pr3_sing c0 t0 t3 +(pr2_delta c0 d u i H9 t3 t3 (pr0_refl t3) t0 H2) t5 (pr3_pr2 c0 t0 t5 +(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e +(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))) (\lambda (H9: (ex3_4 B C +T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 +(Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda +(H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda +(e0: C).(match e0 with [(CSort _) \Rightarrow d | (CHead c3 _ _) \Rightarrow +c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in +((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: +(eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t6: T).(subst0 (minus i0 +(S i)) u0 t6 x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c3: +C).(getl i c0 (CHead c3 (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r +B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in +(ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S +(plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda +(H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) +i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) +(\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in +(pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t5 (pc3_pr2_u2 c0 +t0 x (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead +e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23) t5 (pc3_pr2_r c0 t0 t5 +(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e +(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 +t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) (\lambda +(H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 +(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda +(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind +Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S +i)) u0 e1 e2))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda +(x2: C).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead +x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) +x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def +(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | +(CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 with +[(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind +b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t6) \Rightarrow t6])) +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H16: (eq B +Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda +(t6: T).(getl i c0 (CHead x2 (Bind x0) t6))) H11 u H15) in (let H19 \def +(eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S i)) u0 c3 x2)) H12 d +H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 +(Bind b) u))) H18 Abbr H16) in (pc3_pr2_u c0 t0 t2 (pr2_delta c0 x2 u i H20 +t2 t3 H1 t0 H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge +i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) +t5 H4))))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))))).(ex4_5_ind B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t5) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H12: +(subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: (csubst0 (minus i0 (S i)) +u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort +_) \Rightarrow d | (CHead c3 _ _) \Rightarrow c3])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C B (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H16 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t6) +\Rightarrow t6])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in +(\lambda (H17: (eq B Abbr x0)).(\lambda (H18: (eq C d x1)).(let H19 \def +(eq_ind_r T x3 (\lambda (t6: T).(subst0 (minus i0 (S i)) u0 t6 x4)) H12 u +H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c3: C).(csubst0 (minus i0 (S +i)) u0 c3 x2)) H13 d H18) in (let H21 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in (ex2_ind T (\lambda +(t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S +i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda (H22: (subst0 i x4 +t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let +H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: +nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u c0 x +t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t5 (pc3_pr2_u2 c0 t0 x +(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e +(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24) t5 (pc3_pr2_r c0 t0 t5 +(pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e +(Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 +t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) H8))) +(\lambda (H7: (le i0 i)).(pc3_pr2_u c0 t0 t2 (pr2_delta c0 d u i +(csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 +H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n +i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 +H4))))))))))) c2 t4 H3)))))))))))))))) c1 t t1 H)))). + +lemma pc3_fsubst0: + \forall (c1: C).(\forall (t1: T).(\forall (t: T).((pc3 c1 t1 t) \to (\forall +(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 +t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 +c2 t2 t))))))))))) +\def + \lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (pc3 c1 t1 +t)).(pc3_ind_left c1 (\lambda (t0: T).(\lambda (t2: T).(\forall (i: +nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c1 t0 c2 +t3) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c2 t3 +t2)))))))))) (\lambda (t0: T).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: +C).(\lambda (t2: T).(\lambda (H0: (fsubst0 i u c1 t0 c2 t2)).(fsubst0_ind i u +c1 t0 (\lambda (c: C).(\lambda (t3: T).(\forall (e: C).((getl i c1 (CHead e +(Bind Abbr) u)) \to (pc3 c t3 t0))))) (\lambda (t3: T).(\lambda (H1: (subst0 +i u t0 t3)).(\lambda (e: C).(\lambda (H2: (getl i c1 (CHead e (Bind Abbr) +u))).(pc3_pr2_x c1 t3 t0 (pr2_delta c1 e u i H2 t0 t0 (pr0_refl t0) t3 +H1)))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c1 c0)).(\lambda (e: +C).(\lambda (_: (getl i c1 (CHead e (Bind Abbr) u))).(pc3_refl c0 t0))))) +(\lambda (t3: T).(\lambda (H1: (subst0 i u t0 t3)).(\lambda (c0: C).(\lambda +(H2: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H3: (getl i c1 (CHead e +(Bind Abbr) u))).(pc3_pr2_x c0 t3 t0 (pr2_delta c0 e u i (csubst0_getl_ge i i +(le_n i) c1 c0 u H2 (CHead e (Bind Abbr) u) H3) t0 t0 (pr0_refl t0) t3 +H1)))))))) c2 t2 H0))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda (H0: +(pr2 c1 t0 t2)).(\lambda (t3: T).(\lambda (H1: (pc3 c1 t2 t3)).(\lambda (H2: +((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: +T).((fsubst0 i u c1 t2 c2 t4) \to (\forall (e: C).((getl i c1 (CHead e (Bind +Abbr) u)) \to (pc3 c2 t4 t3)))))))))).(\lambda (i: nat).(\lambda (u: +T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H3: (fsubst0 i u c1 t0 c2 +t4)).(fsubst0_ind i u c1 t0 (\lambda (c: C).(\lambda (t5: T).(\forall (e: +C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c t5 t3))))) (\lambda (t5: +T).(\lambda (H4: (subst0 i u t0 t5)).(\lambda (e: C).(\lambda (H5: (getl i c1 +(CHead e (Bind Abbr) u))).(pc3_t t2 c1 t5 (pc3_pr2_fsubst0 c1 t0 t2 H0 i u c1 +t5 (fsubst0_snd i u c1 t0 t5 H4) e H5) t3 H1))))) (\lambda (c0: C).(\lambda +(H4: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H5: (getl i c1 (CHead e +(Bind Abbr) u))).(pc3_t t2 c0 t0 (pc3_pr2_fsubst0 c1 t0 t2 H0 i u c0 t0 +(fsubst0_fst i u c1 t0 c0 H4) e H5) t3 (H2 i u c0 t2 (fsubst0_fst i u c1 t2 +c0 H4) e H5)))))) (\lambda (t5: T).(\lambda (H4: (subst0 i u t0 t5)).(\lambda +(c0: C).(\lambda (H5: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H6: +(getl i c1 (CHead e (Bind Abbr) u))).(pc3_t t2 c0 t5 (pc3_pr2_fsubst0 c1 t0 +t2 H0 i u c0 t5 (fsubst0_both i u c1 t0 t5 H4 c0 H5) e H6) t3 (H2 i u c0 t2 +(fsubst0_fst i u c1 t2 c0 H5) e H6)))))))) c2 t4 H3)))))))))))) (\lambda (t0: +T).(\lambda (t2: T).(\lambda (H0: (pr2 c1 t0 t2)).(\lambda (t3: T).(\lambda +(H1: (pc3 c1 t0 t3)).(\lambda (H2: ((\forall (i: nat).(\forall (u: +T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u c1 t0 c2 t4) \to (\forall +(e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c2 t4 +t3)))))))))).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t4: +T).(\lambda (H3: (fsubst0 i u c1 t2 c2 t4)).(fsubst0_ind i u c1 t2 (\lambda +(c: C).(\lambda (t5: T).(\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) +\to (pc3 c t5 t3))))) (\lambda (t5: T).(\lambda (H4: (subst0 i u t2 +t5)).(\lambda (e: C).(\lambda (H5: (getl i c1 (CHead e (Bind Abbr) +u))).(pc3_t t0 c1 t5 (pc3_s c1 t5 t0 (pc3_pr2_fsubst0_back c1 t0 t2 H0 i u c1 +t5 (fsubst0_snd i u c1 t2 t5 H4) e H5)) t3 H1))))) (\lambda (c0: C).(\lambda +(H4: (csubst0 i u c1 c0)).(\lambda (e: C).(\lambda (H5: (getl i c1 (CHead e +(Bind Abbr) u))).(pc3_t t0 c0 t2 (pc3_s c0 t2 t0 (pc3_pr2_fsubst0_back c1 t0 +t2 H0 i u c0 t2 (fsubst0_fst i u c1 t2 c0 H4) e H5)) t3 (H2 i u c0 t0 +(fsubst0_fst i u c1 t0 c0 H4) e H5)))))) (\lambda (t5: T).(\lambda (H4: +(subst0 i u t2 t5)).(\lambda (c0: C).(\lambda (H5: (csubst0 i u c1 +c0)).(\lambda (e: C).(\lambda (H6: (getl i c1 (CHead e (Bind Abbr) +u))).(pc3_t t0 c0 t5 (pc3_s c0 t5 t0 (pc3_pr2_fsubst0_back c1 t0 t2 H0 i u c0 +t5 (fsubst0_both i u c1 t2 t5 H4 c0 H5) e H6)) t3 (H2 i u c0 t0 (fsubst0_fst +i u c1 t0 c0 H5) e H6)))))))) c2 t4 H3)))))))))))) t1 t H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fwd.ma new file mode 100644 index 000000000..775f6e069 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/fwd.ma @@ -0,0 +1,304 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/props.ma". + +lemma pc3_gen_sort: + \forall (c: C).(\forall (m: nat).(\forall (n: nat).((pc3 c (TSort m) (TSort +n)) \to (eq nat m n)))) +\def + \lambda (c: C).(\lambda (m: nat).(\lambda (n: nat).(\lambda (H: (pc3 c +(TSort m) (TSort n))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c +(TSort m) t)) (\lambda (t: T).(pr3 c (TSort n) t)) (eq nat m n) (\lambda (x: +T).(\lambda (H1: (pr3 c (TSort m) x)).(\lambda (H2: (pr3 c (TSort n) x)).(let +H3 \def (eq_ind T x (\lambda (t: T).(eq T t (TSort n))) (pr3_gen_sort c x n +H2) (TSort m) (pr3_gen_sort c x m H1)) in (let H4 \def (f_equal T nat +(\lambda (e: T).(match e with [(TSort n0) \Rightarrow n0 | (TLRef _) +\Rightarrow m | (THead _ _ _) \Rightarrow m])) (TSort m) (TSort n) H3) in +H4))))) H0))))). + +lemma pc3_gen_abst: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).(\forall (t1: T).(\forall +(t2: T).((pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2)) \to +(land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) +t1 t2))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (H: (pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 +t2))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Abst) +u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (land (pc3 c +u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) +(\lambda (x: T).(\lambda (H1: (pr3 c (THead (Bind Abst) u1 t1) x)).(\lambda +(H2: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H3 \def (pr3_gen_abst c u2 t2 +x H2) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead +(Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) +(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead +c (Bind b) u) t2 t3))))) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: +T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H4: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H5: (pr3 c u2 +x0)).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +t2 x1))))).(let H7 \def (pr3_gen_abst c u1 t1 x H1) in (ex3_2_ind T T +(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t3))))) +(land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) +t1 t2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H8: (eq T x (THead +(Bind Abst) x2 x3))).(\lambda (H9: (pr3 c u1 x2)).(\lambda (H10: ((\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 x3))))).(let H11 \def +(eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Abst) x0 x1))) H4 (THead +(Bind Abst) x2 x3) H8) in (let H12 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ t _) +\Rightarrow t])) (THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in +((let H13 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x3 | (TLRef _) \Rightarrow x3 | (THead _ _ t) \Rightarrow t])) +(THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in (\lambda (H14: +(eq T x2 x0)).(let H15 \def (eq_ind T x3 (\lambda (t: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t)))) H10 x1 H13) in (let H16 +\def (eq_ind T x2 (\lambda (t: T).(pr3 c u1 t)) H9 x0 H14) in (conj (pc3 c u1 +u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2))) +(pc3_pr3_t c u1 x0 H16 u2 H5) (\lambda (b: B).(\lambda (u: T).(pc3_pr3_t +(CHead c (Bind b) u) t1 x1 (H15 b u) t2 (H6 b u))))))))) H12)))))))) +H7))))))) H3))))) H0))))))). + +lemma pc3_gen_abst_shift: + \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).((pc3 c +(THead (Bind Abst) u t1) (THead (Bind Abst) u t2)) \to (pc3 (CHead c (Bind +Abst) u) t1 t2))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pc3 c (THead (Bind Abst) u t1) (THead (Bind Abst) u t2))).(let H_x \def +(pc3_gen_abst c u u t1 t2 H) in (let H0 \def H_x in (land_ind (pc3 c u u) +(\forall (b: B).(\forall (u0: T).(pc3 (CHead c (Bind b) u0) t1 t2))) (pc3 +(CHead c (Bind Abst) u) t1 t2) (\lambda (_: (pc3 c u u)).(\lambda (H2: +((\forall (b: B).(\forall (u0: T).(pc3 (CHead c (Bind b) u0) t1 t2))))).(H2 +Abst u))) H0))))))). + +lemma pc3_gen_lift: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (h: nat).(\forall +(d: nat).((pc3 c (lift h d t1) (lift h d t2)) \to (\forall (e: C).((drop h d +c e) \to (pc3 e t1 t2)))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (H: (pc3 c (lift h d t1) (lift h d t2))).(\lambda (e: +C).(\lambda (H0: (drop h d c e)).(let H1 \def H in (ex2_ind T (\lambda (t: +T).(pr3 c (lift h d t1) t)) (\lambda (t: T).(pr3 c (lift h d t2) t)) (pc3 e +t1 t2) (\lambda (x: T).(\lambda (H2: (pr3 c (lift h d t1) x)).(\lambda (H3: +(pr3 c (lift h d t2) x)).(let H4 \def (pr3_gen_lift c t2 x h d H3 e H0) in +(ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr3 e +t2 t3)) (pc3 e t1 t2) (\lambda (x0: T).(\lambda (H5: (eq T x (lift h d +x0))).(\lambda (H6: (pr3 e t2 x0)).(let H7 \def (pr3_gen_lift c t1 x h d H2 e +H0) in (ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: +T).(pr3 e t1 t3)) (pc3 e t1 t2) (\lambda (x1: T).(\lambda (H8: (eq T x (lift +h d x1))).(\lambda (H9: (pr3 e t1 x1)).(let H10 \def (eq_ind T x (\lambda (t: +T).(eq T t (lift h d x0))) H5 (lift h d x1) H8) in (let H11 \def (eq_ind T x1 +(\lambda (t: T).(pr3 e t1 t)) H9 x0 (lift_inj x1 x0 h d H10)) in (pc3_pr3_t e +t1 x0 H11 t2 H6)))))) H7))))) H4))))) H1))))))))). + +lemma pc3_gen_not_abst: + \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (t1: +T).(\forall (t2: T).(\forall (u1: T).(\forall (u2: T).((pc3 c (THead (Bind b) +u1 t1) (THead (Bind Abst) u2 t2)) \to (pc3 (CHead c (Bind b) u1) t1 (lift (S +O) O (THead (Bind Abst) u2 t2)))))))))) +\def + \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall +(c: C).(\forall (t1: T).(\forall (t2: T).(\forall (u1: T).(\forall (u2: +T).((pc3 c (THead (Bind b0) u1 t1) (THead (Bind Abst) u2 t2)) \to (pc3 (CHead +c (Bind b0) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))))))))))) (\lambda +(_: (not (eq B Abbr Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Abbr) +u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: +T).(pr3 c (THead (Bind Abbr) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind +Abst) u2 t2) t)) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind +Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Abbr) u1 t1) +x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def +(pr3_gen_abbr c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda +(t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) +u1) t1 t3)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (pc3 (CHead +c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (H5: +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3))))).(ex3_2_ind T T +(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda +(t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3))) (pc3 (CHead c (Bind Abbr) u1) +t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H6: (eq T x (THead (Bind Abbr) x0 x1))).(\lambda (_: (pr3 c u1 +x0)).(\lambda (_: (pr3 (CHead c (Bind Abbr) u1) t1 x1)).(let H9 \def +(pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: +T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 +c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: +T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Abbr) u1) t1 +(lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: +T).(\lambda (H10: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 +x2)).(\lambda (_: ((\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) +u) t2 x3))))).(let H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind +Abbr) x0 x1))) H6 (THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T +(THead (Bind Abst) x2 x3) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind b0) \Rightarrow (match b0 with [Abbr \Rightarrow False | +Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow +False])])) I (THead (Bind Abbr) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind +Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) +H5)) (\lambda (H5: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))).(let +H6 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: +T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c +(Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 +x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda (H9: ((\forall (b0: B).(\forall +(u: T).(pr3 (CHead c (Bind b0) u) t2 x1))))).(let H10 \def (eq_ind T x +(\lambda (t: T).(pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O t))) H5 (THead +(Bind Abst) x0 x1) H7) in (pc3_pr3_t (CHead c (Bind Abbr) u1) t1 (lift (S O) +O (THead (Bind Abst) x0 x1)) H10 (lift (S O) O (THead (Bind Abst) u2 t2)) +(pr3_lift (CHead c (Bind Abbr) u1) c (S O) O (drop_drop (Bind Abbr) O c c +(drop_refl c) u1) (THead (Bind Abst) u2 t2) (THead (Bind Abst) x0 x1) +(pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 Abst x0)))))))))) H6))) H4))))) +H1))))))))) (\lambda (H: (not (eq B Abst Abst))).(\lambda (c: C).(\lambda +(t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pc3 +c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def (match +(H (refl_equal B Abst)) in False with []) in H1)))))))) (\lambda (_: (not (eq +B Void Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Void) u1 t1) +(THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: +T).(pr3 c (THead (Bind Void) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind +Abst) u2 t2) t)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind +Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Void) u1 t1) +x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def +(pr3_gen_void c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda +(t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall +(u: T).(pr3 (CHead c (Bind b0) u) t1 t3)))))) (pr3 (CHead c (Bind Void) u1) +t1 (lift (S O) O x)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead +(Bind Abst) u2 t2))) (\lambda (H5: (ex3_2 T T (\lambda (u3: T).(\lambda (t3: +T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 +c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: +T).(pr3 (CHead c (Bind b0) u) t1 t3))))))).(ex3_2_ind T T (\lambda (u3: +T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t3))))) (pc3 (CHead c +(Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H6: (eq T x (THead (Bind Void) x0 +x1))).(\lambda (_: (pr3 c u1 x0)).(\lambda (_: ((\forall (b0: B).(\forall (u: +T).(pr3 (CHead c (Bind b0) u) t1 x1))))).(let H9 \def (pr3_gen_abst c u2 t2 x +H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind +Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) +u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind +Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq T x +(THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 x2)).(\lambda (_: +((\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 x3))))).(let +H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Void) x0 x1))) H6 +(THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T (THead (Bind Abst) +x2 x3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef +_) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind b0) +\Rightarrow (match b0 with [Abbr \Rightarrow False | Abst \Rightarrow True | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind +Void) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) +O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) H5)) (\lambda (H5: (pr3 +(CHead c (Bind Void) u1) t1 (lift (S O) O x))).(let H6 \def (pr3_gen_abst c +u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x +(THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) +(\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead +c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O +(THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: +(eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda +(H9: ((\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 +x1))))).(let H10 \def (eq_ind T x (\lambda (t: T).(pr3 (CHead c (Bind Void) +u1) t1 (lift (S O) O t))) H5 (THead (Bind Abst) x0 x1) H7) in (pc3_pr3_t +(CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) x0 x1)) H10 +(lift (S O) O (THead (Bind Abst) u2 t2)) (pr3_lift (CHead c (Bind Void) u1) c +(S O) O (drop_drop (Bind Void) O c c (drop_refl c) u1) (THead (Bind Abst) u2 +t2) (THead (Bind Abst) x0 x1) (pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 +Abst x0)))))))))) H6))) H4))))) H1))))))))) b). + +lemma pc3_gen_lift_abst: + \forall (c: C).(\forall (t: T).(\forall (t2: T).(\forall (u2: T).(\forall +(h: nat).(\forall (d: nat).((pc3 c (lift h d t) (THead (Bind Abst) u2 t2)) +\to (\forall (e: C).((drop h d c e) \to (ex3_2 T T (\lambda (u1: T).(\lambda +(t1: T).(pr3 e t (THead (Bind Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: +T).(pr3 c u2 (lift h d u1)))) (\lambda (_: T).(\lambda (t1: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) +t1))))))))))))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda +(h: nat).(\lambda (d: nat).(\lambda (H: (pc3 c (lift h d t) (THead (Bind +Abst) u2 t2))).(\lambda (e: C).(\lambda (H0: (drop h d c e)).(let H1 \def H +in (ex2_ind T (\lambda (t0: T).(pr3 c (lift h d t) t0)) (\lambda (t0: T).(pr3 +c (THead (Bind Abst) u2 t2) t0)) (ex3_2 T T (\lambda (u1: T).(\lambda (t1: +T).(pr3 e t (THead (Bind Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: +T).(pr3 c u2 (lift h d u1)))) (\lambda (_: T).(\lambda (t1: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) t1))))))) +(\lambda (x: T).(\lambda (H2: (pr3 c (lift h d t) x)).(\lambda (H3: (pr3 c +(THead (Bind Abst) u2 t2) x)).(let H4 \def (pr3_gen_lift c t x h d H2 e H0) +in (ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr3 +e t t3)) (ex3_2 T T (\lambda (u1: T).(\lambda (t1: T).(pr3 e t (THead (Bind +Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: T).(pr3 c u2 (lift h d u1)))) +(\lambda (_: T).(\lambda (t1: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead +c (Bind b) u) t2 (lift h (S d) t1))))))) (\lambda (x0: T).(\lambda (H5: (eq T +x (lift h d x0))).(\lambda (H6: (pr3 e t x0)).(let H7 \def (pr3_gen_abst c u2 +t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead +(Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) +(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead +c (Bind b) u) t2 t3))))) (ex3_2 T T (\lambda (u1: T).(\lambda (t1: T).(pr3 e +t (THead (Bind Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: T).(pr3 c u2 +(lift h d u1)))) (\lambda (_: T).(\lambda (t1: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) t1))))))) (\lambda (x1: +T).(\lambda (x2: T).(\lambda (H8: (eq T x (THead (Bind Abst) x1 +x2))).(\lambda (H9: (pr3 c u2 x1)).(\lambda (H10: ((\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) t2 x2))))).(let H11 \def (eq_ind T x +(\lambda (t0: T).(eq T t0 (lift h d x0))) H5 (THead (Bind Abst) x1 x2) H8) in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x0 (THead (Bind Abst) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T x1 (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T x2 (lift h (S d) z)))) (ex3_2 T T (\lambda (u1: +T).(\lambda (t1: T).(pr3 e t (THead (Bind Abst) u1 t1)))) (\lambda (u1: +T).(\lambda (_: T).(pr3 c u2 (lift h d u1)))) (\lambda (_: T).(\lambda (t1: +T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) +t1))))))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq T x0 (THead +(Bind Abst) x3 x4))).(\lambda (H13: (eq T x1 (lift h d x3))).(\lambda (H14: +(eq T x2 (lift h (S d) x4))).(let H15 \def (eq_ind T x2 (\lambda (t0: +T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 t0)))) H10 +(lift h (S d) x4) H14) in (let H16 \def (eq_ind T x1 (\lambda (t0: T).(pr3 c +u2 t0)) H9 (lift h d x3) H13) in (let H17 \def (eq_ind T x0 (\lambda (t0: +T).(pr3 e t t0)) H6 (THead (Bind Abst) x3 x4) H12) in (ex3_2_intro T T +(\lambda (u1: T).(\lambda (t1: T).(pr3 e t (THead (Bind Abst) u1 t1)))) +(\lambda (u1: T).(\lambda (_: T).(pr3 c u2 (lift h d u1)))) (\lambda (_: +T).(\lambda (t1: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +t2 (lift h (S d) t1)))))) x3 x4 H17 H16 H15))))))))) (lift_gen_bind Abst x1 +x2 x0 h d H11)))))))) H7))))) H4))))) H1)))))))))). + +lemma pc3_gen_sort_abst: + \forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (n: nat).((pc3 c +(TSort n) (THead (Bind Abst) u t)) \to (\forall (P: Prop).P))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (n: nat).(\lambda +(H: (pc3 c (TSort n) (THead (Bind Abst) u t))).(\lambda (P: Prop).(let H0 +\def H in (ex2_ind T (\lambda (t0: T).(pr3 c (TSort n) t0)) (\lambda (t0: +T).(pr3 c (THead (Bind Abst) u t) t0)) P (\lambda (x: T).(\lambda (H1: (pr3 c +(TSort n) x)).(\lambda (H2: (pr3 c (THead (Bind Abst) u t) x)).(let H3 \def +(pr3_gen_abst c u t x H2) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u0: +T).(pr3 (CHead c (Bind b) u0) t t2))))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H4: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (_: (pr3 c u +x0)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr3 (CHead c (Bind b) +u0) t x1))))).(let H7 \def (eq_ind T x (\lambda (t0: T).(eq T t0 (TSort n))) +(pr3_gen_sort c x n H1) (THead (Bind Abst) x0 x1) H4) in (let H8 \def (eq_ind +T (THead (Bind Abst) x0 x1) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H7) in (False_ind P H8)))))))) H3))))) H0))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/left.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/left.ma new file mode 100644 index 000000000..a4a1aa0b0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/left.ma @@ -0,0 +1,117 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/props.ma". + +implied rec lemma pc3_left_ind (c: C) (P: (T \to (T \to Prop))) (f: (\forall +(t: T).(P t t))) (f0: (\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to +(\forall (t3: T).((pc3_left c t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) (f1: +(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (t3: +T).((pc3_left c t1 t3) \to ((P t1 t3) \to (P t2 t3)))))))) (t: T) (t0: T) (p: +pc3_left c t t0) on p: P t t0 \def match p with [(pc3_left_r t1) \Rightarrow +(f t1) | (pc3_left_ur t1 t2 p0 t3 p1) \Rightarrow (f0 t1 t2 p0 t3 p1 +((pc3_left_ind c P f f0 f1) t2 t3 p1)) | (pc3_left_ux t1 t2 p0 t3 p1) +\Rightarrow (f1 t1 t2 p0 t3 p1 ((pc3_left_ind c P f f0 f1) t1 t3 p1))]. + +fact pc3_ind_left__pc3_left_pr3: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to +(pc3_left c t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(pc3_left c t t0))) (\lambda +(t: T).(pc3_left_r c t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 +c t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: +(pc3_left c t0 t4)).(pc3_left_ur c t3 t0 H0 t4 H2))))))) t1 t2 H)))). + +fact pc3_ind_left__pc3_left_trans: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3_left c t1 t2) \to +(\forall (t3: T).((pc3_left c t2 t3) \to (pc3_left c t1 t3)))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3_left c t1 +t2)).(pc3_left_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t3: +T).((pc3_left c t0 t3) \to (pc3_left c t t3))))) (\lambda (t: T).(\lambda +(t3: T).(\lambda (H0: (pc3_left c t t3)).H0))) (\lambda (t0: T).(\lambda (t3: +T).(\lambda (H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t3 +t4)).(\lambda (H2: ((\forall (t5: T).((pc3_left c t4 t5) \to (pc3_left c t3 +t5))))).(\lambda (t5: T).(\lambda (H3: (pc3_left c t4 t5)).(pc3_left_ur c t0 +t3 H0 t5 (H2 t5 H3)))))))))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: +(pr2 c t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t0 t4)).(\lambda +(H2: ((\forall (t5: T).((pc3_left c t4 t5) \to (pc3_left c t0 +t5))))).(\lambda (t5: T).(\lambda (H3: (pc3_left c t4 t5)).(pc3_left_ux c t0 +t3 H0 t5 (H2 t5 H3)))))))))) t1 t2 H)))). + +fact pc3_ind_left__pc3_left_sym: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3_left c t1 t2) \to +(pc3_left c t2 t1)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3_left c t1 +t2)).(pc3_left_ind c (\lambda (t: T).(\lambda (t0: T).(pc3_left c t0 t))) +(\lambda (t: T).(pc3_left_r c t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda +(H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t3 +t4)).(\lambda (H2: (pc3_left c t4 t3)).(pc3_ind_left__pc3_left_trans c t4 t3 +H2 t0 (pc3_left_ux c t0 t3 H0 t0 (pc3_left_r c t0))))))))) (\lambda (t0: +T).(\lambda (t3: T).(\lambda (H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda +(_: (pc3_left c t0 t4)).(\lambda (H2: (pc3_left c t4 +t0)).(pc3_ind_left__pc3_left_trans c t4 t0 H2 t3 (pc3_left_ur c t0 t3 H0 t3 +(pc3_left_r c t3))))))))) t1 t2 H)))). + +fact pc3_ind_left__pc3_left_pc3: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to +(pc3_left c t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 +t2)).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: +T).(pr3 c t2 t)) (pc3_left c t1 t2) (\lambda (x: T).(\lambda (H1: (pr3 c t1 +x)).(\lambda (H2: (pr3 c t2 x)).(pc3_ind_left__pc3_left_trans c t1 x +(pc3_ind_left__pc3_left_pr3 c t1 x H1) t2 (pc3_ind_left__pc3_left_sym c t2 x +(pc3_ind_left__pc3_left_pr3 c t2 x H2)))))) H0))))). + +fact pc3_ind_left__pc3_pc3_left: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3_left c t1 t2) \to +(pc3 c t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3_left c t1 +t2)).(pc3_left_ind c (\lambda (t: T).(\lambda (t0: T).(pc3 c t t0))) (\lambda +(t: T).(pc3_refl c t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c +t0 t3)).(\lambda (t4: T).(\lambda (_: (pc3_left c t3 t4)).(\lambda (H2: (pc3 +c t3 t4)).(pc3_t t3 c t0 (pc3_pr2_r c t0 t3 H0) t4 H2))))))) (\lambda (t0: +T).(\lambda (t3: T).(\lambda (H0: (pr2 c t0 t3)).(\lambda (t4: T).(\lambda +(_: (pc3_left c t0 t4)).(\lambda (H2: (pc3 c t0 t4)).(pc3_t t0 c t3 +(pc3_pr2_x c t3 t0 H0) t4 H2))))))) t1 t2 H)))). + +lemma pc3_ind_left: + \forall (c: C).(\forall (P: ((T \to (T \to Prop)))).(((\forall (t: T).(P t +t))) \to (((\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (t3: +T).((pc3 c t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) \to (((\forall (t1: +T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (t3: T).((pc3 c t1 t3) \to +((P t1 t3) \to (P t2 t3)))))))) \to (\forall (t: T).(\forall (t0: T).((pc3 c +t t0) \to (P t t0)))))))) +\def + \lambda (c: C).(\lambda (P: ((T \to (T \to Prop)))).(\lambda (H: ((\forall +(t: T).(P t t)))).(\lambda (H0: ((\forall (t1: T).(\forall (t2: T).((pr2 c t1 +t2) \to (\forall (t3: T).((pc3 c t2 t3) \to ((P t2 t3) \to (P t1 +t3))))))))).(\lambda (H1: ((\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) +\to (\forall (t3: T).((pc3 c t1 t3) \to ((P t1 t3) \to (P t2 +t3))))))))).(\lambda (t: T).(\lambda (t0: T).(\lambda (H2: (pc3 c t +t0)).(pc3_left_ind c (\lambda (t1: T).(\lambda (t2: T).(P t1 t2))) H (\lambda +(t1: T).(\lambda (t2: T).(\lambda (H3: (pr2 c t1 t2)).(\lambda (t3: +T).(\lambda (H4: (pc3_left c t2 t3)).(\lambda (H5: (P t2 t3)).(H0 t1 t2 H3 t3 +(pc3_ind_left__pc3_pc3_left c t2 t3 H4) H5))))))) (\lambda (t1: T).(\lambda +(t2: T).(\lambda (H3: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda (H4: (pc3_left +c t1 t3)).(\lambda (H5: (P t1 t3)).(H1 t1 t2 H3 t3 +(pc3_ind_left__pc3_pc3_left c t1 t3 H4) H5))))))) t t0 +(pc3_ind_left__pc3_left_pc3 c t t0 H2))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/nf2.ma new file mode 100644 index 000000000..cc79e08e5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/nf2.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/defs.ma". + +include "basic_1A/nf2/pr3.ma". + +lemma pc3_nf2: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to ((nf2 c +t1) \to ((nf2 c t2) \to (eq T t1 t2)))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 +t2)).(\lambda (H0: (nf2 c t1)).(\lambda (H1: (nf2 c t2)).(let H2 \def H in +(ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (eq T +t1 t2) (\lambda (x: T).(\lambda (H3: (pr3 c t1 x)).(\lambda (H4: (pr3 c t2 +x)).(let H_y \def (nf2_pr3_unfold c t1 x H3 H0) in (let H5 \def (eq_ind_r T x +(\lambda (t: T).(pr3 c t2 t)) H4 t1 H_y) in (let H6 \def (eq_ind_r T x +(\lambda (t: T).(pr3 c t1 t)) H3 t1 H_y) in (let H_y0 \def (nf2_pr3_unfold c +t2 t1 H5 H1) in (let H7 \def (eq_ind T t2 (\lambda (t: T).(pr3 c t t1)) H5 t1 +H_y0) in (eq_ind_r T t1 (\lambda (t: T).(eq T t1 t)) (refl_equal T t1) t2 +H_y0))))))))) H2))))))). + +lemma pc3_nf2_unfold: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to ((nf2 c +t2) \to (pr3 c t1 t2))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 +t2)).(\lambda (H0: (nf2 c t2)).(let H1 \def H in (ex2_ind T (\lambda (t: +T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (pr3 c t1 t2) (\lambda (x: +T).(\lambda (H2: (pr3 c t1 x)).(\lambda (H3: (pr3 c t2 x)).(let H_y \def +(nf2_pr3_unfold c t2 x H3 H0) in (let H4 \def (eq_ind_r T x (\lambda (t: +T).(pr3 c t1 t)) H2 t2 H_y) in H4))))) H1)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/pc1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/pc1.ma new file mode 100644 index 000000000..75648cfc8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/pc1.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/defs.ma". + +include "basic_1A/pc1/defs.ma". + +include "basic_1A/pr3/pr1.ma". + +lemma pc3_pc1: + \forall (t1: T).(\forall (t2: T).((pc1 t1 t2) \to (\forall (c: C).(pc3 c t1 +t2)))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc1 t1 t2)).(\lambda (c: +C).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: +T).(pr1 t2 t)) (pc3 c t1 t2) (\lambda (x: T).(\lambda (H1: (pr1 t1 +x)).(\lambda (H2: (pr1 t2 x)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) +(\lambda (t: T).(pr3 c t2 t)) x (pr3_pr1 t1 x H1 c) (pr3_pr1 t2 x H2 c))))) +H0))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/props.ma new file mode 100644 index 000000000..af2a30106 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/props.ma @@ -0,0 +1,410 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/defs.ma". + +include "basic_1A/pr3/pr3.ma". + +lemma clear_pc3_trans: + \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pc3 c2 t1 t2) \to +(\forall (c1: C).((clear c1 c2) \to (pc3 c1 t1 t2)))))) +\def + \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c2 t1 +t2)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(let H1 \def H in (ex2_ind +T (\lambda (t: T).(pr3 c2 t1 t)) (\lambda (t: T).(pr3 c2 t2 t)) (pc3 c1 t1 +t2) (\lambda (x: T).(\lambda (H2: (pr3 c2 t1 x)).(\lambda (H3: (pr3 c2 t2 +x)).(ex_intro2 T (\lambda (t: T).(pr3 c1 t1 t)) (\lambda (t: T).(pr3 c1 t2 +t)) x (clear_pr3_trans c2 t1 x H2 c1 H0) (clear_pr3_trans c2 t2 x H3 c1 +H0))))) H1))))))). + +lemma pc3_pr2_r: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (pc3 c +t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) +t2 (pr3_pr2 c t1 t2 H) (pr3_refl c t2))))). + +lemma pc3_pr2_x: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t2 t1) \to (pc3 c +t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t2 +t1)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) +t1 (pr3_refl c t1) (pr3_pr2 c t2 t1 H))))). + +lemma pc3_pr3_r: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (pc3 c +t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) +t2 H (pr3_refl c t2))))). + +lemma pc3_pr3_x: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t2 t1) \to (pc3 c +t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t2 +t1)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) +t1 (pr3_refl c t1) H)))). + +lemma pc3_pr3_t: + \forall (c: C).(\forall (t1: T).(\forall (t0: T).((pr3 c t1 t0) \to (\forall +(t2: T).((pr3 c t2 t0) \to (pc3 c t1 t2)))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t0: T).(\lambda (H: (pr3 c t1 +t0)).(\lambda (t2: T).(\lambda (H0: (pr3 c t2 t0)).(ex_intro2 T (\lambda (t: +T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) t0 H H0)))))). + +lemma pc3_refl: + \forall (c: C).(\forall (t: T).(pc3 c t t)) +\def + \lambda (c: C).(\lambda (t: T).(ex_intro2 T (\lambda (t0: T).(pr3 c t t0)) +(\lambda (t0: T).(pr3 c t t0)) t (pr3_refl c t) (pr3_refl c t))). + +lemma pc3_s: + \forall (c: C).(\forall (t2: T).(\forall (t1: T).((pc3 c t1 t2) \to (pc3 c +t2 t1)))) +\def + \lambda (c: C).(\lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pc3 c t1 +t2)).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: +T).(pr3 c t2 t)) (pc3 c t2 t1) (\lambda (x: T).(\lambda (H1: (pr3 c t1 +x)).(\lambda (H2: (pr3 c t2 x)).(ex_intro2 T (\lambda (t: T).(pr3 c t2 t)) +(\lambda (t: T).(pr3 c t1 t)) x H2 H1)))) H0))))). + +lemma pc3_thin_dx: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to (\forall +(u: T).(\forall (f: F).(pc3 c (THead (Flat f) u t1) (THead (Flat f) u +t2))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 +t2)).(\lambda (u: T).(\lambda (f: F).(let H0 \def H in (ex2_ind T (\lambda +(t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (pc3 c (THead (Flat f) u +t1) (THead (Flat f) u t2)) (\lambda (x: T).(\lambda (H1: (pr3 c t1 +x)).(\lambda (H2: (pr3 c t2 x)).(ex_intro2 T (\lambda (t: T).(pr3 c (THead +(Flat f) u t1) t)) (\lambda (t: T).(pr3 c (THead (Flat f) u t2) t)) (THead +(Flat f) u x) (pr3_thin_dx c t1 x H1 u f) (pr3_thin_dx c t2 x H2 u f))))) +H0))))))). + +lemma pc3_head_1: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pc3 c u1 u2) \to (\forall +(k: K).(\forall (t: T).(pc3 c (THead k u1 t) (THead k u2 t))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc3 c u1 +u2)).(\lambda (k: K).(\lambda (t: T).(let H0 \def H in (ex2_ind T (\lambda +(t0: T).(pr3 c u1 t0)) (\lambda (t0: T).(pr3 c u2 t0)) (pc3 c (THead k u1 t) +(THead k u2 t)) (\lambda (x: T).(\lambda (H1: (pr3 c u1 x)).(\lambda (H2: +(pr3 c u2 x)).(ex_intro2 T (\lambda (t0: T).(pr3 c (THead k u1 t) t0)) +(\lambda (t0: T).(pr3 c (THead k u2 t) t0)) (THead k x t) (pr3_head_12 c u1 x +H1 k t t (pr3_refl (CHead c k x) t)) (pr3_head_12 c u2 x H2 k t t (pr3_refl +(CHead c k x) t)))))) H0))))))). + +lemma pc3_head_2: + \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).(\forall +(k: K).((pc3 (CHead c k u) t1 t2) \to (pc3 c (THead k u t1) (THead k u +t2))))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(k: K).(\lambda (H: (pc3 (CHead c k u) t1 t2)).(let H0 \def H in (ex2_ind T +(\lambda (t: T).(pr3 (CHead c k u) t1 t)) (\lambda (t: T).(pr3 (CHead c k u) +t2 t)) (pc3 c (THead k u t1) (THead k u t2)) (\lambda (x: T).(\lambda (H1: +(pr3 (CHead c k u) t1 x)).(\lambda (H2: (pr3 (CHead c k u) t2 x)).(ex_intro2 +T (\lambda (t: T).(pr3 c (THead k u t1) t)) (\lambda (t: T).(pr3 c (THead k u +t2) t)) (THead k u x) (pr3_head_12 c u u (pr3_refl c u) k t1 x H1) +(pr3_head_12 c u u (pr3_refl c u) k t2 x H2))))) H0))))))). + +lemma pc3_pr2_u: + \forall (c: C).(\forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to (\forall +(t3: T).((pc3 c t2 t3) \to (pc3 c t1 t3)))))) +\def + \lambda (c: C).(\lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pr2 c t1 +t2)).(\lambda (t3: T).(\lambda (H0: (pc3 c t2 t3)).(let H1 \def H0 in +(ex2_ind T (\lambda (t: T).(pr3 c t2 t)) (\lambda (t: T).(pr3 c t3 t)) (pc3 c +t1 t3) (\lambda (x: T).(\lambda (H2: (pr3 c t2 x)).(\lambda (H3: (pr3 c t3 +x)).(ex_intro2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t3 t)) +x (pr3_sing c t2 t1 H x H2) H3)))) H1))))))). + +theorem pc3_t: + \forall (t2: T).(\forall (c: C).(\forall (t1: T).((pc3 c t1 t2) \to (\forall +(t3: T).((pc3 c t2 t3) \to (pc3 c t1 t3)))))) +\def + \lambda (t2: T).(\lambda (c: C).(\lambda (t1: T).(\lambda (H: (pc3 c t1 +t2)).(\lambda (t3: T).(\lambda (H0: (pc3 c t2 t3)).(let H1 \def H0 in +(ex2_ind T (\lambda (t: T).(pr3 c t2 t)) (\lambda (t: T).(pr3 c t3 t)) (pc3 c +t1 t3) (\lambda (x: T).(\lambda (H2: (pr3 c t2 x)).(\lambda (H3: (pr3 c t3 +x)).(let H4 \def H in (ex2_ind T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: +T).(pr3 c t2 t)) (pc3 c t1 t3) (\lambda (x0: T).(\lambda (H5: (pr3 c t1 +x0)).(\lambda (H6: (pr3 c t2 x0)).(ex2_ind T (\lambda (t: T).(pr3 c x0 t)) +(\lambda (t: T).(pr3 c x t)) (pc3 c t1 t3) (\lambda (x1: T).(\lambda (H7: +(pr3 c x0 x1)).(\lambda (H8: (pr3 c x x1)).(pc3_pr3_t c t1 x1 (pr3_t x0 t1 c +H5 x1 H7) t3 (pr3_t x t3 c H3 x1 H8))))) (pr3_confluence c t2 x0 H6 x H2))))) +H4))))) H1))))))). + +lemma pc3_pr2_u2: + \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr2 c t0 t1) \to (\forall +(t2: T).((pc3 c t0 t2) \to (pc3 c t1 t2)))))) +\def + \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr2 c t0 +t1)).(\lambda (t2: T).(\lambda (H0: (pc3 c t0 t2)).(pc3_t t0 c t1 (pc3_pr2_x +c t1 t0 H) t2 H0)))))). + +lemma pc3_pr3_conf: + \forall (c: C).(\forall (t: T).(\forall (t1: T).((pc3 c t t1) \to (\forall +(t2: T).((pr3 c t t2) \to (pc3 c t2 t1)))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (H: (pc3 c t +t1)).(\lambda (t2: T).(\lambda (H0: (pr3 c t t2)).(pc3_t t c t2 (pc3_pr3_x c +t2 t H0) t1 H)))))). + +theorem pc3_head_12: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pc3 c u1 u2) \to (\forall +(k: K).(\forall (t1: T).(\forall (t2: T).((pc3 (CHead c k u2) t1 t2) \to (pc3 +c (THead k u1 t1) (THead k u2 t2))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc3 c u1 +u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pc3 +(CHead c k u2) t1 t2)).(pc3_t (THead k u2 t1) c (THead k u1 t1) (pc3_head_1 c +u1 u2 H k t1) (THead k u2 t2) (pc3_head_2 c u2 t1 t2 k H0))))))))). + +theorem pc3_head_21: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pc3 c u1 u2) \to (\forall +(k: K).(\forall (t1: T).(\forall (t2: T).((pc3 (CHead c k u1) t1 t2) \to (pc3 +c (THead k u1 t1) (THead k u2 t2))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pc3 c u1 +u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pc3 +(CHead c k u1) t1 t2)).(pc3_t (THead k u1 t2) c (THead k u1 t1) (pc3_head_2 c +u1 t1 t2 k H0) (THead k u2 t2) (pc3_head_1 c u1 u2 H k t2))))))))). + +lemma pc3_pr0_pr2_t: + \forall (u1: T).(\forall (u2: T).((pr0 u2 u1) \to (\forall (c: C).(\forall +(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 +(CHead c k u1) t1 t2)))))))) +\def + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u2 u1)).(\lambda (c: +C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 +(CHead c k u2) t1 t2)).(insert_eq C (CHead c k u2) (\lambda (c0: C).(pr2 c0 +t1 t2)) (\lambda (_: C).(pc3 (CHead c k u1) t1 t2)) (\lambda (y: C).(\lambda +(H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).((eq C c0 (CHead c k u2)) \to (pc3 (CHead c k u1) t t0))))) (\lambda (c0: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (H3: +(eq C c0 (CHead c k u2))).(let H4 \def (f_equal C C (\lambda (e: C).e) c0 +(CHead c k u2) H3) in (pc3_pr2_r (CHead c k u1) t3 t4 (pr2_free (CHead c k +u1) t3 t4 H2)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H2: (getl i c0 (CHead d (Bind Abbr) +u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda +(t: T).(\lambda (H4: (subst0 i u t4 t)).(\lambda (H5: (eq C c0 (CHead c k +u2))).(let H6 \def (f_equal C C (\lambda (e: C).e) c0 (CHead c k u2) H5) in +(let H7 \def (eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) +u))) H2 (CHead c k u2) H6) in (nat_ind (\lambda (n: nat).((getl n (CHead c k +u2) (CHead d (Bind Abbr) u)) \to ((subst0 n u t4 t) \to (pc3 (CHead c k u1) +t3 t)))) (\lambda (H8: (getl O (CHead c k u2) (CHead d (Bind Abbr) +u))).(\lambda (H9: (subst0 O u t4 t)).(K_ind (\lambda (k0: K).((clear (CHead +c k0 u2) (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k0 u1) t3 t))) (\lambda +(b: B).(\lambda (H10: (clear (CHead c (Bind b) u2) (CHead d (Bind Abbr) +u))).(let H11 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H10)) in +((let H12 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H10)) in +((let H13 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H10)) in +(\lambda (H14: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H16 \def (eq_ind +T u (\lambda (t0: T).(subst0 O t0 t4 t)) H9 u2 H13) in (eq_ind B Abbr +(\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t3 t)) (ex2_ind T (\lambda (t0: +T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(pr0 t t0)) (pc3 (CHead c (Bind +Abbr) u1) t3 t) (\lambda (x: T).(\lambda (H17: (subst0 O u1 t4 x)).(\lambda +(H18: (pr0 t x)).(pc3_pr3_t (CHead c (Bind Abbr) u1) t3 x (pr3_pr2 (CHead c +(Bind Abbr) u1) t3 x (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl +Abbr c u1) t3 t4 H3 x H17)) t (pr3_pr2 (CHead c (Bind Abbr) u1) t x (pr2_free +(CHead c (Bind Abbr) u1) t x H18)))))) (pr0_subst0_fwd u2 t4 t O H16 u1 H)) b +H14))))) H12)) H11)))) (\lambda (f: F).(\lambda (H10: (clear (CHead c (Flat +f) u2) (CHead d (Bind Abbr) u))).(clear_pc3_trans (CHead d (Bind Abbr) u) t3 +t (pc3_pr2_r (CHead d (Bind Abbr) u) t3 t (pr2_delta (CHead d (Bind Abbr) u) +d u O (getl_refl Abbr d u) t3 t4 H3 t H9)) (CHead c (Flat f) u1) (clear_flat +c (CHead d (Bind Abbr) u) (clear_gen_flat f c (CHead d (Bind Abbr) u) u2 H10) +f u1)))) k (getl_gen_O (CHead c k u2) (CHead d (Bind Abbr) u) H8)))) (\lambda +(i0: nat).(\lambda (IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) +\to ((subst0 i0 u t4 t) \to (pc3 (CHead c k u1) t3 t))))).(\lambda (H8: (getl +(S i0) (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H9: (subst0 (S i0) +u t4 t)).(K_ind (\lambda (k0: K).((((getl i0 (CHead c k0 u2) (CHead d (Bind +Abbr) u)) \to ((subst0 i0 u t4 t) \to (pc3 (CHead c k0 u1) t3 t)))) \to +((getl (r k0 i0) c (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k0 u1) t3 t)))) +(\lambda (b: B).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind +Abbr) u)) \to ((subst0 i0 u t4 t) \to (pc3 (CHead c (Bind b) u1) t3 +t))))).(\lambda (H10: (getl (r (Bind b) i0) c (CHead d (Bind Abbr) +u))).(pc3_pr2_r (CHead c (Bind b) u1) t3 t (pr2_delta (CHead c (Bind b) u1) d +u (S i0) (getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) H10 u1) t3 t4 H3 t +H9))))) (\lambda (f: F).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead +d (Bind Abbr) u)) \to ((subst0 i0 u t4 t) \to (pc3 (CHead c (Flat f) u1) t3 +t))))).(\lambda (H10: (getl (r (Flat f) i0) c (CHead d (Bind Abbr) +u))).(pc3_pr2_r (CHead c (Flat f) u1) t3 t (pr2_cflat c t3 t (pr2_delta c d u +(r (Flat f) i0) H10 t3 t4 H3 t H9) f u1))))) k IHi (getl_gen_S k c (CHead d +(Bind Abbr) u) u2 i0 H8)))))) i H7 H4)))))))))))))) y t1 t2 H1))) H0)))))))). + +lemma pc3_pr2_pr2_t: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u2 u1) \to (\forall +(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 +(CHead c k u1) t1 t2)))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u2 +u1)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (t1: +T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c0 k t) t1 t2) \to (pc3 +(CHead c0 k t0) t1 t2)))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: +K).(\lambda (H1: (pr2 (CHead c0 k t1) t0 t3)).(pc3_pr0_pr2_t t2 t1 H0 c0 t0 +t3 k H1))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H2: +(subst0 i u t2 t)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda +(H3: (pr2 (CHead c0 k t1) t0 t3)).(insert_eq C (CHead c0 k t1) (\lambda (c1: +C).(pr2 c1 t0 t3)) (\lambda (_: C).(pc3 (CHead c0 k t) t0 t3)) (\lambda (y: +C).(\lambda (H4: (pr2 y t0 t3)).(pr2_ind (\lambda (c1: C).(\lambda (t4: +T).(\lambda (t5: T).((eq C c1 (CHead c0 k t1)) \to (pc3 (CHead c0 k t) t4 +t5))))) (\lambda (c1: C).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H5: (pr0 +t4 t5)).(\lambda (_: (eq C c1 (CHead c0 k t1))).(pc3_pr2_r (CHead c0 k t) t4 +t5 (pr2_free (CHead c0 k t) t4 t5 H5))))))) (\lambda (c1: C).(\lambda (d0: +C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H5: (getl i0 c1 (CHead d0 +(Bind Abbr) u0))).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H6: (pr0 t4 +t5)).(\lambda (t6: T).(\lambda (H7: (subst0 i0 u0 t5 t6)).(\lambda (H8: (eq C +c1 (CHead c0 k t1))).(let H9 \def (eq_ind C c1 (\lambda (c2: C).(getl i0 c2 +(CHead d0 (Bind Abbr) u0))) H5 (CHead c0 k t1) H8) in (nat_ind (\lambda (n: +nat).((getl n (CHead c0 k t1) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t5 +t6) \to (pc3 (CHead c0 k t) t4 t6)))) (\lambda (H10: (getl O (CHead c0 k t1) +(CHead d0 (Bind Abbr) u0))).(\lambda (H11: (subst0 O u0 t5 t6)).(K_ind +(\lambda (k0: K).((clear (CHead c0 k0 t1) (CHead d0 (Bind Abbr) u0)) \to (pc3 +(CHead c0 k0 t) t4 t6))) (\lambda (b: B).(\lambda (H12: (clear (CHead c0 +(Bind b) t1) (CHead d0 (Bind Abbr) u0))).(let H13 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow d0 | (CHead c2 _ _) \Rightarrow +c2])) (CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t1) (clear_gen_bind b c0 +(CHead d0 (Bind Abbr) u0) t1 H12)) in ((let H14 \def (f_equal C B (\lambda +(e: C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow +(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) +(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t1) (clear_gen_bind b c0 (CHead +d0 (Bind Abbr) u0) t1 H12)) in ((let H15 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t7) \Rightarrow t7])) +(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t1) (clear_gen_bind b c0 (CHead +d0 (Bind Abbr) u0) t1 H12)) in (\lambda (H16: (eq B Abbr b)).(\lambda (_: (eq +C d0 c0)).(let H18 \def (eq_ind T u0 (\lambda (t7: T).(subst0 O t7 t5 t6)) +H11 t1 H15) in (eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c0 (Bind b0) t) t4 +t6)) (ex2_ind T (\lambda (t7: T).(subst0 O t2 t5 t7)) (\lambda (t7: T).(pr0 +t6 t7)) (pc3 (CHead c0 (Bind Abbr) t) t4 t6) (\lambda (x: T).(\lambda (H19: +(subst0 O t2 t5 x)).(\lambda (H20: (pr0 t6 x)).(ex2_ind T (\lambda (t7: +T).(subst0 O t t5 t7)) (\lambda (t7: T).(subst0 (S (plus i O)) u x t7)) (pc3 +(CHead c0 (Bind Abbr) t) t4 t6) (\lambda (x0: T).(\lambda (H21: (subst0 O t +t5 x0)).(\lambda (H22: (subst0 (S (plus i O)) u x x0)).(let H23 \def (f_equal +nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H24 +\def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n u x x0)) H22 (S +i) H23) in (pc3_pr2_u (CHead c0 (Bind Abbr) t) x0 t4 (pr2_delta (CHead c0 +(Bind Abbr) t) c0 t O (getl_refl Abbr c0 t) t4 t5 H6 x0 H21) t6 (pc3_pr2_x +(CHead c0 (Bind Abbr) t) x0 t6 (pr2_delta (CHead c0 (Bind Abbr) t) d u (S i) +(getl_head (Bind Abbr) i c0 (CHead d (Bind Abbr) u) H0 t) t6 x H20 x0 +H24)))))))) (subst0_subst0_back t5 x t2 O H19 t u i H2))))) (pr0_subst0_fwd +t1 t5 t6 O H18 t2 H1)) b H16))))) H14)) H13)))) (\lambda (f: F).(\lambda +(H12: (clear (CHead c0 (Flat f) t1) (CHead d0 (Bind Abbr) +u0))).(clear_pc3_trans (CHead d0 (Bind Abbr) u0) t4 t6 (pc3_pr2_r (CHead d0 +(Bind Abbr) u0) t4 t6 (pr2_delta (CHead d0 (Bind Abbr) u0) d0 u0 O (getl_refl +Abbr d0 u0) t4 t5 H6 t6 H11)) (CHead c0 (Flat f) t) (clear_flat c0 (CHead d0 +(Bind Abbr) u0) (clear_gen_flat f c0 (CHead d0 (Bind Abbr) u0) t1 H12) f +t)))) k (getl_gen_O (CHead c0 k t1) (CHead d0 (Bind Abbr) u0) H10)))) +(\lambda (i1: nat).(\lambda (_: (((getl i1 (CHead c0 k t1) (CHead d0 (Bind +Abbr) u0)) \to ((subst0 i1 u0 t5 t6) \to (pc3 (CHead c0 k t) t4 +t6))))).(\lambda (H10: (getl (S i1) (CHead c0 k t1) (CHead d0 (Bind Abbr) +u0))).(\lambda (H11: (subst0 (S i1) u0 t5 t6)).(K_ind (\lambda (k0: K).((getl +(r k0 i1) c0 (CHead d0 (Bind Abbr) u0)) \to (pc3 (CHead c0 k0 t) t4 t6))) +(\lambda (b: B).(\lambda (H12: (getl (r (Bind b) i1) c0 (CHead d0 (Bind Abbr) +u0))).(pc3_pr2_r (CHead c0 (Bind b) t) t4 t6 (pr2_delta (CHead c0 (Bind b) t) +d0 u0 (S i1) (getl_head (Bind b) i1 c0 (CHead d0 (Bind Abbr) u0) H12 t) t4 t5 +H6 t6 H11)))) (\lambda (f: F).(\lambda (H12: (getl (r (Flat f) i1) c0 (CHead +d0 (Bind Abbr) u0))).(pc3_pr2_r (CHead c0 (Flat f) t) t4 t6 (pr2_cflat c0 t4 +t6 (pr2_delta c0 d0 u0 (r (Flat f) i1) H12 t4 t5 H6 t6 H11) f t)))) k +(getl_gen_S k c0 (CHead d0 (Bind Abbr) u0) t1 i1 H10)))))) i0 H9 +H7))))))))))))) y t0 t3 H4))) H3))))))))))))))) c u2 u1 H)))). + +lemma pc3_pr2_pr3_t: + \forall (c: C).(\forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall +(k: K).((pr3 (CHead c k u2) t1 t2) \to (\forall (u1: T).((pr2 c u2 u1) \to +(pc3 (CHead c k u1) t1 t2)))))))) +\def + \lambda (c: C).(\lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(k: K).(\lambda (H: (pr3 (CHead c k u2) t1 t2)).(pr3_ind (CHead c k u2) +(\lambda (t: T).(\lambda (t0: T).(\forall (u1: T).((pr2 c u2 u1) \to (pc3 +(CHead c k u1) t t0))))) (\lambda (t: T).(\lambda (u1: T).(\lambda (_: (pr2 c +u2 u1)).(pc3_refl (CHead c k u1) t)))) (\lambda (t0: T).(\lambda (t3: +T).(\lambda (H0: (pr2 (CHead c k u2) t3 t0)).(\lambda (t4: T).(\lambda (_: +(pr3 (CHead c k u2) t0 t4)).(\lambda (H2: ((\forall (u1: T).((pr2 c u2 u1) +\to (pc3 (CHead c k u1) t0 t4))))).(\lambda (u1: T).(\lambda (H3: (pr2 c u2 +u1)).(pc3_t t0 (CHead c k u1) t3 (pc3_pr2_pr2_t c u1 u2 H3 t3 t0 k H0) t4 (H2 +u1 H3)))))))))) t1 t2 H)))))). + +lemma pc3_pr3_pc3_t: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u2 u1) \to (\forall +(t1: T).(\forall (t2: T).(\forall (k: K).((pc3 (CHead c k u2) t1 t2) \to (pc3 +(CHead c k u1) t1 t2)))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u2 +u1)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t1: T).(\forall +(t2: T).(\forall (k: K).((pc3 (CHead c k t) t1 t2) \to (pc3 (CHead c k t0) t1 +t2))))))) (\lambda (t: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: +K).(\lambda (H0: (pc3 (CHead c k t) t1 t2)).H0))))) (\lambda (t2: T).(\lambda +(t1: T).(\lambda (H0: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda (_: (pr3 c t2 +t3)).(\lambda (H2: ((\forall (t4: T).(\forall (t5: T).(\forall (k: K).((pc3 +(CHead c k t2) t4 t5) \to (pc3 (CHead c k t3) t4 t5))))))).(\lambda (t0: +T).(\lambda (t4: T).(\lambda (k: K).(\lambda (H3: (pc3 (CHead c k t1) t0 +t4)).(H2 t0 t4 k (let H4 \def H3 in (ex2_ind T (\lambda (t: T).(pr3 (CHead c +k t1) t0 t)) (\lambda (t: T).(pr3 (CHead c k t1) t4 t)) (pc3 (CHead c k t2) +t0 t4) (\lambda (x: T).(\lambda (H5: (pr3 (CHead c k t1) t0 x)).(\lambda (H6: +(pr3 (CHead c k t1) t4 x)).(pc3_t x (CHead c k t2) t0 (pc3_pr2_pr3_t c t1 t0 +x k H5 t2 H0) t4 (pc3_s (CHead c k t2) x t4 (pc3_pr2_pr3_t c t1 t4 x k H6 t2 +H0)))))) H4))))))))))))) u2 u1 H)))). + +lemma pc3_lift: + \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h +d c e) \to (\forall (t1: T).(\forall (t2: T).((pc3 e t1 t2) \to (pc3 c (lift +h d t1) (lift h d t2))))))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pc3 e t1 +t2)).(let H1 \def H0 in (ex2_ind T (\lambda (t: T).(pr3 e t1 t)) (\lambda (t: +T).(pr3 e t2 t)) (pc3 c (lift h d t1) (lift h d t2)) (\lambda (x: T).(\lambda +(H2: (pr3 e t1 x)).(\lambda (H3: (pr3 e t2 x)).(pc3_pr3_t c (lift h d t1) +(lift h d x) (pr3_lift c e h d H t1 x H2) (lift h d t2) (pr3_lift c e h d H +t2 x H3))))) H1))))))))). + +lemma pc3_eta: + \forall (c: C).(\forall (t: T).(\forall (w: T).(\forall (u: T).((pc3 c t +(THead (Bind Abst) w u)) \to (\forall (v: T).((pc3 c v w) \to (pc3 c (THead +(Bind Abst) v (THead (Flat Appl) (TLRef O) (lift (S O) O t))) t))))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (w: T).(\lambda (u: T).(\lambda (H: +(pc3 c t (THead (Bind Abst) w u))).(\lambda (v: T).(\lambda (H0: (pc3 c v +w)).(pc3_t (THead (Bind Abst) w (THead (Flat Appl) (TLRef O) (lift (S O) O +(THead (Bind Abst) w u)))) c (THead (Bind Abst) v (THead (Flat Appl) (TLRef +O) (lift (S O) O t))) (pc3_head_21 c v w H0 (Bind Abst) (THead (Flat Appl) +(TLRef O) (lift (S O) O t)) (THead (Flat Appl) (TLRef O) (lift (S O) O (THead +(Bind Abst) w u))) (pc3_thin_dx (CHead c (Bind Abst) v) (lift (S O) O t) +(lift (S O) O (THead (Bind Abst) w u)) (pc3_lift (CHead c (Bind Abst) v) c (S +O) O (drop_drop (Bind Abst) O c c (drop_refl c) v) t (THead (Bind Abst) w u) +H) (TLRef O) Appl)) t (pc3_t (THead (Bind Abst) w u) c (THead (Bind Abst) w +(THead (Flat Appl) (TLRef O) (lift (S O) O (THead (Bind Abst) w u)))) +(pc3_pr3_r c (THead (Bind Abst) w (THead (Flat Appl) (TLRef O) (lift (S O) O +(THead (Bind Abst) w u)))) (THead (Bind Abst) w u) (pr3_eta c w u w (pr3_refl +c w))) t (pc3_s c (THead (Bind Abst) w u) t H))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/subst1.ma new file mode 100644 index 000000000..dc3ec3088 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/subst1.ma @@ -0,0 +1,45 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/props.ma". + +include "basic_1A/pr3/subst1.ma". + +lemma pc3_gen_cabbr: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pc3 c t1 t2) \to (\forall +(e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) +\to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d +a0 a) \to (\forall (x1: T).((subst1 d u t1 (lift (S O) d x1)) \to (\forall +(x2: T).((subst1 d u t2 (lift (S O) d x2)) \to (pc3 a x1 x2)))))))))))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c t1 +t2)).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (H0: (getl d +c (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (H1: (csubst1 d u c +a0)).(\lambda (a: C).(\lambda (H2: (drop (S O) d a0 a)).(\lambda (x1: +T).(\lambda (H3: (subst1 d u t1 (lift (S O) d x1))).(\lambda (x2: T).(\lambda +(H4: (subst1 d u t2 (lift (S O) d x2))).(let H5 \def H in (ex2_ind T (\lambda +(t: T).(pr3 c t1 t)) (\lambda (t: T).(pr3 c t2 t)) (pc3 a x1 x2) (\lambda (x: +T).(\lambda (H6: (pr3 c t1 x)).(\lambda (H7: (pr3 c t2 x)).(ex2_ind T +(\lambda (x3: T).(subst1 d u x (lift (S O) d x3))) (\lambda (x3: T).(pr3 a x2 +x3)) (pc3 a x1 x2) (\lambda (x0: T).(\lambda (H8: (subst1 d u x (lift (S O) d +x0))).(\lambda (H9: (pr3 a x2 x0)).(ex2_ind T (\lambda (x3: T).(subst1 d u x +(lift (S O) d x3))) (\lambda (x3: T).(pr3 a x1 x3)) (pc3 a x1 x2) (\lambda +(x3: T).(\lambda (H10: (subst1 d u x (lift (S O) d x3))).(\lambda (H11: (pr3 +a x1 x3)).(let H12 \def (eq_ind T x3 (\lambda (t: T).(pr3 a x1 t)) H11 x0 +(subst1_confluence_lift x x3 u d H10 x0 H8)) in (pc3_pr3_t a x1 x0 H12 x2 +H9))))) (pr3_gen_cabbr c t1 x H6 e u d H0 a0 H1 a H2 x1 H3))))) +(pr3_gen_cabbr c t2 x H7 e u d H0 a0 H1 a H2 x2 H4))))) H5))))))))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pc3/wcpr0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pc3/wcpr0.ma new file mode 100644 index 000000000..91d464fba --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pc3/wcpr0.ma @@ -0,0 +1,87 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/props.ma". + +include "basic_1A/wcpr0/getl.ma". + +fact pc3_wcpr0__pc3_wcpr0_t_aux: + \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (k: K).(\forall +(u: T).(\forall (t1: T).(\forall (t2: T).((pr3 (CHead c1 k u) t1 t2) \to (pc3 +(CHead c2 k u) t1 t2)))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(\lambda (k: +K).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 +(CHead c1 k u) t1 t2)).(pr3_ind (CHead c1 k u) (\lambda (t: T).(\lambda (t0: +T).(pc3 (CHead c2 k u) t t0))) (\lambda (t: T).(pc3_refl (CHead c2 k u) t)) +(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr2 (CHead c1 k u) t4 +t3)).(\lambda (t5: T).(\lambda (_: (pr3 (CHead c1 k u) t3 t5)).(\lambda (H3: +(pc3 (CHead c2 k u) t3 t5)).(pc3_t t3 (CHead c2 k u) t4 (insert_eq C (CHead +c1 k u) (\lambda (c: C).(pr2 c t4 t3)) (\lambda (_: C).(pc3 (CHead c2 k u) t4 +t3)) (\lambda (y: C).(\lambda (H4: (pr2 y t4 t3)).(pr2_ind (\lambda (c: +C).(\lambda (t: T).(\lambda (t0: T).((eq C c (CHead c1 k u)) \to (pc3 (CHead +c2 k u) t t0))))) (\lambda (c: C).(\lambda (t6: T).(\lambda (t0: T).(\lambda +(H5: (pr0 t6 t0)).(\lambda (_: (eq C c (CHead c1 k u))).(pc3_pr2_r (CHead c2 +k u) t6 t0 (pr2_free (CHead c2 k u) t6 t0 H5))))))) (\lambda (c: C).(\lambda +(d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H5: (getl i c (CHead d +(Bind Abbr) u0))).(\lambda (t6: T).(\lambda (t0: T).(\lambda (H6: (pr0 t6 +t0)).(\lambda (t: T).(\lambda (H7: (subst0 i u0 t0 t)).(\lambda (H8: (eq C c +(CHead c1 k u))).(let H9 \def (eq_ind C c (\lambda (c0: C).(getl i c0 (CHead +d (Bind Abbr) u0))) H5 (CHead c1 k u) H8) in (ex3_2_ind C T (\lambda (e2: +C).(\lambda (u2: T).(getl i (CHead c2 k u) (CHead e2 (Bind Abbr) u2)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: +T).(pr0 u0 u2))) (pc3 (CHead c2 k u) t6 t) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H10: (getl i (CHead c2 k u) (CHead x0 (Bind Abbr) x1))).(\lambda +(_: (wcpr0 d x0)).(\lambda (H12: (pr0 u0 x1)).(ex2_ind T (\lambda (t7: +T).(subst0 i x1 t0 t7)) (\lambda (t7: T).(pr0 t t7)) (pc3 (CHead c2 k u) t6 +t) (\lambda (x: T).(\lambda (H13: (subst0 i x1 t0 x)).(\lambda (H14: (pr0 t +x)).(pc3_pr2_u (CHead c2 k u) x t6 (pr2_delta (CHead c2 k u) x0 x1 i H10 t6 +t0 H6 x H13) t (pc3_pr2_x (CHead c2 k u) x t (pr2_free (CHead c2 k u) t x +H14)))))) (pr0_subst0_fwd u0 t0 t i H7 x1 H12))))))) (wcpr0_getl (CHead c1 k +u) (CHead c2 k u) (wcpr0_comp c1 c2 H u u (pr0_refl u) k) i d u0 (Bind Abbr) +H9)))))))))))))) y t4 t3 H4))) H1) t5 H3))))))) t1 t2 H0)))))))). + +lemma pc3_wcpr0_t: + \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t1: +T).(\forall (t2: T).((pr3 c1 t1 t2) \to (pc3 c2 t1 t2)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 +t2) \to (pc3 c0 t1 t2)))))) (\lambda (c: C).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H0: (pr3 c t1 t2)).(pc3_pr3_r c t1 t2 H0))))) (\lambda (c0: +C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (_: ((\forall (t1: +T).(\forall (t2: T).((pr3 c0 t1 t2) \to (pc3 c3 t1 t2)))))).(\lambda (u1: +T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H3: (pr3 (CHead c0 k u1) t1 t2)).(let H4 \def +(pc3_pr2_pr3_t c0 u1 t1 t2 k H3 u2 (pr2_free c0 u1 u2 H2)) in (ex2_ind T +(\lambda (t: T).(pr3 (CHead c0 k u2) t1 t)) (\lambda (t: T).(pr3 (CHead c0 k +u2) t2 t)) (pc3 (CHead c3 k u2) t1 t2) (\lambda (x: T).(\lambda (H5: (pr3 +(CHead c0 k u2) t1 x)).(\lambda (H6: (pr3 (CHead c0 k u2) t2 x)).(pc3_t x +(CHead c3 k u2) t1 (pc3_wcpr0__pc3_wcpr0_t_aux c0 c3 H0 k u2 t1 x H5) t2 +(pc3_s (CHead c3 k u2) x t2 (pc3_wcpr0__pc3_wcpr0_t_aux c0 c3 H0 k u2 t2 x +H6)))))) H4))))))))))))) c1 c2 H))). + +lemma pc3_wcpr0: + \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t1: +T).(\forall (t2: T).((pc3 c1 t1 t2) \to (pc3 c2 t1 t2)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H0: (pc3 c1 t1 t2)).(let H1 \def H0 in (ex2_ind +T (\lambda (t: T).(pr3 c1 t1 t)) (\lambda (t: T).(pr3 c1 t2 t)) (pc3 c2 t1 +t2) (\lambda (x: T).(\lambda (H2: (pr3 c1 t1 x)).(\lambda (H3: (pr3 c1 t2 +x)).(pc3_t x c2 t1 (pc3_wcpr0_t c1 c2 H t1 x H2) t2 (pc3_s c2 x t2 +(pc3_wcpr0_t c1 c2 H t2 x H3)))))) H1))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr0/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/dec.ma new file mode 100644 index 000000000..b5ccaf4da --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/dec.ma @@ -0,0 +1,520 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/props.ma". + +include "basic_1A/subst0/dec.ma". + +include "basic_1A/T/dec.ma". + +include "basic_1A/T/props.ma". + +lemma nf0_dec: + \forall (t1: T).(or (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T +(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t1 t2)))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to +(eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t t2))))) (\lambda (n: nat).(or_introl +(\forall (t2: T).((pr0 (TSort n) t2) \to (eq T (TSort n) t2))) (ex2 T +(\lambda (t2: T).((eq T (TSort n) t2) \to (\forall (P: Prop).P))) (\lambda +(t2: T).(pr0 (TSort n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TSort n) +t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T +(TSort n)) t2 (pr0_gen_sort t2 n H)))))) (\lambda (n: nat).(or_introl +(\forall (t2: T).((pr0 (TLRef n) t2) \to (eq T (TLRef n) t2))) (ex2 T +(\lambda (t2: T).((eq T (TLRef n) t2) \to (\forall (P: Prop).P))) (\lambda +(t2: T).(pr0 (TLRef n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TLRef n) +t2)).(eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) (refl_equal T +(TLRef n)) t2 (pr0_gen_lref t2 n H)))))) (\lambda (k: K).(\lambda (t: +T).(\lambda (H: (or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T +(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t t2))))).(\lambda (t0: T).(\lambda (H0: (or (\forall (t2: T).((pr0 +t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))))).(K_ind (\lambda (k0: K).(or +(\forall (t2: T).((pr0 (THead k0 t t0) t2) \to (eq T (THead k0 t t0) t2))) +(ex2 T (\lambda (t2: T).((eq T (THead k0 t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead k0 t t0) t2))))) (\lambda (b: +B).(B_ind (\lambda (b0: B).(or (\forall (t2: T).((pr0 (THead (Bind b0) t t0) +t2) \to (eq T (THead (Bind b0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T +(THead (Bind b0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Bind b0) t t0) t2))))) (or_intror (\forall (t2: T).((pr0 (THead (Bind +Abbr) t t0) t2) \to (eq T (THead (Bind Abbr) t t0) t2))) (ex2 T (\lambda (t2: +T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda +(t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (let H_x \def (dnf_dec t t0 O) in +(let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) +O v)) (eq T t0 (lift (S O) O v)))) (ex2 T (\lambda (t2: T).((eq T (THead +(Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Bind Abbr) t t0) t2))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t +t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 +(lift (S O) O x)) (eq T t0 (lift (S O) O x)) (ex2 T (\lambda (t2: T).((eq T +(THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Bind Abbr) t t0) t2))) (\lambda (H3: (subst0 O t t0 (lift (S +O) O x))).(ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) +\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) +t2)) (THead (Bind Abbr) t (lift (S O) O x)) (\lambda (H4: (eq T (THead (Bind +Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)))).(\lambda (P: Prop).(let +H5 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 +| (TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind +Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)) H4) in (let H6 \def +(eq_ind T t0 (\lambda (t2: T).(subst0 O t t2 (lift (S O) O x))) H3 (lift (S +O) O x) H5) in (subst0_refl t (lift (S O) O x) O H6 P))))) (pr0_delta t t +(pr0_refl t) t0 t0 (pr0_refl t0) (lift (S O) O x) H3))) (\lambda (H3: (eq T +t0 (lift (S O) O x))).(eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).((eq T (THead (Bind Abbr) t t2) t3) \to (\forall (P: +Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Abbr) t t2) t3)))) (ex_intro2 T +(\lambda (t2: T).((eq T (THead (Bind Abbr) t (lift (S O) O x)) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t (lift (S +O) O x)) t2)) x (\lambda (H4: (eq T (THead (Bind Abbr) t (lift (S O) O x)) +x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Abbr) x t (S O) O H4 P))) +(pr0_zeta Abbr not_abbr_abst x x (pr0_refl x) t)) t0 H3)) H2))) H1)))) (let +H1 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T +(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to +(eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead +(Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Bind Abst) t t0) t2)))) (\lambda (H2: ((\forall (t2: T).((pr0 t t2) +\to (eq T t t2))))).(let H3 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) +\to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead +(Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda +(H4: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall +(t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) +(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) t t0) t2)).(ex3_2_ind +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t0 t3))) (eq T (THead (Bind Abst) t t0) t2) (\lambda (x0: T).(\lambda +(x1: T).(\lambda (H6: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H7: (pr0 +t x0)).(\lambda (H8: (pr0 t0 x1)).(let H_y \def (H4 x1 H8) in (let H_y0 \def +(H2 x0 H7) in (let H9 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H8 t0 +H_y) in (let H10 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead (Bind +Abst) x0 t3))) H6 t0 H_y) in (let H11 \def (eq_ind_r T x0 (\lambda (t3: +T).(pr0 t t3)) H7 t H_y0) in (let H12 \def (eq_ind_r T x0 (\lambda (t3: +T).(eq T t2 (THead (Bind Abst) t3 t0))) H10 t H_y0) in (eq_ind_r T (THead +(Bind Abst) t t0) (\lambda (t3: T).(eq T (THead (Bind Abst) t t0) t3)) +(refl_equal T (THead (Bind Abst) t t0)) t2 H12)))))))))))) (pr0_gen_abst t t0 +t2 H5)))))) (\lambda (H4: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: +T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) +(or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead +(Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t +t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) +t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T t0 x) \to (\forall (P: +Prop).P)))).(\lambda (H6: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 +(THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (ex_intro2 T +(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) (THead (Bind +Abst) t x) (\lambda (H7: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t +x))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) +\Rightarrow t2])) (THead (Bind Abst) t t0) (THead (Bind Abst) t x) H7) in +(let H9 \def (eq_ind_r T x (\lambda (t2: T).(pr0 t0 t2)) H6 t0 H8) in (let +H10 \def (eq_ind_r T x (\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: +Prop).P0))) H5 t0 H8) in (H10 (refl_equal T t0) P)))))) (pr0_comp t t +(pr0_refl t) t0 x H6 (Bind Abst))))))) H4)) H3))) (\lambda (H2: (ex2 T +(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead +(Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (x: +T).(\lambda (H3: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr0 +t x)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq +T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind +Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Bind Abst) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind +Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Bind Abst) t t0) t2)) (THead (Bind Abst) x t0) (\lambda (H5: (eq T (THead +(Bind Abst) t t0) (THead (Bind Abst) x t0))).(\lambda (P: Prop).(let H6 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef +_) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead (Bind Abst) t t0) +(THead (Bind Abst) x t0) H5) in (let H7 \def (eq_ind_r T x (\lambda (t2: +T).(pr0 t t2)) H4 t H6) in (let H8 \def (eq_ind_r T x (\lambda (t2: T).((eq T +t t2) \to (\forall (P0: Prop).P0))) H3 t H6) in (H8 (refl_equal T t) P)))))) +(pr0_comp t x H4 t0 t0 (pr0_refl t0) (Bind Abst))))))) H2)) H1)) (let H_x +\def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or +(subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O v)))) (or (\forall +(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) +(\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 (lift (S O) O x)) (eq T t0 +(lift (S O) O x)))).(or_ind (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift +(S O) O x)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T +(THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind +Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Bind Void) t t0) t2)))) (\lambda (H3: (subst0 O t t0 (lift (S O) O x))).(let +H4 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T +(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to +(eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead +(Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Bind Void) t t0) t2)))) (\lambda (H5: ((\forall (t2: T).((pr0 t t2) +\to (eq T t t2))))).(let H6 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) +\to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead +(Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda +(H7: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall +(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) +(\lambda (t2: T).(\lambda (H8: (pr0 (THead (Bind Void) t t0) t2)).(or_ind +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda +(t3: T).(pr0 t0 t3)))) (pr0 t0 (lift (S O) O t2)) (eq T (THead (Bind Void) t +t0) t2) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) +(\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 +t3))) (eq T (THead (Bind Void) t t0) t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H10: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H11: (pr0 t +x0)).(\lambda (H12: (pr0 t0 x1)).(let H_y \def (H7 x1 H12) in (let H_y0 \def +(H5 x0 H11) in (let H13 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H12 +t0 H_y) in (let H14 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead +(Bind Void) x0 t3))) H10 t0 H_y) in (let H15 \def (eq_ind_r T x0 (\lambda +(t3: T).(pr0 t t3)) H11 t H_y0) in (let H16 \def (eq_ind_r T x0 (\lambda (t3: +T).(eq T t2 (THead (Bind Void) t3 t0))) H14 t H_y0) in (eq_ind_r T (THead +(Bind Void) t t0) (\lambda (t3: T).(eq T (THead (Bind Void) t t0) t3)) +(refl_equal T (THead (Bind Void) t t0)) t2 H16)))))))))))) H9)) (\lambda (H9: +(pr0 t0 (lift (S O) O t2))).(let H_y \def (H7 (lift (S O) O t2) H9) in (let +H10 \def (eq_ind T t0 (\lambda (t3: T).(subst0 O t t3 (lift (S O) O x))) H3 +(lift (S O) O t2) H_y) in (eq_ind_r T (lift (S O) O t2) (\lambda (t3: T).(eq +T (THead (Bind Void) t t3) t2)) (subst0_gen_lift_false t2 t (lift (S O) O x) +(S O) O O (le_O_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) +(le_n (plus (S O) O)) (plus O (S O)) (plus_sym O (S O))) H10 (eq T (THead +(Bind Void) t (lift (S O) O t2)) t2)) t0 H_y)))) (pr0_gen_void t t0 t2 +H8)))))) (\lambda (H7: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T +t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall +(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) +(\lambda (x0: T).(\lambda (H8: (((eq T t0 x0) \to (\forall (P: +Prop).P)))).(\lambda (H9: (pr0 t0 x0)).(or_intror (\forall (t2: T).((pr0 +(THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T +(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind +Void) t x0) (\lambda (H10: (eq T (THead (Bind Void) t t0) (THead (Bind Void) +t x0))).(\lambda (P: Prop).(let H11 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) +\Rightarrow t2])) (THead (Bind Void) t t0) (THead (Bind Void) t x0) H10) in +(let H12 \def (eq_ind_r T x0 (\lambda (t2: T).(pr0 t0 t2)) H9 t0 H11) in (let +H13 \def (eq_ind_r T x0 (\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: +Prop).P0))) H8 t0 H11) in (H13 (refl_equal T t0) P)))))) (pr0_comp t t +(pr0_refl t) t0 x0 H9 (Bind Void))))))) H7)) H6))) (\lambda (H5: (ex2 T +(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead +(Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda +(x0: T).(\lambda (H6: (((eq T t x0) \to (\forall (P: Prop).P)))).(\lambda +(H7: (pr0 t x0)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t t0) +t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T +(THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T +(THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind Void) x0 t0) (\lambda (H8: +(eq T (THead (Bind Void) t t0) (THead (Bind Void) x0 t0))).(\lambda (P: +Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) +(THead (Bind Void) t t0) (THead (Bind Void) x0 t0) H8) in (let H10 \def +(eq_ind_r T x0 (\lambda (t2: T).(pr0 t t2)) H7 t H9) in (let H11 \def +(eq_ind_r T x0 (\lambda (t2: T).((eq T t t2) \to (\forall (P0: Prop).P0))) H6 +t H9) in (H11 (refl_equal T t) P)))))) (pr0_comp t x0 H7 t0 t0 (pr0_refl t0) +(Bind Void))))))) H5)) H4))) (\lambda (H3: (eq T t0 (lift (S O) O x))).(let +H4 \def (eq_ind T t0 (\lambda (t2: T).(or (\forall (t3: T).((pr0 t2 t3) \to +(eq T t2 t3))) (ex2 T (\lambda (t3: T).((eq T t2 t3) \to (\forall (P: +Prop).P))) (\lambda (t3: T).(pr0 t2 t3))))) H0 (lift (S O) O x) H3) in +(eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(or (\forall (t3: T).((pr0 +(THead (Bind Void) t t2) t3) \to (eq T (THead (Bind Void) t t2) t3))) (ex2 T +(\lambda (t3: T).((eq T (THead (Bind Void) t t2) t3) \to (\forall (P: +Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Void) t t2) t3))))) (or_intror +(\forall (t2: T).((pr0 (THead (Bind Void) t (lift (S O) O x)) t2) \to (eq T +(THead (Bind Void) t (lift (S O) O x)) t2))) (ex2 T (\lambda (t2: T).((eq T +(THead (Bind Void) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S O) O x)) t2))) (ex_intro2 +T (\lambda (t2: T).((eq T (THead (Bind Void) t (lift (S O) O x)) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S +O) O x)) t2)) x (\lambda (H5: (eq T (THead (Bind Void) t (lift (S O) O x)) +x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Void) x t (S O) O H5 P))) +(pr0_zeta Void not_void_abst x x (pr0_refl x) t))) t0 H3))) H2))) H1))) b)) +(\lambda (f: F).(F_ind (\lambda (f0: F).(or (\forall (t2: T).((pr0 (THead +(Flat f0) t t0) t2) \to (eq T (THead (Flat f0) t t0) t2))) (ex2 T (\lambda +(t2: T).((eq T (THead (Flat f0) t t0) t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr0 (THead (Flat f0) t t0) t2))))) (let H_x \def +(binder_dec t0) in (let H1 \def H_x in (or_ind (ex_3 B T T (\lambda (b: +B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) +(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w +u)) \to (\forall (P: Prop).P))))) (or (\forall (t2: T).((pr0 (THead (Flat +Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: +T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda +(t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H2: (ex_3 B T T +(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w +u))))))).(ex_3_ind B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq +T t0 (THead (Bind b) w u))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t +t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq +T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x0: B).(\lambda (x1: +T).(\lambda (x2: T).(\lambda (H3: (eq T t0 (THead (Bind x0) x1 x2))).(let H4 +\def (eq_ind T t0 (\lambda (t2: T).(or (\forall (t3: T).((pr0 t2 t3) \to (eq +T t2 t3))) (ex2 T (\lambda (t3: T).((eq T t2 t3) \to (\forall (P: Prop).P))) +(\lambda (t3: T).(pr0 t2 t3))))) H0 (THead (Bind x0) x1 x2) H3) in (eq_ind_r +T (THead (Bind x0) x1 x2) (\lambda (t2: T).(or (\forall (t3: T).((pr0 (THead +(Flat Appl) t t2) t3) \to (eq T (THead (Flat Appl) t t2) t3))) (ex2 T +(\lambda (t3: T).((eq T (THead (Flat Appl) t t2) t3) \to (\forall (P: +Prop).P))) (\lambda (t3: T).(pr0 (THead (Flat Appl) t t2) t3))))) (B_ind +(\lambda (b: B).((or (\forall (t2: T).((pr0 (THead (Bind b) x1 x2) t2) \to +(eq T (THead (Bind b) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead +(Bind b) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Bind b) x1 x2) t2)))) \to (or (\forall (t2: T).((pr0 (THead (Flat Appl) t +(THead (Bind b) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind b) x1 +x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind +b) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat +Appl) t (THead (Bind b) x1 x2)) t2)))))) (\lambda (_: (or (\forall (t2: +T).((pr0 (THead (Bind Abbr) x1 x2) t2) \to (eq T (THead (Bind Abbr) x1 x2) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) x1 x2) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) x1 x2) +t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind +Abbr) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abbr) +x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat +Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T +(THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 +x2)) t2)) (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) +(\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) (THead +(Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: +Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ t2) \Rightarrow (match t2 with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow +(match k0 with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) +I (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in +(False_ind P H7)))) (pr0_upsilon Abbr not_abbr_abst t t (pr0_refl t) x1 x1 +(pr0_refl x1) x2 x2 (pr0_refl x2))))) (\lambda (_: (or (\forall (t2: T).((pr0 +(THead (Bind Abst) x1 x2) t2) \to (eq T (THead (Bind Abst) x1 x2) t2))) (ex2 +T (\lambda (t2: T).((eq T (THead (Bind Abst) x1 x2) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) x1 x2) t2))))).(or_intror +(\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) +\to (eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) +\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead +(Bind Abst) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat +Appl) t (THead (Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda +(t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2)) (THead +(Bind Abbr) t x2) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abst) +x1 x2)) (THead (Bind Abbr) t x2))).(\lambda (P: Prop).(let H7 \def (eq_ind T +(THead (Flat Appl) t (THead (Bind Abst) x1 x2)) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ +_) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (THead (Bind Abbr) t x2) H6) in (False_ind P H7)))) +(pr0_beta x1 t t (pr0_refl t) x2 x2 (pr0_refl x2))))) (\lambda (_: (or +(\forall (t2: T).((pr0 (THead (Bind Void) x1 x2) t2) \to (eq T (THead (Bind +Void) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) x1 x2) +t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) x1 +x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead +(Bind Void) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Void) x1 +x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind +Void) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Flat Appl) t (THead (Bind Void) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: +T).((eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) +x1 x2)) t2)) (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) +(\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (THead +(Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: +Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ t2) \Rightarrow (match t2 with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow +(match k0 with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) +I (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in +(False_ind P H7)))) (pr0_upsilon Void not_void_abst t t (pr0_refl t) x1 x1 +(pr0_refl x1) x2 x2 (pr0_refl x2))))) x0 H4) t0 H3)))))) H2)) (\lambda (H2: +((\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w +u)) \to (\forall (P: Prop).P))))))).(let H3 \def H in (or_ind (\forall (t2: +T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: +T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) +(\lambda (H4: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H5 \def +H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T +(\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to +(eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead +(Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Flat Appl) t t0) t2)))) (\lambda (H6: ((\forall (t2: T).((pr0 t0 t2) +\to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Flat Appl) t +t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq +T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Flat Appl) t t0) t2))) (\lambda (t2: T).(\lambda (H7: (pr0 +(THead (Flat Appl) t t0) t2)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (ex4_4 T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T +t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))) (eq T (THead (Flat Appl) t t0) t2) +(\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t0 t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 +t3))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H9: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H10: (pr0 t +x0)).(\lambda (H11: (pr0 t0 x1)).(let H_y \def (H6 x1 H11) in (let H_y0 \def +(H4 x0 H10) in (let H12 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H11 +t0 H_y) in (let H13 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead +(Flat Appl) x0 t3))) H9 t0 H_y) in (let H14 \def (eq_ind_r T x0 (\lambda (t3: +T).(pr0 t t3)) H10 t H_y0) in (let H15 \def (eq_ind_r T x0 (\lambda (t3: +T).(eq T t2 (THead (Flat Appl) t3 t0))) H13 t H_y0) in (eq_ind_r T (THead +(Flat Appl) t t0) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) +(refl_equal T (THead (Flat Appl) t t0)) t2 H15)))))))))))) H8)) (\lambda (H8: +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(pr0 z1 t3))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t3: T).(pr0 z1 t3))))) (eq T (THead (Flat Appl) t t0) t2) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda +(H9: (eq T t0 (THead (Bind Abst) x0 x1))).(\lambda (H10: (eq T t2 (THead +(Bind Abbr) x2 x3))).(\lambda (_: (pr0 t x2)).(\lambda (_: (pr0 x1 +x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t3: T).(eq T (THead +(Flat Appl) t t0) t3)) (let H13 \def (eq_ind T t0 (\lambda (t3: T).(\forall +(t4: T).((pr0 t3 t4) \to (eq T t3 t4)))) H6 (THead (Bind Abst) x0 x1) H9) in +(let H14 \def (eq_ind T t0 (\lambda (t3: T).(\forall (b: B).(\forall (w: +T).(\forall (u: T).((eq T t3 (THead (Bind b) w u)) \to (\forall (P: +Prop).P)))))) H2 (THead (Bind Abst) x0 x1) H9) in (eq_ind_r T (THead (Bind +Abst) x0 x1) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind +Abbr) x2 x3))) (H14 Abst x0 x1 (H13 (THead (Bind Abst) x0 x1) (pr0_refl +(THead (Bind Abst) x0 x1))) (eq T (THead (Flat Appl) t (THead (Bind Abst) x0 +x1)) (THead (Bind Abbr) x2 x3))) t0 H9))) t2 H10))))))))) H8)) (\lambda (H8: +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T +t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))))))).(ex6_6_ind B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3))))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: +B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H10: (eq T +t0 (THead (Bind x0) x1 x2))).(\lambda (H11: (eq T t2 (THead (Bind x0) x4 +(THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (_: (pr0 t x3)).(\lambda +(_: (pr0 x1 x4)).(\lambda (_: (pr0 x2 x5)).(eq_ind_r T (THead (Bind x0) x4 +(THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t3: T).(eq T (THead (Flat +Appl) t t0) t3)) (let H15 \def (eq_ind T t0 (\lambda (t3: T).(\forall (t4: +T).((pr0 t3 t4) \to (eq T t3 t4)))) H6 (THead (Bind x0) x1 x2) H10) in (let +H16 \def (eq_ind T t0 (\lambda (t3: T).(\forall (b: B).(\forall (w: +T).(\forall (u: T).((eq T t3 (THead (Bind b) w u)) \to (\forall (P: +Prop).P)))))) H2 (THead (Bind x0) x1 x2) H10) in (eq_ind_r T (THead (Bind x0) +x1 x2) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind x0) x4 +(THead (Flat Appl) (lift (S O) O x3) x5)))) (H16 x0 x1 x2 (H15 (THead (Bind +x0) x1 x2) (pr0_refl (THead (Bind x0) x1 x2))) (eq T (THead (Flat Appl) t +(THead (Bind x0) x1 x2)) (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O +x3) x5)))) t0 H10))) t2 H11))))))))))))) H8)) (pr0_gen_appl t t0 t2 H7)))))) +(\lambda (H6: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T +t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall +(t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) +(\lambda (x: T).(\lambda (H7: (((eq T t0 x) \to (\forall (P: +Prop).P)))).(\lambda (H8: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 +(THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (ex_intro2 T +(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)) (THead (Flat +Appl) t x) (\lambda (H9: (eq T (THead (Flat Appl) t t0) (THead (Flat Appl) t +x))).(\lambda (P: Prop).(let H10 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) +\Rightarrow t2])) (THead (Flat Appl) t t0) (THead (Flat Appl) t x) H9) in +(let H11 \def (eq_ind_r T x (\lambda (t2: T).(pr0 t0 t2)) H8 t0 H10) in (let +H12 \def (eq_ind_r T x (\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: +Prop).P0))) H7 t0 H10) in (H12 (refl_equal T t0) P)))))) (pr0_comp t t +(pr0_refl t) t0 x H8 (Flat Appl))))))) H6)) H5))) (\lambda (H4: (ex2 T +(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead +(Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x: +T).(\lambda (H5: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H6: (pr0 +t x)).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq +T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat +Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Flat Appl) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat +Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Flat Appl) t t0) t2)) (THead (Flat Appl) x t0) (\lambda (H7: (eq T (THead +(Flat Appl) t t0) (THead (Flat Appl) x t0))).(\lambda (P: Prop).(let H8 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef +_) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead (Flat Appl) t t0) +(THead (Flat Appl) x t0) H7) in (let H9 \def (eq_ind_r T x (\lambda (t2: +T).(pr0 t t2)) H6 t H8) in (let H10 \def (eq_ind_r T x (\lambda (t2: T).((eq +T t t2) \to (\forall (P0: Prop).P0))) H5 t H8) in (H10 (refl_equal T t) +P)))))) (pr0_comp t x H6 t0 t0 (pr0_refl t0) (Flat Appl))))))) H4)) H3))) +H1))) (or_intror (\forall (t2: T).((pr0 (THead (Flat Cast) t t0) t2) \to (eq +T (THead (Flat Cast) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat +Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Flat Cast) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat +Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Flat Cast) t t0) t2)) t0 (\lambda (H1: (eq T (THead (Flat Cast) t t0) +t0)).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) t t0 H1 P))) (pr0_tau t0 t0 +(pr0_refl t0) t))) f)) k)))))) t1). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/defs.ma new file mode 100644 index 000000000..bcbc781ea --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/defs.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/defs.ma". + +inductive pr0: T \to (T \to Prop) \def +| pr0_refl: \forall (t: T).(pr0 t t) +| pr0_comp: \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: +T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (k: K).(pr0 (THead k u1 t1) +(THead k u2 t2)))))))) +| pr0_beta: \forall (u: T).(\forall (v1: T).(\forall (v2: T).((pr0 v1 v2) \to +(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr0 (THead (Flat Appl) v1 +(THead (Bind Abst) u t1)) (THead (Bind Abbr) v2 t2)))))))) +| pr0_upsilon: \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: +T).(\forall (v2: T).((pr0 v1 v2) \to (\forall (u1: T).(\forall (u2: T).((pr0 +u1 u2) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr0 (THead +(Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t2))))))))))))) +| pr0_delta: \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: +T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (w: T).((subst0 O u2 t2 w) \to +(pr0 (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 w))))))))) +| pr0_zeta: \forall (b: B).((not (eq B b Abst)) \to (\forall (t1: T).(\forall +(t2: T).((pr0 t1 t2) \to (\forall (u: T).(pr0 (THead (Bind b) u (lift (S O) O +t1)) t2)))))) +| pr0_tau: \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (u: +T).(pr0 (THead (Flat Cast) u t1) t2)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/fwd.ma new file mode 100644 index 000000000..bff7d0b24 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/fwd.ma @@ -0,0 +1,1561 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/defs.ma". + +include "basic_1A/subst0/fwd.ma". + +implied rec lemma pr0_ind (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t +t))) (f0: (\forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to ((P u1 u2) \to +(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall +(k: K).(P (THead k u1 t1) (THead k u2 t2)))))))))))) (f1: (\forall (u: +T).(\forall (v1: T).(\forall (v2: T).((pr0 v1 v2) \to ((P v1 v2) \to (\forall +(t1: T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (P (THead (Flat +Appl) v1 (THead (Bind Abst) u t1)) (THead (Bind Abbr) v2 t2)))))))))))) (f2: +(\forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: +T).((pr0 v1 v2) \to ((P v1 v2) \to (\forall (u1: T).(\forall (u2: T).((pr0 u1 +u2) \to ((P u1 u2) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to ((P +t1 t2) \to (P (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t2)))))))))))))))))) (f3: (\forall +(u1: T).(\forall (u2: T).((pr0 u1 u2) \to ((P u1 u2) \to (\forall (t1: +T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall (w: T).((subst0 +O u2 t2 w) \to (P (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 +w))))))))))))) (f4: (\forall (b: B).((not (eq B b Abst)) \to (\forall (t1: +T).(\forall (t2: T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall (u: T).(P (THead +(Bind b) u (lift (S O) O t1)) t2))))))))) (f5: (\forall (t1: T).(\forall (t2: +T).((pr0 t1 t2) \to ((P t1 t2) \to (\forall (u: T).(P (THead (Flat Cast) u +t1) t2))))))) (t: T) (t0: T) (p: pr0 t t0) on p: P t t0 \def match p with +[(pr0_refl t1) \Rightarrow (f t1) | (pr0_comp u1 u2 p0 t1 t2 p1 k) +\Rightarrow (f0 u1 u2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) u1 u2 p0) t1 t2 p1 +((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p1) k) | (pr0_beta u v1 v2 p0 t1 t2 +p1) \Rightarrow (f1 u v1 v2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) v1 v2 p0) t1 +t2 p1 ((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p1)) | (pr0_upsilon b n v1 v2 p0 +u1 u2 p1 t1 t2 p2) \Rightarrow (f2 b n v1 v2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 +f5) v1 v2 p0) u1 u2 p1 ((pr0_ind P f f0 f1 f2 f3 f4 f5) u1 u2 p1) t1 t2 p2 +((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p2)) | (pr0_delta u1 u2 p0 t1 t2 p1 w +s0) \Rightarrow (f3 u1 u2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) u1 u2 p0) t1 t2 +p1 ((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p1) w s0) | (pr0_zeta b n t1 t2 p0 +u) \Rightarrow (f4 b n t1 t2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 f5) t1 t2 p0) u) +| (pr0_tau t1 t2 p0 u) \Rightarrow (f5 t1 t2 p0 ((pr0_ind P f f0 f1 f2 f3 f4 +f5) t1 t2 p0) u)]. + +lemma pr0_gen_sort: + \forall (x: T).(\forall (n: nat).((pr0 (TSort n) x) \to (eq T x (TSort n)))) +\def + \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TSort n) x)).(insert_eq +T (TSort n) (\lambda (t: T).(pr0 t x)) (\lambda (t: T).(eq T x t)) (\lambda +(y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: +T).((eq T t (TSort n)) \to (eq T t0 t)))) (\lambda (t: T).(\lambda (H1: (eq T +t (TSort n))).(let H2 \def (f_equal T T (\lambda (e: T).e) t (TSort n) H1) in +(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 t0)) (refl_equal T (TSort n)) +t H2)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda +(_: (((eq T u1 (TSort n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 +t1)))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u1 t1) (TSort n))).(let +H6 \def (eq_ind T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H5) in (False_ind (eq T (THead k u2 t2) (THead k u1 t1)) +H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: +(pr0 v1 v2)).(\lambda (_: (((eq T v1 (TSort n)) \to (eq T v2 v1)))).(\lambda +(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 +(TSort n)) \to (eq T t2 t1)))).(\lambda (H5: (eq T (THead (Flat Appl) v1 +(THead (Bind Abst) u t1)) (TSort n))).(let H6 \def (eq_ind T (THead (Flat +Appl) v1 (THead (Bind Abst) u t1)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H5) in (False_ind (eq T (THead (Bind Abbr) v2 t2) (THead +(Flat Appl) v1 (THead (Bind Abst) u t1))) H6)))))))))))) (\lambda (b: +B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (TSort n)) \to (eq T v2 +v1)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda +(_: (((eq T u1 (TSort n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 +t1)))).(\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) +(TSort n))).(let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 +t1)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H8) in +(False_ind (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) +(THead (Flat Appl) v1 (THead (Bind b) u1 t1))) H9))))))))))))))))) (\lambda +(u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 +(TSort n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: +(pr0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 t1)))).(\lambda +(w: T).(\lambda (_: (subst0 O u2 t2 w)).(\lambda (H6: (eq T (THead (Bind +Abbr) u1 t1) (TSort n))).(let H7 \def (eq_ind T (THead (Bind Abbr) u1 t1) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in +(False_ind (eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u1 t1)) +H7))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda +(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 +(TSort n)) \to (eq T t2 t1)))).(\lambda (u: T).(\lambda (H4: (eq T (THead +(Bind b) u (lift (S O) O t1)) (TSort n))).(let H5 \def (eq_ind T (THead (Bind +b) u (lift (S O) O t1)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H4) in (False_ind (eq T t2 (THead (Bind b) u (lift (S O) +O t1))) H5)))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 +t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 t1)))).(\lambda (u: +T).(\lambda (H3: (eq T (THead (Flat Cast) u t1) (TSort n))).(let H4 \def +(eq_ind T (THead (Flat Cast) u t1) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H3) in (False_ind (eq T t2 (THead (Flat Cast) u t1)) +H4)))))))) y x H0))) H))). + +lemma pr0_gen_lref: + \forall (x: T).(\forall (n: nat).((pr0 (TLRef n) x) \to (eq T x (TLRef n)))) +\def + \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TLRef n) x)).(insert_eq +T (TLRef n) (\lambda (t: T).(pr0 t x)) (\lambda (t: T).(eq T x t)) (\lambda +(y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: +T).((eq T t (TLRef n)) \to (eq T t0 t)))) (\lambda (t: T).(\lambda (H1: (eq T +t (TLRef n))).(let H2 \def (f_equal T T (\lambda (e: T).e) t (TLRef n) H1) in +(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 t0)) (refl_equal T (TLRef n)) +t H2)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda +(_: (((eq T u1 (TLRef n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 +t1)))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u1 t1) (TLRef n))).(let +H6 \def (eq_ind T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TLRef n) H5) in (False_ind (eq T (THead k u2 t2) (THead k u1 t1)) +H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: +(pr0 v1 v2)).(\lambda (_: (((eq T v1 (TLRef n)) \to (eq T v2 v1)))).(\lambda +(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 +(TLRef n)) \to (eq T t2 t1)))).(\lambda (H5: (eq T (THead (Flat Appl) v1 +(THead (Bind Abst) u t1)) (TLRef n))).(let H6 \def (eq_ind T (THead (Flat +Appl) v1 (THead (Bind Abst) u t1)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TLRef n) H5) in (False_ind (eq T (THead (Bind Abbr) v2 t2) (THead +(Flat Appl) v1 (THead (Bind Abst) u t1))) H6)))))))))))) (\lambda (b: +B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (TLRef n)) \to (eq T v2 +v1)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda +(_: (((eq T u1 (TLRef n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 +t1)))).(\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) +(TLRef n))).(let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 +t1)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H8) in +(False_ind (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) +(THead (Flat Appl) v1 (THead (Bind b) u1 t1))) H9))))))))))))))))) (\lambda +(u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 +(TLRef n)) \to (eq T u2 u1)))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: +(pr0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 t1)))).(\lambda +(w: T).(\lambda (_: (subst0 O u2 t2 w)).(\lambda (H6: (eq T (THead (Bind +Abbr) u1 t1) (TLRef n))).(let H7 \def (eq_ind T (THead (Bind Abbr) u1 t1) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in +(False_ind (eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u1 t1)) +H7))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda +(t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 t2)).(\lambda (_: (((eq T t1 +(TLRef n)) \to (eq T t2 t1)))).(\lambda (u: T).(\lambda (H4: (eq T (THead +(Bind b) u (lift (S O) O t1)) (TLRef n))).(let H5 \def (eq_ind T (THead (Bind +b) u (lift (S O) O t1)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TLRef n) H4) in (False_ind (eq T t2 (THead (Bind b) u (lift (S O) +O t1))) H5)))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (pr0 t1 +t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (eq T t2 t1)))).(\lambda (u: +T).(\lambda (H3: (eq T (THead (Flat Cast) u t1) (TLRef n))).(let H4 \def +(eq_ind T (THead (Flat Cast) u t1) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TLRef n) H3) in (False_ind (eq T t2 (THead (Flat Cast) u t1)) +H4)))))))) y x H0))) H))). + +lemma pr0_gen_abst: + \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abst) u1 +t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind +Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2))))))) +\def + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead +(Bind Abst) u1 t1) x)).(insert_eq T (THead (Bind Abst) u1 t1) (\lambda (t: +T).(pr0 t x)) (\lambda (_: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 +u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))) (\lambda (y: +T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: T).((eq T +t (THead (Bind Abst) u1 t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))))) (\lambda +(t: T).(\lambda (H1: (eq T t (THead (Bind Abst) u1 t1))).(let H2 \def +(f_equal T T (\lambda (e: T).e) t (THead (Bind Abst) u1 t1) H1) in (eq_ind_r +T (THead (Bind Abst) u1 t1) (\lambda (t0: T).(ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 +t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind +Abst) u1 t1) (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 +(refl_equal T (THead (Bind Abst) u1 t1)) (pr0_refl u1) (pr0_refl t1)) t +H2)))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda +(H2: (((eq T u0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Bind Abst) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 +t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (pr0 t0 +t2)).(\lambda (H4: (((eq T t0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3))))))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u0 t0) +(THead (Bind Abst) u1 t1))).(let H6 \def (f_equal T K (\lambda (e: T).(match +e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H5) in ((let H7 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | +(TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) +(THead (Bind Abst) u1 t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H5) +in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k (Bind Abst))).(eq_ind_r +K (Bind Abst) (\lambda (k0: K).(ex3_2 T T (\lambda (u3: T).(\lambda (t3: +T).(eq T (THead k0 u2 t2) (THead (Bind Abst) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3))))) (let H11 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind +Abst) u1 t1)) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 +(THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) +(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))) H4 t1 H8) in (let H12 \def +(eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind T +u0 (\lambda (t: T).((eq T t (THead (Bind Abst) u1 t1)) \to (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind Abst) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3)))))) H2 u1 H9) in (let H14 \def (eq_ind T u0 (\lambda (t: +T).(pr0 t u2)) H1 u1 H9) in (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: +T).(eq T (THead (Bind Abst) u2 t2) (THead (Bind Abst) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3))) u2 t2 (refl_equal T (THead (Bind Abst) u2 t2)) H14 H12))))) k H10)))) +H7)) H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u1 +t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind +Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2))))))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 +t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (H5: (eq T (THead (Flat Appl) +v1 (THead (Bind Abst) u t0)) (THead (Bind Abst) u1 t1))).(let H6 \def (eq_ind +T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ +_) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (THead (Bind Abst) u1 t1) H5) in (False_ind (ex3_2 T +T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead +(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) H6)))))))))))) (\lambda (b: +B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u1 +t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind +Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2))))))).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u1 +t1)) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind +Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2))))))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 +t1)) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (H8: (eq T (THead (Flat Appl) +v1 (THead (Bind b) u0 t0)) (THead (Bind Abst) u1 t1))).(let H9 \def (eq_ind T +(THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind Abst) u1 t1) H8) in (False_ind (ex3_2 T T (\lambda +(u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t2)) (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) +H9))))))))))))))))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (_: (pr0 u0 +u2)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind Abst) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: +T).(pr0 t1 t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 +t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 t1)) \to (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3))))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t2 +w)).(\lambda (H6: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abst) u1 +t1))).(let H7 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with +[Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | +(Flat _) \Rightarrow False])])) I (THead (Bind Abst) u1 t1) H6) in (False_ind +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) +(THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) +(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) H7))))))))))))) (\lambda (b: +B).(\lambda (H1: (not (eq B b Abst))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (_: (pr0 t0 t2)).(\lambda (H3: (((eq T t0 (THead (Bind Abst) u1 +t1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (u: T).(\lambda (H4: (eq T +(THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1))).(let H5 \def +(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef +_) \Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O +t0)) (THead (Bind Abst) u1 t1) H4) in ((let H6 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead +_ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind +Abst) u1 t1) H4) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | +(TLRef _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | +(THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead +(Bind Abst) u1 t1) H4) in (\lambda (_: (eq T u u1)).(\lambda (H9: (eq B b +Abst)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H1 +Abst H9) in (let H11 \def (eq_ind_r T t1 (\lambda (t: T).((eq T t0 (THead +(Bind Abst) u1 t)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))))) H3 (lift (S O) O t0) H7) in +(eq_ind T (lift (S O) O t0) (\lambda (t: T).(ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t +t3))))) (let H12 \def (match (H10 (refl_equal B Abst)) in False with []) in +H12) t1 H7)))))) H6)) H5)))))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda +(_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u1 t1)) \to +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3))))))).(\lambda (u: T).(\lambda (H3: (eq T +(THead (Flat Cast) u t0) (THead (Bind Abst) u1 t1))).(let H4 \def (eq_ind T +(THead (Flat Cast) u t0) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind Abst) u1 t1) H3) in (False_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) H4)))))))) y x H0))) H)))). + +lemma pr0_gen_appl: + \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Appl) u1 +t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) +v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t2: T).(pr0 z1 t2)))))))))))) +\def + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead +(Flat Appl) u1 t1) x)).(insert_eq T (THead (Flat Appl) u1 t1) (\lambda (t: +T).(pr0 t x)) (\lambda (_: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 +u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 +v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))) (\lambda (y: +T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda (t0: T).((eq T +t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T +t0 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 +v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))))) (\lambda (t: +T).(\lambda (H1: (eq T t (THead (Flat Appl) u1 t1))).(let H2 \def (f_equal T +T (\lambda (e: T).e) t (THead (Flat Appl) u1 t1) H1) in (eq_ind_r T (THead +(Flat Appl) u1 t1) (\lambda (t0: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T +t0 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 +v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))) (or3_intro0 (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead +(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind Abbr) u2 t2)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: +T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(v2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind b) v2 +(THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t2: T).(pr0 z1 t2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: +T).(eq T (THead (Flat Appl) u1 t1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 +t2))) u1 t1 (refl_equal T (THead (Flat Appl) u1 t1)) (pr0_refl u1) (pr0_refl +t1))) t H2)))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 +u2)).(\lambda (H2: (((eq T u0 (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: +T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind +Abbr) u3 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (v2: T).(\lambda (t2: T).(eq T u2 (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O u3) t2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda +(H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u1 t1)) \to +(or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) +u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (k: K).(\lambda (H5: (eq +T (THead k u0 t0) (THead (Flat Appl) u1 t1))).(let H6 \def (f_equal T K +(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u0 t0) (THead (Flat +Appl) u1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) +\Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H5) in ((let H8 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | +(TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) +(THead (Flat Appl) u1 t1) H5) in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: +(eq K k (Flat Appl))).(eq_ind_r K (Flat Appl) (\lambda (k0: K).(or3 (ex3_2 T +T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k0 u2 t2) (THead (Flat Appl) +u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: +T).(eq T (THead k0 u2 t2) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T +(THead k0 u2 t2) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) +t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda +(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 +y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))) (let H11 \def +(eq_ind T t0 (\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H4 t1 H8) in (let H12 \def (eq_ind +T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind T u0 +(\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Flat Appl) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind +Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T u2 (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3))))))))))) H2 u1 H9) in (let H14 \def (eq_ind T u0 +(\lambda (t: T).(pr0 t u2)) H1 u1 H9) in (or3_intro0 (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Flat Appl) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: +T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind Abbr) u3 t3)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda +(t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind b) v2 (THead (Flat Appl) +(lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3)))))))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead +(Flat Appl) u2 t2) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 +(refl_equal T (THead (Flat Appl) u2 t2)) H14 H12)))))) k H10)))) H7)) +H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda +(H1: (pr0 v1 v2)).(\lambda (H2: (((eq T v1 (THead (Flat Appl) u1 t1)) \to +(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Flat Appl) +u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: +T).(eq T v2 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t2: T).(eq T v2 (THead (Bind +b) v3 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u1 +t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (H5: (eq T (THead (Flat +Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1))).(let H6 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef +_) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 +(THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1) H5) in ((let H7 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead +(Bind Abst) u t0) | (TLRef _) \Rightarrow (THead (Bind Abst) u t0) | (THead _ +_ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead +(Flat Appl) u1 t1) H5) in (\lambda (H8: (eq T v1 u1)).(let H9 \def (eq_ind T +v1 (\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T v2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T v2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind b) v3 (THead +(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3))))))))))) H2 u1 H8) in (let H10 \def (eq_ind T v1 +(\lambda (t: T).(pr0 t v2)) H1 u1 H8) in (let H11 \def (eq_ind_r T t1 +(\lambda (t: T).((eq T t0 (THead (Flat Appl) u1 t)) \to (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v3 (THead +(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3))))))))))) H4 (THead (Bind Abst) u t0) H7) in (let H12 +\def (eq_ind_r T t1 (\lambda (t: T).((eq T u1 (THead (Flat Appl) u1 t)) \to +(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T v2 (THead (Flat Appl) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T v2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind +b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H9 (THead (Bind Abst) u t0) H7) in +(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).(or3 (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Flat Appl) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda +(t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind b) v3 (THead (Flat Appl) +(lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Bind Abbr) v2 t2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead +(Bind Abst) u t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind +Abbr) v2 t2) (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) +t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda +(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 +y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex4_4_intro T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) +v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) u t0 v2 t2 +(refl_equal T (THead (Bind Abst) u t0)) (refl_equal T (THead (Bind Abbr) v2 +t2)) H10 H3)) t1 H7))))))) H6)))))))))))) (\lambda (b: B).(\lambda (H1: (not +(eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H2: (pr0 v1 +v2)).(\lambda (H3: (((eq T v1 (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: +T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind +Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b0: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (v3: T).(\lambda (t2: T).(eq T v2 (THead (Bind b0) v3 (THead +(Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t2: T).(pr0 z1 t2)))))))))))).(\lambda (u0: T).(\lambda (u2: T).(\lambda +(H4: (pr0 u0 u2)).(\lambda (H5: (((eq T u0 (THead (Flat Appl) u1 t1)) \to +(or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) +u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead (Bind Abbr) u3 t2)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T +(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t2: T).(eq T u2 (THead (Bind +b0) v3 (THead (Flat Appl) (lift (S O) O u3) t2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (H6: (pr0 t0 t2)).(\lambda (H7: (((eq T t0 (THead (Flat Appl) u1 +t1)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (H8: (eq T (THead (Flat +Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1))).(let H9 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef +_) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 +(THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1) H8) in ((let H10 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead +(Bind b) u0 t0) | (TLRef _) \Rightarrow (THead (Bind b) u0 t0) | (THead _ _ +t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead +(Flat Appl) u1 t1) H8) in (\lambda (H11: (eq T v1 u1)).(let H12 \def (eq_ind +T v1 (\lambda (t: T).((eq T t (THead (Flat Appl) u1 t1)) \to (or3 (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T v2 (THead (Flat Appl) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T v2 (THead (Bind +Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind b0) v3 (THead +(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3))))))))))) H3 u1 H11) in (let H13 \def (eq_ind T v1 +(\lambda (t: T).(pr0 t v2)) H2 u1 H11) in (let H14 \def (eq_ind_r T t1 +(\lambda (t: T).((eq T t0 (THead (Flat Appl) u1 t)) \to (or3 (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind +b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Bind b0) v3 (THead +(Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3))))))))))) H7 (THead (Bind b) u0 t0) H10) in (let H15 \def +(eq_ind_r T t1 (\lambda (t: T).((eq T u0 (THead (Flat Appl) u1 t)) \to (or3 +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Flat Appl) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: +T).(eq T u2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t +(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T u2 (THead (Bind +b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H5 (THead (Bind b) u0 t0) H10) in +(let H16 \def (eq_ind_r T t1 (\lambda (t: T).((eq T u1 (THead (Flat Appl) u1 +t)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T v2 (THead +(Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(t3: T).(eq T v2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t +(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Bind +b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H12 (THead (Bind b) u0 t0) H10) in +(eq_ind T (THead (Bind b) u0 t0) (\lambda (t: T).(or3 (ex3_2 T T (\lambda +(u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t2)) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t2)) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t +(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat +Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Flat +Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 (THead (Bind b) u0 t0) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind b) u0 t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind Abbr) u3 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 +u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat +Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3)))))))) (ex6_6_intro B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 +Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind +b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat Appl) +(lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3))))))) b u0 t0 v2 u2 t2 H1 (refl_equal T (THead (Bind b) u0 t0)) +(refl_equal T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))) +H13 H4 H6)) t1 H10)))))))) H9))))))))))))))))) (\lambda (u0: T).(\lambda (u2: +T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead (Flat Appl) u1 +t1)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(t2: T).(eq T u2 (THead (Bind Abbr) u3 t2)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t2: T).(eq T u2 (THead (Bind +b) v2 (THead (Flat Appl) (lift (S O) O u3) t2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t2: T).(pr0 z1 t2)))))))))))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u1 +t1)) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (w: T).(\lambda (_: +(subst0 O u2 t2 w)).(\lambda (H6: (eq T (THead (Bind Abbr) u0 t0) (THead +(Flat Appl) u1 t1))).(let H7 \def (eq_ind T (THead (Bind Abbr) u0 t0) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u1 +t1) H6) in (False_ind (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T +(THead (Bind Abbr) u2 w) (THead (Flat Appl) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) +u2 w) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T (THead (Bind +Abbr) u2 w) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) +t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda +(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 +y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))) H7))))))))))))) +(\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (t0: T).(\lambda +(t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Appl) +u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b0) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (u: T).(\lambda (H4: (eq +T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) u1 t1))).(let H5 +\def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k +_ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) +\Rightarrow False])])) I (THead (Flat Appl) u1 t1) H4) in (False_ind (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b0) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))))))) H5)))))))))) (\lambda (t0: +T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead +(Flat Appl) u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T +t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 +v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))).(\lambda (u: +T).(\lambda (H3: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) u1 +t1))).(let H4 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k +_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) +\Rightarrow (match f with [Appl \Rightarrow False | Cast \Rightarrow +True])])])) I (THead (Flat Appl) u1 t1) H3) in (False_ind (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(t3: T).(pr0 z1 t3))))))))) H4)))))))) y x H0))) H)))). + +lemma pr0_gen_cast: + \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Cast) u1 +t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))))) +\def + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead +(Flat Cast) u1 t1) x)).(insert_eq T (THead (Flat Cast) u1 t1) (\lambda (t: +T).(pr0 t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 +u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))) +(\lambda (y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: T).(\lambda +(t0: T).((eq T t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 +t2)))) (pr0 t1 t0))))) (\lambda (t: T).(\lambda (H1: (eq T t (THead (Flat +Cast) u1 t1))).(let H2 \def (f_equal T T (\lambda (e: T).e) t (THead (Flat +Cast) u1 t1) H1) in (eq_ind_r T (THead (Flat Cast) u1 t1) (\lambda (t0: +T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat +Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 t0))) (or_introl (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) u1 t1) (THead +(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (THead (Flat Cast) u1 t1)) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) +u1 t1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 +u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T +(THead (Flat Cast) u1 t1)) (pr0_refl u1) (pr0_refl t1))) t H2)))) (\lambda +(u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda (H2: (((eq T u0 +(THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 +u2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (pr0 t0 t2)).(\lambda +(H4: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2))))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u0 t0) +(THead (Flat Cast) u1 t1))).(let H6 \def (f_equal T K (\lambda (e: T).(match +e with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H5) in ((let H7 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | +(TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) +(THead (Flat Cast) u1 t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H5) +in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k (Flat Cast))).(eq_ind_r +K (Flat Cast) (\lambda (k0: K).(or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: +T).(eq T (THead k0 u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 (THead k0 u2 t2)))) (let H11 \def (eq_ind T t0 (\lambda (t: +T).((eq T t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2)))) H4 t1 H8) in (let H12 \def (eq_ind T t0 (\lambda (t: +T).(pr0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind T u0 (\lambda (t: T).((eq T +t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda +(t3: T).(eq T u2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 +u2)))) H2 u1 H9) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 +u1 H9) in (or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T +(THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 (THead (Flat Cast) u2 t2)) (ex3_2_intro T T (\lambda (u3: +T).(\lambda (t3: T).(eq T (THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Flat Cast) u2 +t2)) H14 H12)))))) k H10)))) H7)) H6)))))))))))) (\lambda (u: T).(\lambda +(v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 +(THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T v2 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 +v2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda +(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2))))).(\lambda (H5: (eq T (THead (Flat Appl) v1 (THead (Bind +Abst) u t0)) (THead (Flat Cast) u1 t1))).(let H6 \def (eq_ind T (THead (Flat +Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f +with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat +Cast) u1 t1) H5) in (False_ind (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abbr) v2 t2) (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 (THead (Bind Abbr) v2 t2))) H6)))))))))))) (\lambda (b: +B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Flat Cast) u1 +t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead +(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 v2))))).(\lambda (u0: +T).(\lambda (u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead +(Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 +u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 +u2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda +(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2))))).(\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind +b) u0 t0)) (THead (Flat Cast) u1 t1))).(let H9 \def (eq_ind T (THead (Flat +Appl) v1 (THead (Bind b) u0 t0)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f +with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat +Cast) u1 t1) H8) in (False_ind (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: +T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead +(Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t2)))) H9))))))))))))))))) (\lambda (u0: +T).(\lambda (u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead +(Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 +u3))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 +u2))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda +(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t2 +w)).(\lambda (H6: (eq T (THead (Bind Abbr) u0 t0) (THead (Flat Cast) u1 +t1))).(let H7 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat +_) \Rightarrow False])])) I (THead (Flat Cast) u1 t1) H6) in (False_ind (or +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) +(THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) +(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (THead (Bind Abbr) u2 +w))) H7))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b +Abst))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda +(_: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2))))).(\lambda (u: T).(\lambda (H4: (eq T (THead (Bind b) u +(lift (S O) O t0)) (THead (Flat Cast) u1 t1))).(let H5 \def (eq_ind T (THead +(Bind b) u (lift (S O) O t0)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I +(THead (Flat Cast) u1 t1) H4) in (False_ind (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2)) H5)))))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda +(H1: (pr0 t0 t2)).(\lambda (H2: (((eq T t0 (THead (Flat Cast) u1 t1)) \to (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2))))).(\lambda (u: T).(\lambda +(H3: (eq T (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1))).(let H4 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef +_) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) +(THead (Flat Cast) u1 t1) H3) in ((let H5 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u1 +t1) H3) in (\lambda (_: (eq T u u1)).(let H7 \def (eq_ind T t0 (\lambda (t: +T).((eq T t (THead (Flat Cast) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 t2)))) H2 t1 H5) in (let H8 \def (eq_ind T t0 (\lambda (t: +T).(pr0 t t2)) H1 t1 H5) in (or_intror (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) +H8))))) H4)))))))) y x H0))) H)))). + +lemma pr0_gen_lift: + \forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((pr0 +(lift h d t1) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda +(t2: T).(pr0 t1 t2))))))) +\def + \lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H: (pr0 (lift h d t1) x)).(insert_eq T (lift h d t1) (\lambda (t: T).(pr0 t +x)) (\lambda (_: T).(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda +(t2: T).(pr0 t1 t2)))) (\lambda (y: T).(\lambda (H0: (pr0 y x)).(unintro nat +d (\lambda (n: nat).((eq T y (lift h n t1)) \to (ex2 T (\lambda (t2: T).(eq T +x (lift h n t2))) (\lambda (t2: T).(pr0 t1 t2))))) (unintro T t1 (\lambda (t: +T).(\forall (x0: nat).((eq T y (lift h x0 t)) \to (ex2 T (\lambda (t2: T).(eq +T x (lift h x0 t2))) (\lambda (t2: T).(pr0 t t2)))))) (pr0_ind (\lambda (t: +T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: nat).((eq T t (lift h x1 +x0)) \to (ex2 T (\lambda (t2: T).(eq T t0 (lift h x1 t2))) (\lambda (t2: +T).(pr0 x0 t2)))))))) (\lambda (t: T).(\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H1: (eq T t (lift h x1 x0))).(ex_intro2 T (\lambda (t2: T).(eq +T t (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)) x0 H1 (pr0_refl x0)))))) +(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (H2: +((\forall (x0: T).(\forall (x1: nat).((eq T u1 (lift h x1 x0)) \to (ex2 T +(\lambda (t2: T).(eq T u2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 +t2)))))))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 +t3)).(\lambda (H4: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 +x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: +T).(pr0 x0 t4)))))))).(\lambda (k: K).(\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H5: (eq T (THead k u1 t2) (lift h x1 x0))).(K_ind (\lambda +(k0: K).((eq T (THead k0 u1 t2) (lift h x1 x0)) \to (ex2 T (\lambda (t4: +T).(eq T (THead k0 u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))))) +(\lambda (b: B).(\lambda (H6: (eq T (THead (Bind b) u1 t2) (lift h x1 +x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Bind +b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) +(\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda +(t4: T).(eq T (THead (Bind b) u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 +x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 (THead +(Bind b) x2 x3))).(\lambda (H8: (eq T u1 (lift h x1 x2))).(\lambda (H9: (eq T +t2 (lift h (S x1) x3))).(eq_ind_r T (THead (Bind b) x2 x3) (\lambda (t: +T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 t3) (lift h x1 t4))) +(\lambda (t4: T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 (lift h +(S x1) t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: T).(eq T +(THead (Bind b) u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) +x2 x3) t4))) (\lambda (x4: T).(\lambda (H_x: (eq T t3 (lift h (S x1) +x4))).(\lambda (H10: (pr0 x3 x4)).(eq_ind_r T (lift h (S x1) x4) (\lambda (t: +T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 t) (lift h x1 t4))) +(\lambda (t4: T).(pr0 (THead (Bind b) x2 x3) t4)))) (ex2_ind T (\lambda (t4: +T).(eq T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda +(t4: T).(eq T (THead (Bind b) u2 (lift h (S x1) x4)) (lift h x1 t4))) +(\lambda (t4: T).(pr0 (THead (Bind b) x2 x3) t4))) (\lambda (x5: T).(\lambda +(H_x0: (eq T u2 (lift h x1 x5))).(\lambda (H11: (pr0 x2 x5)).(eq_ind_r T +(lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) +t (lift h (S x1) x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) +x2 x3) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 +x5) (lift h (S x1) x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind +b) x2 x3) t4)) (THead (Bind b) x5 x4) (sym_eq T (lift h x1 (THead (Bind b) x5 +x4)) (THead (Bind b) (lift h x1 x5) (lift h (S x1) x4)) (lift_bind b x5 x4 h +x1)) (pr0_comp x2 x5 H11 x3 x4 H10 (Bind b))) u2 H_x0)))) (H2 x2 x1 H8)) t3 +H_x)))) (H4 x3 (S x1) H9)) x0 H7)))))) (lift_gen_bind b u1 t2 x0 h x1 H6)))) +(\lambda (f: F).(\lambda (H6: (eq T (THead (Flat f) u1 t2) (lift h x1 +x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat +f) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) +(\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h x1 z)))) (ex2 T (\lambda +(t4: T).(eq T (THead (Flat f) u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 +x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 (THead +(Flat f) x2 x3))).(\lambda (H8: (eq T u1 (lift h x1 x2))).(\lambda (H9: (eq T +t2 (lift h x1 x3))).(eq_ind_r T (THead (Flat f) x2 x3) (\lambda (t: T).(ex2 T +(\lambda (t4: T).(eq T (THead (Flat f) u2 t3) (lift h x1 t4))) (\lambda (t4: +T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) +(\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Flat f) +u2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat f) x2 x3) t4))) +(\lambda (x4: T).(\lambda (H_x: (eq T t3 (lift h x1 x4))).(\lambda (H10: (pr0 +x3 x4)).(eq_ind_r T (lift h x1 x4) (\lambda (t: T).(ex2 T (\lambda (t4: +T).(eq T (THead (Flat f) u2 t) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead +(Flat f) x2 x3) t4)))) (ex2_ind T (\lambda (t4: T).(eq T u2 (lift h x1 t4))) +(\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda (t4: T).(eq T (THead (Flat f) +u2 (lift h x1 x4)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat f) x2 +x3) t4))) (\lambda (x5: T).(\lambda (H_x0: (eq T u2 (lift h x1 x5))).(\lambda +(H11: (pr0 x2 x5)).(eq_ind_r T (lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda +(t4: T).(eq T (THead (Flat f) t (lift h x1 x4)) (lift h x1 t4))) (\lambda +(t4: T).(pr0 (THead (Flat f) x2 x3) t4)))) (ex_intro2 T (\lambda (t4: T).(eq +T (THead (Flat f) (lift h x1 x5) (lift h x1 x4)) (lift h x1 t4))) (\lambda +(t4: T).(pr0 (THead (Flat f) x2 x3) t4)) (THead (Flat f) x5 x4) (sym_eq T +(lift h x1 (THead (Flat f) x5 x4)) (THead (Flat f) (lift h x1 x5) (lift h x1 +x4)) (lift_flat f x5 x4 h x1)) (pr0_comp x2 x5 H11 x3 x4 H10 (Flat f))) u2 +H_x0)))) (H2 x2 x1 H8)) t3 H_x)))) (H4 x3 x1 H9)) x0 H7)))))) (lift_gen_flat +f u1 t2 x0 h x1 H6)))) k H5))))))))))))) (\lambda (u: T).(\lambda (v1: +T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (H2: ((\forall (x0: +T).(\forall (x1: nat).((eq T v1 (lift h x1 x0)) \to (ex2 T (\lambda (t2: +T).(eq T v2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda +(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H4: ((\forall +(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: +T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda +(x0: T).(\lambda (x1: nat).(\lambda (H5: (eq T (THead (Flat Appl) v1 (THead +(Bind Abst) u t2)) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda +(z: T).(eq T x0 (THead (Flat Appl) y0 z)))) (\lambda (y0: T).(\lambda (_: +T).(eq T v1 (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T (THead +(Bind Abst) u t2) (lift h x1 z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind +Abbr) v2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: +T).(\lambda (x3: T).(\lambda (H6: (eq T x0 (THead (Flat Appl) x2 +x3))).(\lambda (H7: (eq T v1 (lift h x1 x2))).(\lambda (H8: (eq T (THead +(Bind Abst) u t2) (lift h x1 x3))).(eq_ind_r T (THead (Flat Appl) x2 x3) +(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift +h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (ex3_2_ind T T (\lambda (y0: +T).(\lambda (z: T).(eq T x3 (THead (Bind Abst) y0 z)))) (\lambda (y0: +T).(\lambda (_: T).(eq T u (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: +T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda (t4: T).(eq T (THead (Bind +Abbr) v2 t3) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 x3) +t4))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H9: (eq T x3 (THead (Bind +Abst) x4 x5))).(\lambda (_: (eq T u (lift h x1 x4))).(\lambda (H11: (eq T t2 +(lift h (S x1) x5))).(eq_ind_r T (THead (Bind Abst) x4 x5) (\lambda (t: +T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift h x1 t4))) +(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 t) t4)))) (ex2_ind T (\lambda +(t4: T).(eq T t3 (lift h (S x1) t4))) (\lambda (t4: T).(pr0 x5 t4)) (ex2 T +(\lambda (t4: T).(eq T (THead (Bind Abbr) v2 t3) (lift h x1 t4))) (\lambda +(t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4))) (\lambda +(x6: T).(\lambda (H_x: (eq T t3 (lift h (S x1) x6))).(\lambda (H12: (pr0 x5 +x6)).(eq_ind_r T (lift h (S x1) x6) (\lambda (t: T).(ex2 T (\lambda (t4: +T).(eq T (THead (Bind Abbr) v2 t) (lift h x1 t4))) (\lambda (t4: T).(pr0 +(THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4)))) (ex2_ind T (\lambda +(t4: T).(eq T v2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 T +(\lambda (t4: T).(eq T (THead (Bind Abbr) v2 (lift h (S x1) x6)) (lift h x1 +t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) +t4))) (\lambda (x7: T).(\lambda (H_x0: (eq T v2 (lift h x1 x7))).(\lambda +(H13: (pr0 x2 x7)).(eq_ind_r T (lift h x1 x7) (\lambda (t: T).(ex2 T (\lambda +(t4: T).(eq T (THead (Bind Abbr) t (lift h (S x1) x6)) (lift h x1 t4))) +(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind Abst) x4 x5)) t4)))) +(ex_intro2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x7) (lift h +(S x1) x6)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 +(THead (Bind Abst) x4 x5)) t4)) (THead (Bind Abbr) x7 x6) (sym_eq T (lift h +x1 (THead (Bind Abbr) x7 x6)) (THead (Bind Abbr) (lift h x1 x7) (lift h (S +x1) x6)) (lift_bind Abbr x7 x6 h x1)) (pr0_beta x4 x2 x7 H13 x5 x6 H12)) v2 +H_x0)))) (H2 x2 x1 H7)) t3 H_x)))) (H4 x5 (S x1) H11)) x3 H9)))))) +(lift_gen_bind Abst u t2 x3 h x1 H8)) x0 H6)))))) (lift_gen_flat Appl v1 +(THead (Bind Abst) u t2) x0 h x1 H5)))))))))))))) (\lambda (b: B).(\lambda +(H1: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 +v1 v2)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: nat).((eq T v1 (lift h +x1 x0)) \to (ex2 T (\lambda (t2: T).(eq T v2 (lift h x1 t2))) (\lambda (t2: +T).(pr0 x0 t2)))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 +u2)).(\lambda (H5: ((\forall (x0: T).(\forall (x1: nat).((eq T u1 (lift h x1 +x0)) \to (ex2 T (\lambda (t2: T).(eq T u2 (lift h x1 t2))) (\lambda (t2: +T).(pr0 x0 t2)))))))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 +t3)).(\lambda (H7: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 +x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: +T).(pr0 x0 t4)))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H8: (eq T +(THead (Flat Appl) v1 (THead (Bind b) u1 t2)) (lift h x1 x0))).(ex3_2_ind T T +(\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat Appl) y0 z)))) +(\lambda (y0: T).(\lambda (_: T).(eq T v1 (lift h x1 y0)))) (\lambda (_: +T).(\lambda (z: T).(eq T (THead (Bind b) u1 t2) (lift h x1 z)))) (ex2 T +(\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: +T).(\lambda (x3: T).(\lambda (H9: (eq T x0 (THead (Flat Appl) x2 +x3))).(\lambda (H10: (eq T v1 (lift h x1 x2))).(\lambda (H11: (eq T (THead +(Bind b) u1 t2) (lift h x1 x3))).(eq_ind_r T (THead (Flat Appl) x2 x3) +(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) +(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x3 (THead (Bind b) y0 +z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) (\lambda +(_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda (t4: +T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (lift h +x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 x3) t4))) (\lambda (x4: +T).(\lambda (x5: T).(\lambda (H12: (eq T x3 (THead (Bind b) x4 x5))).(\lambda +(H13: (eq T u1 (lift h x1 x4))).(\lambda (H14: (eq T t2 (lift h (S x1) +x5))).(eq_ind_r T (THead (Bind b) x4 x5) (\lambda (t: T).(ex2 T (\lambda (t4: +T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (lift h +x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 t) t4)))) (ex2_ind T +(\lambda (t4: T).(eq T t3 (lift h (S x1) t4))) (\lambda (t4: T).(pr0 x5 t4)) +(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t3)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 +(THead (Bind b) x4 x5)) t4))) (\lambda (x6: T).(\lambda (H_x: (eq T t3 (lift +h (S x1) x6))).(\lambda (H15: (pr0 x5 x6)).(eq_ind_r T (lift h (S x1) x6) +(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead +(Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) (ex2_ind T (\lambda (t4: T).(eq +T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x4 t4)) (ex2 T (\lambda (t4: +T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift h (S +x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead +(Bind b) x4 x5)) t4))) (\lambda (x7: T).(\lambda (H_x0: (eq T u2 (lift h x1 +x7))).(\lambda (H16: (pr0 x4 x7)).(eq_ind_r T (lift h x1 x7) (\lambda (t: +T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) t (THead (Flat Appl) (lift +(S O) O v2) (lift h (S x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 +(THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) (ex2_ind T (\lambda (t4: +T).(eq T v2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 T (\lambda +(t4: T).(eq T (THead (Bind b) (lift h x1 x7) (THead (Flat Appl) (lift (S O) O +v2) (lift h (S x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat +Appl) x2 (THead (Bind b) x4 x5)) t4))) (\lambda (x8: T).(\lambda (H_x1: (eq T +v2 (lift h x1 x8))).(\lambda (H17: (pr0 x2 x8)).(eq_ind_r T (lift h x1 x8) +(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 x7) +(THead (Flat Appl) (lift (S O) O t) (lift h (S x1) x6))) (lift h x1 t4))) +(\lambda (t4: T).(pr0 (THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) +(eq_ind T (lift h (plus (S O) x1) (lift (S O) O x8)) (\lambda (t: T).(ex2 T +(\lambda (t4: T).(eq T (THead (Bind b) (lift h x1 x7) (THead (Flat Appl) t +(lift h (S x1) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat +Appl) x2 (THead (Bind b) x4 x5)) t4)))) (eq_ind T (lift h (S x1) (THead (Flat +Appl) (lift (S O) O x8) x6)) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T +(THead (Bind b) (lift h x1 x7) t) (lift h x1 t4))) (\lambda (t4: T).(pr0 +(THead (Flat Appl) x2 (THead (Bind b) x4 x5)) t4)))) (ex_intro2 T (\lambda +(t4: T).(eq T (THead (Bind b) (lift h x1 x7) (lift h (S x1) (THead (Flat +Appl) (lift (S O) O x8) x6))) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead +(Flat Appl) x2 (THead (Bind b) x4 x5)) t4)) (THead (Bind b) x7 (THead (Flat +Appl) (lift (S O) O x8) x6)) (sym_eq T (lift h x1 (THead (Bind b) x7 (THead +(Flat Appl) (lift (S O) O x8) x6))) (THead (Bind b) (lift h x1 x7) (lift h (S +x1) (THead (Flat Appl) (lift (S O) O x8) x6))) (lift_bind b x7 (THead (Flat +Appl) (lift (S O) O x8) x6) h x1)) (pr0_upsilon b H1 x2 x8 H17 x4 x7 H16 x5 +x6 H15)) (THead (Flat Appl) (lift h (S x1) (lift (S O) O x8)) (lift h (S x1) +x6)) (lift_flat Appl (lift (S O) O x8) x6 h (S x1))) (lift (S O) O (lift h x1 +x8)) (lift_d x8 h (S O) x1 O (le_O_n x1))) v2 H_x1)))) (H3 x2 x1 H10)) u2 +H_x0)))) (H5 x4 x1 H13)) t3 H_x)))) (H7 x5 (S x1) H14)) x3 H12)))))) +(lift_gen_bind b u1 t2 x3 h x1 H11)) x0 H9)))))) (lift_gen_flat Appl v1 +(THead (Bind b) u1 t2) x0 h x1 H8))))))))))))))))))) (\lambda (u1: +T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (H2: ((\forall (x0: +T).(\forall (x1: nat).((eq T u1 (lift h x1 x0)) \to (ex2 T (\lambda (t2: +T).(eq T u2 (lift h x1 t2))) (\lambda (t2: T).(pr0 x0 t2)))))))).(\lambda +(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H4: ((\forall +(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: +T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda (w: +T).(\lambda (H5: (subst0 O u2 t3 w)).(\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H6: (eq T (THead (Bind Abbr) u1 t2) (lift h x1 +x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Bind +Abbr) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u1 (lift h x1 y0)))) +(\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T (\lambda +(t4: T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 t4))) (\lambda (t4: T).(pr0 +x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 (THead +(Bind Abbr) x2 x3))).(\lambda (H8: (eq T u1 (lift h x1 x2))).(\lambda (H9: +(eq T t2 (lift h (S x1) x3))).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda +(t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 +t4))) (\lambda (t4: T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 +(lift h (S x1) t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: +T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 t4))) (\lambda (t4: T).(pr0 +(THead (Bind Abbr) x2 x3) t4))) (\lambda (x4: T).(\lambda (H_x: (eq T t3 +(lift h (S x1) x4))).(\lambda (H10: (pr0 x3 x4)).(let H11 \def (eq_ind T t3 +(\lambda (t: T).(subst0 O u2 t w)) H5 (lift h (S x1) x4) H_x) in (ex2_ind T +(\lambda (t4: T).(eq T u2 (lift h x1 t4))) (\lambda (t4: T).(pr0 x2 t4)) (ex2 +T (\lambda (t4: T).(eq T (THead (Bind Abbr) u2 w) (lift h x1 t4))) (\lambda +(t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4))) (\lambda (x5: T).(\lambda (H_x0: +(eq T u2 (lift h x1 x5))).(\lambda (H12: (pr0 x2 x5)).(eq_ind_r T (lift h x1 +x5) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) t w) +(lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4)))) (let +H13 \def (eq_ind T u2 (\lambda (t: T).(subst0 O t (lift h (S x1) x4) w)) H11 +(lift h x1 x5) H_x0) in (let H14 \def (refl_equal nat (S (plus O x1))) in +(let H15 \def (eq_ind nat (S x1) (\lambda (n: nat).(subst0 O (lift h x1 x5) +(lift h n x4) w)) H13 (S (plus O x1)) H14) in (ex2_ind T (\lambda (t4: T).(eq +T w (lift h (S (plus O x1)) t4))) (\lambda (t4: T).(subst0 O x5 x4 t4)) (ex2 +T (\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x5) w) (lift h x1 +t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4))) (\lambda (x6: +T).(\lambda (H16: (eq T w (lift h (S (plus O x1)) x6))).(\lambda (H17: +(subst0 O x5 x4 x6)).(eq_ind_r T (lift h (S (plus O x1)) x6) (\lambda (t: +T).(ex2 T (\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x5) t) (lift h +x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) t4)))) (ex_intro2 T +(\lambda (t4: T).(eq T (THead (Bind Abbr) (lift h x1 x5) (lift h (S (plus O +x1)) x6)) (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind Abbr) x2 x3) +t4)) (THead (Bind Abbr) x5 x6) (sym_eq T (lift h x1 (THead (Bind Abbr) x5 +x6)) (THead (Bind Abbr) (lift h x1 x5) (lift h (S (plus O x1)) x6)) +(lift_bind Abbr x5 x6 h (plus O x1))) (pr0_delta x2 x5 H12 x3 x4 H10 x6 H17)) +w H16)))) (subst0_gen_lift_lt x5 x4 w O h x1 H15))))) u2 H_x0)))) (H2 x2 x1 +H8)))))) (H4 x3 (S x1) H9)) x0 H7)))))) (lift_gen_bind Abbr u1 t2 x0 h x1 +H6))))))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b Abst))).(\lambda +(t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 t3)).(\lambda (H3: ((\forall +(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (ex2 T (\lambda (t4: +T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4)))))))).(\lambda (u: +T).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: (eq T (THead (Bind b) u +(lift (S O) O t2)) (lift h x1 x0))).(ex3_2_ind T T (\lambda (y0: T).(\lambda +(z: T).(eq T x0 (THead (Bind b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq +T u (lift h x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift (S O) O t2) +(lift h (S x1) z)))) (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) +(\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda +(H5: (eq T x0 (THead (Bind b) x2 x3))).(\lambda (_: (eq T u (lift h x1 +x2))).(\lambda (H7: (eq T (lift (S O) O t2) (lift h (S x1) x3))).(eq_ind_r T +(THead (Bind b) x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T t3 (lift +h x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (let H8 \def (eq_ind_r nat (plus (S +O) x1) (\lambda (n: nat).(eq nat (S x1) n)) (le_antisym (S x1) (plus (S O) +x1) (le_n (plus (S O) x1)) (le_n (S x1))) (plus x1 (S O)) (plus_sym x1 (S +O))) in (let H9 \def (eq_ind nat (S x1) (\lambda (n: nat).(eq T (lift (S O) O +t2) (lift h n x3))) H7 (plus x1 (S O)) H8) in (ex2_ind T (\lambda (t4: T).(eq +T x3 (lift (S O) O t4))) (\lambda (t4: T).(eq T t2 (lift h x1 t4))) (ex2 T +(\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind +b) x2 x3) t4))) (\lambda (x4: T).(\lambda (H10: (eq T x3 (lift (S O) O +x4))).(\lambda (H11: (eq T t2 (lift h x1 x4))).(eq_ind_r T (lift (S O) O x4) +(\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda +(t4: T).(pr0 (THead (Bind b) x2 t) t4)))) (ex2_ind T (\lambda (t4: T).(eq T +t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 x4 t4)) (ex2 T (\lambda (t4: T).(eq +T t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 (lift (S O) O +x4)) t4))) (\lambda (x5: T).(\lambda (H_x: (eq T t3 (lift h x1 x5))).(\lambda +(H12: (pr0 x4 x5)).(eq_ind_r T (lift h x1 x5) (\lambda (t: T).(ex2 T (\lambda +(t4: T).(eq T t (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 +(lift (S O) O x4)) t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (lift h x1 x5) +(lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Bind b) x2 (lift (S O) O x4)) +t4)) x5 (refl_equal T (lift h x1 x5)) (pr0_zeta b H1 x4 x5 H12 x2)) t3 +H_x)))) (H3 x4 x1 H11)) x3 H10)))) (lift_gen_lift t2 x3 (S O) h O x1 (le_O_n +x1) H9)))) x0 H5)))))) (lift_gen_bind b u (lift (S O) O t2) x0 h x1 +H4)))))))))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (pr0 t2 +t3)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 +x0)) \to (ex2 T (\lambda (t4: T).(eq T t3 (lift h x1 t4))) (\lambda (t4: +T).(pr0 x0 t4)))))))).(\lambda (u: T).(\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H3: (eq T (THead (Flat Cast) u t2) (lift h x1 x0))).(ex3_2_ind +T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat Cast) y0 z)))) +(\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x1 y0)))) (\lambda (_: +T).(\lambda (z: T).(eq T t2 (lift h x1 z)))) (ex2 T (\lambda (t4: T).(eq T t3 +(lift h x1 t4))) (\lambda (t4: T).(pr0 x0 t4))) (\lambda (x2: T).(\lambda +(x3: T).(\lambda (H4: (eq T x0 (THead (Flat Cast) x2 x3))).(\lambda (_: (eq T +u (lift h x1 x2))).(\lambda (H6: (eq T t2 (lift h x1 x3))).(eq_ind_r T (THead +(Flat Cast) x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(eq T t3 (lift h +x1 t4))) (\lambda (t4: T).(pr0 t t4)))) (ex2_ind T (\lambda (t4: T).(eq T t3 +(lift h x1 t4))) (\lambda (t4: T).(pr0 x3 t4)) (ex2 T (\lambda (t4: T).(eq T +t3 (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Cast) x2 x3) t4))) +(\lambda (x4: T).(\lambda (H_x: (eq T t3 (lift h x1 x4))).(\lambda (H7: (pr0 +x3 x4)).(eq_ind_r T (lift h x1 x4) (\lambda (t: T).(ex2 T (\lambda (t4: +T).(eq T t (lift h x1 t4))) (\lambda (t4: T).(pr0 (THead (Flat Cast) x2 x3) +t4)))) (ex_intro2 T (\lambda (t4: T).(eq T (lift h x1 x4) (lift h x1 t4))) +(\lambda (t4: T).(pr0 (THead (Flat Cast) x2 x3) t4)) x4 (refl_equal T (lift h +x1 x4)) (pr0_tau x3 x4 H7 x2)) t3 H_x)))) (H2 x3 x1 H6)) x0 H4)))))) +(lift_gen_flat Cast u t2 x0 h x1 H3)))))))))) y x H0))))) H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr0/pr0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/pr0.ma new file mode 100644 index 000000000..9687b04a1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/pr0.ma @@ -0,0 +1,2303 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/subst0.ma". + +include "basic_1A/lift/tlt.ma". + +include "basic_1A/tlt/fwd.ma". + +fact pr0_confluence__pr0_cong_upsilon_refl: + \forall (b: B).((not (eq B b Abst)) \to (\forall (u0: T).(\forall (u3: +T).((pr0 u0 u3) \to (\forall (t4: T).(\forall (t5: T).((pr0 t4 t5) \to +(\forall (u2: T).(\forall (v2: T).(\forall (x: T).((pr0 u2 x) \to ((pr0 v2 x) +\to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u0 t4)) +t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O +v2) t5)) t))))))))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (u0: T).(\lambda +(u3: T).(\lambda (H0: (pr0 u0 u3)).(\lambda (t4: T).(\lambda (t5: T).(\lambda +(H1: (pr0 t4 t5)).(\lambda (u2: T).(\lambda (v2: T).(\lambda (x: T).(\lambda +(H2: (pr0 u2 x)).(\lambda (H3: (pr0 v2 x)).(ex_intro2 T (\lambda (t: T).(pr0 +(THead (Flat Appl) u2 (THead (Bind b) u0 t4)) t)) (\lambda (t: T).(pr0 (THead +(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)) (THead (Bind b) u3 +(THead (Flat Appl) (lift (S O) O x) t5)) (pr0_upsilon b H u2 x H2 u0 u3 H0 t4 +t5 H1) (pr0_comp u3 u3 (pr0_refl u3) (THead (Flat Appl) (lift (S O) O v2) t5) +(THead (Flat Appl) (lift (S O) O x) t5) (pr0_comp (lift (S O) O v2) (lift (S +O) O x) (pr0_lift v2 x H3 (S O) O) t5 t5 (pr0_refl t5) (Flat Appl)) (Bind +b))))))))))))))). + +fact pr0_confluence__pr0_cong_upsilon_cong: + \forall (b: B).((not (eq B b Abst)) \to (\forall (u2: T).(\forall (v2: +T).(\forall (x: T).((pr0 u2 x) \to ((pr0 v2 x) \to (\forall (t2: T).(\forall +(t5: T).(\forall (x0: T).((pr0 t2 x0) \to ((pr0 t5 x0) \to (\forall (u5: +T).(\forall (u3: T).(\forall (x1: T).((pr0 u5 x1) \to ((pr0 u3 x1) \to (ex2 T +(\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) +(\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) +t5)) t))))))))))))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (u2: T).(\lambda +(v2: T).(\lambda (x: T).(\lambda (H0: (pr0 u2 x)).(\lambda (H1: (pr0 v2 +x)).(\lambda (t2: T).(\lambda (t5: T).(\lambda (x0: T).(\lambda (H2: (pr0 t2 +x0)).(\lambda (H3: (pr0 t5 x0)).(\lambda (u5: T).(\lambda (u3: T).(\lambda +(x1: T).(\lambda (H4: (pr0 u5 x1)).(\lambda (H5: (pr0 u3 x1)).(ex_intro2 T +(\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) +(\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) +t5)) t)) (THead (Bind b) x1 (THead (Flat Appl) (lift (S O) O x) x0)) +(pr0_upsilon b H u2 x H0 u5 x1 H4 t2 x0 H2) (pr0_comp u3 x1 H5 (THead (Flat +Appl) (lift (S O) O v2) t5) (THead (Flat Appl) (lift (S O) O x) x0) (pr0_comp +(lift (S O) O v2) (lift (S O) O x) (pr0_lift v2 x H1 (S O) O) t5 x0 H3 (Flat +Appl)) (Bind b))))))))))))))))))). + +fact pr0_confluence__pr0_cong_upsilon_delta: + (not (eq B Abbr Abst)) \to (\forall (u5: T).(\forall (t2: T).(\forall (w: +T).((subst0 O u5 t2 w) \to (\forall (u2: T).(\forall (v2: T).(\forall (x: +T).((pr0 u2 x) \to ((pr0 v2 x) \to (\forall (t5: T).(\forall (x0: T).((pr0 t2 +x0) \to ((pr0 t5 x0) \to (\forall (u3: T).(\forall (x1: T).((pr0 u5 x1) \to +((pr0 u3 x1) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead +(Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead +(Flat Appl) (lift (S O) O v2) t5)) t)))))))))))))))))))) +\def + \lambda (H: (not (eq B Abbr Abst))).(\lambda (u5: T).(\lambda (t2: +T).(\lambda (w: T).(\lambda (H0: (subst0 O u5 t2 w)).(\lambda (u2: +T).(\lambda (v2: T).(\lambda (x: T).(\lambda (H1: (pr0 u2 x)).(\lambda (H2: +(pr0 v2 x)).(\lambda (t5: T).(\lambda (x0: T).(\lambda (H3: (pr0 t2 +x0)).(\lambda (H4: (pr0 t5 x0)).(\lambda (u3: T).(\lambda (x1: T).(\lambda +(H5: (pr0 u5 x1)).(\lambda (H6: (pr0 u3 x1)).(or_ind (pr0 w x0) (ex2 T +(\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x1 x0 w2))) (ex2 T +(\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) +(\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O +v2) t5)) t))) (\lambda (H7: (pr0 w x0)).(ex_intro2 T (\lambda (t: T).(pr0 +(THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 +(THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)) (THead +(Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O x) x0)) (pr0_upsilon Abbr H +u2 x H1 u5 x1 H5 w x0 H7) (pr0_comp u3 x1 H6 (THead (Flat Appl) (lift (S O) O +v2) t5) (THead (Flat Appl) (lift (S O) O x) x0) (pr0_comp (lift (S O) O v2) +(lift (S O) O x) (pr0_lift v2 x H2 (S O) O) t5 x0 H4 (Flat Appl)) (Bind +Abbr)))) (\lambda (H7: (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: +T).(subst0 O x1 x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w w2)) (\lambda +(w2: T).(subst0 O x1 x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) +u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 +(THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x2: T).(\lambda (H8: +(pr0 w x2)).(\lambda (H9: (subst0 O x1 x0 x2)).(ex_intro2 T (\lambda (t: +T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: +T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)) +(THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O x) x2)) (pr0_upsilon +Abbr H u2 x H1 u5 x1 H5 w x2 H8) (pr0_delta u3 x1 H6 (THead (Flat Appl) (lift +(S O) O v2) t5) (THead (Flat Appl) (lift (S O) O x) x0) (pr0_comp (lift (S O) +O v2) (lift (S O) O x) (pr0_lift v2 x H2 (S O) O) t5 x0 H4 (Flat Appl)) +(THead (Flat Appl) (lift (S O) O x) x2) (subst0_snd (Flat Appl) x1 x2 x0 O H9 +(lift (S O) O x))))))) H7)) (pr0_subst0 t2 x0 H3 u5 w O H0 x1 +H5))))))))))))))))))). + +fact pr0_confluence__pr0_cong_upsilon_zeta: + \forall (b: B).((not (eq B b Abst)) \to (\forall (u0: T).(\forall (u3: +T).((pr0 u0 u3) \to (\forall (u2: T).(\forall (v2: T).(\forall (x0: T).((pr0 +u2 x0) \to ((pr0 v2 x0) \to (\forall (x: T).(\forall (t3: T).(\forall (x1: +T).((pr0 x x1) \to ((pr0 t3 x1) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat +Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) +(lift (S O) O v2) (lift (S O) O x))) t))))))))))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (u0: T).(\lambda +(u3: T).(\lambda (_: (pr0 u0 u3)).(\lambda (u2: T).(\lambda (v2: T).(\lambda +(x0: T).(\lambda (H1: (pr0 u2 x0)).(\lambda (H2: (pr0 v2 x0)).(\lambda (x: +T).(\lambda (t3: T).(\lambda (x1: T).(\lambda (H3: (pr0 x x1)).(\lambda (H4: +(pr0 t3 x1)).(eq_ind T (lift (S O) O (THead (Flat Appl) v2 x)) (\lambda (t: +T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: +T).(pr0 (THead (Bind b) u3 t) t0)))) (ex_intro2 T (\lambda (t: T).(pr0 (THead +(Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (lift (S O) O +(THead (Flat Appl) v2 x))) t)) (THead (Flat Appl) x0 x1) (pr0_comp u2 x0 H1 +t3 x1 H4 (Flat Appl)) (pr0_zeta b H (THead (Flat Appl) v2 x) (THead (Flat +Appl) x0 x1) (pr0_comp v2 x0 H2 x x1 H3 (Flat Appl)) u3)) (THead (Flat Appl) +(lift (S O) O v2) (lift (S O) O x)) (lift_flat Appl v2 x (S O) +O)))))))))))))))). + +fact pr0_confluence__pr0_cong_delta: + \forall (u3: T).(\forall (t5: T).(\forall (w: T).((subst0 O u3 t5 w) \to +(\forall (u2: T).(\forall (x: T).((pr0 u2 x) \to ((pr0 u3 x) \to (\forall +(t3: T).(\forall (x0: T).((pr0 t3 x0) \to ((pr0 t5 x0) \to (ex2 T (\lambda +(t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind +Abbr) u3 w) t)))))))))))))) +\def + \lambda (u3: T).(\lambda (t5: T).(\lambda (w: T).(\lambda (H: (subst0 O u3 +t5 w)).(\lambda (u2: T).(\lambda (x: T).(\lambda (H0: (pr0 u2 x)).(\lambda +(H1: (pr0 u3 x)).(\lambda (t3: T).(\lambda (x0: T).(\lambda (H2: (pr0 t3 +x0)).(\lambda (H3: (pr0 t5 x0)).(or_ind (pr0 w x0) (ex2 T (\lambda (w2: +T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 w2))) (ex2 T (\lambda (t: +T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) +u3 w) t))) (\lambda (H4: (pr0 w x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead +(Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t)) +(THead (Bind Abbr) x x0) (pr0_comp u2 x H0 t3 x0 H2 (Bind Abbr)) (pr0_comp u3 +x H1 w x0 H4 (Bind Abbr)))) (\lambda (H4: (ex2 T (\lambda (w2: T).(pr0 w w2)) +(\lambda (w2: T).(subst0 O x x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w +w2)) (\lambda (w2: T).(subst0 O x x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead +(Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) +(\lambda (x1: T).(\lambda (H5: (pr0 w x1)).(\lambda (H6: (subst0 O x x0 +x1)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda +(t: T).(pr0 (THead (Bind Abbr) u3 w) t)) (THead (Bind Abbr) x x1) (pr0_delta +u2 x H0 t3 x0 H2 x1 H6) (pr0_comp u3 x H1 w x1 H5 (Bind Abbr)))))) H4)) +(pr0_subst0 t5 x0 H3 u3 w O H x H1))))))))))))). + +fact pr0_confluence__pr0_upsilon_upsilon: + \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: +T).(\forall (x0: T).((pr0 v1 x0) \to ((pr0 v2 x0) \to (\forall (u1: +T).(\forall (u2: T).(\forall (x1: T).((pr0 u1 x1) \to ((pr0 u2 x1) \to +(\forall (t1: T).(\forall (t2: T).(\forall (x2: T).((pr0 t1 x2) \to ((pr0 t2 +x2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u1 (THead (Flat Appl) +(lift (S O) O v1) t1)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t2)) t))))))))))))))))))) +\def + \lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda +(v2: T).(\lambda (x0: T).(\lambda (H0: (pr0 v1 x0)).(\lambda (H1: (pr0 v2 +x0)).(\lambda (u1: T).(\lambda (u2: T).(\lambda (x1: T).(\lambda (H2: (pr0 u1 +x1)).(\lambda (H3: (pr0 u2 x1)).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(x2: T).(\lambda (H4: (pr0 t1 x2)).(\lambda (H5: (pr0 t2 x2)).(ex_intro2 T +(\lambda (t: T).(pr0 (THead (Bind b) u1 (THead (Flat Appl) (lift (S O) O v1) +t1)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t2)) t)) (THead (Bind b) x1 (THead (Flat Appl) (lift (S O) O x0) +x2)) (pr0_comp u1 x1 H2 (THead (Flat Appl) (lift (S O) O v1) t1) (THead (Flat +Appl) (lift (S O) O x0) x2) (pr0_comp (lift (S O) O v1) (lift (S O) O x0) +(pr0_lift v1 x0 H0 (S O) O) t1 x2 H4 (Flat Appl)) (Bind b)) (pr0_comp u2 x1 +H3 (THead (Flat Appl) (lift (S O) O v2) t2) (THead (Flat Appl) (lift (S O) O +x0) x2) (pr0_comp (lift (S O) O v2) (lift (S O) O x0) (pr0_lift v2 x0 H1 (S +O) O) t2 x2 H5 (Flat Appl)) (Bind b))))))))))))))))))). + +fact pr0_confluence__pr0_delta_delta: + \forall (u2: T).(\forall (t3: T).(\forall (w: T).((subst0 O u2 t3 w) \to +(\forall (u3: T).(\forall (t5: T).(\forall (w0: T).((subst0 O u3 t5 w0) \to +(\forall (x: T).((pr0 u2 x) \to ((pr0 u3 x) \to (\forall (x0: T).((pr0 t3 x0) +\to ((pr0 t5 x0) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) +(\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t)))))))))))))))) +\def + \lambda (u2: T).(\lambda (t3: T).(\lambda (w: T).(\lambda (H: (subst0 O u2 +t3 w)).(\lambda (u3: T).(\lambda (t5: T).(\lambda (w0: T).(\lambda (H0: +(subst0 O u3 t5 w0)).(\lambda (x: T).(\lambda (H1: (pr0 u2 x)).(\lambda (H2: +(pr0 u3 x)).(\lambda (x0: T).(\lambda (H3: (pr0 t3 x0)).(\lambda (H4: (pr0 t5 +x0)).(or_ind (pr0 w0 x0) (ex2 T (\lambda (w2: T).(pr0 w0 w2)) (\lambda (w2: +T).(subst0 O x x0 w2))) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) +t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H5: (pr0 w0 +x0)).(or_ind (pr0 w x0) (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: +T).(subst0 O x x0 w2))) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) +t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H6: (pr0 w +x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda +(t: T).(pr0 (THead (Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x0) (pr0_comp +u2 x H1 w x0 H6 (Bind Abbr)) (pr0_comp u3 x H2 w0 x0 H5 (Bind Abbr)))) +(\lambda (H6: (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O +x x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 +O x x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda +(t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x1: T).(\lambda (H7: +(pr0 w x1)).(\lambda (H8: (subst0 O x x0 x1)).(ex_intro2 T (\lambda (t: +T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) +u3 w0) t)) (THead (Bind Abbr) x x1) (pr0_comp u2 x H1 w x1 H7 (Bind Abbr)) +(pr0_delta u3 x H2 w0 x0 H5 x1 H8))))) H6)) (pr0_subst0 t3 x0 H3 u2 w O H x +H1))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 w0 w2)) (\lambda (w2: +T).(subst0 O x x0 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 w0 w2)) (\lambda +(w2: T).(subst0 O x x0 w2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 +w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x1: +T).(\lambda (H6: (pr0 w0 x1)).(\lambda (H7: (subst0 O x x0 x1)).(or_ind (pr0 +w x0) (ex2 T (\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 +w2))) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: +T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H8: (pr0 w x0)).(ex_intro2 T +(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead +(Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x1) (pr0_delta u2 x H1 w x0 H8 x1 +H7) (pr0_comp u3 x H2 w0 x1 H6 (Bind Abbr)))) (\lambda (H8: (ex2 T (\lambda +(w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 w2)))).(ex2_ind T +(\lambda (w2: T).(pr0 w w2)) (\lambda (w2: T).(subst0 O x x0 w2)) (ex2 T +(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead +(Bind Abbr) u3 w0) t))) (\lambda (x2: T).(\lambda (H9: (pr0 w x2)).(\lambda +(H10: (subst0 O x x0 x2)).(or4_ind (eq T x2 x1) (ex2 T (\lambda (t: +T).(subst0 O x x2 t)) (\lambda (t: T).(subst0 O x x1 t))) (subst0 O x x2 x1) +(subst0 O x x1 x2) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) +(\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (H11: (eq T x2 +x1)).(let H12 \def (eq_ind T x2 (\lambda (t: T).(pr0 w t)) H9 x1 H11) in +(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: +T).(pr0 (THead (Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x1) (pr0_comp u2 x +H1 w x1 H12 (Bind Abbr)) (pr0_comp u3 x H2 w0 x1 H6 (Bind Abbr))))) (\lambda +(H11: (ex2 T (\lambda (t: T).(subst0 O x x2 t)) (\lambda (t: T).(subst0 O x +x1 t)))).(ex2_ind T (\lambda (t: T).(subst0 O x x2 t)) (\lambda (t: +T).(subst0 O x x1 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) +t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x3: +T).(\lambda (H12: (subst0 O x x2 x3)).(\lambda (H13: (subst0 O x x1 +x3)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda +(t: T).(pr0 (THead (Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x3) (pr0_delta +u2 x H1 w x2 H9 x3 H12) (pr0_delta u3 x H2 w0 x1 H6 x3 H13))))) H11)) +(\lambda (H11: (subst0 O x x2 x1)).(ex_intro2 T (\lambda (t: T).(pr0 (THead +(Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t)) +(THead (Bind Abbr) x x1) (pr0_delta u2 x H1 w x2 H9 x1 H11) (pr0_comp u3 x H2 +w0 x1 H6 (Bind Abbr)))) (\lambda (H11: (subst0 O x x1 x2)).(ex_intro2 T +(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead +(Bind Abbr) u3 w0) t)) (THead (Bind Abbr) x x2) (pr0_comp u2 x H1 w x2 H9 +(Bind Abbr)) (pr0_delta u3 x H2 w0 x1 H6 x2 H11))) (subst0_confluence_eq x0 +x2 x O H10 x1 H7))))) H8)) (pr0_subst0 t3 x0 H3 u2 w O H x H1))))) H5)) +(pr0_subst0 t5 x0 H4 u3 w0 O H0 x H2))))))))))))))). + +fact pr0_confluence__pr0_delta_tau: + \forall (u2: T).(\forall (t3: T).(\forall (w: T).((subst0 O u2 t3 w) \to +(\forall (t4: T).((pr0 (lift (S O) O t4) t3) \to (\forall (t2: T).(ex2 T +(\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 +t))))))))) +\def + \lambda (u2: T).(\lambda (t3: T).(\lambda (w: T).(\lambda (H: (subst0 O u2 +t3 w)).(\lambda (t4: T).(\lambda (H0: (pr0 (lift (S O) O t4) t3)).(\lambda +(t2: T).(ex2_ind T (\lambda (t5: T).(eq T t3 (lift (S O) O t5))) (\lambda +(t5: T).(pr0 t4 t5)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) +(\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H1: (eq T t3 (lift (S +O) O x))).(\lambda (_: (pr0 t4 x)).(let H3 \def (eq_ind T t3 (\lambda (t: +T).(subst0 O u2 t w)) H (lift (S O) O x) H1) in (subst0_gen_lift_false x u2 w +(S O) O O (le_O_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) +(le_n (plus (S O) O)) (plus O (S O)) (plus_sym O (S O))) H3 (ex2 T (\lambda +(t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t)))))))) +(pr0_gen_lift t4 t3 (S O) O H0)))))))). + +theorem pr0_confluence: + \forall (t0: T).(\forall (t1: T).((pr0 t0 t1) \to (\forall (t2: T).((pr0 t0 +t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))))))) +\def + \lambda (t0: T).(tlt_wf_ind (\lambda (t: T).(\forall (t1: T).((pr0 t t1) \to +(\forall (t2: T).((pr0 t t2) \to (ex2 T (\lambda (t3: T).(pr0 t1 t3)) +(\lambda (t3: T).(pr0 t2 t3)))))))) (\lambda (t: T).(\lambda (H: ((\forall +(v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 +v t2) \to (ex2 T (\lambda (t3: T).(pr0 t1 t3)) (\lambda (t3: T).(pr0 t2 +t3))))))))))).(\lambda (t1: T).(\lambda (H0: (pr0 t t1)).(\lambda (t2: +T).(\lambda (H1: (pr0 t t2)).(let H2 \def (match H0 with [(pr0_refl t3) +\Rightarrow (\lambda (H2: (eq T t3 t)).(\lambda (H3: (eq T t3 t1)).(eq_ind T +t (\lambda (t4: T).((eq T t4 t1) \to (ex2 T (\lambda (t5: T).(pr0 t1 t5)) +(\lambda (t5: T).(pr0 t2 t5))))) (\lambda (H4: (eq T t t1)).(eq_ind T t1 +(\lambda (_: T).(ex2 T (\lambda (t5: T).(pr0 t1 t5)) (\lambda (t5: T).(pr0 t2 +t5)))) (let H5 \def (match H1 with [(pr0_refl t4) \Rightarrow (\lambda (H5: +(eq T t4 t)).(\lambda (H6: (eq T t4 t2)).(eq_ind T t (\lambda (t5: T).((eq T +t5 t2) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 +t6))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T +(\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6)))) (let H8 \def +(eq_ind T t (\lambda (t5: T).(eq T t4 t5)) H5 t2 H7) in (let H9 \def (eq_ind +T t (\lambda (t5: T).(eq T t5 t1)) H4 t2 H7) in (let H10 \def (eq_ind T t +(\lambda (t5: T).(eq T t3 t5)) H2 t2 H7) in (let H11 \def (eq_ind T t +(\lambda (t5: T).(\forall (v: T).((tlt v t5) \to (\forall (t6: T).((pr0 v t6) +\to (\forall (t7: T).((pr0 v t7) \to (ex2 T (\lambda (t8: T).(pr0 t6 t8)) +(\lambda (t8: T).(pr0 t7 t8)))))))))) H t2 H7) in (let H12 \def (eq_ind T t2 +(\lambda (t5: T).(\forall (v: T).((tlt v t5) \to (\forall (t6: T).((pr0 v t6) +\to (\forall (t7: T).((pr0 v t7) \to (ex2 T (\lambda (t8: T).(pr0 t6 t8)) +(\lambda (t8: T).(pr0 t7 t8)))))))))) H11 t1 H9) in (eq_ind_r T t1 (\lambda +(t5: T).(ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t5 t6)))) +(let H13 \def (eq_ind T t2 (\lambda (t5: T).(eq T t3 t5)) H10 t1 H9) in +(ex_intro2 T (\lambda (t5: T).(pr0 t1 t5)) (\lambda (t5: T).(pr0 t1 t5)) t1 +(pr0_refl t1) (pr0_refl t1))) t2 H9)))))) t (sym_eq T t t2 H7))) t4 (sym_eq T +t4 t H5) H6))) | (pr0_comp u1 u2 H5 t4 t5 H6 k) \Rightarrow (\lambda (H7: (eq +T (THead k u1 t4) t)).(\lambda (H8: (eq T (THead k u2 t5) t2)).(eq_ind T +(THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) +\to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: +T).(pr0 t2 t7))))))) (\lambda (H9: (eq T (THead k u2 t5) t2)).(eq_ind T +(THead k u2 t5) (\lambda (t6: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T +(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t6 t7)))))) (\lambda +(H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t4 t5)).(let H12 \def (eq_ind_r T t +(\lambda (t6: T).(eq T t6 t1)) H4 (THead k u1 t4) H7) in (eq_ind T (THead k +u1 t4) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: +T).(pr0 (THead k u2 t5) t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: +T).(eq T t3 t6)) H2 (THead k u1 t4) H7) in (let H14 \def (eq_ind_r T t +(\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) +\to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) +(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead k u1 t4) H7) in (ex_intro2 T +(\lambda (t6: T).(pr0 (THead k u1 t4) t6)) (\lambda (t6: T).(pr0 (THead k u2 +t5) t6)) (THead k u2 t5) (pr0_comp u1 u2 H10 t4 t5 H11 k) (pr0_refl (THead k +u2 t5))))) t1 H12)))) t2 H9)) t H7 H8 H5 H6))) | (pr0_beta u v1 v2 H5 t4 t5 +H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) +u t4)) t)).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T +(THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead +(Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda +(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))))) (\lambda (H9: (eq T +(THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda +(t6: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: T).(pr0 t1 +t7)) (\lambda (t7: T).(pr0 t6 t7)))))) (\lambda (H10: (pr0 v1 v2)).(\lambda +(H11: (pr0 t4 t5)).(let H12 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 t1)) +H4 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H7) in (eq_ind T (THead +(Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (t6: T).(ex2 T (\lambda +(t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t5) t7)))) +(let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) H2 (THead (Flat +Appl) v1 (THead (Bind Abst) u t4)) H7) in (let H14 \def (eq_ind_r T t +(\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) +\to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) +(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Appl) v1 (THead (Bind +Abst) u t4)) H7) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead (Flat Appl) v1 +(THead (Bind Abst) u t4)) t6)) (\lambda (t6: T).(pr0 (THead (Bind Abbr) v2 +t5) t6)) (THead (Bind Abbr) v2 t5) (pr0_beta u v1 v2 H10 t4 t5 H11) (pr0_refl +(THead (Bind Abbr) v2 t5))))) t1 H12)))) t2 H9)) t H7 H8 H5 H6))) | +(pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T +(THead (Flat Appl) v1 (THead (Bind b) u1 t4)) t)).(\lambda (H10: (eq T (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead +(Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to +((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: +T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))))))) (\lambda (H11: (eq T +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t6: +T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) +\to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t6 t7)))))))) +(\lambda (H12: (not (eq B b Abst))).(\lambda (H13: (pr0 v1 v2)).(\lambda +(H14: (pr0 u1 u2)).(\lambda (H15: (pr0 t4 t5)).(let H16 \def (eq_ind_r T t +(\lambda (t6: T).(eq T t6 t1)) H4 (THead (Flat Appl) v1 (THead (Bind b) u1 +t4)) H9) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda +(t6: T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t7)))) (let H17 \def +(eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) H2 (THead (Flat Appl) v1 (THead +(Bind b) u1 t4)) H9) in (let H18 \def (eq_ind_r T t (\lambda (t6: T).(\forall +(v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall (t8: +T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 +t8 t9)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) H9) in +(pr0_confluence__pr0_cong_upsilon_refl b H12 u1 u2 H14 t4 t5 H15 v1 v2 v2 H13 +(pr0_refl v2)))) t1 H16)))))) t2 H11)) t H9 H10 H5 H6 H7 H8))) | (pr0_delta +u1 u2 H5 t4 t5 H6 w H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 +t4) t)).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead +(Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to +((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda +(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)))))))) (\lambda (H10: (eq T +(THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda +(t6: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T +(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t6 t7))))))) (\lambda +(H11: (pr0 u1 u2)).(\lambda (H12: (pr0 t4 t5)).(\lambda (H13: (subst0 O u2 t5 +w)).(let H14 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 t1)) H4 (THead +(Bind Abbr) u1 t4) H8) in (eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (t6: +T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 (THead (Bind +Abbr) u2 w) t7)))) (let H15 \def (eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) +H2 (THead (Bind Abbr) u1 t4) H8) in (let H16 \def (eq_ind_r T t (\lambda (t6: +T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall +(t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: +T).(pr0 t8 t9)))))))))) H (THead (Bind Abbr) u1 t4) H8) in (ex_intro2 T +(\lambda (t6: T).(pr0 (THead (Bind Abbr) u1 t4) t6)) (\lambda (t6: T).(pr0 +(THead (Bind Abbr) u2 w) t6)) (THead (Bind Abbr) u2 w) (pr0_delta u1 u2 H11 +t4 t5 H12 w H13) (pr0_refl (THead (Bind Abbr) u2 w))))) t1 H14))))) t2 H10)) +t H8 H9 H5 H6 H7))) | (pr0_zeta b H5 t4 t5 H6 u) \Rightarrow (\lambda (H7: +(eq T (THead (Bind b) u (lift (S O) O t4)) t)).(\lambda (H8: (eq T t5 +t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 +t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: +T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))))) (\lambda (H9: (eq T t5 +t2)).(eq_ind T t2 (\lambda (t6: T).((not (eq B b Abst)) \to ((pr0 t4 t6) \to +(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)))))) +(\lambda (H10: (not (eq B b Abst))).(\lambda (H11: (pr0 t4 t2)).(let H12 \def +(eq_ind_r T t (\lambda (t6: T).(eq T t6 t1)) H4 (THead (Bind b) u (lift (S O) +O t4)) H7) in (eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (t6: +T).(ex2 T (\lambda (t7: T).(pr0 t6 t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let +H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t3 t6)) H2 (THead (Bind b) u +(lift (S O) O t4)) H7) in (let H14 \def (eq_ind_r T t (\lambda (t6: +T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall +(t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: +T).(pr0 t8 t9)))))))))) H (THead (Bind b) u (lift (S O) O t4)) H7) in +(ex_intro2 T (\lambda (t6: T).(pr0 (THead (Bind b) u (lift (S O) O t4)) t6)) +(\lambda (t6: T).(pr0 t2 t6)) t2 (pr0_zeta b H10 t4 t2 H11 u) (pr0_refl +t2)))) t1 H12)))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H5 H6))) | (pr0_tau t4 t5 +H5 u) \Rightarrow (\lambda (H6: (eq T (THead (Flat Cast) u t4) t)).(\lambda +(H7: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T +t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda +(t7: T).(pr0 t2 t7)))))) (\lambda (H8: (eq T t5 t2)).(eq_ind T t2 (\lambda +(t6: T).((pr0 t4 t6) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: +T).(pr0 t2 t7))))) (\lambda (H9: (pr0 t4 t2)).(let H10 \def (eq_ind_r T t +(\lambda (t6: T).(eq T t6 t1)) H4 (THead (Flat Cast) u t4) H6) in (eq_ind T +(THead (Flat Cast) u t4) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t6 +t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H11 \def (eq_ind_r T t (\lambda +(t6: T).(eq T t3 t6)) H2 (THead (Flat Cast) u t4) H6) in (let H12 \def +(eq_ind_r T t (\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: +T).((pr0 v t7) \to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: +T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Cast) u +t4) H6) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead (Flat Cast) u t4) t6)) +(\lambda (t6: T).(pr0 t2 t6)) t2 (pr0_tau t4 t2 H9 u) (pr0_refl t2)))) t1 +H10))) t5 (sym_eq T t5 t2 H8))) t H6 H7 H5)))]) in (H5 (refl_equal T t) +(refl_equal T t2))) t (sym_eq T t t1 H4))) t3 (sym_eq T t3 t H2) H3))) | +(pr0_comp u1 u2 H2 t3 t4 H3 k) \Rightarrow (\lambda (H4: (eq T (THead k u1 +t3) t)).(\lambda (H5: (eq T (THead k u2 t4) t1)).(eq_ind T (THead k u1 t3) +(\lambda (_: T).((eq T (THead k u2 t4) t1) \to ((pr0 u1 u2) \to ((pr0 t3 t4) +\to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6))))))) +(\lambda (H6: (eq T (THead k u2 t4) t1)).(eq_ind T (THead k u2 t4) (\lambda +(t5: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t5 +t6)) (\lambda (t6: T).(pr0 t2 t6)))))) (\lambda (H7: (pr0 u1 u2)).(\lambda +(H8: (pr0 t3 t4)).(let H9 \def (match H1 with [(pr0_refl t5) \Rightarrow +(\lambda (H9: (eq T t5 t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T t (\lambda +(t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead k u2 t4) t7)) +(\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H11: (eq T t t2)).(eq_ind T t2 +(\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 (THead k u2 t4) t7)) (\lambda +(t7: T).(pr0 t2 t7)))) (let H12 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 +t2)) H11 (THead k u1 t3) H4) in (eq_ind T (THead k u1 t3) (\lambda (t6: +T).(ex2 T (\lambda (t7: T).(pr0 (THead k u2 t4) t7)) (\lambda (t7: T).(pr0 t6 +t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H9 (THead k +u1 t3) H4) in (let H14 \def (eq_ind_r T t (\lambda (t6: T).(\forall (v: +T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall (t8: T).((pr0 v +t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 +t9)))))))))) H (THead k u1 t3) H4) in (ex_intro2 T (\lambda (t6: T).(pr0 +(THead k u2 t4) t6)) (\lambda (t6: T).(pr0 (THead k u1 t3) t6)) (THead k u2 +t4) (pr0_refl (THead k u2 t4)) (pr0_comp u1 u2 H7 t3 t4 H8 k)))) t2 H12)) t +(sym_eq T t t2 H11))) t5 (sym_eq T t5 t H9) H10))) | (pr0_comp u0 u3 H9 t5 t6 +H10 k0) \Rightarrow (\lambda (H11: (eq T (THead k0 u0 t5) t)).(\lambda (H12: +(eq T (THead k0 u3 t6) t2)).(eq_ind T (THead k0 u0 t5) (\lambda (_: T).((eq T +(THead k0 u3 t6) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda +(t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda +(H13: (eq T (THead k0 u3 t6) t2)).(eq_ind T (THead k0 u3 t6) (\lambda (t7: +T).((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 +t4) t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (H14: (pr0 u0 +u3)).(\lambda (H15: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda (t7: +T).(eq T (THead k u1 t3) t7)) H4 (THead k0 u0 t5) H11) in (let H17 \def +(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef +_) \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k u1 t3) (THead k0 +u0 t5) H16) in ((let H18 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) +\Rightarrow t7])) (THead k u1 t3) (THead k0 u0 t5) H16) in ((let H19 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef +_) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead +k0 u0 t5) H16) in (\lambda (H20: (eq T u1 u0)).(\lambda (H21: (eq K k +k0)).(let H22 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) +\to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T +(\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H +(THead k0 u0 t5) H11) in (eq_ind_r K k0 (\lambda (k1: K).(ex2 T (\lambda (t7: +T).(pr0 (THead k1 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead k0 u3 t6) t7)))) +(let H23 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 u0 H20) in (let +H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 t5 H19) in (ex2_ind T +(\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda +(t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead k0 u3 t6) +t7))) (\lambda (x: T).(\lambda (H25: (pr0 t4 x)).(\lambda (H26: (pr0 t6 +x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) (\lambda (t7: T).(pr0 u3 t7)) +(ex2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 +(THead k0 u3 t6) t7))) (\lambda (x0: T).(\lambda (H27: (pr0 u2 x0)).(\lambda +(H28: (pr0 u3 x0)).(ex_intro2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) +(\lambda (t7: T).(pr0 (THead k0 u3 t6) t7)) (THead k0 x0 x) (pr0_comp u2 x0 +H27 t4 x H25 k0) (pr0_comp u3 x0 H28 t6 x H26 k0))))) (H22 u0 (tlt_head_sx k0 +u0 t5) u2 H23 u3 H14))))) (H22 t5 (tlt_head_dx k0 u0 t5) t4 H24 t6 H15)))) k +H21))))) H18)) H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_beta u v1 v2 H9 +t5 t6 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 (THead +(Bind Abst) u t5)) t)).(\lambda (H12: (eq T (THead (Bind Abbr) v2 t6) +t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) (\lambda (_: +T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 +t8))))))) (\lambda (H13: (eq T (THead (Bind Abbr) v2 t6) t2)).(eq_ind T +(THead (Bind Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t7 +t8)))))) (\lambda (H14: (pr0 v1 v2)).(\lambda (H15: (pr0 t5 t6)).(let H16 +\def (eq_ind_r T t (\lambda (t7: T).(eq T (THead k u1 t3) t7)) H4 (THead +(Flat Appl) v1 (THead (Bind Abst) u t5)) H11) in (let H17 \def (f_equal T K +(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Flat +Appl) v1 (THead (Bind Abst) u t5)) H16) in ((let H18 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) +\Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) (THead +(Flat Appl) v1 (THead (Bind Abst) u t5)) H16) in ((let H19 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) +\Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead +(Flat Appl) v1 (THead (Bind Abst) u t5)) H16) in (\lambda (H20: (eq T u1 +v1)).(\lambda (H21: (eq K k (Flat Appl))).(let H22 \def (eq_ind_r T t +(\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) +\to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) +(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) v1 (THead (Bind +Abst) u t5)) H11) in (eq_ind_r K (Flat Appl) (\lambda (k0: K).(ex2 T (\lambda +(t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) +v2 t6) t7)))) (let H23 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 v1 +H20) in (let H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 (THead +(Bind Abst) u t5) H19) in (let H25 \def (match H24 with [(pr0_refl t7) +\Rightarrow (\lambda (H25: (eq T t7 (THead (Bind Abst) u t5))).(\lambda (H26: +(eq T t7 t4)).(eq_ind T (THead (Bind Abst) u t5) (\lambda (t8: T).((eq T t8 +t4) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda +(t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))))) (\lambda (H27: (eq T (THead +(Bind Abst) u t5) t4)).(eq_ind T (THead (Bind Abst) u t5) (\lambda (t8: +T).(ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t8) t9)) (\lambda (t9: +T).(pr0 (THead (Bind Abbr) v2 t6) t9)))) (ex2_ind T (\lambda (t8: T).(pr0 u2 +t8)) (\lambda (t8: T).(pr0 v2 t8)) (ex2 T (\lambda (t8: T).(pr0 (THead (Flat +Appl) u2 (THead (Bind Abst) u t5)) t8)) (\lambda (t8: T).(pr0 (THead (Bind +Abbr) v2 t6) t8))) (\lambda (x: T).(\lambda (H28: (pr0 u2 x)).(\lambda (H29: +(pr0 v2 x)).(ex_intro2 T (\lambda (t8: T).(pr0 (THead (Flat Appl) u2 (THead +(Bind Abst) u t5)) t8)) (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t6) t8)) +(THead (Bind Abbr) x t6) (pr0_beta u u2 x H28 t5 t6 H15) (pr0_comp v2 x H29 +t6 t6 (pr0_refl t6) (Bind Abbr)))))) (H22 v1 (tlt_head_sx (Flat Appl) v1 +(THead (Bind Abst) u t5)) u2 H23 v2 H14)) t4 H27)) t7 (sym_eq T t7 (THead +(Bind Abst) u t5) H25) H26))) | (pr0_comp u0 u3 H25 t7 t8 H26 k0) \Rightarrow +(\lambda (H27: (eq T (THead k0 u0 t7) (THead (Bind Abst) u t5))).(\lambda +(H28: (eq T (THead k0 u3 t8) t4)).((let H29 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t7 | (TLRef _) \Rightarrow t7 | +(THead _ _ t9) \Rightarrow t9])) (THead k0 u0 t7) (THead (Bind Abst) u t5) +H27) in ((let H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t9 _) \Rightarrow t9])) +(THead k0 u0 t7) (THead (Bind Abst) u t5) H27) in ((let H31 \def (f_equal T K +(\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | (TLRef _) +\Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t7) (THead +(Bind Abst) u t5) H27) in (eq_ind K (Bind Abst) (\lambda (k1: K).((eq T u0 u) +\to ((eq T t7 t5) \to ((eq T (THead k1 u3 t8) t4) \to ((pr0 u0 u3) \to ((pr0 +t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) +(\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))))))))) (\lambda (H32: +(eq T u0 u)).(eq_ind T u (\lambda (t9: T).((eq T t7 t5) \to ((eq T (THead +(Bind Abst) u3 t8) t4) \to ((pr0 t9 u3) \to ((pr0 t7 t8) \to (ex2 T (\lambda +(t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead +(Bind Abbr) v2 t6) t10)))))))) (\lambda (H33: (eq T t7 t5)).(eq_ind T t5 +(\lambda (t9: T).((eq T (THead (Bind Abst) u3 t8) t4) \to ((pr0 u u3) \to +((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) +t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t6) t10))))))) (\lambda +(H34: (eq T (THead (Bind Abst) u3 t8) t4)).(eq_ind T (THead (Bind Abst) u3 +t8) (\lambda (t9: T).((pr0 u u3) \to ((pr0 t5 t8) \to (ex2 T (\lambda (t10: +T).(pr0 (THead (Flat Appl) u2 t9) t10)) (\lambda (t10: T).(pr0 (THead (Bind +Abbr) v2 t6) t10)))))) (\lambda (_: (pr0 u u3)).(\lambda (H36: (pr0 t5 +t8)).(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t6 t9)) +(ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) +t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))) (\lambda (x: +T).(\lambda (H37: (pr0 t8 x)).(\lambda (H38: (pr0 t6 x)).(ex2_ind T (\lambda +(t9: T).(pr0 u2 t9)) (\lambda (t9: T).(pr0 v2 t9)) (ex2 T (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9)) (\lambda (t9: +T).(pr0 (THead (Bind Abbr) v2 t6) t9))) (\lambda (x0: T).(\lambda (H39: (pr0 +u2 x0)).(\lambda (H40: (pr0 v2 x0)).(ex_intro2 T (\lambda (t9: T).(pr0 (THead +(Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9)) (\lambda (t9: T).(pr0 (THead +(Bind Abbr) v2 t6) t9)) (THead (Bind Abbr) x0 x) (pr0_beta u3 u2 x0 H39 t8 x +H37) (pr0_comp v2 x0 H40 t6 x H38 (Bind Abbr)))))) (H22 v1 (tlt_head_sx (Flat +Appl) v1 (THead (Bind Abst) u t5)) u2 H23 v2 H14))))) (H22 t5 (tlt_trans +(THead (Bind Abst) u t5) t5 (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) +(tlt_head_dx (Bind Abst) u t5) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abst) +u t5))) t8 H36 t6 H15)))) t4 H34)) t7 (sym_eq T t7 t5 H33))) u0 (sym_eq T u0 +u H32))) k0 (sym_eq K k0 (Bind Abst) H31))) H30)) H29)) H28 H25 H26))) | +(pr0_beta u0 v0 v3 H25 t7 t8 H26) \Rightarrow (\lambda (H27: (eq T (THead +(Flat Appl) v0 (THead (Bind Abst) u0 t7)) (THead (Bind Abst) u t5))).(\lambda +(H28: (eq T (THead (Bind Abbr) v3 t8) t4)).((let H29 \def (eq_ind T (THead +(Flat Appl) v0 (THead (Bind Abst) u0 t7)) (\lambda (e: T).(match e with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) +\Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind Abst) u t5) H27) in (False_ind ((eq T (THead (Bind +Abbr) v3 t8) t4) \to ((pr0 v0 v3) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind +Abbr) v2 t6) t9)))))) H29)) H28 H25 H26))) | (pr0_upsilon b H25 v0 v3 H26 u0 +u3 H27 t7 t8 H28) \Rightarrow (\lambda (H29: (eq T (THead (Flat Appl) v0 +(THead (Bind b) u0 t7)) (THead (Bind Abst) u t5))).(\lambda (H30: (eq T +(THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t8)) t4)).((let H31 +\def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u0 t7)) (\lambda (e: +T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | +(THead k0 _ _) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind Abst) u t5) H29) in (False_ind ((eq T +(THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t8)) t4) \to ((not +(eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t7 t8) \to (ex2 T +(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 +(THead (Bind Abbr) v2 t6) t9)))))))) H31)) H30 H25 H26 H27 H28))) | +(pr0_delta u0 u3 H25 t7 t8 H26 w H27) \Rightarrow (\lambda (H28: (eq T (THead +(Bind Abbr) u0 t7) (THead (Bind Abst) u t5))).(\lambda (H29: (eq T (THead +(Bind Abbr) u3 w) t4)).((let H30 \def (eq_ind T (THead (Bind Abbr) u0 t7) +(\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind +Abst) u t5) H28) in (False_ind ((eq T (THead (Bind Abbr) u3 w) t4) \to ((pr0 +u0 u3) \to ((pr0 t7 t8) \to ((subst0 O u3 t8 w) \to (ex2 T (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind +Abbr) v2 t6) t9))))))) H30)) H29 H25 H26 H27))) | (pr0_zeta b H25 t7 t8 H26 +u0) \Rightarrow (\lambda (H27: (eq T (THead (Bind b) u0 (lift (S O) O t7)) +(THead (Bind Abst) u t5))).(\lambda (H28: (eq T t8 t4)).((let H29 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map +(\lambda (x: nat).(plus x (S O))) O t7) | (TLRef _) \Rightarrow (lref_map +(\lambda (x: nat).(plus x (S O))) O t7) | (THead _ _ t9) \Rightarrow t9])) +(THead (Bind b) u0 (lift (S O) O t7)) (THead (Bind Abst) u t5) H27) in ((let +H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 +| (TLRef _) \Rightarrow u0 | (THead _ t9 _) \Rightarrow t9])) (THead (Bind b) +u0 (lift (S O) O t7)) (THead (Bind Abst) u t5) H27) in ((let H31 \def +(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef +_) \Rightarrow b | (THead k0 _ _) \Rightarrow (match k0 with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O +t7)) (THead (Bind Abst) u t5) H27) in (eq_ind B Abst (\lambda (b0: B).((eq T +u0 u) \to ((eq T (lift (S O) O t7) t5) \to ((eq T t8 t4) \to ((not (eq B b0 +Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) +u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t6) t9))))))))) +(\lambda (H32: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O +t7) t5) \to ((eq T t8 t4) \to ((not (eq B Abst Abst)) \to ((pr0 t7 t8) \to +(ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: +T).(pr0 (THead (Bind Abbr) v2 t6) t10)))))))) (\lambda (H33: (eq T (lift (S +O) O t7) t5)).(eq_ind T (lift (S O) O t7) (\lambda (_: T).((eq T t8 t4) \to +((not (eq B Abst Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 +(THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 +t6) t10))))))) (\lambda (H34: (eq T t8 t4)).(eq_ind T t4 (\lambda (t9: +T).((not (eq B Abst Abst)) \to ((pr0 t7 t9) \to (ex2 T (\lambda (t10: T).(pr0 +(THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 +t6) t10)))))) (\lambda (H35: (not (eq B Abst Abst))).(\lambda (_: (pr0 t7 +t4)).(let H37 \def (match (H35 (refl_equal B Abst)) in False with []) in +H37))) t8 (sym_eq T t8 t4 H34))) t5 H33)) u0 (sym_eq T u0 u H32))) b (sym_eq +B b Abst H31))) H30)) H29)) H28 H25 H26))) | (pr0_tau t7 t8 H25 u0) +\Rightarrow (\lambda (H26: (eq T (THead (Flat Cast) u0 t7) (THead (Bind Abst) +u t5))).(\lambda (H27: (eq T t8 t4)).((let H28 \def (eq_ind T (THead (Flat +Cast) u0 t7) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind +Abst) u t5) H26) in (False_ind ((eq T t8 t4) \to ((pr0 t7 t8) \to (ex2 T +(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 +(THead (Bind Abbr) v2 t6) t9))))) H28)) H27 H25)))]) in (H25 (refl_equal T +(THead (Bind Abst) u t5)) (refl_equal T t4))))) k H21))))) H18)) H17))))) t2 +H13)) t H11 H12 H9 H10))) | (pr0_upsilon b H9 v1 v2 H10 u0 u3 H11 t5 t6 H12) +\Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 +t5)) t)).(\lambda (H14: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S +O) O v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t5)) +(\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O +v2) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to +((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda +(t8: T).(pr0 t2 t8))))))))) (\lambda (H15: (eq T (THead (Bind b) u3 (THead +(Flat Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b) u3 (THead +(Flat Appl) (lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b Abst)) \to +((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t7 t8)))))))) (\lambda +(H16: (not (eq B b Abst))).(\lambda (H17: (pr0 v1 v2)).(\lambda (H18: (pr0 u0 +u3)).(\lambda (H19: (pr0 t5 t6)).(let H20 \def (eq_ind_r T t (\lambda (t7: +T).(eq T (THead k u1 t3) t7)) H4 (THead (Flat Appl) v1 (THead (Bind b) u0 +t5)) H13) in (let H21 \def (f_equal T K (\lambda (e: T).(match e with [(TSort +_) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) +(THead k u1 t3) (THead (Flat Appl) v1 (THead (Bind b) u0 t5)) H20) in ((let +H22 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 +| (TLRef _) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) +(THead (Flat Appl) v1 (THead (Bind b) u0 t5)) H20) in ((let H23 \def (f_equal +T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) +\Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead +(Flat Appl) v1 (THead (Bind b) u0 t5)) H20) in (\lambda (H24: (eq T u1 +v1)).(\lambda (H25: (eq K k (Flat Appl))).(let H26 \def (eq_ind_r T t +(\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) +\to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) +(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) v1 (THead (Bind +b) u0 t5)) H13) in (eq_ind_r K (Flat Appl) (\lambda (k0: K).(ex2 T (\lambda +(t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind b) u3 +(THead (Flat Appl) (lift (S O) O v2) t6)) t7)))) (let H27 \def (eq_ind T u1 +(\lambda (t7: T).(pr0 t7 u2)) H7 v1 H24) in (let H28 \def (eq_ind T t3 +(\lambda (t7: T).(pr0 t7 t4)) H8 (THead (Bind b) u0 t5) H23) in (let H29 \def +(match H28 with [(pr0_refl t7) \Rightarrow (\lambda (H29: (eq T t7 (THead +(Bind b) u0 t5))).(\lambda (H30: (eq T t7 t4)).(eq_ind T (THead (Bind b) u0 +t5) (\lambda (t8: T).((eq T t8 t4) \to (ex2 T (\lambda (t9: T).(pr0 (THead +(Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat +Appl) (lift (S O) O v2) t6)) t9))))) (\lambda (H31: (eq T (THead (Bind b) u0 +t5) t4)).(eq_ind T (THead (Bind b) u0 t5) (\lambda (t8: T).(ex2 T (\lambda +(t9: T).(pr0 (THead (Flat Appl) u2 t8) t9)) (\lambda (t9: T).(pr0 (THead +(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9)))) (ex2_ind T +(\lambda (t8: T).(pr0 u2 t8)) (\lambda (t8: T).(pr0 v2 t8)) (ex2 T (\lambda +(t8: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u0 t5)) t8)) (\lambda (t8: +T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t8))) +(\lambda (x: T).(\lambda (H32: (pr0 u2 x)).(\lambda (H33: (pr0 v2 +x)).(pr0_confluence__pr0_cong_upsilon_refl b H16 u0 u3 H18 t5 t6 H19 u2 v2 x +H32 H33)))) (H26 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 t5)) u2 +H27 v2 H17)) t4 H31)) t7 (sym_eq T t7 (THead (Bind b) u0 t5) H29) H30))) | +(pr0_comp u4 u5 H29 t7 t8 H30 k0) \Rightarrow (\lambda (H31: (eq T (THead k0 +u4 t7) (THead (Bind b) u0 t5))).(\lambda (H32: (eq T (THead k0 u5 t8) +t4)).((let H33 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) \Rightarrow t9])) +(THead k0 u4 t7) (THead (Bind b) u0 t5) H31) in ((let H34 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow u4 | (TLRef _) +\Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) (THead k0 u4 t7) (THead +(Bind b) u0 t5) H31) in ((let H35 \def (f_equal T K (\lambda (e: T).(match e +with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) +\Rightarrow k1])) (THead k0 u4 t7) (THead (Bind b) u0 t5) H31) in (eq_ind K +(Bind b) (\lambda (k1: K).((eq T u4 u0) \to ((eq T t7 t5) \to ((eq T (THead +k1 u5 t8) t4) \to ((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) +u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9))))))))) (\lambda (H36: (eq T +u4 u0)).(eq_ind T u0 (\lambda (t9: T).((eq T t7 t5) \to ((eq T (THead (Bind +b) u5 t8) t4) \to ((pr0 t9 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: +T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind +b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t10)))))))) (\lambda (H37: +(eq T t7 t5)).(eq_ind T t5 (\lambda (t9: T).((eq T (THead (Bind b) u5 t8) t4) +\to ((pr0 u0 u5) \to ((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead +(Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead +(Flat Appl) (lift (S O) O v2) t6)) t10))))))) (\lambda (H38: (eq T (THead +(Bind b) u5 t8) t4)).(eq_ind T (THead (Bind b) u5 t8) (\lambda (t9: T).((pr0 +u0 u5) \to ((pr0 t5 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) +u2 t9) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) +(lift (S O) O v2) t6)) t10)))))) (\lambda (H39: (pr0 u0 u5)).(\lambda (H40: +(pr0 t5 t8)).(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 +t6 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 +t8)) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift +(S O) O v2) t6)) t9))) (\lambda (x: T).(\lambda (H41: (pr0 t8 x)).(\lambda +(H42: (pr0 t6 x)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: +T).(pr0 u3 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead +(Bind b) u5 t8)) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat +Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x0: T).(\lambda (H43: (pr0 u5 +x0)).(\lambda (H44: (pr0 u3 x0)).(ex2_ind T (\lambda (t9: T).(pr0 u2 t9)) +(\lambda (t9: T).(pr0 v2 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) +u2 (THead (Bind b) u5 t8)) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 +(THead (Flat Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x1: T).(\lambda +(H45: (pr0 u2 x1)).(\lambda (H46: (pr0 v2 +x1)).(pr0_confluence__pr0_cong_upsilon_cong b H16 u2 v2 x1 H45 H46 t8 t6 x +H41 H42 u5 u3 x0 H43 H44)))) (H26 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind +b) u0 t5)) u2 H27 v2 H17))))) (H26 u0 (tlt_trans (THead (Bind b) u0 t5) u0 +(THead (Flat Appl) v1 (THead (Bind b) u0 t5)) (tlt_head_sx (Bind b) u0 t5) +(tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 t5))) u5 H39 u3 H18))))) (H26 +t5 (tlt_trans (THead (Bind b) u0 t5) t5 (THead (Flat Appl) v1 (THead (Bind b) +u0 t5)) (tlt_head_dx (Bind b) u0 t5) (tlt_head_dx (Flat Appl) v1 (THead (Bind +b) u0 t5))) t8 H40 t6 H19)))) t4 H38)) t7 (sym_eq T t7 t5 H37))) u4 (sym_eq T +u4 u0 H36))) k0 (sym_eq K k0 (Bind b) H35))) H34)) H33)) H32 H29 H30))) | +(pr0_beta u v0 v3 H29 t7 t8 H30) \Rightarrow (\lambda (H31: (eq T (THead +(Flat Appl) v0 (THead (Bind Abst) u t7)) (THead (Bind b) u0 t5))).(\lambda +(H32: (eq T (THead (Bind Abbr) v3 t8) t4)).((let H33 \def (eq_ind T (THead +(Flat Appl) v0 (THead (Bind Abst) u t7)) (\lambda (e: T).(match e with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) +\Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind b) u0 t5) H31) in (False_ind ((eq T (THead (Bind +Abbr) v3 t8) t4) \to ((pr0 v0 v3) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) +u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9)))))) H33)) H32 H29 H30))) | +(pr0_upsilon b0 H29 v0 v3 H30 u4 u5 H31 t7 t8 H32) \Rightarrow (\lambda (H33: +(eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t7)) (THead (Bind b) u0 +t5))).(\lambda (H34: (eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) +O v3) t8)) t4)).((let H35 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind +b0) u4 t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind +b) u0 t5) H33) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat Appl) +(lift (S O) O v3) t8)) t4) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to +((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat +Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) +(lift (S O) O v2) t6)) t9)))))))) H35)) H34 H29 H30 H31 H32))) | (pr0_delta +u4 u5 H29 t7 t8 H30 w H31) \Rightarrow (\lambda (H32: (eq T (THead (Bind +Abbr) u4 t7) (THead (Bind b) u0 t5))).(\lambda (H33: (eq T (THead (Bind Abbr) +u5 w) t4)).((let H34 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) \Rightarrow +t9])) (THead (Bind Abbr) u4 t7) (THead (Bind b) u0 t5) H32) in ((let H35 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u4 | (TLRef +_) \Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) (THead (Bind Abbr) u4 +t7) (THead (Bind b) u0 t5) H32) in ((let H36 \def (f_equal T B (\lambda (e: +T).(match e with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | +(THead k0 _ _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat +_) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t7) (THead (Bind b) u0 t5) +H32) in (eq_ind B Abbr (\lambda (b0: B).((eq T u4 u0) \to ((eq T t7 t5) \to +((eq T (THead (Bind Abbr) u5 w) t4) \to ((pr0 u4 u5) \to ((pr0 t7 t8) \to +((subst0 O u5 t8 w) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 +t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift +(S O) O v2) t6)) t9)))))))))) (\lambda (H37: (eq T u4 u0)).(eq_ind T u0 +(\lambda (t9: T).((eq T t7 t5) \to ((eq T (THead (Bind Abbr) u5 w) t4) \to +((pr0 t9 u5) \to ((pr0 t7 t8) \to ((subst0 O u5 t8 w) \to (ex2 T (\lambda +(t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead +(Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t10))))))))) +(\lambda (H38: (eq T t7 t5)).(eq_ind T t5 (\lambda (t9: T).((eq T (THead +(Bind Abbr) u5 w) t4) \to ((pr0 u0 u5) \to ((pr0 t9 t8) \to ((subst0 O u5 t8 +w) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda +(t10: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) +t10)))))))) (\lambda (H39: (eq T (THead (Bind Abbr) u5 w) t4)).(eq_ind T +(THead (Bind Abbr) u5 w) (\lambda (t9: T).((pr0 u0 u5) \to ((pr0 t5 t8) \to +((subst0 O u5 t8 w) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 +t9) t10)) (\lambda (t10: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) +(lift (S O) O v2) t6)) t10))))))) (\lambda (H40: (pr0 u0 u5)).(\lambda (H41: +(pr0 t5 t8)).(\lambda (H42: (subst0 O u5 t8 w)).(let H43 \def (eq_ind_r B b +(\lambda (b0: B).(\forall (v: T).((tlt v (THead (Flat Appl) v1 (THead (Bind +b0) u0 t5))) \to (\forall (t9: T).((pr0 v t9) \to (\forall (t10: T).((pr0 v +t10) \to (ex2 T (\lambda (t11: T).(pr0 t9 t11)) (\lambda (t11: T).(pr0 t10 +t11)))))))))) H26 Abbr H36) in (let H44 \def (eq_ind_r B b (\lambda (b0: +B).(eq T t3 (THead (Bind b0) u0 t5))) H23 Abbr H36) in (let H45 \def +(eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H16 Abbr H36) in +(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t6 t9)) (ex2 T +(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t9)) +(\lambda (t9: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O +v2) t6)) t9))) (\lambda (x: T).(\lambda (H46: (pr0 t8 x)).(\lambda (H47: (pr0 +t6 x)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: T).(pr0 u3 t9)) +(ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) +t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S +O) O v2) t6)) t9))) (\lambda (x0: T).(\lambda (H48: (pr0 u5 x0)).(\lambda +(H49: (pr0 u3 x0)).(ex2_ind T (\lambda (t9: T).(pr0 u2 t9)) (\lambda (t9: +T).(pr0 v2 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead +(Bind Abbr) u5 w)) t9)) (\lambda (t9: T).(pr0 (THead (Bind Abbr) u3 (THead +(Flat Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x1: T).(\lambda (H50: (pr0 +u2 x1)).(\lambda (H51: (pr0 v2 x1)).(pr0_confluence__pr0_cong_upsilon_delta +H45 u5 t8 w H42 u2 v2 x1 H50 H51 t6 x H46 H47 u3 x0 H48 H49)))) (H43 v1 +(tlt_head_sx (Flat Appl) v1 (THead (Bind Abbr) u0 t5)) u2 H27 v2 H17))))) +(H43 u0 (tlt_trans (THead (Bind Abbr) u0 t5) u0 (THead (Flat Appl) v1 (THead +(Bind Abbr) u0 t5)) (tlt_head_sx (Bind Abbr) u0 t5) (tlt_head_dx (Flat Appl) +v1 (THead (Bind Abbr) u0 t5))) u5 H40 u3 H18))))) (H43 t5 (tlt_trans (THead +(Bind Abbr) u0 t5) t5 (THead (Flat Appl) v1 (THead (Bind Abbr) u0 t5)) +(tlt_head_dx (Bind Abbr) u0 t5) (tlt_head_dx (Flat Appl) v1 (THead (Bind +Abbr) u0 t5))) t8 H41 t6 H19)))))))) t4 H39)) t7 (sym_eq T t7 t5 H38))) u4 +(sym_eq T u4 u0 H37))) b H36)) H35)) H34)) H33 H29 H30 H31))) | (pr0_zeta b0 +H29 t7 t8 H30 u) \Rightarrow (\lambda (H31: (eq T (THead (Bind b0) u (lift (S +O) O t7)) (THead (Bind b) u0 t5))).(\lambda (H32: (eq T t8 t4)).((let H33 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow +(lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (TLRef _) \Rightarrow +(lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (THead _ _ t9) +\Rightarrow t9])) (THead (Bind b0) u (lift (S O) O t7)) (THead (Bind b) u0 +t5) H31) in ((let H34 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t9 _) \Rightarrow t9])) +(THead (Bind b0) u (lift (S O) O t7)) (THead (Bind b) u0 t5) H31) in ((let +H35 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 +| (TLRef _) \Rightarrow b0 | (THead k0 _ _) \Rightarrow (match k0 with [(Bind +b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S +O) O t7)) (THead (Bind b) u0 t5) H31) in (eq_ind B b (\lambda (b1: B).((eq T +u u0) \to ((eq T (lift (S O) O t7) t5) \to ((eq T t8 t4) \to ((not (eq B b1 +Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Flat Appl) +u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift +(S O) O v2) t6)) t9))))))))) (\lambda (H36: (eq T u u0)).(eq_ind T u0 +(\lambda (_: T).((eq T (lift (S O) O t7) t5) \to ((eq T t8 t4) \to ((not (eq +B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Flat +Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead (Flat +Appl) (lift (S O) O v2) t6)) t10)))))))) (\lambda (H37: (eq T (lift (S O) O +t7) t5)).(eq_ind T (lift (S O) O t7) (\lambda (_: T).((eq T t8 t4) \to ((not +(eq B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead +(Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind b) u3 (THead +(Flat Appl) (lift (S O) O v2) t6)) t10))))))) (\lambda (H38: (eq T t8 +t4)).(eq_ind T t4 (\lambda (t9: T).((not (eq B b Abst)) \to ((pr0 t7 t9) \to +(ex2 T (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: +T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) +t10)))))) (\lambda (H39: (not (eq B b Abst))).(\lambda (H40: (pr0 t7 +t4)).(let H41 \def (eq_ind_r T t5 (\lambda (t9: T).(\forall (v: T).((tlt v +(THead (Flat Appl) v1 (THead (Bind b) u0 t9))) \to (\forall (t10: T).((pr0 v +t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T (\lambda (t12: T).(pr0 t10 +t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H26 (lift (S O) O t7) H37) in +(let H42 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T t3 (THead (Bind b) u0 +t9))) H23 (lift (S O) O t7) H37) in (let H43 \def (eq_ind_r T t5 (\lambda +(t9: T).(pr0 t9 t6)) H19 (lift (S O) O t7) H37) in (ex2_ind T (\lambda (t9: +T).(eq T t6 (lift (S O) O t9))) (\lambda (t9: T).(pr0 t7 t9)) (ex2 T (\lambda +(t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead +(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9))) (\lambda (x: +T).(\lambda (H44: (eq T t6 (lift (S O) O x))).(\lambda (H45: (pr0 t7 +x)).(eq_ind_r T (lift (S O) O x) (\lambda (t9: T).(ex2 T (\lambda (t10: +T).(pr0 (THead (Flat Appl) u2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Bind +b) u3 (THead (Flat Appl) (lift (S O) O v2) t9)) t10)))) (ex2_ind T (\lambda +(t9: T).(pr0 x t9)) (\lambda (t9: T).(pr0 t4 t9)) (ex2 T (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Bind b) +u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t9))) (\lambda +(x0: T).(\lambda (H46: (pr0 x x0)).(\lambda (H47: (pr0 t4 x0)).(ex2_ind T +(\lambda (t9: T).(pr0 u2 t9)) (\lambda (t9: T).(pr0 v2 t9)) (ex2 T (\lambda +(t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 (THead +(Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t9))) +(\lambda (x1: T).(\lambda (H48: (pr0 u2 x1)).(\lambda (H49: (pr0 v2 +x1)).(pr0_confluence__pr0_cong_upsilon_zeta b H39 u0 u3 H18 u2 v2 x1 H48 H49 +x t4 x0 H46 H47)))) (H41 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 +(lift (S O) O t7))) u2 H27 v2 H17))))) (H41 t7 (tlt_trans (THead (Bind b) u0 +(lift (S O) O t7)) t7 (THead (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O +t7))) (lift_tlt_dx (Bind b) u0 t7 (S O) O) (tlt_head_dx (Flat Appl) v1 (THead +(Bind b) u0 (lift (S O) O t7)))) x H45 t4 H40)) t6 H44)))) (pr0_gen_lift t7 +t6 (S O) O H43))))))) t8 (sym_eq T t8 t4 H38))) t5 H37)) u (sym_eq T u u0 +H36))) b0 (sym_eq B b0 b H35))) H34)) H33)) H32 H29 H30))) | (pr0_tau t7 t8 +H29 u) \Rightarrow (\lambda (H30: (eq T (THead (Flat Cast) u t7) (THead (Bind +b) u0 t5))).(\lambda (H31: (eq T t8 t4)).((let H32 \def (eq_ind T (THead +(Flat Cast) u t7) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False +| (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind +b) u0 t5) H30) in (False_ind ((eq T t8 t4) \to ((pr0 t7 t8) \to (ex2 T +(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t4) t9)) (\lambda (t9: T).(pr0 +(THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t9))))) H32)) +H31 H29)))]) in (H29 (refl_equal T (THead (Bind b) u0 t5)) (refl_equal T +t4))))) k H25))))) H22)) H21))))))) t2 H15)) t H13 H14 H9 H10 H11 H12))) | +(pr0_delta u0 u3 H9 t5 t6 H10 w H11) \Rightarrow (\lambda (H12: (eq T (THead +(Bind Abbr) u0 t5) t)).(\lambda (H13: (eq T (THead (Bind Abbr) u3 w) +t2)).(eq_ind T (THead (Bind Abbr) u0 t5) (\lambda (_: T).((eq T (THead (Bind +Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w) \to +(ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 +t8)))))))) (\lambda (H14: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T +(THead (Bind Abbr) u3 w) (\lambda (t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) \to +((subst0 O u3 t6 w) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) +(\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (H15: (pr0 u0 u3)).(\lambda (H16: +(pr0 t5 t6)).(\lambda (H17: (subst0 O u3 t6 w)).(let H18 \def (eq_ind_r T t +(\lambda (t7: T).(eq T (THead k u1 t3) t7)) H4 (THead (Bind Abbr) u0 t5) H12) +in (let H19 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) +(THead k u1 t3) (THead (Bind Abbr) u0 t5) H18) in ((let H20 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) +\Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) (THead +(Bind Abbr) u0 t5) H18) in ((let H21 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t7) +\Rightarrow t7])) (THead k u1 t3) (THead (Bind Abbr) u0 t5) H18) in (\lambda +(H22: (eq T u1 u0)).(\lambda (H23: (eq K k (Bind Abbr))).(let H24 \def +(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: +T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: +T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind Abbr) +u0 t5) H12) in (eq_ind_r K (Bind Abbr) (\lambda (k0: K).(ex2 T (\lambda (t7: +T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w) +t7)))) (let H25 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 u0 H22) in +(let H26 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 t5 H21) in +(ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T +(\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 t4) t7)) (\lambda (t7: T).(pr0 +(THead (Bind Abbr) u3 w) t7))) (\lambda (x: T).(\lambda (H27: (pr0 t4 +x)).(\lambda (H28: (pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) +(\lambda (t7: T).(pr0 u3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) +u2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w) t7))) (\lambda +(x0: T).(\lambda (H29: (pr0 u2 x0)).(\lambda (H30: (pr0 u3 +x0)).(pr0_confluence__pr0_cong_delta u3 t6 w H17 u2 x0 H29 H30 t4 x H27 +H28)))) (H24 u0 (tlt_head_sx (Bind Abbr) u0 t5) u2 H25 u3 H15))))) (H24 t5 +(tlt_head_dx (Bind Abbr) u0 t5) t4 H26 t6 H16)))) k H23))))) H20)) H19)))))) +t2 H14)) t H12 H13 H9 H10 H11))) | (pr0_zeta b H9 t5 t6 H10 u) \Rightarrow +(\lambda (H11: (eq T (THead (Bind b) u (lift (S O) O t5)) t)).(\lambda (H12: +(eq T t6 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t5)) (\lambda (_: +T).((eq T t6 t2) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ex2 T +(\lambda (t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) +(\lambda (H13: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b +Abst)) \to ((pr0 t5 t7) \to (ex2 T (\lambda (t8: T).(pr0 (THead k u2 t4) t8)) +(\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H14: (not (eq B b +Abst))).(\lambda (H15: (pr0 t5 t2)).(let H16 \def (eq_ind_r T t (\lambda (t7: +T).(eq T (THead k u1 t3) t7)) H4 (THead (Bind b) u (lift (S O) O t5)) H11) in +(let H17 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) +(THead k u1 t3) (THead (Bind b) u (lift (S O) O t5)) H16) in ((let H18 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef +_) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead k u1 t3) (THead +(Bind b) u (lift (S O) O t5)) H16) in ((let H19 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | +(THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) (THead (Bind b) u (lift (S +O) O t5)) H16) in (\lambda (H20: (eq T u1 u)).(\lambda (H21: (eq K k (Bind +b))).(let H22 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) +\to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T +(\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H +(THead (Bind b) u (lift (S O) O t5)) H11) in (eq_ind_r K (Bind b) (\lambda +(k0: K).(ex2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) (\lambda (t7: +T).(pr0 t2 t7)))) (let H23 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H7 +u H20) in (let H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 (lift +(S O) O t5) H19) in (ex2_ind T (\lambda (t7: T).(eq T t4 (lift (S O) O t7))) +(\lambda (t7: T).(pr0 t5 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 +t4) t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H25: (eq T +t4 (lift (S O) O x))).(\lambda (H26: (pr0 t5 x)).(eq_ind_r T (lift (S O) O x) +(\lambda (t7: T).(ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 t7) t8)) +(\lambda (t8: T).(pr0 t2 t8)))) (ex2_ind T (\lambda (t7: T).(pr0 x t7)) +(\lambda (t7: T).(pr0 t2 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 +(lift (S O) O x)) t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x0: +T).(\lambda (H27: (pr0 x x0)).(\lambda (H28: (pr0 t2 x0)).(ex_intro2 T +(\lambda (t7: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t7)) (\lambda (t7: +T).(pr0 t2 t7)) x0 (pr0_zeta b H14 x x0 H27 u2) H28)))) (H22 t5 (lift_tlt_dx +(Bind b) u t5 (S O) O) x H26 t2 H15)) t4 H25)))) (pr0_gen_lift t5 t4 (S O) O +H24)))) k H21))))) H18)) H17))))) t6 (sym_eq T t6 t2 H13))) t H11 H12 H9 +H10))) | (pr0_tau t5 t6 H9 u) \Rightarrow (\lambda (H10: (eq T (THead (Flat +Cast) u t5) t)).(\lambda (H11: (eq T t6 t2)).(eq_ind T (THead (Flat Cast) u +t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H12: +(eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda +(t8: T).(pr0 (THead k u2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))) (\lambda +(H13: (pr0 t5 t2)).(let H14 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead +k u1 t3) t7)) H4 (THead (Flat Cast) u t5) H10) in (let H15 \def (f_equal T K +(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t3) (THead (Flat +Cast) u t5) H14) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) +\Rightarrow t7])) (THead k u1 t3) (THead (Flat Cast) u t5) H14) in ((let H17 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | +(TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t3) +(THead (Flat Cast) u t5) H14) in (\lambda (H18: (eq T u1 u)).(\lambda (H19: +(eq K k (Flat Cast))).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(\forall +(v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: +T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: +T).(pr0 t9 t10)))))))))) H (THead (Flat Cast) u t5) H10) in (eq_ind_r K (Flat +Cast) (\lambda (k0: K).(ex2 T (\lambda (t7: T).(pr0 (THead k0 u2 t4) t7)) +(\lambda (t7: T).(pr0 t2 t7)))) (let H21 \def (eq_ind T u1 (\lambda (t7: +T).(pr0 t7 u2)) H7 u H18) in (let H22 \def (eq_ind T t3 (\lambda (t7: T).(pr0 +t7 t4)) H8 t5 H17) in (ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: +T).(pr0 t2 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Flat Cast) u2 t4) t7)) +(\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H23: (pr0 t4 +x)).(\lambda (H24: (pr0 t2 x)).(ex_intro2 T (\lambda (t7: T).(pr0 (THead +(Flat Cast) u2 t4) t7)) (\lambda (t7: T).(pr0 t2 t7)) x (pr0_tau t4 x H23 u2) +H24)))) (H20 t5 (tlt_head_dx (Flat Cast) u t5) t4 H22 t2 H13)))) k H19))))) +H16)) H15)))) t6 (sym_eq T t6 t2 H12))) t H10 H11 H9)))]) in (H9 (refl_equal +T t) (refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_beta u v1 v2 H2 t3 +t4 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind +Abst) u t3)) t)).(\lambda (H5: (eq T (THead (Bind Abbr) v2 t4) t1)).(eq_ind T +(THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (_: T).((eq T (THead +(Bind Abbr) v2 t4) t1) \to ((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda +(t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6))))))) (\lambda (H6: (eq T +(THead (Bind Abbr) v2 t4) t1)).(eq_ind T (THead (Bind Abbr) v2 t4) (\lambda +(t5: T).((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t5 +t6)) (\lambda (t6: T).(pr0 t2 t6)))))) (\lambda (H7: (pr0 v1 v2)).(\lambda +(H8: (pr0 t3 t4)).(let H9 \def (match H1 with [(pr0_refl t5) \Rightarrow +(\lambda (H9: (eq T t5 t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T t (\lambda +(t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 +t4) t7)) (\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H11: (eq T t t2)).(eq_ind +T t2 (\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) +t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H12 \def (eq_ind_r T t (\lambda +(t6: T).(eq T t6 t2)) H11 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H4) +in (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (t6: +T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: +T).(pr0 t6 t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) +H9 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H4) in (let H14 \def +(eq_ind_r T t (\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: +T).((pr0 v t7) \to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: +T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Appl) v1 +(THead (Bind Abst) u t3)) H4) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead +(Bind Abbr) v2 t4) t6)) (\lambda (t6: T).(pr0 (THead (Flat Appl) v1 (THead +(Bind Abst) u t3)) t6)) (THead (Bind Abbr) v2 t4) (pr0_refl (THead (Bind +Abbr) v2 t4)) (pr0_beta u v1 v2 H7 t3 t4 H8)))) t2 H12)) t (sym_eq T t t2 +H11))) t5 (sym_eq T t5 t H9) H10))) | (pr0_comp u1 u2 H9 t5 t6 H10 k) +\Rightarrow (\lambda (H11: (eq T (THead k u1 t5) t)).(\lambda (H12: (eq T +(THead k u2 t6) t2)).(eq_ind T (THead k u1 t5) (\lambda (_: T).((eq T (THead +k u2 t6) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) +(\lambda (H13: (eq T (THead k u2 t6) t2)).(eq_ind T (THead k u2 t6) (\lambda +(t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead +(Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (H14: (pr0 +u1 u2)).(\lambda (H15: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda (t7: +T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) t7)) H4 (THead k u1 +t5) H11) in (let H17 \def (f_equal T K (\lambda (e: T).(match e with [(TSort +_) \Rightarrow (Flat Appl) | (TLRef _) \Rightarrow (Flat Appl) | (THead k0 _ +_) \Rightarrow k0])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead k +u1 t5) H16) in ((let H18 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t7 _) +\Rightarrow t7])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead k u1 +t5) H16) in ((let H19 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow (THead (Bind Abst) u t3) | (TLRef _) \Rightarrow (THead (Bind +Abst) u t3) | (THead _ _ t7) \Rightarrow t7])) (THead (Flat Appl) v1 (THead +(Bind Abst) u t3)) (THead k u1 t5) H16) in (\lambda (H20: (eq T v1 +u1)).(\lambda (H21: (eq K (Flat Appl) k)).(eq_ind K (Flat Appl) (\lambda (k0: +K).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: +T).(pr0 (THead k0 u2 t6) t7)))) (let H22 \def (eq_ind_r K k (\lambda (k0: +K).(eq T (THead k0 u1 t5) t)) H11 (Flat Appl) H21) in (let H23 \def (eq_ind_r +T t5 (\lambda (t7: T).(pr0 t7 t6)) H15 (THead (Bind Abst) u t3) H19) in (let +H24 \def (match H23 with [(pr0_refl t7) \Rightarrow (\lambda (H24: (eq T t7 +(THead (Bind Abst) u t3))).(\lambda (H25: (eq T t7 t6)).(eq_ind T (THead +(Bind Abst) u t3) (\lambda (t8: T).((eq T t8 t6) \to (ex2 T (\lambda (t9: +T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat +Appl) u2 t6) t9))))) (\lambda (H26: (eq T (THead (Bind Abst) u t3) +t6)).(eq_ind T (THead (Bind Abst) u t3) (\lambda (t8: T).(ex2 T (\lambda (t9: +T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat +Appl) u2 t8) t9)))) (let H27 \def (eq_ind_r T t5 (\lambda (t8: T).(eq T +(THead (Flat Appl) u1 t8) t)) H22 (THead (Bind Abst) u t3) H19) in (let H28 +\def (eq_ind_r T t (\lambda (t8: T).(\forall (v: T).((tlt v t8) \to (\forall +(t9: T).((pr0 v t9) \to (\forall (t10: T).((pr0 v t10) \to (ex2 T (\lambda +(t11: T).(pr0 t9 t11)) (\lambda (t11: T).(pr0 t10 t11)))))))))) H (THead +(Flat Appl) u1 (THead (Bind Abst) u t3)) H27) in (let H29 \def (eq_ind T v1 +(\lambda (t8: T).(pr0 t8 v2)) H7 u1 H20) in (ex2_ind T (\lambda (t8: T).(pr0 +v2 t8)) (\lambda (t8: T).(pr0 u2 t8)) (ex2 T (\lambda (t8: T).(pr0 (THead +(Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 (THead (Flat Appl) u2 (THead +(Bind Abst) u t3)) t8))) (\lambda (x: T).(\lambda (H30: (pr0 v2 x)).(\lambda +(H31: (pr0 u2 x)).(ex_intro2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 +t4) t8)) (\lambda (t8: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u +t3)) t8)) (THead (Bind Abbr) x t4) (pr0_comp v2 x H30 t4 t4 (pr0_refl t4) +(Bind Abbr)) (pr0_beta u u2 x H31 t3 t4 H8))))) (H28 u1 (tlt_head_sx (Flat +Appl) u1 (THead (Bind Abst) u t3)) v2 H29 u2 H14))))) t6 H26)) t7 (sym_eq T +t7 (THead (Bind Abst) u t3) H24) H25))) | (pr0_comp u0 u3 H24 t7 t8 H25 k0) +\Rightarrow (\lambda (H26: (eq T (THead k0 u0 t7) (THead (Bind Abst) u +t3))).(\lambda (H27: (eq T (THead k0 u3 t8) t6)).((let H28 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow t7 | (TLRef _) +\Rightarrow t7 | (THead _ _ t9) \Rightarrow t9])) (THead k0 u0 t7) (THead +(Bind Abst) u t3) H26) in ((let H29 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t9 _) +\Rightarrow t9])) (THead k0 u0 t7) (THead (Bind Abst) u t3) H26) in ((let H30 +\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | +(TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t7) +(THead (Bind Abst) u t3) H26) in (eq_ind K (Bind Abst) (\lambda (k1: K).((eq +T u0 u) \to ((eq T t7 t3) \to ((eq T (THead k1 u3 t8) t6) \to ((pr0 u0 u3) +\to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) +t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t6) t9))))))))) (\lambda +(H31: (eq T u0 u)).(eq_ind T u (\lambda (t9: T).((eq T t7 t3) \to ((eq T +(THead (Bind Abst) u3 t8) t6) \to ((pr0 t9 u3) \to ((pr0 t7 t8) \to (ex2 T +(\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 +(THead (Flat Appl) u2 t6) t10)))))))) (\lambda (H32: (eq T t7 t3)).(eq_ind T +t3 (\lambda (t9: T).((eq T (THead (Bind Abst) u3 t8) t6) \to ((pr0 u u3) \to +((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) +t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t6) t10))))))) (\lambda +(H33: (eq T (THead (Bind Abst) u3 t8) t6)).(eq_ind T (THead (Bind Abst) u3 +t8) (\lambda (t9: T).((pr0 u u3) \to ((pr0 t3 t8) \to (ex2 T (\lambda (t10: +T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 (THead (Flat +Appl) u2 t9) t10)))))) (\lambda (_: (pr0 u u3)).(\lambda (H35: (pr0 t3 +t8)).(let H36 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T (THead (Flat Appl) +u1 t9) t)) H22 (THead (Bind Abst) u t3) H19) in (let H37 \def (eq_ind_r T t +(\lambda (t9: T).(\forall (v: T).((tlt v t9) \to (\forall (t10: T).((pr0 v +t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T (\lambda (t12: T).(pr0 t10 +t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H (THead (Flat Appl) u1 (THead +(Bind Abst) u t3)) H36) in (let H38 \def (eq_ind T v1 (\lambda (t9: T).(pr0 +t9 v2)) H7 u1 H20) in (ex2_ind T (\lambda (t9: T).(pr0 v2 t9)) (\lambda (t9: +T).(pr0 u2 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) +(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9))) +(\lambda (x: T).(\lambda (H39: (pr0 v2 x)).(\lambda (H40: (pr0 u2 +x)).(ex2_ind T (\lambda (t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t4 t9)) +(ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9))) (\lambda (x0: +T).(\lambda (H41: (pr0 t8 x0)).(\lambda (H42: (pr0 t4 x0)).(ex_intro2 T +(\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 +(THead (Flat Appl) u2 (THead (Bind Abst) u3 t8)) t9)) (THead (Bind Abbr) x +x0) (pr0_comp v2 x H39 t4 x0 H42 (Bind Abbr)) (pr0_beta u3 u2 x H40 t8 x0 +H41))))) (H37 t3 (tlt_trans (THead (Bind Abst) u t3) t3 (THead (Flat Appl) u1 +(THead (Bind Abst) u t3)) (tlt_head_dx (Bind Abst) u t3) (tlt_head_dx (Flat +Appl) u1 (THead (Bind Abst) u t3))) t8 H35 t4 H8))))) (H37 u1 (tlt_head_sx +(Flat Appl) u1 (THead (Bind Abst) u t3)) v2 H38 u2 H14))))))) t6 H33)) t7 +(sym_eq T t7 t3 H32))) u0 (sym_eq T u0 u H31))) k0 (sym_eq K k0 (Bind Abst) +H30))) H29)) H28)) H27 H24 H25))) | (pr0_beta u0 v0 v3 H24 t7 t8 H25) +\Rightarrow (\lambda (H26: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 +t7)) (THead (Bind Abst) u t3))).(\lambda (H27: (eq T (THead (Bind Abbr) v3 +t8) t6)).((let H28 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 +t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t3) +H26) in (False_ind ((eq T (THead (Bind Abbr) v3 t8) t6) \to ((pr0 v0 v3) \to +((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) +(\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t6) t9)))))) H28)) H27 H24 H25))) +| (pr0_upsilon b H24 v0 v3 H25 u0 u3 H26 t7 t8 H27) \Rightarrow (\lambda +(H28: (eq T (THead (Flat Appl) v0 (THead (Bind b) u0 t7)) (THead (Bind Abst) +u t3))).(\lambda (H29: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S +O) O v3) t8)) t6)).((let H30 \def (eq_ind T (THead (Flat Appl) v0 (THead +(Bind b) u0 t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind +Abst) u t3) H28) in (False_ind ((eq T (THead (Bind b) u3 (THead (Flat Appl) +(lift (S O) O v3) t8)) t6) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to +((pr0 u0 u3) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind +Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u2 t6) t9)))))))) +H30)) H29 H24 H25 H26 H27))) | (pr0_delta u0 u3 H24 t7 t8 H25 w H26) +\Rightarrow (\lambda (H27: (eq T (THead (Bind Abbr) u0 t7) (THead (Bind Abst) +u t3))).(\lambda (H28: (eq T (THead (Bind Abbr) u3 w) t6)).((let H29 \def +(eq_ind T (THead (Bind Abbr) u0 t7) (\lambda (e: T).(match e with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow +(match k0 with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | +Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow +False])])) I (THead (Bind Abst) u t3) H27) in (False_ind ((eq T (THead (Bind +Abbr) u3 w) t6) \to ((pr0 u0 u3) \to ((pr0 t7 t8) \to ((subst0 O u3 t8 w) \to +(ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 t6) t9))))))) H29)) H28 H24 H25 H26))) | +(pr0_zeta b H24 t7 t8 H25 u0) \Rightarrow (\lambda (H26: (eq T (THead (Bind +b) u0 (lift (S O) O t7)) (THead (Bind Abst) u t3))).(\lambda (H27: (eq T t8 +t6)).((let H28 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (TLRef _) +\Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t7) | (THead _ _ +t9) \Rightarrow t9])) (THead (Bind b) u0 (lift (S O) O t7)) (THead (Bind +Abst) u t3) H26) in ((let H29 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t9 _) +\Rightarrow t9])) (THead (Bind b) u0 (lift (S O) O t7)) (THead (Bind Abst) u +t3) H26) in ((let H30 \def (f_equal T B (\lambda (e: T).(match e with [(TSort +_) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k0 _ _) \Rightarrow +(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead +(Bind b) u0 (lift (S O) O t7)) (THead (Bind Abst) u t3) H26) in (eq_ind B +Abst (\lambda (b0: B).((eq T u0 u) \to ((eq T (lift (S O) O t7) t3) \to ((eq +T t8 t6) \to ((not (eq B b0 Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: +T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: T).(pr0 (THead (Flat +Appl) u2 t6) t9))))))))) (\lambda (H31: (eq T u0 u)).(eq_ind T u (\lambda (_: +T).((eq T (lift (S O) O t7) t3) \to ((eq T t8 t6) \to ((not (eq B Abst Abst)) +\to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) +t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u2 t6) t10)))))))) (\lambda +(H32: (eq T (lift (S O) O t7) t3)).(eq_ind T (lift (S O) O t7) (\lambda (_: +T).((eq T t8 t6) \to ((not (eq B Abst Abst)) \to ((pr0 t7 t8) \to (ex2 T +(\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 +(THead (Flat Appl) u2 t6) t10))))))) (\lambda (H33: (eq T t8 t6)).(eq_ind T +t6 (\lambda (t9: T).((not (eq B Abst Abst)) \to ((pr0 t7 t9) \to (ex2 T +(\lambda (t10: T).(pr0 (THead (Bind Abbr) v2 t4) t10)) (\lambda (t10: T).(pr0 +(THead (Flat Appl) u2 t6) t10)))))) (\lambda (H34: (not (eq B Abst +Abst))).(\lambda (_: (pr0 t7 t6)).(let H36 \def (match (H34 (refl_equal B +Abst)) in False with []) in H36))) t8 (sym_eq T t8 t6 H33))) t3 H32)) u0 +(sym_eq T u0 u H31))) b (sym_eq B b Abst H30))) H29)) H28)) H27 H24 H25))) | +(pr0_tau t7 t8 H24 u0) \Rightarrow (\lambda (H25: (eq T (THead (Flat Cast) u0 +t7) (THead (Bind Abst) u t3))).(\lambda (H26: (eq T t8 t6)).((let H27 \def +(eq_ind T (THead (Flat Cast) u0 t7) (\lambda (e: T).(match e with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow +(match k0 with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind Abst) u t3) H25) in (False_ind ((eq T t8 t6) \to ((pr0 t7 t8) +\to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) v2 t4) t9)) (\lambda (t9: +T).(pr0 (THead (Flat Appl) u2 t6) t9))))) H27)) H26 H24)))]) in (H24 +(refl_equal T (THead (Bind Abst) u t3)) (refl_equal T t6))))) k H21)))) H18)) +H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_beta u0 v0 v3 H9 t5 t6 H10) +\Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 +t5)) t)).(\lambda (H12: (eq T (THead (Bind Abbr) v3 t6) t2)).(eq_ind T (THead +(Flat Appl) v0 (THead (Bind Abst) u0 t5)) (\lambda (_: T).((eq T (THead (Bind +Abbr) v3 t6) t2) \to ((pr0 v0 v3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) +(\lambda (H13: (eq T (THead (Bind Abbr) v3 t6) t2)).(eq_ind T (THead (Bind +Abbr) v3 t6) (\lambda (t7: T).((pr0 v0 v3) \to ((pr0 t5 t6) \to (ex2 T +(\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 +t8)))))) (\lambda (H14: (pr0 v0 v3)).(\lambda (H15: (pr0 t5 t6)).(let H16 +\def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind +Abst) u t3)) t7)) H4 (THead (Flat Appl) v0 (THead (Bind Abst) u0 t5)) H11) in +(let H17 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) +(THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead +(Bind Abst) u0 t5)) H16) in ((let H18 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead +_ _ t7) \Rightarrow (match t7 with [(TSort _) \Rightarrow u | (TLRef _) +\Rightarrow u | (THead _ t8 _) \Rightarrow t8])])) (THead (Flat Appl) v1 +(THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t5)) +H16) in ((let H19 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow (match +t7 with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t8) +\Rightarrow t8])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead +(Flat Appl) v0 (THead (Bind Abst) u0 t5)) H16) in (\lambda (_: (eq T u +u0)).(\lambda (H21: (eq T v1 v0)).(let H22 \def (eq_ind_r T t (\lambda (t7: +T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall +(t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: +T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u0 t5)) +H11) in (let H23 \def (eq_ind T v1 (\lambda (t7: T).(pr0 t7 v2)) H7 v0 H21) +in (let H24 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H8 t5 H19) in +(ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T +(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 +(THead (Bind Abbr) v3 t6) t7))) (\lambda (x: T).(\lambda (H25: (pr0 t4 +x)).(\lambda (H26: (pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 v2 t7)) +(\lambda (t7: T).(pr0 v3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) +v2 t4) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) v3 t6) t7))) (\lambda +(x0: T).(\lambda (H27: (pr0 v2 x0)).(\lambda (H28: (pr0 v3 x0)).(ex_intro2 T +(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 +(THead (Bind Abbr) v3 t6) t7)) (THead (Bind Abbr) x0 x) (pr0_comp v2 x0 H27 +t4 x H25 (Bind Abbr)) (pr0_comp v3 x0 H28 t6 x H26 (Bind Abbr)))))) (H22 v0 +(tlt_head_sx (Flat Appl) v0 (THead (Bind Abst) u0 t5)) v2 H23 v3 H14))))) +(H22 t5 (tlt_trans (THead (Bind Abst) u0 t5) t5 (THead (Flat Appl) v0 (THead +(Bind Abst) u0 t5)) (tlt_head_dx (Bind Abst) u0 t5) (tlt_head_dx (Flat Appl) +v0 (THead (Bind Abst) u0 t5))) t4 H24 t6 H15)))))))) H18)) H17))))) t2 H13)) +t H11 H12 H9 H10))) | (pr0_upsilon b H9 v0 v3 H10 u1 u2 H11 t5 t6 H12) +\Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v0 (THead (Bind b) u1 +t5)) t)).(\lambda (H14: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v3) t6)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u1 t5)) +(\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v3) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to +((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) +(\lambda (t8: T).(pr0 t2 t8))))))))) (\lambda (H15: (eq T (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v3) t6)) t2)).(eq_ind T (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v3) t6)) (\lambda (t7: T).((not (eq B b +Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda +(t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 +t8)))))))) (\lambda (H16: (not (eq B b Abst))).(\lambda (_: (pr0 v0 +v3)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t5 t6)).(let H20 \def +(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) +u t3)) t7)) H4 (THead (Flat Appl) v0 (THead (Bind b) u1 t5)) H13) in (let H21 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | +(TLRef _) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) (THead (Flat +Appl) v1 (THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead (Bind b) u1 +t5)) H20) in ((let H22 \def (f_equal T B (\lambda (e: T).(match e with +[(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead _ _ t7) +\Rightarrow (match t7 with [(TSort _) \Rightarrow Abst | (TLRef _) +\Rightarrow Abst | (THead k _ _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abst])])])) (THead (Flat Appl) v1 +(THead (Bind Abst) u t3)) (THead (Flat Appl) v0 (THead (Bind b) u1 t5)) H20) +in ((let H23 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ _ t7) \Rightarrow (match +t7 with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t8 _) +\Rightarrow t8])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead +(Flat Appl) v0 (THead (Bind b) u1 t5)) H20) in ((let H24 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) +\Rightarrow t3 | (THead _ _ t7) \Rightarrow (match t7 with [(TSort _) +\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t8) \Rightarrow +t8])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (THead (Flat Appl) v0 +(THead (Bind b) u1 t5)) H20) in (\lambda (_: (eq T u u1)).(\lambda (H26: (eq +B Abst b)).(\lambda (_: (eq T v1 v0)).(eq_ind B Abst (\lambda (b0: B).(ex2 T +(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 +(THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v3) t6)) t7)))) (let H28 +\def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abst))) H16 Abst H26) in +(let H29 \def (match (H28 (refl_equal B Abst)) in False with []) in H29)) b +H26))))) H23)) H22)) H21))))))) t2 H15)) t H13 H14 H9 H10 H11 H12))) | +(pr0_delta u1 u2 H9 t5 t6 H10 w H11) \Rightarrow (\lambda (H12: (eq T (THead +(Bind Abbr) u1 t5) t)).(\lambda (H13: (eq T (THead (Bind Abbr) u2 w) +t2)).(eq_ind T (THead (Bind Abbr) u1 t5) (\lambda (_: T).((eq T (THead (Bind +Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to +(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: +T).(pr0 t2 t8)))))))) (\lambda (H14: (eq T (THead (Bind Abbr) u2 w) +t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t7: T).((pr0 u1 u2) \to +((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ex2 T (\lambda (t8: T).(pr0 (THead +(Bind Abbr) v2 t4) t8)) (\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (_: (pr0 +u1 u2)).(\lambda (_: (pr0 t5 t6)).(\lambda (_: (subst0 O u2 t6 w)).(let H18 +\def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind +Abst) u t3)) t7)) H4 (THead (Bind Abbr) u1 t5) H12) in (let H19 \def (eq_ind +T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ +_) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (THead (Bind Abbr) u1 t5) H18) in (False_ind (ex2 T +(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 +(THead (Bind Abbr) u2 w) t7))) H19)))))) t2 H14)) t H12 H13 H9 H10 H11))) | +(pr0_zeta b H9 t5 t6 H10 u0) \Rightarrow (\lambda (H11: (eq T (THead (Bind b) +u0 (lift (S O) O t5)) t)).(\lambda (H12: (eq T t6 t2)).(eq_ind T (THead (Bind +b) u0 (lift (S O) O t5)) (\lambda (_: T).((eq T t6 t2) \to ((not (eq B b +Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) +v2 t4) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H13: (eq T t6 +t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b Abst)) \to ((pr0 t5 t7) \to +(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: +T).(pr0 t2 t8)))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t5 +t2)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 +(THead (Bind Abst) u t3)) t7)) H4 (THead (Bind b) u0 (lift (S O) O t5)) H11) +in (let H17 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 (lift +(S O) O t5)) H16) in (False_ind (ex2 T (\lambda (t7: T).(pr0 (THead (Bind +Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 t2 t7))) H17))))) t6 (sym_eq T t6 t2 +H13))) t H11 H12 H9 H10))) | (pr0_tau t5 t6 H9 u0) \Rightarrow (\lambda (H10: +(eq T (THead (Flat Cast) u0 t5) t)).(\lambda (H11: (eq T t6 t2)).(eq_ind T +(THead (Flat Cast) u0 t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) t8)) (\lambda (t8: +T).(pr0 t2 t8)))))) (\lambda (H12: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: +T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) v2 t4) +t8)) (\lambda (t8: T).(pr0 t2 t8))))) (\lambda (_: (pr0 t5 t2)).(let H14 \def +(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) +u t3)) t7)) H4 (THead (Flat Cast) u0 t5) H10) in (let H15 \def (eq_ind T +(THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ +_) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) +\Rightarrow (match f with [Appl \Rightarrow True | Cast \Rightarrow +False])])])) I (THead (Flat Cast) u0 t5) H14) in (False_ind (ex2 T (\lambda +(t7: T).(pr0 (THead (Bind Abbr) v2 t4) t7)) (\lambda (t7: T).(pr0 t2 t7))) +H15)))) t6 (sym_eq T t6 t2 H12))) t H10 H11 H9)))]) in (H9 (refl_equal T t) +(refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_upsilon b H2 v1 v2 H3 +u1 u2 H4 t3 t4 H5) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) t)).(\lambda (H7: (eq T (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) t1)).(eq_ind T (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) t1) \to ((not (eq B b Abst)) \to ((pr0 v1 +v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t1 +t6)) (\lambda (t6: T).(pr0 t2 t6))))))))) (\lambda (H8: (eq T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t1)).(eq_ind T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (\lambda (t5: T).((not (eq B b +Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda +(t6: T).(pr0 t5 t6)) (\lambda (t6: T).(pr0 t2 t6)))))))) (\lambda (H9: (not +(eq B b Abst))).(\lambda (H10: (pr0 v1 v2)).(\lambda (H11: (pr0 u1 +u2)).(\lambda (H12: (pr0 t3 t4)).(let H13 \def (match H1 with [(pr0_refl t5) +\Rightarrow (\lambda (H13: (eq T t5 t)).(\lambda (H14: (eq T t5 t2)).(eq_ind +T t (\lambda (t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: +T).(pr0 t2 t7))))) (\lambda (H15: (eq T t t2)).(eq_ind T t2 (\lambda (_: +T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H16 \def (eq_ind_r +T t (\lambda (t6: T).(eq T t6 t2)) H15 (THead (Flat Appl) v1 (THead (Bind b) +u1 t3)) H6) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) +(\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 t6 t7)))) (let H17 +\def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H13 (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) H6) in (let H18 \def (eq_ind_r T t (\lambda (t6: +T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall +(t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: +T).(pr0 t8 t9)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H6) +in (ex2_sym T (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 t3))) (pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) +(pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t3 t4 H12 v1 v2 v2 H10 +(pr0_refl v2))))) t2 H16)) t (sym_eq T t t2 H15))) t5 (sym_eq T t5 t H13) +H14))) | (pr0_comp u0 u3 H13 t5 t6 H14 k) \Rightarrow (\lambda (H15: (eq T +(THead k u0 t5) t)).(\lambda (H16: (eq T (THead k u3 t6) t2)).(eq_ind T +(THead k u0 t5) (\lambda (_: T).((eq T (THead k u3 t6) t2) \to ((pr0 u0 u3) +\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) +(\lambda (H17: (eq T (THead k u3 t6) t2)).(eq_ind T (THead k u3 t6) (\lambda +(t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: +T).(pr0 t7 t8)))))) (\lambda (H18: (pr0 u0 u3)).(\lambda (H19: (pr0 t5 +t6)).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) t7)) H6 (THead k u0 t5) H15) in (let H21 \def +(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow (Flat Appl) +| (TLRef _) \Rightarrow (Flat Appl) | (THead k0 _ _) \Rightarrow k0])) (THead +(Flat Appl) v1 (THead (Bind b) u1 t3)) (THead k u0 t5) H20) in ((let H22 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef +_) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (THead k u0 t5) H20) in ((let H23 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead (Bind b) u1 t3) | +(TLRef _) \Rightarrow (THead (Bind b) u1 t3) | (THead _ _ t7) \Rightarrow +t7])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead k u0 t5) H20) in +(\lambda (H24: (eq T v1 u0)).(\lambda (H25: (eq K (Flat Appl) k)).(eq_ind K +(Flat Appl) (\lambda (k0: K).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead +k0 u3 t6) t7)))) (let H26 \def (eq_ind_r K k (\lambda (k0: K).(eq T (THead k0 +u0 t5) t)) H15 (Flat Appl) H25) in (let H27 \def (eq_ind_r T t5 (\lambda (t7: +T).(pr0 t7 t6)) H19 (THead (Bind b) u1 t3) H23) in (let H28 \def (match H27 +with [(pr0_refl t7) \Rightarrow (\lambda (H28: (eq T t7 (THead (Bind b) u1 +t3))).(\lambda (H29: (eq T t7 t6)).(eq_ind T (THead (Bind b) u1 t3) (\lambda +(t8: T).((eq T t8 t6) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead +(Flat Appl) u3 t6) t9))))) (\lambda (H30: (eq T (THead (Bind b) u1 t3) +t6)).(eq_ind T (THead (Bind b) u1 t3) (\lambda (t8: T).(ex2 T (\lambda (t9: +T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) +(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t8) t9)))) (let H31 \def +(eq_ind_r T t5 (\lambda (t8: T).(eq T (THead (Flat Appl) u0 t8) t)) H26 +(THead (Bind b) u1 t3) H23) in (let H32 \def (eq_ind_r T t (\lambda (t8: +T).(\forall (v: T).((tlt v t8) \to (\forall (t9: T).((pr0 v t9) \to (\forall +(t10: T).((pr0 v t10) \to (ex2 T (\lambda (t11: T).(pr0 t9 t11)) (\lambda +(t11: T).(pr0 t10 t11)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 +t3)) H31) in (let H33 \def (eq_ind T v1 (\lambda (t8: T).(pr0 t8 v2)) H10 u0 +H24) in (ex2_ind T (\lambda (t8: T).(pr0 v2 t8)) (\lambda (t8: T).(pr0 u3 +t8)) (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 (THead (Flat Appl) u3 (THead +(Bind b) u1 t3)) t8))) (\lambda (x: T).(\lambda (H34: (pr0 v2 x)).(\lambda +(H35: (pr0 u3 x)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u1 +t3))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) +(pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t3 t4 H12 u3 v2 x H35 +H34))))) (H32 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 t3)) v2 H33 +u3 H18))))) t6 H30)) t7 (sym_eq T t7 (THead (Bind b) u1 t3) H28) H29))) | +(pr0_comp u4 u5 H28 t7 t8 H29 k0) \Rightarrow (\lambda (H30: (eq T (THead k0 +u4 t7) (THead (Bind b) u1 t3))).(\lambda (H31: (eq T (THead k0 u5 t8) +t6)).((let H32 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) \Rightarrow t9])) +(THead k0 u4 t7) (THead (Bind b) u1 t3) H30) in ((let H33 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow u4 | (TLRef _) +\Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) (THead k0 u4 t7) (THead +(Bind b) u1 t3) H30) in ((let H34 \def (f_equal T K (\lambda (e: T).(match e +with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) +\Rightarrow k1])) (THead k0 u4 t7) (THead (Bind b) u1 t3) H30) in (eq_ind K +(Bind b) (\lambda (k1: K).((eq T u4 u1) \to ((eq T t7 t3) \to ((eq T (THead +k1 u5 t8) t6) \to ((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: +T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) +(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t6) t9))))))))) (\lambda (H35: +(eq T u4 u1)).(eq_ind T u1 (\lambda (t9: T).((eq T t7 t3) \to ((eq T (THead +(Bind b) u5 t8) t6) \to ((pr0 t9 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda +(t10: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) t10)))))))) (\lambda +(H36: (eq T t7 t3)).(eq_ind T t3 (\lambda (t9: T).((eq T (THead (Bind b) u5 +t8) t6) \to ((pr0 u1 u5) \to ((pr0 t9 t8) \to (ex2 T (\lambda (t10: T).(pr0 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda +(t10: T).(pr0 (THead (Flat Appl) u3 t6) t10))))))) (\lambda (H37: (eq T +(THead (Bind b) u5 t8) t6)).(eq_ind T (THead (Bind b) u5 t8) (\lambda (t9: +T).((pr0 u1 u5) \to ((pr0 t3 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: +T).(pr0 (THead (Flat Appl) u3 t9) t10)))))) (\lambda (H38: (pr0 u1 +u5)).(\lambda (H39: (pr0 t3 t8)).(let H40 \def (eq_ind_r T t5 (\lambda (t9: +T).(eq T (THead (Flat Appl) u0 t9) t)) H26 (THead (Bind b) u1 t3) H23) in +(let H41 \def (eq_ind_r T t (\lambda (t9: T).(\forall (v: T).((tlt v t9) \to +(\forall (t10: T).((pr0 v t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T +(\lambda (t12: T).(pr0 t10 t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H +(THead (Flat Appl) u0 (THead (Bind b) u1 t3)) H40) in (let H42 \def (eq_ind T +v1 (\lambda (t9: T).(pr0 t9 v2)) H10 u0 H24) in (ex2_ind T (\lambda (t9: +T).(pr0 v2 t9)) (\lambda (t9: T).(pr0 u3 t9)) (ex2 T (\lambda (t9: T).(pr0 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda +(t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t8)) t9))) (\lambda (x: +T).(\lambda (H43: (pr0 v2 x)).(\lambda (H44: (pr0 u3 x)).(ex2_ind T (\lambda +(t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t4 t9)) (ex2 T (\lambda (t9: +T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) +(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t8)) t9))) +(\lambda (x0: T).(\lambda (H45: (pr0 t8 x0)).(\lambda (H46: (pr0 t4 +x0)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: T).(pr0 u2 t9)) +(ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind +b) u5 t8)) t9))) (\lambda (x1: T).(\lambda (H47: (pr0 u5 x1)).(\lambda (H48: +(pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t8))) +(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) +(pr0_confluence__pr0_cong_upsilon_cong b H9 u3 v2 x H44 H43 t8 t4 x0 H45 H46 +u5 u2 x1 H47 H48))))) (H41 u1 (tlt_trans (THead (Bind b) u1 t3) u1 (THead +(Flat Appl) u0 (THead (Bind b) u1 t3)) (tlt_head_sx (Bind b) u1 t3) +(tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 t3))) u5 H38 u2 H11))))) (H41 +t3 (tlt_trans (THead (Bind b) u1 t3) t3 (THead (Flat Appl) u0 (THead (Bind b) +u1 t3)) (tlt_head_dx (Bind b) u1 t3) (tlt_head_dx (Flat Appl) u0 (THead (Bind +b) u1 t3))) t8 H39 t4 H12))))) (H41 u0 (tlt_head_sx (Flat Appl) u0 (THead +(Bind b) u1 t3)) v2 H42 u3 H18))))))) t6 H37)) t7 (sym_eq T t7 t3 H36))) u4 +(sym_eq T u4 u1 H35))) k0 (sym_eq K k0 (Bind b) H34))) H33)) H32)) H31 H28 +H29))) | (pr0_beta u v0 v3 H28 t7 t8 H29) \Rightarrow (\lambda (H30: (eq T +(THead (Flat Appl) v0 (THead (Bind Abst) u t7)) (THead (Bind b) u1 +t3))).(\lambda (H31: (eq T (THead (Bind Abbr) v3 t8) t6)).((let H32 \def +(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t7)) (\lambda (e: +T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | +(THead k0 _ _) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind b) u1 t3) H30) in (False_ind ((eq T +(THead (Bind Abbr) v3 t8) t6) \to ((pr0 v0 v3) \to ((pr0 t7 t8) \to (ex2 T +(\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t6) t9)))))) H32)) H31 +H28 H29))) | (pr0_upsilon b0 H28 v0 v3 H29 u4 u5 H30 t7 t8 H31) \Rightarrow +(\lambda (H32: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t7)) (THead +(Bind b) u1 t3))).(\lambda (H33: (eq T (THead (Bind b0) u5 (THead (Flat Appl) +(lift (S O) O v3) t8)) t6)).((let H34 \def (eq_ind T (THead (Flat Appl) v0 +(THead (Bind b0) u4 t7)) (\lambda (e: T).(match e with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 +with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead +(Bind b) u1 t3) H32) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat +Appl) (lift (S O) O v3) t8)) t6) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) +\to ((pr0 u4 u5) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: +T).(pr0 (THead (Flat Appl) u3 t6) t9)))))))) H34)) H33 H28 H29 H30 H31))) | +(pr0_delta u4 u5 H28 t7 t8 H29 w H30) \Rightarrow (\lambda (H31: (eq T (THead +(Bind Abbr) u4 t7) (THead (Bind b) u1 t3))).(\lambda (H32: (eq T (THead (Bind +Abbr) u5 w) t6)).((let H33 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow t7 | (TLRef _) \Rightarrow t7 | (THead _ _ t9) +\Rightarrow t9])) (THead (Bind Abbr) u4 t7) (THead (Bind b) u1 t3) H31) in +((let H34 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t9 _) \Rightarrow t9])) +(THead (Bind Abbr) u4 t7) (THead (Bind b) u1 t3) H31) in ((let H35 \def +(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow Abbr | +(TLRef _) \Rightarrow Abbr | (THead k0 _ _) \Rightarrow (match k0 with [(Bind +b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t7) +(THead (Bind b) u1 t3) H31) in (eq_ind B Abbr (\lambda (b0: B).((eq T u4 u1) +\to ((eq T t7 t3) \to ((eq T (THead (Bind Abbr) u5 w) t6) \to ((pr0 u4 u5) +\to ((pr0 t7 t8) \to ((subst0 O u5 t8 w) \to (ex2 T (\lambda (t9: T).(pr0 +(THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda +(t9: T).(pr0 (THead (Flat Appl) u3 t6) t9)))))))))) (\lambda (H36: (eq T u4 +u1)).(eq_ind T u1 (\lambda (t9: T).((eq T t7 t3) \to ((eq T (THead (Bind +Abbr) u5 w) t6) \to ((pr0 t9 u5) \to ((pr0 t7 t8) \to ((subst0 O u5 t8 w) \to +(ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift +(S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) +t10))))))))) (\lambda (H37: (eq T t7 t3)).(eq_ind T t3 (\lambda (t9: T).((eq +T (THead (Bind Abbr) u5 w) t6) \to ((pr0 u1 u5) \to ((pr0 t9 t8) \to ((subst0 +O u5 t8 w) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind Abbr) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 (THead (Flat +Appl) u3 t6) t10)))))))) (\lambda (H38: (eq T (THead (Bind Abbr) u5 w) +t6)).(eq_ind T (THead (Bind Abbr) u5 w) (\lambda (t9: T).((pr0 u1 u5) \to +((pr0 t3 t8) \to ((subst0 O u5 t8 w) \to (ex2 T (\lambda (t10: T).(pr0 (THead +(Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: +T).(pr0 (THead (Flat Appl) u3 t9) t10))))))) (\lambda (H39: (pr0 u1 +u5)).(\lambda (H40: (pr0 t3 t8)).(\lambda (H41: (subst0 O u5 t8 w)).(let H42 +\def (eq_ind_r B b (\lambda (b0: B).(eq T (THead (Bind b0) u1 t3) t5)) H23 +Abbr H35) in (let H43 \def (eq_ind_r B b (\lambda (b0: B).(not (eq B b0 +Abst))) H9 Abbr H35) in (let H44 \def (eq_ind_r B b (\lambda (b0: B).(eq T +(THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t1)) H8 Abbr +H35) in (let H45 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T (THead (Flat +Appl) u0 t9) t)) H26 (THead (Bind Abbr) u1 t3) H42) in (let H46 \def +(eq_ind_r T t (\lambda (t9: T).(\forall (v: T).((tlt v t9) \to (\forall (t10: +T).((pr0 v t10) \to (\forall (t11: T).((pr0 v t11) \to (ex2 T (\lambda (t12: +T).(pr0 t10 t12)) (\lambda (t12: T).(pr0 t11 t12)))))))))) H (THead (Flat +Appl) u0 (THead (Bind Abbr) u1 t3)) H45) in (let H47 \def (eq_ind T v1 +(\lambda (t9: T).(pr0 t9 v2)) H10 u0 H24) in (ex2_ind T (\lambda (t9: T).(pr0 +v2 t9)) (\lambda (t9: T).(pr0 u3 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead +(Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: +T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t9))) (\lambda (x: +T).(\lambda (H48: (pr0 v2 x)).(\lambda (H49: (pr0 u3 x)).(ex2_ind T (\lambda +(t9: T).(pr0 t8 t9)) (\lambda (t9: T).(pr0 t4 t9)) (ex2 T (\lambda (t9: +T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t9)) +(\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t9))) +(\lambda (x0: T).(\lambda (H50: (pr0 t8 x0)).(\lambda (H51: (pr0 t4 +x0)).(ex2_ind T (\lambda (t9: T).(pr0 u5 t9)) (\lambda (t9: T).(pr0 u2 t9)) +(ex2 T (\lambda (t9: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift +(S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 (THead +(Bind Abbr) u5 w)) t9))) (\lambda (x1: T).(\lambda (H52: (pr0 u5 +x1)).(\lambda (H53: (pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead +(Bind Abbr) u5 w))) (pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) +O v2) t4))) (pr0_confluence__pr0_cong_upsilon_delta H43 u5 t8 w H41 u3 v2 x +H49 H48 t4 x0 H50 H51 u2 x1 H52 H53))))) (H46 u1 (tlt_trans (THead (Bind +Abbr) u1 t3) u1 (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t3)) (tlt_head_sx +(Bind Abbr) u1 t3) (tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t3))) u5 +H39 u2 H11))))) (H46 t3 (tlt_trans (THead (Bind Abbr) u1 t3) t3 (THead (Flat +Appl) u0 (THead (Bind Abbr) u1 t3)) (tlt_head_dx (Bind Abbr) u1 t3) +(tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t3))) t8 H40 t4 H12))))) +(H46 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind Abbr) u1 t3)) v2 H47 u3 +H18))))))))))) t6 H38)) t7 (sym_eq T t7 t3 H37))) u4 (sym_eq T u4 u1 H36))) b +H35)) H34)) H33)) H32 H28 H29 H30))) | (pr0_zeta b0 H28 t7 t8 H29 u) +\Rightarrow (\lambda (H30: (eq T (THead (Bind b0) u (lift (S O) O t7)) (THead +(Bind b) u1 t3))).(\lambda (H31: (eq T t8 t6)).((let H32 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x: +nat).(plus x (S O))) O t7) | (TLRef _) \Rightarrow (lref_map (\lambda (x: +nat).(plus x (S O))) O t7) | (THead _ _ t9) \Rightarrow t9])) (THead (Bind +b0) u (lift (S O) O t7)) (THead (Bind b) u1 t3) H30) in ((let H33 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef +_) \Rightarrow u | (THead _ t9 _) \Rightarrow t9])) (THead (Bind b0) u (lift +(S O) O t7)) (THead (Bind b) u1 t3) H30) in ((let H34 \def (f_equal T B +(\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) +\Rightarrow b0 | (THead k0 _ _) \Rightarrow (match k0 with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S O) +O t7)) (THead (Bind b) u1 t3) H30) in (eq_ind B b (\lambda (b1: B).((eq T u +u1) \to ((eq T (lift (S O) O t7) t3) \to ((eq T t8 t6) \to ((not (eq B b1 +Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead +(Flat Appl) u3 t6) t9))))))))) (\lambda (H35: (eq T u u1)).(eq_ind T u1 +(\lambda (_: T).((eq T (lift (S O) O t7) t3) \to ((eq T t8 t6) \to ((not (eq +B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 +(THead (Flat Appl) u3 t6) t10)))))))) (\lambda (H36: (eq T (lift (S O) O t7) +t3)).(eq_ind T (lift (S O) O t7) (\lambda (_: T).((eq T t8 t6) \to ((not (eq +B b Abst)) \to ((pr0 t7 t8) \to (ex2 T (\lambda (t10: T).(pr0 (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t10)) (\lambda (t10: T).(pr0 +(THead (Flat Appl) u3 t6) t10))))))) (\lambda (H37: (eq T t8 t6)).(eq_ind T +t6 (\lambda (t9: T).((not (eq B b Abst)) \to ((pr0 t7 t9) \to (ex2 T (\lambda +(t10: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) t10)))))) (\lambda +(H38: (not (eq B b Abst))).(\lambda (H39: (pr0 t7 t6)).(let H40 \def +(eq_ind_r T t3 (\lambda (t9: T).(eq T (THead (Bind b) u1 t9) t5)) H23 (lift +(S O) O t7) H36) in (let H41 \def (eq_ind_r T t5 (\lambda (t9: T).(eq T +(THead (Flat Appl) u0 t9) t)) H26 (THead (Bind b) u1 (lift (S O) O t7)) H40) +in (let H42 \def (eq_ind_r T t (\lambda (t9: T).(\forall (v: T).((tlt v t9) +\to (\forall (t10: T).((pr0 v t10) \to (\forall (t11: T).((pr0 v t11) \to +(ex2 T (\lambda (t12: T).(pr0 t10 t12)) (\lambda (t12: T).(pr0 t11 +t12)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t7))) +H41) in (let H43 \def (eq_ind_r T t3 (\lambda (t9: T).(pr0 t9 t4)) H12 (lift +(S O) O t7) H36) in (ex2_ind T (\lambda (t9: T).(eq T t4 (lift (S O) O t9))) +(\lambda (t9: T).(pr0 t7 t9)) (ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) t9)) (\lambda (t9: T).(pr0 (THead +(Flat Appl) u3 t6) t9))) (\lambda (x: T).(\lambda (H44: (eq T t4 (lift (S O) +O x))).(\lambda (H45: (pr0 t7 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t9: +T).(ex2 T (\lambda (t10: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t9)) t10)) (\lambda (t10: T).(pr0 (THead (Flat Appl) u3 t6) +t10)))) (let H46 \def (eq_ind T v1 (\lambda (t9: T).(pr0 t9 v2)) H10 u0 H24) +in (ex2_ind T (\lambda (t9: T).(pr0 v2 t9)) (\lambda (t9: T).(pr0 u3 t9)) +(ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) (lift (S O) O x))) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 +t6) t9))) (\lambda (x0: T).(\lambda (H47: (pr0 v2 x0)).(\lambda (H48: (pr0 u3 +x0)).(ex2_ind T (\lambda (t9: T).(pr0 x t9)) (\lambda (t9: T).(pr0 t6 t9)) +(ex2 T (\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) (lift (S O) O x))) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 +t6) t9))) (\lambda (x1: T).(\lambda (H49: (pr0 x x1)).(\lambda (H50: (pr0 t6 +x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 t6)) (pr0 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x)))) +(pr0_confluence__pr0_cong_upsilon_zeta b H38 u1 u2 H11 u3 v2 x0 H48 H47 x t6 +x1 H49 H50))))) (H42 t7 (tlt_trans (THead (Bind b) u1 (lift (S O) O t7)) t7 +(THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t7))) (lift_tlt_dx +(Bind b) u1 t7 (S O) O) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 (lift +(S O) O t7)))) x H45 t6 H39))))) (H42 u0 (tlt_head_sx (Flat Appl) u0 (THead +(Bind b) u1 (lift (S O) O t7))) v2 H46 u3 H18))) t4 H44)))) (pr0_gen_lift t7 +t4 (S O) O H43)))))))) t8 (sym_eq T t8 t6 H37))) t3 H36)) u (sym_eq T u u1 +H35))) b0 (sym_eq B b0 b H34))) H33)) H32)) H31 H28 H29))) | (pr0_tau t7 t8 +H28 u) \Rightarrow (\lambda (H29: (eq T (THead (Flat Cast) u t7) (THead (Bind +b) u1 t3))).(\lambda (H30: (eq T t8 t6)).((let H31 \def (eq_ind T (THead +(Flat Cast) u t7) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False +| (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind +b) u1 t3) H29) in (False_ind ((eq T t8 t6) \to ((pr0 t7 t8) \to (ex2 T +(\lambda (t9: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4)) t9)) (\lambda (t9: T).(pr0 (THead (Flat Appl) u3 t6) t9))))) H31)) H30 +H28)))]) in (H28 (refl_equal T (THead (Bind b) u1 t3)) (refl_equal T t6))))) +k H25)))) H22)) H21))))) t2 H17)) t H15 H16 H13 H14))) | (pr0_beta u v0 v3 +H13 t5 t6 H14) \Rightarrow (\lambda (H15: (eq T (THead (Flat Appl) v0 (THead +(Bind Abst) u t5)) t)).(\lambda (H16: (eq T (THead (Bind Abbr) v3 t6) +t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) (\lambda (_: +T).((eq T (THead (Bind Abbr) v3 t6) t2) \to ((pr0 v0 v3) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H17: (eq T +(THead (Bind Abbr) v3 t6) t2)).(eq_ind T (THead (Bind Abbr) v3 t6) (\lambda +(t7: T).((pr0 v0 v3) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: +T).(pr0 t7 t8)))))) (\lambda (_: (pr0 v0 v3)).(\lambda (_: (pr0 t5 t6)).(let +H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead +(Bind b) u1 t3)) t7)) H6 (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) H15) +in (let H21 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) +(THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead +(Bind Abst) u t5)) H20) in ((let H22 \def (f_equal T B (\lambda (e: T).(match +e with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t7) +\Rightarrow (match t7 with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b +| (THead k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat +_) \Rightarrow b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead +(Flat Appl) v0 (THead (Bind Abst) u t5)) H20) in ((let H23 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) +\Rightarrow u1 | (THead _ _ t7) \Rightarrow (match t7 with [(TSort _) +\Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t8 _) \Rightarrow +t8])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) v0 +(THead (Bind Abst) u t5)) H20) in ((let H24 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | +(THead _ _ t7) \Rightarrow (match t7 with [(TSort _) \Rightarrow t3 | (TLRef +_) \Rightarrow t3 | (THead _ _ t8) \Rightarrow t8])])) (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) H20) +in (\lambda (_: (eq T u1 u)).(\lambda (H26: (eq B b Abst)).(\lambda (H27: (eq +T v1 v0)).(let H28 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt +v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to +(ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 +t10)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u t5)) H15) in (let +H29 \def (eq_ind T v1 (\lambda (t7: T).(pr0 t7 v2)) H10 v0 H27) in (eq_ind_r +B Abst (\lambda (b0: B).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind b0) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead +(Bind Abbr) v3 t6) t7)))) (let H30 \def (eq_ind B b (\lambda (b0: B).(not (eq +B b0 Abst))) H9 Abst H26) in (let H31 \def (match (H30 (refl_equal B Abst)) +in False with []) in H31)) b H26))))))) H23)) H22)) H21))))) t2 H17)) t H15 +H16 H13 H14))) | (pr0_upsilon b0 H13 v0 v3 H14 u0 u3 H15 t5 t6 H16) +\Rightarrow (\lambda (H17: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u0 +t5)) t)).(\lambda (H18: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S +O) O v3) t6)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) +(\lambda (_: T).((eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O +v3) t6)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to +((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8))))))))) +(\lambda (H19: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) +t6)) t2)).(eq_ind T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) +t6)) (\lambda (t7: T).((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) +\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t7 t8)))))))) +(\lambda (_: (not (eq B b0 Abst))).(\lambda (H21: (pr0 v0 v3)).(\lambda (H22: +(pr0 u0 u3)).(\lambda (H23: (pr0 t5 t6)).(let H24 \def (eq_ind_r T t (\lambda +(t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) t7)) H6 (THead +(Flat Appl) v0 (THead (Bind b0) u0 t5)) H17) in (let H25 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef _) +\Rightarrow v1 | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) H24) +in ((let H26 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) +\Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t7) \Rightarrow (match +t7 with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) +\Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow +b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) v0 +(THead (Bind b0) u0 t5)) H24) in ((let H27 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | +(THead _ _ t7) \Rightarrow (match t7 with [(TSort _) \Rightarrow u1 | (TLRef +_) \Rightarrow u1 | (THead _ t8 _) \Rightarrow t8])])) (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) H24) +in ((let H28 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow (match +t7 with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t8) +\Rightarrow t8])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead +(Flat Appl) v0 (THead (Bind b0) u0 t5)) H24) in (\lambda (H29: (eq T u1 +u0)).(\lambda (H30: (eq B b b0)).(\lambda (H31: (eq T v1 v0)).(let H32 \def +(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: +T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: +T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Appl) +v0 (THead (Bind b0) u0 t5)) H17) in (let H33 \def (eq_ind T v1 (\lambda (t7: +T).(pr0 t7 v2)) H10 v0 H31) in (eq_ind_r B b0 (\lambda (b1: B).(ex2 T +(\lambda (t7: T).(pr0 (THead (Bind b1) u2 (THead (Flat Appl) (lift (S O) O +v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) +(lift (S O) O v3) t6)) t7)))) (let H34 \def (eq_ind B b (\lambda (b1: B).(not +(eq B b1 Abst))) H9 b0 H30) in (let H35 \def (eq_ind T u1 (\lambda (t7: +T).(pr0 t7 u2)) H11 u0 H29) in (let H36 \def (eq_ind T t3 (\lambda (t7: +T).(pr0 t7 t4)) H12 t5 H28) in (ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) +(\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b0) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 +(THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t6)) t7))) (\lambda +(x: T).(\lambda (H37: (pr0 t4 x)).(\lambda (H38: (pr0 t6 x)).(ex2_ind T +(\lambda (t7: T).(pr0 u2 t7)) (\lambda (t7: T).(pr0 u3 t7)) (ex2 T (\lambda +(t7: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) +O v3) t6)) t7))) (\lambda (x0: T).(\lambda (H39: (pr0 u2 x0)).(\lambda (H40: +(pr0 u3 x0)).(ex2_ind T (\lambda (t7: T).(pr0 v2 t7)) (\lambda (t7: T).(pr0 +v3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u3 (THead +(Flat Appl) (lift (S O) O v3) t6)) t7))) (\lambda (x1: T).(\lambda (H41: (pr0 +v2 x1)).(\lambda (H42: (pr0 v3 x1)).(pr0_confluence__pr0_upsilon_upsilon b0 +H34 v2 v3 x1 H41 H42 u2 u3 x0 H39 H40 t4 t6 x H37 H38)))) (H32 v0 +(tlt_head_sx (Flat Appl) v0 (THead (Bind b0) u0 t5)) v2 H33 v3 H21))))) (H32 +u0 (tlt_trans (THead (Bind b0) u0 t5) u0 (THead (Flat Appl) v0 (THead (Bind +b0) u0 t5)) (tlt_head_sx (Bind b0) u0 t5) (tlt_head_dx (Flat Appl) v0 (THead +(Bind b0) u0 t5))) u2 H35 u3 H22))))) (H32 t5 (tlt_trans (THead (Bind b0) u0 +t5) t5 (THead (Flat Appl) v0 (THead (Bind b0) u0 t5)) (tlt_head_dx (Bind b0) +u0 t5) (tlt_head_dx (Flat Appl) v0 (THead (Bind b0) u0 t5))) t4 H36 t6 +H23))))) b H30))))))) H27)) H26)) H25))))))) t2 H19)) t H17 H18 H13 H14 H15 +H16))) | (pr0_delta u0 u3 H13 t5 t6 H14 w H15) \Rightarrow (\lambda (H16: (eq +T (THead (Bind Abbr) u0 t5) t)).(\lambda (H17: (eq T (THead (Bind Abbr) u3 w) +t2)).(eq_ind T (THead (Bind Abbr) u0 t5) (\lambda (_: T).((eq T (THead (Bind +Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w) \to +(ex2 T (\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) (\lambda (H18: (eq T +(THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u3 w) (\lambda +(t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w) \to (ex2 T +(\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4)) t8)) (\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (_: (pr0 u0 +u3)).(\lambda (_: (pr0 t5 t6)).(\lambda (_: (subst0 O u3 t6 w)).(let H22 \def +(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 +t3)) t7)) H6 (THead (Bind Abbr) u0 t5) H16) in (let H23 \def (eq_ind T (THead +(Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind Abbr) u0 t5) H22) in (False_ind (ex2 T (\lambda (t7: +T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) +(\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w) t7))) H23)))))) t2 H18)) t H16 +H17 H13 H14 H15))) | (pr0_zeta b0 H13 t5 t6 H14 u) \Rightarrow (\lambda (H15: +(eq T (THead (Bind b0) u (lift (S O) O t5)) t)).(\lambda (H16: (eq T t6 +t2)).(eq_ind T (THead (Bind b0) u (lift (S O) O t5)) (\lambda (_: T).((eq T +t6 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) +(\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H17: (eq T t6 t2)).(eq_ind T t2 +(\lambda (t7: T).((not (eq B b0 Abst)) \to ((pr0 t5 t7) \to (ex2 T (\lambda +(t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (_: (not (eq B b0 +Abst))).(\lambda (_: (pr0 t5 t2)).(let H20 \def (eq_ind_r T t (\lambda (t7: +T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) t7)) H6 (THead (Bind +b0) u (lift (S O) O t5)) H15) in (let H21 \def (eq_ind T (THead (Flat Appl) +v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind b0) u (lift (S O) O t5)) H20) in (False_ind (ex2 T (\lambda (t7: +T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) +(\lambda (t7: T).(pr0 t2 t7))) H21))))) t6 (sym_eq T t6 t2 H17))) t H15 H16 +H13 H14))) | (pr0_tau t5 t6 H13 u) \Rightarrow (\lambda (H14: (eq T (THead +(Flat Cast) u t5) t)).(\lambda (H15: (eq T t6 t2)).(eq_ind T (THead (Flat +Cast) u t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T +(\lambda (t8: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4)) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H16: (eq T t6 +t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: +T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t8)) +(\lambda (t8: T).(pr0 t2 t8))))) (\lambda (_: (pr0 t5 t2)).(let H18 \def +(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 +t3)) t7)) H6 (THead (Flat Cast) u t5) H14) in (let H19 \def (eq_ind T (THead +(Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow +(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead +(Flat Cast) u t5) H18) in (False_ind (ex2 T (\lambda (t7: T).(pr0 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t7)) (\lambda (t7: +T).(pr0 t2 t7))) H19)))) t6 (sym_eq T t6 t2 H16))) t H14 H15 H13)))]) in (H13 +(refl_equal T t) (refl_equal T t2))))))) t1 H8)) t H6 H7 H2 H3 H4 H5))) | +(pr0_delta u1 u2 H2 t3 t4 H3 w H4) \Rightarrow (\lambda (H5: (eq T (THead +(Bind Abbr) u1 t3) t)).(\lambda (H6: (eq T (THead (Bind Abbr) u2 w) +t1)).(eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (_: T).((eq T (THead (Bind +Abbr) u2 w) t1) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 t4 w) \to +(ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6)))))))) +(\lambda (H7: (eq T (THead (Bind Abbr) u2 w) t1)).(eq_ind T (THead (Bind +Abbr) u2 w) (\lambda (t5: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 +t4 w) \to (ex2 T (\lambda (t6: T).(pr0 t5 t6)) (\lambda (t6: T).(pr0 t2 +t6))))))) (\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (pr0 t3 t4)).(\lambda +(H10: (subst0 O u2 t4 w)).(let H11 \def (match H1 with [(pr0_refl t5) +\Rightarrow (\lambda (H11: (eq T t5 t)).(\lambda (H12: (eq T t5 t2)).(eq_ind +T t (\lambda (t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 (THead +(Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H13: (eq T +t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 (THead (Bind +Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let H14 \def (eq_ind_r T t +(\lambda (t6: T).(eq T t6 t2)) H13 (THead (Bind Abbr) u1 t3) H5) in (eq_ind T +(THead (Bind Abbr) u1 t3) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 +(THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t6 t7)))) (let H15 \def +(eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H11 (THead (Bind Abbr) u1 t3) +H5) in (let H16 \def (eq_ind_r T t (\lambda (t6: T).(\forall (v: T).((tlt v +t6) \to (\forall (t7: T).((pr0 v t7) \to (\forall (t8: T).((pr0 v t8) \to +(ex2 T (\lambda (t9: T).(pr0 t7 t9)) (\lambda (t9: T).(pr0 t8 t9)))))))))) H +(THead (Bind Abbr) u1 t3) H5) in (ex_intro2 T (\lambda (t6: T).(pr0 (THead +(Bind Abbr) u2 w) t6)) (\lambda (t6: T).(pr0 (THead (Bind Abbr) u1 t3) t6)) +(THead (Bind Abbr) u2 w) (pr0_refl (THead (Bind Abbr) u2 w)) (pr0_delta u1 u2 +H8 t3 t4 H9 w H10)))) t2 H14)) t (sym_eq T t t2 H13))) t5 (sym_eq T t5 t H11) +H12))) | (pr0_comp u0 u3 H11 t5 t6 H12 k) \Rightarrow (\lambda (H13: (eq T +(THead k u0 t5) t)).(\lambda (H14: (eq T (THead k u3 t6) t2)).(eq_ind T +(THead k u0 t5) (\lambda (_: T).((eq T (THead k u3 t6) t2) \to ((pr0 u0 u3) +\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) +t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H15: (eq T (THead k u3 t6) +t2)).(eq_ind T (THead k u3 t6) (\lambda (t7: T).((pr0 u0 u3) \to ((pr0 t5 t6) +\to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: +T).(pr0 t7 t8)))))) (\lambda (H16: (pr0 u0 u3)).(\lambda (H17: (pr0 t5 +t6)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind Abbr) u1 +t3) t7)) H5 (THead k u0 t5) H13) in (let H19 \def (f_equal T K (\lambda (e: +T).(match e with [(TSort _) \Rightarrow (Bind Abbr) | (TLRef _) \Rightarrow +(Bind Abbr) | (THead k0 _ _) \Rightarrow k0])) (THead (Bind Abbr) u1 t3) +(THead k u0 t5) H18) in ((let H20 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) +\Rightarrow t7])) (THead (Bind Abbr) u1 t3) (THead k u0 t5) H18) in ((let H21 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | +(TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind +Abbr) u1 t3) (THead k u0 t5) H18) in (\lambda (H22: (eq T u1 u0)).(\lambda +(H23: (eq K (Bind Abbr) k)).(eq_ind K (Bind Abbr) (\lambda (k0: K).(ex2 T +(\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 +(THead k0 u3 t6) t7)))) (let H24 \def (eq_ind_r K k (\lambda (k0: K).(eq T +(THead k0 u0 t5) t)) H13 (Bind Abbr) H23) in (let H25 \def (eq_ind_r T t +(\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) +\to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) +(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind Abbr) u0 t5) H24) in +(let H26 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H8 u0 H22) in (let +H27 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H9 t5 H21) in (ex2_ind T +(\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda +(t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 (THead (Bind +Abbr) u3 t6) t7))) (\lambda (x: T).(\lambda (H28: (pr0 t4 x)).(\lambda (H29: +(pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) (\lambda (t7: T).(pr0 u3 +t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: +T).(pr0 (THead (Bind Abbr) u3 t6) t7))) (\lambda (x0: T).(\lambda (H30: (pr0 +u2 x0)).(\lambda (H31: (pr0 u3 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u3 +t6)) (pr0 (THead (Bind Abbr) u2 w)) (pr0_confluence__pr0_cong_delta u2 t4 w +H10 u3 x0 H31 H30 t6 x H29 H28))))) (H25 u0 (tlt_head_sx (Bind Abbr) u0 t5) +u2 H26 u3 H16))))) (H25 t5 (tlt_head_dx (Bind Abbr) u0 t5) t4 H27 t6 +H17)))))) k H23)))) H20)) H19))))) t2 H15)) t H13 H14 H11 H12))) | (pr0_beta +u v1 v2 H11 t5 t6 H12) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v1 +(THead (Bind Abst) u t5)) t)).(\lambda (H14: (eq T (THead (Bind Abbr) v2 t6) +t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) (\lambda (_: +T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: +T).(pr0 t2 t8))))))) (\lambda (H15: (eq T (THead (Bind Abbr) v2 t6) +t2)).(eq_ind T (THead (Bind Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to +((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) +(\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 +t5 t6)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind Abbr) +u1 t3) t7)) H5 (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) H13) in (let +H19 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u t5)) H18) in +(False_ind (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) +(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t6) t7))) H19))))) t2 H15)) t H13 +H14 H11 H12))) | (pr0_upsilon b H11 v1 v2 H12 u0 u3 H13 t5 t6 H14) +\Rightarrow (\lambda (H15: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 +t5)) t)).(\lambda (H16: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S +O) O v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t5)) +(\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O +v2) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to +((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) +(\lambda (t8: T).(pr0 t2 t8))))))))) (\lambda (H17: (eq T (THead (Bind b) u3 +(THead (Flat Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b) u3 +(THead (Flat Appl) (lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b +Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) \to (ex2 T (\lambda +(t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t7 +t8)))))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 v1 +v2)).(\lambda (_: (pr0 u0 u3)).(\lambda (_: (pr0 t5 t6)).(let H22 \def +(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind Abbr) u1 t3) t7)) H5 (THead +(Flat Appl) v1 (THead (Bind b) u0 t5)) H15) in (let H23 \def (eq_ind T (THead +(Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with +[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat +Appl) v1 (THead (Bind b) u0 t5)) H22) in (False_ind (ex2 T (\lambda (t7: +T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 (THead (Bind b) +u3 (THead (Flat Appl) (lift (S O) O v2) t6)) t7))) H23))))))) t2 H17)) t H15 +H16 H11 H12 H13 H14))) | (pr0_delta u0 u3 H11 t5 t6 H12 w0 H13) \Rightarrow +(\lambda (H14: (eq T (THead (Bind Abbr) u0 t5) t)).(\lambda (H15: (eq T +(THead (Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u0 t5) (\lambda +(_: T).((eq T (THead (Bind Abbr) u3 w0) t2) \to ((pr0 u0 u3) \to ((pr0 t5 t6) +\to ((subst0 O u3 t6 w0) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) +u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) (\lambda (H16: (eq T (THead +(Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u3 w0) (\lambda (t7: +T).((pr0 u0 u3) \to ((pr0 t5 t6) \to ((subst0 O u3 t6 w0) \to (ex2 T (\lambda +(t8: T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t7 t8))))))) +(\lambda (H17: (pr0 u0 u3)).(\lambda (H18: (pr0 t5 t6)).(\lambda (H19: +(subst0 O u3 t6 w0)).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T +(THead (Bind Abbr) u1 t3) t7)) H5 (THead (Bind Abbr) u0 t5) H14) in (let H21 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | +(TLRef _) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead (Bind +Abbr) u1 t3) (THead (Bind Abbr) u0 t5) H20) in ((let H22 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) +\Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind Abbr) u1 t3) +(THead (Bind Abbr) u0 t5) H20) in (\lambda (H23: (eq T u1 u0)).(let H24 \def +(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: +T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: +T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind Abbr) +u0 t5) H14) in (let H25 \def (eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H8 u0 +H23) in (let H26 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t4)) H9 t5 H22) +in (ex2_ind T (\lambda (t7: T).(pr0 t4 t7)) (\lambda (t7: T).(pr0 t6 t7)) +(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: +T).(pr0 (THead (Bind Abbr) u3 w0) t7))) (\lambda (x: T).(\lambda (H27: (pr0 +t4 x)).(\lambda (H28: (pr0 t6 x)).(ex2_ind T (\lambda (t7: T).(pr0 u2 t7)) +(\lambda (t7: T).(pr0 u3 t7)) (ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) +u2 w) t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u3 w0) t7))) (\lambda +(x0: T).(\lambda (H29: (pr0 u2 x0)).(\lambda (H30: (pr0 u3 +x0)).(pr0_confluence__pr0_delta_delta u2 t4 w H10 u3 t6 w0 H19 x0 H29 H30 x +H27 H28)))) (H24 u0 (tlt_head_sx (Bind Abbr) u0 t5) u2 H25 u3 H17))))) (H24 +t5 (tlt_head_dx (Bind Abbr) u0 t5) t4 H26 t6 H18))))))) H21)))))) t2 H16)) t +H14 H15 H11 H12 H13))) | (pr0_zeta b H11 t5 t6 H12 u) \Rightarrow (\lambda +(H13: (eq T (THead (Bind b) u (lift (S O) O t5)) t)).(\lambda (H14: (eq T t6 +t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t5)) (\lambda (_: T).((eq T t6 +t2) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8))))))) +(\lambda (H15: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b +Abst)) \to ((pr0 t5 t7) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) +u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H16: (not (eq B b +Abst))).(\lambda (H17: (pr0 t5 t2)).(let H18 \def (eq_ind_r T t (\lambda (t7: +T).(eq T (THead (Bind Abbr) u1 t3) t7)) H5 (THead (Bind b) u (lift (S O) O +t5)) H13) in (let H19 \def (f_equal T B (\lambda (e: T).(match e with [(TSort +_) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow +(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) +(THead (Bind Abbr) u1 t3) (THead (Bind b) u (lift (S O) O t5)) H18) in ((let +H20 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 +| (TLRef _) \Rightarrow u1 | (THead _ t7 _) \Rightarrow t7])) (THead (Bind +Abbr) u1 t3) (THead (Bind b) u (lift (S O) O t5)) H18) in ((let H21 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | (TLRef +_) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind Abbr) u1 +t3) (THead (Bind b) u (lift (S O) O t5)) H18) in (\lambda (H22: (eq T u1 +u)).(\lambda (H23: (eq B Abbr b)).(let H24 \def (eq_ind_r B b (\lambda (b0: +B).(not (eq B b0 Abst))) H16 Abbr H23) in (let H25 \def (eq_ind_r B b +(\lambda (b0: B).(eq T (THead (Bind b0) u (lift (S O) O t5)) t)) H13 Abbr +H23) in (let H26 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v +t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to +(ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 +t10)))))))))) H (THead (Bind Abbr) u (lift (S O) O t5)) H25) in (let H27 \def +(eq_ind T u1 (\lambda (t7: T).(pr0 t7 u2)) H8 u H22) in (let H28 \def (eq_ind +T t3 (\lambda (t7: T).(pr0 t7 t4)) H9 (lift (S O) O t5) H21) in (ex2_ind T +(\lambda (t7: T).(eq T t4 (lift (S O) O t7))) (\lambda (t7: T).(pr0 t5 t7)) +(ex2 T (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: +T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H29: (eq T t4 (lift (S O) O +x))).(\lambda (H30: (pr0 t5 x)).(let H31 \def (eq_ind T t4 (\lambda (t7: +T).(subst0 O u2 t7 w)) H10 (lift (S O) O x) H29) in (ex2_ind T (\lambda (t7: +T).(pr0 x t7)) (\lambda (t7: T).(pr0 t2 t7)) (ex2 T (\lambda (t7: T).(pr0 +(THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x0: +T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 t2 +x0)).(pr0_confluence__pr0_delta_tau u2 (lift (S O) O x) w H31 x (pr0_refl +(lift (S O) O x)) t2)))) (H26 t5 (lift_tlt_dx (Bind Abbr) u t5 (S O) O) x H30 +t2 H17)))))) (pr0_gen_lift t5 t4 (S O) O H28)))))))))) H20)) H19))))) t6 +(sym_eq T t6 t2 H15))) t H13 H14 H11 H12))) | (pr0_tau t5 t6 H11 u) +\Rightarrow (\lambda (H12: (eq T (THead (Flat Cast) u t5) t)).(\lambda (H13: +(eq T t6 t2)).(eq_ind T (THead (Flat Cast) u t5) (\lambda (_: T).((eq T t6 +t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 (THead (Bind Abbr) u2 +w) t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H14: (eq T t6 +t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: +T).(pr0 (THead (Bind Abbr) u2 w) t8)) (\lambda (t8: T).(pr0 t2 t8))))) +(\lambda (_: (pr0 t5 t2)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T +(THead (Bind Abbr) u1 t3) t7)) H5 (THead (Flat Cast) u t5) H12) in (let H17 +\def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat Cast) u t5) H16) in (False_ind (ex2 T (\lambda (t7: +T).(pr0 (THead (Bind Abbr) u2 w) t7)) (\lambda (t7: T).(pr0 t2 t7))) H17)))) +t6 (sym_eq T t6 t2 H14))) t H12 H13 H11)))]) in (H11 (refl_equal T t) +(refl_equal T t2)))))) t1 H7)) t H5 H6 H2 H3 H4))) | (pr0_zeta b H2 t3 t4 H3 +u) \Rightarrow (\lambda (H4: (eq T (THead (Bind b) u (lift (S O) O t3)) +t)).(\lambda (H5: (eq T t4 t1)).(eq_ind T (THead (Bind b) u (lift (S O) O +t3)) (\lambda (_: T).((eq T t4 t1) \to ((not (eq B b Abst)) \to ((pr0 t3 t4) +\to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 t2 t6))))))) +(\lambda (H6: (eq T t4 t1)).(eq_ind T t1 (\lambda (t5: T).((not (eq B b +Abst)) \to ((pr0 t3 t5) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda +(t6: T).(pr0 t2 t6)))))) (\lambda (H7: (not (eq B b Abst))).(\lambda (H8: +(pr0 t3 t1)).(let H9 \def (match H1 with [(pr0_refl t5) \Rightarrow (\lambda +(H9: (eq T t5 t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T t (\lambda (t6: +T).((eq T t6 t2) \to (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: +T).(pr0 t2 t7))))) (\lambda (H11: (eq T t t2)).(eq_ind T t2 (\lambda (_: +T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)))) (let +H12 \def (eq_ind_r T t (\lambda (t6: T).(eq T t6 t2)) H11 (THead (Bind b) u +(lift (S O) O t3)) H4) in (eq_ind T (THead (Bind b) u (lift (S O) O t3)) +(\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 +t6 t7)))) (let H13 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 t6)) H9 +(THead (Bind b) u (lift (S O) O t3)) H4) in (let H14 \def (eq_ind_r T t +(\lambda (t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) +\to (\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) +(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Bind b) u (lift (S O) O t3)) +H4) in (ex_intro2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 +(THead (Bind b) u (lift (S O) O t3)) t6)) t1 (pr0_refl t1) (pr0_zeta b H7 t3 +t1 H8 u)))) t2 H12)) t (sym_eq T t t2 H11))) t5 (sym_eq T t5 t H9) H10))) | +(pr0_comp u1 u2 H9 t5 t6 H10 k) \Rightarrow (\lambda (H11: (eq T (THead k u1 +t5) t)).(\lambda (H12: (eq T (THead k u2 t6) t2)).(eq_ind T (THead k u1 t5) +(\lambda (_: T).((eq T (THead k u2 t6) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) +\to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) +(\lambda (H13: (eq T (THead k u2 t6) t2)).(eq_ind T (THead k u2 t6) (\lambda +(t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 +t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (_: (pr0 u1 u2)).(\lambda +(H15: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead +(Bind b) u (lift (S O) O t3)) t7)) H4 (THead k u1 t5) H11) in (let H17 \def +(f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow (Bind b) | +(TLRef _) \Rightarrow (Bind b) | (THead k0 _ _) \Rightarrow k0])) (THead +(Bind b) u (lift (S O) O t3)) (THead k u1 t5) H16) in ((let H18 \def (f_equal +T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) +\Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Bind b) u (lift (S +O) O t3)) (THead k u1 t5) H16) in ((let H19 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x: nat).(plus x +(S O))) O t3) | (TLRef _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S +O))) O t3) | (THead _ _ t7) \Rightarrow t7])) (THead (Bind b) u (lift (S O) O +t3)) (THead k u1 t5) H16) in (\lambda (_: (eq T u u1)).(\lambda (H21: (eq K +(Bind b) k)).(eq_ind K (Bind b) (\lambda (k0: K).(ex2 T (\lambda (t7: T).(pr0 +t1 t7)) (\lambda (t7: T).(pr0 (THead k0 u2 t6) t7)))) (let H22 \def (eq_ind_r +K k (\lambda (k0: K).(eq T (THead k0 u1 t5) t)) H11 (Bind b) H21) in (let H23 +\def (eq_ind_r T t5 (\lambda (t7: T).(pr0 t7 t6)) H15 (lift (S O) O t3) H19) +in (ex2_ind T (\lambda (t7: T).(eq T t6 (lift (S O) O t7))) (\lambda (t7: +T).(pr0 t3 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 +(THead (Bind b) u2 t6) t7))) (\lambda (x: T).(\lambda (H24: (eq T t6 (lift (S +O) O x))).(\lambda (H25: (pr0 t3 x)).(let H26 \def (eq_ind_r T t5 (\lambda +(t7: T).(eq T (THead (Bind b) u1 t7) t)) H22 (lift (S O) O t3) H19) in (let +H27 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to +(\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T +(\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H +(THead (Bind b) u1 (lift (S O) O t3)) H26) in (eq_ind_r T (lift (S O) O x) +(\lambda (t7: T).(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 +(THead (Bind b) u2 t7) t8)))) (ex2_ind T (\lambda (t7: T).(pr0 x t7)) +(\lambda (t7: T).(pr0 t1 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda +(t7: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t7))) (\lambda (x0: +T).(\lambda (H28: (pr0 x x0)).(\lambda (H29: (pr0 t1 x0)).(ex_intro2 T +(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind b) u2 (lift +(S O) O x)) t7)) x0 H29 (pr0_zeta b H7 x x0 H28 u2))))) (H27 t3 (lift_tlt_dx +(Bind b) u1 t3 (S O) O) x H25 t1 H8)) t6 H24)))))) (pr0_gen_lift t3 t6 (S O) +O H23)))) k H21)))) H18)) H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_beta +u0 v1 v2 H9 t5 t6 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 +(THead (Bind Abst) u0 t5)) t)).(\lambda (H12: (eq T (THead (Bind Abbr) v2 t6) +t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t5)) (\lambda (_: +T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) +(\lambda (H13: (eq T (THead (Bind Abbr) v2 t6) t2)).(eq_ind T (THead (Bind +Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to ((pr0 t5 t6) \to (ex2 T +(\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8)))))) (\lambda (_: +(pr0 v1 v2)).(\lambda (_: (pr0 t5 t6)).(let H16 \def (eq_ind_r T t (\lambda +(t7: T).(eq T (THead (Bind b) u (lift (S O) O t3)) t7)) H4 (THead (Flat Appl) +v1 (THead (Bind Abst) u0 t5)) H11) in (let H17 \def (eq_ind T (THead (Bind b) +u (lift (S O) O t3)) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with +[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat +Appl) v1 (THead (Bind Abst) u0 t5)) H16) in (False_ind (ex2 T (\lambda (t7: +T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t6) t7))) +H17))))) t2 H13)) t H11 H12 H9 H10))) | (pr0_upsilon b0 H9 v1 v2 H10 u1 u2 +H11 t5 t6 H12) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v1 (THead +(Bind b0) u1 t5)) t)).(\lambda (H14: (eq T (THead (Bind b0) u2 (THead (Flat +Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead +(Bind b0) u1 t5)) (\lambda (_: T).((eq T (THead (Bind b0) u2 (THead (Flat +Appl) (lift (S O) O v2) t6)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v1 v2) +\to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) +(\lambda (t8: T).(pr0 t2 t8))))))))) (\lambda (H15: (eq T (THead (Bind b0) u2 +(THead (Flat Appl) (lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b0) u2 +(THead (Flat Appl) (lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b0 +Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda +(t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8)))))))) (\lambda (_: (not +(eq B b0 Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda +(_: (pr0 t5 t6)).(let H20 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead +(Bind b) u (lift (S O) O t3)) t7)) H4 (THead (Flat Appl) v1 (THead (Bind b0) +u1 t5)) H13) in (let H21 \def (eq_ind T (THead (Bind b) u (lift (S O) O t3)) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 +(THead (Bind b0) u1 t5)) H20) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 +t7)) (\lambda (t7: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) +O v2) t6)) t7))) H21))))))) t2 H15)) t H13 H14 H9 H10 H11 H12))) | (pr0_delta +u1 u2 H9 t5 t6 H10 w H11) \Rightarrow (\lambda (H12: (eq T (THead (Bind Abbr) +u1 t5) t)).(\lambda (H13: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T +(THead (Bind Abbr) u1 t5) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) +\to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ex2 T (\lambda +(t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) (\lambda (H14: (eq T +(THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda +(t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ex2 T +(\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8))))))) (\lambda (_: +(pr0 u1 u2)).(\lambda (H16: (pr0 t5 t6)).(\lambda (H17: (subst0 O u2 t6 +w)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind b) u +(lift (S O) O t3)) t7)) H4 (THead (Bind Abbr) u1 t5) H12) in (let H19 \def +(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef +_) \Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O +t3)) (THead (Bind Abbr) u1 t5) H18) in ((let H20 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | +(THead _ t7 _) \Rightarrow t7])) (THead (Bind b) u (lift (S O) O t3)) (THead +(Bind Abbr) u1 t5) H18) in ((let H21 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O +t3) | (TLRef _) \Rightarrow (lref_map (\lambda (x: nat).(plus x (S O))) O t3) +| (THead _ _ t7) \Rightarrow t7])) (THead (Bind b) u (lift (S O) O t3)) +(THead (Bind Abbr) u1 t5) H18) in (\lambda (_: (eq T u u1)).(\lambda (H23: +(eq B b Abbr)).(let H24 \def (eq_ind_r T t5 (\lambda (t7: T).(pr0 t7 t6)) H16 +(lift (S O) O t3) H21) in (ex2_ind T (\lambda (t7: T).(eq T t6 (lift (S O) O +t7))) (\lambda (t7: T).(pr0 t3 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) +(\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7))) (\lambda (x: T).(\lambda +(H25: (eq T t6 (lift (S O) O x))).(\lambda (H26: (pr0 t3 x)).(let H27 \def +(eq_ind_r T t5 (\lambda (t7: T).(eq T (THead (Bind Abbr) u1 t7) t)) H12 (lift +(S O) O t3) H21) in (let H28 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: +T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v +t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 +t10)))))))))) H (THead (Bind Abbr) u1 (lift (S O) O t3)) H27) in (let H29 +\def (eq_ind T t6 (\lambda (t7: T).(subst0 O u2 t7 w)) H17 (lift (S O) O x) +H25) in (let H30 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H7 +Abbr H23) in (ex2_ind T (\lambda (t7: T).(pr0 x t7)) (\lambda (t7: T).(pr0 t1 +t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind +Abbr) u2 w) t7))) (\lambda (x0: T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 +t1 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u2 w)) (pr0 t1) +(pr0_confluence__pr0_delta_tau u2 (lift (S O) O x) w H29 x (pr0_refl (lift (S +O) O x)) t1))))) (H28 t3 (lift_tlt_dx (Bind Abbr) u1 t3 (S O) O) x H26 t1 +H8))))))))) (pr0_gen_lift t3 t6 (S O) O H24)))))) H20)) H19)))))) t2 H14)) t +H12 H13 H9 H10 H11))) | (pr0_zeta b0 H9 t5 t6 H10 u0) \Rightarrow (\lambda +(H11: (eq T (THead (Bind b0) u0 (lift (S O) O t5)) t)).(\lambda (H12: (eq T +t6 t2)).(eq_ind T (THead (Bind b0) u0 (lift (S O) O t5)) (\lambda (_: T).((eq +T t6 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H13: (eq T t6 +t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b0 Abst)) \to ((pr0 t5 t7) \to +(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) +(\lambda (_: (not (eq B b0 Abst))).(\lambda (H15: (pr0 t5 t2)).(let H16 \def +(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Bind b) u (lift (S O) O t3)) +t7)) H4 (THead (Bind b0) u0 (lift (S O) O t5)) H11) in (let H17 \def (f_equal +T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef _) +\Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O +t3)) (THead (Bind b0) u0 (lift (S O) O t5)) H16) in ((let H18 \def (f_equal T +T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) +\Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Bind b) u (lift (S +O) O t3)) (THead (Bind b0) u0 (lift (S O) O t5)) H16) in ((let H19 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map +(\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) \Rightarrow (lref_map +(\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ t7) \Rightarrow t7])) +(THead (Bind b) u (lift (S O) O t3)) (THead (Bind b0) u0 (lift (S O) O t5)) +H16) in (\lambda (_: (eq T u u0)).(\lambda (H21: (eq B b b0)).(let H22 \def +(eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: +T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: +T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Bind b0) +u0 (lift (S O) O t5)) H11) in (let H23 \def (eq_ind T t3 (\lambda (t7: +T).(pr0 t7 t1)) H8 t5 (lift_inj t3 t5 (S O) O H19)) in (let H24 \def (eq_ind +B b (\lambda (b1: B).(not (eq B b1 Abst))) H7 b0 H21) in (ex2_ind T (\lambda +(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)) (ex2 T (\lambda (t7: +T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: T).(\lambda (H25: +(pr0 t1 x)).(\lambda (H26: (pr0 t2 x)).(ex_intro2 T (\lambda (t7: T).(pr0 t1 +t7)) (\lambda (t7: T).(pr0 t2 t7)) x H25 H26)))) (H22 t5 (lift_tlt_dx (Bind +b0) u0 t5 (S O) O) t1 H23 t2 H15)))))))) H18)) H17))))) t6 (sym_eq T t6 t2 +H13))) t H11 H12 H9 H10))) | (pr0_tau t5 t6 H9 u0) \Rightarrow (\lambda (H10: +(eq T (THead (Flat Cast) u0 t5) t)).(\lambda (H11: (eq T t6 t2)).(eq_ind T +(THead (Flat Cast) u0 t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) +(\lambda (H12: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to +(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))) +(\lambda (_: (pr0 t5 t2)).(let H14 \def (eq_ind_r T t (\lambda (t7: T).(eq T +(THead (Bind b) u (lift (S O) O t3)) t7)) H4 (THead (Flat Cast) u0 t5) H10) +in (let H15 \def (eq_ind T (THead (Bind b) u (lift (S O) O t3)) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat +_) \Rightarrow False])])) I (THead (Flat Cast) u0 t5) H14) in (False_ind (ex2 +T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))) H15)))) t6 +(sym_eq T t6 t2 H12))) t H10 H11 H9)))]) in (H9 (refl_equal T t) (refl_equal +T t2))))) t4 (sym_eq T t4 t1 H6))) t H4 H5 H2 H3))) | (pr0_tau t3 t4 H2 u) +\Rightarrow (\lambda (H3: (eq T (THead (Flat Cast) u t3) t)).(\lambda (H4: +(eq T t4 t1)).(eq_ind T (THead (Flat Cast) u t3) (\lambda (_: T).((eq T t4 +t1) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: +T).(pr0 t2 t6)))))) (\lambda (H5: (eq T t4 t1)).(eq_ind T t1 (\lambda (t5: +T).((pr0 t3 t5) \to (ex2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: +T).(pr0 t2 t6))))) (\lambda (H6: (pr0 t3 t1)).(let H7 \def (match H1 with +[(pr0_refl t5) \Rightarrow (\lambda (H7: (eq T t5 t)).(\lambda (H8: (eq T t5 +t2)).(eq_ind T t (\lambda (t6: T).((eq T t6 t2) \to (ex2 T (\lambda (t7: +T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))))) (\lambda (H9: (eq T t +t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) +(\lambda (t7: T).(pr0 t2 t7)))) (let H10 \def (eq_ind_r T t (\lambda (t6: +T).(eq T t6 t2)) H9 (THead (Flat Cast) u t3) H3) in (eq_ind T (THead (Flat +Cast) u t3) (\lambda (t6: T).(ex2 T (\lambda (t7: T).(pr0 t1 t7)) (\lambda +(t7: T).(pr0 t6 t7)))) (let H11 \def (eq_ind_r T t (\lambda (t6: T).(eq T t5 +t6)) H7 (THead (Flat Cast) u t3) H3) in (let H12 \def (eq_ind_r T t (\lambda +(t6: T).(\forall (v: T).((tlt v t6) \to (\forall (t7: T).((pr0 v t7) \to +(\forall (t8: T).((pr0 v t8) \to (ex2 T (\lambda (t9: T).(pr0 t7 t9)) +(\lambda (t9: T).(pr0 t8 t9)))))))))) H (THead (Flat Cast) u t3) H3) in +(ex_intro2 T (\lambda (t6: T).(pr0 t1 t6)) (\lambda (t6: T).(pr0 (THead (Flat +Cast) u t3) t6)) t1 (pr0_refl t1) (pr0_tau t3 t1 H6 u)))) t2 H10)) t (sym_eq +T t t2 H9))) t5 (sym_eq T t5 t H7) H8))) | (pr0_comp u1 u2 H7 t5 t6 H8 k) +\Rightarrow (\lambda (H9: (eq T (THead k u1 t5) t)).(\lambda (H10: (eq T +(THead k u2 t6) t2)).(eq_ind T (THead k u1 t5) (\lambda (_: T).((eq T (THead +k u2 t6) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H11: (eq T +(THead k u2 t6) t2)).(eq_ind T (THead k u2 t6) (\lambda (t7: T).((pr0 u1 u2) +\to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: +T).(pr0 t7 t8)))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H13: (pr0 t5 +t6)).(let H14 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) u +t3) t7)) H3 (THead k u1 t5) H9) in (let H15 \def (f_equal T K (\lambda (e: +T).(match e with [(TSort _) \Rightarrow (Flat Cast) | (TLRef _) \Rightarrow +(Flat Cast) | (THead k0 _ _) \Rightarrow k0])) (THead (Flat Cast) u t3) +(THead k u1 t5) H14) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t7 _) +\Rightarrow t7])) (THead (Flat Cast) u t3) (THead k u1 t5) H14) in ((let H17 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t3 | +(TLRef _) \Rightarrow t3 | (THead _ _ t7) \Rightarrow t7])) (THead (Flat +Cast) u t3) (THead k u1 t5) H14) in (\lambda (_: (eq T u u1)).(\lambda (H19: +(eq K (Flat Cast) k)).(eq_ind K (Flat Cast) (\lambda (k0: K).(ex2 T (\lambda +(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead k0 u2 t6) t7)))) (let H20 +\def (eq_ind_r K k (\lambda (k0: K).(eq T (THead k0 u1 t5) t)) H9 (Flat Cast) +H19) in (let H21 \def (eq_ind_r T t (\lambda (t7: T).(\forall (v: T).((tlt v +t7) \to (\forall (t8: T).((pr0 v t8) \to (\forall (t9: T).((pr0 v t9) \to +(ex2 T (\lambda (t10: T).(pr0 t8 t10)) (\lambda (t10: T).(pr0 t9 +t10)))))))))) H (THead (Flat Cast) u1 t5) H20) in (let H22 \def (eq_ind T t3 +(\lambda (t7: T).(pr0 t7 t1)) H6 t5 H17) in (ex2_ind T (\lambda (t7: T).(pr0 +t1 t7)) (\lambda (t7: T).(pr0 t6 t7)) (ex2 T (\lambda (t7: T).(pr0 t1 t7)) +(\lambda (t7: T).(pr0 (THead (Flat Cast) u2 t6) t7))) (\lambda (x: +T).(\lambda (H23: (pr0 t1 x)).(\lambda (H24: (pr0 t6 x)).(ex_intro2 T +(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Flat Cast) u2 t6) +t7)) x H23 (pr0_tau t6 x H24 u2))))) (H21 t5 (tlt_head_dx (Flat Cast) u1 t5) +t1 H22 t6 H13))))) k H19)))) H16)) H15))))) t2 H11)) t H9 H10 H7 H8))) | +(pr0_beta u0 v1 v2 H7 t5 t6 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat +Appl) v1 (THead (Bind Abst) u0 t5)) t)).(\lambda (H10: (eq T (THead (Bind +Abbr) v2 t6) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t5)) +(\lambda (_: T).((eq T (THead (Bind Abbr) v2 t6) t2) \to ((pr0 v1 v2) \to +((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 +t2 t8))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v2 t6) t2)).(eq_ind T +(THead (Bind Abbr) v2 t6) (\lambda (t7: T).((pr0 v1 v2) \to ((pr0 t5 t6) \to +(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 t8)))))) +(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t5 t6)).(let H14 \def (eq_ind_r T +t (\lambda (t7: T).(eq T (THead (Flat Cast) u t3) t7)) H3 (THead (Flat Appl) +v1 (THead (Bind Abst) u0 t5)) H9) in (let H15 \def (eq_ind T (THead (Flat +Cast) u t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind +_) \Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow +False | Cast \Rightarrow True])])])) I (THead (Flat Appl) v1 (THead (Bind +Abst) u0 t5)) H14) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 t7)) +(\lambda (t7: T).(pr0 (THead (Bind Abbr) v2 t6) t7))) H15))))) t2 H11)) t H9 +H10 H7 H8))) | (pr0_upsilon b H7 v1 v2 H8 u1 u2 H9 t5 t6 H10) \Rightarrow +(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) +t)).(\lambda (H12: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t6)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) +(\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t6)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to +((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 +t2 t8))))))))) (\lambda (H13: (eq T (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t6)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t6)) (\lambda (t7: T).((not (eq B b Abst)) \to ((pr0 v1 v2) +\to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) +(\lambda (t8: T).(pr0 t7 t8)))))))) (\lambda (_: (not (eq B b +Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 +t5 t6)).(let H18 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) +u t3) t7)) H3 (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) H11) in (let H19 +\def (eq_ind T (THead (Flat Cast) u t3) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow +(match f with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead +(Flat Appl) v1 (THead (Bind b) u1 t5)) H18) in (False_ind (ex2 T (\lambda +(t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t6)) t7))) H19))))))) t2 H13)) t H11 H12 H7 H8 H9 +H10))) | (pr0_delta u1 u2 H7 t5 t6 H8 w H9) \Rightarrow (\lambda (H10: (eq T +(THead (Bind Abbr) u1 t5) t)).(\lambda (H11: (eq T (THead (Bind Abbr) u2 w) +t2)).(eq_ind T (THead (Bind Abbr) u1 t5) (\lambda (_: T).((eq T (THead (Bind +Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to +(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))))) +(\lambda (H12: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind +Abbr) u2 w) (\lambda (t7: T).((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 +t6 w) \to (ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t7 +t8))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t5 t6)).(\lambda (_: +(subst0 O u2 t6 w)).(let H16 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead +(Flat Cast) u t3) t7)) H3 (THead (Bind Abbr) u1 t5) H10) in (let H17 \def +(eq_ind T (THead (Flat Cast) u t3) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind Abbr) u1 t5) H16) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 +t7)) (\lambda (t7: T).(pr0 (THead (Bind Abbr) u2 w) t7))) H17)))))) t2 H12)) +t H10 H11 H7 H8 H9))) | (pr0_zeta b H7 t5 t6 H8 u0) \Rightarrow (\lambda (H9: +(eq T (THead (Bind b) u0 (lift (S O) O t5)) t)).(\lambda (H10: (eq T t6 +t2)).(eq_ind T (THead (Bind b) u0 (lift (S O) O t5)) (\lambda (_: T).((eq T +t6 t2) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))))) (\lambda (H11: (eq T t6 +t2)).(eq_ind T t2 (\lambda (t7: T).((not (eq B b Abst)) \to ((pr0 t5 t7) \to +(ex2 T (\lambda (t8: T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) +(\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t5 t2)).(let H14 \def +(eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) u t3) t7)) H3 (THead +(Bind b) u0 (lift (S O) O t5)) H9) in (let H15 \def (eq_ind T (THead (Flat +Cast) u t3) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind +_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 +(lift (S O) O t5)) H14) in (False_ind (ex2 T (\lambda (t7: T).(pr0 t1 t7)) +(\lambda (t7: T).(pr0 t2 t7))) H15))))) t6 (sym_eq T t6 t2 H11))) t H9 H10 H7 +H8))) | (pr0_tau t5 t6 H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Flat +Cast) u0 t5) t)).(\lambda (H9: (eq T t6 t2)).(eq_ind T (THead (Flat Cast) u0 +t5) (\lambda (_: T).((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t8: +T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8)))))) (\lambda (H10: (eq T t6 +t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t5 t7) \to (ex2 T (\lambda (t8: +T).(pr0 t1 t8)) (\lambda (t8: T).(pr0 t2 t8))))) (\lambda (H11: (pr0 t5 +t2)).(let H12 \def (eq_ind_r T t (\lambda (t7: T).(eq T (THead (Flat Cast) u +t3) t7)) H3 (THead (Flat Cast) u0 t5) H8) in (let H13 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) +\Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Cast) u t3) +(THead (Flat Cast) u0 t5) H12) in ((let H14 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | +(THead _ _ t7) \Rightarrow t7])) (THead (Flat Cast) u t3) (THead (Flat Cast) +u0 t5) H12) in (\lambda (_: (eq T u u0)).(let H16 \def (eq_ind_r T t (\lambda +(t7: T).(\forall (v: T).((tlt v t7) \to (\forall (t8: T).((pr0 v t8) \to +(\forall (t9: T).((pr0 v t9) \to (ex2 T (\lambda (t10: T).(pr0 t8 t10)) +(\lambda (t10: T).(pr0 t9 t10)))))))))) H (THead (Flat Cast) u0 t5) H8) in +(let H17 \def (eq_ind T t3 (\lambda (t7: T).(pr0 t7 t1)) H6 t5 H14) in +(ex2_ind T (\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)) (ex2 T +(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7))) (\lambda (x: +T).(\lambda (H18: (pr0 t1 x)).(\lambda (H19: (pr0 t2 x)).(ex_intro2 T +(\lambda (t7: T).(pr0 t1 t7)) (\lambda (t7: T).(pr0 t2 t7)) x H18 H19)))) +(H16 t5 (tlt_head_dx (Flat Cast) u0 t5) t1 H17 t2 H11)))))) H13)))) t6 +(sym_eq T t6 t2 H10))) t H8 H9 H7)))]) in (H7 (refl_equal T t) (refl_equal T +t2)))) t4 (sym_eq T t4 t1 H5))) t H3 H4 H2)))]) in (H2 (refl_equal T t) +(refl_equal T t1))))))))) t0). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/props.ma new file mode 100644 index 000000000..ea8ea680c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/props.ma @@ -0,0 +1,534 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/fwd.ma". + +include "basic_1A/subst0/props.ma". + +lemma pr0_lift: + \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (h: nat).(\forall +(d: nat).(pr0 (lift h d t1) (lift h d t2)))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(pr0_ind (\lambda +(t: T).(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).(pr0 (lift h d t) +(lift h d t0)))))) (\lambda (t: T).(\lambda (h: nat).(\lambda (d: +nat).(pr0_refl (lift h d t))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda +(_: (pr0 u1 u2)).(\lambda (H1: ((\forall (h: nat).(\forall (d: nat).(pr0 +(lift h d u1) (lift h d u2)))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(_: (pr0 t3 t4)).(\lambda (H3: ((\forall (h: nat).(\forall (d: nat).(pr0 +(lift h d t3) (lift h d t4)))))).(\lambda (k: K).(\lambda (h: nat).(\lambda +(d: nat).(eq_ind_r T (THead k (lift h d u1) (lift h (s k d) t3)) (\lambda (t: +T).(pr0 t (lift h d (THead k u2 t4)))) (eq_ind_r T (THead k (lift h d u2) +(lift h (s k d) t4)) (\lambda (t: T).(pr0 (THead k (lift h d u1) (lift h (s k +d) t3)) t)) (pr0_comp (lift h d u1) (lift h d u2) (H1 h d) (lift h (s k d) +t3) (lift h (s k d) t4) (H3 h (s k d)) k) (lift h d (THead k u2 t4)) +(lift_head k u2 t4 h d)) (lift h d (THead k u1 t3)) (lift_head k u1 t3 h +d))))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: +(pr0 v1 v2)).(\lambda (H1: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h +d v1) (lift h d v2)))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 +t3 t4)).(\lambda (H3: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h d t3) +(lift h d t4)))))).(\lambda (h: nat).(\lambda (d: nat).(eq_ind_r T (THead +(Flat Appl) (lift h d v1) (lift h (s (Flat Appl) d) (THead (Bind Abst) u +t3))) (\lambda (t: T).(pr0 t (lift h d (THead (Bind Abbr) v2 t4)))) (eq_ind_r +T (THead (Bind Abst) (lift h (s (Flat Appl) d) u) (lift h (s (Bind Abst) (s +(Flat Appl) d)) t3)) (\lambda (t: T).(pr0 (THead (Flat Appl) (lift h d v1) t) +(lift h d (THead (Bind Abbr) v2 t4)))) (eq_ind_r T (THead (Bind Abbr) (lift h +d v2) (lift h (s (Bind Abbr) d) t4)) (\lambda (t: T).(pr0 (THead (Flat Appl) +(lift h d v1) (THead (Bind Abst) (lift h (s (Flat Appl) d) u) (lift h (s +(Bind Abst) (s (Flat Appl) d)) t3))) t)) (pr0_beta (lift h (s (Flat Appl) d) +u) (lift h d v1) (lift h d v2) (H1 h d) (lift h (s (Bind Abst) (s (Flat Appl) +d)) t3) (lift h (s (Bind Abbr) d) t4) (H3 h (s (Bind Abbr) d))) (lift h d +(THead (Bind Abbr) v2 t4)) (lift_head (Bind Abbr) v2 t4 h d)) (lift h (s +(Flat Appl) d) (THead (Bind Abst) u t3)) (lift_head (Bind Abst) u t3 h (s +(Flat Appl) d))) (lift h d (THead (Flat Appl) v1 (THead (Bind Abst) u t3))) +(lift_head (Flat Appl) v1 (THead (Bind Abst) u t3) h d))))))))))))) (\lambda +(b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (pr0 v1 v2)).(\lambda (H2: ((\forall (h: nat).(\forall (d: +nat).(pr0 (lift h d v1) (lift h d v2)))))).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (_: (pr0 u1 u2)).(\lambda (H4: ((\forall (h: nat).(\forall (d: +nat).(pr0 (lift h d u1) (lift h d u2)))))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (pr0 t3 t4)).(\lambda (H6: ((\forall (h: nat).(\forall (d: +nat).(pr0 (lift h d t3) (lift h d t4)))))).(\lambda (h: nat).(\lambda (d: +nat).(eq_ind_r T (THead (Flat Appl) (lift h d v1) (lift h (s (Flat Appl) d) +(THead (Bind b) u1 t3))) (\lambda (t: T).(pr0 t (lift h d (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4))))) (eq_ind_r T (THead (Bind b) +(lift h (s (Flat Appl) d) u1) (lift h (s (Bind b) (s (Flat Appl) d)) t3)) +(\lambda (t: T).(pr0 (THead (Flat Appl) (lift h d v1) t) (lift h d (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))))) (eq_ind_r T (THead +(Bind b) (lift h d u2) (lift h (s (Bind b) d) (THead (Flat Appl) (lift (S O) +O v2) t4))) (\lambda (t: T).(pr0 (THead (Flat Appl) (lift h d v1) (THead +(Bind b) (lift h (s (Flat Appl) d) u1) (lift h (s (Bind b) (s (Flat Appl) d)) +t3))) t)) (eq_ind_r T (THead (Flat Appl) (lift h (s (Bind b) d) (lift (S O) O +v2)) (lift h (s (Flat Appl) (s (Bind b) d)) t4)) (\lambda (t: T).(pr0 (THead +(Flat Appl) (lift h d v1) (THead (Bind b) (lift h (s (Flat Appl) d) u1) (lift +h (s (Bind b) (s (Flat Appl) d)) t3))) (THead (Bind b) (lift h d u2) t))) +(eq_ind nat (plus (S O) d) (\lambda (n: nat).(pr0 (THead (Flat Appl) (lift h +d v1) (THead (Bind b) (lift h d u1) (lift h n t3))) (THead (Bind b) (lift h d +u2) (THead (Flat Appl) (lift h n (lift (S O) O v2)) (lift h n t4))))) +(eq_ind_r T (lift (S O) O (lift h d v2)) (\lambda (t: T).(pr0 (THead (Flat +Appl) (lift h d v1) (THead (Bind b) (lift h d u1) (lift h (plus (S O) d) +t3))) (THead (Bind b) (lift h d u2) (THead (Flat Appl) t (lift h (plus (S O) +d) t4))))) (pr0_upsilon b H0 (lift h d v1) (lift h d v2) (H2 h d) (lift h d +u1) (lift h d u2) (H4 h d) (lift h (plus (S O) d) t3) (lift h (plus (S O) d) +t4) (H6 h (plus (S O) d))) (lift h (plus (S O) d) (lift (S O) O v2)) (lift_d +v2 h (S O) d O (le_O_n d))) (S d) (refl_equal nat (S d))) (lift h (s (Bind b) +d) (THead (Flat Appl) (lift (S O) O v2) t4)) (lift_head (Flat Appl) (lift (S +O) O v2) t4 h (s (Bind b) d))) (lift h d (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4))) (lift_head (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4) h d)) (lift h (s (Flat Appl) d) (THead (Bind b) u1 t3)) +(lift_head (Bind b) u1 t3 h (s (Flat Appl) d))) (lift h d (THead (Flat Appl) +v1 (THead (Bind b) u1 t3))) (lift_head (Flat Appl) v1 (THead (Bind b) u1 t3) +h d)))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 +u2)).(\lambda (H1: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h d u1) +(lift h d u2)))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 +t4)).(\lambda (H3: ((\forall (h: nat).(\forall (d: nat).(pr0 (lift h d t3) +(lift h d t4)))))).(\lambda (w: T).(\lambda (H4: (subst0 O u2 t4 w)).(\lambda +(h: nat).(\lambda (d: nat).(eq_ind_r T (THead (Bind Abbr) (lift h d u1) (lift +h (s (Bind Abbr) d) t3)) (\lambda (t: T).(pr0 t (lift h d (THead (Bind Abbr) +u2 w)))) (eq_ind_r T (THead (Bind Abbr) (lift h d u2) (lift h (s (Bind Abbr) +d) w)) (\lambda (t: T).(pr0 (THead (Bind Abbr) (lift h d u1) (lift h (s (Bind +Abbr) d) t3)) t)) (pr0_delta (lift h d u1) (lift h d u2) (H1 h d) (lift h (S +d) t3) (lift h (S d) t4) (H3 h (S d)) (lift h (S d) w) (let d' \def (S d) in +(eq_ind nat (minus (S d) (S O)) (\lambda (n: nat).(subst0 O (lift h n u2) +(lift h d' t4) (lift h d' w))) (subst0_lift_lt t4 w u2 O H4 (S d) (le_n_S O d +(le_O_n d)) h) d (eq_ind nat d (\lambda (n: nat).(eq nat n d)) (le_antisym d +d (le_n d) (le_n d)) (minus d O) (minus_n_O d))))) (lift h d (THead (Bind +Abbr) u2 w)) (lift_head (Bind Abbr) u2 w h d)) (lift h d (THead (Bind Abbr) +u1 t3)) (lift_head (Bind Abbr) u1 t3 h d)))))))))))))) (\lambda (b: +B).(\lambda (H0: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (pr0 t3 t4)).(\lambda (H2: ((\forall (h: nat).(\forall (d: +nat).(pr0 (lift h d t3) (lift h d t4)))))).(\lambda (u: T).(\lambda (h: +nat).(\lambda (d: nat).(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s +(Bind b) d) (lift (S O) O t3))) (\lambda (t: T).(pr0 t (lift h d t4))) +(eq_ind nat (plus (S O) d) (\lambda (n: nat).(pr0 (THead (Bind b) (lift h d +u) (lift h n (lift (S O) O t3))) (lift h d t4))) (eq_ind_r T (lift (S O) O +(lift h d t3)) (\lambda (t: T).(pr0 (THead (Bind b) (lift h d u) t) (lift h d +t4))) (pr0_zeta b H0 (lift h d t3) (lift h d t4) (H2 h d) (lift h d u)) (lift +h (plus (S O) d) (lift (S O) O t3)) (lift_d t3 h (S O) d O (le_O_n d))) (S d) +(refl_equal nat (S d))) (lift h d (THead (Bind b) u (lift (S O) O t3))) +(lift_head (Bind b) u (lift (S O) O t3) h d))))))))))) (\lambda (t3: +T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (H1: ((\forall (h: +nat).(\forall (d: nat).(pr0 (lift h d t3) (lift h d t4)))))).(\lambda (u: +T).(\lambda (h: nat).(\lambda (d: nat).(eq_ind_r T (THead (Flat Cast) (lift h +d u) (lift h (s (Flat Cast) d) t3)) (\lambda (t: T).(pr0 t (lift h d t4))) +(pr0_tau (lift h (s (Flat Cast) d) t3) (lift h d t4) (H1 h d) (lift h d u)) +(lift h d (THead (Flat Cast) u t3)) (lift_head (Flat Cast) u t3 h d))))))))) +t1 t2 H))). + +lemma pr0_gen_abbr: + \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abbr) u1 +t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) +(\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x)))))) +\def + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead +(Bind Abbr) u1 t1) x)).(insert_eq T (THead (Bind Abbr) u1 t1) (\lambda (t: +T).(pr0 t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 +u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda +(y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S +O) O x)))) (\lambda (y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: +T).(\lambda (t0: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: +T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: +T).(subst0 O u2 y0 t2))))))) (pr0 t1 (lift (S O) O t0)))))) (\lambda (t: +T).(\lambda (H1: (eq T t (THead (Bind Abbr) u1 t1))).(let H2 \def (f_equal T +T (\lambda (e: T).e) t (THead (Bind Abbr) u1 t1) H1) in (eq_ind_r T (THead +(Bind Abbr) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T +(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 t2))))))) (pr0 +t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 +t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 +t2))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u1 t1))) (ex3_2_intro T T +(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abbr) u1 t1) (THead +(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t2)))))) u1 t1 (refl_equal T (THead (Bind +Abbr) u1 t1)) (pr0_refl u1) (or_introl (pr0 t1 t1) (ex2 T (\lambda (y0: +T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u1 y0 t1))) (pr0_refl t1)))) t +H2)))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda +(H2: (((eq T u0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Bind Abbr) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t2: T).(or (pr0 +t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 +t2))))))) (pr0 t1 (lift (S O) O u2)))))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Bind Abbr) u1 +t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O +t2)))))).(\lambda (k: K).(\lambda (H5: (eq T (THead k u0 t0) (THead (Bind +Abbr) u1 t1))).(let H6 \def (f_equal T K (\lambda (e: T).(match e with +[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H5) in ((let H7 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | +(TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) +(THead (Bind Abbr) u1 t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H5) +in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k (Bind Abbr))).(eq_ind_r +K (Bind Abbr) (\lambda (k0: K).(or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: +T).(eq T (THead k0 u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 +t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 +t3))))))) (pr0 t1 (lift (S O) O (THead k0 u2 t2))))) (let H11 \def (eq_ind T +t0 (\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: +T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: +T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O t2))))) H4 t1 H8) in (let +H12 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H13 \def +(eq_ind T u0 (\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind Abbr) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: +T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O u2))))) H2 +u1 H9) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 u1 H9) in +(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind +Abbr) u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T +(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 +t1 (lift (S O) O (THead (Bind Abbr) u2 t2))) (ex3_2_intro T T (\lambda (u3: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 t2) (THead (Bind Abbr) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: +T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u3 y0 t3)))))) u2 t2 (refl_equal T (THead (Bind +Abbr) u2 t2)) H14 (or_introl (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t2))) H12))))))) k H10)))) H7)) +H6)))))))))))) (\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: +(pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abbr) u1 t1)) \to (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind Abbr) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t2))))))) (pr0 t1 (lift (S O) O +v2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda +(_: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 +t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 +t3))))))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H5: (eq T (THead (Flat +Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abbr) u1 t1))).(let H6 \def +(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H5) in (False_ind (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) +(THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) +(\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: +T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S +O) O (THead (Bind Abbr) v2 t2)))) H6)))))))))))) (\lambda (b: B).(\lambda (_: +(not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 +v2)).(\lambda (_: (((eq T v1 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: +T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: +T).(subst0 O u2 y0 t2))))))) (pr0 t1 (lift (S O) O v2)))))).(\lambda (u0: +T).(\lambda (u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead +(Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T u2 (THead (Bind Abbr) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 +u3))) (\lambda (u3: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y0: +T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 t2))))))) (pr0 t1 (lift (S +O) O u2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 +t2)).(\lambda (_: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: +T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: +T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H8: (eq +T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Abbr) u1 +t1))).(let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 +t1) H8) in (False_ind (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind +Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: +T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O (THead (Bind +b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))))) H9))))))))))))))))) +(\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (pr0 u0 u2)).(\lambda (H2: +(((eq T u0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Bind Abbr) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t2: T).(or (pr0 +t1 t2) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 +t2))))))) (pr0 t1 (lift (S O) O u2)))))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (H3: (pr0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Bind Abbr) u1 +t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O +t2)))))).(\lambda (w: T).(\lambda (H5: (subst0 O u2 t2 w)).(\lambda (H6: (eq +T (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1))).(let H7 \def (f_equal +T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) +\Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u0 t0) +(THead (Bind Abbr) u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) +u1 t1) H6) in (\lambda (H9: (eq T u0 u1)).(let H10 \def (eq_ind T t0 (\lambda +(t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 +t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 +t3))))))) (pr0 t1 (lift (S O) O t2))))) H4 t1 H8) in (let H11 \def (eq_ind T +t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in (let H12 \def (eq_ind T u0 +(\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead (Bind Abbr) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: +T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: +T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S O) O u2))))) H2 u1 H9) in (let +H13 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 u1 H9) in (or_introl +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) +(THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) +(\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: +T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u3 y0 t3))))))) (pr0 t1 (lift (S +O) O (THead (Bind Abbr) u2 w))) (ex3_2_intro T T (\lambda (u3: T).(\lambda +(t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u3 t3)))) (\lambda +(u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or +(pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O +u3 y0 t3)))))) u2 w (refl_equal T (THead (Bind Abbr) u2 w)) H13 (or_intror +(pr0 t1 w) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 +y0 w))) (ex_intro2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O +u2 y0 w)) t2 H11 H5)))))))))) H7))))))))))))) (\lambda (b: B).(\lambda (H1: +(not (eq B b Abst))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 +t2)).(\lambda (H3: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: +T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: +T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (u: +T).(\lambda (H4: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind +Abbr) u1 t1))).(let H5 \def (f_equal T B (\lambda (e: T).(match e with +[(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) +\Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow +b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H4) in +((let H6 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) +(THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H4) in ((let +H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow +(lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | (TLRef _) \Rightarrow +(lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | (THead _ _ t) +\Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 +t1) H4) in (\lambda (_: (eq T u u1)).(\lambda (H9: (eq B b Abbr)).(let H10 +\def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H1 Abbr H9) in (let +H11 \def (eq_ind_r T t1 (\lambda (t: T).((eq T t0 (THead (Bind Abbr) u1 t)) +\to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t3: T).(or (pr0 t t3) (ex2 T (\lambda (y0: T).(pr0 t y0)) +(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t (lift (S O) O t2))))) H3 +(lift (S O) O t0) H7) in (eq_ind T (lift (S O) O t0) (\lambda (t: T).(or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t3: T).(or (pr0 t t3) (ex2 T (\lambda (y0: T).(pr0 t y0)) +(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t (lift (S O) O t2)))) +(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t3: T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y0: +T).(pr0 (lift (S O) O t0) y0)) (\lambda (y0: T).(subst0 O u2 y0 t3))))))) +(pr0 (lift (S O) O t0) (lift (S O) O t2)) (pr0_lift t0 t2 H2 (S O) O)) t1 +H7)))))) H6)) H5)))))))))) (\lambda (t0: T).(\lambda (t2: T).(\lambda (_: +(pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Abbr) u1 t1)) \to (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O +t2)))))).(\lambda (u: T).(\lambda (H3: (eq T (THead (Flat Cast) u t0) (THead +(Bind Abbr) u1 t1))).(let H4 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | +(Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H3) in (False_ind +(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O t2))) +H4)))))))) y x H0))) H)))). + +lemma pr0_gen_void: + \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Void) u1 +t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x)))))) +\def + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead +(Bind Void) u1 t1) x)).(insert_eq T (THead (Bind Void) u1 t1) (\lambda (t: +T).(pr0 t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 +u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) +O x)))) (\lambda (y: T).(\lambda (H0: (pr0 y x)).(pr0_ind (\lambda (t: +T).(\lambda (t0: T).((eq T t (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Void) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: +T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O t0)))))) (\lambda (t: T).(\lambda +(H1: (eq T t (THead (Bind Void) u1 t1))).(let H2 \def (f_equal T T (\lambda +(e: T).e) t (THead (Bind Void) u1 t1) H1) in (eq_ind_r T (THead (Bind Void) +u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq +T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 +u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O +t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead +(Bind Void) u1 t1) (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 +(lift (S O) O (THead (Bind Void) u1 t1))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t2: T).(eq T (THead (Bind Void) u1 t1) (THead (Bind Void) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Bind Void) u1 +t1)) (pr0_refl u1) (pr0_refl t1))) t H2)))) (\lambda (u0: T).(\lambda (u2: +T).(\lambda (H1: (pr0 u0 u2)).(\lambda (H2: (((eq T u0 (THead (Bind Void) u1 +t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Bind Void) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O +u2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (pr0 t0 +t2)).(\lambda (H4: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (k: K).(\lambda +(H5: (eq T (THead k u0 t0) (THead (Bind Void) u1 t1))).(let H6 \def (f_equal +T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u0 t0) (THead (Bind +Void) u1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) +\Rightarrow t])) (THead k u0 t0) (THead (Bind Void) u1 t1) H5) in ((let H8 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | +(TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) +(THead (Bind Void) u1 t1) H5) in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: +(eq K k (Bind Void))).(eq_ind_r K (Bind Void) (\lambda (k0: K).(or (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k0 u2 t2) (THead (Bind Void) +u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead k0 u2 t2))))) +(let H11 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind Void) u1 +t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2))))) H4 t1 +H8) in (let H12 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H3 t1 H8) in +(let H13 \def (eq_ind T u0 (\lambda (t: T).((eq T t (THead (Bind Void) u1 +t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead +(Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O u2))))) H2 u1 +H9) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(pr0 t u2)) H1 u1 H9) in +(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind +Void) u2 t2) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 +(lift (S O) O (THead (Bind Void) u2 t2))) (ex3_2_intro T T (\lambda (u3: +T).(\lambda (t3: T).(eq T (THead (Bind Void) u2 t2) (THead (Bind Void) u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Bind Void) u2 +t2)) H14 H12)))))) k H10)))) H7)) H6)))))))))))) (\lambda (u: T).(\lambda +(v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 +(THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T v2 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 +(lift (S O) O v2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 +t2)).(\lambda (_: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H5: (eq T (THead +(Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Void) u1 t1))).(let H6 +\def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H5) in (False_ind (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) +(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead +(Bind Abbr) v2 t2)))) H6)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B +b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 +v2)).(\lambda (_: (((eq T v1 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T v2 (THead (Bind Void) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: +T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O v2)))))).(\lambda (u0: T).(\lambda +(u2: T).(\lambda (_: (pr0 u0 u2)).(\lambda (_: (((eq T u0 (THead (Bind Void) +u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Bind Void) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O +u2)))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda +(_: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u3 t3)))) (\lambda (u3: +T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (H8: (eq T (THead (Flat Appl) +v1 (THead (Bind b) u0 t0)) (THead (Bind Void) u1 t1))).(let H9 \def (eq_ind T +(THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind Void) u1 t1) H8) in (False_ind (or (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t2)) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda +(_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 +(lift (S O) O (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))))) +H9))))))))))))))))) (\lambda (u0: T).(\lambda (u2: T).(\lambda (_: (pr0 u0 +u2)).(\lambda (_: (((eq T u0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Bind Void) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t2: +T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O u2)))))).(\lambda (t0: T).(\lambda +(t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind Void) +u1 t1)) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O +t2)))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t2 w)).(\lambda (H6: (eq T +(THead (Bind Abbr) u0 t0) (THead (Bind Void) u1 t1))).(let H7 \def (eq_ind T +(THead (Bind Abbr) u0 t0) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow True | +Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow +False])])) I (THead (Bind Void) u1 t1) H6) in (False_ind (or (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind +Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) +u2 w)))) H7))))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b +Abst))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 t2)).(\lambda +(H3: (((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (u: T).(\lambda (H4: (eq T +(THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1))).(let H5 \def +(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow b | (TLRef +_) \Rightarrow b | (THead k _ _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O +t0)) (THead (Bind Void) u1 t1) H4) in ((let H6 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead +_ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind +Void) u1 t1) H4) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | +(TLRef _) \Rightarrow (lref_map (\lambda (x0: nat).(plus x0 (S O))) O t0) | +(THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead +(Bind Void) u1 t1) H4) in (\lambda (_: (eq T u u1)).(\lambda (H9: (eq B b +Void)).(let H10 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) H1 +Void H9) in (let H11 \def (eq_ind_r T t1 (\lambda (t: T).((eq T t0 (THead +(Bind Void) u1 t)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (pr0 t (lift (S O) O +t2))))) H3 (lift (S O) O t0) H7) in (eq_ind T (lift (S O) O t0) (\lambda (t: +T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t t3)))) (pr0 t (lift (S O) O t2)))) (or_intror +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (pr0 (lift (S O) O t0) +(lift (S O) O t2)) (pr0_lift t0 t2 H2 (S O) O)) t1 H7)))))) H6)) H5)))))))))) +(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (pr0 t0 t2)).(\lambda (_: +(((eq T t0 (THead (Bind Void) u1 t1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 (lift (S O) O t2)))))).(\lambda (u: T).(\lambda (H3: (eq T +(THead (Flat Cast) u t0) (THead (Bind Void) u1 t1))).(let H4 \def (eq_ind T +(THead (Flat Cast) u t0) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind Void) u1 t1) H3) in (False_ind (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3)))) (pr0 t1 (lift (S O) O t2))) H4)))))))) y x H0))) H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst0.ma new file mode 100644 index 000000000..93ca2592b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst0.ma @@ -0,0 +1,1647 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/props.ma". + +include "basic_1A/subst0/subst0.ma". + +lemma pr0_subst0_back: + \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst0 +i u2 t1 t2) \to (\forall (u1: T).((pr0 u1 u2) \to (ex2 T (\lambda (t: +T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t t2))))))))) +\def + \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda +(H: (subst0 i u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).((pr0 u1 t) \to (ex2 T +(\lambda (t4: T).(subst0 n u1 t0 t4)) (\lambda (t4: T).(pr0 t4 t3))))))))) +(\lambda (v: T).(\lambda (i0: nat).(\lambda (u1: T).(\lambda (H0: (pr0 u1 +v)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 (TLRef i0) t)) (\lambda (t: +T).(pr0 t (lift (S i0) O v))) (lift (S i0) O u1) (subst0_lref u1 i0) +(pr0_lift u1 v H0 (S i0) O)))))) (\lambda (v: T).(\lambda (u3: T).(\lambda +(u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: +((\forall (u4: T).((pr0 u4 v) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) +(\lambda (t: T).(pr0 t u3))))))).(\lambda (t: T).(\lambda (k: K).(\lambda +(u0: T).(\lambda (H2: (pr0 u0 v)).(ex2_ind T (\lambda (t0: T).(subst0 i0 u0 +u1 t0)) (\lambda (t0: T).(pr0 t0 u3)) (ex2 T (\lambda (t0: T).(subst0 i0 u0 +(THead k u1 t) t0)) (\lambda (t0: T).(pr0 t0 (THead k u3 t)))) (\lambda (x: +T).(\lambda (H3: (subst0 i0 u0 u1 x)).(\lambda (H4: (pr0 x u3)).(ex_intro2 T +(\lambda (t0: T).(subst0 i0 u0 (THead k u1 t) t0)) (\lambda (t0: T).(pr0 t0 +(THead k u3 t))) (THead k x t) (subst0_fst u0 x u1 i0 H3 t k) (pr0_comp x u3 +H4 t t (pr0_refl t) k))))) (H1 u0 H2)))))))))))) (\lambda (k: K).(\lambda (v: +T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (i0: nat).(\lambda (_: (subst0 +(s k i0) v t4 t3)).(\lambda (H1: ((\forall (u1: T).((pr0 u1 v) \to (ex2 T +(\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t +t3))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (H2: (pr0 u1 v)).(ex2_ind +T (\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t t3)) (ex2 +T (\lambda (t: T).(subst0 i0 u1 (THead k u t4) t)) (\lambda (t: T).(pr0 t +(THead k u t3)))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i0) u1 t4 +x)).(\lambda (H4: (pr0 x t3)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 +(THead k u t4) t)) (\lambda (t: T).(pr0 t (THead k u t3))) (THead k u x) +(subst0_snd k u1 x t4 i0 H3 u) (pr0_comp u u (pr0_refl u) x t3 H4 k))))) (H1 +u1 H2)))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u3: T).(\lambda +(i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: ((\forall (u4: +T).((pr0 u4 v) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) (\lambda (t: +T).(pr0 t u3))))))).(\lambda (k: K).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (subst0 (s k i0) v t3 t4)).(\lambda (H3: ((\forall (u4: +T).((pr0 u4 v) \to (ex2 T (\lambda (t: T).(subst0 (s k i0) u4 t3 t)) (\lambda +(t: T).(pr0 t t4))))))).(\lambda (u0: T).(\lambda (H4: (pr0 u0 v)).(ex2_ind T +(\lambda (t: T).(subst0 (s k i0) u0 t3 t)) (\lambda (t: T).(pr0 t t4)) (ex2 T +(\lambda (t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 t +(THead k u3 t4)))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i0) u0 t3 +x)).(\lambda (H6: (pr0 x t4)).(ex2_ind T (\lambda (t: T).(subst0 i0 u0 u1 t)) +(\lambda (t: T).(pr0 t u3)) (ex2 T (\lambda (t: T).(subst0 i0 u0 (THead k u1 +t3) t)) (\lambda (t: T).(pr0 t (THead k u3 t4)))) (\lambda (x0: T).(\lambda +(H7: (subst0 i0 u0 u1 x0)).(\lambda (H8: (pr0 x0 u3)).(ex_intro2 T (\lambda +(t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 t (THead k u3 +t4))) (THead k x0 x) (subst0_both u0 u1 x0 i0 H7 k t3 x H5) (pr0_comp x0 u3 +H8 x t4 H6 k))))) (H1 u0 H4))))) (H3 u0 H4))))))))))))))) i u2 t1 t2 H))))). + +lemma pr0_subst0_fwd: + \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst0 +i u2 t1 t2) \to (\forall (u1: T).((pr0 u2 u1) \to (ex2 T (\lambda (t: +T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t2 t))))))))) +\def + \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda +(H: (subst0 i u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).((pr0 t u1) \to (ex2 T +(\lambda (t4: T).(subst0 n u1 t0 t4)) (\lambda (t4: T).(pr0 t3 t4))))))))) +(\lambda (v: T).(\lambda (i0: nat).(\lambda (u1: T).(\lambda (H0: (pr0 v +u1)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 (TLRef i0) t)) (\lambda (t: +T).(pr0 (lift (S i0) O v) t)) (lift (S i0) O u1) (subst0_lref u1 i0) +(pr0_lift v u1 H0 (S i0) O)))))) (\lambda (v: T).(\lambda (u3: T).(\lambda +(u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: +((\forall (u4: T).((pr0 v u4) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) +(\lambda (t: T).(pr0 u3 t))))))).(\lambda (t: T).(\lambda (k: K).(\lambda +(u0: T).(\lambda (H2: (pr0 v u0)).(ex2_ind T (\lambda (t0: T).(subst0 i0 u0 +u1 t0)) (\lambda (t0: T).(pr0 u3 t0)) (ex2 T (\lambda (t0: T).(subst0 i0 u0 +(THead k u1 t) t0)) (\lambda (t0: T).(pr0 (THead k u3 t) t0))) (\lambda (x: +T).(\lambda (H3: (subst0 i0 u0 u1 x)).(\lambda (H4: (pr0 u3 x)).(ex_intro2 T +(\lambda (t0: T).(subst0 i0 u0 (THead k u1 t) t0)) (\lambda (t0: T).(pr0 +(THead k u3 t) t0)) (THead k x t) (subst0_fst u0 x u1 i0 H3 t k) (pr0_comp u3 +x H4 t t (pr0_refl t) k))))) (H1 u0 H2)))))))))))) (\lambda (k: K).(\lambda +(v: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (i0: nat).(\lambda (_: +(subst0 (s k i0) v t4 t3)).(\lambda (H1: ((\forall (u1: T).((pr0 v u1) \to +(ex2 T (\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t3 +t))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (H2: (pr0 v u1)).(ex2_ind +T (\lambda (t: T).(subst0 (s k i0) u1 t4 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 +T (\lambda (t: T).(subst0 i0 u1 (THead k u t4) t)) (\lambda (t: T).(pr0 +(THead k u t3) t))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i0) u1 t4 +x)).(\lambda (H4: (pr0 t3 x)).(ex_intro2 T (\lambda (t: T).(subst0 i0 u1 +(THead k u t4) t)) (\lambda (t: T).(pr0 (THead k u t3) t)) (THead k u x) +(subst0_snd k u1 x t4 i0 H3 u) (pr0_comp u u (pr0_refl u) t3 x H4 k))))) (H1 +u1 H2)))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u3: T).(\lambda +(i0: nat).(\lambda (_: (subst0 i0 v u1 u3)).(\lambda (H1: ((\forall (u4: +T).((pr0 v u4) \to (ex2 T (\lambda (t: T).(subst0 i0 u4 u1 t)) (\lambda (t: +T).(pr0 u3 t))))))).(\lambda (k: K).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (subst0 (s k i0) v t3 t4)).(\lambda (H3: ((\forall (u4: +T).((pr0 v u4) \to (ex2 T (\lambda (t: T).(subst0 (s k i0) u4 t3 t)) (\lambda +(t: T).(pr0 t4 t))))))).(\lambda (u0: T).(\lambda (H4: (pr0 v u0)).(ex2_ind T +(\lambda (t: T).(subst0 (s k i0) u0 t3 t)) (\lambda (t: T).(pr0 t4 t)) (ex2 T +(\lambda (t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 (THead +k u3 t4) t))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i0) u0 t3 +x)).(\lambda (H6: (pr0 t4 x)).(ex2_ind T (\lambda (t: T).(subst0 i0 u0 u1 t)) +(\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(subst0 i0 u0 (THead k u1 +t3) t)) (\lambda (t: T).(pr0 (THead k u3 t4) t))) (\lambda (x0: T).(\lambda +(H7: (subst0 i0 u0 u1 x0)).(\lambda (H8: (pr0 u3 x0)).(ex_intro2 T (\lambda +(t: T).(subst0 i0 u0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 (THead k u3 t4) +t)) (THead k x0 x) (subst0_both u0 u1 x0 i0 H7 k t3 x H5) (pr0_comp u3 x0 H8 +t4 x H6 k))))) (H1 u0 H4))))) (H3 u0 H4))))))))))))))) i u2 t1 t2 H))))). + +theorem pr0_subst0: + \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (v1: T).(\forall +(w1: T).(\forall (i: nat).((subst0 i v1 t1 w1) \to (\forall (v2: T).((pr0 v1 +v2) \to (or (pr0 w1 t2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 t2 w2)))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(pr0_ind (\lambda +(t: T).(\lambda (t0: T).(\forall (v1: T).(\forall (w1: T).(\forall (i: +nat).((subst0 i v1 t w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 w1 +t0) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t0 +w2)))))))))))) (\lambda (t: T).(\lambda (v1: T).(\lambda (w1: T).(\lambda (i: +nat).(\lambda (H0: (subst0 i v1 t w1)).(\lambda (v2: T).(\lambda (H1: (pr0 v1 +v2)).(or_intror (pr0 w1 t) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 t w2))) (ex2_sym T (subst0 i v2 t) (pr0 w1) (pr0_subst0_fwd +v1 t w1 i H0 v2 H1)))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: +(pr0 u1 u2)).(\lambda (H1: ((\forall (v1: T).(\forall (w1: T).(\forall (i: +nat).((subst0 i v1 u1 w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 w1 +u2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 u2 +w2)))))))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 +t4)).(\lambda (H3: ((\forall (v1: T).(\forall (w1: T).(\forall (i: +nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 w1 +t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 +w2)))))))))))).(\lambda (k: K).(\lambda (v1: T).(\lambda (w1: T).(\lambda (i: +nat).(\lambda (H4: (subst0 i v1 (THead k u1 t3) w1)).(\lambda (v2: +T).(\lambda (H5: (pr0 v1 v2)).(or3_ind (ex2 T (\lambda (u3: T).(eq T w1 +(THead k u3 t3))) (\lambda (u3: T).(subst0 i v1 u1 u3))) (ex2 T (\lambda (t5: +T).(eq T w1 (THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i) v1 t3 t5))) +(ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead k u3 t5)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i v1 u1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i) v1 t3 t5)))) (or (pr0 w1 (THead k u2 t4)) +(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 (THead k +u2 t4) w2)))) (\lambda (H6: (ex2 T (\lambda (u3: T).(eq T w1 (THead k u3 +t3))) (\lambda (u3: T).(subst0 i v1 u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq +T w1 (THead k u3 t3))) (\lambda (u3: T).(subst0 i v1 u1 u3)) (or (pr0 w1 +(THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: T).(\lambda (H7: (eq T w1 +(THead k x t3))).(\lambda (H8: (subst0 i v1 u1 x)).(eq_ind_r T (THead k x t3) +(\lambda (t: T).(or (pr0 t (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 t +w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))))) (or_ind (pr0 x u2) +(ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 u2 w2))) +(or (pr0 (THead k x t3) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead +k x t3) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda +(H9: (pr0 x u2)).(or_introl (pr0 (THead k x t3) (THead k u2 t4)) (ex2 T +(\lambda (w2: T).(pr0 (THead k x t3) w2)) (\lambda (w2: T).(subst0 i v2 +(THead k u2 t4) w2))) (pr0_comp x u2 H9 t3 t4 H2 k))) (\lambda (H9: (ex2 T +(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)))).(ex2_ind +T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)) (or (pr0 +(THead k x t3) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x t3) +w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x0: +T).(\lambda (H10: (pr0 x x0)).(\lambda (H11: (subst0 i v2 u2 x0)).(or_intror +(pr0 (THead k x t3) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x +t3) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T +(\lambda (w2: T).(pr0 (THead k x t3) w2)) (\lambda (w2: T).(subst0 i v2 +(THead k u2 t4) w2)) (THead k x0 t4) (pr0_comp x x0 H10 t3 t4 H2 k) +(subst0_fst v2 x0 u2 i H11 t4 k)))))) H9)) (H1 v1 x i H8 v2 H5)) w1 H7)))) +H6)) (\lambda (H6: (ex2 T (\lambda (t5: T).(eq T w1 (THead k u1 t5))) +(\lambda (t5: T).(subst0 (s k i) v1 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq +T w1 (THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i) v1 t3 t5)) (or (pr0 +w1 (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: T).(\lambda (H7: (eq T w1 +(THead k u1 x))).(\lambda (H8: (subst0 (s k i) v1 t3 x)).(eq_ind_r T (THead k +u1 x) (\lambda (t: T).(or (pr0 t (THead k u2 t4)) (ex2 T (\lambda (w2: +T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))))) (or_ind +(pr0 x t4) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s k +i) v2 t4 w2))) (or (pr0 (THead k u1 x) (THead k u2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead k u1 x) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) +w2)))) (\lambda (H9: (pr0 x t4)).(or_introl (pr0 (THead k u1 x) (THead k u2 +t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k u1 x) w2)) (\lambda (w2: +T).(subst0 i v2 (THead k u2 t4) w2))) (pr0_comp u1 u2 H0 x t4 H9 k))) +(\lambda (H9: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s +k i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: +T).(subst0 (s k i) v2 t4 w2)) (or (pr0 (THead k u1 x) (THead k u2 t4)) (ex2 T +(\lambda (w2: T).(pr0 (THead k u1 x) w2)) (\lambda (w2: T).(subst0 i v2 +(THead k u2 t4) w2)))) (\lambda (x0: T).(\lambda (H10: (pr0 x x0)).(\lambda +(H11: (subst0 (s k i) v2 t4 x0)).(or_intror (pr0 (THead k u1 x) (THead k u2 +t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k u1 x) w2)) (\lambda (w2: +T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 +(THead k u1 x) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)) (THead +k u2 x0) (pr0_comp u1 u2 H0 x x0 H10 k) (subst0_snd k v2 x0 t4 i H11 u2)))))) +H9)) (H3 v1 x (s k i) H8 v2 H5)) w1 H7)))) H6)) (\lambda (H6: (ex3_2 T T +(\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead k u3 t5)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 i v1 u1 u3))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s k i) v1 t3 t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda +(t5: T).(eq T w1 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 +i v1 u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i) v1 t3 t5))) +(or (pr0 w1 (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda +(w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H7: (eq T w1 (THead k x0 x1))).(\lambda (H8: (subst0 i v1 u1 +x0)).(\lambda (H9: (subst0 (s k i) v1 t3 x1)).(eq_ind_r T (THead k x0 x1) +(\lambda (t: T).(or (pr0 t (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 t +w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))))) (or_ind (pr0 x1 +t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s k i) v2 +t4 w2))) (or (pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) +w2)))) (\lambda (H10: (pr0 x1 t4)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2))) (or (pr0 (THead k x0 +x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (H11: (pr0 x0 +u2)).(or_introl (pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) +w2))) (pr0_comp x0 u2 H11 x1 t4 H10 k))) (\lambda (H11: (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda +(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead k +x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: T).(\lambda +(H12: (pr0 x0 x)).(\lambda (H13: (subst0 i v2 u2 x)).(or_intror (pr0 (THead k +x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda +(w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 +t4) w2)) (THead k x t4) (pr0_comp x0 x H12 x1 t4 H10 k) (subst0_fst v2 x u2 i +H13 t4 k)))))) H11)) (H1 v1 x0 i H8 v2 H5))) (\lambda (H10: (ex2 T (\lambda +(w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s k i) v2 t4 w2)))).(ex2_ind T +(\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s k i) v2 t4 w2)) (or +(pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k +x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x: +T).(\lambda (H11: (pr0 x1 x)).(\lambda (H12: (subst0 (s k i) v2 t4 +x)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 i v2 u2 w2))) (or (pr0 (THead k x0 x1) (THead k u2 t4)) (ex2 T +(\lambda (w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 +(THead k u2 t4) w2)))) (\lambda (H13: (pr0 x0 u2)).(or_intror (pr0 (THead k +x0 x1) (THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda +(w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 +t4) w2)) (THead k u2 x) (pr0_comp x0 u2 H13 x1 x H11 k) (subst0_snd k v2 x t4 +i H12 u2)))) (\lambda (H13: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda +(w2: T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) +(\lambda (w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead k x0 x1) (THead k u2 +t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) (\lambda (w2: +T).(subst0 i v2 (THead k u2 t4) w2)))) (\lambda (x2: T).(\lambda (H14: (pr0 +x0 x2)).(\lambda (H15: (subst0 i v2 u2 x2)).(or_intror (pr0 (THead k x0 x1) +(THead k u2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead k x0 x1) w2)) (\lambda +(w2: T).(subst0 i v2 (THead k u2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 +(THead k x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead k u2 t4) w2)) +(THead k x2 x) (pr0_comp x0 x2 H14 x1 x H11 k) (subst0_both v2 u2 x2 i H15 k +t4 x H12)))))) H13)) (H1 v1 x0 i H8 v2 H5))))) H10)) (H3 v1 x1 (s k i) H9 v2 +H5)) w1 H7)))))) H6)) (subst0_gen_head k v1 u1 t3 w1 i H4))))))))))))))))) +(\lambda (u: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H0: (pr0 v1 +v2)).(\lambda (H1: ((\forall (v3: T).(\forall (w1: T).(\forall (i: +nat).((subst0 i v3 v1 w1) \to (\forall (v4: T).((pr0 v3 v4) \to (or (pr0 w1 +v2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v4 v2 +w2)))))))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 +t4)).(\lambda (H3: ((\forall (v3: T).(\forall (w1: T).(\forall (i: +nat).((subst0 i v3 t3 w1) \to (\forall (v4: T).((pr0 v3 v4) \to (or (pr0 w1 +t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v4 t4 +w2)))))))))))).(\lambda (v0: T).(\lambda (w1: T).(\lambda (i: nat).(\lambda +(H4: (subst0 i v0 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) +w1)).(\lambda (v3: T).(\lambda (H5: (pr0 v0 v3)).(or3_ind (ex2 T (\lambda +(u2: T).(eq T w1 (THead (Flat Appl) u2 (THead (Bind Abst) u t3)))) (\lambda +(u2: T).(subst0 i v0 v1 u2))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Flat +Appl) v1 t5))) (\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead (Bind +Abst) u t3) t5))) (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T w1 +(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 v1 +u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead +(Bind Abst) u t3) t5)))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T +(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind +Abbr) v2 t4) w2)))) (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T w1 (THead +(Flat Appl) u2 (THead (Bind Abst) u t3)))) (\lambda (u2: T).(subst0 i v0 v1 +u2)))).(ex2_ind T (\lambda (u2: T).(eq T w1 (THead (Flat Appl) u2 (THead +(Bind Abst) u t3)))) (\lambda (u2: T).(subst0 i v0 v1 u2)) (or (pr0 w1 (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (x: T).(\lambda +(H7: (eq T w1 (THead (Flat Appl) x (THead (Bind Abst) u t3)))).(\lambda (H8: +(subst0 i v0 v1 x)).(eq_ind_r T (THead (Flat Appl) x (THead (Bind Abst) u +t3)) (\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda +(w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2))))) (or_ind (pr0 x v2) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: +T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x (THead (Bind Abst) u +t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind Abbr) v2 t4) w2)))) (\lambda (H9: (pr0 x v2)).(or_introl (pr0 (THead +(Flat Appl) x (THead (Bind Abst) u t3)) (THead (Bind Abbr) v2 t4)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (pr0_beta u x +v2 H9 t3 t4 H2))) (\lambda (H9: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda +(w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) +(\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x (THead +(Bind Abst) u t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: T).(subst0 +i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (x0: T).(\lambda (H10: (pr0 x +x0)).(\lambda (H11: (subst0 i v3 v2 x0)).(or_intror (pr0 (THead (Flat Appl) x +(THead (Bind Abst) u t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x (THead (Bind Abst) u t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) x0 t4) +(pr0_beta u x x0 H10 t3 t4 H2) (subst0_fst v3 x0 v2 i H11 t4 (Bind +Abbr))))))) H9)) (H1 v0 x i H8 v3 H5)) w1 H7)))) H6)) (\lambda (H6: (ex2 T +(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: +T).(subst0 (s (Flat Appl) i) v0 (THead (Bind Abst) u t3) t5)))).(ex2_ind T +(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: +T).(subst0 (s (Flat Appl) i) v0 (THead (Bind Abst) u t3) t5)) (or (pr0 w1 +(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (x: T).(\lambda +(H7: (eq T w1 (THead (Flat Appl) v1 x))).(\lambda (H8: (subst0 (s (Flat Appl) +i) v0 (THead (Bind Abst) u t3) x)).(or3_ind (ex2 T (\lambda (u2: T).(eq T x +(THead (Bind Abst) u2 t3))) (\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u +u2))) (ex2 T (\lambda (t5: T).(eq T x (THead (Bind Abst) u t5))) (\lambda +(t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T x (THead (Bind Abst) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u u2))) +(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 +t3 t5)))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 +w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) +(\lambda (H9: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 t3))) +(\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u u2)))).(ex2_ind T (\lambda +(u2: T).(eq T x (THead (Bind Abst) u2 t3))) (\lambda (u2: T).(subst0 (s (Flat +Appl) i) v0 u u2)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda +(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2)))) (\lambda (x0: T).(\lambda (H10: (eq T x (THead (Bind Abst) x0 +t3))).(\lambda (_: (subst0 (s (Flat Appl) i) v0 u x0)).(let H12 \def (eq_ind +T x (\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 t))) H7 (THead (Bind Abst) +x0 t3) H10) in (eq_ind_r T (THead (Flat Appl) v1 (THead (Bind Abst) x0 t3)) +(\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2))))) (or_introl (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 t3)) +(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 +(THead (Bind Abst) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind +Abbr) v2 t4) w2))) (pr0_beta x0 v1 v2 H0 t3 t4 H2)) w1 H12))))) H9)) (\lambda +(H9: (ex2 T (\lambda (t5: T).(eq T x (THead (Bind Abst) u t5))) (\lambda (t5: +T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5)))).(ex2_ind T (\lambda +(t5: T).(eq T x (THead (Bind Abst) u t5))) (\lambda (t5: T).(subst0 (s (Bind +Abst) (s (Flat Appl) i)) v0 t3 t5)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) +(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind Abbr) v2 t4) w2)))) (\lambda (x0: T).(\lambda (H10: (eq T x (THead +(Bind Abst) u x0))).(\lambda (H11: (subst0 (s (Bind Abst) (s (Flat Appl) i)) +v0 t3 x0)).(let H12 \def (eq_ind T x (\lambda (t: T).(eq T w1 (THead (Flat +Appl) v1 t))) H7 (THead (Bind Abst) u x0) H10) in (eq_ind_r T (THead (Flat +Appl) v1 (THead (Bind Abst) u x0)) (\lambda (t: T).(or (pr0 t (THead (Bind +Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind Abbr) v2 t4) w2))))) (or_ind (pr0 x0 t4) (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 +t4 w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead +(Bind Abst) u x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2)))) (\lambda (H13: (pr0 x0 t4)).(or_introl (pr0 (THead (Flat Appl) v1 +(THead (Bind Abst) u x0)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (pr0_beta u v1 v2 H0 x0 t4 +H13))) (\lambda (H13: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda +(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) +i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) +(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 +(THead (Bind Abst) u x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind +Abbr) v2 t4) w2)))) (\lambda (x1: T).(\lambda (H14: (pr0 x0 x1)).(\lambda +(H15: (subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 x1)).(or_intror (pr0 +(THead (Flat Appl) v1 (THead (Bind Abst) u x0)) (THead (Bind Abbr) v2 t4)) +(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 +T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u x0)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind +Abbr) v2 x1) (pr0_beta u v1 v2 H0 x0 x1 H14) (subst0_snd (Bind Abbr) v3 x1 t4 +i H15 v2)))))) H13)) (H3 v0 x0 (s (Bind Abst) (s (Flat Appl) i)) H11 v3 H5)) +w1 H12))))) H9)) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: +T).(eq T x (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 (s (Flat Appl) i) v0 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t5: T).(eq T x (THead (Bind Abst) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u u2))) +(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 +t3 t5))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 +w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq T x (THead (Bind Abst) +x0 x1))).(\lambda (_: (subst0 (s (Flat Appl) i) v0 u x0)).(\lambda (H12: +(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 x1)).(let H13 \def (eq_ind T +x (\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 t))) H7 (THead (Bind Abst) +x0 x1) H10) in (eq_ind_r T (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) +(\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2))))) (or_ind (pr0 x1 t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda +(w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead +(Flat Appl) v1 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) v2 t4)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H14: +(pr0 x1 t4)).(or_introl (pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) +(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 +(THead (Bind Abst) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind +Abbr) v2 t4) w2))) (pr0_beta x0 v1 v2 H0 x1 t4 H14))) (\lambda (H14: (ex2 T +(\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s +(Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 w2)) +(\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)) (or +(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) v2 +t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 +x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) +(\lambda (x2: T).(\lambda (H15: (pr0 x1 x2)).(\lambda (H16: (subst0 (s (Bind +Abst) (s (Flat Appl) i)) v3 t4 x2)).(or_intror (pr0 (THead (Flat Appl) v1 +(THead (Bind Abst) x0 x1)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) x0 x1)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) v2 x2) +(pr0_beta x0 v1 v2 H0 x1 x2 H15) (subst0_snd (Bind Abbr) v3 x2 t4 i H16 +v2)))))) H14)) (H3 v0 x1 (s (Bind Abst) (s (Flat Appl) i)) H12 v3 H5)) w1 +H13))))))) H9)) (subst0_gen_head (Bind Abst) v0 u t3 x (s (Flat Appl) i) +H8))))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T +w1 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 +v1 u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead +(Bind Abst) u t3) t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: +T).(eq T w1 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i v0 v1 u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat +Appl) i) v0 (THead (Bind Abst) u t3) t5))) (or (pr0 w1 (THead (Bind Abbr) v2 +t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind Abbr) v2 t4) w2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H7: (eq T w1 (THead (Flat Appl) x0 x1))).(\lambda (H8: (subst0 i v0 v1 +x0)).(\lambda (H9: (subst0 (s (Flat Appl) i) v0 (THead (Bind Abst) u t3) +x1)).(or3_ind (ex2 T (\lambda (u2: T).(eq T x1 (THead (Bind Abst) u2 t3))) +(\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u u2))) (ex2 T (\lambda (t5: +T).(eq T x1 (THead (Bind Abst) u t5))) (\lambda (t5: T).(subst0 (s (Bind +Abst) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T (\lambda (u2: T).(\lambda +(t5: T).(eq T x1 (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 (s (Flat Appl) i) v0 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5)))) (or (pr0 w1 (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H10: (ex2 T +(\lambda (u2: T).(eq T x1 (THead (Bind Abst) u2 t3))) (\lambda (u2: +T).(subst0 (s (Flat Appl) i) v0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T x1 +(THead (Bind Abst) u2 t3))) (\lambda (u2: T).(subst0 (s (Flat Appl) i) v0 u +u2)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 w1 +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda +(x: T).(\lambda (H11: (eq T x1 (THead (Bind Abst) x t3))).(\lambda (_: +(subst0 (s (Flat Appl) i) v0 u x)).(let H13 \def (eq_ind T x1 (\lambda (t: +T).(eq T w1 (THead (Flat Appl) x0 t))) H7 (THead (Bind Abst) x t3) H11) in +(eq_ind_r T (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) (\lambda (t: +T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 t w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))))) (or_ind (pr0 +x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) (THead (Bind +Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +Abst) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2)))) (\lambda (H14: (pr0 x0 v2)).(or_introl (pr0 (THead (Flat Appl) x0 +(THead (Bind Abst) x t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (pr0_beta x x0 v2 H14 t3 t4 +H2))) (\lambda (H14: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda +(w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind +Abst) x t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead +(Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind Abbr) v2 t4) w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x0 +x2)).(\lambda (H16: (subst0 i v3 v2 x2)).(or_intror (pr0 (THead (Flat Appl) +x0 (THead (Bind Abst) x t3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) x2 t4) +(pr0_beta x x0 x2 H15 t3 t4 H2) (subst0_fst v3 x2 v2 i H16 t4 (Bind +Abbr))))))) H14)) (H1 v0 x0 i H8 v3 H5)) w1 H13))))) H10)) (\lambda (H10: +(ex2 T (\lambda (t5: T).(eq T x1 (THead (Bind Abst) u t5))) (\lambda (t5: +T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5)))).(ex2_ind T (\lambda +(t5: T).(eq T x1 (THead (Bind Abst) u t5))) (\lambda (t5: T).(subst0 (s (Bind +Abst) (s (Flat Appl) i)) v0 t3 t5)) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) +(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind Abbr) v2 t4) w2)))) (\lambda (x: T).(\lambda (H11: (eq T x1 (THead +(Bind Abst) u x))).(\lambda (H12: (subst0 (s (Bind Abst) (s (Flat Appl) i)) +v0 t3 x)).(let H13 \def (eq_ind T x1 (\lambda (t: T).(eq T w1 (THead (Flat +Appl) x0 t))) H7 (THead (Bind Abst) u x) H11) in (eq_ind_r T (THead (Flat +Appl) x0 (THead (Bind Abst) u x)) (\lambda (t: T).(or (pr0 t (THead (Bind +Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind Abbr) v2 t4) w2))))) (or_ind (pr0 x t4) (ex2 T (\lambda (w2: +T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 +t4 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind +Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2)))) (\lambda (H14: (pr0 x t4)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat +Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda +(w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) w2)) (\lambda +(w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H15: (pr0 x0 +v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2))) (pr0_beta u x0 v2 H15 x t4 H14))) (\lambda (H15: (ex2 T (\lambda +(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 +(THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) +(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda +(x2: T).(\lambda (H16: (pr0 x0 x2)).(\lambda (H17: (subst0 i v3 v2 +x2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2)) (THead (Bind Abbr) x2 t4) (pr0_beta u x0 x2 H16 x t4 H14) +(subst0_fst v3 x2 v2 i H17 t4 (Bind Abbr))))))) H15)) (H1 v0 x0 i H8 v3 H5))) +(\lambda (H14: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 +(s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: +T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 +t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind +Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x x2)).(\lambda (H16: (subst0 (s +(Bind Abst) (s (Flat Appl) i)) v3 t4 x2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda +(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead +(Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H17: +(pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) +(THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 +(THead (Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind +Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 +(THead (Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind +Abbr) v2 t4) w2)) (THead (Bind Abbr) v2 x2) (pr0_beta u x0 v2 H17 x x2 H15) +(subst0_snd (Bind Abbr) v3 x2 t4 i H16 v2)))) (\lambda (H17: (ex2 T (\lambda +(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 +(THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead (Bind Abbr) v2 t4)) +(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda +(x3: T).(\lambda (H18: (pr0 x0 x3)).(\lambda (H19: (subst0 i v3 v2 +x3)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) u x)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) u x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2)) (THead (Bind Abbr) x3 x2) (pr0_beta u x0 x3 H18 x x2 H15) +(subst0_both v3 v2 x3 i H19 (Bind Abbr) t4 x2 H16)))))) H17)) (H1 v0 x0 i H8 +v3 H5))))) H14)) (H3 v0 x (s (Bind Abst) (s (Flat Appl) i)) H12 v3 H5)) w1 +H13))))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: +T).(eq T x1 (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 (s (Flat Appl) i) v0 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 t5))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t5: T).(eq T x1 (THead (Bind Abst) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u u2))) +(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 +t3 t5))) (or (pr0 w1 (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 +w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) +(\lambda (x2: T).(\lambda (x3: T).(\lambda (H11: (eq T x1 (THead (Bind Abst) +x2 x3))).(\lambda (_: (subst0 (s (Flat Appl) i) v0 u x2)).(\lambda (H13: +(subst0 (s (Bind Abst) (s (Flat Appl) i)) v0 t3 x3)).(let H14 \def (eq_ind T +x1 (\lambda (t: T).(eq T w1 (THead (Flat Appl) x0 t))) H7 (THead (Bind Abst) +x2 x3) H11) in (eq_ind_r T (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) +(\lambda (t: T).(or (pr0 t (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: +T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) +w2))))) (or_ind (pr0 x3 t4) (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda +(w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead +(Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H15: +(pr0 x3 t4)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) +(\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda (H16: (pr0 x0 +v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2))) (pr0_beta x2 x0 v2 H16 x3 t4 H15))) (\lambda (H16: (ex2 T (\lambda +(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)))).(ex2_ind T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2)) (or (pr0 +(THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) +(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda +(x: T).(\lambda (H17: (pr0 x0 x)).(\lambda (H18: (subst0 i v3 v2 +x)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2)) (THead (Bind Abbr) x t4) (pr0_beta x2 x0 x H17 x3 t4 H15) +(subst0_fst v3 x v2 i H18 t4 (Bind Abbr))))))) H16)) (H1 v0 x0 i H8 v3 H5))) +(\lambda (H15: (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 +(s (Bind Abst) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: +T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 (s (Bind Abst) (s (Flat Appl) i)) v3 +t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2)))) (\lambda (x: T).(\lambda (H16: (pr0 x3 x)).(\lambda (H17: (subst0 +(s (Bind Abst) (s (Flat Appl) i)) v3 t4 x)).(or_ind (pr0 x0 v2) (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 +(THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead (Bind Abbr) v2 t4)) +(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 t4) w2)))) (\lambda +(H18: (pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) +x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) v2 x) (pr0_beta x2 x0 v2 H18 x3 x +H16) (subst0_snd (Bind Abbr) v3 x t4 i H17 v2)))) (\lambda (H18: (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) x2 x3)) (THead +(Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind Abbr) v2 +t4) w2)))) (\lambda (x4: T).(\lambda (H19: (pr0 x0 x4)).(\lambda (H20: +(subst0 i v3 v2 x4)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind Abst) +x2 x3)) (THead (Bind Abbr) v2 t4)) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind Abbr) v2 t4) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x0 (THead (Bind Abst) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind Abbr) v2 t4) w2)) (THead (Bind Abbr) x4 x) (pr0_beta x2 x0 x4 H19 x3 x +H16) (subst0_both v3 v2 x4 i H20 (Bind Abbr) t4 x H17)))))) H18)) (H1 v0 x0 i +H8 v3 H5))))) H15)) (H3 v0 x3 (s (Bind Abst) (s (Flat Appl) i)) H13 v3 H5)) +w1 H14))))))) H10)) (subst0_gen_head (Bind Abst) v0 u t3 x1 (s (Flat Appl) i) +H9))))))) H6)) (subst0_gen_head (Flat Appl) v0 v1 (THead (Bind Abst) u t3) w1 +i H4))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b +Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H1: (pr0 v1 v2)).(\lambda +(H2: ((\forall (v3: T).(\forall (w1: T).(\forall (i: nat).((subst0 i v3 v1 +w1) \to (\forall (v4: T).((pr0 v3 v4) \to (or (pr0 w1 v2) (ex2 T (\lambda +(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v4 v2 w2)))))))))))).(\lambda +(u1: T).(\lambda (u2: T).(\lambda (H3: (pr0 u1 u2)).(\lambda (H4: ((\forall +(v3: T).(\forall (w1: T).(\forall (i: nat).((subst0 i v3 u1 w1) \to (\forall +(v4: T).((pr0 v3 v4) \to (or (pr0 w1 u2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) +(\lambda (w2: T).(subst0 i v4 u2 w2)))))))))))).(\lambda (t3: T).(\lambda +(t4: T).(\lambda (H5: (pr0 t3 t4)).(\lambda (H6: ((\forall (v3: T).(\forall +(w1: T).(\forall (i: nat).((subst0 i v3 t3 w1) \to (\forall (v4: T).((pr0 v3 +v4) \to (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v4 t4 w2)))))))))))).(\lambda (v0: T).(\lambda (w1: T).(\lambda +(i: nat).(\lambda (H7: (subst0 i v0 (THead (Flat Appl) v1 (THead (Bind b) u1 +t3)) w1)).(\lambda (v3: T).(\lambda (H8: (pr0 v0 v3)).(or3_ind (ex2 T +(\lambda (u3: T).(eq T w1 (THead (Flat Appl) u3 (THead (Bind b) u1 t3)))) +(\lambda (u3: T).(subst0 i v0 v1 u3))) (ex2 T (\lambda (t5: T).(eq T w1 +(THead (Flat Appl) v1 t5))) (\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 +(THead (Bind b) u1 t3) t5))) (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq +T w1 (THead (Flat Appl) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i +v0 v1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 +(THead (Bind b) u1 t3) t5)))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda +(w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4)) w2)))) (\lambda (H9: (ex2 T (\lambda (u3: T).(eq T w1 (THead (Flat Appl) +u3 (THead (Bind b) u1 t3)))) (\lambda (u3: T).(subst0 i v0 v1 u3)))).(ex2_ind +T (\lambda (u3: T).(eq T w1 (THead (Flat Appl) u3 (THead (Bind b) u1 t3)))) +(\lambda (u3: T).(subst0 i v0 v1 u3)) (or (pr0 w1 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda (H10: (eq T w1 (THead (Flat +Appl) x (THead (Bind b) u1 t3)))).(\lambda (H11: (subst0 i v0 v1 +x)).(eq_ind_r T (THead (Flat Appl) x (THead (Bind b) u1 t3)) (\lambda (t: +T).(or (pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) +(ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x +v2) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2))) (or (pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (H12: (pr0 x v2)).(or_introl (pr0 (THead (Flat Appl) x (THead (Bind +b) u1 t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 +T (\lambda (w2: T).(pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2))) (pr0_upsilon b H0 x v2 H12 u1 u2 H3 t3 t4 H5))) (\lambda +(H12: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x0: T).(\lambda (H13: (pr0 x x0)).(\lambda (H14: (subst0 i v3 v2 +x0)).(or_intror (pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x (THead (Bind b) u1 t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x (THead (Bind b) +u1 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O x0) t4)) (pr0_upsilon b H0 x x0 H13 u1 u2 H3 t3 t4 H5) (subst0_snd +(Bind b) v3 (THead (Flat Appl) (lift (S O) O x0) t4) (THead (Flat Appl) (lift +(S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x0) (lift (S O) O v2) (s (Bind +b) i) (subst0_lift_ge_s v2 x0 v3 i H14 O (le_O_n i) b) t4 (Flat Appl)) +u2)))))) H12)) (H2 v0 x i H11 v3 H8)) w1 H10)))) H9)) (\lambda (H9: (ex2 T +(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: +T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) u1 t3) t5)))).(ex2_ind T +(\lambda (t5: T).(eq T w1 (THead (Flat Appl) v1 t5))) (\lambda (t5: +T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) u1 t3) t5)) (or (pr0 w1 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda +(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda (H10: (eq +T w1 (THead (Flat Appl) v1 x))).(\lambda (H11: (subst0 (s (Flat Appl) i) v0 +(THead (Bind b) u1 t3) x)).(or3_ind (ex2 T (\lambda (u3: T).(eq T x (THead +(Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (ex2 +T (\lambda (t5: T).(eq T x (THead (Bind b) u1 t5))) (\lambda (t5: T).(subst0 +(s (Bind b) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T (\lambda (u3: +T).(\lambda (t5: T).(eq T x (THead (Bind b) u3 t5)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)))) (or +(pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H12: (ex2 T +(\lambda (u3: T).(eq T x (THead (Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s +(Flat Appl) i) v0 u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq T x (THead (Bind +b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 u1 u3)) (or (pr0 w1 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda +(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x0: T).(\lambda (H13: (eq +T x (THead (Bind b) x0 t3))).(\lambda (H14: (subst0 (s (Flat Appl) i) v0 u1 +x0)).(let H15 \def (eq_ind T x (\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 +t))) H10 (THead (Bind b) x0 t3) H13) in (eq_ind_r T (THead (Flat Appl) v1 +(THead (Bind b) x0 t3)) (\lambda (t: T).(or (pr0 t (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2))))) (or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 +w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2))) (or (pr0 (THead +(Flat Appl) v1 (THead (Bind b) x0 t3)) (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 +(THead (Bind b) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H16: (pr0 x0 +u2)).(or_introl (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 t3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (pr0_upsilon b H0 v1 v2 H1 x0 u2 H16 t3 t4 H5))) (\lambda (H16: (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 +u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 +(s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) +x0 t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 t3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (x1: T).(\lambda (H17: (pr0 x0 x1)).(\lambda +(H18: (subst0 (s (Flat Appl) i) v3 u2 x1)).(or_intror (pr0 (THead (Flat Appl) +v1 (THead (Bind b) x0 t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) +O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind +b) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead +(Flat Appl) v1 (THead (Bind b) x0 t3)) w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead +(Bind b) x1 (THead (Flat Appl) (lift (S O) O v2) t4)) (pr0_upsilon b H0 v1 v2 +H1 x0 x1 H17 t3 t4 H5) (subst0_fst v3 x1 u2 i H18 (THead (Flat Appl) (lift (S +O) O v2) t4) (Bind b))))))) H16)) (H4 v0 x0 (s (Flat Appl) i) H14 v3 H8)) w1 +H15))))) H12)) (\lambda (H12: (ex2 T (\lambda (t5: T).(eq T x (THead (Bind b) +u1 t5))) (\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 +t5)))).(ex2_ind T (\lambda (t5: T).(eq T x (THead (Bind b) u1 t5))) (\lambda +(t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)) (or (pr0 w1 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x0: T).(\lambda (H13: (eq T x +(THead (Bind b) u1 x0))).(\lambda (H14: (subst0 (s (Bind b) (s (Flat Appl) +i)) v0 t3 x0)).(let H15 \def (eq_ind T x (\lambda (t: T).(eq T w1 (THead +(Flat Appl) v1 t))) H10 (THead (Bind b) u1 x0) H13) in (eq_ind_r T (THead +(Flat Appl) v1 (THead (Bind b) u1 x0)) (\lambda (t: T).(or (pr0 t (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x0 t4) (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 +w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 x0)) (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) v1 (THead (Bind b) u1 x0)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (H16: (pr0 x0 t4)).(or_introl (pr0 (THead (Flat Appl) v1 (THead +(Bind b) u1 x0)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 +x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2))) (pr0_upsilon b H0 v1 v2 H1 u1 u2 H3 x0 t4 H16))) +(\lambda (H16: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 +(s (Bind b) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 +x0 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 w2)) +(or (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 x0)) (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) v1 (THead (Bind b) u1 x0)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x1: T).(\lambda (H17: (pr0 x0 x1)).(\lambda (H18: (subst0 (s (Bind +b) (s (Flat Appl) i)) v3 t4 x1)).(or_intror (pr0 (THead (Flat Appl) v1 (THead +(Bind b) u1 x0)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 +x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) v1 (THead (Bind b) u1 x0)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) x1)) (pr0_upsilon b H0 v1 v2 H1 u1 u2 H3 +x0 x1 H17) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) O v2) x1) +(THead (Flat Appl) (lift (S O) O v2) t4) i (subst0_snd (Flat Appl) v3 x1 t4 +(s (Bind b) i) H18 (lift (S O) O v2)) u2)))))) H16)) (H6 v0 x0 (s (Bind b) (s +(Flat Appl) i)) H14 v3 H8)) w1 H15))))) H12)) (\lambda (H12: (ex3_2 T T +(\lambda (u3: T).(\lambda (t5: T).(eq T x (THead (Bind b) u3 t5)))) (\lambda +(u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 +t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T x (THead (Bind +b) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 +u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) +v0 t3 t5))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H13: (eq T x (THead (Bind b) x0 +x1))).(\lambda (H14: (subst0 (s (Flat Appl) i) v0 u1 x0)).(\lambda (H15: +(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 x1)).(let H16 \def (eq_ind T x +(\lambda (t: T).(eq T w1 (THead (Flat Appl) v1 t))) H10 (THead (Bind b) x0 +x1) H13) in (eq_ind_r T (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) +(\lambda (t: T).(or (pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) +O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind +(pr0 x1 t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s +(Bind b) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead (Flat Appl) v1 (THead +(Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 +x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2)))) (\lambda (H17: (pr0 x1 t4)).(or_ind (pr0 x0 u2) +(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) +i) v3 u2 w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2)))) (\lambda (H18: (pr0 x0 u2)).(or_introl (pr0 (THead (Flat Appl) v1 +(THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) +x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2))) (pr0_upsilon b H0 v1 v2 H1 x0 u2 H18 x1 t4 +H17))) (\lambda (H18: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 (s (Flat Appl) i) v3 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 +w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead +(Flat Appl) v1 (THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 +(THead (Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda +(H19: (pr0 x0 x2)).(\lambda (H20: (subst0 (s (Flat Appl) i) v3 u2 +x2)).(or_intror (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind +b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x2 (THead (Flat Appl) (lift +(S O) O v2) t4)) (pr0_upsilon b H0 v1 v2 H1 x0 x2 H19 x1 t4 H17) (subst0_fst +v3 x2 u2 i H20 (THead (Flat Appl) (lift (S O) O v2) t4) (Bind b))))))) H18)) +(H4 v0 x0 (s (Flat Appl) i) H14 v3 H8))) (\lambda (H17: (ex2 T (\lambda (w2: +T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s +(Bind b) (s (Flat Appl) i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) v1 (THead +(Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 +x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H18: (pr0 x1 +x2)).(\lambda (H19: (subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 x2)).(or_ind +(pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s +(Flat Appl) i) v3 u2 w2))) (or (pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 +x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (H20: (pr0 x0 u2)).(or_intror (pr0 (THead (Flat +Appl) v1 (THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead +(Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) x2)) (pr0_upsilon b H0 v1 v2 +H1 x0 u2 H20 x1 x2 H18) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S +O) O v2) x2) (THead (Flat Appl) (lift (S O) O v2) t4) i (subst0_snd (Flat +Appl) v3 x2 t4 (s (Bind b) i) H19 (lift (S O) O v2)) u2)))) (\lambda (H20: +(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) +i) v3 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 (s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) v1 (THead +(Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 +x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2)))) (\lambda (x3: T).(\lambda (H21: (pr0 x0 +x3)).(\lambda (H22: (subst0 (s (Flat Appl) i) v3 u2 x3)).(or_intror (pr0 +(THead (Flat Appl) v1 (THead (Bind b) x0 x1)) (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) +v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) v1 (THead (Bind b) x0 x1)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2)) (THead (Bind b) x3 (THead (Flat Appl) (lift (S O) O v2) x2)) +(pr0_upsilon b H0 v1 v2 H1 x0 x3 H21 x1 x2 H18) (subst0_both v3 u2 x3 i H22 +(Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat Appl) (lift (S +O) O v2) x2) (subst0_snd (Flat Appl) v3 x2 t4 (s (Bind b) i) H19 (lift (S O) +O v2)))))))) H20)) (H4 v0 x0 (s (Flat Appl) i) H14 v3 H8))))) H17)) (H6 v0 x1 +(s (Bind b) (s (Flat Appl) i)) H15 v3 H8)) w1 H16))))))) H12)) +(subst0_gen_head (Bind b) v0 u1 t3 x (s (Flat Appl) i) H11))))) H9)) (\lambda +(H9: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead (Flat Appl) +u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v0 v1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) u1 t3) +t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead +(Flat Appl) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v0 v1 u3))) +(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Flat Appl) i) v0 (THead (Bind b) +u1 t3) t5))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H10: (eq T w1 (THead (Flat Appl) x0 +x1))).(\lambda (H11: (subst0 i v0 v1 x0)).(\lambda (H12: (subst0 (s (Flat +Appl) i) v0 (THead (Bind b) u1 t3) x1)).(or3_ind (ex2 T (\lambda (u3: T).(eq +T x1 (THead (Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 +u1 u3))) (ex2 T (\lambda (t5: T).(eq T x1 (THead (Bind b) u1 t5))) (\lambda +(t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5))) (ex3_2 T T +(\lambda (u3: T).(\lambda (t5: T).(eq T x1 (THead (Bind b) u3 t5)))) (\lambda +(u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)))) (or +(pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H13: (ex2 T +(\lambda (u3: T).(eq T x1 (THead (Bind b) u3 t3))) (\lambda (u3: T).(subst0 +(s (Flat Appl) i) v0 u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq T x1 (THead +(Bind b) u3 t3))) (\lambda (u3: T).(subst0 (s (Flat Appl) i) v0 u1 u3)) (or +(pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda +(H14: (eq T x1 (THead (Bind b) x t3))).(\lambda (H15: (subst0 (s (Flat Appl) +i) v0 u1 x)).(let H16 \def (eq_ind T x1 (\lambda (t: T).(eq T w1 (THead (Flat +Appl) x0 t))) H10 (THead (Bind b) x t3) H14) in (eq_ind_r T (THead (Flat +Appl) x0 (THead (Bind b) x t3)) (\lambda (t: T).(or (pr0 t (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x u2) (ex2 T (\lambda (w2: +T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2))) (or +(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H17: +(pr0 x u2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda +(w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) +x t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (H18: (pr0 x0 v2)).(or_introl (pr0 (THead (Flat +Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) w2))) (pr0_upsilon b H0 x0 v2 H18 x u2 H17 +t3 t4 H5))) (\lambda (H18: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda +(w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x +t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H19: (pr0 x0 x2)).(\lambda +(H20: (subst0 i v3 v2 x2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind +b) x t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 +T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 +(THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O x2) t4)) (pr0_upsilon b H0 x0 x2 H19 x u2 H17 t3 t4 +H5) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) O x2) t4) (THead +(Flat Appl) (lift (S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x2) (lift (S +O) O v2) (s (Bind b) i) (subst0_lift_ge_s v2 x2 v3 i H20 O (le_O_n i) b) t4 +(Flat Appl)) u2)))))) H18)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H17: (ex2 T +(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s +(Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x +t3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H18: (pr0 x x2)).(\lambda +(H19: (subst0 (s (Flat Appl) i) v3 u2 x2)).(or_ind (pr0 x0 v2) (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 +(THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) +x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H20: (pr0 x0 +v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x2 (THead (Flat Appl) (lift +(S O) O v2) t4)) (pr0_upsilon b H0 x0 v2 H20 x x2 H18 t3 t4 H5) (subst0_fst +v3 x2 u2 i H19 (THead (Flat Appl) (lift (S O) O v2) t4) (Bind b))))) (\lambda +(H20: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x3: T).(\lambda (H21: (pr0 x0 x3)).(\lambda (H22: (subst0 i v3 v2 +x3)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x t3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) x t3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x2 (THead (Flat Appl) (lift +(S O) O x3) t4)) (pr0_upsilon b H0 x0 x3 H21 x x2 H18 t3 t4 H5) (subst0_both +v3 u2 x2 i H19 (Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat +Appl) (lift (S O) O x3) t4) (subst0_fst v3 (lift (S O) O x3) (lift (S O) O +v2) (s (Bind b) i) (subst0_lift_ge_s v2 x3 v3 i H22 O (le_O_n i) b) t4 (Flat +Appl)))))))) H20)) (H2 v0 x0 i H11 v3 H8))))) H17)) (H4 v0 x (s (Flat Appl) +i) H15 v3 H8)) w1 H16))))) H13)) (\lambda (H13: (ex2 T (\lambda (t5: T).(eq T +x1 (THead (Bind b) u1 t5))) (\lambda (t5: T).(subst0 (s (Bind b) (s (Flat +Appl) i)) v0 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq T x1 (THead (Bind b) +u1 t5))) (\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 t5)) +(or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) +(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (x: +T).(\lambda (H14: (eq T x1 (THead (Bind b) u1 x))).(\lambda (H15: (subst0 (s +(Bind b) (s (Flat Appl) i)) v0 t3 x)).(let H16 \def (eq_ind T x1 (\lambda (t: +T).(eq T w1 (THead (Flat Appl) x0 t))) H10 (THead (Bind b) u1 x) H14) in +(eq_ind_r T (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (\lambda (t: T).(or +(pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind (pr0 x t4) (ex2 T +(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat +Appl) i)) v3 t4 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda +(w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2)))) (\lambda (H17: (pr0 x t4)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat +Appl) x0 (THead (Bind b) u1 x)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H18: (pr0 x0 +v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (pr0_upsilon b H0 x0 v2 H18 u1 u2 H3 x t4 H17))) (\lambda (H18: (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x2: T).(\lambda (H19: (pr0 x0 x2)).(\lambda (H20: (subst0 i v3 v2 +x2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O x2) t4)) (pr0_upsilon b H0 x0 x2 H19 u1 u2 H3 x t4 H17) (subst0_snd +(Bind b) v3 (THead (Flat Appl) (lift (S O) O x2) t4) (THead (Flat Appl) (lift +(S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x2) (lift (S O) O v2) (s (Bind +b) i) (subst0_lift_ge_s v2 x2 v3 i H20 O (le_O_n i) b) t4 (Flat Appl)) +u2)))))) H18)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H17: (ex2 T (\lambda (w2: +T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s +(Bind b) (s (Flat Appl) i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead +(Bind b) u1 x)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) +(ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) +w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2)))) (\lambda (x2: T).(\lambda (H18: (pr0 x +x2)).(\lambda (H19: (subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 x2)).(or_ind +(pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i +v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2)))) (\lambda (H20: (pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 +(THead (Bind b) u1 x)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) +u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead +(Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) x2)) (pr0_upsilon b H0 x0 v2 +H20 u1 u2 H3 x x2 H18) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) +O v2) x2) (THead (Flat Appl) (lift (S O) O v2) t4) i (subst0_snd (Flat Appl) +v3 x2 t4 (s (Bind b) i) H19 (lift (S O) O v2)) u2)))) (\lambda (H20: (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x3: T).(\lambda (H21: (pr0 x0 x3)).(\lambda (H22: (subst0 i v3 v2 +x3)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) u1 x)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) u1 x)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O x3) x2)) (pr0_upsilon b H0 x0 x3 H21 u1 u2 H3 x x2 H18) (subst0_snd +(Bind b) v3 (THead (Flat Appl) (lift (S O) O x3) x2) (THead (Flat Appl) (lift +(S O) O v2) t4) i (subst0_both v3 (lift (S O) O v2) (lift (S O) O x3) (s +(Bind b) i) (subst0_lift_ge_s v2 x3 v3 i H22 O (le_O_n i) b) (Flat Appl) t4 +x2 H19) u2)))))) H20)) (H2 v0 x0 i H11 v3 H8))))) H17)) (H6 v0 x (s (Bind b) +(s (Flat Appl) i)) H15 v3 H8)) w1 H16))))) H13)) (\lambda (H13: (ex3_2 T T +(\lambda (u3: T).(\lambda (t5: T).(eq T x1 (THead (Bind b) u3 t5)))) (\lambda +(u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) v0 u1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 +t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T x1 (THead +(Bind b) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s (Flat Appl) i) +v0 u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind b) (s (Flat +Appl) i)) v0 t3 t5))) (or (pr0 w1 (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T x1 (THead (Bind +b) x2 x3))).(\lambda (H15: (subst0 (s (Flat Appl) i) v0 u1 x2)).(\lambda +(H16: (subst0 (s (Bind b) (s (Flat Appl) i)) v0 t3 x3)).(let H17 \def (eq_ind +T x1 (\lambda (t: T).(eq T w1 (THead (Flat Appl) x0 t))) H10 (THead (Bind b) +x2 x3) H14) in (eq_ind_r T (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) +(\lambda (t: T).(or (pr0 t (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) +O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v3 +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))))) (or_ind +(pr0 x3 t4) (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 (s +(Bind b) (s (Flat Appl) i)) v3 t4 w2))) (or (pr0 (THead (Flat Appl) x0 (THead +(Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 +x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2)))) (\lambda (H18: (pr0 x3 t4)).(or_ind (pr0 x2 u2) +(ex2 T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) +i) v3 u2 w2))) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2)))) (\lambda (H19: (pr0 x2 u2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat +Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead +(Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H20: (pr0 x0 +v2)).(or_introl (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (pr0_upsilon b H0 x0 v2 H20 x2 u2 H19 x3 t4 H18))) (\lambda (H20: (ex2 +T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind +b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x: T).(\lambda (H21: (pr0 x0 x)).(\lambda (H22: (subst0 i v3 v2 +x)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O x) t4)) (pr0_upsilon b H0 x0 x H21 x2 u2 H19 x3 t4 H18) (subst0_snd +(Bind b) v3 (THead (Flat Appl) (lift (S O) O x) t4) (THead (Flat Appl) (lift +(S O) O v2) t4) i (subst0_fst v3 (lift (S O) O x) (lift (S O) O v2) (s (Bind +b) i) (subst0_lift_ge_s v2 x v3 i H22 O (le_O_n i) b) t4 (Flat Appl)) +u2)))))) H20)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H19: (ex2 T (\lambda (w2: +T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s +(Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 +x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (x: T).(\lambda (H20: (pr0 x2 x)).(\lambda +(H21: (subst0 (s (Flat Appl) i) v3 u2 x)).(or_ind (pr0 x0 v2) (ex2 T (\lambda +(w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead +(Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 +(THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H22: (pr0 x0 +v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x (THead (Flat Appl) (lift +(S O) O v2) t4)) (pr0_upsilon b H0 x0 v2 H22 x2 x H20 x3 t4 H18) (subst0_fst +v3 x u2 i H21 (THead (Flat Appl) (lift (S O) O v2) t4) (Bind b))))) (\lambda +(H22: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind +b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x4: T).(\lambda (H23: (pr0 x0 x4)).(\lambda (H24: (subst0 i v3 v2 +x4)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x (THead (Flat Appl) (lift +(S O) O x4) t4)) (pr0_upsilon b H0 x0 x4 H23 x2 x H20 x3 t4 H18) (subst0_both +v3 u2 x i H21 (Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat +Appl) (lift (S O) O x4) t4) (subst0_fst v3 (lift (S O) O x4) (lift (S O) O +v2) (s (Bind b) i) (subst0_lift_ge_s v2 x4 v3 i H24 O (le_O_n i) b) t4 (Flat +Appl)))))))) H22)) (H2 v0 x0 i H11 v3 H8))))) H19)) (H4 v0 x2 (s (Flat Appl) +i) H15 v3 H8))) (\lambda (H18: (ex2 T (\lambda (w2: T).(pr0 x3 w2)) (\lambda +(w2: T).(subst0 (s (Bind b) (s (Flat Appl) i)) v3 t4 w2)))).(ex2_ind T +(\lambda (w2: T).(pr0 x3 w2)) (\lambda (w2: T).(subst0 (s (Bind b) (s (Flat +Appl) i)) v3 t4 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) +(THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda +(w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2)))) (\lambda (x: T).(\lambda (H19: (pr0 x3 x)).(\lambda (H20: (subst0 (s +(Bind b) (s (Flat Appl) i)) v3 t4 x)).(or_ind (pr0 x2 u2) (ex2 T (\lambda +(w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) i) v3 u2 w2))) +(or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (H21: (pr0 x2 u2)).(or_ind (pr0 x0 v2) (ex2 T (\lambda (w2: T).(pr0 +x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) (or (pr0 (THead (Flat Appl) x0 +(THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) +x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)))) (\lambda (H22: (pr0 x0 v2)).(or_intror +(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2))) (ex_intro2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +x)) (pr0_upsilon b H0 x0 v2 H22 x2 u2 H21 x3 x H19) (subst0_snd (Bind b) v3 +(THead (Flat Appl) (lift (S O) O v2) x) (THead (Flat Appl) (lift (S O) O v2) +t4) i (subst0_snd (Flat Appl) v3 x t4 (s (Bind b) i) H20 (lift (S O) O v2)) +u2)))) (\lambda (H22: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 i v3 v2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda +(w2: T).(subst0 i v3 v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) +x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2)))) (\lambda (x4: T).(\lambda (H23: (pr0 x0 x4)).(\lambda +(H24: (subst0 i v3 v2 x4)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind +b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 +T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) +(\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S +O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 +(THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O x4) x)) (pr0_upsilon b H0 x0 x4 H23 x2 u2 H21 x3 x +H19) (subst0_snd (Bind b) v3 (THead (Flat Appl) (lift (S O) O x4) x) (THead +(Flat Appl) (lift (S O) O v2) t4) i (subst0_both v3 (lift (S O) O v2) (lift +(S O) O x4) (s (Bind b) i) (subst0_lift_ge_s v2 x4 v3 i H24 O (le_O_n i) b) +(Flat Appl) t4 x H20) u2)))))) H22)) (H2 v0 x0 i H11 v3 H8))) (\lambda (H21: +(ex2 T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: T).(subst0 (s (Flat Appl) +i) v3 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x2 w2)) (\lambda (w2: +T).(subst0 (s (Flat Appl) i) v3 u2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead +(Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 +x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2)))) (\lambda (x4: T).(\lambda (H22: (pr0 x2 +x4)).(\lambda (H23: (subst0 (s (Flat Appl) i) v3 u2 x4)).(or_ind (pr0 x0 v2) +(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 w2))) +(or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (H24: (pr0 x0 v2)).(or_intror (pr0 (THead (Flat Appl) x0 (THead +(Bind b) x2 x3)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +t4))) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 +x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t4)) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat +Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x4 +(THead (Flat Appl) (lift (S O) O v2) x)) (pr0_upsilon b H0 x0 v2 H24 x2 x4 +H22 x3 x H19) (subst0_both v3 u2 x4 i H23 (Bind b) (THead (Flat Appl) (lift +(S O) O v2) t4) (THead (Flat Appl) (lift (S O) O v2) x) (subst0_snd (Flat +Appl) v3 x t4 (s (Bind b) i) H20 (lift (S O) O v2)))))) (\lambda (H24: (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 v2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v3 +v2 w2)) (or (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead (Bind +b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i +v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) w2)))) +(\lambda (x5: T).(\lambda (H25: (pr0 x0 x5)).(\lambda (H26: (subst0 i v3 v2 +x5)).(or_intror (pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4))) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Appl) x0 (THead (Bind b) x2 x3)) w2)) (\lambda (w2: +T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) +w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Appl) x0 (THead (Bind +b) x2 x3)) w2)) (\lambda (w2: T).(subst0 i v3 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t4)) w2)) (THead (Bind b) x4 (THead (Flat Appl) (lift +(S O) O x5) x)) (pr0_upsilon b H0 x0 x5 H25 x2 x4 H22 x3 x H19) (subst0_both +v3 u2 x4 i H23 (Bind b) (THead (Flat Appl) (lift (S O) O v2) t4) (THead (Flat +Appl) (lift (S O) O x5) x) (subst0_both v3 (lift (S O) O v2) (lift (S O) O +x5) (s (Bind b) i) (subst0_lift_ge_s v2 x5 v3 i H26 O (le_O_n i) b) (Flat +Appl) t4 x H20))))))) H24)) (H2 v0 x0 i H11 v3 H8))))) H21)) (H4 v0 x2 (s +(Flat Appl) i) H15 v3 H8))))) H18)) (H6 v0 x3 (s (Bind b) (s (Flat Appl) i)) +H16 v3 H8)) w1 H17))))))) H13)) (subst0_gen_head (Bind b) v0 u1 t3 x1 (s +(Flat Appl) i) H12))))))) H9)) (subst0_gen_head (Flat Appl) v0 v1 (THead +(Bind b) u1 t3) w1 i H7)))))))))))))))))))))) (\lambda (u1: T).(\lambda (u2: +T).(\lambda (H0: (pr0 u1 u2)).(\lambda (H1: ((\forall (v1: T).(\forall (w1: +T).(\forall (i: nat).((subst0 i v1 u1 w1) \to (\forall (v2: T).((pr0 v1 v2) +\to (or (pr0 w1 u2) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 u2 w2)))))))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(H2: (pr0 t3 t4)).(\lambda (H3: ((\forall (v1: T).(\forall (w1: T).(\forall +(i: nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) \to (or (pr0 +w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 +w2)))))))))))).(\lambda (w: T).(\lambda (H4: (subst0 O u2 t4 w)).(\lambda +(v1: T).(\lambda (w1: T).(\lambda (i: nat).(\lambda (H5: (subst0 i v1 (THead +(Bind Abbr) u1 t3) w1)).(\lambda (v2: T).(\lambda (H6: (pr0 v1 v2)).(or3_ind +(ex2 T (\lambda (u3: T).(eq T w1 (THead (Bind Abbr) u3 t3))) (\lambda (u3: +T).(subst0 i v1 u1 u3))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind Abbr) +u1 t5))) (\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5))) (ex3_2 T T +(\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead (Bind Abbr) u3 t5)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i v1 u1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5)))) (or (pr0 w1 (THead +(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H7: (ex2 T (\lambda +(u3: T).(eq T w1 (THead (Bind Abbr) u3 t3))) (\lambda (u3: T).(subst0 i v1 u1 +u3)))).(ex2_ind T (\lambda (u3: T).(eq T w1 (THead (Bind Abbr) u3 t3))) +(\lambda (u3: T).(subst0 i v1 u1 u3)) (or (pr0 w1 (THead (Bind Abbr) u2 w)) +(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 (THead +(Bind Abbr) u2 w) w2)))) (\lambda (x: T).(\lambda (H8: (eq T w1 (THead (Bind +Abbr) x t3))).(\lambda (H9: (subst0 i v1 u1 x)).(eq_ind_r T (THead (Bind +Abbr) x t3) (\lambda (t: T).(or (pr0 t (THead (Bind Abbr) u2 w)) (ex2 T +(\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) +u2 w) w2))))) (or_ind (pr0 x u2) (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda +(w2: T).(subst0 i v2 u2 w2))) (or (pr0 (THead (Bind Abbr) x t3) (THead (Bind +Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H10: +(pr0 x u2)).(or_introl (pr0 (THead (Bind Abbr) x t3) (THead (Bind Abbr) u2 +w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) (\lambda (w2: +T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (pr0_delta x u2 H10 t3 t4 H2 w +H4))) (\lambda (H10: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: +T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda +(w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead (Bind Abbr) x t3) (THead (Bind +Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x0: +T).(\lambda (H11: (pr0 x x0)).(\lambda (H12: (subst0 i v2 u2 x0)).(ex2_ind T +(\lambda (t: T).(subst0 O x0 t4 t)) (\lambda (t: T).(subst0 (S (plus i O)) v2 +w t)) (or (pr0 (THead (Bind Abbr) x t3) (THead (Bind Abbr) u2 w)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x1: T).(\lambda (H13: (subst0 +O x0 t4 x1)).(\lambda (H14: (subst0 (S (plus i O)) v2 w x1)).(let H15 \def +(f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in +(let H16 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n v2 w +x1)) H14 (S i) H15) in (or_intror (pr0 (THead (Bind Abbr) x t3) (THead (Bind +Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) x t3) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) x0 x1) (pr0_delta x x0 +H11 t3 t4 H2 x1 H13) (subst0_both v2 u2 x0 i H12 (Bind Abbr) w x1 H16)))))))) +(subst0_subst0_back t4 w u2 O H4 x0 v2 i H12))))) H10)) (H1 v1 x i H9 v2 H6)) +w1 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind +Abbr) u1 t5))) (\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 +t5)))).(ex2_ind T (\lambda (t5: T).(eq T w1 (THead (Bind Abbr) u1 t5))) +(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5)) (or (pr0 w1 (THead +(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x: T).(\lambda (H8: +(eq T w1 (THead (Bind Abbr) u1 x))).(\lambda (H9: (subst0 (s (Bind Abbr) i) +v1 t3 x)).(eq_ind_r T (THead (Bind Abbr) u1 x) (\lambda (t: T).(or (pr0 t +(THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: +T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))))) (or_ind (pr0 x t4) (ex2 T +(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) i) v2 t4 +w2))) (or (pr0 (THead (Bind Abbr) u1 x) (THead (Bind Abbr) u2 w)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 x) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H10: (pr0 x t4)).(or_introl +(pr0 (THead (Bind Abbr) u1 x) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: +T).(pr0 (THead (Bind Abbr) u1 x) w2)) (\lambda (w2: T).(subst0 i v2 (THead +(Bind Abbr) u2 w) w2))) (pr0_delta u1 u2 H0 x t4 H10 w H4))) (\lambda (H10: +(ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) +i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: +T).(subst0 (s (Bind Abbr) i) v2 t4 w2)) (or (pr0 (THead (Bind Abbr) u1 x) +(THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 +x) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) +(\lambda (x0: T).(\lambda (H11: (pr0 x x0)).(\lambda (H12: (subst0 (s (Bind +Abbr) i) v2 t4 x0)).(ex2_ind T (\lambda (t: T).(subst0 O u2 x0 t)) (\lambda +(t: T).(subst0 (s (Bind Abbr) i) v2 w t)) (or (pr0 (THead (Bind Abbr) u1 x) +(THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 +x) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) +(\lambda (x1: T).(\lambda (H13: (subst0 O u2 x0 x1)).(\lambda (H14: (subst0 +(s (Bind Abbr) i) v2 w x1)).(or_intror (pr0 (THead (Bind Abbr) u1 x) (THead +(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 x) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) u1 x) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) u2 x1) (pr0_delta u1 u2 +H0 x x0 H11 x1 H13) (subst0_snd (Bind Abbr) v2 x1 w i H14 u2)))))) +(subst0_confluence_neq t4 x0 v2 (s (Bind Abbr) i) H12 w u2 O H4 (sym_not_eq +nat O (S i) (O_S i))))))) H10)) (H3 v1 x (s (Bind Abbr) i) H9 v2 H6)) w1 +H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T +w1 (THead (Bind Abbr) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v1 +u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 +t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T w1 (THead +(Bind Abbr) u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v1 u1 u3))) +(\lambda (_: T).(\lambda (t5: T).(subst0 (s (Bind Abbr) i) v1 t3 t5))) (or +(pr0 w1 (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H8: (eq T w1 (THead (Bind Abbr) x0 +x1))).(\lambda (H9: (subst0 i v1 u1 x0)).(\lambda (H10: (subst0 (s (Bind +Abbr) i) v1 t3 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or +(pr0 t (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda +(w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))))) (or_ind (pr0 x1 t4) +(ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) +i) v2 t4 w2))) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) +(ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: +T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H11: (pr0 x1 +t4)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 i v2 u2 w2))) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind +Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (H12: +(pr0 x0 u2)).(or_introl (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 +w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: +T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (pr0_delta x0 u2 H12 x1 t4 H11 +w H4))) (\lambda (H12: (ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: +T).(subst0 i v2 u2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda +(w2: T).(subst0 i v2 u2 w2)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind +Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x: +T).(\lambda (H13: (pr0 x0 x)).(\lambda (H14: (subst0 i v2 u2 x)).(ex2_ind T +(\lambda (t: T).(subst0 O x t4 t)) (\lambda (t: T).(subst0 (S (plus i O)) v2 +w t)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x2: T).(\lambda (H15: (subst0 +O x t4 x2)).(\lambda (H16: (subst0 (S (plus i O)) v2 w x2)).(let H17 \def +(f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in +(let H18 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n v2 w +x2)) H16 (S i) H17) in (or_intror (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind +Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) x x2) (pr0_delta x0 x +H13 x1 t4 H11 x2 H15) (subst0_both v2 u2 x i H14 (Bind Abbr) w x2 H18)))))))) +(subst0_subst0_back t4 w u2 O H4 x v2 i H14))))) H12)) (H1 v1 x0 i H9 v2 +H6))) (\lambda (H11: (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: +T).(subst0 (s (Bind Abbr) i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 +w2)) (\lambda (w2: T).(subst0 (s (Bind Abbr) i) v2 t4 w2)) (or (pr0 (THead +(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 +(THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind +Abbr) u2 w) w2)))) (\lambda (x: T).(\lambda (H12: (pr0 x1 x)).(\lambda (H13: +(subst0 (s (Bind Abbr) i) v2 t4 x)).(or_ind (pr0 x0 u2) (ex2 T (\lambda (w2: +T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 w2))) (or (pr0 (THead (Bind +Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead +(Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 +w) w2)))) (\lambda (H14: (pr0 x0 u2)).(ex2_ind T (\lambda (t: T).(subst0 O u2 +x t)) (\lambda (t: T).(subst0 (s (Bind Abbr) i) v2 w t)) (or (pr0 (THead +(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 +(THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind +Abbr) u2 w) w2)))) (\lambda (x2: T).(\lambda (H15: (subst0 O u2 x +x2)).(\lambda (H16: (subst0 (s (Bind Abbr) i) v2 w x2)).(or_intror (pr0 +(THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: +T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead +(Bind Abbr) u2 w) w2))) (ex_intro2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) +x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)) +(THead (Bind Abbr) u2 x2) (pr0_delta x0 u2 H14 x1 x H12 x2 H15) (subst0_snd +(Bind Abbr) v2 x2 w i H16 u2)))))) (subst0_confluence_neq t4 x v2 (s (Bind +Abbr) i) H13 w u2 O H4 (sym_not_eq nat O (S i) (O_S i))))) (\lambda (H14: +(ex2 T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 u2 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 +u2 w2)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x0 +x2)).(\lambda (H16: (subst0 i v2 u2 x2)).(ex2_ind T (\lambda (t: T).(subst0 O +x2 t4 t)) (\lambda (t: T).(subst0 (S (plus i O)) v2 w t)) (or (pr0 (THead +(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 +(THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind +Abbr) u2 w) w2)))) (\lambda (x3: T).(\lambda (H17: (subst0 O x2 t4 +x3)).(\lambda (H18: (subst0 (S (plus i O)) v2 w x3)).(let H19 \def (f_equal +nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H20 +\def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n v2 w x3)) H18 (S +i) H19) in (ex2_ind T (\lambda (t: T).(subst0 (s (Bind Abbr) i) v2 x3 t)) +(\lambda (t: T).(subst0 O x2 x t)) (or (pr0 (THead (Bind Abbr) x0 x1) (THead +(Bind Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) +w2)) (\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2)))) (\lambda +(x4: T).(\lambda (H21: (subst0 (s (Bind Abbr) i) v2 x3 x4)).(\lambda (H22: +(subst0 O x2 x x4)).(or_intror (pr0 (THead (Bind Abbr) x0 x1) (THead (Bind +Abbr) u2 w)) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 (THead (Bind Abbr) u2 w) w2))) (ex_intro2 T +(\lambda (w2: T).(pr0 (THead (Bind Abbr) x0 x1) w2)) (\lambda (w2: T).(subst0 +i v2 (THead (Bind Abbr) u2 w) w2)) (THead (Bind Abbr) x2 x4) (pr0_delta x0 x2 +H15 x1 x H12 x4 H22) (subst0_both v2 u2 x2 i H16 (Bind Abbr) w x4 +(subst0_trans x3 w v2 (s (Bind Abbr) i) H20 x4 H21))))))) +(subst0_confluence_neq t4 x3 x2 O H17 x v2 (s (Bind Abbr) i) H13 (O_S +i)))))))) (subst0_subst0_back t4 w u2 O H4 x2 v2 i H16))))) H14)) (H1 v1 x0 i +H9 v2 H6))))) H11)) (H3 v1 x1 (s (Bind Abbr) i) H10 v2 H6)) w1 H8)))))) H7)) +(subst0_gen_head (Bind Abbr) v1 u1 t3 w1 i H5)))))))))))))))))) (\lambda (b: +B).(\lambda (H0: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (H1: (pr0 t3 t4)).(\lambda (H2: ((\forall (v1: T).(\forall (w1: +T).(\forall (i: nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) +\to (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)))))))))))).(\lambda (u: T).(\lambda (v1: T).(\lambda +(w1: T).(\lambda (i: nat).(\lambda (H3: (subst0 i v1 (THead (Bind b) u (lift +(S O) O t3)) w1)).(\lambda (v2: T).(\lambda (H4: (pr0 v1 v2)).(or3_ind (ex2 T +(\lambda (u2: T).(eq T w1 (THead (Bind b) u2 (lift (S O) O t3)))) (\lambda +(u2: T).(subst0 i v1 u u2))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind b) +u t5))) (\lambda (t5: T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T w1 (THead (Bind b) u2 +t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5)))) (or +(pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i +v2 t4 w2)))) (\lambda (H5: (ex2 T (\lambda (u2: T).(eq T w1 (THead (Bind b) +u2 (lift (S O) O t3)))) (\lambda (u2: T).(subst0 i v1 u u2)))).(ex2_ind T +(\lambda (u2: T).(eq T w1 (THead (Bind b) u2 (lift (S O) O t3)))) (\lambda +(u2: T).(subst0 i v1 u u2)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 +w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H6: +(eq T w1 (THead (Bind b) x (lift (S O) O t3)))).(\lambda (_: (subst0 i v1 u +x)).(eq_ind_r T (THead (Bind b) x (lift (S O) O t3)) (\lambda (t: T).(or (pr0 +t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 +w2))))) (or_introl (pr0 (THead (Bind b) x (lift (S O) O t3)) t4) (ex2 T +(\lambda (w2: T).(pr0 (THead (Bind b) x (lift (S O) O t3)) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2))) (pr0_zeta b H0 t3 t4 H1 x)) w1 H6)))) H5)) (\lambda +(H5: (ex2 T (\lambda (t5: T).(eq T w1 (THead (Bind b) u t5))) (\lambda (t5: +T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5)))).(ex2_ind T (\lambda +(t5: T).(eq T w1 (THead (Bind b) u t5))) (\lambda (t5: T).(subst0 (s (Bind b) +i) v1 (lift (S O) O t3) t5)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 +w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H6: +(eq T w1 (THead (Bind b) u x))).(\lambda (H7: (subst0 (s (Bind b) i) v1 (lift +(S O) O t3) x)).(lt_le_e (s (Bind b) i) (S O) (or (pr0 w1 t4) (ex2 T (\lambda +(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (H8: +(lt (s (Bind b) i) (S O))).(subst0_gen_lift_false t3 v1 x (S O) O (s (Bind b) +i) (le_O_n (s (Bind b) i)) H8 H7 (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 +w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))))) (\lambda (Hle: (le (S O) (s +(Bind b) i))).(let H_x \def (subst0_gen_lift_ge v1 t3 x (s (Bind b) i) (S O) +O H7 Hle) in (let H8 \def H_x in (ex2_ind T (\lambda (t5: T).(eq T x (lift (S +O) O t5))) (\lambda (t5: T).(subst0 (minus i O) v1 t3 t5)) (or (pr0 w1 t4) +(ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) +(\lambda (x0: T).(\lambda (H9: (eq T x (lift (S O) O x0))).(\lambda (H10: +(subst0 (minus i O) v1 t3 x0)).(let H11 \def (eq_ind T x (\lambda (t: T).(eq +T w1 (THead (Bind b) u t))) H6 (lift (S O) O x0) H9) in (eq_ind_r T (THead +(Bind b) u (lift (S O) O x0)) (\lambda (t: T).(or (pr0 t t4) (ex2 T (\lambda +(w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))))) (let H12 \def +(eq_ind_r nat (minus i O) (\lambda (n: nat).(subst0 n v1 t3 x0)) H10 i +(minus_n_O i)) in (or_ind (pr0 x0 t4) (ex2 T (\lambda (w2: T).(pr0 x0 w2)) +(\lambda (w2: T).(subst0 i v2 t4 w2))) (or (pr0 (THead (Bind b) u (lift (S O) +O x0)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) +w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (H13: (pr0 x0 +t4)).(or_introl (pr0 (THead (Bind b) u (lift (S O) O x0)) t4) (ex2 T (\lambda +(w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2))) (pr0_zeta b H0 x0 t4 H13 u))) (\lambda (H13: (ex2 T +(\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 t4 +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x0 w2)) (\lambda (w2: T).(subst0 i v2 +t4 w2)) (or (pr0 (THead (Bind b) u (lift (S O) O x0)) t4) (ex2 T (\lambda +(w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)))) (\lambda (x1: T).(\lambda (H14: (pr0 x0 +x1)).(\lambda (H15: (subst0 i v2 t4 x1)).(or_intror (pr0 (THead (Bind b) u +(lift (S O) O x0)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) u (lift +(S O) O x0)) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (ex_intro2 T +(\lambda (w2: T).(pr0 (THead (Bind b) u (lift (S O) O x0)) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)) x1 (pr0_zeta b H0 x0 x1 H14 u) H15))))) H13)) (H2 v1 +x0 i H12 v2 H4))) w1 H11))))) H8)))))))) H5)) (\lambda (H5: (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T w1 (THead (Bind b) u2 t5)))) (\lambda +(u2: T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t5: T).(eq T w1 (THead (Bind b) u2 t5)))) (\lambda +(u2: T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Bind b) i) v1 (lift (S O) O t3) t5))) (or (pr0 w1 t4) (ex2 T +(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T w1 (THead (Bind b) x0 +x1))).(\lambda (_: (subst0 i v1 u x0)).(\lambda (H8: (subst0 (s (Bind b) i) +v1 (lift (S O) O t3) x1)).(lt_le_e (s (Bind b) i) (S O) (or (pr0 w1 t4) (ex2 +T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) +(\lambda (H9: (lt (s (Bind b) i) (S O))).(subst0_gen_lift_false t3 v1 x1 (S +O) O (s (Bind b) i) (le_O_n (s (Bind b) i)) H9 H8 (or (pr0 w1 t4) (ex2 T +(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))))) +(\lambda (Hle: (le (S O) (s (Bind b) i))).(let H_x \def (subst0_gen_lift_ge +v1 t3 x1 (s (Bind b) i) (S O) O H8 Hle) in (let H9 \def H_x in (ex2_ind T +(\lambda (t5: T).(eq T x1 (lift (S O) O t5))) (\lambda (t5: T).(subst0 (minus +i O) v1 t3 t5)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda +(w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H10: (eq T x1 (lift +(S O) O x))).(\lambda (H11: (subst0 (minus i O) v1 t3 x)).(let H12 \def +(eq_ind T x1 (\lambda (t: T).(eq T w1 (THead (Bind b) x0 t))) H6 (lift (S O) +O x) H10) in (eq_ind_r T (THead (Bind b) x0 (lift (S O) O x)) (\lambda (t: +T).(or (pr0 t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2))))) (let H13 \def (eq_ind_r nat (minus i O) (\lambda +(n: nat).(subst0 n v1 t3 x)) H11 i (minus_n_O i)) in (or_ind (pr0 x t4) (ex2 +T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (or +(pr0 (THead (Bind b) x0 (lift (S O) O x)) t4) (ex2 T (\lambda (w2: T).(pr0 +(THead (Bind b) x0 (lift (S O) O x)) w2)) (\lambda (w2: T).(subst0 i v2 t4 +w2)))) (\lambda (H14: (pr0 x t4)).(or_introl (pr0 (THead (Bind b) x0 (lift (S +O) O x)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) x0 (lift (S O) O +x)) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (pr0_zeta b H0 x t4 H14 x0))) +(\lambda (H14: (ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 i +v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 +i v2 t4 w2)) (or (pr0 (THead (Bind b) x0 (lift (S O) O x)) t4) (ex2 T +(\lambda (w2: T).(pr0 (THead (Bind b) x0 (lift (S O) O x)) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)))) (\lambda (x2: T).(\lambda (H15: (pr0 x +x2)).(\lambda (H16: (subst0 i v2 t4 x2)).(or_intror (pr0 (THead (Bind b) x0 +(lift (S O) O x)) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Bind b) x0 (lift +(S O) O x)) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (ex_intro2 T (\lambda +(w2: T).(pr0 (THead (Bind b) x0 (lift (S O) O x)) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)) x2 (pr0_zeta b H0 x x2 H15 x0) H16))))) H14)) (H2 v1 +x i H13 v2 H4))) w1 H12))))) H9)))))))))) H5)) (subst0_gen_head (Bind b) v1 u +(lift (S O) O t3) w1 i H3))))))))))))))) (\lambda (t3: T).(\lambda (t4: +T).(\lambda (H0: (pr0 t3 t4)).(\lambda (H1: ((\forall (v1: T).(\forall (w1: +T).(\forall (i: nat).((subst0 i v1 t3 w1) \to (\forall (v2: T).((pr0 v1 v2) +\to (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)))))))))))).(\lambda (u: T).(\lambda (v1: T).(\lambda +(w1: T).(\lambda (i: nat).(\lambda (H2: (subst0 i v1 (THead (Flat Cast) u t3) +w1)).(\lambda (v2: T).(\lambda (H3: (pr0 v1 v2)).(or3_ind (ex2 T (\lambda +(u2: T).(eq T w1 (THead (Flat Cast) u2 t3))) (\lambda (u2: T).(subst0 i v1 u +u2))) (ex2 T (\lambda (t5: T).(eq T w1 (THead (Flat Cast) u t5))) (\lambda +(t5: T).(subst0 (s (Flat Cast) i) v1 t3 t5))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T w1 (THead (Flat Cast) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Flat Cast) i) v1 t3 t5)))) (or (pr0 w1 t4) (ex2 T (\lambda +(w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (H4: +(ex2 T (\lambda (u2: T).(eq T w1 (THead (Flat Cast) u2 t3))) (\lambda (u2: +T).(subst0 i v1 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T w1 (THead (Flat +Cast) u2 t3))) (\lambda (u2: T).(subst0 i v1 u u2)) (or (pr0 w1 t4) (ex2 T +(\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) +(\lambda (x: T).(\lambda (H5: (eq T w1 (THead (Flat Cast) x t3))).(\lambda +(_: (subst0 i v1 u x)).(eq_ind_r T (THead (Flat Cast) x t3) (\lambda (t: +T).(or (pr0 t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2))))) (or_introl (pr0 (THead (Flat Cast) x t3) t4) (ex2 +T (\lambda (w2: T).(pr0 (THead (Flat Cast) x t3) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2))) (pr0_tau t3 t4 H0 x)) w1 H5)))) H4)) (\lambda (H4: +(ex2 T (\lambda (t5: T).(eq T w1 (THead (Flat Cast) u t5))) (\lambda (t5: +T).(subst0 (s (Flat Cast) i) v1 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq T +w1 (THead (Flat Cast) u t5))) (\lambda (t5: T).(subst0 (s (Flat Cast) i) v1 +t3 t5)) (or (pr0 w1 t4) (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H5: (eq T w1 (THead (Flat +Cast) u x))).(\lambda (H6: (subst0 (s (Flat Cast) i) v1 t3 x)).(eq_ind_r T +(THead (Flat Cast) u x) (\lambda (t: T).(or (pr0 t t4) (ex2 T (\lambda (w2: +T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))))) (or_ind (pr0 x t4) +(ex2 T (\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Cast) +i) v2 t4 w2))) (or (pr0 (THead (Flat Cast) u x) t4) (ex2 T (\lambda (w2: +T).(pr0 (THead (Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) +(\lambda (H7: (pr0 x t4)).(or_introl (pr0 (THead (Flat Cast) u x) t4) (ex2 T +(\lambda (w2: T).(pr0 (THead (Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i +v2 t4 w2))) (pr0_tau x t4 H7 u))) (\lambda (H7: (ex2 T (\lambda (w2: T).(pr0 +x w2)) (\lambda (w2: T).(subst0 (s (Flat Cast) i) v2 t4 w2)))).(ex2_ind T +(\lambda (w2: T).(pr0 x w2)) (\lambda (w2: T).(subst0 (s (Flat Cast) i) v2 t4 +w2)) (or (pr0 (THead (Flat Cast) u x) t4) (ex2 T (\lambda (w2: T).(pr0 (THead +(Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x0: +T).(\lambda (H8: (pr0 x x0)).(\lambda (H9: (subst0 (s (Flat Cast) i) v2 t4 +x0)).(or_intror (pr0 (THead (Flat Cast) u x) t4) (ex2 T (\lambda (w2: T).(pr0 +(THead (Flat Cast) u x) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) +(ex_intro2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) u x) w2)) (\lambda (w2: +T).(subst0 i v2 t4 w2)) x0 (pr0_tau x x0 H8 u) H9))))) H7)) (H1 v1 x (s (Flat +Cast) i) H6 v2 H3)) w1 H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T w1 (THead (Flat Cast) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Flat Cast) i) v1 t3 t5))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t5: T).(eq T w1 (THead (Flat Cast) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i v1 u u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s (Flat Cast) i) v1 t3 t5))) (or (pr0 w1 t4) (ex2 T (\lambda (w2: +T).(pr0 w1 w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H5: (eq T w1 (THead (Flat Cast) x0 +x1))).(\lambda (_: (subst0 i v1 u x0)).(\lambda (H7: (subst0 (s (Flat Cast) +i) v1 t3 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t: T).(or (pr0 +t t4) (ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst0 i v2 t4 +w2))))) (or_ind (pr0 x1 t4) (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda +(w2: T).(subst0 (s (Flat Cast) i) v2 t4 w2))) (or (pr0 (THead (Flat Cast) x0 +x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) x0 x1) w2)) (\lambda +(w2: T).(subst0 i v2 t4 w2)))) (\lambda (H8: (pr0 x1 t4)).(or_introl (pr0 +(THead (Flat Cast) x0 x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) +x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (pr0_tau x1 t4 H8 x0))) +(\lambda (H8: (ex2 T (\lambda (w2: T).(pr0 x1 w2)) (\lambda (w2: T).(subst0 +(s (Flat Cast) i) v2 t4 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 x1 w2)) +(\lambda (w2: T).(subst0 (s (Flat Cast) i) v2 t4 w2)) (or (pr0 (THead (Flat +Cast) x0 x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) x0 x1) w2)) +(\lambda (w2: T).(subst0 i v2 t4 w2)))) (\lambda (x: T).(\lambda (H9: (pr0 x1 +x)).(\lambda (H10: (subst0 (s (Flat Cast) i) v2 t4 x)).(or_intror (pr0 (THead +(Flat Cast) x0 x1) t4) (ex2 T (\lambda (w2: T).(pr0 (THead (Flat Cast) x0 x1) +w2)) (\lambda (w2: T).(subst0 i v2 t4 w2))) (ex_intro2 T (\lambda (w2: +T).(pr0 (THead (Flat Cast) x0 x1) w2)) (\lambda (w2: T).(subst0 i v2 t4 w2)) +x (pr0_tau x1 x H9 x0) H10))))) H8)) (H1 v1 x1 (s (Flat Cast) i) H7 v2 H3)) +w1 H5)))))) H4)) (subst0_gen_head (Flat Cast) v1 u t3 w1 i H2))))))))))))) t1 +t2 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst1.ma new file mode 100644 index 000000000..4026d1552 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr0/subst1.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/subst0.ma". + +include "basic_1A/subst1/fwd.ma". + +lemma pr0_delta1: + \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: T).(\forall +(t2: T).((pr0 t1 t2) \to (\forall (w: T).((subst1 O u2 t2 w) \to (pr0 (THead +(Bind Abbr) u1 t1) (THead (Bind Abbr) u2 w))))))))) +\def + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u1 u2)).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H0: (pr0 t1 t2)).(\lambda (w: T).(\lambda (H1: +(subst1 O u2 t2 w)).(subst1_ind O u2 t2 (\lambda (t: T).(pr0 (THead (Bind +Abbr) u1 t1) (THead (Bind Abbr) u2 t))) (pr0_comp u1 u2 H t1 t2 H0 (Bind +Abbr)) (\lambda (t0: T).(\lambda (H2: (subst0 O u2 t2 t0)).(pr0_delta u1 u2 H +t1 t2 H0 t0 H2))) w H1)))))))). + +lemma pr0_subst1_back: + \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst1 +i u2 t1 t2) \to (\forall (u1: T).((pr0 u1 u2) \to (ex2 T (\lambda (t: +T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t2))))))))) +\def + \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u2 t1 t2)).(subst1_ind i u2 t1 (\lambda (t: T).(\forall (u1: +T).((pr0 u1 u2) \to (ex2 T (\lambda (t0: T).(subst1 i u1 t1 t0)) (\lambda +(t0: T).(pr0 t0 t)))))) (\lambda (u1: T).(\lambda (_: (pr0 u1 u2)).(ex_intro2 +T (\lambda (t: T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t1)) t1 +(subst1_refl i u1 t1) (pr0_refl t1)))) (\lambda (t0: T).(\lambda (H0: (subst0 +i u2 t1 t0)).(\lambda (u1: T).(\lambda (H1: (pr0 u1 u2)).(ex2_ind T (\lambda +(t: T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t t0)) (ex2 T (\lambda (t: +T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t0))) (\lambda (x: T).(\lambda +(H2: (subst0 i u1 t1 x)).(\lambda (H3: (pr0 x t0)).(ex_intro2 T (\lambda (t: +T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t t0)) x (subst1_single i u1 t1 x +H2) H3)))) (pr0_subst0_back u2 t1 t0 i H0 u1 H1)))))) t2 H))))). + +lemma pr0_subst1_fwd: + \forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (i: nat).((subst1 +i u2 t1 t2) \to (\forall (u1: T).((pr0 u2 u1) \to (ex2 T (\lambda (t: +T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t2 t))))))))) +\def + \lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u2 t1 t2)).(subst1_ind i u2 t1 (\lambda (t: T).(\forall (u1: +T).((pr0 u2 u1) \to (ex2 T (\lambda (t0: T).(subst1 i u1 t1 t0)) (\lambda +(t0: T).(pr0 t t0)))))) (\lambda (u1: T).(\lambda (_: (pr0 u2 u1)).(ex_intro2 +T (\lambda (t: T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t1 t)) t1 +(subst1_refl i u1 t1) (pr0_refl t1)))) (\lambda (t0: T).(\lambda (H0: (subst0 +i u2 t1 t0)).(\lambda (u1: T).(\lambda (H1: (pr0 u2 u1)).(ex2_ind T (\lambda +(t: T).(subst0 i u1 t1 t)) (\lambda (t: T).(pr0 t0 t)) (ex2 T (\lambda (t: +T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t0 t))) (\lambda (x: T).(\lambda +(H2: (subst0 i u1 t1 x)).(\lambda (H3: (pr0 t0 x)).(ex_intro2 T (\lambda (t: +T).(subst1 i u1 t1 t)) (\lambda (t: T).(pr0 t0 t)) x (subst1_single i u1 t1 x +H2) H3)))) (pr0_subst0_fwd u2 t1 t0 i H0 u1 H1)))))) t2 H))))). + +theorem pr0_subst1: + \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (v1: T).(\forall +(w1: T).(\forall (i: nat).((subst1 i v1 t1 w1) \to (\forall (v2: T).((pr0 v1 +v2) \to (ex2 T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v2 t2 +w2))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(\lambda (v1: +T).(\lambda (w1: T).(\lambda (i: nat).(\lambda (H0: (subst1 i v1 t1 +w1)).(subst1_ind i v1 t1 (\lambda (t: T).(\forall (v2: T).((pr0 v1 v2) \to +(ex2 T (\lambda (w2: T).(pr0 t w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)))))) +(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(ex_intro2 T (\lambda (w2: T).(pr0 +t1 w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)) t2 H (subst1_refl i v2 t2)))) +(\lambda (t0: T).(\lambda (H1: (subst0 i v1 t1 t0)).(\lambda (v2: T).(\lambda +(H2: (pr0 v1 v2)).(or_ind (pr0 t0 t2) (ex2 T (\lambda (w2: T).(pr0 t0 w2)) +(\lambda (w2: T).(subst0 i v2 t2 w2))) (ex2 T (\lambda (w2: T).(pr0 t0 w2)) +(\lambda (w2: T).(subst1 i v2 t2 w2))) (\lambda (H3: (pr0 t0 t2)).(ex_intro2 +T (\lambda (w2: T).(pr0 t0 w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)) t2 H3 +(subst1_refl i v2 t2))) (\lambda (H3: (ex2 T (\lambda (w2: T).(pr0 t0 w2)) +(\lambda (w2: T).(subst0 i v2 t2 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t0 +w2)) (\lambda (w2: T).(subst0 i v2 t2 w2)) (ex2 T (\lambda (w2: T).(pr0 t0 +w2)) (\lambda (w2: T).(subst1 i v2 t2 w2))) (\lambda (x: T).(\lambda (H4: +(pr0 t0 x)).(\lambda (H5: (subst0 i v2 t2 x)).(ex_intro2 T (\lambda (w2: +T).(pr0 t0 w2)) (\lambda (w2: T).(subst1 i v2 t2 w2)) x H4 (subst1_single i +v2 t2 x H5))))) H3)) (pr0_subst0 t1 t2 H v1 t0 i H1 v2 H2)))))) w1 H0))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/defs.ma new file mode 100644 index 000000000..cdd942ddd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/defs.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/defs.ma". + +inductive pr1: T \to (T \to Prop) \def +| pr1_refl: \forall (t: T).(pr1 t t) +| pr1_sing: \forall (t2: T).(\forall (t1: T).((pr0 t1 t2) \to (\forall (t3: +T).((pr1 t2 t3) \to (pr1 t1 t3))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/fwd.ma new file mode 100644 index 000000000..1dd22f17f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/fwd.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr1/defs.ma". + +implied rec lemma pr1_ind (P: (T \to (T \to Prop))) (f: (\forall (t: T).(P t +t))) (f0: (\forall (t2: T).(\forall (t1: T).((pr0 t1 t2) \to (\forall (t3: +T).((pr1 t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) (t: T) (t0: T) (p: pr1 t +t0) on p: P t t0 \def match p with [(pr1_refl t1) \Rightarrow (f t1) | +(pr1_sing t2 t1 p0 t3 p1) \Rightarrow (f0 t2 t1 p0 t3 p1 ((pr1_ind P f f0) t2 +t3 p1))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr1/pr1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/pr1.ma new file mode 100644 index 000000000..84590146c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/pr1.ma @@ -0,0 +1,64 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr1/props.ma". + +include "basic_1A/pr0/pr0.ma". + +lemma pr1_strip: + \forall (t0: T).(\forall (t1: T).((pr1 t0 t1) \to (\forall (t2: T).((pr0 t0 +t2) \to (ex2 T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr1 t0 t1)).(pr1_ind (\lambda +(t: T).(\lambda (t2: T).(\forall (t3: T).((pr0 t t3) \to (ex2 T (\lambda (t4: +T).(pr1 t2 t4)) (\lambda (t4: T).(pr1 t3 t4))))))) (\lambda (t: T).(\lambda +(t2: T).(\lambda (H0: (pr0 t t2)).(ex_intro2 T (\lambda (t3: T).(pr1 t t3)) +(\lambda (t3: T).(pr1 t2 t3)) t2 (pr1_pr0 t t2 H0) (pr1_refl t2))))) (\lambda +(t2: T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t2)).(\lambda (t4: T).(\lambda +(_: (pr1 t2 t4)).(\lambda (H2: ((\forall (t5: T).((pr0 t2 t5) \to (ex2 T +(\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))))))).(\lambda (t5: +T).(\lambda (H3: (pr0 t3 t5)).(ex2_ind T (\lambda (t: T).(pr0 t5 t)) (\lambda +(t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 +t))) (\lambda (x: T).(\lambda (H4: (pr0 t5 x)).(\lambda (H5: (pr0 t2 x)).(let +H6 \def (H2 x H5) in (ex2_ind T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: +T).(pr1 x t)) (ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))) +(\lambda (x0: T).(\lambda (H7: (pr1 t4 x0)).(\lambda (H8: (pr1 x +x0)).(ex_intro2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t)) x0 +H7 (pr1_t x t5 (pr1_pr0 t5 x H4) x0 H8))))) H6))))) (pr0_confluence t3 t5 H3 +t2 H0)))))))))) t0 t1 H))). + +theorem pr1_confluence: + \forall (t0: T).(\forall (t1: T).((pr1 t0 t1) \to (\forall (t2: T).((pr1 t0 +t2) \to (ex2 T (\lambda (t: T).(pr1 t1 t)) (\lambda (t: T).(pr1 t2 t))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr1 t0 t1)).(pr1_ind (\lambda +(t: T).(\lambda (t2: T).(\forall (t3: T).((pr1 t t3) \to (ex2 T (\lambda (t4: +T).(pr1 t2 t4)) (\lambda (t4: T).(pr1 t3 t4))))))) (\lambda (t: T).(\lambda +(t2: T).(\lambda (H0: (pr1 t t2)).(ex_intro2 T (\lambda (t3: T).(pr1 t t3)) +(\lambda (t3: T).(pr1 t2 t3)) t2 H0 (pr1_refl t2))))) (\lambda (t2: +T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t2)).(\lambda (t4: T).(\lambda (_: +(pr1 t2 t4)).(\lambda (H2: ((\forall (t5: T).((pr1 t2 t5) \to (ex2 T (\lambda +(t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))))))).(\lambda (t5: T).(\lambda +(H3: (pr1 t3 t5)).(let H_x \def (pr1_strip t3 t5 H3 t2 H0) in (let H4 \def +H_x in (ex2_ind T (\lambda (t: T).(pr1 t5 t)) (\lambda (t: T).(pr1 t2 t)) +(ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t))) (\lambda (x: +T).(\lambda (H5: (pr1 t5 x)).(\lambda (H6: (pr1 t2 x)).(let H_x0 \def (H2 x +H6) in (let H7 \def H_x0 in (ex2_ind T (\lambda (t: T).(pr1 t4 t)) (\lambda +(t: T).(pr1 x t)) (ex2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 +t))) (\lambda (x0: T).(\lambda (H8: (pr1 t4 x0)).(\lambda (H9: (pr1 x +x0)).(ex_intro2 T (\lambda (t: T).(pr1 t4 t)) (\lambda (t: T).(pr1 t5 t)) x0 +H8 (pr1_t x t5 H5 x0 H9))))) H7)))))) H4))))))))))) t0 t1 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr1/props.ma new file mode 100644 index 000000000..496e650ba --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr1/props.ma @@ -0,0 +1,108 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr1/fwd.ma". + +include "basic_1A/pr0/subst1.ma". + +include "basic_1A/subst1/props.ma". + +include "basic_1A/T/props.ma". + +lemma pr1_pr0: + \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr1 t1 t2))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(pr1_sing t2 t1 H +t2 (pr1_refl t2)))). + +theorem pr1_t: + \forall (t2: T).(\forall (t1: T).((pr1 t1 t2) \to (\forall (t3: T).((pr1 t2 +t3) \to (pr1 t1 t3))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda +(t: T).(\lambda (t0: T).(\forall (t3: T).((pr1 t0 t3) \to (pr1 t t3))))) +(\lambda (t: T).(\lambda (t3: T).(\lambda (H0: (pr1 t t3)).H0))) (\lambda +(t0: T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t0)).(\lambda (t4: T).(\lambda +(_: (pr1 t0 t4)).(\lambda (H2: ((\forall (t5: T).((pr1 t4 t5) \to (pr1 t0 +t5))))).(\lambda (t5: T).(\lambda (H3: (pr1 t4 t5)).(pr1_sing t0 t3 H0 t5 (H2 +t5 H3)))))))))) t1 t2 H))). + +lemma pr1_head_1: + \forall (u1: T).(\forall (u2: T).((pr1 u1 u2) \to (\forall (t: T).(\forall +(k: K).(pr1 (THead k u1 t) (THead k u2 t)))))) +\def + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr1 u1 u2)).(\lambda (t: +T).(\lambda (k: K).(pr1_ind (\lambda (t0: T).(\lambda (t1: T).(pr1 (THead k +t0 t) (THead k t1 t)))) (\lambda (t0: T).(pr1_refl (THead k t0 t))) (\lambda +(t2: T).(\lambda (t1: T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t3: T).(\lambda +(_: (pr1 t2 t3)).(\lambda (H2: (pr1 (THead k t2 t) (THead k t3 t))).(pr1_sing +(THead k t2 t) (THead k t1 t) (pr0_comp t1 t2 H0 t t (pr0_refl t) k) (THead k +t3 t) H2))))))) u1 u2 H))))). + +lemma pr1_head_2: + \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (u: T).(\forall +(k: K).(pr1 (THead k u t1) (THead k u t2)))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(\lambda (u: +T).(\lambda (k: K).(pr1_ind (\lambda (t: T).(\lambda (t0: T).(pr1 (THead k u +t) (THead k u t0)))) (\lambda (t: T).(pr1_refl (THead k u t))) (\lambda (t0: +T).(\lambda (t3: T).(\lambda (H0: (pr0 t3 t0)).(\lambda (t4: T).(\lambda (_: +(pr1 t0 t4)).(\lambda (H2: (pr1 (THead k u t0) (THead k u t4))).(pr1_sing +(THead k u t0) (THead k u t3) (pr0_comp u u (pr0_refl u) t3 t0 H0 k) (THead k +u t4) H2))))))) t1 t2 H))))). + +theorem pr1_comp: + \forall (v: T).(\forall (w: T).((pr1 v w) \to (\forall (t: T).(\forall (u: +T).((pr1 t u) \to (\forall (k: K).(pr1 (THead k v t) (THead k w u)))))))) +\def + \lambda (v: T).(\lambda (w: T).(\lambda (H: (pr1 v w)).(pr1_ind (\lambda (t: +T).(\lambda (t0: T).(\forall (t1: T).(\forall (u: T).((pr1 t1 u) \to (\forall +(k: K).(pr1 (THead k t t1) (THead k t0 u)))))))) (\lambda (t: T).(\lambda +(t0: T).(\lambda (u: T).(\lambda (H0: (pr1 t0 u)).(\lambda (k: K).(pr1_head_2 +t0 u H0 t k)))))) (\lambda (t2: T).(\lambda (t1: T).(\lambda (H0: (pr0 t1 +t2)).(\lambda (t3: T).(\lambda (H1: (pr1 t2 t3)).(\lambda (_: ((\forall (t: +T).(\forall (u: T).((pr1 t u) \to (\forall (k: K).(pr1 (THead k t2 t) (THead +k t3 u)))))))).(\lambda (t: T).(\lambda (u: T).(\lambda (H3: (pr1 t +u)).(\lambda (k: K).(pr1_ind (\lambda (t0: T).(\lambda (t4: T).(pr1 (THead k +t1 t0) (THead k t3 t4)))) (\lambda (t0: T).(pr1_head_1 t1 t3 (pr1_sing t2 t1 +H0 t3 H1) t0 k)) (\lambda (t0: T).(\lambda (t4: T).(\lambda (H4: (pr0 t4 +t0)).(\lambda (t5: T).(\lambda (_: (pr1 t0 t5)).(\lambda (H6: (pr1 (THead k +t1 t0) (THead k t3 t5))).(pr1_sing (THead k t1 t0) (THead k t1 t4) (pr0_comp +t1 t1 (pr0_refl t1) t4 t0 H4 k) (THead k t3 t5) H6))))))) t u H3))))))))))) v +w H))). + +lemma pr1_eta: + \forall (w: T).(\forall (u: T).(let t \def (THead (Bind Abst) w u) in +(\forall (v: T).((pr1 v w) \to (pr1 (THead (Bind Abst) v (THead (Flat Appl) +(TLRef O) (lift (S O) O t))) t))))) +\def + \lambda (w: T).(\lambda (u: T).(let t \def (THead (Bind Abst) w u) in +(\lambda (v: T).(\lambda (H: (pr1 v w)).(eq_ind_r T (THead (Bind Abst) (lift +(S O) O w) (lift (S O) (S O) u)) (\lambda (t0: T).(pr1 (THead (Bind Abst) v +(THead (Flat Appl) (TLRef O) t0)) (THead (Bind Abst) w u))) (pr1_comp v w H +(THead (Flat Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) +(S O) u))) u (pr1_sing (THead (Bind Abbr) (TLRef O) (lift (S O) (S O) u)) +(THead (Flat Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) +(S O) u))) (pr0_beta (lift (S O) O w) (TLRef O) (TLRef O) (pr0_refl (TLRef +O)) (lift (S O) (S O) u) (lift (S O) (S O) u) (pr0_refl (lift (S O) (S O) +u))) u (pr1_sing (THead (Bind Abbr) (TLRef O) (lift (S O) O u)) (THead (Bind +Abbr) (TLRef O) (lift (S O) (S O) u)) (pr0_delta1 (TLRef O) (TLRef O) +(pr0_refl (TLRef O)) (lift (S O) (S O) u) (lift (S O) (S O) u) (pr0_refl +(lift (S O) (S O) u)) (lift (S O) O u) (subst1_lift_S u O O (le_O_n O))) u +(pr1_pr0 (THead (Bind Abbr) (TLRef O) (lift (S O) O u)) u (pr0_zeta Abbr +not_abbr_abst u u (pr0_refl u) (TLRef O))))) (Bind Abst)) (lift (S O) O +(THead (Bind Abst) w u)) (lift_bind Abst w u (S O) O)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr2/clen.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/clen.ma new file mode 100644 index 000000000..7c9747ec9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/clen.ma @@ -0,0 +1,151 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr2/props.ma". + +include "basic_1A/clen/getl.ma". + +lemma pr2_gen_ctail: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall +(t2: T).((pr2 (CTail k u c) t1 t2) \to (or (pr2 c t1 t2) (ex3 T (\lambda (_: +T).(eq K k (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(subst0 +(clen c) u t t2))))))))) +\def + \lambda (k: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (H: (pr2 (CTail k u c) t1 t2)).(insert_eq C (CTail k u c) +(\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(or (pr2 c t1 t2) (ex3 T +(\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda +(t: T).(subst0 (clen c) u t t2))))) (\lambda (y: C).(\lambda (H0: (pr2 y t1 +t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 +(CTail k u c)) \to (or (pr2 c t t0) (ex3 T (\lambda (_: T).(eq K k (Bind +Abbr))) (\lambda (t3: T).(pr0 t t3)) (\lambda (t3: T).(subst0 (clen c) u t3 +t0)))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: +(pr0 t3 t4)).(\lambda (_: (eq C c0 (CTail k u c))).(or_introl (pr2 c t3 t4) +(ex3 T (\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t: T).(pr0 t3 t)) +(\lambda (t: T).(subst0 (clen c) u t t4))) (pr2_free c t3 t4 H1))))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda +(H1: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: (subst0 i u0 t4 +t)).(\lambda (H4: (eq C c0 (CTail k u c))).(let H5 \def (eq_ind C c0 (\lambda +(c1: C).(getl i c1 (CHead d (Bind Abbr) u0))) H1 (CTail k u c) H4) in (let +H_x \def (getl_gen_tail k Abbr u u0 d c i H5) in (let H6 \def H_x in (or_ind +(ex2 C (\lambda (e: C).(eq C d (CTail k u e))) (\lambda (e: C).(getl i c +(CHead e (Bind Abbr) u0)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) +(\lambda (_: nat).(eq K k (Bind Abbr))) (\lambda (_: nat).(eq T u u0)) +(\lambda (n: nat).(eq C d (CSort n)))) (or (pr2 c t3 t) (ex3 T (\lambda (_: +T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: +T).(subst0 (clen c) u t0 t)))) (\lambda (H7: (ex2 C (\lambda (e: C).(eq C d +(CTail k u e))) (\lambda (e: C).(getl i c (CHead e (Bind Abbr) +u0))))).(ex2_ind C (\lambda (e: C).(eq C d (CTail k u e))) (\lambda (e: +C).(getl i c (CHead e (Bind Abbr) u0))) (or (pr2 c t3 t) (ex3 T (\lambda (_: +T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: +T).(subst0 (clen c) u t0 t)))) (\lambda (x: C).(\lambda (_: (eq C d (CTail k +u x))).(\lambda (H9: (getl i c (CHead x (Bind Abbr) u0))).(or_introl (pr2 c +t3 t) (ex3 T (\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 +t0)) (\lambda (t0: T).(subst0 (clen c) u t0 t))) (pr2_delta c x u0 i H9 t3 t4 +H2 t H3))))) H7)) (\lambda (H7: (ex4 nat (\lambda (_: nat).(eq nat i (clen +c))) (\lambda (_: nat).(eq K k (Bind Abbr))) (\lambda (_: nat).(eq T u u0)) +(\lambda (n: nat).(eq C d (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq +nat i (clen c))) (\lambda (_: nat).(eq K k (Bind Abbr))) (\lambda (_: +nat).(eq T u u0)) (\lambda (n: nat).(eq C d (CSort n))) (or (pr2 c t3 t) (ex3 +T (\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t0: T).(pr0 t3 t0)) +(\lambda (t0: T).(subst0 (clen c) u t0 t)))) (\lambda (x0: nat).(\lambda (H8: +(eq nat i (clen c))).(\lambda (H9: (eq K k (Bind Abbr))).(\lambda (H10: (eq T +u u0)).(\lambda (_: (eq C d (CSort x0))).(let H12 \def (eq_ind nat i (\lambda +(n: nat).(subst0 n u0 t4 t)) H3 (clen c) H8) in (let H13 \def (eq_ind_r T u0 +(\lambda (t0: T).(subst0 (clen c) t0 t4 t)) H12 u H10) in (eq_ind_r K (Bind +Abbr) (\lambda (k0: K).(or (pr2 c t3 t) (ex3 T (\lambda (_: T).(eq K k0 (Bind +Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: T).(subst0 (clen c) u t0 +t))))) (or_intror (pr2 c t3 t) (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind +Abbr))) (\lambda (t0: T).(pr0 t3 t0)) (\lambda (t0: T).(subst0 (clen c) u t0 +t))) (ex3_intro T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda +(t0: T).(pr0 t3 t0)) (\lambda (t0: T).(subst0 (clen c) u t0 t)) t4 +(refl_equal K (Bind Abbr)) H2 H13)) k H9)))))))) H7)) H6))))))))))))))) y t1 +t2 H0))) H)))))). + +lemma pr2_gen_cbind: + \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall +(t2: T).((pr2 (CHead c (Bind b) v) t1 t2) \to (pr2 c (THead (Bind b) v t1) +(THead (Bind b) v t2))))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (H: (pr2 (CHead c (Bind b) v) t1 t2)).(insert_eq C (CHead c +(Bind b) v) (\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c (THead +(Bind b) v t1) (THead (Bind b) v t2))) (\lambda (y: C).(\lambda (H0: (pr2 y +t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 +(CHead c (Bind b) v)) \to (pr2 c (THead (Bind b) v t) (THead (Bind b) v +t0)))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: +(pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Bind b) v))).(pr2_free c (THead +(Bind b) v t3) (THead (Bind b) v t4) (pr0_comp v v (pr0_refl v) t3 t4 H1 +(Bind b)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: +(subst0 i u t4 t)).(\lambda (H4: (eq C c0 (CHead c (Bind b) v))).(let H5 \def +(eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) u))) H1 (CHead +c (Bind b) v) H4) in (let H_x \def (getl_gen_bind b c (CHead d (Bind Abbr) u) +v i H5) in (let H6 \def H_x in (or_ind (land (eq nat i O) (eq C (CHead d +(Bind Abbr) u) (CHead c (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat i (S +j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u)))) (pr2 c (THead +(Bind b) v t3) (THead (Bind b) v t)) (\lambda (H7: (land (eq nat i O) (eq C +(CHead d (Bind Abbr) u) (CHead c (Bind b) v)))).(land_ind (eq nat i O) (eq C +(CHead d (Bind Abbr) u) (CHead c (Bind b) v)) (pr2 c (THead (Bind b) v t3) +(THead (Bind b) v t)) (\lambda (H8: (eq nat i O)).(\lambda (H9: (eq C (CHead +d (Bind Abbr) u) (CHead c (Bind b) v))).(let H10 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow +c1])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H9) in ((let H11 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H9) in +((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) v) H9) in (\lambda (H13: (eq B Abbr b)).(\lambda (_: (eq C +d c)).(let H15 \def (eq_ind nat i (\lambda (n: nat).(subst0 n u t4 t)) H3 O +H8) in (let H16 \def (eq_ind T u (\lambda (t0: T).(subst0 O t0 t4 t)) H15 v +H12) in (eq_ind B Abbr (\lambda (b0: B).(pr2 c (THead (Bind b0) v t3) (THead +(Bind b0) v t))) (pr2_free c (THead (Bind Abbr) v t3) (THead (Bind Abbr) v t) +(pr0_delta v v (pr0_refl v) t3 t4 H2 t H16)) b H13)))))) H11)) H10)))) H7)) +(\lambda (H7: (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: +nat).(getl j c (CHead d (Bind Abbr) u))))).(ex2_ind nat (\lambda (j: nat).(eq +nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u))) (pr2 c +(THead (Bind b) v t3) (THead (Bind b) v t)) (\lambda (x: nat).(\lambda (H8: +(eq nat i (S x))).(\lambda (H9: (getl x c (CHead d (Bind Abbr) u))).(let H10 +\def (f_equal nat nat (\lambda (e: nat).e) i (S x) H8) in (let H11 \def +(eq_ind nat i (\lambda (n: nat).(subst0 n u t4 t)) H3 (S x) H10) in +(pr2_head_2 c v t3 t (Bind b) (pr2_delta (CHead c (Bind b) v) d u (S x) +(getl_clear_bind b (CHead c (Bind b) v) c v (clear_bind b c v) (CHead d (Bind +Abbr) u) x H9) t3 t4 H2 t H11))))))) H7)) H6))))))))))))))) y t1 t2 H0))) +H)))))). + +lemma pr2_gen_cflat: + \forall (f: F).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall +(t2: T).((pr2 (CHead c (Flat f) v) t1 t2) \to (pr2 c t1 t2)))))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (H: (pr2 (CHead c (Flat f) v) t1 t2)).(insert_eq C (CHead c +(Flat f) v) (\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c t1 t2)) +(\lambda (y: C).(\lambda (H0: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: +C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Flat f) v)) \to (pr2 +c t t0))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: +(pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Flat f) v))).(pr2_free c t3 t4 +H1)))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: +(subst0 i u t4 t)).(\lambda (H4: (eq C c0 (CHead c (Flat f) v))).(let H5 \def +(eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) u))) H1 (CHead +c (Flat f) v) H4) in (let H_y \def (getl_gen_flat f c (CHead d (Bind Abbr) u) +v i H5) in (pr2_delta c d u i H_y t3 t4 H2 t H3)))))))))))))) y t1 t2 H0))) +H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr2/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/defs.ma new file mode 100644 index 000000000..1683cd25a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/defs.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/defs.ma". + +include "basic_1A/getl/defs.ma". + +inductive pr2: C \to (T \to (T \to Prop)) \def +| pr2_free: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to +(pr2 c t1 t2)))) +| pr2_delta: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (t1: T).(\forall (t2: +T).((pr0 t1 t2) \to (\forall (t: T).((subst0 i u t2 t) \to (pr2 c t1 +t)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr2/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/fwd.ma new file mode 100644 index 000000000..7f8553f1a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/fwd.ma @@ -0,0 +1,2801 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr2/defs.ma". + +include "basic_1A/pr0/fwd.ma". + +include "basic_1A/getl/clear.ma". + +include "basic_1A/getl/drop.ma". + +implied lemma pr2_ind: + \forall (P: ((C \to (T \to (T \to Prop))))).(((\forall (c: C).(\forall (t1: +T).(\forall (t2: T).((pr0 t1 t2) \to (P c t1 t2)))))) \to (((\forall (c: +C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d +(Bind Abbr) u)) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to +(\forall (t: T).((subst0 i u t2 t) \to (P c t1 t)))))))))))) \to (\forall (c: +C).(\forall (t: T).(\forall (t0: T).((pr2 c t t0) \to (P c t t0))))))) +\def + \lambda (P: ((C \to (T \to (T \to Prop))))).(\lambda (f: ((\forall (c: +C).(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (P c t1 +t2))))))).(\lambda (f0: ((\forall (c: C).(\forall (d: C).(\forall (u: +T).(\forall (i: nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (t1: +T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (t: T).((subst0 i u t2 t) \to +(P c t1 t))))))))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: +T).(\lambda (p: (pr2 c t t0)).(match p with [(pr2_free x x0 x1 x2) +\Rightarrow (f x x0 x1 x2) | (pr2_delta x x0 x1 x2 x3 x4 x5 x6 x7 x8) +\Rightarrow (f0 x x0 x1 x2 x3 x4 x5 x6 x7 x8)]))))))). + +lemma pr2_gen_sort: + \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr2 c (TSort n) x) \to +(eq T x (TSort n))))) +\def + \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TSort +n) x)).(insert_eq T (TSort n) (\lambda (t: T).(pr2 c t x)) (\lambda (t: +T).(eq T x t)) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda +(_: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n)) \to (eq T t0 +t))))) (\lambda (_: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H1: (pr0 +t1 t2)).(\lambda (H2: (eq T t1 (TSort n))).(let H3 \def (eq_ind T t1 (\lambda +(t: T).(pr0 t t2)) H1 (TSort n) H2) in (eq_ind_r T (TSort n) (\lambda (t: +T).(eq T t2 t)) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T t (TSort n))) +(refl_equal T (TSort n)) t2 (pr0_gen_sort t2 n H3)) t1 H2))))))) (\lambda +(c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl +i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H2: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda +(H4: (eq T t1 (TSort n))).(let H5 \def (eq_ind T t1 (\lambda (t0: T).(pr0 t0 +t2)) H2 (TSort n) H4) in (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t t0)) +(let H6 \def (eq_ind T t2 (\lambda (t0: T).(subst0 i u t0 t)) H3 (TSort n) +(pr0_gen_sort t2 n H5)) in (subst0_gen_sort u t i n H6 (eq T t (TSort n)))) +t1 H4))))))))))))) c y x H0))) H)))). + +lemma pr2_gen_lref: + \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr2 c (TLRef n) x) \to +(or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c +(CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S +n) O u))))))))) +\def + \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TLRef +n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(pr2 c t x)) (\lambda (t: +T).(or (eq T x t) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead +d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O +u))))))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: +C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (eq T t0 t) +(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c0 (CHead d (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(eq T t0 (lift (S n) O u)))))))))) +(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 +t2)).(\lambda (H2: (eq T t1 (TLRef n))).(let H3 \def (eq_ind T t1 (\lambda +(t: T).(pr0 t t2)) H1 (TLRef n) H2) in (eq_ind_r T (TLRef n) (\lambda (t: +T).(or (eq T t2 t) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c0 +(CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S +n) O u))))))) (eq_ind_r T (TLRef n) (\lambda (t: T).(or (eq T t (TLRef n)) +(ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c0 (CHead d (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(eq T t (lift (S n) O u))))))) +(or_introl (eq T (TLRef n) (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: +T).(getl n c0 (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq +T (TLRef n) (lift (S n) O u))))) (refl_equal T (TLRef n))) t2 (pr0_gen_lref +t2 n H3)) t1 H2))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) +u))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H2: (pr0 t1 t2)).(\lambda +(t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t1 (TLRef +n))).(let H5 \def (eq_ind T t1 (\lambda (t0: T).(pr0 t0 t2)) H2 (TLRef n) H4) +in (eq_ind_r T (TLRef n) (\lambda (t0: T).(or (eq T t t0) (ex2_2 C T (\lambda +(d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (_: +C).(\lambda (u0: T).(eq T t (lift (S n) O u0))))))) (let H6 \def (eq_ind T t2 +(\lambda (t0: T).(subst0 i u t0 t)) H3 (TLRef n) (pr0_gen_lref t2 n H5)) in +(land_ind (eq nat n i) (eq T t (lift (S n) O u)) (or (eq T t (TLRef n)) +(ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) +u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t (lift (S n) O u0)))))) +(\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t (lift (S n) O +u))).(eq_ind_r T (lift (S n) O u) (\lambda (t0: T).(or (eq T t0 (TLRef n)) +(ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) +u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t0 (lift (S n) O u0))))))) (let +H9 \def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d (Bind Abbr) +u))) H1 n H7) in (or_intror (eq T (lift (S n) O u) (TLRef n)) (ex2_2 C T +(\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind Abbr) u0)))) +(\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S n) O u0))))) +(ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl n c0 (CHead d0 (Bind +Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S +n) O u0)))) d u H9 (refl_equal T (lift (S n) O u))))) t H8))) +(subst0_gen_lref u t i n H6))) t1 H4))))))))))))) c y x H0))) H)))). + +lemma pr2_gen_abst: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c +(THead (Bind Abst) u1 t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: +T).(pr2 (CHead c (Bind b) u) t1 t2)))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr2 c (THead (Bind Abst) u1 t1) x)).(insert_eq T (THead (Bind Abst) u1 +t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))))))) (\lambda (y: +T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).((eq T t (THead (Bind Abst) u1 t1)) \to (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abst) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +t2)))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: +(pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Bind Abst) u1 t1))).(let H3 \def +(eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Bind Abst) u1 t1) H2) in +(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c0 (Bind b) u) t1 t3)))))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H4: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H5: (pr0 u1 +x0)).(\lambda (H6: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) +(\lambda (t: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead +c0 (Bind b) u) t1 t3))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))))) x0 x1 +(refl_equal T (THead (Bind Abst) x0 x1)) (pr2_free c0 u1 x0 H5) (\lambda (b: +B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) t1 x1 H6)))) t2 H4)))))) +(pr0_gen_abst u1 t1 t2 H3)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda +(u: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) +u))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 t2)).(\lambda +(t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t0 (THead (Bind +Abst) u1 t1))).(let H5 \def (eq_ind T t0 (\lambda (t3: T).(pr0 t3 t2)) H2 +(THead (Bind Abst) u1 t1) H4) in (ex3_2_ind T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t2 (THead +(Bind Abst) x0 x1))).(\lambda (H7: (pr0 u1 x0)).(\lambda (H8: (pr0 t1 +x1)).(let H9 \def (eq_ind T t2 (\lambda (t3: T).(subst0 i u t3 t)) H3 (THead +(Bind Abst) x0 x1) H6) in (or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead +(Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda +(t3: T).(eq T t (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind +Abst) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 +u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) t1 t3)))))) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t (THead (Bind +Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda +(u2: T).(eq T t (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 +u2)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) t1 t3)))))) (\lambda (x2: T).(\lambda (H11: (eq T t (THead (Bind Abst) x2 +x1))).(\lambda (H12: (subst0 i u x0 x2)).(eq_ind_r T (THead (Bind Abst) x2 +x1) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 +(THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abst) x2 x1) (THead (Bind Abst) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) t1 t3))))) x2 x1 (refl_equal T (THead (Bind Abst) x2 x1)) (pr2_delta c0 d +u i H1 u1 x0 H7 x2 H12) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c0 +(Bind b) u0) t1 x1 H8)))) t H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: +T).(eq T t (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind +Abst) i) u x1 t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Abst) +x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)) (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3)))))) (\lambda (x2: T).(\lambda (H11: (eq T t (THead (Bind Abst) x0 +x2))).(\lambda (H12: (subst0 (s (Bind Abst) i) u x1 x2)).(eq_ind_r T (THead +(Bind Abst) x0 x2) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x0 x2) (THead (Bind Abst) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) t1 t3))))) x0 x2 (refl_equal T (THead (Bind Abst) x0 x2)) (pr2_free c0 u1 +x0 H7) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u +(S i) (getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H8 x2 +H12)))) t H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind +Abst) i) u x1 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T +t (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u +x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 +t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) t1 t3)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H11: (eq T t +(THead (Bind Abst) x2 x3))).(\lambda (H12: (subst0 i u x0 x2)).(\lambda (H13: +(subst0 (s (Bind Abst) i) u x1 x3)).(eq_ind_r T (THead (Bind Abst) x2 x3) +(\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abst) x2 x3) (THead (Bind Abst) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))))) x2 x3 +(refl_equal T (THead (Bind Abst) x2 x3)) (pr2_delta c0 d u i H1 u1 x0 H7 x2 +H12) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u +(S i) (getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H8 x3 +H13)))) t H11)))))) H10)) (subst0_gen_head (Bind Abst) u x0 x1 t i H9)))))))) +(pr0_gen_abst u1 t1 t2 H5)))))))))))))) c y x H0))) H))))). + +lemma pr2_gen_cast: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c +(THead (Flat Cast) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (pr2 c +t1 x)))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr2 c (THead (Flat Cast) u1 t1) x)).(insert_eq T (THead (Flat Cast) u1 +t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 +t2)))) (pr2 c t1 x))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind +(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Cast) +u1 t1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead +(Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr2 c0 t1 t2)))) (pr2 c0 t1 t0)))))) +(\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: (pr0 t0 +t2)).(\lambda (H2: (eq T t0 (THead (Flat Cast) u1 t1))).(let H3 \def (eq_ind +T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Flat Cast) u1 t1) H2) in (or_ind +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (pr2 c0 t1 t2)) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t2)) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t2 (THead (Flat Cast) +x0 x1))).(\lambda (H6: (pr0 u1 x0)).(\lambda (H7: (pr0 t1 x1)).(eq_ind_r T +(THead (Flat Cast) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (pr2 c0 t1 t))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t3)))) (\lambda +(u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr2 c0 t1 t3)))) (pr2 c0 t1 (THead (Flat Cast) x0 x1)) (ex3_2_intro T T +(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Cast) x0 x1) (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3))) x0 x1 (refl_equal T (THead +(Flat Cast) x0 x1)) (pr2_free c0 u1 x0 H6) (pr2_free c0 t1 x1 H7))) t2 +H5)))))) H4)) (\lambda (H4: (pr0 t1 t2)).(or_intror (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (pr2 c0 t1 t2) (pr2_free c0 t1 t2 H4))) (pr0_gen_cast u1 t1 t2 +H3)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 t2)).(\lambda (t: T).(\lambda (H3: +(subst0 i u t2 t)).(\lambda (H4: (eq T t0 (THead (Flat Cast) u1 t1))).(let H5 +\def (eq_ind T t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (THead (Flat Cast) u1 t1) +H4) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) (or (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (pr2 c0 t1 t)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t2 (THead (Flat Cast) +x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def +(eq_ind T t2 (\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Flat Cast) x0 x1) +H7) in (or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead (Flat Cast) u2 x1))) +(\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead +(Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) (\lambda (H11: (ex2 T (\lambda (u2: +T).(eq T t (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 +u2)))).(ex2_ind T (\lambda (u2: T).(eq T t (THead (Flat Cast) u2 x1))) +(\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 +c0 t1 t)) (\lambda (x2: T).(\lambda (H12: (eq T t (THead (Flat Cast) x2 +x1))).(\lambda (H13: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (pr2 c0 t1 t) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3))) x2 x1 H12 +(pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (pr2_free c0 t1 x1 H9)))))) H11)) +(\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t (THead (Flat Cast) x0 t3))) +(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)))).(ex2_ind T (\lambda +(t3: T).(eq T t (THead (Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat +Cast) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) +(\lambda (x2: T).(\lambda (H12: (eq T t (THead (Flat Cast) x0 x2))).(\lambda +(H13: (subst0 (s (Flat Cast) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (pr2 c0 t1 t) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3))) x0 x2 H12 +(pr2_free c0 u1 x0 H8) (pr2_delta c0 d u i H1 t1 x1 H9 x2 H13)))))) H11)) +(\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat +Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t)) (\lambda (x2: +T).(\lambda (x3: T).(\lambda (H12: (eq T t (THead (Flat Cast) x2 +x3))).(\lambda (H13: (subst0 i u x0 x2)).(\lambda (H14: (subst0 (s (Flat +Cast) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 t1 t3))) x2 x3 H12 (pr2_delta c0 d u i H1 u1 x0 +H8 x2 H13) (pr2_delta c0 d u i H1 t1 x1 H9 x3 H14)))))))) H11)) +(subst0_gen_head (Flat Cast) u x0 x1 t i H10)))))))) H6)) (\lambda (H6: (pr0 +t1 t2)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (pr2 c0 t1 t) +(pr2_delta c0 d u i H1 t1 t2 H6 t H3))) (pr0_gen_cast u1 t1 t2 +H5)))))))))))))) c y x H0))) H))))). + +lemma pr2_gen_csort: + \forall (t1: T).(\forall (t2: T).(\forall (n: nat).((pr2 (CSort n) t1 t2) +\to (pr0 t1 t2)))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (n: nat).(\lambda (H: (pr2 (CSort +n) t1 t2)).(insert_eq C (CSort n) (\lambda (c: C).(pr2 c t1 t2)) (\lambda (_: +C).(pr0 t1 t2)) (\lambda (y: C).(\lambda (H0: (pr2 y t1 t2)).(pr2_ind +(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c (CSort n)) \to (pr0 +t t0))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: +(pr0 t3 t4)).(\lambda (_: (eq C c (CSort n))).H1))))) (\lambda (c: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (getl i c +(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 +t3 t4)).(\lambda (t: T).(\lambda (_: (subst0 i u t4 t)).(\lambda (H4: (eq C c +(CSort n))).(let H5 \def (eq_ind C c (\lambda (c0: C).(getl i c0 (CHead d +(Bind Abbr) u))) H1 (CSort n) H4) in (getl_gen_sort n i (CHead d (Bind Abbr) +u) H5 (pr0 t3 t)))))))))))))) y t1 t2 H0))) H)))). + +lemma pr2_gen_appl: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c +(THead (Flat Appl) u1 t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (ex4_4 T +T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq +T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead +(Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr2 c (THead (Flat Appl) u1 t1) x)).(insert_eq T (THead (Flat Appl) u1 +t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or3 (ex3_2 T T (\lambda +(u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 +t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind +Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) +y2) z1 z2)))))))))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind +(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) +u1 t1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead +(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr2 c0 t1 t2)))) (ex4_4 T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t2)))))))) (ex6_6 B T T +T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t0 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 +z2))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda +(H1: (pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Flat Appl) u1 t1))).(let H3 +\def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Flat Appl) u1 t1) +H2) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) +u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H4: (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) +u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H5: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H6: (pr0 u1 +x0)).(\lambda (H7: (pr0 t1 x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) +(\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T +T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 +z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) +x0 x1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat +Appl) x0 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3))) x0 x1 (refl_equal T (THead (Flat Appl) x0 x1)) (pr2_free c0 u1 x0 +H6) (pr2_free c0 t1 x1 H7))) t2 H5)))))) H4)) (\lambda (H4: (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 +T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq +T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T +T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 +z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H5: (eq T t1 (THead (Bind Abst) x0 x1))).(\lambda (H6: (eq T t2 +(THead (Bind Abbr) x2 x3))).(\lambda (H7: (pr0 u1 x2)).(\lambda (H8: (pr0 x1 +x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 +(CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (eq_ind_r T (THead (Bind +Abst) x0 x1) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) +x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind +Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) +u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind +Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) +u) z1 t3))))))) x0 x1 x2 x3 (refl_equal T (THead (Bind Abst) x0 x1)) +(refl_equal T (THead (Bind Abbr) x2 x3)) (pr2_free c0 u1 x2 H7) (\lambda (b: +B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) x1 x3 H8))))) t1 H5) t2 +H6))))))))) H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not +(eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) +y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat +Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift +(S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 +t3))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T +T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 +z2))))))))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not (eq B x0 +Abst))).(\lambda (H6: (eq T t1 (THead (Bind x0) x1 x2))).(\lambda (H7: (eq T +t2 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda +(H8: (pr0 u1 x3)).(\lambda (H9: (pr0 x1 x4)).(\lambda (H10: (pr0 x2 +x5)).(eq_ind_r T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) +x5)) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T +T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 +z2)))))))))) (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t: T).(or3 (ex3_2 +T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat +Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) +x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) z1 t3)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat +Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 +(CHead c0 (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))) +x0 x1 x2 x5 x3 x4 H5 (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T +(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5))) (pr2_free c0 +u1 x3 H8) (pr2_free c0 x1 x4 H9) (pr2_free (CHead c0 (Bind x0) x4) x2 x5 +H10))) t1 H6) t2 H7))))))))))))) H4)) (pr0_gen_appl u1 t1 t2 H3)))))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (H2: (pr0 t0 t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 +t)).(\lambda (H4: (eq T t0 (THead (Flat Appl) u1 t1))).(let H5 \def (eq_ind T +t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (THead (Flat Appl) u1 t1) H4) in (or3_ind +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H6: (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H7: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr0 u1 +x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T t2 (\lambda (t3: +T).(subst0 i u t3 t)) H3 (THead (Flat Appl) x0 x1) H7) in (or3_ind (ex2 T +(\lambda (u2: T).(eq T t (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 +i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Flat Appl) x0 t3))) +(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Appl) i) u x1 t3)))) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H11: (ex2 T (\lambda (u2: +T).(eq T t (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 +u2)))).(ex2_ind T (\lambda (u2: T).(eq T t (THead (Flat Appl) u2 x1))) +(\lambda (u2: T).(subst0 i u x0 u2)) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (H12: (eq T t +(THead (Flat Appl) x2 x1))).(\lambda (H13: (subst0 i u x0 x2)).(eq_ind_r T +(THead (Flat Appl) x2 x1) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 +t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Flat Appl) x2 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O +u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3))) x2 x1 (refl_equal T (THead (Flat Appl) x2 x1)) (pr2_delta c0 d u i +H1 u1 x0 H8 x2 H13) (pr2_free c0 t1 x1 H9))) t H12)))) H11)) (\lambda (H11: +(ex2 T (\lambda (t3: T).(eq T t (THead (Flat Appl) x0 t3))) (\lambda (t3: +T).(subst0 (s (Flat Appl) i) u x1 t3)))).(ex2_ind T (\lambda (t3: T).(eq T t +(THead (Flat Appl) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 +t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat +Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda +(H12: (eq T t (THead (Flat Appl) x0 x2))).(\lambda (H13: (subst0 (s (Flat +Appl) i) u x1 x2)).(eq_ind_r T (THead (Flat Appl) x0 x2) (\lambda (t3: +T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat +Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda +(_: T).(\lambda (t4: T).(pr2 c0 t1 t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) +(or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat +Appl) x0 x2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 +T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq +T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind Abbr) +u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind b) y2 +(THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Flat Appl) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 t1 t3))) x0 x2 (refl_equal T (THead (Flat Appl) +x0 x2)) (pr2_free c0 u1 x0 H8) (pr2_delta c0 d u i H1 t1 x1 H9 x2 H13))) t +H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u +x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat +Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda +(x3: T).(\lambda (H12: (eq T t (THead (Flat Appl) x2 x3))).(\lambda (H13: +(subst0 i u x0 x2)).(\lambda (H14: (subst0 (s (Flat Appl) i) u x1 +x3)).(eq_ind_r T (THead (Flat Appl) x2 x3) (\lambda (t3: T).(or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 +(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind b) y2 +(THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Flat Appl) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 t1 t3))) x2 x3 (refl_equal T (THead (Flat Appl) +x2 x3)) (pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (pr2_delta c0 d u i H1 t1 x1 +H9 x3 H14))) t H12)))))) H11)) (subst0_gen_head (Flat Appl) u x0 x1 t i +H10)))))))) H6)) (\lambda (H6: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t3: T).(pr0 z1 t3))))))).(ex4_4_ind T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda +(x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T t1 (THead (Bind +Abst) x0 x1))).(\lambda (H8: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda +(H9: (pr0 u1 x2)).(\lambda (H10: (pr0 x1 x3)).(let H11 \def (eq_ind T t2 +(\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Bind Abbr) x2 x3) H8) in +(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t3: T).(or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 t3 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T t3 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t +(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t3 (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda +(u2: T).(eq T t (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 +u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x2 t3))) (\lambda +(t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Bind Abbr) i) u x3 t3)))) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) +O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (H12: (ex2 T (\lambda (u2: T).(eq T t (THead +(Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 +i u x2 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind Abst) x0 x1) t3)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda +(H13: (eq T t (THead (Bind Abbr) x4 x3))).(\lambda (H14: (subst0 i u x2 +x4)).(eq_ind_r T (THead (Bind Abbr) x4 x3) (\lambda (t3: T).(or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 (THead (Bind Abst) x0 x1) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) +x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: +T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abbr) x4 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind +Abbr) x4 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3))))))) x0 x1 x4 x3 (refl_equal T (THead (Bind Abst) x0 x1)) +(refl_equal T (THead (Bind Abbr) x4 x3)) (pr2_delta c0 d u i H1 u1 x2 H9 x4 +H14) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c0 (Bind b) u0) x1 x3 +H10))))) t H13)))) H12)) (\lambda (H12: (ex2 T (\lambda (t3: T).(eq T t +(THead (Bind Abbr) x2 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x2 t3))) +(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3)) (or3 (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) +O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (H13: (eq T t (THead (Bind Abbr) +x2 x4))).(\lambda (H14: (subst0 (s (Bind Abbr) i) u x3 x4)).(eq_ind_r T +(THead (Bind Abbr) x2 x4) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 +(THead (Bind Abst) x0 x1) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abbr) x2 x4) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind +Abbr) x2 x4) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3))))))) x0 x1 x2 x4 (refl_equal T (THead (Bind Abst) x0 x1)) +(refl_equal T (THead (Bind Abbr) x2 x4)) (pr2_free c0 u1 x2 H9) (\lambda (b: +B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) +(getl_clear_bind b (CHead c0 (Bind b) u0) c0 u0 (clear_bind b c0 u0) (CHead d +(Bind Abbr) u) i H1) x1 x3 H10 x4 H14))))) t H13)))) H12)) (\lambda (H12: +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) +x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) +O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H13: (eq T t +(THead (Bind Abbr) x4 x5))).(\lambda (H14: (subst0 i u x2 x4)).(\lambda (H15: +(subst0 (s (Bind Abbr) i) u x3 x5)).(eq_ind_r T (THead (Bind Abbr) x4 x5) +(\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 +(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind Abst) x0 x1) +t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind Abbr) x4 x5) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind +Abbr) x4 x5) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3))))))) x0 x1 x4 x5 (refl_equal T (THead (Bind Abst) x0 x1)) +(refl_equal T (THead (Bind Abbr) x4 x5)) (pr2_delta c0 d u i H1 u1 x2 H9 x4 +H14) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u +(S i) (getl_clear_bind b (CHead c0 (Bind b) u0) c0 u0 (clear_bind b c0 u0) +(CHead d (Bind Abbr) u) i H1) x1 x3 H10 x5 H15))))) t H13)))))) H12)) +(subst0_gen_head (Bind Abbr) u x2 x3 t i H11)) t1 H7)))))))))) H6)) (\lambda +(H6: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) +t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda +(y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 +y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))).(ex6_6_ind B T T T T +T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq +T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead +(Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda +(_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (t3: T).(pr0 z1 t3))))))) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x0: B).(\lambda (x1: +T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: +T).(\lambda (H7: (not (eq B x0 Abst))).(\lambda (H8: (eq T t1 (THead (Bind +x0) x1 x2))).(\lambda (H9: (eq T t2 (THead (Bind x0) x4 (THead (Flat Appl) +(lift (S O) O x3) x5)))).(\lambda (H10: (pr0 u1 x3)).(\lambda (H11: (pr0 x1 +x4)).(\lambda (H12: (pr0 x2 x5)).(let H13 \def (eq_ind T t2 (\lambda (t3: +T).(subst0 i u t3 t)) H3 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O +x3) x5)) H9) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t3: T).(or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t (THead (Flat Appl) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr2 c0 t3 t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t3 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t4: T).(eq T t (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t3 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda +(u2: T).(eq T t (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) +x5)))) (\lambda (u2: T).(subst0 i u x4 u2))) (ex2 T (\lambda (t3: T).(eq T t +(THead (Bind x0) x4 t3))) (\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead +(Flat Appl) (lift (S O) O x3) x5) t3))) (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) +i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3)))) (or3 (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (H14: (ex2 T (\lambda (u2: T).(eq T t (THead +(Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: +T).(subst0 i u x4 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t (THead (Bind x0) +u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u +x4 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda +(H15: (eq T t (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) +x5)))).(\lambda (H16: (subst0 i u x4 x6)).(eq_ind_r T (THead (Bind x0) x6 +(THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t3: T).(or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) +x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) +O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x3 x6 H7 (refl_equal T (THead +(Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift +(S O) O x3) x5))) (pr2_free c0 u1 x3 H10) (pr2_delta c0 d u i H1 x1 x4 H11 x6 +H16) (pr2_free (CHead c0 (Bind x0) x6) x2 x5 H12))) t H15)))) H14)) (\lambda +(H14: (ex2 T (\lambda (t3: T).(eq T t (THead (Bind x0) x4 t3))) (\lambda (t3: +T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind x0) x4 t3))) (\lambda +(t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) +t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat +Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda +(H15: (eq T t (THead (Bind x0) x4 x6))).(\lambda (H16: (subst0 (s (Bind x0) +i) u (THead (Flat Appl) (lift (S O) O x3) x5) x6)).(eq_ind_r T (THead (Bind +x0) x4 x6) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) +x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x6 (THead (Flat +Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) +u2))) (ex2 T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) +t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) +O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind +x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H17: (ex2 T +(\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: +T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda +(u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s +(Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) +x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (H18: (eq T +x6 (THead (Flat Appl) x7 x5))).(\lambda (H19: (subst0 (s (Bind x0) i) u (lift +(S O) O x3) x7)).(eq_ind_r T (THead (Flat Appl) x7 x5) (\lambda (t3: T).(or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x4 t3) +(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) +x4 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) (S O) (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead +(Flat Appl) x7 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind +x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead +(Flat Appl) x7 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (H20: (lt (s (Bind x0) i) (S +O))).(subst0_gen_lift_false x3 u x7 (S O) O (s (Bind x0) i) (le_O_n (s (Bind +x0) i)) H20 H19 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) +(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x7 (s (Bind x0) i) +(S O) O H19 Hle) in (let H20 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x7 +(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead +(Flat Appl) x7 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind +x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x5)) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead +(Flat Appl) x7 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (H21: (eq T x7 (lift (S O) O +x8))).(\lambda (H22: (subst0 (minus i O) u x3 x8)).(eq_ind_r T (lift (S O) O +x8) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) t3 x5)) (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t3 x5)) +(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) t3 x5)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H23 \def (eq_ind_r +nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x8)) H22 i (minus_n_O i)) in +(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind +x0) x4 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift +(S O) O x8) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x8) x5)) +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) +(ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat +Appl) (lift (S O) O x8) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))) x0 x1 x2 x5 x8 x4 H7 (refl_equal T (THead (Bind x0) x1 x2)) +(refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x8) x5))) +(pr2_delta c0 d u i H1 u1 x3 H10 x8 H23) (pr2_free c0 x1 x4 H11) (pr2_free +(CHead c0 (Bind x0) x4) x2 x5 H12)))) x7 H21)))) H20))))) x6 H18)))) H17)) +(\lambda (H17: (ex2 T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S +O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 +t3)))).(ex2_ind T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O +x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)) +(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 +x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) +x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (H18: (eq T +x6 (THead (Flat Appl) (lift (S O) O x3) x7))).(\lambda (H19: (subst0 (s (Flat +Appl) (s (Bind x0) i)) u x5 x7)).(eq_ind_r T (THead (Flat Appl) (lift (S O) O +x3) x7) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: +T).(eq T (THead (Bind x0) x4 t3) (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 +(THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t4: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat +Appl) (lift (S O) O x3) x7)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7)) +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7)) (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7)) +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))) +x0 x1 x2 x7 x3 x4 H7 (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T +(THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x7))) (pr2_free c0 +u1 x3 H10) (pr2_free c0 x1 x4 H11) (pr2_delta (CHead c0 (Bind x0) x4) d u (S +i) (getl_clear_bind x0 (CHead c0 (Bind x0) x4) c0 x4 (clear_bind x0 c0 x4) +(CHead d (Bind Abbr) u) i H1) x2 x5 H12 x7 H19))) x6 H18)))) H17)) (\lambda +(H17: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat +Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u +(lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat +Appl) (s (Bind x0) i)) u x5 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda +(t3: T).(eq T x6 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda +(t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat +Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) +x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (x8: +T).(\lambda (H18: (eq T x6 (THead (Flat Appl) x7 x8))).(\lambda (H19: (subst0 +(s (Bind x0) i) u (lift (S O) O x3) x7)).(\lambda (H20: (subst0 (s (Flat +Appl) (s (Bind x0) i)) u x5 x8)).(eq_ind_r T (THead (Flat Appl) x7 x8) +(\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T +(THead (Bind x0) x4 t3) (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 +(THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t4: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t3) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) +(S O) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind +x0) x4 (THead (Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead +(Flat Appl) x7 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (H21: (lt (s (Bind x0) i) (S +O))).(subst0_gen_lift_false x3 u x7 (S O) O (s (Bind x0) i) (le_O_n (s (Bind +x0) i)) H21 H19 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) +(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x7 (s (Bind x0) i) +(S O) O H19 Hle) in (let H21 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x7 +(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead +(Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind +x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead +(Flat Appl) x7 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (x9: T).(\lambda (H22: (eq T x7 (lift (S O) O +x9))).(\lambda (H23: (subst0 (minus i O) u x3 x9)).(eq_ind_r T (lift (S O) O +x9) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) t3 x8)) (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t3 x8)) +(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x4 (THead (Flat Appl) t3 x8)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H24 \def (eq_ind_r +nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x9)) H23 i (minus_n_O i)) in +(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind +x0) x4 (THead (Flat Appl) (lift (S O) O x9) x8)) (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift +(S O) O x9) x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x9) x8)) +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) +(ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat +Appl) (lift (S O) O x9) x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))) x0 x1 x2 x8 x9 x4 H7 (refl_equal T (THead (Bind x0) x1 x2)) +(refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x9) x8))) +(pr2_delta c0 d u i H1 u1 x3 H10 x9 H24) (pr2_free c0 x1 x4 H11) (pr2_delta +(CHead c0 (Bind x0) x4) d u (S i) (getl_clear_bind x0 (CHead c0 (Bind x0) x4) +c0 x4 (clear_bind x0 c0 x4) (CHead d (Bind Abbr) u) i H1) x2 x5 H12 x8 +H20)))) x7 H22)))) H21))))) x6 H18)))))) H17)) (subst0_gen_head (Flat Appl) u +(lift (S O) O x3) x5 x6 (s (Bind x0) i) H16)) t H15)))) H14)) (\lambda (H14: +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind x0) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) +O x3) x5) t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 +u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat +Appl) (lift (S O) O x3) x5) t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) +x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H15: (eq T t +(THead (Bind x0) x6 x7))).(\lambda (H16: (subst0 i u x4 x6)).(\lambda (H17: +(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) +x7)).(eq_ind_r T (THead (Bind x0) x6 x7) (\lambda (t3: T).(or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x7 (THead (Flat +Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) +u2))) (ex2 T (\lambda (t3: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) +t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) +O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind +x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (H18: (ex2 T +(\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: +T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda +(u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s +(Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) +x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (H19: (eq T +x7 (THead (Flat Appl) x8 x5))).(\lambda (H20: (subst0 (s (Bind x0) i) u (lift +(S O) O x3) x8)).(eq_ind_r T (THead (Flat Appl) x8 x5) (\lambda (t3: T).(or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 t3) +(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) +x6 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) (S O) (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) x8 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind +x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) x8 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (H21: (lt (s (Bind x0) i) (S +O))).(subst0_gen_lift_false x3 u x8 (S O) O (s (Bind x0) i) (le_O_n (s (Bind +x0) i)) H21 H20 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) +(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x8 (s (Bind x0) i) +(S O) O H20 Hle) in (let H21 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x8 +(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) x8 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind +x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x5)) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) x8 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (x9: T).(\lambda (H22: (eq T x8 (lift (S O) O +x9))).(\lambda (H23: (subst0 (minus i O) u x3 x9)).(eq_ind_r T (lift (S O) O +x9) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) t3 x5)) (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t3 x5)) +(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) t3 x5)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H24 \def (eq_ind_r +nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x9)) H23 i (minus_n_O i)) in +(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind +x0) x6 (THead (Flat Appl) (lift (S O) O x9) x5)) (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift +(S O) O x9) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x9) x5)) +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) +(ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat +Appl) (lift (S O) O x9) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))) x0 x1 x2 x5 x9 x6 H7 (refl_equal T (THead (Bind x0) x1 x2)) +(refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x9) x5))) +(pr2_delta c0 d u i H1 u1 x3 H10 x9 H24) (pr2_delta c0 d u i H1 x1 x4 H11 x6 +H16) (pr2_free (CHead c0 (Bind x0) x6) x2 x5 H12)))) x8 H22)))) H21))))) x7 +H19)))) H18)) (\lambda (H18: (ex2 T (\lambda (t3: T).(eq T x7 (THead (Flat +Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s +(Bind x0) i)) u x5 t3)))).(ex2_ind T (\lambda (t3: T).(eq T x7 (THead (Flat +Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s +(Bind x0) i)) u x5 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda +(H19: (eq T x7 (THead (Flat Appl) (lift (S O) O x3) x8))).(\lambda (H20: +(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x8)).(eq_ind_r T (THead (Flat +Appl) (lift (S O) O x3) x8) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 t3) (THead (Flat Appl) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) +x6 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) +O x3) x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) +t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8)) (THead +(Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8)) (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8)) +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda +(_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 +y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))) +x0 x1 x2 x8 x3 x6 H7 (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T +(THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x8))) (pr2_free c0 +u1 x3 H10) (pr2_delta c0 d u i H1 x1 x4 H11 x6 H16) (pr2_delta (CHead c0 +(Bind x0) x6) d u (S i) (getl_clear_bind x0 (CHead c0 (Bind x0) x6) c0 x6 +(clear_bind x0 c0 x6) (CHead d (Bind Abbr) u) i H1) x2 x5 H12 x8 H20))) x7 +H19)))) H18)) (\lambda (H18: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T x7 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s +(Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) +u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) +i)) u x5 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead +(Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) +x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda +(x9: T).(\lambda (H19: (eq T x7 (THead (Flat Appl) x8 x9))).(\lambda (H20: +(subst0 (s (Bind x0) i) u (lift (S O) O x3) x8)).(\lambda (H21: (subst0 (s +(Flat Appl) (s (Bind x0) i)) u x5 x9)).(eq_ind_r T (THead (Flat Appl) x8 x9) +(\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T +(THead (Bind x0) x6 t3) (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c0 +(THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t4: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind Abbr) u2 t4)))))) (\lambda +(_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t3) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (lt_le_e (s (Bind x0) i) +(S O) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind +x0) x6 (THead (Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 +(THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) x8 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (H22: (lt (s (Bind x0) i) (S +O))).(subst0_gen_lift_false x3 u x8 (S O) O (s (Bind x0) i) (le_O_n (s (Bind +x0) i)) H22 H20 (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) +(THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2))))))))))) (\lambda (Hle: (le (S O) +(s (Bind x0) i))).(let H_x \def (subst0_gen_lift_ge u x3 x8 (s (Bind x0) i) +(S O) O H20 Hle) in (let H22 \def H_x in (ex2_ind T (\lambda (t3: T).(eq T x8 +(lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus i O) u x3 t3)) (or3 +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda +(_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c0 (THead (Bind +x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind Abbr) u2 +t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) x8 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2))))))))) (\lambda (x10: T).(\lambda (H23: (eq T x8 (lift (S O) O +x10))).(\lambda (H24: (subst0 (minus i O) u x3 x10)).(eq_ind_r T (lift (S O) +O x10) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq +T (THead (Bind x0) x6 (THead (Flat Appl) t3 x9)) (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c0 (THead (Bind x0) x1 x2) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t3 x9)) +(THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +(THead (Bind x0) x6 (THead (Flat Appl) t3 x9)) (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 (CHead c0 (Bind b) y2) z1 z2)))))))))) (let H25 \def (eq_ind_r +nat (minus i O) (\lambda (n: nat).(subst0 n u x3 x10)) H24 i (minus_n_O i)) +in (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead +(Bind x0) x6 (THead (Flat Appl) (lift (S O) O x10) x9)) (THead (Flat Appl) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr2 c0 (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) +x6 (THead (Flat Appl) (lift (S O) O x10) x9)) (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) z1 t3)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) +O x10) x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c0 (Bind b) +y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead +(Flat Appl) (lift (S O) O x10) x9)) (THead (Bind b) y2 (THead (Flat Appl) +(lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c0 y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c0 (Bind b) y2) z1 z2))))))) x0 x1 x2 x9 x10 x6 H7 (refl_equal T +(THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) +(lift (S O) O x10) x9))) (pr2_delta c0 d u i H1 u1 x3 H10 x10 H25) (pr2_delta +c0 d u i H1 x1 x4 H11 x6 H16) (pr2_delta (CHead c0 (Bind x0) x6) d u (S i) +(getl_clear_bind x0 (CHead c0 (Bind x0) x6) c0 x6 (clear_bind x0 c0 x6) +(CHead d (Bind Abbr) u) i H1) x2 x5 H12 x9 H21)))) x8 H23)))) H22))))) x7 +H19)))))) H18)) (subst0_gen_head (Flat Appl) u (lift (S O) O x3) x5 x7 (s +(Bind x0) i) H17)) t H15)))))) H14)) (subst0_gen_head (Bind x0) u x4 (THead +(Flat Appl) (lift (S O) O x3) x5) t i H13)) t1 H8)))))))))))))) H6)) +(pr0_gen_appl u1 t1 t2 H5)))))))))))))) c y x H0))) H))))). + +lemma pr2_gen_lift: + \forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall +(d: nat).((pr2 c (lift h d t1) x) \to (\forall (e: C).((drop h d c e) \to +(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr2 e t1 +t2)))))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (H: (pr2 c (lift h d t1) x)).(insert_eq T (lift h d t1) +(\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(\forall (e: C).((drop h d c e) +\to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr2 e +t1 t2)))))) (\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: +C).(\lambda (t: T).(\lambda (t0: T).((eq T t (lift h d t1)) \to (\forall (e: +C).((drop h d c0 e) \to (ex2 T (\lambda (t2: T).(eq T t0 (lift h d t2))) +(\lambda (t2: T).(pr2 e t1 t2))))))))) (\lambda (c0: C).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (H1: (pr0 t0 t2)).(\lambda (H2: (eq T t0 (lift h +d t1))).(\lambda (e: C).(\lambda (_: (drop h d c0 e)).(let H4 \def (eq_ind T +t0 (\lambda (t: T).(pr0 t t2)) H1 (lift h d t1) H2) in (ex2_ind T (\lambda +(t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T +(\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) +(\lambda (x0: T).(\lambda (H5: (eq T t2 (lift h d x0))).(\lambda (H6: (pr0 t1 +x0)).(eq_ind_r T (lift h d x0) (\lambda (t: T).(ex2 T (\lambda (t3: T).(eq T +t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)))) (ex_intro2 T (\lambda +(t3: T).(eq T (lift h d x0) (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) +x0 (refl_equal T (lift h d x0)) (pr2_free e t1 x0 H6)) t2 H5)))) +(pr0_gen_lift t1 t2 h d H4)))))))))) (\lambda (c0: C).(\lambda (d0: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d0 (Bind +Abbr) u))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 +t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t0 +(lift h d t1))).(\lambda (e: C).(\lambda (H5: (drop h d c0 e)).(let H6 \def +(eq_ind T t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (lift h d t1) H4) in (ex2_ind T +(\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 +T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) +(\lambda (x0: T).(\lambda (H7: (eq T t2 (lift h d x0))).(\lambda (H8: (pr0 t1 +x0)).(let H9 \def (eq_ind T t2 (\lambda (t3: T).(subst0 i u t3 t)) H3 (lift h +d x0) H7) in (lt_le_e i d (ex2 T (\lambda (t3: T).(eq T t (lift h d t3))) +(\lambda (t3: T).(pr2 e t1 t3))) (\lambda (H10: (lt i d)).(let H11 \def +(eq_ind nat d (\lambda (n: nat).(subst0 i u (lift h n x0) t)) H9 (S (plus i +(minus d (S i)))) (lt_plus_minus i d H10)) in (let H12 \def (eq_ind nat d +(\lambda (n: nat).(drop h n c0 e)) H5 (S (plus i (minus d (S i)))) +(lt_plus_minus i d H10)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h (minus d (S i)) v)))) (\lambda (v: T).(\lambda (e0: +C).(getl i e (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (minus d (S i)) d0 e0))) (ex2 T (\lambda (t3: T).(eq T t (lift h d +t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x1: T).(\lambda (x2: +C).(\lambda (H13: (eq T u (lift h (minus d (S i)) x1))).(\lambda (H14: (getl +i e (CHead x2 (Bind Abbr) x1))).(\lambda (_: (drop h (minus d (S i)) d0 +x2)).(let H16 \def (eq_ind T u (\lambda (t3: T).(subst0 i t3 (lift h (S (plus +i (minus d (S i)))) x0) t)) H11 (lift h (minus d (S i)) x1) H13) in (ex2_ind +T (\lambda (t3: T).(eq T t (lift h (S (plus i (minus d (S i)))) t3))) +(\lambda (t3: T).(subst0 i x1 x0 t3)) (ex2 T (\lambda (t3: T).(eq T t (lift h +d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x3: T).(\lambda (H17: (eq +T t (lift h (S (plus i (minus d (S i)))) x3))).(\lambda (H18: (subst0 i x1 x0 +x3)).(let H19 \def (eq_ind_r nat (S (plus i (minus d (S i)))) (\lambda (n: +nat).(eq T t (lift h n x3))) H17 d (lt_plus_minus i d H10)) in (ex_intro2 T +(\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x3 +H19 (pr2_delta e x2 x1 i H14 t1 x0 H8 x3 H18)))))) (subst0_gen_lift_lt x1 x0 +t i h (minus d (S i)) H16)))))))) (getl_drop_conf_lt Abbr c0 d0 u i H1 e h +(minus d (S i)) H12))))) (\lambda (H10: (le d i)).(lt_le_e i (plus d h) (ex2 +T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) +(\lambda (H11: (lt i (plus d h))).(subst0_gen_lift_false x0 u t h d i H10 H11 +H9 (ex2 T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 +t3))))) (\lambda (H11: (le (plus d h) i)).(ex2_ind T (\lambda (t3: T).(eq T t +(lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u x0 t3)) (ex2 T +(\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) +(\lambda (x1: T).(\lambda (H12: (eq T t (lift h d x1))).(\lambda (H13: +(subst0 (minus i h) u x0 x1)).(ex_intro2 T (\lambda (t3: T).(eq T t (lift h d +t3))) (\lambda (t3: T).(pr2 e t1 t3)) x1 H12 (pr2_delta e d0 u (minus i h) +(getl_drop_conf_ge i (CHead d0 (Bind Abbr) u) c0 H1 e h d H5 H11) t1 x0 H8 x1 +H13))))) (subst0_gen_lift_ge u x0 t i h d H9 H11)))))))))) (pr0_gen_lift t1 +t2 h d H6)))))))))))))))) c y x H0))) H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr2/pr2.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/pr2.ma new file mode 100644 index 000000000..4d7a0920c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/pr2.ma @@ -0,0 +1,236 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr2/defs.ma". + +include "basic_1A/pr0/pr0.ma". + +include "basic_1A/getl/fwd.ma". + +fact pr2_confluence__pr2_free_free: + \forall (c: C).(\forall (t0: T).(\forall (t1: T).(\forall (t2: T).((pr0 t0 +t1) \to ((pr0 t0 t2) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t)))))))) +\def + \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pr0 t0 t1)).(\lambda (H0: (pr0 t0 t2)).(ex2_ind T (\lambda (t: T).(pr0 +t2 t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) +(\lambda (t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H1: (pr0 t2 +x)).(\lambda (H2: (pr0 t1 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) +(\lambda (t: T).(pr2 c t2 t)) x (pr2_free c t1 x H2) (pr2_free c t2 x H1))))) +(pr0_confluence t0 t2 H0 t1 H))))))). + +fact pr2_confluence__pr2_free_delta: + \forall (c: C).(\forall (d: C).(\forall (t0: T).(\forall (t1: T).(\forall +(t2: T).(\forall (t4: T).(\forall (u: T).(\forall (i: nat).((pr0 t0 t1) \to +((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) \to ((subst0 i u t4 t2) +\to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 +t)))))))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (t4: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (pr0 +t0 t1)).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H1: (pr0 +t0 t4)).(\lambda (H2: (subst0 i u t4 t2)).(ex2_ind T (\lambda (t: T).(pr0 t4 +t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda +(t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H3: (pr0 t4 x)).(\lambda (H4: +(pr0 t1 x)).(or_ind (pr0 t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda +(w2: T).(subst0 i u x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t))) (\lambda (H5: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 +c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x (pr2_free c t1 x H4) (pr2_free c t2 +x H5))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: +T).(subst0 i u x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda +(w2: T).(subst0 i u x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t))) (\lambda (x0: T).(\lambda (H6: (pr0 t2 x0)).(\lambda (H7: +(subst0 i u x x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t)) x0 (pr2_delta c d u i H0 t1 x H4 x0 H7) (pr2_free c t2 x0 +H6))))) H5)) (pr0_subst0 t4 x H3 u t2 i H2 u (pr0_refl u)))))) +(pr0_confluence t0 t4 H1 t1 H))))))))))))). + +fact pr2_confluence__pr2_delta_delta: + \forall (c: C).(\forall (d: C).(\forall (d0: C).(\forall (t0: T).(\forall +(t1: T).(\forall (t2: T).(\forall (t3: T).(\forall (t4: T).(\forall (u: +T).(\forall (u0: T).(\forall (i: nat).(\forall (i0: nat).((getl i c (CHead d +(Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t1) \to ((getl i0 c +(CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t4) \to ((subst0 i0 u0 t4 t2) \to +(ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 +t)))))))))))))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (d0: C).(\lambda (t0: T).(\lambda +(t1: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (u: +T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (i0: nat).(\lambda (H: (getl i +c (CHead d (Bind Abbr) u))).(\lambda (H0: (pr0 t0 t3)).(\lambda (H1: (subst0 +i u t3 t1)).(\lambda (H2: (getl i0 c (CHead d0 (Bind Abbr) u0))).(\lambda +(H3: (pr0 t0 t4)).(\lambda (H4: (subst0 i0 u0 t4 t2)).(ex2_ind T (\lambda (t: +T).(pr0 t4 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr2 c t1 +t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H5: (pr0 t4 +x)).(\lambda (H6: (pr0 t3 x)).(or_ind (pr0 t1 x) (ex2 T (\lambda (w2: T).(pr0 +t1 w2)) (\lambda (w2: T).(subst0 i u x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 +t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H7: (pr0 t1 x)).(or_ind (pr0 t2 +x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x +w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) +(\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda +(t: T).(pr2 c t2 t)) x (pr2_free c t1 x H7) (pr2_free c t2 x H8))) (\lambda +(H8: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x +w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 +u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) +(\lambda (x0: T).(\lambda (H9: (pr0 t2 x0)).(\lambda (H10: (subst0 i0 u0 x +x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) +x0 (pr2_delta c d0 u0 i0 H2 t1 x H7 x0 H10) (pr2_free c t2 x0 H9))))) H8)) +(pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))) (\lambda (H7: (ex2 T +(\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)))).(ex2_ind +T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)) (ex2 T +(\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x0: +T).(\lambda (H8: (pr0 t1 x0)).(\lambda (H9: (subst0 i u x x0)).(or_ind (pr0 +t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x +w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) +(\lambda (H10: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) +(\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H +t2 x H10 x0 H9))) (\lambda (H10: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) +(\lambda (w2: T).(subst0 i0 u0 x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 +w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 +t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x1: T).(\lambda (H11: (pr0 t2 +x1)).(\lambda (H12: (subst0 i0 u0 x x1)).(neq_eq_e i i0 (ex2 T (\lambda (t: +T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H13: (not (eq nat i +i0))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 +i0 u0 x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 +t))) (\lambda (x2: T).(\lambda (H14: (subst0 i u x1 x2)).(\lambda (H15: +(subst0 i0 u0 x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t)) x2 (pr2_delta c d0 u0 i0 H2 t1 x0 H8 x2 H15) (pr2_delta c d +u i H t2 x1 H11 x2 H14))))) (subst0_confluence_neq x x1 u0 i0 H12 x0 u i H9 +(sym_not_eq nat i i0 H13)))) (\lambda (H13: (eq nat i i0)).(let H14 \def +(eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u0 x x1)) H12 i H13) in (let H15 +\def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d0 (Bind Abbr) u0))) +H2 i H13) in (let H16 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: +C).(getl i c c0)) H (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind +Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in (let H17 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c0 _ _) +\Rightarrow c0])) (CHead d (Bind Abbr) u) (CHead d0 (Bind Abbr) u0) +(getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in +((let H18 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead +d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind +Abbr) u0) H15)) in (\lambda (H19: (eq C d d0)).(let H20 \def (eq_ind_r T u0 +(\lambda (t: T).(subst0 i t x x1)) H14 u H18) in (let H21 \def (eq_ind_r T u0 +(\lambda (t: T).(getl i c (CHead d0 (Bind Abbr) t))) H16 u H18) in (let H22 +\def (eq_ind_r C d0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H21 +d H19) in (or4_ind (eq T x1 x0) (ex2 T (\lambda (t: T).(subst0 i u x1 t)) +(\lambda (t: T).(subst0 i u x0 t))) (subst0 i u x1 x0) (subst0 i u x0 x1) +(ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda +(H23: (eq T x1 x0)).(let H24 \def (eq_ind T x1 (\lambda (t: T).(pr0 t2 t)) +H11 x0 H23) in (ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_free c t2 x0 H24)))) (\lambda +(H23: (ex2 T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u +x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: +T).(subst0 i u x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t))) (\lambda (x2: T).(\lambda (H24: (subst0 i u x1 +x2)).(\lambda (H25: (subst0 i u x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c +t1 t)) (\lambda (t: T).(pr2 c t2 t)) x2 (pr2_delta c d u i H22 t1 x0 H8 x2 +H25) (pr2_delta c d u i H22 t2 x1 H11 x2 H24))))) H23)) (\lambda (H23: +(subst0 i u x1 x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H22 t2 x1 H11 x0 +H23))) (\lambda (H23: (subst0 i u x0 x1)).(ex_intro2 T (\lambda (t: T).(pr2 c +t1 t)) (\lambda (t: T).(pr2 c t2 t)) x1 (pr2_delta c d u i H22 t1 x0 H8 x1 +H23) (pr2_free c t2 x1 H11))) (subst0_confluence_eq x x1 u i H20 x0 H9))))))) +H17)))))))))) H10)) (pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))))) +H7)) (pr0_subst0 t3 x H6 u t1 i H1 u (pr0_refl u)))))) (pr0_confluence t0 t4 +H3 t3 H0))))))))))))))))))). + +theorem pr2_confluence: + \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr2 c t0 t1) \to (\forall +(t2: T).((pr2 c t0 t2) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: +T).(pr2 c t2 t)))))))) +\def + \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr2 c t0 +t1)).(\lambda (t2: T).(\lambda (H0: (pr2 c t0 t2)).(let H1 \def (match H with +[(pr2_free c0 t3 t4 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: +(eq T t3 t0)).(\lambda (H4: (eq T t4 t1)).(eq_ind C c (\lambda (_: C).((eq T +t3 t0) \to ((eq T t4 t1) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t: T).(pr2 c +t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H5: (eq T t3 t0)).(eq_ind +T t0 (\lambda (t: T).((eq T t4 t1) \to ((pr0 t t4) \to (ex2 T (\lambda (t5: +T).(pr2 c t1 t5)) (\lambda (t5: T).(pr2 c t2 t5)))))) (\lambda (H6: (eq T t4 +t1)).(eq_ind T t1 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t5: +T).(pr2 c t1 t5)) (\lambda (t5: T).(pr2 c t2 t5))))) (\lambda (H7: (pr0 t0 +t1)).(let H8 \def (match H0 with [(pr2_free c1 t5 t6 H8) \Rightarrow (\lambda +(H9: (eq C c1 c)).(\lambda (H10: (eq T t5 t0)).(\lambda (H11: (eq T t6 +t2)).(eq_ind C c (\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 +t6) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 +t))))))) (\lambda (H12: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t6 +t2) \to ((pr0 t t6) \to (ex2 T (\lambda (t7: T).(pr2 c t1 t7)) (\lambda (t7: +T).(pr2 c t2 t7)))))) (\lambda (H13: (eq T t6 t2)).(eq_ind T t2 (\lambda (t: +T).((pr0 t0 t) \to (ex2 T (\lambda (t7: T).(pr2 c t1 t7)) (\lambda (t7: +T).(pr2 c t2 t7))))) (\lambda (H14: (pr0 t0 +t2)).(pr2_confluence__pr2_free_free c t0 t1 t2 H7 H14)) t6 (sym_eq T t6 t2 +H13))) t5 (sym_eq T t5 t0 H12))) c1 (sym_eq C c1 c H9) H10 H11 H8)))) | +(pr2_delta c1 d u i H8 t5 t6 H9 t H10) \Rightarrow (\lambda (H11: (eq C c1 +c)).(\lambda (H12: (eq T t5 t0)).(\lambda (H13: (eq T t t2)).(eq_ind C c +(\lambda (c2: C).((eq T t5 t0) \to ((eq T t t2) \to ((getl i c2 (CHead d +(Bind Abbr) u)) \to ((pr0 t5 t6) \to ((subst0 i u t6 t) \to (ex2 T (\lambda +(t7: T).(pr2 c t1 t7)) (\lambda (t7: T).(pr2 c t2 t7))))))))) (\lambda (H14: +(eq T t5 t0)).(eq_ind T t0 (\lambda (t7: T).((eq T t t2) \to ((getl i c +(CHead d (Bind Abbr) u)) \to ((pr0 t7 t6) \to ((subst0 i u t6 t) \to (ex2 T +(\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 t8)))))))) +(\lambda (H15: (eq T t t2)).(eq_ind T t2 (\lambda (t7: T).((getl i c (CHead d +(Bind Abbr) u)) \to ((pr0 t0 t6) \to ((subst0 i u t6 t7) \to (ex2 T (\lambda +(t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 t8))))))) (\lambda (H16: +(getl i c (CHead d (Bind Abbr) u))).(\lambda (H17: (pr0 t0 t6)).(\lambda +(H18: (subst0 i u t6 t2)).(pr2_confluence__pr2_free_delta c d t0 t1 t2 t6 u i +H7 H16 H17 H18)))) t (sym_eq T t t2 H15))) t5 (sym_eq T t5 t0 H14))) c1 +(sym_eq C c1 c H11) H12 H13 H8 H9 H10))))]) in (H8 (refl_equal C c) +(refl_equal T t0) (refl_equal T t2)))) t4 (sym_eq T t4 t1 H6))) t3 (sym_eq T +t3 t0 H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t3 t4 +H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t3 +t0)).(\lambda (H6: (eq T t t1)).(eq_ind C c (\lambda (c1: C).((eq T t3 t0) +\to ((eq T t t1) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t3 t4) +\to ((subst0 i u t4 t) \to (ex2 T (\lambda (t5: T).(pr2 c t1 t5)) (\lambda +(t5: T).(pr2 c t2 t5))))))))) (\lambda (H7: (eq T t3 t0)).(eq_ind T t0 +(\lambda (t5: T).((eq T t t1) \to ((getl i c (CHead d (Bind Abbr) u)) \to +((pr0 t5 t4) \to ((subst0 i u t4 t) \to (ex2 T (\lambda (t6: T).(pr2 c t1 +t6)) (\lambda (t6: T).(pr2 c t2 t6)))))))) (\lambda (H8: (eq T t t1)).(eq_ind +T t1 (\lambda (t5: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) +\to ((subst0 i u t4 t5) \to (ex2 T (\lambda (t6: T).(pr2 c t1 t6)) (\lambda +(t6: T).(pr2 c t2 t6))))))) (\lambda (H9: (getl i c (CHead d (Bind Abbr) +u))).(\lambda (H10: (pr0 t0 t4)).(\lambda (H11: (subst0 i u t4 t1)).(let H12 +\def (match H0 with [(pr2_free c1 t5 t6 H12) \Rightarrow (\lambda (H13: (eq C +c1 c)).(\lambda (H14: (eq T t5 t0)).(\lambda (H15: (eq T t6 t2)).(eq_ind C c +(\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T +(\lambda (t7: T).(pr2 c t1 t7)) (\lambda (t7: T).(pr2 c t2 t7))))))) (\lambda +(H16: (eq T t5 t0)).(eq_ind T t0 (\lambda (t7: T).((eq T t6 t2) \to ((pr0 t7 +t6) \to (ex2 T (\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 +t8)))))) (\lambda (H17: (eq T t6 t2)).(eq_ind T t2 (\lambda (t7: T).((pr0 t0 +t7) \to (ex2 T (\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 +t8))))) (\lambda (H18: (pr0 t0 t2)).(ex2_sym T (pr2 c t2) (pr2 c t1) +(pr2_confluence__pr2_free_delta c d t0 t2 t1 t4 u i H18 H9 H10 H11))) t6 +(sym_eq T t6 t2 H17))) t5 (sym_eq T t5 t0 H16))) c1 (sym_eq C c1 c H13) H14 +H15 H12)))) | (pr2_delta c1 d0 u0 i0 H12 t5 t6 H13 t7 H14) \Rightarrow +(\lambda (H15: (eq C c1 c)).(\lambda (H16: (eq T t5 t0)).(\lambda (H17: (eq T +t7 t2)).(eq_ind C c (\lambda (c2: C).((eq T t5 t0) \to ((eq T t7 t2) \to +((getl i0 c2 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t5 t6) \to ((subst0 i0 u0 +t6 t7) \to (ex2 T (\lambda (t8: T).(pr2 c t1 t8)) (\lambda (t8: T).(pr2 c t2 +t8))))))))) (\lambda (H18: (eq T t5 t0)).(eq_ind T t0 (\lambda (t8: T).((eq T +t7 t2) \to ((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t8 t6) \to +((subst0 i0 u0 t6 t7) \to (ex2 T (\lambda (t9: T).(pr2 c t1 t9)) (\lambda +(t9: T).(pr2 c t2 t9)))))))) (\lambda (H19: (eq T t7 t2)).(eq_ind T t2 +(\lambda (t8: T).((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t6) \to +((subst0 i0 u0 t6 t8) \to (ex2 T (\lambda (t9: T).(pr2 c t1 t9)) (\lambda +(t9: T).(pr2 c t2 t9))))))) (\lambda (H20: (getl i0 c (CHead d0 (Bind Abbr) +u0))).(\lambda (H21: (pr0 t0 t6)).(\lambda (H22: (subst0 i0 u0 t6 +t2)).(pr2_confluence__pr2_delta_delta c d d0 t0 t1 t2 t4 t6 u u0 i i0 H9 H10 +H11 H20 H21 H22)))) t7 (sym_eq T t7 t2 H19))) t5 (sym_eq T t5 t0 H18))) c1 +(sym_eq C c1 c H15) H16 H17 H12 H13 H14))))]) in (H12 (refl_equal C c) +(refl_equal T t0) (refl_equal T t2)))))) t (sym_eq T t t1 H8))) t3 (sym_eq T +t3 t0 H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C +c) (refl_equal T t0) (refl_equal T t1)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr2/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/props.ma new file mode 100644 index 000000000..d449b910f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/props.ma @@ -0,0 +1,998 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr2/fwd.ma". + +include "basic_1A/pr0/subst0.ma". + +lemma pr2_thin_dx: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(u: T).(\forall (f: F).(pr2 c (THead (Flat f) u t1) (THead (Flat f) u +t2))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(\lambda (u: T).(\lambda (f: F).(pr2_ind (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).(pr2 c0 (THead (Flat f) u t) (THead (Flat f) u t0))))) +(\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr0 t0 +t3)).(pr2_free c0 (THead (Flat f) u t0) (THead (Flat f) u t3) (pr0_comp u u +(pr0_refl u) t0 t3 H0 (Flat f))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind +Abbr) u0))).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (pr0 t0 +t3)).(\lambda (t: T).(\lambda (H2: (subst0 i u0 t3 t)).(pr2_delta c0 d u0 i +H0 (THead (Flat f) u t0) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t0 +t3 H1 (Flat f)) (THead (Flat f) u t) (subst0_snd (Flat f) u0 t t3 i H2 +u)))))))))))) c t1 t2 H)))))). + +lemma pr2_head_1: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u1 u2) \to (\forall +(k: K).(\forall (t: T).(pr2 c (THead k u1 t) (THead k u2 t))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u1 +u2)).(\lambda (k: K).(\lambda (t: T).(pr2_ind (\lambda (c0: C).(\lambda (t0: +T).(\lambda (t1: T).(pr2 c0 (THead k t0 t) (THead k t1 t))))) (\lambda (c0: +C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr0 t1 t2)).(pr2_free c0 +(THead k t1 t) (THead k t2 t) (pr0_comp t1 t2 H0 t t (pr0_refl t) k)))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H1: (pr0 t1 t2)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t2 +t0)).(pr2_delta c0 d u i H0 (THead k t1 t) (THead k t2 t) (pr0_comp t1 t2 H1 +t t (pr0_refl t) k) (THead k t0 t) (subst0_fst u t0 t2 i H2 t k)))))))))))) c +u1 u2 H)))))). + +lemma pr2_head_2: + \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).(\forall +(k: K).((pr2 (CHead c k u) t1 t2) \to (pr2 c (THead k u t1) (THead k u +t2))))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(k: K).(\lambda (H: (pr2 (CHead c k u) t1 t2)).(insert_eq C (CHead c k u) +(\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c (THead k u t1) (THead +k u t2))) (\lambda (y: C).(\lambda (H0: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: +C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c k u)) \to (pr2 c +(THead k u t) (THead k u t0)))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda +(t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c k +u))).(pr2_free c (THead k u t3) (THead k u t4) (pr0_comp u u (pr0_refl u) t3 +t4 H1 k))))))) (K_ind (\lambda (k0: K).(\forall (c0: C).(\forall (d: +C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Abbr) u0)) +\to (\forall (t3: T).(\forall (t4: T).((pr0 t3 t4) \to (\forall (t: +T).((subst0 i u0 t4 t) \to ((eq C c0 (CHead c k0 u)) \to (pr2 c (THead k0 u +t3) (THead k0 u t)))))))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n c0 +(CHead d (Bind Abbr) u0)) \to (\forall (t3: T).(\forall (t4: T).((pr0 t3 t4) +\to (\forall (t: T).((subst0 n u0 t4 t) \to ((eq C c0 (CHead c (Bind b) u)) +\to (pr2 c (THead (Bind b) u t3) (THead (Bind b) u t)))))))))) (\lambda (H1: +(getl O c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: (subst0 O u0 t4 +t)).(\lambda (H4: (eq C c0 (CHead c (Bind b) u))).(let H5 \def (eq_ind C c0 +(\lambda (c1: C).(getl O c1 (CHead d (Bind Abbr) u0))) H1 (CHead c (Bind b) +u) H4) in (let H6 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u0) +(CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u +(getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H5))) in ((let H7 +\def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | +(CHead _ k0 _) \Rightarrow (match k0 with [(Bind b0) \Rightarrow b0 | (Flat +_) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) +(clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) +u) (CHead d (Bind Abbr) u0) H5))) in ((let H8 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) +(CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d +(Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) +H5))) in (\lambda (H9: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H11 \def +(eq_ind T u0 (\lambda (t0: T).(subst0 O t0 t4 t)) H3 u H8) in (eq_ind B Abbr +(\lambda (b0: B).(pr2 c (THead (Bind b0) u t3) (THead (Bind b0) u t))) +(pr2_free c (THead (Bind Abbr) u t3) (THead (Bind Abbr) u t) (pr0_delta u u +(pr0_refl u) t3 t4 H2 t H11)) b H9))))) H7)) H6)))))))))) (\lambda (n: +nat).(\lambda (H1: (((getl n c0 (CHead d (Bind Abbr) u0)) \to (\forall (t3: +T).(\forall (t4: T).((pr0 t3 t4) \to (\forall (t: T).((subst0 n u0 t4 t) \to +((eq C c0 (CHead c (Bind b) u)) \to (pr2 c (THead (Bind b) u t3) (THead (Bind +b) u t))))))))))).(\lambda (H2: (getl (S n) c0 (CHead d (Bind Abbr) +u0))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda +(t: T).(\lambda (H4: (subst0 (S n) u0 t4 t)).(\lambda (H5: (eq C c0 (CHead c +(Bind b) u))).(let H6 \def (eq_ind C c0 (\lambda (c1: C).(getl (S n) c1 +(CHead d (Bind Abbr) u0))) H2 (CHead c (Bind b) u) H5) in (let H7 \def +(eq_ind C c0 (\lambda (c1: C).((getl n c1 (CHead d (Bind Abbr) u0)) \to +(\forall (t5: T).(\forall (t6: T).((pr0 t5 t6) \to (\forall (t0: T).((subst0 +n u0 t6 t0) \to ((eq C c1 (CHead c (Bind b) u)) \to (pr2 c (THead (Bind b) u +t5) (THead (Bind b) u t0)))))))))) H1 (CHead c (Bind b) u) H5) in (pr2_delta +c d u0 (r (Bind b) n) (getl_gen_S (Bind b) c (CHead d (Bind Abbr) u0) u n H6) +(THead (Bind b) u t3) (THead (Bind b) u t4) (pr0_comp u u (pr0_refl u) t3 t4 +H3 (Bind b)) (THead (Bind b) u t) (subst0_snd (Bind b) u0 t t4 (r (Bind b) n) +H4 u))))))))))))) i)))))) (\lambda (f: F).(\lambda (c0: C).(\lambda (d: +C).(\lambda (u0: T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n c0 +(CHead d (Bind Abbr) u0)) \to (\forall (t3: T).(\forall (t4: T).((pr0 t3 t4) +\to (\forall (t: T).((subst0 n u0 t4 t) \to ((eq C c0 (CHead c (Flat f) u)) +\to (pr2 c (THead (Flat f) u t3) (THead (Flat f) u t)))))))))) (\lambda (H1: +(getl O c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (H2: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H3: (subst0 O u0 t4 +t)).(\lambda (H4: (eq C c0 (CHead c (Flat f) u))).(let H5 \def (eq_ind C c0 +(\lambda (c1: C).(getl O c1 (CHead d (Bind Abbr) u0))) H1 (CHead c (Flat f) +u) H4) in (pr2_delta c d u0 O (getl_intro O c (CHead d (Bind Abbr) u0) c +(drop_refl c) (clear_gen_flat f c (CHead d (Bind Abbr) u0) u (getl_gen_O +(CHead c (Flat f) u) (CHead d (Bind Abbr) u0) H5))) (THead (Flat f) u t3) +(THead (Flat f) u t4) (pr0_comp u u (pr0_refl u) t3 t4 H2 (Flat f)) (THead +(Flat f) u t) (subst0_snd (Flat f) u0 t t4 O H3 u)))))))))) (\lambda (n: +nat).(\lambda (H1: (((getl n c0 (CHead d (Bind Abbr) u0)) \to (\forall (t3: +T).(\forall (t4: T).((pr0 t3 t4) \to (\forall (t: T).((subst0 n u0 t4 t) \to +((eq C c0 (CHead c (Flat f) u)) \to (pr2 c (THead (Flat f) u t3) (THead (Flat +f) u t))))))))))).(\lambda (H2: (getl (S n) c0 (CHead d (Bind Abbr) +u0))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda +(t: T).(\lambda (H4: (subst0 (S n) u0 t4 t)).(\lambda (H5: (eq C c0 (CHead c +(Flat f) u))).(let H6 \def (eq_ind C c0 (\lambda (c1: C).(getl (S n) c1 +(CHead d (Bind Abbr) u0))) H2 (CHead c (Flat f) u) H5) in (let H7 \def +(eq_ind C c0 (\lambda (c1: C).((getl n c1 (CHead d (Bind Abbr) u0)) \to +(\forall (t5: T).(\forall (t6: T).((pr0 t5 t6) \to (\forall (t0: T).((subst0 +n u0 t6 t0) \to ((eq C c1 (CHead c (Flat f) u)) \to (pr2 c (THead (Flat f) u +t5) (THead (Flat f) u t0)))))))))) H1 (CHead c (Flat f) u) H5) in (pr2_delta +c d u0 (r (Flat f) n) (getl_gen_S (Flat f) c (CHead d (Bind Abbr) u0) u n H6) +(THead (Flat f) u t3) (THead (Flat f) u t4) (pr0_comp u u (pr0_refl u) t3 t4 +H3 (Flat f)) (THead (Flat f) u t) (subst0_snd (Flat f) u0 t t4 (r (Flat f) n) +H4 u))))))))))))) i)))))) k) y t1 t2 H0))) H)))))). + +lemma clear_pr2_trans: + \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pr2 c2 t1 t2) \to +(\forall (c1: C).((clear c1 c2) \to (pr2 c1 t1 t2)))))) +\def + \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c2 t1 +t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\forall (c1: +C).((clear c1 c) \to (pr2 c1 t t0)))))) (\lambda (c: C).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (c1: C).(\lambda (_: +(clear c1 c)).(pr2_free c1 t3 t4 H0))))))) (\lambda (c: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind +Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 +t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c1: +C).(\lambda (H3: (clear c1 c)).(pr2_delta c1 d u i (clear_getl_trans i c +(CHead d (Bind Abbr) u) H0 c1 H3) t3 t4 H1 t H2))))))))))))) c2 t1 t2 H)))). + +lemma pr2_cflat: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(f: F).(\forall (v: T).(pr2 (CHead c (Flat f) v) t1 t2)))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(\lambda (f: F).(\lambda (v: T).(pr2_ind (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).(pr2 (CHead c0 (Flat f) v) t t0)))) (\lambda (c0: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(pr2_free +(CHead c0 (Flat f) v) t3 t4 H0))))) (\lambda (c0: C).(\lambda (d: C).(\lambda +(u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) +u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda +(t: T).(\lambda (H2: (subst0 i u t4 t)).(pr2_delta (CHead c0 (Flat f) v) d u +i (getl_flat c0 (CHead d (Bind Abbr) u) i H0 f v) t3 t4 H1 t H2))))))))))) c +t1 t2 H)))))). + +lemma pr2_ctail: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(k: K).(\forall (u: T).(pr2 (CTail k u c) t1 t2)))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(\lambda (k: K).(\lambda (u: T).(pr2_ind (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).(pr2 (CTail k u c0) t t0)))) (\lambda (c0: C).(\lambda +(t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(pr2_free (CTail k u c0) +t3 t4 H0))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: +nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: +(subst0 i u0 t4 t)).(pr2_delta (CTail k u c0) (CTail k u d) u0 i (getl_ctail +Abbr c0 d u0 i H0 k u) t3 t4 H1 t H2))))))))))) c t1 t2 H)))))). + +lemma pr2_change: + \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: +T).(\forall (t1: T).(\forall (t2: T).((pr2 (CHead c (Bind b) v1) t1 t2) \to +(\forall (v2: T).(pr2 (CHead c (Bind b) v2) t1 t2)))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda +(v1: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 (CHead c (Bind +b) v1) t1 t2)).(\lambda (v2: T).(insert_eq C (CHead c (Bind b) v1) (\lambda +(c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 (CHead c (Bind b) v2) t1 t2)) +(\lambda (y: C).(\lambda (H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: +C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Bind b) v1)) \to (pr2 +(CHead c (Bind b) v2) t t0))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda +(t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Bind b) +v1))).(pr2_free (CHead c (Bind b) v2) t3 t4 H2)))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H2: (getl i c0 +(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: +(pr0 t3 t4)).(\lambda (t: T).(\lambda (H4: (subst0 i u t4 t)).(\lambda (H5: +(eq C c0 (CHead c (Bind b) v1))).(let H6 \def (eq_ind C c0 (\lambda (c1: +C).(getl i c1 (CHead d (Bind Abbr) u))) H2 (CHead c (Bind b) v1) H5) in +(nat_ind (\lambda (n: nat).((getl n (CHead c (Bind b) v1) (CHead d (Bind +Abbr) u)) \to ((subst0 n u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t)))) +(\lambda (H7: (getl O (CHead c (Bind b) v1) (CHead d (Bind Abbr) +u))).(\lambda (H8: (subst0 O u t4 t)).(let H9 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) +(CHead d (Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d +(Bind Abbr) u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) +H7))) in ((let H10 \def (f_equal C B (\lambda (e: C).(match e with [(CSort _) +\Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) u) v1 +(getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in ((let H11 +\def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) (CHead c (Bind b) +v1) (clear_gen_bind b c (CHead d (Bind Abbr) u) v1 (getl_gen_O (CHead c (Bind +b) v1) (CHead d (Bind Abbr) u) H7))) in (\lambda (H12: (eq B Abbr +b)).(\lambda (_: (eq C d c)).(let H14 \def (eq_ind T u (\lambda (t0: +T).(subst0 O t0 t4 t)) H8 v1 H11) in (let H15 \def (eq_ind_r B b (\lambda +(b0: B).(not (eq B b0 Abbr))) H Abbr H12) in (eq_ind B Abbr (\lambda (b0: +B).(pr2 (CHead c (Bind b0) v2) t3 t)) (let H16 \def (match (H15 (refl_equal B +Abbr)) in False with []) in H16) b H12)))))) H10)) H9)))) (\lambda (i0: +nat).(\lambda (_: (((getl i0 (CHead c (Bind b) v1) (CHead d (Bind Abbr) u)) +\to ((subst0 i0 u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t))))).(\lambda +(H7: (getl (S i0) (CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda +(H8: (subst0 (S i0) u t4 t)).(pr2_delta (CHead c (Bind b) v2) d u (S i0) +(getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c +(CHead d (Bind Abbr) u) v1 i0 H7) v2) t3 t4 H3 t H8))))) i H6 H4))))))))))))) +y t1 t2 H1))) H0)))))))). + +lemma pr2_lift: + \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h +d c e) \to (\forall (t1: T).(\forall (t2: T).((pr2 e t1 t2) \to (pr2 c (lift +h d t1) (lift h d t2))))))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 e t1 +t2)).(insert_eq C e (\lambda (c0: C).(pr2 c0 t1 t2)) (\lambda (_: C).(pr2 c +(lift h d t1) (lift h d t2))) (\lambda (y: C).(\lambda (H1: (pr2 y t1 +t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 e) +\to (pr2 c (lift h d t) (lift h d t0)))))) (\lambda (c0: C).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (_: (eq C c0 +e)).(pr2_free c (lift h d t3) (lift h d t4) (pr0_lift t3 t4 H2 h d))))))) +(\lambda (c0: C).(\lambda (d0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H2: (getl i c0 (CHead d0 (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (H3: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H4: (subst0 i u t4 +t)).(\lambda (H5: (eq C c0 e)).(let H6 \def (eq_ind C c0 (\lambda (c1: +C).(getl i c1 (CHead d0 (Bind Abbr) u))) H2 e H5) in (lt_le_e i d (pr2 c +(lift h d t3) (lift h d t)) (\lambda (H7: (lt i d)).(let H8 \def +(drop_getl_trans_le i d (le_S_n i d (le_S_n (S i) (S d) (le_S (S (S i)) (S d) +(le_n_S (S i) d H7)))) c e h H (CHead d0 (Bind Abbr) u) H6) in (ex3_2_ind C C +(\lambda (e0: C).(\lambda (_: C).(drop i O c e0))) (\lambda (e0: C).(\lambda +(e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear +e1 (CHead d0 (Bind Abbr) u)))) (pr2 c (lift h d t3) (lift h d t)) (\lambda +(x0: C).(\lambda (x1: C).(\lambda (H9: (drop i O c x0)).(\lambda (H10: (drop +h (minus d i) x0 x1)).(\lambda (H11: (clear x1 (CHead d0 (Bind Abbr) +u))).(let H12 \def (eq_ind nat (minus d i) (\lambda (n: nat).(drop h n x0 +x1)) H10 (S (minus d (S i))) (minus_x_Sy d i H7)) in (let H13 \def +(drop_clear_S x1 x0 h (minus d (S i)) H12 Abbr d0 u H11) in (ex2_ind C +(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d (S i)) +u)))) (\lambda (c1: C).(drop h (minus d (S i)) c1 d0)) (pr2 c (lift h d t3) +(lift h d t)) (\lambda (x: C).(\lambda (H14: (clear x0 (CHead x (Bind Abbr) +(lift h (minus d (S i)) u)))).(\lambda (_: (drop h (minus d (S i)) x +d0)).(pr2_delta c x (lift h (minus d (S i)) u) i (getl_intro i c (CHead x +(Bind Abbr) (lift h (minus d (S i)) u)) x0 H9 H14) (lift h d t3) (lift h d +t4) (pr0_lift t3 t4 H3 h d) (lift h d t) (subst0_lift_lt t4 t u i H4 d H7 +h))))) H13)))))))) H8))) (\lambda (H7: (le d i)).(pr2_delta c d0 u (plus i h) +(drop_getl_trans_ge i c e d h H (CHead d0 (Bind Abbr) u) H6 H7) (lift h d t3) +(lift h d t4) (pr0_lift t3 t4 H3 h d) (lift h d t) (subst0_lift_ge t4 t u i h +H4 d H7)))))))))))))))) y t1 t2 H1))) H0)))))))). + +lemma pr2_gen_abbr: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c +(THead (Bind Abbr) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(or3 (\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))) (ex2 T (\lambda (u: +T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t2))) (ex3_2 T +T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) +(\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c (Bind Abbr) u1) z t2)))))))) (\forall (b: B).(\forall (u: +T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr2 c (THead (Bind Abbr) u1 t1) x)).(insert_eq T (THead (Bind Abbr) u1 +t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(or3 +(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))) (ex2 T +(\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 +t2))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) +u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t2)))))))) (\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))) +(\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: C).(\lambda +(t: T).(\lambda (t0: T).((eq T t (THead (Bind Abbr) u1 t1)) \to (or (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +t2))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind +Abbr) u) t1 t2))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 +(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) +(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t2)))))))) +(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O +t0))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: +(pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Bind Abbr) u1 t1))).(let H3 \def +(eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Bind Abbr) u1 t1) H2) in +(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t3))))))) (pr0 t1 (lift (S O) O t2)) (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind +b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead +c0 (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z +t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +(lift (S O) O t2))))) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T +(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 +t3)))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda +(u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t3)))))) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T +(\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 +t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) +u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O t2))))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t2 (THead (Bind Abbr) +x0 x1))).(\lambda (H6: (pr0 u1 x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T +(\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 +x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda +(y0: T).(subst0 O x0 y0 x1))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: +B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: +T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 +T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) +(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: +T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O t2))))) (\lambda (H7: (pr0 t1 +x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind +Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 +(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) +(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) +(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O +t)))))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead +(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: +B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: +T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 +T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) +(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: +T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) +x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: +T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) +(\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda +(y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) +(pr2_free c0 u1 x0 H6) (or3_intro0 (\forall (b: B).(\forall (u: T).(pr2 +(CHead c0 (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda +(u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead +c0 (Bind b) u) t1 x1 H7)))))) t2 H5)) (\lambda (H_x0: (ex2 T (\lambda (y0: +T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 x1)))).(ex2_ind T (\lambda +(y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 x1)) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind +Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 +(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) +(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) +(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O +t2))))) (\lambda (x2: T).(\lambda (H7: (pr0 t1 x2)).(\lambda (H8: (subst0 O +x0 x2 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind +Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 +(Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) +(\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) +(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O +t)))))) (ex2_ind T (\lambda (t: T).(subst0 O u1 x2 t)) (\lambda (t: T).(pr0 t +x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind +Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: +B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: +T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 +T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) +(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: +T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1)))))) +(\lambda (x3: T).(\lambda (_: (subst0 O u1 x2 x3)).(\lambda (_: (pr0 x3 +x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead +(Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: +B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: +T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 +T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) +(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: +T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) +x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 +u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: +T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) +(\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda +(y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) +(pr2_free c0 u1 x0 H6) (or3_intro1 (\forall (b: B).(\forall (u: T).(pr2 +(CHead c0 (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda +(u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z x1)))) (ex_intro2 T (\lambda (u: T).(pr0 u1 u)) (\lambda +(u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 x1)) x0 H6 (pr2_delta (CHead c0 (Bind +Abbr) x0) c0 x0 O (getl_refl Abbr c0 x0) t1 x2 H7 x1 H8)))))))) +(pr0_subst0_back x0 x2 x1 O H8 u1 H6)) t2 H5)))) H_x0)) H_x)))))) H4)) +(\lambda (H4: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 t3))) (ex2 T +(\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c0 (Bind Abbr) u) t1 +t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) +u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift (S O) O t2)))) +(\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) t1 (lift (S +O) O t2) H4))))) (pr0_gen_abbr u1 t1 t2 H3)))))))) (\lambda (c0: C).(\lambda +(d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d +(Bind Abbr) u))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H2: (pr0 t0 +t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 t)).(\lambda (H4: (eq T t0 +(THead (Bind Abbr) u1 t1))).(let H5 \def (eq_ind T t0 (\lambda (t3: T).(pr0 +t3 t2)) H2 (THead (Bind Abbr) u1 t1) H4) in (or_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 +t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 +t3))))))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: +T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) +(ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 +y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda +(z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (H6: +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: +T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O u2 y0 t3)))))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 +t1 t3) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O u2 y0 +t3)))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H7: (eq T t2 (THead (Bind Abbr) x0 x1))).(\lambda (H8: (pr0 u1 +x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T (\lambda (y0: T).(pr0 t1 y0)) +(\lambda (y0: T).(subst0 O x0 y0 x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda +(y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 O x0 y0 x1))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z +t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T t2 +(\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Bind Abbr) x0 x1) H7) in +(or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda +(u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind +Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z +t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t (THead +(Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 +i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x2: T).(\lambda (H12: (eq T +t (THead (Bind Abbr) x2 x1))).(\lambda (H13: (subst0 i u x0 x2)).(or_introl +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 +(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: +T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x2 x1 H12 +(pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (or3_intro0 (\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 +u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x1))) (ex3_2 T T +(\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) +(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c0 (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u0: +T).(pr2_free (CHead c0 (Bind b) u0) t1 x1 H9))))))))) H11)) (\lambda (H11: +(ex2 T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x0 t3))) (\lambda (t3: +T).(subst0 (s (Bind Abbr) i) u x1 t3)))).(ex2_ind T (\lambda (t3: T).(eq T t +(THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 +t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind +Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 +(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: +T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x2: T).(\lambda (H12: (eq T +t (THead (Bind Abbr) x0 x2))).(\lambda (H13: (subst0 (s (Bind Abbr) i) u x1 +x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x0 x2 H12 +(pr2_free c0 u1 x0 H8) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 x2))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x2))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z x2)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta +(CHead c0 (Bind b) u0) d u (S i) (getl_head (Bind b) i c0 (CHead d (Bind +Abbr) u) H1 u0) t1 x1 H9 x2 H13))))))))) H11)) (\lambda (H11: (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z +t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq T t +(THead (Bind Abbr) x2 x3))).(\lambda (H13: (subst0 i u x0 x2)).(\lambda (H14: +(subst0 (s (Bind Abbr) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 +(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: +T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3))))))) x2 x3 H12 (pr2_delta c0 d u i H1 u1 x0 H8 x2 +H13) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) +t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z x3)))) +(\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) +(getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H9 x3 +H14))))))))))) H11)) (subst0_gen_head (Bind Abbr) u x0 x1 t i H10)))) +(\lambda (H_x0: (ex2 T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: T).(subst0 +O x0 y0 x1)))).(ex2_ind T (\lambda (y0: T).(pr0 t1 y0)) (\lambda (y0: +T).(subst0 O x0 y0 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: +T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) +(\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda +(y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x2: T).(\lambda (H9: (pr0 +t1 x2)).(\lambda (H10: (subst0 O x0 x2 x1)).(let H11 \def (eq_ind T t2 +(\lambda (t3: T).(subst0 i u t3 t)) H3 (THead (Bind Abbr) x0 x1) H7) in +(or3_ind (ex2 T (\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda +(u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind +Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z +t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (H12: (ex2 T (\lambda (u2: T).(eq T t (THead +(Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 +i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x3: T).(\lambda (H13: (eq T +t (THead (Bind Abbr) x3 x1))).(\lambda (H14: (subst0 i u x0 x3)).(ex2_ind T +(\lambda (t3: T).(subst0 O u1 x2 t3)) (\lambda (t3: T).(pr0 t3 x1)) (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 +(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: +T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x4: T).(\lambda (_: (subst0 +O u1 x2 x4)).(\lambda (_: (pr0 x4 x1)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 +(Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: +T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3))))))) x3 x1 H13 (pr2_delta c0 d u i H1 u1 x0 H8 x3 +H14) (or3_intro1 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) +t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 x1))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z x1)))) +(ex_intro2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 x1)) x0 H8 (pr2_delta (CHead c0 (Bind Abbr) x0) c0 x0 O +(getl_refl Abbr c0 x0) t1 x2 H9 x1 H10)))))))) (pr0_subst0_back x0 x2 x1 O +H10 u1 H8))))) H12)) (\lambda (H12: (ex2 T (\lambda (t3: T).(eq T t (THead +(Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Abbr) x0 t3))) +(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)) (or (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) +(\lambda (x3: T).(\lambda (H13: (eq T t (THead (Bind Abbr) x0 x3))).(\lambda +(H14: (subst0 (s (Bind Abbr) i) u x1 x3)).(ex2_ind T (\lambda (t3: T).(subst0 +O u1 x2 t3)) (\lambda (t3: T).(pr0 t3 x1)) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) +(\lambda (x4: T).(\lambda (H15: (subst0 O u1 x2 x4)).(\lambda (H16: (pr0 x4 +x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x0 x3 H13 +(pr2_free c0 u1 x0 H8) (or3_intro2 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z x3)))) (ex3_2_intro T T (\lambda (y0: T).(\lambda (_: +T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: +T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) +u1) z x3))) x4 x1 (pr2_delta (CHead c0 (Bind Abbr) u1) c0 u1 O (getl_refl +Abbr c0 u1) t1 x2 H9 x4 H15) H16 (pr2_delta (CHead c0 (Bind Abbr) u1) d u (S +i) (getl_head (Bind Abbr) i c0 (CHead d (Bind Abbr) u) H1 u1) x1 x1 (pr0_refl +x1) x3 H14)))))))) (pr0_subst0_back x0 x2 x1 O H10 u1 H8))))) H12)) (\lambda +(H12: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 +(Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z +t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H13: (eq T t +(THead (Bind Abbr) x3 x4))).(\lambda (H14: (subst0 i u x0 x3)).(\lambda (H15: +(subst0 (s (Bind Abbr) i) u x1 x4)).(ex2_ind T (\lambda (t3: T).(subst0 O u1 +x2 t3)) (\lambda (t3: T).(pr0 t3 x1)) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) +(\lambda (x5: T).(\lambda (H16: (subst0 O u1 x2 x5)).(\lambda (H17: (pr0 x5 +x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead +(Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda +(u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead +c0 (Bind b) u0) t1 (lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3))))))) x3 x4 H13 +(pr2_delta c0 d u i H1 u1 x0 H8 x3 H14) (or3_intro2 (\forall (b: B).(\forall +(u0: T).(pr2 (CHead c0 (Bind b) u0) t1 x4))) (ex2 T (\lambda (u0: T).(pr0 u1 +u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) t1 x4))) (ex3_2 T T +(\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) +(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c0 (Bind Abbr) u1) z x4)))) (ex3_2_intro T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c0 (Bind Abbr) u1) t1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead +c0 (Bind Abbr) u1) z x4))) x5 x1 (pr2_delta (CHead c0 (Bind Abbr) u1) c0 u1 O +(getl_refl Abbr c0 u1) t1 x2 H9 x5 H16) H17 (pr2_delta (CHead c0 (Bind Abbr) +u1) d u (S i) (getl_head (Bind Abbr) i c0 (CHead d (Bind Abbr) u) H1 u1) x1 +x1 (pr0_refl x1) x4 H15)))))))) (pr0_subst0_back x0 x2 x1 O H10 u1 H8))))))) +H12)) (subst0_gen_head (Bind Abbr) u x0 x1 t i H11)))))) H_x0)) H_x)))))) +H6)) (\lambda (H6: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 +(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3))) (ex2 T +(\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c0 (Bind Abbr) u0) +t1 t3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c0 (Bind +Abbr) u1) t1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: +T).(\lambda (z: T).(pr2 (CHead c0 (Bind Abbr) u1) z t3)))))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) +(\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) +(getl_head (Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 (lift (S O) O t2) +H6 (lift (S O) O t) (subst0_lift_ge_S t2 t u i H3 O (le_O_n i))))))) +(pr0_gen_abbr u1 t1 t2 H5)))))))))))))) c y x H0))) H))))). + +lemma pr2_gen_void: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c +(THead (Bind Void) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))) (\forall (b: B).(\forall (u: +T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr2 c (THead (Bind Void) u1 t1) x)).(insert_eq T (THead (Bind Void) u1 +t1) (\lambda (t: T).(pr2 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))) (\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))) +(\lambda (y: T).(\lambda (H0: (pr2 c y x)).(pr2_ind (\lambda (c0: C).(\lambda +(t: T).(\lambda (t0: T).((eq T t (THead (Bind Void) u1 t1)) \to (or (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Void) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +t2)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 (lift +(S O) O t0))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (H1: (pr0 t0 t2)).(\lambda (H2: (eq T t0 (THead (Bind Void) u1 +t1))).(let H3 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t2)) H1 (THead (Bind +Void) u1 t1) H2) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O +t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind +b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) +t1 (lift (S O) O t2))))) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 +(CHead c0 (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead +c0 (Bind b) u) t1 (lift (S O) O t2))))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H5: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H6: (pr0 u1 +x0)).(\lambda (H7: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Void) x0 x1) +(\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 +(CHead c0 (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead +c0 (Bind b) u) t1 (lift (S O) O t)))))) (or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) +u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +(lift (S O) O (THead (Bind Void) x0 x1))))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) +u) t1 t3))))) x0 x1 (refl_equal T (THead (Bind Void) x0 x1)) (pr2_free c0 u1 +x0 H6) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c0 (Bind b) u) t1 x1 +H7))))) t2 H5)))))) H4)) (\lambda (H4: (pr0 t1 (lift (S O) O t2))).(or_intror +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) +u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c0 (Bind b) u) t1 +(lift (S O) O t2)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c0 +(Bind b) u) t1 (lift (S O) O t2) H4))))) (pr0_gen_void u1 t1 t2 H3)))))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H1: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (H2: (pr0 t0 t2)).(\lambda (t: T).(\lambda (H3: (subst0 i u t2 +t)).(\lambda (H4: (eq T t0 (THead (Bind Void) u1 t1))).(let H5 \def (eq_ind T +t0 (\lambda (t3: T).(pr0 t3 t2)) H2 (THead (Bind Void) u1 t1) H4) in (or_ind +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))).(ex3_2_ind +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t +(THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H7: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H8: (pr0 u1 +x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T t2 (\lambda (t3: +T).(subst0 i u t3 t)) H3 (THead (Bind Void) x0 x1) H7) in (or3_ind (ex2 T +(\lambda (u2: T).(eq T t (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 +i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T t (THead (Bind Void) x0 t3))) +(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Bind Void) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) +(\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t (THead (Bind Void) u2 x1))) +(\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t +(THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (x2: T).(\lambda (H12: (eq T t (THead (Bind +Void) x2 x1))).(\lambda (H13: (subst0 i u x0 x2)).(or_introl (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T +t (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 +u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 +(CHead c0 (Bind b) u0) t1 t3))))) x2 x1 H12 (pr2_delta c0 d u i H1 u1 x0 H8 +x2 H13) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c0 (Bind b) u0) t1 +x1 H9)))))))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t (THead +(Bind Void) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t (THead (Bind Void) x0 t3))) +(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3)) (or (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t))))) +(\lambda (x2: T).(\lambda (H12: (eq T t (THead (Bind Void) x0 x2))).(\lambda +(H13: (subst0 (s (Bind Void) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) t1 t3))))) x0 x2 H12 (pr2_free c0 u1 x0 H8) (\lambda (b: B).(\lambda (u0: +T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) (getl_head (Bind b) i c0 +(CHead d (Bind Abbr) u) H1 u0) t1 x1 H9 x2 H13)))))))) H11)) (\lambda (H11: +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 +(lift (S O) O t))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq T t +(THead (Bind Void) x2 x3))).(\lambda (H13: (subst0 i u x0 x2)).(\lambda (H14: +(subst0 (s (Bind Void) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: +B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c0 (Bind b) +u0) t1 t3))))) x2 x3 H12 (pr2_delta c0 d u i H1 u1 x0 H8 x2 H13) (\lambda (b: +B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) (getl_head +(Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 x1 H9 x3 H14)))))))))) H11)) +(subst0_gen_head (Bind Void) u x0 x1 t i H10)))))))) H6)) (\lambda (H6: (pr0 +t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 +c0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: +T).(pr2 (CHead c0 (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: +T).(pr2 (CHead c0 (Bind b) u0) t1 (lift (S O) O t)))) (\lambda (b: +B).(\lambda (u0: T).(pr2_delta (CHead c0 (Bind b) u0) d u (S i) (getl_head +(Bind b) i c0 (CHead d (Bind Abbr) u) H1 u0) t1 (lift (S O) O t2) H6 (lift (S +O) O t) (subst0_lift_ge_S t2 t u i H3 O (le_O_n i))))))) (pr0_gen_void u1 t1 +t2 H5)))))))))))))) c y x H0))) H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr2/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr2/subst1.ma new file mode 100644 index 000000000..95a98ab88 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr2/subst1.ma @@ -0,0 +1,265 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr2/fwd.ma". + +include "basic_1A/pr0/subst1.ma". + +include "basic_1A/csubst1/getl.ma". + +include "basic_1A/subst1/subst1.ma". + +lemma pr2_delta1: + \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) u)) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) +\to (\forall (t: T).((subst1 i u t2 t) \to (pr2 c t1 t)))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H1: (subst1 i u t2 +t)).(subst1_ind i u t2 (\lambda (t0: T).(pr2 c t1 t0)) (pr2_free c t1 t2 H0) +(\lambda (t0: T).(\lambda (H2: (subst0 i u t2 t0)).(pr2_delta c d u i H t1 t2 +H0 t0 H2))) t H1)))))))))). + +lemma pr2_subst1: + \forall (c: C).(\forall (e: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead e (Bind Abbr) v)) \to (\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) +\to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c +w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead e (Bind Abbr) v))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H0: (pr2 c t1 t2)).(insert_eq C c (\lambda (c0: C).(pr2 c0 t1 +t2)) (\lambda (c0: C).(\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T +(\lambda (w2: T).(pr2 c0 w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))) +(\lambda (y: C).(\lambda (H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: +C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to (\forall (w1: +T).((subst1 i v t w1) \to (ex2 T (\lambda (w2: T).(pr2 c0 w1 w2)) (\lambda +(w2: T).(subst1 i v t0 w2))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda +(t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (H3: (eq C c0 c)).(\lambda (w1: +T).(\lambda (H4: (subst1 i v t3 w1)).(eq_ind_r C c (\lambda (c1: C).(ex2 T +(\lambda (w2: T).(pr2 c1 w1 w2)) (\lambda (w2: T).(subst1 i v t4 w2)))) +(ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v t4 w2)) +(ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t4 w2))) +(\lambda (x: T).(\lambda (H5: (pr0 w1 x)).(\lambda (H6: (subst1 i v t4 +x)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v +t4 w2)) x (pr2_free c w1 x H5) H6)))) (pr0_subst1 t3 t4 H2 v w1 i H4 v +(pr0_refl v))) c0 H3)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i0: nat).(\lambda (H2: (getl i0 c0 (CHead d (Bind Abbr) +u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda +(t: T).(\lambda (H4: (subst0 i0 u t4 t)).(\lambda (H5: (eq C c0 c)).(\lambda +(w1: T).(\lambda (H6: (subst1 i v t3 w1)).(let H7 \def (eq_ind C c0 (\lambda +(c1: C).(getl i0 c1 (CHead d (Bind Abbr) u))) H2 c H5) in (eq_ind_r C c +(\lambda (c1: C).(ex2 T (\lambda (w2: T).(pr2 c1 w1 w2)) (\lambda (w2: +T).(subst1 i v t w2)))) (ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda +(w2: T).(subst1 i v t4 w2)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda +(w2: T).(subst1 i v t w2))) (\lambda (x: T).(\lambda (H8: (pr0 w1 +x)).(\lambda (H9: (subst1 i v t4 x)).(neq_eq_e i i0 (ex2 T (\lambda (w2: +T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t w2))) (\lambda (H10: (not +(eq nat i i0))).(ex2_ind T (\lambda (t0: T).(subst1 i v t t0)) (\lambda (t0: +T).(subst1 i0 u x t0)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: +T).(subst1 i v t w2))) (\lambda (x0: T).(\lambda (H11: (subst1 i v t +x0)).(\lambda (H12: (subst1 i0 u x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c +w1 w2)) (\lambda (w2: T).(subst1 i v t w2)) x0 (pr2_delta1 c d u i0 H7 w1 x +H8 x0 H12) H11)))) (subst1_confluence_neq t4 t u i0 (subst1_single i0 u t4 t +H4) x v i H9 (sym_not_eq nat i i0 H10)))) (\lambda (H10: (eq nat i i0)).(let +H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u t4 t)) H4 i H10) in +(let H12 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d (Bind +Abbr) u))) H7 i H10) in (let H13 \def (eq_ind C (CHead e (Bind Abbr) v) +(\lambda (c1: C).(getl i c c1)) H (CHead d (Bind Abbr) u) (getl_mono c (CHead +e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H12)) in (let H14 \def (f_equal +C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow e | (CHead c1 _ _) +\Rightarrow c1])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) u) (getl_mono +c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H12)) in ((let H15 \def +(f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow v | +(CHead _ _ t0) \Rightarrow t0])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) +u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H12)) in +(\lambda (H16: (eq C e d)).(let H17 \def (eq_ind_r T u (\lambda (t0: T).(getl +i c (CHead d (Bind Abbr) t0))) H13 v H15) in (let H18 \def (eq_ind_r T u +(\lambda (t0: T).(subst0 i t0 t4 t)) H11 v H15) in (let H19 \def (eq_ind_r C +d (\lambda (c1: C).(getl i c (CHead c1 (Bind Abbr) v))) H17 e H16) in +(ex2_ind T (\lambda (t0: T).(subst1 i v t t0)) (\lambda (t0: T).(subst1 i v x +t0)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t +w2))) (\lambda (x0: T).(\lambda (H20: (subst1 i v t x0)).(\lambda (H21: +(subst1 i v x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: +T).(subst1 i v t w2)) x0 (pr2_delta1 c e v i H19 w1 x H8 x0 H21) H20)))) +(subst1_confluence_eq t4 t v i (subst1_single i v t4 t H18) x H9))))))) +H14)))))))))) (pr0_subst1 t3 t4 H3 v w1 i H6 v (pr0_refl v))) c0 +H5))))))))))))))) y t1 t2 H1))) H0)))))))). + +lemma pr2_gen_cabbr: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) +\to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d +a0 a) \to (\forall (x1: T).((subst1 d u t1 (lift (S O) d x1)) \to (ex2 T +(\lambda (x2: T).(subst1 d u t2 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a +x1 x2)))))))))))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: +C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to +(\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 +a) \to (\forall (x1: T).((subst1 d u t (lift (S O) d x1)) \to (ex2 T (\lambda +(x2: T).(subst1 d u t0 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 +x2)))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (H0: (pr0 t3 t4)).(\lambda (e: C).(\lambda (u: T).(\lambda (d: +nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: +C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) +d a0 a)).(\lambda (x1: T).(\lambda (H4: (subst1 d u t3 (lift (S O) d +x1))).(ex2_ind T (\lambda (w2: T).(pr0 (lift (S O) d x1) w2)) (\lambda (w2: +T).(subst1 d u t4 w2)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d +x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H5: (pr0 +(lift (S O) d x1) x)).(\lambda (H6: (subst1 d u t4 x)).(ex2_ind T (\lambda +(t5: T).(eq T x (lift (S O) d t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T +(\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a +x1 x2))) (\lambda (x0: T).(\lambda (H7: (eq T x (lift (S O) d x0))).(\lambda +(H8: (pr0 x1 x0)).(let H9 \def (eq_ind T x (\lambda (t: T).(subst1 d u t4 t)) +H6 (lift (S O) d x0) H7) in (ex_intro2 T (\lambda (x2: T).(subst1 d u t4 +(lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2)) x0 H9 (pr2_free a x1 x0 +H8)))))) (pr0_gen_lift x1 x (S O) d H5))))) (pr0_subst1 t3 t4 H0 u (lift (S +O) d x1) d H4 u (pr0_refl u))))))))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind +Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 +t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (e: +C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e +(Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 +a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(\lambda (x1: +T).(\lambda (H6: (subst1 d0 u0 t3 (lift (S O) d0 x1))).(ex2_ind T (\lambda +(w2: T).(pr0 (lift (S O) d0 x1) w2)) (\lambda (w2: T).(subst1 d0 u0 t4 w2)) +(ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: +T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H7: (pr0 (lift (S O) d0 x1) +x)).(\lambda (H8: (subst1 d0 u0 t4 x)).(ex2_ind T (\lambda (t5: T).(eq T x +(lift (S O) d0 t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T (\lambda (x2: +T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) +(\lambda (x0: T).(\lambda (H9: (eq T x (lift (S O) d0 x0))).(\lambda (H10: +(pr0 x1 x0)).(let H11 \def (eq_ind T x (\lambda (t0: T).(subst1 d0 u0 t4 t0)) +H8 (lift (S O) d0 x0) H9) in (lt_eq_gt_e i d0 (ex2 T (\lambda (x2: T).(subst1 +d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (H12: +(lt i d0)).(ex2_ind T (\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: +T).(subst1 i u (lift (S O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 +t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: +T).(\lambda (H13: (subst1 d0 u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) +d0 x0) x2)).(ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 i) u0 (CHead d +(Bind Abbr) u) e2)) (\lambda (e2: C).(getl i a0 e2)) (ex2 T (\lambda (x3: +T).(subst1 d0 u0 t (lift (S O) d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) +(\lambda (x3: C).(\lambda (H15: (csubst1 (minus d0 i) u0 (CHead d (Bind Abbr) +u) x3)).(\lambda (H16: (getl i a0 x3)).(let H17 \def (eq_ind nat (minus d0 i) +(\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abbr) u) x3)) H15 (S (minus d0 +(S i))) (minus_x_Sy d0 i H12)) in (let H18 \def (csubst1_gen_head (Bind Abbr) +d x3 u u0 (minus d0 (S i)) H17) in (ex3_2_ind T C (\lambda (u2: T).(\lambda +(c2: C).(eq C x3 (CHead c2 (Bind Abbr) u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 (minus d0 (S i)) u0 u u2))) (\lambda (_: T).(\lambda (c2: +C).(csubst1 (minus d0 (S i)) u0 d c2))) (ex2 T (\lambda (x4: T).(subst1 d0 u0 +t (lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4))) (\lambda (x4: +T).(\lambda (x5: C).(\lambda (H19: (eq C x3 (CHead x5 (Bind Abbr) +x4))).(\lambda (H20: (subst1 (minus d0 (S i)) u0 u x4)).(\lambda (_: (csubst1 +(minus d0 (S i)) u0 d x5)).(let H22 \def (eq_ind C x3 (\lambda (c1: C).(getl +i a0 c1)) H16 (CHead x5 (Bind Abbr) x4) H19) in (let H23 \def (eq_ind nat d0 +(\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus i (minus d0 (S i)))) +(lt_plus_minus i d0 H12)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: +C).(eq T x4 (lift (S O) (minus d0 (S i)) v)))) (\lambda (v: T).(\lambda (e0: +C).(getl i a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: +C).(drop (S O) (minus d0 (S i)) x5 e0))) (ex2 T (\lambda (x6: T).(subst1 d0 +u0 t (lift (S O) d0 x6))) (\lambda (x6: T).(pr2 a x1 x6))) (\lambda (x6: +T).(\lambda (x7: C).(\lambda (H24: (eq T x4 (lift (S O) (minus d0 (S i)) +x6))).(\lambda (H25: (getl i a (CHead x7 (Bind Abbr) x6))).(\lambda (_: (drop +(S O) (minus d0 (S i)) x5 x7)).(let H27 \def (eq_ind T x4 (\lambda (t0: +T).(subst1 (minus d0 (S i)) u0 u t0)) H20 (lift (S O) (minus d0 (S i)) x6) +H24) in (ex2_ind T (\lambda (t0: T).(subst1 i (lift (S O) (minus d0 (S i)) +x6) (lift (S O) d0 x0) t0)) (\lambda (t0: T).(subst1 (S (plus (minus d0 (S +i)) i)) u0 x2 t0)) (ex2 T (\lambda (x8: T).(subst1 d0 u0 t (lift (S O) d0 +x8))) (\lambda (x8: T).(pr2 a x1 x8))) (\lambda (x8: T).(\lambda (H28: +(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) d0 x0) x8)).(\lambda +(H29: (subst1 (S (plus (minus d0 (S i)) i)) u0 x2 x8)).(let H30 \def (eq_ind +nat d0 (\lambda (n: nat).(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S +O) n x0) x8)) H28 (S (plus i (minus d0 (S i)))) (lt_plus_minus i d0 H12)) in +(ex2_ind T (\lambda (t5: T).(eq T x8 (lift (S O) (S (plus i (minus d0 (S +i)))) t5))) (\lambda (t5: T).(subst1 i x6 x0 t5)) (ex2 T (\lambda (x9: +T).(subst1 d0 u0 t (lift (S O) d0 x9))) (\lambda (x9: T).(pr2 a x1 x9))) +(\lambda (x9: T).(\lambda (H31: (eq T x8 (lift (S O) (S (plus i (minus d0 (S +i)))) x9))).(\lambda (H32: (subst1 i x6 x0 x9)).(let H33 \def (eq_ind T x8 +(\lambda (t0: T).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 t0)) H29 (lift +(S O) (S (plus i (minus d0 (S i)))) x9) H31) in (let H34 \def (eq_ind_r nat +(S (plus i (minus d0 (S i)))) (\lambda (n: nat).(subst1 (S (plus (minus d0 (S +i)) i)) u0 x2 (lift (S O) n x9))) H33 d0 (lt_plus_minus i d0 H12)) in (let +H35 \def (eq_ind_r nat (S (plus (minus d0 (S i)) i)) (\lambda (n: +nat).(subst1 n u0 x2 (lift (S O) d0 x9))) H34 d0 (lt_plus_minus_r i d0 H12)) +in (ex_intro2 T (\lambda (x10: T).(subst1 d0 u0 t (lift (S O) d0 x10))) +(\lambda (x10: T).(pr2 a x1 x10)) x9 (subst1_trans x2 t u0 d0 H13 (lift (S O) +d0 x9) H35) (pr2_delta1 a x7 x6 i H25 x1 x0 H10 x9 H32)))))))) +(subst1_gen_lift_lt x6 x0 x8 i (S O) (minus d0 (S i)) H30)))))) +(subst1_subst1_back (lift (S O) d0 x0) x2 u i H14 (lift (S O) (minus d0 (S +i)) x6) u0 (minus d0 (S i)) H27)))))))) (getl_drop_conf_lt Abbr a0 x5 x4 i +H22 a (S O) (minus d0 (S i)) H23))))))))) H18)))))) (csubst1_getl_lt d0 i H12 +c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0))))) (subst1_confluence_neq t4 t u i +(subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (lt_neq i d0 H12)))) +(\lambda (H12: (eq nat i d0)).(let H13 \def (eq_ind_r nat d0 (\lambda (n: +nat).(subst1 n u0 t4 (lift (S O) n x0))) H11 i H12) in (let H14 \def +(eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 i H12) in (let H15 +\def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 i H12) in +(let H16 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind +Abbr) u0))) H3 i H12) in (eq_ind nat i (\lambda (n: nat).(ex2 T (\lambda (x2: +T).(subst1 n u0 t (lift (S O) n x2))) (\lambda (x2: T).(pr2 a x1 x2)))) (let +H17 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c1: C).(getl i c0 c1)) +H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead +e (Bind Abbr) u0) H16)) in (let H18 \def (f_equal C C (\lambda (e0: C).(match +e0 with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d +(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) +i H0 (CHead e (Bind Abbr) u0) H16)) in ((let H19 \def (f_equal C T (\lambda +(e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow +t0])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d +(Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in (\lambda (H20: (eq C d +e)).(let H21 \def (eq_ind_r T u0 (\lambda (t0: T).(getl i c0 (CHead e (Bind +Abbr) t0))) H17 u H19) in (let H22 \def (eq_ind_r T u0 (\lambda (t0: +T).(subst1 i t0 t4 (lift (S O) i x0))) H13 u H19) in (let H23 \def (eq_ind_r +T u0 (\lambda (t0: T).(csubst1 i t0 c0 a0)) H15 u H19) in (eq_ind T u +(\lambda (t0: T).(ex2 T (\lambda (x2: T).(subst1 i t0 t (lift (S O) i x2))) +(\lambda (x2: T).(pr2 a x1 x2)))) (let H24 \def (eq_ind_r C e (\lambda (c1: +C).(getl i c0 (CHead c1 (Bind Abbr) u))) H21 d H20) in (ex2_ind T (\lambda +(t0: T).(subst1 i u t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) i x0) +t0)) (ex2 T (\lambda (x2: T).(subst1 i u t (lift (S O) i x2))) (\lambda (x2: +T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H25: (subst1 i u t +x2)).(\lambda (H26: (subst1 i u (lift (S O) i x0) x2)).(let H27 \def (eq_ind +T x2 (\lambda (t0: T).(subst1 i u t t0)) H25 (lift (S O) i x0) +(subst1_gen_lift_eq x0 u x2 (S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) +(\lambda (n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) (plus_sym i +(S O))) H26)) in (ex_intro2 T (\lambda (x3: T).(subst1 i u t (lift (S O) i +x3))) (\lambda (x3: T).(pr2 a x1 x3)) x0 H27 (pr2_free a x1 x0 H10)))))) +(subst1_confluence_eq t4 t u i (subst1_single i u t4 t H2) (lift (S O) i x0) +H22))) u0 H19)))))) H18))) d0 H12)))))) (\lambda (H12: (lt d0 i)).(ex2_ind T +(\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: T).(subst1 i u (lift (S +O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) +(\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H13: (subst1 d0 +u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) d0 x0) x2)).(ex2_ind T +(\lambda (t5: T).(eq T x2 (lift (S O) d0 t5))) (\lambda (t5: T).(subst1 +(minus i (S O)) u x0 t5)) (ex2 T (\lambda (x3: T).(subst1 d0 u0 t (lift (S O) +d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) (\lambda (x3: T).(\lambda (H15: (eq +T x2 (lift (S O) d0 x3))).(\lambda (H16: (subst1 (minus i (S O)) u x0 +x3)).(let H17 \def (eq_ind T x2 (\lambda (t0: T).(subst1 d0 u0 t t0)) H13 +(lift (S O) d0 x3) H15) in (ex_intro2 T (\lambda (x4: T).(subst1 d0 u0 t +(lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4)) x3 H17 (pr2_delta1 a d u +(minus i (S O)) (getl_drop_conf_ge i (CHead d (Bind Abbr) u) a0 +(csubst1_getl_ge d0 i (le_S_n d0 i (le_S_n (S d0) (S i) (le_S (S (S d0)) (S +i) (le_n_S (S d0) i H12)))) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) +d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) H12 (plus d0 +(S O)) (plus_sym d0 (S O)))) x1 x0 H10 x3 H16)))))) (subst1_gen_lift_ge u x0 +x2 i (S O) d0 H14 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) +H12 (plus d0 (S O)) (plus_sym d0 (S O)))))))) (subst1_confluence_neq t4 t u i +(subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (sym_not_eq nat d0 i +(lt_neq d0 i H12)))))))))) (pr0_gen_lift x1 x (S O) d0 H7))))) (pr0_subst1 t3 +t4 H1 u0 (lift (S O) d0 x1) d0 H6 u0 (pr0_refl u0))))))))))))))))))))))) c t1 +t2 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/defs.ma new file mode 100644 index 000000000..57297e8d8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/defs.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr2/defs.ma". + +inductive pr3 (c: C): T \to (T \to Prop) \def +| pr3_refl: \forall (t: T).(pr3 c t t) +| pr3_sing: \forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to (\forall (t3: +T).((pr3 c t2 t3) \to (pr3 c t1 t3))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/fwd.ma new file mode 100644 index 000000000..99999bad6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/fwd.ma @@ -0,0 +1,334 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/defs.ma". + +include "basic_1A/pr2/fwd.ma". + +implied rec lemma pr3_ind (c: C) (P: (T \to (T \to Prop))) (f: (\forall (t: +T).(P t t))) (f0: (\forall (t2: T).(\forall (t1: T).((pr2 c t1 t2) \to +(\forall (t3: T).((pr3 c t2 t3) \to ((P t2 t3) \to (P t1 t3)))))))) (t: T) +(t0: T) (p: pr3 c t t0) on p: P t t0 \def match p with [(pr3_refl t1) +\Rightarrow (f t1) | (pr3_sing t2 t1 p0 t3 p1) \Rightarrow (f0 t2 t1 p0 t3 p1 +((pr3_ind c P f f0) t2 t3 p1))]. + +lemma pr3_gen_sort: + \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr3 c (TSort n) x) \to +(eq T x (TSort n))))) +\def + \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr3 c (TSort +n) x)).(insert_eq T (TSort n) (\lambda (t: T).(pr3 c t x)) (\lambda (t: +T).(eq T x t)) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(pr3_ind c (\lambda +(t: T).(\lambda (t0: T).((eq T t (TSort n)) \to (eq T t0 t)))) (\lambda (t: +T).(\lambda (_: (eq T t (TSort n))).(refl_equal T t))) (\lambda (t2: +T).(\lambda (t1: T).(\lambda (H1: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda +(_: (pr3 c t2 t3)).(\lambda (H3: (((eq T t2 (TSort n)) \to (eq T t3 +t2)))).(\lambda (H4: (eq T t1 (TSort n))).(let H5 \def (eq_ind T t1 (\lambda +(t: T).(pr2 c t t2)) H1 (TSort n) H4) in (eq_ind_r T (TSort n) (\lambda (t: +T).(eq T t3 t)) (let H6 \def (eq_ind T t2 (\lambda (t: T).((eq T t (TSort n)) +\to (eq T t3 t))) H3 (TSort n) (pr2_gen_sort c t2 n H5)) in (H6 (refl_equal T +(TSort n)))) t1 H4))))))))) y x H0))) H)))). + +lemma pr3_gen_abst: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c +(THead (Bind Abst) u1 t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: +T).(pr3 (CHead c (Bind b) u) t1 t2)))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr3 c (THead (Bind Abst) u1 t1) x)).(insert_eq T (THead (Bind Abst) u1 +t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t2))))))) (\lambda (y: +T).(\lambda (H0: (pr3 c y x)).(unintro T t1 (\lambda (t: T).((eq T y (THead +(Bind Abst) u1 t)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead +c (Bind b) u) t t2)))))))) (unintro T u1 (\lambda (t: T).(\forall (x0: +T).((eq T y (THead (Bind Abst) t x0)) \to (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x0 t2))))))))) (pr3_ind c +(\lambda (t: T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: T).((eq T t +(THead (Bind Abst) x0 x1)) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) x1 t2))))))))))) (\lambda (t: T).(\lambda +(x0: T).(\lambda (x1: T).(\lambda (H1: (eq T t (THead (Bind Abst) x0 +x1))).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T t (THead (Bind +Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +x1 t2))))) x0 x1 H1 (pr3_refl c x0) (\lambda (b: B).(\lambda (u: T).(pr3_refl +(CHead c (Bind b) u) x1)))))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda +(H1: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (_: (pr3 c t2 t4)).(\lambda +(H3: ((\forall (x0: T).(\forall (x1: T).((eq T t2 (THead (Bind Abst) x0 x1)) +\to (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) +u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +x1 t5))))))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t3 +(THead (Bind Abst) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c +t t2)) H1 (THead (Bind Abst) x0 x1) H4) in (let H6 \def (pr2_gen_abst c x0 x1 +t2 H5) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead +(Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead +c (Bind b) u) x1 t5))))) (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T +t4 (THead (Bind Abst) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))) (\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) x1 t5)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda +(H7: (eq T t2 (THead (Bind Abst) x2 x3))).(\lambda (H8: (pr2 c x0 +x2)).(\lambda (H9: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +x1 x3))))).(let H10 \def (eq_ind T t2 (\lambda (t: T).(\forall (x4: +T).(\forall (x5: T).((eq T t (THead (Bind Abst) x4 x5)) \to (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) (\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x5 +t5)))))))))) H3 (THead (Bind Abst) x2 x3) H7) in (let H11 \def (H10 x2 x3 +(refl_equal T (THead (Bind Abst) x2 x3))) in (ex3_2_ind T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5))))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) +(\lambda (x4: T).(\lambda (x5: T).(\lambda (H12: (eq T t4 (THead (Bind Abst) +x4 x5))).(\lambda (H13: (pr3 c x2 x4)).(\lambda (H14: ((\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 x5))))).(ex3_2_intro T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abst) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5))))) +x4 x5 H12 (pr3_sing c x2 x0 H8 x4 H13) (\lambda (b: B).(\lambda (u: +T).(pr3_sing (CHead c (Bind b) u) x3 x1 (H9 b u) x5 (H14 b u)))))))))) +H11)))))))) H6)))))))))))) y x H0))))) H))))). + +lemma pr3_gen_cast: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c +(THead (Flat Cast) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 t2)))) (pr3 c +t1 x)))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr3 c (THead (Flat Cast) u1 t1) x)).(insert_eq T (THead (Flat Cast) u1 +t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 +t2)))) (pr3 c t1 x))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T +t1 (\lambda (t: T).((eq T y (THead (Flat Cast) u1 t)) \to (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c t t2)))) (pr3 c t x)))) (unintro T u1 (\lambda (t: T).(\forall +(x0: T).((eq T y (THead (Flat Cast) t x0)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c x0 +t2)))) (pr3 c x0 x))))) (pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall +(x0: T).(\forall (x1: T).((eq T t (THead (Flat Cast) x0 x1)) \to (or (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c x1 t2)))) (pr3 c x1 t0))))))) (\lambda (t: T).(\lambda (x0: +T).(\lambda (x1: T).(\lambda (H1: (eq T t (THead (Flat Cast) x0 +x1))).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: T).(or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c x1 t2)))) (pr3 c x1 t0))) (or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 c x1 t2)))) (pr3 c x1 (THead (Flat Cast) x0 x1)) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) +x0 x1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c +x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c x1 t2))) x0 x1 (refl_equal T +(THead (Flat Cast) x0 x1)) (pr3_refl c x0) (pr3_refl c x1))) t H1))))) +(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: +T).(\lambda (H2: (pr3 c t2 t4)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: +T).((eq T t2 (THead (Flat Cast) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 +t5)))) (pr3 c x1 t4))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: +(eq T t3 (THead (Flat Cast) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: +T).(pr2 c t t2)) H1 (THead (Flat Cast) x0 x1) H4) in (let H6 \def +(pr2_gen_cast c x0 x1 t2 H5) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t5: T).(eq T t2 (THead (Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr2 c x1 t5)))) (pr2 c +x1 t2) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat +Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4)) (\lambda (H7: (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Flat Cast) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr2 c x1 t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: +T).(eq T t2 (THead (Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr2 c x1 t5))) (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 +t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4)) (\lambda (x2: T).(\lambda +(x3: T).(\lambda (H8: (eq T t2 (THead (Flat Cast) x2 x3))).(\lambda (H9: (pr2 +c x0 x2)).(\lambda (H10: (pr2 c x1 x3)).(let H11 \def (eq_ind T t2 (\lambda +(t: T).(\forall (x4: T).(\forall (x5: T).((eq T t (THead (Flat Cast) x4 x5)) +\to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat +Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x5 t5)))) (pr3 c x5 t4)))))) H3 (THead (Flat Cast) +x2 x3) H8) in (let H12 \def (H11 x2 x3 (refl_equal T (THead (Flat Cast) x2 +x3))) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x3 t5)))) (pr3 c x3 t4) (or (ex3_2 T +T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4)) (\lambda (H13: (ex3_2 T T (\lambda +(u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x3 +t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x3 t5))) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 +t5)))) (pr3 c x1 t4)) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H14: (eq T +t4 (THead (Flat Cast) x4 x5))).(\lambda (H15: (pr3 c x2 x4)).(\lambda (H16: +(pr3 c x3 x5)).(eq_ind_r T (THead (Flat Cast) x4 x5) (\lambda (t: T).(or +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t (THead (Flat Cast) u2 +t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t))) (or_introl (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T (THead (Flat Cast) x4 x5) (THead +(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 (THead (Flat +Cast) x4 x5)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t5: T).(eq T (THead +(Flat Cast) x4 x5) (THead (Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5))) x4 x5 +(refl_equal T (THead (Flat Cast) x4 x5)) (pr3_sing c x2 x0 H9 x4 H15) +(pr3_sing c x3 x1 H10 x5 H16))) t4 H14)))))) H13)) (\lambda (H13: (pr3 c x3 +t4)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Flat Cast) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4) (pr3_sing c +x3 x1 H10 t4 H13))) H12)))))))) H7)) (\lambda (H7: (pr2 c x1 t2)).(or_intror +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Cast) u2 +t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x1 t5)))) (pr3 c x1 t4) (pr3_sing c t2 x1 H7 t4 +H2))) H6)))))))))))) y x H0))))) H))))). + +lemma pr3_gen_lift: + \forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall +(d: nat).((pr3 c (lift h d t1) x) \to (\forall (e: C).((drop h d c e) \to +(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr3 e t1 +t2)))))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (H: (pr3 c (lift h d t1) x)).(insert_eq T (lift h d t1) +(\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(\forall (e: C).((drop h d c e) +\to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr3 e +t1 t2)))))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T t1 (\lambda +(t: T).((eq T y (lift h d t)) \to (\forall (e: C).((drop h d c e) \to (ex2 T +(\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr3 e t t2))))))) +(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (x0: T).((eq T t (lift h +d x0)) \to (\forall (e: C).((drop h d c e) \to (ex2 T (\lambda (t2: T).(eq T +t0 (lift h d t2))) (\lambda (t2: T).(pr3 e x0 t2))))))))) (\lambda (t: +T).(\lambda (x0: T).(\lambda (H1: (eq T t (lift h d x0))).(\lambda (e: +C).(\lambda (_: (drop h d c e)).(ex_intro2 T (\lambda (t2: T).(eq T t (lift h +d t2))) (\lambda (t2: T).(pr3 e x0 t2)) x0 H1 (pr3_refl e x0))))))) (\lambda +(t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: +T).(\lambda (_: (pr3 c t2 t4)).(\lambda (H3: ((\forall (x0: T).((eq T t2 +(lift h d x0)) \to (\forall (e: C).((drop h d c e) \to (ex2 T (\lambda (t5: +T).(eq T t4 (lift h d t5))) (\lambda (t5: T).(pr3 e x0 t5))))))))).(\lambda +(x0: T).(\lambda (H4: (eq T t3 (lift h d x0))).(\lambda (e: C).(\lambda (H5: +(drop h d c e)).(let H6 \def (eq_ind T t3 (\lambda (t: T).(pr2 c t t2)) H1 +(lift h d x0) H4) in (let H7 \def (pr2_gen_lift c x0 t2 h d H6 e H5) in +(ex2_ind T (\lambda (t5: T).(eq T t2 (lift h d t5))) (\lambda (t5: T).(pr2 e +x0 t5)) (ex2 T (\lambda (t5: T).(eq T t4 (lift h d t5))) (\lambda (t5: +T).(pr3 e x0 t5))) (\lambda (x1: T).(\lambda (H8: (eq T t2 (lift h d +x1))).(\lambda (H9: (pr2 e x0 x1)).(ex2_ind T (\lambda (t5: T).(eq T t4 (lift +h d t5))) (\lambda (t5: T).(pr3 e x1 t5)) (ex2 T (\lambda (t5: T).(eq T t4 +(lift h d t5))) (\lambda (t5: T).(pr3 e x0 t5))) (\lambda (x2: T).(\lambda +(H10: (eq T t4 (lift h d x2))).(\lambda (H11: (pr3 e x1 x2)).(ex_intro2 T +(\lambda (t5: T).(eq T t4 (lift h d t5))) (\lambda (t5: T).(pr3 e x0 t5)) x2 +H10 (pr3_sing e x1 x0 H9 x2 H11))))) (H3 x1 H8 e H5))))) H7))))))))))))) y x +H0)))) H)))))). + +lemma pr3_gen_lref: + \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr3 c (TLRef n) x) \to +(or (eq T x (TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda +(_: T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T x (lift (S n) O v)))))))))) +\def + \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr3 c (TLRef +n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(pr3 c t x)) (\lambda (t: +T).(or (eq T x t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: +T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T x (lift (S n) O v)))))))) (\lambda (y: T).(\lambda (H0: (pr3 c y +x)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or +(eq T t0 t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: +T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T t0 (lift (S n) O v)))))))))) (\lambda (t: T).(\lambda (_: (eq T +t (TLRef n))).(or_introl (eq T t t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: +T).(\lambda (_: T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: +C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda +(_: T).(\lambda (v: T).(eq T t (lift (S n) O v)))))) (refl_equal T t)))) +(\lambda (t2: T).(\lambda (t1: T).(\lambda (H1: (pr2 c t1 t2)).(\lambda (t3: +T).(\lambda (H2: (pr3 c t2 t3)).(\lambda (H3: (((eq T t2 (TLRef n)) \to (or +(eq T t3 t2) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: +T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T t3 (lift (S n) O v)))))))))).(\lambda (H4: (eq T t1 (TLRef +n))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(pr2 c t t2)) H1 (TLRef n) H4) +in (eq_ind_r T (TLRef n) (\lambda (t: T).(or (eq T t3 t) (ex3_3 C T T +(\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead d (Bind +Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 (lift (S n) O +v)))))))) (let H6 \def (pr2_gen_lref c t2 n H5) in (or_ind (eq T t2 (TLRef +n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S n) O u))))) (or (eq T +t3 (TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: +T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T t3 (lift (S n) O v))))))) (\lambda (H7: (eq T t2 (TLRef +n))).(let H8 \def (eq_ind T t2 (\lambda (t: T).((eq T t (TLRef n)) \to (or +(eq T t3 t) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: +T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T t3 (lift (S n) O v))))))))) H3 (TLRef n) H7) in (let H9 \def +(eq_ind T t2 (\lambda (t: T).(pr3 c t t3)) H2 (TLRef n) H7) in (H8 +(refl_equal T (TLRef n)))))) (\lambda (H7: (ex2_2 C T (\lambda (d: +C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(eq T t2 (lift (S n) O u)))))).(ex2_2_ind C T (\lambda (d: +C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(eq T t2 (lift (S n) O u)))) (or (eq T t3 (TLRef n)) +(ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead +d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: T).(pr3 d u +v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 (lift (S n) O +v))))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H8: (getl n c (CHead x0 +(Bind Abbr) x1))).(\lambda (H9: (eq T t2 (lift (S n) O x1))).(let H10 \def +(eq_ind T t2 (\lambda (t: T).((eq T t (TLRef n)) \to (or (eq T t3 t) (ex3_3 C +T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead d (Bind +Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 (lift (S n) O +v))))))))) H3 (lift (S n) O x1) H9) in (let H11 \def (eq_ind T t2 (\lambda +(t: T).(pr3 c t t3)) H2 (lift (S n) O x1) H9) in (let H12 \def (pr3_gen_lift +c x1 t3 (S n) O H11 x0 (getl_drop Abbr c x0 x1 n H8)) in (ex2_ind T (\lambda +(t4: T).(eq T t3 (lift (S n) O t4))) (\lambda (t4: T).(pr3 x0 x1 t4)) (or (eq +T t3 (TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: +T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T t3 (lift (S n) O v))))))) (\lambda (x2: T).(\lambda (H13: (eq T +t3 (lift (S n) O x2))).(\lambda (H14: (pr3 x0 x1 x2)).(or_intror (eq T t3 +(TLRef n)) (ex3_3 C T T (\lambda (d: C).(\lambda (u: T).(\lambda (_: T).(getl +n c (CHead d (Bind Abbr) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (v: +T).(pr3 d u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T t3 +(lift (S n) O v)))))) (ex3_3_intro C T T (\lambda (d: C).(\lambda (u: +T).(\lambda (_: T).(getl n c (CHead d (Bind Abbr) u))))) (\lambda (d: +C).(\lambda (u: T).(\lambda (v: T).(pr3 d u v)))) (\lambda (_: C).(\lambda +(_: T).(\lambda (v: T).(eq T t3 (lift (S n) O v))))) x0 x1 x2 H8 H14 H13))))) +H12)))))))) H7)) H6)) t1 H4))))))))) y x H0))) H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/iso.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/iso.ma new file mode 100644 index 000000000..dca56eeb2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/iso.ma @@ -0,0 +1,1125 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/props.ma". + +include "basic_1A/iso/props.ma". + +include "basic_1A/tlist/fwd.ma". + +lemma pr3_iso_appls_abbr: + \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).(let u1 \def (THeads (Flat +Appl) vs (TLRef i)) in (\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) vs (lift (S i) O w)) +u2)))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind +(\lambda (t: TList).(let u1 \def (THeads (Flat Appl) t (TLRef i)) in (\forall +(u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to +(pr3 c (THeads (Flat Appl) t (lift (S i) O w)) u2)))))) (\lambda (u2: +T).(\lambda (H0: (pr3 c (TLRef i) u2)).(\lambda (H1: (((iso (TLRef i) u2) \to +(\forall (P: Prop).P)))).(let H2 \def (pr3_gen_lref c u2 i H0) in (or_ind (eq +T u2 (TLRef i)) (ex3_3 C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: +T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T u2 (lift (S i) O v)))))) (pr3 c (lift (S i) O w) u2) (\lambda +(H3: (eq T u2 (TLRef i))).(let H4 \def (eq_ind T u2 (\lambda (t: T).((iso +(TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H3) in (eq_ind_r T +(TLRef i) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (H4 (iso_refl (TLRef +i)) (pr3 c (lift (S i) O w) (TLRef i))) u2 H3))) (\lambda (H3: (ex3_3 C T T +(\lambda (d0: C).(\lambda (u: T).(\lambda (_: T).(getl i c (CHead d0 (Bind +Abbr) u))))) (\lambda (d0: C).(\lambda (u: T).(\lambda (v: T).(pr3 d0 u v)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (v: T).(eq T u2 (lift (S i) O +v))))))).(ex3_3_ind C T T (\lambda (d0: C).(\lambda (u: T).(\lambda (_: +T).(getl i c (CHead d0 (Bind Abbr) u))))) (\lambda (d0: C).(\lambda (u: +T).(\lambda (v: T).(pr3 d0 u v)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(v: T).(eq T u2 (lift (S i) O v))))) (pr3 c (lift (S i) O w) u2) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H4: (getl i c (CHead x0 +(Bind Abbr) x1))).(\lambda (H5: (pr3 x0 x1 x2)).(\lambda (H6: (eq T u2 (lift +(S i) O x2))).(let H7 \def (eq_ind T u2 (\lambda (t: T).((iso (TLRef i) t) +\to (\forall (P: Prop).P))) H1 (lift (S i) O x2) H6) in (eq_ind_r T (lift (S +i) O x2) (\lambda (t: T).(pr3 c (lift (S i) O w) t)) (let H8 \def (eq_ind C +(CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind +Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 (Bind Abbr) x1) +H4)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) w) +(CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x0 +(Bind Abbr) x1) H4)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e +with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind +Abbr) w) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) w) i H +(CHead x0 (Bind Abbr) x1) H4)) in (\lambda (H11: (eq C d x0)).(let H12 \def +(eq_ind_r T x1 (\lambda (t: T).(getl i c (CHead x0 (Bind Abbr) t))) H8 w H10) +in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(pr3 x0 t x2)) H5 w H10) in +(let H14 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) +w))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c0: C).(pr3 c0 w +x2)) H13 d H11) in (pr3_lift c d (S i) O (getl_drop Abbr c d w i H14) w x2 +H15))))))) H9))) u2 H6)))))))) H3)) H2))))) (\lambda (t: T).(\lambda (t0: +TList).(\lambda (H0: ((\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (TLRef +i)) u2) \to ((((iso (THeads (Flat Appl) t0 (TLRef i)) u2) \to (\forall (P: +Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (lift (S i) O w)) +u2)))))).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads +(Flat Appl) t0 (TLRef i))) u2)).(\lambda (H2: (((iso (THead (Flat Appl) t +(THeads (Flat Appl) t0 (TLRef i))) u2) \to (\forall (P: Prop).P)))).(let H3 +\def (pr3_gen_appl c t (THeads (Flat Appl) t0 (TLRef i)) u2 H1) in (or3_ind +(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 +t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: +T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2)))) (ex4_4 T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 +c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c (THead (Flat Appl) t +(THeads (Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (H4: (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: +T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2))))).(ex3_2_ind T T (\lambda +(u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THeads (Flat Appl) t0 (TLRef i)) t2))) (pr3 c (THead (Flat Appl) t (THeads +(Flat Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H5: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c t +x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) x1)).(let H8 \def +(eq_ind T u2 (\lambda (t1: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) +t0 (TLRef i))) t1) \to (\forall (P: Prop).P))) H2 (THead (Flat Appl) x0 x1) +H5) in (eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t1: T).(pr3 c (THead +(Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) t1)) (H8 (iso_head t +x0 (THeads (Flat Appl) t0 (TLRef i)) x1 (Flat Appl)) (pr3 c (THead (Flat +Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) (THead (Flat Appl) x0 x1))) +u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t +u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 +c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O +w))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H6: (pr3 c t +x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind +Abst) x0 x1))).(\lambda (H8: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c +(Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) (THead (Flat Appl) t +(THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t +(THead (Bind Abst) x0 x1)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift +(S i) O w))) c (pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead +(Bind Abst) x0 x1) (H0 (THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso +(THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) x0 x1))).(\lambda (P: +Prop).(iso_flats_lref_bind_false Appl Abst i x0 x1 t0 H9 P)))) t Appl) (THead +(Bind Abbr) t x1) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) +(THead (Bind Abbr) t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) +x0 x1)) (THead (Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 +(pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t +x1) c (pr3_head_12 c t x2 H6 (Bind Abbr) x1 x3 (H8 Abbr x2)) u2 H5)))))))))) +H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 +(CHead c (Bind b) y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat +Appl) t0 (lift (S i) O w))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda +(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not +(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) +(THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c (THead (Bind x0) x5 (THead +(Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H8: (pr3 c t x4)).(\lambda +(H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (THead (Flat +Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Bind x0) +x1 (THead (Flat Appl) (lift (S O) O t) x2)) (THead (Flat Appl) t (THeads +(Flat Appl) t0 (lift (S i) O w))) c (pr3_t (THead (Flat Appl) t (THead (Bind +x0) x1 x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w))) c +(pr3_thin_dx c (THeads (Flat Appl) t0 (lift (S i) O w)) (THead (Bind x0) x1 +x2) (H0 (THead (Bind x0) x1 x2) H6 (\lambda (H11: (iso (THeads (Flat Appl) t0 +(TLRef i)) (THead (Bind x0) x1 x2))).(\lambda (P: +Prop).(iso_flats_lref_bind_false Appl x0 i x1 x2 t0 H11 P)))) t Appl) (THead +(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr3_pr2 c (THead (Flat +Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) (lift +(S O) O t) x2)) (pr2_free c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr0_upsilon x0 +H5 t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) (THead (Bind +x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr3_head_12 c x1 x1 +(pr3_refl c x1) (Bind x0) (THead (Flat Appl) (lift (S O) O t) x2) (THead +(Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 (CHead c (Bind x0) x1) (lift +(S O) O t) (lift (S O) O x4) (pr3_lift (CHead c (Bind x0) x1) c (S O) O +(drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H8) (Flat Appl) x2 x2 +(pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) +u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c (pr3_head_12 +c x1 x5 H9 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat +Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 +(lift (S O) O x4) Appl)) u2 H7)))))))))))))) H4)) H3)))))))) vs)))))). + +lemma pr3_iso_appls_cast: + \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).(let u1 +\def (THeads (Flat Appl) vs (THead (Flat Cast) v t)) in (\forall (u2: +T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c +(THeads (Flat Appl) vs t) u2)))))))) +\def + \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (vs: +TList).(TList_ind (\lambda (t0: TList).(let u1 \def (THeads (Flat Appl) t0 +(THead (Flat Cast) v t)) in (\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 +u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 t) u2)))))) +(\lambda (u2: T).(\lambda (H: (pr3 c (THead (Flat Cast) v t) u2)).(\lambda +(H0: (((iso (THead (Flat Cast) v t) u2) \to (\forall (P: Prop).P)))).(let H1 +\def (pr3_gen_cast c v t u2 H) in (or_ind (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t +t2)))) (pr3 c t u2) (pr3 c t u2) (\lambda (H2: (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Cast) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t +t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Flat Cast) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c t t2))) (pr3 c t u2) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H3: (eq T u2 (THead (Flat Cast) x0 +x1))).(\lambda (_: (pr3 c v x0)).(\lambda (_: (pr3 c t x1)).(let H6 \def +(eq_ind T u2 (\lambda (t0: T).((iso (THead (Flat Cast) v t) t0) \to (\forall +(P: Prop).P))) H0 (THead (Flat Cast) x0 x1) H3) in (eq_ind_r T (THead (Flat +Cast) x0 x1) (\lambda (t0: T).(pr3 c t t0)) (H6 (iso_head v x0 t x1 (Flat +Cast)) (pr3 c t (THead (Flat Cast) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: +(pr3 c t u2)).H2) H1))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: +((\forall (u2: T).((pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) u2) +\to ((((iso (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) u2) \to (\forall +(P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t1 t) u2)))))).(\lambda (u2: +T).(\lambda (H0: (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead +(Flat Cast) v t))) u2)).(\lambda (H1: (((iso (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 (THead (Flat Cast) v t))) u2) \to (\forall (P: +Prop).P)))).(let H2 \def (pr3_gen_appl c t0 (THeads (Flat Appl) t1 (THead +(Flat Cast) v t)) u2 H0) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda +(t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c t0 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat +Appl) t1 (THead (Flat Cast) v t)) t2)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Cast) v t)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat +Appl) t1 (THead (Flat Cast) v t)) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) +u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2)))))))) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) u2) +(\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Cast) v t)) t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 +(THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Cast) v t)) t2))) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) u2) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T u2 (THead (Flat Appl) +x0 x1))).(\lambda (_: (pr3 c t0 x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) +t1 (THead (Flat Cast) v t)) x1)).(let H7 \def (eq_ind T u2 (\lambda (t2: +T).((iso (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Cast) v +t))) t2) \to (\forall (P: Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in +(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat +Appl) t0 (THeads (Flat Appl) t1 t)) t2)) (H7 (iso_head t0 x0 (THeads (Flat +Appl) t1 (THead (Flat Cast) v t)) x1 (Flat Appl)) (pr3 c (THead (Flat Appl) +t0 (THeads (Flat Appl) t1 t)) (THead (Flat Appl) x0 x1))) u2 H4))))))) H3)) +(\lambda (H3: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: +T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 +t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: +T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) +(pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) u2) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c +(THead (Bind Abbr) x2 x3) u2)).(\lambda (H5: (pr3 c t0 x2)).(\lambda (H6: +(pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind Abst) x0 +x1))).(\lambda (H7: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) +u) x1 x3))))).(pr3_t (THead (Bind Abbr) t0 x1) (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 t)) c (pr3_t (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) +(THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) c (pr3_thin_dx c (THeads +(Flat Appl) t1 t) (THead (Bind Abst) x0 x1) (H (THead (Bind Abst) x0 x1) H6 +(\lambda (H8: (iso (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead +(Bind Abst) x0 x1))).(\lambda (P: Prop).(iso_flats_flat_bind_false Appl Cast +Abst x0 v x1 t t1 H8 P)))) t0 Appl) (THead (Bind Abbr) t0 x1) (pr3_pr2 c +(THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) +(pr2_free c (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind +Abbr) t0 x1) (pr0_beta x0 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1))))) u2 +(pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t0 x1) c (pr3_head_12 c +t0 x2 H5 (Bind Abbr) x1 x3 (H7 Abbr x2)) u2 H4)))))))))) H3)) (\lambda (H3: +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind b) +y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat +Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THeads (Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 +(CHead c (Bind b) y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t0 (THeads (Flat +Appl) t1 t)) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda +(x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq B x0 +Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) +(THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c (THead (Bind x0) x5 (THead +(Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H7: (pr3 c t0 x4)).(\lambda +(H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c (Bind x0) x5) x2 x3)).(pr3_t +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (THead (Flat +Appl) t0 (THeads (Flat Appl) t1 t)) c (pr3_t (THead (Bind x0) x1 (THead (Flat +Appl) (lift (S O) O t0) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) +c (pr3_t (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Flat Appl) t0 +(THeads (Flat Appl) t1 t)) c (pr3_thin_dx c (THeads (Flat Appl) t1 t) (THead +(Bind x0) x1 x2) (H (THead (Bind x0) x1 x2) H5 (\lambda (H10: (iso (THeads +(Flat Appl) t1 (THead (Flat Cast) v t)) (THead (Bind x0) x1 x2))).(\lambda +(P: Prop).(iso_flats_flat_bind_false Appl Cast x0 x1 v x2 t t1 H10 P)))) t0 +Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) x2)) (pr3_pr2 +c (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead +(Flat Appl) (lift (S O) O t0) x2)) (pr2_free c (THead (Flat Appl) t0 (THead +(Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) +x2)) (pr0_upsilon x0 H4 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1) x2 x2 +(pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) +x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat Appl) (lift +(S O) O t0) x2) (THead (Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 (CHead +c (Bind x0) x1) (lift (S O) O t0) (lift (S O) O x4) (pr3_lift (CHead c (Bind +x0) x1) c (S O) O (drop_drop (Bind x0) O c c (drop_refl c) x1) t0 x4 H7) +(Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift +(S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S +O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c +(pr3_head_12 c x1 x5 H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) +(THead (Flat Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) +x2 x3 H9 (lift (S O) O x4) Appl)) u2 H6)))))))))))))) H3)) H2)))))))) vs)))). + +lemma pr3_iso_appl_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (v1: T).(\forall (v2: +T).(\forall (t: T).(let u1 \def (THead (Flat Appl) v1 (THead (Bind b) v2 t)) +in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) v2 (THead (Flat Appl) +(lift (S O) O v1) t)) u2)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v1: T).(\lambda +(v2: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H0: (pr3 c +(THead (Flat Appl) v1 (THead (Bind b) v2 t)) u2)).(\lambda (H1: (((iso (THead +(Flat Appl) v1 (THead (Bind b) v2 t)) u2) \to (\forall (P: Prop).P)))).(let +H2 \def (pr3_gen_appl c v1 (THead (Bind b) v2 t) u2 H0) in (or3_ind (ex3_2 T +T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c (THead (Bind b) v2 t) t2)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 +t2)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) +(\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 +z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat +Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b0: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c (THead (Bind b) v2 +(THead (Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (H3: (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c (THead (Bind b) v2 t) t2))))).(ex3_2_ind T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v1 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THead (Bind b) v2 t) t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) +(lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq +T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v1 x0)).(\lambda (_: +(pr3 c (THead (Bind b) v2 t) x1)).(let H7 \def (eq_ind T u2 (\lambda (t0: +T).((iso (THead (Flat Appl) v1 (THead (Bind b) v2 t)) t0) \to (\forall (P: +Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) +x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S +O) O v1) t)) t0)) (H7 (iso_head v1 x0 (THead (Bind b) v2 t) x1 (Flat Appl)) +(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead +(Flat Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda +(_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c v1 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) z1 +t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THead (Bind b) v2 t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: +T).(pr3 (CHead c (Bind b0) u) z1 t2))))))) (pr3 c (THead (Bind b) v2 (THead +(Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c (THead (Bind Abbr) +x2 x3) u2)).(\lambda (H5: (pr3 c v1 x2)).(\lambda (H6: (pr3 c (THead (Bind b) +v2 t) (THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b0: B).(\forall +(u: T).(pr3 (CHead c (Bind b0) u) x1 x3))))).(pr3_t (THead (Bind Abbr) x2 x3) +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) c (let H_x \def +(pr3_gen_bind b H c v2 t (THead (Bind Abst) x0 x1) H6) in (let H8 \def H_x in +(or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) +x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 +u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2)))) +(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind Abst) x0 x1))) (pr3 c +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind +Abbr) x2 x3)) (\lambda (H9: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind b) v2) t t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: +T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind b) v2) t t2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) +(lift (S O) O v1) t)) (THead (Bind Abbr) x2 x3)) (\lambda (x4: T).(\lambda +(x5: T).(\lambda (H10: (eq T (THead (Bind Abst) x0 x1) (THead (Bind b) x4 +x5))).(\lambda (H11: (pr3 c v2 x4)).(\lambda (H12: (pr3 (CHead c (Bind b) v2) +t x5)).(let H13 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) +\Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow +(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) +(THead (Bind Abst) x0 x1) (THead (Bind b) x4 x5) H10) in ((let H14 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef +_) \Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abst) x0 +x1) (THead (Bind b) x4 x5) H10) in ((let H15 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) x0 x1) (THead (Bind b) x4 +x5) H10) in (\lambda (H16: (eq T x0 x4)).(\lambda (H17: (eq B Abst b)).(let +H18 \def (eq_ind_r T x5 (\lambda (t0: T).(pr3 (CHead c (Bind b) v2) t t0)) +H12 x1 H15) in (let H19 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 c v2 t0)) +H11 x0 H16) in (let H20 \def (eq_ind_r B b (\lambda (b0: B).(pr3 (CHead c +(Bind b0) v2) t x1)) H18 Abst H17) in (let H21 \def (eq_ind_r B b (\lambda +(b0: B).(not (eq B b0 Abst))) H Abst H17) in (eq_ind B Abst (\lambda (b0: +B).(pr3 c (THead (Bind b0) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead +(Bind Abbr) x2 x3))) (let H22 \def (match (H21 (refl_equal B Abst)) in False +with []) in H22) b H17)))))))) H14)) H13))))))) H9)) (\lambda (H9: (pr3 +(CHead c (Bind b) v2) t (lift (S O) O (THead (Bind Abst) x0 x1)))).(pr3_t +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O x2) (lift (S O) O (THead +(Bind Abst) x0 x1)))) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) +t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat +Appl) (lift (S O) O x2) (lift (S O) O (THead (Bind Abst) x0 x1))) (Bind b) +(pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O x2) (pr3_lift +(CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) v2) +v1 x2 H5) t (lift (S O) O (THead (Bind Abst) x0 x1)) H9 Appl)) (THead (Bind +Abbr) x2 x3) (eq_ind T (lift (S O) O (THead (Flat Appl) x2 (THead (Bind Abst) +x0 x1))) (\lambda (t0: T).(pr3 c (THead (Bind b) v2 t0) (THead (Bind Abbr) x2 +x3))) (pr3_sing c (THead (Bind Abbr) x2 x1) (THead (Bind b) v2 (lift (S O) O +(THead (Flat Appl) x2 (THead (Bind Abst) x0 x1)))) (pr2_free c (THead (Bind +b) v2 (lift (S O) O (THead (Flat Appl) x2 (THead (Bind Abst) x0 x1)))) (THead +(Bind Abbr) x2 x1) (pr0_zeta b H (THead (Flat Appl) x2 (THead (Bind Abst) x0 +x1)) (THead (Bind Abbr) x2 x1) (pr0_beta x0 x2 x2 (pr0_refl x2) x1 x1 +(pr0_refl x1)) v2)) (THead (Bind Abbr) x2 x3) (pr3_head_12 c x2 x2 (pr3_refl +c x2) (Bind Abbr) x1 x3 (H7 Abbr x2))) (THead (Flat Appl) (lift (S O) O x2) +(lift (S O) O (THead (Bind Abst) x0 x1))) (lift_flat Appl x2 (THead (Bind +Abst) x0 x1) (S O) O)))) H8))) u2 H4))))))))) H3)) (\lambda (H3: (ex6_6 B T T +T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THead (Bind b) v2 t) (THead (Bind b0) y1 z1)))))))) (\lambda +(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: +T).(\lambda (y2: T).(pr3 c (THead (Bind b0) y2 (THead (Flat Appl) (lift (S O) +O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v1 u3))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) +y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b0: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind b) v2 t) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c v1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))) (pr3 c +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) u2) (\lambda (x0: +B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (x5: T).(\lambda (H4: (not (eq B x0 Abst))).(\lambda (H5: (pr3 c +(THead (Bind b) v2 t) (THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c (THead +(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (H7: +(pr3 c v1 x4)).(\lambda (H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c (Bind +x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O +x4) x3)) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) c (let +H_x \def (pr3_gen_bind b H c v2 t (THead (Bind x0) x1 x2) H5) in (let H10 +\def H_x in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead +(Bind x0) x1 x2) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) +v2) t t2)))) (pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind x0) x1 +x2))) (pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) (\lambda (H11: +(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 x2) +(THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v2 u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t +t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind +x0) x1 x2) (THead (Bind b) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c +v2 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) v2) t t2))) +(pr3 c (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead +(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) (\lambda (x6: +T).(\lambda (x7: T).(\lambda (H12: (eq T (THead (Bind x0) x1 x2) (THead (Bind +b) x6 x7))).(\lambda (H13: (pr3 c v2 x6)).(\lambda (H14: (pr3 (CHead c (Bind +b) v2) t x7)).(let H15 \def (f_equal T B (\lambda (e: T).(match e with +[(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead k _ _) +\Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow +x0])])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 x7) H12) in ((let H16 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x1 | (TLRef +_) \Rightarrow x1 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind x0) x1 x2) +(THead (Bind b) x6 x7) H12) in ((let H17 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind b) x6 +x7) H12) in (\lambda (H18: (eq T x1 x6)).(\lambda (H19: (eq B x0 b)).(let H20 +\def (eq_ind_r T x7 (\lambda (t0: T).(pr3 (CHead c (Bind b) v2) t t0)) H14 x2 +H17) in (let H21 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c v2 t0)) H13 x1 +H18) in (let H22 \def (eq_ind B x0 (\lambda (b0: B).(pr3 (CHead c (Bind b0) +x5) x2 x3)) H9 b H19) in (let H23 \def (eq_ind B x0 (\lambda (b0: B).(not (eq +B b0 Abst))) H4 b H19) in (eq_ind_r B b (\lambda (b0: B).(pr3 c (THead (Bind +b) v2 (THead (Flat Appl) (lift (S O) O v1) t)) (THead (Bind b0) x5 (THead +(Flat Appl) (lift (S O) O x4) x3)))) (pr3_head_21 c v2 x5 (pr3_t x1 v2 c H21 +x5 H8) (Bind b) (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat Appl) +(lift (S O) O x4) x3) (pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift +(S O) O x4) (pr3_lift (CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c +c (drop_refl c) v2) v1 x4 H7) t x3 (pr3_t x2 t (CHead c (Bind b) v2) H20 x3 +(pr3_pr3_pr3_t c v2 x1 H21 x2 x3 (Bind b) (pr3_pr3_pr3_t c x1 x5 H8 x2 x3 +(Bind b) H22))) Appl)) x0 H19)))))))) H16)) H15))))))) H11)) (\lambda (H11: +(pr3 (CHead c (Bind b) v2) t (lift (S O) O (THead (Bind x0) x1 x2)))).(pr3_t +(THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead +(Bind x0) x1 x2)))) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O v1) +t)) c (pr3_head_2 c v2 (THead (Flat Appl) (lift (S O) O v1) t) (THead (Flat +Appl) (lift (S O) O x4) (lift (S O) O (THead (Bind x0) x1 x2))) (Bind b) +(pr3_flat (CHead c (Bind b) v2) (lift (S O) O v1) (lift (S O) O x4) (pr3_lift +(CHead c (Bind b) v2) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) v2) +v1 x4 H7) t (lift (S O) O (THead (Bind x0) x1 x2)) H11 Appl)) (THead (Bind +x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (eq_ind T (lift (S O) O +(THead (Flat Appl) x4 (THead (Bind x0) x1 x2))) (\lambda (t0: T).(pr3 c +(THead (Bind b) v2 t0) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O +x4) x3)))) (pr3_sing c (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O +x4) x2)) (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) x4 (THead (Bind +x0) x1 x2)))) (pr2_free c (THead (Bind b) v2 (lift (S O) O (THead (Flat Appl) +x4 (THead (Bind x0) x1 x2)))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (pr0_zeta b H (THead (Flat Appl) x4 (THead (Bind x0) x1 x2)) +(THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) (pr0_upsilon x0 +H4 x4 x4 (pr0_refl x4) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2)) v2)) (THead +(Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (pr3_head_12 c x1 x5 +H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) (THead (Flat Appl) +(lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H9 (lift (S +O) O x4) Appl))) (THead (Flat Appl) (lift (S O) O x4) (lift (S O) O (THead +(Bind x0) x1 x2))) (lift_flat Appl x4 (THead (Bind x0) x1 x2) (S O) O)))) +H10))) u2 H6))))))))))))) H3)) H2)))))))))). + +lemma pr3_iso_appls_appl_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (v: T).(\forall (u: +T).(\forall (t: T).(\forall (vs: TList).(let u1 \def (THeads (Flat Appl) vs +(THead (Flat Appl) v (THead (Bind b) u t))) in (\forall (c: C).(\forall (u2: +T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c +(THeads (Flat Appl) vs (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) +t))) u2))))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (v: T).(\lambda +(u: T).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: +TList).(let u1 \def (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind +b) u t))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 +u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead +(Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))) (\lambda (c: +C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) v (THead (Bind b) +u t)) u2)).(\lambda (H1: (((iso (THead (Flat Appl) v (THead (Bind b) u t)) +u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b H v u t c u2 H0 H1))))) +(\lambda (t0: T).(\lambda (t1: TList).(\lambda (H0: ((\forall (c: C).(\forall +(u2: T).((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u +t))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind +b) u t))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t1 +(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t))) u2))))))).(\lambda +(c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t)))) u2)).(\lambda +(H2: (((iso (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v +(THead (Bind b) u t)))) u2) \to (\forall (P: Prop).P)))).(let H3 \def +(pr3_gen_appl c t0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind +b) u t))) u2 H1) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 +u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead +(Flat Appl) v (THead (Bind b) u t))) t2)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: +B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2)))))))) (ex6_6 B T T T +T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2)))))))) (pr3 c +(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat +Appl) (lift (S O) O v) t)))) u2) (\lambda (H4: (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c t0 u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) +t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t0 u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) t2))) (pr3 c (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) +u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T u2 (THead (Flat +Appl) x0 x1))).(\lambda (_: (pr3 c t0 x0)).(\lambda (_: (pr3 c (THeads (Flat +Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) x1)).(let H8 \def +(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t0 (THeads (Flat Appl) +t1 (THead (Flat Appl) v (THead (Bind b) u t)))) t2) \to (\forall (P: +Prop).P))) H2 (THead (Flat Appl) x0 x1) H5) in (eq_ind_r T (THead (Flat Appl) +x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) t2)) (H8 +(iso_head t0 x0 (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u +t))) x1 (Flat Appl)) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) (THead (Flat +Appl) x0 x1))) u2 H5))))))) H4)) (\lambda (H4: (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: +B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))))).(ex4_4_ind T T +T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t0 u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b0: +B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) z1 t2))))))) (pr3 c (THead +(Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O v) t)))) u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (H5: (pr3 c (THead (Bind Abbr) x2 x3) +u2)).(\lambda (H6: (pr3 c t0 x2)).(\lambda (H7: (pr3 c (THeads (Flat Appl) t1 +(THead (Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 +x1))).(\lambda (H8: ((\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind +b0) u0) x1 x3))))).(pr3_t (THead (Bind Abbr) t0 x1) (THead (Flat Appl) t0 +(THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) +t)))) c (pr3_t (THead (Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Flat +Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S +O) O v) t)))) c (pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u +(THead (Flat Appl) (lift (S O) O v) t))) (THead (Bind Abst) x0 x1) (H0 c +(THead (Bind Abst) x0 x1) H7 (\lambda (H9: (iso (THeads (Flat Appl) t1 (THead +(Flat Appl) v (THead (Bind b) u t))) (THead (Bind Abst) x0 x1))).(\lambda (P: +Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 (THead (Bind b) u t) +t1 H9 P)))) t0 Appl) (THead (Bind Abbr) t0 x1) (pr3_pr2 c (THead (Flat Appl) +t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr2_free c (THead +(Flat Appl) t0 (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) t0 x1) (pr0_beta +x0 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl x1))))) u2 (pr3_t (THead (Bind Abbr) +x2 x3) (THead (Bind Abbr) t0 x1) c (pr3_head_12 c t0 x2 H6 (Bind Abbr) x1 x3 +(H8 Abbr x2)) u2 H5)))))))))) H4)) (\lambda (H4: (ex6_6 B T T T T T (\lambda +(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u t))) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b0) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead (Bind b) u +t))) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind +b0) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t0 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b0) y2) z1 z2))))))) (pr3 c +(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat +Appl) (lift (S O) O v) t)))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda +(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H5: (not +(eq B x0 Abst))).(\lambda (H6: (pr3 c (THeads (Flat Appl) t1 (THead (Flat +Appl) v (THead (Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (H7: (pr3 c +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda +(H8: (pr3 c t0 x4)).(\lambda (H9: (pr3 c x1 x5)).(\lambda (H10: (pr3 (CHead c +(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind b) u +(THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t (THead (Bind x0) x1 (THead +(Flat Appl) (lift (S O) O t0) x2)) (THead (Flat Appl) t0 (THeads (Flat Appl) +t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c (pr3_t +(THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Flat Appl) t0 (THeads +(Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) (lift (S O) O v) t)))) c +(pr3_thin_dx c (THeads (Flat Appl) t1 (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O v) t))) (THead (Bind x0) x1 x2) (H0 c (THead (Bind x0) x1 x2) +H6 (\lambda (H11: (iso (THeads (Flat Appl) t1 (THead (Flat Appl) v (THead +(Bind b) u t))) (THead (Bind x0) x1 x2))).(\lambda (P: +Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind b) u t) t1 +H11 P)))) t0 Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t0) +x2)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind +x0) x1 (THead (Flat Appl) (lift (S O) O t0) x2)) (pr2_free c (THead (Flat +Appl) t0 (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) +(lift (S O) O t0) x2)) (pr0_upsilon x0 H5 t0 t0 (pr0_refl t0) x1 x1 (pr0_refl +x1) x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat +Appl) (lift (S O) O t0) x2) (THead (Flat Appl) (lift (S O) O x4) x2) +(pr3_head_12 (CHead c (Bind x0) x1) (lift (S O) O t0) (lift (S O) O x4) +(pr3_lift (CHead c (Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c +(drop_refl c) x1) t0 x4 H8) (Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind +x0) x1) (Flat Appl) (lift (S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 +(THead (Flat Appl) (lift (S O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat +Appl) (lift (S O) O x4) x2)) c (pr3_head_12 c x1 x5 H9 (Bind x0) (THead (Flat +Appl) (lift (S O) O x4) x2) (THead (Flat Appl) (lift (S O) O x4) x3) +(pr3_thin_dx (CHead c (Bind x0) x5) x2 x3 H10 (lift (S O) O x4) Appl)) u2 +H7)))))))))))))) H4)) H3))))))))) vs)))))). + +lemma pr3_iso_appls_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (vs: TList).(\forall (u: +T).(\forall (t: T).(let u1 \def (THeads (Flat Appl) vs (THead (Bind b) u t)) +in (\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) +(lifts (S O) O vs) t)) u2)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (vs: +TList).(tlist_ind_rev (\lambda (t: TList).(\forall (u: T).(\forall (t0: +T).(let u1 \def (THeads (Flat Appl) t (THead (Bind b) u t0)) in (\forall (c: +C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: +Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t) +t0)) u2))))))))) (\lambda (u: T).(\lambda (t: T).(\lambda (c: C).(\lambda +(u2: T).(\lambda (H0: (pr3 c (THead (Bind b) u t) u2)).(\lambda (_: (((iso +(THead (Bind b) u t) u2) \to (\forall (P: Prop).P)))).H0)))))) (\lambda (ts: +TList).(\lambda (t: T).(\lambda (H0: ((\forall (u: T).(\forall (t0: +T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) ts (THead +(Bind b) u t0)) u2) \to ((((iso (THeads (Flat Appl) ts (THead (Bind b) u t0)) +u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind b) u (THeads (Flat +Appl) (lifts (S O) O ts) t0)) u2))))))))).(\lambda (u: T).(\lambda (t0: +T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H1: (pr3 c (THeads (Flat Appl) +(TApp ts t) (THead (Bind b) u t0)) u2)).(\lambda (H2: (((iso (THeads (Flat +Appl) (TApp ts t) (THead (Bind b) u t0)) u2) \to (\forall (P: +Prop).P)))).(eq_ind_r TList (TApp (lifts (S O) O ts) (lift (S O) O t)) +(\lambda (t1: TList).(pr3 c (THead (Bind b) u (THeads (Flat Appl) t1 t0)) +u2)) (eq_ind_r T (THeads (Flat Appl) (lifts (S O) O ts) (THead (Flat Appl) +(lift (S O) O t) t0)) (\lambda (t1: T).(pr3 c (THead (Bind b) u t1) u2)) (let +H3 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind b) u t0)) +(\lambda (t1: T).(pr3 c t1 u2)) H1 (THeads (Flat Appl) ts (THead (Flat Appl) +t (THead (Bind b) u t0))) (theads_tapp (Flat Appl) t (THead (Bind b) u t0) +ts)) in (let H4 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind +b) u t0)) (\lambda (t1: T).((iso t1 u2) \to (\forall (P: Prop).P))) H2 +(THeads (Flat Appl) ts (THead (Flat Appl) t (THead (Bind b) u t0))) +(theads_tapp (Flat Appl) t (THead (Bind b) u t0) ts)) in (TList_ind (\lambda +(t1: TList).(((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall +(u3: T).((pr3 c0 (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to +((((iso (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to (\forall (P: +Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O +t1) t2)) u3)))))))) \to ((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat +Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c +(THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t1) (THead (Flat Appl) +(lift (S O) O t) t0))) u2))))) (\lambda (_: ((\forall (u0: T).(\forall (t1: +T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) TNil (THead +(Bind b) u0 t1)) u3) \to ((((iso (THeads (Flat Appl) TNil (THead (Bind b) u0 +t1)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads +(Flat Appl) (lifts (S O) O TNil) t1)) u3))))))))).(\lambda (H6: (pr3 c +(THeads (Flat Appl) TNil (THead (Flat Appl) t (THead (Bind b) u t0))) +u2)).(\lambda (H7: (((iso (THeads (Flat Appl) TNil (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b +H t u t0 c u2 H6 H7)))) (\lambda (t1: T).(\lambda (ts0: TList).(\lambda (_: +((((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall (u3: T).((pr3 +c0 (THeads (Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads +(Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to +(pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O ts0) t2)) +u3)))))))) \to ((pr3 c (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead +(Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) ts0 (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead +(Bind b) u (THeads (Flat Appl) (lifts (S O) O ts0) (THead (Flat Appl) (lift +(S O) O t) t0))) u2)))))).(\lambda (H5: ((\forall (u0: T).(\forall (t2: +T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) (TCons t1 +ts0) (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads (Flat Appl) (TCons t1 +ts0) (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 +(THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O (TCons t1 ts0)) t2)) +u3))))))))).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t1 ts0) (THead +(Flat Appl) t (THead (Bind b) u t0))) u2)).(\lambda (H7: (((iso (THeads (Flat +Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to +(\forall (P: Prop).P)))).(H5 u (THead (Flat Appl) (lift (S O) O t) t0) c u2 +(pr3_iso_appls_appl_bind b H t u t0 (TCons t1 ts0) c u2 H6 H7) (\lambda (H8: +(iso (THeads (Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O t) t0))) u2)).(\lambda (P: Prop).(H7 (iso_trans (THeads (Flat +Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) (THeads +(Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) (lift (S O) O +t) t0))) (iso_head t1 t1 (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead +(Bind b) u t0))) (THeads (Flat Appl) ts0 (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O t) t0))) (Flat Appl)) u2 H8) P)))))))))) ts H0 H3 H4))) (THeads +(Flat Appl) (TApp (lifts (S O) O ts) (lift (S O) O t)) t0) (theads_tapp (Flat +Appl) (lift (S O) O t) t0 (lifts (S O) O ts))) (lifts (S O) O (TApp ts t)) +(lifts_tapp (S O) O t ts))))))))))) vs))). + +lemma pr3_iso_beta: + \forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 \def (THead (Flat +Appl) v (THead (Bind Abst) w t)) in (\forall (c: C).(\forall (u2: T).((pr3 c +u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead (Bind +Abbr) v t) u2)))))))) +\def + \lambda (v: T).(\lambda (w: T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: +T).(\lambda (H: (pr3 c (THead (Flat Appl) v (THead (Bind Abst) w t)) +u2)).(\lambda (H0: (((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) u2) +\to (\forall (P: Prop).P)))).(let H1 \def (pr3_gen_appl c v (THead (Bind +Abst) w t) u2 H) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq +T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c v +u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) w t) t2)))) +(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: +T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) +w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind +b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c v u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c +(THead (Bind Abbr) v t) u2) (\lambda (H2: (ex3_2 T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abst) w t) t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c v u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THead (Bind Abst) +w t) t2))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H3: (eq T u2 (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c v +x0)).(\lambda (_: (pr3 c (THead (Bind Abst) w t) x1)).(let H6 \def (eq_ind T +u2 (\lambda (t0: T).((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) t0) +\to (\forall (P: Prop).P))) H0 (THead (Flat Appl) x0 x1) H3) in (eq_ind_r T +(THead (Flat Appl) x0 x1) (\lambda (t0: T).(pr3 c (THead (Bind Abbr) v t) +t0)) (H6 (iso_head v x0 (THead (Bind Abst) w t) x1 (Flat Appl)) (pr3 c (THead +(Bind Abbr) v t) (THead (Flat Appl) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: +(ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: +T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))) (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) +w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind +b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v +u3))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Bind Abbr) v t) +u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H3: (pr3 c (THead (Bind Abbr) x2 x3) u2)).(\lambda (H4: (pr3 c v +x2)).(\lambda (H5: (pr3 c (THead (Bind Abst) w t) (THead (Bind Abst) x0 +x1))).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) +u) x1 x3))))).(let H7 \def (pr3_gen_abst c w t (THead (Bind Abst) x0 x1) H5) +in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind Abst) +x0 x1) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w +u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda +(x4: T).(\lambda (x5: T).(\lambda (H8: (eq T (THead (Bind Abst) x0 x1) (THead +(Bind Abst) x4 x5))).(\lambda (H9: (pr3 c w x4)).(\lambda (H10: ((\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x5))))).(let H11 \def (f_equal +T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) +\Rightarrow x0 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abst) x0 x1) +(THead (Bind Abst) x4 x5) H8) in ((let H12 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) x0 x1) (THead (Bind Abst) +x4 x5) H8) in (\lambda (H13: (eq T x0 x4)).(let H14 \def (eq_ind_r T x5 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t +t0)))) H10 x1 H12) in (let H15 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 c w +t0)) H9 x0 H13) in (pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) v t) c +(pr3_head_12 c v x2 H4 (Bind Abbr) t x3 (pr3_t x1 t (CHead c (Bind Abbr) x2) +(H14 Abbr x2) x3 (H6 Abbr x2))) u2 H3))))) H11))))))) H7)))))))))) H2)) +(\lambda (H2: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) w t) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat +Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v +u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THead (Bind Abst) w t) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) +u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c v u3))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2))))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda (x0: B).(\lambda +(x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: +T).(\lambda (H3: (not (eq B x0 Abst))).(\lambda (H4: (pr3 c (THead (Bind +Abst) w t) (THead (Bind x0) x1 x2))).(\lambda (H5: (pr3 c (THead (Bind x0) x5 +(THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda (_: (pr3 c v +x4)).(\lambda (_: (pr3 c x1 x5)).(\lambda (H8: (pr3 (CHead c (Bind x0) x5) x2 +x3)).(let H9 \def (pr3_gen_abst c w t (THead (Bind x0) x1 x2) H4) in +(ex3_2_ind T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead (Bind x0) x1 +x2) (THead (Bind Abst) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c w +u3))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) t t2))))) (pr3 c (THead (Bind Abbr) v t) u2) (\lambda +(x6: T).(\lambda (x7: T).(\lambda (H10: (eq T (THead (Bind x0) x1 x2) (THead +(Bind Abst) x6 x7))).(\lambda (H11: (pr3 c w x6)).(\lambda (H12: ((\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t x7))))).(let H13 \def +(f_equal T B (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef +_) \Rightarrow x0 | (THead k _ _) \Rightarrow (match k with [(Bind b) +\Rightarrow b | (Flat _) \Rightarrow x0])])) (THead (Bind x0) x1 x2) (THead +(Bind Abst) x6 x7) H10) in ((let H14 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ t0 _) +\Rightarrow t0])) (THead (Bind x0) x1 x2) (THead (Bind Abst) x6 x7) H10) in +((let H15 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ _ t0) \Rightarrow t0])) +(THead (Bind x0) x1 x2) (THead (Bind Abst) x6 x7) H10) in (\lambda (H16: (eq +T x1 x6)).(\lambda (H17: (eq B x0 Abst)).(let H18 \def (eq_ind_r T x7 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t +t0)))) H12 x2 H15) in (let H19 \def (eq_ind_r T x6 (\lambda (t0: T).(pr3 c w +t0)) H11 x1 H16) in (let H20 \def (eq_ind B x0 (\lambda (b: B).(pr3 (CHead c +(Bind b) x5) x2 x3)) H8 Abst H17) in (let H21 \def (eq_ind B x0 (\lambda (b: +B).(pr3 c (THead (Bind b) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)) +H5 Abst H17) in (let H22 \def (eq_ind B x0 (\lambda (b: B).(not (eq B b +Abst))) H3 Abst H17) in (let H23 \def (match (H22 (refl_equal B Abst)) in +False with []) in H23))))))))) H14)) H13))))))) H9)))))))))))))) H2)) +H1)))))))). + +lemma pr3_iso_appls_beta: + \forall (us: TList).(\forall (v: T).(\forall (w: T).(\forall (t: T).(let u1 +\def (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) w t))) in +(\forall (c: C).(\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to +(\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) us (THead (Bind Abbr) +v t)) u2))))))))) +\def + \lambda (us: TList).(TList_ind (\lambda (t: TList).(\forall (v: T).(\forall +(w: T).(\forall (t0: T).(let u1 \def (THeads (Flat Appl) t (THead (Flat Appl) +v (THead (Bind Abst) w t0))) in (\forall (c: C).(\forall (u2: T).((pr3 c u1 +u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat +Appl) t (THead (Bind Abbr) v t0)) u2)))))))))) (\lambda (v: T).(\lambda (w: +T).(\lambda (t: T).(\lambda (c: C).(\lambda (u2: T).(\lambda (H: (pr3 c +(THead (Flat Appl) v (THead (Bind Abst) w t)) u2)).(\lambda (H0: (((iso +(THead (Flat Appl) v (THead (Bind Abst) w t)) u2) \to (\forall (P: +Prop).P)))).(pr3_iso_beta v w t c u2 H H0)))))))) (\lambda (t: T).(\lambda +(t0: TList).(\lambda (H: ((\forall (v: T).(\forall (w: T).(\forall (t1: +T).(\forall (c: C).(\forall (u2: T).((pr3 c (THeads (Flat Appl) t0 (THead +(Flat Appl) v (THead (Bind Abst) w t1))) u2) \to ((((iso (THeads (Flat Appl) +t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) u2) \to (\forall (P: +Prop).P))) \to (pr3 c (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1)) +u2)))))))))).(\lambda (v: T).(\lambda (w: T).(\lambda (t1: T).(\lambda (c: +C).(\lambda (u2: T).(\lambda (H0: (pr3 c (THead (Flat Appl) t (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) u2)).(\lambda (H1: +(((iso (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Flat Appl) v +(THead (Bind Abst) w t1)))) u2) \to (\forall (P: Prop).P)))).(let H2 \def +(pr3_gen_appl c t (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind +Abst) w t1))) u2 H0) in (or3_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) +t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2)))) (ex4_4 T T T T +(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda +(_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (pr3 c +(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) +(\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead +(Flat Appl) u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) t2))))).(ex3_2_ind T T (\lambda (u3: +T).(\lambda (t2: T).(eq T u2 (THead (Flat Appl) u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))) (\lambda (_: T).(\lambda (t2: T).(pr3 c +(THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) t2))) +(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) +u2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T u2 (THead (Flat +Appl) x0 x1))).(\lambda (_: (pr3 c t x0)).(\lambda (_: (pr3 c (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) x1)).(let H7 \def +(eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t (THeads (Flat Appl) +t0 (THead (Flat Appl) v (THead (Bind Abst) w t1)))) t2) \to (\forall (P: +Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) +x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 +(THead (Bind Abbr) v t1))) t2)) (H7 (iso_head t x0 (THeads (Flat Appl) t0 +(THead (Flat Appl) v (THead (Bind Abst) w t1))) x1 (Flat Appl)) (pr3 c (THead +(Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) (THead (Flat +Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T +T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c +(THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u3: T).(\lambda (_: T).(pr3 c t u3))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) y1 z1)))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2))))))) (pr3 c (THead (Flat +Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) u2) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (pr3 c +(THead (Bind Abbr) x2 x3) u2)).(\lambda (H5: (pr3 c t x2)).(\lambda (H6: (pr3 +c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t1))) +(THead (Bind Abst) x0 x1))).(\lambda (H7: ((\forall (b: B).(\forall (u: +T).(pr3 (CHead c (Bind b) u) x1 x3))))).(pr3_t (THead (Bind Abbr) t x1) +(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c +(pr3_t (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Flat Appl) t +(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads +(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind Abst) x0 x1) (H v w t1 +c (THead (Bind Abst) x0 x1) H6 (\lambda (H8: (iso (THeads (Flat Appl) t0 +(THead (Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind Abst) x0 +x1))).(\lambda (P: Prop).(iso_flats_flat_bind_false Appl Appl Abst x0 v x1 +(THead (Bind Abst) w t1) t0 H8 P)))) t Appl) (THead (Bind Abbr) t x1) +(pr3_pr2 c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) +t x1) (pr2_free c (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead +(Bind Abbr) t x1) (pr0_beta x0 t t (pr0_refl t) x1 x1 (pr0_refl x1))))) u2 +(pr3_t (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) t x1) c (pr3_head_12 c t +x2 H5 (Bind Abbr) x1 x3 (H7 Abbr x2)) u2 H4)))))))))) H3)) (\lambda (H3: +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) +w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda (y2: T).(pr3 c +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) u2))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: +T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (THead (Flat +Appl) v (THead (Bind Abst) w t1))) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u3: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u3) z2)) +u2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u3: T).(\lambda (_: T).(pr3 c t u3))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2))))))) (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead +(Bind Abbr) v t1))) u2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H4: (not (eq +B x0 Abst))).(\lambda (H5: (pr3 c (THeads (Flat Appl) t0 (THead (Flat Appl) v +(THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda (H6: (pr3 c +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) u2)).(\lambda +(H7: (pr3 c t x4)).(\lambda (H8: (pr3 c x1 x5)).(\lambda (H9: (pr3 (CHead c +(Bind x0) x5) x2 x3)).(pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S +O) O x4) x2)) (THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) +v t1))) c (pr3_t (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) +(THead (Flat Appl) t (THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c +(pr3_t (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Flat Appl) t +(THeads (Flat Appl) t0 (THead (Bind Abbr) v t1))) c (pr3_thin_dx c (THeads +(Flat Appl) t0 (THead (Bind Abbr) v t1)) (THead (Bind x0) x1 x2) (H v w t1 c +(THead (Bind x0) x1 x2) H5 (\lambda (H10: (iso (THeads (Flat Appl) t0 (THead +(Flat Appl) v (THead (Bind Abst) w t1))) (THead (Bind x0) x1 x2))).(\lambda +(P: Prop).(iso_flats_flat_bind_false Appl Appl x0 x1 v x2 (THead (Bind Abst) +w t1) t0 H10 P)))) t Appl) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) +O t) x2)) (pr3_pr2 c (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead +(Bind x0) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (pr2_free c (THead +(Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x1 (THead (Flat Appl) +(lift (S O) O t) x2)) (pr0_upsilon x0 H4 t t (pr0_refl t) x1 x1 (pr0_refl x1) +x2 x2 (pr0_refl x2))))) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O +x4) x2)) (pr3_head_12 c x1 x1 (pr3_refl c x1) (Bind x0) (THead (Flat Appl) +(lift (S O) O t) x2) (THead (Flat Appl) (lift (S O) O x4) x2) (pr3_head_12 +(CHead c (Bind x0) x1) (lift (S O) O t) (lift (S O) O x4) (pr3_lift (CHead c +(Bind x0) x1) c (S O) O (drop_drop (Bind x0) O c c (drop_refl c) x1) t x4 H7) +(Flat Appl) x2 x2 (pr3_refl (CHead (CHead c (Bind x0) x1) (Flat Appl) (lift +(S O) O x4)) x2)))) u2 (pr3_t (THead (Bind x0) x5 (THead (Flat Appl) (lift (S +O) O x4) x3)) (THead (Bind x0) x1 (THead (Flat Appl) (lift (S O) O x4) x2)) c +(pr3_head_12 c x1 x5 H8 (Bind x0) (THead (Flat Appl) (lift (S O) O x4) x2) +(THead (Flat Appl) (lift (S O) O x4) x3) (pr3_thin_dx (CHead c (Bind x0) x5) +x2 x3 H9 (lift (S O) O x4) Appl)) u2 H6)))))))))))))) H3)) H2)))))))))))) us). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr1.ma new file mode 100644 index 000000000..59d537da8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr1.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/defs.ma". + +include "basic_1A/pr1/fwd.ma". + +lemma pr3_pr1: + \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (c: C).(pr3 c t1 +t2)))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda +(t: T).(\lambda (t0: T).(\forall (c: C).(pr3 c t t0)))) (\lambda (t: +T).(\lambda (c: C).(pr3_refl c t))) (\lambda (t0: T).(\lambda (t3: +T).(\lambda (H0: (pr0 t3 t0)).(\lambda (t4: T).(\lambda (_: (pr1 t0 +t4)).(\lambda (H2: ((\forall (c: C).(pr3 c t0 t4)))).(\lambda (c: +C).(pr3_sing c t0 t3 (pr2_free c t3 t0 H0) t4 (H2 c))))))))) t1 t2 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr3.ma new file mode 100644 index 000000000..5369615ab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/pr3.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/props.ma". + +include "basic_1A/pr2/pr2.ma". + +lemma pr3_strip: + \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr3 c t0 t1) \to (\forall +(t2: T).((pr2 c t0 t2) \to (ex2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: +T).(pr3 c t2 t)))))))) +\def + \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr3 c t0 +t1)).(pr3_ind c (\lambda (t: T).(\lambda (t2: T).(\forall (t3: T).((pr2 c t +t3) \to (ex2 T (\lambda (t4: T).(pr3 c t2 t4)) (\lambda (t4: T).(pr3 c t3 +t4))))))) (\lambda (t: T).(\lambda (t2: T).(\lambda (H0: (pr2 c t +t2)).(ex_intro2 T (\lambda (t3: T).(pr3 c t t3)) (\lambda (t3: T).(pr3 c t2 +t3)) t2 (pr3_pr2 c t t2 H0) (pr3_refl c t2))))) (\lambda (t2: T).(\lambda +(t3: T).(\lambda (H0: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (_: (pr3 c t2 +t4)).(\lambda (H2: ((\forall (t5: T).((pr2 c t2 t5) \to (ex2 T (\lambda (t: +T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))))))).(\lambda (t5: T).(\lambda +(H3: (pr2 c t3 t5)).(ex2_ind T (\lambda (t: T).(pr2 c t5 t)) (\lambda (t: +T).(pr2 c t2 t)) (ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c +t5 t))) (\lambda (x: T).(\lambda (H4: (pr2 c t5 x)).(\lambda (H5: (pr2 c t2 +x)).(ex2_ind T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c x t)) +(ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))) (\lambda +(x0: T).(\lambda (H6: (pr3 c t4 x0)).(\lambda (H7: (pr3 c x x0)).(ex_intro2 T +(\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t)) x0 H6 (pr3_sing c +x t5 H4 x0 H7))))) (H2 x H5))))) (pr2_confluence c t3 t5 H3 t2 H0)))))))))) +t0 t1 H)))). + +theorem pr3_confluence: + \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr3 c t0 t1) \to (\forall +(t2: T).((pr3 c t0 t2) \to (ex2 T (\lambda (t: T).(pr3 c t1 t)) (\lambda (t: +T).(pr3 c t2 t)))))))) +\def + \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr3 c t0 +t1)).(pr3_ind c (\lambda (t: T).(\lambda (t2: T).(\forall (t3: T).((pr3 c t +t3) \to (ex2 T (\lambda (t4: T).(pr3 c t2 t4)) (\lambda (t4: T).(pr3 c t3 +t4))))))) (\lambda (t: T).(\lambda (t2: T).(\lambda (H0: (pr3 c t +t2)).(ex_intro2 T (\lambda (t3: T).(pr3 c t t3)) (\lambda (t3: T).(pr3 c t2 +t3)) t2 H0 (pr3_refl c t2))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda +(H0: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (_: (pr3 c t2 t4)).(\lambda +(H2: ((\forall (t5: T).((pr3 c t2 t5) \to (ex2 T (\lambda (t: T).(pr3 c t4 +t)) (\lambda (t: T).(pr3 c t5 t))))))).(\lambda (t5: T).(\lambda (H3: (pr3 c +t3 t5)).(ex2_ind T (\lambda (t: T).(pr3 c t5 t)) (\lambda (t: T).(pr3 c t2 +t)) (ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))) +(\lambda (x: T).(\lambda (H4: (pr3 c t5 x)).(\lambda (H5: (pr3 c t2 +x)).(ex2_ind T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c x t)) +(ex2 T (\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t))) (\lambda +(x0: T).(\lambda (H6: (pr3 c t4 x0)).(\lambda (H7: (pr3 c x x0)).(ex_intro2 T +(\lambda (t: T).(pr3 c t4 t)) (\lambda (t: T).(pr3 c t5 t)) x0 H6 (pr3_t x t5 +c H4 x0 H7))))) (H2 x H5))))) (pr3_strip c t3 t5 H3 t2 H0)))))))))) t0 t1 +H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/props.ma new file mode 100644 index 000000000..ee6ad8995 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/props.ma @@ -0,0 +1,1604 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/fwd.ma". + +include "basic_1A/pr3/pr1.ma". + +include "basic_1A/pr2/props.ma". + +include "basic_1A/pr1/props.ma". + +lemma clear_pr3_trans: + \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pr3 c2 t1 t2) \to +(\forall (c1: C).((clear c1 c2) \to (pr3 c1 t1 t2)))))) +\def + \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c2 t1 +t2)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(pr3_ind c2 (\lambda (t: +T).(\lambda (t0: T).(pr3 c1 t t0))) (\lambda (t: T).(pr3_refl c1 t)) (\lambda +(t3: T).(\lambda (t4: T).(\lambda (H1: (pr2 c2 t4 t3)).(\lambda (t5: +T).(\lambda (_: (pr3 c2 t3 t5)).(\lambda (H3: (pr3 c1 t3 t5)).(pr3_sing c1 t3 +t4 (clear_pr2_trans c2 t4 t3 H1 c1 H0) t5 H3))))))) t1 t2 H)))))). + +lemma pr3_pr2: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (pr3 c +t1 t2)))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(pr3_sing c t2 t1 H t2 (pr3_refl c t2))))). + +theorem pr3_t: + \forall (t2: T).(\forall (t1: T).(\forall (c: C).((pr3 c t1 t2) \to (\forall +(t3: T).((pr3 c t2 t3) \to (pr3 c t1 t3)))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (c: C).(\lambda (H: (pr3 c t1 +t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t3: T).((pr3 c t0 +t3) \to (pr3 c t t3))))) (\lambda (t: T).(\lambda (t3: T).(\lambda (H0: (pr3 +c t t3)).H0))) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c t3 +t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: ((\forall +(t5: T).((pr3 c t4 t5) \to (pr3 c t0 t5))))).(\lambda (t5: T).(\lambda (H3: +(pr3 c t4 t5)).(pr3_sing c t0 t3 H0 t5 (H2 t5 H3)))))))))) t1 t2 H)))). + +lemma pr3_thin_dx: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall +(u: T).(\forall (f: F).(pr3 c (THead (Flat f) u t1) (THead (Flat f) u +t2))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(\lambda (u: T).(\lambda (f: F).(pr3_ind c (\lambda (t: T).(\lambda (t0: +T).(pr3 c (THead (Flat f) u t) (THead (Flat f) u t0)))) (\lambda (t: +T).(pr3_refl c (THead (Flat f) u t))) (\lambda (t0: T).(\lambda (t3: +T).(\lambda (H0: (pr2 c t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 c t0 +t4)).(\lambda (H2: (pr3 c (THead (Flat f) u t0) (THead (Flat f) u +t4))).(pr3_sing c (THead (Flat f) u t0) (THead (Flat f) u t3) (pr2_thin_dx c +t3 t0 H0 u f) (THead (Flat f) u t4) H2))))))) t1 t2 H)))))). + +lemma pr3_head_1: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall +(k: K).(\forall (t: T).(pr3 c (THead k u1 t) (THead k u2 t))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 +u2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (k: K).(\forall +(t1: T).(pr3 c (THead k t t1) (THead k t0 t1)))))) (\lambda (t: T).(\lambda +(k: K).(\lambda (t0: T).(pr3_refl c (THead k t t0))))) (\lambda (t2: +T).(\lambda (t1: T).(\lambda (H0: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda +(_: (pr3 c t2 t3)).(\lambda (H2: ((\forall (k: K).(\forall (t: T).(pr3 c +(THead k t2 t) (THead k t3 t)))))).(\lambda (k: K).(\lambda (t: T).(pr3_sing +c (THead k t2 t) (THead k t1 t) (pr2_head_1 c t1 t2 H0 k t) (THead k t3 t) +(H2 k t)))))))))) u1 u2 H)))). + +lemma pr3_head_2: + \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).(\forall +(k: K).((pr3 (CHead c k u) t1 t2) \to (pr3 c (THead k u t1) (THead k u +t2))))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(k: K).(\lambda (H: (pr3 (CHead c k u) t1 t2)).(pr3_ind (CHead c k u) +(\lambda (t: T).(\lambda (t0: T).(pr3 c (THead k u t) (THead k u t0)))) +(\lambda (t: T).(pr3_refl c (THead k u t))) (\lambda (t0: T).(\lambda (t3: +T).(\lambda (H0: (pr2 (CHead c k u) t3 t0)).(\lambda (t4: T).(\lambda (_: +(pr3 (CHead c k u) t0 t4)).(\lambda (H2: (pr3 c (THead k u t0) (THead k u +t4))).(pr3_sing c (THead k u t0) (THead k u t3) (pr2_head_2 c u t3 t0 k H0) +(THead k u t4) H2))))))) t1 t2 H)))))). + +theorem pr3_head_21: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall +(k: K).(\forall (t1: T).(\forall (t2: T).((pr3 (CHead c k u1) t1 t2) \to (pr3 +c (THead k u1 t1) (THead k u2 t2))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 +u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 +(CHead c k u1) t1 t2)).(pr3_t (THead k u1 t2) (THead k u1 t1) c (pr3_head_2 c +u1 t1 t2 k H0) (THead k u2 t2) (pr3_head_1 c u1 u2 H k t2))))))))). + +theorem pr3_head_12: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall +(k: K).(\forall (t1: T).(\forall (t2: T).((pr3 (CHead c k u2) t1 t2) \to (pr3 +c (THead k u1 t1) (THead k u2 t2))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 +u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 +(CHead c k u2) t1 t2)).(pr3_t (THead k u2 t1) (THead k u1 t1) c (pr3_head_1 c +u1 u2 H k t1) (THead k u2 t2) (pr3_head_2 c u2 t1 t2 k H0))))))))). + +lemma pr3_cflat: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall +(f: F).(\forall (v: T).(pr3 (CHead c (Flat f) v) t1 t2)))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (f: F).(\forall (v: +T).(pr3 (CHead c (Flat f) v) t t0))))) (\lambda (t: T).(\lambda (f: +F).(\lambda (v: T).(pr3_refl (CHead c (Flat f) v) t)))) (\lambda (t3: +T).(\lambda (t4: T).(\lambda (H0: (pr2 c t4 t3)).(\lambda (t5: T).(\lambda +(_: (pr3 c t3 t5)).(\lambda (H2: ((\forall (f: F).(\forall (v: T).(pr3 (CHead +c (Flat f) v) t3 t5))))).(\lambda (f: F).(\lambda (v: T).(pr3_sing (CHead c +(Flat f) v) t3 t4 (pr2_cflat c t4 t3 H0 f v) t5 (H2 f v)))))))))) t1 t2 H)))). + +theorem pr3_flat: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall +(t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall (f: F).(pr3 c (THead +(Flat f) u1 t1) (THead (Flat f) u2 t2))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 +u2)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).(\lambda +(f: F).(pr3_head_12 c u1 u2 H (Flat f) t1 t2 (pr3_cflat c t1 t2 H0 f +u2))))))))). + +lemma pr3_pr0_pr2_t: + \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (c: C).(\forall +(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 +(CHead c k u1) t1 t2)))))))) +\def + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u1 u2)).(\lambda (c: +C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 +(CHead c k u2) t1 t2)).(insert_eq C (CHead c k u2) (\lambda (c0: C).(pr2 c0 +t1 t2)) (\lambda (_: C).(pr3 (CHead c k u1) t1 t2)) (\lambda (y: C).(\lambda +(H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).((eq C c0 (CHead c k u2)) \to (pr3 (CHead c k u1) t t0))))) (\lambda (c0: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (pr0 t3 t4)).(\lambda (_: +(eq C c0 (CHead c k u2))).(pr3_pr2 (CHead c k u1) t3 t4 (pr2_free (CHead c k +u1) t3 t4 H2))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H2: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: +T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H4: +(subst0 i u t4 t)).(\lambda (H5: (eq C c0 (CHead c k u2))).(let H6 \def +(eq_ind C c0 (\lambda (c1: C).(getl i c1 (CHead d (Bind Abbr) u))) H2 (CHead +c k u2) H5) in (nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d +(Bind Abbr) u)) \to ((subst0 n u t4 t) \to (pr3 (CHead c k u1) t3 t)))) +(\lambda (H7: (getl O (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H8: +(subst0 O u t4 t)).(K_ind (\lambda (k0: K).((getl O (CHead c k0 u2) (CHead d +(Bind Abbr) u)) \to (pr3 (CHead c k0 u1) t3 t))) (\lambda (b: B).(\lambda +(H9: (getl O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(let H10 \def +(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead +c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) +(clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) +u2) (CHead d (Bind Abbr) u) H9))) in ((let H11 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow +(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) +(CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d +(Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) +H9))) in ((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 +(getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H9))) in (\lambda +(H13: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H15 \def (eq_ind T u +(\lambda (t0: T).(subst0 O t0 t4 t)) H8 u2 H12) in (eq_ind B Abbr (\lambda +(b0: B).(pr3 (CHead c (Bind b0) u1) t3 t)) (ex2_ind T (\lambda (t0: +T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(pr0 t0 t)) (pr3 (CHead c (Bind +Abbr) u1) t3 t) (\lambda (x: T).(\lambda (H16: (subst0 O u1 t4 x)).(\lambda +(H17: (pr0 x t)).(pr3_sing (CHead c (Bind Abbr) u1) x t3 (pr2_delta (CHead c +(Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t3 t4 H3 x H16) t (pr3_pr2 +(CHead c (Bind Abbr) u1) x t (pr2_free (CHead c (Bind Abbr) u1) x t H17)))))) +(pr0_subst0_back u2 t4 t O H15 u1 H)) b H13))))) H11)) H10)))) (\lambda (f: +F).(\lambda (H9: (getl O (CHead c (Flat f) u2) (CHead d (Bind Abbr) +u))).(pr3_pr2 (CHead c (Flat f) u1) t3 t (pr2_cflat c t3 t (pr2_delta c d u O +(getl_intro O c (CHead d (Bind Abbr) u) c (drop_refl c) (clear_gen_flat f c +(CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Flat f) u2) (CHead d (Bind +Abbr) u) H9))) t3 t4 H3 t H8) f u1)))) k H7))) (\lambda (i0: nat).(\lambda +(IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t4 +t) \to (pr3 (CHead c k u1) t3 t))))).(\lambda (H7: (getl (S i0) (CHead c k +u2) (CHead d (Bind Abbr) u))).(\lambda (H8: (subst0 (S i0) u t4 t)).(K_ind +(\lambda (k0: K).((getl (S i0) (CHead c k0 u2) (CHead d (Bind Abbr) u)) \to +((((getl i0 (CHead c k0 u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t4 t) +\to (pr3 (CHead c k0 u1) t3 t)))) \to (pr3 (CHead c k0 u1) t3 t)))) (\lambda +(b: B).(\lambda (H9: (getl (S i0) (CHead c (Bind b) u2) (CHead d (Bind Abbr) +u))).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind Abbr) u)) +\to ((subst0 i0 u t4 t) \to (pr3 (CHead c (Bind b) u1) t3 t))))).(pr3_pr2 +(CHead c (Bind b) u1) t3 t (pr2_delta (CHead c (Bind b) u1) d u (S i0) +(getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c +(CHead d (Bind Abbr) u) u2 i0 H9) u1) t3 t4 H3 t H8))))) (\lambda (f: +F).(\lambda (H9: (getl (S i0) (CHead c (Flat f) u2) (CHead d (Bind Abbr) +u))).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead d (Bind Abbr) u)) +\to ((subst0 i0 u t4 t) \to (pr3 (CHead c (Flat f) u1) t3 t))))).(pr3_pr2 +(CHead c (Flat f) u1) t3 t (pr2_cflat c t3 t (pr2_delta c d u (r (Flat f) i0) +(getl_gen_S (Flat f) c (CHead d (Bind Abbr) u) u2 i0 H9) t3 t4 H3 t H8) f +u1))))) k H7 IHi))))) i H6 H4))))))))))))) y t1 t2 H1))) H0)))))))). + +lemma pr3_pr2_pr2_t: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u1 u2) \to (\forall +(t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 +(CHead c k u1) t1 t2)))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u1 +u2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (t1: +T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c0 k t0) t1 t2) \to (pr3 +(CHead c0 k t) t1 t2)))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H0: (pr0 t1 t2)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: +K).(\lambda (H1: (pr2 (CHead c0 k t2) t0 t3)).(pr3_pr0_pr2_t t1 t2 H0 c0 t0 +t3 k H1))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 t2)).(\lambda (t: T).(\lambda (H2: +(subst0 i u t2 t)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda +(H3: (pr2 (CHead c0 k t) t0 t3)).(insert_eq C (CHead c0 k t) (\lambda (c1: +C).(pr2 c1 t0 t3)) (\lambda (_: C).(pr3 (CHead c0 k t1) t0 t3)) (\lambda (y: +C).(\lambda (H4: (pr2 y t0 t3)).(pr2_ind (\lambda (c1: C).(\lambda (t4: +T).(\lambda (t5: T).((eq C c1 (CHead c0 k t)) \to (pr3 (CHead c0 k t1) t4 +t5))))) (\lambda (c1: C).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H5: (pr0 +t4 t5)).(\lambda (_: (eq C c1 (CHead c0 k t))).(pr3_pr2 (CHead c0 k t1) t4 t5 +(pr2_free (CHead c0 k t1) t4 t5 H5))))))) (\lambda (c1: C).(\lambda (d0: +C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H5: (getl i0 c1 (CHead d0 +(Bind Abbr) u0))).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H6: (pr0 t4 +t5)).(\lambda (t6: T).(\lambda (H7: (subst0 i0 u0 t5 t6)).(\lambda (H8: (eq C +c1 (CHead c0 k t))).(let H9 \def (eq_ind C c1 (\lambda (c2: C).(getl i0 c2 +(CHead d0 (Bind Abbr) u0))) H5 (CHead c0 k t) H8) in (nat_ind (\lambda (n: +nat).((getl n (CHead c0 k t) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t5 +t6) \to (pr3 (CHead c0 k t1) t4 t6)))) (\lambda (H10: (getl O (CHead c0 k t) +(CHead d0 (Bind Abbr) u0))).(\lambda (H11: (subst0 O u0 t5 t6)).(K_ind +(\lambda (k0: K).((clear (CHead c0 k0 t) (CHead d0 (Bind Abbr) u0)) \to (pr3 +(CHead c0 k0 t1) t4 t6))) (\lambda (b: B).(\lambda (H12: (clear (CHead c0 +(Bind b) t) (CHead d0 (Bind Abbr) u0))).(let H13 \def (f_equal C C (\lambda +(e: C).(match e with [(CSort _) \Rightarrow d0 | (CHead c2 _ _) \Rightarrow +c2])) (CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t) (clear_gen_bind b c0 +(CHead d0 (Bind Abbr) u0) t H12)) in ((let H14 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow +(match k0 with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) +(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead +d0 (Bind Abbr) u0) t H12)) in ((let H15 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t7) \Rightarrow t7])) +(CHead d0 (Bind Abbr) u0) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead +d0 (Bind Abbr) u0) t H12)) in (\lambda (H16: (eq B Abbr b)).(\lambda (_: (eq +C d0 c0)).(let H18 \def (eq_ind T u0 (\lambda (t7: T).(subst0 O t7 t5 t6)) +H11 t H15) in (eq_ind B Abbr (\lambda (b0: B).(pr3 (CHead c0 (Bind b0) t1) t4 +t6)) (ex2_ind T (\lambda (t7: T).(subst0 O t2 t5 t7)) (\lambda (t7: +T).(subst0 (S (plus i O)) u t7 t6)) (pr3 (CHead c0 (Bind Abbr) t1) t4 t6) +(\lambda (x: T).(\lambda (H19: (subst0 O t2 t5 x)).(\lambda (H20: (subst0 (S +(plus i O)) u x t6)).(let H21 \def (f_equal nat nat S (plus i O) i (sym_eq +nat i (plus i O) (plus_n_O i))) in (let H22 \def (eq_ind nat (S (plus i O)) +(\lambda (n: nat).(subst0 n u x t6)) H20 (S i) H21) in (ex2_ind T (\lambda +(t7: T).(subst0 O t1 t5 t7)) (\lambda (t7: T).(pr0 t7 x)) (pr3 (CHead c0 +(Bind Abbr) t1) t4 t6) (\lambda (x0: T).(\lambda (H23: (subst0 O t1 t5 +x0)).(\lambda (H24: (pr0 x0 x)).(pr3_sing (CHead c0 (Bind Abbr) t1) x0 t4 +(pr2_delta (CHead c0 (Bind Abbr) t1) c0 t1 O (getl_refl Abbr c0 t1) t4 t5 H6 +x0 H23) t6 (pr3_pr2 (CHead c0 (Bind Abbr) t1) x0 t6 (pr2_delta (CHead c0 +(Bind Abbr) t1) d u (S i) (getl_clear_bind Abbr (CHead c0 (Bind Abbr) t1) c0 +t1 (clear_bind Abbr c0 t1) (CHead d (Bind Abbr) u) i H0) x0 x H24 t6 +H22)))))) (pr0_subst0_back t2 t5 x O H19 t1 H1))))))) (subst0_subst0 t5 t6 t +O H18 t2 u i H2)) b H16))))) H14)) H13)))) (\lambda (f: F).(\lambda (H12: +(clear (CHead c0 (Flat f) t) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c0 +(Flat f) t1) t4 t6 (pr2_cflat c0 t4 t6 (pr2_delta c0 d0 u0 O (getl_intro O c0 +(CHead d0 (Bind Abbr) u0) c0 (drop_refl c0) (clear_gen_flat f c0 (CHead d0 +(Bind Abbr) u0) t H12)) t4 t5 H6 t6 H11) f t1)))) k (getl_gen_O (CHead c0 k +t) (CHead d0 (Bind Abbr) u0) H10)))) (\lambda (i1: nat).(\lambda (_: (((getl +i1 (CHead c0 k t) (CHead d0 (Bind Abbr) u0)) \to ((subst0 i1 u0 t5 t6) \to +(pr3 (CHead c0 k t1) t4 t6))))).(\lambda (H10: (getl (S i1) (CHead c0 k t) +(CHead d0 (Bind Abbr) u0))).(\lambda (H11: (subst0 (S i1) u0 t5 t6)).(K_ind +(\lambda (k0: K).((getl (S i1) (CHead c0 k0 t) (CHead d0 (Bind Abbr) u0)) \to +(pr3 (CHead c0 k0 t1) t4 t6))) (\lambda (b: B).(\lambda (H12: (getl (S i1) +(CHead c0 (Bind b) t) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c0 (Bind b) +t1) t4 t6 (pr2_delta (CHead c0 (Bind b) t1) d0 u0 (S i1) (getl_head (Bind b) +i1 c0 (CHead d0 (Bind Abbr) u0) (getl_gen_S (Bind b) c0 (CHead d0 (Bind Abbr) +u0) t i1 H12) t1) t4 t5 H6 t6 H11)))) (\lambda (f: F).(\lambda (H12: (getl (S +i1) (CHead c0 (Flat f) t) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c0 +(Flat f) t1) t4 t6 (pr2_cflat c0 t4 t6 (pr2_delta c0 d0 u0 (r (Flat f) i1) +(getl_gen_S (Flat f) c0 (CHead d0 (Bind Abbr) u0) t i1 H12) t4 t5 H6 t6 H11) +f t1)))) k H10))))) i0 H9 H7))))))))))))) y t0 t3 H4))) H3))))))))))))))) c +u1 u2 H)))). + +lemma pr3_pr2_pr3_t: + \forall (c: C).(\forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall +(k: K).((pr3 (CHead c k u2) t1 t2) \to (\forall (u1: T).((pr2 c u1 u2) \to +(pr3 (CHead c k u1) t1 t2)))))))) +\def + \lambda (c: C).(\lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(k: K).(\lambda (H: (pr3 (CHead c k u2) t1 t2)).(pr3_ind (CHead c k u2) +(\lambda (t: T).(\lambda (t0: T).(\forall (u1: T).((pr2 c u1 u2) \to (pr3 +(CHead c k u1) t t0))))) (\lambda (t: T).(\lambda (u1: T).(\lambda (_: (pr2 c +u1 u2)).(pr3_refl (CHead c k u1) t)))) (\lambda (t0: T).(\lambda (t3: +T).(\lambda (H0: (pr2 (CHead c k u2) t3 t0)).(\lambda (t4: T).(\lambda (_: +(pr3 (CHead c k u2) t0 t4)).(\lambda (H2: ((\forall (u1: T).((pr2 c u1 u2) +\to (pr3 (CHead c k u1) t0 t4))))).(\lambda (u1: T).(\lambda (H3: (pr2 c u1 +u2)).(pr3_t t0 t3 (CHead c k u1) (pr3_pr2_pr2_t c u1 u2 H3 t3 t0 k H0) t4 (H2 +u1 H3)))))))))) t1 t2 H)))))). + +theorem pr3_pr3_pr3_t: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall +(t1: T).(\forall (t2: T).(\forall (k: K).((pr3 (CHead c k u2) t1 t2) \to (pr3 +(CHead c k u1) t1 t2)))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 +u2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (t1: T).(\forall +(t2: T).(\forall (k: K).((pr3 (CHead c k t0) t1 t2) \to (pr3 (CHead c k t) t1 +t2))))))) (\lambda (t: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: +K).(\lambda (H0: (pr3 (CHead c k t) t1 t2)).H0))))) (\lambda (t2: T).(\lambda +(t1: T).(\lambda (H0: (pr2 c t1 t2)).(\lambda (t3: T).(\lambda (_: (pr3 c t2 +t3)).(\lambda (H2: ((\forall (t4: T).(\forall (t5: T).(\forall (k: K).((pr3 +(CHead c k t3) t4 t5) \to (pr3 (CHead c k t2) t4 t5))))))).(\lambda (t0: +T).(\lambda (t4: T).(\lambda (k: K).(\lambda (H3: (pr3 (CHead c k t3) t0 +t4)).(pr3_pr2_pr3_t c t2 t0 t4 k (H2 t0 t4 k H3) t1 H0))))))))))) u1 u2 H)))). + +lemma pr3_lift: + \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h +d c e) \to (\forall (t1: T).(\forall (t2: T).((pr3 e t1 t2) \to (pr3 c (lift +h d t1) (lift h d t2))))))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 e t1 +t2)).(pr3_ind e (\lambda (t: T).(\lambda (t0: T).(pr3 c (lift h d t) (lift h +d t0)))) (\lambda (t: T).(pr3_refl c (lift h d t))) (\lambda (t0: T).(\lambda +(t3: T).(\lambda (H1: (pr2 e t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 e t0 +t4)).(\lambda (H3: (pr3 c (lift h d t0) (lift h d t4))).(pr3_sing c (lift h d +t0) (lift h d t3) (pr2_lift c e h d H t3 t0 H1) (lift h d t4) H3))))))) t1 t2 +H0)))))))). + +lemma pr3_eta: + \forall (c: C).(\forall (w: T).(\forall (u: T).(let t \def (THead (Bind +Abst) w u) in (\forall (v: T).((pr3 c v w) \to (pr3 c (THead (Bind Abst) v +(THead (Flat Appl) (TLRef O) (lift (S O) O t))) t)))))) +\def + \lambda (c: C).(\lambda (w: T).(\lambda (u: T).(let t \def (THead (Bind +Abst) w u) in (\lambda (v: T).(\lambda (H: (pr3 c v w)).(eq_ind_r T (THead +(Bind Abst) (lift (S O) O w) (lift (S O) (S O) u)) (\lambda (t0: T).(pr3 c +(THead (Bind Abst) v (THead (Flat Appl) (TLRef O) t0)) (THead (Bind Abst) w +u))) (pr3_head_12 c v w H (Bind Abst) (THead (Flat Appl) (TLRef O) (THead +(Bind Abst) (lift (S O) O w) (lift (S O) (S O) u))) u (pr3_pr1 (THead (Flat +Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) (S O) u))) u +(pr1_sing (THead (Bind Abbr) (TLRef O) (lift (S O) (S O) u)) (THead (Flat +Appl) (TLRef O) (THead (Bind Abst) (lift (S O) O w) (lift (S O) (S O) u))) +(pr0_beta (lift (S O) O w) (TLRef O) (TLRef O) (pr0_refl (TLRef O)) (lift (S +O) (S O) u) (lift (S O) (S O) u) (pr0_refl (lift (S O) (S O) u))) u (pr1_sing +(THead (Bind Abbr) (TLRef O) (lift (S O) O u)) (THead (Bind Abbr) (TLRef O) +(lift (S O) (S O) u)) (pr0_delta1 (TLRef O) (TLRef O) (pr0_refl (TLRef O)) +(lift (S O) (S O) u) (lift (S O) (S O) u) (pr0_refl (lift (S O) (S O) u)) +(lift (S O) O u) (subst1_lift_S u O O (le_O_n O))) u (pr1_pr0 (THead (Bind +Abbr) (TLRef O) (lift (S O) O u)) u (pr0_zeta Abbr not_abbr_abst u u +(pr0_refl u) (TLRef O))))) (CHead c (Bind Abst) w))) (lift (S O) O (THead +(Bind Abst) w u)) (lift_bind Abst w u (S O) O))))))). + +lemma pr3_gen_void: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c +(THead (Bind Void) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) t1 t2)))))) (pr3 (CHead c (Bind Void) u1) t1 +(lift (S O) O x))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr3 c (THead (Bind Void) u1 t1) x)).(insert_eq T (THead (Bind Void) u1 +t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t2)))))) (pr3 (CHead c +(Bind Void) u1) t1 (lift (S O) O x)))) (\lambda (y: T).(\lambda (H0: (pr3 c y +x)).(unintro T t1 (\lambda (t: T).((eq T y (THead (Bind Void) u1 t)) \to (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +t t2)))))) (pr3 (CHead c (Bind Void) u1) t (lift (S O) O x))))) (unintro T u1 +(\lambda (t: T).(\forall (x0: T).((eq T y (THead (Bind Void) t x0)) \to (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +x0 t2)))))) (pr3 (CHead c (Bind Void) t) x0 (lift (S O) O x)))))) (pr3_ind c +(\lambda (t: T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: T).((eq T t +(THead (Bind Void) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) x1 t2)))))) (pr3 (CHead c (Bind Void) x0) x1 +(lift (S O) O t0)))))))) (\lambda (t: T).(\lambda (x0: T).(\lambda (x1: +T).(\lambda (H1: (eq T t (THead (Bind Void) x0 x1))).(eq_ind_r T (THead (Bind +Void) x0 x1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) x1 t2)))))) (pr3 (CHead c (Bind Void) x0) x1 +(lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t2)))))) (pr3 (CHead c +(Bind Void) x0) x1 (lift (S O) O (THead (Bind Void) x0 x1))) (ex3_2_intro T T +(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Void) x0 x1) (THead +(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead +c (Bind b) u) x1 t2))))) x0 x1 (refl_equal T (THead (Bind Void) x0 x1)) +(pr3_refl c x0) (\lambda (b: B).(\lambda (u: T).(pr3_refl (CHead c (Bind b) +u) x1))))) t H1))))) (\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c +t3 t2)).(\lambda (t4: T).(\lambda (H2: (pr3 c t2 t4)).(\lambda (H3: ((\forall +(x0: T).(\forall (x1: T).((eq T t2 (THead (Bind Void) x0 x1)) \to (or (ex3_2 +T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) +(pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4)))))))).(\lambda (x0: +T).(\lambda (x1: T).(\lambda (H4: (eq T t3 (THead (Bind Void) x0 x1))).(let +H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c t t2)) H1 (THead (Bind Void) x0 +x1) H4) in (let H6 \def (pr2_gen_void c x0 x1 t2 H5) in (or_ind (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind Void) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 t5)))))) +(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 (lift (S O) O +t2)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind +Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4))) (\lambda +(H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind Void) +u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +x1 t5))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead +(Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead +c (Bind b) u) x1 t5))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq +T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))) (\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) +O t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H8: (eq T t2 (THead (Bind +Void) x2 x3))).(\lambda (H9: (pr2 c x0 x2)).(\lambda (H10: ((\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let H11 \def (eq_ind +T t2 (\lambda (t: T).(\forall (x4: T).(\forall (x5: T).((eq T t (THead (Bind +Void) x4 x5)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead (Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) +(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead +c (Bind b) u) x5 t5)))))) (pr3 (CHead c (Bind Void) x4) x5 (lift (S O) O +t4))))))) H3 (THead (Bind Void) x2 x3) H8) in (let H12 \def (H11 x2 x3 +(refl_equal T (THead (Bind Void) x2 x3))) in (or_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5)))))) (pr3 (CHead c +(Bind Void) x2) x3 (lift (S O) O t4)) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) (pr3 (CHead c +(Bind Void) x0) x1 (lift (S O) O t4))) (\lambda (H13: (ex3_2 T T (\lambda +(u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5))))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x3 t5))))) +(or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) +u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4))) (\lambda +(x4: T).(\lambda (x5: T).(\lambda (H14: (eq T t4 (THead (Bind Void) x4 +x5))).(\lambda (H15: (pr3 c x2 x4)).(\lambda (H16: ((\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) x3 x5))))).(or_introl (ex3_2 T T (\lambda +(u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) (pr3 (CHead c +(Bind Void) x0) x1 (lift (S O) O t4)) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5))))) x4 x5 H14 +(pr3_sing c x2 x0 H9 x4 H15) (\lambda (b: B).(\lambda (u: T).(pr3_sing (CHead +c (Bind b) u) x3 x1 (H10 b u) x5 (H16 b u))))))))))) H13)) (\lambda (H13: +(pr3 (CHead c (Bind Void) x2) x3 (lift (S O) O t4))).(or_intror (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Void) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x1 t5)))))) +(pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4)) (pr3_sing (CHead c (Bind +Void) x0) x3 x1 (H10 Void x0) (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 (lift +(S O) O t4) (Bind Void) H13 x0 H9)))) H12)))))))) H7)) (\lambda (H7: +((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 (lift (S O) O +t2)))))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead (Bind Void) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead +c (Bind b) u) x1 t5)))))) (pr3 (CHead c (Bind Void) x0) x1 (lift (S O) O t4)) +(pr3_sing (CHead c (Bind Void) x0) (lift (S O) O t2) x1 (H7 Void x0) (lift (S +O) O t4) (pr3_lift (CHead c (Bind Void) x0) c (S O) O (drop_drop (Bind Void) +O c c (drop_refl c) x0) t2 t4 H2)))) H6)))))))))))) y x H0))))) H))))). + +lemma pr3_gen_abbr: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c +(THead (Bind Abbr) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) +u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr3 c (THead (Bind Abbr) u1 t1) x)).(insert_eq T (THead (Bind Abbr) u1 +t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S +O) O x)))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T t1 (\lambda +(t: T).((eq T y (THead (Bind Abbr) u1 t)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Abbr) u1) t t2)))) (pr3 (CHead c (Bind Abbr) u1) t (lift (S O) +O x))))) (unintro T u1 (\lambda (t: T).(\forall (x0: T).((eq T y (THead (Bind +Abbr) t x0)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) t) x0 t2)))) (pr3 +(CHead c (Bind Abbr) t) x0 (lift (S O) O x)))))) (pr3_ind c (\lambda (t: +T).(\lambda (t0: T).(\forall (x0: T).(\forall (x1: T).((eq T t (THead (Bind +Abbr) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 +(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) x0) x1 t2)))) (pr3 +(CHead c (Bind Abbr) x0) x1 (lift (S O) O t0)))))))) (\lambda (t: T).(\lambda +(x0: T).(\lambda (x1: T).(\lambda (H1: (eq T t (THead (Bind Abbr) x0 +x1))).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t0: T).(or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 (CHead c (Bind Abbr) x0) x1 t2)))) (pr3 (CHead c (Bind Abbr) x0) +x1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t2)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O (THead (Bind Abbr) x0 x1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda +(t2: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t2)))) (\lambda +(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t2))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 +x1)) (pr3_refl c x0) (pr3_refl (CHead c (Bind Abbr) x0) x1))) t H1))))) +(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: +T).(\lambda (H2: (pr3 c t2 t4)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: +T).((eq T t2 (THead (Bind Abbr) x0 x1)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O t4)))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t3 +(THead (Bind Abbr) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c +t t2)) H1 (THead (Bind Abbr) x0 x1) H4) in (let H6 \def (pr2_gen_abbr c x0 x1 +t2 H5) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 +(THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 +(CHead c (Bind b) u) x1 t5))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: +T).(pr2 (CHead c (Bind Abbr) u) x1 t5))) (ex3_2 T T (\lambda (y0: T).(\lambda +(_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: +T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) +z t5)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 +(lift (S O) O t2)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T +t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 +t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H7: +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind Abbr) u2 +t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind +b) u) x1 t5))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead +c (Bind Abbr) u) x1 t5))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) z +t5))))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead +(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 +(CHead c (Bind b) u) x1 t5))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: +T).(pr2 (CHead c (Bind Abbr) u) x1 t5))) (ex3_2 T T (\lambda (y0: T).(\lambda +(_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: +T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) +z t5))))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 +(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x2: T).(\lambda +(x3: T).(\lambda (H8: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (H9: (pr2 +c x0 x2)).(\lambda (H10: (or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c +(Bind b) u) x1 x3))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 +(CHead c (Bind Abbr) u) x1 x3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: +T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: +T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) +z x3)))))).(or3_ind (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +x1 x3))) (ex2 T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead c +(Bind Abbr) u) x1 x3))) (ex3_2 T T (\lambda (y0: T).(\lambda (_: T).(pr2 +(CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: T).(\lambda (z: T).(pr0 y0 +z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) x0) z x3)))) +(or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) +u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c +(Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H11: ((\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let H12 \def (eq_ind +T t2 (\lambda (t: T).(\forall (x4: T).(\forall (x5: T).((eq T t (THead (Bind +Abbr) x4 x5)) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x4 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x4) x5 t5)))) (pr3 +(CHead c (Bind Abbr) x4) x5 (lift (S O) O t4))))))) H3 (THead (Bind Abbr) x2 +x3) H8) in (let H13 \def (H12 x2 x3 (refl_equal T (THead (Bind Abbr) x2 x3))) +in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind +Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5)))) (pr3 (CHead c +(Bind Abbr) x2) x3 (lift (S O) O t4)) (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O t4))) (\lambda (H14: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T +t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 +u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 +t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5))) (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 +t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c +(Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x4: T).(\lambda (x5: +T).(\lambda (H15: (eq T t4 (THead (Bind Abbr) x4 x5))).(\lambda (H16: (pr3 c +x2 x4)).(\lambda (H17: (pr3 (CHead c (Bind Abbr) x2) x3 x5)).(eq_ind_r T +(THead (Bind Abbr) x4 x5) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O t)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T +(THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O (THead (Bind Abbr) x4 x5))) (ex3_2_intro T T (\lambda (u2: T).(\lambda +(t5: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t5)))) (\lambda +(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5))) x4 x5 (refl_equal T (THead (Bind Abbr) x4 +x5)) (pr3_sing c x2 x0 H9 x4 H16) (pr3_sing (CHead c (Bind Abbr) x0) x3 x1 +(H11 Abbr x0) x5 (pr3_pr2_pr3_t c x2 x3 x5 (Bind Abbr) H17 x0 H9)))) t4 +H15)))))) H14)) (\lambda (H14: (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S O) O +t4))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 +(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4)) (pr3_sing (CHead c (Bind Abbr) +x0) x3 x1 (H11 Abbr x0) (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 (lift (S O) +O t4) (Bind Abbr) H14 x0 H9)))) H13)))) (\lambda (H11: (ex2 T (\lambda (u: +T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) x1 +x3)))).(ex2_ind T (\lambda (u: T).(pr0 x0 u)) (\lambda (u: T).(pr2 (CHead c +(Bind Abbr) u) x1 x3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T +t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 +t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x4: +T).(\lambda (H12: (pr0 x0 x4)).(\lambda (H13: (pr2 (CHead c (Bind Abbr) x4) +x1 x3)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(\forall (x5: T).(\forall +(x6: T).((eq T t (THead (Bind Abbr) x5 x6)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x5 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x5) x6 t5)))) (pr3 (CHead c (Bind Abbr) x5) x6 (lift (S +O) O t4))))))) H3 (THead (Bind Abbr) x2 x3) H8) in (let H15 \def (H14 x2 x3 +(refl_equal T (THead (Bind Abbr) x2 x3))) in (or_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x2) x3 t5)))) (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S +O) O t4)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 +(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H16: (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x2) x3 t5))) (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) +x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda +(x5: T).(\lambda (x6: T).(\lambda (H17: (eq T t4 (THead (Bind Abbr) x5 +x6))).(\lambda (H18: (pr3 c x2 x5)).(\lambda (H19: (pr3 (CHead c (Bind Abbr) +x2) x3 x6)).(eq_ind_r T (THead (Bind Abbr) x5 x6) (\lambda (t: T).(or (ex3_2 +T T (\lambda (u2: T).(\lambda (t5: T).(eq T t (THead (Bind Abbr) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) +x1 (lift (S O) O t)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t5: +T).(eq T (THead (Bind Abbr) x5 x6) (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O (THead (Bind Abbr) x5 x6))) (ex3_2_intro T T (\lambda (u2: T).(\lambda +(t5: T).(eq T (THead (Bind Abbr) x5 x6) (THead (Bind Abbr) u2 t5)))) (\lambda +(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5))) x5 x6 (refl_equal T (THead (Bind Abbr) x5 +x6)) (pr3_sing c x2 x0 H9 x5 H18) (pr3_t x3 x1 (CHead c (Bind Abbr) x0) +(pr3_pr0_pr2_t x0 x4 H12 c x1 x3 (Bind Abbr) H13) x6 (pr3_pr2_pr3_t c x2 x3 +x6 (Bind Abbr) H19 x0 H9)))) t4 H17)))))) H16)) (\lambda (H16: (pr3 (CHead c +(Bind Abbr) x2) x3 (lift (S O) O t4))).(or_intror (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O t4)) (pr3_t x3 x1 (CHead c (Bind Abbr) x0) (pr3_pr0_pr2_t x0 x4 H12 c x1 +x3 (Bind Abbr) H13) (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 (lift (S O) O +t4) (Bind Abbr) H16 x0 H9)))) H15)))))) H11)) (\lambda (H11: (ex3_2 T T +(\lambda (y0: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) +(\lambda (y0: T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: +T).(pr2 (CHead c (Bind Abbr) x0) z x3))))).(ex3_2_ind T T (\lambda (y0: +T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) x0) x1 y0))) (\lambda (y0: +T).(\lambda (z: T).(pr0 y0 z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c +(Bind Abbr) x0) z x3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq +T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 +t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (x4: +T).(\lambda (x5: T).(\lambda (H12: (pr2 (CHead c (Bind Abbr) x0) x1 +x4)).(\lambda (H13: (pr0 x4 x5)).(\lambda (H14: (pr2 (CHead c (Bind Abbr) x0) +x5 x3)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(\forall (x6: T).(\forall +(x7: T).((eq T t (THead (Bind Abbr) x6 x7)) \to (or (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x6 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x6) x7 t5)))) (pr3 (CHead c (Bind Abbr) x6) x7 (lift (S +O) O t4))))))) H3 (THead (Bind Abbr) x2 x3) H8) in (let H16 \def (H15 x2 x3 +(refl_equal T (THead (Bind Abbr) x2 x3))) in (or_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x2) x3 t5)))) (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S +O) O t4)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 +(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda (H17: (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 (CHead c (Bind Abbr) x2) x3 t5))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x2) x3 t5))) (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) +x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4))) (\lambda +(x6: T).(\lambda (x7: T).(\lambda (H18: (eq T t4 (THead (Bind Abbr) x6 +x7))).(\lambda (H19: (pr3 c x2 x6)).(\lambda (H20: (pr3 (CHead c (Bind Abbr) +x2) x3 x7)).(eq_ind_r T (THead (Bind Abbr) x6 x7) (\lambda (t: T).(or (ex3_2 +T T (\lambda (u2: T).(\lambda (t5: T).(eq T t (THead (Bind Abbr) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) +x1 (lift (S O) O t)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t5: +T).(eq T (THead (Bind Abbr) x6 x7) (THead (Bind Abbr) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S +O) O (THead (Bind Abbr) x6 x7))) (ex3_2_intro T T (\lambda (u2: T).(\lambda +(t5: T).(eq T (THead (Bind Abbr) x6 x7) (THead (Bind Abbr) u2 t5)))) (\lambda +(u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 +(CHead c (Bind Abbr) x0) x1 t5))) x6 x7 (refl_equal T (THead (Bind Abbr) x6 +x7)) (pr3_sing c x2 x0 H9 x6 H19) (pr3_sing (CHead c (Bind Abbr) x0) x4 x1 +H12 x7 (pr3_sing (CHead c (Bind Abbr) x0) x5 x4 (pr2_free (CHead c (Bind +Abbr) x0) x4 x5 H13) x7 (pr3_sing (CHead c (Bind Abbr) x0) x3 x5 H14 x7 +(pr3_pr2_pr3_t c x2 x3 x7 (Bind Abbr) H20 x0 H9)))))) t4 H18)))))) H17)) +(\lambda (H17: (pr3 (CHead c (Bind Abbr) x2) x3 (lift (S O) O +t4))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) x0) x1 t5)))) (pr3 +(CHead c (Bind Abbr) x0) x1 (lift (S O) O t4)) (pr3_sing (CHead c (Bind Abbr) +x0) x4 x1 H12 (lift (S O) O t4) (pr3_sing (CHead c (Bind Abbr) x0) x5 x4 +(pr2_free (CHead c (Bind Abbr) x0) x4 x5 H13) (lift (S O) O t4) (pr3_sing +(CHead c (Bind Abbr) x0) x3 x5 H14 (lift (S O) O t4) (pr3_pr2_pr3_t c x2 x3 +(lift (S O) O t4) (Bind Abbr) H17 x0 H9)))))) H16)))))))) H11)) H10)))))) +H7)) (\lambda (H7: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +x1 (lift (S O) O t2)))))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda +(t5: T).(eq T t4 (THead (Bind Abbr) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 (CHead c (Bind Abbr) +x0) x1 t5)))) (pr3 (CHead c (Bind Abbr) x0) x1 (lift (S O) O t4)) (pr3_sing +(CHead c (Bind Abbr) x0) (lift (S O) O t2) x1 (H7 Abbr x0) (lift (S O) O t4) +(pr3_lift (CHead c (Bind Abbr) x0) c (S O) O (drop_drop (Bind Abbr) O c c +(drop_refl c) x0) t2 t4 H2)))) H6)))))))))))) y x H0))))) H))))). + +lemma pr3_gen_appl: + \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c +(THead (Flat Appl) u1 t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 t2)))) (ex4_4 T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 +c (THead (Bind Abbr) u2 t2) x))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (_: T).(pr3 c u1 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c t1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) x))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda +(H: (pr3 c (THead (Flat Appl) u1 t1) x)).(insert_eq T (THead (Flat Appl) u1 +t1) (\lambda (t: T).(pr3 c t x)) (\lambda (_: T).(or3 (ex3_2 T T (\lambda +(u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c t1 +t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) x))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c t1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +x))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2)))))))))) (\lambda (y: T).(\lambda (H0: (pr3 c y x)).(unintro T t1 +(\lambda (t: T).((eq T y (THead (Flat Appl) u1 t)) \to (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c t t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) x))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 +u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c t (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2)) x))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))) (unintro T u1 (\lambda +(t: T).(\forall (x0: T).((eq T y (THead (Flat Appl) t x0)) \to (or3 (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: +T).(pr3 c x0 t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) x))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x0 (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +x))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2)))))))))))) (pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall +(x0: T).(\forall (x1: T).((eq T t (THead (Flat Appl) x0 x1)) \to (or3 (ex3_2 +T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 c x1 t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) t0))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t0))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))))))) +(\lambda (t: T).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: (eq T t +(THead (Flat Appl) x0 x1))).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda +(t0: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead +(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 c x1 t2)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind +Abbr) u2 t2) t0))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t0))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))) +(or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat +Appl) x0 x1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c x1 t2)))) (ex4_4 T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 +c (THead (Bind Abbr) u2 t2) (THead (Flat Appl) x0 x1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +(THead (Flat Appl) x0 x1)))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 +(CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: +T).(\lambda (t2: T).(eq T (THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 c x1 t2))) x0 x1 (refl_equal T (THead (Flat Appl) x0 +x1)) (pr3_refl c x0) (pr3_refl c x1))) t H1))))) (\lambda (t2: T).(\lambda +(t3: T).(\lambda (H1: (pr2 c t3 t2)).(\lambda (t4: T).(\lambda (H2: (pr3 c t2 +t4)).(\lambda (H3: ((\forall (x0: T).(\forall (x1: T).((eq T t2 (THead (Flat +Appl) x0 x1)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 +z2)))))))))))))).(\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t3 +(THead (Flat Appl) x0 x1))).(let H5 \def (eq_ind T t3 (\lambda (t: T).(pr2 c +t t2)) H1 (THead (Flat Appl) x0 x1) H4) in (let H6 \def (pr2_gen_appl c x0 x1 +t2 H5) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 +(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr2 c x1 t5)))) (ex4_4 T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x1 (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t5: T).(eq T t2 (THead (Bind Abbr) u2 t5)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq +T x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead +(Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (or3 (ex3_2 +T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Flat Appl) +u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr2 c x1 t5))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t2 (THead (Flat Appl) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr2 c x1 +t5))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat +Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) +t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 +c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(x2: T).(\lambda (x3: T).(\lambda (H8: (eq T t2 (THead (Flat Appl) x2 +x3))).(\lambda (H9: (pr2 c x0 x2)).(\lambda (H10: (pr2 c x1 x3)).(let H11 +\def (eq_ind T t2 (\lambda (t: T).(\forall (x4: T).(\forall (x5: T).((eq T t +(THead (Flat Appl) x4 x5)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: +T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x4 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x5 t5)))) (ex4_4 T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 +c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (_: T).(pr3 c x4 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x5 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x5 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x4 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) H3 +(THead (Flat Appl) x2 x3) H8) in (let H12 \def (eq_ind T t2 (\lambda (t: +T).(pr3 c t t4)) H2 (THead (Flat Appl) x2 x3) H8) in (let H13 \def (H11 x2 x3 +(refl_equal T (THead (Flat Appl) x2 x3))) in (or3_ind (ex3_2 T T (\lambda +(u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x3 +t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +t4))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2)))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(H14: (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat +Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x3 t5))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x3 +t5))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat +Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) +t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 +c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(x4: T).(\lambda (x5: T).(\lambda (H15: (eq T t4 (THead (Flat Appl) x4 +x5))).(\lambda (H16: (pr3 c x2 x4)).(\lambda (H17: (pr3 c x3 x5)).(eq_ind_r T +(THead (Flat Appl) x4 x5) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t (THead (Flat Appl) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 +t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))) +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +t))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: +T).(eq T (THead (Flat Appl) x4 x5) (THead (Flat Appl) u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 +t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) (THead (Flat Appl) x4 +x5)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) (THead (Flat Appl) x4 x5)))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) +(ex3_2_intro T T (\lambda (u2: T).(\lambda (t5: T).(eq T (THead (Flat Appl) +x4 x5) (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c +x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5))) x4 x5 (refl_equal T +(THead (Flat Appl) x4 x5)) (pr3_sing c x2 x0 H9 x4 H16) (pr3_sing c x3 x1 H10 +x5 H17))) t4 H15)))))) H14)) (\lambda (H14: (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5))))))))).(ex4_4_ind T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 +c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (_: T).(pr3 c x2 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5))))))) (or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H15: +(pr3 c (THead (Bind Abbr) x6 x7) t4)).(\lambda (H16: (pr3 c x2 x6)).(\lambda +(H17: (pr3 c x3 (THead (Bind Abst) x4 x5))).(\lambda (H18: ((\forall (b: +B).(\forall (u: T).(pr3 (CHead c (Bind b) u) x5 x7))))).(or3_intro1 (ex3_2 T +T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro +T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: +T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 +t5))))))) x4 x5 x6 x7 H15 (pr3_sing c x2 x0 H9 x6 H16) (pr3_sing c x3 x1 H10 +(THead (Bind Abst) x4 x5) H17) H18)))))))))) H14)) (\lambda (H14: (ex6_6 B T +T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c x3 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x2 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x3 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x2 u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 +(CHead c (Bind b) y2) z1 z2))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda +(t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 +c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(x4: B).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (x8: +T).(\lambda (x9: T).(\lambda (H15: (not (eq B x4 Abst))).(\lambda (H16: (pr3 +c x3 (THead (Bind x4) x5 x6))).(\lambda (H17: (pr3 c (THead (Bind x4) x9 +(THead (Flat Appl) (lift (S O) O x8) x7)) t4)).(\lambda (H18: (pr3 c x2 +x8)).(\lambda (H19: (pr3 c x5 x9)).(\lambda (H20: (pr3 (CHead c (Bind x4) x9) +x6 x7)).(or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro +B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(pr3 c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c +(THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))) +x4 x5 x6 x7 x8 x9 H15 (pr3_sing c x3 x1 H10 (THead (Bind x4) x5 x6) H16) H17 +(pr3_sing c x2 x0 H9 x8 H18) H19 H20)))))))))))))) H14)) H13))))))))) H7)) +(\lambda (H7: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(eq T x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind +Abbr) u2 t5)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +z1 t5))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(eq T x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(eq T t2 (THead (Bind +Abbr) u2 t5)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +z1 t5))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H8: (eq +T x1 (THead (Bind Abst) x2 x3))).(\lambda (H9: (eq T t2 (THead (Bind Abbr) x4 +x5))).(\lambda (H10: (pr2 c x0 x4)).(\lambda (H11: ((\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x3 x5))))).(eq_ind_r T (THead (Bind Abst) x2 +x3) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T +t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c t t5)))) (ex4_4 T T T T +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c +(THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c t (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))) (let H12 +\def (eq_ind T t2 (\lambda (t: T).(\forall (x6: T).(\forall (x7: T).((eq T t +(THead (Flat Appl) x6 x7)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: +T).(eq T t4 (THead (Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x6 u2))) (\lambda (_: T).(\lambda (t5: T).(pr3 c x7 t5)))) (ex4_4 T +T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 +c (THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (_: T).(pr3 c x6 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x7 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x7 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x6 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) H3 +(THead (Bind Abbr) x4 x5) H9) in (let H13 \def (eq_ind T t2 (\lambda (t: +T).(pr3 c t t4)) H2 (THead (Bind Abbr) x4 x5) H9) in (or3_intro1 (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 c (THead (Bind Abst) x2 x3) t5)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) x2 x3) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) x2 x3) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat +Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c +(THead (Bind Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind Abst) x2 x3) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t5))))))) x2 x3 x4 x5 H13 (pr3_pr2 c x0 x4 H10) (pr3_refl c (THead (Bind +Abst) x2 x3)) (\lambda (b: B).(\lambda (u: T).(pr3_pr2 (CHead c (Bind b) u) +x3 x5 (H11 b u)))))))) x1 H8))))))))) H7)) (\lambda (H7: (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x1 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T x1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) +(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) +u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: +T).(\lambda (t5: T).(pr3 c x1 t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) +t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 +c x0 u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c x1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c x1 (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) +y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda +(x2: B).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (x7: T).(\lambda (H8: (not (eq B x2 Abst))).(\lambda (H9: (eq T +x1 (THead (Bind x2) x3 x4))).(\lambda (H10: (eq T t2 (THead (Bind x2) x7 +(THead (Flat Appl) (lift (S O) O x6) x5)))).(\lambda (H11: (pr2 c x0 +x6)).(\lambda (H12: (pr2 c x3 x7)).(\lambda (H13: (pr2 (CHead c (Bind x2) x7) +x4 x5)).(eq_ind_r T (THead (Bind x2) x3 x4) (\lambda (t: T).(or3 (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 c t t5)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind Abbr) u2 t5) t4))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(pr3 c t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 +(CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c t (THead (Bind +b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead +(Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))))) (let H14 \def (eq_ind T t2 +(\lambda (t: T).(\forall (x8: T).(\forall (x9: T).((eq T t (THead (Flat Appl) +x8 x9)) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead +(Flat Appl) u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c x8 u2))) +(\lambda (_: T).(\lambda (t5: T).(pr3 c x9 t5)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x8 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c x9 (THead (Bind Abst) y1 z1)))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t5: T).(\forall +(b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) z1 t5)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 +c x9 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr3 c x8 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) y2) z1 z2))))))))))))) H3 +(THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) H10) in (let +H15 \def (eq_ind T t2 (\lambda (t: T).(pr3 c t t4)) H2 (THead (Bind x2) x7 +(THead (Flat Appl) (lift (S O) O x6) x5)) H10) in (or3_intro2 (ex3_2 T T +(\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead (Flat Appl) u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda +(t5: T).(pr3 c (THead (Bind x2) x3 x4) t5)))) (ex4_4 T T T T (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t5: T).(pr3 c (THead (Bind +Abbr) u2 t5) t4))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr3 c x0 u2))))) (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THead (Bind x2) x3 x4) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t5: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) +z1 t5)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) +(\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(pr3 c (THead (Bind x2) x3 x4) (THead (Bind b) y1 +z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: +T).(\lambda (u2: T).(\lambda (y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat +Appl) (lift (S O) O u2) z2)) t4))))))) (\lambda (_: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 +u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (y2: T).(pr3 c y1 y2))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(pr3 c +(THead (Bind x2) x3 x4) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(pr3 c (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2)) +t4))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr3 c x0 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr3 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr3 (CHead c (Bind b) +y2) z1 z2))))))) x2 x3 x4 x5 x6 x7 H8 (pr3_refl c (THead (Bind x2) x3 x4)) +H15 (pr3_pr2 c x0 x6 H11) (pr3_pr2 c x3 x7 H12) (pr3_pr2 (CHead c (Bind x2) +x7) x4 x5 H13))))) x1 H9))))))))))))) H7)) H6)))))))))))) y x H0))))) H))))). + +lemma pr3_gen_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u1: +T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind b) u1 t1) x) \to (or +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind b) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind b) u1) t1 t2)))) (pr3 (CHead c (Bind +b) u1) t1 (lift (S O) O x))))))))) +\def + \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall +(c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind +b0) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind b0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b0) u1) t1 t2)))) (pr3 +(CHead c (Bind b0) u1) t1 (lift (S O) O x)))))))))) (\lambda (_: (not (eq B +Abbr Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: +T).(\lambda (H0: (pr3 c (THead (Bind Abbr) u1 t1) x)).(let H1 \def +(pr3_gen_abbr c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) +u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (or (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) +t1 (lift (S O) O x))) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 +t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind +Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) (or (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda +(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) +t1 (lift (S O) O x))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T x +(THead (Bind Abbr) x0 x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: (pr3 +(CHead c (Bind Abbr) u1) t1 x1)).(or_introl (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S +O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) x0 x1 +H3 H4 H5))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S +O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 +(CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) H2)) H1)))))))) (\lambda (H: +(not (eq B Abst Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (_: (pr3 c (THead (Bind Abst) u1 t1) x)).(let H1 +\def (match (H (refl_equal B Abst)) in False with []) in H1))))))) (\lambda +(_: (not (eq B Void Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (H0: (pr3 c (THead (Bind Void) u1 t1) x)).(let H1 +\def (pr3_gen_void c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall +(b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t2)))))) (pr3 (CHead c +(Bind Void) u1) t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) +u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda +(H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) +u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) +u) t1 t2))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead +c (Bind b0) u) t1 t2))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 +t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H3: (eq T x (THead (Bind Void) x0 +x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: ((\forall (b0: B).(\forall +(u: T).(pr3 (CHead c (Bind b0) u) t1 x1))))).(or_introl (ex3_2 T T (\lambda +(u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 +(CHead c (Bind Void) u1) t1 t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S +O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 t2))) x0 x1 +H3 H4 (H5 Void u1)))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Void) u1) t1 +(lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 +t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) H2)) H1)))))))) b). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/subst1.ma new file mode 100644 index 000000000..648ce77fa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/subst1.ma @@ -0,0 +1,89 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/fwd.ma". + +include "basic_1A/pr2/subst1.ma". + +lemma pr3_subst1: + \forall (c: C).(\forall (e: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead e (Bind Abbr) v)) \to (\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) +\to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr3 c +w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead e (Bind Abbr) v))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H0: (pr3 c t1 t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: +T).(\forall (w1: T).((subst1 i v t w1) \to (ex2 T (\lambda (w2: T).(pr3 c w1 +w2)) (\lambda (w2: T).(subst1 i v t0 w2))))))) (\lambda (t: T).(\lambda (w1: +T).(\lambda (H1: (subst1 i v t w1)).(ex_intro2 T (\lambda (w2: T).(pr3 c w1 +w2)) (\lambda (w2: T).(subst1 i v t w2)) w1 (pr3_refl c w1) H1)))) (\lambda +(t3: T).(\lambda (t4: T).(\lambda (H1: (pr2 c t4 t3)).(\lambda (t5: +T).(\lambda (_: (pr3 c t3 t5)).(\lambda (H3: ((\forall (w1: T).((subst1 i v +t3 w1) \to (ex2 T (\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 i +v t5 w2))))))).(\lambda (w1: T).(\lambda (H4: (subst1 i v t4 w1)).(ex2_ind T +(\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t3 w2)) (ex2 T +(\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 i v t5 w2))) +(\lambda (x: T).(\lambda (H5: (pr2 c w1 x)).(\lambda (H6: (subst1 i v t3 +x)).(ex2_ind T (\lambda (w2: T).(pr3 c x w2)) (\lambda (w2: T).(subst1 i v t5 +w2)) (ex2 T (\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 i v t5 +w2))) (\lambda (x0: T).(\lambda (H7: (pr3 c x x0)).(\lambda (H8: (subst1 i v +t5 x0)).(ex_intro2 T (\lambda (w2: T).(pr3 c w1 w2)) (\lambda (w2: T).(subst1 +i v t5 w2)) x0 (pr3_sing c x w1 H5 x0 H7) H8)))) (H3 x H6))))) (pr2_subst1 c +e v i H t4 t3 H1 w1 H4)))))))))) t1 t2 H0)))))))). + +lemma pr3_gen_cabbr: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall +(e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) +\to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d +a0 a) \to (\forall (x1: T).((subst1 d u t1 (lift (S O) d x1)) \to (ex2 T +(\lambda (x2: T).(subst1 d u t2 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a +x1 x2)))))))))))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: +T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) \to (\forall (a0: +C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (\forall +(x1: T).((subst1 d u t (lift (S O) d x1)) \to (ex2 T (\lambda (x2: T).(subst1 +d u t0 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x1 x2))))))))))))))) +(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda +(_: (getl d c (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (_: +(csubst1 d u c a0)).(\lambda (a: C).(\lambda (_: (drop (S O) d a0 +a)).(\lambda (x1: T).(\lambda (H3: (subst1 d u t (lift (S O) d +x1))).(ex_intro2 T (\lambda (x2: T).(subst1 d u t (lift (S O) d x2))) +(\lambda (x2: T).(pr3 a x1 x2)) x1 H3 (pr3_refl a x1))))))))))))) (\lambda +(t0: T).(\lambda (t3: T).(\lambda (H0: (pr2 c t3 t0)).(\lambda (t4: +T).(\lambda (_: (pr3 c t0 t4)).(\lambda (H2: ((\forall (e: C).(\forall (u: +T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) \to (\forall (a0: +C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (\forall +(x1: T).((subst1 d u t0 (lift (S O) d x1)) \to (ex2 T (\lambda (x2: +T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x1 +x2))))))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda +(H3: (getl d c (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (H4: +(csubst1 d u c a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d a0 +a)).(\lambda (x1: T).(\lambda (H6: (subst1 d u t3 (lift (S O) d +x1))).(ex2_ind T (\lambda (x2: T).(subst1 d u t0 (lift (S O) d x2))) (\lambda +(x2: T).(pr2 a x1 x2)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d +x2))) (\lambda (x2: T).(pr3 a x1 x2))) (\lambda (x: T).(\lambda (H7: (subst1 +d u t0 (lift (S O) d x))).(\lambda (H8: (pr2 a x1 x)).(ex2_ind T (\lambda +(x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x x2)) +(ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: +T).(pr3 a x1 x2))) (\lambda (x0: T).(\lambda (H9: (subst1 d u t4 (lift (S O) +d x0))).(\lambda (H10: (pr3 a x x0)).(ex_intro2 T (\lambda (x2: T).(subst1 d +u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr3 a x1 x2)) x0 H9 (pr3_sing a x +x1 H8 x0 H10))))) (H2 e u d H3 a0 H4 a H5 x H7))))) (pr2_gen_cabbr c t3 t0 H0 +e u d H3 a0 H4 a H5 x1 H6)))))))))))))))))) t1 t2 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/pr3/wcpr0.ma b/matita/matita/contribs/lambdadelta/basic_1A/pr3/wcpr0.ma new file mode 100644 index 000000000..1b59a294a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/pr3/wcpr0.ma @@ -0,0 +1,63 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/props.ma". + +include "basic_1A/wcpr0/getl.ma". + +lemma pr3_wcpr0_t: + \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (t1: +T).(\forall (t2: T).((pr3 c1 t1 t2) \to (pr3 c2 t1 t2)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (t1: T).(\forall (t2: T).((pr3 c0 +t1 t2) \to (pr3 c t1 t2)))))) (\lambda (c: C).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H0: (pr3 c t1 t2)).H0)))) (\lambda (c0: C).(\lambda (c3: +C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (_: ((\forall (t1: T).(\forall (t2: +T).((pr3 c3 t1 t2) \to (pr3 c0 t1 t2)))))).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H3: (pr3 (CHead c3 k u2) t1 t2)).(pr3_ind (CHead c3 k u1) +(\lambda (t: T).(\lambda (t0: T).(pr3 (CHead c0 k u1) t t0))) (\lambda (t: +T).(pr3_refl (CHead c0 k u1) t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda +(H4: (pr2 (CHead c3 k u1) t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 (CHead +c3 k u1) t0 t4)).(\lambda (H6: (pr3 (CHead c0 k u1) t0 t4)).(pr3_t t0 t3 +(CHead c0 k u1) (insert_eq C (CHead c3 k u1) (\lambda (c: C).(pr2 c t3 t0)) +(\lambda (_: C).(pr3 (CHead c0 k u1) t3 t0)) (\lambda (y: C).(\lambda (H7: +(pr2 y t3 t0)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t5: T).((eq +C c (CHead c3 k u1)) \to (pr3 (CHead c0 k u1) t t5))))) (\lambda (c: +C).(\lambda (t5: T).(\lambda (t6: T).(\lambda (H8: (pr0 t5 t6)).(\lambda (_: +(eq C c (CHead c3 k u1))).(pr3_pr2 (CHead c0 k u1) t5 t6 (pr2_free (CHead c0 +k u1) t5 t6 H8))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H8: (getl i c (CHead d (Bind Abbr) +u))).(\lambda (t5: T).(\lambda (t6: T).(\lambda (H9: (pr0 t5 t6)).(\lambda +(t: T).(\lambda (H10: (subst0 i u t6 t)).(\lambda (H11: (eq C c (CHead c3 k +u1))).(let H12 \def (eq_ind C c (\lambda (c4: C).(getl i c4 (CHead d (Bind +Abbr) u))) H8 (CHead c3 k u1) H11) in (ex3_2_ind C T (\lambda (e2: +C).(\lambda (u3: T).(getl i (CHead c0 k u1) (CHead e2 (Bind Abbr) u3)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 d))) (\lambda (_: C).(\lambda (u3: +T).(pr0 u3 u))) (pr3 (CHead c0 k u1) t5 t) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H13: (getl i (CHead c0 k u1) (CHead x0 (Bind Abbr) +x1))).(\lambda (_: (wcpr0 x0 d)).(\lambda (H15: (pr0 x1 u)).(ex2_ind T +(\lambda (t7: T).(subst0 i x1 t6 t7)) (\lambda (t7: T).(pr0 t7 t)) (pr3 +(CHead c0 k u1) t5 t) (\lambda (x: T).(\lambda (H16: (subst0 i x1 t6 +x)).(\lambda (H17: (pr0 x t)).(pr3_sing (CHead c0 k u1) x t5 (pr2_delta +(CHead c0 k u1) x0 x1 i H13 t5 t6 H9 x H16) t (pr3_pr2 (CHead c0 k u1) x t +(pr2_free (CHead c0 k u1) x t H17)))))) (pr0_subst0_back u t6 t i H10 x1 +H15))))))) (wcpr0_getl_back (CHead c3 k u1) (CHead c0 k u1) (wcpr0_comp c0 c3 +H0 u1 u1 (pr0_refl u1) k) i d u (Bind Abbr) H12)))))))))))))) y t3 t0 H7))) +H4) t4 H6))))))) t1 t2 (pr3_pr2_pr3_t c3 u2 t1 t2 k H3 u1 (pr2_free c3 u1 u2 +H2)))))))))))))) c2 c1 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/preamble.ma b/matita/matita/contribs/lambdadelta/basic_1A/preamble.ma new file mode 100644 index 000000000..6b4b1d5f5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/preamble.ma @@ -0,0 +1,15 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_1A/theory.ma". diff --git a/matita/matita/contribs/lambdadelta/basic_1A/r/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/r/defs.ma new file mode 100644 index 000000000..6018cddb5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/r/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +definition r: + K \to (nat \to nat) +\def + \lambda (k: K).(\lambda (i: nat).(match k with [(Bind _) \Rightarrow i | +(Flat _) \Rightarrow (S i)])). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/r/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/r/props.ma new file mode 100644 index 000000000..9b990e04b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/r/props.ma @@ -0,0 +1,153 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/r/defs.ma". + +include "basic_1A/s/defs.ma". + +lemma r_S: + \forall (k: K).(\forall (i: nat).(eq nat (r k (S i)) (S (r k i)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (r k0 (S +i)) (S (r k0 i))))) (\lambda (b: B).(\lambda (i: nat).(refl_equal nat (S (r +(Bind b) i))))) (\lambda (f: F).(\lambda (i: nat).(refl_equal nat (S (r (Flat +f) i))))) k). + +lemma r_plus: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k (plus i j)) +(plus (r k i) j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).(eq nat (r k0 (plus i j)) (plus (r k0 i) j))))) (\lambda (b: B).(\lambda +(i: nat).(\lambda (j: nat).(refl_equal nat (plus (r (Bind b) i) j))))) +(\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (r +(Flat f) i) j))))) k). + +lemma r_plus_sym: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k (plus i j)) +(plus i (r k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).(eq nat (r k0 (plus i j)) (plus i (r k0 j)))))) (\lambda (_: B).(\lambda +(i: nat).(\lambda (j: nat).(refl_equal nat (plus i j))))) (\lambda (_: +F).(\lambda (i: nat).(\lambda (j: nat).(plus_n_Sm i j)))) k). + +lemma r_minus: + \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (k: K).(eq nat +(minus (r k i) (S n)) (r k (minus i (S n))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (k: +K).(K_ind (\lambda (k0: K).(eq nat (minus (r k0 i) (S n)) (r k0 (minus i (S +n))))) (\lambda (_: B).(refl_equal nat (minus i (S n)))) (\lambda (_: +F).(minus_x_Sy i n H)) k)))). + +lemma r_dis: + \forall (k: K).(\forall (P: Prop).(((((\forall (i: nat).(eq nat (r k i) i))) +\to P)) \to (((((\forall (i: nat).(eq nat (r k i) (S i)))) \to P)) \to P))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (P: Prop).(((((\forall (i: +nat).(eq nat (r k0 i) i))) \to P)) \to (((((\forall (i: nat).(eq nat (r k0 i) +(S i)))) \to P)) \to P)))) (\lambda (b: B).(\lambda (P: Prop).(\lambda (H: +((((\forall (i: nat).(eq nat (r (Bind b) i) i))) \to P))).(\lambda (_: +((((\forall (i: nat).(eq nat (r (Bind b) i) (S i)))) \to P))).(H (\lambda (i: +nat).(refl_equal nat i))))))) (\lambda (f: F).(\lambda (P: Prop).(\lambda (_: +((((\forall (i: nat).(eq nat (r (Flat f) i) i))) \to P))).(\lambda (H0: +((((\forall (i: nat).(eq nat (r (Flat f) i) (S i)))) \to P))).(H0 (\lambda +(i: nat).(refl_equal nat (S i)))))))) k). + +lemma s_r: + \forall (k: K).(\forall (i: nat).(eq nat (s k (r k i)) (S i))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (r k0 +i)) (S i)))) (\lambda (_: B).(\lambda (i: nat).(refl_equal nat (S i)))) +(\lambda (_: F).(\lambda (i: nat).(refl_equal nat (S i)))) k). + +lemma r_arith0: + \forall (k: K).(\forall (i: nat).(eq nat (minus (r k (S i)) (S O)) (r k i))) +\def + \lambda (k: K).(\lambda (i: nat).(eq_ind_r nat (S (r k i)) (\lambda (n: +nat).(eq nat (minus n (S O)) (r k i))) (eq_ind_r nat (r k i) (\lambda (n: +nat).(eq nat n (r k i))) (refl_equal nat (r k i)) (minus (S (r k i)) (S O)) +(minus_Sx_SO (r k i))) (r k (S i)) (r_S k i))). + +lemma r_arith1: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (r k (S +i)) (S j)) (minus (r k i) j)))) +\def + \lambda (k: K).(\lambda (i: nat).(\lambda (j: nat).(eq_ind_r nat (S (r k i)) +(\lambda (n: nat).(eq nat (minus n (S j)) (minus (r k i) j))) (refl_equal nat +(minus (r k i) j)) (r k (S i)) (r_S k i)))). + +lemma r_arith2: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le (S i) (s k j)) \to +(le (r k i) j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((le (S i) (s k0 j)) \to (le (r k0 i) j))))) (\lambda (_: B).(\lambda +(i: nat).(\lambda (j: nat).(\lambda (H: (le (S i) (S j))).(let H_y \def +(le_S_n i j H) in H_y))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: +nat).(\lambda (H: (le (S i) j)).H)))) k). + +lemma r_arith3: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le (s k j) (S i)) \to +(le j (r k i))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((le (s k0 j) (S i)) \to (le j (r k0 i)))))) (\lambda (_: B).(\lambda +(i: nat).(\lambda (j: nat).(\lambda (H: (le (S j) (S i))).(let H_y \def +(le_S_n j i H) in H_y))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: +nat).(\lambda (H: (le j (S i))).H)))) k). + +lemma r_arith4: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (S i) (s k +j)) (minus (r k i) j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).(eq nat (minus (S i) (s k0 j)) (minus (r k0 i) j))))) (\lambda (b: +B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus (r (Bind b) i) +j))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat +(minus (r (Flat f) i) j))))) k). + +lemma r_arith5: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((lt (s k j) (S i)) \to +(lt j (r k i))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((lt (s k0 j) (S i)) \to (lt j (r k0 i)))))) (\lambda (_: B).(\lambda +(i: nat).(\lambda (j: nat).(\lambda (H: (lt (S j) (S i))).(lt_S_n j i H))))) +(\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (lt j (S +i))).H)))) k). + +lemma r_arith6: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (r k i) (S +j)) (minus i (s k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).(eq nat (minus (r k0 i) (S j)) (minus i (s k0 j)))))) (\lambda (b: +B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i (s (Bind b) +j)))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat +(minus i (s (Flat f) j)))))) k). + +lemma r_arith7: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((eq nat (S i) (s k j)) +\to (eq nat (r k i) j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((eq nat (S i) (s k0 j)) \to (eq nat (r k0 i) j))))) (\lambda (_: +B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (eq nat (S i) (S +j))).(eq_add_S i j H))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: +nat).(\lambda (H: (eq nat (S i) j)).H)))) k). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/rect.txt b/matita/matita/contribs/lambdadelta/basic_1A/rect.txt new file mode 100644 index 000000000..cba309af3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/rect.txt @@ -0,0 +1,3 @@ +T_rect +A_rect +C_rect diff --git a/matita/matita/contribs/lambdadelta/basic_1A/s/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/s/defs.ma new file mode 100644 index 000000000..3b8980e8d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/s/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +definition s: + K \to (nat \to nat) +\def + \lambda (k: K).(\lambda (i: nat).(match k with [(Bind _) \Rightarrow (S i) | +(Flat _) \Rightarrow i])). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/s/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/s/fwd.ma new file mode 100644 index 000000000..12290a148 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/s/fwd.ma @@ -0,0 +1,48 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/s/defs.ma". + +lemma s_inj: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((eq nat (s k i) (s k j)) +\to (eq nat i j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((eq nat (s k0 i) (s k0 j)) \to (eq nat i j))))) (\lambda (b: +B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (eq nat (s (Bind b) i) (s +(Bind b) j))).(eq_add_S i j H))))) (\lambda (f: F).(\lambda (i: nat).(\lambda +(j: nat).(\lambda (H: (eq nat (s (Flat f) i) (s (Flat f) j))).H)))) k). + +lemma s_le_gen: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le (s k i) (s k j)) \to +(le i j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((le (s k0 i) (s k0 j)) \to (le i j))))) (\lambda (b: B).(\lambda (i: +nat).(\lambda (j: nat).(\lambda (H: (le (s (Bind b) i) (s (Bind b) +j))).(le_S_n i j H))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: +nat).(\lambda (H: (le (s (Flat f) i) (s (Flat f) j))).H)))) k). + +lemma s_lt_gen: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((lt (s k i) (s k j)) \to +(lt i j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((lt (s k0 i) (s k0 j)) \to (lt i j))))) (\lambda (b: B).(\lambda (i: +nat).(\lambda (j: nat).(\lambda (H: (lt (s (Bind b) i) (s (Bind b) +j))).(le_S_n (S i) j H))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: +nat).(\lambda (H: (lt (s (Flat f) i) (s (Flat f) j))).H)))) k). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/s/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/s/props.ma new file mode 100644 index 000000000..6f57eeb0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/s/props.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/s/defs.ma". + +lemma s_S: + \forall (k: K).(\forall (i: nat).(eq nat (s k (S i)) (S (s k i)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (S +i)) (S (s k0 i))))) (\lambda (b: B).(\lambda (i: nat).(refl_equal nat (S (s +(Bind b) i))))) (\lambda (f: F).(\lambda (i: nat).(refl_equal nat (S (s (Flat +f) i))))) k). + +lemma s_plus: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k (plus i j)) +(plus (s k i) j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).(eq nat (s k0 (plus i j)) (plus (s k0 i) j))))) (\lambda (b: B).(\lambda +(i: nat).(\lambda (j: nat).(refl_equal nat (plus (s (Bind b) i) j))))) +(\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (s +(Flat f) i) j))))) k). + +lemma s_plus_sym: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k (plus i j)) +(plus i (s k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).(eq nat (s k0 (plus i j)) (plus i (s k0 j)))))) (\lambda (_: B).(\lambda +(i: nat).(\lambda (j: nat).(eq_ind_r nat (plus i (S j)) (\lambda (n: nat).(eq +nat n (plus i (S j)))) (refl_equal nat (plus i (S j))) (S (plus i j)) +(plus_n_Sm i j))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: +nat).(refl_equal nat (plus i (s (Flat f) j)))))) k). + +lemma s_minus: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le j i) \to (eq nat (s +k (minus i j)) (minus (s k i) j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((le j i) \to (eq nat (s k0 (minus i j)) (minus (s k0 i) j)))))) +(\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (le j +i)).(eq_ind_r nat (minus (S i) j) (\lambda (n: nat).(eq nat n (minus (S i) +j))) (refl_equal nat (minus (S i) j)) (S (minus i j)) (minus_Sn_m i j H)))))) +(\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (_: (le j +i)).(refl_equal nat (minus (s (Flat f) i) j)))))) k). + +lemma minus_s_s: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (s k i) (s +k j)) (minus i j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).(eq nat (minus (s k0 i) (s k0 j)) (minus i j))))) (\lambda (_: +B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i j))))) +(\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i +j))))) k). + +lemma s_le: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le i j) \to (le (s k i) +(s k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((le i j) \to (le (s k0 i) (s k0 j)))))) (\lambda (_: B).(\lambda (i: +nat).(\lambda (j: nat).(\lambda (H: (le i j)).(le_n_S i j H))))) (\lambda (_: +F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (le i j)).H)))) k). + +lemma s_lt: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((lt i j) \to (lt (s k i) +(s k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: +nat).((lt i j) \to (lt (s k0 i) (s k0 j)))))) (\lambda (_: B).(\lambda (i: +nat).(\lambda (j: nat).(\lambda (H: (lt i j)).(lt_n_S i j H))))) (\lambda (_: +F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (lt i j)).H)))) k). + +lemma s_inc: + \forall (k: K).(\forall (i: nat).(le i (s k i))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(le i (s k0 i)))) +(\lambda (b: B).(\lambda (i: nat).(le_S_n i (s (Bind b) i) (le_S_n (S i) (S +(s (Bind b) i)) (le_S_n (S (S i)) (S (S (s (Bind b) i))) (le_S (S (S (S i))) +(S (S (s (Bind b) i))) (le_n (S (S (s (Bind b) i)))))))))) (\lambda (f: +F).(\lambda (i: nat).(le_n (s (Flat f) i)))) k). + +lemma s_arith0: + \forall (k: K).(\forall (i: nat).(eq nat (minus (s k i) (s k O)) i)) +\def + \lambda (k: K).(\lambda (i: nat).(eq_ind_r nat (minus i O) (\lambda (n: +nat).(eq nat n i)) (eq_ind nat i (\lambda (n: nat).(eq nat n i)) (refl_equal +nat i) (minus i O) (minus_n_O i)) (minus (s k i) (s k O)) (minus_s_s k i O))). + +lemma s_arith1: + \forall (b: B).(\forall (i: nat).(eq nat (minus (s (Bind b) i) (S O)) i)) +\def + \lambda (_: B).(\lambda (i: nat).(eq_ind nat i (\lambda (n: nat).(eq nat n +i)) (refl_equal nat i) (minus i O) (minus_n_O i))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sc3/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/sc3/arity.ma new file mode 100644 index 000000000..abeeb54fe --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sc3/arity.ma @@ -0,0 +1,313 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubc/arity.ma". + +include "basic_1A/csubc/getl.ma". + +include "basic_1A/csubc/drop1.ma". + +include "basic_1A/csubc/props.ma". + +lemma sc3_arity_csubc: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 +t a) \to (\forall (d1: C).(\forall (is: PList).((drop1 is d1 c1) \to (\forall +(c2: C).((csubc g d1 c2) \to (sc3 g a c2 (lift1 is t))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: +C).((csubc g d1 c2) \to (sc3 g a0 c2 (lift1 is t0)))))))))) (\lambda (c: +C).(\lambda (n: nat).(\lambda (d1: C).(\lambda (is: PList).(\lambda (_: +(drop1 is d1 c)).(\lambda (c2: C).(\lambda (_: (csubc g d1 c2)).(eq_ind_r T +(TSort n) (\lambda (t0: T).(land (arity g c2 t0 (ASort O n)) (sn3 c2 t0))) +(conj (arity g c2 (TSort n) (ASort O n)) (sn3 c2 (TSort n)) (arity_sort g c2 +n) (sn3_nf2 c2 (TSort n) (nf2_sort c2 n))) (lift1 is (TSort n)) (lift1_sort n +is))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: +A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (d1: C).(\forall +(is: PList).((drop1 is d1 d) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g +a0 c2 (lift1 is u))))))))).(\lambda (d1: C).(\lambda (is: PList).(\lambda +(H3: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H4: (csubc g d1 c2)).(let +H_x \def (drop1_getl_trans is c d1 H3 Abbr d u i H0) in (let H5 \def H_x in +(ex2_ind C (\lambda (e2: C).(drop1 (ptrans is i) e2 d)) (\lambda (e2: +C).(getl (trans is i) d1 (CHead e2 (Bind Abbr) (lift1 (ptrans is i) u)))) +(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x: C).(\lambda (_: (drop1 +(ptrans is i) x d)).(\lambda (H7: (getl (trans is i) d1 (CHead x (Bind Abbr) +(lift1 (ptrans is i) u)))).(let H_x0 \def (csubc_getl_conf g d1 (CHead x +(Bind Abbr) (lift1 (ptrans is i) u)) (trans is i) H7 c2 H4) in (let H8 \def +H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans is i) c2 e2)) (\lambda (e2: +C).(csubc g (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) e2)) (sc3 g a0 c2 +(lift1 is (TLRef i))) (\lambda (x0: C).(\lambda (H9: (getl (trans is i) c2 +x0)).(\lambda (H10: (csubc g (CHead x (Bind Abbr) (lift1 (ptrans is i) u)) +x0)).(let H_x1 \def (csubc_gen_head_l g x x0 (lift1 (ptrans is i) u) (Bind +Abbr) H10) in (let H11 \def H_x1 in (or3_ind (ex2 C (\lambda (c3: C).(eq C x0 +(CHead c3 (Bind Abbr) (lift1 (ptrans is i) u)))) (\lambda (c3: C).(csubc g x +c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq K +(Bind Abbr) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: +A).(eq C x0 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g x c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans is i) u))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 w))))) (ex4_3 B C T (\lambda +(b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C x0 (CHead c3 (Bind b) v2))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Abbr) (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g x c3))))) +(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (H12: (ex2 C (\lambda (c3: C).(eq +C x0 (CHead c3 (Bind Abbr) (lift1 (ptrans is i) u)))) (\lambda (c3: C).(csubc +g x c3)))).(ex2_ind C (\lambda (c3: C).(eq C x0 (CHead c3 (Bind Abbr) (lift1 +(ptrans is i) u)))) (\lambda (c3: C).(csubc g x c3)) (sc3 g a0 c2 (lift1 is +(TLRef i))) (\lambda (x1: C).(\lambda (H13: (eq C x0 (CHead x1 (Bind Abbr) +(lift1 (ptrans is i) u)))).(\lambda (_: (csubc g x x1)).(let H15 \def (eq_ind +C x0 (\lambda (c0: C).(getl (trans is i) c2 c0)) H9 (CHead x1 (Bind Abbr) +(lift1 (ptrans is i) u)) H13) in (let H_y \def (sc3_abbr g a0 TNil) in +(eq_ind_r T (TLRef (trans is i)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H_y +(trans is i) x1 (lift1 (ptrans is i) u) c2 (eq_ind T (lift1 is (lift (S i) O +u)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (eq_ind T (lift1 (PConsTail is (S i) +O) u) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H2 d1 (PConsTail is (S i) O) +(drop1_cons_tail c d (S i) O (getl_drop Abbr c d u i H0) is d1 H3) c2 H4) +(lift1 is (lift (S i) O u)) (lift1_cons_tail u (S i) O is)) (lift (S (trans +is i)) O (lift1 (ptrans is i) u)) (lift1_free is i u)) H15) (lift1 is (TLRef +i)) (lift1_lref is i))))))) H12)) (\lambda (H12: (ex5_3 C T A (\lambda (_: +C).(\lambda (_: T).(\lambda (_: A).(eq K (Bind Abbr) (Bind Abst))))) (\lambda +(c3: C).(\lambda (w: T).(\lambda (_: A).(eq C x0 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans +is i) u))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 +w)))))).(ex5_3_ind C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq +K (Bind Abbr) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: +A).(eq C x0 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g x c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans is i) u))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 w)))) (sc3 g a0 c2 (lift1 is +(TLRef i))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (H13: +(eq K (Bind Abbr) (Bind Abst))).(\lambda (H14: (eq C x0 (CHead x1 (Bind Abbr) +x2))).(\lambda (_: (csubc g x x1)).(\lambda (_: (sc3 g (asucc g x3) x (lift1 +(ptrans is i) u))).(\lambda (_: (sc3 g x3 x1 x2)).(let H18 \def (eq_ind C x0 +(\lambda (c0: C).(getl (trans is i) c2 c0)) H9 (CHead x1 (Bind Abbr) x2) H14) +in (let H19 \def (eq_ind K (Bind Abbr) (\lambda (ee: K).(match ee with [(Bind +b) \Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False +| Void \Rightarrow False]) | (Flat _) \Rightarrow False])) I (Bind Abst) H13) +in (False_ind (sc3 g a0 c2 (lift1 is (TLRef i))) H19))))))))))) H12)) +(\lambda (H12: (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: +T).(eq C x0 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K (Bind Abbr) (Bind Void))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g x c3)))))).(ex4_3_ind B C T (\lambda (b: +B).(\lambda (c3: C).(\lambda (v2: T).(eq C x0 (CHead c3 (Bind b) v2))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Abbr) (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g x c3)))) +(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x1: B).(\lambda (x2: C).(\lambda +(x3: T).(\lambda (H13: (eq C x0 (CHead x2 (Bind x1) x3))).(\lambda (H14: (eq +K (Bind Abbr) (Bind Void))).(\lambda (_: (not (eq B x1 Void))).(\lambda (_: +(csubc g x x2)).(let H17 \def (eq_ind C x0 (\lambda (c0: C).(getl (trans is +i) c2 c0)) H9 (CHead x2 (Bind x1) x3) H13) in (let H18 \def (eq_ind K (Bind +Abbr) (\lambda (ee: K).(match ee with [(Bind b) \Rightarrow (match b with +[Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | +(Flat _) \Rightarrow False])) I (Bind Void) H14) in (False_ind (sc3 g a0 c2 +(lift1 is (TLRef i))) H18)))))))))) H12)) H11)))))) H8)))))) +H5)))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: +A).(\lambda (H1: (arity g d u (asucc g a0))).(\lambda (_: ((\forall (d1: +C).(\forall (is: PList).((drop1 is d1 d) \to (\forall (c2: C).((csubc g d1 +c2) \to (sc3 g (asucc g a0) c2 (lift1 is u))))))))).(\lambda (d1: C).(\lambda +(is: PList).(\lambda (H3: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H4: +(csubc g d1 c2)).(let H5 \def H0 in (let H_x \def (drop1_getl_trans is c d1 +H3 Abst d u i H5) in (let H6 \def H_x in (ex2_ind C (\lambda (e2: C).(drop1 +(ptrans is i) e2 d)) (\lambda (e2: C).(getl (trans is i) d1 (CHead e2 (Bind +Abst) (lift1 (ptrans is i) u)))) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda +(x: C).(\lambda (H7: (drop1 (ptrans is i) x d)).(\lambda (H8: (getl (trans is +i) d1 (CHead x (Bind Abst) (lift1 (ptrans is i) u)))).(let H_x0 \def +(csubc_getl_conf g d1 (CHead x (Bind Abst) (lift1 (ptrans is i) u)) (trans is +i) H8 c2 H4) in (let H9 \def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans +is i) c2 e2)) (\lambda (e2: C).(csubc g (CHead x (Bind Abst) (lift1 (ptrans +is i) u)) e2)) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x0: C).(\lambda +(H10: (getl (trans is i) c2 x0)).(\lambda (H11: (csubc g (CHead x (Bind Abst) +(lift1 (ptrans is i) u)) x0)).(let H_x1 \def (csubc_gen_head_l g x x0 (lift1 +(ptrans is i) u) (Bind Abst) H11) in (let H12 \def H_x1 in (or3_ind (ex2 C +(\lambda (c3: C).(eq C x0 (CHead c3 (Bind Abst) (lift1 (ptrans is i) u)))) +(\lambda (c3: C).(csubc g x c3))) (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C x0 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans +is i) u))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 +w))))) (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: T).(eq C +x0 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +T).(eq K (Bind Abst) (Bind Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda +(_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: +T).(csubc g x c3))))) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (H13: (ex2 +C (\lambda (c3: C).(eq C x0 (CHead c3 (Bind Abst) (lift1 (ptrans is i) u)))) +(\lambda (c3: C).(csubc g x c3)))).(ex2_ind C (\lambda (c3: C).(eq C x0 +(CHead c3 (Bind Abst) (lift1 (ptrans is i) u)))) (\lambda (c3: C).(csubc g x +c3)) (sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x1: C).(\lambda (H14: (eq C +x0 (CHead x1 (Bind Abst) (lift1 (ptrans is i) u)))).(\lambda (_: (csubc g x +x1)).(let H16 \def (eq_ind C x0 (\lambda (c0: C).(getl (trans is i) c2 c0)) +H10 (CHead x1 (Bind Abst) (lift1 (ptrans is i) u)) H14) in (let H_y \def +(sc3_abst g a0 TNil) in (eq_ind_r T (TLRef (trans is i)) (\lambda (t0: +T).(sc3 g a0 c2 t0)) (H_y c2 (trans is i) (csubc_arity_conf g d1 c2 H4 (TLRef +(trans is i)) a0 (eq_ind T (lift1 is (TLRef i)) (\lambda (t0: T).(arity g d1 +t0 a0)) (arity_lift1 g a0 c is d1 (TLRef i) H3 (arity_abst g c d u i H0 a0 +H1)) (TLRef (trans is i)) (lift1_lref is i))) (nf2_lref_abst c2 x1 (lift1 +(ptrans is i) u) (trans is i) H16) I) (lift1 is (TLRef i)) (lift1_lref is +i))))))) H13)) (\lambda (H13: (ex5_3 C T A (\lambda (_: C).(\lambda (_: +T).(\lambda (_: A).(eq K (Bind Abst) (Bind Abst))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (_: A).(eq C x0 (CHead c3 (Bind Abbr) w))))) +(\lambda (c3: C).(\lambda (_: T).(\lambda (_: A).(csubc g x c3)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans +is i) u))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 +w)))))).(ex5_3_ind C T A (\lambda (_: C).(\lambda (_: T).(\lambda (_: A).(eq +K (Bind Abst) (Bind Abst))))) (\lambda (c3: C).(\lambda (w: T).(\lambda (_: +A).(eq C x0 (CHead c3 (Bind Abbr) w))))) (\lambda (c3: C).(\lambda (_: +T).(\lambda (_: A).(csubc g x c3)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a1: A).(sc3 g (asucc g a1) x (lift1 (ptrans is i) u))))) (\lambda (c3: +C).(\lambda (w: T).(\lambda (a1: A).(sc3 g a1 c3 w)))) (sc3 g a0 c2 (lift1 is +(TLRef i))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (_: +(eq K (Bind Abst) (Bind Abst))).(\lambda (H15: (eq C x0 (CHead x1 (Bind Abbr) +x2))).(\lambda (_: (csubc g x x1)).(\lambda (H17: (sc3 g (asucc g x3) x +(lift1 (ptrans is i) u))).(\lambda (H18: (sc3 g x3 x1 x2)).(let H19 \def +(eq_ind C x0 (\lambda (c0: C).(getl (trans is i) c2 c0)) H10 (CHead x1 (Bind +Abbr) x2) H15) in (let H_y \def (sc3_abbr g a0 TNil) in (eq_ind_r T (TLRef +(trans is i)) (\lambda (t0: T).(sc3 g a0 c2 t0)) (H_y (trans is i) x1 x2 c2 +(let H_y0 \def (arity_lift1 g (asucc g a0) d (ptrans is i) x u H7 H1) in (let +H_y1 \def (sc3_arity_gen g x (lift1 (ptrans is i) u) (asucc g x3) H17) in +(sc3_repl g x3 c2 (lift (S (trans is i)) O x2) (sc3_lift g x3 x1 x2 H18 c2 (S +(trans is i)) O (getl_drop Abbr c2 x1 x2 (trans is i) H19)) a0 (asucc_inj g +x3 a0 (arity_mono g x (lift1 (ptrans is i) u) (asucc g x3) H_y1 (asucc g a0) +H_y0))))) H19) (lift1 is (TLRef i)) (lift1_lref is i)))))))))))) H13)) +(\lambda (H13: (ex4_3 B C T (\lambda (b: B).(\lambda (c3: C).(\lambda (v2: +T).(eq C x0 (CHead c3 (Bind b) v2))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: T).(eq K (Bind Abst) (Bind Void))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (_: T).(not (eq B b Void))))) (\lambda (_: B).(\lambda (c3: +C).(\lambda (_: T).(csubc g x c3)))))).(ex4_3_ind B C T (\lambda (b: +B).(\lambda (c3: C).(\lambda (v2: T).(eq C x0 (CHead c3 (Bind b) v2))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: T).(eq K (Bind Abst) (Bind +Void))))) (\lambda (b: B).(\lambda (_: C).(\lambda (_: T).(not (eq B b +Void))))) (\lambda (_: B).(\lambda (c3: C).(\lambda (_: T).(csubc g x c3)))) +(sc3 g a0 c2 (lift1 is (TLRef i))) (\lambda (x1: B).(\lambda (x2: C).(\lambda +(x3: T).(\lambda (H14: (eq C x0 (CHead x2 (Bind x1) x3))).(\lambda (H15: (eq +K (Bind Abst) (Bind Void))).(\lambda (_: (not (eq B x1 Void))).(\lambda (_: +(csubc g x x2)).(let H18 \def (eq_ind C x0 (\lambda (c0: C).(getl (trans is +i) c2 c0)) H10 (CHead x2 (Bind x1) x3) H14) in (let H19 \def (eq_ind K (Bind +Abst) (\lambda (ee: K).(match ee with [(Bind b) \Rightarrow (match b with +[Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | +(Flat _) \Rightarrow False])) I (Bind Void) H15) in (False_ind (sc3 g a0 c2 +(lift1 is (TLRef i))) H19)))))))))) H13)) H12)))))) H9)))))) +H6))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b +Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity +g c u a1)).(\lambda (H2: ((\forall (d1: C).(\forall (is: PList).((drop1 is d1 +c) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g a1 c2 (lift1 is +u))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c +(Bind b) u) t0 a2)).(\lambda (H4: ((\forall (d1: C).(\forall (is: +PList).((drop1 is d1 (CHead c (Bind b) u)) \to (\forall (c2: C).((csubc g d1 +c2) \to (sc3 g a2 c2 (lift1 is t0))))))))).(\lambda (d1: C).(\lambda (is: +PList).(\lambda (H5: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H6: (csubc g +d1 c2)).(let H_y \def (sc3_bind g b H0 a1 a2 TNil) in (eq_ind_r T (THead +(Bind b) (lift1 is u) (lift1 (Ss is) t0)) (\lambda (t1: T).(sc3 g a2 c2 t1)) +(H_y c2 (lift1 is u) (lift1 (Ss is) t0) (H4 (CHead d1 (Bind b) (lift1 is u)) +(Ss is) (drop1_skip_bind b c is d1 u H5) (CHead c2 (Bind b) (lift1 is u)) +(csubc_head g d1 c2 H6 (Bind b) (lift1 is u))) (H2 d1 is H5 c2 H6)) (lift1 is +(THead (Bind b) u t0)) (lift1_bind b is u t0))))))))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u (asucc g +a1))).(\lambda (H1: ((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) +\to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g (asucc g a1) c2 (lift1 is +u))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H2: (arity g (CHead c +(Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (d1: C).(\forall (is: +PList).((drop1 is d1 (CHead c (Bind Abst) u)) \to (\forall (c2: C).((csubc g +d1 c2) \to (sc3 g a2 c2 (lift1 is t0))))))))).(\lambda (d1: C).(\lambda (is: +PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: C).(\lambda (H5: (csubc g +d1 c2)).(eq_ind_r T (THead (Bind Abst) (lift1 is u) (lift1 (Ss is) t0)) +(\lambda (t1: T).(land (arity g c2 t1 (AHead a1 a2)) (\forall (d: C).(\forall +(w: T).((sc3 g a1 d w) \to (\forall (is0: PList).((drop1 is0 d c2) \to (sc3 g +a2 d (THead (Flat Appl) w (lift1 is0 t1)))))))))) (conj (arity g c2 (THead +(Bind Abst) (lift1 is u) (lift1 (Ss is) t0)) (AHead a1 a2)) (\forall (d: +C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is0: PList).((drop1 is0 d +c2) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is0 (THead (Bind Abst) (lift1 +is u) (lift1 (Ss is) t0)))))))))) (csubc_arity_conf g d1 c2 H5 (THead (Bind +Abst) (lift1 is u) (lift1 (Ss is) t0)) (AHead a1 a2) (arity_head g d1 (lift1 +is u) a1 (arity_lift1 g (asucc g a1) c is d1 u H4 H0) (lift1 (Ss is) t0) a2 +(arity_lift1 g a2 (CHead c (Bind Abst) u) (Ss is) (CHead d1 (Bind Abst) +(lift1 is u)) t0 (drop1_skip_bind Abst c is d1 u H4) H2))) (\lambda (d: +C).(\lambda (w: T).(\lambda (H6: (sc3 g a1 d w)).(\lambda (is0: +PList).(\lambda (H7: (drop1 is0 d c2)).(eq_ind_r T (THead (Bind Abst) (lift1 +is0 (lift1 is u)) (lift1 (Ss is0) (lift1 (Ss is) t0))) (\lambda (t1: T).(sc3 +g a2 d (THead (Flat Appl) w t1))) (let H8 \def (sc3_appl g a1 a2 TNil) in (H8 +d w (lift1 (Ss is0) (lift1 (Ss is) t0)) (let H_y \def (sc3_bind g Abbr +not_abbr_abst a1 a2 TNil) in (H_y d w (lift1 (Ss is0) (lift1 (Ss is) t0)) +(let H_x \def (csubc_drop1_conf_rev g is0 d c2 H7 d1 H5) in (let H9 \def H_x +in (ex2_ind C (\lambda (c3: C).(drop1 is0 c3 d1)) (\lambda (c3: C).(csubc g +c3 d)) (sc3 g a2 (CHead d (Bind Abbr) w) (lift1 (Ss is0) (lift1 (Ss is) t0))) +(\lambda (x: C).(\lambda (H10: (drop1 is0 x d1)).(\lambda (H11: (csubc g x +d)).(eq_ind_r T (lift1 (papp (Ss is0) (Ss is)) t0) (\lambda (t1: T).(sc3 g a2 +(CHead d (Bind Abbr) w) t1)) (eq_ind_r PList (Ss (papp is0 is)) (\lambda (p: +PList).(sc3 g a2 (CHead d (Bind Abbr) w) (lift1 p t0))) (H3 (CHead x (Bind +Abst) (lift1 (papp is0 is) u)) (Ss (papp is0 is)) (drop1_skip_bind Abst c +(papp is0 is) x u (drop1_trans is0 x d1 H10 is c H4)) (CHead d (Bind Abbr) w) +(csubc_abst g x d H11 (lift1 (papp is0 is) u) a1 (H1 x (papp is0 is) +(drop1_trans is0 x d1 H10 is c H4) x (csubc_refl g x)) w H6)) (papp (Ss is0) +(Ss is)) (papp_ss is0 is)) (lift1 (Ss is0) (lift1 (Ss is) t0)) (lift1_lift1 +(Ss is0) (Ss is) t0))))) H9))) H6)) H6 (lift1 is0 (lift1 is u)) (sc3_lift1 g +c2 (asucc g a1) is0 d (lift1 is u) (H1 d1 is H4 c2 H5) H7))) (lift1 is0 +(THead (Bind Abst) (lift1 is u) (lift1 (Ss is) t0))) (lift1_bind Abst is0 +(lift1 is u) (lift1 (Ss is) t0))))))))) (lift1 is (THead (Bind Abst) u t0)) +(lift1_bind Abst is u t0)))))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall +(d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g +d1 c2) \to (sc3 g a1 c2 (lift1 is u))))))))).(\lambda (t0: T).(\lambda (a2: +A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (d1: +C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 +c2) \to (sc3 g (AHead a1 a2) c2 (lift1 is t0))))))))).(\lambda (d1: +C).(\lambda (is: PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: +C).(\lambda (H5: (csubc g d1 c2)).(let H_y \def (H1 d1 is H4 c2 H5) in (let +H_y0 \def (H3 d1 is H4 c2 H5) in (let H6 \def H_y0 in (land_ind (arity g c2 +(lift1 is t0) (AHead a1 a2)) (\forall (d: C).(\forall (w: T).((sc3 g a1 d w) +\to (\forall (is0: PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat +Appl) w (lift1 is0 (lift1 is t0))))))))) (sc3 g a2 c2 (lift1 is (THead (Flat +Appl) u t0))) (\lambda (_: (arity g c2 (lift1 is t0) (AHead a1 a2))).(\lambda +(H8: ((\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is0: +PList).((drop1 is0 d c2) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is0 +(lift1 is t0))))))))))).(let H_y1 \def (H8 c2 (lift1 is u) H_y PNil) in +(eq_ind_r T (THead (Flat Appl) (lift1 is u) (lift1 is t0)) (\lambda (t1: +T).(sc3 g a2 c2 t1)) (H_y1 (drop1_nil c2)) (lift1 is (THead (Flat Appl) u +t0)) (lift1_flat Appl is u t0))))) H6)))))))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g +a0))).(\lambda (H1: ((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) +\to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g (asucc g a0) c2 (lift1 is +u))))))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: +((\forall (d1: C).(\forall (is: PList).((drop1 is d1 c) \to (\forall (c2: +C).((csubc g d1 c2) \to (sc3 g a0 c2 (lift1 is t0))))))))).(\lambda (d1: +C).(\lambda (is: PList).(\lambda (H4: (drop1 is d1 c)).(\lambda (c2: +C).(\lambda (H5: (csubc g d1 c2)).(let H_y \def (sc3_cast g a0 TNil) in +(eq_ind_r T (THead (Flat Cast) (lift1 is u) (lift1 is t0)) (\lambda (t1: +T).(sc3 g a0 c2 t1)) (H_y c2 (lift1 is u) (H1 d1 is H4 c2 H5) (lift1 is t0) +(H3 d1 is H4 c2 H5)) (lift1 is (THead (Flat Cast) u t0)) (lift1_flat Cast is +u t0)))))))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: +A).(\lambda (_: (arity g c t0 a1)).(\lambda (H1: ((\forall (d1: C).(\forall +(is: PList).((drop1 is d1 c) \to (\forall (c2: C).((csubc g d1 c2) \to (sc3 g +a1 c2 (lift1 is t0))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 +a2)).(\lambda (d1: C).(\lambda (is: PList).(\lambda (H3: (drop1 is d1 +c)).(\lambda (c2: C).(\lambda (H4: (csubc g d1 c2)).(sc3_repl g a1 c2 (lift1 +is t0) (H1 d1 is H3 c2 H4) a2 H2))))))))))))) c1 t a H))))). + +lemma sc3_arity: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t +a) \to (sc3 g a c t))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c t a)).(let H_y \def (sc3_arity_csubc g c t a H c PNil) in (H_y +(drop1_nil c) c (csubc_refl g c))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sc3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sc3/defs.ma new file mode 100644 index 000000000..fb12ab26a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sc3/defs.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sn3/defs.ma". + +include "basic_1A/arity/defs.ma". + +include "basic_1A/drop1/defs.ma". + +rec definition sc3 (g: G) (a: A) on a: C \to (T \to Prop) \def \lambda (c: +C).(\lambda (t: T).(match a with [(ASort h n) \Rightarrow (land (arity g c t +(ASort h n)) (sn3 c t)) | (AHead a1 a2) \Rightarrow (land (arity g c t (AHead +a1 a2)) (\forall (d: C).(\forall (w: T).((sc3 g a1 d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a2 d (THead (Flat Appl) w (lift1 is +t)))))))))])). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sc3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sc3/props.ma new file mode 100644 index 000000000..e77002ee4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sc3/props.ma @@ -0,0 +1,697 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sc3/defs.ma". + +include "basic_1A/sn3/lift1.ma". + +include "basic_1A/nf2/lift1.ma". + +include "basic_1A/csuba/arity.ma". + +include "basic_1A/arity/lift1.ma". + +include "basic_1A/arity/aprem.ma". + +include "basic_1A/llt/props.ma". + +include "basic_1A/llt/fwd.ma". + +include "basic_1A/drop1/getl.ma". + +include "basic_1A/drop1/props.ma". + +include "basic_1A/lift1/drop1.ma". + +lemma sc3_arity_gen: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((sc3 g a c +t) \to (arity g c t a))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(A_ind +(\lambda (a0: A).((sc3 g a0 c t) \to (arity g c t a0))) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (H: (land (arity g c t (ASort n n0)) (sn3 c +t))).(let H0 \def H in (land_ind (arity g c t (ASort n n0)) (sn3 c t) (arity +g c t (ASort n n0)) (\lambda (H1: (arity g c t (ASort n n0))).(\lambda (_: +(sn3 c t)).H1)) H0))))) (\lambda (a0: A).(\lambda (_: (((sc3 g a0 c t) \to +(arity g c t a0)))).(\lambda (a1: A).(\lambda (_: (((sc3 g a1 c t) \to (arity +g c t a1)))).(\lambda (H1: (land (arity g c t (AHead a0 a1)) (\forall (d: +C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) +\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is t)))))))))).(let H2 \def H1 in +(land_ind (arity g c t (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g +a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat +Appl) w (lift1 is t)))))))) (arity g c t (AHead a0 a1)) (\lambda (H3: (arity +g c t (AHead a0 a1))).(\lambda (_: ((\forall (d: C).(\forall (w: T).((sc3 g +a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat +Appl) w (lift1 is t)))))))))).H3)) H2))))))) a)))). + +lemma sc3_repl: + \forall (g: G).(\forall (a1: A).(\forall (c: C).(\forall (t: T).((sc3 g a1 c +t) \to (\forall (a2: A).((leq g a1 a2) \to (sc3 g a2 c t))))))) +\def + \lambda (g: G).(\lambda (a1: A).(llt_wf_ind (\lambda (a: A).(\forall (c: +C).(\forall (t: T).((sc3 g a c t) \to (\forall (a2: A).((leq g a a2) \to (sc3 +g a2 c t))))))) (\lambda (a2: A).(A_ind (\lambda (a: A).(((\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 (n: nat).(\lambda (n0: nat).(\lambda (_: ((\forall +(a3: A).((llt a3 (ASort n n0)) \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)))))))))).(\lambda +(c: C).(\lambda (t: T).(\lambda (H0: (land (arity g c t (ASort n n0)) (sn3 c +t))).(\lambda (a3: A).(\lambda (H1: (leq g (ASort n n0) a3)).(let H2 \def H0 +in (land_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_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 (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: +A).(\lambda (H0: ((((\forall (a3: A).((llt a3 a0) \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 a0 c t) +\to (\forall (a3: A).((leq g a0 a3) \to (sc3 g a3 c t))))))))).(\lambda (H1: +((\forall (a3: A).((llt a3 (AHead a a0)) \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)))))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H2: (land (arity g c t +(AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall +(is: PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is +t)))))))))).(\lambda (a3: A).(\lambda (H3: (leq g (AHead a a0) a3)).(let H4 +\def H2 in (land_ind (arity g c t (AHead a a0)) (\forall (d: C).(\forall (w: +T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w (lift1 is 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_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)). + +lemma sc3_lift: + \forall (g: G).(\forall (a: A).(\forall (e: C).(\forall (t: T).((sc3 g a e +t) \to (\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) +\to (sc3 g a c (lift h d t)))))))))) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (e: +C).(\forall (t: T).((sc3 g a0 e t) \to (\forall (c: C).(\forall (h: +nat).(\forall (d: nat).((drop h d c e) \to (sc3 g a0 c (lift h d t)))))))))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (e: C).(\lambda (t: T).(\lambda +(H: (land (arity g e t (ASort n n0)) (sn3 e t))).(\lambda (c: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H0: (drop h d c e)).(let H1 \def H in +(land_ind (arity g e t (ASort n n0)) (sn3 e t) (land (arity g c (lift h d t) +(ASort n n0)) (sn3 c (lift h d t))) (\lambda (H2: (arity g e t (ASort n +n0))).(\lambda (H3: (sn3 e t)).(conj (arity g c (lift h d t) (ASort n n0)) +(sn3 c (lift h d t)) (arity_lift g e t (ASort n n0) H2 c h d H0) (sn3_lift e +t H3 c h d H0)))) H1))))))))))) (\lambda (a0: A).(\lambda (_: ((\forall (e: +C).(\forall (t: T).((sc3 g a0 e t) \to (\forall (c: C).(\forall (h: +nat).(\forall (d: nat).((drop h d c e) \to (sc3 g a0 c (lift h d +t))))))))))).(\lambda (a1: A).(\lambda (_: ((\forall (e: C).(\forall (t: +T).((sc3 g a1 e t) \to (\forall (c: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c e) \to (sc3 g a1 c (lift h d t))))))))))).(\lambda (e: +C).(\lambda (t: T).(\lambda (H1: (land (arity g e t (AHead a0 a1)) (\forall +(d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d +e) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is t)))))))))).(\lambda (c: +C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d c e)).(let H3 +\def H1 in (land_ind (arity g e t (AHead a0 a1)) (\forall (d0: C).(\forall +(w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 e) \to (sc3 g +a1 d0 (THead (Flat Appl) w (lift1 is t)))))))) (land (arity g c (lift h d t) +(AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall +(is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +(lift h d t)))))))))) (\lambda (H4: (arity g e t (AHead a0 a1))).(\lambda +(H5: ((\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: +PList).((drop1 is d0 e) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +t)))))))))).(conj (arity g c (lift h d t) (AHead a0 a1)) (\forall (d0: +C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) +\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (lift h d t))))))))) +(arity_lift g e t (AHead a0 a1) H4 c h d H2) (\lambda (d0: C).(\lambda (w: +T).(\lambda (H6: (sc3 g a0 d0 w)).(\lambda (is: PList).(\lambda (H7: (drop1 +is d0 c)).(let H_y \def (H5 d0 w H6 (PConsTail is h d)) in (eq_ind T (lift1 +(PConsTail is h d) t) (\lambda (t0: T).(sc3 g a1 d0 (THead (Flat Appl) w +t0))) (H_y (drop1_cons_tail c e h d H2 is d0 H7)) (lift1 is (lift h d t)) +(lift1_cons_tail t h d is))))))))))) H3))))))))))))) a)). + +lemma sc3_lift1: + \forall (g: G).(\forall (e: C).(\forall (a: A).(\forall (hds: +PList).(\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 hds c e) +\to (sc3 g a c (lift1 hds t))))))))) +\def + \lambda (g: G).(\lambda (e: C).(\lambda (a: A).(\lambda (hds: +PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((sc3 g +a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t))))))) (\lambda (c: +C).(\lambda (t: T).(\lambda (H: (sc3 g a e t)).(\lambda (H0: (drop1 PNil c +e)).(let H_y \def (drop1_gen_pnil c e H0) in (eq_ind_r C e (\lambda (c0: +C).(sc3 g a c0 t)) H c H_y)))))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (t: T).((sc3 +g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t)))))))).(\lambda (c: +C).(\lambda (t: T).(\lambda (H0: (sc3 g a e t)).(\lambda (H1: (drop1 (PCons n +n0 p) c e)).(let H_x \def (drop1_gen_pcons c e p n n0 H1) in (let H2 \def H_x +in (ex2_ind C (\lambda (c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 +e)) (sc3 g a c (lift n n0 (lift1 p t))) (\lambda (x: C).(\lambda (H3: (drop n +n0 c x)).(\lambda (H4: (drop1 p x e)).(sc3_lift g a x (lift1 p t) (H x t H0 +H4) c n n0 H3)))) H2))))))))))) hds)))). + +lemma sc3_abbr: + \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (i: +nat).(\forall (d: C).(\forall (v: T).(\forall (c: C).((sc3 g a c (THeads +(Flat Appl) vs (lift (S i) O v))) \to ((getl i c (CHead d (Bind Abbr) v)) \to +(sc3 g a c (THeads (Flat Appl) vs (TLRef i))))))))))) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: +TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: +C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c +(CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs (TLRef +i))))))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (vs: +TList).(\lambda (i: nat).(\lambda (d: C).(\lambda (v: T).(\lambda (c: +C).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs (lift (S i) O v)) +(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (lift (S i) O v))))).(\lambda +(H0: (getl i c (CHead d (Bind Abbr) v))).(let H1 \def H in (land_ind (arity g +c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0)) (sn3 c (THeads (Flat +Appl) vs (lift (S i) O v))) (land (arity g c (THeads (Flat Appl) vs (TLRef +i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i)))) (\lambda (H2: +(arity g c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0))).(\lambda +(H3: (sn3 c (THeads (Flat Appl) vs (lift (S i) O v)))).(conj (arity g c +(THeads (Flat Appl) vs (TLRef i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs +(TLRef i))) (arity_appls_abbr g c d v i H0 vs (ASort n n0) H2) +(sn3_appls_abbr c d v i H0 vs H3)))) H1))))))))))) (\lambda (a0: A).(\lambda +(_: ((\forall (vs: TList).(\forall (i: nat).(\forall (d: C).(\forall (v: +T).(\forall (c: C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to +((getl i c (CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs +(TLRef i)))))))))))).(\lambda (a1: A).(\lambda (H0: ((\forall (vs: +TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: +C).((sc3 g a1 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c +(CHead d (Bind Abbr) v)) \to (sc3 g a1 c (THeads (Flat Appl) vs (TLRef +i)))))))))))).(\lambda (vs: TList).(\lambda (i: nat).(\lambda (d: C).(\lambda +(v: T).(\lambda (c: C).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs +(lift (S i) O v)) (AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 +d0 w) \to (\forall (is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat +Appl) w (lift1 is (THeads (Flat Appl) vs (lift (S i) O v)))))))))))).(\lambda +(H2: (getl i c (CHead d (Bind Abbr) v))).(let H3 \def H1 in (land_ind (arity +g c (THeads (Flat Appl) vs (lift (S i) O v)) (AHead a0 a1)) (\forall (d0: +C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) +\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift +(S i) O v)))))))))) (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (AHead +a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: +PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (TLRef i))))))))))) (\lambda (H4: (arity g c (THeads +(Flat Appl) vs (lift (S i) O v)) (AHead a0 a1))).(\lambda (H5: ((\forall (d0: +C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) +\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift +(S i) O v)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (TLRef i)) +(AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall +(is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (TLRef i)))))))))) (arity_appls_abbr g c d v i H2 vs +(AHead a0 a1) H4) (\lambda (d0: C).(\lambda (w: T).(\lambda (H6: (sc3 g a0 d0 +w)).(\lambda (is: PList).(\lambda (H7: (drop1 is d0 c)).(let H_x \def +(drop1_getl_trans is c d0 H7 Abbr d v i H2) in (let H8 \def H_x in (ex2_ind C +(\lambda (e2: C).(drop1 (ptrans is i) e2 d)) (\lambda (e2: C).(getl (trans is +i) d0 (CHead e2 (Bind Abbr) (lift1 (ptrans is i) v)))) (sc3 g a1 d0 (THead +(Flat Appl) w (lift1 is (THeads (Flat Appl) vs (TLRef i))))) (\lambda (x: +C).(\lambda (_: (drop1 (ptrans is i) x d)).(\lambda (H10: (getl (trans is i) +d0 (CHead x (Bind Abbr) (lift1 (ptrans is i) v)))).(let H_y \def (H0 (TCons w +(lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is +(TLRef i))) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w t))) (eq_ind_r +T (TLRef (trans is i)) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w +(THeads (Flat Appl) (lifts1 is vs) t)))) (H_y (trans is i) x (lift1 (ptrans +is i) v) d0 (eq_ind T (lift1 is (lift (S i) O v)) (\lambda (t: T).(sc3 g a1 +d0 (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 is vs) t)))) (eq_ind T +(lift1 is (THeads (Flat Appl) vs (lift (S i) O v))) (\lambda (t: T).(sc3 g a1 +d0 (THead (Flat Appl) w t))) (H5 d0 w H6 is H7) (THeads (Flat Appl) (lifts1 +is vs) (lift1 is (lift (S i) O v))) (lifts1_flat Appl is (lift (S i) O v) +vs)) (lift (S (trans is i)) O (lift1 (ptrans is i) v)) (lift1_free is i v)) +H10) (lift1 is (TLRef i)) (lift1_lref is i)) (lift1 is (THeads (Flat Appl) vs +(TLRef i))) (lifts1_flat Appl is (TLRef i) vs)))))) H8))))))))))) +H3))))))))))))) a)). + +theorem sc3_cast: + \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c: C).(\forall +(u: T).((sc3 g (asucc g a) c (THeads (Flat Appl) vs u)) \to (\forall (t: +T).((sc3 g a c (THeads (Flat Appl) vs t)) \to (sc3 g a c (THeads (Flat Appl) +vs (THead (Flat Cast) u t)))))))))) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: +TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat +Appl) vs u)) \to (\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to +(sc3 g a0 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (\lambda +(n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: +T).(\lambda (H: (sc3 g (match n with [O \Rightarrow (ASort O (next g n0)) | +(S h) \Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u))).(\lambda (t: +T).(\lambda (H0: (land (arity g c (THeads (Flat Appl) vs t) (ASort n n0)) +(sn3 c (THeads (Flat Appl) vs t)))).(nat_ind (\lambda (n1: nat).((sc3 g +(match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow +(ASort h n0)]) c (THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads +(Flat Appl) vs t) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land +(arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) +(sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))) (\lambda (H1: +(sc3 g (ASort O (next g n0)) c (THeads (Flat Appl) vs u))).(\lambda (H2: +(land (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads (Flat +Appl) vs t)))).(let H3 \def H1 in (land_ind (arity g c (THeads (Flat Appl) vs +u) (ASort O (next g n0))) (sn3 c (THeads (Flat Appl) vs u)) (land (arity g c +(THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads +(Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads +(Flat Appl) vs u) (ASort O (next g n0)))).(\lambda (H5: (sn3 c (THeads (Flat +Appl) vs u))).(let H6 \def H2 in (land_ind (arity g c (THeads (Flat Appl) vs +t) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity g c (THeads +(Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat +Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat +Appl) vs t) (ASort O n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs +t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort +O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))) +(arity_appls_cast g c u t vs (ASort O n0) H4 H7) (sn3_appls_cast c vs u H5 t +H8)))) H6)))) H3)))) (\lambda (n1: nat).(\lambda (_: (((sc3 g (match n1 with +[O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c +(THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads (Flat Appl) vs t) +(ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land (arity g c +(THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) (sn3 c (THeads +(Flat Appl) vs (THead (Flat Cast) u t)))))))).(\lambda (H1: (sc3 g (ASort n1 +n0) c (THeads (Flat Appl) vs u))).(\lambda (H2: (land (arity g c (THeads +(Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let +H3 \def H1 in (land_ind (arity g c (THeads (Flat Appl) vs u) (ASort n1 n0)) +(sn3 c (THeads (Flat Appl) vs u)) (land (arity g c (THeads (Flat Appl) vs +(THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs +(THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) +(ASort n1 n0))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def +H2 in (land_ind (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 +c (THeads (Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead +(Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead +(Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort +(S n1) n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g +c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c +(THeads (Flat Appl) vs (THead (Flat Cast) u t))) (arity_appls_cast g c u t vs +(ASort (S n1) n0) H4 H7) (sn3_appls_cast c vs u H5 t H8)))) H6)))) H3)))))) n +H H0))))))))) (\lambda (a0: A).(\lambda (_: ((\forall (vs: TList).(\forall +(c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to +(\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c +(THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (a1: +A).(\lambda (H0: ((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 +g (asucc g a1) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a1 c +(THeads (Flat Appl) vs t)) \to (sc3 g a1 c (THeads (Flat Appl) vs (THead +(Flat Cast) u t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: +T).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc +g a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 +is (THeads (Flat Appl) vs u))))))))))).(\lambda (t: T).(\lambda (H2: (land +(arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: C).(\forall +(w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 +d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))))).(let H3 +\def H1 in (land_ind (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g +a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 +is (THeads (Flat Appl) vs u))))))))) (land (arity g c (THeads (Flat Appl) vs +(THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 +g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead +(Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u +t))))))))))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (AHead a0 +(asucc g a1)))).(\lambda (H5: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d +w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead +(Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))))).(let H6 \def H2 +in (land_ind (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: +C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) +\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs +t))))))))) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) +(AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall +(is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))) (\lambda (H7: (arity +g c (THeads (Flat Appl) vs t) (AHead a0 a1))).(\lambda (H8: ((\forall (d: +C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) +\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs +t))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) +(AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall +(is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (arity_appls_cast g c +u t vs (AHead a0 a1) H4 H7) (\lambda (d: C).(\lambda (w: T).(\lambda (H9: +(sc3 g a0 d w)).(\lambda (is: PList).(\lambda (H10: (drop1 is d c)).(let H_y +\def (H0 (TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 +is vs) (lift1 is (THead (Flat Cast) u t))) (\lambda (t0: T).(sc3 g a1 d +(THead (Flat Appl) w t0))) (eq_ind_r T (THead (Flat Cast) (lift1 is u) (lift1 +is t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w (THeads (Flat Appl) +(lifts1 is vs) t0)))) (H_y d (lift1 is u) (eq_ind T (lift1 is (THeads (Flat +Appl) vs u)) (\lambda (t0: T).(sc3 g (asucc g a1) d (THead (Flat Appl) w +t0))) (H5 d w H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is u)) +(lifts1_flat Appl is u vs)) (lift1 is t) (eq_ind T (lift1 is (THeads (Flat +Appl) vs t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w t0))) (H8 d w +H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is t)) (lifts1_flat Appl +is t vs))) (lift1 is (THead (Flat Cast) u t)) (lift1_flat Cast is u t)) +(lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (lifts1_flat Appl +is (THead (Flat Cast) u t) vs))))))))))) H6)))) H3)))))))))))) a)). + +fact sc3_props__sc3_sn3_abst: + \forall (g: G).(\forall (a: A).(land (\forall (c: C).(\forall (t: T).((sc3 g +a c t) \to (sn3 c t)))) (\forall (vs: TList).(\forall (i: nat).(let t \def +(THeads (Flat Appl) vs (TLRef i)) in (\forall (c: C).((arity g c t a) \to +((nf2 c (TLRef i)) \to ((sns3 c vs) \to (sc3 g a c t)))))))))) +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(land (\forall (c: +C).(\forall (t: T).((sc3 g a0 c t) \to (sn3 c t)))) (\forall (vs: +TList).(\forall (i: nat).(let t \def (THeads (Flat Appl) vs (TLRef i)) in +(\forall (c: C).((arity g c t a0) \to ((nf2 c (TLRef i)) \to ((sns3 c vs) \to +(sc3 g a0 c t)))))))))) (\lambda (n: nat).(\lambda (n0: nat).(conj (\forall +(c: C).(\forall (t: T).((land (arity g c t (ASort n n0)) (sn3 c t)) \to (sn3 +c t)))) (\forall (vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c +(THeads (Flat Appl) vs (TLRef i)) (ASort n n0)) \to ((nf2 c (TLRef i)) \to +((sns3 c vs) \to (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (ASort n +n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i)))))))))) (\lambda (c: +C).(\lambda (t: T).(\lambda (H: (land (arity g c t (ASort n n0)) (sn3 c +t))).(let H0 \def H in (land_ind (arity g c t (ASort n n0)) (sn3 c t) (sn3 c +t) (\lambda (_: (arity g c t (ASort n n0))).(\lambda (H2: (sn3 c t)).H2)) +H0))))) (\lambda (vs: TList).(\lambda (i: nat).(\lambda (c: C).(\lambda (H: +(arity g c (THeads (Flat Appl) vs (TLRef i)) (ASort n n0))).(\lambda (H0: +(nf2 c (TLRef i))).(\lambda (H1: (sns3 c vs)).(conj (arity g c (THeads (Flat +Appl) vs (TLRef i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i))) H +(sn3_appls_lref c i H0 vs H1))))))))))) (\lambda (a0: A).(\lambda (H: (land +(\forall (c: C).(\forall (t: T).((sc3 g a0 c t) \to (sn3 c t)))) (\forall +(vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c (THeads (Flat Appl) +vs (TLRef i)) a0) \to ((nf2 c (TLRef i)) \to ((sns3 c vs) \to (sc3 g a0 c +(THeads (Flat Appl) vs (TLRef i))))))))))).(\lambda (a1: A).(\lambda (H0: +(land (\forall (c: C).(\forall (t: T).((sc3 g a1 c t) \to (sn3 c t)))) +(\forall (vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c (THeads +(Flat Appl) vs (TLRef i)) a1) \to ((nf2 c (TLRef i)) \to ((sns3 c vs) \to +(sc3 g a1 c (THeads (Flat Appl) vs (TLRef i))))))))))).(conj (\forall (c: +C).(\forall (t: T).((land (arity g c t (AHead a0 a1)) (\forall (d: +C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) +\to (sc3 g a1 d (THead (Flat Appl) w (lift1 is t))))))))) \to (sn3 c t)))) +(\forall (vs: TList).(\forall (i: nat).(\forall (c: C).((arity g c (THeads +(Flat Appl) vs (TLRef i)) (AHead a0 a1)) \to ((nf2 c (TLRef i)) \to ((sns3 c +vs) \to (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (AHead a0 a1)) +(\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads +(Flat Appl) vs (TLRef i))))))))))))))))) (\lambda (c: C).(\lambda (t: +T).(\lambda (H1: (land (arity g c t (AHead a0 a1)) (\forall (d: C).(\forall +(w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 +d (THead (Flat Appl) w (lift1 is t)))))))))).(let H2 \def H in (land_ind +(\forall (c0: C).(\forall (t0: T).((sc3 g a0 c0 t0) \to (sn3 c0 t0)))) +(\forall (vs: TList).(\forall (i: nat).(\forall (c0: C).((arity g c0 (THeads +(Flat Appl) vs (TLRef i)) a0) \to ((nf2 c0 (TLRef i)) \to ((sns3 c0 vs) \to +(sc3 g a0 c0 (THeads (Flat Appl) vs (TLRef i))))))))) (sn3 c t) (\lambda (_: +((\forall (c0: C).(\forall (t0: T).((sc3 g a0 c0 t0) \to (sn3 c0 +t0)))))).(\lambda (H4: ((\forall (vs: TList).(\forall (i: nat).(\forall (c0: +C).((arity g c0 (THeads (Flat Appl) vs (TLRef i)) a0) \to ((nf2 c0 (TLRef i)) +\to ((sns3 c0 vs) \to (sc3 g a0 c0 (THeads (Flat Appl) vs (TLRef +i))))))))))).(let H5 \def H0 in (land_ind (\forall (c0: C).(\forall (t0: +T).((sc3 g a1 c0 t0) \to (sn3 c0 t0)))) (\forall (vs: TList).(\forall (i: +nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs (TLRef i)) a1) \to +((nf2 c0 (TLRef i)) \to ((sns3 c0 vs) \to (sc3 g a1 c0 (THeads (Flat Appl) vs +(TLRef i))))))))) (sn3 c t) (\lambda (H6: ((\forall (c0: C).(\forall (t0: +T).((sc3 g a1 c0 t0) \to (sn3 c0 t0)))))).(\lambda (_: ((\forall (vs: +TList).(\forall (i: nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs +(TLRef i)) a1) \to ((nf2 c0 (TLRef i)) \to ((sns3 c0 vs) \to (sc3 g a1 c0 +(THeads (Flat Appl) vs (TLRef i))))))))))).(let H8 \def H1 in (land_ind +(arity g c t (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) +\to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w +(lift1 is t)))))))) (sn3 c t) (\lambda (H9: (arity g c t (AHead a0 +a1))).(\lambda (H10: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to +(\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w +(lift1 is t)))))))))).(let H_y \def (arity_aprem g c t (AHead a0 a1) H9 O a0) +in (let H11 \def (H_y (aprem_zero a0 a1)) in (ex2_3_ind C T nat (\lambda (d: +C).(\lambda (_: T).(\lambda (j: nat).(drop j O d c)))) (\lambda (d: +C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g a0))))) (sn3 c t) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H12: (drop x2 +O x0 c)).(\lambda (H13: (arity g x0 x1 (asucc g a0))).(let H_y0 \def (H10 +(CHead x0 (Bind Abst) x1) (TLRef O) (H4 TNil O (CHead x0 (Bind Abst) x1) +(arity_abst g (CHead x0 (Bind Abst) x1) x0 x1 O (getl_refl Abst x0 x1) a0 +H13) (nf2_lref_abst (CHead x0 (Bind Abst) x1) x0 x1 O (getl_refl Abst x0 x1)) +I) (PCons (S x2) O PNil)) in (let H_y1 \def (H6 (CHead x0 (Bind Abst) x1) +(THead (Flat Appl) (TLRef O) (lift (S x2) O t)) (H_y0 (drop1_cons (CHead x0 +(Bind Abst) x1) c (S x2) O (drop_drop (Bind Abst) x2 x0 c H12 x1) c PNil +(drop1_nil c)))) in (let H_x \def (sn3_gen_flat Appl (CHead x0 (Bind Abst) +x1) (TLRef O) (lift (S x2) O t) H_y1) in (let H14 \def H_x in (land_ind (sn3 +(CHead x0 (Bind Abst) x1) (TLRef O)) (sn3 (CHead x0 (Bind Abst) x1) (lift (S +x2) O t)) (sn3 c t) (\lambda (_: (sn3 (CHead x0 (Bind Abst) x1) (TLRef +O))).(\lambda (H16: (sn3 (CHead x0 (Bind Abst) x1) (lift (S x2) O +t))).(sn3_gen_lift (CHead x0 (Bind Abst) x1) t (S x2) O H16 c (drop_drop +(Bind Abst) x2 x0 c H12 x1)))) H14)))))))))) H11))))) H8)))) H5)))) H2))))) +(\lambda (vs: TList).(\lambda (i: nat).(\lambda (c: C).(\lambda (H1: (arity g +c (THeads (Flat Appl) vs (TLRef i)) (AHead a0 a1))).(\lambda (H2: (nf2 c +(TLRef i))).(\lambda (H3: (sns3 c vs)).(conj (arity g c (THeads (Flat Appl) +vs (TLRef i)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) +\to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w +(lift1 is (THeads (Flat Appl) vs (TLRef i)))))))))) H1 (\lambda (d: +C).(\lambda (w: T).(\lambda (H4: (sc3 g a0 d w)).(\lambda (is: +PList).(\lambda (H5: (drop1 is d c)).(let H6 \def H in (land_ind (\forall +(c0: C).(\forall (t: T).((sc3 g a0 c0 t) \to (sn3 c0 t)))) (\forall (vs0: +TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) +vs0 (TLRef i0)) a0) \to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a0 +c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))) (sc3 g a1 d (THead (Flat Appl) +w (lift1 is (THeads (Flat Appl) vs (TLRef i))))) (\lambda (H7: ((\forall (c0: +C).(\forall (t: T).((sc3 g a0 c0 t) \to (sn3 c0 t)))))).(\lambda (_: +((\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 +(THeads (Flat Appl) vs0 (TLRef i0)) a0) \to ((nf2 c0 (TLRef i0)) \to ((sns3 +c0 vs0) \to (sc3 g a0 c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))))).(let H9 +\def H0 in (land_ind (\forall (c0: C).(\forall (t: T).((sc3 g a1 c0 t) \to +(sn3 c0 t)))) (\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: +C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a1) \to ((nf2 c0 (TLRef +i0)) \to ((sns3 c0 vs0) \to (sc3 g a1 c0 (THeads (Flat Appl) vs0 (TLRef +i0))))))))) (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs +(TLRef i))))) (\lambda (_: ((\forall (c0: C).(\forall (t: T).((sc3 g a1 c0 t) +\to (sn3 c0 t)))))).(\lambda (H11: ((\forall (vs0: TList).(\forall (i0: +nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a1) +\to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a1 c0 (THeads (Flat +Appl) vs0 (TLRef i0))))))))))).(let H_y \def (H11 (TCons w (lifts1 is vs))) +in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is (TLRef i))) +(\lambda (t: T).(sc3 g a1 d (THead (Flat Appl) w t))) (eq_ind_r T (TLRef +(trans is i)) (\lambda (t: T).(sc3 g a1 d (THead (Flat Appl) w (THeads (Flat +Appl) (lifts1 is vs) t)))) (H_y (trans is i) d (eq_ind T (lift1 is (TLRef i)) +(\lambda (t: T).(arity g d (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 +is vs) t)) a1)) (eq_ind T (lift1 is (THeads (Flat Appl) vs (TLRef i))) +(\lambda (t: T).(arity g d (THead (Flat Appl) w t) a1)) (arity_appl g d w a0 +(sc3_arity_gen g d w a0 H4) (lift1 is (THeads (Flat Appl) vs (TLRef i))) a1 +(arity_lift1 g (AHead a0 a1) c is d (THeads (Flat Appl) vs (TLRef i)) H5 H1)) +(THeads (Flat Appl) (lifts1 is vs) (lift1 is (TLRef i))) (lifts1_flat Appl is +(TLRef i) vs)) (TLRef (trans is i)) (lift1_lref is i)) (eq_ind T (lift1 is +(TLRef i)) (\lambda (t: T).(nf2 d t)) (nf2_lift1 c is d (TLRef i) H5 H2) +(TLRef (trans is i)) (lift1_lref is i)) (conj (sn3 d w) (sns3 d (lifts1 is +vs)) (H7 d w H4) (sns3_lifts1 c is d H5 vs H3))) (lift1 is (TLRef i)) +(lift1_lref is i)) (lift1 is (THeads (Flat Appl) vs (TLRef i))) (lifts1_flat +Appl is (TLRef i) vs))))) H9)))) H6))))))))))))))))))) a)). + +lemma sc3_sn3: + \forall (g: G).(\forall (a: A).(\forall (c: C).(\forall (t: T).((sc3 g a c +t) \to (sn3 c t))))) +\def + \lambda (g: G).(\lambda (a: A).(\lambda (c: C).(\lambda (t: T).(\lambda (H: +(sc3 g a c t)).(let H_x \def (sc3_props__sc3_sn3_abst g a) in (let H0 \def +H_x in (land_ind (\forall (c0: C).(\forall (t0: T).((sc3 g a c0 t0) \to (sn3 +c0 t0)))) (\forall (vs: TList).(\forall (i: nat).(\forall (c0: C).((arity g +c0 (THeads (Flat Appl) vs (TLRef i)) a) \to ((nf2 c0 (TLRef i)) \to ((sns3 c0 +vs) \to (sc3 g a c0 (THeads (Flat Appl) vs (TLRef i))))))))) (sn3 c t) +(\lambda (H1: ((\forall (c0: C).(\forall (t0: T).((sc3 g a c0 t0) \to (sn3 c0 +t0)))))).(\lambda (_: ((\forall (vs: TList).(\forall (i: nat).(\forall (c0: +C).((arity g c0 (THeads (Flat Appl) vs (TLRef i)) a) \to ((nf2 c0 (TLRef i)) +\to ((sns3 c0 vs) \to (sc3 g a c0 (THeads (Flat Appl) vs (TLRef +i))))))))))).(H1 c t H))) H0))))))). + +lemma sc3_abst: + \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c: C).(\forall +(i: nat).((arity g c (THeads (Flat Appl) vs (TLRef i)) a) \to ((nf2 c (TLRef +i)) \to ((sns3 c vs) \to (sc3 g a c (THeads (Flat Appl) vs (TLRef i)))))))))) +\def + \lambda (g: G).(\lambda (a: A).(\lambda (vs: TList).(\lambda (c: C).(\lambda +(i: nat).(\lambda (H: (arity g c (THeads (Flat Appl) vs (TLRef i)) +a)).(\lambda (H0: (nf2 c (TLRef i))).(\lambda (H1: (sns3 c vs)).(let H_x \def +(sc3_props__sc3_sn3_abst g a) in (let H2 \def H_x in (land_ind (\forall (c0: +C).(\forall (t: T).((sc3 g a c0 t) \to (sn3 c0 t)))) (\forall (vs0: +TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) +vs0 (TLRef i0)) a) \to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a +c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))) (sc3 g a c (THeads (Flat Appl) +vs (TLRef i))) (\lambda (_: ((\forall (c0: C).(\forall (t: T).((sc3 g a c0 t) +\to (sn3 c0 t)))))).(\lambda (H4: ((\forall (vs0: TList).(\forall (i0: +nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a) \to +((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a c0 (THeads (Flat Appl) +vs0 (TLRef i0))))))))))).(H4 vs i c H H0 H1))) H2)))))))))). + +theorem sc3_bind: + \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (a1: +A).(\forall (a2: A).(\forall (vs: TList).(\forall (c: C).(\forall (v: +T).(\forall (t: T).((sc3 g a2 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts +(S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a2 c (THeads (Flat Appl) vs +(THead (Bind b) v t))))))))))))) +\def + \lambda (g: G).(\lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda +(a1: A).(\lambda (a2: A).(A_ind (\lambda (a: A).(\forall (vs: TList).(\forall +(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads +(Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads +(Flat Appl) vs (THead (Bind b) v t)))))))))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: +T).(\lambda (H0: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat +Appl) (lifts (S O) O vs) t)))).(\lambda (H1: (sc3 g a1 c v)).(let H2 \def H0 +in (land_ind (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O +vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S +O) O vs) t)) (land (arity g c (THeads (Flat Appl) vs (THead (Bind b) v t)) +(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t)))) (\lambda +(H3: (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) +(ASort n n0))).(\lambda (H4: (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Bind +b) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t))) +(arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 H1) t vs (ASort n n0) +H3) (sn3_appls_bind b H c v (sc3_sn3 g a1 c v H1) vs t H4)))) H2)))))))))) +(\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall (c: C).(\forall +(v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads (Flat Appl) +vs (THead (Bind b) v t))))))))))).(\lambda (a0: A).(\lambda (H1: ((\forall +(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 (CHead +c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) +\to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Bind b) v +t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda +(t: T).(\lambda (H2: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t) (AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a +d w) \to (\forall (is: PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g +a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) +t))))))))))).(\lambda (H3: (sc3 g a1 c v)).(let H4 \def H2 in (land_ind +(arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) +(AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall +(is: PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat +Appl) w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) t))))))))) (land +(arity g c (THeads (Flat Appl) vs (THead (Bind b) v t)) (AHead a a0)) +(\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads +(Flat Appl) vs (THead (Bind b) v t))))))))))) (\lambda (H5: (arity g (CHead c +(Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) (AHead a a0))).(\lambda +(H6: ((\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: +PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat Appl) +w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) t))))))))))).(conj (arity +g c (THeads (Flat Appl) vs (THead (Bind b) v t)) (AHead a a0)) (\forall (d: +C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) +\to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead +(Bind b) v t)))))))))) (arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 +H3) t vs (AHead a a0) H5) (\lambda (d: C).(\lambda (w: T).(\lambda (H7: (sc3 +g a d w)).(\lambda (is: PList).(\lambda (H8: (drop1 is d c)).(let H_y \def +(H1 (TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is +vs) (lift1 is (THead (Bind b) v t))) (\lambda (t0: T).(sc3 g a0 d (THead +(Flat Appl) w t0))) (eq_ind_r T (THead (Bind b) (lift1 is v) (lift1 (Ss is) +t)) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w (THeads (Flat Appl) +(lifts1 is vs) t0)))) (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind TList +(lifts1 (Ss is) (lifts (S O) O vs)) (\lambda (t0: TList).(sc3 g a0 (CHead d +(Bind b) (lift1 is v)) (THead (Flat Appl) (lift (S O) O w) (THeads (Flat +Appl) t0 (lift1 (Ss is) t))))) (eq_ind T (lift1 (Ss is) (THeads (Flat Appl) +(lifts (S O) O vs) t)) (\lambda (t0: T).(sc3 g a0 (CHead d (Bind b) (lift1 is +v)) (THead (Flat Appl) (lift (S O) O w) t0))) (H6 (CHead d (Bind b) (lift1 is +v)) (lift (S O) O w) (sc3_lift g a d w H7 (CHead d (Bind b) (lift1 is v)) (S +O) O (drop_drop (Bind b) O d d (drop_refl d) (lift1 is v))) (Ss is) +(drop1_skip_bind b c is d v H8)) (THeads (Flat Appl) (lifts1 (Ss is) (lifts +(S O) O vs)) (lift1 (Ss is) t)) (lifts1_flat Appl (Ss is) t (lifts (S O) O +vs))) (lifts (S O) O (lifts1 is vs)) (lifts1_xhg is vs)) (sc3_lift1 g c a1 is +d v H3 H8)) (lift1 is (THead (Bind b) v t)) (lift1_bind b is v t)) (lift1 is +(THeads (Flat Appl) vs (THead (Bind b) v t))) (lifts1_flat Appl is (THead +(Bind b) v t) vs))))))))))) H4)))))))))))) a2))))). + +theorem sc3_appl: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (vs: +TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a2 c (THeads +(Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: +T).((sc3 g (asucc g a1) c w) \to (sc3 g a2 c (THeads (Flat Appl) vs (THead +(Flat Appl) v (THead (Bind Abst) w t)))))))))))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(A_ind (\lambda (a: +A).(\forall (vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 +g a c (THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) +\to (\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a c (THeads (Flat +Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))))))))))) (\lambda +(n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: +T).(\lambda (t: T).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs +(THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead +(Bind Abbr) v t))))).(\lambda (H0: (sc3 g a1 c v)).(\lambda (w: T).(\lambda +(H1: (sc3 g (asucc g a1) c w)).(let H2 \def H in (land_ind (arity g c (THeads +(Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat +Appl) vs (THead (Bind Abbr) v t))) (land (arity g c (THeads (Flat Appl) vs +(THead (Flat Appl) v (THead (Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads +(Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H3: +(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n +n0))).(\lambda (H4: (sn3 c (THeads (Flat Appl) vs (THead (Bind Abbr) v +t)))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v (THead +(Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat +Appl) v (THead (Bind Abst) w t)))) (arity_appls_appl g c v a1 (sc3_arity_gen +g c v a1 H0) w (sc3_arity_gen g c w (asucc g a1) H1) t vs (ASort n n0) H3) +(sn3_appls_beta c v t vs H4 w (sc3_sn3 g (asucc g a1) c w H1))))) +H2)))))))))))) (\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall +(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a c (THeads (Flat Appl) vs +(THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: T).((sc3 g +(asucc g a1) c w) \to (sc3 g a c (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t)))))))))))))).(\lambda (a0: A).(\lambda (H0: ((\forall +(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 c +(THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to +(\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a0 c (THeads (Flat Appl) +vs (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))))))).(\lambda (vs: +TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H1: (land +(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (AHead a a0)) +(\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads +(Flat Appl) vs (THead (Bind Abbr) v t)))))))))))).(\lambda (H2: (sc3 g a1 c +v)).(\lambda (w: T).(\lambda (H3: (sc3 g (asucc g a1) c w)).(let H4 \def H1 +in (land_ind (arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) +(AHead a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall +(is: PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is +(THeads (Flat Appl) vs (THead (Bind Abbr) v t)))))))))) (land (arity g c +(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))) (AHead +a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is +(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w +t)))))))))))) (\lambda (H5: (arity g c (THeads (Flat Appl) vs (THead (Bind +Abbr) v t)) (AHead a a0))).(\lambda (H6: ((\forall (d: C).(\forall (w0: +T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Bind Abbr) v +t)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t))) (AHead a a0)) (\forall (d: C).(\forall (w0: +T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t))))))))))) (arity_appls_appl g c v a1 (sc3_arity_gen g +c v a1 H2) w (sc3_arity_gen g c w (asucc g a1) H3) t vs (AHead a a0) H5) +(\lambda (d: C).(\lambda (w0: T).(\lambda (H7: (sc3 g a d w0)).(\lambda (is: +PList).(\lambda (H8: (drop1 is d c)).(eq_ind_r T (THeads (Flat Appl) (lifts1 +is vs) (lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t)))) (\lambda +(t0: T).(sc3 g a0 d (THead (Flat Appl) w0 t0))) (eq_ind_r T (THead (Flat +Appl) (lift1 is v) (lift1 is (THead (Bind Abst) w t))) (\lambda (t0: T).(sc3 +g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) t0)))) +(eq_ind_r T (THead (Bind Abst) (lift1 is w) (lift1 (Ss is) t)) (\lambda (t0: +T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) +(THead (Flat Appl) (lift1 is v) t0))))) (let H_y \def (H0 (TCons w0 (lifts1 +is vs))) in (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind T (lift1 is (THead +(Bind Abbr) v t)) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads +(Flat Appl) (lifts1 is vs) t0)))) (eq_ind T (lift1 is (THeads (Flat Appl) vs +(THead (Bind Abbr) v t))) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 +t0))) (H6 d w0 H7 is H8) (THeads (Flat Appl) (lifts1 is vs) (lift1 is (THead +(Bind Abbr) v t))) (lifts1_flat Appl is (THead (Bind Abbr) v t) vs)) (THead +(Bind Abbr) (lift1 is v) (lift1 (Ss is) t)) (lift1_bind Abbr is v t)) +(sc3_lift1 g c a1 is d v H2 H8) (lift1 is w) (sc3_lift1 g c (asucc g a1) is d +w H3 H8))) (lift1 is (THead (Bind Abst) w t)) (lift1_bind Abst is w t)) +(lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t))) (lift1_flat Appl is +v (THead (Bind Abst) w t))) (lift1 is (THeads (Flat Appl) vs (THead (Flat +Appl) v (THead (Bind Abst) w t)))) (lifts1_flat Appl is (THead (Flat Appl) v +(THead (Bind Abst) w t)) vs)))))))))) H4)))))))))))))) a2))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sn3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/defs.ma new file mode 100644 index 000000000..85a0b7d04 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/defs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr3/defs.ma". + +inductive sn3 (c: C): T \to Prop \def +| sn3_sing: \forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2))))) \to (sn3 c t1)). + +rec definition sns3 (c: C) (ts: TList) on ts: Prop \def match ts with [TNil +\Rightarrow True | (TCons t ts0) \Rightarrow (land (sn3 c t) (sns3 c ts0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sn3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/fwd.ma new file mode 100644 index 000000000..aab289095 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/fwd.ma @@ -0,0 +1,189 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sn3/defs.ma". + +include "basic_1A/pr3/props.ma". + +implied rec lemma sn3_ind (c: C) (P: (T \to Prop)) (f: (\forall (t1: +T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall (P0: Prop).P0))) \to ((pr3 +c t1 t2) \to (sn3 c t2))))) \to (((\forall (t2: T).((((eq T t1 t2) \to +(\forall (P0: Prop).P0))) \to ((pr3 c t1 t2) \to (P t2))))) \to (P t1))))) +(t: T) (s0: sn3 c t) on s0: P t \def match s0 with [(sn3_sing t1 s1) +\Rightarrow (f t1 s1 (\lambda (t2: T).(\lambda (p: (((eq T t1 t2) \to +(\forall (P0: Prop).P0)))).(\lambda (p0: (pr3 c t1 t2)).((sn3_ind c P f) t2 +(s1 t2 p p0))))))]. + +lemma sn3_gen_bind: + \forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c +(THead (Bind b) u t)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Bind b) u t))).(insert_eq T (THead (Bind b) u t) (\lambda (t0: +T).(sn3 c t0)) (\lambda (_: T).(land (sn3 c u) (sn3 (CHead c (Bind b) u) t))) +(\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T +y (THead (Bind b) u t0)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t0)))) +(unintro T u (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Bind b) t0 x)) +\to (land (sn3 c t0) (sn3 (CHead c (Bind b) t0) x))))) (sn3_ind c (\lambda +(t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Bind b) x x0)) \to +(land (sn3 c x) (sn3 (CHead c (Bind b) x) x0)))))) (\lambda (t1: T).(\lambda +(H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 +c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) +\to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall +(x0: T).((eq T t2 (THead (Bind b) x x0)) \to (land (sn3 c x) (sn3 (CHead c +(Bind b) x) x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T +t1 (THead (Bind b) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t0: +T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c +t0 t2) \to (\forall (x1: T).(\forall (x2: T).((eq T t2 (THead (Bind b) x1 +x2)) \to (land (sn3 c x1) (sn3 (CHead c (Bind b) x1) x2))))))))) H2 (THead +(Bind b) x x0) H3) in (let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall +(t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to +(sn3 c t2))))) H1 (THead (Bind b) x x0) H3) in (conj (sn3 c x) (sn3 (CHead c +(Bind b) x) x0) (sn3_sing c x (\lambda (t2: T).(\lambda (H6: (((eq T x t2) +\to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x t2)).(let H8 \def (H4 +(THead (Bind b) t2 x0) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind +b) t2 x0))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead +_ t0 _) \Rightarrow t0])) (THead (Bind b) x x0) (THead (Bind b) t2 x0) H8) in +(let H10 \def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c x t0)) H7 x H9) in (let +H11 \def (eq_ind_r T t2 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: +Prop).P0))) H6 x H9) in (H11 (refl_equal T x) P)))))) (pr3_head_12 c x t2 H7 +(Bind b) x0 x0 (pr3_refl (CHead c (Bind b) t2) x0)) t2 x0 (refl_equal T +(THead (Bind b) t2 x0))) in (land_ind (sn3 c t2) (sn3 (CHead c (Bind b) t2) +x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda (_: (sn3 (CHead c (Bind b) +t2) x0)).H9)) H8)))))) (sn3_sing (CHead c (Bind b) x) x0 (\lambda (t2: +T).(\lambda (H6: (((eq T x0 t2) \to (\forall (P: Prop).P)))).(\lambda (H7: +(pr3 (CHead c (Bind b) x) x0 t2)).(let H8 \def (H4 (THead (Bind b) x t2) +(\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind b) x t2))).(\lambda +(P: Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) +(THead (Bind b) x x0) (THead (Bind b) x t2) H8) in (let H10 \def (eq_ind_r T +t2 (\lambda (t0: T).(pr3 (CHead c (Bind b) x) x0 t0)) H7 x0 H9) in (let H11 +\def (eq_ind_r T t2 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: +Prop).P0))) H6 x0 H9) in (H11 (refl_equal T x0) P)))))) (pr3_head_12 c x x +(pr3_refl c x) (Bind b) x0 t2 H7) x t2 (refl_equal T (THead (Bind b) x t2))) +in (land_ind (sn3 c x) (sn3 (CHead c (Bind b) x) t2) (sn3 (CHead c (Bind b) +x) t2) (\lambda (_: (sn3 c x)).(\lambda (H10: (sn3 (CHead c (Bind b) x) +t2)).H10)) H8))))))))))))))) y H0))))) H))))). + +lemma sn3_gen_flat: + \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c +(THead (Flat f) u t)) \to (land (sn3 c u) (sn3 c t)))))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Flat f) u t))).(insert_eq T (THead (Flat f) u t) (\lambda (t0: +T).(sn3 c t0)) (\lambda (_: T).(land (sn3 c u) (sn3 c t))) (\lambda (y: +T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T y (THead +(Flat f) u t0)) \to (land (sn3 c u) (sn3 c t0)))) (unintro T u (\lambda (t0: +T).(\forall (x: T).((eq T y (THead (Flat f) t0 x)) \to (land (sn3 c t0) (sn3 +c x))))) (sn3_ind c (\lambda (t0: T).(\forall (x: T).(\forall (x0: T).((eq T +t0 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0)))))) (\lambda (t1: +T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat f) x x0)) \to (land +(sn3 c x) (sn3 c x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: +(eq T t1 (THead (Flat f) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t0: +T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c +t0 t2) \to (\forall (x1: T).(\forall (x2: T).((eq T t2 (THead (Flat f) x1 +x2)) \to (land (sn3 c x1) (sn3 c x2))))))))) H2 (THead (Flat f) x x0) H3) in +(let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) +\to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2))))) H1 (THead +(Flat f) x x0) H3) in (conj (sn3 c x) (sn3 c x0) (sn3_sing c x (\lambda (t2: +T).(\lambda (H6: (((eq T x t2) \to (\forall (P: Prop).P)))).(\lambda (H7: +(pr3 c x t2)).(let H8 \def (H4 (THead (Flat f) t2 x0) (\lambda (H8: (eq T +(THead (Flat f) x x0) (THead (Flat f) t2 x0))).(\lambda (P: Prop).(let H9 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | +(TLRef _) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Flat f) x +x0) (THead (Flat f) t2 x0) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: +T).(pr3 c x t0)) H7 x H9) in (let H11 \def (eq_ind_r T t2 (\lambda (t0: +T).((eq T x t0) \to (\forall (P0: Prop).P0))) H6 x H9) in (H11 (refl_equal T +x) P)))))) (pr3_head_12 c x t2 H7 (Flat f) x0 x0 (pr3_refl (CHead c (Flat f) +t2) x0)) t2 x0 (refl_equal T (THead (Flat f) t2 x0))) in (land_ind (sn3 c t2) +(sn3 c x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda (_: (sn3 c x0)).H9)) +H8)))))) (sn3_sing c x0 (\lambda (t2: T).(\lambda (H6: (((eq T x0 t2) \to +(\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x0 t2)).(let H8 \def (H4 (THead +(Flat f) x t2) (\lambda (H8: (eq T (THead (Flat f) x x0) (THead (Flat f) x +t2))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) +\Rightarrow t0])) (THead (Flat f) x x0) (THead (Flat f) x t2) H8) in (let H10 +\def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c x0 t0)) H7 x0 H9) in (let H11 +\def (eq_ind_r T t2 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: +Prop).P0))) H6 x0 H9) in (H11 (refl_equal T x0) P)))))) (pr3_thin_dx c x0 t2 +H7 x f) x t2 (refl_equal T (THead (Flat f) x t2))) in (land_ind (sn3 c x) +(sn3 c t2) (sn3 c t2) (\lambda (_: (sn3 c x)).(\lambda (H10: (sn3 c +t2)).H10)) H8))))))))))))))) y H0))))) H))))). + +lemma sn3_gen_head: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c +(THead k u t)) \to (sn3 c u))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (c: C).(\forall (u: +T).(\forall (t: T).((sn3 c (THead k0 u t)) \to (sn3 c u)))))) (\lambda (b: +B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Bind b) u t))).(let H_x \def (sn3_gen_bind b c u t H) in (let H0 \def H_x in +(land_ind (sn3 c u) (sn3 (CHead c (Bind b) u) t) (sn3 c u) (\lambda (H1: (sn3 +c u)).(\lambda (_: (sn3 (CHead c (Bind b) u) t)).H1)) H0)))))))) (\lambda (f: +F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Flat f) u t))).(let H_x \def (sn3_gen_flat f c u t H) in (let H0 \def H_x in +(land_ind (sn3 c u) (sn3 c t) (sn3 c u) (\lambda (H1: (sn3 c u)).(\lambda (_: +(sn3 c t)).H1)) H0)))))))) k). + +lemma sn3_gen_cflat: + \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 (CHead +c (Flat f) u) t) \to (sn3 c t))))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +(sn3 (CHead c (Flat f) u) t)).(sn3_ind (CHead c (Flat f) u) (\lambda (t0: +T).(sn3 c t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to +(sn3 (CHead c (Flat f) u) t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T +t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to +(sn3 c t2)))))).(sn3_sing c t1 (\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) +\to (\forall (P: Prop).P)))).(\lambda (H3: (pr3 c t1 t2)).(H1 t2 H2 +(pr3_cflat c t1 t2 H3 f u))))))))) t H))))). + +lemma sn3_gen_lift: + \forall (c1: C).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((sn3 c1 +(lift h d t)) \to (\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t))))))) +\def + \lambda (c1: C).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H: (sn3 c1 (lift h d t))).(insert_eq T (lift h d t) (\lambda (t0: T).(sn3 c1 +t0)) (\lambda (_: T).(\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t)))) +(\lambda (y: T).(\lambda (H0: (sn3 c1 y)).(unintro T t (\lambda (t0: T).((eq +T y (lift h d t0)) \to (\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t0))))) +(sn3_ind c1 (\lambda (t0: T).(\forall (x: T).((eq T t0 (lift h d x)) \to +(\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 x)))))) (\lambda (t1: +T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c1 t1 t2) \to (sn3 c1 t2)))))).(\lambda (H2: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c1 t1 t2) \to +(\forall (x: T).((eq T t2 (lift h d x)) \to (\forall (c2: C).((drop h d c1 +c2) \to (sn3 c2 x)))))))))).(\lambda (x: T).(\lambda (H3: (eq T t1 (lift h d +x))).(\lambda (c2: C).(\lambda (H4: (drop h d c1 c2)).(let H5 \def (eq_ind T +t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c1 t0 t2) \to (\forall (x0: T).((eq T t2 (lift h d x0)) +\to (\forall (c3: C).((drop h d c1 c3) \to (sn3 c3 x0))))))))) H2 (lift h d +x) H3) in (let H6 \def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq +T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c1 t0 t2) \to (sn3 c1 t2))))) +H1 (lift h d x) H3) in (sn3_sing c2 x (\lambda (t2: T).(\lambda (H7: (((eq T +x t2) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr3 c2 x t2)).(H5 (lift h d +t2) (\lambda (H9: (eq T (lift h d x) (lift h d t2))).(\lambda (P: Prop).(let +H10 \def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c2 x t0)) H8 x (lift_inj x t2 h +d H9)) in (let H11 \def (eq_ind_r T t2 (\lambda (t0: T).((eq T x t0) \to +(\forall (P0: Prop).P0))) H7 x (lift_inj x t2 h d H9)) in (H11 (refl_equal T +x) P))))) (pr3_lift c1 c2 h d H4 x t2 H8) t2 (refl_equal T (lift h d t2)) c2 +H4)))))))))))))) y H0)))) H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sn3/lift1.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/lift1.ma new file mode 100644 index 000000000..67e02385d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/lift1.ma @@ -0,0 +1,43 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sn3/props.ma". + +include "basic_1A/drop1/fwd.ma". + +include "basic_1A/lift1/props.ma". + +lemma sns3_lifts1: + \forall (e: C).(\forall (hds: PList).(\forall (c: C).((drop1 hds c e) \to +(\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 hds ts))))))) +\def + \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c +(lifts1 p ts))))))) (\lambda (c: C).(\lambda (H: (drop1 PNil c e)).(\lambda +(ts: TList).(\lambda (H0: (sns3 e ts)).(let H_y \def (drop1_gen_pnil c e H) +in (eq_ind_r C e (\lambda (c0: C).(sns3 c0 (lifts1 PNil ts))) (eq_ind_r TList +ts (\lambda (t: TList).(sns3 e t)) H0 (lifts1 PNil ts) (lifts1_nil ts)) c +H_y)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda +(H: ((\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to +(sns3 c (lifts1 p ts)))))))).(\lambda (c: C).(\lambda (H0: (drop1 (PCons n n0 +p) c e)).(\lambda (ts: TList).(\lambda (H1: (sns3 e ts)).(let H_x \def +(drop1_gen_pcons c e p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda +(c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 e)) (sns3 c (lifts1 +(PCons n n0 p) ts)) (\lambda (x: C).(\lambda (H3: (drop n n0 c x)).(\lambda +(H4: (drop1 p x e)).(eq_ind_r TList (lifts n n0 (lifts1 p ts)) (\lambda (t: +TList).(sns3 c t)) (sns3_lifts c x n n0 H3 (lifts1 p ts) (H x H4 ts H1)) +(lifts1 (PCons n n0 p) ts) (lifts1_cons n n0 p ts))))) H2))))))))))) hds)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sn3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/nf2.ma new file mode 100644 index 000000000..e00ecab57 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/nf2.ma @@ -0,0 +1,60 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sn3/fwd.ma". + +include "basic_1A/nf2/dec.ma". + +include "basic_1A/nf2/pr3.ma". + +lemma sn3_nf2: + \forall (c: C).(\forall (t: T).((nf2 c t) \to (sn3 c t))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (H: (nf2 c t)).(sn3_sing c t +(\lambda (t2: T).(\lambda (H0: (((eq T t t2) \to (\forall (P: +Prop).P)))).(\lambda (H1: (pr3 c t t2)).(let H_y \def (nf2_pr3_unfold c t t2 +H1 H) in (let H2 \def (eq_ind_r T t2 (\lambda (t0: T).(pr3 c t t0)) H1 t H_y) +in (let H3 \def (eq_ind_r T t2 (\lambda (t0: T).((eq T t t0) \to (\forall (P: +Prop).P))) H0 t H_y) in (eq_ind T t (\lambda (t0: T).(sn3 c t0)) (H3 +(refl_equal T t) (sn3 c t)) t2 H_y)))))))))). + +lemma nf2_sn3: + \forall (c: C).(\forall (t: T).((sn3 c t) \to (ex2 T (\lambda (u: T).(pr3 c +t u)) (\lambda (u: T).(nf2 c u))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (H: (sn3 c t)).(sn3_ind c (\lambda +(t0: T).(ex2 T (\lambda (u: T).(pr3 c t0 u)) (\lambda (u: T).(nf2 c u)))) +(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(ex2 T (\lambda (u: T).(pr3 c t2 u)) (\lambda (u: T).(nf2 c u)))))))).(let +H_x \def (nf2_dec c t1) in (let H2 \def H_x in (or_ind (nf2 c t1) (ex2 T +(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr2 c t1 t2))) (ex2 T (\lambda (u: T).(pr3 c t1 u)) (\lambda (u: T).(nf2 +c u))) (\lambda (H3: (nf2 c t1)).(ex_intro2 T (\lambda (u: T).(pr3 c t1 u)) +(\lambda (u: T).(nf2 c u)) t1 (pr3_refl c t1) H3)) (\lambda (H3: (ex2 T +(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr2 c t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr2 c t1 t2)) (ex2 T (\lambda (u: T).(pr3 c +t1 u)) (\lambda (u: T).(nf2 c u))) (\lambda (x: T).(\lambda (H4: (((eq T t1 +x) \to (\forall (P: Prop).P)))).(\lambda (H5: (pr2 c t1 x)).(let H_y \def (H1 +x H4) in (let H6 \def (H_y (pr3_pr2 c t1 x H5)) in (ex2_ind T (\lambda (u: +T).(pr3 c x u)) (\lambda (u: T).(nf2 c u)) (ex2 T (\lambda (u: T).(pr3 c t1 +u)) (\lambda (u: T).(nf2 c u))) (\lambda (x0: T).(\lambda (H7: (pr3 c x +x0)).(\lambda (H8: (nf2 c x0)).(ex_intro2 T (\lambda (u: T).(pr3 c t1 u)) +(\lambda (u: T).(nf2 c u)) x0 (pr3_sing c x t1 H5 x0 H7) H8)))) H6)))))) H3)) +H2)))))) t H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sn3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sn3/props.ma new file mode 100644 index 000000000..fdab5af75 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sn3/props.ma @@ -0,0 +1,2403 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sn3/nf2.ma". + +include "basic_1A/nf2/iso.ma". + +include "basic_1A/pr3/iso.ma". + +lemma sn3_pr3_trans: + \forall (c: C).(\forall (t1: T).((sn3 c t1) \to (\forall (t2: T).((pr3 c t1 +t2) \to (sn3 c t2))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (H: (sn3 c t1)).(sn3_ind c (\lambda +(t: T).(\forall (t2: T).((pr3 c t t2) \to (sn3 c t2)))) (\lambda (t2: +T).(\lambda (H0: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H1: ((\forall +(t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to +(\forall (t4: T).((pr3 c t3 t4) \to (sn3 c t4)))))))).(\lambda (t3: +T).(\lambda (H2: (pr3 c t2 t3)).(sn3_sing c t3 (\lambda (t0: T).(\lambda (H3: +(((eq T t3 t0) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr3 c t3 t0)).(let +H_x \def (term_dec t2 t3) in (let H5 \def H_x in (or_ind (eq T t2 t3) ((eq T +t2 t3) \to (\forall (P: Prop).P)) (sn3 c t0) (\lambda (H6: (eq T t2 t3)).(let +H7 \def (eq_ind_r T t3 (\lambda (t: T).(pr3 c t t0)) H4 t2 H6) in (let H8 +\def (eq_ind_r T t3 (\lambda (t: T).((eq T t t0) \to (\forall (P: Prop).P))) +H3 t2 H6) in (let H9 \def (eq_ind_r T t3 (\lambda (t: T).(pr3 c t2 t)) H2 t2 +H6) in (H0 t0 H8 H7))))) (\lambda (H6: (((eq T t2 t3) \to (\forall (P: +Prop).P)))).(H1 t3 H6 H2 t0 H4)) H5)))))))))))) t1 H))). + +lemma sn3_pr2_intro: + \forall (c: C).(\forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to +(\forall (P: Prop).P))) \to ((pr2 c t1 t2) \to (sn3 c t2))))) \to (sn3 c t1))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (H: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr2 c t1 t2) \to (sn3 c +t2)))))).(sn3_sing c t1 (\lambda (t2: T).(\lambda (H0: (((eq T t1 t2) \to +(\forall (P: Prop).P)))).(\lambda (H1: (pr3 c t1 t2)).(let H2 \def H0 in +((let H3 \def H in (pr3_ind c (\lambda (t: T).(\lambda (t0: T).(((\forall +(t3: T).((((eq T t t3) \to (\forall (P: Prop).P))) \to ((pr2 c t t3) \to (sn3 +c t3))))) \to ((((eq T t t0) \to (\forall (P: Prop).P))) \to (sn3 c t0))))) +(\lambda (t: T).(\lambda (H4: ((\forall (t3: T).((((eq T t t3) \to (\forall +(P: Prop).P))) \to ((pr2 c t t3) \to (sn3 c t3)))))).(\lambda (H5: (((eq T t +t) \to (\forall (P: Prop).P)))).(H4 t H5 (pr2_free c t t (pr0_refl t)))))) +(\lambda (t3: T).(\lambda (t4: T).(\lambda (H4: (pr2 c t4 t3)).(\lambda (t5: +T).(\lambda (H5: (pr3 c t3 t5)).(\lambda (H6: ((((\forall (t6: T).((((eq T t3 +t6) \to (\forall (P: Prop).P))) \to ((pr2 c t3 t6) \to (sn3 c t6))))) \to +((((eq T t3 t5) \to (\forall (P: Prop).P))) \to (sn3 c t5))))).(\lambda (H7: +((\forall (t6: T).((((eq T t4 t6) \to (\forall (P: Prop).P))) \to ((pr2 c t4 +t6) \to (sn3 c t6)))))).(\lambda (H8: (((eq T t4 t5) \to (\forall (P: +Prop).P)))).(let H_x \def (term_dec t4 t3) in (let H9 \def H_x in (or_ind (eq +T t4 t3) ((eq T t4 t3) \to (\forall (P: Prop).P)) (sn3 c t5) (\lambda (H10: +(eq T t4 t3)).(let H11 \def (eq_ind T t4 (\lambda (t: T).((eq T t t5) \to +(\forall (P: Prop).P))) H8 t3 H10) in (let H12 \def (eq_ind T t4 (\lambda (t: +T).(\forall (t6: T).((((eq T t t6) \to (\forall (P: Prop).P))) \to ((pr2 c t +t6) \to (sn3 c t6))))) H7 t3 H10) in (let H13 \def (eq_ind T t4 (\lambda (t: +T).(pr2 c t t3)) H4 t3 H10) in (H6 H12 H11))))) (\lambda (H10: (((eq T t4 t3) +\to (\forall (P: Prop).P)))).(sn3_pr3_trans c t3 (H7 t3 H10 H4) t5 H5)) +H9))))))))))) t1 t2 H1 H3)) H2)))))))). + +theorem sn3_cast: + \forall (c: C).(\forall (u: T).((sn3 c u) \to (\forall (t: T).((sn3 c t) \to +(sn3 c (THead (Flat Cast) u t)))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (H: (sn3 c u)).(sn3_ind c (\lambda +(t: T).(\forall (t0: T).((sn3 c t0) \to (sn3 c (THead (Flat Cast) t t0))))) +(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(\forall (t: T).((sn3 c t) \to (sn3 c (THead (Flat Cast) t2 +t))))))))).(\lambda (t: T).(\lambda (H2: (sn3 c t)).(sn3_ind c (\lambda (t0: +T).(sn3 c (THead (Flat Cast) t1 t0))) (\lambda (t0: T).(\lambda (H3: +((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 +t2) \to (sn3 c t2)))))).(\lambda (H4: ((\forall (t2: T).((((eq T t0 t2) \to +(\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c (THead (Flat Cast) t1 +t2))))))).(sn3_pr2_intro c (THead (Flat Cast) t1 t0) (\lambda (t2: +T).(\lambda (H5: (((eq T (THead (Flat Cast) t1 t0) t2) \to (\forall (P: +Prop).P)))).(\lambda (H6: (pr2 c (THead (Flat Cast) t1 t0) t2)).(let H7 \def +(pr2_gen_cast c t1 t0 t2 H6) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t0 t3)))) (pr2 c +t0 t2) (sn3 c t2) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t0 +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c t0 t3))) (sn3 c t2) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H9: (eq T t2 (THead (Flat Cast) x0 +x1))).(\lambda (H10: (pr2 c t1 x0)).(\lambda (H11: (pr2 c t0 x1)).(let H12 +\def (eq_ind T t2 (\lambda (t3: T).((eq T (THead (Flat Cast) t1 t0) t3) \to +(\forall (P: Prop).P))) H5 (THead (Flat Cast) x0 x1) H9) in (eq_ind_r T +(THead (Flat Cast) x0 x1) (\lambda (t3: T).(sn3 c t3)) (let H_x \def +(term_dec x0 t1) in (let H13 \def H_x in (or_ind (eq T x0 t1) ((eq T x0 t1) +\to (\forall (P: Prop).P)) (sn3 c (THead (Flat Cast) x0 x1)) (\lambda (H14: +(eq T x0 t1)).(let H15 \def (eq_ind T x0 (\lambda (t3: T).((eq T (THead (Flat +Cast) t1 t0) (THead (Flat Cast) t3 x1)) \to (\forall (P: Prop).P))) H12 t1 +H14) in (let H16 \def (eq_ind T x0 (\lambda (t3: T).(pr2 c t1 t3)) H10 t1 +H14) in (eq_ind_r T t1 (\lambda (t3: T).(sn3 c (THead (Flat Cast) t3 x1))) +(let H_x0 \def (term_dec t0 x1) in (let H17 \def H_x0 in (or_ind (eq T t0 x1) +((eq T t0 x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Cast) t1 x1)) +(\lambda (H18: (eq T t0 x1)).(let H19 \def (eq_ind_r T x1 (\lambda (t3: +T).((eq T (THead (Flat Cast) t1 t0) (THead (Flat Cast) t1 t3)) \to (\forall +(P: Prop).P))) H15 t0 H18) in (let H20 \def (eq_ind_r T x1 (\lambda (t3: +T).(pr2 c t0 t3)) H11 t0 H18) in (eq_ind T t0 (\lambda (t3: T).(sn3 c (THead +(Flat Cast) t1 t3))) (H19 (refl_equal T (THead (Flat Cast) t1 t0)) (sn3 c +(THead (Flat Cast) t1 t0))) x1 H18)))) (\lambda (H18: (((eq T t0 x1) \to +(\forall (P: Prop).P)))).(H4 x1 H18 (pr3_pr2 c t0 x1 H11))) H17))) x0 H14)))) +(\lambda (H14: (((eq T x0 t1) \to (\forall (P: Prop).P)))).(H1 x0 (\lambda +(H15: (eq T t1 x0)).(\lambda (P: Prop).(let H16 \def (eq_ind_r T x0 (\lambda +(t3: T).((eq T t3 t1) \to (\forall (P0: Prop).P0))) H14 t1 H15) in (let H17 +\def (eq_ind_r T x0 (\lambda (t3: T).((eq T (THead (Flat Cast) t1 t0) (THead +(Flat Cast) t3 x1)) \to (\forall (P0: Prop).P0))) H12 t1 H15) in (let H18 +\def (eq_ind_r T x0 (\lambda (t3: T).(pr2 c t1 t3)) H10 t1 H15) in (H16 +(refl_equal T t1) P)))))) (pr3_pr2 c t1 x0 H10) x1 (let H_x0 \def (term_dec +t0 x1) in (let H15 \def H_x0 in (or_ind (eq T t0 x1) ((eq T t0 x1) \to +(\forall (P: Prop).P)) (sn3 c x1) (\lambda (H16: (eq T t0 x1)).(let H17 \def +(eq_ind_r T x1 (\lambda (t3: T).((eq T (THead (Flat Cast) t1 t0) (THead (Flat +Cast) x0 t3)) \to (\forall (P: Prop).P))) H12 t0 H16) in (let H18 \def +(eq_ind_r T x1 (\lambda (t3: T).(pr2 c t0 t3)) H11 t0 H16) in (eq_ind T t0 +(\lambda (t3: T).(sn3 c t3)) (sn3_sing c t0 H3) x1 H16)))) (\lambda (H16: +(((eq T t0 x1) \to (\forall (P: Prop).P)))).(H3 x1 H16 (pr3_pr2 c t0 x1 +H11))) H15))))) H13))) t2 H9))))))) H8)) (\lambda (H8: (pr2 c t0 +t2)).(sn3_pr3_trans c t0 (sn3_sing c t0 H3) t2 (pr3_pr2 c t0 t2 H8))) +H7))))))))) t H2)))))) u H))). + +lemma sn3_cflat: + \forall (c: C).(\forall (t: T).((sn3 c t) \to (\forall (f: F).(\forall (u: +T).(sn3 (CHead c (Flat f) u) t))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (H: (sn3 c t)).(\lambda (f: +F).(\lambda (u: T).(sn3_ind c (\lambda (t0: T).(sn3 (CHead c (Flat f) u) t0)) +(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(sn3 (CHead c (Flat f) u) t2)))))).(sn3_pr2_intro (CHead c (Flat f) u) t1 +(\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) \to (\forall (P: +Prop).P)))).(\lambda (H3: (pr2 (CHead c (Flat f) u) t1 t2)).(H1 t2 H2 +(pr3_pr2 c t1 t2 (pr2_gen_cflat f c u t1 t2 H3)))))))))) t H))))). + +lemma sn3_shift: + \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c +(THead (Bind b) v t)) \to (sn3 (CHead c (Bind b) v) t))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Bind b) v t))).(let H_x \def (sn3_gen_bind b c v t H) in (let +H0 \def H_x in (land_ind (sn3 c v) (sn3 (CHead c (Bind b) v) t) (sn3 (CHead c +(Bind b) v) t) (\lambda (_: (sn3 c v)).(\lambda (H2: (sn3 (CHead c (Bind b) +v) t)).H2)) H0))))))). + +lemma sn3_change: + \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: +T).(\forall (t: T).((sn3 (CHead c (Bind b) v1) t) \to (\forall (v2: T).(sn3 +(CHead c (Bind b) v2) t))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda +(v1: T).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c (Bind b) v1) t)).(\lambda +(v2: T).(sn3_ind (CHead c (Bind b) v1) (\lambda (t0: T).(sn3 (CHead c (Bind +b) v2) t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) +\to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to (sn3 +(CHead c (Bind b) v1) t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to +(sn3 (CHead c (Bind b) v2) t2)))))).(sn3_pr2_intro (CHead c (Bind b) v2) t1 +(\lambda (t2: T).(\lambda (H3: (((eq T t1 t2) \to (\forall (P: +Prop).P)))).(\lambda (H4: (pr2 (CHead c (Bind b) v2) t1 t2)).(H2 t2 H3 +(pr3_pr2 (CHead c (Bind b) v1) t1 t2 (pr2_change b H c v2 t1 t2 H4 +v1)))))))))) t H0))))))). + +lemma sn3_gen_def: + \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) v)) \to ((sn3 c (TLRef i)) \to (sn3 d v)))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 c (TLRef +i))).(sn3_gen_lift c v (S i) O (sn3_pr3_trans c (TLRef i) H0 (lift (S i) O v) +(pr3_pr2 c (TLRef i) (lift (S i) O v) (pr2_delta c d v i H (TLRef i) (TLRef +i) (pr0_refl (TLRef i)) (lift (S i) O v) (subst0_lref v i)))) d (getl_drop +Abbr c d v i H))))))). + +lemma sn3_cdelta: + \forall (v: T).(\forall (t: T).(\forall (i: nat).(((\forall (w: T).(ex T +(\lambda (u: T).(subst0 i w t u))))) \to (\forall (c: C).(\forall (d: +C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to (sn3 d v)))))))) +\def + \lambda (v: T).(\lambda (t: T).(\lambda (i: nat).(\lambda (H: ((\forall (w: +T).(ex T (\lambda (u: T).(subst0 i w t u)))))).(let H_x \def (H v) in (let H0 +\def H_x in (ex_ind T (\lambda (u: T).(subst0 i v t u)) (\forall (c: +C).(\forall (d: C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to +(sn3 d v))))) (\lambda (x: T).(\lambda (H1: (subst0 i v t x)).(subst0_ind +(\lambda (n: nat).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: T).(\forall +(c: C).(\forall (d: C).((getl n c (CHead d (Bind Abbr) t0)) \to ((sn3 c t1) +\to (sn3 d t0))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (c: +C).(\lambda (d: C).(\lambda (H2: (getl i0 c (CHead d (Bind Abbr) +v0))).(\lambda (H3: (sn3 c (TLRef i0))).(sn3_gen_def c d v0 i0 H2 H3))))))) +(\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: +C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to +(sn3 d v0))))))).(\lambda (t0: T).(\lambda (k: K).(\lambda (c: C).(\lambda +(d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) v0))).(\lambda (H5: (sn3 +c (THead k u1 t0))).(let H_y \def (sn3_gen_head k c u1 t0 H5) in (H3 c d H4 +H_y)))))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda (t2: T).(\lambda +(t1: T).(\lambda (i0: nat).(\lambda (H2: (subst0 (s k i0) v0 t1 t2)).(\lambda +(H3: ((\forall (c: C).(\forall (d: C).((getl (s k i0) c (CHead d (Bind Abbr) +v0)) \to ((sn3 c t1) \to (sn3 d v0))))))).(\lambda (u: T).(\lambda (c: +C).(\lambda (d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) +v0))).(\lambda (H5: (sn3 c (THead k u t1))).(K_ind (\lambda (k0: K).((subst0 +(s k0 i0) v0 t1 t2) \to (((\forall (c0: C).(\forall (d0: C).((getl (s k0 i0) +c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0)))))) \to ((sn3 +c (THead k0 u t1)) \to (sn3 d v0))))) (\lambda (b: B).(\lambda (_: (subst0 (s +(Bind b) i0) v0 t1 t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: +C).((getl (s (Bind b) i0) c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to +(sn3 d0 v0))))))).(\lambda (H8: (sn3 c (THead (Bind b) u t1))).(let H_x0 \def +(sn3_gen_bind b c u t1 H8) in (let H9 \def H_x0 in (land_ind (sn3 c u) (sn3 +(CHead c (Bind b) u) t1) (sn3 d v0) (\lambda (_: (sn3 c u)).(\lambda (H11: +(sn3 (CHead c (Bind b) u) t1)).(H7 (CHead c (Bind b) u) d (getl_clear_bind b +(CHead c (Bind b) u) c u (clear_bind b c u) (CHead d (Bind Abbr) v0) i0 H4) +H11))) H9))))))) (\lambda (f: F).(\lambda (_: (subst0 (s (Flat f) i0) v0 t1 +t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: C).((getl (s (Flat f) i0) +c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0))))))).(\lambda +(H8: (sn3 c (THead (Flat f) u t1))).(let H_x0 \def (sn3_gen_flat f c u t1 H8) +in (let H9 \def H_x0 in (land_ind (sn3 c u) (sn3 c t1) (sn3 d v0) (\lambda +(_: (sn3 c u)).(\lambda (H11: (sn3 c t1)).(H7 c d H4 H11))) H9))))))) k H2 H3 +H5))))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: +C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to +(sn3 d v0))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: ((\forall (c: C).(\forall (d: +C).((getl (s k i0) c (CHead d (Bind Abbr) v0)) \to ((sn3 c t1) \to (sn3 d +v0))))))).(\lambda (c: C).(\lambda (d: C).(\lambda (H6: (getl i0 c (CHead d +(Bind Abbr) v0))).(\lambda (H7: (sn3 c (THead k u1 t1))).(let H_y \def +(sn3_gen_head k c u1 t1 H7) in (H3 c d H6 H_y))))))))))))))))) i v t x H1))) +H0)))))). + +lemma sn3_cpr3_trans: + \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall +(k: K).(\forall (t: T).((sn3 (CHead c k u1) t) \to (sn3 (CHead c k u2) +t))))))) +\def + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr3 c u1 +u2)).(\lambda (k: K).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c k u1) +t)).(sn3_ind (CHead c k u1) (\lambda (t0: T).(sn3 (CHead c k u2) t0)) +(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u1) +t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c k u1) t1 t2) \to (sn3 (CHead c k u2) +t2)))))).(sn3_sing (CHead c k u2) t1 (\lambda (t2: T).(\lambda (H3: (((eq T +t1 t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr3 (CHead c k u2) t1 +t2)).(H2 t2 H3 (pr3_pr3_pr3_t c u1 u2 H t1 t2 k H4))))))))) t H0))))))). + +theorem sn3_bind: + \forall (b: B).(\forall (c: C).(\forall (u: T).((sn3 c u) \to (\forall (t: +T).((sn3 (CHead c (Bind b) u) t) \to (sn3 c (THead (Bind b) u t))))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (sn3 c +u)).(sn3_ind c (\lambda (t: T).(\forall (t0: T).((sn3 (CHead c (Bind b) t) +t0) \to (sn3 c (THead (Bind b) t t0))))) (\lambda (t1: T).(\lambda (_: +((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 +t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to +(\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (t: T).((sn3 (CHead c +(Bind b) t2) t) \to (sn3 c (THead (Bind b) t2 t))))))))).(\lambda (t: +T).(\lambda (H2: (sn3 (CHead c (Bind b) t1) t)).(sn3_ind (CHead c (Bind b) +t1) (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (\lambda (t2: +T).(\lambda (H3: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 (CHead c (Bind b) +t1) t3)))))).(\lambda (H4: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 c (THead (Bind b) +t1 t3))))))).(sn3_sing c (THead (Bind b) t1 t2) (\lambda (t3: T).(\lambda +(H5: (((eq T (THead (Bind b) t1 t2) t3) \to (\forall (P: Prop).P)))).(\lambda +(H6: (pr3 c (THead (Bind b) t1 t2) t3)).(let H_x \def (bind_dec_not b Abst) +in (let H7 \def H_x in (or_ind (eq B b Abst) (not (eq B b Abst)) (sn3 c t3) +(\lambda (H8: (eq B b Abst)).(let H9 \def (eq_ind B b (\lambda (b0: B).(pr3 c +(THead (Bind b0) t1 t2) t3)) H6 Abst H8) in (let H10 \def (eq_ind B b +(\lambda (b0: B).((eq T (THead (Bind b0) t1 t2) t3) \to (\forall (P: +Prop).P))) H5 Abst H8) in (let H11 \def (eq_ind B b (\lambda (b0: B).(\forall +(t4: T).((((eq T t2 t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind +b0) t1) t2 t4) \to (sn3 c (THead (Bind b0) t1 t4)))))) H4 Abst H8) in (let +H12 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T t2 t4) \to +(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) t2 t4) \to (sn3 +(CHead c (Bind b0) t1) t4))))) H3 Abst H8) in (let H13 \def (eq_ind B b +(\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) \to (\forall (P: Prop).P))) +\to ((pr3 c t1 t4) \to (\forall (t0: T).((sn3 (CHead c (Bind b0) t4) t0) \to +(sn3 c (THead (Bind b0) t4 t0)))))))) H1 Abst H8) in (let H14 \def +(pr3_gen_abst c t1 t2 t3 H9) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall +(u0: T).(pr3 (CHead c (Bind b0) u0) t2 t4))))) (sn3 c t3) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H15: (eq T t3 (THead (Bind Abst) x0 +x1))).(\lambda (H16: (pr3 c t1 x0)).(\lambda (H17: ((\forall (b0: B).(\forall +(u0: T).(pr3 (CHead c (Bind b0) u0) t2 x1))))).(let H18 \def (eq_ind T t3 +(\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) t0) \to (\forall (P: +Prop).P))) H10 (THead (Bind Abst) x0 x1) H15) in (eq_ind_r T (THead (Bind +Abst) x0 x1) (\lambda (t0: T).(sn3 c t0)) (let H_x0 \def (term_dec t1 x0) in +(let H19 \def H_x0 in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: +Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H20: (eq T t1 x0)).(let +H21 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) +(THead (Bind Abst) t0 x1)) \to (\forall (P: Prop).P))) H18 t1 H20) in (let +H22 \def (eq_ind_r T x0 (\lambda (t0: T).(pr3 c t1 t0)) H16 t1 H20) in +(eq_ind T t1 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t0 x1))) (let H_x1 +\def (term_dec t2 x1) in (let H23 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 +x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind Abst) t1 x1)) (\lambda +(H24: (eq T t2 x1)).(let H25 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T +(THead (Bind Abst) t1 t2) (THead (Bind Abst) t1 t0)) \to (\forall (P: +Prop).P))) H21 t2 H24) in (let H26 \def (eq_ind_r T x1 (\lambda (t0: +T).(\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) +H17 t2 H24) in (eq_ind T t2 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t1 +t0))) (H25 (refl_equal T (THead (Bind Abst) t1 t2)) (sn3 c (THead (Bind Abst) +t1 t2))) x1 H24)))) (\lambda (H24: (((eq T t2 x1) \to (\forall (P: +Prop).P)))).(H11 x1 H24 (H17 Abst t1))) H23))) x0 H20)))) (\lambda (H20: +(((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x1 \def (term_dec t2 x1) +in (let H21 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: +Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H22: (eq T t2 x1)).(let +H23 \def (eq_ind_r T x1 (\lambda (t0: T).(\forall (b0: B).(\forall (u0: +T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) H17 t2 H22) in (eq_ind T t2 (\lambda +(t0: T).(sn3 c (THead (Bind Abst) x0 t0))) (H13 x0 H20 H16 t2 (sn3_cpr3_trans +c t1 x0 H16 (Bind Abst) t2 (sn3_sing (CHead c (Bind Abst) t1) t2 H12))) x1 +H22))) (\lambda (H22: (((eq T t2 x1) \to (\forall (P: Prop).P)))).(H13 x0 H20 +H16 x1 (sn3_cpr3_trans c t1 x0 H16 (Bind Abst) x1 (H12 x1 H22 (H17 Abst +t1))))) H21)))) H19))) t3 H15))))))) H14)))))))) (\lambda (H8: (not (eq B b +Abst))).(let H_x0 \def (pr3_gen_bind b H8 c t1 t2 t3 H6) in (let H9 \def H_x0 +in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) t2 t4)))) (pr3 (CHead c (Bind +b) t1) t2 (lift (S O) O t3)) (sn3 c t3) (\lambda (H10: (ex3_2 T T (\lambda +(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 +(CHead c (Bind b) t1) t2 t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 (CHead c (Bind b) +t1) t2 t4))) (sn3 c t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq +T t3 (THead (Bind b) x0 x1))).(\lambda (H12: (pr3 c t1 x0)).(\lambda (H13: +(pr3 (CHead c (Bind b) t1) t2 x1)).(let H14 \def (eq_ind T t3 (\lambda (t0: +T).((eq T (THead (Bind b) t1 t2) t0) \to (\forall (P: Prop).P))) H5 (THead +(Bind b) x0 x1) H11) in (eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: +T).(sn3 c t0)) (let H_x1 \def (term_dec t1 x0) in (let H15 \def H_x1 in +(or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: Prop).P)) (sn3 c (THead +(Bind b) x0 x1)) (\lambda (H16: (eq T t1 x0)).(let H17 \def (eq_ind_r T x0 +(\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t0 x1)) \to +(\forall (P: Prop).P))) H14 t1 H16) in (let H18 \def (eq_ind_r T x0 (\lambda +(t0: T).(pr3 c t1 t0)) H12 t1 H16) in (eq_ind T t1 (\lambda (t0: T).(sn3 c +(THead (Bind b) t0 x1))) (let H_x2 \def (term_dec t2 x1) in (let H19 \def +H_x2 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: Prop).P)) (sn3 c +(THead (Bind b) t1 x1)) (\lambda (H20: (eq T t2 x1)).(let H21 \def (eq_ind_r +T x1 (\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t1 t0)) +\to (\forall (P: Prop).P))) H17 t2 H20) in (let H22 \def (eq_ind_r T x1 +(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) t2 t0)) H13 t2 H20) in (eq_ind T +t2 (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (H21 (refl_equal T (THead +(Bind b) t1 t2)) (sn3 c (THead (Bind b) t1 t2))) x1 H20)))) (\lambda (H20: +(((eq T t2 x1) \to (\forall (P: Prop).P)))).(H4 x1 H20 H13)) H19))) x0 +H16)))) (\lambda (H16: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x2 +\def (term_dec t2 x1) in (let H17 \def H_x2 in (or_ind (eq T t2 x1) ((eq T t2 +x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind b) x0 x1)) (\lambda (H18: +(eq T t2 x1)).(let H19 \def (eq_ind_r T x1 (\lambda (t0: T).(pr3 (CHead c +(Bind b) t1) t2 t0)) H13 t2 H18) in (eq_ind T t2 (\lambda (t0: T).(sn3 c +(THead (Bind b) x0 t0))) (H1 x0 H16 H12 t2 (sn3_cpr3_trans c t1 x0 H12 (Bind +b) t2 (sn3_sing (CHead c (Bind b) t1) t2 H3))) x1 H18))) (\lambda (H18: (((eq +T t2 x1) \to (\forall (P: Prop).P)))).(H1 x0 H16 H12 x1 (sn3_cpr3_trans c t1 +x0 H12 (Bind b) x1 (H3 x1 H18 H13)))) H17)))) H15))) t3 H11))))))) H10)) +(\lambda (H10: (pr3 (CHead c (Bind b) t1) t2 (lift (S O) O +t3))).(sn3_gen_lift (CHead c (Bind b) t1) t3 (S O) O (sn3_pr3_trans (CHead c +(Bind b) t1) t2 (sn3_sing (CHead c (Bind b) t1) t2 H3) (lift (S O) O t3) H10) +c (drop_drop (Bind b) O c c (drop_refl c) t1))) H9)))) H7)))))))))) t +H2)))))) u H)))). + +theorem sn3_beta: + \forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c (THead (Bind Abbr) v +t)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead +(Bind Abst) w t)))))))) +\def + \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Bind Abbr) v t))).(insert_eq T (THead (Bind Abbr) v t) (\lambda (t0: T).(sn3 +c t0)) (\lambda (_: T).(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat +Appl) v (THead (Bind Abst) w t)))))) (\lambda (y: T).(\lambda (H0: (sn3 c +y)).(unintro T t (\lambda (t0: T).((eq T y (THead (Bind Abbr) v t0)) \to +(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) v (THead (Bind Abst) +w t0))))))) (unintro T v (\lambda (t0: T).(\forall (x: T).((eq T y (THead +(Bind Abbr) t0 x)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat +Appl) t0 (THead (Bind Abst) w x)))))))) (sn3_ind c (\lambda (t0: T).(\forall +(x: T).(\forall (x0: T).((eq T t0 (THead (Bind Abbr) x x0)) \to (\forall (w: +T).((sn3 c w) \to (sn3 c (THead (Flat Appl) x (THead (Bind Abst) w +x0))))))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) +\to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda +(H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 +c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Bind Abbr) x +x0)) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) x (THead +(Bind Abst) w x0))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: +(eq T t1 (THead (Bind Abbr) x x0))).(\lambda (w: T).(\lambda (H4: (sn3 c +w)).(let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: T).((((eq T t0 +t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (\forall (x1: +T).(\forall (x2: T).((eq T t2 (THead (Bind Abbr) x1 x2)) \to (\forall (w0: +T).((sn3 c w0) \to (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) w0 +x2)))))))))))) H2 (THead (Bind Abbr) x x0) H3) in (let H6 \def (eq_ind T t1 +(\lambda (t0: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) +\to ((pr3 c t0 t2) \to (sn3 c t2))))) H1 (THead (Bind Abbr) x x0) H3) in +(sn3_ind c (\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead (Bind Abst) t0 +x0)))) (\lambda (t2: T).(\lambda (H7: ((\forall (t3: T).((((eq T t2 t3) \to +(\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H8: +((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 +t3) \to (sn3 c (THead (Flat Appl) x (THead (Bind Abst) t3 +x0)))))))).(sn3_pr2_intro c (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) +(\lambda (t3: T).(\lambda (H9: (((eq T (THead (Flat Appl) x (THead (Bind +Abst) t2 x0)) t3) \to (\forall (P: Prop).P)))).(\lambda (H10: (pr2 c (THead +(Flat Appl) x (THead (Bind Abst) t2 x0)) t3)).(let H11 \def (pr2_gen_appl c x +(THead (Bind Abst) t2 x0) t3 H10) in (or3_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c +(THead (Bind Abst) t2 x0) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind Abst) t2 x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) +y2) z1 z2)))))))) (sn3 c t3) (\lambda (H12: (ex3_2 T T (\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c +(THead (Bind Abst) t2 x0) t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind Abst) +t2 x0) t4))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H13: (eq +T t3 (THead (Flat Appl) x1 x2))).(\lambda (H14: (pr2 c x x1)).(\lambda (H15: +(pr2 c (THead (Bind Abst) t2 x0) x2)).(let H16 \def (eq_ind T t3 (\lambda +(t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to +(\forall (P: Prop).P))) H9 (THead (Flat Appl) x1 x2) H13) in (eq_ind_r T +(THead (Flat Appl) x1 x2) (\lambda (t0: T).(sn3 c t0)) (let H17 \def +(pr2_gen_abst c t2 x0 x2 H15) in (ex3_2_ind T T (\lambda (u2: T).(\lambda +(t4: T).(eq T x2 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c t2 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x0 t4))))) (sn3 c (THead (Flat Appl) x1 x2)) +(\lambda (x3: T).(\lambda (x4: T).(\lambda (H18: (eq T x2 (THead (Bind Abst) +x3 x4))).(\lambda (H19: (pr2 c t2 x3)).(\lambda (H20: ((\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 x4))))).(let H21 \def (eq_ind +T x2 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) +(THead (Flat Appl) x1 t0)) \to (\forall (P: Prop).P))) H16 (THead (Bind Abst) +x3 x4) H18) in (eq_ind_r T (THead (Bind Abst) x3 x4) (\lambda (t0: T).(sn3 c +(THead (Flat Appl) x1 t0))) (let H_x \def (term_dec t2 x3) in (let H22 \def +H_x in (or_ind (eq T t2 x3) ((eq T t2 x3) \to (\forall (P: Prop).P)) (sn3 c +(THead (Flat Appl) x1 (THead (Bind Abst) x3 x4))) (\lambda (H23: (eq T t2 +x3)).(let H24 \def (eq_ind_r T x3 (\lambda (t0: T).((eq T (THead (Flat Appl) +x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) x1 (THead (Bind Abst) t0 +x4))) \to (\forall (P: Prop).P))) H21 t2 H23) in (let H25 \def (eq_ind_r T x3 +(\lambda (t0: T).(pr2 c t2 t0)) H19 t2 H23) in (eq_ind T t2 (\lambda (t0: +T).(sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t0 x4)))) (let H_x0 \def +(term_dec x x1) in (let H26 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to +(\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) t2 +x4))) (\lambda (H27: (eq T x x1)).(let H28 \def (eq_ind_r T x1 (\lambda (t0: +T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) (THead (Flat Appl) +t0 (THead (Bind Abst) t2 x4))) \to (\forall (P: Prop).P))) H24 x H27) in (let +H29 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H14 x H27) in (eq_ind +T x (\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 (THead (Bind Abst) t2 +x4)))) (let H_x1 \def (term_dec x0 x4) in (let H30 \def H_x1 in (or_ind (eq T +x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x +(THead (Bind Abst) t2 x4))) (\lambda (H31: (eq T x0 x4)).(let H32 \def +(eq_ind_r T x4 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind +Abst) t2 x0)) (THead (Flat Appl) x (THead (Bind Abst) t2 t0))) \to (\forall +(P: Prop).P))) H28 x0 H31) in (let H33 \def (eq_ind_r T x4 (\lambda (t0: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 +H31) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead +(Bind Abst) t2 t0)))) (H32 (refl_equal T (THead (Flat Appl) x (THead (Bind +Abst) t2 x0))) (sn3 c (THead (Flat Appl) x (THead (Bind Abst) t2 x0)))) x4 +H31)))) (\lambda (H31: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H5 (THead +(Bind Abbr) x x4) (\lambda (H32: (eq T (THead (Bind Abbr) x x0) (THead (Bind +Abbr) x x4))).(\lambda (P: Prop).(let H33 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) +x x4) H32) in (let H34 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to +(\forall (P0: Prop).P0))) H31 x0 H33) in (let H35 \def (eq_ind_r T x4 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 +t0)))) H20 x0 H33) in (H34 (refl_equal T x0) P)))))) (pr3_pr2 c (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x x4) (pr2_head_2 c x x0 x4 (Bind Abbr) (H20 +Abbr x))) x x4 (refl_equal T (THead (Bind Abbr) x x4)) t2 (sn3_sing c t2 +H7))) H30))) x1 H27)))) (\lambda (H27: (((eq T x x1) \to (\forall (P: +Prop).P)))).(H5 (THead (Bind Abbr) x1 x4) (\lambda (H28: (eq T (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x1 x4))).(\lambda (P: Prop).(let H29 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | (TLRef +_) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) +(THead (Bind Abbr) x1 x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) +x1 x4) H28) in (\lambda (H31: (eq T x x1)).(let H32 \def (eq_ind_r T x4 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 +t0)))) H20 x0 H30) in (let H33 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T x +t0) \to (\forall (P0: Prop).P0))) H27 x H31) in (let H34 \def (eq_ind_r T x1 +(\lambda (t0: T).(pr2 c x t0)) H14 x H31) in (H33 (refl_equal T x) P)))))) +H29)))) (pr3_head_12 c x x1 (pr3_pr2 c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 +(CHead c (Bind Abbr) x1) x0 x4 (H20 Abbr x1))) x1 x4 (refl_equal T (THead +(Bind Abbr) x1 x4)) t2 (sn3_sing c t2 H7))) H26))) x3 H23)))) (\lambda (H23: +(((eq T t2 x3) \to (\forall (P: Prop).P)))).(let H_x0 \def (term_dec x x1) in +(let H24 \def H_x0 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: +Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind Abst) x3 x4))) (\lambda +(H25: (eq T x x1)).(let H26 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x +t0)) H14 x H25) in (eq_ind T x (\lambda (t0: T).(sn3 c (THead (Flat Appl) t0 +(THead (Bind Abst) x3 x4)))) (let H_x1 \def (term_dec x0 x4) in (let H27 \def +H_x1 in (or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c +(THead (Flat Appl) x (THead (Bind Abst) x3 x4))) (\lambda (H28: (eq T x0 +x4)).(let H29 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H28) in (eq_ind T x0 +(\lambda (t0: T).(sn3 c (THead (Flat Appl) x (THead (Bind Abst) x3 t0)))) (H8 +x3 H23 (pr3_pr2 c t2 x3 H19)) x4 H28))) (\lambda (H28: (((eq T x0 x4) \to +(\forall (P: Prop).P)))).(H5 (THead (Bind Abbr) x x4) (\lambda (H29: (eq T +(THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4))).(\lambda (P: Prop).(let +H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 +| (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x x4) H29) in (let H31 \def (eq_ind_r T x4 +(\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H28 x0 H30) in +(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: +T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H30) in (H31 (refl_equal T x0) +P)))))) (pr3_pr2 c (THead (Bind Abbr) x x0) (THead (Bind Abbr) x x4) +(pr2_head_2 c x x0 x4 (Bind Abbr) (H20 Abbr x))) x x4 (refl_equal T (THead +(Bind Abbr) x x4)) x3 (H7 x3 H23 (pr3_pr2 c t2 x3 H19)))) H27))) x1 H25))) +(\lambda (H25: (((eq T x x1) \to (\forall (P: Prop).P)))).(H5 (THead (Bind +Abbr) x1 x4) (\lambda (H26: (eq T (THead (Bind Abbr) x x0) (THead (Bind Abbr) +x1 x4))).(\lambda (P: Prop).(let H27 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t0 _) +\Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) x1 x4) H26) in +((let H28 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) +(THead (Bind Abbr) x x0) (THead (Bind Abbr) x1 x4) H26) in (\lambda (H29: (eq +T x x1)).(let H30 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 t0)))) H20 x0 H28) in (let +H31 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: +Prop).P0))) H25 x H29) in (let H32 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 +c x t0)) H14 x H29) in (H31 (refl_equal T x) P)))))) H27)))) (pr3_head_12 c x +x1 (pr3_pr2 c x x1 H14) (Bind Abbr) x0 x4 (pr3_pr2 (CHead c (Bind Abbr) x1) +x0 x4 (H20 Abbr x1))) x1 x4 (refl_equal T (THead (Bind Abbr) x1 x4)) x3 (H7 +x3 H23 (pr3_pr2 c t2 x3 H19)))) H24)))) H22))) x2 H18))))))) H17)) t3 +H13))))))) H12)) (\lambda (H12: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Bind Abst) t2 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (H13: (eq T (THead (Bind Abst) t2 x0) (THead +(Bind Abst) x1 x2))).(\lambda (H14: (eq T t3 (THead (Bind Abbr) x3 +x4))).(\lambda (H15: (pr2 c x x3)).(\lambda (H16: ((\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H17 \def (eq_ind T t3 +(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) +\to (\forall (P: Prop).P))) H9 (THead (Bind Abbr) x3 x4) H14) in (eq_ind_r T +(THead (Bind Abbr) x3 x4) (\lambda (t0: T).(sn3 c t0)) (let H18 \def (f_equal +T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t2 | (TLRef _) +\Rightarrow t2 | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abst) t2 x0) +(THead (Bind Abst) x1 x2) H13) in ((let H19 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) t2 x0) (THead (Bind Abst) +x1 x2) H13) in (\lambda (_: (eq T t2 x1)).(let H21 \def (eq_ind_r T x2 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t0 +x4)))) H16 x0 H19) in (let H_x \def (term_dec x x3) in (let H22 \def H_x in +(or_ind (eq T x x3) ((eq T x x3) \to (\forall (P: Prop).P)) (sn3 c (THead +(Bind Abbr) x3 x4)) (\lambda (H23: (eq T x x3)).(let H24 \def (eq_ind_r T x3 +(\lambda (t0: T).(pr2 c x t0)) H15 x H23) in (eq_ind T x (\lambda (t0: +T).(sn3 c (THead (Bind Abbr) t0 x4))) (let H_x0 \def (term_dec x0 x4) in (let +H25 \def H_x0 in (or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: +Prop).P)) (sn3 c (THead (Bind Abbr) x x4)) (\lambda (H26: (eq T x0 x4)).(let +H27 \def (eq_ind_r T x4 (\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 +(CHead c (Bind b) u) x0 t0)))) H21 x0 H26) in (eq_ind T x0 (\lambda (t0: +T).(sn3 c (THead (Bind Abbr) x t0))) (sn3_sing c (THead (Bind Abbr) x x0) H6) +x4 H26))) (\lambda (H26: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H6 +(THead (Bind Abbr) x x4) (\lambda (H27: (eq T (THead (Bind Abbr) x x0) (THead +(Bind Abbr) x x4))).(\lambda (P: Prop).(let H28 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) +x x4) H27) in (let H29 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to +(\forall (P0: Prop).P0))) H26 x0 H28) in (let H30 \def (eq_ind_r T x4 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 +t0)))) H21 x0 H28) in (H29 (refl_equal T x0) P)))))) (pr3_pr2 c (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x x4) (pr2_head_2 c x x0 x4 (Bind Abbr) (H21 +Abbr x))))) H25))) x3 H23))) (\lambda (H23: (((eq T x x3) \to (\forall (P: +Prop).P)))).(H6 (THead (Bind Abbr) x3 x4) (\lambda (H24: (eq T (THead (Bind +Abbr) x x0) (THead (Bind Abbr) x3 x4))).(\lambda (P: Prop).(let H25 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | (TLRef +_) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind Abbr) x x0) +(THead (Bind Abbr) x3 x4) H24) in ((let H26 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | +(THead _ _ t0) \Rightarrow t0])) (THead (Bind Abbr) x x0) (THead (Bind Abbr) +x3 x4) H24) in (\lambda (H27: (eq T x x3)).(let H28 \def (eq_ind_r T x4 +(\lambda (t0: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x0 +t0)))) H21 x0 H26) in (let H29 \def (eq_ind_r T x3 (\lambda (t0: T).((eq T x +t0) \to (\forall (P0: Prop).P0))) H23 x H27) in (let H30 \def (eq_ind_r T x3 +(\lambda (t0: T).(pr2 c x t0)) H15 x H27) in (H29 (refl_equal T x) P)))))) +H25)))) (pr3_head_12 c x x3 (pr3_pr2 c x x3 H15) (Bind Abbr) x0 x4 (pr3_pr2 +(CHead c (Bind Abbr) x3) x0 x4 (H21 Abbr x3))))) H22)))))) H18)) t3 +H14)))))))))) H12)) (\lambda (H12: (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +Abst) t2 x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) t2 x0) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) +(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda +(x5: T).(\lambda (x6: T).(\lambda (H13: (not (eq B x1 Abst))).(\lambda (H14: +(eq T (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3))).(\lambda (H15: (eq +T t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda +(_: (pr2 c x x5)).(\lambda (H17: (pr2 c x2 x6)).(\lambda (H18: (pr2 (CHead c +(Bind x1) x6) x3 x4)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T +(THead (Flat Appl) x (THead (Bind Abst) t2 x0)) t0) \to (\forall (P: +Prop).P))) H9 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) +H15) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) +x4)) (\lambda (t0: T).(sn3 c t0)) (let H20 \def (f_equal T B (\lambda (e: +T).(match e with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | +(THead k _ _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abst])])) (THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) +in ((let H21 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ t0 _) \Rightarrow t0])) +(THead (Bind Abst) t2 x0) (THead (Bind x1) x2 x3) H14) in ((let H22 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef +_) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind Abst) t2 +x0) (THead (Bind x1) x2 x3) H14) in (\lambda (H23: (eq T t2 x2)).(\lambda +(H24: (eq B Abst x1)).(let H25 \def (eq_ind_r T x3 (\lambda (t0: T).(pr2 +(CHead c (Bind x1) x6) t0 x4)) H18 x0 H22) in (let H26 \def (eq_ind_r T x2 +(\lambda (t0: T).(pr2 c t0 x6)) H17 t2 H23) in (let H27 \def (eq_ind_r B x1 +(\lambda (b: B).(pr2 (CHead c (Bind b) x6) x0 x4)) H25 Abst H24) in (let H28 +\def (eq_ind_r B x1 (\lambda (b: B).(not (eq B b Abst))) H13 Abst H24) in +(eq_ind B Abst (\lambda (b: B).(sn3 c (THead (Bind b) x6 (THead (Flat Appl) +(lift (S O) O x5) x4)))) (let H29 \def (match (H28 (refl_equal B Abst)) in +False with []) in H29) x1 H24)))))))) H21)) H20)) t3 H15)))))))))))))) H12)) +H11))))))))) w H4))))))))))) y H0))))) H)))). + +lemma sn3_appl_lref: + \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (v: +T).((sn3 c v) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))) +\def + \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda +(v: T).(\lambda (H0: (sn3 c v)).(sn3_ind c (\lambda (t: T).(sn3 c (THead +(Flat Appl) t (TLRef i)))) (\lambda (t1: T).(\lambda (_: ((\forall (t2: +T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c +t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c (THead (Flat Appl) t2 (TLRef +i)))))))).(sn3_pr2_intro c (THead (Flat Appl) t1 (TLRef i)) (\lambda (t2: +T).(\lambda (H3: (((eq T (THead (Flat Appl) t1 (TLRef i)) t2) \to (\forall +(P: Prop).P)))).(\lambda (H4: (pr2 c (THead (Flat Appl) t1 (TLRef i)) +t2)).(let H5 \def (pr2_gen_appl c t1 (TLRef i) t2 H4) in (or3_ind (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 +z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall +(u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda +(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T +(TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) +(sn3 c t2) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))))).(ex3_2_ind T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda +(t3: T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H7: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr2 c t1 +x0)).(\lambda (H9: (pr2 c (TLRef i) x1)).(let H10 \def (eq_ind T t2 (\lambda +(t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) +H3 (THead (Flat Appl) x0 x1) H7) in (eq_ind_r T (THead (Flat Appl) x0 x1) +(\lambda (t: T).(sn3 c t)) (let H11 \def (eq_ind_r T x1 (\lambda (t: T).((eq +T (THead (Flat Appl) t1 (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: +Prop).P))) H10 (TLRef i) (H x1 H9)) in (let H12 \def (eq_ind_r T x1 (\lambda +(t: T).(pr2 c (TLRef i) t)) H9 (TLRef i) (H x1 H9)) in (eq_ind T (TLRef i) +(\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H_x \def (term_dec t1 +x0) in (let H13 \def H_x in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall +(P: Prop).P)) (sn3 c (THead (Flat Appl) x0 (TLRef i))) (\lambda (H14: (eq T +t1 x0)).(let H15 \def (eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat +Appl) t1 (TLRef i)) (THead (Flat Appl) t (TLRef i))) \to (\forall (P: +Prop).P))) H11 t1 H14) in (let H16 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c +t1 t)) H8 t1 H14) in (eq_ind T t1 (\lambda (t: T).(sn3 c (THead (Flat Appl) t +(TLRef i)))) (H15 (refl_equal T (THead (Flat Appl) t1 (TLRef i))) (sn3 c +(THead (Flat Appl) t1 (TLRef i)))) x0 H14)))) (\lambda (H14: (((eq T t1 x0) +\to (\forall (P: Prop).P)))).(H2 x0 H14 (pr3_pr2 c t1 x0 H8))) H13))) x1 (H +x1 H9)))) t2 H7))))))) H6)) (\lambda (H6: (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))))).(ex4_4_ind T +T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) +(sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H7: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H8: +(eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c t1 x2)).(\lambda (_: +((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let +H11 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) +t) \to (\forall (P: Prop).P))) H3 (THead (Bind Abbr) x2 x3) H8) in (eq_ind_r +T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) (let H12 \def (eq_ind +T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead +(Bind Abst) x0 x1) H7) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H12)) +t2 H8)))))))))) H6)) (\lambda (H6: (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq +T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) +(sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 +Abst))).(\lambda (H8: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda (H9: +(eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) +x3)))).(\lambda (_: (pr2 c t1 x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: +(pr2 (CHead c (Bind x0) x5) x2 x3)).(let H13 \def (eq_ind T t2 (\lambda (t: +T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H9) in +(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) +(\lambda (t: T).(sn3 c t)) (let H14 \def (eq_ind T (TLRef i) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H8) in +(False_ind (sn3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) +x3))) H14)) t2 H9)))))))))))))) H6)) H5))))))))) v H0))))). + +lemma sn3_appl_abbr: + \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) w)) \to (\forall (v: T).((sn3 c (THead (Flat Appl) v +(lift (S i) O w))) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (v: T).(\lambda (H0: (sn3 c +(THead (Flat Appl) v (lift (S i) O w)))).(insert_eq T (THead (Flat Appl) v +(lift (S i) O w)) (\lambda (t: T).(sn3 c t)) (\lambda (_: T).(sn3 c (THead +(Flat Appl) v (TLRef i)))) (\lambda (y: T).(\lambda (H1: (sn3 c y)).(unintro +T v (\lambda (t: T).((eq T y (THead (Flat Appl) t (lift (S i) O w))) \to (sn3 +c (THead (Flat Appl) t (TLRef i))))) (sn3_ind c (\lambda (t: T).(\forall (x: +T).((eq T t (THead (Flat Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat +Appl) x (TLRef i)))))) (\lambda (t1: T).(\lambda (H2: ((\forall (t2: +T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c +t2)))))).(\lambda (H3: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).((eq T t2 (THead (Flat +Appl) x (lift (S i) O w))) \to (sn3 c (THead (Flat Appl) x (TLRef +i)))))))))).(\lambda (x: T).(\lambda (H4: (eq T t1 (THead (Flat Appl) x (lift +(S i) O w)))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: +T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall +(x0: T).((eq T t2 (THead (Flat Appl) x0 (lift (S i) O w))) \to (sn3 c (THead +(Flat Appl) x0 (TLRef i))))))))) H3 (THead (Flat Appl) x (lift (S i) O w)) +H4) in (let H6 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t +t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H2 +(THead (Flat Appl) x (lift (S i) O w)) H4) in (sn3_pr2_intro c (THead (Flat +Appl) x (TLRef i)) (\lambda (t2: T).(\lambda (H7: (((eq T (THead (Flat Appl) +x (TLRef i)) t2) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr2 c (THead +(Flat Appl) x (TLRef i)) t2)).(let H9 \def (pr2_gen_appl c x (TLRef i) t2 H8) +in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq +T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) +(sn3 c t2) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T +t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))))).(ex3_2_ind T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: +T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (pr2 c +x x0)).(\lambda (H13: (pr2 c (TLRef i) x1)).(let H14 \def (eq_ind T t2 +(\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: +Prop).P))) H7 (THead (Flat Appl) x0 x1) H11) in (eq_ind_r T (THead (Flat +Appl) x0 x1) (\lambda (t: T).(sn3 c t)) (let H15 \def (pr2_gen_lref c x1 i +H13) in (or_ind (eq T x1 (TLRef i)) (ex2_2 C T (\lambda (d0: C).(\lambda (u: +T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq +T x1 (lift (S i) O u))))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda (H16: +(eq T x1 (TLRef i))).(let H17 \def (eq_ind T x1 (\lambda (t: T).((eq T (THead +(Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: +Prop).P))) H14 (TLRef i) H16) in (eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c +(THead (Flat Appl) x0 t))) (let H_x \def (term_dec x x0) in (let H18 \def H_x +in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c (THead +(Flat Appl) x0 (TLRef i))) (\lambda (H19: (eq T x x0)).(let H20 \def +(eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) (THead +(Flat Appl) t (TLRef i))) \to (\forall (P: Prop).P))) H17 x H19) in (let H21 +\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H19) in (eq_ind T x +(\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (H20 (refl_equal T +(THead (Flat Appl) x (TLRef i))) (sn3 c (THead (Flat Appl) x (TLRef i)))) x0 +H19)))) (\lambda (H19: (((eq T x x0) \to (\forall (P: Prop).P)))).(H5 (THead +(Flat Appl) x0 (lift (S i) O w)) (\lambda (H20: (eq T (THead (Flat Appl) x +(lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)))).(\lambda (P: +Prop).(let H21 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) +(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O +w)) H20) in (let H22 \def (eq_ind_r T x0 (\lambda (t: T).((eq T x t) \to +(\forall (P0: Prop).P0))) H19 x H21) in (let H23 \def (eq_ind_r T x0 (\lambda +(t: T).(pr2 c x t)) H12 x H21) in (H22 (refl_equal T x) P)))))) (pr3_pr2 c +(THead (Flat Appl) x (lift (S i) O w)) (THead (Flat Appl) x0 (lift (S i) O +w)) (pr2_head_1 c x x0 H12 (Flat Appl) (lift (S i) O w))) x0 (refl_equal T +(THead (Flat Appl) x0 (lift (S i) O w))))) H18))) x1 H16))) (\lambda (H16: +(ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) +u)))) (\lambda (_: C).(\lambda (u: T).(eq T x1 (lift (S i) O +u)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 +(Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x1 (lift (S i) O +u)))) (sn3 c (THead (Flat Appl) x0 x1)) (\lambda (x2: C).(\lambda (x3: +T).(\lambda (H17: (getl i c (CHead x2 (Bind Abbr) x3))).(\lambda (H18: (eq T +x1 (lift (S i) O x3))).(let H19 \def (eq_ind T x1 (\lambda (t: T).((eq T +(THead (Flat Appl) x (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: +Prop).P))) H14 (lift (S i) O x3) H18) in (eq_ind_r T (lift (S i) O x3) +(\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H20 \def (eq_ind C +(CHead d (Bind Abbr) w) (\lambda (c0: C).(getl i c c0)) H (CHead x2 (Bind +Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 (Bind Abbr) x3) +H17)) in (let H21 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) w) +(CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H (CHead x2 +(Bind Abbr) x3) H17)) in ((let H22 \def (f_equal C T (\lambda (e: C).(match e +with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind +Abbr) w) (CHead x2 (Bind Abbr) x3) (getl_mono c (CHead d (Bind Abbr) w) i H +(CHead x2 (Bind Abbr) x3) H17)) in (\lambda (H23: (eq C d x2)).(let H24 \def +(eq_ind_r T x3 (\lambda (t: T).(getl i c (CHead x2 (Bind Abbr) t))) H20 w +H22) in (eq_ind T w (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 (lift (S i) +O t)))) (let H25 \def (eq_ind_r C x2 (\lambda (c0: C).(getl i c (CHead c0 +(Bind Abbr) w))) H24 d H23) in (let H_x \def (term_dec x x0) in (let H26 \def +H_x in (or_ind (eq T x x0) ((eq T x x0) \to (\forall (P: Prop).P)) (sn3 c +(THead (Flat Appl) x0 (lift (S i) O w))) (\lambda (H27: (eq T x x0)).(let H28 +\def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x H27) in (eq_ind T x +(\lambda (t: T).(sn3 c (THead (Flat Appl) t (lift (S i) O w)))) (sn3_sing c +(THead (Flat Appl) x (lift (S i) O w)) H6) x0 H27))) (\lambda (H27: (((eq T x +x0) \to (\forall (P: Prop).P)))).(H6 (THead (Flat Appl) x0 (lift (S i) O w)) +(\lambda (H28: (eq T (THead (Flat Appl) x (lift (S i) O w)) (THead (Flat +Appl) x0 (lift (S i) O w)))).(\lambda (P: Prop).(let H29 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow x | (TLRef _) +\Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x (lift (S +i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)) H28) in (let H30 \def +(eq_ind_r T x0 (\lambda (t: T).((eq T x t) \to (\forall (P0: Prop).P0))) H27 +x H29) in (let H31 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c x t)) H12 x +H29) in (H30 (refl_equal T x) P)))))) (pr3_pr2 c (THead (Flat Appl) x (lift +(S i) O w)) (THead (Flat Appl) x0 (lift (S i) O w)) (pr2_head_1 c x x0 H12 +(Flat Appl) (lift (S i) O w))))) H26)))) x3 H22)))) H21))) x1 H18)))))) H16)) +H15)) t2 H11))))))) H10)) (\lambda (H10: (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))))).(ex4_4_ind T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: +T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) +(sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H11: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H12: +(eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c x x2)).(\lambda (_: +((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let +H15 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (TLRef i)) +t) \to (\forall (P: Prop).P))) H7 (THead (Bind Abbr) x2 x3) H12) in (eq_ind_r +T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) (let H16 \def (eq_ind +T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead +(Bind Abst) x0 x1) H11) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H16)) +t2 H12)))))))))) H10)) (\lambda (H10: (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind +B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda +(_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq +T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) +(sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 +Abst))).(\lambda (H12: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda +(H13: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) +x3)))).(\lambda (_: (pr2 c x x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: +(pr2 (CHead c (Bind x0) x5) x2 x3)).(let H17 \def (eq_ind T t2 (\lambda (t: +T).((eq T (THead (Flat Appl) x (TLRef i)) t) \to (\forall (P: Prop).P))) H7 +(THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H13) in +(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) +(\lambda (t: T).(sn3 c t)) (let H18 \def (eq_ind T (TLRef i) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H12) in +(False_ind (sn3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) +x3))) H18)) t2 H13)))))))))))))) H10)) H9))))))))))))) y H1)))) H0))))))). + +theorem sn3_appl_cast: + \forall (c: C).(\forall (v: T).(\forall (u: T).((sn3 c (THead (Flat Appl) v +u)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) v t)) \to (sn3 c (THead +(Flat Appl) v (THead (Flat Cast) u t)))))))) +\def + \lambda (c: C).(\lambda (v: T).(\lambda (u: T).(\lambda (H: (sn3 c (THead +(Flat Appl) v u))).(insert_eq T (THead (Flat Appl) v u) (\lambda (t: T).(sn3 +c t)) (\lambda (_: T).(\forall (t0: T).((sn3 c (THead (Flat Appl) v t0)) \to +(sn3 c (THead (Flat Appl) v (THead (Flat Cast) u t0)))))) (\lambda (y: +T).(\lambda (H0: (sn3 c y)).(unintro T u (\lambda (t: T).((eq T y (THead +(Flat Appl) v t)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) v t0)) \to +(sn3 c (THead (Flat Appl) v (THead (Flat Cast) t t0))))))) (unintro T v +(\lambda (t: T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to +(\forall (t0: T).((sn3 c (THead (Flat Appl) t t0)) \to (sn3 c (THead (Flat +Appl) t (THead (Flat Cast) x t0)))))))) (sn3_ind c (\lambda (t: T).(\forall +(x: T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (t0: +T).((sn3 c (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead +(Flat Cast) x0 t0))))))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: +T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c +t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 +(THead (Flat Appl) x x0)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) x +t)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 +t))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 (THead +(Flat Appl) x x0))).(\lambda (t: T).(\lambda (H4: (sn3 c (THead (Flat Appl) x +t))).(insert_eq T (THead (Flat Appl) x t) (\lambda (t0: T).(sn3 c t0)) +(\lambda (_: T).(sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t)))) +(\lambda (y0: T).(\lambda (H5: (sn3 c y0)).(unintro T t (\lambda (t0: T).((eq +T y0 (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat +Cast) x0 t0))))) (sn3_ind c (\lambda (t0: T).(\forall (x1: T).((eq T t0 +(THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) +x0 x1)))))) (\lambda (t0: T).(\lambda (H6: ((\forall (t2: T).((((eq T t0 t2) +\to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2)))))).(\lambda +(H7: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 +c t0 t2) \to (\forall (x1: T).((eq T t2 (THead (Flat Appl) x x1)) \to (sn3 c +(THead (Flat Appl) x (THead (Flat Cast) x0 x1)))))))))).(\lambda (x1: +T).(\lambda (H8: (eq T t0 (THead (Flat Appl) x x1))).(let H9 \def (eq_ind T +t0 (\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x2: T).((eq T t3 (THead (Flat +Appl) x x2)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 +x2))))))))) H7 (THead (Flat Appl) x x1) H8) in (let H10 \def (eq_ind T t0 +(\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) +\to ((pr3 c t2 t3) \to (sn3 c t3))))) H6 (THead (Flat Appl) x x1) H8) in (let +H11 \def (eq_ind T t1 (\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to +(\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x2: T).(\forall (x3: +T).((eq T t3 (THead (Flat Appl) x2 x3)) \to (\forall (t4: T).((sn3 c (THead +(Flat Appl) x2 t4)) \to (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x3 +t4)))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H12 \def (eq_ind T t1 +(\lambda (t2: T).(\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) +\to ((pr3 c t2 t3) \to (sn3 c t3))))) H1 (THead (Flat Appl) x x0) H3) in +(sn3_pr2_intro c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (\lambda +(t2: T).(\lambda (H13: (((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 +x1)) t2) \to (\forall (P: Prop).P)))).(\lambda (H14: (pr2 c (THead (Flat +Appl) x (THead (Flat Cast) x0 x1)) t2)).(let H15 \def (pr2_gen_appl c x +(THead (Flat Cast) x0 x1) t2 H14) in (or3_ind (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c +(THead (Flat Cast) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: +B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T +T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq +T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) +y2) z1 z2)))))))) (sn3 c t2) (\lambda (H16: (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c +(THead (Flat Cast) x0 x1) t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Flat Cast) +x0 x1) t3))) (sn3 c t2) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H17: (eq +T t2 (THead (Flat Appl) x2 x3))).(\lambda (H18: (pr2 c x x2)).(\lambda (H19: +(pr2 c (THead (Flat Cast) x0 x1) x3)).(let H20 \def (eq_ind T t2 (\lambda +(t3: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t3) \to +(\forall (P: Prop).P))) H13 (THead (Flat Appl) x2 x3) H17) in (eq_ind_r T +(THead (Flat Appl) x2 x3) (\lambda (t3: T).(sn3 c t3)) (let H21 \def +(pr2_gen_cast c x0 x1 x3 H19) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3)))) (pr2 c +x1 x3) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (H22: (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x3 (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) +(\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3))) (sn3 c (THead (Flat Appl) x2 +x3)) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H23: (eq T x3 (THead (Flat +Cast) x4 x5))).(\lambda (H24: (pr2 c x0 x4)).(\lambda (H25: (pr2 c x1 +x5)).(let H26 \def (eq_ind T x3 (\lambda (t3: T).((eq T (THead (Flat Appl) x +(THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t3)) \to (\forall (P: +Prop).P))) H20 (THead (Flat Cast) x4 x5) H23) in (eq_ind_r T (THead (Flat +Cast) x4 x5) (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 t3))) (let H_x +\def (term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) in (let +H27 \def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 +x4)) ((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall +(P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 x5))) +(\lambda (H28: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 +x4))).(let H29 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t3 _) \Rightarrow t3])) +(THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4) H28) in ((let H30 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef +_) \Rightarrow x0 | (THead _ _ t3) \Rightarrow t3])) (THead (Flat Appl) x x0) +(THead (Flat Appl) x2 x4) H28) in (\lambda (H31: (eq T x x2)).(let H32 \def +(eq_ind_r T x4 (\lambda (t3: T).((eq T (THead (Flat Appl) x (THead (Flat +Cast) x0 x1)) (THead (Flat Appl) x2 (THead (Flat Cast) t3 x5))) \to (\forall +(P: Prop).P))) H26 x0 H30) in (let H33 \def (eq_ind_r T x4 (\lambda (t3: +T).(pr2 c x0 t3)) H24 x0 H30) in (eq_ind T x0 (\lambda (t3: T).(sn3 c (THead +(Flat Appl) x2 (THead (Flat Cast) t3 x5)))) (let H34 \def (eq_ind_r T x2 +(\lambda (t3: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) +(THead (Flat Appl) t3 (THead (Flat Cast) x0 x5))) \to (\forall (P: Prop).P))) +H32 x H31) in (let H35 \def (eq_ind_r T x2 (\lambda (t3: T).(pr2 c x t3)) H18 +x H31) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 (THead +(Flat Cast) x0 x5)))) (let H_x0 \def (term_dec (THead (Flat Appl) x x1) +(THead (Flat Appl) x x5)) in (let H36 \def H_x0 in (or_ind (eq T (THead (Flat +Appl) x x1) (THead (Flat Appl) x x5)) ((eq T (THead (Flat Appl) x x1) (THead +(Flat Appl) x x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x +(THead (Flat Cast) x0 x5))) (\lambda (H37: (eq T (THead (Flat Appl) x x1) +(THead (Flat Appl) x x5))).(let H38 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t3) +\Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x x5) H37) in +(let H39 \def (eq_ind_r T x5 (\lambda (t3: T).((eq T (THead (Flat Appl) x +(THead (Flat Cast) x0 x1)) (THead (Flat Appl) x (THead (Flat Cast) x0 t3))) +\to (\forall (P: Prop).P))) H34 x1 H38) in (let H40 \def (eq_ind_r T x5 +(\lambda (t3: T).(pr2 c x1 t3)) H25 x1 H38) in (eq_ind T x1 (\lambda (t3: +T).(sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t3)))) (H39 (refl_equal +T (THead (Flat Appl) x (THead (Flat Cast) x0 x1))) (sn3 c (THead (Flat Appl) +x (THead (Flat Cast) x0 x1)))) x5 H38))))) (\lambda (H37: (((eq T (THead +(Flat Appl) x x1) (THead (Flat Appl) x x5)) \to (\forall (P: Prop).P)))).(H9 +(THead (Flat Appl) x x5) H37 (pr3_pr2 c (THead (Flat Appl) x x1) (THead (Flat +Appl) x x5) (pr2_thin_dx c x1 x5 H25 x Appl)) x5 (refl_equal T (THead (Flat +Appl) x x5)))) H36))) x2 H31))) x4 H30))))) H29))) (\lambda (H28: (((eq T +(THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall (P: +Prop).P)))).(let H_x0 \def (term_dec (THead (Flat Appl) x x1) (THead (Flat +Appl) x2 x5)) in (let H29 \def H_x0 in (or_ind (eq T (THead (Flat Appl) x x1) +(THead (Flat Appl) x2 x5)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) +x2 x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat +Cast) x4 x5))) (\lambda (H30: (eq T (THead (Flat Appl) x x1) (THead (Flat +Appl) x2 x5))).(let H31 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t3 _) +\Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in +((let H32 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t3) \Rightarrow t3])) +(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in (\lambda (H33: (eq +T x x2)).(let H34 \def (eq_ind_r T x5 (\lambda (t3: T).(pr2 c x1 t3)) H25 x1 +H32) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 (THead +(Flat Cast) x4 t3)))) (let H35 \def (eq_ind_r T x2 (\lambda (t3: T).((eq T +(THead (Flat Appl) x x0) (THead (Flat Appl) t3 x4)) \to (\forall (P: +Prop).P))) H28 x H33) in (let H36 \def (eq_ind_r T x2 (\lambda (t3: T).(pr2 c +x t3)) H18 x H33) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) +t3 (THead (Flat Cast) x4 x1)))) (H11 (THead (Flat Appl) x x4) H35 (pr3_pr2 c +(THead (Flat Appl) x x0) (THead (Flat Appl) x x4) (pr2_thin_dx c x0 x4 H24 x +Appl)) x x4 (refl_equal T (THead (Flat Appl) x x4)) x1 (sn3_sing c (THead +(Flat Appl) x x1) H10)) x2 H33))) x5 H32)))) H31))) (\lambda (H30: (((eq T +(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) \to (\forall (P: +Prop).P)))).(H11 (THead (Flat Appl) x2 x4) H28 (pr3_flat c x x2 (pr3_pr2 c x +x2 H18) x0 x4 (pr3_pr2 c x0 x4 H24) Appl) x2 x4 (refl_equal T (THead (Flat +Appl) x2 x4)) x5 (H10 (THead (Flat Appl) x2 x5) H30 (pr3_flat c x x2 (pr3_pr2 +c x x2 H18) x1 x5 (pr3_pr2 c x1 x5 H25) Appl)))) H29)))) H27))) x3 H23))))))) +H22)) (\lambda (H22: (pr2 c x1 x3)).(let H_x \def (term_dec (THead (Flat +Appl) x x1) (THead (Flat Appl) x2 x3)) in (let H23 \def H_x in (or_ind (eq T +(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) ((eq T (THead (Flat Appl) +x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)) (sn3 c (THead +(Flat Appl) x2 x3)) (\lambda (H24: (eq T (THead (Flat Appl) x x1) (THead +(Flat Appl) x2 x3))).(let H25 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t3 _) +\Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in +((let H26 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t3) \Rightarrow t3])) +(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in (\lambda (H27: (eq +T x x2)).(let H28 \def (eq_ind_r T x3 (\lambda (t3: T).(pr2 c x1 t3)) H22 x1 +H26) in (let H29 \def (eq_ind_r T x3 (\lambda (t3: T).((eq T (THead (Flat +Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t3)) \to (\forall +(P: Prop).P))) H20 x1 H26) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead +(Flat Appl) x2 t3))) (let H30 \def (eq_ind_r T x2 (\lambda (t3: T).((eq T +(THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) t3 x1)) +\to (\forall (P: Prop).P))) H29 x H27) in (let H31 \def (eq_ind_r T x2 +(\lambda (t3: T).(pr2 c x t3)) H18 x H27) in (eq_ind T x (\lambda (t3: +T).(sn3 c (THead (Flat Appl) t3 x1))) (sn3_sing c (THead (Flat Appl) x x1) +H10) x2 H27))) x3 H26))))) H25))) (\lambda (H24: (((eq T (THead (Flat Appl) x +x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)))).(H10 (THead (Flat +Appl) x2 x3) H24 (pr3_flat c x x2 (pr3_pr2 c x x2 H18) x1 x3 (pr3_pr2 c x1 x3 +H22) Appl))) H23)))) H21)) t2 H17))))))) H16)) (\lambda (H16: (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) +u0) z1 t3))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: +B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) (sn3 c t2) +(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda +(H17: (eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) x2 x3))).(\lambda +(H18: (eq T t2 (THead (Bind Abbr) x4 x5))).(\lambda (_: (pr2 c x +x4)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) +u0) x3 x5))))).(let H21 \def (eq_ind T t2 (\lambda (t3: T).((eq T (THead +(Flat Appl) x (THead (Flat Cast) x0 x1)) t3) \to (\forall (P: Prop).P))) H13 +(THead (Bind Abbr) x4 x5) H18) in (eq_ind_r T (THead (Bind Abbr) x4 x5) +(\lambda (t3: T).(sn3 c t3)) (let H22 \def (eq_ind T (THead (Flat Cast) x0 +x1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x2 +x3) H17) in (False_ind (sn3 c (THead (Bind Abbr) x4 x5)) H22)) t2 +H18)))))))))) H16)) (\lambda (H16: (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat +Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t2) +(\lambda (x2: B).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda +(x6: T).(\lambda (x7: T).(\lambda (_: (not (eq B x2 Abst))).(\lambda (H18: +(eq T (THead (Flat Cast) x0 x1) (THead (Bind x2) x3 x4))).(\lambda (H19: (eq +T t2 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)))).(\lambda +(_: (pr2 c x x6)).(\lambda (_: (pr2 c x3 x7)).(\lambda (_: (pr2 (CHead c +(Bind x2) x7) x4 x5)).(let H23 \def (eq_ind T t2 (\lambda (t3: T).((eq T +(THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t3) \to (\forall (P: +Prop).P))) H13 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) +H19) in (eq_ind_r T (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) +x5)) (\lambda (t3: T).(sn3 c t3)) (let H24 \def (eq_ind T (THead (Flat Cast) +x0 x1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef +_) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x2) x3 x4) +H18) in (False_ind (sn3 c (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) +O x6) x5))) H24)) t2 H19)))))))))))))) H16)) H15))))))))))))))) y0 H5)))) +H4))))))))) y H0))))) H)))). + +theorem sn3_appl_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: +T).((sn3 c u) \to (\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) u) +(THead (Flat Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v +(THead (Bind b) u t)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda +(u: T).(\lambda (H0: (sn3 c u)).(sn3_ind c (\lambda (t: T).(\forall (t0: +T).(\forall (v: T).((sn3 (CHead c (Bind b) t) (THead (Flat Appl) (lift (S O) +O v) t0)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t t0))))))) +(\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(\forall (t: T).(\forall (v: T).((sn3 (CHead c (Bind b) t2) (THead (Flat +Appl) (lift (S O) O v) t)) \to (sn3 c (THead (Flat Appl) v (THead (Bind b) t2 +t))))))))))).(\lambda (t: T).(\lambda (v: T).(\lambda (H3: (sn3 (CHead c +(Bind b) t1) (THead (Flat Appl) (lift (S O) O v) t))).(insert_eq T (THead +(Flat Appl) (lift (S O) O v) t) (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) +t0)) (\lambda (_: T).(sn3 c (THead (Flat Appl) v (THead (Bind b) t1 t)))) +(\lambda (y: T).(\lambda (H4: (sn3 (CHead c (Bind b) t1) y)).(unintro T t +(\lambda (t0: T).((eq T y (THead (Flat Appl) (lift (S O) O v) t0)) \to (sn3 c +(THead (Flat Appl) v (THead (Bind b) t1 t0))))) (unintro T v (\lambda (t0: +T).(\forall (x: T).((eq T y (THead (Flat Appl) (lift (S O) O t0) x)) \to (sn3 +c (THead (Flat Appl) t0 (THead (Bind b) t1 x)))))) (sn3_ind (CHead c (Bind b) +t1) (\lambda (t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Flat +Appl) (lift (S O) O x) x0)) \to (sn3 c (THead (Flat Appl) x (THead (Bind b) +t1 x0))))))) (\lambda (t2: T).(\lambda (H5: ((\forall (t3: T).((((eq T t2 t3) +\to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 +(CHead c (Bind b) t1) t3)))))).(\lambda (H6: ((\forall (t3: T).((((eq T t2 +t3) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to +(\forall (x: T).(\forall (x0: T).((eq T t3 (THead (Flat Appl) (lift (S O) O +x) x0)) \to (sn3 c (THead (Flat Appl) x (THead (Bind b) t1 +x0))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H7: (eq T t2 (THead +(Flat Appl) (lift (S O) O x) x0))).(let H8 \def (eq_ind T t2 (\lambda (t0: +T).(\forall (t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 +(CHead c (Bind b) t1) t0 t3) \to (\forall (x1: T).(\forall (x2: T).((eq T t3 +(THead (Flat Appl) (lift (S O) O x1) x2)) \to (sn3 c (THead (Flat Appl) x1 +(THead (Bind b) t1 x2)))))))))) H6 (THead (Flat Appl) (lift (S O) O x) x0) +H7) in (let H9 \def (eq_ind T t2 (\lambda (t0: T).(\forall (t3: T).((((eq T +t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t0 t3) \to +(sn3 (CHead c (Bind b) t1) t3))))) H5 (THead (Flat Appl) (lift (S O) O x) x0) +H7) in (sn3_pr2_intro c (THead (Flat Appl) x (THead (Bind b) t1 x0)) (\lambda +(t3: T).(\lambda (H10: (((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) +t3) \to (\forall (P: Prop).P)))).(\lambda (H11: (pr2 c (THead (Flat Appl) x +(THead (Bind b) t1 x0)) t3)).(let H12 \def (pr2_gen_appl c x (THead (Bind b) +t1 x0) t3 H11) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T +t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4)))) +(ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: +T).(eq T (THead (Bind b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) +u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2)))))))) (sn3 c t3) +(\lambda (H13: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) +t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Bind b) t1 x0) t4))) (sn3 c +t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H14: (eq T t3 (THead (Flat +Appl) x1 x2))).(\lambda (H15: (pr2 c x x1)).(\lambda (H16: (pr2 c (THead +(Bind b) t1 x0) x2)).(let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T +(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) +H10 (THead (Flat Appl) x1 x2) H14) in (eq_ind_r T (THead (Flat Appl) x1 x2) +(\lambda (t0: T).(sn3 c t0)) (let H_x \def (pr3_gen_bind b H c t1 x0 x2) in +(let H18 \def (H_x (pr3_pr2 c (THead (Bind b) t1 x0) x2 H16)) in (or_ind +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4)))) (pr3 (CHead c (Bind +b) t1) x0 (lift (S O) O x2)) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (H19: +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: +T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) x0 t4))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind b) u2 t4)))) (\lambda +(u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 +(CHead c (Bind b) t1) x0 t4))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda +(x3: T).(\lambda (x4: T).(\lambda (H20: (eq T x2 (THead (Bind b) x3 +x4))).(\lambda (H21: (pr3 c t1 x3)).(\lambda (H22: (pr3 (CHead c (Bind b) t1) +x0 x4)).(let H23 \def (eq_ind T x2 (\lambda (t0: T).((eq T (THead (Flat Appl) +x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 t0)) \to (\forall (P: +Prop).P))) H17 (THead (Bind b) x3 x4) H20) in (eq_ind_r T (THead (Bind b) x3 +x4) (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 t0))) (let H_x0 \def +(term_dec t1 x3) in (let H24 \def H_x0 in (or_ind (eq T t1 x3) ((eq T t1 x3) +\to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Bind b) x3 +x4))) (\lambda (H25: (eq T t1 x3)).(let H26 \def (eq_ind_r T x3 (\lambda (t0: +T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead (Flat Appl) x1 +(THead (Bind b) t0 x4))) \to (\forall (P: Prop).P))) H23 t1 H25) in (let H27 +\def (eq_ind_r T x3 (\lambda (t0: T).(pr3 c t1 t0)) H21 t1 H25) in (eq_ind T +t1 (\lambda (t0: T).(sn3 c (THead (Flat Appl) x1 (THead (Bind b) t0 x4)))) +(let H_x1 \def (term_dec x0 x4) in (let H28 \def H_x1 in (or_ind (eq T x0 x4) +((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead +(Bind b) t1 x4))) (\lambda (H29: (eq T x0 x4)).(let H30 \def (eq_ind_r T x4 +(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead +(Flat Appl) x1 (THead (Bind b) t1 t0))) \to (\forall (P: Prop).P))) H26 x0 +H29) in (let H31 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) +t1) x0 t0)) H22 x0 H29) in (eq_ind T x0 (\lambda (t0: T).(sn3 c (THead (Flat +Appl) x1 (THead (Bind b) t1 t0)))) (let H_x2 \def (term_dec x x1) in (let H32 +\def H_x2 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 +c (THead (Flat Appl) x1 (THead (Bind b) t1 x0))) (\lambda (H33: (eq T x +x1)).(let H34 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T (THead (Flat Appl) +x (THead (Bind b) t1 x0)) (THead (Flat Appl) t0 (THead (Bind b) t1 x0))) \to +(\forall (P: Prop).P))) H30 x H33) in (let H35 \def (eq_ind_r T x1 (\lambda +(t0: T).(pr2 c x t0)) H15 x H33) in (eq_ind T x (\lambda (t0: T).(sn3 c +(THead (Flat Appl) t0 (THead (Bind b) t1 x0)))) (H34 (refl_equal T (THead +(Flat Appl) x (THead (Bind b) t1 x0))) (sn3 c (THead (Flat Appl) x (THead +(Bind b) t1 x0)))) x1 H33)))) (\lambda (H33: (((eq T x x1) \to (\forall (P: +Prop).P)))).(H8 (THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H34: (eq T +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) +x0))).(\lambda (P: Prop).(let H35 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O +x) | (TLRef _) \Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O x) +| (THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) +(THead (Flat Appl) (lift (S O) O x1) x0) H34) in (let H36 \def (eq_ind_r T x1 +(\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) H33 x (lift_inj x +x1 (S O) O H35)) in (let H37 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x +t0)) H15 x (lift_inj x x1 (S O) O H35)) in (H36 (refl_equal T x) P)))))) +(pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift +(CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x +x1 (pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind b) t1) x0) Appl) x1 +x0 (refl_equal T (THead (Flat Appl) (lift (S O) O x1) x0)))) H32))) x4 +H29)))) (\lambda (H29: (((eq T x0 x4) \to (\forall (P: Prop).P)))).(H8 (THead +(Flat Appl) (lift (S O) O x1) x4) (\lambda (H30: (eq T (THead (Flat Appl) +(lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) x4))).(\lambda (P: +Prop).(let H31 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) +\Rightarrow (lref_map (\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 +_) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat +Appl) (lift (S O) O x1) x4) H30) in ((let H32 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | +(THead _ _ t0) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) +(THead (Flat Appl) (lift (S O) O x1) x4) H30) in (\lambda (H33: (eq T (lift +(S O) O x) (lift (S O) O x1))).(let H34 \def (eq_ind_r T x4 (\lambda (t0: +T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H29 x0 H32) in (let H35 \def +(eq_ind_r T x4 (\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) +t1 x0)) (THead (Flat Appl) x1 (THead (Bind b) t1 t0))) \to (\forall (P0: +Prop).P0))) H26 x0 H32) in (let H36 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 +(CHead c (Bind b) t1) x0 t0)) H22 x0 H32) in (let H37 \def (eq_ind_r T x1 +(\lambda (t0: T).((eq T (THead (Flat Appl) x (THead (Bind b) t1 x0)) (THead +(Flat Appl) t0 (THead (Bind b) t1 x0))) \to (\forall (P0: Prop).P0))) H35 x +(lift_inj x x1 (S O) O H33)) in (let H38 \def (eq_ind_r T x1 (\lambda (t0: +T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O H33)) in (H34 (refl_equal T x0) +P)))))))) H31)))) (pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift (S +O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c c +(drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x4 H22 Appl) x1 x4 +(refl_equal T (THead (Flat Appl) (lift (S O) O x1) x4)))) H28))) x3 H25)))) +(\lambda (H25: (((eq T t1 x3) \to (\forall (P: Prop).P)))).(H2 x3 H25 H21 x4 +x1 (sn3_cpr3_trans c t1 x3 H21 (Bind b) (THead (Flat Appl) (lift (S O) O x1) +x4) (let H_x1 \def (term_dec x0 x4) in (let H26 \def H_x1 in (or_ind (eq T x0 +x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) +(THead (Flat Appl) (lift (S O) O x1) x4)) (\lambda (H27: (eq T x0 x4)).(let +H28 \def (eq_ind_r T x4 (\lambda (t0: T).(pr3 (CHead c (Bind b) t1) x0 t0)) +H22 x0 H27) in (eq_ind T x0 (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) +(THead (Flat Appl) (lift (S O) O x1) t0))) (let H_x2 \def (term_dec x x1) in +(let H29 \def H_x2 in (or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: +Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) +x0)) (\lambda (H30: (eq T x x1)).(let H31 \def (eq_ind_r T x1 (\lambda (t0: +T).(pr2 c x t0)) H15 x H30) in (eq_ind T x (\lambda (t0: T).(sn3 (CHead c +(Bind b) t1) (THead (Flat Appl) (lift (S O) O t0) x0))) (sn3_sing (CHead c +(Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x0) H9) x1 H30))) (\lambda +(H30: (((eq T x x1) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift +(S O) O x1) x0) (\lambda (H31: (eq T (THead (Flat Appl) (lift (S O) O x) x0) +(THead (Flat Appl) (lift (S O) O x1) x0))).(\lambda (P: Prop).(let H32 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map +(\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow (lref_map +(\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) \Rightarrow t0])) +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) +x0) H31) in (let H33 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to +(\forall (P0: Prop).P0))) H30 x (lift_inj x x1 (S O) O H32)) in (let H34 \def +(eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O +H32)) in (H33 (refl_equal T x) P)))))) (pr3_flat (CHead c (Bind b) t1) (lift +(S O) O x) (lift (S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O +(drop_drop (Bind b) O c c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x0 +(pr3_refl (CHead c (Bind b) t1) x0) Appl))) H29))) x4 H27))) (\lambda (H27: +(((eq T x0 x4) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S +O) O x1) x4) (\lambda (H28: (eq T (THead (Flat Appl) (lift (S O) O x) x0) +(THead (Flat Appl) (lift (S O) O x1) x4))).(\lambda (P: Prop).(let H29 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map +(\lambda (x5: nat).(plus x5 (S O))) O x) | (TLRef _) \Rightarrow (lref_map +(\lambda (x5: nat).(plus x5 (S O))) O x) | (THead _ t0 _) \Rightarrow t0])) +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x1) +x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow +t0])) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) +O x1) x4) H28) in (\lambda (H31: (eq T (lift (S O) O x) (lift (S O) O +x1))).(let H32 \def (eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to +(\forall (P0: Prop).P0))) H27 x0 H30) in (let H33 \def (eq_ind_r T x4 +(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) x0 t0)) H22 x0 H30) in (let H34 +\def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) +O H31)) in (H32 (refl_equal T x0) P)))))) H29)))) (pr3_flat (CHead c (Bind b) +t1) (lift (S O) O x) (lift (S O) O x1) (pr3_lift (CHead c (Bind b) t1) c (S +O) O (drop_drop (Bind b) O c c (drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) +x0 x4 H22 Appl))) H26)))))) H24))) x2 H20))))))) H19)) (\lambda (H19: (pr3 +(CHead c (Bind b) t1) x0 (lift (S O) O x2))).(sn3_gen_lift (CHead c (Bind b) +t1) (THead (Flat Appl) x1 x2) (S O) O (eq_ind_r T (THead (Flat Appl) (lift (S +O) O x1) (lift (S O) (s (Flat Appl) O) x2)) (\lambda (t0: T).(sn3 (CHead c +(Bind b) t1) t0)) (sn3_pr3_trans (CHead c (Bind b) t1) (THead (Flat Appl) +(lift (S O) O x1) x0) (let H_x0 \def (term_dec x x1) in (let H20 \def H_x0 in +(or_ind (eq T x x1) ((eq T x x1) \to (\forall (P: Prop).P)) (sn3 (CHead c +(Bind b) t1) (THead (Flat Appl) (lift (S O) O x1) x0)) (\lambda (H21: (eq T x +x1)).(let H22 \def (eq_ind_r T x1 (\lambda (t0: T).(pr2 c x t0)) H15 x H21) +in (eq_ind T x (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) +(lift (S O) O t0) x0))) (sn3_sing (CHead c (Bind b) t1) (THead (Flat Appl) +(lift (S O) O x) x0) H9) x1 H21))) (\lambda (H21: (((eq T x x1) \to (\forall +(P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x1) x0) (\lambda (H22: +(eq T (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) +O x1) x0))).(\lambda (P: Prop).(let H23 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x3: nat).(plus x3 +(S O))) O x) | (TLRef _) \Rightarrow (lref_map (\lambda (x3: nat).(plus x3 (S +O))) O x) | (THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O +x) x0) (THead (Flat Appl) (lift (S O) O x1) x0) H22) in (let H24 \def +(eq_ind_r T x1 (\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) +H21 x (lift_inj x x1 (S O) O H23)) in (let H25 \def (eq_ind_r T x1 (\lambda +(t0: T).(pr2 c x t0)) H15 x (lift_inj x x1 (S O) O H23)) in (H24 (refl_equal +T x) P)))))) (pr3_flat (CHead c (Bind b) t1) (lift (S O) O x) (lift (S O) O +x1) (pr3_lift (CHead c (Bind b) t1) c (S O) O (drop_drop (Bind b) O c c +(drop_refl c) t1) x x1 (pr3_pr2 c x x1 H15)) x0 x0 (pr3_refl (CHead c (Bind +b) t1) x0) Appl))) H20))) (THead (Flat Appl) (lift (S O) O x1) (lift (S O) O +x2)) (pr3_thin_dx (CHead c (Bind b) t1) x0 (lift (S O) O x2) H19 (lift (S O) +O x1) Appl)) (lift (S O) O (THead (Flat Appl) x1 x2)) (lift_head (Flat Appl) +x1 x2 (S O) O)) c (drop_drop (Bind b) O c c (drop_refl c) t1))) H18))) t3 +H14))))))) H13)) (\lambda (H13: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind +Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall (u0: +T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))))).(ex4_4_ind T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind +b) t1 x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) +(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x +u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: +T).(\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) z1 t4))))))) +(sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H14: (eq T (THead (Bind b) t1 x0) (THead (Bind Abst) x1 +x2))).(\lambda (H15: (eq T t3 (THead (Bind Abbr) x3 x4))).(\lambda (_: (pr2 c +x x3)).(\lambda (H17: ((\forall (b0: B).(\forall (u0: T).(pr2 (CHead c (Bind +b0) u0) x2 x4))))).(let H18 \def (eq_ind T t3 (\lambda (t0: T).((eq T (THead +(Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) H10 +(THead (Bind Abbr) x3 x4) H15) in (eq_ind_r T (THead (Bind Abbr) x3 x4) +(\lambda (t0: T).(sn3 c t0)) (let H19 \def (f_equal T B (\lambda (e: +T).(match e with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead +k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow b])])) (THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in +((let H20 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) \Rightarrow t0])) +(THead (Bind b) t1 x0) (THead (Bind Abst) x1 x2) H14) in ((let H21 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef +_) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind b) t1 x0) +(THead (Bind Abst) x1 x2) H14) in (\lambda (_: (eq T t1 x1)).(\lambda (H23: +(eq B b Abst)).(let H24 \def (eq_ind_r T x2 (\lambda (t0: T).(\forall (b0: +B).(\forall (u0: T).(pr2 (CHead c (Bind b0) u0) t0 x4)))) H17 x0 H21) in (let +H25 \def (eq_ind B b (\lambda (b0: B).((eq T (THead (Flat Appl) x (THead +(Bind b0) t1 x0)) (THead (Bind Abbr) x3 x4)) \to (\forall (P: Prop).P))) H18 +Abst H23) in (let H26 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: +T).((((eq T (THead (Flat Appl) (lift (S O) O x) x0) t4) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) (THead (Flat Appl) (lift (S O) O +x) x0) t4) \to (sn3 (CHead c (Bind b0) t1) t4))))) H9 Abst H23) in (let H27 +\def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T (THead (Flat +Appl) (lift (S O) O x) x0) t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c +(Bind b0) t1) (THead (Flat Appl) (lift (S O) O x) x0) t4) \to (\forall (x5: +T).(\forall (x6: T).((eq T t4 (THead (Flat Appl) (lift (S O) O x5) x6)) \to +(sn3 c (THead (Flat Appl) x5 (THead (Bind b0) t1 x6)))))))))) H8 Abst H23) in +(let H28 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) +\to (\forall (P: Prop).P))) \to ((pr3 c t1 t4) \to (\forall (t0: T).(\forall +(v0: T).((sn3 (CHead c (Bind b0) t4) (THead (Flat Appl) (lift (S O) O v0) +t0)) \to (sn3 c (THead (Flat Appl) v0 (THead (Bind b0) t4 t0)))))))))) H2 +Abst H23) in (let H29 \def (eq_ind B b (\lambda (b0: B).(not (eq B b0 Abst))) +H Abst H23) in (let H30 \def (match (H29 (refl_equal B Abst)) in False with +[]) in H30)))))))))) H20)) H19)) t3 H15)))))))))) H13)) (\lambda (H13: (ex6_6 +B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T (THead (Bind b) t1 x0) (THead (Bind b0) y1 z1)))))))) (\lambda +(b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: +T).(\lambda (y2: T).(eq T t3 (THead (Bind b0) y2 (THead (Flat Appl) (lift (S +O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c y1 y2))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) +y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b0: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B +b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) t1 x0) (THead +(Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b0) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b0: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b0) y2) z1 z2))))))) (sn3 c t3) +(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda +(x5: T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H15: +(eq T (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3))).(\lambda (H16: (eq T +t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda +(H17: (pr2 c x x5)).(\lambda (H18: (pr2 c x2 x6)).(\lambda (H19: (pr2 (CHead +c (Bind x1) x6) x3 x4)).(let H20 \def (eq_ind T t3 (\lambda (t0: T).((eq T +(THead (Flat Appl) x (THead (Bind b) t1 x0)) t0) \to (\forall (P: Prop).P))) +H10 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) H16) in +(eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) +(\lambda (t0: T).(sn3 c t0)) (let H21 \def (f_equal T B (\lambda (e: +T).(match e with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead +k _ _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow b])])) (THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in +((let H22 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ t0 _) \Rightarrow t0])) +(THead (Bind b) t1 x0) (THead (Bind x1) x2 x3) H15) in ((let H23 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef +_) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind b) t1 x0) +(THead (Bind x1) x2 x3) H15) in (\lambda (H24: (eq T t1 x2)).(\lambda (H25: +(eq B b x1)).(let H26 \def (eq_ind_r T x3 (\lambda (t0: T).(pr2 (CHead c +(Bind x1) x6) t0 x4)) H19 x0 H23) in (let H27 \def (eq_ind_r T x2 (\lambda +(t0: T).(pr2 c t0 x6)) H18 t1 H24) in (let H28 \def (eq_ind_r B x1 (\lambda +(b0: B).(pr2 (CHead c (Bind b0) x6) x0 x4)) H26 b H25) in (eq_ind B b +(\lambda (b0: B).(sn3 c (THead (Bind b0) x6 (THead (Flat Appl) (lift (S O) O +x5) x4)))) (sn3_pr3_trans c (THead (Bind b) t1 (THead (Flat Appl) (lift (S O) +O x5) x4)) (sn3_bind b c t1 (sn3_sing c t1 H1) (THead (Flat Appl) (lift (S O) +O x5) x4) (let H_x \def (term_dec x x5) in (let H29 \def H_x in (or_ind (eq T +x x5) ((eq T x x5) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) +(THead (Flat Appl) (lift (S O) O x5) x4)) (\lambda (H30: (eq T x x5)).(let +H31 \def (eq_ind_r T x5 (\lambda (t0: T).(pr2 c x t0)) H17 x H30) in (eq_ind +T x (\lambda (t0: T).(sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S +O) O t0) x4))) (let H_x0 \def (term_dec x0 x4) in (let H32 \def H_x0 in +(or_ind (eq T x0 x4) ((eq T x0 x4) \to (\forall (P: Prop).P)) (sn3 (CHead c +(Bind b) t1) (THead (Flat Appl) (lift (S O) O x) x4)) (\lambda (H33: (eq T x0 +x4)).(let H34 \def (eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c (Bind b) x6) +x0 t0)) H28 x0 H33) in (eq_ind T x0 (\lambda (t0: T).(sn3 (CHead c (Bind b) +t1) (THead (Flat Appl) (lift (S O) O x) t0))) (sn3_sing (CHead c (Bind b) t1) +(THead (Flat Appl) (lift (S O) O x) x0) H9) x4 H33))) (\lambda (H33: (((eq T +x0 x4) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x) +x4) (\lambda (H34: (eq T (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat +Appl) (lift (S O) O x) x4))).(\lambda (P: Prop).(let H35 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) +\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat Appl) (lift (S +O) O x) x0) (THead (Flat Appl) (lift (S O) O x) x4) H34) in (let H36 \def +(eq_ind_r T x4 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) +H33 x0 H35) in (let H37 \def (eq_ind_r T x4 (\lambda (t0: T).(pr2 (CHead c +(Bind b) x6) x0 t0)) H28 x0 H35) in (H36 (refl_equal T x0) P)))))) +(pr3_pr3_pr3_t c t1 x6 (pr3_pr2 c t1 x6 H27) (THead (Flat Appl) (lift (S O) O +x) x0) (THead (Flat Appl) (lift (S O) O x) x4) (Bind b) (pr3_pr2 (CHead c +(Bind b) x6) (THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift +(S O) O x) x4) (pr2_thin_dx (CHead c (Bind b) x6) x0 x4 H28 (lift (S O) O x) +Appl))))) H32))) x5 H30))) (\lambda (H30: (((eq T x x5) \to (\forall (P: +Prop).P)))).(H9 (THead (Flat Appl) (lift (S O) O x5) x4) (\lambda (H31: (eq T +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) +x4))).(\lambda (P: Prop).(let H32 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow (lref_map (\lambda (x7: nat).(plus x7 (S O))) O +x) | (TLRef _) \Rightarrow (lref_map (\lambda (x7: nat).(plus x7 (S O))) O x) +| (THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) (lift (S O) O x) x0) +(THead (Flat Appl) (lift (S O) O x5) x4) H31) in ((let H33 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) +\Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Flat Appl) (lift (S +O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) x4) H31) in (\lambda (H34: +(eq T (lift (S O) O x) (lift (S O) O x5))).(let H35 \def (eq_ind_r T x5 +(\lambda (t0: T).((eq T x t0) \to (\forall (P0: Prop).P0))) H30 x (lift_inj x +x5 (S O) O H34)) in (let H36 \def (eq_ind_r T x5 (\lambda (t0: T).(pr2 c x +t0)) H17 x (lift_inj x x5 (S O) O H34)) in (let H37 \def (eq_ind_r T x4 +(\lambda (t0: T).(pr2 (CHead c (Bind b) x6) x0 t0)) H28 x0 H33) in (H35 +(refl_equal T x) P)))))) H32)))) (pr3_pr3_pr3_t c t1 x6 (pr3_pr2 c t1 x6 H27) +(THead (Flat Appl) (lift (S O) O x) x0) (THead (Flat Appl) (lift (S O) O x5) +x4) (Bind b) (pr3_flat (CHead c (Bind b) x6) (lift (S O) O x) (lift (S O) O +x5) (pr3_lift (CHead c (Bind b) x6) c (S O) O (drop_drop (Bind b) O c c +(drop_refl c) x6) x x5 (pr3_pr2 c x x5 H17)) x0 x4 (pr3_pr2 (CHead c (Bind b) +x6) x0 x4 H28) Appl)))) H29)))) (THead (Bind b) x6 (THead (Flat Appl) (lift +(S O) O x5) x4)) (pr3_pr2 c (THead (Bind b) t1 (THead (Flat Appl) (lift (S O) +O x5) x4)) (THead (Bind b) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) +(pr2_head_1 c t1 x6 H27 (Bind b) (THead (Flat Appl) (lift (S O) O x5) x4)))) +x1 H25))))))) H22)) H21)) t3 H16)))))))))))))) H13)) H12)))))))))))))) y +H4))))) H3))))))) u H0))))). + +theorem sn3_appl_appl: + \forall (v1: T).(\forall (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in +(\forall (c: C).((sn3 c u1) \to (\forall (v2: T).((sn3 c v2) \to (((\forall +(u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to +(sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 +u1))))))))) +\def + \lambda (v1: T).(\lambda (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in +(\lambda (c: C).(\lambda (H: (sn3 c (THead (Flat Appl) v1 t1))).(insert_eq T +(THead (Flat Appl) v1 t1) (\lambda (t: T).(sn3 c t)) (\lambda (t: T).(\forall +(v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) +\to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to +(sn3 c (THead (Flat Appl) v2 t)))))) (\lambda (y: T).(\lambda (H0: (sn3 c +y)).(unintro T t1 (\lambda (t: T).((eq T y (THead (Flat Appl) v1 t)) \to +(\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c y u2) \to ((((iso +y u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) +\to (sn3 c (THead (Flat Appl) v2 y))))))) (unintro T v1 (\lambda (t: +T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to (\forall (v2: +T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c y u2) \to ((((iso y u2) \to +(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c +(THead (Flat Appl) v2 y)))))))) (sn3_ind c (\lambda (t: T).(\forall (x: +T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (v2: +T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) \to +(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c +(THead (Flat Appl) v2 t))))))))) (\lambda (t2: T).(\lambda (H1: ((\forall +(t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to +(sn3 c t3)))))).(\lambda (H2: ((\forall (t3: T).((((eq T t2 t3) \to (\forall +(P: Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x: T).(\forall (x0: T).((eq T +t3 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall +(u2: T).((pr3 c t3 u2) \to ((((iso t3 u2) \to (\forall (P: Prop).P))) \to +(sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 +t3))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t2 +(THead (Flat Appl) x x0))).(\lambda (v2: T).(\lambda (H4: (sn3 c +v2)).(sn3_ind c (\lambda (t: T).(((\forall (u2: T).((pr3 c t2 u2) \to ((((iso +t2 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t u2)))))) +\to (sn3 c (THead (Flat Appl) t t2)))) (\lambda (t0: T).(\lambda (H5: +((\forall (t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t0 +t3) \to (sn3 c t3)))))).(\lambda (H6: ((\forall (t3: T).((((eq T t0 t3) \to +(\forall (P: Prop).P))) \to ((pr3 c t0 t3) \to (((\forall (u2: T).((pr3 c t2 +u2) \to ((((iso t2 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat +Appl) t3 u2)))))) \to (sn3 c (THead (Flat Appl) t3 t2)))))))).(\lambda (H7: +((\forall (u2: T).((pr3 c t2 u2) \to ((((iso t2 u2) \to (\forall (P: +Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2))))))).(let H8 \def (eq_ind T +t2 (\lambda (t: T).(\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) \to +(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H7 (THead +(Flat Appl) x x0) H3) in (let H9 \def (eq_ind T t2 (\lambda (t: T).(\forall +(t3: T).((((eq T t0 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t3) \to +(((\forall (u2: T).((pr3 c t u2) \to ((((iso t u2) \to (\forall (P: +Prop).P))) \to (sn3 c (THead (Flat Appl) t3 u2)))))) \to (sn3 c (THead (Flat +Appl) t3 t))))))) H6 (THead (Flat Appl) x x0) H3) in (let H10 \def (eq_ind T +t2 (\lambda (t: T).(\forall (t3: T).((((eq T t t3) \to (\forall (P: +Prop).P))) \to ((pr3 c t t3) \to (\forall (x1: T).(\forall (x2: T).((eq T t3 +(THead (Flat Appl) x1 x2)) \to (\forall (v3: T).((sn3 c v3) \to (((\forall +(u2: T).((pr3 c t3 u2) \to ((((iso t3 u2) \to (\forall (P: Prop).P))) \to +(sn3 c (THead (Flat Appl) v3 u2)))))) \to (sn3 c (THead (Flat Appl) v3 +t3)))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H11 \def (eq_ind T t2 +(\lambda (t: T).(\forall (t3: T).((((eq T t t3) \to (\forall (P: Prop).P))) +\to ((pr3 c t t3) \to (sn3 c t3))))) H1 (THead (Flat Appl) x x0) H3) in +(eq_ind_r T (THead (Flat Appl) x x0) (\lambda (t: T).(sn3 c (THead (Flat +Appl) t0 t))) (sn3_pr2_intro c (THead (Flat Appl) t0 (THead (Flat Appl) x +x0)) (\lambda (t3: T).(\lambda (H12: (((eq T (THead (Flat Appl) t0 (THead +(Flat Appl) x x0)) t3) \to (\forall (P: Prop).P)))).(\lambda (H13: (pr2 c +(THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t3)).(let H14 \def +(pr2_gen_appl c t0 (THead (Flat Appl) x x0) t3 H13) in (or3_ind (ex3_2 T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda +(t4: T).(pr2 c (THead (Flat Appl) x x0) t4)))) (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) +x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T +T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq +T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda +(y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) +z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: +B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: +T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) +y2) z1 z2)))))))) (sn3 c t3) (\lambda (H15: (ex3_2 T T (\lambda (u2: +T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c +(THead (Flat Appl) x x0) t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Flat Appl) +x x0) t4))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H16: (eq T +t3 (THead (Flat Appl) x1 x2))).(\lambda (H17: (pr2 c t0 x1)).(\lambda (H18: +(pr2 c (THead (Flat Appl) x x0) x2)).(let H19 \def (eq_ind T t3 (\lambda (t: +T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: +Prop).P))) H12 (THead (Flat Appl) x1 x2) H16) in (eq_ind_r T (THead (Flat +Appl) x1 x2) (\lambda (t: T).(sn3 c t)) (let H20 \def (pr2_gen_appl c x x0 x2 +H18) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4)))) (ex4_4 T T T T (\lambda +(y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 +(THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c +(THead (Flat Appl) x1 x2)) (\lambda (H21: (ex3_2 T T (\lambda (u2: +T).(\lambda (t4: T).(eq T x2 (THead (Flat Appl) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c x0 +t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead +(Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) +(\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4))) (sn3 c (THead (Flat Appl) x1 +x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H22: (eq T x2 (THead (Flat +Appl) x3 x4))).(\lambda (H23: (pr2 c x x3)).(\lambda (H24: (pr2 c x0 +x4)).(let H25 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 +(THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: +Prop).P))) H19 (THead (Flat Appl) x3 x4) H22) in (eq_ind_r T (THead (Flat +Appl) x3 x4) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H_x \def +(term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) in (let H26 +\def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) +((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) \to (\forall (P: +Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x3 x4))) (\lambda +(H27: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4))).(let H28 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow x | +(TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x +x0) (THead (Flat Appl) x3 x4) H27) in ((let H29 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | +(THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x3 +x4) H27) in (\lambda (H30: (eq T x x3)).(let H31 \def (eq_ind_r T x4 (\lambda +(t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat +Appl) x1 (THead (Flat Appl) x3 t))) \to (\forall (P: Prop).P))) H25 x0 H29) +in (let H32 \def (eq_ind_r T x4 (\lambda (t: T).(pr2 c x0 t)) H24 x0 H29) in +(eq_ind T x0 (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) +x3 t)))) (let H33 \def (eq_ind_r T x3 (\lambda (t: T).((eq T (THead (Flat +Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 (THead (Flat Appl) t +x0))) \to (\forall (P: Prop).P))) H31 x H30) in (let H34 \def (eq_ind_r T x3 +(\lambda (t: T).(pr2 c x t)) H23 x H30) in (eq_ind T x (\lambda (t: T).(sn3 c +(THead (Flat Appl) x1 (THead (Flat Appl) t x0)))) (let H_x0 \def (term_dec t0 +x1) in (let H35 \def H_x0 in (or_ind (eq T t0 x1) ((eq T t0 x1) \to (\forall +(P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x x0))) +(\lambda (H36: (eq T t0 x1)).(let H37 \def (eq_ind_r T x1 (\lambda (t: +T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) +t (THead (Flat Appl) x x0))) \to (\forall (P: Prop).P))) H33 t0 H36) in (let +H38 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c t0 t)) H17 t0 H36) in (eq_ind +T t0 (\lambda (t: T).(sn3 c (THead (Flat Appl) t (THead (Flat Appl) x x0)))) +(H37 (refl_equal T (THead (Flat Appl) t0 (THead (Flat Appl) x x0))) (sn3 c +(THead (Flat Appl) t0 (THead (Flat Appl) x x0)))) x1 H36)))) (\lambda (H36: +(((eq T t0 x1) \to (\forall (P: Prop).P)))).(H9 x1 H36 (pr3_pr2 c t0 x1 H17) +(\lambda (u2: T).(\lambda (H37: (pr3 c (THead (Flat Appl) x x0) u2)).(\lambda +(H38: (((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: +Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H8 u2 H37 H38) (THead +(Flat Appl) x1 u2) (pr3_pr2 c (THead (Flat Appl) t0 u2) (THead (Flat Appl) x1 +u2) (pr2_head_1 c t0 x1 H17 (Flat Appl) u2)))))))) H35))) x3 H30))) x4 +H29))))) H28))) (\lambda (H27: (((eq T (THead (Flat Appl) x x0) (THead (Flat +Appl) x3 x4)) \to (\forall (P: Prop).P)))).(H10 (THead (Flat Appl) x3 x4) H27 +(pr3_flat c x x3 (pr3_pr2 c x x3 H23) x0 x4 (pr3_pr2 c x0 x4 H24) Appl) x3 x4 +(refl_equal T (THead (Flat Appl) x3 x4)) x1 (sn3_pr3_trans c t0 (sn3_sing c +t0 H5) x1 (pr3_pr2 c t0 x1 H17)) (\lambda (u2: T).(\lambda (H28: (pr3 c +(THead (Flat Appl) x3 x4) u2)).(\lambda (H29: (((iso (THead (Flat Appl) x3 +x4) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 +u2) (H8 u2 (pr3_sing c (THead (Flat Appl) x x4) (THead (Flat Appl) x x0) +(pr2_thin_dx c x0 x4 H24 x Appl) u2 (pr3_sing c (THead (Flat Appl) x3 x4) +(THead (Flat Appl) x x4) (pr2_head_1 c x x3 H23 (Flat Appl) x4) u2 H28)) +(\lambda (H30: (iso (THead (Flat Appl) x x0) u2)).(\lambda (P: Prop).(H29 +(iso_trans (THead (Flat Appl) x3 x4) (THead (Flat Appl) x x0) (iso_head x3 x +x4 x0 (Flat Appl)) u2 H30) P)))) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead +(Flat Appl) t0 u2) (THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H17 (Flat +Appl) u2)))))))) H26))) x2 H22))))))) H21)) (\lambda (H21: (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))) (sn3 c (THead (Flat +Appl) x1 x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda +(x6: T).(\lambda (H22: (eq T x0 (THead (Bind Abst) x3 x4))).(\lambda (H23: +(eq T x2 (THead (Bind Abbr) x5 x6))).(\lambda (H24: (pr2 c x x5)).(\lambda +(H25: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x4 +x6))))).(let H26 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) +t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: +Prop).P))) H19 (THead (Bind Abbr) x5 x6) H23) in (eq_ind_r T (THead (Bind +Abbr) x5 x6) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H27 \def +(eq_ind T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) +x t)) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6))) \to (\forall (P: +Prop).P))) H26 (THead (Bind Abst) x3 x4) H22) in (let H28 \def (eq_ind T x0 +(\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat Appl) x t) t4) \to +(\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t4) \to (sn3 c +t4))))) H11 (THead (Bind Abst) x3 x4) H22) in (let H29 \def (eq_ind T x0 +(\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat Appl) x t) t4) \to +(\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t4) \to (\forall +(x7: T).(\forall (x8: T).((eq T t4 (THead (Flat Appl) x7 x8)) \to (\forall +(v3: T).((sn3 c v3) \to (((\forall (u2: T).((pr3 c t4 u2) \to ((((iso t4 u2) +\to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v3 u2)))))) \to +(sn3 c (THead (Flat Appl) v3 t4)))))))))))) H10 (THead (Bind Abst) x3 x4) +H22) in (let H30 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: T).((pr3 c +(THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to +(\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H8 (THead +(Bind Abst) x3 x4) H22) in (let H31 \def (eq_ind T x0 (\lambda (t: +T).(\forall (t4: T).((((eq T t0 t4) \to (\forall (P: Prop).P))) \to ((pr3 c +t0 t4) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso +(THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead +(Flat Appl) t4 u2)))))) \to (sn3 c (THead (Flat Appl) t4 (THead (Flat Appl) x +t)))))))) H9 (THead (Bind Abst) x3 x4) H22) in (sn3_pr3_trans c (THead (Flat +Appl) t0 (THead (Bind Abbr) x5 x6)) (H30 (THead (Bind Abbr) x5 x6) (pr3_sing +c (THead (Bind Abbr) x x4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) +(pr2_free c (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind +Abbr) x x4) (pr0_beta x3 x x (pr0_refl x) x4 x4 (pr0_refl x4))) (THead (Bind +Abbr) x5 x6) (pr3_head_12 c x x5 (pr3_pr2 c x x5 H24) (Bind Abbr) x4 x6 +(pr3_pr2 (CHead c (Bind Abbr) x5) x4 x6 (H25 Abbr x5)))) (\lambda (H32: (iso +(THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind Abbr) x5 +x6))).(\lambda (P: Prop).(let H33 \def (match H32 with [(iso_sort n1 n2) +\Rightarrow (\lambda (H33: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind +Abst) x3 x4)))).(\lambda (H34: (eq T (TSort n2) (THead (Bind Abbr) x5 +x6))).((let H35 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e with +[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H33) +in (False_ind ((eq T (TSort n2) (THead (Bind Abbr) x5 x6)) \to P) H35)) +H34))) | (iso_lref i1 i2) \Rightarrow (\lambda (H33: (eq T (TLRef i1) (THead +(Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H34: (eq T (TLRef i2) +(THead (Bind Abbr) x5 x6))).((let H35 \def (eq_ind T (TLRef i1) (\lambda (e: +T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) +x3 x4)) H33) in (False_ind ((eq T (TLRef i2) (THead (Bind Abbr) x5 x6)) \to +P) H35)) H34))) | (iso_head v4 v5 t4 t5 k) \Rightarrow (\lambda (H33: (eq T +(THead k v4 t4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda +(H34: (eq T (THead k v5 t5) (THead (Bind Abbr) x5 x6))).((let H35 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t4 | (TLRef +_) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k v4 t4) (THead +(Flat Appl) x (THead (Bind Abst) x3 x4)) H33) in ((let H36 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow v4 | (TLRef _) +\Rightarrow v4 | (THead _ t _) \Rightarrow t])) (THead k v4 t4) (THead (Flat +Appl) x (THead (Bind Abst) x3 x4)) H33) in ((let H37 \def (f_equal T K +(\lambda (e: T).(match e with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k v4 t4) (THead (Flat +Appl) x (THead (Bind Abst) x3 x4)) H33) in (eq_ind K (Flat Appl) (\lambda +(k0: K).((eq T v4 x) \to ((eq T t4 (THead (Bind Abst) x3 x4)) \to ((eq T +(THead k0 v5 t5) (THead (Bind Abbr) x5 x6)) \to P)))) (\lambda (H38: (eq T v4 +x)).(eq_ind T x (\lambda (_: T).((eq T t4 (THead (Bind Abst) x3 x4)) \to ((eq +T (THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 x6)) \to P))) (\lambda +(H39: (eq T t4 (THead (Bind Abst) x3 x4))).(eq_ind T (THead (Bind Abst) x3 +x4) (\lambda (_: T).((eq T (THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 +x6)) \to P)) (\lambda (H40: (eq T (THead (Flat Appl) v5 t5) (THead (Bind +Abbr) x5 x6))).(let H41 \def (eq_ind T (THead (Flat Appl) v5 t5) (\lambda (e: +T).(match e with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | +(THead k0 _ _) \Rightarrow (match k0 with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind Abbr) x5 x6) H40) in (False_ind P +H41))) t4 (sym_eq T t4 (THead (Bind Abst) x3 x4) H39))) v4 (sym_eq T v4 x +H38))) k (sym_eq K k (Flat Appl) H37))) H36)) H35)) H34)))]) in (H33 +(refl_equal T (THead (Flat Appl) x (THead (Bind Abst) x3 x4))) (refl_equal T +(THead (Bind Abbr) x5 x6))))))) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 +x6)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (THead (Flat +Appl) x1 (THead (Bind Abbr) x5 x6)) (pr2_head_1 c t0 x1 H17 (Flat Appl) +(THead (Bind Abbr) x5 x6))))))))) x2 H23)))))))))) H21)) (\lambda (H21: +(ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: +B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda +(u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift +(S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) +(\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 +(CHead c (Bind b) y2) z1 z2))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda +(x3: B).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: +T).(\lambda (x8: T).(\lambda (H22: (not (eq B x3 Abst))).(\lambda (H23: (eq T +x0 (THead (Bind x3) x4 x5))).(\lambda (H24: (eq T x2 (THead (Bind x3) x8 +(THead (Flat Appl) (lift (S O) O x7) x6)))).(\lambda (H25: (pr2 c x +x7)).(\lambda (H26: (pr2 c x4 x8)).(\lambda (H27: (pr2 (CHead c (Bind x3) x8) +x5 x6)).(let H28 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) +t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: +Prop).P))) H19 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) +H24) in (eq_ind_r T (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) +x6)) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H29 \def (eq_ind +T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x t)) +(THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O +x7) x6)))) \to (\forall (P: Prop).P))) H28 (THead (Bind x3) x4 x5) H23) in +(let H30 \def (eq_ind T x0 (\lambda (t: T).(\forall (t4: T).((((eq T (THead +(Flat Appl) x t) t4) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat +Appl) x t) t4) \to (sn3 c t4))))) H11 (THead (Bind x3) x4 x5) H23) in (let +H31 \def (eq_ind T x0 (\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat +Appl) x t) t4) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x +t) t4) \to (\forall (x9: T).(\forall (x10: T).((eq T t4 (THead (Flat Appl) x9 +x10)) \to (\forall (v3: T).((sn3 c v3) \to (((\forall (u2: T).((pr3 c t4 u2) +\to ((((iso t4 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) +v3 u2)))))) \to (sn3 c (THead (Flat Appl) v3 t4)))))))))))) H10 (THead (Bind +x3) x4 x5) H23) in (let H32 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: +T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) +u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H8 +(THead (Bind x3) x4 x5) H23) in (let H33 \def (eq_ind T x0 (\lambda (t: +T).(\forall (t4: T).((((eq T t0 t4) \to (\forall (P: Prop).P))) \to ((pr3 c +t0 t4) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso +(THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead +(Flat Appl) t4 u2)))))) \to (sn3 c (THead (Flat Appl) t4 (THead (Flat Appl) x +t)))))))) H9 (THead (Bind x3) x4 x5) H23) in (sn3_pr3_trans c (THead (Flat +Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (H32 +(THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (pr3_sing c +(THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) x5)) (THead (Flat +Appl) x (THead (Bind x3) x4 x5)) (pr2_free c (THead (Flat Appl) x (THead +(Bind x3) x4 x5)) (THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) +x5)) (pr0_upsilon x3 H22 x x (pr0_refl x) x4 x4 (pr0_refl x4) x5 x5 (pr0_refl +x5))) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) +(pr3_head_12 c x4 x8 (pr3_pr2 c x4 x8 H26) (Bind x3) (THead (Flat Appl) (lift +(S O) O x) x5) (THead (Flat Appl) (lift (S O) O x7) x6) (pr3_head_12 (CHead c +(Bind x3) x8) (lift (S O) O x) (lift (S O) O x7) (pr3_lift (CHead c (Bind x3) +x8) c (S O) O (drop_drop (Bind x3) O c c (drop_refl c) x8) x x7 (pr3_pr2 c x +x7 H25)) (Flat Appl) x5 x6 (pr3_pr2 (CHead (CHead c (Bind x3) x8) (Flat Appl) +(lift (S O) O x7)) x5 x6 (pr2_cflat (CHead c (Bind x3) x8) x5 x6 H27 Appl +(lift (S O) O x7)))))) (\lambda (H34: (iso (THead (Flat Appl) x (THead (Bind +x3) x4 x5)) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) +x6)))).(\lambda (P: Prop).(let H35 \def (match H34 with [(iso_sort n1 n2) +\Rightarrow (\lambda (H35: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind +x3) x4 x5)))).(\lambda (H36: (eq T (TSort n2) (THead (Bind x3) x8 (THead +(Flat Appl) (lift (S O) O x7) x6)))).((let H37 \def (eq_ind T (TSort n1) +(\lambda (e: T).(match e with [(TSort _) \Rightarrow True | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x +(THead (Bind x3) x4 x5)) H35) in (False_ind ((eq T (TSort n2) (THead (Bind +x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P) H37)) H36))) | +(iso_lref i1 i2) \Rightarrow (\lambda (H35: (eq T (TLRef i1) (THead (Flat +Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H36: (eq T (TLRef i2) (THead +(Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H37 \def +(eq_ind T (TLRef i1) (\lambda (e: T).(match e with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I +(THead (Flat Appl) x (THead (Bind x3) x4 x5)) H35) in (False_ind ((eq T +(TLRef i2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to +P) H37)) H36))) | (iso_head v4 v5 t4 t5 k) \Rightarrow (\lambda (H35: (eq T +(THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda +(H36: (eq T (THead k v5 t5) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S +O) O x7) x6)))).((let H37 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) +\Rightarrow t])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 +x5)) H35) in ((let H38 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) +\Rightarrow t])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 +x5)) H35) in ((let H39 \def (f_equal T K (\lambda (e: T).(match e with +[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 +x5)) H35) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 x) \to ((eq T +t4 (THead (Bind x3) x4 x5)) \to ((eq T (THead k0 v5 t5) (THead (Bind x3) x8 +(THead (Flat Appl) (lift (S O) O x7) x6))) \to P)))) (\lambda (H40: (eq T v4 +x)).(eq_ind T x (\lambda (_: T).((eq T t4 (THead (Bind x3) x4 x5)) \to ((eq T +(THead (Flat Appl) v5 t5) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) +O x7) x6))) \to P))) (\lambda (H41: (eq T t4 (THead (Bind x3) x4 +x5))).(eq_ind T (THead (Bind x3) x4 x5) (\lambda (_: T).((eq T (THead (Flat +Appl) v5 t5) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) +\to P)) (\lambda (H42: (eq T (THead (Flat Appl) v5 t5) (THead (Bind x3) x8 +(THead (Flat Appl) (lift (S O) O x7) x6)))).(let H43 \def (eq_ind T (THead +(Flat Appl) v5 t5) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False +| (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind +x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) H42) in (False_ind P H43))) +t4 (sym_eq T t4 (THead (Bind x3) x4 x5) H41))) v4 (sym_eq T v4 x H40))) k +(sym_eq K k (Flat Appl) H39))) H38)) H37)) H36)))]) in (H35 (refl_equal T +(THead (Flat Appl) x (THead (Bind x3) x4 x5))) (refl_equal T (THead (Bind x3) +x8 (THead (Flat Appl) (lift (S O) O x7) x6)))))))) (THead (Flat Appl) x1 +(THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (pr3_pr2 c +(THead (Flat Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O +x7) x6))) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift +(S O) O x7) x6))) (pr2_head_1 c t0 x1 H17 (Flat Appl) (THead (Bind x3) x8 +(THead (Flat Appl) (lift (S O) O x7) x6)))))))))) x2 H24)))))))))))))) H21)) +H20)) t3 H16))))))) H15)) (\lambda (H15: (ex4_4 T T T T (\lambda (y1: +T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) +x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) +(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall +(b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T +T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) +z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (H16: (eq T (THead (Flat Appl) x x0) (THead +(Bind Abst) x1 x2))).(\lambda (H17: (eq T t3 (THead (Bind Abbr) x3 +x4))).(\lambda (_: (pr2 c t0 x3)).(\lambda (_: ((\forall (b: B).(\forall (u: +T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H20 \def (eq_ind T t3 (\lambda +(t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall +(P: Prop).P))) H12 (THead (Bind Abbr) x3 x4) H17) in (eq_ind_r T (THead (Bind +Abbr) x3 x4) (\lambda (t: T).(sn3 c t)) (let H21 \def (eq_ind T (THead (Flat +Appl) x x0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind +_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x1 +x2) H16) in (False_ind (sn3 c (THead (Bind Abbr) x3 x4)) H21)) t3 +H17)))))))))) H15)) (\lambda (H15: (ex6_6 B T T T T T (\lambda (b: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda +(_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda +(z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat +Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: +T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T +t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) +(\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 +y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: +T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 +z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda +(_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b +Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead +(Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: +T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind +b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: +B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: +T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) +(\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda +(_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) +(\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda +(x5: T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H17: +(eq T (THead (Flat Appl) x x0) (THead (Bind x1) x2 x3))).(\lambda (H18: (eq T +t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda +(_: (pr2 c t0 x5)).(\lambda (_: (pr2 c x2 x6)).(\lambda (_: (pr2 (CHead c +(Bind x1) x6) x3 x4)).(let H22 \def (eq_ind T t3 (\lambda (t: T).((eq T +(THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: +Prop).P))) H12 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) +H18) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) +x4)) (\lambda (t: T).(sn3 c t)) (let H23 \def (eq_ind T (THead (Flat Appl) x +x0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x1) x2 x3) +H17) in (False_ind (sn3 c (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) +O x5) x4))) H23)) t3 H18)))))))))))))) H15)) H14)))))) t2 H3))))))))) v2 +H4))))))))) y H0))))) H))))). + +theorem sn3_appl_beta: + \forall (c: C).(\forall (u: T).(\forall (v: T).(\forall (t: T).((sn3 c +(THead (Flat Appl) u (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) +\to (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind Abst) w +t)))))))))) +\def + \lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Flat Appl) u (THead (Bind Abbr) v t)))).(\lambda (w: +T).(\lambda (H0: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THead (Bind +Abbr) v t) H) in (let H1 \def H_x in (land_ind (sn3 c u) (sn3 c (THead (Bind +Abbr) v t)) (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind +Abst) w t)))) (\lambda (H2: (sn3 c u)).(\lambda (H3: (sn3 c (THead (Bind +Abbr) v t))).(sn3_appl_appl v (THead (Bind Abst) w t) c (sn3_beta c v t H3 w +H0) u H2 (\lambda (u2: T).(\lambda (H4: (pr3 c (THead (Flat Appl) v (THead +(Bind Abst) w t)) u2)).(\lambda (H5: (((iso (THead (Flat Appl) v (THead (Bind +Abst) w t)) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat +Appl) u (THead (Bind Abbr) v t)) H (THead (Flat Appl) u u2) (pr3_thin_dx c +(THead (Bind Abbr) v t) u2 (pr3_iso_beta v w t c u2 H4 H5) u Appl)))))))) +H1))))))))). + +theorem sn3_appl_appls: + \forall (v1: T).(\forall (t1: T).(\forall (vs: TList).(let u1 \def (THeads +(Flat Appl) (TCons v1 vs) t1) in (\forall (c: C).((sn3 c u1) \to (\forall +(v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) +\to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to +(sn3 c (THead (Flat Appl) v2 u1)))))))))) +\def + \lambda (v1: T).(\lambda (t1: T).(\lambda (vs: TList).(let u1 \def (THeads +(Flat Appl) (TCons v1 vs) t1) in (\lambda (c: C).(\lambda (H: (sn3 c (THead +(Flat Appl) v1 (THeads (Flat Appl) vs t1)))).(\lambda (v2: T).(\lambda (H0: +(sn3 c v2)).(\lambda (H1: ((\forall (u2: T).((pr3 c (THead (Flat Appl) v1 +(THeads (Flat Appl) vs t1)) u2) \to ((((iso (THead (Flat Appl) v1 (THeads +(Flat Appl) vs t1)) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat +Appl) v2 u2))))))).(sn3_appl_appl v1 (THeads (Flat Appl) vs t1) c H v2 H0 +H1))))))))). + +lemma sn3_appls_lref: + \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (us: +TList).((sns3 c us) \to (sn3 c (THeads (Flat Appl) us (TLRef i))))))) +\def + \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda +(us: TList).(TList_ind (\lambda (t: TList).((sns3 c t) \to (sn3 c (THeads +(Flat Appl) t (TLRef i))))) (\lambda (_: True).(sn3_nf2 c (TLRef i) H)) +(\lambda (t: T).(\lambda (t0: TList).(TList_ind (\lambda (t1: TList).((((sns3 +c t1) \to (sn3 c (THeads (Flat Appl) t1 (TLRef i))))) \to ((land (sn3 c t) +(sns3 c t1)) \to (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 (TLRef +i))))))) (\lambda (_: (((sns3 c TNil) \to (sn3 c (THeads (Flat Appl) TNil +(TLRef i)))))).(\lambda (H1: (land (sn3 c t) (sns3 c TNil))).(let H2 \def H1 +in (land_ind (sn3 c t) True (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) +TNil (TLRef i)))) (\lambda (H3: (sn3 c t)).(\lambda (_: True).(sn3_appl_lref +c i H t H3))) H2)))) (\lambda (t1: T).(\lambda (t2: TList).(\lambda (_: +(((((sns3 c t2) \to (sn3 c (THeads (Flat Appl) t2 (TLRef i))))) \to ((land +(sn3 c t) (sns3 c t2)) \to (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t2 +(TLRef i)))))))).(\lambda (H1: (((sns3 c (TCons t1 t2)) \to (sn3 c (THeads +(Flat Appl) (TCons t1 t2) (TLRef i)))))).(\lambda (H2: (land (sn3 c t) (sns3 +c (TCons t1 t2)))).(let H3 \def H2 in (land_ind (sn3 c t) (land (sn3 c t1) +(sns3 c t2)) (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) +(TLRef i)))) (\lambda (H4: (sn3 c t)).(\lambda (H5: (land (sn3 c t1) (sns3 c +t2))).(land_ind (sn3 c t1) (sns3 c t2) (sn3 c (THead (Flat Appl) t (THeads +(Flat Appl) (TCons t1 t2) (TLRef i)))) (\lambda (H6: (sn3 c t1)).(\lambda +(H7: (sns3 c t2)).(sn3_appl_appls t1 (TLRef i) t2 c (H1 (conj (sn3 c t1) +(sns3 c t2) H6 H7)) t H4 (\lambda (u2: T).(\lambda (H8: (pr3 c (THeads (Flat +Appl) (TCons t1 t2) (TLRef i)) u2)).(\lambda (H9: (((iso (THeads (Flat Appl) +(TCons t1 t2) (TLRef i)) u2) \to (\forall (P: Prop).P)))).(H9 +(nf2_iso_appls_lref c i H (TCons t1 t2) u2 H8) (sn3 c (THead (Flat Appl) t +u2))))))))) H5))) H3))))))) t0))) us)))). + +theorem sn3_appls_cast: + \forall (c: C).(\forall (vs: TList).(\forall (u: T).((sn3 c (THeads (Flat +Appl) vs u)) \to (\forall (t: T).((sn3 c (THeads (Flat Appl) vs t)) \to (sn3 +c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))) +\def + \lambda (c: C).(\lambda (vs: TList).(TList_ind (\lambda (t: TList).(\forall +(u: T).((sn3 c (THeads (Flat Appl) t u)) \to (\forall (t0: T).((sn3 c (THeads +(Flat Appl) t t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Flat Cast) u +t0)))))))) (\lambda (u: T).(\lambda (H: (sn3 c u)).(\lambda (t: T).(\lambda +(H0: (sn3 c t)).(sn3_cast c u H t H0))))) (\lambda (t: T).(\lambda (t0: +TList).(TList_ind (\lambda (t1: TList).(((\forall (u: T).((sn3 c (THeads +(Flat Appl) t1 u)) \to (\forall (t2: T).((sn3 c (THeads (Flat Appl) t1 t2)) +\to (sn3 c (THeads (Flat Appl) t1 (THead (Flat Cast) u t2)))))))) \to +(\forall (u: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 u))) \to +(\forall (t2: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 t2))) +\to (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t1 (THead (Flat Cast) u +t2)))))))))) (\lambda (_: ((\forall (u: T).((sn3 c (THeads (Flat Appl) TNil +u)) \to (\forall (t1: T).((sn3 c (THeads (Flat Appl) TNil t1)) \to (sn3 c +(THeads (Flat Appl) TNil (THead (Flat Cast) u t1))))))))).(\lambda (u: +T).(\lambda (H0: (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) TNil +u)))).(\lambda (t1: T).(\lambda (H1: (sn3 c (THead (Flat Appl) t (THeads +(Flat Appl) TNil t1)))).(sn3_appl_cast c t u H0 t1 H1)))))) (\lambda (t1: +T).(\lambda (t2: TList).(\lambda (_: ((((\forall (u: T).((sn3 c (THeads (Flat +Appl) t2 u)) \to (\forall (t3: T).((sn3 c (THeads (Flat Appl) t2 t3)) \to +(sn3 c (THeads (Flat Appl) t2 (THead (Flat Cast) u t3)))))))) \to (\forall +(u: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t2 u))) \to (\forall +(t3: T).((sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t2 t3))) \to (sn3 c +(THead (Flat Appl) t (THeads (Flat Appl) t2 (THead (Flat Cast) u +t3))))))))))).(\lambda (H0: ((\forall (u: T).((sn3 c (THeads (Flat Appl) +(TCons t1 t2) u)) \to (\forall (t3: T).((sn3 c (THeads (Flat Appl) (TCons t1 +t2) t3)) \to (sn3 c (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u +t3))))))))).(\lambda (u: T).(\lambda (H1: (sn3 c (THead (Flat Appl) t (THeads +(Flat Appl) (TCons t1 t2) u)))).(\lambda (t3: T).(\lambda (H2: (sn3 c (THead +(Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) t3)))).(let H_x \def +(sn3_gen_flat Appl c t (THeads (Flat Appl) (TCons t1 t2) t3) H2) in (let H3 +\def H_x in (land_ind (sn3 c t) (sn3 c (THead (Flat Appl) t1 (THeads (Flat +Appl) t2 t3))) (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) +(THead (Flat Cast) u t3)))) (\lambda (_: (sn3 c t)).(\lambda (H5: (sn3 c +(THead (Flat Appl) t1 (THeads (Flat Appl) t2 t3)))).(let H6 \def H5 in (let +H_x0 \def (sn3_gen_flat Appl c t (THeads (Flat Appl) (TCons t1 t2) u) H1) in +(let H7 \def H_x0 in (land_ind (sn3 c t) (sn3 c (THead (Flat Appl) t1 (THeads +(Flat Appl) t2 u))) (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 +t2) (THead (Flat Cast) u t3)))) (\lambda (H8: (sn3 c t)).(\lambda (H9: (sn3 c +(THead (Flat Appl) t1 (THeads (Flat Appl) t2 u)))).(let H10 \def H9 in +(sn3_appl_appls t1 (THead (Flat Cast) u t3) t2 c (H0 u H10 t3 H6) t H8 +(\lambda (u2: T).(\lambda (H11: (pr3 c (THeads (Flat Appl) (TCons t1 t2) +(THead (Flat Cast) u t3)) u2)).(\lambda (H12: (((iso (THeads (Flat Appl) +(TCons t1 t2) (THead (Flat Cast) u t3)) u2) \to (\forall (P: +Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t (THeads (Flat Appl) (TCons +t1 t2) t3)) H2 (THead (Flat Appl) t u2) (pr3_thin_dx c (THeads (Flat Appl) +(TCons t1 t2) t3) u2 (pr3_iso_appls_cast c u t3 (TCons t1 t2) u2 H11 H12) t +Appl))))))))) H7)))))) H3))))))))))) t0))) vs)). + +theorem sn3_appls_bind: + \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: +T).((sn3 c u) \to (\forall (vs: TList).(\forall (t: T).((sn3 (CHead c (Bind +b) u) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to (sn3 c (THeads (Flat +Appl) vs (THead (Bind b) u t)))))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda +(u: T).(\lambda (H0: (sn3 c u)).(\lambda (vs: TList).(TList_ind (\lambda (t: +TList).(\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) (lifts +(S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u t0)))))) +(\lambda (t: T).(\lambda (H1: (sn3 (CHead c (Bind b) u) t)).(sn3_bind b c u +H0 t H1))) (\lambda (v: T).(\lambda (vs0: TList).(TList_ind (\lambda (t: +TList).(((\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) +(lifts (S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u +t0)))))) \to (\forall (t0: T).((sn3 (CHead c (Bind b) u) (THead (Flat Appl) +(lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t) t0))) \to (sn3 c +(THead (Flat Appl) v (THeads (Flat Appl) t (THead (Bind b) u t0)))))))) +(\lambda (_: ((\forall (t: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) +(lifts (S O) O TNil) t)) \to (sn3 c (THeads (Flat Appl) TNil (THead (Bind b) +u t))))))).(\lambda (t: T).(\lambda (H2: (sn3 (CHead c (Bind b) u) (THead +(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O TNil) +t)))).(sn3_appl_bind b H c u H0 t v H2)))) (\lambda (t: T).(\lambda (t0: +TList).(\lambda (_: ((((\forall (t1: T).((sn3 (CHead c (Bind b) u) (THeads +(Flat Appl) (lifts (S O) O t0) t1)) \to (sn3 c (THeads (Flat Appl) t0 (THead +(Bind b) u t1)))))) \to (\forall (t1: T).((sn3 (CHead c (Bind b) u) (THead +(Flat Appl) (lift (S O) O v) (THeads (Flat Appl) (lifts (S O) O t0) t1))) \to +(sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (THead (Bind b) u +t1))))))))).(\lambda (H2: ((\forall (t1: T).((sn3 (CHead c (Bind b) u) +(THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)) \to (sn3 c (THeads +(Flat Appl) (TCons t t0) (THead (Bind b) u t1))))))).(\lambda (t1: +T).(\lambda (H3: (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O +v) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)))).(let H_x \def +(sn3_gen_flat Appl (CHead c (Bind b) u) (lift (S O) O v) (THeads (Flat Appl) +(lifts (S O) O (TCons t t0)) t1) H3) in (let H4 \def H_x in (land_ind (sn3 +(CHead c (Bind b) u) (lift (S O) O v)) (sn3 (CHead c (Bind b) u) (THead (Flat +Appl) (lift (S O) O t) (THeads (Flat Appl) (lifts (S O) O t0) t1))) (sn3 c +(THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (THead (Bind b) u +t1)))) (\lambda (H5: (sn3 (CHead c (Bind b) u) (lift (S O) O v))).(\lambda +(H6: (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O t) (THeads +(Flat Appl) (lifts (S O) O t0) t1)))).(let H_y \def (sn3_gen_lift (CHead c +(Bind b) u) v (S O) O H5 c) in (sn3_appl_appls t (THead (Bind b) u t1) t0 c +(H2 t1 H6) v (H_y (drop_drop (Bind b) O c c (drop_refl c) u)) (\lambda (u2: +T).(\lambda (H7: (pr3 c (THeads (Flat Appl) (TCons t t0) (THead (Bind b) u +t1)) u2)).(\lambda (H8: (((iso (THeads (Flat Appl) (TCons t t0) (THead (Bind +b) u t1)) u2) \to (\forall (P: Prop).P)))).(let H9 \def (pr3_iso_appls_bind b +H (TCons t t0) u t1 c u2 H7 H8) in (sn3_pr3_trans c (THead (Flat Appl) v +(THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1))) +(sn3_appl_bind b H c u H0 (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) +t1) v H3) (THead (Flat Appl) v u2) (pr3_flat c v v (pr3_refl c v) (THead +(Bind b) u (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)) u2 H9 +Appl)))))))))) H4))))))))) vs0))) vs)))))). + +theorem sn3_appls_beta: + \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (us: TList).((sn3 c +(THeads (Flat Appl) us (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c +w) \to (sn3 c (THeads (Flat Appl) us (THead (Flat Appl) v (THead (Bind Abst) +w t)))))))))) +\def + \lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (us: +TList).(TList_ind (\lambda (t0: TList).((sn3 c (THeads (Flat Appl) t0 (THead +(Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) (\lambda (H: +(sn3 c (THead (Bind Abbr) v t))).(\lambda (w: T).(\lambda (H0: (sn3 c +w)).(sn3_beta c v t H w H0)))) (\lambda (u: T).(\lambda (us0: +TList).(TList_ind (\lambda (t0: TList).((((sn3 c (THeads (Flat Appl) t0 +(THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads +(Flat Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 +c (THead (Flat Appl) u (THeads (Flat Appl) t0 (THead (Bind Abbr) v t)))) \to +(\forall (w: T).((sn3 c w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat +Appl) t0 (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))) (\lambda (_: +(((sn3 c (THeads (Flat Appl) TNil (THead (Bind Abbr) v t))) \to (\forall (w: +T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) TNil (THead (Flat Appl) v (THead +(Bind Abst) w t))))))))).(\lambda (H0: (sn3 c (THead (Flat Appl) u (THeads +(Flat Appl) TNil (THead (Bind Abbr) v t))))).(\lambda (w: T).(\lambda (H1: +(sn3 c w)).(sn3_appl_beta c u v t H0 w H1))))) (\lambda (t0: T).(\lambda (t1: +TList).(\lambda (_: (((((sn3 c (THeads (Flat Appl) t1 (THead (Bind Abbr) v +t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) t1 (THead +(Flat Appl) v (THead (Bind Abst) w t)))))))) \to ((sn3 c (THead (Flat Appl) u +(THeads (Flat Appl) t1 (THead (Bind Abbr) v t)))) \to (\forall (w: T).((sn3 c +w) \to (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) t1 (THead (Flat Appl) +v (THead (Bind Abst) w t))))))))))).(\lambda (H0: (((sn3 c (THeads (Flat +Appl) (TCons t0 t1) (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) +\to (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead +(Bind Abst) w t))))))))).(\lambda (H1: (sn3 c (THead (Flat Appl) u (THeads +(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t))))).(\lambda (w: +T).(\lambda (H2: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THeads +(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t)) H1) in (let H3 \def H_x in +(land_ind (sn3 c u) (sn3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(THead (Bind Abbr) v t)))) (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) +(TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H4: +(sn3 c u)).(\lambda (H5: (sn3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(THead (Bind Abbr) v t))))).(sn3_appl_appls t0 (THead (Flat Appl) v (THead +(Bind Abst) w t)) t1 c (H0 H5 w H2) u H4 (\lambda (u2: T).(\lambda (H6: (pr3 +c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w +t))) u2)).(\lambda (H7: (((iso (THeads (Flat Appl) (TCons t0 t1) (THead (Flat +Appl) v (THead (Bind Abst) w t))) u2) \to (\forall (P: Prop).P)))).(let H8 +\def (pr3_iso_appls_beta (TCons t0 t1) v w t c u2 H6 H7) in (sn3_pr3_trans c +(THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v +t))) H1 (THead (Flat Appl) u u2) (pr3_thin_dx c (THeads (Flat Appl) (TCons t0 +t1) (THead (Bind Abbr) v t)) u2 H8 u Appl))))))))) H3)))))))))) us0))) us)))). + +lemma sn3_lift: + \forall (d: C).(\forall (t: T).((sn3 d t) \to (\forall (c: C).(\forall (h: +nat).(\forall (i: nat).((drop h i c d) \to (sn3 c (lift h i t)))))))) +\def + \lambda (d: C).(\lambda (t: T).(\lambda (H: (sn3 d t)).(sn3_ind d (\lambda +(t0: T).(\forall (c: C).(\forall (h: nat).(\forall (i: nat).((drop h i c d) +\to (sn3 c (lift h i t0))))))) (\lambda (t1: T).(\lambda (_: ((\forall (t2: +T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 d t1 t2) \to (sn3 d +t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: +Prop).P))) \to ((pr3 d t1 t2) \to (\forall (c: C).(\forall (h: nat).(\forall +(i: nat).((drop h i c d) \to (sn3 c (lift h i t2))))))))))).(\lambda (c: +C).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H2: (drop h i c +d)).(sn3_pr2_intro c (lift h i t1) (\lambda (t2: T).(\lambda (H3: (((eq T +(lift h i t1) t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr2 c (lift h i +t1) t2)).(let H5 \def (pr2_gen_lift c t1 t2 h i H4 d H2) in (ex2_ind T +(\lambda (t3: T).(eq T t2 (lift h i t3))) (\lambda (t3: T).(pr2 d t1 t3)) +(sn3 c t2) (\lambda (x: T).(\lambda (H6: (eq T t2 (lift h i x))).(\lambda +(H7: (pr2 d t1 x)).(let H8 \def (eq_ind T t2 (\lambda (t0: T).((eq T (lift h +i t1) t0) \to (\forall (P: Prop).P))) H3 (lift h i x) H6) in (eq_ind_r T +(lift h i x) (\lambda (t0: T).(sn3 c t0)) (H1 x (\lambda (H9: (eq T t1 +x)).(\lambda (P: Prop).(let H10 \def (eq_ind_r T x (\lambda (t0: T).((eq T +(lift h i t1) (lift h i t0)) \to (\forall (P0: Prop).P0))) H8 t1 H9) in (let +H11 \def (eq_ind_r T x (\lambda (t0: T).(pr2 d t1 t0)) H7 t1 H9) in (H10 +(refl_equal T (lift h i t1)) P))))) (pr3_pr2 d t1 x H7) c h i H2) t2 H6))))) +H5))))))))))))) t H))). + +lemma sn3_abbr: + \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) v)) \to ((sn3 d v) \to (sn3 c (TLRef i))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 d +v)).(sn3_pr2_intro c (TLRef i) (\lambda (t2: T).(\lambda (H1: (((eq T (TLRef +i) t2) \to (\forall (P: Prop).P)))).(\lambda (H2: (pr2 c (TLRef i) t2)).(let +H3 \def (pr2_gen_lref c t2 i H2) in (or_ind (eq T t2 (TLRef i)) (ex2_2 C T +(\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) +(\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u))))) (sn3 c t2) +(\lambda (H4: (eq T t2 (TLRef i))).(let H5 \def (eq_ind T t2 (\lambda (t: +T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H4) in +(eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c t)) (H5 (refl_equal T (TLRef i)) +(sn3 c (TLRef i))) t2 H4))) (\lambda (H4: (ex2_2 C T (\lambda (d0: +C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda +(d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: +C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))) (sn3 c t2) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H5: (getl i c (CHead x0 (Bind Abbr) +x1))).(\lambda (H6: (eq T t2 (lift (S i) O x1))).(let H7 \def (eq_ind T t2 +(\lambda (t: T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (lift (S +i) O x1) H6) in (eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(sn3 c t)) (let +H8 \def (eq_ind C (CHead d (Bind Abbr) v) (\lambda (c0: C).(getl i c c0)) H +(CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 +(Bind Abbr) x1) H5)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d +(Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) +i H (CHead x0 (Bind Abbr) x1) H5)) in ((let H10 \def (f_equal C T (\lambda +(e: C).(match e with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow +t])) (CHead d (Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d +(Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in (\lambda (H11: (eq C d +x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c (CHead x0 (Bind +Abbr) t))) H8 v H10) in (eq_ind T v (\lambda (t: T).(sn3 c (lift (S i) O t))) +(let H13 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) +v))) H12 d H11) in (sn3_lift d v H0 c (S i) O (getl_drop Abbr c d v i H13))) +x1 H10)))) H9))) t2 H6)))))) H4)) H3))))))))))). + +lemma sn3_appls_abbr: + \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) w)) \to (\forall (vs: TList).((sn3 c (THeads (Flat Appl) +vs (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) vs (TLRef i))))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (w: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) w))).(\lambda (vs: TList).(TList_ind +(\lambda (t: TList).((sn3 c (THeads (Flat Appl) t (lift (S i) O w))) \to (sn3 +c (THeads (Flat Appl) t (TLRef i))))) (\lambda (H0: (sn3 c (lift (S i) O +w))).(let H_y \def (sn3_gen_lift c w (S i) O H0 d (getl_drop Abbr c d w i H)) +in (sn3_abbr c d w i H H_y))) (\lambda (v: T).(\lambda (vs0: +TList).(TList_ind (\lambda (t: TList).((((sn3 c (THeads (Flat Appl) t (lift +(S i) O w))) \to (sn3 c (THeads (Flat Appl) t (TLRef i))))) \to ((sn3 c +(THead (Flat Appl) v (THeads (Flat Appl) t (lift (S i) O w)))) \to (sn3 c +(THead (Flat Appl) v (THeads (Flat Appl) t (TLRef i))))))) (\lambda (_: +(((sn3 c (THeads (Flat Appl) TNil (lift (S i) O w))) \to (sn3 c (THeads (Flat +Appl) TNil (TLRef i)))))).(\lambda (H1: (sn3 c (THead (Flat Appl) v (THeads +(Flat Appl) TNil (lift (S i) O w))))).(sn3_appl_abbr c d w i H v H1))) +(\lambda (t: T).(\lambda (t0: TList).(\lambda (_: (((((sn3 c (THeads (Flat +Appl) t0 (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) t0 (TLRef i))))) +\to ((sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (lift (S i) O w)))) +\to (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) t0 (TLRef +i)))))))).(\lambda (H1: (((sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) +O w))) \to (sn3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)))))).(\lambda +(H2: (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (lift (S i) +O w))))).(let H_x \def (sn3_gen_flat Appl c v (THeads (Flat Appl) (TCons t +t0) (lift (S i) O w)) H2) in (let H3 \def H_x in (land_ind (sn3 c v) (sn3 c +(THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O w)))) (sn3 c (THead +(Flat Appl) v (THeads (Flat Appl) (TCons t t0) (TLRef i)))) (\lambda (H4: +(sn3 c v)).(\lambda (H5: (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 +(lift (S i) O w))))).(sn3_appl_appls t (TLRef i) t0 c (H1 H5) v H4 (\lambda +(u2: T).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)) +u2)).(\lambda (H7: (((iso (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2) \to +(\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) v (THeads (Flat +Appl) (TCons t t0) (lift (S i) O w))) H2 (THead (Flat Appl) v u2) +(pr3_thin_dx c (THeads (Flat Appl) (TCons t t0) (lift (S i) O w)) u2 +(pr3_iso_appls_abbr c d w i H (TCons t t0) u2 H6 H7) v Appl)))))))) +H3)))))))) vs0))) vs)))))). + +lemma sns3_lifts: + \forall (c: C).(\forall (d: C).(\forall (h: nat).(\forall (i: nat).((drop h +i c d) \to (\forall (ts: TList).((sns3 d ts) \to (sns3 c (lifts h i ts)))))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (h: nat).(\lambda (i: nat).(\lambda +(H: (drop h i c d)).(\lambda (ts: TList).(TList_ind (\lambda (t: +TList).((sns3 d t) \to (sns3 c (lifts h i t)))) (\lambda (H0: True).H0) +(\lambda (t: T).(\lambda (t0: TList).(\lambda (H0: (((sns3 d t0) \to (sns3 c +(lifts h i t0))))).(\lambda (H1: (land (sn3 d t) (sns3 d t0))).(let H2 \def +H1 in (land_ind (sn3 d t) (sns3 d t0) (land (sn3 c (lift h i t)) (sns3 c +(lifts h i t0))) (\lambda (H3: (sn3 d t)).(\lambda (H4: (sns3 d t0)).(conj +(sn3 c (lift h i t)) (sns3 c (lifts h i t0)) (sn3_lift d t H3 c h i H) (H0 +H4)))) H2)))))) ts)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/spare.ma b/matita/matita/contribs/lambdadelta/basic_1A/spare.ma new file mode 100644 index 000000000..372b4f4b1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/spare.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/theory.ma". + +axiom pc3_gen_appls_sort_abst: + \forall (c: C).(\forall (vs: TList).(\forall (w: T).(\forall (u: T).(\forall +(n: nat).((pc3 c (THeads (Flat Appl) vs (TSort n)) (THead (Bind Abst) w u)) +\to False))))) +. + +axiom pc3_gen_appls_lref_abst: + \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abst) v)) \to (\forall (vs: TList).(\forall (w: T).(\forall +(u: T).((pc3 c (THeads (Flat Appl) vs (TLRef i)) (THead (Bind Abst) w u)) \to +False)))))))) +. + +axiom pc3_gen_appls_lref_sort: + \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abst) v)) \to (\forall (vs: TList).(\forall (ws: +TList).(\forall (n: nat).((pc3 c (THeads (Flat Appl) vs (TLRef i)) (THeads +(Flat Appl) ws (TSort n))) \to False)))))))) +. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sty0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty0/defs.ma new file mode 100644 index 000000000..b197b3c3c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty0/defs.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/G/defs.ma". + +include "basic_1A/getl/defs.ma". + +inductive sty0 (g: G): C \to (T \to (T \to Prop)) \def +| sty0_sort: \forall (c: C).(\forall (n: nat).(sty0 g c (TSort n) (TSort +(next g n)))) +| sty0_abbr: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abbr) v)) \to (\forall (w: T).((sty0 g d v w) +\to (sty0 g c (TLRef i) (lift (S i) O w)))))))) +| sty0_abst: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abst) v)) \to (\forall (w: T).((sty0 g d v w) +\to (sty0 g c (TLRef i) (lift (S i) O v)))))))) +| sty0_bind: \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: +T).(\forall (t2: T).((sty0 g (CHead c (Bind b) v) t1 t2) \to (sty0 g c (THead +(Bind b) v t1) (THead (Bind b) v t2))))))) +| sty0_appl: \forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall (t2: +T).((sty0 g c t1 t2) \to (sty0 g c (THead (Flat Appl) v t1) (THead (Flat +Appl) v t2)))))) +| sty0_cast: \forall (c: C).(\forall (v1: T).(\forall (v2: T).((sty0 g c v1 +v2) \to (\forall (t1: T).(\forall (t2: T).((sty0 g c t1 t2) \to (sty0 g c +(THead (Flat Cast) v1 t1) (THead (Flat Cast) v2 t2)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sty0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty0/fwd.ma new file mode 100644 index 000000000..951d79ade --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty0/fwd.ma @@ -0,0 +1,553 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sty0/defs.ma". + +implied rec lemma sty0_ind (g: G) (P: (C \to (T \to (T \to Prop)))) (f: +(\forall (c: C).(\forall (n: nat).(P c (TSort n) (TSort (next g n)))))) (f0: +(\forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) v)) \to (\forall (w: T).((sty0 g d v w) \to ((P d v w) +\to (P c (TLRef i) (lift (S i) O w))))))))))) (f1: (\forall (c: C).(\forall +(d: C).(\forall (v: T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) v)) +\to (\forall (w: T).((sty0 g d v w) \to ((P d v w) \to (P c (TLRef i) (lift +(S i) O v))))))))))) (f2: (\forall (b: B).(\forall (c: C).(\forall (v: +T).(\forall (t1: T).(\forall (t2: T).((sty0 g (CHead c (Bind b) v) t1 t2) \to +((P (CHead c (Bind b) v) t1 t2) \to (P c (THead (Bind b) v t1) (THead (Bind +b) v t2)))))))))) (f3: (\forall (c: C).(\forall (v: T).(\forall (t1: +T).(\forall (t2: T).((sty0 g c t1 t2) \to ((P c t1 t2) \to (P c (THead (Flat +Appl) v t1) (THead (Flat Appl) v t2))))))))) (f4: (\forall (c: C).(\forall +(v1: T).(\forall (v2: T).((sty0 g c v1 v2) \to ((P c v1 v2) \to (\forall (t1: +T).(\forall (t2: T).((sty0 g c t1 t2) \to ((P c t1 t2) \to (P c (THead (Flat +Cast) v1 t1) (THead (Flat Cast) v2 t2)))))))))))) (c: C) (t: T) (t0: T) (s0: +sty0 g c t t0) on s0: P c t t0 \def match s0 with [(sty0_sort c0 n) +\Rightarrow (f c0 n) | (sty0_abbr c0 d v i g0 w s1) \Rightarrow (f0 c0 d v i +g0 w s1 ((sty0_ind g P f f0 f1 f2 f3 f4) d v w s1)) | (sty0_abst c0 d v i g0 +w s1) \Rightarrow (f1 c0 d v i g0 w s1 ((sty0_ind g P f f0 f1 f2 f3 f4) d v w +s1)) | (sty0_bind b c0 v t1 t2 s1) \Rightarrow (f2 b c0 v t1 t2 s1 ((sty0_ind +g P f f0 f1 f2 f3 f4) (CHead c0 (Bind b) v) t1 t2 s1)) | (sty0_appl c0 v t1 +t2 s1) \Rightarrow (f3 c0 v t1 t2 s1 ((sty0_ind g P f f0 f1 f2 f3 f4) c0 t1 +t2 s1)) | (sty0_cast c0 v1 v2 s1 t1 t2 s2) \Rightarrow (f4 c0 v1 v2 s1 +((sty0_ind g P f f0 f1 f2 f3 f4) c0 v1 v2 s1) t1 t2 s2 ((sty0_ind g P f f0 f1 +f2 f3 f4) c0 t1 t2 s2))]. + +lemma sty0_gen_sort: + \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((sty0 g c +(TSort n) x) \to (eq T x (TSort (next g n))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda +(H: (sty0 g c (TSort n) x)).(insert_eq T (TSort n) (\lambda (t: T).(sty0 g c +t x)) (\lambda (_: T).(eq T x (TSort (next g n)))) (\lambda (y: T).(\lambda +(H0: (sty0 g c y x)).(sty0_ind g (\lambda (_: C).(\lambda (t: T).(\lambda +(t0: T).((eq T t (TSort n)) \to (eq T t0 (TSort (next g n))))))) (\lambda (_: +C).(\lambda (n0: nat).(\lambda (H1: (eq T (TSort n0) (TSort n))).(let H2 \def +(f_equal T nat (\lambda (e: T).(match e with [(TSort n1) \Rightarrow n1 | +(TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort +n) H1) in (eq_ind_r nat n (\lambda (n1: nat).(eq T (TSort (next g n1)) (TSort +(next g n)))) (refl_equal T (TSort (next g n))) n0 H2))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v +w)).(\lambda (_: (((eq T v (TSort n)) \to (eq T w (TSort (next g +n)))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T +(TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) +H4) in (False_ind (eq T (lift (S i) O w) (TSort (next g n))) H5))))))))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(_: (getl i c0 (CHead d (Bind Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g +d v w)).(\lambda (_: (((eq T v (TSort n)) \to (eq T w (TSort (next g +n)))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T +(TLRef i) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) +H4) in (False_ind (eq T (lift (S i) O v) (TSort (next g n))) H5))))))))))) +(\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) v) t1 t2)).(\lambda (_: (((eq +T t1 (TSort n)) \to (eq T t2 (TSort (next g n)))))).(\lambda (H3: (eq T +(THead (Bind b) v t1) (TSort n))).(let H4 \def (eq_ind T (THead (Bind b) v +t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in +(False_ind (eq T (THead (Bind b) v t2) (TSort (next g n))) H4)))))))))) +(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(_: (sty0 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 (TSort +(next g n)))))).(\lambda (H3: (eq T (THead (Flat Appl) v t1) (TSort n))).(let +H4 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TSort n) H3) in (False_ind (eq T (THead (Flat Appl) v +t2) (TSort (next g n))) H4))))))))) (\lambda (c0: C).(\lambda (v1: +T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 v2)).(\lambda (_: (((eq T v1 +(TSort n)) \to (eq T v2 (TSort (next g n)))))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (sty0 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq +T t2 (TSort (next g n)))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t1) +(TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (eq T +(THead (Flat Cast) v2 t2) (TSort (next g n))) H6)))))))))))) c y x H0))) +H))))). + +lemma sty0_gen_lref: + \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((sty0 g c +(TLRef n) x) \to (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T x (lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda +(u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq T x (lift (S n) O u))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda +(H: (sty0 g c (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(sty0 g c +t x)) (\lambda (_: T).(or (ex3_3 C T T (\lambda (e: C).(\lambda (u: +T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t0: T).(sty0 g e u t0)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(eq T x (lift (S n) O t0)))))) (ex3_3 C T +T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind +Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(sty0 g e u +t0)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T x (lift (S n) O +u)))))))) (\lambda (y: T).(\lambda (H0: (sty0 g c y x)).(sty0_ind g (\lambda +(c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (ex3_3 C +T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(sty0 g e u +t1)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t1: T).(eq T t0 (lift (S n) +O t1)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda +(t1: T).(sty0 g e u t1)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq T t0 (lift (S n) O u))))))))))) (\lambda (c0: C).(\lambda (n0: +nat).(\lambda (H1: (eq T (TSort n0) (TLRef n))).(let H2 \def (eq_ind T (TSort +n0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H1) in +(False_ind (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T (TSort (next g n0)) (lift (S n) O t)))))) (ex3_3 C T T (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq T (TSort (next g n0)) (lift (S n) +O u))))))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda +(i: nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abbr) v))).(\lambda (w: +T).(\lambda (H2: (sty0 g d v w)).(\lambda (_: (((eq T v (TLRef n)) \to (or +(ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead +e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g +e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T w (lift (S n) +O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: +T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T w +(lift (S n) O u)))))))))).(\lambda (H4: (eq T (TLRef i) (TLRef n))).(let H5 +\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i | +(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef +n) H4) in (let H6 \def (eq_ind nat i (\lambda (n0: nat).(getl n0 c0 (CHead d +(Bind Abbr) v))) H1 n H5) in (eq_ind_r nat n (\lambda (n0: nat).(or (ex3_3 C +T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n0) O w) +(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (lift (S n0) O w) (lift (S n) O u)))))))) (or_introl (ex3_3 C T +T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n) O w) +(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (lift (S n) O w) (lift (S n) O u)))))) (ex3_3_intro C T T +(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n) O w) +(lift (S n) O t))))) d v w H6 H2 (refl_equal T (lift (S n) O w)))) i +H5)))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(\lambda (H1: (getl i c0 (CHead d (Bind Abst) v))).(\lambda (w: +T).(\lambda (H2: (sty0 g d v w)).(\lambda (_: (((eq T v (TLRef n)) \to (or +(ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead +e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g +e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T w (lift (S n) +O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: +T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T w +(lift (S n) O u)))))))))).(\lambda (H4: (eq T (TLRef i) (TLRef n))).(let H5 +\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i | +(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef +n) H4) in (let H6 \def (eq_ind nat i (\lambda (n0: nat).(getl n0 c0 (CHead d +(Bind Abst) v))) H1 n H5) in (eq_ind_r nat n (\lambda (n0: nat).(or (ex3_3 C +T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n0) O v) +(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (lift (S n0) O v) (lift (S n) O u)))))))) (or_intror (ex3_3 C T +T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n) O v) +(lift (S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (lift (S n) O v) (lift (S n) O u)))))) (ex3_3_intro C T T +(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u +t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T (lift (S n) O v) +(lift (S n) O u))))) d v w H6 H2 (refl_equal T (lift (S n) O v)))) i +H5)))))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) v) t1 +t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) v) (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e +u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T t2 (lift (S n) +O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n (CHead c0 (Bind b) v) (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda +(u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq T t2 (lift (S n) O u)))))))))).(\lambda (H3: (eq T +(THead (Bind b) v t1) (TLRef n))).(let H4 \def (eq_ind T (THead (Bind b) v +t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in +(False_ind (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T (THead (Bind b) v t2) (lift (S n) O t)))))) (ex3_3 C T T +(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u +t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T (THead (Bind b) v +t2) (lift (S n) O u))))))) H4)))))))))) (\lambda (c0: C).(\lambda (v: +T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (sty0 g c0 t1 t2)).(\lambda +(_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: C).(\lambda (u: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda +(_: T).(\lambda (t: T).(eq T t2 (lift (S n) O t)))))) (ex3_3 C T T (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq T t2 (lift (S n) O +u)))))))))).(\lambda (H3: (eq T (THead (Flat Appl) v t1) (TLRef n))).(let H4 +\def (eq_ind T (THead (Flat Appl) v t1) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef n) H3) in (False_ind (or (ex3_3 C T T (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (t: T).(eq T (THead (Flat Appl) v t2) (lift +(S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (THead (Flat Appl) v t2) (lift (S n) O u))))))) H4))))))))) +(\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 +v2)).(\lambda (_: (((eq T v1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (t: T).(eq T v2 (lift (S n) O t)))))) (ex3_3 +C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e +u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T v2 (lift (S n) +O u)))))))))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (sty0 g c0 t1 +t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (t: T).(eq T t2 (lift (S n) O t)))))) (ex3_3 +C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e +u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T t2 (lift (S n) +O u)))))))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(let +H6 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(sty0 g e u t)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (t: T).(eq T (THead (Flat Cast) v2 t2) (lift +(S n) O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(sty0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (THead (Flat Cast) v2 t2) (lift (S n) O u))))))) H6)))))))))))) +c y x H0))) H))))). + +lemma sty0_gen_bind: + \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t1: +T).(\forall (x: T).((sty0 g c (THead (Bind b) u t1) x) \to (ex2 T (\lambda +(t2: T).(sty0 g (CHead c (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T x (THead +(Bind b) u t2)))))))))) +\def + \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (H: (sty0 g c (THead (Bind b) u t1) +x)).(insert_eq T (THead (Bind b) u t1) (\lambda (t: T).(sty0 g c t x)) +(\lambda (_: T).(ex2 T (\lambda (t2: T).(sty0 g (CHead c (Bind b) u) t1 t2)) +(\lambda (t2: T).(eq T x (THead (Bind b) u t2))))) (\lambda (y: T).(\lambda +(H0: (sty0 g c y x)).(sty0_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda +(t0: T).((eq T t (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g +(CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T t0 (THead (Bind b) u +t2)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) +(THead (Bind b) u t1))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H1) in (False_ind +(ex2 T (\lambda (t2: T).(sty0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: +T).(eq T (TSort (next g n)) (THead (Bind b) u t2)))) H2))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v +w)).(\lambda (_: (((eq T v (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: +T).(sty0 g (CHead d (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T w (THead (Bind +b) u t2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Bind b) u t1))).(let H5 +\def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Bind b) u t1) H4) in (False_ind (ex2 T (\lambda (t2: +T).(sty0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T (lift (S i) O +w) (THead (Bind b) u t2)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v w)).(\lambda (_: (((eq T +v (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g (CHead d (Bind +b) u) t1 t2)) (\lambda (t2: T).(eq T w (THead (Bind b) u t2))))))).(\lambda +(H4: (eq T (TLRef i) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef i) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) +H4) in (False_ind (ex2 T (\lambda (t2: T).(sty0 g (CHead c0 (Bind b) u) t1 +t2)) (\lambda (t2: T).(eq T (lift (S i) O v) (THead (Bind b) u t2)))) +H5))))))))))) (\lambda (b0: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (H1: (sty0 g (CHead c0 (Bind b0) v) t0 +t2)).(\lambda (H2: (((eq T t0 (THead (Bind b) u t1)) \to (ex2 T (\lambda (t3: +T).(sty0 g (CHead (CHead c0 (Bind b0) v) (Bind b) u) t1 t3)) (\lambda (t3: +T).(eq T t2 (THead (Bind b) u t3))))))).(\lambda (H3: (eq T (THead (Bind b0) +v t0) (THead (Bind b) u t1))).(let H4 \def (f_equal T B (\lambda (e: +T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | +(THead k _ _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) +\Rightarrow b0])])) (THead (Bind b0) v t0) (THead (Bind b) u t1) H3) in ((let +H5 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v | +(TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead (Bind b0) v +t0) (THead (Bind b) u t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | +(THead _ _ t) \Rightarrow t])) (THead (Bind b0) v t0) (THead (Bind b) u t1) +H3) in (\lambda (H7: (eq T v u)).(\lambda (H8: (eq B b0 b)).(let H9 \def +(eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind b) u t1)) \to (ex2 T +(\lambda (t3: T).(sty0 g (CHead (CHead c0 (Bind b0) v) (Bind b) u) t1 t3)) +(\lambda (t3: T).(eq T t2 (THead (Bind b) u t3)))))) H2 t1 H6) in (let H10 +\def (eq_ind T t0 (\lambda (t: T).(sty0 g (CHead c0 (Bind b0) v) t t2)) H1 t1 +H6) in (let H11 \def (eq_ind T v (\lambda (t: T).((eq T t1 (THead (Bind b) u +t1)) \to (ex2 T (\lambda (t3: T).(sty0 g (CHead (CHead c0 (Bind b0) t) (Bind +b) u) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3)))))) H9 u H7) +in (let H12 \def (eq_ind T v (\lambda (t: T).(sty0 g (CHead c0 (Bind b0) t) +t1 t2)) H10 u H7) in (eq_ind_r T u (\lambda (t: T).(ex2 T (\lambda (t3: +T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T (THead (Bind +b0) t t2) (THead (Bind b) u t3))))) (let H13 \def (eq_ind B b0 (\lambda (b1: +B).((eq T t1 (THead (Bind b) u t1)) \to (ex2 T (\lambda (t3: T).(sty0 g +(CHead (CHead c0 (Bind b1) u) (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T t2 +(THead (Bind b) u t3)))))) H11 b H8) in (let H14 \def (eq_ind B b0 (\lambda +(b1: B).(sty0 g (CHead c0 (Bind b1) u) t1 t2)) H12 b H8) in (eq_ind_r B b +(\lambda (b1: B).(ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 +t3)) (\lambda (t3: T).(eq T (THead (Bind b1) u t2) (THead (Bind b) u t3))))) +(ex_intro2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda +(t3: T).(eq T (THead (Bind b) u t2) (THead (Bind b) u t3))) t2 H14 +(refl_equal T (THead (Bind b) u t2))) b0 H8))) v H7)))))))) H5)) H4)))))))))) +(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda +(_: (sty0 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u t1)) \to +(ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: +T).(eq T t2 (THead (Bind b) u t3))))))).(\lambda (H3: (eq T (THead (Flat +Appl) v t0) (THead (Bind b) u t1))).(let H4 \def (eq_ind T (THead (Flat Appl) +v t0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef +_) \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) +H3) in (False_ind (ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 +t3)) (\lambda (t3: T).(eq T (THead (Flat Appl) v t2) (THead (Bind b) u t3)))) +H4))))))))) (\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: +(sty0 g c0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t1)) \to (ex2 T +(\lambda (t2: T).(sty0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T +v2 (THead (Bind b) u t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: +(sty0 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u t1)) \to (ex2 T +(\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T +t2 (THead (Bind b) u t3))))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t0) +(THead (Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t0) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) +H5) in (False_ind (ex2 T (\lambda (t3: T).(sty0 g (CHead c0 (Bind b) u) t1 +t3)) (\lambda (t3: T).(eq T (THead (Flat Cast) v2 t2) (THead (Bind b) u +t3)))) H6)))))))))))) c y x H0))) H))))))). + +lemma sty0_gen_appl: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (x: +T).((sty0 g c (THead (Flat Appl) u t1) x) \to (ex2 T (\lambda (t2: T).(sty0 g +c t1 t2)) (\lambda (t2: T).(eq T x (THead (Flat Appl) u t2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (x: +T).(\lambda (H: (sty0 g c (THead (Flat Appl) u t1) x)).(insert_eq T (THead +(Flat Appl) u t1) (\lambda (t: T).(sty0 g c t x)) (\lambda (_: T).(ex2 T +(\lambda (t2: T).(sty0 g c t1 t2)) (\lambda (t2: T).(eq T x (THead (Flat +Appl) u t2))))) (\lambda (y: T).(\lambda (H0: (sty0 g c y x)).(sty0_ind g +(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) +u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g c0 t1 t2)) (\lambda (t2: T).(eq T +t0 (THead (Flat Appl) u t2)))))))) (\lambda (c0: C).(\lambda (n: +nat).(\lambda (H1: (eq T (TSort n) (THead (Flat Appl) u t1))).(let H2 \def +(eq_ind T (TSort n) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I +(THead (Flat Appl) u t1) H1) in (False_ind (ex2 T (\lambda (t2: T).(sty0 g c0 +t1 t2)) (\lambda (t2: T).(eq T (TSort (next g n)) (THead (Flat Appl) u t2)))) +H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) v))).(\lambda (w: +T).(\lambda (_: (sty0 g d v w)).(\lambda (_: (((eq T v (THead (Flat Appl) u +t1)) \to (ex2 T (\lambda (t2: T).(sty0 g d t1 t2)) (\lambda (t2: T).(eq T w +(THead (Flat Appl) u t2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat +Appl) u t1))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ +_) \Rightarrow False])) I (THead (Flat Appl) u t1) H4) in (False_ind (ex2 T +(\lambda (t2: T).(sty0 g c0 t1 t2)) (\lambda (t2: T).(eq T (lift (S i) O w) +(THead (Flat Appl) u t2)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v w)).(\lambda (_: (((eq T +v (THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t2: T).(sty0 g d t1 t2)) +(\lambda (t2: T).(eq T w (THead (Flat Appl) u t2))))))).(\lambda (H4: (eq T +(TLRef i) (THead (Flat Appl) u t1))).(let H5 \def (eq_ind T (TLRef i) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u +t1) H4) in (False_ind (ex2 T (\lambda (t2: T).(sty0 g c0 t1 t2)) (\lambda +(t2: T).(eq T (lift (S i) O v) (THead (Flat Appl) u t2)))) H5))))))))))) +(\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda +(t2: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) v) t0 t2)).(\lambda (_: (((eq +T t0 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t3: T).(sty0 g (CHead c0 +(Bind b) v) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u +t3))))))).(\lambda (H3: (eq T (THead (Bind b) v t0) (THead (Flat Appl) u +t1))).(let H4 \def (eq_ind T (THead (Bind b) v t0) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ +_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) +\Rightarrow False])])) I (THead (Flat Appl) u t1) H3) in (False_ind (ex2 T +(\lambda (t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Bind b) v +t2) (THead (Flat Appl) u t3)))) H4)))))))))) (\lambda (c0: C).(\lambda (v: +T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: (sty0 g c0 t0 +t2)).(\lambda (H2: (((eq T t0 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda +(t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u +t3))))))).(\lambda (H3: (eq T (THead (Flat Appl) v t0) (THead (Flat Appl) u +t1))).(let H4 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) +(THead (Flat Appl) v t0) (THead (Flat Appl) u t1) H3) in ((let H5 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef +_) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v t0) +(THead (Flat Appl) u t1) H3) in (\lambda (H6: (eq T v u)).(let H7 \def +(eq_ind T t0 (\lambda (t: T).((eq T t (THead (Flat Appl) u t1)) \to (ex2 T +(\lambda (t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat +Appl) u t3)))))) H2 t1 H5) in (let H8 \def (eq_ind T t0 (\lambda (t: T).(sty0 +g c0 t t2)) H1 t1 H5) in (eq_ind_r T u (\lambda (t: T).(ex2 T (\lambda (t3: +T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Flat Appl) t t2) (THead +(Flat Appl) u t3))))) (ex_intro2 T (\lambda (t3: T).(sty0 g c0 t1 t3)) +(\lambda (t3: T).(eq T (THead (Flat Appl) u t2) (THead (Flat Appl) u t3))) t2 +H8 (refl_equal T (THead (Flat Appl) u t2))) v H6))))) H4))))))))) (\lambda +(c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 +v2)).(\lambda (_: (((eq T v1 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda +(t2: T).(sty0 g c0 t1 t2)) (\lambda (t2: T).(eq T v2 (THead (Flat Appl) u +t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (sty0 g c0 t0 +t2)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda +(t3: T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u +t3))))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t0) (THead (Flat Appl) u +t1))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t0) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat +f) \Rightarrow (match f with [Appl \Rightarrow False | Cast \Rightarrow +True])])])) I (THead (Flat Appl) u t1) H5) in (False_ind (ex2 T (\lambda (t3: +T).(sty0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Flat Cast) v2 t2) (THead +(Flat Appl) u t3)))) H6)))))))))))) c y x H0))) H)))))). + +lemma sty0_gen_cast: + \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (t1: T).(\forall +(x: T).((sty0 g c (THead (Flat Cast) v1 t1) x) \to (ex3_2 T T (\lambda (v2: +T).(\lambda (_: T).(sty0 g c v1 v2))) (\lambda (_: T).(\lambda (t2: T).(sty0 +g c t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) v2 +t2)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (v1: T).(\lambda (t1: T).(\lambda +(x: T).(\lambda (H: (sty0 g c (THead (Flat Cast) v1 t1) x)).(insert_eq T +(THead (Flat Cast) v1 t1) (\lambda (t: T).(sty0 g c t x)) (\lambda (_: +T).(ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(sty0 g c v1 v2))) (\lambda +(_: T).(\lambda (t2: T).(sty0 g c t1 t2))) (\lambda (v2: T).(\lambda (t2: +T).(eq T x (THead (Flat Cast) v2 t2)))))) (\lambda (y: T).(\lambda (H0: (sty0 +g c y x)).(sty0_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq +T t (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda (_: +T).(sty0 g c0 v1 v2))) (\lambda (_: T).(\lambda (t2: T).(sty0 g c0 t1 t2))) +(\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) v2 t2))))))))) +(\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Flat +Cast) v1 t1))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ +_) \Rightarrow False])) I (THead (Flat Cast) v1 t1) H1) in (False_ind (ex3_2 +T T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: +T).(\lambda (t2: T).(sty0 g c0 t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq +T (TSort (next g n)) (THead (Flat Cast) v2 t2))))) H2))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v +w)).(\lambda (_: (((eq T v (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda +(v2: T).(\lambda (_: T).(sty0 g d v1 v2))) (\lambda (_: T).(\lambda (t2: +T).(sty0 g d t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T w (THead (Flat +Cast) v2 t2)))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) v1 +t1))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (THead (Flat Cast) v1 t1) H4) in (False_ind (ex3_2 T T +(\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: T).(\lambda +(t2: T).(sty0 g c0 t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T (lift (S +i) O w) (THead (Flat Cast) v2 t2))))) H5))))))))))) (\lambda (c0: C).(\lambda +(d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d +(Bind Abst) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v w)).(\lambda (_: +(((eq T v (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda +(_: T).(sty0 g d v1 v2))) (\lambda (_: T).(\lambda (t2: T).(sty0 g d t1 t2))) +(\lambda (v2: T).(\lambda (t2: T).(eq T w (THead (Flat Cast) v2 +t2)))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) v1 t1))).(let H5 +\def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Flat Cast) v1 t1) H4) in (False_ind (ex3_2 T T (\lambda +(v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: T).(\lambda (t2: +T).(sty0 g c0 t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T (lift (S i) O +v) (THead (Flat Cast) v2 t2))))) H5))))))))))) (\lambda (b: B).(\lambda (c0: +C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (sty0 g +(CHead c0 (Bind b) v) t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) v1 +t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(sty0 g (CHead c0 (Bind +b) v) v1 v2))) (\lambda (_: T).(\lambda (t3: T).(sty0 g (CHead c0 (Bind b) v) +t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) v2 +t3)))))))).(\lambda (H3: (eq T (THead (Bind b) v t0) (THead (Flat Cast) v1 +t1))).(let H4 \def (eq_ind T (THead (Bind b) v t0) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ +_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) +\Rightarrow False])])) I (THead (Flat Cast) v1 t1) H3) in (False_ind (ex3_2 T +T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: +T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq +T (THead (Bind b) v t2) (THead (Flat Cast) v2 t3))))) H4)))))))))) (\lambda +(c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (sty0 +g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) v1 t1)) \to (ex3_2 T +T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: +T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq +T t2 (THead (Flat Cast) v2 t3)))))))).(\lambda (H3: (eq T (THead (Flat Appl) +v t0) (THead (Flat Cast) v1 t1))).(let H4 \def (eq_ind T (THead (Flat Appl) v +t0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow True +| Cast \Rightarrow False])])])) I (THead (Flat Cast) v1 t1) H3) in (False_ind +(ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(sty0 g c0 v1 v2))) (\lambda (_: +T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq +T (THead (Flat Appl) v t2) (THead (Flat Cast) v2 t3))))) H4))))))))) (\lambda +(c0: C).(\lambda (v0: T).(\lambda (v2: T).(\lambda (H1: (sty0 g c0 v0 +v2)).(\lambda (H2: (((eq T v0 (THead (Flat Cast) v1 t1)) \to (ex3_2 T T +(\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) (\lambda (_: T).(\lambda +(t2: T).(sty0 g c0 t1 t2))) (\lambda (v3: T).(\lambda (t2: T).(eq T v2 (THead +(Flat Cast) v3 t2)))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: +(sty0 g c0 t0 t2)).(\lambda (H4: (((eq T t0 (THead (Flat Cast) v1 t1)) \to +(ex3_2 T T (\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) (\lambda (_: +T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v3: T).(\lambda (t3: T).(eq +T t2 (THead (Flat Cast) v3 t3)))))))).(\lambda (H5: (eq T (THead (Flat Cast) +v0 t0) (THead (Flat Cast) v1 t1))).(let H6 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | +(THead _ t _) \Rightarrow t])) (THead (Flat Cast) v0 t0) (THead (Flat Cast) +v1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) +\Rightarrow t])) (THead (Flat Cast) v0 t0) (THead (Flat Cast) v1 t1) H5) in +(\lambda (H8: (eq T v0 v1)).(let H9 \def (eq_ind T t0 (\lambda (t: T).((eq T +t (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v3: T).(\lambda (_: +T).(sty0 g c0 v1 v3))) (\lambda (_: T).(\lambda (t3: T).(sty0 g c0 t1 t3))) +(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) v3 t3))))))) H4 +t1 H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(sty0 g c0 t t2)) H3 t1 +H7) in (let H11 \def (eq_ind T v0 (\lambda (t: T).((eq T t (THead (Flat Cast) +v1 t1)) \to (ex3_2 T T (\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) +(\lambda (_: T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v3: +T).(\lambda (t3: T).(eq T v2 (THead (Flat Cast) v3 t3))))))) H2 v1 H8) in +(let H12 \def (eq_ind T v0 (\lambda (t: T).(sty0 g c0 t v2)) H1 v1 H8) in +(ex3_2_intro T T (\lambda (v3: T).(\lambda (_: T).(sty0 g c0 v1 v3))) +(\lambda (_: T).(\lambda (t3: T).(sty0 g c0 t1 t3))) (\lambda (v3: +T).(\lambda (t3: T).(eq T (THead (Flat Cast) v2 t2) (THead (Flat Cast) v3 +t3)))) v2 t2 H12 H10 (refl_equal T (THead (Flat Cast) v2 t2))))))))) +H6)))))))))))) c y x H0))) H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sty0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty0/props.ma new file mode 100644 index 000000000..cb79d692a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty0/props.ma @@ -0,0 +1,214 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sty0/fwd.ma". + +include "basic_1A/getl/drop.ma". + +lemma sty0_lift: + \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((sty0 g e +t1 t2) \to (\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c +e) \to (sty0 g c (lift h d t1) (lift h d t2)))))))))) +\def + \lambda (g: G).(\lambda (e: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (sty0 g e t1 t2)).(sty0_ind g (\lambda (c: C).(\lambda (t: T).(\lambda +(t0: T).(\forall (c0: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 c) +\to (sty0 g c0 (lift h d t) (lift h d t0))))))))) (\lambda (c: C).(\lambda +(n: nat).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: +(drop h d c0 c)).(eq_ind_r T (TSort n) (\lambda (t: T).(sty0 g c0 t (lift h d +(TSort (next g n))))) (eq_ind_r T (TSort (next g n)) (\lambda (t: T).(sty0 g +c0 (TSort n) t)) (sty0_sort g c0 n) (lift h d (TSort (next g n))) (lift_sort +(next g n) h d)) (lift h d (TSort n)) (lift_sort n h d)))))))) (\lambda (c: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (H1: (sty0 g d v +w)).(\lambda (H2: ((\forall (c0: C).(\forall (h: nat).(\forall (d0: +nat).((drop h d0 c0 d) \to (sty0 g c0 (lift h d0 v) (lift h d0 +w)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda (H3: +(drop h d0 c0 c)).(lt_le_e i d0 (sty0 g c0 (lift h d0 (TLRef i)) (lift h d0 +(lift (S i) O w))) (\lambda (H4: (lt i d0)).(let H5 \def (drop_getl_trans_le +i d0 (le_S_n i d0 (le_S_n (S i) (S d0) (le_S (S (S i)) (S d0) (le_n_S (S i) +d0 H4)))) c0 c h H3 (CHead d (Bind Abbr) v) H0) in (ex3_2_ind C C (\lambda +(e0: C).(\lambda (_: C).(drop i O c0 e0))) (\lambda (e0: C).(\lambda (e1: +C).(drop h (minus d0 i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 +(CHead d (Bind Abbr) v)))) (sty0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift +(S i) O w))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop i O c0 +x0)).(\lambda (H7: (drop h (minus d0 i) x0 x1)).(\lambda (H8: (clear x1 +(CHead d (Bind Abbr) v))).(let H9 \def (eq_ind nat (minus d0 i) (\lambda (n: +nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) (minus_x_Sy d0 i H4)) in (let +H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) H9 Abbr d v H8) in (ex2_ind C +(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d0 (S i)) +v)))) (\lambda (c1: C).(drop h (minus d0 (S i)) c1 d)) (sty0 g c0 (lift h d0 +(TLRef i)) (lift h d0 (lift (S i) O w))) (\lambda (x: C).(\lambda (H11: +(clear x0 (CHead x (Bind Abbr) (lift h (minus d0 (S i)) v)))).(\lambda (H12: +(drop h (minus d0 (S i)) x d)).(eq_ind_r T (TLRef i) (\lambda (t: T).(sty0 g +c0 t (lift h d0 (lift (S i) O w)))) (eq_ind nat (plus (S i) (minus d0 (S i))) +(\lambda (n: nat).(sty0 g c0 (TLRef i) (lift h n (lift (S i) O w)))) +(eq_ind_r T (lift (S i) O (lift h (minus d0 (S i)) w)) (\lambda (t: T).(sty0 +g c0 (TLRef i) t)) (eq_ind nat d0 (\lambda (_: nat).(sty0 g c0 (TLRef i) +(lift (S i) O (lift h (minus d0 (S i)) w)))) (sty0_abbr g c0 x (lift h (minus +d0 (S i)) v) i (getl_intro i c0 (CHead x (Bind Abbr) (lift h (minus d0 (S i)) +v)) x0 H6 H11) (lift h (minus d0 (S i)) w) (H2 x h (minus d0 (S i)) H12)) +(plus (S i) (minus d0 (S i))) (le_plus_minus (S i) d0 H4)) (lift h (plus (S +i) (minus d0 (S i))) (lift (S i) O w)) (lift_d w h (S i) (minus d0 (S i)) O +(le_O_n (minus d0 (S i))))) d0 (le_plus_minus_r (S i) d0 H4)) (lift h d0 +(TLRef i)) (lift_lref_lt i h d0 H4))))) H10)))))))) H5))) (\lambda (H4: (le +d0 i)).(eq_ind_r T (TLRef (plus i h)) (\lambda (t: T).(sty0 g c0 t (lift h d0 +(lift (S i) O w)))) (eq_ind nat (S i) (\lambda (_: nat).(sty0 g c0 (TLRef +(plus i h)) (lift h d0 (lift (S i) O w)))) (eq_ind_r T (lift (plus h (S i)) O +w) (\lambda (t: T).(sty0 g c0 (TLRef (plus i h)) t)) (eq_ind_r nat (plus (S +i) h) (\lambda (n: nat).(sty0 g c0 (TLRef (plus i h)) (lift n O w))) +(sty0_abbr g c0 d v (plus i h) (drop_getl_trans_ge i c0 c d0 h H3 (CHead d +(Bind Abbr) v) H0 H4) w H1) (plus h (S i)) (plus_sym h (S i))) (lift h d0 +(lift (S i) O w)) (lift_free w (S i) h O d0 (le_S_n d0 (S i) (le_S (S d0) (S +i) (le_n_S d0 i H4))) (le_O_n d0))) (plus i (S O)) (eq_ind_r nat (plus (S O) +i) (\lambda (n: nat).(eq nat (S i) n)) (le_antisym (S i) (plus (S O) i) (le_n +(plus (S O) i)) (le_n (S i))) (plus i (S O)) (plus_sym i (S O)))) (lift h d0 +(TLRef i)) (lift_lref_ge i h d0 H4)))))))))))))))) (\lambda (c: C).(\lambda +(d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d +(Bind Abst) v))).(\lambda (w: T).(\lambda (H1: (sty0 g d v w)).(\lambda (H2: +((\forall (c0: C).(\forall (h: nat).(\forall (d0: nat).((drop h d0 c0 d) \to +(sty0 g c0 (lift h d0 v) (lift h d0 w)))))))).(\lambda (c0: C).(\lambda (h: +nat).(\lambda (d0: nat).(\lambda (H3: (drop h d0 c0 c)).(lt_le_e i d0 (sty0 g +c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O v))) (\lambda (H4: (lt i +d0)).(let H5 \def (drop_getl_trans_le i d0 (le_S_n i d0 (le_S_n (S i) (S d0) +(le_S (S (S i)) (S d0) (le_n_S (S i) d0 H4)))) c0 c h H3 (CHead d (Bind Abst) +v) H0) in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c0 e0))) +(\lambda (e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) (\lambda (_: +C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abst) v)))) (sty0 g c0 (lift h +d0 (TLRef i)) (lift h d0 (lift (S i) O v))) (\lambda (x0: C).(\lambda (x1: +C).(\lambda (H6: (drop i O c0 x0)).(\lambda (H7: (drop h (minus d0 i) x0 +x1)).(\lambda (H8: (clear x1 (CHead d (Bind Abst) v))).(let H9 \def (eq_ind +nat (minus d0 i) (\lambda (n: nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) +(minus_x_Sy d0 i H4)) in (let H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) +H9 Abst d v H8) in (ex2_ind C (\lambda (c1: C).(clear x0 (CHead c1 (Bind +Abst) (lift h (minus d0 (S i)) v)))) (\lambda (c1: C).(drop h (minus d0 (S +i)) c1 d)) (sty0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O v))) +(\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abst) (lift h (minus +d0 (S i)) v)))).(\lambda (H12: (drop h (minus d0 (S i)) x d)).(eq_ind_r T +(TLRef i) (\lambda (t: T).(sty0 g c0 t (lift h d0 (lift (S i) O v)))) (eq_ind +nat (plus (S i) (minus d0 (S i))) (\lambda (n: nat).(sty0 g c0 (TLRef i) +(lift h n (lift (S i) O v)))) (eq_ind_r T (lift (S i) O (lift h (minus d0 (S +i)) v)) (\lambda (t: T).(sty0 g c0 (TLRef i) t)) (eq_ind nat d0 (\lambda (_: +nat).(sty0 g c0 (TLRef i) (lift (S i) O (lift h (minus d0 (S i)) v)))) +(sty0_abst g c0 x (lift h (minus d0 (S i)) v) i (getl_intro i c0 (CHead x +(Bind Abst) (lift h (minus d0 (S i)) v)) x0 H6 H11) (lift h (minus d0 (S i)) +w) (H2 x h (minus d0 (S i)) H12)) (plus (S i) (minus d0 (S i))) +(le_plus_minus (S i) d0 H4)) (lift h (plus (S i) (minus d0 (S i))) (lift (S +i) O v)) (lift_d v h (S i) (minus d0 (S i)) O (le_O_n (minus d0 (S i))))) d0 +(le_plus_minus_r (S i) d0 H4)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 +H4))))) H10)))))))) H5))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i +h)) (\lambda (t: T).(sty0 g c0 t (lift h d0 (lift (S i) O v)))) (eq_ind nat +(S i) (\lambda (_: nat).(sty0 g c0 (TLRef (plus i h)) (lift h d0 (lift (S i) +O v)))) (eq_ind_r T (lift (plus h (S i)) O v) (\lambda (t: T).(sty0 g c0 +(TLRef (plus i h)) t)) (eq_ind_r nat (plus (S i) h) (\lambda (n: nat).(sty0 g +c0 (TLRef (plus i h)) (lift n O v))) (sty0_abst g c0 d v (plus i h) +(drop_getl_trans_ge i c0 c d0 h H3 (CHead d (Bind Abst) v) H0 H4) w H1) (plus +h (S i)) (plus_sym h (S i))) (lift h d0 (lift (S i) O v)) (lift_free v (S i) +h O d0 (le_S_n d0 (S i) (le_S (S d0) (S i) (le_n_S d0 i H4))) (le_O_n d0))) +(plus i (S O)) (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(eq nat (S i) +n)) (le_antisym (S i) (plus (S O) i) (le_n (plus (S O) i)) (le_n (S i))) +(plus i (S O)) (plus_sym i (S O)))) (lift h d0 (TLRef i)) (lift_lref_ge i h +d0 H4)))))))))))))))) (\lambda (b: B).(\lambda (c: C).(\lambda (v: +T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (sty0 g (CHead c (Bind b) +v) t3 t4)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 (CHead c (Bind b) v)) \to (sty0 g c0 (lift h d t3) (lift h +d t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H2: (drop h d c0 c)).(eq_ind_r T (THead (Bind b) (lift h d v) (lift h (s +(Bind b) d) t3)) (\lambda (t: T).(sty0 g c0 t (lift h d (THead (Bind b) v +t4)))) (eq_ind_r T (THead (Bind b) (lift h d v) (lift h (s (Bind b) d) t4)) +(\lambda (t: T).(sty0 g c0 (THead (Bind b) (lift h d v) (lift h (s (Bind b) +d) t3)) t)) (sty0_bind g b c0 (lift h d v) (lift h (S d) t3) (lift h (S d) +t4) (H1 (CHead c0 (Bind b) (lift h d v)) h (S d) (drop_skip_bind h d c0 c H2 +b v))) (lift h d (THead (Bind b) v t4)) (lift_head (Bind b) v t4 h d)) (lift +h d (THead (Bind b) v t3)) (lift_head (Bind b) v t3 h d))))))))))))) (\lambda +(c: C).(\lambda (v: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (sty0 g +c t3 t4)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 c) \to (sty0 g c0 (lift h d t3) (lift h d +t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: +(drop h d c0 c)).(eq_ind_r T (THead (Flat Appl) (lift h d v) (lift h (s (Flat +Appl) d) t3)) (\lambda (t: T).(sty0 g c0 t (lift h d (THead (Flat Appl) v +t4)))) (eq_ind_r T (THead (Flat Appl) (lift h d v) (lift h (s (Flat Appl) d) +t4)) (\lambda (t: T).(sty0 g c0 (THead (Flat Appl) (lift h d v) (lift h (s +(Flat Appl) d) t3)) t)) (sty0_appl g c0 (lift h d v) (lift h (s (Flat Appl) +d) t3) (lift h (s (Flat Appl) d) t4) (H1 c0 h (s (Flat Appl) d) H2)) (lift h +d (THead (Flat Appl) v t4)) (lift_head (Flat Appl) v t4 h d)) (lift h d +(THead (Flat Appl) v t3)) (lift_head (Flat Appl) v t3 h d)))))))))))) +(\lambda (c: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c v1 +v2)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 c) \to (sty0 g c0 (lift h d v1) (lift h d +v2)))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (sty0 g c t3 +t4)).(\lambda (H3: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 c) \to (sty0 g c0 (lift h d t3) (lift h d +t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H4: +(drop h d c0 c)).(eq_ind_r T (THead (Flat Cast) (lift h d v1) (lift h (s +(Flat Cast) d) t3)) (\lambda (t: T).(sty0 g c0 t (lift h d (THead (Flat Cast) +v2 t4)))) (eq_ind_r T (THead (Flat Cast) (lift h d v2) (lift h (s (Flat Cast) +d) t4)) (\lambda (t: T).(sty0 g c0 (THead (Flat Cast) (lift h d v1) (lift h +(s (Flat Cast) d) t3)) t)) (sty0_cast g c0 (lift h d v1) (lift h d v2) (H1 c0 +h d H4) (lift h (s (Flat Cast) d) t3) (lift h (s (Flat Cast) d) t4) (H3 c0 h +(s (Flat Cast) d) H4)) (lift h d (THead (Flat Cast) v2 t4)) (lift_head (Flat +Cast) v2 t4 h d)) (lift h d (THead (Flat Cast) v1 t3)) (lift_head (Flat Cast) +v1 t3 h d))))))))))))))) e t1 t2 H))))). + +lemma sty0_correct: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty0 g c +t1 t) \to (ex T (\lambda (t2: T).(sty0 g c t t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: +(sty0 g c t1 t)).(sty0_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda (t2: +T).(ex T (\lambda (t3: T).(sty0 g c0 t2 t3)))))) (\lambda (c0: C).(\lambda +(n: nat).(ex_intro T (\lambda (t2: T).(sty0 g c0 (TSort (next g n)) t2)) +(TSort (next g (next g n))) (sty0_sort g c0 (next g n))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 g d v +w)).(\lambda (H2: (ex T (\lambda (t2: T).(sty0 g d w t2)))).(let H3 \def H2 +in (ex_ind T (\lambda (t2: T).(sty0 g d w t2)) (ex T (\lambda (t2: T).(sty0 g +c0 (lift (S i) O w) t2))) (\lambda (x: T).(\lambda (H4: (sty0 g d w +x)).(ex_intro T (\lambda (t2: T).(sty0 g c0 (lift (S i) O w) t2)) (lift (S i) +O x) (sty0_lift g d w x H4 c0 (S i) O (getl_drop Abbr c0 d v i H0))))) +H3)))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) v))).(\lambda (w: +T).(\lambda (H1: (sty0 g d v w)).(\lambda (H2: (ex T (\lambda (t2: T).(sty0 g +d w t2)))).(let H3 \def H2 in (ex_ind T (\lambda (t2: T).(sty0 g d w t2)) (ex +T (\lambda (t2: T).(sty0 g c0 (lift (S i) O v) t2))) (\lambda (x: T).(\lambda +(_: (sty0 g d w x)).(ex_intro T (\lambda (t2: T).(sty0 g c0 (lift (S i) O v) +t2)) (lift (S i) O w) (sty0_lift g d v w H1 c0 (S i) O (getl_drop Abst c0 d v +i H0))))) H3)))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: +T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g (CHead c0 (Bind b) +v) t2 t3)).(\lambda (H1: (ex T (\lambda (t4: T).(sty0 g (CHead c0 (Bind b) v) +t3 t4)))).(let H2 \def H1 in (ex_ind T (\lambda (t4: T).(sty0 g (CHead c0 +(Bind b) v) t3 t4)) (ex T (\lambda (t4: T).(sty0 g c0 (THead (Bind b) v t3) +t4))) (\lambda (x: T).(\lambda (H3: (sty0 g (CHead c0 (Bind b) v) t3 +x)).(ex_intro T (\lambda (t4: T).(sty0 g c0 (THead (Bind b) v t3) t4)) (THead +(Bind b) v x) (sty0_bind g b c0 v t3 x H3)))) H2))))))))) (\lambda (c0: +C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g c0 +t2 t3)).(\lambda (H1: (ex T (\lambda (t4: T).(sty0 g c0 t3 t4)))).(let H2 +\def H1 in (ex_ind T (\lambda (t4: T).(sty0 g c0 t3 t4)) (ex T (\lambda (t4: +T).(sty0 g c0 (THead (Flat Appl) v t3) t4))) (\lambda (x: T).(\lambda (H3: +(sty0 g c0 t3 x)).(ex_intro T (\lambda (t4: T).(sty0 g c0 (THead (Flat Appl) +v t3) t4)) (THead (Flat Appl) v x) (sty0_appl g c0 v t3 x H3)))) H2)))))))) +(\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (sty0 g c0 v1 +v2)).(\lambda (H1: (ex T (\lambda (t2: T).(sty0 g c0 v2 t2)))).(\lambda (t2: +T).(\lambda (t3: T).(\lambda (_: (sty0 g c0 t2 t3)).(\lambda (H3: (ex T +(\lambda (t4: T).(sty0 g c0 t3 t4)))).(let H4 \def H1 in (ex_ind T (\lambda +(t4: T).(sty0 g c0 v2 t4)) (ex T (\lambda (t4: T).(sty0 g c0 (THead (Flat +Cast) v2 t3) t4))) (\lambda (x: T).(\lambda (H5: (sty0 g c0 v2 x)).(let H6 +\def H3 in (ex_ind T (\lambda (t4: T).(sty0 g c0 t3 t4)) (ex T (\lambda (t4: +T).(sty0 g c0 (THead (Flat Cast) v2 t3) t4))) (\lambda (x0: T).(\lambda (H7: +(sty0 g c0 t3 x0)).(ex_intro T (\lambda (t4: T).(sty0 g c0 (THead (Flat Cast) +v2 t3) t4)) (THead (Flat Cast) x x0) (sty0_cast g c0 v2 x H5 t3 x0 H7)))) +H6)))) H4))))))))))) c t1 t H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sty1/cnt.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/cnt.ma new file mode 100644 index 000000000..0e04ba751 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/cnt.ma @@ -0,0 +1,86 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sty1/props.ma". + +include "basic_1A/cnt/props.ma". + +lemma sty1_cnt: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty0 g c +t1 t) \to (ex2 T (\lambda (t2: T).(sty1 g c t1 t2)) (\lambda (t2: T).(cnt +t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: +(sty0 g c t1 t)).(sty0_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: +T).(ex2 T (\lambda (t3: T).(sty1 g c0 t0 t3)) (\lambda (t3: T).(cnt t3)))))) +(\lambda (c0: C).(\lambda (n: nat).(ex_intro2 T (\lambda (t2: T).(sty1 g c0 +(TSort n) t2)) (\lambda (t2: T).(cnt t2)) (TSort (next g n)) (sty1_sty0 g c0 +(TSort n) (TSort (next g n)) (sty0_sort g c0 n)) (cnt_sort (next g n))))) +(\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H0: (getl i c0 (CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (sty0 +g d v w)).(\lambda (H2: (ex2 T (\lambda (t2: T).(sty1 g d v t2)) (\lambda +(t2: T).(cnt t2)))).(let H3 \def H2 in (ex2_ind T (\lambda (t2: T).(sty1 g d +v t2)) (\lambda (t2: T).(cnt t2)) (ex2 T (\lambda (t2: T).(sty1 g c0 (TLRef +i) t2)) (\lambda (t2: T).(cnt t2))) (\lambda (x: T).(\lambda (H4: (sty1 g d v +x)).(\lambda (H5: (cnt x)).(ex_intro2 T (\lambda (t2: T).(sty1 g c0 (TLRef i) +t2)) (\lambda (t2: T).(cnt t2)) (lift (S i) O x) (sty1_abbr g c0 d v i H0 x +H4) (cnt_lift x H5 (S i) O))))) H3)))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind +Abst) v))).(\lambda (w: T).(\lambda (H1: (sty0 g d v w)).(\lambda (H2: (ex2 T +(\lambda (t2: T).(sty1 g d v t2)) (\lambda (t2: T).(cnt t2)))).(let H3 \def +H2 in (ex2_ind T (\lambda (t2: T).(sty1 g d v t2)) (\lambda (t2: T).(cnt t2)) +(ex2 T (\lambda (t2: T).(sty1 g c0 (TLRef i) t2)) (\lambda (t2: T).(cnt t2))) +(\lambda (x: T).(\lambda (H4: (sty1 g d v x)).(\lambda (H5: (cnt +x)).(ex_intro2 T (\lambda (t2: T).(sty1 g c0 (TLRef i) t2)) (\lambda (t2: +T).(cnt t2)) (lift (S i) O x) (sty1_trans g c0 (TLRef i) (lift (S i) O v) +(sty1_sty0 g c0 (TLRef i) (lift (S i) O v) (sty0_abst g c0 d v i H0 w H1)) +(lift (S i) O x) (sty1_lift g d v x H4 c0 (S i) O (getl_drop Abst c0 d v i +H0))) (cnt_lift x H5 (S i) O))))) H3)))))))))) (\lambda (b: B).(\lambda (c0: +C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g +(CHead c0 (Bind b) v) t2 t3)).(\lambda (H1: (ex2 T (\lambda (t4: T).(sty1 g +(CHead c0 (Bind b) v) t2 t4)) (\lambda (t4: T).(cnt t4)))).(let H2 \def H1 in +(ex2_ind T (\lambda (t4: T).(sty1 g (CHead c0 (Bind b) v) t2 t4)) (\lambda +(t4: T).(cnt t4)) (ex2 T (\lambda (t4: T).(sty1 g c0 (THead (Bind b) v t2) +t4)) (\lambda (t4: T).(cnt t4))) (\lambda (x: T).(\lambda (H3: (sty1 g (CHead +c0 (Bind b) v) t2 x)).(\lambda (H4: (cnt x)).(ex_intro2 T (\lambda (t4: +T).(sty1 g c0 (THead (Bind b) v t2) t4)) (\lambda (t4: T).(cnt t4)) (THead +(Bind b) v x) (sty1_bind g b c0 v t2 x H3) (cnt_head x H4 (Bind b) v))))) +H2))))))))) (\lambda (c0: C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: +T).(\lambda (_: (sty0 g c0 t2 t3)).(\lambda (H1: (ex2 T (\lambda (t4: +T).(sty1 g c0 t2 t4)) (\lambda (t4: T).(cnt t4)))).(let H2 \def H1 in +(ex2_ind T (\lambda (t4: T).(sty1 g c0 t2 t4)) (\lambda (t4: T).(cnt t4)) +(ex2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Appl) v t2) t4)) (\lambda +(t4: T).(cnt t4))) (\lambda (x: T).(\lambda (H3: (sty1 g c0 t2 x)).(\lambda +(H4: (cnt x)).(ex_intro2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Appl) v +t2) t4)) (\lambda (t4: T).(cnt t4)) (THead (Flat Appl) v x) (sty1_appl g c0 v +t2 x H3) (cnt_head x H4 (Flat Appl) v))))) H2)))))))) (\lambda (c0: +C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H0: (sty0 g c0 v1 +v2)).(\lambda (_: (ex2 T (\lambda (t2: T).(sty1 g c0 v1 t2)) (\lambda (t2: +T).(cnt t2)))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (sty0 g c0 t2 +t3)).(\lambda (H3: (ex2 T (\lambda (t4: T).(sty1 g c0 t2 t4)) (\lambda (t4: +T).(cnt t4)))).(let H4 \def H3 in (ex2_ind T (\lambda (t4: T).(sty1 g c0 t2 +t4)) (\lambda (t4: T).(cnt t4)) (ex2 T (\lambda (t4: T).(sty1 g c0 (THead +(Flat Cast) v1 t2) t4)) (\lambda (t4: T).(cnt t4))) (\lambda (x: T).(\lambda +(H5: (sty1 g c0 t2 x)).(\lambda (H6: (cnt x)).(let H_x \def (sty1_cast2 g c0 +t2 x H5 v1 v2 H0) in (let H7 \def H_x in (ex2_ind T (\lambda (v3: T).(sty1 g +c0 v1 v3)) (\lambda (v3: T).(sty1 g c0 (THead (Flat Cast) v1 t2) (THead (Flat +Cast) v3 x))) (ex2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Cast) v1 t2) +t4)) (\lambda (t4: T).(cnt t4))) (\lambda (x0: T).(\lambda (_: (sty1 g c0 v1 +x0)).(\lambda (H9: (sty1 g c0 (THead (Flat Cast) v1 t2) (THead (Flat Cast) x0 +x))).(ex_intro2 T (\lambda (t4: T).(sty1 g c0 (THead (Flat Cast) v1 t2) t4)) +(\lambda (t4: T).(cnt t4)) (THead (Flat Cast) x0 x) H9 (cnt_head x H6 (Flat +Cast) x0))))) H7)))))) H4))))))))))) c t1 t H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sty1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/defs.ma new file mode 100644 index 000000000..21e78e8cf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/defs.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sty0/defs.ma". + +inductive sty1 (g: G) (c: C) (t1: T): T \to Prop \def +| sty1_sty0: \forall (t2: T).((sty0 g c t1 t2) \to (sty1 g c t1 t2)) +| sty1_sing: \forall (t: T).((sty1 g c t1 t) \to (\forall (t2: T).((sty0 g c +t t2) \to (sty1 g c t1 t2)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sty1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/fwd.ma new file mode 100644 index 000000000..6f7b14a5a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/fwd.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sty1/defs.ma". + +implied rec lemma sty1_ind (g: G) (c: C) (t1: T) (P: (T \to Prop)) (f: +(\forall (t2: T).((sty0 g c t1 t2) \to (P t2)))) (f0: (\forall (t: T).((sty1 +g c t1 t) \to ((P t) \to (\forall (t2: T).((sty0 g c t t2) \to (P t2))))))) +(t: T) (s0: sty1 g c t1 t) on s0: P t \def match s0 with [(sty1_sty0 t2 s1) +\Rightarrow (f t2 s1) | (sty1_sing t0 s1 t2 s2) \Rightarrow (f0 t0 s1 +((sty1_ind g c t1 P f f0) t0 s1) t2 s2)]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/sty1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/sty1/props.ma new file mode 100644 index 000000000..9b8a08e0b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/sty1/props.ma @@ -0,0 +1,142 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/sty1/fwd.ma". + +include "basic_1A/sty0/props.ma". + +theorem sty1_trans: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty1 g c +t1 t) \to (\forall (t2: T).((sty1 g c t t2) \to (sty1 g c t1 t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: +(sty1 g c t1 t)).(\lambda (t2: T).(\lambda (H0: (sty1 g c t t2)).(sty1_ind g +c t (\lambda (t0: T).(sty1 g c t1 t0)) (\lambda (t3: T).(\lambda (H1: (sty0 g +c t t3)).(sty1_sing g c t1 t H t3 H1))) (\lambda (t0: T).(\lambda (_: (sty1 g +c t t0)).(\lambda (H2: (sty1 g c t1 t0)).(\lambda (t3: T).(\lambda (H3: (sty0 +g c t0 t3)).(sty1_sing g c t1 t0 H2 t3 H3)))))) t2 H0))))))). + +lemma sty1_bind: + \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: +T).(\forall (t2: T).((sty1 g (CHead c (Bind b) v) t1 t2) \to (sty1 g c (THead +(Bind b) v t1) (THead (Bind b) v t2)))))))) +\def + \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H: (sty1 g (CHead c (Bind b) v) t1 +t2)).(sty1_ind g (CHead c (Bind b) v) t1 (\lambda (t: T).(sty1 g c (THead +(Bind b) v t1) (THead (Bind b) v t))) (\lambda (t3: T).(\lambda (H0: (sty0 g +(CHead c (Bind b) v) t1 t3)).(sty1_sty0 g c (THead (Bind b) v t1) (THead +(Bind b) v t3) (sty0_bind g b c v t1 t3 H0)))) (\lambda (t: T).(\lambda (_: +(sty1 g (CHead c (Bind b) v) t1 t)).(\lambda (H1: (sty1 g c (THead (Bind b) v +t1) (THead (Bind b) v t))).(\lambda (t3: T).(\lambda (H2: (sty0 g (CHead c +(Bind b) v) t t3)).(sty1_sing g c (THead (Bind b) v t1) (THead (Bind b) v t) +H1 (THead (Bind b) v t3) (sty0_bind g b c v t t3 H2))))))) t2 H))))))). + +lemma sty1_appl: + \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall +(t2: T).((sty1 g c t1 t2) \to (sty1 g c (THead (Flat Appl) v t1) (THead (Flat +Appl) v t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (H: (sty1 g c t1 t2)).(sty1_ind g c t1 (\lambda (t: T).(sty1 +g c (THead (Flat Appl) v t1) (THead (Flat Appl) v t))) (\lambda (t3: +T).(\lambda (H0: (sty0 g c t1 t3)).(sty1_sty0 g c (THead (Flat Appl) v t1) +(THead (Flat Appl) v t3) (sty0_appl g c v t1 t3 H0)))) (\lambda (t: +T).(\lambda (_: (sty1 g c t1 t)).(\lambda (H1: (sty1 g c (THead (Flat Appl) v +t1) (THead (Flat Appl) v t))).(\lambda (t3: T).(\lambda (H2: (sty0 g c t +t3)).(sty1_sing g c (THead (Flat Appl) v t1) (THead (Flat Appl) v t) H1 +(THead (Flat Appl) v t3) (sty0_appl g c v t t3 H2))))))) t2 H)))))). + +lemma sty1_lift: + \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((sty1 g e +t1 t2) \to (\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c +e) \to (sty1 g c (lift h d t1) (lift h d t2)))))))))) +\def + \lambda (g: G).(\lambda (e: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (sty1 g e t1 t2)).(sty1_ind g e t1 (\lambda (t: T).(\forall (c: +C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to (sty1 g c (lift h +d t1) (lift h d t))))))) (\lambda (t3: T).(\lambda (H0: (sty0 g e t1 +t3)).(\lambda (c: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop +h d c e)).(sty1_sty0 g c (lift h d t1) (lift h d t3) (sty0_lift g e t1 t3 H0 +c h d H1)))))))) (\lambda (t: T).(\lambda (_: (sty1 g e t1 t)).(\lambda (H1: +((\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to +(sty1 g c (lift h d t1) (lift h d t)))))))).(\lambda (t3: T).(\lambda (H2: +(sty0 g e t t3)).(\lambda (c: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H3: (drop h d c e)).(sty1_sing g c (lift h d t1) (lift h d t) (H1 c h d H3) +(lift h d t3) (sty0_lift g e t t3 H2 c h d H3))))))))))) t2 H))))). + +lemma sty1_correct: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((sty1 g c +t1 t) \to (ex T (\lambda (t2: T).(sty0 g c t t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: +(sty1 g c t1 t)).(sty1_ind g c t1 (\lambda (t0: T).(ex T (\lambda (t2: +T).(sty0 g c t0 t2)))) (\lambda (t2: T).(\lambda (H0: (sty0 g c t1 +t2)).(sty0_correct g c t1 t2 H0))) (\lambda (t0: T).(\lambda (_: (sty1 g c t1 +t0)).(\lambda (_: (ex T (\lambda (t2: T).(sty0 g c t0 t2)))).(\lambda (t2: +T).(\lambda (H2: (sty0 g c t0 t2)).(sty0_correct g c t0 t2 H2)))))) t H))))). + +lemma sty1_abbr: + \forall (g: G).(\forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abbr) v)) \to (\forall (w: T).((sty1 g d v w) +\to (sty1 g c (TLRef i) (lift (S i) O w))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (w: +T).(\lambda (H0: (sty1 g d v w)).(sty1_ind g d v (\lambda (t: T).(sty1 g c +(TLRef i) (lift (S i) O t))) (\lambda (t2: T).(\lambda (H1: (sty0 g d v +t2)).(sty1_sty0 g c (TLRef i) (lift (S i) O t2) (sty0_abbr g c d v i H t2 +H1)))) (\lambda (t: T).(\lambda (_: (sty1 g d v t)).(\lambda (H2: (sty1 g c +(TLRef i) (lift (S i) O t))).(\lambda (t2: T).(\lambda (H3: (sty0 g d t +t2)).(sty1_sing g c (TLRef i) (lift (S i) O t) H2 (lift (S i) O t2) +(sty0_lift g d t t2 H3 c (S i) O (getl_drop Abbr c d v i H)))))))) w +H0)))))))). + +lemma sty1_cast2: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((sty1 g c +t1 t2) \to (\forall (v1: T).(\forall (v2: T).((sty0 g c v1 v2) \to (ex2 T +(\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat +Cast) v1 t1) (THead (Flat Cast) v3 t2))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (sty1 g c t1 t2)).(sty1_ind g c t1 (\lambda (t: T).(\forall (v1: +T).(\forall (v2: T).((sty0 g c v1 v2) \to (ex2 T (\lambda (v3: T).(sty1 g c +v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat +Cast) v3 t)))))))) (\lambda (t3: T).(\lambda (H0: (sty0 g c t1 t3)).(\lambda +(v1: T).(\lambda (v2: T).(\lambda (H1: (sty0 g c v1 v2)).(ex_intro2 T +(\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat +Cast) v1 t1) (THead (Flat Cast) v3 t3))) v2 (sty1_sty0 g c v1 v2 H1) +(sty1_sty0 g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) v2 t3) (sty0_cast +g c v1 v2 H1 t1 t3 H0)))))))) (\lambda (t: T).(\lambda (_: (sty1 g c t1 +t)).(\lambda (H1: ((\forall (v1: T).(\forall (v2: T).((sty0 g c v1 v2) \to +(ex2 T (\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead +(Flat Cast) v1 t1) (THead (Flat Cast) v3 t))))))))).(\lambda (t3: T).(\lambda +(H2: (sty0 g c t t3)).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H3: (sty0 g +c v1 v2)).(let H_x \def (H1 v1 v2 H3) in (let H4 \def H_x in (ex2_ind T +(\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat +Cast) v1 t1) (THead (Flat Cast) v3 t))) (ex2 T (\lambda (v3: T).(sty1 g c v1 +v3)) (\lambda (v3: T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) +v3 t3)))) (\lambda (x: T).(\lambda (H5: (sty1 g c v1 x)).(\lambda (H6: (sty1 +g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) x t))).(let H_x0 \def +(sty1_correct g c v1 x H5) in (let H7 \def H_x0 in (ex_ind T (\lambda (t4: +T).(sty0 g c x t4)) (ex2 T (\lambda (v3: T).(sty1 g c v1 v3)) (\lambda (v3: +T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat Cast) v3 t3)))) (\lambda +(x0: T).(\lambda (H8: (sty0 g c x x0)).(ex_intro2 T (\lambda (v3: T).(sty1 g +c v1 v3)) (\lambda (v3: T).(sty1 g c (THead (Flat Cast) v1 t1) (THead (Flat +Cast) v3 t3))) x0 (sty1_sing g c v1 x H5 x0 H8) (sty1_sing g c (THead (Flat +Cast) v1 t1) (THead (Flat Cast) x t) H6 (THead (Flat Cast) x0 t3) (sty0_cast +g c x x0 H8 t t3 H2))))) H7)))))) H4))))))))))) t2 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst/defs.ma new file mode 100644 index 000000000..b8b69b86c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift/defs.ma". + +rec definition subst (d: nat) (v: T) (t: T) on t: T \def match t with [(TSort +n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (match (blt i d) with [true +\Rightarrow (TLRef i) | false \Rightarrow (match (blt d i) with [true +\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)])]) | (THead k +u t0) \Rightarrow (THead k (subst d v u) (subst (s k d) v t0))]. + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst/props.ma new file mode 100644 index 000000000..cedfac72b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst/props.ma @@ -0,0 +1,157 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst/defs.ma". + +include "basic_1A/subst0/fwd.ma". + +lemma subst_sort: + \forall (v: T).(\forall (d: nat).(\forall (k: nat).(eq T (subst d v (TSort +k)) (TSort k)))) +\def + \lambda (_: T).(\lambda (_: nat).(\lambda (k: nat).(refl_equal T (TSort +k)))). + +lemma subst_lref_lt: + \forall (v: T).(\forall (d: nat).(\forall (i: nat).((lt i d) \to (eq T +(subst d v (TLRef i)) (TLRef i))))) +\def + \lambda (v: T).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H: (lt i +d)).(eq_ind_r bool true (\lambda (b: bool).(eq T (match b with [true +\Rightarrow (TLRef i) | false \Rightarrow (match (blt d i) with [true +\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)])]) (TLRef i))) +(refl_equal T (TLRef i)) (blt i d) (lt_blt d i H))))). + +lemma subst_lref_eq: + \forall (v: T).(\forall (i: nat).(eq T (subst i v (TLRef i)) (lift i O v))) +\def + \lambda (v: T).(\lambda (i: nat).(eq_ind_r bool false (\lambda (b: bool).(eq +T (match b with [true \Rightarrow (TLRef i) | false \Rightarrow (match b with +[true \Rightarrow (TLRef (pred i)) | false \Rightarrow (lift i O v)])]) (lift +i O v))) (refl_equal T (lift i O v)) (blt i i) (le_bge i i (le_n i)))). + +lemma subst_lref_gt: + \forall (v: T).(\forall (d: nat).(\forall (i: nat).((lt d i) \to (eq T +(subst d v (TLRef i)) (TLRef (pred i)))))) +\def + \lambda (v: T).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H: (lt d +i)).(eq_ind_r bool false (\lambda (b: bool).(eq T (match b with [true +\Rightarrow (TLRef i) | false \Rightarrow (match (blt d i) with [true +\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)])]) (TLRef +(pred i)))) (eq_ind_r bool true (\lambda (b: bool).(eq T (match b with [true +\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)]) (TLRef (pred +i)))) (refl_equal T (TLRef (pred i))) (blt d i) (lt_blt i d H)) (blt i d) +(le_bge d i (lt_le_weak d i H)))))). + +lemma subst_head: + \forall (k: K).(\forall (w: T).(\forall (u: T).(\forall (t: T).(\forall (d: +nat).(eq T (subst d w (THead k u t)) (THead k (subst d w u) (subst (s k d) w +t))))))) +\def + \lambda (k: K).(\lambda (w: T).(\lambda (u: T).(\lambda (t: T).(\lambda (d: +nat).(refl_equal T (THead k (subst d w u) (subst (s k d) w t))))))). + +lemma subst_lift_SO: + \forall (v: T).(\forall (t: T).(\forall (d: nat).(eq T (subst d v (lift (S +O) d t)) t))) +\def + \lambda (v: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(eq +T (subst d v (lift (S O) d t0)) t0))) (\lambda (n: nat).(\lambda (d: +nat).(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (subst d v t0) (TSort n))) +(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 (TSort n))) (refl_equal T +(TSort n)) (subst d v (TSort n)) (subst_sort v d n)) (lift (S O) d (TSort n)) +(lift_sort n (S O) d)))) (\lambda (n: nat).(\lambda (d: nat).(lt_le_e n d (eq +T (subst d v (lift (S O) d (TLRef n))) (TLRef n)) (\lambda (H: (lt n +d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (subst d v t0) (TLRef n))) +(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef n))) (refl_equal T +(TLRef n)) (subst d v (TLRef n)) (subst_lref_lt v d n H)) (lift (S O) d +(TLRef n)) (lift_lref_lt n (S O) d H))) (\lambda (H: (le d n)).(eq_ind_r T +(TLRef (plus n (S O))) (\lambda (t0: T).(eq T (subst d v t0) (TLRef n))) +(eq_ind nat (S (plus n O)) (\lambda (n0: nat).(eq T (subst d v (TLRef n0)) +(TLRef n))) (eq_ind_r T (TLRef (pred (S (plus n O)))) (\lambda (t0: T).(eq T +t0 (TLRef n))) (eq_ind nat (plus n O) (\lambda (n0: nat).(eq T (TLRef n0) +(TLRef n))) (f_equal nat T TLRef (plus n O) n (sym_eq nat n (plus n O) +(plus_n_O n))) (pred (S (plus n O))) (pred_Sn (plus n O))) (subst d v (TLRef +(S (plus n O)))) (subst_lref_gt v d (S (plus n O)) (le_n_S d (plus n O) +(le_plus_trans d n O H)))) (plus n (S O)) (plus_n_Sm n O)) (lift (S O) d +(TLRef n)) (lift_lref_ge n (S O) d H)))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (H: ((\forall (d: nat).(eq T (subst d v (lift (S O) d t0)) +t0)))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(eq T (subst d v +(lift (S O) d t1)) t1)))).(\lambda (d: nat).(eq_ind_r T (THead k (lift (S O) +d t0) (lift (S O) (s k d) t1)) (\lambda (t2: T).(eq T (subst d v t2) (THead k +t0 t1))) (eq_ind_r T (THead k (subst d v (lift (S O) d t0)) (subst (s k d) v +(lift (S O) (s k d) t1))) (\lambda (t2: T).(eq T t2 (THead k t0 t1))) (sym_eq +T (THead k t0 t1) (THead k (subst d v (lift (S O) d t0)) (subst (s k d) v +(lift (S O) (s k d) t1))) (sym_eq T (THead k (subst d v (lift (S O) d t0)) +(subst (s k d) v (lift (S O) (s k d) t1))) (THead k t0 t1) (f_equal3 K T T T +THead k k (subst d v (lift (S O) d t0)) t0 (subst (s k d) v (lift (S O) (s k +d) t1)) t1 (refl_equal K k) (H d) (H0 (s k d))))) (subst d v (THead k (lift +(S O) d t0) (lift (S O) (s k d) t1))) (subst_head k v (lift (S O) d t0) (lift +(S O) (s k d) t1) d)) (lift (S O) d (THead k t0 t1)) (lift_head k t0 t1 (S O) +d)))))))) t)). + +lemma subst_subst0: + \forall (v: T).(\forall (t1: T).(\forall (t2: T).(\forall (d: nat).((subst0 +d v t1 t2) \to (eq T (subst d v t1) (subst d v t2)))))) +\def + \lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (d: nat).(\lambda +(H: (subst0 d v t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t0: T).(\lambda (t3: T).(eq T (subst n t t0) (subst n t t3)))))) +(\lambda (v0: T).(\lambda (i: nat).(eq_ind_r T (lift i O v0) (\lambda (t: +T).(eq T t (subst i v0 (lift (S i) O v0)))) (eq_ind nat (plus (S O) i) +(\lambda (n: nat).(eq T (lift i O v0) (subst i v0 (lift n O v0)))) (eq_ind T +(lift (S O) i (lift i O v0)) (\lambda (t: T).(eq T (lift i O v0) (subst i v0 +t))) (eq_ind_r T (lift i O v0) (\lambda (t: T).(eq T (lift i O v0) t)) +(refl_equal T (lift i O v0)) (subst i v0 (lift (S O) i (lift i O v0))) +(subst_lift_SO v0 (lift i O v0) i)) (lift (plus (S O) i) O v0) (lift_free v0 +i (S O) O i (le_n (plus O i)) (le_O_n i))) (S i) (refl_equal nat (S i))) +(subst i v0 (TLRef i)) (subst_lref_eq v0 i)))) (\lambda (v0: T).(\lambda (u2: +T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v0 u1 +u2)).(\lambda (H1: (eq T (subst i v0 u1) (subst i v0 u2))).(\lambda (t: +T).(\lambda (k: K).(eq_ind_r T (THead k (subst i v0 u1) (subst (s k i) v0 t)) +(\lambda (t0: T).(eq T t0 (subst i v0 (THead k u2 t)))) (eq_ind_r T (THead k +(subst i v0 u2) (subst (s k i) v0 t)) (\lambda (t0: T).(eq T (THead k (subst +i v0 u1) (subst (s k i) v0 t)) t0)) (eq_ind_r T (subst i v0 u2) (\lambda (t0: +T).(eq T (THead k t0 (subst (s k i) v0 t)) (THead k (subst i v0 u2) (subst (s +k i) v0 t)))) (refl_equal T (THead k (subst i v0 u2) (subst (s k i) v0 t))) +(subst i v0 u1) H1) (subst i v0 (THead k u2 t)) (subst_head k v0 u2 t i)) +(subst i v0 (THead k u1 t)) (subst_head k v0 u1 t i)))))))))) (\lambda (k: +K).(\lambda (v0: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (i: +nat).(\lambda (_: (subst0 (s k i) v0 t4 t3)).(\lambda (H1: (eq T (subst (s k +i) v0 t4) (subst (s k i) v0 t3))).(\lambda (u: T).(eq_ind_r T (THead k (subst +i v0 u) (subst (s k i) v0 t4)) (\lambda (t: T).(eq T t (subst i v0 (THead k u +t3)))) (eq_ind_r T (THead k (subst i v0 u) (subst (s k i) v0 t3)) (\lambda +(t: T).(eq T (THead k (subst i v0 u) (subst (s k i) v0 t4)) t)) (eq_ind_r T +(subst (s k i) v0 t3) (\lambda (t: T).(eq T (THead k (subst i v0 u) t) (THead +k (subst i v0 u) (subst (s k i) v0 t3)))) (refl_equal T (THead k (subst i v0 +u) (subst (s k i) v0 t3))) (subst (s k i) v0 t4) H1) (subst i v0 (THead k u +t3)) (subst_head k v0 u t3 i)) (subst i v0 (THead k u t4)) (subst_head k v0 u +t4 i)))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(i: nat).(\lambda (_: (subst0 i v0 u1 u2)).(\lambda (H1: (eq T (subst i v0 +u1) (subst i v0 u2))).(\lambda (k: K).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (subst0 (s k i) v0 t3 t4)).(\lambda (H3: (eq T (subst (s k i) +v0 t3) (subst (s k i) v0 t4))).(eq_ind_r T (THead k (subst i v0 u1) (subst (s +k i) v0 t3)) (\lambda (t: T).(eq T t (subst i v0 (THead k u2 t4)))) (eq_ind_r +T (THead k (subst i v0 u2) (subst (s k i) v0 t4)) (\lambda (t: T).(eq T +(THead k (subst i v0 u1) (subst (s k i) v0 t3)) t)) (eq_ind_r T (subst i v0 +u2) (\lambda (t: T).(eq T (THead k t (subst (s k i) v0 t3)) (THead k (subst i +v0 u2) (subst (s k i) v0 t4)))) (eq_ind_r T (subst (s k i) v0 t4) (\lambda +(t: T).(eq T (THead k (subst i v0 u2) t) (THead k (subst i v0 u2) (subst (s k +i) v0 t4)))) (refl_equal T (THead k (subst i v0 u2) (subst (s k i) v0 t4))) +(subst (s k i) v0 t3) H3) (subst i v0 u1) H1) (subst i v0 (THead k u2 t4)) +(subst_head k v0 u2 t4 i)) (subst i v0 (THead k u1 t3)) (subst_head k v0 u1 +t3 i))))))))))))) d v t1 t2 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst0/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/dec.ma new file mode 100644 index 000000000..6f4a1bbb9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/dec.ma @@ -0,0 +1,176 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/defs.ma". + +include "basic_1A/lift/props.ma". + +lemma dnf_dec2: + \forall (t: T).(\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S +O) d v)))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(or (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))))) (ex T (\lambda +(v: T).(eq T t0 (lift (S O) d v))))))) (\lambda (n: nat).(\lambda (d: +nat).(or_intror (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (TSort n) +(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (TSort n) (lift (S O) d +v)))) (ex_intro T (\lambda (v: T).(eq T (TSort n) (lift (S O) d v))) (TSort +n) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) (refl_equal T +(TSort n)) (lift (S O) d (TSort n)) (lift_sort n (S O) d)))))) (\lambda (n: +nat).(\lambda (d: nat).(lt_eq_gt_e n d (or (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T +(TLRef n) (lift (S O) d v))))) (\lambda (H: (lt n d)).(or_intror (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T +(\lambda (v: T).(eq T (TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: +T).(eq T (TLRef n) (lift (S O) d v))) (TLRef n) (eq_ind_r T (TLRef n) +(\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d +(TLRef n)) (lift_lref_lt n (S O) d H))))) (\lambda (H: (eq nat n d)).(eq_ind +nat n (\lambda (n0: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 n0 +w (TLRef n) (lift (S O) n0 v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift +(S O) n0 v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: T).(subst0 n w +(TLRef n) (lift (S O) n v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift (S +O) n v)))) (\lambda (w: T).(ex_intro T (\lambda (v: T).(subst0 n w (TLRef n) +(lift (S O) n v))) (lift n O w) (eq_ind_r T (lift (plus (S O) n) O w) +(\lambda (t0: T).(subst0 n w (TLRef n) t0)) (subst0_lref w n) (lift (S O) n +(lift n O w)) (lift_free w n (S O) O n (le_plus_r O n) (le_O_n n)))))) d H)) +(\lambda (H: (lt d n)).(or_intror (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T +(TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: T).(eq T (TLRef n) +(lift (S O) d v))) (TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t0: +T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d (TLRef (pred +n))) (lift_lref_gt d n H)))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda +(H: ((\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w +t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d +v)))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(or (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w t1 (lift (S O) d v))))) (ex T (\lambda +(v: T).(eq T t1 (lift (S O) d v)))))))).(\lambda (d: nat).(let H_x \def (H d) +in (let H1 \def H_x in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 +d w t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d +v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) +(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) +d v))))) (\lambda (H2: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 d w t0 +(lift (S O) d v))))))).(let H_x0 \def (H0 (s k d)) in (let H3 \def H_x0 in +(or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w t1 (lift (S +O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v)))) +(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift +(S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d +v))))) (\lambda (H4: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w +t1 (lift (S O) (s k d) v))))))).(or_introl (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq +T (THead k t0 t1) (lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H4 w) +in (let H5 \def H_x1 in (ex_ind T (\lambda (v: T).(subst0 (s k d) w t1 (lift +(S O) (s k d) v))) (ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S +O) d v)))) (\lambda (x: T).(\lambda (H6: (subst0 (s k d) w t1 (lift (S O) (s +k d) x))).(let H_x2 \def (H2 w) in (let H7 \def H_x2 in (ex_ind T (\lambda +(v: T).(subst0 d w t0 (lift (S O) d v))) (ex T (\lambda (v: T).(subst0 d w +(THead k t0 t1) (lift (S O) d v)))) (\lambda (x0: T).(\lambda (H8: (subst0 d +w t0 (lift (S O) d x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 +t1) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) +(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 t1) t2)) +(subst0_both w t0 (lift (S O) d x0) d H8 k t1 (lift (S O) (s k d) x) H6) +(lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H7))))) H5)))))) +(\lambda (H4: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) +v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or +(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) +d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) +(\lambda (x: T).(\lambda (H5: (eq T t1 (lift (S O) (s k d) x))).(eq_ind_r T +(lift (S O) (s k d) x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda +(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: +T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex +T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) +d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 (lift (S O) (s k d) x)) +(lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H2 w) in (let H6 \def +H_x1 in (ex_ind T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))) (ex T +(\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) d +v)))) (\lambda (x0: T).(\lambda (H7: (subst0 d w t0 (lift (S O) d +x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) +x)) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) +(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 (lift (S O) +(s k d) x)) t2)) (subst0_fst w (lift (S O) d x0) t0 d H7 (lift (S O) (s k d) +x) k) (lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H6))))) t1 +H5))) H4)) H3)))) (\lambda (H2: (ex T (\lambda (v: T).(eq T t0 (lift (S O) d +v))))).(ex_ind T (\lambda (v: T).(eq T t0 (lift (S O) d v))) (or (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex +T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) (\lambda (x: +T).(\lambda (H3: (eq T t0 (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in +(let H4 \def H_x0 in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s +k d) w t1 (lift (S O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S +O) (s k d) v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead +k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) +(lift (S O) d v))))) (\lambda (H5: ((\forall (w: T).(ex T (\lambda (v: +T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))))))).(eq_ind_r T (lift (S O) +d x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w +(THead k t2 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t2 +t1) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v))))) (ex T +(\lambda (v: T).(eq T (THead k (lift (S O) d x) t1) (lift (S O) d v)))) +(\lambda (w: T).(let H_x1 \def (H5 w) in (let H6 \def H_x1 in (ex_ind T +(\lambda (v: T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))) (ex T (\lambda +(v: T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v)))) (\lambda +(x0: T).(\lambda (H7: (subst0 (s k d) w t1 (lift (S O) (s k d) +x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) t1) +(lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) (lift +(S O) (s k d) x0)) (\lambda (t2: T).(subst0 d w (THead k (lift (S O) d x) t1) +t2)) (subst0_snd k w (lift (S O) (s k d) x0) t1 d H7 (lift (S O) d x)) (lift +(S O) d (THead k x x0)) (lift_head k x x0 (S O) d))))) H6))))) t0 H3)) +(\lambda (H5: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) +v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or +(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) +d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) +(\lambda (x0: T).(\lambda (H6: (eq T t1 (lift (S O) (s k d) x0))).(eq_ind_r T +(lift (S O) (s k d) x0) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda +(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: +T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (eq_ind_r T (lift (S O) d x) +(\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead +k t2 (lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq +T (THead k t2 (lift (S O) (s k d) x0)) (lift (S O) d v)))))) (or_intror +(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) +(lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T +(THead k (lift (S O) d x) (lift (S O) (s k d) x0)) (lift (S O) d v)))) +(ex_intro T (\lambda (v: T).(eq T (THead k (lift (S O) d x) (lift (S O) (s k +d) x0)) (lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d +x) (lift (S O) (s k d) x0)) (\lambda (t2: T).(eq T (THead k (lift (S O) d x) +(lift (S O) (s k d) x0)) t2)) (refl_equal T (THead k (lift (S O) d x) (lift +(S O) (s k d) x0))) (lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) +d)))) t0 H3) t1 H6))) H5)) H4))))) H2)) H1))))))))) t). + +lemma dnf_dec: + \forall (w: T).(\forall (t: T).(\forall (d: nat).(ex T (\lambda (v: T).(or +(subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d v))))))) +\def + \lambda (w: T).(\lambda (t: T).(\lambda (d: nat).(let H_x \def (dnf_dec2 t +d) in (let H \def H_x in (or_ind (\forall (w0: T).(ex T (\lambda (v: +T).(subst0 d w0 t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S +O) d v)))) (ex T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t +(lift (S O) d v))))) (\lambda (H0: ((\forall (w0: T).(ex T (\lambda (v: +T).(subst0 d w0 t (lift (S O) d v))))))).(let H_x0 \def (H0 w) in (let H1 +\def H_x0 in (ex_ind T (\lambda (v: T).(subst0 d w t (lift (S O) d v))) (ex T +(\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d +v))))) (\lambda (x: T).(\lambda (H2: (subst0 d w t (lift (S O) d +x))).(ex_intro T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t +(lift (S O) d v)))) x (or_introl (subst0 d w t (lift (S O) d x)) (eq T t +(lift (S O) d x)) H2)))) H1)))) (\lambda (H0: (ex T (\lambda (v: T).(eq T t +(lift (S O) d v))))).(ex_ind T (\lambda (v: T).(eq T t (lift (S O) d v))) (ex +T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d +v))))) (\lambda (x: T).(\lambda (H1: (eq T t (lift (S O) d x))).(eq_ind_r T +(lift (S O) d x) (\lambda (t0: T).(ex T (\lambda (v: T).(or (subst0 d w t0 +(lift (S O) d v)) (eq T t0 (lift (S O) d v)))))) (ex_intro T (\lambda (v: +T).(or (subst0 d w (lift (S O) d x) (lift (S O) d v)) (eq T (lift (S O) d x) +(lift (S O) d v)))) x (or_intror (subst0 d w (lift (S O) d x) (lift (S O) d +x)) (eq T (lift (S O) d x) (lift (S O) d x)) (refl_equal T (lift (S O) d +x)))) t H1))) H0)) H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/defs.ma new file mode 100644 index 000000000..9c42c7088 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/defs.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/lift/defs.ma". + +inductive subst0: nat \to (T \to (T \to (T \to Prop))) \def +| subst0_lref: \forall (v: T).(\forall (i: nat).(subst0 i v (TLRef i) (lift +(S i) O v))) +| subst0_fst: \forall (v: T).(\forall (u2: T).(\forall (u1: T).(\forall (i: +nat).((subst0 i v u1 u2) \to (\forall (t: T).(\forall (k: K).(subst0 i v +(THead k u1 t) (THead k u2 t)))))))) +| subst0_snd: \forall (k: K).(\forall (v: T).(\forall (t2: T).(\forall (t1: +T).(\forall (i: nat).((subst0 (s k i) v t1 t2) \to (\forall (u: T).(subst0 i +v (THead k u t1) (THead k u t2)))))))) +| subst0_both: \forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall (i: +nat).((subst0 i v u1 u2) \to (\forall (k: K).(\forall (t1: T).(\forall (t2: +T).((subst0 (s k i) v t1 t2) \to (subst0 i v (THead k u1 t1) (THead k u2 +t2)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/fwd.ma new file mode 100644 index 000000000..48868931c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/fwd.ma @@ -0,0 +1,912 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/defs.ma". + +include "basic_1A/lift/fwd.ma". + +implied rec lemma subst0_ind (P: (nat \to (T \to (T \to (T \to Prop))))) (f: +(\forall (v: T).(\forall (i: nat).(P i v (TLRef i) (lift (S i) O v))))) (f0: +(\forall (v: T).(\forall (u2: T).(\forall (u1: T).(\forall (i: nat).((subst0 +i v u1 u2) \to ((P i v u1 u2) \to (\forall (t: T).(\forall (k: K).(P i v +(THead k u1 t) (THead k u2 t))))))))))) (f1: (\forall (k: K).(\forall (v: +T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k i) v t1 +t2) \to ((P (s k i) v t1 t2) \to (\forall (u: T).(P i v (THead k u t1) (THead +k u t2))))))))))) (f2: (\forall (v: T).(\forall (u1: T).(\forall (u2: +T).(\forall (i: nat).((subst0 i v u1 u2) \to ((P i v u1 u2) \to (\forall (k: +K).(\forall (t1: T).(\forall (t2: T).((subst0 (s k i) v t1 t2) \to ((P (s k +i) v t1 t2) \to (P i v (THead k u1 t1) (THead k u2 t2)))))))))))))) (n: nat) +(t: T) (t0: T) (t1: T) (s0: subst0 n t t0 t1) on s0: P n t t0 t1 \def match +s0 with [(subst0_lref v i) \Rightarrow (f v i) | (subst0_fst v u2 u1 i s1 t2 +k) \Rightarrow (f0 v u2 u1 i s1 ((subst0_ind P f f0 f1 f2) i v u1 u2 s1) t2 +k) | (subst0_snd k v t2 t3 i s1 u) \Rightarrow (f1 k v t2 t3 i s1 +((subst0_ind P f f0 f1 f2) (s k i) v t3 t2 s1) u) | (subst0_both v u1 u2 i s1 +k t2 t3 s2) \Rightarrow (f2 v u1 u2 i s1 ((subst0_ind P f f0 f1 f2) i v u1 u2 +s1) k t2 t3 s2 ((subst0_ind P f f0 f1 f2) (s k i) v t2 t3 s2))]. + +lemma subst0_gen_sort: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 +i v (TSort n) x) \to (\forall (P: Prop).P))))) +\def + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda +(H: (subst0 i v (TSort n) x)).(\lambda (P: Prop).(insert_eq T (TSort n) +(\lambda (t: T).(subst0 i v t x)) (\lambda (_: T).P) (\lambda (y: T).(\lambda +(H0: (subst0 i v y x)).(subst0_ind (\lambda (_: nat).(\lambda (_: T).(\lambda +(t0: T).(\lambda (_: T).((eq T t0 (TSort n)) \to P))))) (\lambda (_: +T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef i0) (TSort n))).(let H2 \def +(eq_ind T (TLRef i0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I +(TSort n) H1) in (False_ind P H2))))) (\lambda (v0: T).(\lambda (u2: +T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 +u2)).(\lambda (_: (((eq T u1 (TSort n)) \to P))).(\lambda (t: T).(\lambda (k: +K).(\lambda (H3: (eq T (THead k u1 t) (TSort n))).(let H4 \def (eq_ind T +(THead k u1 t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) +H3) in (False_ind P H4))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda +(t2: T).(\lambda (t1: T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v0 +t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to P))).(\lambda (u: T).(\lambda +(H3: (eq T (THead k u t1) (TSort n))).(let H4 \def (eq_ind T (THead k u t1) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in +(False_ind P H4))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T +u1 (TSort n)) \to P))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 (TSort +n)) \to P))).(\lambda (H5: (eq T (THead k u1 t1) (TSort n))).(let H6 \def +(eq_ind T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H5) in (False_ind P H6)))))))))))))) i v y x H0))) +H)))))). + +lemma subst0_gen_lref: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 +i v (TLRef n) x) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) +\def + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda +(H: (subst0 i v (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(subst0 +i v t x)) (\lambda (_: T).(land (eq nat n i) (eq T x (lift (S n) O v)))) +(\lambda (y: T).(\lambda (H0: (subst0 i v y x)).(subst0_ind (\lambda (n0: +nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 (TLRef n)) +\to (land (eq nat n n0) (eq T t1 (lift (S n) O t)))))))) (\lambda (v0: +T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef i0) (TLRef n))).(let H2 \def +(f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i0 | +(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef +n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(land (eq nat n n0) (eq T (lift +(S n0) O v0) (lift (S n) O v0)))) (conj (eq nat n n) (eq T (lift (S n) O v0) +(lift (S n) O v0)) (refl_equal nat n) (refl_equal T (lift (S n) O v0))) i0 +H2))))) (\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TLRef n)) +\to (land (eq nat n i0) (eq T u2 (lift (S n) O v0)))))).(\lambda (t: +T).(\lambda (k: K).(\lambda (H3: (eq T (THead k u1 t) (TLRef n))).(let H4 +\def (eq_ind T (THead k u1 t) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TLRef n) H3) in (False_ind (land (eq nat n i0) (eq T (THead k u2 +t) (lift (S n) O v0))) H4))))))))))) (\lambda (k: K).(\lambda (v0: +T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i0: nat).(\lambda (_: (subst0 +(s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (land (eq nat n (s +k i0)) (eq T t2 (lift (S n) O v0)))))).(\lambda (u: T).(\lambda (H3: (eq T +(THead k u t1) (TLRef n))).(let H4 \def (eq_ind T (THead k u t1) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in (False_ind (land +(eq nat n i0) (eq T (THead k u t2) (lift (S n) O v0))) H4))))))))))) (\lambda +(v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (_: +(subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TLRef n)) \to (land (eq nat n +i0) (eq T u2 (lift (S n) O v0)))))).(\lambda (k: K).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 +(TLRef n)) \to (land (eq nat n (s k i0)) (eq T t2 (lift (S n) O +v0)))))).(\lambda (H5: (eq T (THead k u1 t1) (TLRef n))).(let H6 \def (eq_ind +T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I +(TLRef n) H5) in (False_ind (land (eq nat n i0) (eq T (THead k u2 t2) (lift +(S n) O v0))) H6)))))))))))))) i v y x H0))) H))))). + +lemma subst0_gen_head: + \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall +(x: T).(\forall (i: nat).((subst0 i v (THead k u1 t1) x) \to (or3 (ex2 T +(\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 +u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: +T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 +u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))))) +\def + \lambda (k: K).(\lambda (v: T).(\lambda (u1: T).(\lambda (t1: T).(\lambda +(x: T).(\lambda (i: nat).(\lambda (H: (subst0 i v (THead k u1 t1) +x)).(insert_eq T (THead k u1 t1) (\lambda (t: T).(subst0 i v t x)) (\lambda +(_: T).(or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: +T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) +(\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 +t2)))))) (\lambda (y: T).(\lambda (H0: (subst0 i v y x)).(subst0_ind (\lambda +(n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t2: T).((eq T t0 (THead k +u1 t1)) \to (or3 (ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda +(u2: T).(subst0 n t u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 +t3))) (\lambda (t3: T).(subst0 (s k n) t t1 t3))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 n t u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k n) t t1 +t3)))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef +i0) (THead k u1 t1))).(let H2 \def (eq_ind T (TLRef i0) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead k u1 t1) H1) in (False_ind (or3 +(ex2 T (\lambda (u2: T).(eq T (lift (S i0) O v0) (THead k u2 t1))) (\lambda +(u2: T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t2: T).(eq T (lift (S i0) O +v0) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T (lift (S i0) O v0) (THead k u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))))) H2))))) (\lambda (v0: +T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H1: (subst0 +i0 v0 u0 u2)).(\lambda (H2: (((eq T u0 (THead k u1 t1)) \to (or3 (ex2 T +(\lambda (u3: T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 +u3))) (ex2 T (\lambda (t2: T).(eq T u2 (THead k u1 t2))) (\lambda (t2: +T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 +u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 +t2)))))))).(\lambda (t: T).(\lambda (k0: K).(\lambda (H3: (eq T (THead k0 u0 +t) (THead k u1 t1))).(let H4 \def (f_equal T K (\lambda (e: T).(match e with +[(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) +\Rightarrow k1])) (THead k0 u0 t) (THead k u1 t1) H3) in ((let H5 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef +_) \Rightarrow u0 | (THead _ t0 _) \Rightarrow t0])) (THead k0 u0 t) (THead k +u1 t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t0) +\Rightarrow t0])) (THead k0 u0 t) (THead k u1 t1) H3) in (\lambda (H7: (eq T +u0 u1)).(\lambda (H8: (eq K k0 k)).(eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T +(\lambda (u3: T).(eq T (THead k1 u2 t) (THead k u3 t1))) (\lambda (u3: +T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T (THead k1 u2 t) +(THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T (THead k1 u2 t) (THead k u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2)))))) (eq_ind_r T t1 (\lambda +(t0: T).(or3 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t0) (THead k u3 t1))) +(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T (THead +k u2 t0) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) +(ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t0) (THead k +u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda +(_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2)))))) (let H9 \def (eq_ind +T u0 (\lambda (t0: T).((eq T t0 (THead k u1 t1)) \to (or3 (ex2 T (\lambda +(u3: T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) +(ex2 T (\lambda (t2: T).(eq T u2 (THead k u1 t2))) (\lambda (t2: T).(subst0 +(s k i0) v0 t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T u2 +(THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) +(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))))))) H2 u1 H7) +in (let H10 \def (eq_ind T u0 (\lambda (t0: T).(subst0 i0 v0 t0 u2)) H1 u1 +H7) in (or3_intro0 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 +t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T +(THead k u2 t1) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 +t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t1) +(THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) +(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2)))) (ex_intro2 T +(\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: +T).(subst0 i0 v0 u1 u3)) u2 (refl_equal T (THead k u2 t1)) H10)))) t H6) k0 +H8)))) H5)) H4))))))))))) (\lambda (k0: K).(\lambda (v0: T).(\lambda (t2: +T).(\lambda (t0: T).(\lambda (i0: nat).(\lambda (H1: (subst0 (s k0 i0) v0 t0 +t2)).(\lambda (H2: (((eq T t0 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u2: +T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 (s k0 i0) v0 u1 u2))) +(ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 +(s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s k0 i0) v0 +u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 +t3)))))))).(\lambda (u: T).(\lambda (H3: (eq T (THead k0 u t0) (THead k u1 +t1))).(let H4 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) +\Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) +(THead k0 u t0) (THead k u1 t1) H3) in ((let H5 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | +(THead _ t _) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H3) in ((let +H6 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 +| (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u t0) +(THead k u1 t1) H3) in (\lambda (H7: (eq T u u1)).(\lambda (H8: (eq K k0 +k)).(eq_ind_r T u1 (\lambda (t: T).(or3 (ex2 T (\lambda (u2: T).(eq T (THead +k0 t t2) (THead k u2 t1))) (\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T +(\lambda (t3: T).(eq T (THead k0 t t2) (THead k u1 t3))) (\lambda (t3: +T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead k0 t t2) (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i0 v0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i0) +v0 t1 t3)))))) (let H9 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead k u1 +t1)) \to (or3 (ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda +(u2: T).(subst0 (s k0 i0) v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead +k u1 t3))) (\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))))))) H2 t1 H6) in (let H10 \def +(eq_ind T t0 (\lambda (t: T).(subst0 (s k0 i0) v0 t t2)) H1 t1 H6) in (let +H11 \def (eq_ind K k0 (\lambda (k1: K).((eq T t1 (THead k u1 t1)) \to (or3 +(ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 +(s k1 i0) v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) +(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 (s k1 i0) v0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s +k (s k1 i0)) v0 t1 t3))))))) H9 k H8) in (let H12 \def (eq_ind K k0 (\lambda +(k1: K).(subst0 (s k1 i0) v0 t1 t2)) H10 k H8) in (eq_ind_r K k (\lambda (k1: +K).(or3 (ex2 T (\lambda (u2: T).(eq T (THead k1 u1 t2) (THead k u2 t1))) +(\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead +k1 u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead k1 u1 t2) (THead k +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (or3_intro1 (ex2 T +(\lambda (u2: T).(eq T (THead k u1 t2) (THead k u2 t1))) (\lambda (u2: +T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k u1 t2) +(THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T (THead k u1 t2) (THead k u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))) (ex_intro2 T (\lambda (t3: +T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) +v0 t1 t3)) t2 (refl_equal T (THead k u1 t2)) H12)) k0 H8))))) u H7)))) H5)) +H4))))))))))) (\lambda (v0: T).(\lambda (u0: T).(\lambda (u2: T).(\lambda +(i0: nat).(\lambda (H1: (subst0 i0 v0 u0 u2)).(\lambda (H2: (((eq T u0 (THead +k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T u2 (THead k u3 t1))) +(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T u2 +(THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T +(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead k u3 t2)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: T).(\lambda (t2: +T).(subst0 (s k i0) v0 t1 t2)))))))).(\lambda (k0: K).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (H3: (subst0 (s k0 i0) v0 t0 t2)).(\lambda (H4: +(((eq T t0 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T t2 (THead +k u3 t1))) (\lambda (u3: T).(subst0 (s k0 i0) v0 u1 u3))) (ex2 T (\lambda +(t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k (s k0 i0)) +v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u3))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 +t3)))))))).(\lambda (H5: (eq T (THead k0 u0 t0) (THead k u1 t1))).(let H6 +\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | +(TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t0) +(THead k u1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) +\Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H5) in ((let H8 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef +_) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t0) (THead k +u1 t1) H5) in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k0 k)).(let +H11 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead k u1 t1)) \to (or3 (ex2 +T (\lambda (u3: T).(eq T t2 (THead k u3 t1))) (\lambda (u3: T).(subst0 (s k0 +i0) v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda +(t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(subst0 (s k0 i0) v0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s +k (s k0 i0)) v0 t1 t3))))))) H4 t1 H8) in (let H12 \def (eq_ind T t0 (\lambda +(t: T).(subst0 (s k0 i0) v0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind K k0 +(\lambda (k1: K).((eq T t1 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: +T).(eq T t2 (THead k u3 t1))) (\lambda (u3: T).(subst0 (s k1 i0) v0 u1 u3))) +(ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 +(s k (s k1 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq +T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s k1 i0) v0 +u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 +t3))))))) H11 k H10) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).(subst0 +(s k1 i0) v0 t1 t2)) H12 k H10) in (eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T +(\lambda (u3: T).(eq T (THead k1 u2 t2) (THead k u3 t1))) (\lambda (u3: +T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead k1 u2 t2) +(THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T +(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k1 u2 t2) (THead k u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (let H15 \def (eq_ind T +u0 (\lambda (t: T).((eq T t (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: +T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T +(\lambda (t3: T).(eq T u2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) +v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead k u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))))))) H2 u1 H9) in (let H16 +\def (eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H9) in +(or3_intro2 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t2) (THead k u3 t1))) +(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead +k u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k +u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))) (ex3_2_intro T T +(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) u2 t2 (refl_equal T (THead k +u2 t2)) H16 H14)))) k0 H10)))))))) H7)) H6)))))))))))))) i v y x H0))) +H))))))). + +lemma subst0_gen_lift_lt: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t1) +x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda +(t2: T).(subst0 i u t1 t2))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: +T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift h d +u) (lift h (S (plus i d)) t) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h +(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2))))))))) (\lambda (n: +nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S (plus i d)) (TSort n)) +x)).(let H0 \def (eq_ind T (lift h (S (plus i d)) (TSort n)) (\lambda (t: +T).(subst0 i (lift h d u) t x)) H (TSort n) (lift_sort n h (S (plus i d)))) +in (subst0_gen_sort (lift h d u) x i n H0 (ex2 T (\lambda (t2: T).(eq T x +(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TSort n) +t2))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S +(plus i d)) (TLRef n)) x)).(lt_le_e n (S (plus i d)) (ex2 T (\lambda (t2: +T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef +n) t2))) (\lambda (H0: (lt n (S (plus i d)))).(let H1 \def (eq_ind T (lift h +(S (plus i d)) (TLRef n)) (\lambda (t: T).(subst0 i (lift h d u) t x)) H +(TLRef n) (lift_lref_lt n h (S (plus i d)) H0)) in (land_ind (eq nat n i) (eq +T x (lift (S n) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S +(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: +(eq nat n i)).(\lambda (H3: (eq T x (lift (S n) O (lift h d u)))).(eq_ind_r T +(lift (S n) O (lift h d u)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t +(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2)))) +(eq_ind_r nat i (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S n0) +O (lift h d u)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u +(TLRef n0) t2)))) (eq_ind T (lift h (plus (S i) d) (lift (S i) O u)) (\lambda +(t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) (\lambda +(t2: T).(subst0 i u (TLRef i) t2)))) (ex_intro2 T (\lambda (t2: T).(eq T +(lift h (S (plus i d)) (lift (S i) O u)) (lift h (S (plus i d)) t2))) +(\lambda (t2: T).(subst0 i u (TLRef i) t2)) (lift (S i) O u) (refl_equal T +(lift h (S (plus i d)) (lift (S i) O u))) (subst0_lref u i)) (lift (S i) O +(lift h d u)) (lift_d u h (S i) d O (le_O_n d))) n H2) x H3))) +(subst0_gen_lref (lift h d u) x i n H1)))) (\lambda (H0: (le (S (plus i d)) +n)).(let H1 \def (eq_ind T (lift h (S (plus i d)) (TLRef n)) (\lambda (t: +T).(subst0 i (lift h d u) t x)) H (TLRef (plus n h)) (lift_lref_ge n h (S +(plus i d)) H0)) in (land_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n +h)) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) +t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: (eq nat +(plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n h)) O (lift h d +u)))).(let H4 \def (eq_ind_r nat i (\lambda (n0: nat).(le (S (plus n0 d)) n)) +H0 (plus n h) H2) in (le_false n (plus (plus n h) d) (ex2 T (\lambda (t2: +T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef +n) t2))) (le_plus_trans n (plus n h) d (le_plus_l n h)) H4)))) +(subst0_gen_lref (lift h d u) x i (plus n h) H1))))))))))) (\lambda (k: +K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t) +x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda +(t2: T).(subst0 i u t t2)))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall +(x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift +h d u) (lift h (S (plus i d)) t0) x) \to (ex2 T (\lambda (t2: T).(eq T x +(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t0 +t2)))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H1: (subst0 i (lift h d u) (lift h (S (plus i d)) (THead k t +t0)) x)).(let H2 \def (eq_ind T (lift h (S (plus i d)) (THead k t t0)) +(\lambda (t2: T).(subst0 i (lift h d u) t2 x)) H1 (THead k (lift h (S (plus i +d)) t) (lift h (s k (S (plus i d))) t0)) (lift_head k t t0 h (S (plus i d)))) +in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k (S (plus +i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S (plus i d)) +t) u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) +t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i +d))) t0) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k +u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S +(plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h +d u) (lift h (s k (S (plus i d))) t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x +(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) +t2))) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k +(S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S +(plus i d)) t) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h +(s k (S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h +(S (plus i d)) t) u2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) +t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: +T).(\lambda (H4: (eq T x (THead k x0 (lift h (s k (S (plus i d))) +t0)))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) t) +x0)).(eq_ind_r T (THead k x0 (lift h (s k (S (plus i d))) t0)) (\lambda (t2: +T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda +(t3: T).(subst0 i u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T +x0 (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T +(\lambda (t2: T).(eq T (THead k x0 (lift h (s k (S (plus i d))) t0)) (lift h +(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) +(\lambda (x1: T).(\lambda (H6: (eq T x0 (lift h (S (plus i d)) x1))).(\lambda +(H7: (subst0 i u t x1)).(eq_ind_r T (lift h (S (plus i d)) x1) (\lambda (t2: +T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 (lift h (s k (S (plus i d))) +t0)) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) +t3)))) (eq_ind T (lift h (S (plus i d)) (THead k x1 t0)) (\lambda (t2: +T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda +(t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T +(lift h (S (plus i d)) (THead k x1 t0)) (lift h (S (plus i d)) t2))) (\lambda +(t2: T).(subst0 i u (THead k t t0) t2)) (THead k x1 t0) (refl_equal T (lift h +(S (plus i d)) (THead k x1 t0))) (subst0_fst u x1 t i H7 t0 k)) (THead k +(lift h (S (plus i d)) x1) (lift h (s k (S (plus i d))) t0)) (lift_head k x1 +t0 h (S (plus i d)))) x0 H6)))) (H x0 i h d H5)) x H4)))) H3)) (\lambda (H3: +(ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) t2))) +(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) +t0) t2)))).(ex2_ind T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i +d)) t) t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S +(plus i d))) t0) t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) +t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: +T).(\lambda (H4: (eq T x (THead k (lift h (S (plus i d)) t) x0))).(\lambda +(H5: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) +x0)).(eq_ind_r T (THead k (lift h (S (plus i d)) t) x0) (\lambda (t2: T).(ex2 +T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: +T).(subst0 i u (THead k t t0) t3)))) (let H6 \def (eq_ind nat (s k (S (plus i +d))) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x0)) H5 (S +(s k (plus i d))) (s_S k (plus i d))) in (let H7 \def (eq_ind nat (s k (plus +i d)) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x0)) +H6 (plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x0 +(lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) +(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) x0) (lift h +(S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) +(\lambda (x1: T).(\lambda (H8: (eq T x0 (lift h (S (plus (s k i) d)) +x1))).(\lambda (H9: (subst0 (s k i) u t0 x1)).(eq_ind_r T (lift h (S (plus (s +k i) d)) x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h +(S (plus i d)) t) t2) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i +u (THead k t t0) t3)))) (eq_ind nat (s k (plus i d)) (\lambda (n: nat).(ex2 T +(\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h (S n) x1)) +(lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) +t2)))) (eq_ind nat (s k (S (plus i d))) (\lambda (n: nat).(ex2 T (\lambda +(t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h n x1)) (lift h (S +(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind +T (lift h (S (plus i d)) (THead k t x1)) (\lambda (t2: T).(ex2 T (\lambda +(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u +(THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h (S (plus i +d)) (THead k t x1)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u +(THead k t t0) t2)) (THead k t x1) (refl_equal T (lift h (S (plus i d)) +(THead k t x1))) (subst0_snd k u x1 t0 i H9 t)) (THead k (lift h (S (plus i +d)) t) (lift h (s k (S (plus i d))) x1)) (lift_head k t x1 h (S (plus i d)))) +(S (s k (plus i d))) (s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x0 +H8)))) (H0 x0 (s k i) h d H7)))) x H4)))) H3)) (\lambda (H3: (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2))) +(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S +(plus i d))) t0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq +T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d +u) (lift h (S (plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 +(s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2))) (ex2 T (\lambda +(t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u +(THead k t t0) t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T x +(THead k x0 x1))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) +t) x0)).(\lambda (H6: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i +d))) t0) x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T (\lambda +(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u +(THead k t t0) t3)))) (let H7 \def (eq_ind nat (s k (S (plus i d))) (\lambda +(n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x1)) H6 (S (s k (plus i +d))) (s_S k (plus i d))) in (let H8 \def (eq_ind nat (s k (plus i d)) +(\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x1)) H7 +(plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x1 +(lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) +(ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h (S (plus i d)) t2))) +(\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x2: T).(\lambda +(H9: (eq T x1 (lift h (S (plus (s k i) d)) x2))).(\lambda (H10: (subst0 (s k +i) u t0 x2)).(ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (S (plus i d)) +t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T (\lambda (t2: T).(eq T +(THead k x0 x1) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u +(THead k t t0) t2))) (\lambda (x3: T).(\lambda (H11: (eq T x0 (lift h (S +(plus i d)) x3))).(\lambda (H12: (subst0 i u t x3)).(eq_ind_r T (lift h (S +(plus i d)) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 +x1) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) +t3)))) (eq_ind_r T (lift h (S (plus (s k i) d)) x2) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T (THead k (lift h (S (plus i d)) x3) t2) (lift h (S +(plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (eq_ind +nat (s k (plus i d)) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k +(lift h (S (plus i d)) x3) (lift h (S n) x2)) (lift h (S (plus i d)) t2))) +(\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind nat (s k (S (plus +i d))) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S +(plus i d)) x3) (lift h n x2)) (lift h (S (plus i d)) t2))) (\lambda (t2: +T).(subst0 i u (THead k t t0) t2)))) (eq_ind T (lift h (S (plus i d)) (THead +k x3 x2)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus +i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T +(\lambda (t2: T).(eq T (lift h (S (plus i d)) (THead k x3 x2)) (lift h (S +(plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)) (THead k +x3 x2) (refl_equal T (lift h (S (plus i d)) (THead k x3 x2))) (subst0_both u +t x3 i H12 k t0 x2 H10)) (THead k (lift h (S (plus i d)) x3) (lift h (s k (S +(plus i d))) x2)) (lift_head k x3 x2 h (S (plus i d)))) (S (s k (plus i d))) +(s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x1 H9) x0 H11)))) (H x0 +i h d H5))))) (H0 x1 (s k i) h d H8)))) x H4)))))) H3)) (subst0_gen_head k +(lift h d u) (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) t0) x i +H2))))))))))))) t1)). + +lemma subst0_gen_lift_false: + \forall (t: T).(\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall +(d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst0 i u +(lift h d t) x) \to (\forall (P: Prop).P))))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (u: T).(\forall (x: +T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i +(plus d h)) \to ((subst0 i u (lift h d t0) x) \to (\forall (P: +Prop).P)))))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (x: T).(\lambda +(h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (_: (le d i)).(\lambda +(_: (lt i (plus d h))).(\lambda (H1: (subst0 i u (lift h d (TSort n)) +x)).(\lambda (P: Prop).(let H2 \def (eq_ind T (lift h d (TSort n)) (\lambda +(t0: T).(subst0 i u t0 x)) H1 (TSort n) (lift_sort n h d)) in +(subst0_gen_sort u x i n H2 P)))))))))))) (\lambda (n: nat).(\lambda (u: +T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: +nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d h))).(\lambda (H1: +(subst0 i u (lift h d (TLRef n)) x)).(\lambda (P: Prop).(lt_le_e n d P +(\lambda (H2: (lt n d)).(let H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda +(t0: T).(subst0 i u t0 x)) H1 (TLRef n) (lift_lref_lt n h d H2)) in (land_ind +(eq nat n i) (eq T x (lift (S n) O u)) P (\lambda (H4: (eq nat n i)).(\lambda +(_: (eq T x (lift (S n) O u))).(let H6 \def (eq_ind nat n (\lambda (n0: +nat).(lt n0 d)) H2 i H4) in (le_false d i P H H6)))) (subst0_gen_lref u x i n +H3)))) (\lambda (H2: (le d n)).(let H3 \def (eq_ind T (lift h d (TLRef n)) +(\lambda (t0: T).(subst0 i u t0 x)) H1 (TLRef (plus n h)) (lift_lref_ge n h d +H2)) in (land_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n h)) O u)) P +(\lambda (H4: (eq nat (plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n +h)) O u))).(let H6 \def (eq_ind_r nat i (\lambda (n0: nat).(lt n0 (plus d +h))) H0 (plus n h) H4) in (le_false d n P H2 (lt_le_S n d (simpl_lt_plus_r h +n d H6)))))) (subst0_gen_lref u x i (plus n h) H3))))))))))))))) (\lambda (k: +K).(\lambda (t0: T).(\lambda (H: ((\forall (u: T).(\forall (x: T).(\forall +(h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) +\to ((subst0 i u (lift h d t0) x) \to (\forall (P: +Prop).P))))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (u: T).(\forall +(x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to +((lt i (plus d h)) \to ((subst0 i u (lift h d t1) x) \to (\forall (P: +Prop).P))))))))))).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (i: nat).(\lambda (H1: (le d i)).(\lambda (H2: (lt i (plus +d h))).(\lambda (H3: (subst0 i u (lift h d (THead k t0 t1)) x)).(\lambda (P: +Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t2: +T).(subst0 i u t2 x)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) +(lift_head k t0 t1 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k +u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2))) +(ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: +T).(subst0 (s k i) u (lift h (s k d) t1) t2))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 +(s k i) u (lift h (s k d) t1) t2)))) P (\lambda (H5: (ex2 T (\lambda (u2: +T).(eq T x (THead k u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u +(lift h d t0) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h +(s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2)) P (\lambda +(x0: T).(\lambda (_: (eq T x (THead k x0 (lift h (s k d) t1)))).(\lambda (H7: +(subst0 i u (lift h d t0) x0)).(H u x0 h d i H1 H2 H7 P)))) H5)) (\lambda +(H5: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda +(t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)))).(ex2_ind T (\lambda (t2: +T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: T).(subst0 (s k i) u +(lift h (s k d) t1) t2)) P (\lambda (x0: T).(\lambda (_: (eq T x (THead k +(lift h d t0) x0))).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t1) +x0)).(H0 u x0 h (s k d) (s k i) (s_le k d i H1) (eq_ind nat (s k (plus d h)) +(\lambda (n: nat).(lt (s k i) n)) (s_lt k i (plus d h) H2) (plus (s k d) h) +(s_plus k d h)) H7 P)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 +(s k i) u (lift h (s k d) t1) t2))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 +(s k i) u (lift h (s k d) t1) t2))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (_: (eq T x (THead k x0 x1))).(\lambda (H7: (subst0 i u (lift h d +t0) x0)).(\lambda (_: (subst0 (s k i) u (lift h (s k d) t1) x1)).(H u x0 h d +i H1 H2 H7 P)))))) H5)) (subst0_gen_head k u (lift h d t0) (lift h (s k d) +t1) x i H4))))))))))))))))) t). + +lemma subst0_gen_lift_ge: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst0 i u (lift h d t1) x) \to ((le (plus d h) +i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: +T).(subst0 (minus i h) u t1 t2)))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: +T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h +d t) x) \to ((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d +t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)))))))))) (\lambda (n: +nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (subst0 i u (lift h d (TSort n)) x)).(\lambda (_: (le (plus +d h) i)).(let H1 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(subst0 +i u t x)) H (TSort n) (lift_sort n h d)) in (subst0_gen_sort u x i n H1 (ex2 +T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i +h) u (TSort n) t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: +nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i u (lift h d +(TLRef n)) x)).(\lambda (H0: (le (plus d h) i)).(lt_le_e n d (ex2 T (\lambda +(t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef +n) t2))) (\lambda (H1: (lt n d)).(let H2 \def (eq_ind T (lift h d (TLRef n)) +(\lambda (t: T).(subst0 i u t x)) H (TLRef n) (lift_lref_lt n h d H1)) in +(land_ind (eq nat n i) (eq T x (lift (S n) O u)) (ex2 T (\lambda (t2: T).(eq +T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) +(\lambda (H3: (eq nat n i)).(\lambda (_: (eq T x (lift (S n) O u))).(let H5 +\def (eq_ind nat n (\lambda (n0: nat).(lt n0 d)) H1 i H3) in (le_false (plus +d h) i (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: +T).(subst0 (minus i h) u (TLRef n) t2))) H0 (le_plus_trans (S i) d h H5))))) +(subst0_gen_lref u x i n H2)))) (\lambda (H1: (le d n)).(let H2 \def (eq_ind +T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H (TLRef (plus n h)) +(lift_lref_ge n h d H1)) in (land_ind (eq nat (plus n h) i) (eq T x (lift (S +(plus n h)) O u)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda +(t2: T).(subst0 (minus i h) u (TLRef n) t2))) (\lambda (H3: (eq nat (plus n +h) i)).(\lambda (H4: (eq T x (lift (S (plus n h)) O u))).(eq_ind nat (plus n +h) (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) +(\lambda (t2: T).(subst0 (minus n0 h) u (TLRef n) t2)))) (eq_ind_r T (lift (S +(plus n h)) O u) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h d +t2))) (\lambda (t2: T).(subst0 (minus (plus n h) h) u (TLRef n) t2)))) +(eq_ind_r nat n (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S +(plus n h)) O u) (lift h d t2))) (\lambda (t2: T).(subst0 n0 u (TLRef n) +t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift (S (plus n h)) O u) (lift h +d t2))) (\lambda (t2: T).(subst0 n u (TLRef n) t2)) (lift (S n) O u) +(eq_ind_r T (lift (plus h (S n)) O u) (\lambda (t: T).(eq T (lift (S (plus n +h)) O u) t)) (eq_ind_r nat (plus h n) (\lambda (n0: nat).(eq T (lift (S n0) O +u) (lift (plus h (S n)) O u))) (eq_ind_r nat (plus h (S n)) (\lambda (n0: +nat).(eq T (lift n0 O u) (lift (plus h (S n)) O u))) (refl_equal T (lift +(plus h (S n)) O u)) (S (plus h n)) (plus_n_Sm h n)) (plus n h) (plus_sym n +h)) (lift h d (lift (S n) O u)) (lift_free u (S n) h O d (le_trans_plus_r O d +(plus O (S n)) (le_plus_plus O O d (S n) (le_O_n O) (le_S d n H1))) (le_O_n +d))) (subst0_lref u n)) (minus (plus n h) h) (minus_plus_r n h)) x H4) i +H3))) (subst0_gen_lref u x i (plus n h) H2)))))))))))) (\lambda (k: +K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst0 i u (lift h d t) x) \to ((le (plus d h) +i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: +T).(subst0 (minus i h) u t t2))))))))))).(\lambda (t0: T).(\lambda (H0: +((\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: +nat).((subst0 i u (lift h d t0) x) \to ((le (plus d h) i) \to (ex2 T (\lambda +(t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t0 +t2))))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (H1: (subst0 i u (lift h d (THead k t t0)) x)).(\lambda +(H2: (le (plus d h) i)).(let H3 \def (eq_ind T (lift h d (THead k t t0)) +(\lambda (t2: T).(subst0 i u t2 x)) H1 (THead k (lift h d t) (lift h (s k d) +t0)) (lift_head k t t0 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x +(THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) +u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda +(t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s +k i) u (lift h (s k d) t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x (lift h d +t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda +(H4: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t0)))) +(\lambda (u2: T).(subst0 i u (lift h d t) u2)))).(ex2_ind T (\lambda (u2: +T).(eq T x (THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u +(lift h d t) u2)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda +(t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda +(H5: (eq T x (THead k x0 (lift h (s k d) t0)))).(\lambda (H6: (subst0 i u +(lift h d t) x0)).(eq_ind_r T (THead k x0 (lift h (s k d) t0)) (\lambda (t2: +T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 +(minus i h) u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T x0 +(lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)) (ex2 T (\lambda +(t2: T).(eq T (THead k x0 (lift h (s k d) t0)) (lift h d t2))) (\lambda (t2: +T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x1: T).(\lambda (H7: +(eq T x0 (lift h d x1))).(\lambda (H8: (subst0 (minus i h) u t x1)).(eq_ind_r +T (lift h d x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 +(lift h (s k d) t0)) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u +(THead k t t0) t3)))) (eq_ind T (lift h d (THead k x1 t0)) (\lambda (t2: +T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 +(minus i h) u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift +h d (THead k x1 t0)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u +(THead k t t0) t2)) (THead k x1 t0) (refl_equal T (lift h d (THead k x1 t0))) +(subst0_fst u x1 t (minus i h) H8 t0 k)) (THead k (lift h d x1) (lift h (s k +d) t0)) (lift_head k x1 t0 h d)) x0 H7)))) (H x0 i h d H6 H2)) x H5)))) H4)) +(\lambda (H4: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) +(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2)))).(ex2_ind T +(\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 +(s k i) u (lift h (s k d) t0) t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h d +t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda +(x0: T).(\lambda (H5: (eq T x (THead k (lift h d t) x0))).(\lambda (H6: +(subst0 (s k i) u (lift h (s k d) t0) x0)).(eq_ind_r T (THead k (lift h d t) +x0) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) +(\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (ex2_ind T +(\lambda (t2: T).(eq T x0 (lift h (s k d) t2))) (\lambda (t2: T).(subst0 +(minus (s k i) h) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T (THead k (lift h d +t) x0) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) +t2))) (\lambda (x1: T).(\lambda (H7: (eq T x0 (lift h (s k d) x1))).(\lambda +(H8: (subst0 (minus (s k i) h) u t0 x1)).(eq_ind_r T (lift h (s k d) x1) +(\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h d t) t2) +(lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) +(eq_ind T (lift h d (THead k t x1)) (\lambda (t2: T).(ex2 T (\lambda (t3: +T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t +t0) t3)))) (let H9 \def (eq_ind_r nat (minus (s k i) h) (\lambda (n: +nat).(subst0 n u t0 x1)) H8 (s k (minus i h)) (s_minus k i h (le_trans_plus_r +d h i H2))) in (ex_intro2 T (\lambda (t2: T).(eq T (lift h d (THead k t x1)) +(lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2)) +(THead k t x1) (refl_equal T (lift h d (THead k t x1))) (subst0_snd k u x1 t0 +(minus i h) H9 t))) (THead k (lift h d t) (lift h (s k d) x1)) (lift_head k t +x1 h d)) x0 H7)))) (H0 x0 (s k i) h (s k d) H6 (eq_ind nat (s k (plus d h)) +(\lambda (n: nat).(le n (s k i))) (s_le k (plus d h) i H2) (plus (s k d) h) +(s_plus k d h)))) x H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s +k i) u (lift h (s k d) t0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i +u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift +h (s k d) t0) t2))) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda +(t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda +(x1: T).(\lambda (H5: (eq T x (THead k x0 x1))).(\lambda (H6: (subst0 i u +(lift h d t) x0)).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t0) +x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq +T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) +t3)))) (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h (s k d) t2))) (\lambda +(t2: T).(subst0 (minus (s k i) h) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T +(THead k x0 x1) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead +k t t0) t2))) (\lambda (x2: T).(\lambda (H8: (eq T x1 (lift h (s k d) +x2))).(\lambda (H9: (subst0 (minus (s k i) h) u t0 x2)).(ex2_ind T (\lambda +(t2: T).(eq T x0 (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t +t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h d t2))) (\lambda +(t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x3: T).(\lambda +(H10: (eq T x0 (lift h d x3))).(\lambda (H11: (subst0 (minus i h) u t +x3)).(eq_ind_r T (lift h d x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T +(THead k t2 x1) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead +k t t0) t3)))) (eq_ind_r T (lift h (s k d) x2) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T (THead k (lift h d x3) t2) (lift h d t3))) (\lambda +(t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind T (lift h d +(THead k x3 x2)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d +t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (let H12 +\def (eq_ind_r nat (minus (s k i) h) (\lambda (n: nat).(subst0 n u t0 x2)) H9 +(s k (minus i h)) (s_minus k i h (le_trans_plus_r d h i H2))) in (ex_intro2 T +(\lambda (t2: T).(eq T (lift h d (THead k x3 x2)) (lift h d t2))) (\lambda +(t2: T).(subst0 (minus i h) u (THead k t t0) t2)) (THead k x3 x2) (refl_equal +T (lift h d (THead k x3 x2))) (subst0_both u t x3 (minus i h) H11 k t0 x2 +H12))) (THead k (lift h d x3) (lift h (s k d) x2)) (lift_head k x3 x2 h d)) +x1 H8) x0 H10)))) (H x0 i h d H6 H2))))) (H0 x1 (s k i) h (s k d) H7 (eq_ind +nat (s k (plus d h)) (\lambda (n: nat).(le n (s k i))) (s_le k (plus d h) i +H2) (plus (s k d) h) (s_plus k d h)))) x H5)))))) H4)) (subst0_gen_head k u +(lift h d t) (lift h (s k d) t0) x i H3)))))))))))))) t1)). + +lemma subst0_gen_lift_rev_ge: + \forall (t1: T).(\forall (v: T).(\forall (u2: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst0 i v t1 (lift h d u2)) \to ((le (plus d h) +i) \to (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: +T).(eq T t1 (lift h d u1))))))))))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (v: T).(\forall (u2: +T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i v t (lift +h d u2)) \to ((le (plus d h) i) \to (ex2 T (\lambda (u1: T).(subst0 (minus i +h) v u1 u2)) (\lambda (u1: T).(eq T t (lift h d u1)))))))))))) (\lambda (n: +nat).(\lambda (v: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (subst0 i v (TSort n) (lift h d +u2))).(\lambda (_: (le (plus d h) i)).(subst0_gen_sort v (lift h d u2) i n H +(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T +(TSort n) (lift h d u1))))))))))))) (\lambda (n: nat).(\lambda (v: +T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (subst0 i v (TLRef n) (lift h d u2))).(\lambda (H0: (le +(plus d h) i)).(land_ind (eq nat n i) (eq T (lift h d u2) (lift (S n) O v)) +(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T +(TLRef n) (lift h d u1)))) (\lambda (H1: (eq nat n i)).(\lambda (H2: (eq T +(lift h d u2) (lift (S n) O v))).(let H3 \def (eq_ind_r nat i (\lambda (n0: +nat).(le (plus d h) n0)) H0 n H1) in (eq_ind nat n (\lambda (n0: nat).(ex2 T +(\lambda (u1: T).(subst0 (minus n0 h) v u1 u2)) (\lambda (u1: T).(eq T (TLRef +n) (lift h d u1))))) (eq_ind_r nat (plus (minus n h) h) (\lambda (n0: +nat).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 u2)) (\lambda (u1: +T).(eq T (TLRef n0) (lift h d u1))))) (eq_ind T (lift h d (TLRef (minus n +h))) (\lambda (t: T).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 u2)) +(\lambda (u1: T).(eq T t (lift h d u1))))) (let H4 \def (eq_ind nat n +(\lambda (n0: nat).(eq T (lift h d u2) (lift (S n0) O v))) H2 (plus h (minus +n h)) (le_plus_minus h n (le_trans h (plus d h) n (le_plus_r d h) H3))) in +(let H5 \def (eq_ind nat (S (plus h (minus n h))) (\lambda (n0: nat).(eq T +(lift h d u2) (lift n0 O v))) H4 (plus h (S (minus n h))) (plus_n_Sm h (minus +n h))) in (let H6 \def (eq_ind_r T (lift (plus h (S (minus n h))) O v) +(\lambda (t: T).(eq T (lift h d u2) t)) H5 (lift h d (lift (S (minus n h)) O +v)) (lift_free v (S (minus n h)) h O d (le_S d (minus n h) (le_minus d n h +H3)) (le_O_n d))) in (eq_ind_r T (lift (S (minus n h)) O v) (\lambda (t: +T).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 t)) (\lambda (u1: T).(eq +T (lift h d (TLRef (minus n h))) (lift h d u1))))) (ex_intro2 T (\lambda (u1: +T).(subst0 (minus n h) v u1 (lift (S (minus n h)) O v))) (\lambda (u1: T).(eq +T (lift h d (TLRef (minus n h))) (lift h d u1))) (TLRef (minus n h)) +(subst0_lref v (minus n h)) (refl_equal T (lift h d (TLRef (minus n h))))) u2 +(lift_inj u2 (lift (S (minus n h)) O v) h d H6))))) (TLRef (plus (minus n h) +h)) (lift_lref_ge (minus n h) h d (le_minus d n h H3))) n (le_plus_minus_sym +h n (le_trans h (plus d h) n (le_plus_r d h) H3))) i H1)))) (subst0_gen_lref +v (lift h d u2) i n H)))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: +((\forall (v: T).(\forall (u2: T).(\forall (i: nat).(\forall (h: +nat).(\forall (d: nat).((subst0 i v t (lift h d u2)) \to ((le (plus d h) i) +\to (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: +T).(eq T t (lift h d u1))))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall +(v: T).(\forall (u2: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: +nat).((subst0 i v t0 (lift h d u2)) \to ((le (plus d h) i) \to (ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T t0 +(lift h d u1))))))))))))).(\lambda (v: T).(\lambda (u2: T).(\lambda (i: +nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (subst0 i v (THead k t +t0) (lift h d u2))).(\lambda (H2: (le (plus d h) i)).(or3_ind (ex2 T (\lambda +(u3: T).(eq T (lift h d u2) (THead k u3 t0))) (\lambda (u3: T).(subst0 i v t +u3))) (ex2 T (\lambda (t2: T).(eq T (lift h d u2) (THead k t t2))) (\lambda +(t2: T).(subst0 (s k i) v t0 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: +T).(eq T (lift h d u2) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(subst0 i v t u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t0 +t2)))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: +T).(eq T (THead k t t0) (lift h d u1)))) (\lambda (H3: (ex2 T (\lambda (u3: +T).(eq T (lift h d u2) (THead k u3 t0))) (\lambda (u3: T).(subst0 i v t +u3)))).(ex2_ind T (\lambda (u3: T).(eq T (lift h d u2) (THead k u3 t0))) +(\lambda (u3: T).(subst0 i v t u3)) (ex2 T (\lambda (u1: T).(subst0 (minus i +h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda +(x: T).(\lambda (H4: (eq T (lift h d u2) (THead k x t0))).(\lambda (H5: +(subst0 i v t x)).(let H6 \def (sym_eq T (lift h d u2) (THead k x t0) H4) in +(let H_x \def (lift_gen_head k x t0 u2 h d H6) in (let H7 \def H_x in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T x (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t0 (lift h (s k d) z)))) (ex2 T (\lambda (u1: +T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift +h d u1)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u2 (THead k +x0 x1))).(\lambda (H9: (eq T x (lift h d x0))).(\lambda (H10: (eq T t0 (lift +h (s k d) x1))).(let H11 \def (eq_ind T x (\lambda (t2: T).(subst0 i v t t2)) +H5 (lift h d x0) H9) in (eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 t2)) (\lambda (u1: T).(eq T (THead +k t t0) (lift h d u1))))) (eq_ind_r T (lift h (s k d) x1) (\lambda (t2: +T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) +(\lambda (u1: T).(eq T (THead k t t2) (lift h d u1))))) (let H_x0 \def (H v +x0 i h d H11 H2) in (let H12 \def H_x0 in (ex2_ind T (\lambda (u1: T).(subst0 +(minus i h) v u1 x0)) (\lambda (u1: T).(eq T t (lift h d u1))) (ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: +T).(eq T (THead k t (lift h (s k d) x1)) (lift h d u1)))) (\lambda (x2: +T).(\lambda (H13: (subst0 (minus i h) v x2 x0)).(\lambda (H14: (eq T t (lift +h d x2))).(eq_ind_r T (lift h d x2) (\lambda (t2: T).(ex2 T (\lambda (u1: +T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T (THead k +t2 (lift h (s k d) x1)) (lift h d u1))))) (eq_ind T (lift h d (THead k x2 +x1)) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead +k x0 x1))) (\lambda (u1: T).(eq T t2 (lift h d u1))))) (ex_intro2 T (\lambda +(u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T +(lift h d (THead k x2 x1)) (lift h d u1))) (THead k x2 x1) (subst0_fst v x0 +x2 (minus i h) H13 x1 k) (refl_equal T (lift h d (THead k x2 x1)))) (THead k +(lift h d x2) (lift h (s k d) x1)) (lift_head k x2 x1 h d)) t H14)))) H12))) +t0 H10) u2 H8))))))) H7))))))) H3)) (\lambda (H3: (ex2 T (\lambda (t2: T).(eq +T (lift h d u2) (THead k t t2))) (\lambda (t2: T).(subst0 (s k i) v t0 +t2)))).(ex2_ind T (\lambda (t2: T).(eq T (lift h d u2) (THead k t t2))) +(\lambda (t2: T).(subst0 (s k i) v t0 t2)) (ex2 T (\lambda (u1: T).(subst0 +(minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) +(\lambda (x: T).(\lambda (H4: (eq T (lift h d u2) (THead k t x))).(\lambda +(H5: (subst0 (s k i) v t0 x)).(let H6 \def (sym_eq T (lift h d u2) (THead k t +x) H4) in (let H_x \def (lift_gen_head k t x u2 h d H6) in (let H7 \def H_x +in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T t (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T x (lift h (s k d) z)))) (ex2 T (\lambda (u1: +T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift +h d u1)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u2 (THead k +x0 x1))).(\lambda (H9: (eq T t (lift h d x0))).(\lambda (H10: (eq T x (lift h +(s k d) x1))).(let H11 \def (eq_ind T x (\lambda (t2: T).(subst0 (s k i) v t0 +t2)) H5 (lift h (s k d) x1) H10) in (eq_ind_r T (THead k x0 x1) (\lambda (t2: +T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 t2)) (\lambda (u1: T).(eq +T (THead k t t0) (lift h d u1))))) (eq_ind_r T (lift h d x0) (\lambda (t2: +T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) +(\lambda (u1: T).(eq T (THead k t2 t0) (lift h d u1))))) (let H_y \def (H0 v +x1 (s k i) h (s k d) H11) in (let H12 \def (eq_ind_r nat (plus (s k d) h) +(\lambda (n: nat).((le n (s k i)) \to (ex2 T (\lambda (u1: T).(subst0 (minus +(s k i) h) v u1 x1)) (\lambda (u1: T).(eq T t0 (lift h (s k d) u1)))))) H_y +(s k (plus d h)) (s_plus k d h)) in (let H13 \def (eq_ind_r nat (minus (s k +i) h) (\lambda (n: nat).((le (s k (plus d h)) (s k i)) \to (ex2 T (\lambda +(u1: T).(subst0 n v u1 x1)) (\lambda (u1: T).(eq T t0 (lift h (s k d) +u1)))))) H12 (s k (minus i h)) (s_minus k i h (le_trans h (plus d h) i +(le_plus_r d h) H2))) in (let H14 \def (H13 (s_le k (plus d h) i H2)) in +(ex2_ind T (\lambda (u1: T).(subst0 (s k (minus i h)) v u1 x1)) (\lambda (u1: +T).(eq T t0 (lift h (s k d) u1))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) +v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T (THead k (lift h d x0) t0) +(lift h d u1)))) (\lambda (x2: T).(\lambda (H15: (subst0 (s k (minus i h)) v +x2 x1)).(\lambda (H16: (eq T t0 (lift h (s k d) x2))).(eq_ind_r T (lift h (s +k d) x2) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x0 x1))) (\lambda (u1: T).(eq T (THead k (lift h d x0) t2) (lift h d +u1))))) (eq_ind T (lift h d (THead k x0 x2)) (\lambda (t2: T).(ex2 T (\lambda +(u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T t2 +(lift h d u1))))) (ex_intro2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x0 x1))) (\lambda (u1: T).(eq T (lift h d (THead k x0 x2)) (lift h d +u1))) (THead k x0 x2) (subst0_snd k v x1 x2 (minus i h) H15 x0) (refl_equal T +(lift h d (THead k x0 x2)))) (THead k (lift h d x0) (lift h (s k d) x2)) +(lift_head k x0 x2 h d)) t0 H16)))) H14))))) t H9) u2 H8))))))) H7))))))) +H3)) (\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (lift h +d u2) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v t u3))) +(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t0 t2))))).(ex3_2_ind T T +(\lambda (u3: T).(\lambda (t2: T).(eq T (lift h d u2) (THead k u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i v t u3))) (\lambda (_: T).(\lambda +(t2: T).(subst0 (s k i) v t0 t2))) (ex2 T (\lambda (u1: T).(subst0 (minus i +h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H4: (eq T (lift h d u2) (THead k x0 +x1))).(\lambda (H5: (subst0 i v t x0)).(\lambda (H6: (subst0 (s k i) v t0 +x1)).(let H7 \def (sym_eq T (lift h d u2) (THead k x0 x1) H4) in (let H_x +\def (lift_gen_head k x0 x1 u2 h d H7) in (let H8 \def H_x in (ex3_2_ind T T +(\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T x0 (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T x1 (lift h (s k d) z)))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) +v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda +(x2: T).(\lambda (x3: T).(\lambda (H9: (eq T u2 (THead k x2 x3))).(\lambda +(H10: (eq T x0 (lift h d x2))).(\lambda (H11: (eq T x1 (lift h (s k d) +x3))).(let H12 \def (eq_ind T x1 (\lambda (t2: T).(subst0 (s k i) v t0 t2)) +H6 (lift h (s k d) x3) H11) in (let H13 \def (eq_ind T x0 (\lambda (t2: +T).(subst0 i v t t2)) H5 (lift h d x2) H10) in (eq_ind_r T (THead k x2 x3) +(\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 t2)) +(\lambda (u1: T).(eq T (THead k t t0) (lift h d u1))))) (let H_x0 \def (H v +x2 i h d H13 H2) in (let H14 \def H_x0 in (ex2_ind T (\lambda (u1: T).(subst0 +(minus i h) v u1 x2)) (\lambda (u1: T).(eq T t (lift h d u1))) (ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x2 x3))) (\lambda (u1: +T).(eq T (THead k t t0) (lift h d u1)))) (\lambda (x: T).(\lambda (H15: +(subst0 (minus i h) v x x2)).(\lambda (H16: (eq T t (lift h d x))).(eq_ind_r +T (lift h d x) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v +u1 (THead k x2 x3))) (\lambda (u1: T).(eq T (THead k t2 t0) (lift h d u1))))) +(let H_y \def (H0 v x3 (s k i) h (s k d) H12) in (let H17 \def (eq_ind_r nat +(plus (s k d) h) (\lambda (n: nat).((le n (s k i)) \to (ex2 T (\lambda (u1: +T).(subst0 (minus (s k i) h) v u1 x3)) (\lambda (u1: T).(eq T t0 (lift h (s k +d) u1)))))) H_y (s k (plus d h)) (s_plus k d h)) in (let H18 \def (eq_ind_r +nat (minus (s k i) h) (\lambda (n: nat).((le (s k (plus d h)) (s k i)) \to +(ex2 T (\lambda (u1: T).(subst0 n v u1 x3)) (\lambda (u1: T).(eq T t0 (lift h +(s k d) u1)))))) H17 (s k (minus i h)) (s_minus k i h (le_trans h (plus d h) +i (le_plus_r d h) H2))) in (let H19 \def (H18 (s_le k (plus d h) i H2)) in +(ex2_ind T (\lambda (u1: T).(subst0 (s k (minus i h)) v u1 x3)) (\lambda (u1: +T).(eq T t0 (lift h (s k d) u1))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) +v u1 (THead k x2 x3))) (\lambda (u1: T).(eq T (THead k (lift h d x) t0) (lift +h d u1)))) (\lambda (x4: T).(\lambda (H20: (subst0 (s k (minus i h)) v x4 +x3)).(\lambda (H21: (eq T t0 (lift h (s k d) x4))).(eq_ind_r T (lift h (s k +d) x4) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x2 x3))) (\lambda (u1: T).(eq T (THead k (lift h d x) t2) (lift h d +u1))))) (eq_ind T (lift h d (THead k x x4)) (\lambda (t2: T).(ex2 T (\lambda +(u1: T).(subst0 (minus i h) v u1 (THead k x2 x3))) (\lambda (u1: T).(eq T t2 +(lift h d u1))))) (ex_intro2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x2 x3))) (\lambda (u1: T).(eq T (lift h d (THead k x x4)) (lift h d +u1))) (THead k x x4) (subst0_both v x x2 (minus i h) H15 k x4 x3 H20) +(refl_equal T (lift h d (THead k x x4)))) (THead k (lift h d x) (lift h (s k +d) x4)) (lift_head k x x4 h d)) t0 H21)))) H19))))) t H16)))) H14))) u2 +H9)))))))) H8))))))))) H3)) (subst0_gen_head k v t t0 (lift h d u2) i +H1)))))))))))))) t1). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst0/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/props.ma new file mode 100644 index 000000000..38ab424ef --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/props.ma @@ -0,0 +1,224 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/fwd.ma". + +lemma subst0_refl: + \forall (u: T).(\forall (t: T).(\forall (d: nat).((subst0 d u t t) \to +(\forall (P: Prop).P)))) +\def + \lambda (u: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: +nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P)))) (\lambda (n: +nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TSort n) (TSort +n))).(\lambda (P: Prop).(subst0_gen_sort u (TSort n) d n H P))))) (\lambda +(n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TLRef n) (TLRef +n))).(\lambda (P: Prop).(land_ind (eq nat n d) (eq T (TLRef n) (lift (S n) O +u)) P (\lambda (_: (eq nat n d)).(\lambda (H1: (eq T (TLRef n) (lift (S n) O +u))).(lift_gen_lref_false (S n) O n (le_O_n n) (le_n (plus O (S n))) u H1 +P))) (subst0_gen_lref u (TLRef n) d n H)))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (H: ((\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: +Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).((subst0 d u +t1 t1) \to (\forall (P: Prop).P))))).(\lambda (d: nat).(\lambda (H1: (subst0 +d u (THead k t0 t1) (THead k t0 t1))).(\lambda (P: Prop).(or3_ind (ex2 T +(\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: +T).(subst0 d u t0 u2))) (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead +k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2))) (ex3_2 T T (\lambda +(u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda +(u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: +T).(subst0 (s k d) u t1 t2)))) P (\lambda (H2: (ex2 T (\lambda (u2: T).(eq T +(THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 +u2)))).(ex2_ind T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) +(\lambda (u2: T).(subst0 d u t0 u2)) P (\lambda (x: T).(\lambda (H3: (eq T +(THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 d u t0 x)).(let H5 +\def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | +(TLRef _) \Rightarrow t0 | (THead _ t2 _) \Rightarrow t2])) (THead k t0 t1) +(THead k x t1) H3) in (let H6 \def (eq_ind_r T x (\lambda (t2: T).(subst0 d u +t0 t2)) H4 t0 H5) in (H d H6 P)))))) H2)) (\lambda (H2: (ex2 T (\lambda (t2: +T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u +t1 t2)))).(ex2_ind T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) +(\lambda (t2: T).(subst0 (s k d) u t1 t2)) P (\lambda (x: T).(\lambda (H3: +(eq T (THead k t0 t1) (THead k t0 x))).(\lambda (H4: (subst0 (s k d) u t1 +x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) \Rightarrow t2])) +(THead k t0 t1) (THead k t0 x) H3) in (let H6 \def (eq_ind_r T x (\lambda +(t2: T).(subst0 (s k d) u t1 t2)) H4 t1 H5) in (H0 (s k d) H6 P)))))) H2)) +(\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 +t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) +(\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: T).(\lambda +(x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 x1))).(\lambda (H4: +(subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 x1)).(let H6 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef +_) \Rightarrow t0 | (THead _ t2 _) \Rightarrow t2])) (THead k t0 t1) (THead k +x0 x1) H3) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) +\Rightarrow t2])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T +t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t2: T).(subst0 (s k d) u t1 +t2)) H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t2: T).(subst0 d u +t0 t2)) H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 +t1 (THead k t0 t1) d H1)))))))))) t)). + +lemma subst0_lift_lt: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 +i u t1 t2) \to (\forall (d: nat).((lt i d) \to (\forall (h: nat).(subst0 i +(lift h (minus d (S i)) u) (lift h d t1) (lift h d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((lt n d) \to (\forall +(h: nat).(subst0 n (lift h (minus d (S n)) t) (lift h d t0) (lift h d +t3))))))))) (\lambda (v: T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda +(H0: (lt i0 d)).(\lambda (h: nat).(eq_ind_r T (TLRef i0) (\lambda (t: +T).(subst0 i0 (lift h (minus d (S i0)) v) t (lift h d (lift (S i0) O v)))) +(let w \def (minus d (S i0)) in (eq_ind nat (plus (S i0) (minus d (S i0))) +(\lambda (n: nat).(subst0 i0 (lift h w v) (TLRef i0) (lift h n (lift (S i0) O +v)))) (eq_ind_r T (lift (S i0) O (lift h (minus d (S i0)) v)) (\lambda (t: +T).(subst0 i0 (lift h w v) (TLRef i0) t)) (subst0_lref (lift h (minus d (S +i0)) v) i0) (lift h (plus (S i0) (minus d (S i0))) (lift (S i0) O v)) (lift_d +v h (S i0) (minus d (S i0)) O (le_O_n (minus d (S i0))))) d (le_plus_minus_r +(S i0) d H0))) (lift h d (TLRef i0)) (lift_lref_lt i0 h d H0))))))) (\lambda +(v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: +(subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt i0 d) \to (\forall +(h: nat).(subst0 i0 (lift h (minus d (S i0)) v) (lift h d u1) (lift h d +u2))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (lt +i0 d)).(\lambda (h: nat).(eq_ind_r T (THead k (lift h d u1) (lift h (s k d) +t)) (\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) t0 (lift h d +(THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t)) +(\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift h d +u1) (lift h (s k d) t)) t0)) (subst0_fst (lift h (minus d (S i0)) v) (lift h +d u2) (lift h d u1) i0 (H1 d H2 h) (lift h (s k d) t) k) (lift h d (THead k +u2 t)) (lift_head k u2 t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h +d))))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: +T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: +((\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) +(lift h (minus d (S (s k i0))) v) (lift h d t3) (lift h d t0))))))).(\lambda +(u0: T).(\lambda (d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(let H3 +\def (eq_ind_r nat (S (s k i0)) (\lambda (n: nat).(\forall (d0: nat).((lt (s +k i0) d0) \to (\forall (h0: nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) +(lift h0 d0 t3) (lift h0 d0 t0)))))) H1 (s k (S i0)) (s_S k i0)) in (eq_ind_r +T (THead k (lift h d u0) (lift h (s k d) t3)) (\lambda (t: T).(subst0 i0 +(lift h (minus d (S i0)) v) t (lift h d (THead k u0 t0)))) (eq_ind_r T (THead +k (lift h d u0) (lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h +(minus d (S i0)) v) (THead k (lift h d u0) (lift h (s k d) t3)) t)) (eq_ind +nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 i0 (lift h n v) +(THead k (lift h d u0) (lift h (s k d) t3)) (THead k (lift h d u0) (lift h (s +k d) t0)))) (subst0_snd k (lift h (minus (s k d) (s k (S i0))) v) (lift h (s +k d) t0) (lift h (s k d) t3) i0 (H3 (s k d) (s_lt k i0 d H2) h) (lift h d +u0)) (minus d (S i0)) (minus_s_s k d (S i0))) (lift h d (THead k u0 t0)) +(lift_head k u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h +d)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: +nat).((lt i0 d) \to (\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) +(lift h d u1) (lift h d u2))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda +(t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: +nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d +(S (s k i0))) v) (lift h d t0) (lift h d t3))))))).(\lambda (d: nat).(\lambda +(H4: (lt i0 d)).(\lambda (h: nat).(let H5 \def (eq_ind_r nat (S (s k i0)) +(\lambda (n: nat).(\forall (d0: nat).((lt (s k i0) d0) \to (\forall (h0: +nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) (lift h0 d0 t0) (lift h0 d0 +t3)))))) H3 (s k (S i0)) (s_S k i0)) in (eq_ind_r T (THead k (lift h d u1) +(lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t +(lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k +d) t3)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift +h d u1) (lift h (s k d) t0)) t)) (subst0_both (lift h (minus d (S i0)) v) +(lift h d u1) (lift h d u2) i0 (H1 d H4 h) k (lift h (s k d) t0) (lift h (s k +d) t3) (eq_ind nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 (s +k i0) (lift h n v) (lift h (s k d) t0) (lift h (s k d) t3))) (H5 (s k d) +(s_lt k i0 d H4) h) (minus d (S i0)) (minus_s_s k d (S i0)))) (lift h d +(THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead k u1 t0)) +(lift_head k u1 t0 h d))))))))))))))))) i u t1 t2 H))))). + +lemma subst0_lift_ge: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall +(h: nat).((subst0 i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst0 +(plus i h) u (lift h d t1) (lift h d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (H: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: +nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((le +d n) \to (subst0 (plus n h) t (lift h d t0) (lift h d t3)))))))) (\lambda (v: +T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda (H0: (le d i0)).(eq_ind_r T +(TLRef (plus i0 h)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (lift +(S i0) O v)))) (eq_ind_r T (lift (plus h (S i0)) O v) (\lambda (t: T).(subst0 +(plus i0 h) v (TLRef (plus i0 h)) t)) (eq_ind nat (S (plus h i0)) (\lambda +(n: nat).(subst0 (plus i0 h) v (TLRef (plus i0 h)) (lift n O v))) (eq_ind_r +nat (plus h i0) (\lambda (n: nat).(subst0 n v (TLRef n) (lift (S (plus h i0)) +O v))) (subst0_lref v (plus h i0)) (plus i0 h) (plus_sym i0 h)) (plus h (S +i0)) (plus_n_Sm h i0)) (lift h d (lift (S i0) O v)) (lift_free v (S i0) h O d +(le_S d i0 H0) (le_O_n d))) (lift h d (TLRef i0)) (lift_lref_ge i0 h d +H0)))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le +d i0) \to (subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (t: +T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (le d i0)).(eq_ind_r T +(THead k (lift h d u1) (lift h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 +h) v t0 (lift h d (THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift +h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 h) v (THead k (lift h d u1) +(lift h (s k d) t)) t0)) (subst0_fst v (lift h d u2) (lift h d u1) (plus i0 +h) (H1 d H2) (lift h (s k d) t) k) (lift h d (THead k u2 t)) (lift_head k u2 +t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h d)))))))))))) (\lambda +(k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: +nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: +nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t3) (lift h d +t0)))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (le d i0)).(let H3 +\def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: nat).(\forall (d0: +nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t3) (lift h d0 t0))))) H1 +(s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift h d u0) +(lift h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (THead +k u0 t0)))) (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t0)) (\lambda +(t: T).(subst0 (plus i0 h) v (THead k (lift h d u0) (lift h (s k d) t3)) t)) +(subst0_snd k v (lift h (s k d) t0) (lift h (s k d) t3) (plus i0 h) (H3 (s k +d) (s_le k d i0 H2)) (lift h d u0)) (lift h d (THead k u0 t0)) (lift_head k +u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h d))))))))))))) +(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda +(_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le d i0) \to +(subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (k: +K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i0) v t0 +t3)).(\lambda (H3: ((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k +i0) h) v (lift h d t0) (lift h d t3)))))).(\lambda (d: nat).(\lambda (H4: (le +d i0)).(let H5 \def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: +nat).(\forall (d0: nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t0) +(lift h d0 t3))))) H3 (s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T +(THead k (lift h d u1) (lift h (s k d) t0)) (\lambda (t: T).(subst0 (plus i0 +h) v t (lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift +h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v (THead k (lift h d u1) +(lift h (s k d) t0)) t)) (subst0_both v (lift h d u1) (lift h d u2) (plus i0 +h) (H1 d H4) k (lift h (s k d) t0) (lift h (s k d) t3) (H5 (s k d) (s_le k d +i0 H4))) (lift h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead +k u1 t0)) (lift_head k u1 t0 h d)))))))))))))))) i u t1 t2 H)))))). + +lemma subst0_lift_ge_S: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 +i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst0 (S i) u (lift (S O) d +t1) (lift (S O) d t2)))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(eq_ind nat +(plus i (S O)) (\lambda (n: nat).(subst0 n u (lift (S O) d t1) (lift (S O) d +t2))) (subst0_lift_ge t1 t2 u i (S O) H d H0) (S i) (eq_ind_r nat (plus (S O) +i) (\lambda (n: nat).(eq nat n (S i))) (le_antisym (plus (S O) i) (S i) (le_n +(S i)) (le_n (plus (S O) i))) (plus i (S O)) (plus_sym i (S O)))))))))). + +lemma subst0_lift_ge_s: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 +i u t1 t2) \to (\forall (d: nat).((le d i) \to (\forall (b: B).(subst0 (s +(Bind b) i) u (lift (S O) d t1) (lift (S O) d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(\lambda +(_: B).(subst0_lift_ge_S t1 t2 u i H d H0)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst0/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/subst0.ma new file mode 100644 index 000000000..bbd13a671 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/subst0.ma @@ -0,0 +1,1389 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/props.ma". + +include "basic_1A/s/fwd.ma". + +theorem subst0_subst0: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 +j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i +u u1 u2) \to (ex2 T (\lambda (t: T).(subst0 j u1 t1 t)) (\lambda (t: +T).(subst0 (S (plus i j)) u t t2))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda +(H: (subst0 j u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).(\forall (u: +T).(\forall (i: nat).((subst0 i u u1 t) \to (ex2 T (\lambda (t4: T).(subst0 n +u1 t0 t4)) (\lambda (t4: T).(subst0 (S (plus i n)) u t4 t3))))))))))) +(\lambda (v: T).(\lambda (i: nat).(\lambda (u1: T).(\lambda (u: T).(\lambda +(i0: nat).(\lambda (H0: (subst0 i0 u u1 v)).(eq_ind nat (plus i0 (S i)) +(\lambda (n: nat).(ex2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda +(t: T).(subst0 n u t (lift (S i) O v))))) (ex_intro2 T (\lambda (t: +T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 (plus i0 (S i)) u t +(lift (S i) O v))) (lift (S i) O u1) (subst0_lref u1 i) (subst0_lift_ge u1 v +u i0 (S i) H0 O (le_O_n i0))) (S (plus i0 i)) (sym_eq nat (S (plus i0 i)) +(plus i0 (S i)) (plus_n_Sm i0 i))))))))) (\lambda (v: T).(\lambda (u0: +T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 +u0)).(\lambda (H1: ((\forall (u3: T).(\forall (u: T).(\forall (i0: +nat).((subst0 i0 u u3 v) \to (ex2 T (\lambda (t: T).(subst0 i u3 u1 t)) +(\lambda (t: T).(subst0 (S (plus i0 i)) u t u0))))))))).(\lambda (t: +T).(\lambda (k: K).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: +nat).(\lambda (H2: (subst0 i0 u u3 v)).(ex2_ind T (\lambda (t0: T).(subst0 i +u3 u1 t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u t0 u0)) (ex2 T (\lambda +(t0: T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 +i)) u t0 (THead k u0 t)))) (\lambda (x: T).(\lambda (H3: (subst0 i u3 u1 +x)).(\lambda (H4: (subst0 (S (plus i0 i)) u x u0)).(ex_intro2 T (\lambda (t0: +T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) +u t0 (THead k u0 t))) (THead k x t) (subst0_fst u3 x u1 i H3 t k) (subst0_fst +u u0 x (S (plus i0 i)) H4 t k))))) (H1 u3 u i0 H2)))))))))))))) (\lambda (k: +K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i: +nat).(\lambda (_: (subst0 (s k i) v t3 t0)).(\lambda (H1: ((\forall (u1: +T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u1 v) \to (ex2 T (\lambda +(t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k +i))) u t t0))))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (u0: +T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u0 u1 v)).(ex2_ind T (\lambda +(t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k +i))) u0 t t0)) (ex2 T (\lambda (t: T).(subst0 i u1 (THead k u t3) t)) +(\lambda (t: T).(subst0 (S (plus i0 i)) u0 t (THead k u t0)))) (\lambda (x: +T).(\lambda (H3: (subst0 (s k i) u1 t3 x)).(\lambda (H4: (subst0 (S (plus i0 +(s k i))) u0 x t0)).(let H5 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: +nat).(subst0 (S n) u0 x t0)) H4 (s k (plus i0 i)) (s_plus_sym k i0 i)) in +(let H6 \def (eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n +u0 x t0)) H5 (s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T +(\lambda (t: T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S +(plus i0 i)) u0 t (THead k u t0))) (THead k u x) (subst0_snd k u1 x t3 i H3 +u) (subst0_snd k u0 t0 x (S (plus i0 i)) H6 u))))))) (H1 u1 u0 i0 +H2)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda +(i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: ((\forall (u3: +T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u3 v) \to (ex2 T (\lambda +(t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t +u0))))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: +(subst0 (s k i) v t0 t3)).(\lambda (H3: ((\forall (u3: T).(\forall (u: +T).(\forall (i0: nat).((subst0 i0 u u3 v) \to (ex2 T (\lambda (t: T).(subst0 +(s k i) u3 t0 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t +t3))))))))).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H4: +(subst0 i0 u u3 v)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) +(\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t t3)) (ex2 T (\lambda (t: +T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u +t (THead k u0 t3)))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i) u3 t0 +x)).(\lambda (H6: (subst0 (S (plus i0 (s k i))) u x t3)).(ex2_ind T (\lambda +(t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t u0)) +(ex2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: +T).(subst0 (S (plus i0 i)) u t (THead k u0 t3)))) (\lambda (x0: T).(\lambda +(H7: (subst0 i u3 u1 x0)).(\lambda (H8: (subst0 (S (plus i0 i)) u x0 +u0)).(let H9 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 +(S n) u x t3)) H6 (s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H10 \def +(eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n u x t3)) H9 +(s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: +T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u +t (THead k u0 t3))) (THead k x0 x) (subst0_both u3 u1 x0 i H7 k t0 x H5) +(subst0_both u x0 u0 (S (plus i0 i)) H8 k x t3 H10))))))) (H1 u3 u i0 H4))))) +(H3 u3 u i0 H4))))))))))))))))) j u2 t1 t2 H))))). + +theorem subst0_subst0_back: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 +j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i +u u2 u1) \to (ex2 T (\lambda (t: T).(subst0 j u1 t1 t)) (\lambda (t: +T).(subst0 (S (plus i j)) u t2 t))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda +(H: (subst0 j u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).(\forall (u: +T).(\forall (i: nat).((subst0 i u t u1) \to (ex2 T (\lambda (t4: T).(subst0 n +u1 t0 t4)) (\lambda (t4: T).(subst0 (S (plus i n)) u t3 t4))))))))))) +(\lambda (v: T).(\lambda (i: nat).(\lambda (u1: T).(\lambda (u: T).(\lambda +(i0: nat).(\lambda (H0: (subst0 i0 u v u1)).(eq_ind nat (plus i0 (S i)) +(\lambda (n: nat).(ex2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda +(t: T).(subst0 n u (lift (S i) O v) t)))) (ex_intro2 T (\lambda (t: +T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 (plus i0 (S i)) u (lift +(S i) O v) t)) (lift (S i) O u1) (subst0_lref u1 i) (subst0_lift_ge v u1 u i0 +(S i) H0 O (le_O_n i0))) (S (plus i0 i)) (sym_eq nat (S (plus i0 i)) (plus i0 +(S i)) (plus_n_Sm i0 i))))))))) (\lambda (v: T).(\lambda (u0: T).(\lambda +(u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: +((\forall (u3: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u v u3) \to +(ex2 T (\lambda (t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus +i0 i)) u u0 t))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (u3: +T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u v +u3)).(ex2_ind T (\lambda (t0: T).(subst0 i u3 u1 t0)) (\lambda (t0: +T).(subst0 (S (plus i0 i)) u u0 t0)) (ex2 T (\lambda (t0: T).(subst0 i u3 +(THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u (THead k u0 t) +t0))) (\lambda (x: T).(\lambda (H3: (subst0 i u3 u1 x)).(\lambda (H4: (subst0 +(S (plus i0 i)) u u0 x)).(ex_intro2 T (\lambda (t0: T).(subst0 i u3 (THead k +u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u (THead k u0 t) t0)) +(THead k x t) (subst0_fst u3 x u1 i H3 t k) (subst0_fst u x u0 (S (plus i0 +i)) H4 t k))))) (H1 u3 u i0 H2)))))))))))))) (\lambda (k: K).(\lambda (v: +T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (_: (subst0 +(s k i) v t3 t0)).(\lambda (H1: ((\forall (u1: T).(\forall (u: T).(\forall +(i0: nat).((subst0 i0 u v u1) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u1 +t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t0 t))))))))).(\lambda +(u: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H2: +(subst0 i0 u0 v u1)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u1 t3 t)) +(\lambda (t: T).(subst0 (S (plus i0 (s k i))) u0 t0 t)) (ex2 T (\lambda (t: +T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 +(THead k u t0) t))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i) u1 t3 +x)).(\lambda (H4: (subst0 (S (plus i0 (s k i))) u0 t0 x)).(let H5 \def +(eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u0 t0 x)) H4 +(s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H6 \def (eq_ind_r nat (S (s k +(plus i0 i))) (\lambda (n: nat).(subst0 n u0 t0 x)) H5 (s k (S (plus i0 i))) +(s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u1 (THead k u +t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 (THead k u t0) t)) (THead +k u x) (subst0_snd k u1 x t3 i H3 u) (subst0_snd k u0 x t0 (S (plus i0 i)) H6 +u))))))) (H1 u1 u0 i0 H2)))))))))))))) (\lambda (v: T).(\lambda (u1: +T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 +u0)).(\lambda (H1: ((\forall (u3: T).(\forall (u: T).(\forall (i0: +nat).((subst0 i0 u v u3) \to (ex2 T (\lambda (t: T).(subst0 i u3 u1 t)) +(\lambda (t: T).(subst0 (S (plus i0 i)) u u0 t))))))))).(\lambda (k: +K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i) v t0 +t3)).(\lambda (H3: ((\forall (u3: T).(\forall (u: T).(\forall (i0: +nat).((subst0 i0 u v u3) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) +(\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t3 t))))))))).(\lambda (u3: +T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H4: (subst0 i0 u v +u3)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) (\lambda (t: +T).(subst0 (S (plus i0 (s k i))) u t3 t)) (ex2 T (\lambda (t: T).(subst0 i u3 +(THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) +t))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i) u3 t0 x)).(\lambda (H6: +(subst0 (S (plus i0 (s k i))) u t3 x)).(ex2_ind T (\lambda (t: T).(subst0 i +u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u u0 t)) (ex2 T (\lambda +(t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 +i)) u (THead k u0 t3) t))) (\lambda (x0: T).(\lambda (H7: (subst0 i u3 u1 +x0)).(\lambda (H8: (subst0 (S (plus i0 i)) u u0 x0)).(let H9 \def (eq_ind_r +nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u t3 x)) H6 (s k (plus +i0 i)) (s_plus_sym k i0 i)) in (let H10 \def (eq_ind_r nat (S (s k (plus i0 +i))) (\lambda (n: nat).(subst0 n u t3 x)) H9 (s k (S (plus i0 i))) (s_S k +(plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) +t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) t)) (THead k x0 +x) (subst0_both u3 u1 x0 i H7 k t0 x H5) (subst0_both u u0 x0 (S (plus i0 i)) +H8 k t3 x H10))))))) (H1 u3 u i0 H4))))) (H3 u3 u i0 H4))))))))))))))))) j u2 +t1 t2 H))))). + +theorem subst0_trans: + \forall (t2: T).(\forall (t1: T).(\forall (v: T).(\forall (i: nat).((subst0 +i v t1 t2) \to (\forall (t3: T).((subst0 i v t2 t3) \to (subst0 i v t1 +t3))))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (subst0 i v t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t0: T).(\lambda (t3: T).(\forall (t4: T).((subst0 n t t3 t4) \to +(subst0 n t t0 t4))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (t3: +T).(\lambda (H0: (subst0 i0 v0 (lift (S i0) O v0) t3)).(subst0_gen_lift_false +v0 v0 t3 (S i0) O i0 (le_O_n i0) (le_n (plus O (S i0))) H0 (subst0 i0 v0 +(TLRef i0) t3)))))) (\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: +T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 v0 u1 u2)).(\lambda (H1: +((\forall (t3: T).((subst0 i0 v0 u2 t3) \to (subst0 i0 v0 u1 t3))))).(\lambda +(t: T).(\lambda (k: K).(\lambda (t3: T).(\lambda (H2: (subst0 i0 v0 (THead k +u2 t) t3)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t3 (THead k u3 t))) +(\lambda (u3: T).(subst0 i0 v0 u2 u3))) (ex2 T (\lambda (t4: T).(eq T t3 +(THead k u2 t4))) (\lambda (t4: T).(subst0 (s k i0) v0 t t4))) (ex3_2 T T +(\lambda (u3: T).(\lambda (t4: T).(eq T t3 (THead k u3 t4)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t4: +T).(subst0 (s k i0) v0 t t4)))) (subst0 i0 v0 (THead k u1 t) t3) (\lambda +(H3: (ex2 T (\lambda (u3: T).(eq T t3 (THead k u3 t))) (\lambda (u3: +T).(subst0 i0 v0 u2 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t3 (THead k u3 +t))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)) (subst0 i0 v0 (THead k u1 t) t3) +(\lambda (x: T).(\lambda (H4: (eq T t3 (THead k x t))).(\lambda (H5: (subst0 +i0 v0 u2 x)).(eq_ind_r T (THead k x t) (\lambda (t0: T).(subst0 i0 v0 (THead +k u1 t) t0)) (subst0_fst v0 x u1 i0 (H1 x H5) t k) t3 H4)))) H3)) (\lambda +(H3: (ex2 T (\lambda (t4: T).(eq T t3 (THead k u2 t4))) (\lambda (t4: +T).(subst0 (s k i0) v0 t t4)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead k +u2 t4))) (\lambda (t4: T).(subst0 (s k i0) v0 t t4)) (subst0 i0 v0 (THead k +u1 t) t3) (\lambda (x: T).(\lambda (H4: (eq T t3 (THead k u2 x))).(\lambda +(H5: (subst0 (s k i0) v0 t x)).(eq_ind_r T (THead k u2 x) (\lambda (t0: +T).(subst0 i0 v0 (THead k u1 t) t0)) (subst0_both v0 u1 u2 i0 H0 k t x H5) t3 +H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t4: T).(eq T +t3 (THead k u3 t4)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) +(\lambda (_: T).(\lambda (t4: T).(subst0 (s k i0) v0 t t4))))).(ex3_2_ind T T +(\lambda (u3: T).(\lambda (t4: T).(eq T t3 (THead k u3 t4)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t4: +T).(subst0 (s k i0) v0 t t4))) (subst0 i0 v0 (THead k u1 t) t3) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H4: (eq T t3 (THead k x0 x1))).(\lambda (H5: +(subst0 i0 v0 u2 x0)).(\lambda (H6: (subst0 (s k i0) v0 t x1)).(eq_ind_r T +(THead k x0 x1) (\lambda (t0: T).(subst0 i0 v0 (THead k u1 t) t0)) +(subst0_both v0 u1 x0 i0 (H1 x0 H5) k t x1 H6) t3 H4)))))) H3)) +(subst0_gen_head k v0 u2 t t3 i0 H2)))))))))))) (\lambda (k: K).(\lambda (v0: +T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: nat).(\lambda (H0: (subst0 +(s k i0) v0 t3 t0)).(\lambda (H1: ((\forall (t4: T).((subst0 (s k i0) v0 t0 +t4) \to (subst0 (s k i0) v0 t3 t4))))).(\lambda (u: T).(\lambda (t4: +T).(\lambda (H2: (subst0 i0 v0 (THead k u t0) t4)).(or3_ind (ex2 T (\lambda +(u2: T).(eq T t4 (THead k u2 t0))) (\lambda (u2: T).(subst0 i0 v0 u u2))) +(ex2 T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s +k i0) v0 t0 t5))) (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 +(THead k u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u u2))) +(\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)))) (subst0 i0 v0 +(THead k u t3) t4) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 +t0))) (\lambda (u2: T).(subst0 i0 v0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq +T t4 (THead k u2 t0))) (\lambda (u2: T).(subst0 i0 v0 u u2)) (subst0 i0 v0 +(THead k u t3) t4) (\lambda (x: T).(\lambda (H4: (eq T t4 (THead k x +t0))).(\lambda (H5: (subst0 i0 v0 u x)).(eq_ind_r T (THead k x t0) (\lambda +(t: T).(subst0 i0 v0 (THead k u t3) t)) (subst0_both v0 u x i0 H5 k t3 t0 H0) +t4 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u +t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)))).(ex2_ind T (\lambda (t5: +T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)) +(subst0 i0 v0 (THead k u t3) t4) (\lambda (x: T).(\lambda (H4: (eq T t4 +(THead k u x))).(\lambda (H5: (subst0 (s k i0) v0 t0 x)).(eq_ind_r T (THead k +u x) (\lambda (t: T).(subst0 i0 v0 (THead k u t3) t)) (subst0_snd k v0 x t3 +i0 (H1 x H5) u) t4 H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u2: +T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i0 v0 u u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 +t0 t5))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k +u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u u2))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i0) v0 t0 t5))) (subst0 i0 v0 (THead k u t3) +t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t4 (THead k x0 +x1))).(\lambda (H5: (subst0 i0 v0 u x0)).(\lambda (H6: (subst0 (s k i0) v0 t0 +x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(subst0 i0 v0 (THead k u t3) +t)) (subst0_both v0 u x0 i0 H5 k t3 x1 (H1 x1 H6)) t4 H4)))))) H3)) +(subst0_gen_head k v0 u t0 t4 i0 H2)))))))))))) (\lambda (v0: T).(\lambda +(u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 v0 u1 +u2)).(\lambda (H1: ((\forall (t3: T).((subst0 i0 v0 u2 t3) \to (subst0 i0 v0 +u1 t3))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H2: +(subst0 (s k i0) v0 t0 t3)).(\lambda (H3: ((\forall (t4: T).((subst0 (s k i0) +v0 t3 t4) \to (subst0 (s k i0) v0 t0 t4))))).(\lambda (t4: T).(\lambda (H4: +(subst0 i0 v0 (THead k u2 t3) t4)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t4 +(THead k u3 t3))) (\lambda (u3: T).(subst0 i0 v0 u2 u3))) (ex2 T (\lambda +(t5: T).(eq T t4 (THead k u2 t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t3 +t5))) (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 +t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)))) (subst0 i0 v0 (THead k u1 +t0) t4) (\lambda (H5: (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) +(\lambda (u3: T).(subst0 i0 v0 u2 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 +(THead k u3 t3))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)) (subst0 i0 v0 (THead +k u1 t0) t4) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k x t3))).(\lambda +(H7: (subst0 i0 v0 u2 x)).(eq_ind_r T (THead k x t3) (\lambda (t: T).(subst0 +i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 x i0 (H1 x H7) k t0 t3 H2) t4 +H6)))) H5)) (\lambda (H5: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u2 t5))) +(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)))).(ex2_ind T (\lambda (t5: +T).(eq T t4 (THead k u2 t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)) +(subst0 i0 v0 (THead k u1 t0) t4) (\lambda (x: T).(\lambda (H6: (eq T t4 +(THead k u2 x))).(\lambda (H7: (subst0 (s k i0) v0 t3 x)).(eq_ind_r T (THead +k u2 x) (\lambda (t: T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 +u2 i0 H0 k t0 x (H3 x H7)) t4 H6)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda +(u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s k i0) v0 t3 t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda +(t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 +i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5))) +(subst0 i0 v0 (THead k u1 t0) t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H6: (eq T t4 (THead k x0 x1))).(\lambda (H7: (subst0 i0 v0 u2 x0)).(\lambda +(H8: (subst0 (s k i0) v0 t3 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: +T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 x0 i0 (H1 x0 H7) k t0 +x1 (H3 x1 H8)) t4 H6)))))) H5)) (subst0_gen_head k v0 u2 t3 t4 i0 +H4))))))))))))))) i v t1 t2 H))))). + +theorem subst0_confluence_neq: + \forall (t0: T).(\forall (t1: T).(\forall (u1: T).(\forall (i1: +nat).((subst0 i1 u1 t0 t1) \to (\forall (t2: T).(\forall (u2: T).(\forall +(i2: nat).((subst0 i2 u2 t0 t2) \to ((not (eq nat i1 i2)) \to (ex2 T (\lambda +(t: T).(subst0 i2 u2 t1 t)) (\lambda (t: T).(subst0 i1 u1 t2 t)))))))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u1: T).(\lambda (i1: +nat).(\lambda (H: (subst0 i1 u1 t0 t1)).(subst0_ind (\lambda (n: +nat).(\lambda (t: T).(\lambda (t2: T).(\lambda (t3: T).(\forall (t4: +T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t2 t4) \to ((not (eq +nat n i2)) \to (ex2 T (\lambda (t5: T).(subst0 i2 u2 t3 t5)) (\lambda (t5: +T).(subst0 n t t4 t5)))))))))))) (\lambda (v: T).(\lambda (i: nat).(\lambda +(t2: T).(\lambda (u2: T).(\lambda (i2: nat).(\lambda (H0: (subst0 i2 u2 +(TLRef i) t2)).(\lambda (H1: (not (eq nat i i2))).(land_ind (eq nat i i2) (eq +T t2 (lift (S i) O u2)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (lift (S i) O v) +t)) (\lambda (t: T).(subst0 i v t2 t))) (\lambda (H2: (eq nat i i2)).(\lambda +(H3: (eq T t2 (lift (S i) O u2))).(let H4 \def (eq_ind nat i (\lambda (n: +nat).(not (eq nat n i2))) H1 i2 H2) in (eq_ind_r T (lift (S i) O u2) (\lambda +(t: T).(ex2 T (\lambda (t3: T).(subst0 i2 u2 (lift (S i) O v) t3)) (\lambda +(t3: T).(subst0 i v t t3)))) (let H5 \def (match (H4 (refl_equal nat i2)) in +False with []) in H5) t2 H3)))) (subst0_gen_lref u2 t2 i2 i H0))))))))) +(\lambda (v: T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda +(H0: (subst0 i v u0 u2)).(\lambda (H1: ((\forall (t2: T).(\forall (u3: +T).(\forall (i2: nat).((subst0 i2 u3 u0 t2) \to ((not (eq nat i i2)) \to (ex2 +T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v t2 +t)))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (t2: T).(\lambda (u3: +T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u3 (THead k u0 t) +t2)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u4: T).(eq +T t2 (THead k u4 t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T (\lambda +(t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) u3 t +t3))) (ex3_2 T T (\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 +t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3)))) (ex2 T (\lambda (t3: +T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) +(\lambda (H4: (ex2 T (\lambda (u4: T).(eq T t2 (THead k u4 t))) (\lambda (u4: +T).(subst0 i2 u3 u0 u4)))).(ex2_ind T (\lambda (u4: T).(eq T t2 (THead k u4 +t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t3: T).(subst0 +i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: +T).(\lambda (H5: (eq T t2 (THead k x t))).(\lambda (H6: (subst0 i2 u3 u0 +x)).(eq_ind_r T (THead k x t) (\lambda (t3: T).(ex2 T (\lambda (t4: +T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) +(ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: T).(subst0 i +v x t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda +(t3: T).(subst0 i v (THead k x t) t3))) (\lambda (x0: T).(\lambda (H7: +(subst0 i2 u3 u2 x0)).(\lambda (H8: (subst0 i v x x0)).(ex_intro2 T (\lambda +(t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead +k x t) t3)) (THead k x0 t) (subst0_fst u3 x0 u2 i2 H7 t k) (subst0_fst v x0 x +i H8 t k))))) (H1 x u3 i2 H6 H3)) t2 H5)))) H4)) (\lambda (H4: (ex2 T +(\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) +u3 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda +(t3: T).(subst0 (s k i2) u3 t t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 +(THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: +T).(\lambda (H5: (eq T t2 (THead k u0 x))).(\lambda (H6: (subst0 (s k i2) u3 +t x)).(eq_ind_r T (THead k u0 x) (\lambda (t3: T).(ex2 T (\lambda (t4: +T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) +(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i v (THead k u0 x) t3)) (THead k u2 x) (subst0_snd k u3 x t i2 H6 +u2) (subst0_fst v u2 u0 i H0 x k)) t2 H5)))) H4)) (\lambda (H4: (ex3_2 T T +(\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: +T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s k i2) u3 t t3))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda +(t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 +i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3))) +(ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i v t2 t3))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T +t2 (THead k x0 x1))).(\lambda (H6: (subst0 i2 u3 u0 x0)).(\lambda (H7: +(subst0 (s k i2) u3 t x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t3: T).(ex2 +T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 +i v t3 t4)))) (ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: +T).(subst0 i v x0 t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) +t3)) (\lambda (t3: T).(subst0 i v (THead k x0 x1) t3))) (\lambda (x: +T).(\lambda (H8: (subst0 i2 u3 u2 x)).(\lambda (H9: (subst0 i v x0 +x)).(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda +(t3: T).(subst0 i v (THead k x0 x1) t3)) (THead k x x1) (subst0_both u3 u2 x +i2 H8 k t x1 H7) (subst0_fst v x x0 i H9 x1 k))))) (H1 x0 u3 i2 H6 H3)) t2 +H5)))))) H4)) (subst0_gen_head k u3 u0 t t2 i2 H2))))))))))))))) (\lambda (k: +K).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (i: +nat).(\lambda (H0: (subst0 (s k i) v t3 t2)).(\lambda (H1: ((\forall (t4: +T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t3 t4) \to ((not (eq +nat (s k i) i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u2 t2 t)) (\lambda (t: +T).(subst0 (s k i) v t4 t)))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda +(u2: T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u2 (THead k u t3) +t4)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u3: T).(eq +T t4 (THead k u3 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3))) (ex2 T (\lambda +(t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i2) u2 t3 +t5))) (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 +t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i2) u2 t3 t5)))) (ex2 T (\lambda (t: +T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) +(\lambda (H4: (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) (\lambda +(u3: T).(subst0 i2 u2 u u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 (THead k +u3 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3)) (ex2 T (\lambda (t: T).(subst0 +i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: +T).(\lambda (H5: (eq T t4 (THead k x t3))).(\lambda (H6: (subst0 i2 u2 u +x)).(eq_ind_r T (THead k x t3) (\lambda (t: T).(ex2 T (\lambda (t5: +T).(subst0 i2 u2 (THead k u t2) t5)) (\lambda (t5: T).(subst0 i v t t5)))) +(ex_intro2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: +T).(subst0 i v (THead k x t3) t)) (THead k x t2) (subst0_fst u2 x u i2 H6 t2 +k) (subst0_snd k v t2 t3 i H0 x)) t4 H5)))) H4)) (\lambda (H4: (ex2 T +(\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i2) +u2 t3 t5)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda +(t5: T).(subst0 (s k i2) u2 t3 t5)) (ex2 T (\lambda (t: T).(subst0 i2 u2 +(THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: +T).(\lambda (H5: (eq T t4 (THead k u x))).(\lambda (H6: (subst0 (s k i2) u2 +t3 x)).(eq_ind_r T (THead k u x) (\lambda (t: T).(ex2 T (\lambda (t5: +T).(subst0 i2 u2 (THead k u t2) t5)) (\lambda (t5: T).(subst0 i v t t5)))) +(ex2_ind T (\lambda (t: T).(subst0 (s k i2) u2 t2 t)) (\lambda (t: T).(subst0 +(s k i) v x t)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) +(\lambda (t: T).(subst0 i v (THead k u x) t))) (\lambda (x0: T).(\lambda (H7: +(subst0 (s k i2) u2 t2 x0)).(\lambda (H8: (subst0 (s k i) v x x0)).(ex_intro2 +T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i +v (THead k u x) t)) (THead k u x0) (subst0_snd k u2 x0 t2 i2 H7 u) +(subst0_snd k v x0 x i H8 u))))) (H1 x u2 (s k i2) H6 (ex2_ind T (\lambda (t: +T).(subst0 (s k i2) u2 t2 t)) (\lambda (t: T).(subst0 (s k i) v x t)) ((eq +nat (s k i) (s k i2)) \to False) (\lambda (x0: T).(\lambda (_: (subst0 (s k +i2) u2 t2 x0)).(\lambda (_: (subst0 (s k i) v x x0)).(\lambda (H9: (eq nat (s +k i) (s k i2))).(H3 (s_inj k i i2 H9)))))) (H1 x u2 (s k i2) H6 (\lambda (H7: +(eq nat (s k i) (s k i2))).(H3 (s_inj k i i2 H7))))))) t4 H5)))) H4)) +(\lambda (H4: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k +u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i2) u2 t3 t5))))).(ex3_2_ind T T (\lambda +(u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s k i2) u2 t3 t5))) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k +u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H5: (eq T t4 (THead k x0 x1))).(\lambda (H6: (subst0 i2 u2 u +x0)).(\lambda (H7: (subst0 (s k i2) u2 t3 x1)).(eq_ind_r T (THead k x0 x1) +(\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u2 (THead k u t2) t5)) +(\lambda (t5: T).(subst0 i v t t5)))) (ex2_ind T (\lambda (t: T).(subst0 (s k +i2) u2 t2 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) (ex2 T (\lambda (t: +T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k x0 +x1) t))) (\lambda (x: T).(\lambda (H8: (subst0 (s k i2) u2 t2 x)).(\lambda +(H9: (subst0 (s k i) v x1 x)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u2 +(THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k x0 x1) t)) (THead k +x0 x) (subst0_both u2 u x0 i2 H6 k t2 x H8) (subst0_snd k v x x1 i H9 x0))))) +(H1 x1 u2 (s k i2) H7 (ex2_ind T (\lambda (t: T).(subst0 (s k i2) u2 t2 t)) +(\lambda (t: T).(subst0 (s k i) v x1 t)) ((eq nat (s k i) (s k i2)) \to +False) (\lambda (x: T).(\lambda (_: (subst0 (s k i2) u2 t2 x)).(\lambda (_: +(subst0 (s k i) v x1 x)).(\lambda (H10: (eq nat (s k i) (s k i2))).(H3 (s_inj +k i i2 H10)))))) (H1 x1 u2 (s k i2) H7 (\lambda (H8: (eq nat (s k i) (s k +i2))).(H3 (s_inj k i i2 H8))))))) t4 H5)))))) H4)) (subst0_gen_head k u2 u t3 +t4 i2 H2))))))))))))))) (\lambda (v: T).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (i: nat).(\lambda (H0: (subst0 i v u0 u2)).(\lambda (H1: +((\forall (t2: T).(\forall (u3: T).(\forall (i2: nat).((subst0 i2 u3 u0 t2) +\to ((not (eq nat i i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u3 u2 t)) +(\lambda (t: T).(subst0 i v t2 t)))))))))).(\lambda (k: K).(\lambda (t2: +T).(\lambda (t3: T).(\lambda (H2: (subst0 (s k i) v t2 t3)).(\lambda (H3: +((\forall (t4: T).(\forall (u3: T).(\forall (i2: nat).((subst0 i2 u3 t2 t4) +\to ((not (eq nat (s k i) i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u3 t3 +t)) (\lambda (t: T).(subst0 (s k i) v t4 t)))))))))).(\lambda (t4: +T).(\lambda (u3: T).(\lambda (i2: nat).(\lambda (H4: (subst0 i2 u3 (THead k +u0 t2) t4)).(\lambda (H5: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u4: +T).(eq T t4 (THead k u4 t2))) (\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T +(\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i2) +u3 t2 t5))) (ex3_2 T T (\lambda (u4: T).(\lambda (t5: T).(eq T t4 (THead k u4 +t5)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i2) u3 t2 t5)))) (ex2 T (\lambda (t: +T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) +(\lambda (H6: (ex2 T (\lambda (u4: T).(eq T t4 (THead k u4 t2))) (\lambda +(u4: T).(subst0 i2 u3 u0 u4)))).(ex2_ind T (\lambda (u4: T).(eq T t4 (THead k +u4 t2))) (\lambda (u4: T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t: +T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) +(\lambda (x: T).(\lambda (H7: (eq T t4 (THead k x t2))).(\lambda (H8: (subst0 +i2 u3 u0 x)).(eq_ind_r T (THead k x t2) (\lambda (t: T).(ex2 T (\lambda (t5: +T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) +(ex2_ind T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v x +t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i v (THead k x t2) t))) (\lambda (x0: T).(\lambda (H9: (subst0 i2 +u3 u2 x0)).(\lambda (H10: (subst0 i v x x0)).(ex_intro2 T (\lambda (t: +T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x +t2) t)) (THead k x0 t3) (subst0_fst u3 x0 u2 i2 H9 t3 k) (subst0_both v x x0 +i H10 k t2 t3 H2))))) (H1 x u3 i2 H8 H5)) t4 H7)))) H6)) (\lambda (H6: (ex2 T +(\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i2) +u3 t2 t5)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda +(t5: T).(subst0 (s k i2) u3 t2 t5)) (ex2 T (\lambda (t: T).(subst0 i2 u3 +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: +T).(\lambda (H7: (eq T t4 (THead k u0 x))).(\lambda (H8: (subst0 (s k i2) u3 +t2 x)).(eq_ind_r T (THead k u0 x) (\lambda (t: T).(ex2 T (\lambda (t5: +T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) +(ex2_ind T (\lambda (t: T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 +(s k i) v x t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i v (THead k u0 x) t))) (\lambda (x0: T).(\lambda +(H9: (subst0 (s k i2) u3 t3 x0)).(\lambda (H10: (subst0 (s k i) v x +x0)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda +(t: T).(subst0 i v (THead k u0 x) t)) (THead k u2 x0) (subst0_snd k u3 x0 t3 +i2 H9 u2) (subst0_both v u0 u2 i H0 k x x0 H10))))) (H3 x u3 (s k i2) H8 +(ex2_ind T (\lambda (t: T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 +(s k i) v x t)) ((eq nat (s k i) (s k i2)) \to False) (\lambda (x0: +T).(\lambda (_: (subst0 (s k i2) u3 t3 x0)).(\lambda (_: (subst0 (s k i) v x +x0)).(\lambda (H11: (eq nat (s k i) (s k i2))).(H5 (s_inj k i i2 H11)))))) +(H3 x u3 (s k i2) H8 (\lambda (H9: (eq nat (s k i) (s k i2))).(H5 (s_inj k i +i2 H9))))))) t4 H7)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u4: +T).(\lambda (t5: T).(eq T t4 (THead k u4 t5)))) (\lambda (u4: T).(\lambda (_: +T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) +u3 t2 t5))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda (t5: T).(eq T t4 +(THead k u4 t5)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) +(\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) u3 t2 t5))) (ex2 T (\lambda +(t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t4 (THead k x0 +x1))).(\lambda (H8: (subst0 i2 u3 u0 x0)).(\lambda (H9: (subst0 (s k i2) u3 +t2 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(ex2 T (\lambda (t5: +T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) +(ex2_ind T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v +x0 t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i v (THead k x0 x1) t))) (\lambda (x: T).(\lambda (H10: (subst0 i2 +u3 u2 x)).(\lambda (H11: (subst0 i v x0 x)).(ex2_ind T (\lambda (t: +T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) (ex2 T +(\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v +(THead k x0 x1) t))) (\lambda (x2: T).(\lambda (H12: (subst0 (s k i2) u3 t3 +x2)).(\lambda (H13: (subst0 (s k i) v x1 x2)).(ex_intro2 T (\lambda (t: +T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x0 +x1) t)) (THead k x x2) (subst0_both u3 u2 x i2 H10 k t3 x2 H12) (subst0_both +v x0 x i H11 k x1 x2 H13))))) (H3 x1 u3 (s k i2) H9 (ex2_ind T (\lambda (t: +T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) ((eq +nat (s k i) (s k i2)) \to False) (\lambda (x2: T).(\lambda (_: (subst0 (s k +i2) u3 t3 x2)).(\lambda (_: (subst0 (s k i) v x1 x2)).(\lambda (H14: (eq nat +(s k i) (s k i2))).(H5 (s_inj k i i2 H14)))))) (H3 x1 u3 (s k i2) H9 (\lambda +(H12: (eq nat (s k i) (s k i2))).(H5 (s_inj k i i2 H12)))))))))) (H1 x0 u3 i2 +H8 H5)) t4 H7)))))) H6)) (subst0_gen_head k u3 u0 t2 t4 i2 +H4)))))))))))))))))) i1 u1 t0 t1 H))))). + +theorem subst0_confluence_eq: + \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst0 +i u t0 t1) \to (\forall (t2: T).((subst0 i u t0 t2) \to (or4 (eq T t1 t2) +(ex2 T (\lambda (t: T).(subst0 i u t1 t)) (\lambda (t: T).(subst0 i u t2 t))) +(subst0 i u t1 t2) (subst0 i u t2 t1)))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst0 i u t0 t1)).(subst0_ind (\lambda (n: nat).(\lambda (t: +T).(\lambda (t2: T).(\lambda (t3: T).(\forall (t4: T).((subst0 n t t2 t4) \to +(or4 (eq T t3 t4) (ex2 T (\lambda (t5: T).(subst0 n t t3 t5)) (\lambda (t5: +T).(subst0 n t t4 t5))) (subst0 n t t3 t4) (subst0 n t t4 t3)))))))) (\lambda +(v: T).(\lambda (i0: nat).(\lambda (t2: T).(\lambda (H0: (subst0 i0 v (TLRef +i0) t2)).(land_ind (eq nat i0 i0) (eq T t2 (lift (S i0) O v)) (or4 (eq T +(lift (S i0) O v) t2) (ex2 T (\lambda (t: T).(subst0 i0 v (lift (S i0) O v) +t)) (\lambda (t: T).(subst0 i0 v t2 t))) (subst0 i0 v (lift (S i0) O v) t2) +(subst0 i0 v t2 (lift (S i0) O v))) (\lambda (_: (eq nat i0 i0)).(\lambda +(H2: (eq T t2 (lift (S i0) O v))).(or4_intro0 (eq T (lift (S i0) O v) t2) +(ex2 T (\lambda (t: T).(subst0 i0 v (lift (S i0) O v) t)) (\lambda (t: +T).(subst0 i0 v t2 t))) (subst0 i0 v (lift (S i0) O v) t2) (subst0 i0 v t2 +(lift (S i0) O v)) (sym_eq T t2 (lift (S i0) O v) H2)))) (subst0_gen_lref v +t2 i0 i0 H0)))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda +(i0: nat).(\lambda (H0: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (t2: +T).((subst0 i0 v u1 t2) \to (or4 (eq T u2 t2) (ex2 T (\lambda (t: T).(subst0 +i0 v u2 t)) (\lambda (t: T).(subst0 i0 v t2 t))) (subst0 i0 v u2 t2) (subst0 +i0 v t2 u2)))))).(\lambda (t: T).(\lambda (k: K).(\lambda (t2: T).(\lambda +(H2: (subst0 i0 v (THead k u1 t) t2)).(or3_ind (ex2 T (\lambda (u3: T).(eq T +t2 (THead k u3 t))) (\lambda (u3: T).(subst0 i0 v u1 u3))) (ex2 T (\lambda +(t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v t +t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v t t3)))) (or4 (eq T (THead k u2 t) t2) +(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i0 v t2 t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 +(THead k u2 t))) (\lambda (H3: (ex2 T (\lambda (u3: T).(eq T t2 (THead k u3 +t))) (\lambda (u3: T).(subst0 i0 v u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq +T t2 (THead k u3 t))) (\lambda (u3: T).(subst0 i0 v u1 u3)) (or4 (eq T (THead +k u2 t) t2) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda +(t3: T).(subst0 i0 v t2 t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 +(THead k u2 t))) (\lambda (x: T).(\lambda (H4: (eq T t2 (THead k x +t))).(\lambda (H5: (subst0 i0 v u1 x)).(eq_ind_r T (THead k x t) (\lambda +(t3: T).(or4 (eq T (THead k u2 t) t3) (ex2 T (\lambda (t4: T).(subst0 i0 v +(THead k u2 t) t4)) (\lambda (t4: T).(subst0 i0 v t3 t4))) (subst0 i0 v +(THead k u2 t) t3) (subst0 i0 v t3 (THead k u2 t)))) (or4_ind (eq T u2 x) +(ex2 T (\lambda (t3: T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v x +t3))) (subst0 i0 v u2 x) (subst0 i0 v x u2) (or4 (eq T (THead k u2 t) (THead +k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda +(t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) (THead k +x t)) (subst0 i0 v (THead k x t) (THead k u2 t))) (\lambda (H6: (eq T u2 +x)).(eq_ind_r T x (\lambda (t3: T).(or4 (eq T (THead k t3 t) (THead k x t)) +(ex2 T (\lambda (t4: T).(subst0 i0 v (THead k t3 t) t4)) (\lambda (t4: +T).(subst0 i0 v (THead k x t) t4))) (subst0 i0 v (THead k t3 t) (THead k x +t)) (subst0 i0 v (THead k x t) (THead k t3 t)))) (or4_intro0 (eq T (THead k x +t) (THead k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k x t) t3)) +(\lambda (t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k x t) +(THead k x t)) (subst0 i0 v (THead k x t) (THead k x t)) (refl_equal T (THead +k x t))) u2 H6)) (\lambda (H6: (ex2 T (\lambda (t3: T).(subst0 i0 v u2 t3)) +(\lambda (t3: T).(subst0 i0 v x t3)))).(ex2_ind T (\lambda (t3: T).(subst0 i0 +v u2 t3)) (\lambda (t3: T).(subst0 i0 v x t3)) (or4 (eq T (THead k u2 t) +(THead k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) +(\lambda (t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) +(THead k x t)) (subst0 i0 v (THead k x t) (THead k u2 t))) (\lambda (x0: +T).(\lambda (H7: (subst0 i0 v u2 x0)).(\lambda (H8: (subst0 i0 v x +x0)).(or4_intro1 (eq T (THead k u2 t) (THead k x t)) (ex2 T (\lambda (t3: +T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x +t) t3))) (subst0 i0 v (THead k u2 t) (THead k x t)) (subst0 i0 v (THead k x +t) (THead k u2 t)) (ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) +t3)) (\lambda (t3: T).(subst0 i0 v (THead k x t) t3)) (THead k x0 t) +(subst0_fst v x0 u2 i0 H7 t k) (subst0_fst v x0 x i0 H8 t k)))))) H6)) +(\lambda (H6: (subst0 i0 v u2 x)).(or4_intro2 (eq T (THead k u2 t) (THead k x +t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) (THead k x +t)) (subst0 i0 v (THead k x t) (THead k u2 t)) (subst0_fst v x u2 i0 H6 t +k))) (\lambda (H6: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t) +(THead k x t)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) +(\lambda (t3: T).(subst0 i0 v (THead k x t) t3))) (subst0 i0 v (THead k u2 t) +(THead k x t)) (subst0 i0 v (THead k x t) (THead k u2 t)) (subst0_fst v u2 x +i0 H6 t k))) (H1 x H5)) t2 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t3: +T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v t +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: +T).(subst0 (s k i0) v t t3)) (or4 (eq T (THead k u2 t) t2) (ex2 T (\lambda +(t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v t2 +t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 (THead k u2 t))) +(\lambda (x: T).(\lambda (H4: (eq T t2 (THead k u1 x))).(\lambda (H5: (subst0 +(s k i0) v t x)).(eq_ind_r T (THead k u1 x) (\lambda (t3: T).(or4 (eq T +(THead k u2 t) t3) (ex2 T (\lambda (t4: T).(subst0 i0 v (THead k u2 t) t4)) +(\lambda (t4: T).(subst0 i0 v t3 t4))) (subst0 i0 v (THead k u2 t) t3) +(subst0 i0 v t3 (THead k u2 t)))) (or4_ind (eq T u2 u2) (ex2 T (\lambda (t3: +T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v u2 t3))) (subst0 i0 v +u2 u2) (subst0 i0 v u2 u2) (or4 (eq T (THead k u2 t) (THead k u1 x)) (ex2 T +(\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 +v (THead k u1 x) t3))) (subst0 i0 v (THead k u2 t) (THead k u1 x)) (subst0 i0 +v (THead k u1 x) (THead k u2 t))) (\lambda (_: (eq T u2 u2)).(or4_intro1 (eq +T (THead k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead +k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3))) (subst0 i0 v +(THead k u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)) +(ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i0 v (THead k u1 x) t3)) (THead k u2 x) (subst0_snd k v x t i0 H5 +u2) (subst0_fst v u2 u1 i0 H0 x k)))) (\lambda (H6: (ex2 T (\lambda (t3: +T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v u2 t3)))).(ex2_ind T +(\lambda (t3: T).(subst0 i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v u2 t3)) +(or4 (eq T (THead k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: T).(subst0 i0 +v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3))) +(subst0 i0 v (THead k u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) +(THead k u2 t))) (\lambda (x0: T).(\lambda (_: (subst0 i0 v u2 x0)).(\lambda +(_: (subst0 i0 v u2 x0)).(or4_intro1 (eq T (THead k u2 t) (THead k u1 x)) +(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i0 v (THead k u1 x) t3))) (subst0 i0 v (THead k u2 t) (THead k u1 +x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)) (ex_intro2 T (\lambda (t3: +T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 +x) t3)) (THead k u2 x) (subst0_snd k v x t i0 H5 u2) (subst0_fst v u2 u1 i0 +H0 x k)))))) H6)) (\lambda (_: (subst0 i0 v u2 u2)).(or4_intro1 (eq T (THead +k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) +t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3))) (subst0 i0 v (THead k +u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)) (ex_intro2 +T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 +i0 v (THead k u1 x) t3)) (THead k u2 x) (subst0_snd k v x t i0 H5 u2) +(subst0_fst v u2 u1 i0 H0 x k)))) (\lambda (_: (subst0 i0 v u2 +u2)).(or4_intro1 (eq T (THead k u2 t) (THead k u1 x)) (ex2 T (\lambda (t3: +T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 +x) t3))) (subst0 i0 v (THead k u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 t)) (ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) +t3)) (\lambda (t3: T).(subst0 i0 v (THead k u1 x) t3)) (THead k u2 x) +(subst0_snd k v x t i0 H5 u2) (subst0_fst v u2 u1 i0 H0 x k)))) (H1 u2 H0)) +t2 H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq +T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 +u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i0) v t +t3))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v t t3))) (or4 (eq T (THead k u2 t) t2) +(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i0 v t2 t3))) (subst0 i0 v (THead k u2 t) t2) (subst0 i0 v t2 +(THead k u2 t))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t2 +(THead k x0 x1))).(\lambda (H5: (subst0 i0 v u1 x0)).(\lambda (H6: (subst0 (s +k i0) v t x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t3: T).(or4 (eq T (THead +k u2 t) t3) (ex2 T (\lambda (t4: T).(subst0 i0 v (THead k u2 t) t4)) (\lambda +(t4: T).(subst0 i0 v t3 t4))) (subst0 i0 v (THead k u2 t) t3) (subst0 i0 v t3 +(THead k u2 t)))) (or4_ind (eq T u2 x0) (ex2 T (\lambda (t3: T).(subst0 i0 v +u2 t3)) (\lambda (t3: T).(subst0 i0 v x0 t3))) (subst0 i0 v u2 x0) (subst0 i0 +v x0 u2) (or4 (eq T (THead k u2 t) (THead k x0 x1)) (ex2 T (\lambda (t3: +T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 +x1) t3))) (subst0 i0 v (THead k u2 t) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k u2 t))) (\lambda (H7: (eq T u2 x0)).(eq_ind_r T x0 (\lambda +(t3: T).(or4 (eq T (THead k t3 t) (THead k x0 x1)) (ex2 T (\lambda (t4: +T).(subst0 i0 v (THead k t3 t) t4)) (\lambda (t4: T).(subst0 i0 v (THead k x0 +x1) t4))) (subst0 i0 v (THead k t3 t) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k t3 t)))) (or4_intro2 (eq T (THead k x0 t) (THead k x0 x1)) +(ex2 T (\lambda (t3: T).(subst0 i0 v (THead k x0 t) t3)) (\lambda (t3: +T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v (THead k x0 t) (THead k x0 +x1)) (subst0 i0 v (THead k x0 x1) (THead k x0 t)) (subst0_snd k v x1 t i0 H6 +x0)) u2 H7)) (\lambda (H7: (ex2 T (\lambda (t3: T).(subst0 i0 v u2 t3)) +(\lambda (t3: T).(subst0 i0 v x0 t3)))).(ex2_ind T (\lambda (t3: T).(subst0 +i0 v u2 t3)) (\lambda (t3: T).(subst0 i0 v x0 t3)) (or4 (eq T (THead k u2 t) +(THead k x0 x1)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) +(\lambda (t3: T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v (THead k u2 +t) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t))) (\lambda +(x: T).(\lambda (H8: (subst0 i0 v u2 x)).(\lambda (H9: (subst0 i0 v x0 +x)).(or4_intro1 (eq T (THead k u2 t) (THead k x0 x1)) (ex2 T (\lambda (t3: +T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 +x1) t3))) (subst0 i0 v (THead k u2 t) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k u2 t)) (ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 +t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 x1) t3)) (THead k x x1) +(subst0_both v u2 x i0 H8 k t x1 H6) (subst0_fst v x x0 i0 H9 x1 k)))))) H7)) +(\lambda (H7: (subst0 i0 v u2 x0)).(or4_intro2 (eq T (THead k u2 t) (THead k +x0 x1)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda +(t3: T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v (THead k u2 t) (THead +k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t)) (subst0_both v u2 x0 +i0 H7 k t x1 H6))) (\lambda (H7: (subst0 i0 v x0 u2)).(or4_intro1 (eq T +(THead k u2 t) (THead k x0 x1)) (ex2 T (\lambda (t3: T).(subst0 i0 v (THead k +u2 t) t3)) (\lambda (t3: T).(subst0 i0 v (THead k x0 x1) t3))) (subst0 i0 v +(THead k u2 t) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t)) +(ex_intro2 T (\lambda (t3: T).(subst0 i0 v (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i0 v (THead k x0 x1) t3)) (THead k u2 x1) (subst0_snd k v x1 t i0 +H6 u2) (subst0_fst v u2 x0 i0 H7 x1 k)))) (H1 x0 H5)) t2 H4)))))) H3)) +(subst0_gen_head k v u1 t t2 i0 H2)))))))))))) (\lambda (k: K).(\lambda (v: +T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (i0: nat).(\lambda (H0: (subst0 +(s k i0) v t3 t2)).(\lambda (H1: ((\forall (t4: T).((subst0 (s k i0) v t3 t4) +\to (or4 (eq T t2 t4) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) +(\lambda (t: T).(subst0 (s k i0) v t4 t))) (subst0 (s k i0) v t2 t4) (subst0 +(s k i0) v t4 t2)))))).(\lambda (u0: T).(\lambda (t4: T).(\lambda (H2: +(subst0 i0 v (THead k u0 t3) t4)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t4 +(THead k u2 t3))) (\lambda (u2: T).(subst0 i0 v u0 u2))) (ex2 T (\lambda (t5: +T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i0) v t3 t5))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v u0 u2))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i0) v t3 t5)))) (or4 (eq T (THead k u0 t2) +t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: +T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u0 t2) t4) (subst0 i0 v t4 +(THead k u0 t2))) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 +t3))) (\lambda (u2: T).(subst0 i0 v u0 u2)))).(ex2_ind T (\lambda (u2: T).(eq +T t4 (THead k u2 t3))) (\lambda (u2: T).(subst0 i0 v u0 u2)) (or4 (eq T +(THead k u0 t2) t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) +(\lambda (t: T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u0 t2) t4) (subst0 +i0 v t4 (THead k u0 t2))) (\lambda (x: T).(\lambda (H4: (eq T t4 (THead k x +t3))).(\lambda (H5: (subst0 i0 v u0 x)).(eq_ind_r T (THead k x t3) (\lambda +(t: T).(or4 (eq T (THead k u0 t2) t) (ex2 T (\lambda (t5: T).(subst0 i0 v +(THead k u0 t2) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v +(THead k u0 t2) t) (subst0 i0 v t (THead k u0 t2)))) (or4_ind (eq T t2 t2) +(ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) (\lambda (t: T).(subst0 (s k +i0) v t2 t))) (subst0 (s k i0) v t2 t2) (subst0 (s k i0) v t2 t2) (or4 (eq T +(THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v +(THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2))) +(\lambda (_: (eq T t2 t2)).(or4_intro1 (eq T (THead k u0 t2) (THead k x t3)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v (THead k u0 t2) (THead k x +t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2)) (ex_intro2 T (\lambda (t: +T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x +t3) t)) (THead k x t2) (subst0_fst v x u0 i0 H5 t2 k) (subst0_snd k v t2 t3 +i0 H0 x)))) (\lambda (H6: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) +(\lambda (t: T).(subst0 (s k i0) v t2 t)))).(ex2_ind T (\lambda (t: +T).(subst0 (s k i0) v t2 t)) (\lambda (t: T).(subst0 (s k i0) v t2 t)) (or4 +(eq T (THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: T).(subst0 i0 v +(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t))) (subst0 +i0 v (THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x t3) (THead k u0 +t2))) (\lambda (x0: T).(\lambda (_: (subst0 (s k i0) v t2 x0)).(\lambda (_: +(subst0 (s k i0) v t2 x0)).(or4_intro1 (eq T (THead k u0 t2) (THead k x t3)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v (THead k u0 t2) (THead k x +t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2)) (ex_intro2 T (\lambda (t: +T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x +t3) t)) (THead k x t2) (subst0_fst v x u0 i0 H5 t2 k) (subst0_snd k v t2 t3 +i0 H0 x)))))) H6)) (\lambda (_: (subst0 (s k i0) v t2 t2)).(or4_intro1 (eq T +(THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t))) (subst0 i0 v +(THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x t3) (THead k u0 t2)) +(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t3) t)) (THead k x t2) (subst0_fst v x u0 i0 H5 t2 +k) (subst0_snd k v t2 t3 i0 H0 x)))) (\lambda (_: (subst0 (s k i0) v t2 +t2)).(or4_intro1 (eq T (THead k u0 t2) (THead k x t3)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x +t3) t))) (subst0 i0 v (THead k u0 t2) (THead k x t3)) (subst0 i0 v (THead k x +t3) (THead k u0 t2)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u0 +t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x t3) t)) (THead k x t2) +(subst0_fst v x u0 i0 H5 t2 k) (subst0_snd k v t2 t3 i0 H0 x)))) (H1 t2 H0)) +t4 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u0 +t5))) (\lambda (t5: T).(subst0 (s k i0) v t3 t5)))).(ex2_ind T (\lambda (t5: +T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i0) v t3 t5)) +(or4 (eq T (THead k u0 t2) t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u0 t2) t)) (\lambda (t: T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u0 t2) +t4) (subst0 i0 v t4 (THead k u0 t2))) (\lambda (x: T).(\lambda (H4: (eq T t4 +(THead k u0 x))).(\lambda (H5: (subst0 (s k i0) v t3 x)).(eq_ind_r T (THead k +u0 x) (\lambda (t: T).(or4 (eq T (THead k u0 t2) t) (ex2 T (\lambda (t5: +T).(subst0 i0 v (THead k u0 t2) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) +(subst0 i0 v (THead k u0 t2) t) (subst0 i0 v t (THead k u0 t2)))) (or4_ind +(eq T t2 x) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) (\lambda (t: +T).(subst0 (s k i0) v x t))) (subst0 (s k i0) v t2 x) (subst0 (s k i0) v x +t2) (or4 (eq T (THead k u0 t2) (THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 +i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) +(subst0 i0 v (THead k u0 t2) (THead k u0 x)) (subst0 i0 v (THead k u0 x) +(THead k u0 t2))) (\lambda (H6: (eq T t2 x)).(eq_ind_r T x (\lambda (t: +T).(or4 (eq T (THead k u0 t) (THead k u0 x)) (ex2 T (\lambda (t5: T).(subst0 +i0 v (THead k u0 t) t5)) (\lambda (t5: T).(subst0 i0 v (THead k u0 x) t5))) +(subst0 i0 v (THead k u0 t) (THead k u0 x)) (subst0 i0 v (THead k u0 x) +(THead k u0 t)))) (or4_intro0 (eq T (THead k u0 x) (THead k u0 x)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u0 x) t)) (\lambda (t: T).(subst0 i0 v +(THead k u0 x) t))) (subst0 i0 v (THead k u0 x) (THead k u0 x)) (subst0 i0 v +(THead k u0 x) (THead k u0 x)) (refl_equal T (THead k u0 x))) t2 H6)) +(\lambda (H6: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) (\lambda (t: +T).(subst0 (s k i0) v x t)))).(ex2_ind T (\lambda (t: T).(subst0 (s k i0) v +t2 t)) (\lambda (t: T).(subst0 (s k i0) v x t)) (or4 (eq T (THead k u0 t2) +(THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) +(\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) (subst0 i0 v (THead k u0 t2) +(THead k u0 x)) (subst0 i0 v (THead k u0 x) (THead k u0 t2))) (\lambda (x0: +T).(\lambda (H7: (subst0 (s k i0) v t2 x0)).(\lambda (H8: (subst0 (s k i0) v +x x0)).(or4_intro1 (eq T (THead k u0 t2) (THead k u0 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k u0 +x) t))) (subst0 i0 v (THead k u0 t2) (THead k u0 x)) (subst0 i0 v (THead k u0 +x) (THead k u0 t2)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) +t)) (\lambda (t: T).(subst0 i0 v (THead k u0 x) t)) (THead k u0 x0) +(subst0_snd k v x0 t2 i0 H7 u0) (subst0_snd k v x0 x i0 H8 u0)))))) H6)) +(\lambda (H6: (subst0 (s k i0) v t2 x)).(or4_intro2 (eq T (THead k u0 t2) +(THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) +(\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) (subst0 i0 v (THead k u0 t2) +(THead k u0 x)) (subst0 i0 v (THead k u0 x) (THead k u0 t2)) (subst0_snd k v +x t2 i0 H6 u0))) (\lambda (H6: (subst0 (s k i0) v x t2)).(or4_intro3 (eq T +(THead k u0 t2) (THead k u0 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k u0 x) t))) (subst0 i0 v +(THead k u0 t2) (THead k u0 x)) (subst0 i0 v (THead k u0 x) (THead k u0 t2)) +(subst0_snd k v t2 x i0 H6 u0))) (H1 x H5)) t4 H4)))) H3)) (\lambda (H3: +(ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v u0 u2))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i0) v t3 t5))))).(ex3_2_ind T T (\lambda +(u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i0 v u0 u2))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s k i0) v t3 t5))) (or4 (eq T (THead k u0 t2) t4) (ex2 T (\lambda +(t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v t4 t))) +(subst0 i0 v (THead k u0 t2) t4) (subst0 i0 v t4 (THead k u0 t2))) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t4 (THead k x0 x1))).(\lambda +(H5: (subst0 i0 v u0 x0)).(\lambda (H6: (subst0 (s k i0) v t3 x1)).(eq_ind_r +T (THead k x0 x1) (\lambda (t: T).(or4 (eq T (THead k u0 t2) t) (ex2 T +(\lambda (t5: T).(subst0 i0 v (THead k u0 t2) t5)) (\lambda (t5: T).(subst0 +i0 v t t5))) (subst0 i0 v (THead k u0 t2) t) (subst0 i0 v t (THead k u0 +t2)))) (or4_ind (eq T t2 x1) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) +(\lambda (t: T).(subst0 (s k i0) v x1 t))) (subst0 (s k i0) v t2 x1) (subst0 +(s k i0) v x1 t2) (or4 (eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T (\lambda +(t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k +x0 x1) t))) (subst0 i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 v (THead +k x0 x1) (THead k u0 t2))) (\lambda (H7: (eq T t2 x1)).(eq_ind_r T x1 +(\lambda (t: T).(or4 (eq T (THead k u0 t) (THead k x0 x1)) (ex2 T (\lambda +(t5: T).(subst0 i0 v (THead k u0 t) t5)) (\lambda (t5: T).(subst0 i0 v (THead +k x0 x1) t5))) (subst0 i0 v (THead k u0 t) (THead k x0 x1)) (subst0 i0 v +(THead k x0 x1) (THead k u0 t)))) (or4_intro2 (eq T (THead k u0 x1) (THead k +x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 x1) t)) (\lambda (t: +T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u0 x1) (THead k x0 +x1)) (subst0 i0 v (THead k x0 x1) (THead k u0 x1)) (subst0_fst v x0 u0 i0 H5 +x1 k)) t2 H7)) (\lambda (H7: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t2 t)) +(\lambda (t: T).(subst0 (s k i0) v x1 t)))).(ex2_ind T (\lambda (t: +T).(subst0 (s k i0) v t2 t)) (\lambda (t: T).(subst0 (s k i0) v x1 t)) (or4 +(eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v +(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 +i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k +u0 t2))) (\lambda (x: T).(\lambda (H8: (subst0 (s k i0) v t2 x)).(\lambda +(H9: (subst0 (s k i0) v x1 x)).(or4_intro1 (eq T (THead k u0 t2) (THead k x0 +x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: +T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u0 t2) (THead k x0 +x1)) (subst0 i0 v (THead k x0 x1) (THead k u0 t2)) (ex_intro2 T (\lambda (t: +T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t)) (THead k x0 x) (subst0_both v u0 x0 i0 H5 k t2 x H8) (subst0_snd k v +x x1 i0 H9 x0)))))) H7)) (\lambda (H7: (subst0 (s k i0) v t2 x1)).(or4_intro2 +(eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v +(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 +i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k +u0 t2)) (subst0_both v u0 x0 i0 H5 k t2 x1 H7))) (\lambda (H7: (subst0 (s k +i0) v x1 t2)).(or4_intro1 (eq T (THead k u0 t2) (THead k x0 x1)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v +(THead k x0 x1) t))) (subst0 i0 v (THead k u0 t2) (THead k x0 x1)) (subst0 i0 +v (THead k x0 x1) (THead k u0 t2)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v +(THead k u0 t2) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k +x0 t2) (subst0_fst v x0 u0 i0 H5 t2 k) (subst0_snd k v t2 x1 i0 H7 x0)))) (H1 +x1 H6)) t4 H4)))))) H3)) (subst0_gen_head k v u0 t3 t4 i0 H2)))))))))))) +(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda +(H0: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (t2: T).((subst0 i0 v u1 +t2) \to (or4 (eq T u2 t2) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda +(t: T).(subst0 i0 v t2 t))) (subst0 i0 v u2 t2) (subst0 i0 v t2 +u2)))))).(\lambda (k: K).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: +(subst0 (s k i0) v t2 t3)).(\lambda (H3: ((\forall (t4: T).((subst0 (s k i0) +v t2 t4) \to (or4 (eq T t3 t4) (ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 +t)) (\lambda (t: T).(subst0 (s k i0) v t4 t))) (subst0 (s k i0) v t3 t4) +(subst0 (s k i0) v t4 t3)))))).(\lambda (t4: T).(\lambda (H4: (subst0 i0 v +(THead k u1 t2) t4)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 +t2))) (\lambda (u3: T).(subst0 i0 v u1 u3))) (ex2 T (\lambda (t5: T).(eq T t4 +(THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i0) v t2 t5))) (ex3_2 T T +(\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: +T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: T).(\lambda (t5: +T).(subst0 (s k i0) v t2 t5)))) (or4 (eq T (THead k u2 t3) t4) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 i0 v t4 (THead k u2 t3))) +(\lambda (H5: (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t2))) (\lambda +(u3: T).(subst0 i0 v u1 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 (THead k +u3 t2))) (\lambda (u3: T).(subst0 i0 v u1 u3)) (or4 (eq T (THead k u2 t3) t4) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 i0 v t4 +(THead k u2 t3))) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k x +t2))).(\lambda (H7: (subst0 i0 v u1 x)).(eq_ind_r T (THead k x t2) (\lambda +(t: T).(or4 (eq T (THead k u2 t3) t) (ex2 T (\lambda (t5: T).(subst0 i0 v +(THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v +(THead k u2 t3) t) (subst0 i0 v t (THead k u2 t3)))) (or4_ind (eq T t3 t3) +(ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k +i0) v t3 t))) (subst0 (s k i0) v t3 t3) (subst0 (s k i0) v t3 t3) (or4 (eq T +(THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v +(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) +(\lambda (_: (eq T t3 t3)).(or4_ind (eq T u2 x) (ex2 T (\lambda (t: +T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x t))) (subst0 i0 v u2 x) +(subst0 i0 v x u2) (or4 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda +(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k +x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k +x t2) (THead k u2 t3))) (\lambda (H9: (eq T u2 x)).(eq_ind_r T x (\lambda (t: +T).(or4 (eq T (THead k t t3) (THead k x t2)) (ex2 T (\lambda (t5: T).(subst0 +i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x t2) t5))) +(subst0 i0 v (THead k t t3) (THead k x t2)) (subst0 i0 v (THead k x t2) +(THead k t t3)))) (or4_intro3 (eq T (THead k x t3) (THead k x t2)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k x t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x t2) t))) (subst0 i0 v (THead k x t3) (THead k x t2)) (subst0 i0 v +(THead k x t2) (THead k x t3)) (subst0_snd k v t3 t2 i0 H2 x)) u2 H9)) +(\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v x t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) +(\lambda (t: T).(subst0 i0 v x t)) (or4 (eq T (THead k u2 t3) (THead k x t2)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x +t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (x0: T).(\lambda +(H10: (subst0 i0 v u2 x0)).(\lambda (H11: (subst0 i0 v x x0)).(or4_intro1 (eq +T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead +k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v +(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) +(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t2) t)) (THead k x0 t3) (subst0_fst v x0 u2 i0 H10 +t3 k) (subst0_both v x x0 i0 H11 k t2 t3 H2)))))) H9)) (\lambda (H9: (subst0 +i0 v u2 x)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda +(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k +x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k +x t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 +t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k x t3) +(subst0_fst v x u2 i0 H9 t3 k) (subst0_snd k v t3 t2 i0 H2 x)))) (\lambda +(H9: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k x t2)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x +t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (subst0_both v x u2 i0 H9 k +t2 t3 H2))) (H1 x H7))) (\lambda (H8: (ex2 T (\lambda (t: T).(subst0 (s k i0) +v t3 t)) (\lambda (t: T).(subst0 (s k i0) v t3 t)))).(ex2_ind T (\lambda (t: +T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k i0) v t3 t)) (or4 +(eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 +i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 +t3))) (\lambda (x0: T).(\lambda (_: (subst0 (s k i0) v t3 x0)).(\lambda (_: +(subst0 (s k i0) v t3 x0)).(or4_ind (eq T u2 x) (ex2 T (\lambda (t: +T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x t))) (subst0 i0 v u2 x) +(subst0 i0 v x u2) (or4 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda +(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k +x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k +x t2) (THead k u2 t3))) (\lambda (H11: (eq T u2 x)).(eq_ind_r T x (\lambda +(t: T).(or4 (eq T (THead k t t3) (THead k x t2)) (ex2 T (\lambda (t5: +T).(subst0 i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x +t2) t5))) (subst0 i0 v (THead k t t3) (THead k x t2)) (subst0 i0 v (THead k x +t2) (THead k t t3)))) (or4_intro3 (eq T (THead k x t3) (THead k x t2)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k x t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x t2) t))) (subst0 i0 v (THead k x t3) (THead k x t2)) (subst0 i0 v +(THead k x t2) (THead k x t3)) (subst0_snd k v t3 t2 i0 H2 x)) u2 H11)) +(\lambda (H11: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v x t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) +(\lambda (t: T).(subst0 i0 v x t)) (or4 (eq T (THead k u2 t3) (THead k x t2)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x +t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (x1: T).(\lambda +(H12: (subst0 i0 v u2 x1)).(\lambda (H13: (subst0 i0 v x x1)).(or4_intro1 (eq +T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead +k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v +(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) +(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t2) t)) (THead k x1 t3) (subst0_fst v x1 u2 i0 H12 +t3 k) (subst0_both v x x1 i0 H13 k t2 t3 H2)))))) H11)) (\lambda (H11: +(subst0 i0 v u2 x)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v +(THead k x t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k +x t3) (subst0_fst v x u2 i0 H11 t3 k) (subst0_snd k v t3 t2 i0 H2 x)))) +(\lambda (H11: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k +x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x +t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (subst0_both v x u2 i0 H11 +k t2 t3 H2))) (H1 x H7))))) H8)) (\lambda (_: (subst0 (s k i0) v t3 +t3)).(or4_ind (eq T u2 x) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda +(t: T).(subst0 i0 v x t))) (subst0 i0 v u2 x) (subst0 i0 v x u2) (or4 (eq T +(THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v +(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) +(\lambda (H9: (eq T u2 x)).(eq_ind_r T x (\lambda (t: T).(or4 (eq T (THead k +t t3) (THead k x t2)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k t t3) +t5)) (\lambda (t5: T).(subst0 i0 v (THead k x t2) t5))) (subst0 i0 v (THead k +t t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k t t3)))) +(or4_intro3 (eq T (THead k x t3) (THead k x t2)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k x t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x +t2) t))) (subst0 i0 v (THead k x t3) (THead k x t2)) (subst0 i0 v (THead k x +t2) (THead k x t3)) (subst0_snd k v t3 t2 i0 H2 x)) u2 H9)) (\lambda (H9: +(ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x +t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 +i0 v x t)) (or4 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x +t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x +t2) (THead k u2 t3))) (\lambda (x0: T).(\lambda (H10: (subst0 i0 v u2 +x0)).(\lambda (H11: (subst0 i0 v x x0)).(or4_intro1 (eq T (THead k u2 t3) +(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) +(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (ex_intro2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x t2) t)) (THead k x0 t3) (subst0_fst v x0 u2 i0 H10 t3 k) +(subst0_both v x x0 i0 H11 k t2 t3 H2)))))) H9)) (\lambda (H9: (subst0 i0 v +u2 x)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x +t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x +t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 +t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k x t3) +(subst0_fst v x u2 i0 H9 t3 k) (subst0_snd k v t3 t2 i0 H2 x)))) (\lambda +(H9: (subst0 i0 v x u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k x t2)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x +t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (subst0_both v x u2 i0 H9 k +t2 t3 H2))) (H1 x H7))) (\lambda (_: (subst0 (s k i0) v t3 t3)).(or4_ind (eq +T u2 x) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 +v x t))) (subst0 i0 v u2 x) (subst0 i0 v x u2) (or4 (eq T (THead k u2 t3) +(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) +(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (H9: +(eq T u2 x)).(eq_ind_r T x (\lambda (t: T).(or4 (eq T (THead k t t3) (THead k +x t2)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k t t3) t5)) (\lambda (t5: +T).(subst0 i0 v (THead k x t2) t5))) (subst0 i0 v (THead k t t3) (THead k x +t2)) (subst0 i0 v (THead k x t2) (THead k t t3)))) (or4_intro3 (eq T (THead k +x t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k x t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k x t3) +(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k x t3)) (subst0_snd k v +t3 t2 i0 H2 x)) u2 H9)) (\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 +t)) (\lambda (t: T).(subst0 i0 v x t)))).(ex2_ind T (\lambda (t: T).(subst0 +i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x t)) (or4 (eq T (THead k u2 t3) +(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) +(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3))) (\lambda (x0: +T).(\lambda (H10: (subst0 i0 v u2 x0)).(\lambda (H11: (subst0 i0 v x +x0)).(or4_intro1 (eq T (THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x +t2) t))) (subst0 i0 v (THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x +t2) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 +t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t)) (THead k x0 t3) +(subst0_fst v x0 u2 i0 H10 t3 k) (subst0_both v x x0 i0 H11 k t2 t3 H2)))))) +H9)) (\lambda (H9: (subst0 i0 v u2 x)).(or4_intro1 (eq T (THead k u2 t3) +(THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v (THead k u2 t3) +(THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) (ex_intro2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x t2) t)) (THead k x t3) (subst0_fst v x u2 i0 H9 t3 k) (subst0_snd +k v t3 t2 i0 H2 x)))) (\lambda (H9: (subst0 i0 v x u2)).(or4_intro3 (eq T +(THead k u2 t3) (THead k x t2)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x t2) t))) (subst0 i0 v +(THead k u2 t3) (THead k x t2)) (subst0 i0 v (THead k x t2) (THead k u2 t3)) +(subst0_both v x u2 i0 H9 k t2 t3 H2))) (H1 x H7))) (H3 t3 H2)) t4 H6)))) +H5)) (\lambda (H5: (ex2 T (\lambda (t5: T).(eq T t4 (THead k u1 t5))) +(\lambda (t5: T).(subst0 (s k i0) v t2 t5)))).(ex2_ind T (\lambda (t5: T).(eq +T t4 (THead k u1 t5))) (\lambda (t5: T).(subst0 (s k i0) v t2 t5)) (or4 (eq T +(THead k u2 t3) t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 +i0 v t4 (THead k u2 t3))) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k u1 +x))).(\lambda (H7: (subst0 (s k i0) v t2 x)).(eq_ind_r T (THead k u1 x) +(\lambda (t: T).(or4 (eq T (THead k u2 t3) t) (ex2 T (\lambda (t5: T).(subst0 +i0 v (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v +(THead k u2 t3) t) (subst0 i0 v t (THead k u2 t3)))) (or4_ind (eq T t3 x) +(ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k +i0) v x t))) (subst0 (s k i0) v t3 x) (subst0 (s k i0) v x t3) (or4 (eq T +(THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v +(THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) +(\lambda (H8: (eq T t3 x)).(eq_ind_r T x (\lambda (t: T).(or4 (eq T (THead k +u2 t) (THead k u1 x)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k u2 t) +t5)) (\lambda (t5: T).(subst0 i0 v (THead k u1 x) t5))) (subst0 i0 v (THead k +u2 t) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t)))) (or4_ind +(eq T u2 u2) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v u2 t))) (subst0 i0 v u2 u2) (subst0 i0 v u2 u2) (or4 (eq T +(THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v +(THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 x))) +(\lambda (_: (eq T u2 u2)).(or4_intro3 (eq T (THead k u2 x) (THead k u1 x)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: +T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 +x)) (subst0 i0 v (THead k u1 x) (THead k u2 x)) (subst0_fst v u2 u1 i0 H0 x +k))) (\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v u2 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) +(\lambda (t: T).(subst0 i0 v u2 t)) (or4 (eq T (THead k u2 x) (THead k u1 x)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: +T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 +x)) (subst0 i0 v (THead k u1 x) (THead k u2 x))) (\lambda (x0: T).(\lambda +(_: (subst0 i0 v u2 x0)).(\lambda (_: (subst0 i0 v u2 x0)).(or4_intro3 (eq T +(THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v +(THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 x)) +(subst0_fst v u2 u1 i0 H0 x k))))) H9)) (\lambda (_: (subst0 i0 v u2 +u2)).(or4_intro3 (eq T (THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 +x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 x)) (subst0_fst v u2 u1 i0 H0 x k))) (\lambda (_: (subst0 i0 v +u2 u2)).(or4_intro3 (eq T (THead k u2 x) (THead k u1 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 x) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 +x) t))) (subst0 i0 v (THead k u2 x) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 x)) (subst0_fst v u2 u1 i0 H0 x k))) (H1 u2 H0)) t3 H8)) +(\lambda (H8: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 t)) (\lambda (t: +T).(subst0 (s k i0) v x t)))).(ex2_ind T (\lambda (t: T).(subst0 (s k i0) v +t3 t)) (\lambda (t: T).(subst0 (s k i0) v x t)) (or4 (eq T (THead k u2 t3) +(THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) +(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (x0: +T).(\lambda (H9: (subst0 (s k i0) v t3 x0)).(\lambda (H10: (subst0 (s k i0) v +x x0)).(or4_ind (eq T u2 u2) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) +(\lambda (t: T).(subst0 i0 v u2 t))) (subst0 i0 v u2 u2) (subst0 i0 v u2 u2) +(or4 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 +v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) +(subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) +(THead k u2 t3))) (\lambda (_: (eq T u2 u2)).(or4_intro1 (eq T (THead k u2 +t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) +(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) (ex_intro2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k u1 x) t)) (THead k u2 x0) (subst0_snd k v x0 t3 i0 H9 u2) +(subst0_both v u1 u2 i0 H0 k x x0 H10)))) (\lambda (H11: (ex2 T (\lambda (t: +T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 t)))).(ex2_ind T +(\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 t)) (or4 +(eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 +i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 +t3))) (\lambda (x1: T).(\lambda (_: (subst0 i0 v u2 x1)).(\lambda (_: (subst0 +i0 v u2 x1)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v +(THead k u1 x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k +u2 x0) (subst0_snd k v x0 t3 i0 H9 u2) (subst0_both v u1 u2 i0 H0 k x x0 +H10)))))) H11)) (\lambda (_: (subst0 i0 v u2 u2)).(or4_intro1 (eq T (THead k +u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) +t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 +t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) (ex_intro2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k u1 x) t)) (THead k u2 x0) (subst0_snd k v x0 t3 i0 H9 u2) +(subst0_both v u1 u2 i0 H0 k x x0 H10)))) (\lambda (_: (subst0 i0 v u2 +u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 +x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) +t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k u2 x0) +(subst0_snd k v x0 t3 i0 H9 u2) (subst0_both v u1 u2 i0 H0 k x x0 H10)))) (H1 +u2 H0))))) H8)) (\lambda (H8: (subst0 (s k i0) v t3 x)).(or4_ind (eq T u2 u2) +(ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 +t))) (subst0 i0 v u2 u2) (subst0 i0 v u2 u2) (or4 (eq T (THead k u2 t3) +(THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) +(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (_: +(eq T u2 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v +(THead k u1 x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k +u2 x) (subst0_snd k v x t3 i0 H8 u2) (subst0_fst v u2 u1 i0 H0 x k)))) +(\lambda (H9: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v u2 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) +(\lambda (t: T).(subst0 i0 v u2 t)) (or4 (eq T (THead k u2 t3) (THead k u1 +x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 +x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (x0: T).(\lambda +(_: (subst0 i0 v u2 x0)).(\lambda (_: (subst0 i0 v u2 x0)).(or4_intro1 (eq T +(THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v +(THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) +(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k u1 x) t)) (THead k u2 x) (subst0_snd k v x t3 i0 H8 +u2) (subst0_fst v u2 u1 i0 H0 x k)))))) H9)) (\lambda (_: (subst0 i0 v u2 +u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 +x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) +t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k u2 x) +(subst0_snd k v x t3 i0 H8 u2) (subst0_fst v u2 u1 i0 H0 x k)))) (\lambda (_: +(subst0 i0 v u2 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v +(THead k u1 x) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t)) (THead k +u2 x) (subst0_snd k v x t3 i0 H8 u2) (subst0_fst v u2 u1 i0 H0 x k)))) (H1 u2 +H0))) (\lambda (H8: (subst0 (s k i0) v x t3)).(or4_ind (eq T u2 u2) (ex2 T +(\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 t))) +(subst0 i0 v u2 u2) (subst0 i0 v u2 u2) (or4 (eq T (THead k u2 t3) (THead k +u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 +x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3))) (\lambda (_: (eq T u2 +u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 +x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 t3)) (subst0_both v u1 u2 i0 H0 k x t3 H8))) (\lambda (H9: +(ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v u2 +t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 +i0 v u2 t)) (or4 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 +x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 t3))) (\lambda (x0: T).(\lambda (_: (subst0 i0 v u2 +x0)).(\lambda (_: (subst0 i0 v u2 x0)).(or4_intro3 (eq T (THead k u2 t3) +(THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 i0 v (THead k u2 t3) +(THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 t3)) (subst0_both v +u1 u2 i0 H0 k x t3 H8))))) H9)) (\lambda (_: (subst0 i0 v u2 u2)).(or4_intro3 +(eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 x) t))) (subst0 +i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 x) (THead k u2 +t3)) (subst0_both v u1 u2 i0 H0 k x t3 H8))) (\lambda (_: (subst0 i0 v u2 +u2)).(or4_intro3 (eq T (THead k u2 t3) (THead k u1 x)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k u1 +x) t))) (subst0 i0 v (THead k u2 t3) (THead k u1 x)) (subst0 i0 v (THead k u1 +x) (THead k u2 t3)) (subst0_both v u1 u2 i0 H0 k x t3 H8))) (H1 u2 H0))) (H3 +x H7)) t4 H6)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda (u3: T).(\lambda (t5: +T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v +u1 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v t2 +t5))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 +t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v u1 u3))) (\lambda (_: +T).(\lambda (t5: T).(subst0 (s k i0) v t2 t5))) (or4 (eq T (THead k u2 t3) +t4) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v t4 t))) (subst0 i0 v (THead k u2 t3) t4) (subst0 i0 v t4 +(THead k u2 t3))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t4 +(THead k x0 x1))).(\lambda (H7: (subst0 i0 v u1 x0)).(\lambda (H8: (subst0 (s +k i0) v t2 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(or4 (eq T (THead +k u2 t3) t) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k u2 t3) t5)) +(\lambda (t5: T).(subst0 i0 v t t5))) (subst0 i0 v (THead k u2 t3) t) (subst0 +i0 v t (THead k u2 t3)))) (or4_ind (eq T t3 x1) (ex2 T (\lambda (t: +T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k i0) v x1 t))) +(subst0 (s k i0) v t3 x1) (subst0 (s k i0) v x1 t3) (or4 (eq T (THead k u2 +t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 +t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda +(H9: (eq T t3 x1)).(eq_ind_r T x1 (\lambda (t: T).(or4 (eq T (THead k u2 t) +(THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k u2 t) t5)) +(\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) (subst0 i0 v (THead k u2 +t) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t)))) (or4_ind +(eq T u2 x0) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v x0 t))) (subst0 i0 v u2 x0) (subst0 i0 v x0 u2) (or4 (eq T +(THead k u2 x1) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 x1) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v +(THead k u2 x1) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 +x1))) (\lambda (H10: (eq T u2 x0)).(eq_ind_r T x0 (\lambda (t: T).(or4 (eq T +(THead k t x1) (THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k +t x1) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) (subst0 i0 v +(THead k t x1) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k t +x1)))) (or4_intro0 (eq T (THead k x0 x1) (THead k x0 x1)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k x0 x1) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t))) (subst0 i0 v (THead k x0 x1) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k x0 x1)) (refl_equal T (THead k x0 x1))) u2 H10)) (\lambda +(H10: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v +x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 x1) (THead k x0 x1)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 v +(THead k x0 x1) t))) (subst0 i0 v (THead k u2 x1) (THead k x0 x1)) (subst0 i0 +v (THead k x0 x1) (THead k u2 x1))) (\lambda (x: T).(\lambda (H11: (subst0 i0 +v u2 x)).(\lambda (H12: (subst0 i0 v x0 x)).(or4_intro1 (eq T (THead k u2 x1) +(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) +(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 +x1) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 x1)) (ex_intro2 +T (\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 +v (THead k x0 x1) t)) (THead k x x1) (subst0_fst v x u2 i0 H11 x1 k) +(subst0_fst v x x0 i0 H12 x1 k)))))) H10)) (\lambda (H10: (subst0 i0 v u2 +x0)).(or4_intro2 (eq T (THead k u2 x1) (THead k x0 x1)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t))) (subst0 i0 v (THead k u2 x1) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k u2 x1)) (subst0_fst v x0 u2 i0 H10 x1 k))) (\lambda (H10: +(subst0 i0 v x0 u2)).(or4_intro3 (eq T (THead k u2 x1) (THead k x0 x1)) (ex2 +T (\lambda (t: T).(subst0 i0 v (THead k u2 x1) t)) (\lambda (t: T).(subst0 i0 +v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 x1) (THead k x0 x1)) (subst0 +i0 v (THead k x0 x1) (THead k u2 x1)) (subst0_fst v u2 x0 i0 H10 x1 k))) (H1 +x0 H7)) t3 H9)) (\lambda (H9: (ex2 T (\lambda (t: T).(subst0 (s k i0) v t3 +t)) (\lambda (t: T).(subst0 (s k i0) v x1 t)))).(ex2_ind T (\lambda (t: +T).(subst0 (s k i0) v t3 t)) (\lambda (t: T).(subst0 (s k i0) v x1 t)) (or4 +(eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v +(THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 +i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k +u2 t3))) (\lambda (x: T).(\lambda (H10: (subst0 (s k i0) v t3 x)).(\lambda +(H11: (subst0 (s k i0) v x1 x)).(or4_ind (eq T u2 x0) (ex2 T (\lambda (t: +T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x0 t))) (subst0 i0 v u2 +x0) (subst0 i0 v x0 u2) (or4 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 +v (THead k x0 x1) (THead k u2 t3))) (\lambda (H12: (eq T u2 x0)).(eq_ind_r T +x0 (\lambda (t: T).(or4 (eq T (THead k t t3) (THead k x0 x1)) (ex2 T (\lambda +(t5: T).(subst0 i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead +k x0 x1) t5))) (subst0 i0 v (THead k t t3) (THead k x0 x1)) (subst0 i0 v +(THead k x0 x1) (THead k t t3)))) (or4_intro1 (eq T (THead k x0 t3) (THead k +x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k x0 t3) (THead k x0 +x1)) (subst0 i0 v (THead k x0 x1) (THead k x0 t3)) (ex_intro2 T (\lambda (t: +T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t)) (THead k x0 x) (subst0_snd k v x t3 i0 H10 x0) (subst0_snd k v x x1 +i0 H11 x0))) u2 H12)) (\lambda (H12: (ex2 T (\lambda (t: T).(subst0 i0 v u2 +t)) (\lambda (t: T).(subst0 i0 v x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 +i0 v u2 t)) (\lambda (t: T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 t3) +(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 +t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda +(x2: T).(\lambda (H13: (subst0 i0 v u2 x2)).(\lambda (H14: (subst0 i0 v x0 +x2)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 +t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k x2 x) +(subst0_both v u2 x2 i0 H13 k t3 x H10) (subst0_both v x0 x2 i0 H14 k x1 x +H11)))))) H12)) (\lambda (H12: (subst0 i0 v u2 x0)).(or4_intro1 (eq T (THead +k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) +t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k +u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) +(ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x0 x1) t)) (THead k x0 x) (subst0_both v u2 x0 i0 +H12 k t3 x H10) (subst0_snd k v x x1 i0 H11 x0)))) (\lambda (H12: (subst0 i0 +v x0 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda +(t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k +x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead +k x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k +u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k u2 x) +(subst0_snd k v x t3 i0 H10 u2) (subst0_both v x0 u2 i0 H12 k x1 x H11)))) +(H1 x0 H7))))) H9)) (\lambda (H9: (subst0 (s k i0) v t3 x1)).(or4_ind (eq T +u2 x0) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 +v x0 t))) (subst0 i0 v u2 x0) (subst0 i0 v x0 u2) (or4 (eq T (THead k u2 t3) +(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 +t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda +(H10: (eq T u2 x0)).(eq_ind_r T x0 (\lambda (t: T).(or4 (eq T (THead k t t3) +(THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 i0 v (THead k t t3) t5)) +(\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) (subst0 i0 v (THead k t +t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k t t3)))) +(or4_intro2 (eq T (THead k x0 t3) (THead k x0 x1)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t))) (subst0 i0 v (THead k x0 t3) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k x0 t3)) (subst0_snd k v x1 t3 i0 H9 x0)) u2 H10)) (\lambda +(H10: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: T).(subst0 i0 v +x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 +v (THead k x0 x1) (THead k u2 t3))) (\lambda (x: T).(\lambda (H11: (subst0 i0 +v u2 x)).(\lambda (H12: (subst0 i0 v x0 x)).(or4_intro1 (eq T (THead k u2 t3) +(THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) +(\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 +t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) (ex_intro2 +T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 +v (THead k x0 x1) t)) (THead k x x1) (subst0_both v u2 x i0 H11 k t3 x1 H9) +(subst0_fst v x x0 i0 H12 x1 k)))))) H10)) (\lambda (H10: (subst0 i0 v u2 +x0)).(or4_intro2 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k +x0 x1) (THead k u2 t3)) (subst0_both v u2 x0 i0 H10 k t3 x1 H9))) (\lambda +(H10: (subst0 i0 v x0 u2)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) +(ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 +x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: +T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 +x1) t)) (THead k u2 x1) (subst0_snd k v x1 t3 i0 H9 u2) (subst0_fst v u2 x0 +i0 H10 x1 k)))) (H1 x0 H7))) (\lambda (H9: (subst0 (s k i0) v x1 +t3)).(or4_ind (eq T u2 x0) (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) +(\lambda (t: T).(subst0 i0 v x0 t))) (subst0 i0 v u2 x0) (subst0 i0 v x0 u2) +(or4 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 +v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) +(subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) +(THead k u2 t3))) (\lambda (H10: (eq T u2 x0)).(eq_ind_r T x0 (\lambda (t: +T).(or4 (eq T (THead k t t3) (THead k x0 x1)) (ex2 T (\lambda (t5: T).(subst0 +i0 v (THead k t t3) t5)) (\lambda (t5: T).(subst0 i0 v (THead k x0 x1) t5))) +(subst0 i0 v (THead k t t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) +(THead k t t3)))) (or4_intro3 (eq T (THead k x0 t3) (THead k x0 x1)) (ex2 T +(\lambda (t: T).(subst0 i0 v (THead k x0 t3) t)) (\lambda (t: T).(subst0 i0 v +(THead k x0 x1) t))) (subst0 i0 v (THead k x0 t3) (THead k x0 x1)) (subst0 i0 +v (THead k x0 x1) (THead k x0 t3)) (subst0_snd k v t3 x1 i0 H9 x0)) u2 H10)) +(\lambda (H10: (ex2 T (\lambda (t: T).(subst0 i0 v u2 t)) (\lambda (t: +T).(subst0 i0 v x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i0 v u2 t)) +(\lambda (t: T).(subst0 i0 v x0 t)) (or4 (eq T (THead k u2 t3) (THead k x0 +x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: +T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 +x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3))) (\lambda (x: T).(\lambda +(H11: (subst0 i0 v u2 x)).(\lambda (H12: (subst0 i0 v x0 x)).(or4_intro1 (eq +T (THead k u2 t3) (THead k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead +k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v +(THead k u2 t3) (THead k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 +t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda +(t: T).(subst0 i0 v (THead k x0 x1) t)) (THead k x t3) (subst0_fst v x u2 i0 +H11 t3 k) (subst0_both v x0 x i0 H12 k x1 t3 H9)))))) H10)) (\lambda (H10: +(subst0 i0 v u2 x0)).(or4_intro1 (eq T (THead k u2 t3) (THead k x0 x1)) (ex2 +T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 +v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead k x0 x1)) (subst0 +i0 v (THead k x0 x1) (THead k u2 t3)) (ex_intro2 T (\lambda (t: T).(subst0 i0 +v (THead k u2 t3) t)) (\lambda (t: T).(subst0 i0 v (THead k x0 x1) t)) (THead +k x0 t3) (subst0_fst v x0 u2 i0 H10 t3 k) (subst0_snd k v t3 x1 i0 H9 x0)))) +(\lambda (H10: (subst0 i0 v x0 u2)).(or4_intro3 (eq T (THead k u2 t3) (THead +k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda +(t: T).(subst0 i0 v (THead k x0 x1) t))) (subst0 i0 v (THead k u2 t3) (THead +k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) (subst0_both v x0 u2 +i0 H10 k x1 t3 H9))) (H1 x0 H7))) (H3 x1 H8)) t4 H6)))))) H5)) +(subst0_gen_head k v u1 t2 t4 i0 H4))))))))))))))) i u t0 t1 H))))). + +theorem subst0_confluence_lift: + \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst0 +i u t0 (lift (S O) i t1)) \to (\forall (t2: T).((subst0 i u t0 (lift (S O) i +t2)) \to (eq T t1 t2))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst0 i u t0 (lift (S O) i t1))).(\lambda (t2: T).(\lambda (H0: (subst0 +i u t0 (lift (S O) i t2))).(or4_ind (eq T (lift (S O) i t2) (lift (S O) i +t1)) (ex2 T (\lambda (t: T).(subst0 i u (lift (S O) i t2) t)) (\lambda (t: +T).(subst0 i u (lift (S O) i t1) t))) (subst0 i u (lift (S O) i t2) (lift (S +O) i t1)) (subst0 i u (lift (S O) i t1) (lift (S O) i t2)) (eq T t1 t2) +(\lambda (H1: (eq T (lift (S O) i t2) (lift (S O) i t1))).(let H2 \def +(sym_eq T (lift (S O) i t2) (lift (S O) i t1) H1) in (lift_inj t1 t2 (S O) i +H2))) (\lambda (H1: (ex2 T (\lambda (t: T).(subst0 i u (lift (S O) i t2) t)) +(\lambda (t: T).(subst0 i u (lift (S O) i t1) t)))).(ex2_ind T (\lambda (t: +T).(subst0 i u (lift (S O) i t2) t)) (\lambda (t: T).(subst0 i u (lift (S O) +i t1) t)) (eq T t1 t2) (\lambda (x: T).(\lambda (_: (subst0 i u (lift (S O) i +t2) x)).(\lambda (H3: (subst0 i u (lift (S O) i t1) +x)).(subst0_gen_lift_false t1 u x (S O) i i (le_n i) (eq_ind_r nat (plus (S +O) i) (\lambda (n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) +(plus_sym i (S O))) H3 (eq T t1 t2))))) H1)) (\lambda (H1: (subst0 i u (lift +(S O) i t2) (lift (S O) i t1))).(subst0_gen_lift_false t2 u (lift (S O) i t1) +(S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(lt i n)) +(le_n (plus (S O) i)) (plus i (S O)) (plus_sym i (S O))) H1 (eq T t1 t2))) +(\lambda (H1: (subst0 i u (lift (S O) i t1) (lift (S O) i +t2))).(subst0_gen_lift_false t1 u (lift (S O) i t2) (S O) i i (le_n i) +(eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(lt i n)) (le_n (plus (S O) +i)) (plus i (S O)) (plus_sym i (S O))) H1 (eq T t1 t2))) +(subst0_confluence_eq t0 (lift (S O) i t2) u i H0 (lift (S O) i t1) H)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst0/tlt.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst0/tlt.ma new file mode 100644 index 000000000..5309cecf4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst0/tlt.ma @@ -0,0 +1,457 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/fwd.ma". + +include "basic_1A/lift/tlt.ma". + +lemma subst0_weight_le: + \forall (u: T).(\forall (t: T).(\forall (z: T).(\forall (d: nat).((subst0 d +u t z) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +d) O u)) (g d)) \to (le (weight_map f z) (weight_map g t)))))))))) +\def + \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (d: nat).(\lambda +(H: (subst0 d u t z)).(subst0_ind (\lambda (n: nat).(\lambda (t0: T).(\lambda +(t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +n) O t0)) (g n)) \to (le (weight_map f t2) (weight_map g t1)))))))))) +(\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: +((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f m) (g m))))).(\lambda +(H1: (lt (weight_map f (lift (S i) O v)) (g i))).(le_S_n (weight_map f (lift +(S i) O v)) (weight_map g (TLRef i)) (le_S_n (S (weight_map f (lift (S i) O +v))) (S (weight_map g (TLRef i))) (le_S (S (S (weight_map f (lift (S i) O +v)))) (S (weight_map g (TLRef i))) (le_n_S (S (weight_map f (lift (S i) O +v))) (weight_map g (TLRef i)) H1)))))))))) (\lambda (v: T).(\lambda (u2: +T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 +u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +i) O v)) (g i)) \to (le (weight_map f u2) (weight_map g u1)))))))).(\lambda +(t0: T).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead +k0 u2 t0)) (weight_map g (THead k0 u1 t0)))))))) (\lambda (b: B).(B_ind +(\lambda (b0: B).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t0)) (weight_map g +(THead (Bind b0) u1 t0)))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: +((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g +m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S +(plus (weight_map f u2) (weight_map (wadd f (S (weight_map f u2))) t0)) (plus +(weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) t0)) +(le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S +(weight_map f u2))) t0) (weight_map (wadd g (S (weight_map g u1))) t0) (H1 f +g H2 H3) (weight_le t0 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map +g u1))) (\lambda (n: nat).(wadd_le f g H2 (S (weight_map f u2)) (S +(weight_map g u1)) (le_n_S (weight_map f u2) (weight_map g u1) (H1 f g H2 +H3)) n))))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt +(weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u2) +(weight_map (wadd f O) t0)) (plus (weight_map g u1) (weight_map (wadd g O) +t0)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) +t0) (weight_map (wadd g O) t0) (H1 f g H2 H3) (weight_le t0 (wadd f O) (wadd +g O) (\lambda (n: nat).(wadd_le f g H2 O O (le_O_n O) n))))))))) (\lambda (f: +((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: +nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g +i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f O) t0)) (plus +(weight_map g u1) (weight_map (wadd g O) t0)) (le_plus_plus (weight_map f u2) +(weight_map g u1) (weight_map (wadd f O) t0) (weight_map (wadd g O) t0) (H1 f +g H2 H3) (weight_le t0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g +H2 O O (le_O_n O) n))))))))) b)) (\lambda (_: F).(\lambda (f0: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 +m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g +i))).(le_n_S (plus (weight_map f0 u2) (weight_map f0 t0)) (plus (weight_map g +u1) (weight_map g t0)) (le_plus_plus (weight_map f0 u2) (weight_map g u1) +(weight_map f0 t0) (weight_map g t0) (H1 f0 g H2 H3) (weight_le t0 f0 g +H2)))))))) k))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (v: +T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) v t1 +t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(s k0 i)) O v)) (g (s k0 i))) \to (le (weight_map f t2) (weight_map g +t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: +((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map +f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead k0 u0 t2)) +(weight_map g (THead k0 u0 t1))))))))))))))) (\lambda (b: B).(B_ind (\lambda +(b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: +nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) +\to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: +T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to +(le (weight_map f (THead (Bind b0) u0 t2)) (weight_map g (THead (Bind b0) u0 +t1))))))))))))))) (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda +(i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le +(weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: +((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: +nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g +i))).(le_n_S (plus (weight_map f u0) (weight_map (wadd f (S (weight_map f +u0))) t2)) (plus (weight_map g u0) (weight_map (wadd g (S (weight_map g u0))) +t1)) (le_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f (S +(weight_map f u0))) t2) (weight_map (wadd g (S (weight_map g u0))) t1) +(weight_le u0 f g H2) (H1 (wadd f (S (weight_map f u0))) (wadd g (S +(weight_map g u0))) (\lambda (m: nat).(wadd_le f g H2 (S (weight_map f u0)) +(S (weight_map g u0)) (le_n_S (weight_map f u0) (weight_map g u0) (weight_le +u0 f g H2)) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: +nat).(lt n (g i))) H3 (weight_map (wadd f (S (weight_map f u0))) (lift (S (S +i)) O v)) (lift_weight_add_O (S (weight_map f u0)) v (S i) f)))))))))))))))) +(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda +(_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f +t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g +i))).(le_n_S (plus (weight_map f u0) (weight_map (wadd f O) t2)) (plus +(weight_map g u0) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map f u0) +(weight_map g u0) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) +(weight_le u0 f g H2) (H1 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f +g H2 O O (le_O_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda +(n: nat).(lt n (g i))) H3 (weight_map (wadd f O) (lift (S (S i)) O v)) +(lift_weight_add_O O v (S i) f)))))))))))))))) (\lambda (v: T).(\lambda (t2: +T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 +t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g +t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: +(lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u0) +(weight_map (wadd f O) t2)) (plus (weight_map g u0) (weight_map (wadd g O) +t1)) (le_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f O) +t2) (weight_map (wadd g O) t1) (weight_le u0 f g H2) (H1 (wadd f O) (wadd g +O) (\lambda (m: nat).(wadd_le f g H2 O O (le_O_n O) m)) (eq_ind nat +(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H3 +(weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) +f)))))))))))))))) b)) (\lambda (_: F).(\lambda (v: T).(\lambda (t2: +T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v t1 +t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift +(S i) O v)) (g i)) \to (le (weight_map f0 t2) (weight_map g +t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda +(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map +f0 u0) (weight_map f0 t2)) (plus (weight_map g u0) (weight_map g t1)) +(le_plus_plus (weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) +(weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 H3))))))))))))))) k)) +(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda +(_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f u2) (weight_map +g u1)))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t1: +T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (le +(weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead +k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind +(\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v +t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (le (weight_map f t2) +(weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat +\to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f +(lift (S i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t2)) +(weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda +(t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le +(weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g +i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f (S (weight_map f +u2))) t2)) (plus (weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) +t1)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S +(weight_map f u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) (H1 f +g H4 H5) (H3 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map g u1))) +(\lambda (m: nat).(wadd_le f g H4 (S (weight_map f u2)) (S (weight_map g u1)) +(le_n_S (weight_map f u2) (weight_map g u1) (H1 f g H4 H5)) m)) (eq_ind nat +(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 +(weight_map (wadd f (S (weight_map f u2))) (lift (S (S i)) O v)) +(lift_weight_add_O (S (weight_map f u2)) v (S i) f))))))))))))) (\lambda (t1: +T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: +((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S +i))) \to (le (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat +\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le +(f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g +i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f O) t2)) (plus +(weight_map g u1) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map f u2) +(weight_map g u1) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) (H1 f +g H4 H5) (H3 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f g H4 O O +(le_O_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: +nat).(lt n (g i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) +(lift_weight_add_O O v (S i) f))))))))))))) (\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f +t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: +(lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u2) +(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) +t1)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) +t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) +(\lambda (m: nat).(wadd_le f g H4 O O (le_O_n O) m)) (eq_ind nat (weight_map +f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) +(lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f))))))))))))) b)) +(\lambda (_: F).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 i v t1 +t2)).(\lambda (H3: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift +(S i) O v)) (g i)) \to (le (weight_map f0 t2) (weight_map g +t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda (H5: +(lt (weight_map f0 (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f0 u2) +(weight_map f0 t2)) (plus (weight_map g u1) (weight_map g t1)) (le_plus_plus +(weight_map f0 u2) (weight_map g u1) (weight_map f0 t2) (weight_map g t1) (H1 +f0 g H4 H5) (H3 f0 g H4 H5)))))))))))) k)))))))) d u t z H))))). + +lemma subst0_weight_lt: + \forall (u: T).(\forall (t: T).(\forall (z: T).(\forall (d: nat).((subst0 d +u t z) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +d) O u)) (g d)) \to (lt (weight_map f z) (weight_map g t)))))))))) +\def + \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (d: nat).(\lambda +(H: (subst0 d u t z)).(subst0_ind (\lambda (n: nat).(\lambda (t0: T).(\lambda +(t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +n) O t0)) (g n)) \to (lt (weight_map f t2) (weight_map g t1)))))))))) +(\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: +((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f m) (g m))))).(\lambda +(H1: (lt (weight_map f (lift (S i) O v)) (g i))).H1)))))) (\lambda (v: +T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i +v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map g u1)))))))).(\lambda +(t0: T).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead +k0 u2 t0)) (weight_map g (THead k0 u1 t0)))))))) (\lambda (b: B).(B_ind +(\lambda (b0: B).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +i) O v)) (g i)) \to (lt (weight_map f (THead (Bind b0) u2 t0)) (weight_map g +(THead (Bind b0) u1 t0)))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: +((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g +m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(lt_n_S +(plus (weight_map f u2) (weight_map (wadd f (S (weight_map f u2))) t0)) (plus +(weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) t0)) +(lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S +(weight_map f u2))) t0) (weight_map (wadd g (S (weight_map g u1))) t0) (H1 f +g H2 H3) (weight_le t0 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map +g u1))) (\lambda (n: nat).(wadd_lt f g H2 (S (weight_map f u2)) (S +(weight_map g u1)) (lt_n_S (weight_map f u2) (weight_map g u1) (H1 f g H2 +H3)) n))))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt +(weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) +(weight_map (wadd f O) t0)) (plus (weight_map g u1) (weight_map (wadd g O) +t0)) (lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f +O) t0) (weight_map (wadd g O) t0) (H1 f g H2 H3) (weight_le t0 (wadd f O) +(wadd g O) (\lambda (n: nat).(le_S_n (wadd f O n) (wadd g O n) (le_n_S (wadd +f O n) (wadd g O n) (wadd_le f g H2 O O (le_O_n O) n))))))))))) (\lambda (f: +((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: +nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g +i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f O) t0)) (plus +(weight_map g u1) (weight_map (wadd g O) t0)) (lt_le_plus_plus (weight_map f +u2) (weight_map g u1) (weight_map (wadd f O) t0) (weight_map (wadd g O) t0) +(H1 f g H2 H3) (weight_le t0 (wadd f O) (wadd g O) (\lambda (n: nat).(le_S_n +(wadd f O n) (wadd g O n) (le_n_S (wadd f O n) (wadd g O n) (wadd_le f g H2 O +O (le_O_n O) n))))))))))) b)) (\lambda (_: F).(\lambda (f0: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 +m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g +i))).(lt_n_S (plus (weight_map f0 u2) (weight_map f0 t0)) (plus (weight_map g +u1) (weight_map g t0)) (lt_le_plus_plus (weight_map f0 u2) (weight_map g u1) +(weight_map f0 t0) (weight_map g t0) (H1 f0 g H2 H3) (weight_le t0 f0 g +H2)))))))) k))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (v: +T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) v t1 +t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(s k0 i)) O v)) (g (s k0 i))) \to (lt (weight_map f t2) (weight_map g +t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: +((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map +f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead k0 u0 t2)) +(weight_map g (THead k0 u0 t1))))))))))))))) (\lambda (b: B).(B_ind (\lambda +(b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: +nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) +\to (lt (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: +T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to +(lt (weight_map f (THead (Bind b0) u0 t2)) (weight_map g (THead (Bind b0) u0 +t1))))))))))))))) (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda +(i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt +(weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: +((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: +nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g +i))).(lt_n_S (plus (weight_map f u0) (weight_map (wadd f (S (weight_map f +u0))) t2)) (plus (weight_map g u0) (weight_map (wadd g (S (weight_map g u0))) +t1)) (le_lt_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f +(S (weight_map f u0))) t2) (weight_map (wadd g (S (weight_map g u0))) t1) +(weight_le u0 f g H2) (H1 (wadd f (S (weight_map f u0))) (wadd g (S +(weight_map g u0))) (\lambda (m: nat).(wadd_le f g H2 (S (weight_map f u0)) +(S (weight_map g u0)) (le_n_S (weight_map f u0) (weight_map g u0) (weight_le +u0 f g H2)) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: +nat).(lt n (g i))) H3 (weight_map (wadd f (S (weight_map f u0))) (lift (S (S +i)) O v)) (lift_weight_add_O (S (weight_map f u0)) v (S i) f)))))))))))))))) +(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda +(_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f +t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g +i))).(lt_n_S (plus (weight_map f u0) (weight_map (wadd f O) t2)) (plus +(weight_map g u0) (weight_map (wadd g O) t1)) (le_lt_plus_plus (weight_map f +u0) (weight_map g u0) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) +(weight_le u0 f g H2) (H1 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f +g H2 O O (le_O_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda +(n: nat).(lt n (g i))) H3 (weight_map (wadd f O) (lift (S (S i)) O v)) +(lift_weight_add_O O v (S i) f)))))))))))))))) (\lambda (v: T).(\lambda (t2: +T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 +t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g +t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: +(lt (weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u0) +(weight_map (wadd f O) t2)) (plus (weight_map g u0) (weight_map (wadd g O) +t1)) (le_lt_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f +O) t2) (weight_map (wadd g O) t1) (weight_le u0 f g H2) (H1 (wadd f O) (wadd +g O) (\lambda (m: nat).(wadd_le f g H2 O O (le_O_n O) m)) (eq_ind nat +(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H3 +(weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) +f)))))))))))))))) b)) (\lambda (_: F).(\lambda (v: T).(\lambda (t2: +T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v t1 +t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift +(S i) O v)) (g i)) \to (lt (weight_map f0 t2) (weight_map g +t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda +(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map +f0 u0) (weight_map f0 t2)) (plus (weight_map g u0) (weight_map g t1)) +(le_lt_plus_plus (weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) +(weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 H3))))))))))))))) k)) +(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda +(_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map +g u1)))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t1: +T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (lt +(weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead +k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind +(\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v +t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (lt (weight_map f t2) +(weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat +\to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f +(lift (S i) O v)) (g i)) \to (lt (weight_map f (THead (Bind b0) u2 t2)) +(weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda +(t2: T).(\lambda (H2: (subst0 (S i) v t1 t2)).(\lambda (_: ((\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt +(weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g +i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f (S (weight_map f +u2))) t2)) (plus (weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) +t1)) (lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f +(S (weight_map f u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) (H1 +f g H4 H5) (subst0_weight_le v t1 t2 (S i) H2 (wadd f (S (weight_map f u2))) +(wadd g (S (weight_map g u1))) (\lambda (m: nat).(wadd_lt f g H4 (S +(weight_map f u2)) (S (weight_map g u1)) (lt_n_S (weight_map f u2) +(weight_map g u1) (H1 f g H4 H5)) m)) (eq_ind nat (weight_map f (lift (S i) O +v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f (S (weight_map f +u2))) (lift (S (S i)) O v)) (lift_weight_add_O (S (weight_map f u2)) v (S i) +f))))))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v +t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g +t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt +(weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) +(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) +t1)) (lt_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) +t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) +(\lambda (m: nat).(le_S_n (wadd f O m) (wadd g O m) (le_n_S (wadd f O m) +(wadd g O m) (wadd_le f g H4 O O (le_O_n O) m)))) (eq_ind nat (weight_map f +(lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) +(lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f))))))))))))) (\lambda +(t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: +((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S +i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat +\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le +(f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g +i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f O) t2)) (plus +(weight_map g u1) (weight_map (wadd g O) t1)) (lt_plus_plus (weight_map f u2) +(weight_map g u1) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) (H1 f +g H4 H5) (H3 (wadd f O) (wadd g O) (\lambda (m: nat).(le_S_n (wadd f O m) +(wadd g O m) (le_n_S (wadd f O m) (wadd g O m) (wadd_le f g H4 O O (le_O_n O) +m)))) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g +i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v +(S i) f))))))))))))) b)) (\lambda (_: F).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (subst0 i v t1 t2)).(\lambda (H3: ((\forall (f0: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f0 m) (g m)))) +\to ((lt (weight_map f0 (lift (S i) O v)) (g i)) \to (lt (weight_map f0 t2) +(weight_map g t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda +(H5: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map +f0 u2) (weight_map f0 t2)) (plus (weight_map g u1) (weight_map g t1)) +(lt_plus_plus (weight_map f0 u2) (weight_map g u1) (weight_map f0 t2) +(weight_map g t1) (H1 f0 g H4 H5) (H3 f0 g H4 H5)))))))))))) k)))))))) d u t +z H))))). + +lemma subst0_tlt_head: + \forall (u: T).(\forall (t: T).(\forall (z: T).((subst0 O u t z) \to (tlt +(THead (Bind Abbr) u z) (THead (Bind Abbr) u t))))) +\def + \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (H: (subst0 O u t +z)).(lt_n_S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd +(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) z)) (plus +(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S +(weight_map (\lambda (_: nat).O) u))) t)) (le_lt_plus_plus (weight_map +(\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) u) (weight_map (wadd +(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) z) (weight_map +(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t) (le_n +(weight_map (\lambda (_: nat).O) u)) (subst0_weight_lt u t z O H (wadd +(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) (wadd (\lambda +(_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) (\lambda (m: nat).(le_n +(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u)) m))) +(eq_ind nat (weight_map (\lambda (_: nat).O) (lift O O u)) (\lambda (n: +nat).(lt n (S (weight_map (\lambda (_: nat).O) u)))) (eq_ind_r T u (\lambda +(t0: T).(lt (weight_map (\lambda (_: nat).O) t0) (S (weight_map (\lambda (_: +nat).O) u)))) (le_n (S (weight_map (\lambda (_: nat).O) u))) (lift O O u) +(lift_r u O)) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda +(_: nat).O) u))) (lift (S O) O u)) (lift_weight_add_O (S (weight_map (\lambda +(_: nat).O) u)) u O (\lambda (_: nat).O))))))))). + +lemma subst0_tlt: + \forall (u: T).(\forall (t: T).(\forall (z: T).((subst0 O u t z) \to (tlt z +(THead (Bind Abbr) u t))))) +\def + \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (H: (subst0 O u t +z)).(tlt_trans (THead (Bind Abbr) u z) z (THead (Bind Abbr) u t) (tlt_head_dx +(Bind Abbr) u z) (subst0_tlt_head u t z H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst1/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/defs.ma new file mode 100644 index 000000000..c11379b33 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/defs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/defs.ma". + +inductive subst1 (i: nat) (v: T) (t1: T): T \to Prop \def +| subst1_refl: subst1 i v t1 t1 +| subst1_single: \forall (t2: T).((subst0 i v t1 t2) \to (subst1 i v t1 t2)). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst1/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/fwd.ma new file mode 100644 index 000000000..9552eaa41 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/fwd.ma @@ -0,0 +1,175 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst1/defs.ma". + +include "basic_1A/subst0/fwd.ma". + +implied lemma subst1_ind: + \forall (i: nat).(\forall (v: T).(\forall (t1: T).(\forall (P: ((T \to +Prop))).((P t1) \to (((\forall (t2: T).((subst0 i v t1 t2) \to (P t2)))) \to +(\forall (t: T).((subst1 i v t1 t) \to (P t)))))))) +\def + \lambda (i: nat).(\lambda (v: T).(\lambda (t1: T).(\lambda (P: ((T \to +Prop))).(\lambda (f: (P t1)).(\lambda (f0: ((\forall (t2: T).((subst0 i v t1 +t2) \to (P t2))))).(\lambda (t: T).(\lambda (s0: (subst1 i v t1 t)).(match s0 +with [subst1_refl \Rightarrow f | (subst1_single x x0) \Rightarrow (f0 x +x0)])))))))). + +lemma subst1_gen_sort: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst1 +i v (TSort n) x) \to (eq T x (TSort n)))))) +\def + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda +(H: (subst1 i v (TSort n) x)).(subst1_ind i v (TSort n) (\lambda (t: T).(eq T +t (TSort n))) (refl_equal T (TSort n)) (\lambda (t2: T).(\lambda (H0: (subst0 +i v (TSort n) t2)).(subst0_gen_sort v t2 i n H0 (eq T t2 (TSort n))))) x +H))))). + +lemma subst1_gen_lref: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst1 +i v (TLRef n) x) \to (or (eq T x (TLRef n)) (land (eq nat n i) (eq T x (lift +(S n) O v)))))))) +\def + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda +(H: (subst1 i v (TLRef n) x)).(subst1_ind i v (TLRef n) (\lambda (t: T).(or +(eq T t (TLRef n)) (land (eq nat n i) (eq T t (lift (S n) O v))))) (or_introl +(eq T (TLRef n) (TLRef n)) (land (eq nat n i) (eq T (TLRef n) (lift (S n) O +v))) (refl_equal T (TLRef n))) (\lambda (t2: T).(\lambda (H0: (subst0 i v +(TLRef n) t2)).(land_ind (eq nat n i) (eq T t2 (lift (S n) O v)) (or (eq T t2 +(TLRef n)) (land (eq nat n i) (eq T t2 (lift (S n) O v)))) (\lambda (H1: (eq +nat n i)).(\lambda (H2: (eq T t2 (lift (S n) O v))).(or_intror (eq T t2 +(TLRef n)) (land (eq nat n i) (eq T t2 (lift (S n) O v))) (conj (eq nat n i) +(eq T t2 (lift (S n) O v)) H1 H2)))) (subst0_gen_lref v t2 i n H0)))) x +H))))). + +lemma subst1_gen_head: + \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall +(x: T).(\forall (i: nat).((subst1 i v (THead k u1 t1) x) \to (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t2: +T).(subst1 (s k i) v t1 t2)))))))))) +\def + \lambda (k: K).(\lambda (v: T).(\lambda (u1: T).(\lambda (t1: T).(\lambda +(x: T).(\lambda (i: nat).(\lambda (H: (subst1 i v (THead k u1 t1) +x)).(subst1_ind i v (THead k u1 t1) (\lambda (t: T).(ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T t (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst1 (s k i) v t1 +t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k u1 +t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(subst1 (s k i) v t1 t2))) u1 t1 (refl_equal +T (THead k u1 t1)) (subst1_refl i v u1) (subst1_refl (s k i) v t1)) (\lambda +(t2: T).(\lambda (H0: (subst0 i v (THead k u1 t1) t2)).(or3_ind (ex2 T +(\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 +u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: +T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v +u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex3_2 +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda +(u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst1 (s k i) v t1 t3)))) (\lambda (H1: (ex2 T (\lambda (u2: T).(eq T t2 +(THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2)))).(ex2_ind T (\lambda +(u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2)) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: T).(\lambda +(H2: (eq T t2 (THead k x0 t1))).(\lambda (H3: (subst0 i v u1 +x0)).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) x0 t1 H2 (subst1_single i v u1 +x0 H3) (subst1_refl (s k i) v t1))))) H1)) (\lambda (H1: (ex2 T (\lambda (t3: +T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: +T).(subst0 (s k i) v t1 t3)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: +T).(\lambda (H2: (eq T t2 (THead k u1 x0))).(\lambda (H3: (subst0 (s k i) v +t1 x0)).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) u1 x0 H2 (subst1_refl i v u1) +(subst1_single (s k i) v t1 x0 H3))))) H1)) (\lambda (H1: (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s k i) v t1 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v +u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H2: (eq T t2 (THead k x0 x1))).(\lambda (H3: (subst0 i v u1 x0)).(\lambda +(H4: (subst0 (s k i) v t1 x1)).(ex3_2_intro T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 +i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) x0 +x1 H2 (subst1_single i v u1 x0 H3) (subst1_single (s k i) v t1 x1 H4))))))) +H1)) (subst0_gen_head k v u1 t1 t2 i H0)))) x H))))))). + +lemma subst1_gen_lift_lt: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst1 i (lift h d u) (lift h (S (plus i d)) t1) +x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda +(t2: T).(subst1 i u t1 t2))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (d: nat).(\lambda (H: (subst1 i (lift h d u) (lift h (S +(plus i d)) t1) x)).(subst1_ind i (lift h d u) (lift h (S (plus i d)) t1) +(\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) +(\lambda (t2: T).(subst1 i u t1 t2)))) (ex_intro2 T (\lambda (t2: T).(eq T +(lift h (S (plus i d)) t1) (lift h (S (plus i d)) t2))) (\lambda (t2: +T).(subst1 i u t1 t2)) t1 (refl_equal T (lift h (S (plus i d)) t1)) +(subst1_refl i u t1)) (\lambda (t2: T).(\lambda (H0: (subst0 i (lift h d u) +(lift h (S (plus i d)) t1) t2)).(ex2_ind T (\lambda (t3: T).(eq T t2 (lift h +(S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u t1 t3)) (ex2 T (\lambda +(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst1 i u t1 +t3))) (\lambda (x0: T).(\lambda (H1: (eq T t2 (lift h (S (plus i d)) +x0))).(\lambda (H2: (subst0 i u t1 x0)).(ex_intro2 T (\lambda (t3: T).(eq T +t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst1 i u t1 t3)) x0 H1 +(subst1_single i u t1 x0 H2))))) (subst0_gen_lift_lt u t1 t2 i h d H0)))) x +H))))))). + +lemma subst1_gen_lift_eq: + \forall (t: T).(\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall +(d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst1 i u +(lift h d t) x) \to (eq T x (lift h d t)))))))))) +\def + \lambda (t: T).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (i: nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d +h))).(\lambda (H1: (subst1 i u (lift h d t) x)).(subst1_ind i u (lift h d t) +(\lambda (t0: T).(eq T t0 (lift h d t))) (refl_equal T (lift h d t)) (\lambda +(t2: T).(\lambda (H2: (subst0 i u (lift h d t) t2)).(subst0_gen_lift_false t +u t2 h d i H H0 H2 (eq T t2 (lift h d t))))) x H1))))))))). + +lemma subst1_gen_lift_ge: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst1 i u (lift h d t1) x) \to ((le (plus d h) +i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: +T).(subst1 (minus i h) u t1 t2)))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (d: nat).(\lambda (H: (subst1 i u (lift h d t1) +x)).(\lambda (H0: (le (plus d h) i)).(subst1_ind i u (lift h d t1) (\lambda +(t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h d t2))) (\lambda (t2: +T).(subst1 (minus i h) u t1 t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift +h d t1) (lift h d t2))) (\lambda (t2: T).(subst1 (minus i h) u t1 t2)) t1 +(refl_equal T (lift h d t1)) (subst1_refl (minus i h) u t1)) (\lambda (t2: +T).(\lambda (H1: (subst0 i u (lift h d t1) t2)).(ex2_ind T (\lambda (t3: +T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u t1 t3)) +(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst1 +(minus i h) u t1 t3))) (\lambda (x0: T).(\lambda (H2: (eq T t2 (lift h d +x0))).(\lambda (H3: (subst0 (minus i h) u t1 x0)).(ex_intro2 T (\lambda (t3: +T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst1 (minus i h) u t1 t3)) x0 +H2 (subst1_single (minus i h) u t1 x0 H3))))) (subst0_gen_lift_ge u t1 t2 i h +d H1 H0)))) x H)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst1/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/props.ma new file mode 100644 index 000000000..7bd1ea271 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/props.ma @@ -0,0 +1,165 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst1/fwd.ma". + +include "basic_1A/subst0/props.ma". + +theorem subst1_head: + \forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall (i: nat).((subst1 +i v u1 u2) \to (\forall (k: K).(\forall (t1: T).(\forall (t2: T).((subst1 (s +k i) v t1 t2) \to (subst1 i v (THead k u1 t1) (THead k u2 t2)))))))))) +\def + \lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda +(H: (subst1 i v u1 u2)).(subst1_ind i v u1 (\lambda (t: T).(\forall (k: +K).(\forall (t1: T).(\forall (t2: T).((subst1 (s k i) v t1 t2) \to (subst1 i +v (THead k u1 t1) (THead k t t2))))))) (\lambda (k: K).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H0: (subst1 (s k i) v t1 t2)).(subst1_ind (s k +i) v t1 (\lambda (t: T).(subst1 i v (THead k u1 t1) (THead k u1 t))) +(subst1_refl i v (THead k u1 t1)) (\lambda (t3: T).(\lambda (H1: (subst0 (s k +i) v t1 t3)).(subst1_single i v (THead k u1 t1) (THead k u1 t3) (subst0_snd k +v t3 t1 i H1 u1)))) t2 H0))))) (\lambda (t2: T).(\lambda (H0: (subst0 i v u1 +t2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t0: T).(\lambda (H1: (subst1 +(s k i) v t1 t0)).(subst1_ind (s k i) v t1 (\lambda (t: T).(subst1 i v (THead +k u1 t1) (THead k t2 t))) (subst1_single i v (THead k u1 t1) (THead k t2 t1) +(subst0_fst v t2 u1 i H0 t1 k)) (\lambda (t3: T).(\lambda (H2: (subst0 (s k +i) v t1 t3)).(subst1_single i v (THead k u1 t1) (THead k t2 t3) (subst0_both +v u1 t2 i H0 k t1 t3 H2)))) t0 H1))))))) u2 H))))). + +lemma subst1_lift_lt: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst1 +i u t1 t2) \to (\forall (d: nat).((lt i d) \to (\forall (h: nat).(subst1 i +(lift h (minus d (S i)) u) (lift h d t1) (lift h d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u t1 t2)).(subst1_ind i u t1 (\lambda (t: T).(\forall (d: +nat).((lt i d) \to (\forall (h: nat).(subst1 i (lift h (minus d (S i)) u) +(lift h d t1) (lift h d t)))))) (\lambda (d: nat).(\lambda (_: (lt i +d)).(\lambda (h: nat).(subst1_refl i (lift h (minus d (S i)) u) (lift h d +t1))))) (\lambda (t3: T).(\lambda (H0: (subst0 i u t1 t3)).(\lambda (d: +nat).(\lambda (H1: (lt i d)).(\lambda (h: nat).(subst1_single i (lift h +(minus d (S i)) u) (lift h d t1) (lift h d t3) (subst0_lift_lt t1 t3 u i H0 d +H1 h))))))) t2 H))))). + +lemma subst1_lift_ge: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall +(h: nat).((subst1 i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst1 +(plus i h) u (lift h d t1) (lift h d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (H: (subst1 i u t1 t2)).(subst1_ind i u t1 (\lambda (t: +T).(\forall (d: nat).((le d i) \to (subst1 (plus i h) u (lift h d t1) (lift h +d t))))) (\lambda (d: nat).(\lambda (_: (le d i)).(subst1_refl (plus i h) u +(lift h d t1)))) (\lambda (t3: T).(\lambda (H0: (subst0 i u t1 t3)).(\lambda +(d: nat).(\lambda (H1: (le d i)).(subst1_single (plus i h) u (lift h d t1) +(lift h d t3) (subst0_lift_ge t1 t3 u i h H0 d H1)))))) t2 H)))))). + +lemma subst1_ex: + \forall (u: T).(\forall (t1: T).(\forall (d: nat).(ex T (\lambda (t2: +T).(subst1 d u t1 (lift (S O) d t2)))))) +\def + \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (d: nat).(ex +T (\lambda (t2: T).(subst1 d u t (lift (S O) d t2)))))) (\lambda (n: +nat).(\lambda (d: nat).(ex_intro T (\lambda (t2: T).(subst1 d u (TSort n) +(lift (S O) d t2))) (TSort n) (eq_ind_r T (TSort n) (\lambda (t: T).(subst1 d +u (TSort n) t)) (subst1_refl d u (TSort n)) (lift (S O) d (TSort n)) +(lift_sort n (S O) d))))) (\lambda (n: nat).(\lambda (d: nat).(lt_eq_gt_e n d +(ex T (\lambda (t2: T).(subst1 d u (TLRef n) (lift (S O) d t2)))) (\lambda +(H: (lt n d)).(ex_intro T (\lambda (t2: T).(subst1 d u (TLRef n) (lift (S O) +d t2))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t: T).(subst1 d u (TLRef n) +t)) (subst1_refl d u (TLRef n)) (lift (S O) d (TLRef n)) (lift_lref_lt n (S +O) d H)))) (\lambda (H: (eq nat n d)).(eq_ind nat n (\lambda (n0: nat).(ex T +(\lambda (t2: T).(subst1 n0 u (TLRef n) (lift (S O) n0 t2))))) (ex_intro T +(\lambda (t2: T).(subst1 n u (TLRef n) (lift (S O) n t2))) (lift n O u) +(eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t: T).(subst1 n u (TLRef n) +t)) (subst1_single n u (TLRef n) (lift (S n) O u) (subst0_lref u n)) (lift (S +O) n (lift n O u)) (lift_free u n (S O) O n (le_plus_r O n) (le_O_n n)))) d +H)) (\lambda (H: (lt d n)).(ex_intro T (\lambda (t2: T).(subst1 d u (TLRef n) +(lift (S O) d t2))) (TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t: +T).(subst1 d u (TLRef n) t)) (subst1_refl d u (TLRef n)) (lift (S O) d (TLRef +(pred n))) (lift_lref_gt d n H))))))) (\lambda (k: K).(\lambda (t: +T).(\lambda (H: ((\forall (d: nat).(ex T (\lambda (t2: T).(subst1 d u t (lift +(S O) d t2))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (d: nat).(ex T +(\lambda (t2: T).(subst1 d u t0 (lift (S O) d t2))))))).(\lambda (d: +nat).(let H_x \def (H d) in (let H1 \def H_x in (ex_ind T (\lambda (t2: +T).(subst1 d u t (lift (S O) d t2))) (ex T (\lambda (t2: T).(subst1 d u +(THead k t t0) (lift (S O) d t2)))) (\lambda (x: T).(\lambda (H2: (subst1 d u +t (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in (let H3 \def H_x0 in +(ex_ind T (\lambda (t2: T).(subst1 (s k d) u t0 (lift (S O) (s k d) t2))) (ex +T (\lambda (t2: T).(subst1 d u (THead k t t0) (lift (S O) d t2)))) (\lambda +(x0: T).(\lambda (H4: (subst1 (s k d) u t0 (lift (S O) (s k d) +x0))).(ex_intro T (\lambda (t2: T).(subst1 d u (THead k t t0) (lift (S O) d +t2))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) (lift (S O) (s k +d) x0)) (\lambda (t2: T).(subst1 d u (THead k t t0) t2)) (subst1_head u t +(lift (S O) d x) d H2 k t0 (lift (S O) (s k d) x0) H4) (lift (S O) d (THead k +x x0)) (lift_head k x x0 (S O) d))))) H3))))) H1))))))))) t1)). + +lemma subst1_lift_S: + \forall (u: T).(\forall (i: nat).(\forall (h: nat).((le h i) \to (subst1 i +(TLRef h) (lift (S h) (S i) u) (lift (S h) i u))))) +\def + \lambda (u: T).(T_ind (\lambda (t: T).(\forall (i: nat).(\forall (h: +nat).((le h i) \to (subst1 i (TLRef h) (lift (S h) (S i) t) (lift (S h) i +t)))))) (\lambda (n: nat).(\lambda (i: nat).(\lambda (h: nat).(\lambda (_: +(le h i)).(eq_ind_r T (TSort n) (\lambda (t: T).(subst1 i (TLRef h) t (lift +(S h) i (TSort n)))) (eq_ind_r T (TSort n) (\lambda (t: T).(subst1 i (TLRef +h) (TSort n) t)) (subst1_refl i (TLRef h) (TSort n)) (lift (S h) i (TSort n)) +(lift_sort n (S h) i)) (lift (S h) (S i) (TSort n)) (lift_sort n (S h) (S +i))))))) (\lambda (n: nat).(\lambda (i: nat).(\lambda (h: nat).(\lambda (H: +(le h i)).(lt_eq_gt_e n i (subst1 i (TLRef h) (lift (S h) (S i) (TLRef n)) +(lift (S h) i (TLRef n))) (\lambda (H0: (lt n i)).(eq_ind_r T (TLRef n) +(\lambda (t: T).(subst1 i (TLRef h) t (lift (S h) i (TLRef n)))) (eq_ind_r T +(TLRef n) (\lambda (t: T).(subst1 i (TLRef h) (TLRef n) t)) (subst1_refl i +(TLRef h) (TLRef n)) (lift (S h) i (TLRef n)) (lift_lref_lt n (S h) i H0)) +(lift (S h) (S i) (TLRef n)) (lift_lref_lt n (S h) (S i) (le_S_n (S n) (S i) +(le_S (S (S n)) (S i) (le_n_S (S n) i H0)))))) (\lambda (H0: (eq nat n +i)).(let H1 \def (eq_ind_r nat i (\lambda (n0: nat).(le h n0)) H n H0) in +(eq_ind nat n (\lambda (n0: nat).(subst1 n0 (TLRef h) (lift (S h) (S n0) +(TLRef n)) (lift (S h) n0 (TLRef n)))) (eq_ind_r T (TLRef n) (\lambda (t: +T).(subst1 n (TLRef h) t (lift (S h) n (TLRef n)))) (eq_ind_r T (TLRef (plus +n (S h))) (\lambda (t: T).(subst1 n (TLRef h) (TLRef n) t)) (eq_ind nat (S +(plus n h)) (\lambda (n0: nat).(subst1 n (TLRef h) (TLRef n) (TLRef n0))) +(eq_ind_r nat (plus h n) (\lambda (n0: nat).(subst1 n (TLRef h) (TLRef n) +(TLRef (S n0)))) (eq_ind nat (plus h (S n)) (\lambda (n0: nat).(subst1 n +(TLRef h) (TLRef n) (TLRef n0))) (eq_ind T (lift (S n) O (TLRef h)) (\lambda +(t: T).(subst1 n (TLRef h) (TLRef n) t)) (subst1_single n (TLRef h) (TLRef n) +(lift (S n) O (TLRef h)) (subst0_lref (TLRef h) n)) (TLRef (plus h (S n))) +(lift_lref_ge h (S n) O (le_O_n h))) (S (plus h n)) (sym_eq nat (S (plus h +n)) (plus h (S n)) (plus_n_Sm h n))) (plus n h) (plus_sym n h)) (plus n (S +h)) (plus_n_Sm n h)) (lift (S h) n (TLRef n)) (lift_lref_ge n (S h) n (le_n +n))) (lift (S h) (S n) (TLRef n)) (lift_lref_lt n (S h) (S n) (le_n (S n)))) +i H0))) (\lambda (H0: (lt i n)).(eq_ind_r T (TLRef (plus n (S h))) (\lambda +(t: T).(subst1 i (TLRef h) t (lift (S h) i (TLRef n)))) (eq_ind_r T (TLRef +(plus n (S h))) (\lambda (t: T).(subst1 i (TLRef h) (TLRef (plus n (S h))) +t)) (subst1_refl i (TLRef h) (TLRef (plus n (S h)))) (lift (S h) i (TLRef n)) +(lift_lref_ge n (S h) i (le_S_n i n (le_S_n (S i) (S n) (le_S (S (S i)) (S n) +(le_n_S (S i) n H0)))))) (lift (S h) (S i) (TLRef n)) (lift_lref_ge n (S h) +(S i) H0)))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (i: +nat).(\forall (h: nat).((le h i) \to (subst1 i (TLRef h) (lift (S h) (S i) t) +(lift (S h) i t))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (i: +nat).(\forall (h: nat).((le h i) \to (subst1 i (TLRef h) (lift (S h) (S i) +t0) (lift (S h) i t0))))))).(\lambda (i: nat).(\lambda (h: nat).(\lambda (H1: +(le h i)).(eq_ind_r T (THead k (lift (S h) (S i) t) (lift (S h) (s k (S i)) +t0)) (\lambda (t1: T).(subst1 i (TLRef h) t1 (lift (S h) i (THead k t t0)))) +(eq_ind_r T (THead k (lift (S h) i t) (lift (S h) (s k i) t0)) (\lambda (t1: +T).(subst1 i (TLRef h) (THead k (lift (S h) (S i) t) (lift (S h) (s k (S i)) +t0)) t1)) (subst1_head (TLRef h) (lift (S h) (S i) t) (lift (S h) i t) i (H i +h H1) k (lift (S h) (s k (S i)) t0) (lift (S h) (s k i) t0) (eq_ind_r nat (S +(s k i)) (\lambda (n: nat).(subst1 (s k i) (TLRef h) (lift (S h) n t0) (lift +(S h) (s k i) t0))) (H0 (s k i) h (le_trans h i (s k i) H1 (s_inc k i))) (s k +(S i)) (s_S k i))) (lift (S h) i (THead k t t0)) (lift_head k t t0 (S h) i)) +(lift (S h) (S i) (THead k t t0)) (lift_head k t t0 (S h) (S i))))))))))) u). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/subst1/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/subst1/subst1.ma new file mode 100644 index 000000000..fb466dc5f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/subst1/subst1.ma @@ -0,0 +1,196 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst1/fwd.ma". + +include "basic_1A/subst0/subst0.ma". + +theorem subst1_subst1: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst1 +j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst1 i +u u1 u2) \to (ex2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: +T).(subst1 (S (plus i j)) u t t2))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda +(H: (subst1 j u2 t1 t2)).(subst1_ind j u2 t1 (\lambda (t: T).(\forall (u1: +T).(\forall (u: T).(\forall (i: nat).((subst1 i u u1 u2) \to (ex2 T (\lambda +(t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 +t)))))))) (\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: +(subst1 i u u1 u2)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda +(t: T).(subst1 (S (plus i j)) u t t1)) t1 (subst1_refl j u1 t1) (subst1_refl +(S (plus i j)) u t1)))))) (\lambda (t3: T).(\lambda (H0: (subst0 j u2 t1 +t3)).(\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (subst1 +i u u1 u2)).(insert_eq T u2 (\lambda (t: T).(subst1 i u u1 t)) (\lambda (_: +T).(ex2 T (\lambda (t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S +(plus i j)) u t0 t3)))) (\lambda (y: T).(\lambda (H2: (subst1 i u u1 +y)).(subst1_ind i u u1 (\lambda (t: T).((eq T t u2) \to (ex2 T (\lambda (t0: +T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 t3))))) +(\lambda (H3: (eq T u1 u2)).(eq_ind_r T u2 (\lambda (t: T).(ex2 T (\lambda +(t0: T).(subst1 j t t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 +t3)))) (ex_intro2 T (\lambda (t: T).(subst1 j u2 t1 t)) (\lambda (t: +T).(subst1 (S (plus i j)) u t t3)) t3 (subst1_single j u2 t1 t3 H0) +(subst1_refl (S (plus i j)) u t3)) u1 H3)) (\lambda (t0: T).(\lambda (H3: +(subst0 i u u1 t0)).(\lambda (H4: (eq T t0 u2)).(let H5 \def (eq_ind T t0 +(\lambda (t: T).(subst0 i u u1 t)) H3 u2 H4) in (ex2_ind T (\lambda (t: +T).(subst0 j u1 t1 t)) (\lambda (t: T).(subst0 (S (plus i j)) u t t3)) (ex2 T +(\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u +t t3))) (\lambda (x: T).(\lambda (H6: (subst0 j u1 t1 x)).(\lambda (H7: +(subst0 (S (plus i j)) u x t3)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 +t)) (\lambda (t: T).(subst1 (S (plus i j)) u t t3)) x (subst1_single j u1 t1 +x H6) (subst1_single (S (plus i j)) u x t3 H7))))) (subst0_subst0 t1 t3 u2 j +H0 u1 u i H5)))))) y H2))) H1))))))) t2 H))))). + +theorem subst1_subst1_back: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst1 +j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst1 i +u u2 u1) \to (ex2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: +T).(subst1 (S (plus i j)) u t2 t))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda +(H: (subst1 j u2 t1 t2)).(subst1_ind j u2 t1 (\lambda (t: T).(\forall (u1: +T).(\forall (u: T).(\forall (i: nat).((subst1 i u u2 u1) \to (ex2 T (\lambda +(t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t +t0)))))))) (\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: +(subst1 i u u2 u1)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda +(t: T).(subst1 (S (plus i j)) u t1 t)) t1 (subst1_refl j u1 t1) (subst1_refl +(S (plus i j)) u t1)))))) (\lambda (t3: T).(\lambda (H0: (subst0 j u2 t1 +t3)).(\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (subst1 +i u u2 u1)).(subst1_ind i u u2 (\lambda (t: T).(ex2 T (\lambda (t0: +T).(subst1 j t t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t3 t0)))) +(ex_intro2 T (\lambda (t: T).(subst1 j u2 t1 t)) (\lambda (t: T).(subst1 (S +(plus i j)) u t3 t)) t3 (subst1_single j u2 t1 t3 H0) (subst1_refl (S (plus i +j)) u t3)) (\lambda (t0: T).(\lambda (H2: (subst0 i u u2 t0)).(ex2_ind T +(\lambda (t: T).(subst0 j t0 t1 t)) (\lambda (t: T).(subst0 (S (plus i j)) u +t3 t)) (ex2 T (\lambda (t: T).(subst1 j t0 t1 t)) (\lambda (t: T).(subst1 (S +(plus i j)) u t3 t))) (\lambda (x: T).(\lambda (H3: (subst0 j t0 t1 +x)).(\lambda (H4: (subst0 (S (plus i j)) u t3 x)).(ex_intro2 T (\lambda (t: +T).(subst1 j t0 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u t3 t)) x +(subst1_single j t0 t1 x H3) (subst1_single (S (plus i j)) u t3 x H4))))) +(subst0_subst0_back t1 t3 u2 j H0 t0 u i H2)))) u1 H1))))))) t2 H))))). + +theorem subst1_trans: + \forall (t2: T).(\forall (t1: T).(\forall (v: T).(\forall (i: nat).((subst1 +i v t1 t2) \to (\forall (t3: T).((subst1 i v t2 t3) \to (subst1 i v t1 +t3))))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (subst1 i v t1 t2)).(subst1_ind i v t1 (\lambda (t: T).(\forall (t3: +T).((subst1 i v t t3) \to (subst1 i v t1 t3)))) (\lambda (t3: T).(\lambda +(H0: (subst1 i v t1 t3)).H0)) (\lambda (t3: T).(\lambda (H0: (subst0 i v t1 +t3)).(\lambda (t4: T).(\lambda (H1: (subst1 i v t3 t4)).(subst1_ind i v t3 +(\lambda (t: T).(subst1 i v t1 t)) (subst1_single i v t1 t3 H0) (\lambda (t0: +T).(\lambda (H2: (subst0 i v t3 t0)).(subst1_single i v t1 t0 (subst0_trans +t3 t1 v i H0 t0 H2)))) t4 H1))))) t2 H))))). + +theorem subst1_confluence_neq: + \forall (t0: T).(\forall (t1: T).(\forall (u1: T).(\forall (i1: +nat).((subst1 i1 u1 t0 t1) \to (\forall (t2: T).(\forall (u2: T).(\forall +(i2: nat).((subst1 i2 u2 t0 t2) \to ((not (eq nat i1 i2)) \to (ex2 T (\lambda +(t: T).(subst1 i2 u2 t1 t)) (\lambda (t: T).(subst1 i1 u1 t2 t)))))))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u1: T).(\lambda (i1: +nat).(\lambda (H: (subst1 i1 u1 t0 t1)).(subst1_ind i1 u1 t0 (\lambda (t: +T).(\forall (t2: T).(\forall (u2: T).(\forall (i2: nat).((subst1 i2 u2 t0 t2) +\to ((not (eq nat i1 i2)) \to (ex2 T (\lambda (t3: T).(subst1 i2 u2 t t3)) +(\lambda (t3: T).(subst1 i1 u1 t2 t3))))))))) (\lambda (t2: T).(\lambda (u2: +T).(\lambda (i2: nat).(\lambda (H0: (subst1 i2 u2 t0 t2)).(\lambda (_: (not +(eq nat i1 i2))).(ex_intro2 T (\lambda (t: T).(subst1 i2 u2 t0 t)) (\lambda +(t: T).(subst1 i1 u1 t2 t)) t2 H0 (subst1_refl i1 u1 t2))))))) (\lambda (t2: +T).(\lambda (H0: (subst0 i1 u1 t0 t2)).(\lambda (t3: T).(\lambda (u2: +T).(\lambda (i2: nat).(\lambda (H1: (subst1 i2 u2 t0 t3)).(\lambda (H2: (not +(eq nat i1 i2))).(subst1_ind i2 u2 t0 (\lambda (t: T).(ex2 T (\lambda (t4: +T).(subst1 i2 u2 t2 t4)) (\lambda (t4: T).(subst1 i1 u1 t t4)))) (ex_intro2 T +(\lambda (t: T).(subst1 i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t0 t)) t2 +(subst1_refl i2 u2 t2) (subst1_single i1 u1 t0 t2 H0)) (\lambda (t4: +T).(\lambda (H3: (subst0 i2 u2 t0 t4)).(ex2_ind T (\lambda (t: T).(subst0 i1 +u1 t4 t)) (\lambda (t: T).(subst0 i2 u2 t2 t)) (ex2 T (\lambda (t: T).(subst1 +i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t4 t))) (\lambda (x: T).(\lambda +(H4: (subst0 i1 u1 t4 x)).(\lambda (H5: (subst0 i2 u2 t2 x)).(ex_intro2 T +(\lambda (t: T).(subst1 i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t4 t)) x +(subst1_single i2 u2 t2 x H5) (subst1_single i1 u1 t4 x H4))))) +(subst0_confluence_neq t0 t4 u2 i2 H3 t2 u1 i1 H0 (sym_not_eq nat i1 i2 +H2))))) t3 H1)))))))) t1 H))))). + +theorem subst1_confluence_eq: + \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst1 +i u t0 t1) \to (\forall (t2: T).((subst1 i u t0 t2) \to (ex2 T (\lambda (t: +T).(subst1 i u t1 t)) (\lambda (t: T).(subst1 i u t2 t))))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u t0 t1)).(subst1_ind i u t0 (\lambda (t: T).(\forall (t2: +T).((subst1 i u t0 t2) \to (ex2 T (\lambda (t3: T).(subst1 i u t t3)) +(\lambda (t3: T).(subst1 i u t2 t3)))))) (\lambda (t2: T).(\lambda (H0: +(subst1 i u t0 t2)).(ex_intro2 T (\lambda (t: T).(subst1 i u t0 t)) (\lambda +(t: T).(subst1 i u t2 t)) t2 H0 (subst1_refl i u t2)))) (\lambda (t2: +T).(\lambda (H0: (subst0 i u t0 t2)).(\lambda (t3: T).(\lambda (H1: (subst1 i +u t0 t3)).(subst1_ind i u t0 (\lambda (t: T).(ex2 T (\lambda (t4: T).(subst1 +i u t2 t4)) (\lambda (t4: T).(subst1 i u t t4)))) (ex_intro2 T (\lambda (t: +T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t0 t)) t2 (subst1_refl i u +t2) (subst1_single i u t0 t2 H0)) (\lambda (t4: T).(\lambda (H2: (subst0 i u +t0 t4)).(or4_ind (eq T t4 t2) (ex2 T (\lambda (t: T).(subst0 i u t4 t)) +(\lambda (t: T).(subst0 i u t2 t))) (subst0 i u t4 t2) (subst0 i u t2 t4) +(ex2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t4 t))) +(\lambda (H3: (eq T t4 t2)).(eq_ind_r T t2 (\lambda (t: T).(ex2 T (\lambda +(t5: T).(subst1 i u t2 t5)) (\lambda (t5: T).(subst1 i u t t5)))) (ex_intro2 +T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t2 t)) t2 +(subst1_refl i u t2) (subst1_refl i u t2)) t4 H3)) (\lambda (H3: (ex2 T +(\lambda (t: T).(subst0 i u t4 t)) (\lambda (t: T).(subst0 i u t2 +t)))).(ex2_ind T (\lambda (t: T).(subst0 i u t4 t)) (\lambda (t: T).(subst0 i +u t2 t)) (ex2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i +u t4 t))) (\lambda (x: T).(\lambda (H4: (subst0 i u t4 x)).(\lambda (H5: +(subst0 i u t2 x)).(ex_intro2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda +(t: T).(subst1 i u t4 t)) x (subst1_single i u t2 x H5) (subst1_single i u t4 +x H4))))) H3)) (\lambda (H3: (subst0 i u t4 t2)).(ex_intro2 T (\lambda (t: +T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t4 t)) t2 (subst1_refl i u +t2) (subst1_single i u t4 t2 H3))) (\lambda (H3: (subst0 i u t2 +t4)).(ex_intro2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 +i u t4 t)) t4 (subst1_single i u t2 t4 H3) (subst1_refl i u t4))) +(subst0_confluence_eq t0 t4 u i H2 t2 H0)))) t3 H1))))) t1 H))))). + +theorem subst1_confluence_lift: + \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst1 +i u t0 (lift (S O) i t1)) \to (\forall (t2: T).((subst1 i u t0 (lift (S O) i +t2)) \to (eq T t1 t2))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u t0 (lift (S O) i t1))).(insert_eq T (lift (S O) i t1) +(\lambda (t: T).(subst1 i u t0 t)) (\lambda (_: T).(\forall (t2: T).((subst1 +i u t0 (lift (S O) i t2)) \to (eq T t1 t2)))) (\lambda (y: T).(\lambda (H0: +(subst1 i u t0 y)).(subst1_ind i u t0 (\lambda (t: T).((eq T t (lift (S O) i +t1)) \to (\forall (t2: T).((subst1 i u t0 (lift (S O) i t2)) \to (eq T t1 +t2))))) (\lambda (H1: (eq T t0 (lift (S O) i t1))).(\lambda (t2: T).(\lambda +(H2: (subst1 i u t0 (lift (S O) i t2))).(let H3 \def (eq_ind T t0 (\lambda +(t: T).(subst1 i u t (lift (S O) i t2))) H2 (lift (S O) i t1) H1) in (let H4 +\def (sym_eq T (lift (S O) i t2) (lift (S O) i t1) (subst1_gen_lift_eq t1 u +(lift (S O) i t2) (S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) (\lambda +(n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) (plus_sym i (S O))) +H3)) in (lift_inj t1 t2 (S O) i H4)))))) (\lambda (t2: T).(\lambda (H1: +(subst0 i u t0 t2)).(\lambda (H2: (eq T t2 (lift (S O) i t1))).(\lambda (t3: +T).(\lambda (H3: (subst1 i u t0 (lift (S O) i t3))).(let H4 \def (eq_ind T t2 +(\lambda (t: T).(subst0 i u t0 t)) H1 (lift (S O) i t1) H2) in (insert_eq T +(lift (S O) i t3) (\lambda (t: T).(subst1 i u t0 t)) (\lambda (_: T).(eq T t1 +t3)) (\lambda (y0: T).(\lambda (H5: (subst1 i u t0 y0)).(subst1_ind i u t0 +(\lambda (t: T).((eq T t (lift (S O) i t3)) \to (eq T t1 t3))) (\lambda (H6: +(eq T t0 (lift (S O) i t3))).(let H7 \def (eq_ind T t0 (\lambda (t: +T).(subst0 i u t (lift (S O) i t1))) H4 (lift (S O) i t3) H6) in +(subst0_gen_lift_false t3 u (lift (S O) i t1) (S O) i i (le_n i) (eq_ind_r +nat (plus (S O) i) (\lambda (n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i +(S O)) (plus_sym i (S O))) H7 (eq T t1 t3)))) (\lambda (t4: T).(\lambda (H6: +(subst0 i u t0 t4)).(\lambda (H7: (eq T t4 (lift (S O) i t3))).(let H8 \def +(eq_ind T t4 (\lambda (t: T).(subst0 i u t0 t)) H6 (lift (S O) i t3) H7) in +(sym_eq T t3 t1 (subst0_confluence_lift t0 t3 u i H8 t1 H4)))))) y0 H5))) +H3))))))) y H0))) H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/theory.ma b/matita/matita/contribs/lambdadelta/basic_1A/theory.ma new file mode 100644 index 000000000..5ad07a599 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/theory.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/subst0/tlt.ma". + +include "basic_1A/subst/props.ma". + +include "basic_1A/sty1/cnt.ma". + +include "basic_1A/ex0/props.ma". + +include "basic_1A/pr3/wcpr0.ma". + +include "basic_1A/ex2/props.ma". + +include "basic_1A/ex1/props.ma". + +include "basic_1A/ty3/sty0.ma". + +include "basic_1A/csubt/csuba.ma". + +include "basic_1A/ty3/fwd_nf2.ma". + +include "basic_1A/ty3/nf2.ma". + +include "basic_1A/wf3/props.ma". + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/tlist/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlist/defs.ma new file mode 100644 index 000000000..7d892e9d5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlist/defs.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +inductive TList: Type[0] \def +| TNil: TList +| TCons: T \to (TList \to TList). + +rec definition THeads (k: K) (us: TList) on us: T \to T \def \lambda (t: +T).(match us with [TNil \Rightarrow t | (TCons u ul) \Rightarrow (THead k u +(THeads k ul t))]). + +rec definition TApp (ts: TList) on ts: T \to TList \def \lambda (v: T).(match +ts with [TNil \Rightarrow (TCons v TNil) | (TCons t ts0) \Rightarrow (TCons t +(TApp ts0 v))]). + +rec definition tslen (ts: TList) on ts: nat \def match ts with [TNil +\Rightarrow O | (TCons _ ts0) \Rightarrow (S (tslen ts0))]. + +definition tslt: + TList \to (TList \to Prop) +\def + \lambda (ts1: TList).(\lambda (ts2: TList).(lt (tslen ts1) (tslen ts2))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/tlist/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlist/fwd.ma new file mode 100644 index 000000000..cced52618 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlist/fwd.ma @@ -0,0 +1,70 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/tlist/props.ma". + +fact tslt_wf__q_ind: + \forall (P: ((TList \to Prop))).(((\forall (n: nat).((\lambda (P0: ((TList +\to Prop))).(\lambda (n0: nat).(\forall (ts: TList).((eq nat (tslen ts) n0) +\to (P0 ts))))) P n))) \to (\forall (ts: TList).(P ts))) +\def + let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: +TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to +Prop))).(\lambda (H: ((\forall (n: nat).(\forall (ts: TList).((eq nat (tslen +ts) n) \to (P ts)))))).(\lambda (ts: TList).(H (tslen ts) ts (refl_equal nat +(tslen ts)))))). + +lemma tslt_wf_ind: + \forall (P: ((TList \to Prop))).(((\forall (ts2: TList).(((\forall (ts1: +TList).((tslt ts1 ts2) \to (P ts1)))) \to (P ts2)))) \to (\forall (ts: +TList).(P ts))) +\def + let Q \def (\lambda (P: ((TList \to Prop))).(\lambda (n: nat).(\forall (ts: +TList).((eq nat (tslen ts) n) \to (P ts))))) in (\lambda (P: ((TList \to +Prop))).(\lambda (H: ((\forall (ts2: TList).(((\forall (ts1: TList).((lt +(tslen ts1) (tslen ts2)) \to (P ts1)))) \to (P ts2))))).(\lambda (ts: +TList).(tslt_wf__q_ind (\lambda (t: TList).(P t)) (\lambda (n: +nat).(lt_wf_ind n (Q (\lambda (t: TList).(P t))) (\lambda (n0: nat).(\lambda +(H0: ((\forall (m: nat).((lt m n0) \to (Q (\lambda (t: TList).(P t)) +m))))).(\lambda (ts0: TList).(\lambda (H1: (eq nat (tslen ts0) n0)).(let H2 +\def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall (m: nat).((lt m n1) \to +(\forall (ts1: TList).((eq nat (tslen ts1) m) \to (P ts1)))))) H0 (tslen ts0) +H1) in (H ts0 (\lambda (ts1: TList).(\lambda (H3: (lt (tslen ts1) (tslen +ts0))).(H2 (tslen ts1) H3 ts1 (refl_equal nat (tslen ts1))))))))))))) ts)))). + +lemma tlist_ind_rev: + \forall (P: ((TList \to Prop))).((P TNil) \to (((\forall (ts: +TList).(\forall (t: T).((P ts) \to (P (TApp ts t)))))) \to (\forall (ts: +TList).(P ts)))) +\def + \lambda (P: ((TList \to Prop))).(\lambda (H: (P TNil)).(\lambda (H0: +((\forall (ts: TList).(\forall (t: T).((P ts) \to (P (TApp ts +t))))))).(\lambda (ts: TList).(tslt_wf_ind (\lambda (t: TList).(P t)) +(\lambda (ts2: TList).(TList_ind (\lambda (t: TList).(((\forall (ts1: +TList).((tslt ts1 t) \to (P ts1)))) \to (P t))) (\lambda (_: ((\forall (ts1: +TList).((tslt ts1 TNil) \to (P ts1))))).H) (\lambda (t: T).(\lambda (t0: +TList).(\lambda (_: ((((\forall (ts1: TList).((tslt ts1 t0) \to (P ts1)))) +\to (P t0)))).(\lambda (H2: ((\forall (ts1: TList).((tslt ts1 (TCons t t0)) +\to (P ts1))))).(let H_x \def (tcons_tapp_ex t0 t) in (let H3 \def H_x in +(ex2_2_ind TList T (\lambda (ts3: TList).(\lambda (t2: T).(eq TList (TCons t +t0) (TApp ts3 t2)))) (\lambda (ts3: TList).(\lambda (_: T).(eq nat (tslen t0) +(tslen ts3)))) (P (TCons t t0)) (\lambda (x0: TList).(\lambda (x1: +T).(\lambda (H4: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H5: (eq nat +(tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t1: TList).(P +t1)) (H0 x0 x1 (H2 x0 (eq_ind nat (tslen t0) (\lambda (n: nat).(lt n (tslen +(TCons t t0)))) (le_n (tslen (TCons t t0))) (tslen x0) H5))) (TCons t t0) +H4))))) H3))))))) ts2)) ts)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/tlist/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlist/props.ma new file mode 100644 index 000000000..b0a0b9908 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlist/props.ma @@ -0,0 +1,64 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/tlist/defs.ma". + +lemma theads_tapp: + \forall (k: K).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).(eq T +(THeads k (TApp vs v) t) (THeads k vs (THead k v t)))))) +\def + \lambda (k: K).(\lambda (v: T).(\lambda (t: T).(\lambda (vs: +TList).(TList_ind (\lambda (t0: TList).(eq T (THeads k (TApp t0 v) t) (THeads +k t0 (THead k v t)))) (refl_equal T (THead k v t)) (\lambda (t0: T).(\lambda +(t1: TList).(\lambda (H: (eq T (THeads k (TApp t1 v) t) (THeads k t1 (THead k +v t)))).(eq_ind T (THeads k (TApp t1 v) t) (\lambda (t2: T).(eq T (THead k t0 +(THeads k (TApp t1 v) t)) (THead k t0 t2))) (refl_equal T (THead k t0 (THeads +k (TApp t1 v) t))) (THeads k t1 (THead k v t)) H)))) vs)))). + +lemma tcons_tapp_ex: + \forall (ts1: TList).(\forall (t1: T).(ex2_2 TList T (\lambda (ts2: +TList).(\lambda (t2: T).(eq TList (TCons t1 ts1) (TApp ts2 t2)))) (\lambda +(ts2: TList).(\lambda (_: T).(eq nat (tslen ts1) (tslen ts2)))))) +\def + \lambda (ts1: TList).(TList_ind (\lambda (t: TList).(\forall (t1: T).(ex2_2 +TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t) (TApp +ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t) (tslen +ts2))))))) (\lambda (t1: T).(ex2_2_intro TList T (\lambda (ts2: +TList).(\lambda (t2: T).(eq TList (TCons t1 TNil) (TApp ts2 t2)))) (\lambda +(ts2: TList).(\lambda (_: T).(eq nat O (tslen ts2)))) TNil t1 (refl_equal +TList (TApp TNil t1)) (refl_equal nat (tslen TNil)))) (\lambda (t: +T).(\lambda (t0: TList).(\lambda (H: ((\forall (t1: T).(ex2_2 TList T +(\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t1 t0) (TApp ts2 +t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) (tslen +ts2)))))))).(\lambda (t1: T).(let H_x \def (H t) in (let H0 \def H_x in +(ex2_2_ind TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons t +t0) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (tslen t0) +(tslen ts2)))) (ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq +TList (TCons t1 (TCons t t0)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda +(_: T).(eq nat (S (tslen t0)) (tslen ts2))))) (\lambda (x0: TList).(\lambda +(x1: T).(\lambda (H1: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H2: (eq +nat (tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t2: +TList).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t3: T).(eq TList (TCons +t1 t2) (TApp ts2 t3)))) (\lambda (ts2: TList).(\lambda (_: T).(eq nat (S +(tslen t0)) (tslen ts2)))))) (eq_ind_r nat (tslen x0) (\lambda (n: +nat).(ex2_2 TList T (\lambda (ts2: TList).(\lambda (t2: T).(eq TList (TCons +t1 (TApp x0 x1)) (TApp ts2 t2)))) (\lambda (ts2: TList).(\lambda (_: T).(eq +nat (S n) (tslen ts2)))))) (ex2_2_intro TList T (\lambda (ts2: +TList).(\lambda (t2: T).(eq TList (TCons t1 (TApp x0 x1)) (TApp ts2 t2)))) +(\lambda (ts2: TList).(\lambda (_: T).(eq nat (S (tslen x0)) (tslen ts2)))) +(TCons t1 x0) x1 (refl_equal TList (TApp (TCons t1 x0) x1)) (refl_equal nat +(tslen (TCons t1 x0)))) (tslen t0) H2) (TCons t t0) H1))))) H0))))))) ts1). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/tlt/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlt/defs.ma new file mode 100644 index 000000000..d40e8fd36 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlt/defs.ma @@ -0,0 +1,43 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/defs.ma". + +definition wadd: + ((nat \to nat)) \to (nat \to (nat \to nat)) +\def + \lambda (f: ((nat \to nat))).(\lambda (w: nat).(\lambda (n: nat).(match n +with [O \Rightarrow w | (S m) \Rightarrow (f m)]))). + +rec definition weight_map (f: (nat \to nat)) (t: T) on t: nat \def match t +with [(TSort _) \Rightarrow O | (TLRef n) \Rightarrow (f n) | (THead k u t0) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow (S (plus (weight_map f u) (weight_map (wadd f (S (weight_map f +u))) t0))) | Abst \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f +O) t0))) | Void \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f O) +t0)))]) | (Flat _) \Rightarrow (S (plus (weight_map f u) (weight_map f +t0)))])]. + +definition weight: + T \to nat +\def + weight_map (\lambda (_: nat).O). + +definition tlt: + T \to (T \to Prop) +\def + \lambda (t1: T).(\lambda (t2: T).(lt (weight t1) (weight t2))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/tlt/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlt/fwd.ma new file mode 100644 index 000000000..06c790ae7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlt/fwd.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/tlt/defs.ma". + +fact tlt_wf__q_ind: + \forall (P: ((T \to Prop))).(((\forall (n: nat).((\lambda (P0: ((T \to +Prop))).(\lambda (n0: nat).(\forall (t: T).((eq nat (weight t) n0) \to (P0 +t))))) P n))) \to (\forall (t: T).(P t))) +\def + let Q \def (\lambda (P: ((T \to Prop))).(\lambda (n: nat).(\forall (t: +T).((eq nat (weight t) n) \to (P t))))) in (\lambda (P: ((T \to +Prop))).(\lambda (H: ((\forall (n: nat).(\forall (t: T).((eq nat (weight t) +n) \to (P t)))))).(\lambda (t: T).(H (weight t) t (refl_equal nat (weight +t)))))). + +lemma tlt_wf_ind: + \forall (P: ((T \to Prop))).(((\forall (t: T).(((\forall (v: T).((tlt v t) +\to (P v)))) \to (P t)))) \to (\forall (t: T).(P t))) +\def + let Q \def (\lambda (P: ((T \to Prop))).(\lambda (n: nat).(\forall (t: +T).((eq nat (weight t) n) \to (P t))))) in (\lambda (P: ((T \to +Prop))).(\lambda (H: ((\forall (t: T).(((\forall (v: T).((lt (weight v) +(weight t)) \to (P v)))) \to (P t))))).(\lambda (t: T).(tlt_wf__q_ind +(\lambda (t0: T).(P t0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (t0: +T).(P t0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) +\to (Q (\lambda (t0: T).(P t0)) m))))).(\lambda (t0: T).(\lambda (H1: (eq nat +(weight t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall +(m: nat).((lt m n1) \to (\forall (t1: T).((eq nat (weight t1) m) \to (P +t1)))))) H0 (weight t0) H1) in (H t0 (\lambda (v: T).(\lambda (H3: (lt +(weight v) (weight t0))).(H2 (weight v) H3 v (refl_equal nat (weight +v))))))))))))) t)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/tlt/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/tlt/props.ma new file mode 100644 index 000000000..bb9621f0f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/tlt/props.ma @@ -0,0 +1,238 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/T/fwd.ma". + +include "basic_1A/tlt/defs.ma". + +lemma wadd_le: + \forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: +nat).(le (f n) (g n)))) \to (\forall (v: nat).(\forall (w: nat).((le v w) \to +(\forall (n: nat).(le (wadd f v n) (wadd g w n)))))))) +\def + \lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: +((\forall (n: nat).(le (f n) (g n))))).(\lambda (v: nat).(\lambda (w: +nat).(\lambda (H0: (le v w)).(\lambda (n: nat).(nat_ind (\lambda (n0: +nat).(le (wadd f v n0) (wadd g w n0))) H0 (\lambda (n0: nat).(\lambda (_: (le +(wadd f v n0) (wadd g w n0))).(H n0))) n))))))). + +lemma wadd_lt: + \forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: +nat).(le (f n) (g n)))) \to (\forall (v: nat).(\forall (w: nat).((lt v w) \to +(\forall (n: nat).(le (wadd f v n) (wadd g w n)))))))) +\def + \lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: +((\forall (n: nat).(le (f n) (g n))))).(\lambda (v: nat).(\lambda (w: +nat).(\lambda (H0: (lt v w)).(\lambda (n: nat).(nat_ind (\lambda (n0: +nat).(le (wadd f v n0) (wadd g w n0))) (le_S_n v w (le_S_n (S v) (S w) (le_S +(S (S v)) (S w) (le_n_S (S v) w H0)))) (\lambda (n0: nat).(\lambda (_: (le +(wadd f v n0) (wadd g w n0))).(H n0))) n))))))). + +lemma wadd_O: + \forall (n: nat).(eq nat (wadd (\lambda (_: nat).O) O n) O) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat (wadd (\lambda (_: +nat).O) O n0) O)) (refl_equal nat O) (\lambda (n0: nat).(\lambda (_: (eq nat +(wadd (\lambda (_: nat).O) O n0) O)).(refl_equal nat O))) n). + +lemma weight_le: + \forall (t: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t) +(weight_map g t))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) +\to (le (weight_map f t0) (weight_map g t0)))))) (\lambda (n: nat).(\lambda +(f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall +(n0: nat).(le (f n0) (g n0))))).(le_O_n (weight_map g (TSort n))))))) +(\lambda (n: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H: ((\forall (n0: nat).(le (f n0) (g n0))))).(H n))))) +(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t0: T).(((\forall (f: ((nat +\to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g +n)))) \to (le (weight_map f t0) (weight_map g t0)))))) \to (\forall (t1: +T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1)))))) +\to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(n: nat).(le (f n) (g n)))) \to (le (weight_map f (THead k0 t0 t1)) +(weight_map g (THead k0 t0 t1))))))))))) (\lambda (b: B).(B_ind (\lambda (b0: +B).(\forall (t0: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) +(weight_map g t0)))))) \to (\forall (t1: T).(((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) +\to (le (weight_map f t1) (weight_map g t1)))))) \to (\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) +\to (le (match b0 with [Abbr \Rightarrow (S (plus (weight_map f t0) +(weight_map (wadd f (S (weight_map f t0))) t1))) | Abst \Rightarrow (S (plus +(weight_map f t0) (weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus +(weight_map f t0) (weight_map (wadd f O) t1)))]) (match b0 with [Abbr +\Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g (S (weight_map g +t0))) t1))) | Abst \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g +O) t1))) | Void \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g O) +t1)))])))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) +\to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda +(H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g +t1))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H1: ((\forall (n: nat).(le (f n) (g n))))).(le_n_S (plus +(weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1)) (plus +(weight_map g t0) (weight_map (wadd g (S (weight_map g t0))) t1)) +(le_plus_plus (weight_map f t0) (weight_map g t0) (weight_map (wadd f (S +(weight_map f t0))) t1) (weight_map (wadd g (S (weight_map g t0))) t1) (H f g +H1) (H0 (wadd f (S (weight_map f t0))) (wadd g (S (weight_map g t0))) +(\lambda (n: nat).(wadd_le f g H1 (S (weight_map f t0)) (S (weight_map g t0)) +(le_n_S (weight_map f t0) (weight_map g t0) (H f g H1)) n)))))))))))) +(\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: +((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f +t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) +(g n)))) \to (le (weight_map f t1) (weight_map g t1))))))).(\lambda (f: ((nat +\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (n: nat).(le +(f n) (g n))))).(le_n_S (plus (weight_map f t0) (weight_map (wadd f O) t1)) +(plus (weight_map g t0) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map +f t0) (weight_map g t0) (weight_map (wadd f O) t1) (weight_map (wadd g O) t1) +(H f g H1) (H0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g H1 O O +(le_O_n O) n)))))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat +\to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g +n)))) \to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: +T).(\lambda (H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) +(weight_map g t1))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H1: ((\forall (n: nat).(le (f n) (g n))))).(le_n_S (plus +(weight_map f t0) (weight_map (wadd f O) t1)) (plus (weight_map g t0) +(weight_map (wadd g O) t1)) (le_plus_plus (weight_map f t0) (weight_map g t0) +(weight_map (wadd f O) t1) (weight_map (wadd g O) t1) (H f g H1) (H0 (wadd f +O) (wadd g O) (\lambda (n: nat).(wadd_le f g H1 O O (le_O_n O) n)))))))))))) +b)) (\lambda (_: F).(\lambda (t0: T).(\lambda (H: ((\forall (f0: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f0 n) (g n)))) +\to (le (weight_map f0 t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda +(H0: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(n: nat).(le (f0 n) (g n)))) \to (le (weight_map f0 t1) (weight_map g +t1))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H1: ((\forall (n: nat).(le (f0 n) (g n))))).(le_n_S (plus +(weight_map f0 t0) (weight_map f0 t1)) (plus (weight_map g t0) (weight_map g +t1)) (le_plus_plus (weight_map f0 t0) (weight_map g t0) (weight_map f0 t1) +(weight_map g t1) (H f0 g H1) (H0 f0 g H1))))))))))) k)) t). + +lemma weight_eq: + \forall (t: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (n: nat).(eq nat (f n) (g n)))) \to (eq nat (weight_map f +t) (weight_map g t))))) +\def + \lambda (t: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H: ((\forall (n: nat).(eq nat (f n) (g n))))).(le_antisym +(weight_map f t) (weight_map g t) (weight_le t f g (\lambda (n: +nat).(eq_ind_r nat (g n) (\lambda (n0: nat).(le n0 (g n))) (le_n (g n)) (f n) +(H n)))) (weight_le t g f (\lambda (n: nat).(eq_ind_r nat (g n) (\lambda (n0: +nat).(le (g n) n0)) (le_n (g n)) (f n) (H n)))))))). + +lemma weight_add_O: + \forall (t: T).(eq nat (weight_map (wadd (\lambda (_: nat).O) O) t) +(weight_map (\lambda (_: nat).O) t)) +\def + \lambda (t: T).(weight_eq t (wadd (\lambda (_: nat).O) O) (\lambda (_: +nat).O) (\lambda (n: nat).(wadd_O n))). + +lemma weight_add_S: + \forall (t: T).(\forall (m: nat).(le (weight_map (wadd (\lambda (_: nat).O) +O) t) (weight_map (wadd (\lambda (_: nat).O) (S m)) t))) +\def + \lambda (t: T).(\lambda (m: nat).(weight_le t (wadd (\lambda (_: nat).O) O) +(wadd (\lambda (_: nat).O) (S m)) (\lambda (n: nat).(wadd_le (\lambda (_: +nat).O) (\lambda (_: nat).O) (\lambda (_: nat).(le_O_n O)) O (S m) (le_O_n (S +m)) n)))). + +theorem tlt_trans: + \forall (v: T).(\forall (u: T).(\forall (t: T).((tlt u v) \to ((tlt v t) \to +(tlt u t))))) +\def + \lambda (v: T).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (lt (weight u) +(weight v))).(\lambda (H0: (lt (weight v) (weight t))).(lt_trans (weight u) +(weight v) (weight t) H H0))))). + +lemma tlt_head_sx: + \forall (k: K).(\forall (u: T).(\forall (t: T).(tlt u (THead k u t)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (t: T).(lt +(weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) (THead +k0 u t)))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (u: T).(\forall +(t: T).(lt (weight_map (\lambda (_: nat).O) u) (match b0 with [Abbr +\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd +(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) | Abst +\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd +(\lambda (_: nat).O) O) t))) | Void \Rightarrow (S (plus (weight_map (\lambda +(_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)))]))))) (\lambda +(u: T).(\lambda (t: T).(le_n_S (weight_map (\lambda (_: nat).O) u) (plus +(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S +(weight_map (\lambda (_: nat).O) u))) t)) (le_plus_l (weight_map (\lambda (_: +nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: +nat).O) u))) t))))) (\lambda (u: T).(\lambda (t: T).(le_n_S (weight_map +(\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) (weight_map +(wadd (\lambda (_: nat).O) O) t)) (le_plus_l (weight_map (\lambda (_: nat).O) +u) (weight_map (wadd (\lambda (_: nat).O) O) t))))) (\lambda (u: T).(\lambda +(t: T).(le_n_S (weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda +(_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)) (le_plus_l +(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) +t))))) b)) (\lambda (_: F).(\lambda (u: T).(\lambda (t: T).(le_n_S +(weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) +(weight_map (\lambda (_: nat).O) t)) (le_plus_l (weight_map (\lambda (_: +nat).O) u) (weight_map (\lambda (_: nat).O) t)))))) k). + +lemma tlt_head_dx: + \forall (k: K).(\forall (u: T).(\forall (t: T).(tlt t (THead k u t)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (t: T).(lt +(weight_map (\lambda (_: nat).O) t) (weight_map (\lambda (_: nat).O) (THead +k0 u t)))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (u: T).(\forall +(t: T).(lt (weight_map (\lambda (_: nat).O) t) (match b0 with [Abbr +\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd +(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) | Abst +\Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd +(\lambda (_: nat).O) O) t))) | Void \Rightarrow (S (plus (weight_map (\lambda +(_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)))]))))) (\lambda +(u: T).(\lambda (t: T).(lt_le_trans (weight_map (\lambda (_: nat).O) t) (S +(weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: +nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: +nat).O) u))) t))) (lt_n_Sn (weight_map (\lambda (_: nat).O) t)) (le_n_S +(weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) +(weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) +u))) t)) (le_trans (weight_map (\lambda (_: nat).O) t) (weight_map (wadd +(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t) (plus +(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S +(weight_map (\lambda (_: nat).O) u))) t)) (eq_ind nat (weight_map (wadd +(\lambda (_: nat).O) O) t) (\lambda (n: nat).(le n (weight_map (wadd (\lambda +(_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) (weight_add_S t +(weight_map (\lambda (_: nat).O) u)) (weight_map (\lambda (_: nat).O) t) +(weight_add_O t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map +(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))))))) +(\lambda (u: T).(\lambda (t: T).(eq_ind_r nat (weight_map (\lambda (_: +nat).O) t) (\lambda (n: nat).(lt (weight_map (\lambda (_: nat).O) t) (S (plus +(weight_map (\lambda (_: nat).O) u) n)))) (le_n_S (weight_map (\lambda (_: +nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: +nat).O) t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map +(\lambda (_: nat).O) t))) (weight_map (wadd (\lambda (_: nat).O) O) t) +(weight_add_O t)))) (\lambda (u: T).(\lambda (t: T).(eq_ind_r nat (weight_map +(\lambda (_: nat).O) t) (\lambda (n: nat).(lt (weight_map (\lambda (_: +nat).O) t) (S (plus (weight_map (\lambda (_: nat).O) u) n)))) (le_n_S +(weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) +(weight_map (\lambda (_: nat).O) t)) (le_plus_r (weight_map (\lambda (_: +nat).O) u) (weight_map (\lambda (_: nat).O) t))) (weight_map (wadd (\lambda +(_: nat).O) O) t) (weight_add_O t)))) b)) (\lambda (_: F).(\lambda (u: +T).(\lambda (t: T).(le_n_S (weight_map (\lambda (_: nat).O) t) (plus +(weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)) +(le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: +nat).O) t)))))) k). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity.ma new file mode 100644 index 000000000..116241de8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity.ma @@ -0,0 +1,182 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/pr3_props.ma". + +include "basic_1A/arity/pr3.ma". + +include "basic_1A/asucc/fwd.ma". + +lemma ty3_arity: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c +t1 t2) \to (ex2 A (\lambda (a1: A).(arity g c t1 a1)) (\lambda (a1: A).(arity +g c t2 (asucc g a1)))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda +(t0: T).(ex2 A (\lambda (a1: A).(arity g c0 t a1)) (\lambda (a1: A).(arity g +c0 t0 (asucc g a1))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity +g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (u: +T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: (ex2 A +(\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g +a1))))).(\lambda (H4: (pc3 c0 t4 t3)).(let H5 \def H1 in (ex2_ind A (\lambda +(a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))) +(ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 +(asucc g a1)))) (\lambda (x: A).(\lambda (H6: (arity g c0 t3 x)).(\lambda (_: +(arity g c0 t (asucc g x))).(let H8 \def H3 in (ex2_ind A (\lambda (a1: +A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A +(\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g +a1)))) (\lambda (x0: A).(\lambda (H9: (arity g c0 u x0)).(\lambda (H10: +(arity g c0 t4 (asucc g x0))).(let H11 \def H4 in (ex2_ind T (\lambda (t0: +T).(pr3 c0 t4 t0)) (\lambda (t0: T).(pr3 c0 t3 t0)) (ex2 A (\lambda (a1: +A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) +(\lambda (x1: T).(\lambda (H12: (pr3 c0 t4 x1)).(\lambda (H13: (pr3 c0 t3 +x1)).(ex_intro2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity +g c0 t3 (asucc g a1))) x0 H9 (arity_repl g c0 t3 x H6 (asucc g x0) (leq_sym g +(asucc g x0) x (arity_mono g c0 x1 (asucc g x0) (arity_sred_pr3 c0 t4 x1 H12 +g (asucc g x0) H10) x (arity_sred_pr3 c0 t3 x1 H13 g x H6)))))))) H11))))) +H8))))) H5)))))))))))) (\lambda (c0: C).(\lambda (m: nat).(ex_intro2 A +(\lambda (a1: A).(arity g c0 (TSort m) a1)) (\lambda (a1: A).(arity g c0 +(TSort (next g m)) (asucc g a1))) (ASort O m) (arity_sort g c0 m) (arity_sort +g c0 (next g m))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) +u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A +(\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g +a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) +(\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g +c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g +a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (H5: (arity g +d t (asucc g x))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) +(\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g a1))) x (arity_abbr g +c0 d u n H0 x H4) (arity_lift g d t (asucc g x) H5 c0 (S n) O (getl_drop Abbr +c0 d u n H0)))))) H3)))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda +(d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) +u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A +(\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g +a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) +(\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g +c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g +a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (_: (arity g d +t (asucc g x))).(let H_x \def (leq_asucc g x) in (let H6 \def H_x in (ex_ind +A (\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g +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_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 (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)) +(\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity +g c0 (THead (Flat Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat +Cast) t0 t4) (asucc g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 t3 +x)).(\lambda (H6: (arity g c0 t4 (asucc g x))).(let H7 \def H3 in (ex2_ind A +(\lambda (a1: A).(arity g c0 t4 a1)) (\lambda (a1: A).(arity g c0 t0 (asucc g +a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t4 t3) a1)) +(\lambda (a1: A).(arity g c0 (THead (Flat Cast) t0 t4) (asucc g a1)))) +(\lambda (x0: A).(\lambda (H8: (arity g c0 t4 x0)).(\lambda (H9: (arity g c0 +t0 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Flat +Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t0 t4) +(asucc g a1))) x (arity_cast g c0 t4 x H6 t3 H5) (arity_cast g c0 t0 (asucc g +x) (arity_repl g c0 t0 (asucc g x0) H9 (asucc g (asucc g x)) (asucc_repl g x0 +(asucc g x) (arity_mono g c0 t4 x0 H8 (asucc g x) H6))) t4 H6))))) H7))))) +H4)))))))))) c t1 t2 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity_props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity_props.ma new file mode 100644 index 000000000..846d98c25 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/arity_props.ma @@ -0,0 +1,105 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/arity.ma". + +include "basic_1A/sc3/arity.ma". + +lemma ty3_predicative: + \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (u: +T).((ty3 g c (THead (Bind Abst) v t) u) \to ((pc3 c u v) \to (\forall (P: +Prop).P))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (u: +T).(\lambda (H: (ty3 g c (THead (Bind Abst) v t) u)).(\lambda (H0: (pc3 c u +v)).(\lambda (P: Prop).(let H1 \def H in (ex3_2_ind T T (\lambda (t2: +T).(\lambda (_: T).(pc3 c (THead (Bind Abst) v t2) u))) (\lambda (_: +T).(\lambda (t0: T).(ty3 g c v t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) v) t t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda +(_: (pc3 c (THead (Bind Abst) v x0) u)).(\lambda (H3: (ty3 g c v +x1)).(\lambda (_: (ty3 g (CHead c (Bind Abst) v) t x0)).(let H_y \def +(ty3_conv g c v x1 H3 (THead (Bind Abst) v t) u H H0) in (let H_x \def +(ty3_arity g c (THead (Bind Abst) v t) v H_y) in (let H5 \def H_x in (ex2_ind +A (\lambda (a1: A).(arity g c (THead (Bind Abst) v t) a1)) (\lambda (a1: +A).(arity g c v (asucc g a1))) P (\lambda (x: A).(\lambda (H6: (arity g c +(THead (Bind Abst) v t) x)).(\lambda (H7: (arity g c v (asucc g x))).(let H8 +\def (arity_gen_abst g c v t x H6) in (ex3_2_ind A A (\lambda (a1: +A).(\lambda (a2: A).(eq A x (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: +A).(arity g c v (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g +(CHead c (Bind Abst) v) t a2))) P (\lambda (x2: A).(\lambda (x3: A).(\lambda +(H9: (eq A x (AHead x2 x3))).(\lambda (H10: (arity g c v (asucc g +x2))).(\lambda (_: (arity g (CHead c (Bind Abst) v) t x3)).(let H12 \def +(eq_ind A x (\lambda (a: A).(arity g c v (asucc g a))) H7 (AHead x2 x3) H9) +in (leq_ahead_asucc_false g x2 (asucc g x3) (arity_mono g c v (asucc g (AHead +x2 x3)) H12 (asucc g x2) H10) P))))))) H8))))) H5))))))))) (ty3_gen_bind g +Abst c v t u H1)))))))))). + +theorem ty3_repellent: + \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (t: T).(\forall (u1: +T).((ty3 g c (THead (Bind Abst) w t) u1) \to (\forall (u2: T).((ty3 g (CHead +c (Bind Abst) w) t (lift (S O) O u2)) \to ((pc3 c u1 u2) \to (\forall (P: +Prop).P))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (t: T).(\lambda (u1: +T).(\lambda (H: (ty3 g c (THead (Bind Abst) w t) u1)).(\lambda (u2: +T).(\lambda (H0: (ty3 g (CHead c (Bind Abst) w) t (lift (S O) O +u2))).(\lambda (H1: (pc3 c u1 u2)).(\lambda (P: Prop).(ex_ind T (\lambda (t0: +T).(ty3 g (CHead c (Bind Abst) w) (lift (S O) O u2) t0)) P (\lambda (x: +T).(\lambda (H2: (ty3 g (CHead c (Bind Abst) w) (lift (S O) O u2) x)).(let H3 +\def (ty3_gen_lift g (CHead c (Bind Abst) w) u2 x (S O) O H2 c (drop_drop +(Bind Abst) O c c (drop_refl c) w)) in (ex2_ind T (\lambda (t2: T).(pc3 +(CHead c (Bind Abst) w) (lift (S O) O t2) x)) (\lambda (t2: T).(ty3 g c u2 +t2)) P (\lambda (x0: T).(\lambda (_: (pc3 (CHead c (Bind Abst) w) (lift (S O) +O x0) x)).(\lambda (H5: (ty3 g c u2 x0)).(let H_y \def (ty3_conv g c u2 x0 H5 +(THead (Bind Abst) w t) u1 H H1) in (let H_x \def (ty3_arity g (CHead c (Bind +Abst) w) t (lift (S O) O u2) H0) in (let H6 \def H_x in (ex2_ind A (\lambda +(a1: A).(arity g (CHead c (Bind Abst) w) t a1)) (\lambda (a1: A).(arity g +(CHead c (Bind Abst) w) (lift (S O) O u2) (asucc g a1))) P (\lambda (x1: +A).(\lambda (H7: (arity g (CHead c (Bind Abst) w) t x1)).(\lambda (H8: (arity +g (CHead c (Bind Abst) w) (lift (S O) O u2) (asucc g x1))).(let H_x0 \def +(ty3_arity g c (THead (Bind Abst) w t) u2 H_y) in (let H9 \def H_x0 in +(ex2_ind A (\lambda (a1: A).(arity g c (THead (Bind Abst) w t) a1)) (\lambda +(a1: A).(arity g c u2 (asucc g a1))) P (\lambda (x2: A).(\lambda (H10: (arity +g c (THead (Bind Abst) w t) x2)).(\lambda (H11: (arity g c u2 (asucc g +x2))).(arity_repellent g c w t x1 H7 x2 H10 (asucc_inj g x1 x2 (arity_mono g +c u2 (asucc g x1) (arity_gen_lift g (CHead c (Bind Abst) w) u2 (asucc g x1) +(S O) O H8 c (drop_drop (Bind Abst) O c c (drop_refl c) w)) (asucc g x2) +H11)) P)))) H9)))))) H6))))))) H3)))) (ty3_correct g (CHead c (Bind Abst) w) +t (lift (S O) O u2) H0))))))))))). + +lemma ty3_acyclic: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t +u) \to ((pc3 c u t) \to (\forall (P: Prop).P)))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: +(ty3 g c t u)).(\lambda (H0: (pc3 c u t)).(\lambda (P: Prop).(let H_y \def +(ty3_conv g c t u H t u H H0) in (let H_x \def (ty3_arity g c t t H_y) in +(let H1 \def H_x in (ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda +(a1: A).(arity g c t (asucc g a1))) P (\lambda (x: A).(\lambda (H2: (arity g +c t x)).(\lambda (H3: (arity g c t (asucc g x))).(leq_asucc_false g x +(arity_mono g c t (asucc g x) H3 x H2) P)))) H1)))))))))). + +lemma ty3_sn3: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t +u) \to (sn3 c t))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: +(ty3 g c t u)).(let H_x \def (ty3_arity g c t u H) in (let H0 \def H_x in +(ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda (a1: A).(arity g c u +(asucc g a1))) (sn3 c t) (\lambda (x: A).(\lambda (H1: (arity g c t +x)).(\lambda (_: (arity g c u (asucc g x))).(sc3_sn3 g x c t (sc3_arity g c t +x H1))))) H0))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/dec.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/dec.ma new file mode 100644 index 000000000..8a4f655ff --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/dec.ma @@ -0,0 +1,431 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pc3/dec.ma". + +include "basic_1A/getl/flt.ma". + +include "basic_1A/getl/dec.ma". + +include "basic_1A/flt/fwd.ma". + +lemma ty3_inference: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(or (ex T (\lambda (t2: +T).(ty3 g c t1 t2))) (\forall (t2: T).((ty3 g c t1 t2) \to False))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(flt_wf_ind (\lambda (c0: +C).(\lambda (t: T).(or (ex T (\lambda (t2: T).(ty3 g c0 t t2))) (\forall (t2: +T).((ty3 g c0 t t2) \to False))))) (\lambda (c2: C).(\lambda (t2: T).(T_ind +(\lambda (t: T).(((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 t) \to (or +(ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) +\to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall +(t3: T).((ty3 g c2 t t3) \to False))))) (\lambda (n: nat).(\lambda (_: +((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (TSort n)) \to (or (ex T +(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to +False)))))))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TSort n) t3))) +(\forall (t3: T).((ty3 g c2 (TSort n) t3) \to False)) (ex_intro T (\lambda +(t3: T).(ty3 g c2 (TSort n) t3)) (TSort (next g n)) (ty3_sort g c2 n))))) +(\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 +c2 (TLRef n)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: +T).((ty3 g c1 t3 t4) \to False)))))))).(let H_x \def (getl_dec c2 n) in (let +H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda +(v: T).(getl n c2 (CHead e (Bind b) v)))))) (\forall (d: C).((getl n c2 d) +\to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) +t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False))) (\lambda (H1: +(ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead +e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda +(v: T).(getl n c2 (CHead e (Bind b) v))))) (or (ex T (\lambda (t3: T).(ty3 g +c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False))) +(\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl n c2 +(CHead x0 (Bind x1) x2))).(let H3 \def (H x0 x2 (getl_flt x1 c2 x0 x2 n H2)) +in (or_ind (ex T (\lambda (t3: T).(ty3 g x0 x2 t3))) (\forall (t3: T).((ty3 g +x0 x2 t3) \to False)) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) +(\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False))) (\lambda (H4: (ex T +(\lambda (t3: T).(ty3 g x0 x2 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g x0 x2 +t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: +T).((ty3 g c2 (TLRef n) t3) \to False))) (\lambda (x: T).(\lambda (H5: (ty3 g +x0 x2 x)).(B_ind (\lambda (b: B).((getl n c2 (CHead x0 (Bind b) x2)) \to (or +(ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 +(TLRef n) t3) \to False))))) (\lambda (H6: (getl n c2 (CHead x0 (Bind Abbr) +x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall +(t3: T).((ty3 g c2 (TLRef n) t3) \to False)) (ex_intro T (\lambda (t3: +T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x) (ty3_abbr g n c2 x0 x2 H6 x +H5)))) (\lambda (H6: (getl n c2 (CHead x0 (Bind Abst) x2))).(or_introl (ex T +(\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef +n) t3) \to False)) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) +(lift (S n) O x2) (ty3_abst g n c2 x0 x2 H6 x H5)))) (\lambda (H6: (getl n c2 +(CHead x0 (Bind Void) x2))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 +(TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False)) +(\lambda (t3: T).(\lambda (H7: (ty3 g c2 (TLRef n) t3)).(or_ind (ex3_3 C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) +t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 +(lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: +T).(ty3 g e u t))))) False (\lambda (H8: (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind +C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O +t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t)))) False (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: +(pc3 c2 (lift (S n) O x5) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind +Abbr) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 +(Bind Void) x2) (\lambda (c0: C).(getl n c2 c0)) H6 (CHead x3 (Bind Abbr) x4) +(getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) +in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match +ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k +with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst +\Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) +I (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 +(CHead x3 (Bind Abbr) x4) H10)) in (False_ind False H13))))))))) H8)) +(\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) False +(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift +(S n) O x4) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abst) +x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind +Void) x2) (\lambda (c0: C).(getl n c2 c0)) H6 (CHead x3 (Bind Abst) x4) +(getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) +in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match +ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k +with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | Abst +\Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) +I (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 +(CHead x3 (Bind Abst) x4) H10)) in (False_ind False H13))))))))) H8)) +(ty3_gen_lref g c2 t3 n H7)))))) x1 H2))) H4)) (\lambda (H4: ((\forall (t3: +T).((ty3 g x0 x2 t3) \to False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g +c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to False)) +(\lambda (t3: T).(\lambda (H5: (ty3 g c2 (TLRef n) t3)).(or_ind (ex3_3 C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) +t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 +(lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: +T).(ty3 g e u t))))) False (\lambda (H6: (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind +C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O +t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t)))) False (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: +(pc3 c2 (lift (S n) O x5) t3)).(\lambda (H8: (getl n c2 (CHead x3 (Bind Abbr) +x4))).(\lambda (H9: (ty3 g x3 x4 x5)).(let H10 \def (eq_ind C (CHead x0 (Bind +x1) x2) (\lambda (c0: C).(getl n c2 c0)) H2 (CHead x3 (Bind Abbr) x4) +(getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in +(let H11 \def (f_equal C C (\lambda (e: C).(match e with [(CSort _) +\Rightarrow x0 | (CHead c0 _ _) \Rightarrow c0])) (CHead x0 (Bind x1) x2) +(CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead +x3 (Bind Abbr) x4) H8)) in ((let H12 \def (f_equal C B (\lambda (e: C).(match +e with [(CSort _) \Rightarrow x1 | (CHead _ k _) \Rightarrow (match k with +[(Bind b) \Rightarrow b | (Flat _) \Rightarrow x1])])) (CHead x0 (Bind x1) +x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 +(CHead x3 (Bind Abbr) x4) H8)) in ((let H13 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow x2 | (CHead _ _ t) \Rightarrow t])) +(CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 +(Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in (\lambda (_: (eq B x1 +Abbr)).(\lambda (H15: (eq C x0 x3)).(let H16 \def (eq_ind_r T x4 (\lambda (t: +T).(getl n c2 (CHead x3 (Bind Abbr) t))) H10 x2 H13) in (let H17 \def +(eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 H13) in (let H18 \def +(eq_ind_r C x3 (\lambda (c0: C).(getl n c2 (CHead c0 (Bind Abbr) x2))) H16 x0 +H15) in (let H19 \def (eq_ind_r C x3 (\lambda (c0: C).(ty3 g c0 x2 x5)) H17 +x0 H15) in (H4 x5 H19)))))))) H12)) H11))))))))) H6)) (\lambda (H6: (ex3_3 C +T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) +t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e +(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 +c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: +T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(ty3 g e u t)))) False (\lambda (x3: C).(\lambda (x4: +T).(\lambda (x5: T).(\lambda (H7: (pc3 c2 (lift (S n) O x4) t3)).(\lambda +(H8: (getl n c2 (CHead x3 (Bind Abst) x4))).(\lambda (H9: (ty3 g x3 x4 +x5)).(let H10 \def (eq_ind C (CHead x0 (Bind x1) x2) (\lambda (c0: C).(getl n +c2 c0)) H2 (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n +H2 (CHead x3 (Bind Abst) x4) H8)) in (let H11 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow x0 | (CHead c0 _ _) \Rightarrow c0])) +(CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 +(Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H12 \def (f_equal +C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow x1 | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +x1])])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 +(CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H13 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow x2 | (CHead +_ _ t) \Rightarrow t])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) +(getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in +(\lambda (_: (eq B x1 Abst)).(\lambda (H15: (eq C x0 x3)).(let H16 \def +(eq_ind_r T x4 (\lambda (t: T).(getl n c2 (CHead x3 (Bind Abst) t))) H10 x2 +H13) in (let H17 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 +H13) in (let H18 \def (eq_ind_r T x4 (\lambda (t: T).(pc3 c2 (lift (S n) O t) +t3)) H7 x2 H13) in (let H19 \def (eq_ind_r C x3 (\lambda (c0: C).(getl n c2 +(CHead c0 (Bind Abst) x2))) H16 x0 H15) in (let H20 \def (eq_ind_r C x3 +(\lambda (c0: C).(ty3 g c0 x2 x5)) H17 x0 H15) in (H4 x5 H20))))))))) H12)) +H11))))))))) H6)) (ty3_gen_lref g c2 t3 n H5)))))) H3)))))) H1)) (\lambda +(H1: ((\forall (d: C).((getl n c2 d) \to (\forall (P: Prop).P))))).(or_intror +(ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 +(TLRef n) t3) \to False)) (\lambda (t3: T).(\lambda (H2: (ty3 g c2 (TLRef n) +t3)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: +T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) False +(\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: +T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) False +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (lift +(S n) O x2) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abbr) +x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abbr) x1) H5 +False))))))) H3)) (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda +(u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T +(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) +t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e +(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t)))) False (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: +(pc3 c2 (lift (S n) O x1) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abst) +x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abst) x1) H5 +False))))))) H3)) (ty3_gen_lref g c2 t3 n H2)))))) H0))))) (\lambda (k: +K).(\lambda (t: T).(\lambda (_: ((((\forall (c1: C).(\forall (t3: T).((flt c1 +t3 c2 t) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: +T).((ty3 g c1 t3 t4) \to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g +c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to False)))))).(\lambda (t0: +T).(\lambda (_: ((((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 t0) \to +(or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 +t4) \to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) +(\forall (t3: T).((ty3 g c2 t0 t3) \to False)))))).(\lambda (H1: ((\forall +(c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead k t t0)) \to (or (ex T +(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to +False)))))))).(K_ind (\lambda (k0: K).(((\forall (c1: C).(\forall (t3: +T).((flt c1 t3 c2 (THead k0 t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 +t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False))))))) \to (or (ex T +(\lambda (t3: T).(ty3 g c2 (THead k0 t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead k0 t t0) t3) \to False))))) (\lambda (b: B).(\lambda (H2: ((\forall +(c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Bind b) t t0)) \to (or (ex T +(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to +False)))))))).(let H3 \def (H2 c2 t (flt_thead_sx (Bind b) c2 t t0)) in +(or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 +t t3) \to False)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) +t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to False))) +(\lambda (H4: (ex T (\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda +(t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) +t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to +False))) (\lambda (x: T).(\lambda (H5: (ty3 g c2 t x)).(let H6 \def (H2 +(CHead c2 (Bind b) t) t0 (flt_shift (Bind b) c2 t t0)) in (or_ind (ex T +(\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3))) (\forall (t3: T).((ty3 +g (CHead c2 (Bind b) t) t0 t3) \to False)) (or (ex T (\lambda (t3: T).(ty3 g +c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t +t0) t3) \to False))) (\lambda (H7: (ex T (\lambda (t3: T).(ty3 g (CHead c2 +(Bind b) t) t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) +t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) +(\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to False))) (\lambda +(x0: T).(\lambda (H8: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(or_introl (ex T +(\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 +g c2 (THead (Bind b) t t0) t3) \to False)) (ex_intro T (\lambda (t3: T).(ty3 +g c2 (THead (Bind b) t t0) t3)) (THead (Bind b) t x0) (ty3_bind g c2 t x H5 b +t0 x0 H8))))) H7)) (\lambda (H7: ((\forall (t3: T).((ty3 g (CHead c2 (Bind b) +t) t0 t3) \to False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead +(Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) +\to False)) (\lambda (t3: T).(\lambda (H8: (ty3 g c2 (THead (Bind b) t t0) +t3)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) +t t4) t3))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c2 t t5))) (\lambda (t4: +T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4))) False (\lambda (x0: +T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda +(_: (ty3 g c2 t x1)).(\lambda (H11: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(H7 +x0 H11)))))) (ty3_gen_bind g b c2 t t0 t3 H8)))))) H6)))) H4)) (\lambda (H4: +((\forall (t3: T).((ty3 g c2 t t3) \to False)))).(or_intror (ex T (\lambda +(t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Bind b) t t0) t3) \to False)) (\lambda (t3: T).(\lambda (H5: (ty3 g +c2 (THead (Bind b) t t0) t3)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: +T).(pc3 c2 (THead (Bind b) t t4) t3))) (\lambda (_: T).(\lambda (t5: T).(ty3 +g c2 t t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 +t4))) False (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead +(Bind b) t x0) t3)).(\lambda (H7: (ty3 g c2 t x1)).(\lambda (_: (ty3 g (CHead +c2 (Bind b) t) t0 x0)).(H4 x1 H7)))))) (ty3_gen_bind g b c2 t t0 t3 H5)))))) +H3)))) (\lambda (f: F).(\lambda (H2: ((\forall (c1: C).(\forall (t3: T).((flt +c1 t3 c2 (THead (Flat f) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 +t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False)))))))).(F_ind (\lambda +(f0: F).(((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Flat f0) t +t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 +g c1 t3 t4) \to False))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead +(Flat f0) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat f0) t t0) t3) +\to False))))) (\lambda (H3: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 +c2 (THead (Flat Appl) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 +t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False)))))))).(let H4 \def (H3 +c2 t (flt_thead_sx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: +T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to False)) (or (ex T +(\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (H5: (ex T +(\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t +t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) +(\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) +(\lambda (x: T).(\lambda (H6: (ty3 g c2 t x)).(let H7 \def (H3 c2 t0 +(flt_thead_dx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g +c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to False)) (or (ex T (\lambda +(t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Flat Appl) t t0) t3) \to False))) (\lambda (H8: (ex T (\lambda (t3: +T).(ty3 g c2 t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T +(\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (x0: +T).(\lambda (H9: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 +t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) +(\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) +(\lambda (x1: T).(\lambda (H10: (ty3 g c2 x0 x1)).(ex_ind T (\lambda (t3: +T).(ty3 g c2 x t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t +t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to +False))) (\lambda (x2: T).(\lambda (H11: (ty3 g c2 x x2)).(let H12 \def +(ty3_sn3 g c2 x x2 H11) in (let H_x \def (nf2_sn3 c2 x H12) in (let H13 \def +H_x in (ex2_ind T (\lambda (u: T).(pr3 c2 x u)) (\lambda (u: T).(nf2 c2 u)) +(or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall +(t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (x3: +T).(\lambda (H14: (pr3 c2 x x3)).(\lambda (H15: (nf2 c2 x3)).(let H16 \def +(ty3_sred_pr3 c2 x x3 H14 g x2 H11) in (let H_x0 \def (pc3_abst_dec g c2 x0 +x1 H10 x3 x2 H16) in (let H17 \def H_x0 in (or_ind (ex4_2 T T (\lambda (u: +T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: +T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: +T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 +v2)))) (\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to False)) (or +(ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False))) (\lambda (H18: (ex4_2 +T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) +(\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) +(\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda +(v2: T).(nf2 c2 v2))))).(ex4_2_ind T T (\lambda (u: T).(\lambda (_: T).(pc3 +c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 +(THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 +v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))) (or (ex T (\lambda (t3: +T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Flat Appl) t t0) t3) \to False))) (\lambda (x4: T).(\lambda (x5: +T).(\lambda (H19: (pc3 c2 x0 (THead (Bind Abst) x3 x4))).(\lambda (H20: (ty3 +g c2 (THead (Bind Abst) x5 x4) x1)).(\lambda (H21: (pr3 c2 x3 x5)).(\lambda +(_: (nf2 c2 x5)).(let H_y \def (nf2_pr3_unfold c2 x3 x5 H21 H15) in (let H23 +\def (eq_ind_r T x5 (\lambda (t3: T).(pr3 c2 x3 t3)) H21 x3 H_y) in (let H24 +\def (eq_ind_r T x5 (\lambda (t3: T).(ty3 g c2 (THead (Bind Abst) t3 x4) x1)) +H20 x3 H_y) in (or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) +t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to +False)) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3)) +(THead (Flat Appl) t (THead (Bind Abst) x3 x4)) (ty3_appl g c2 t x3 (ty3_tred +g c2 t x H6 x3 H14) t0 x4 (ty3_conv g c2 (THead (Bind Abst) x3 x4) x1 H24 t0 +x0 H9 H19))))))))))))) H18)) (\lambda (H18: ((\forall (u: T).((pc3 c2 x0 +(THead (Bind Abst) x3 u)) \to False)))).(or_intror (ex T (\lambda (t3: +T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Flat Appl) t t0) t3) \to False)) (\lambda (t3: T).(\lambda (H19: (ty3 +g c2 (THead (Flat Appl) t t0) t3)).(ex3_2_ind T T (\lambda (u: T).(\lambda +(t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda +(u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: +T).(\lambda (_: T).(ty3 g c2 t u))) False (\lambda (x4: T).(\lambda (x5: +T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x4 x5)) +t3)).(\lambda (H21: (ty3 g c2 t0 (THead (Bind Abst) x4 x5))).(\lambda (H22: +(ty3 g c2 t x4)).(let H_y \def (ty3_unique g c2 t x4 H22 x H6) in (let H_y0 +\def (ty3_unique g c2 t0 (THead (Bind Abst) x4 x5) H21 x0 H9) in (H18 x5 +(pc3_t (THead (Bind Abst) x4 x5) c2 x0 (pc3_s c2 x0 (THead (Bind Abst) x4 x5) +H_y0) (THead (Bind Abst) x3 x5) (pc3_head_1 c2 x4 x3 (pc3_t x c2 x4 H_y x3 +(pc3_pr3_r c2 x x3 H14)) (Bind Abst) x5)))))))))) (ty3_gen_appl g c2 t t0 t3 +H19)))))) H17))))))) H13)))))) (ty3_correct g c2 t x H6)))) (ty3_correct g c2 +t0 x0 H9)))) H8)) (\lambda (H8: ((\forall (t3: T).((ty3 g c2 t0 t3) \to +False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t +t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to +False)) (\lambda (t3: T).(\lambda (H9: (ty3 g c2 (THead (Flat Appl) t t0) +t3)).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat +Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 +g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 +t u))) False (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead +(Flat Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (H11: (ty3 g c2 t0 +(THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c2 t x0)).(H8 (THead (Bind +Abst) x0 x1) H11)))))) (ty3_gen_appl g c2 t t0 t3 H9)))))) H7)))) H5)) +(\lambda (H5: ((\forall (t3: T).((ty3 g c2 t t3) \to False)))).(or_intror (ex +T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to False)) (\lambda (t3: +T).(\lambda (H6: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(ex3_2_ind T T +(\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind +Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind +Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) False +(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t +(THead (Bind Abst) x0 x1)) t3)).(\lambda (_: (ty3 g c2 t0 (THead (Bind Abst) +x0 x1))).(\lambda (H9: (ty3 g c2 t x0)).(H5 x0 H9)))))) (ty3_gen_appl g c2 t +t0 t3 H6)))))) H4))) (\lambda (H3: ((\forall (c1: C).(\forall (t3: T).((flt +c1 t3 c2 (THead (Flat Cast) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 +t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to False)))))))).(let H4 \def +(H3 c2 t (flt_thead_sx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: +T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to False)) (or (ex T +(\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) (\lambda (H5: (ex T +(\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t +t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) +(\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) +(\lambda (x: T).(\lambda (H6: (ty3 g c2 t x)).(let H7 \def (H3 c2 t0 +(flt_thead_dx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g +c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to False)) (or (ex T (\lambda +(t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Flat Cast) t t0) t3) \to False))) (\lambda (H8: (ex T (\lambda (t3: +T).(ty3 g c2 t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T +(\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) (\lambda (x0: +T).(\lambda (H9: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 +t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) +(\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) +(\lambda (x1: T).(\lambda (H10: (ty3 g c2 x0 x1)).(let H_x \def (pc3_dec g c2 +x0 x1 H10 t x H6) in (let H11 \def H_x in (or_ind (pc3 c2 x0 t) ((pc3 c2 x0 +t) \to False) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) +t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False))) +(\lambda (H12: (pc3 c2 x0 t)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 +(THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) +t t0) t3) \to False)) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat +Cast) t t0) t3)) (THead (Flat Cast) x t) (ty3_cast g c2 t0 t (ty3_conv g c2 t +x H6 t0 x0 H9 H12) x H6)))) (\lambda (H12: (((pc3 c2 x0 t) \to +False))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) +t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False)) +(\lambda (t3: T).(\lambda (H13: (ty3 g c2 (THead (Flat Cast) t t0) +t3)).(ex3_ind T (\lambda (t4: T).(pc3 c2 (THead (Flat Cast) t4 t) t3)) +(\lambda (_: T).(ty3 g c2 t0 t)) (\lambda (t4: T).(ty3 g c2 t t4)) False +(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Flat Cast) x2 t) t3)).(\lambda +(H15: (ty3 g c2 t0 t)).(\lambda (H16: (ty3 g c2 t x2)).(let H_y \def +(ty3_unique g c2 t x2 H16 x H6) in (let H_y0 \def (ty3_unique g c2 t0 t H15 +x0 H9) in (H12 (ex2_sym T (pr3 c2 t) (pr3 c2 x0) H_y0)))))))) (ty3_gen_cast g +c2 t0 t t3 H13)))))) H11))))) (ty3_correct g c2 t0 x0 H9)))) H8)) (\lambda +(H8: ((\forall (t3: T).((ty3 g c2 t0 t3) \to False)))).(or_intror (ex T +(\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to False)) (\lambda (t3: +T).(\lambda (H9: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(ex3_ind T (\lambda +(t4: T).(pc3 c2 (THead (Flat Cast) t4 t) t3)) (\lambda (_: T).(ty3 g c2 t0 +t)) (\lambda (t4: T).(ty3 g c2 t t4)) False (\lambda (x0: T).(\lambda (_: +(pc3 c2 (THead (Flat Cast) x0 t) t3)).(\lambda (H11: (ty3 g c2 t0 +t)).(\lambda (_: (ty3 g c2 t x0)).(H8 t H11))))) (ty3_gen_cast g c2 t0 t t3 +H9)))))) H7)))) H5)) (\lambda (H5: ((\forall (t3: T).((ty3 g c2 t t3) \to +False)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t +t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to +False)) (\lambda (t3: T).(\lambda (H6: (ty3 g c2 (THead (Flat Cast) t t0) +t3)).(ex3_ind T (\lambda (t4: T).(pc3 c2 (THead (Flat Cast) t4 t) t3)) +(\lambda (_: T).(ty3 g c2 t0 t)) (\lambda (t4: T).(ty3 g c2 t t4)) False +(\lambda (x0: T).(\lambda (_: (pc3 c2 (THead (Flat Cast) x0 t) t3)).(\lambda +(_: (ty3 g c2 t0 t)).(\lambda (H9: (ty3 g c2 t x0)).(ex_ind T (\lambda (t4: +T).(ty3 g c2 x0 t4)) False (\lambda (x: T).(\lambda (_: (ty3 g c2 x0 x)).(H5 +x0 H9))) (ty3_correct g c2 t x0 H9)))))) (ty3_gen_cast g c2 t0 t t3 H6)))))) +H4))) f H2))) k H1))))))) t2))) c t1))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/defs.ma new file mode 100644 index 000000000..93ca1339e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/defs.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/G/defs.ma". + +include "basic_1A/pc3/defs.ma". + +inductive ty3 (g: G): C \to (T \to (T \to Prop)) \def +| ty3_conv: \forall (c: C).(\forall (t2: T).(\forall (t: T).((ty3 g c t2 t) +\to (\forall (u: T).(\forall (t1: T).((ty3 g c u t1) \to ((pc3 c t1 t2) \to +(ty3 g c u t2)))))))) +| ty3_sort: \forall (c: C).(\forall (m: nat).(ty3 g c (TSort m) (TSort (next +g m)))) +| ty3_abbr: \forall (n: nat).(\forall (c: C).(\forall (d: C).(\forall (u: +T).((getl n c (CHead d (Bind Abbr) u)) \to (\forall (t: T).((ty3 g d u t) \to +(ty3 g c (TLRef n) (lift (S n) O t)))))))) +| ty3_abst: \forall (n: nat).(\forall (c: C).(\forall (d: C).(\forall (u: +T).((getl n c (CHead d (Bind Abst) u)) \to (\forall (t: T).((ty3 g d u t) \to +(ty3 g c (TLRef n) (lift (S n) O u)))))))) +| ty3_bind: \forall (c: C).(\forall (u: T).(\forall (t: T).((ty3 g c u t) \to +(\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c (Bind b) +u) t1 t2) \to (ty3 g c (THead (Bind b) u t1) (THead (Bind b) u t2))))))))) +| ty3_appl: \forall (c: C).(\forall (w: T).(\forall (u: T).((ty3 g c w u) \to +(\forall (v: T).(\forall (t: T).((ty3 g c v (THead (Bind Abst) u t)) \to (ty3 +g c (THead (Flat Appl) w v) (THead (Flat Appl) w (THead (Bind Abst) u +t))))))))) +| ty3_cast: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c t1 t2) +\to (\forall (t0: T).((ty3 g c t2 t0) \to (ty3 g c (THead (Flat Cast) t2 t1) +(THead (Flat Cast) t0 t2))))))). + +inductive tys3 (g: G) (c: C): TList \to (T \to Prop) \def +| tys3_nil: \forall (u: T).(\forall (u0: T).((ty3 g c u u0) \to (tys3 g c +TNil u))) +| tys3_cons: \forall (t: T).(\forall (u: T).((ty3 g c t u) \to (\forall (ts: +TList).((tys3 g c ts u) \to (tys3 g c (TCons t ts) u))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/fsubst0.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fsubst0.ma new file mode 100644 index 000000000..582e50f87 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fsubst0.ma @@ -0,0 +1,975 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/props.ma". + +include "basic_1A/pc3/fsubst0.ma". + +include "basic_1A/getl/getl.ma". + +lemma ty3_fsubst0: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 +t1 t) \to (\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: +T).((fsubst0 i u c1 t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind +Abbr) u)) \to (ty3 g c2 t2 t)))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda +(H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda +(t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: +T).((fsubst0 i u c t0 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind +Abbr) u)) \to (ty3 g c2 t3 t2))))))))))) (\lambda (c: C).(\lambda (t2: +T).(\lambda (t0: T).(\lambda (H0: (ty3 g c t2 t0)).(\lambda (H1: ((\forall +(i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 +c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 +t3 t0)))))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 g c u +t3)).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: +C).(\forall (t4: T).((fsubst0 i u0 c u c2 t4) \to (\forall (e: C).((getl i c +(CHead e (Bind Abbr) u0)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (H4: (pc3 c +t3 t2)).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: +T).(\lambda (H5: (fsubst0 i u0 c u c2 t4)).(fsubst0_ind i u0 c u (\lambda +(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) +\to (ty3 g c0 t5 t2))))) (\lambda (t5: T).(\lambda (H6: (subst0 i u0 u +t5)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) +u0))).(ty3_conv g c t2 t0 H0 t5 t3 (H3 i u0 c t5 (fsubst0_snd i u0 c u t5 H6) +e H7) H4))))) (\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda +(e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c3 t2 +t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H6) e H7) u t3 (H3 i u0 c3 u +(fsubst0_fst i u0 c u c3 H6) e H7) (pc3_fsubst0 c t3 t2 H4 i u0 c3 t3 +(fsubst0_fst i u0 c t3 c3 H6) e H7)))))) (\lambda (t5: T).(\lambda (H6: +(subst0 i u0 u t5)).(\lambda (c3: C).(\lambda (H7: (csubst0 i u0 c +c3)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) +u0))).(ty3_conv g c3 t2 t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H7) e H8) +t5 t3 (H3 i u0 c3 t5 (fsubst0_both i u0 c u t5 H6 c3 H7) e H8) (pc3_fsubst0 c +t3 t2 H4 i u0 c3 t3 (fsubst0_fst i u0 c t3 c3 H7) e H8)))))))) c2 t4 +H5)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (i: +nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H0: (fsubst0 +i u c (TSort m) c2 t2)).(fsubst0_ind i u c (TSort m) (\lambda (c0: +C).(\lambda (t0: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to +(ty3 g c0 t0 (TSort (next g m))))))) (\lambda (t3: T).(\lambda (H1: (subst0 i +u (TSort m) t3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) +u))).(subst0_gen_sort u t3 i m H1 (ty3 g c t3 (TSort (next g m)))))))) +(\lambda (c3: C).(\lambda (_: (csubst0 i u c c3)).(\lambda (e: C).(\lambda +(_: (getl i c (CHead e (Bind Abbr) u))).(ty3_sort g c3 m))))) (\lambda (t3: +T).(\lambda (H1: (subst0 i u (TSort m) t3)).(\lambda (c3: C).(\lambda (_: +(csubst0 i u c c3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind +Abbr) u))).(subst0_gen_sort u t3 i m H1 (ty3 g c3 t3 (TSort (next g +m)))))))))) c2 t2 H0)))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda +(t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: ((\forall (i: +nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 +t2) \to (\forall (e: C).((getl i d (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 +t0)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda +(t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) c2 t2)).(fsubst0_ind i u0 c +(TLRef n) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead +e (Bind Abbr) u0)) \to (ty3 g c0 t3 (lift (S n) O t0)))))) (\lambda (t3: +T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (e: C).(\lambda (H5: +(getl i c (CHead e (Bind Abbr) u0))).(land_ind (eq nat n i) (eq T t3 (lift (S +n) O u0)) (ty3 g c t3 (lift (S n) O t0)) (\lambda (H6: (eq nat n i)).(\lambda +(H7: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: +T).(ty3 g c t4 (lift (S n) O t0))) (let H8 \def (eq_ind_r nat i (\lambda (n0: +nat).(getl n0 c (CHead e (Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C +(CHead d (Bind Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind +Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) +H8)) in (let H10 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) +(CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e +(Bind Abbr) u0) H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match +e0 with [(CSort _) \Rightarrow u | (CHead _ _ t4) \Rightarrow t4])) (CHead d +(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) +n H0 (CHead e (Bind Abbr) u0) H8)) in (\lambda (H12: (eq C d e)).(let H13 +\def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H9 +d H12) in (let H14 \def (eq_ind_r T u0 (\lambda (t4: T).(getl n c (CHead d +(Bind Abbr) t4))) H13 u H11) in (eq_ind T u (\lambda (t4: T).(ty3 g c (lift +(S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c O (S n) (getl_drop +Abbr c d u n H14)) u0 H11))))) H10)))) t3 H7))) (subst0_gen_lref u0 t3 i n +H4)))))) (\lambda (c3: C).(\lambda (H4: (csubst0 i u0 c c3)).(\lambda (e: +C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(lt_le_e n i (ty3 g c3 +(TLRef n) (lift (S n) O t0)) (\lambda (H6: (lt n i)).(let H7 \def +(csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind +(getl n c3 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) +u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda +(b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl +n c3 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) (ty3 g c3 (TLRef n) (lift (S +n) O t0)) (\lambda (H8: (getl n c3 (CHead d (Bind Abbr) u))).(ty3_abbr g n c3 +d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 +w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w))))) (ty3 g c3 (TLRef n) +(lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 +(Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind x0) x3))).(\lambda +(H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda +(e0: C).(match e0 with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow +c0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in +((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u | (CHead _ _ t3) \Rightarrow t3])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: +(eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t3: T).(subst0 (minus i +(S n)) u0 t3 x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c0: +C).(getl n c3 (CHead c0 (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r +B x0 (\lambda (b: B).(getl n c3 (CHead d (Bind b) x3))) H18 Abbr H15) in (let +H20 \def (eq_ind nat (minus i n) (\lambda (n0: nat).(getl n0 (CHead d (Bind +Abbr) x3) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) +c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) +(CHead d (Bind Abbr) x3) n H19 (le_S_n n i (le_S_n (S n) (S i) (le_S (S (S +n)) (S i) (le_n_S (S n) i H6))))) (S (minus i (S n))) (minus_x_Sy i n H6)) in +(ty3_abbr g n c3 d x3 H19 t0 (H2 (minus i (S n)) u0 d x3 (fsubst0_snd (minus +i (S n)) u0 d u x3 H17) e (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) +x3 (minus i (S n)) H20)))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq +C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 +(Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda +(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind +Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +u0 e1 e2))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C +(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 +(CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i (S n)) u0 x1 +x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) +\Rightarrow t3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in +(\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def +(eq_ind_r T x3 (\lambda (t3: T).(getl n c3 (CHead x2 (Bind x0) t3))) H10 u +H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus i (S +n)) u0 c0 x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: +B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abbr H15) in (let H20 \def (eq_ind +nat (minus i n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind Abbr) u) (CHead e +(Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 +(csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead +x2 (Bind Abbr) u) n H19 (le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) +(le_n_S (S n) i H6))))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr +g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) +u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n +(minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) +x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) H13)) +H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind +Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) u0 e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) +(\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda +(x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) +x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: +(subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 +x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead +d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) +\Rightarrow t3])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in +(\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def +(eq_ind_r T x3 (\lambda (t3: T).(subst0 (minus i (S n)) u0 t3 x4)) H11 u H15) +in (let H19 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus i (S n)) u0 +c0 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 +(CHead x2 (Bind b) x4))) H10 Abbr H16) in (let H21 \def (eq_ind nat (minus i +n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind Abbr) x4) (CHead e (Bind Abbr) +u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n +i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abbr) x4) n H20 +(le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) (le_n_S (S n) i H6))))) +(S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 x2 x4 H20 t0 (H2 +(minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) +e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S +n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) x2 (CHead e +(Bind Abbr) u0) x4 (minus i (S n)) H21))))))))))) H14)) H13))))))))))) H8)) +H7))) (\lambda (H6: (le i n)).(ty3_abbr g n c3 d u (csubst0_getl_ge i n H6 c +c3 u0 H4 (CHead d (Bind Abbr) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda +(H4: (subst0 i u0 (TLRef n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 +c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) +u0))).(land_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift +(S n) O t0)) (\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O +u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) +O t0))) (let H9 \def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c (CHead e +(Bind Abbr) u0))) H6 n H7) in (let H10 \def (eq_ind_r nat i (\lambda (n0: +nat).(csubst0 n0 u0 c c3)) H5 n H7) in (let H11 \def (eq_ind C (CHead d (Bind +Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) +(getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in +(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) +(CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e +(Bind Abbr) u0) H9)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match +e0 with [(CSort _) \Rightarrow u | (CHead _ _ t4) \Rightarrow t4])) (CHead d +(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) +n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H14: (eq C d e)).(let H15 +\def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H11 +d H14) in (let H16 \def (eq_ind_r T u0 (\lambda (t4: T).(getl n c (CHead d +(Bind Abbr) t4))) H15 u H13) in (let H17 \def (eq_ind_r T u0 (\lambda (t4: +T).(csubst0 n t4 c c3)) H10 u H13) in (eq_ind T u (\lambda (t4: T).(ty3 g c3 +(lift (S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c3 O (S n) +(getl_drop Abbr c3 d u n (csubst0_getl_ge n n (le_n n) c c3 u H17 (CHead d +(Bind Abbr) u) H16))) u0 H13)))))) H12))))) t3 H8))) (subst0_gen_lref u0 t3 i +n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (n: nat).(\lambda (c: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind +Abst) u))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: +((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: +T).((fsubst0 i u0 d u c2 t2) \to (\forall (e: C).((getl i d (CHead e (Bind +Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u0: +T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) +c2 t2)).(fsubst0_ind i u0 c (TLRef n) (\lambda (c0: C).(\lambda (t3: +T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 +(lift (S n) O u)))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) +t3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) +u0))).(land_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c t3 (lift (S +n) O u)) (\lambda (H6: (eq nat n i)).(\lambda (H7: (eq T t3 (lift (S n) O +u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c t4 (lift (S n) +O u))) (let H8 \def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c (CHead e +(Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) +(\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c +(CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (let H10 \def +(eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind +Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) +H8)) in (False_ind (ty3 g c (lift (S n) O u0) (lift (S n) O u)) H10)))) t3 +H7))) (subst0_gen_lref u0 t3 i n H4)))))) (\lambda (c3: C).(\lambda (H4: +(csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind +Abbr) u0))).(lt_le_e n i (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H6: +(lt n i)).(let H7 \def (csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind +Abst) u) H0) in (or4_ind (getl n c3 (CHead d (Bind Abst) u)) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i (S n)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 +(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) +u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(getl n c3 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) +(ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H8: (getl n c3 (CHead d (Bind +Abst) u))).(ty3_abst g n c3 d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i (S n)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) +u0 u1 w))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda +(x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind +Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind +x0) x3))).(\lambda (H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def +(f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow d | +(CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) +x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 with +[(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k with [(Bind +b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) +(CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) \Rightarrow t3])) +(CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B +Abst x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda +(t3: T).(subst0 (minus i (S n)) u0 t3 x3)) H11 u H14) in (let H18 \def +(eq_ind_r C x1 (\lambda (c0: C).(getl n c3 (CHead c0 (Bind x0) x3))) H10 d +H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead d +(Bind b) x3))) H18 Abst H15) in (let H20 \def (eq_ind nat (minus i n) +(\lambda (n0: nat).(getl n0 (CHead d (Bind Abst) x3) (CHead e (Bind Abbr) +u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n +i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead d (Bind Abst) x3) n H19 +(le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) (le_n_S (S n) i H6))))) +(S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) +(lift (S n) O t0) (ty3_lift g d u t0 H1 c3 O (S n) (getl_drop Abst c3 d x3 n +H19)) (TLRef n) (lift (S n) O x3) (ty3_abst g n c3 d x3 H19 t0 (H2 (minus i +(S n)) u0 d x3 (fsubst0_snd (minus i (S n)) u0 d u x3 H17) e (getl_gen_S +(Bind Abst) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20))) (pc3_lift c3 +d (S n) O (getl_drop Abst c3 d x3 n H19) x3 u (pc3_pr2_x d x3 u (pr2_delta d +e u0 (r (Bind Abst) (minus i (S n))) (getl_gen_S (Bind Abst) d (CHead e (Bind +Abbr) u0) x3 (minus i (S n)) H20) u u (pr0_refl u) x3 H17))))))))))) H13)) +H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 +(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))) (ty3 g c3 (TLRef n) +(lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda +(x3: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) +x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x3))).(\lambda (H11: +(csubst0 (minus i (S n)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) +(CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def +(f_equal C B (\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow Abst | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow b | (Flat _) +\Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in +((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow u | (CHead _ _ t3) \Rightarrow t3])) (CHead d (Bind Abst) u) +(CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abst x0)).(\lambda (H16: +(eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t3: T).(getl n c3 (CHead +x2 (Bind x0) t3))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c0: +C).(csubst0 (minus i (S n)) u0 c0 x2)) H11 d H16) in (let H19 \def (eq_ind_r +B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abst H15) in (let +H20 \def (eq_ind nat (minus i n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind +Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) +c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) +(CHead x2 (Bind Abst) u) n H19 (le_S_n n i (le_S_n (S n) (S i) (le_S (S (S +n)) (S i) (le_n_S (S n) i H6))))) (S (minus i (S n))) (minus_x_Sy i n H6)) in +(ty3_abst g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus +i (S n)) u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S +n)) (le_n (minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S +(Bind Abst) x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) +H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) u0 e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda +(x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) +x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: +(subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 +x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abst) u) +(CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: +C).(match e0 with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead +d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T +(\lambda (e0: C).(match e0 with [(CSort _) \Rightarrow u | (CHead _ _ t3) +\Rightarrow t3])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in +(\lambda (H16: (eq B Abst x0)).(\lambda (H17: (eq C d x1)).(let H18 \def +(eq_ind_r T x3 (\lambda (t3: T).(subst0 (minus i (S n)) u0 t3 x4)) H11 u H15) +in (let H19 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus i (S n)) u0 +c0 x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 +(CHead x2 (Bind b) x4))) H10 Abst H16) in (let H21 \def (eq_ind nat (minus i +n) (\lambda (n0: nat).(getl n0 (CHead x2 (Bind Abst) x4) (CHead e (Bind Abbr) +u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n +i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abst) x4) n H20 +(le_S_n n i (le_S_n (S n) (S i) (le_S (S (S n)) (S i) (le_n_S (S n) i H6))))) +(S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) +(lift (S n) O t0) (ty3_lift g x2 u t0 (H2 (minus i (S n)) u0 x2 u +(fsubst0_fst (minus i (S n)) u0 d u x2 H19) e (csubst0_getl_ge_back (minus i +(S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind +Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S +n)) H21))) c3 O (S n) (getl_drop Abst c3 x2 x4 n H20)) (TLRef n) (lift (S n) +O x4) (ty3_abst g n c3 x2 x4 H20 t0 (H2 (minus i (S n)) u0 x2 x4 +(fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back +(minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e +(Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus +i (S n)) H21)))) (pc3_lift c3 x2 (S n) O (getl_drop Abst c3 x2 x4 n H20) x4 u +(pc3_fsubst0 d u u (pc3_refl d u) (minus i (S n)) u0 x2 x4 (fsubst0_both +(minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) +(minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) +(getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) +H21)))))))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i +n)).(ty3_abst g n c3 d u (csubst0_getl_ge i n H6 c c3 u0 H4 (CHead d (Bind +Abst) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef +n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: +C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(land_ind (eq nat n i) +(eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift (S n) O u)) (\lambda (H7: (eq +nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) +O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) O u))) (let H9 \def (eq_ind_r +nat i (\lambda (n0: nat).(getl n0 c (CHead e (Bind Abbr) u0))) H6 n H7) in +(let H10 \def (eq_ind_r nat i (\lambda (n0: nat).(csubst0 n0 u0 c c3)) H5 n +H7) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl +n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n +H0 (CHead e (Bind Abbr) u0) H9)) in (let H12 \def (eq_ind C (CHead d (Bind +Abst) u) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | +(CHead _ k _) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with +[Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | +(Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c +(CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ty3 +g c3 (lift (S n) O u0) (lift (S n) O u)) H12))))) t3 H8))) (subst0_gen_lref +u0 t3 i n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (t0: T).(\lambda (H0: (ty3 g c u t0)).(\lambda (H1: ((\forall (i: +nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 +t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 +t0)))))))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: +(ty3 g (CHead c (Bind b) u) t2 t3)).(\lambda (H3: ((\forall (i: nat).(\forall +(u0: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u0 (CHead c (Bind b) u) +t2 c2 t4) \to (\forall (e: C).((getl i (CHead c (Bind b) u) (CHead e (Bind +Abbr) u0)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (i: nat).(\lambda (u0: +T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H4: (fsubst0 i u0 c (THead +(Bind b) u t2) c2 t4)).(fsubst0_ind i u0 c (THead (Bind b) u t2) (\lambda +(c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) +\to (ty3 g c0 t5 (THead (Bind b) u t3)))))) (\lambda (t5: T).(\lambda (H5: +(subst0 i u0 (THead (Bind b) u t2) t5)).(\lambda (e: C).(\lambda (H6: (getl i +c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead +(Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t6: +T).(eq T t5 (THead (Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) +u0 t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead +(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6)))) (ty3 g c +t5 (THead (Bind b) u t3)) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t5 +(THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t5 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i +u0 u u2)) (ty3 g c t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H8: +(eq T t5 (THead (Bind b) x t2))).(\lambda (H9: (subst0 i u0 u x)).(eq_ind_r T +(THead (Bind b) x t2) (\lambda (t6: T).(ty3 g c t6 (THead (Bind b) u t3))) +(ex_ind T (\lambda (t6: T).(ty3 g (CHead c (Bind b) u) t3 t6)) (ty3 g c +(THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H10: +(ty3 g (CHead c (Bind b) u) t3 x0)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead +c (Bind b) x) t3 t6)) (ty3 g c (THead (Bind b) x t2) (THead (Bind b) u t3)) +(\lambda (x1: T).(\lambda (_: (ty3 g (CHead c (Bind b) x) t3 x1)).(ty3_conv g +c (THead (Bind b) u t3) (THead (Bind b) u x0) (ty3_bind g c u t0 H0 b t3 x0 +H10) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c x t0 (H1 i u0 +c x (fsubst0_snd i u0 c u x H9) e H6) b t2 t3 (H3 (S i) u0 (CHead c (Bind b) +x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c (Bind b) x) +(csubst0_snd_bind b i u0 u x H9 c)) e (getl_head (Bind b) i c (CHead e (Bind +Abbr) u0) H6 u))) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) +(pc3_refl c (THead (Bind b) u t3)) i u0 c (THead (Bind b) x t3) (fsubst0_snd +i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) (subst0_fst u0 x u i H9 t3 +(Bind b))) e H6)))) (ty3_correct g (CHead c (Bind b) x) t2 t3 (H3 (S i) u0 +(CHead c (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead +c (Bind b) x) (csubst0_snd_bind b i u0 u x H9 c)) e (getl_head (Bind b) i c +(CHead e (Bind Abbr) u0) H6 u)))))) (ty3_correct g (CHead c (Bind b) u) t2 t3 +H2)) t5 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t6: T).(eq T t5 (THead +(Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 +t6)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Bind b) u t6))) (\lambda +(t6: T).(subst0 (s (Bind b) i) u0 t2 t6)) (ty3 g c t5 (THead (Bind b) u t3)) +(\lambda (x: T).(\lambda (H8: (eq T t5 (THead (Bind b) u x))).(\lambda (H9: +(subst0 (s (Bind b) i) u0 t2 x)).(eq_ind_r T (THead (Bind b) u x) (\lambda +(t6: T).(ty3 g c t6 (THead (Bind b) u t3))) (ex_ind T (\lambda (t6: T).(ty3 g +(CHead c (Bind b) u) t3 t6)) (ty3 g c (THead (Bind b) u x) (THead (Bind b) u +t3)) (\lambda (x0: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t3 +x0)).(ty3_bind g c u t0 H0 b x t3 (H3 (S i) u0 (CHead c (Bind b) u) x +(fsubst0_snd (S i) u0 (CHead c (Bind b) u) t2 x H9) e (getl_head (Bind b) i c +(CHead e (Bind Abbr) u0) H6 u))))) (ty3_correct g (CHead c (Bind b) u) x t3 +(H3 (S i) u0 (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) +u) t2 x H9) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H6 u)))) t5 +H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T +t5 (THead (Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u +u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 +t6))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead +(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6))) (ty3 g c +t5 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq +T t5 (THead (Bind b) x0 x1))).(\lambda (H9: (subst0 i u0 u x0)).(\lambda +(H10: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) +(\lambda (t6: T).(ty3 g c t6 (THead (Bind b) u t3))) (ex_ind T (\lambda (t6: +T).(ty3 g (CHead c (Bind b) u) t3 t6)) (ty3 g c (THead (Bind b) x0 x1) (THead +(Bind b) u t3)) (\lambda (x: T).(\lambda (H11: (ty3 g (CHead c (Bind b) u) t3 +x)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c (Bind b) x0) t3 t6)) (ty3 g c +(THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (_: +(ty3 g (CHead c (Bind b) x0) t3 x2)).(ty3_conv g c (THead (Bind b) u t3) +(THead (Bind b) u x) (ty3_bind g c u t0 H0 b t3 x H11) (THead (Bind b) x0 x1) +(THead (Bind b) x0 t3) (ty3_bind g c x0 t0 (H1 i u0 c x0 (fsubst0_snd i u0 c +u x0 H9) e H6) b x1 t3 (H3 (S i) u0 (CHead c (Bind b) x0) x1 (fsubst0_both (S +i) u0 (CHead c (Bind b) u) t2 x1 H10 (CHead c (Bind b) x0) (csubst0_snd_bind +b i u0 u x0 H9 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H6 u))) +(pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead +(Bind b) u t3)) i u0 c (THead (Bind b) x0 t3) (fsubst0_snd i u0 c (THead +(Bind b) u t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H9 t3 (Bind b))) +e H6)))) (ty3_correct g (CHead c (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c +(Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H10 (CHead +c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H9 c)) e (getl_head (Bind b) i c +(CHead e (Bind Abbr) u0) H6 u)))))) (ty3_correct g (CHead c (Bind b) u) t2 t3 +H2)) t5 H8)))))) H7)) (subst0_gen_head (Bind b) u0 u t2 t5 i H5)))))) +(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda +(H6: (getl i c (CHead e (Bind Abbr) u0))).(ex_ind T (\lambda (t5: T).(ty3 g +(CHead c3 (Bind b) u) t3 t5)) (ty3 g c3 (THead (Bind b) u t2) (THead (Bind b) +u t3)) (\lambda (x: T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) t3 +x)).(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H5) e H6) b t2 +t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind +b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H5 u)) e +(getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H6 u))))) (ty3_correct g +(CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 +(fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) +(csubst0_fst_bind b i c c3 u0 H5 u)) e (getl_head (Bind b) i c (CHead e (Bind +Abbr) u0) H6 u)))))))) (\lambda (t5: T).(\lambda (H5: (subst0 i u0 (THead +(Bind b) u t2) t5)).(\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c +c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) +u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead (Bind b) u2 t2))) +(\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead +(Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Bind b) u2 t6)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: +T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6)))) (ty3 g c3 t5 (THead +(Bind b) u t3)) (\lambda (H8: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Bind +b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: +T).(eq T t5 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)) +(ty3 g c3 t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H9: (eq T t5 +(THead (Bind b) x t2))).(\lambda (H10: (subst0 i u0 u x)).(eq_ind_r T (THead +(Bind b) x t2) (\lambda (t6: T).(ty3 g c3 t6 (THead (Bind b) u t3))) (ex_ind +T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) t3 t6)) (ty3 g c3 (THead +(Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H11: (ty3 g +(CHead c3 (Bind b) u) t3 x0)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 +(Bind b) u) x0 t6)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) +(\lambda (x1: T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) x0 x1)).(ex_ind T +(\lambda (t6: T).(ty3 g (CHead c3 (Bind b) x) t3 t6)) (ty3 g c3 (THead (Bind +b) x t2) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (_: (ty3 g (CHead +c3 (Bind b) x) t3 x2)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u +x0) (ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) b t3 +x0 H11) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c3 x t0 (H1 i +u0 c3 x (fsubst0_both i u0 c u x H10 c3 H6) e H7) b t2 t3 (H3 (S i) u0 (CHead +c3 (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 +(Bind b) x) (csubst0_both_bind b i u0 u x H10 c c3 H6)) e (getl_head (Bind b) +i c (CHead e (Bind Abbr) u0) H7 u))) (pc3_fsubst0 c (THead (Bind b) u t3) +(THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c3 (THead (Bind +b) x t3) (fsubst0_both i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) +(subst0_fst u0 x u i H10 t3 (Bind b)) c3 H6) e H7)))) (ty3_correct g (CHead +c3 (Bind b) x) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) x) t2 (fsubst0_fst (S i) +u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) x) (csubst0_both_bind b i u0 u +x H10 c c3 H6)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))))) +(ty3_correct g (CHead c3 (Bind b) u) t3 x0 H11)))) (ty3_correct g (CHead c3 +(Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 +(CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 +H6 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))) t5 H9)))) +H8)) (\lambda (H8: (ex2 T (\lambda (t6: T).(eq T t5 (THead (Bind b) u t6))) +(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6)))).(ex2_ind T (\lambda (t6: +T).(eq T t5 (THead (Bind b) u t6))) (\lambda (t6: T).(subst0 (s (Bind b) i) +u0 t2 t6)) (ty3 g c3 t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H9: +(eq T t5 (THead (Bind b) u x))).(\lambda (H10: (subst0 (s (Bind b) i) u0 t2 +x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t6: T).(ty3 g c3 t6 (THead +(Bind b) u t3))) (ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) t3 +t6)) (ty3 g c3 (THead (Bind b) u x) (THead (Bind b) u t3)) (\lambda (x0: +T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) t3 x0)).(ty3_bind g c3 u t0 (H1 +i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) b x t3 (H3 (S i) u0 (CHead c3 +(Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x H10 (CHead c3 +(Bind b) u) (csubst0_fst_bind b i c c3 u0 H6 u)) e (getl_head (Bind b) i c +(CHead e (Bind Abbr) u0) H7 u))))) (ty3_correct g (CHead c3 (Bind b) u) x t3 +(H3 (S i) u0 (CHead c3 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) +u) t2 x H10 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H6 u)) e +(getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))) t5 H9)))) H8)) +(\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead +(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 +t6))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead +(Bind b) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Bind b) i) u0 t2 t6))) (ty3 g c3 +t5 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq +T t5 (THead (Bind b) x0 x1))).(\lambda (H10: (subst0 i u0 u x0)).(\lambda +(H11: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) +(\lambda (t6: T).(ty3 g c3 t6 (THead (Bind b) u t3))) (ex_ind T (\lambda (t6: +T).(ty3 g (CHead c3 (Bind b) u) t3 t6)) (ty3 g c3 (THead (Bind b) x0 x1) +(THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H12: (ty3 g (CHead c3 (Bind +b) u) t3 x)).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) x t6)) +(ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: +T).(\lambda (_: (ty3 g (CHead c3 (Bind b) u) x x2)).(ex_ind T (\lambda (t6: +T).(ty3 g (CHead c3 (Bind b) x0) t3 t6)) (ty3 g c3 (THead (Bind b) x0 x1) +(THead (Bind b) u t3)) (\lambda (x3: T).(\lambda (_: (ty3 g (CHead c3 (Bind +b) x0) t3 x3)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u x) +(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) b t3 x +H12) (THead (Bind b) x0 x1) (THead (Bind b) x0 t3) (ty3_bind g c3 x0 t0 (H1 i +u0 c3 x0 (fsubst0_both i u0 c u x0 H10 c3 H6) e H7) b x1 t3 (H3 (S i) u0 +(CHead c3 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 +H11 (CHead c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H10 c c3 H6)) e +(getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H7 u))) (pc3_fsubst0 c +(THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u +t3)) i u0 c3 (THead (Bind b) x0 t3) (fsubst0_both i u0 c (THead (Bind b) u +t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H10 t3 (Bind b)) c3 H6) e +H7)))) (ty3_correct g (CHead c3 (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c3 +(Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H11 (CHead +c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H10 c c3 H6)) e (getl_head +(Bind b) i c (CHead e (Bind Abbr) u0) H7 u)))))) (ty3_correct g (CHead c3 +(Bind b) u) t3 x H12)))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) +u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 +(CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H6 u)) e (getl_head (Bind +b) i c (CHead e (Bind Abbr) u0) H7 u)))) t5 H9)))))) H8)) (subst0_gen_head +(Bind b) u0 u t2 t5 i H5)))))))) c2 t4 H4)))))))))))))))) (\lambda (c: +C).(\lambda (w: T).(\lambda (u: T).(\lambda (H0: (ty3 g c w u)).(\lambda (H1: +((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: +T).((fsubst0 i u0 c w c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind +Abbr) u0)) \to (ty3 g c2 t2 u)))))))))).(\lambda (v: T).(\lambda (t0: +T).(\lambda (H2: (ty3 g c v (THead (Bind Abst) u t0))).(\lambda (H3: +((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: +T).((fsubst0 i u0 c v c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind +Abbr) u0)) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))))))).(\lambda (i: +nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: +(fsubst0 i u0 c (THead (Flat Appl) w v) c2 t2)).(fsubst0_ind i u0 c (THead +(Flat Appl) w v) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c +(CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (THead (Flat Appl) w (THead (Bind +Abst) u t0))))))) (\lambda (t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat +Appl) w v) t3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) +u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) +(\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead +(Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: +T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) (ty3 g c t3 (THead +(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H7: (ex2 T (\lambda (u2: +T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w +u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) +(\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c t3 (THead (Flat Appl) w (THead +(Bind Abst) u t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) +x v))).(\lambda (H9: (subst0 i u0 w x)).(eq_ind_r T (THead (Flat Appl) x v) +(\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) +(ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind Abst) u t0) t4)) (ty3 g c +(THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) +(\lambda (x0: T).(\lambda (H10: (ty3 g c (THead (Bind Abst) u t0) +x0)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c (THead (Bind +Abst) u t4) x0))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c u t5))) (\lambda +(t4: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 t4))) (ty3 g c +(THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) +(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c (THead (Bind Abst) u +x1) x0)).(\lambda (_: (ty3 g c u x2)).(\lambda (H13: (ty3 g (CHead c (Bind +Abst) u) t0 x1)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) (ty3 g c (THead +(Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda +(x3: T).(\lambda (H14: (ty3 g c u x3)).(ty3_conv g c (THead (Flat Appl) w +(THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) +(ty3_appl g c w u H0 (THead (Bind Abst) u t0) x1 (ty3_bind g c u x3 H14 Abst +t0 x1 H13)) (THead (Flat Appl) x v) (THead (Flat Appl) x (THead (Bind Abst) u +t0)) (ty3_appl g c x u (H1 i u0 c x (fsubst0_snd i u0 c w x H9) e H6) v t0 +H2) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead +(Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w +(THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x (THead (Bind Abst) u +t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) +(THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H9 (THead +(Bind Abst) u t0) (Flat Appl))) e H6)))) (ty3_correct g c x u (H1 i u0 c x +(fsubst0_snd i u0 c w x H9) e H6)))))))) (ty3_gen_bind g Abst c u t0 x0 +H10)))) (ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))) H7)) +(\lambda (H7: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) +(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))).(ex2_ind T (\lambda +(t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat +Appl) i) u0 v t4)) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u +t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) w +x))).(\lambda (H9: (subst0 (s (Flat Appl) i) u0 v x)).(eq_ind_r T (THead +(Flat Appl) w x) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead +(Bind Abst) u t0)))) (ty3_appl g c w u H0 x t0 (H3 (s (Flat Appl) i) u0 c x +(fsubst0_snd (s (Flat Appl) i) u0 c v x H9) e H6)) t3 H8)))) H7)) (\lambda +(H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) +u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: +T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: +T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c t3 (THead +(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H8: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H9: (subst0 i +u0 w x0)).(\lambda (H10: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T +(THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w +(THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind +Abst) u t0) t4)) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w +(THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H11: (ty3 g c (THead +(Bind Abst) u t0) x)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c +(THead (Bind Abst) u t4) x))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c u +t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 +t4))) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind +Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c (THead +(Bind Abst) u x2) x)).(\lambda (_: (ty3 g c u x3)).(\lambda (H14: (ty3 g +(CHead c (Bind Abst) u) t0 x2)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) +(ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u +t0))) (\lambda (x4: T).(\lambda (H15: (ty3 g c u x4)).(ty3_conv g c (THead +(Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind +Abst) u x2)) (ty3_appl g c w u H0 (THead (Bind Abst) u t0) x2 (ty3_bind g c u +x4 H15 Abst t0 x2 H14)) (THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 +(THead (Bind Abst) u t0)) (ty3_appl g c x0 u (H1 i u0 c x0 (fsubst0_snd i u0 +c w x0 H9) e H6) x1 t0 (H3 (s (Flat Appl) i) u0 c x1 (fsubst0_snd (s (Flat +Appl) i) u0 c v x1 H10) e H6)) (pc3_fsubst0 c (THead (Flat Appl) w (THead +(Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c +(THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x0 +(THead (Bind Abst) u t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead +(Bind Abst) u t0)) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) +(subst0_fst u0 x0 w i H9 (THead (Bind Abst) u t0) (Flat Appl))) e H6)))) +(ty3_correct g c w u H0))))))) (ty3_gen_bind g Abst c u t0 x H11)))) +(ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))))) H7)) +(subst0_gen_head (Flat Appl) u0 w v t3 i H5)))))) (\lambda (c3: C).(\lambda +(H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e +(Bind Abbr) u0))).(ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 +H5) e H6) v t0 (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H5) e H6)))))) (\lambda +(t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat Appl) w v) t3)).(\lambda (c3: +C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H7: (getl i c +(CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead +(Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda +(t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat +Appl) i) u0 v t4))) (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 +(THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w +u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) +(ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H8: +(ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: +T).(subst0 i u0 w u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat +Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c3 t3 (THead (Flat +Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H9: (eq T t3 +(THead (Flat Appl) x v))).(\lambda (H10: (subst0 i u0 w x)).(eq_ind_r T +(THead (Flat Appl) x v) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w +(THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind +Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w +(THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (H11: (ty3 g c3 (THead +(Bind Abst) u t0) x0)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 +c3 (THead (Bind Abst) u t4) x0))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c3 +u t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 +t4))) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind +Abst) u t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c3 (THead +(Bind Abst) u x1) x0)).(\lambda (H13: (ty3 g c3 u x2)).(\lambda (H14: (ty3 g +(CHead c3 (Bind Abst) u) t0 x1)).(ty3_conv g c3 (THead (Flat Appl) w (THead +(Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) (ty3_appl g +c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) (THead (Bind Abst) u +t0) x1 (ty3_bind g c3 u x2 H13 Abst t0 x1 H14)) (THead (Flat Appl) x v) +(THead (Flat Appl) x (THead (Bind Abst) u t0)) (ty3_appl g c3 x u (H1 i u0 c3 +x (fsubst0_both i u0 c w x H10 c3 H6) e H7) v t0 (H3 i u0 c3 v (fsubst0_fst i +u0 c v c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u +t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat +Appl) w (THead (Bind Abst) u t0))) i u0 c3 (THead (Flat Appl) x (THead (Bind +Abst) u t0)) (fsubst0_both i u0 c (THead (Flat Appl) w (THead (Bind Abst) u +t0)) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H10 +(THead (Bind Abst) u t0) (Flat Appl)) c3 H6) e H7))))))) (ty3_gen_bind g Abst +c3 u t0 x0 H11)))) (ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v +(fsubst0_fst i u0 c v c3 H6) e H7))) t3 H9)))) H8)) (\lambda (H8: (ex2 T +(\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 +(s (Flat Appl) i) u0 v t4)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead +(Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)) (ty3 +g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: +T).(\lambda (H9: (eq T t3 (THead (Flat Appl) w x))).(\lambda (H10: (subst0 (s +(Flat Appl) i) u0 v x)).(eq_ind_r T (THead (Flat Appl) w x) (\lambda (t4: +T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g +c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) x t0 (H3 i u0 c3 x +(fsubst0_both i u0 c v x H10 c3 H6) e H7)) t3 H9)))) H8)) (\lambda (H8: +(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 +t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: +T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: +T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c3 t3 (THead +(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H9: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H10: (subst0 +i u0 w x0)).(\lambda (H11: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T +(THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w +(THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind +Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w +(THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H12: (ty3 g c3 (THead +(Bind Abst) u t0) x)).(ex3_2_ind T T (\lambda (t4: T).(\lambda (_: T).(pc3 c3 +(THead (Bind Abst) u t4) x))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c3 u +t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 +t4))) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind +Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c3 (THead +(Bind Abst) u x2) x)).(\lambda (_: (ty3 g c3 u x3)).(\lambda (H15: (ty3 g +(CHead c3 (Bind Abst) u) t0 x2)).(ex_ind T (\lambda (t4: T).(ty3 g c3 u t4)) +(ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u +t0))) (\lambda (x4: T).(\lambda (H16: (ty3 g c3 u x4)).(ty3_conv g c3 (THead +(Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind +Abst) u x2)) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e +H7) (THead (Bind Abst) u t0) x2 (ty3_bind g c3 u x4 H16 Abst t0 x2 H15)) +(THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) +(ty3_appl g c3 x0 u (H1 i u0 c3 x0 (fsubst0_both i u0 c w x0 H10 c3 H6) e H7) +x1 t0 (H3 i u0 c3 x1 (fsubst0_both i u0 c v x1 H11 c3 H6) e H7)) (pc3_fsubst0 +c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead +(Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u +t0))) i u0 c3 (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (fsubst0_both i +u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x0 +(THead (Bind Abst) u t0)) (subst0_fst u0 x0 w i H10 (THead (Bind Abst) u t0) +(Flat Appl)) c3 H6) e H7)))) (ty3_correct g c3 w u (H1 i u0 c3 w (fsubst0_fst +i u0 c w c3 H6) e H7)))))))) (ty3_gen_bind g Abst c3 u t0 x H12)))) +(ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v (fsubst0_fst i u0 +c v c3 H6) e H7))) t3 H9)))))) H8)) (subst0_gen_head (Flat Appl) u0 w v t3 i +H5)))))))) c2 t2 H4))))))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda +(t3: T).(\lambda (H0: (ty3 g c t2 t3)).(\lambda (H1: ((\forall (i: +nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u c t2 c2 +t4) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t4 +t3)))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c t3 t0)).(\lambda (H3: +((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: +T).((fsubst0 i u c t3 c2 t4) \to (\forall (e: C).((getl i c (CHead e (Bind +Abbr) u)) \to (ty3 g c2 t4 t0)))))))))).(\lambda (i: nat).(\lambda (u: +T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H4: (fsubst0 i u c (THead +(Flat Cast) t3 t2) c2 t4)).(fsubst0_ind i u c (THead (Flat Cast) t3 t2) +(\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind +Abbr) u)) \to (ty3 g c0 t5 (THead (Flat Cast) t0 t3)))))) (\lambda (t5: +T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda (e: +C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda +(u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 +u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda +(t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: +T).(subst0 (s (Flat Cast) i) u t2 t6)))) (ty3 g c t5 (THead (Flat Cast) t0 +t3)) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 +t2))) (\lambda (u2: T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq +T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g +c t5 (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H8: (eq T t5 (THead +(Flat Cast) x t2))).(\lambda (H9: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat +Cast) x t2) (\lambda (t6: T).(ty3 g c t6 (THead (Flat Cast) t0 t3))) (ex_ind +T (\lambda (t6: T).(ty3 g c t0 t6)) (ty3 g c (THead (Flat Cast) x t2) (THead +(Flat Cast) t0 t3)) (\lambda (x0: T).(\lambda (H10: (ty3 g c t0 +x0)).(ty3_conv g c (THead (Flat Cast) t0 t3) (THead (Flat Cast) x0 t0) +(ty3_cast g c t3 t0 H2 x0 H10) (THead (Flat Cast) x t2) (THead (Flat Cast) t0 +x) (ty3_cast g c t2 x (ty3_conv g c x t0 (H3 i u c x (fsubst0_snd i u c t3 x +H9) e H6) t2 t3 H0 (pc3_s c t3 x (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x +(fsubst0_snd i u c t3 x H9) e H6))) t0 (H3 i u c x (fsubst0_snd i u c t3 x +H9) e H6)) (pc3_fsubst0 c (THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 t3) +(pc3_refl c (THead (Flat Cast) t0 t3)) i u c (THead (Flat Cast) t0 x) +(fsubst0_snd i u c (THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 x) +(subst0_snd (Flat Cast) u x t3 i H9 t0)) e H6)))) (ty3_correct g c x t0 (H3 i +u c x (fsubst0_snd i u c t3 x H9) e H6))) t5 H8)))) H7)) (\lambda (H7: (ex2 T +(\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: +T).(subst0 (s (Flat Cast) i) u t2 t6)))).(ex2_ind T (\lambda (t6: T).(eq T t5 +(THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 +t6)) (ty3 g c t5 (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H8: (eq +T t5 (THead (Flat Cast) t3 x))).(\lambda (H9: (subst0 (s (Flat Cast) i) u t2 +x)).(eq_ind_r T (THead (Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c t6 (THead +(Flat Cast) t0 t3))) (ty3_cast g c x t3 (H1 (s (Flat Cast) i) u c x +(fsubst0_snd (s (Flat Cast) i) u c t2 x H9) e H6) t0 H2) t5 H8)))) H7)) +(\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead +(Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) +(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 +t6))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead +(Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) +(\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g +c t5 (THead (Flat Cast) t0 t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H8: (eq T t5 (THead (Flat Cast) x0 x1))).(\lambda (H9: (subst0 i u t3 +x0)).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead +(Flat Cast) x0 x1) (\lambda (t6: T).(ty3 g c t6 (THead (Flat Cast) t0 t3))) +(ex_ind T (\lambda (t6: T).(ty3 g c t0 t6)) (ty3 g c (THead (Flat Cast) x0 +x1) (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H11: (ty3 g c t0 +x)).(ty3_conv g c (THead (Flat Cast) t0 t3) (THead (Flat Cast) x t0) +(ty3_cast g c t3 t0 H2 x H11) (THead (Flat Cast) x0 x1) (THead (Flat Cast) t0 +x0) (ty3_cast g c x1 x0 (ty3_conv g c x0 t0 (H3 i u c x0 (fsubst0_snd i u c +t3 x0 H9) e H6) x1 t3 (H1 (s (Flat Cast) i) u c x1 (fsubst0_snd (s (Flat +Cast) i) u c t2 x1 H10) e H6) (pc3_s c t3 x0 (pc3_fsubst0 c t3 t3 (pc3_refl c +t3) i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6))) t0 (H3 i u c x0 +(fsubst0_snd i u c t3 x0 H9) e H6)) (pc3_fsubst0 c (THead (Flat Cast) t0 t3) +(THead (Flat Cast) t0 t3) (pc3_refl c (THead (Flat Cast) t0 t3)) i u c (THead +(Flat Cast) t0 x0) (fsubst0_snd i u c (THead (Flat Cast) t0 t3) (THead (Flat +Cast) t0 x0) (subst0_snd (Flat Cast) u x0 t3 i H9 t0)) e H6)))) (ty3_correct +g c x0 t0 (H3 i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6))) t5 H8)))))) H7)) +(subst0_gen_head (Flat Cast) u t3 t2 t5 i H5)))))) (\lambda (c3: C).(\lambda +(H5: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e +(Bind Abbr) u))).(ty3_cast g c3 t2 t3 (H1 i u c3 t2 (fsubst0_fst i u c t2 c3 +H5) e H6) t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H5) e H6)))))) (\lambda +(t5: T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda +(c3: C).(\lambda (H6: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H7: (getl +i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 +(THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2))) (ex2 T +(\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: +T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda +(t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat +Cast) i) u t2 t6)))) (ty3 g c3 t5 (THead (Flat Cast) t0 t3)) (\lambda (H8: +(ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: +T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t5 (THead (Flat +Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g c3 t5 (THead (Flat +Cast) t0 t3)) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) x +t2))).(\lambda (H10: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat Cast) x t2) +(\lambda (t6: T).(ty3 g c3 t6 (THead (Flat Cast) t0 t3))) (ex_ind T (\lambda +(t6: T).(ty3 g c3 t0 t6)) (ty3 g c3 (THead (Flat Cast) x t2) (THead (Flat +Cast) t0 t3)) (\lambda (x0: T).(\lambda (H11: (ty3 g c3 t0 x0)).(ty3_conv g +c3 (THead (Flat Cast) t0 t3) (THead (Flat Cast) x0 t0) (ty3_cast g c3 t3 t0 +(H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) x0 H11) (THead (Flat Cast) x +t2) (THead (Flat Cast) t0 x) (ty3_cast g c3 t2 x (ty3_conv g c3 x t0 (H3 i u +c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7) t2 t3 (H1 i u c3 t2 +(fsubst0_fst i u c t2 c3 H6) e H7) (pc3_s c3 t3 x (pc3_fsubst0 c t3 t3 +(pc3_refl c t3) i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7))) t0 (H3 i +u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat +Cast) t0 t3) (THead (Flat Cast) t0 t3) (pc3_refl c (THead (Flat Cast) t0 t3)) +i u c3 (THead (Flat Cast) t0 x) (fsubst0_both i u c (THead (Flat Cast) t0 t3) +(THead (Flat Cast) t0 x) (subst0_snd (Flat Cast) u x t3 i H10 t0) c3 H6) e +H7)))) (ty3_correct g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e +H7))) t5 H9)))) H8)) (\lambda (H8: (ex2 T (\lambda (t6: T).(eq T t5 (THead +(Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 +t6)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) +(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)) (ty3 g c3 t5 (THead +(Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) +t3 x))).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x)).(eq_ind_r T (THead +(Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c3 t6 (THead (Flat Cast) t0 t3))) +(ty3_cast g c3 x t3 (H1 i u c3 x (fsubst0_both i u c t2 x H10 c3 H6) e H7) t0 +(H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7)) t5 H9)))) H8)) (\lambda +(H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) +u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: +T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: +T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g c3 t5 (THead +(Flat Cast) t0 t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t5 +(THead (Flat Cast) x0 x1))).(\lambda (H10: (subst0 i u t3 x0)).(\lambda (H11: +(subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) +(\lambda (t6: T).(ty3 g c3 t6 (THead (Flat Cast) t0 t3))) (ex_ind T (\lambda +(t6: T).(ty3 g c3 t0 t6)) (ty3 g c3 (THead (Flat Cast) x0 x1) (THead (Flat +Cast) t0 t3)) (\lambda (x: T).(\lambda (H12: (ty3 g c3 t0 x)).(ty3_conv g c3 +(THead (Flat Cast) t0 t3) (THead (Flat Cast) x t0) (ty3_cast g c3 t3 t0 (H3 i +u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) x H12) (THead (Flat Cast) x0 x1) +(THead (Flat Cast) t0 x0) (ty3_cast g c3 x1 x0 (ty3_conv g c3 x0 t0 (H3 i u +c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7) x1 t3 (H1 i u c3 x1 +(fsubst0_both i u c t2 x1 H11 c3 H6) e H7) (pc3_s c3 t3 x0 (pc3_fsubst0 c t3 +t3 (pc3_refl c t3) i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7))) t0 +(H3 i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7)) (pc3_fsubst0 c +(THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 t3) (pc3_refl c (THead (Flat +Cast) t0 t3)) i u c3 (THead (Flat Cast) t0 x0) (fsubst0_both i u c (THead +(Flat Cast) t0 t3) (THead (Flat Cast) t0 x0) (subst0_snd (Flat Cast) u x0 t3 +i H10 t0) c3 H6) e H7)))) (ty3_correct g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst +i u c t3 c3 H6) e H7))) t5 H9)))))) H8)) (subst0_gen_head (Flat Cast) u t3 t2 +t5 i H5)))))))) c2 t4 H4)))))))))))))) c1 t1 t H))))). + +lemma ty3_csubst0: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 +t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c1 +(CHead e (Bind Abbr) u)) \to (\forall (c2: C).((csubst0 i u c1 c2) \to (ty3 g +c2 t1 t2))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g c1 t1 t2)).(\lambda (e: C).(\lambda (u: T).(\lambda (i: +nat).(\lambda (H0: (getl i c1 (CHead e (Bind Abbr) u))).(\lambda (c2: +C).(\lambda (H1: (csubst0 i u c1 c2)).(ty3_fsubst0 g c1 t1 t2 H i u c2 t1 +(fsubst0_fst i u c1 t1 c2 H1) e H0))))))))))). + +lemma ty3_subst0: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((ty3 g c t1 +t) \to (\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead e +(Bind Abbr) u)) \to (\forall (t2: T).((subst0 i u t1 t2) \to (ty3 g c t2 +t))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: +(ty3 g c t1 t)).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H0: (getl i c (CHead e (Bind Abbr) u))).(\lambda (t2: T).(\lambda (H1: +(subst0 i u t1 t2)).(ty3_fsubst0 g c t1 t H i u c t2 (fsubst0_snd i u c t1 t2 +H1) e H0))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd.ma new file mode 100644 index 000000000..560c0df32 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd.ma @@ -0,0 +1,923 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/defs.ma". + +include "basic_1A/pc3/props.ma". + +implied rec lemma ty3_ind (g: G) (P: (C \to (T \to (T \to Prop)))) (f: +(\forall (c: C).(\forall (t2: T).(\forall (t: T).((ty3 g c t2 t) \to ((P c t2 +t) \to (\forall (u: T).(\forall (t1: T).((ty3 g c u t1) \to ((P c u t1) \to +((pc3 c t1 t2) \to (P c u t2)))))))))))) (f0: (\forall (c: C).(\forall (m: +nat).(P c (TSort m) (TSort (next g m)))))) (f1: (\forall (n: nat).(\forall +(c: C).(\forall (d: C).(\forall (u: T).((getl n c (CHead d (Bind Abbr) u)) +\to (\forall (t: T).((ty3 g d u t) \to ((P d u t) \to (P c (TLRef n) (lift (S +n) O t))))))))))) (f2: (\forall (n: nat).(\forall (c: C).(\forall (d: +C).(\forall (u: T).((getl n c (CHead d (Bind Abst) u)) \to (\forall (t: +T).((ty3 g d u t) \to ((P d u t) \to (P c (TLRef n) (lift (S n) O +u))))))))))) (f3: (\forall (c: C).(\forall (u: T).(\forall (t: T).((ty3 g c u +t) \to ((P c u t) \to (\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 +g (CHead c (Bind b) u) t1 t2) \to ((P (CHead c (Bind b) u) t1 t2) \to (P c +(THead (Bind b) u t1) (THead (Bind b) u t2))))))))))))) (f4: (\forall (c: +C).(\forall (w: T).(\forall (u: T).((ty3 g c w u) \to ((P c w u) \to (\forall +(v: T).(\forall (t: T).((ty3 g c v (THead (Bind Abst) u t)) \to ((P c v +(THead (Bind Abst) u t)) \to (P c (THead (Flat Appl) w v) (THead (Flat Appl) +w (THead (Bind Abst) u t))))))))))))) (f5: (\forall (c: C).(\forall (t1: +T).(\forall (t2: T).((ty3 g c t1 t2) \to ((P c t1 t2) \to (\forall (t0: +T).((ty3 g c t2 t0) \to ((P c t2 t0) \to (P c (THead (Flat Cast) t2 t1) +(THead (Flat Cast) t0 t2))))))))))) (c: C) (t: T) (t0: T) (t1: ty3 g c t t0) +on t1: P c t t0 \def match t1 with [(ty3_conv c0 t2 t3 t4 u t5 t6 p) +\Rightarrow (f c0 t2 t3 t4 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 t2 t3 t4) u +t5 t6 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 u t5 t6) p) | (ty3_sort c0 m) +\Rightarrow (f0 c0 m) | (ty3_abbr n c0 d u g0 t2 t3) \Rightarrow (f1 n c0 d u +g0 t2 t3 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) d u t2 t3)) | (ty3_abst n c0 d u +g0 t2 t3) \Rightarrow (f2 n c0 d u g0 t2 t3 ((ty3_ind g P f f0 f1 f2 f3 f4 +f5) d u t2 t3)) | (ty3_bind c0 u t2 t3 b t4 t5 t6) \Rightarrow (f3 c0 u t2 t3 +((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 u t2 t3) b t4 t5 t6 ((ty3_ind g P f f0 +f1 f2 f3 f4 f5) (CHead c0 (Bind b) u) t4 t5 t6)) | (ty3_appl c0 w u t2 v t3 +t4) \Rightarrow (f4 c0 w u t2 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 w u t2) v +t3 t4 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 v (THead (Bind Abst) u t3) t4)) | +(ty3_cast c0 t2 t3 t4 t5 t6) \Rightarrow (f5 c0 t2 t3 t4 ((ty3_ind g P f f0 +f1 f2 f3 f4 f5) c0 t2 t3 t4) t5 t6 ((ty3_ind g P f f0 f1 f2 f3 f4 f5) c0 t3 +t5 t6))]. + +implied rec lemma tys3_ind (g: G) (c: C) (P: (TList \to (T \to Prop))) (f: +(\forall (u: T).(\forall (u0: T).((ty3 g c u u0) \to (P TNil u))))) (f0: +(\forall (t: T).(\forall (u: T).((ty3 g c t u) \to (\forall (ts: +TList).((tys3 g c ts u) \to ((P ts u) \to (P (TCons t ts) u)))))))) (t: +TList) (t0: T) (t1: tys3 g c t t0) on t1: P t t0 \def match t1 with +[(tys3_nil u u0 t2) \Rightarrow (f u u0 t2) | (tys3_cons t2 u t3 ts t4) +\Rightarrow (f0 t2 u t3 ts t4 ((tys3_ind g c P f f0) ts u t4))]. + +lemma ty3_gen_sort: + \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((ty3 g c +(TSort n) x) \to (pc3 c (TSort (next g n)) x))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda +(H: (ty3 g c (TSort n) x)).(insert_eq T (TSort n) (\lambda (t: T).(ty3 g c t +x)) (\lambda (_: T).(pc3 c (TSort (next g n)) x)) (\lambda (y: T).(\lambda +(H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).((eq T t (TSort n)) \to (pc3 c0 (TSort (next g n)) t0))))) (\lambda (c0: +C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda +(_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) t)))).(\lambda (u: +T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u +(TSort n)) \to (pc3 c0 (TSort (next g n)) t1)))).(\lambda (H5: (pc3 c0 t1 +t2)).(\lambda (H6: (eq T u (TSort n))).(let H7 \def (f_equal T T (\lambda (e: +T).e) u (TSort n) H6) in (let H8 \def (eq_ind T u (\lambda (t0: T).((eq T t0 +(TSort n)) \to (pc3 c0 (TSort (next g n)) t1))) H4 (TSort n) H7) in (let H9 +\def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (TSort n) H7) in +(pc3_t t1 c0 (TSort (next g n)) (H8 (refl_equal T (TSort n))) t2 +H5))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T +(TSort m) (TSort n))).(let H2 \def (f_equal T nat (\lambda (e: T).(match e +with [(TSort n0) \Rightarrow n0 | (TLRef _) \Rightarrow m | (THead _ _ _) +\Rightarrow m])) (TSort m) (TSort n) H1) in (eq_ind_r nat n (\lambda (n0: +nat).(pc3 c0 (TSort (next g n)) (TSort (next g n0)))) (pc3_refl c0 (TSort +(next g n))) m H2))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abbr) +u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u +(TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) +(TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) +(lift (S n0) O t)) H5))))))))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda +(d: C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abst) +u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u +(TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) +(TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) +(lift (S n0) O u)) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda +(t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TSort n)) \to +(pc3 c0 (TSort (next g n)) t)))).(\lambda (b: B).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq +T t1 (TSort n)) \to (pc3 (CHead c0 (Bind b) u) (TSort (next g n)) +t2)))).(\lambda (H5: (eq T (THead (Bind b) u t1) (TSort n))).(let H6 \def +(eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) (THead (Bind +b) u t2)) H6))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: +T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TSort n)) \to (pc3 c0 +(TSort (next g n)) u)))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g +c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (TSort n)) \to (pc3 c0 +(TSort (next g n)) (THead (Bind Abst) u t))))).(\lambda (H5: (eq T (THead +(Flat Appl) w v) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in +(False_ind (pc3 c0 (TSort (next g n)) (THead (Flat Appl) w (THead (Bind Abst) +u t))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (pc3 +c0 (TSort (next g n)) t2)))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 +t0)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) +t0)))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TSort n))).(let H6 \def +(eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) +(THead (Flat Cast) t0 t2)) H6))))))))))) c y x H0))) H))))). + +lemma ty3_gen_lref: + \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((ty3 g c +(TLRef n) x) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(pc3 c (lift (S n) O t) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(pc3 c (lift (S n) O u) x)))) (\lambda (e: C).(\lambda +(u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda +(H: (ty3 g c (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(ty3 g c t +x)) (\lambda (_: T).(or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda +(t0: T).(pc3 c (lift (S n) O t0) x)))) (\lambda (e: C).(\lambda (u: +T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0))))) (ex3_3 C T T (\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c (lift (S n) O u) x)))) (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0))))))) +(\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: +C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (ex3_3 C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t1: T).(pc3 c0 (lift (S n) O t1) +t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(ty3 g e +u t1))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 +c0 (lift (S n) O u) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t1: T).(ty3 g e u t1)))))))))) (\lambda (c0: C).(\lambda (t2: +T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 +(TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: +T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t0: T).(ty3 g e u t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t)))) (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u +t0))))))))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u +t1)).(\lambda (H4: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) +(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift +(S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t0: T).(ty3 g e u0 t0))))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: +(eq T u (TLRef n))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (TLRef n) +H6) in (let H8 \def (eq_ind T u (\lambda (t0: T).((eq T t0 (TLRef n)) \to (or +(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t3: T).(pc3 c0 (lift +(S n) O t3) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t3: T).(ty3 g e u0 t3))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t3: T).(ty3 g e u0 t3)))))))) H4 (TLRef n) H7) +in (let H9 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (TLRef n) +H7) in (let H10 \def (H8 (refl_equal T (TLRef n))) in (or_ind (ex3_3 C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) +t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g +e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: +T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0))))) (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) +(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift +(S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t0: T).(ty3 g e u0 t0)))))) (\lambda (H11: (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 +t0)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: +T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0)))) (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) +(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift +(S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t0: T).(ty3 g e u0 t0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (H12: (pc3 c0 (lift (S n) O x2) t1)).(\lambda (H13: (getl n c0 +(CHead x0 (Bind Abbr) x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_introl +(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift +(S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) +t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g +e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 (lift (S n) O x2) H12 t2 H5) H13 +H14)))))))) H11)) (\lambda (H11: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))).(ex3_3_ind C T T +(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) +t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g +e u0 t0)))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: +T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H12: (pc3 c0 +(lift (S n) O x1) t1)).(\lambda (H13: (getl n c0 (CHead x0 (Bind Abst) +x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_intror (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) +(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift +(S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 +(lift (S n) O x1) H12 t2 H5) H13 H14)))))))) H11)) H10)))))))))))))))) +(\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (TLRef +n))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (TLRef n) H1) in (False_ind (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) (TSort (next g +m)))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 +(lift (S n) O u) (TSort (next g m)))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) H2))))) (\lambda (n0: +nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H1: (getl n0 +c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d u +t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) +(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 d (lift (S +n) O u0) t)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d +(CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: +T).(ty3 g e u0 t0))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 +\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow n0 | +(TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef +n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n1: nat).(getl n1 c0 (CHead d +(Bind Abbr) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C +T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O +t0) (lift (S n1) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O t))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 +t0))))))) (or_introl (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda +(t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O t))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 +C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O +u0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O +t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g +e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O t)) H6 H2)) n0 H5)))))))))))) +(\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(H1: (getl n0 c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H2: (ty3 +g d u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) +(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 d (lift (S +n) O u0) t)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n d +(CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: +T).(ty3 g e u0 t0))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 +\def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow n0 | +(TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef +n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n1: nat).(getl n1 c0 (CHead d +(Bind Abst) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C +T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O +t0) (lift (S n1) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O u))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 +t0))))))) (or_intror (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda +(t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O u))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 +C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O +u0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O +u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g +e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O u)) H6 H2)) n0 H5)))))))))))) +(\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u +t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda +(e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) +(ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift +(S n) O u0) t)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 +(CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: +T).(ty3 g e u0 t0))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 +(TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: +T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O t0) t2)))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e +(Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g +e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: +T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O u0) t2)))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e +(Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g +e u0 t0))))))))).(\lambda (H5: (eq T (THead (Bind b) u t1) (TLRef n))).(let +H6 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda +(_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead +(Bind b) u t2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind b) u t2))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 +t0)))))) H6))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: +T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TLRef n)) \to (or +(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S +n) O t) u)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 +(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t: +T).(ty3 g e u0 t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(pc3 c0 (lift (S n) O u0) u)))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t: T).(ty3 g e u0 t))))))))).(\lambda (v: +T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u +t))).(\lambda (_: (((eq T v (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead (Bind +Abst) u t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 +(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: +T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind Abst) u t))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 +t0))))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TLRef n))).(let H6 +\def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda +(_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead +(Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T +(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) +(THead (Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda +(u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) H6)))))))))))) +(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 +t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda +(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T +T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) +t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq +T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(pc3 c0 (lift (S n) O t) t0)))) (\lambda (e: C).(\lambda (u: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t0)))) +(\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u +t))))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TLRef n))).(let H6 +\def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda +(_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) (THead (Flat +Cast) t0 t2))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 +(CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: +T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(pc3 c0 (lift (S n) O u) (THead (Flat Cast) t0 t2))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) +H6))))))))))) c y x H0))) H))))). + +lemma ty3_gen_bind: + \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t1: +T).(\forall (x: T).((ty3 g c (THead (Bind b) u t1) x) \to (ex3_2 T T (\lambda +(t2: T).(\lambda (_: T).(pc3 c (THead (Bind b) u t2) x))) (\lambda (_: +T).(\lambda (t: T).(ty3 g c u t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g +(CHead c (Bind b) u) t1 t2)))))))))) +\def + \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Bind b) u t1) x)).(insert_eq +T (THead (Bind b) u t1) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(ex3_2 +T T (\lambda (t2: T).(\lambda (_: T).(pc3 c (THead (Bind b) u t2) x))) +(\lambda (_: T).(\lambda (t0: T).(ty3 g c u t0))) (\lambda (t2: T).(\lambda +(_: T).(ty3 g (CHead c (Bind b) u) t1 t2))))) (\lambda (y: T).(\lambda (H0: +(ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).((eq T t (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda +(_: T).(pc3 c0 (THead (Bind b) u t2) t0))) (\lambda (_: T).(\lambda (t3: +T).(ty3 g c0 u t3))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind +b) u) t1 t2)))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (THead (Bind b) u +t1)) \to (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) +u t3) t))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u t0))) (\lambda (t3: +T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))))))).(\lambda (u0: +T).(\lambda (t0: T).(\lambda (H3: (ty3 g c0 u0 t0)).(\lambda (H4: (((eq T u0 +(THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 +c0 (THead (Bind b) u t3) t0))) (\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u +t4))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 +t3))))))).(\lambda (H5: (pc3 c0 t0 t2)).(\lambda (H6: (eq T u0 (THead (Bind +b) u t1))).(let H7 \def (f_equal T T (\lambda (e: T).e) u0 (THead (Bind b) u +t1) H6) in (let H8 \def (eq_ind T u0 (\lambda (t3: T).((eq T t3 (THead (Bind +b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 c0 (THead +(Bind b) u t4) t0))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c0 u t5))) +(\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))))) H4 +(THead (Bind b) u t1) H7) in (let H9 \def (eq_ind T u0 (\lambda (t3: T).(ty3 +g c0 t3 t0)) H3 (THead (Bind b) u t1) H7) in (let H10 \def (H8 (refl_equal T +(THead (Bind b) u t1))) in (ex3_2_ind T T (\lambda (t3: T).(\lambda (_: +T).(pc3 c0 (THead (Bind b) u t3) t0))) (\lambda (_: T).(\lambda (t4: T).(ty3 +g c0 u t4))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 +t3))) (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u +t3) t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u t4))) (\lambda (t3: +T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H11: (pc3 c0 (THead (Bind b) u x0) +t0)).(\lambda (H12: (ty3 g c0 u x1)).(\lambda (H13: (ty3 g (CHead c0 (Bind b) +u) t1 x0)).(ex3_2_intro T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead +(Bind b) u t3) t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u t4))) +(\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))) x0 x1 +(pc3_t t0 c0 (THead (Bind b) u x0) H11 t2 H5) H12 H13)))))) +H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T +(TSort m) (THead (Bind b) u t1))).(let H2 \def (eq_ind T (TSort m) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow +False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H1) in +(False_ind (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind +b) u t2) (TSort (next g m))))) (\lambda (_: T).(\lambda (t: T).(ty3 g c0 u +t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) +H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: +T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: +T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u +t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 d (THead (Bind b) u +t2) t))) (\lambda (_: T).(\lambda (t0: T).(ty3 g d u t0))) (\lambda (t2: +T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2))))))).(\lambda (H4: (eq +T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in +(False_ind (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind +b) u t2) (lift (S n) O t)))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u +t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) +H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda +(u0: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: +T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u +t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 d (THead (Bind b) u +t2) t))) (\lambda (_: T).(\lambda (t0: T).(ty3 g d u t0))) (\lambda (t2: +T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2))))))).(\lambda (H4: (eq +T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in +(False_ind (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind +b) u t2) (lift (S n) O u0)))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u +t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) +H5))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (H1: +(ty3 g c0 u0 t)).(\lambda (H2: (((eq T u0 (THead (Bind b) u t1)) \to (ex3_2 T +T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t))) +(\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u t0))) (\lambda (t2: T).(\lambda +(_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2))))))).(\lambda (b0: B).(\lambda +(t0: T).(\lambda (t2: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b0) u0) t0 +t2)).(\lambda (H4: (((eq T t0 (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda +(t3: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) +t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g (CHead c0 (Bind b0) u0) u t4))) +(\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind +b) u) t1 t3))))))).(\lambda (H5: (eq T (THead (Bind b0) u0 t0) (THead (Bind +b) u t1))).(let H6 \def (f_equal T B (\lambda (e: T).(match e with [(TSort _) +\Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match +k with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind +b0) u0 t0) (THead (Bind b) u t1) H5) in ((let H7 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | +(THead _ t3 _) \Rightarrow t3])) (THead (Bind b0) u0 t0) (THead (Bind b) u +t1) H5) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t3) \Rightarrow +t3])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H5) in (\lambda (H9: (eq +T u0 u)).(\lambda (H10: (eq B b0 b)).(let H11 \def (eq_ind T t0 (\lambda (t3: +T).((eq T t3 (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda +(_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t4) t2))) (\lambda (_: +T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b0) u0) u t5))) (\lambda (t4: +T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 +t4)))))) H4 t1 H8) in (let H12 \def (eq_ind T t0 (\lambda (t3: T).(ty3 g +(CHead c0 (Bind b0) u0) t3 t2)) H3 t1 H8) in (let H13 \def (eq_ind B b0 +(\lambda (b1: B).((eq T t1 (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda +(t3: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b1) u0) (THead (Bind b) u t3) +t2))) (\lambda (_: T).(\lambda (t4: T).(ty3 g (CHead c0 (Bind b1) u0) u t4))) +(\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b1) u0) (Bind +b) u) t1 t3)))))) H11 b H10) in (let H14 \def (eq_ind B b0 (\lambda (b1: +B).(ty3 g (CHead c0 (Bind b1) u0) t1 t2)) H12 b H10) in (eq_ind_r B b +(\lambda (b1: B).(ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead +(Bind b) u t3) (THead (Bind b1) u0 t2)))) (\lambda (_: T).(\lambda (t4: +T).(ty3 g c0 u t4))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind +b) u) t1 t3))))) (let H15 \def (eq_ind T u0 (\lambda (t3: T).((eq T t1 (THead +(Bind b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 (CHead +c0 (Bind b) t3) (THead (Bind b) u t4) t2))) (\lambda (_: T).(\lambda (t5: +T).(ty3 g (CHead c0 (Bind b) t3) u t5))) (\lambda (t4: T).(\lambda (_: +T).(ty3 g (CHead (CHead c0 (Bind b) t3) (Bind b) u) t1 t4)))))) H13 u H9) in +(let H16 \def (eq_ind T u0 (\lambda (t3: T).(ty3 g (CHead c0 (Bind b) t3) t1 +t2)) H14 u H9) in (let H17 \def (eq_ind T u0 (\lambda (t3: T).((eq T t3 +(THead (Bind b) u t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 +c0 (THead (Bind b) u t4) t))) (\lambda (_: T).(\lambda (t5: T).(ty3 g c0 u +t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 +t4)))))) H2 u H9) in (let H18 \def (eq_ind T u0 (\lambda (t3: T).(ty3 g c0 t3 +t)) H1 u H9) in (eq_ind_r T u (\lambda (t3: T).(ex3_2 T T (\lambda (t4: +T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Bind b) t3 t2)))) +(\lambda (_: T).(\lambda (t5: T).(ty3 g c0 u t5))) (\lambda (t4: T).(\lambda +(_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4))))) (ex3_2_intro T T (\lambda (t3: +T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) (THead (Bind b) u t2)))) +(\lambda (_: T).(\lambda (t4: T).(ty3 g c0 u t4))) (\lambda (t3: T).(\lambda +(_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))) t2 t (pc3_refl c0 (THead (Bind +b) u t2)) H18 H16) u0 H9))))) b0 H10)))))))) H7)) H6))))))))))))) (\lambda +(c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w +u0)).(\lambda (_: (((eq T w (THead (Bind b) u t1)) \to (ex3_2 T T (\lambda +(t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) u0))) (\lambda (_: +T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t2: T).(\lambda (_: T).(ty3 g +(CHead c0 (Bind b) u) t1 t2))))))).(\lambda (v: T).(\lambda (t: T).(\lambda +(_: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (_: (((eq T v (THead +(Bind b) u t1)) \to (ex3_2 T T (\lambda (t2: T).(\lambda (_: T).(pc3 c0 +(THead (Bind b) u t2) (THead (Bind Abst) u0 t)))) (\lambda (_: T).(\lambda +(t0: T).(ty3 g c0 u t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 +(Bind b) u) t1 t2))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead +(Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat +_) \Rightarrow True])])) I (THead (Bind b) u t1) H5) in (False_ind (ex3_2 T T +(\lambda (t2: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (THead (Flat +Appl) w (THead (Bind Abst) u0 t))))) (\lambda (_: T).(\lambda (t0: T).(ty3 g +c0 u t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 +t2)))) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u +t1)) \to (ex3_2 T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) +u t3) t2))) (\lambda (_: T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t3: +T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3))))))).(\lambda (t3: +T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (_: (((eq T t2 (THead (Bind b) u +t1)) \to (ex3_2 T T (\lambda (t4: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) +u t4) t3))) (\lambda (_: T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t4: +T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4))))))).(\lambda (H5: +(eq T (THead (Flat Cast) t2 t0) (THead (Bind b) u t1))).(let H6 \def (eq_ind +T (THead (Flat Cast) t2 t0) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind b) u t1) H5) in (False_ind (ex3_2 T T (\lambda (t4: T).(\lambda +(_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Flat Cast) t3 t2)))) (\lambda +(_: T).(\lambda (t: T).(ty3 g c0 u t))) (\lambda (t4: T).(\lambda (_: T).(ty3 +g (CHead c0 (Bind b) u) t1 t4)))) H6))))))))))) c y x H0))) H))))))). + +lemma ty3_gen_appl: + \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x: +T).((ty3 g c (THead (Flat Appl) w v) x) \to (ex3_2 T T (\lambda (u: +T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) +(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) +(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (v: T).(\lambda (x: +T).(\lambda (H: (ty3 g c (THead (Flat Appl) w v) x)).(insert_eq T (THead +(Flat Appl) w v) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(ex3_2 T T +(\lambda (u: T).(\lambda (t0: T).(pc3 c (THead (Flat Appl) w (THead (Bind +Abst) u t0)) x))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c v (THead (Bind +Abst) u t0)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c w u))))) (\lambda (y: +T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda +(u: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u +t1)) t0))) (\lambda (u: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u +t1)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))))) (\lambda (c0: +C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda +(_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: +T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) +t))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u t0)))) +(\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (u: T).(\lambda +(t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (THead (Flat +Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead +(Flat Appl) w (THead (Bind Abst) u0 t0)) t1))) (\lambda (u0: T).(\lambda (t0: +T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: +T).(ty3 g c0 w u0))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u +(THead (Flat Appl) w v))).(let H7 \def (f_equal T T (\lambda (e: T).e) u +(THead (Flat Appl) w v) H6) in (let H8 \def (eq_ind T u (\lambda (t0: T).((eq +T t0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t3: +T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t3)) t1))) (\lambda +(u0: T).(\lambda (t3: T).(ty3 g c0 v (THead (Bind Abst) u0 t3)))) (\lambda +(u0: T).(\lambda (_: T).(ty3 g c0 w u0)))))) H4 (THead (Flat Appl) w v) H7) +in (let H9 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (THead +(Flat Appl) w v) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat Appl) w +v))) in (ex3_2_ind T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat +Appl) w (THead (Bind Abst) u0 t0)) t1))) (\lambda (u0: T).(\lambda (t0: +T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: +T).(ty3 g c0 w u0))) (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 +(THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: +T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: +T).(\lambda (_: T).(ty3 g c0 w u0)))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H11: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) +t1)).(\lambda (H12: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (H13: +(ty3 g c0 w x0)).(ex3_2_intro T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 +(THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: +T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: +T).(\lambda (_: T).(ty3 g c0 w u0))) x0 x1 (pc3_t t1 c0 (THead (Flat Appl) w +(THead (Bind Abst) x0 x1)) H11 t2 H5) H12 H13)))))) H10)))))))))))))))) +(\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Flat +Appl) w v))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow False])) I (THead (Flat Appl) w v) H1) in (False_ind (ex3_2 T T +(\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind +Abst) u t)) (TSort (next g m))))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v +(THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) +H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda +(_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 +T T (\lambda (u0: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead +(Bind Abst) u0 t0)) t))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g d v (THead +(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g d w +u0))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 +\def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: +T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) +(lift (S n) O t)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead +(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) +H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda +(_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 +T T (\lambda (u0: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead +(Bind Abst) u0 t0)) t))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g d v (THead +(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g d w +u0))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 +\def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: +T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) +(lift (S n) O u)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead +(Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) +H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: +(ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T +T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind +Abst) u0 t0)) t))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind +Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w +u0))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 +g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (THead (Flat Appl) w +v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 (CHead c0 (Bind b) +u) (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: +T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) v (THead (Bind Abst) u0 +t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) w +u0))))))).(\lambda (H5: (eq T (THead (Bind b) u t1) (THead (Flat Appl) w +v))).(let H6 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ +_) \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) +\Rightarrow False])])) I (THead (Flat Appl) w v) H5) in (False_ind (ex3_2 T T +(\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind +Abst) u0 t0)) (THead (Bind b) u t2)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 +g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g +c0 w u0)))) H6))))))))))))) (\lambda (c0: C).(\lambda (w0: T).(\lambda (u: +T).(\lambda (H1: (ty3 g c0 w0 u)).(\lambda (H2: (((eq T w0 (THead (Flat Appl) +w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 c0 (THead (Flat +Appl) w (THead (Bind Abst) u0 t)) u))) (\lambda (u0: T).(\lambda (t: T).(ty3 +g c0 v (THead (Bind Abst) u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 +w u0))))))).(\lambda (v0: T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 v0 +(THead (Bind Abst) u t))).(\lambda (H4: (((eq T v0 (THead (Flat Appl) w v)) +\to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w +(THead (Bind Abst) u0 t0)) (THead (Bind Abst) u t)))) (\lambda (u0: +T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: +T).(\lambda (_: T).(ty3 g c0 w u0))))))).(\lambda (H5: (eq T (THead (Flat +Appl) w0 v0) (THead (Flat Appl) w v))).(let H6 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow w0 | (TLRef _) \Rightarrow w0 | +(THead _ t0 _) \Rightarrow t0])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) +w v) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort +_) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ _ t0) \Rightarrow +t0])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v) H5) in (\lambda (H8: +(eq T w0 w)).(let H9 \def (eq_ind T v0 (\lambda (t0: T).((eq T t0 (THead +(Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 +(THead (Flat Appl) w (THead (Bind Abst) u0 t1)) (THead (Bind Abst) u t)))) +(\lambda (u0: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) +(\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))))) H4 v H7) in (let H10 +\def (eq_ind T v0 (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H3 +v H7) in (let H11 \def (eq_ind T w0 (\lambda (t0: T).((eq T t0 (THead (Flat +Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead +(Flat Appl) w (THead (Bind Abst) u0 t1)) u))) (\lambda (u0: T).(\lambda (t1: +T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) (\lambda (u0: T).(\lambda (_: +T).(ty3 g c0 w u0)))))) H2 w H8) in (let H12 \def (eq_ind T w0 (\lambda (t0: +T).(ty3 g c0 t0 u)) H1 w H8) in (eq_ind_r T w (\lambda (t0: T).(ex3_2 T T +(\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind +Abst) u0 t1)) (THead (Flat Appl) t0 (THead (Bind Abst) u t))))) (\lambda (u0: +T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) (\lambda (u0: +T).(\lambda (_: T).(ty3 g c0 w u0))))) (ex3_2_intro T T (\lambda (u0: +T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) +(THead (Flat Appl) w (THead (Bind Abst) u t))))) (\lambda (u0: T).(\lambda +(t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda +(_: T).(ty3 g c0 w u0))) u t (pc3_refl c0 (THead (Flat Appl) w (THead (Bind +Abst) u t))) H10 H12) w0 H8))))))) H6)))))))))))) (\lambda (c0: C).(\lambda +(t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T +t1 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: +T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t2))) (\lambda (u: +T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: +T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (t0: T).(\lambda (_: (ty3 g +c0 t2 t0)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T +(\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind +Abst) u t)) t0))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind +Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda +(H5: (eq T (THead (Flat Cast) t2 t1) (THead (Flat Appl) w v))).(let H6 \def +(eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow +(match f with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead +(Flat Appl) w v) H5) in (False_ind (ex3_2 T T (\lambda (u: T).(\lambda (t: +T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (THead (Flat Cast) +t0 t2)))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u +t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) H6))))))))))) c y x +H0))) H)))))). + +lemma ty3_gen_cast: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall +(x: T).((ty3 g c (THead (Flat Cast) t2 t1) x) \to (ex3 T (\lambda (t0: +T).(pc3 c (THead (Flat Cast) t0 t2) x)) (\lambda (_: T).(ty3 g c t1 t2)) +(\lambda (t0: T).(ty3 g c t2 t0)))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(x: T).(\lambda (H: (ty3 g c (THead (Flat Cast) t2 t1) x)).(insert_eq T +(THead (Flat Cast) t2 t1) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(ex3 +T (\lambda (t0: T).(pc3 c (THead (Flat Cast) t0 t2) x)) (\lambda (_: T).(ty3 +g c t1 t2)) (\lambda (t0: T).(ty3 g c t2 t0)))) (\lambda (y: T).(\lambda (H0: +(ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).((eq T t (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t3: T).(pc3 c0 +(THead (Flat Cast) t3 t2) t0)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda +(t3: T).(ty3 g c0 t2 t3))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 t0 t)).(\lambda (_: (((eq T t0 (THead (Flat Cast) +t2 t1)) \to (ex3 T (\lambda (t3: T).(pc3 c0 (THead (Flat Cast) t3 t2) t)) +(\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t3: T).(ty3 g c0 t2 +t3)))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (H3: (ty3 g c0 u +t3)).(\lambda (H4: (((eq T u (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda +(t4: T).(pc3 c0 (THead (Flat Cast) t4 t2) t3)) (\lambda (_: T).(ty3 g c0 t1 +t2)) (\lambda (t4: T).(ty3 g c0 t2 t4)))))).(\lambda (H5: (pc3 c0 t3 +t0)).(\lambda (H6: (eq T u (THead (Flat Cast) t2 t1))).(let H7 \def (f_equal +T T (\lambda (e: T).e) u (THead (Flat Cast) t2 t1) H6) in (let H8 \def +(eq_ind T u (\lambda (t4: T).((eq T t4 (THead (Flat Cast) t2 t1)) \to (ex3 T +(\lambda (t5: T).(pc3 c0 (THead (Flat Cast) t5 t2) t3)) (\lambda (_: T).(ty3 +g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5))))) H4 (THead (Flat Cast) t2 +t1) H7) in (let H9 \def (eq_ind T u (\lambda (t4: T).(ty3 g c0 t4 t3)) H3 +(THead (Flat Cast) t2 t1) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat +Cast) t2 t1))) in (ex3_ind T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 +t2) t3)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t4: T).(ty3 g c0 t2 t4)) +(ex3 T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 t2) t0)) (\lambda (_: +T).(ty3 g c0 t1 t2)) (\lambda (t4: T).(ty3 g c0 t2 t4))) (\lambda (x0: +T).(\lambda (H11: (pc3 c0 (THead (Flat Cast) x0 t2) t3)).(\lambda (H12: (ty3 +g c0 t1 t2)).(\lambda (H13: (ty3 g c0 t2 x0)).(ex3_intro T (\lambda (t4: +T).(pc3 c0 (THead (Flat Cast) t4 t2) t0)) (\lambda (_: T).(ty3 g c0 t1 t2)) +(\lambda (t4: T).(ty3 g c0 t2 t4)) x0 (pc3_t t3 c0 (THead (Flat Cast) x0 t2) +H11 t0 H5) H12 H13))))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: +nat).(\lambda (H1: (eq T (TSort m) (THead (Flat Cast) t2 t1))).(let H2 \def +(eq_ind T (TSort m) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I +(THead (Flat Cast) t2 t1) H1) in (False_ind (ex3 T (\lambda (t0: T).(pc3 c0 +(THead (Flat Cast) t0 t2) (TSort (next g m)))) (\lambda (_: T).(ty3 g c0 t1 +t2)) (\lambda (t0: T).(ty3 g c0 t2 t0))) H2))))) (\lambda (n: nat).(\lambda +(c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d +(Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: +(((eq T u (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t0: T).(pc3 d +(THead (Flat Cast) t0 t2) t)) (\lambda (_: T).(ty3 g d t1 t2)) (\lambda (t0: +T).(ty3 g d t2 t0)))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Cast) t2 +t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in (False_ind (ex3 T +(\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (lift (S n) O t))) +(\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 t0))) +H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda +(_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (ex3 +T (\lambda (t0: T).(pc3 d (THead (Flat Cast) t0 t2) t)) (\lambda (_: T).(ty3 +g d t1 t2)) (\lambda (t0: T).(ty3 g d t2 t0)))))).(\lambda (H4: (eq T (TLRef +n) (THead (Flat Cast) t2 t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in +(False_ind (ex3 T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (lift (S +n) O u))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 +t0))) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda +(_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to +(ex3 T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) t)) (\lambda (_: +T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 t0)))))).(\lambda (b: +B).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) +u) t0 t3)).(\lambda (_: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (ex3 T +(\lambda (t4: T).(pc3 (CHead c0 (Bind b) u) (THead (Flat Cast) t4 t2) t3)) +(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t4: T).(ty3 g +(CHead c0 (Bind b) u) t2 t4)))))).(\lambda (H5: (eq T (THead (Bind b) u t0) +(THead (Flat Cast) t2 t1))).(let H6 \def (eq_ind T (THead (Bind b) u t0) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t2 +t1) H5) in (False_ind (ex3 T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 +t2) (THead (Bind b) u t3))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t4: +T).(ty3 g c0 t2 t4))) H6))))))))))))) (\lambda (c0: C).(\lambda (w: +T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (THead +(Flat Cast) t2 t1)) \to (ex3 T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 +t2) u)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 +t0)))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead +(Bind Abst) u t))).(\lambda (_: (((eq T v (THead (Flat Cast) t2 t1)) \to (ex3 +T (\lambda (t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (THead (Bind Abst) u +t))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 +t0)))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead (Flat Cast) t2 +t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k +_ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) +\Rightarrow (match f with [Appl \Rightarrow True | Cast \Rightarrow +False])])])) I (THead (Flat Cast) t2 t1) H5) in (False_ind (ex3 T (\lambda +(t0: T).(pc3 c0 (THead (Flat Cast) t0 t2) (THead (Flat Appl) w (THead (Bind +Abst) u t)))) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t0: T).(ty3 g c0 t2 +t0))) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: +T).(\lambda (H1: (ty3 g c0 t0 t3)).(\lambda (H2: (((eq T t0 (THead (Flat +Cast) t2 t1)) \to (ex3 T (\lambda (t4: T).(pc3 c0 (THead (Flat Cast) t4 t2) +t3)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t4: T).(ty3 g c0 t2 +t4)))))).(\lambda (t4: T).(\lambda (H3: (ty3 g c0 t3 t4)).(\lambda (H4: (((eq +T t3 (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t5: T).(pc3 c0 (THead +(Flat Cast) t5 t2) t4)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t5: +T).(ty3 g c0 t2 t5)))))).(\lambda (H5: (eq T (THead (Flat Cast) t3 t0) (THead +(Flat Cast) t2 t1))).(let H6 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ t _) +\Rightarrow t])) (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in +((let H7 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) +(THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in (\lambda (H8: (eq +T t3 t2)).(let H9 \def (eq_ind T t3 (\lambda (t: T).((eq T t (THead (Flat +Cast) t2 t1)) \to (ex3 T (\lambda (t5: T).(pc3 c0 (THead (Flat Cast) t5 t2) +t4)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5))))) +H4 t2 H8) in (let H10 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t t4)) H3 +t2 H8) in (let H11 \def (eq_ind T t3 (\lambda (t: T).((eq T t0 (THead (Flat +Cast) t2 t1)) \to (ex3 T (\lambda (t5: T).(pc3 c0 (THead (Flat Cast) t5 t2) +t)) (\lambda (_: T).(ty3 g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5))))) +H2 t2 H8) in (let H12 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t0 t)) H1 +t2 H8) in (eq_ind_r T t2 (\lambda (t: T).(ex3 T (\lambda (t5: T).(pc3 c0 +(THead (Flat Cast) t5 t2) (THead (Flat Cast) t4 t))) (\lambda (_: T).(ty3 g +c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5)))) (let H13 \def (eq_ind T t0 +(\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (ex3 T (\lambda (t5: +T).(pc3 c0 (THead (Flat Cast) t5 t2) t2)) (\lambda (_: T).(ty3 g c0 t1 t2)) +(\lambda (t5: T).(ty3 g c0 t2 t5))))) H11 t1 H7) in (let H14 \def (eq_ind T +t0 (\lambda (t: T).(ty3 g c0 t t2)) H12 t1 H7) in (ex3_intro T (\lambda (t5: +T).(pc3 c0 (THead (Flat Cast) t5 t2) (THead (Flat Cast) t4 t2))) (\lambda (_: +T).(ty3 g c0 t1 t2)) (\lambda (t5: T).(ty3 g c0 t2 t5)) t4 (pc3_refl c0 +(THead (Flat Cast) t4 t2)) H14 H10))) t3 H8))))))) H6))))))))))) c y x H0))) +H)))))). + +lemma tys3_gen_nil: + \forall (g: G).(\forall (c: C).(\forall (u: T).((tys3 g c TNil u) \to (ex T +(\lambda (u0: T).(ty3 g c u u0)))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (tys3 g c TNil +u)).(insert_eq TList TNil (\lambda (t: TList).(tys3 g c t u)) (\lambda (_: +TList).(ex T (\lambda (u0: T).(ty3 g c u u0)))) (\lambda (y: TList).(\lambda +(H0: (tys3 g c y u)).(tys3_ind g c (\lambda (t: TList).(\lambda (t0: T).((eq +TList t TNil) \to (ex T (\lambda (u0: T).(ty3 g c t0 u0)))))) (\lambda (u0: +T).(\lambda (u1: T).(\lambda (H1: (ty3 g c u0 u1)).(\lambda (_: (eq TList +TNil TNil)).(ex_intro T (\lambda (u2: T).(ty3 g c u0 u2)) u1 H1))))) (\lambda +(t: T).(\lambda (u0: T).(\lambda (_: (ty3 g c t u0)).(\lambda (ts: +TList).(\lambda (_: (tys3 g c ts u0)).(\lambda (_: (((eq TList ts TNil) \to +(ex T (\lambda (u1: T).(ty3 g c u0 u1)))))).(\lambda (H4: (eq TList (TCons t +ts) TNil)).(let H5 \def (eq_ind TList (TCons t ts) (\lambda (ee: +TList).(match ee with [TNil \Rightarrow False | (TCons _ _) \Rightarrow +True])) I TNil H4) in (False_ind (ex T (\lambda (u1: T).(ty3 g c u0 u1))) +H5))))))))) y u H0))) H)))). + +lemma tys3_gen_cons: + \forall (g: G).(\forall (c: C).(\forall (ts: TList).(\forall (t: T).(\forall +(u: T).((tys3 g c (TCons t ts) u) \to (land (ty3 g c t u) (tys3 g c ts +u))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (ts: TList).(\lambda (t: T).(\lambda +(u: T).(\lambda (H: (tys3 g c (TCons t ts) u)).(insert_eq TList (TCons t ts) +(\lambda (t0: TList).(tys3 g c t0 u)) (\lambda (_: TList).(land (ty3 g c t u) +(tys3 g c ts u))) (\lambda (y: TList).(\lambda (H0: (tys3 g c y u)).(tys3_ind +g c (\lambda (t0: TList).(\lambda (t1: T).((eq TList t0 (TCons t ts)) \to +(land (ty3 g c t t1) (tys3 g c ts t1))))) (\lambda (u0: T).(\lambda (u1: +T).(\lambda (_: (ty3 g c u0 u1)).(\lambda (H2: (eq TList TNil (TCons t +ts))).(let H3 \def (eq_ind TList TNil (\lambda (ee: TList).(match ee with +[TNil \Rightarrow True | (TCons _ _) \Rightarrow False])) I (TCons t ts) H2) +in (False_ind (land (ty3 g c t u0) (tys3 g c ts u0)) H3)))))) (\lambda (t0: +T).(\lambda (u0: T).(\lambda (H1: (ty3 g c t0 u0)).(\lambda (ts0: +TList).(\lambda (H2: (tys3 g c ts0 u0)).(\lambda (H3: (((eq TList ts0 (TCons +t ts)) \to (land (ty3 g c t u0) (tys3 g c ts u0))))).(\lambda (H4: (eq TList +(TCons t0 ts0) (TCons t ts))).(let H5 \def (f_equal TList T (\lambda (e: +TList).(match e with [TNil \Rightarrow t0 | (TCons t1 _) \Rightarrow t1])) +(TCons t0 ts0) (TCons t ts) H4) in ((let H6 \def (f_equal TList TList +(\lambda (e: TList).(match e with [TNil \Rightarrow ts0 | (TCons _ t1) +\Rightarrow t1])) (TCons t0 ts0) (TCons t ts) H4) in (\lambda (H7: (eq T t0 +t)).(let H8 \def (eq_ind TList ts0 (\lambda (t1: TList).((eq TList t1 (TCons +t ts)) \to (land (ty3 g c t u0) (tys3 g c ts u0)))) H3 ts H6) in (let H9 \def +(eq_ind TList ts0 (\lambda (t1: TList).(tys3 g c t1 u0)) H2 ts H6) in (let +H10 \def (eq_ind T t0 (\lambda (t1: T).(ty3 g c t1 u0)) H1 t H7) in (conj +(ty3 g c t u0) (tys3 g c ts u0) H10 H9)))))) H5))))))))) y u H0))) H)))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd_nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd_nf2.ma new file mode 100644 index 000000000..7d5c0bec2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/fwd_nf2.ma @@ -0,0 +1,284 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/arity_props.ma". + +include "basic_1A/pc3/nf2.ma". + +include "basic_1A/nf2/fwd.ma". + +lemma ty3_gen_appl_nf2: + \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x: +T).((ty3 g c (THead (Flat Appl) w v) x) \to (ex4_2 T T (\lambda (u: +T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) +(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) +(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: +T).(nf2 c (THead (Bind Abst) u t)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (v: T).(\lambda (x: +T).(\lambda (H: (ty3 g c (THead (Flat Appl) w v) x)).(ex3_2_ind T T (\lambda +(u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) +x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) +(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (ex4_2 T T (\lambda (u: +T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) +(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) +(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: +T).(nf2 c (THead (Bind Abst) u t))))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H0: (pc3 c (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) +x)).(\lambda (H1: (ty3 g c v (THead (Bind Abst) x0 x1))).(\lambda (H2: (ty3 g +c w x0)).(let H_x \def (ty3_correct g c v (THead (Bind Abst) x0 x1) H1) in +(let H3 \def H_x in (ex_ind T (\lambda (t: T).(ty3 g c (THead (Bind Abst) x0 +x1) t)) (ex4_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) +w (THead (Bind Abst) u t)) x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v +(THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) +(\lambda (u: T).(\lambda (t: T).(nf2 c (THead (Bind Abst) u t))))) (\lambda +(x2: T).(\lambda (H4: (ty3 g c (THead (Bind Abst) x0 x1) x2)).(let H_x0 \def +(ty3_correct g c w x0 H2) in (let H5 \def H_x0 in (ex_ind T (\lambda (t: +T).(ty3 g c x0 t)) (ex4_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c (THead +(Flat Appl) w (THead (Bind Abst) u t)) x))) (\lambda (u: T).(\lambda (t: +T).(ty3 g c v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 +g c w u))) (\lambda (u: T).(\lambda (t: T).(nf2 c (THead (Bind Abst) u t))))) +(\lambda (x3: T).(\lambda (H6: (ty3 g c x0 x3)).(let H7 \def (ty3_sn3 g c +(THead (Bind Abst) x0 x1) x2 H4) in (let H_x1 \def (nf2_sn3 c (THead (Bind +Abst) x0 x1) H7) in (let H8 \def H_x1 in (ex2_ind T (\lambda (u: T).(pr3 c +(THead (Bind Abst) x0 x1) u)) (\lambda (u: T).(nf2 c u)) (ex4_2 T T (\lambda +(u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) +x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) +(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: +T).(nf2 c (THead (Bind Abst) u t))))) (\lambda (x4: T).(\lambda (H9: (pr3 c +(THead (Bind Abst) x0 x1) x4)).(\lambda (H10: (nf2 c x4)).(let H11 \def +(pr3_gen_abst c x0 x1 x4 H9) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x4 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u: T).(pr3 (CHead c (Bind b) u) x1 t2))))) (ex4_2 T T (\lambda (u: +T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) +(\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) +(\lambda (u: T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: +T).(nf2 c (THead (Bind Abst) u t))))) (\lambda (x5: T).(\lambda (x6: +T).(\lambda (H12: (eq T x4 (THead (Bind Abst) x5 x6))).(\lambda (H13: (pr3 c +x0 x5)).(\lambda (H14: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind +b) u) x1 x6))))).(let H15 \def (eq_ind T x4 (\lambda (t: T).(nf2 c t)) H10 +(THead (Bind Abst) x5 x6) H12) in (let H16 \def (pr3_head_12 c x0 x5 H13 +(Bind Abst) x1 x6 (H14 Abst x5)) in (ex4_2_intro T T (\lambda (u: T).(\lambda +(t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) (\lambda (u: +T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) (\lambda (u: +T).(\lambda (_: T).(ty3 g c w u))) (\lambda (u: T).(\lambda (t: T).(nf2 c +(THead (Bind Abst) u t)))) x5 x6 (pc3_pr3_conf c (THead (Flat Appl) w (THead +(Bind Abst) x0 x1)) x H0 (THead (Flat Appl) w (THead (Bind Abst) x5 x6)) +(pr3_thin_dx c (THead (Bind Abst) x0 x1) (THead (Bind Abst) x5 x6) H16 w +Appl)) (ty3_conv g c (THead (Bind Abst) x5 x6) x2 (ty3_sred_pr3 c (THead +(Bind Abst) x0 x1) (THead (Bind Abst) x5 x6) H16 g x2 H4) v (THead (Bind +Abst) x0 x1) H1 (pc3_pr3_r c (THead (Bind Abst) x0 x1) (THead (Bind Abst) x5 +x6) H16)) (ty3_conv g c x5 x3 (ty3_sred_pr3 c x0 x5 H13 g x3 H6) w x0 H2 +(pc3_pr3_r c x0 x5 H13)) H15)))))))) H11))))) H8)))))) H5))))) H3)))))))) +(ty3_gen_appl g c w v x H))))))). + +lemma ty3_inv_lref_nf2_pc3: + \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (i: nat).((ty3 g c +(TLRef i) u1) \to ((nf2 c (TLRef i)) \to (\forall (u2: T).((nf2 c u2) \to +((pc3 c u1 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift (S i) O u)))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (i: nat).(\lambda +(H: (ty3 g c (TLRef i) u1)).(insert_eq T (TLRef i) (\lambda (t: T).(ty3 g c t +u1)) (\lambda (t: T).((nf2 c t) \to (\forall (u2: T).((nf2 c u2) \to ((pc3 c +u1 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift (S i) O u))))))))) (\lambda +(y: T).(\lambda (H0: (ty3 g c y u1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).((eq T t (TLRef i)) \to ((nf2 c0 t) \to (\forall (u2: +T).((nf2 c0 u2) \to ((pc3 c0 t0 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift +(S i) O u)))))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (TLRef i)) \to ((nf2 +c0 t2) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 t u2) \to (ex T +(\lambda (u: T).(eq T u2 (lift (S i) O u))))))))))).(\lambda (u: T).(\lambda +(t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (TLRef i)) \to +((nf2 c0 u) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 t1 u2) \to (ex T +(\lambda (u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (H5: (pc3 c0 +t1 t2)).(\lambda (H6: (eq T u (TLRef i))).(\lambda (H7: (nf2 c0 u)).(\lambda +(u2: T).(\lambda (H8: (nf2 c0 u2)).(\lambda (H9: (pc3 c0 t2 u2)).(let H10 +\def (eq_ind T u (\lambda (t0: T).(nf2 c0 t0)) H7 (TLRef i) H6) in (let H11 +\def (eq_ind T u (\lambda (t0: T).((eq T t0 (TLRef i)) \to ((nf2 c0 t0) \to +(\forall (u3: T).((nf2 c0 u3) \to ((pc3 c0 t1 u3) \to (ex T (\lambda (u0: +T).(eq T u3 (lift (S i) O u0)))))))))) H4 (TLRef i) H6) in (let H12 \def +(eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t1)) H3 (TLRef i) H6) in (let H_y +\def (H11 (refl_equal T (TLRef i)) H10 u2 H8) in (H_y (pc3_t t2 c0 t1 H5 u2 +H9))))))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq +T (TSort m) (TLRef i))).(\lambda (_: (nf2 c0 (TSort m))).(\lambda (u2: +T).(\lambda (_: (nf2 c0 u2)).(\lambda (_: (pc3 c0 (TSort (next g m)) +u2)).(let H5 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee with [(TSort +_) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (TLRef i) H1) in (False_ind (ex T (\lambda (u: T).(eq T u2 (lift +(S i) O u)))) H5))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (H1: (getl n c0 (CHead d (Bind Abbr) +u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u +(TLRef i)) \to ((nf2 d u) \to (\forall (u2: T).((nf2 d u2) \to ((pc3 d t u2) +\to (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (H4: +(eq T (TLRef n) (TLRef i))).(\lambda (H5: (nf2 c0 (TLRef n))).(\lambda (u2: +T).(\lambda (_: (nf2 c0 u2)).(\lambda (H7: (pc3 c0 (lift (S n) O t) u2)).(let +H8 \def (f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow n +| (TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef +i) H4) in (let H9 \def (eq_ind nat n (\lambda (n0: nat).(pc3 c0 (lift (S n0) +O t) u2)) H7 i H8) in (let H10 \def (eq_ind nat n (\lambda (n0: nat).(nf2 c0 +(TLRef n0))) H5 i H8) in (let H11 \def (eq_ind nat n (\lambda (n0: nat).(getl +n0 c0 (CHead d (Bind Abbr) u))) H1 i H8) in (nf2_gen_lref c0 d u i H11 H10 +(ex T (\lambda (u0: T).(eq T u2 (lift (S i) O u0)))))))))))))))))))))) +(\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda +(H1: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g +d u t)).(\lambda (_: (((eq T u (TLRef i)) \to ((nf2 d u) \to (\forall (u2: +T).((nf2 d u2) \to ((pc3 d t u2) \to (ex T (\lambda (u0: T).(eq T u2 (lift (S +i) O u0))))))))))).(\lambda (H4: (eq T (TLRef n) (TLRef i))).(\lambda (H5: +(nf2 c0 (TLRef n))).(\lambda (u2: T).(\lambda (H6: (nf2 c0 u2)).(\lambda (H7: +(pc3 c0 (lift (S n) O u) u2)).(let H8 \def (f_equal T nat (\lambda (e: +T).(match e with [(TSort _) \Rightarrow n | (TLRef n0) \Rightarrow n0 | +(THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef i) H4) in (let H9 \def +(eq_ind nat n (\lambda (n0: nat).(pc3 c0 (lift (S n0) O u) u2)) H7 i H8) in +(let H10 \def (eq_ind nat n (\lambda (n0: nat).(nf2 c0 (TLRef n0))) H5 i H8) +in (let H11 \def (eq_ind nat n (\lambda (n0: nat).(getl n0 c0 (CHead d (Bind +Abst) u))) H1 i H8) in (let H_y \def (pc3_nf2_unfold c0 (lift (S i) O u) u2 +H9 H6) in (let H12 \def (pr3_gen_lift c0 u u2 (S i) O H_y d (getl_drop Abst +c0 d u i H11)) in (ex2_ind T (\lambda (t2: T).(eq T u2 (lift (S i) O t2))) +(\lambda (t2: T).(pr3 d u t2)) (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O +u0)))) (\lambda (x: T).(\lambda (H13: (eq T u2 (lift (S i) O x))).(\lambda +(_: (pr3 d u x)).(eq_ind_r T (lift (S i) O x) (\lambda (t0: T).(ex T (\lambda +(u0: T).(eq T t0 (lift (S i) O u0))))) (ex_intro T (\lambda (u0: T).(eq T +(lift (S i) O x) (lift (S i) O u0))) x (refl_equal T (lift (S i) O x))) u2 +H13)))) H12)))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TLRef i)) \to ((nf2 +c0 u) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 t u2) \to (ex T (\lambda +(u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (b: B).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 +t2)).(\lambda (_: (((eq T t1 (TLRef i)) \to ((nf2 (CHead c0 (Bind b) u) t1) +\to (\forall (u2: T).((nf2 (CHead c0 (Bind b) u) u2) \to ((pc3 (CHead c0 +(Bind b) u) t2 u2) \to (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O +u0))))))))))).(\lambda (H5: (eq T (THead (Bind b) u t1) (TLRef i))).(\lambda +(_: (nf2 c0 (THead (Bind b) u t1))).(\lambda (u2: T).(\lambda (_: (nf2 c0 +u2)).(\lambda (_: (pc3 c0 (THead (Bind b) u t2) u2)).(let H9 \def (eq_ind T +(THead (Bind b) u t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I +(TLRef i) H5) in (False_ind (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O +u0)))) H9))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: +T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TLRef i)) \to ((nf2 +c0 w) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 u u2) \to (ex T (\lambda +(u0: T).(eq T u2 (lift (S i) O u0))))))))))).(\lambda (v: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v +(TLRef i)) \to ((nf2 c0 v) \to (\forall (u2: T).((nf2 c0 u2) \to ((pc3 c0 +(THead (Bind Abst) u t) u2) \to (ex T (\lambda (u0: T).(eq T u2 (lift (S i) O +u0))))))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TLRef +i))).(\lambda (_: (nf2 c0 (THead (Flat Appl) w v))).(\lambda (u2: T).(\lambda +(_: (nf2 c0 u2)).(\lambda (_: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) +u t)) u2)).(let H9 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (ex T +(\lambda (u0: T).(eq T u2 (lift (S i) O u0)))) H9)))))))))))))))) (\lambda +(c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 +t2)).(\lambda (_: (((eq T t1 (TLRef i)) \to ((nf2 c0 t1) \to (\forall (u2: +T).((nf2 c0 u2) \to ((pc3 c0 t2 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift +(S i) O u))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda +(_: (((eq T t2 (TLRef i)) \to ((nf2 c0 t2) \to (\forall (u2: T).((nf2 c0 u2) +\to ((pc3 c0 t0 u2) \to (ex T (\lambda (u: T).(eq T u2 (lift (S i) O +u))))))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TLRef +i))).(\lambda (_: (nf2 c0 (THead (Flat Cast) t2 t1))).(\lambda (u2: +T).(\lambda (_: (nf2 c0 u2)).(\lambda (_: (pc3 c0 (THead (Flat Cast) t0 t2) +u2)).(let H9 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match +ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ +_ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (ex T (\lambda (u: +T).(eq T u2 (lift (S i) O u)))) H9))))))))))))))) c y u1 H0))) H))))). + +lemma ty3_inv_lref_nf2: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (i: nat).((ty3 g c +(TLRef i) u) \to ((nf2 c (TLRef i)) \to ((nf2 c u) \to (ex T (\lambda (u0: +T).(eq T u (lift (S i) O u0)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (ty3 g c (TLRef i) u)).(\lambda (H0: (nf2 c (TLRef i))).(\lambda (H1: +(nf2 c u)).(ty3_inv_lref_nf2_pc3 g c u i H H0 u H1 (pc3_refl c u)))))))). + +lemma ty3_inv_appls_lref_nf2: + \forall (g: G).(\forall (c: C).(\forall (vs: TList).(\forall (u1: +T).(\forall (i: nat).((ty3 g c (THeads (Flat Appl) vs (TLRef i)) u1) \to +((nf2 c (TLRef i)) \to ((nf2 c u1) \to (ex2 T (\lambda (u: T).(nf2 c (lift (S +i) O u))) (\lambda (u: T).(pc3 c (THeads (Flat Appl) vs (lift (S i) O u)) +u1)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (vs: TList).(TList_ind (\lambda (t: +TList).(\forall (u1: T).(\forall (i: nat).((ty3 g c (THeads (Flat Appl) t +(TLRef i)) u1) \to ((nf2 c (TLRef i)) \to ((nf2 c u1) \to (ex2 T (\lambda (u: +T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 c (THeads (Flat Appl) t +(lift (S i) O u)) u1))))))))) (\lambda (u1: T).(\lambda (i: nat).(\lambda (H: +(ty3 g c (TLRef i) u1)).(\lambda (H0: (nf2 c (TLRef i))).(\lambda (H1: (nf2 c +u1)).(let H_x \def (ty3_inv_lref_nf2 g c u1 i H H0 H1) in (let H2 \def H_x in +(ex_ind T (\lambda (u0: T).(eq T u1 (lift (S i) O u0))) (ex2 T (\lambda (u: +T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 c (lift (S i) O u) u1))) +(\lambda (x: T).(\lambda (H3: (eq T u1 (lift (S i) O x))).(let H4 \def +(eq_ind T u1 (\lambda (t: T).(nf2 c t)) H1 (lift (S i) O x) H3) in (eq_ind_r +T (lift (S i) O x) (\lambda (t: T).(ex2 T (\lambda (u: T).(nf2 c (lift (S i) +O u))) (\lambda (u: T).(pc3 c (lift (S i) O u) t)))) (ex_intro2 T (\lambda +(u: T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 c (lift (S i) O u) +(lift (S i) O x))) x H4 (pc3_refl c (lift (S i) O x))) u1 H3)))) H2)))))))) +(\lambda (t: T).(\lambda (t0: TList).(\lambda (H: ((\forall (u1: T).(\forall +(i: nat).((ty3 g c (THeads (Flat Appl) t0 (TLRef i)) u1) \to ((nf2 c (TLRef +i)) \to ((nf2 c u1) \to (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) +(\lambda (u: T).(pc3 c (THeads (Flat Appl) t0 (lift (S i) O u)) +u1)))))))))).(\lambda (u1: T).(\lambda (i: nat).(\lambda (H0: (ty3 g c (THead +(Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) u1)).(\lambda (H1: (nf2 c +(TLRef i))).(\lambda (_: (nf2 c u1)).(let H_x \def (ty3_gen_appl_nf2 g c t +(THeads (Flat Appl) t0 (TLRef i)) u1 H0) in (let H3 \def H_x in (ex4_2_ind T +T (\lambda (u: T).(\lambda (t1: T).(pc3 c (THead (Flat Appl) t (THead (Bind +Abst) u t1)) u1))) (\lambda (u: T).(\lambda (t1: T).(ty3 g c (THeads (Flat +Appl) t0 (TLRef i)) (THead (Bind Abst) u t1)))) (\lambda (u: T).(\lambda (_: +T).(ty3 g c t u))) (\lambda (u: T).(\lambda (t1: T).(nf2 c (THead (Bind Abst) +u t1)))) (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) (\lambda (u: +T).(pc3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O u))) +u1))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (pc3 c (THead (Flat +Appl) t (THead (Bind Abst) x0 x1)) u1)).(\lambda (H5: (ty3 g c (THeads (Flat +Appl) t0 (TLRef i)) (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c t +x0)).(\lambda (H7: (nf2 c (THead (Bind Abst) x0 x1))).(let H8 \def +(nf2_gen_abst c x0 x1 H7) in (land_ind (nf2 c x0) (nf2 (CHead c (Bind Abst) +x0) x1) (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3 +c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O u))) u1))) +(\lambda (H9: (nf2 c x0)).(\lambda (H10: (nf2 (CHead c (Bind Abst) x0) +x1)).(let H_y \def (H (THead (Bind Abst) x0 x1) i H5 H1) in (let H11 \def +(H_y (nf2_abst_shift c x0 H9 x1 H10)) in (ex2_ind T (\lambda (u: T).(nf2 c +(lift (S i) O u))) (\lambda (u: T).(pc3 c (THeads (Flat Appl) t0 (lift (S i) +O u)) (THead (Bind Abst) x0 x1))) (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O +u))) (\lambda (u: T).(pc3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift +(S i) O u))) u1))) (\lambda (x: T).(\lambda (H12: (nf2 c (lift (S i) O +x))).(\lambda (H13: (pc3 c (THeads (Flat Appl) t0 (lift (S i) O x)) (THead +(Bind Abst) x0 x1))).(ex_intro2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) +(\lambda (u: T).(pc3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S +i) O u))) u1)) x H12 (pc3_t (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) c +(THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O x))) (pc3_thin_dx c +(THeads (Flat Appl) t0 (lift (S i) O x)) (THead (Bind Abst) x0 x1) H13 t +Appl) u1 H4))))) H11))))) H8)))))))) H3))))))))))) vs))). + +lemma ty3_inv_lref_lref_nf2: + \forall (g: G).(\forall (c: C).(\forall (i: nat).(\forall (j: nat).((ty3 g c +(TLRef i) (TLRef j)) \to ((nf2 c (TLRef i)) \to ((nf2 c (TLRef j)) \to (lt i +j))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (i: nat).(\lambda (j: nat).(\lambda +(H: (ty3 g c (TLRef i) (TLRef j))).(\lambda (H0: (nf2 c (TLRef i))).(\lambda +(H1: (nf2 c (TLRef j))).(let H_x \def (ty3_inv_lref_nf2 g c (TLRef j) i H H0 +H1) in (let H2 \def H_x in (ex_ind T (\lambda (u0: T).(eq T (TLRef j) (lift +(S i) O u0))) (lt i j) (\lambda (x: T).(\lambda (H3: (eq T (TLRef j) (lift (S +i) O x))).(let H_x0 \def (lift_gen_lref x O (S i) j H3) in (let H4 \def H_x0 +in (or_ind (land (lt j O) (eq T x (TLRef j))) (land (le (S i) j) (eq T x +(TLRef (minus j (S i))))) (lt i j) (\lambda (H5: (land (lt j O) (eq T x +(TLRef j)))).(land_ind (lt j O) (eq T x (TLRef j)) (lt i j) (\lambda (H6: (lt +j O)).(\lambda (_: (eq T x (TLRef j))).(lt_x_O j H6 (lt i j)))) H5)) (\lambda +(H5: (land (le (S i) j) (eq T x (TLRef (minus j (S i)))))).(land_ind (le (S +i) j) (eq T x (TLRef (minus j (S i)))) (lt i j) (\lambda (H6: (le (S i) +j)).(\lambda (_: (eq T x (TLRef (minus j (S i))))).H6)) H5)) H4))))) +H2))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/nf2.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/nf2.ma new file mode 100644 index 000000000..1dc0e1ab6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/nf2.ma @@ -0,0 +1,455 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/arity.ma". + +include "basic_1A/pc3/nf2.ma". + +include "basic_1A/nf2/arity.ma". + +definition ty3_nf2_inv_abst_premise: + C \to (T \to (T \to Prop)) +\def + \lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\forall (d: C).(\forall (wi: +T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) wi)) \to (\forall (vs: +TList).((pc3 c (THeads (Flat Appl) vs (lift (S i) O wi)) (THead (Bind Abst) w +u)) \to False)))))))). + +lemma ty3_nf2_inv_abst_premise_csort: + \forall (w: T).(\forall (u: T).(\forall (m: nat).(ty3_nf2_inv_abst_premise +(CSort m) w u))) +\def + \lambda (w: T).(\lambda (u: T).(\lambda (m: nat).(\lambda (d: C).(\lambda +(wi: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort m) (CHead d (Bind Abst) +wi))).(\lambda (vs: TList).(\lambda (_: (pc3 (CSort m) (THeads (Flat Appl) vs +(lift (S i) O wi)) (THead (Bind Abst) w u))).(getl_gen_sort m i (CHead d +(Bind Abst) wi) H False))))))))). + +lemma ty3_nf2_inv_all: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t +u) \to ((nf2 c t) \to (or3 (ex3_2 T T (\lambda (w: T).(\lambda (u0: T).(eq T +t (THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) +(\lambda (w: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w) u0)))) (ex nat +(\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: +(ty3 g c t u)).(\lambda (H0: (nf2 c t)).(let H_x \def (ty3_arity g c t u H) +in (let H1 \def H_x in (ex2_ind A (\lambda (a1: A).(arity g c t a1)) (\lambda +(a1: A).(arity g c u (asucc g a1))) (or3 (ex3_2 T T (\lambda (w: T).(\lambda +(u0: T).(eq T t (THead (Bind Abst) w u0)))) (\lambda (w: T).(\lambda (_: +T).(nf2 c w))) (\lambda (w: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w) +u0)))) (ex nat (\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat +(\lambda (ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef +i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i)))))) (\lambda (x: A).(\lambda (H2: +(arity g c t x)).(\lambda (_: (arity g c u (asucc g x))).(arity_nf2_inv_all g +c t x H2 H0)))) H1)))))))). + +lemma ty3_nf2_inv_sort: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (m: nat).((ty3 g c t +(TSort m)) \to ((nf2 c t) \to (or (ex2 nat (\lambda (n: nat).(eq T t (TSort +n))) (\lambda (n: nat).(eq nat m (next g n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (m: nat).(\lambda +(H: (ty3 g c t (TSort m))).(\lambda (H0: (nf2 c t)).(let H_x \def +(ty3_nf2_inv_all g c t (TSort m) H H0) in (let H1 \def H_x in (or3_ind (ex3_2 +T T (\lambda (w: T).(\lambda (u: T).(eq T t (THead (Bind Abst) w u)))) +(\lambda (w: T).(\lambda (_: T).(nf2 c w))) (\lambda (w: T).(\lambda (u: +T).(nf2 (CHead c (Bind Abst) w) u)))) (ex nat (\lambda (n: nat).(eq T t +(TSort n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t +(THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i))))) +(or (ex2 nat (\lambda (n: nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat +m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T +t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef +i)))))) (\lambda (H2: (ex3_2 T T (\lambda (w: T).(\lambda (u: T).(eq T t +(THead (Bind Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) +(\lambda (w: T).(\lambda (u: T).(nf2 (CHead c (Bind Abst) w) +u))))).(ex3_2_ind T T (\lambda (w: T).(\lambda (u: T).(eq T t (THead (Bind +Abst) w u)))) (\lambda (w: T).(\lambda (_: T).(nf2 c w))) (\lambda (w: +T).(\lambda (u: T).(nf2 (CHead c (Bind Abst) w) u))) (or (ex2 nat (\lambda +(n: nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) (ex3_2 +TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) +ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) +(\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i)))))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H3: (eq T t (THead (Bind Abst) x0 +x1))).(\lambda (_: (nf2 c x0)).(\lambda (_: (nf2 (CHead c (Bind Abst) x0) +x1)).(let H6 \def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (TSort m))) H +(THead (Bind Abst) x0 x1) H3) in (eq_ind_r T (THead (Bind Abst) x0 x1) +(\lambda (t0: T).(or (ex2 nat (\lambda (n: nat).(eq T t0 (TSort n))) (\lambda +(n: nat).(eq nat m (next g n)))) (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 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (ex3_2_ind T T (\lambda (t2: +T).(\lambda (_: T).(pc3 c (THead (Bind Abst) x0 t2) (TSort m)))) (\lambda (_: +T).(\lambda (t0: T).(ty3 g c x0 t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) x0) x1 t2))) (or (ex2 nat (\lambda (n: nat).(eq T (THead +(Bind Abst) x0 x1) (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) +(ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T (THead (Bind +Abst) x0 x1) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c (TLRef i)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: +(pc3 c (THead (Bind Abst) x0 x2) (TSort m))).(\lambda (_: (ty3 g c x0 +x3)).(\lambda (_: (ty3 g (CHead c (Bind Abst) x0) x1 x2)).(pc3_gen_sort_abst +c x0 x2 m (pc3_s c (TSort m) (THead (Bind Abst) x0 x2) H7) (or (ex2 nat +(\lambda (n: nat).(eq T (THead (Bind Abst) x0 x1) (TSort n))) (\lambda (n: +nat).(eq nat m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda +(i: nat).(eq T (THead (Bind Abst) x0 x1) (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i)))))))))))) (ty3_gen_bind g Abst c +x0 x1 (TSort m) H6)) t H3))))))) H2)) (\lambda (H2: (ex nat (\lambda (n: +nat).(eq T t (TSort n))))).(ex_ind nat (\lambda (n: nat).(eq T t (TSort n))) +(or (ex2 nat (\lambda (n: nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat +m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T +t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef +i)))))) (\lambda (x: nat).(\lambda (H3: (eq T t (TSort x))).(let H4 \def +(eq_ind T t (\lambda (t0: T).(ty3 g c t0 (TSort m))) H (TSort x) H3) in +(eq_ind_r T (TSort x) (\lambda (t0: T).(or (ex2 nat (\lambda (n: nat).(eq T +t0 (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) (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 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (eq_ind nat (next g x) +(\lambda (n: nat).(or (ex2 nat (\lambda (n0: nat).(eq T (TSort x) (TSort +n0))) (\lambda (n0: nat).(eq nat n (next g n0)))) (ex3_2 TList nat (\lambda +(ws: TList).(\lambda (i: nat).(eq T (TSort x) (THeads (Flat Appl) ws (TLRef +i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (or_introl (ex2 nat (\lambda +(n: nat).(eq T (TSort x) (TSort n))) (\lambda (n: nat).(eq nat (next g x) +(next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T +(TSort x) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda +(_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef +i))))) (ex_intro2 nat (\lambda (n: nat).(eq T (TSort x) (TSort n))) (\lambda +(n: nat).(eq nat (next g x) (next g n))) x (refl_equal T (TSort x)) +(refl_equal nat (next g x)))) m (pc3_gen_sort c (next g x) m (ty3_gen_sort g +c (TSort m) x H4))) t H3)))) H2)) (\lambda (H2: (ex3_2 TList nat (\lambda +(ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i)))))).(ex3_2_ind TList nat (\lambda +(ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i)))) (or (ex2 nat (\lambda (n: +nat).(eq T t (TSort n))) (\lambda (n: nat).(eq nat m (next g n)))) (ex3_2 +TList nat (\lambda (ws: TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) +ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) +(\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i)))))) (\lambda (x0: +TList).(\lambda (x1: nat).(\lambda (H3: (eq T t (THeads (Flat Appl) x0 (TLRef +x1)))).(\lambda (H4: (nfs2 c x0)).(\lambda (H5: (nf2 c (TLRef x1))).(let H6 +\def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (TSort m))) H (THeads (Flat +Appl) x0 (TLRef x1)) H3) in (eq_ind_r T (THeads (Flat Appl) x0 (TLRef x1)) +(\lambda (t0: T).(or (ex2 nat (\lambda (n: nat).(eq T t0 (TSort n))) (\lambda +(n: nat).(eq nat m (next g n)))) (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 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))))) (or_intror (ex2 nat (\lambda +(n: nat).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (TSort n))) (\lambda (n: +nat).(eq nat m (next g n)))) (ex3_2 TList nat (\lambda (ws: TList).(\lambda +(i: nat).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (THeads (Flat Appl) ws +(TLRef i))))) (\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda +(_: TList).(\lambda (i: nat).(nf2 c (TLRef i))))) (ex3_2_intro TList nat +(\lambda (ws: TList).(\lambda (i: nat).(eq T (THeads (Flat Appl) x0 (TLRef +x1)) (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: TList).(\lambda (_: +nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: nat).(nf2 c (TLRef i)))) +x0 x1 (refl_equal T (THeads (Flat Appl) x0 (TLRef x1))) H4 H5)) t H3))))))) +H2)) H1)))))))). + +fact ty3_nf2_gen__ty3_nf2_inv_abst_aux: + \forall (c: C).(\forall (w1: T).(\forall (u1: T).((ty3_nf2_inv_abst_premise +c w1 u1) \to (\forall (t: T).(\forall (w2: T).(\forall (u2: T).((pc3 c (THead +(Flat Appl) t (THead (Bind Abst) w2 u2)) (THead (Bind Abst) w1 u1)) \to +(ty3_nf2_inv_abst_premise c w2 u2)))))))) +\def + \lambda (c: C).(\lambda (w1: T).(\lambda (u1: T).(\lambda (H: ((\forall (d: +C).(\forall (wi: T).(\forall (i: nat).((getl i c (CHead d (Bind Abst) wi)) +\to (\forall (vs: TList).((pc3 c (THeads (Flat Appl) vs (lift (S i) O wi)) +(THead (Bind Abst) w1 u1)) \to False)))))))).(\lambda (t: T).(\lambda (w2: +T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Flat Appl) t (THead (Bind +Abst) w2 u2)) (THead (Bind Abst) w1 u1))).(\lambda (d: C).(\lambda (wi: +T).(\lambda (i: nat).(\lambda (H1: (getl i c (CHead d (Bind Abst) +wi))).(\lambda (vs: TList).(\lambda (H2: (pc3 c (THeads (Flat Appl) vs (lift +(S i) O wi)) (THead (Bind Abst) w2 u2))).(H d wi i H1 (TCons t vs) (pc3_t +(THead (Flat Appl) t (THead (Bind Abst) w2 u2)) c (THead (Flat Appl) t +(THeads (Flat Appl) vs (lift (S i) O wi))) (pc3_thin_dx c (THeads (Flat Appl) +vs (lift (S i) O wi)) (THead (Bind Abst) w2 u2) H2 t Appl) (THead (Bind Abst) +w1 u1) H0))))))))))))))). + +lemma ty3_nf2_inv_abst: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (w: T).(\forall (u: +T).((ty3 g c t (THead (Bind Abst) w u)) \to ((nf2 c t) \to ((nf2 c w) \to +((ty3_nf2_inv_abst_premise c w u) \to (ex4_2 T T (\lambda (v: T).(\lambda (_: +T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g +c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v +u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) +v)))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (w: T).(\lambda (u: +T).(\lambda (H: (ty3 g c t (THead (Bind Abst) w u))).(\lambda (H0: (nf2 c +t)).(\lambda (H1: (nf2 c w)).(\lambda (H2: (ty3_nf2_inv_abst_premise c w +u)).(let H_x \def (ty3_nf2_inv_all g c t (THead (Bind Abst) w u) H H0) in +(let H3 \def H_x in (or3_ind (ex3_2 T T (\lambda (w0: T).(\lambda (u0: T).(eq +T t (THead (Bind Abst) w0 u0)))) (\lambda (w0: T).(\lambda (_: T).(nf2 c +w0))) (\lambda (w0: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w0) u0)))) +(ex nat (\lambda (n: nat).(eq T t (TSort n)))) (ex3_2 TList nat (\lambda (ws: +TList).(\lambda (i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) +(\lambda (ws: TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: +TList).(\lambda (i: nat).(nf2 c (TLRef i))))) (ex4_2 T T (\lambda (v: +T).(\lambda (_: T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: +T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c +(Bind Abst) w) v)))) (\lambda (H4: (ex3_2 T T (\lambda (w0: T).(\lambda (u0: +T).(eq T t (THead (Bind Abst) w0 u0)))) (\lambda (w0: T).(\lambda (_: T).(nf2 +c w0))) (\lambda (w0: T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w0) +u0))))).(ex3_2_ind T T (\lambda (w0: T).(\lambda (u0: T).(eq T t (THead (Bind +Abst) w0 u0)))) (\lambda (w0: T).(\lambda (_: T).(nf2 c w0))) (\lambda (w0: +T).(\lambda (u0: T).(nf2 (CHead c (Bind Abst) w0) u0))) (ex4_2 T T (\lambda +(v: T).(\lambda (_: T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: +T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c +(Bind Abst) w) v)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t +(THead (Bind Abst) x0 x1))).(\lambda (H6: (nf2 c x0)).(\lambda (H7: (nf2 +(CHead c (Bind Abst) x0) x1)).(let H8 \def (eq_ind T t (\lambda (t0: T).(ty3 +g c t0 (THead (Bind Abst) w u))) H (THead (Bind Abst) x0 x1) H5) in (eq_ind_r +T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(ex4_2 T T (\lambda (v: +T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) w v)))) (\lambda (_: +T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c +(Bind Abst) w) v))))) (ex_ind T (\lambda (t0: T).(ty3 g c (THead (Bind Abst) +w u) t0)) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Bind Abst) +x0 x1) (THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w +w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) +(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda +(x: T).(\lambda (H9: (ty3 g c (THead (Bind Abst) w u) x)).(ex3_2_ind T T +(\lambda (t2: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) w t2) x))) +(\lambda (_: T).(\lambda (t0: T).(ty3 g c w t0))) (\lambda (t2: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) w) u t2))) (ex4_2 T T (\lambda (v: +T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) w v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda (x2: T).(\lambda (x3: +T).(\lambda (_: (pc3 c (THead (Bind Abst) w x2) x)).(\lambda (H11: (ty3 g c w +x3)).(\lambda (H12: (ty3 g (CHead c (Bind Abst) w) u x2)).(ex3_2_ind T T +(\lambda (t2: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) x0 t2) (THead +(Bind Abst) w u)))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c x0 t0))) +(\lambda (t2: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x0) x1 t2))) +(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) +(THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) +(\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) +(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda +(x4: T).(\lambda (x5: T).(\lambda (H13: (pc3 c (THead (Bind Abst) x0 x4) +(THead (Bind Abst) w u))).(\lambda (_: (ty3 g c x0 x5)).(\lambda (H15: (ty3 g +(CHead c (Bind Abst) x0) x1 x4)).(land_ind (pc3 c x0 w) (\forall (b: +B).(\forall (u0: T).(pc3 (CHead c (Bind b) u0) x4 u))) (ex4_2 T T (\lambda +(v: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) w +v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: +T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: +T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda (H16: (pc3 c +x0 w)).(\lambda (H17: ((\forall (b: B).(\forall (u0: T).(pc3 (CHead c (Bind +b) u0) x4 u))))).(let H_y \def (pc3_nf2 c x0 w H16 H6 H1) in (let H18 \def +(eq_ind T x0 (\lambda (t0: T).(ty3 g (CHead c (Bind Abst) t0) x1 x4)) H15 w +H_y) in (let H19 \def (eq_ind T x0 (\lambda (t0: T).(nf2 (CHead c (Bind Abst) +t0) x1)) H7 w H_y) in (eq_ind_r T w (\lambda (t0: T).(ex4_2 T T (\lambda (v: +T).(\lambda (_: T).(eq T (THead (Bind Abst) t0 x1) (THead (Bind Abst) w v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) w) v))))) (ex4_2_intro T T (\lambda (v: +T).(\lambda (_: T).(eq T (THead (Bind Abst) w x1) (THead (Bind Abst) w v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) w) v))) x1 x3 (refl_equal T (THead (Bind Abst) w +x1)) H11 (ty3_conv g (CHead c (Bind Abst) w) u x2 H12 x1 x4 H18 (H17 Abst w)) +H19) x0 H_y)))))) (pc3_gen_abst c x0 w x4 u H13))))))) (ty3_gen_bind g Abst c +x0 x1 (THead (Bind Abst) w u) H8))))))) (ty3_gen_bind g Abst c w u x H9)))) +(ty3_correct g c (THead (Bind Abst) x0 x1) (THead (Bind Abst) w u) H8)) t +H5))))))) H4)) (\lambda (H4: (ex nat (\lambda (n: nat).(eq T t (TSort +n))))).(ex_ind nat (\lambda (n: nat).(eq T t (TSort n))) (ex4_2 T T (\lambda +(v: T).(\lambda (_: T).(eq T t (THead (Bind Abst) w v)))) (\lambda (_: +T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c +(Bind Abst) w) v)))) (\lambda (x: nat).(\lambda (H5: (eq T t (TSort x))).(let +H6 \def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (THead (Bind Abst) w u))) H +(TSort x) H5) in (eq_ind_r T (TSort x) (\lambda (t0: T).(ex4_2 T T (\lambda +(v: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) w v)))) (\lambda (_: +T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c +(Bind Abst) w) v))))) (pc3_gen_sort_abst c w u (next g x) (ty3_gen_sort g c +(THead (Bind Abst) w u) x H6) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq +T (TSort x) (THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 +g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v +u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v))))) t +H5)))) H4)) (\lambda (H4: (ex3_2 TList nat (\lambda (ws: TList).(\lambda (i: +nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c (TLRef i)))))).(ex3_2_ind TList nat (\lambda (ws: TList).(\lambda +(i: nat).(eq T t (THeads (Flat Appl) ws (TLRef i))))) (\lambda (ws: +TList).(\lambda (_: nat).(nfs2 c ws))) (\lambda (_: TList).(\lambda (i: +nat).(nf2 c (TLRef i)))) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T t +(THead (Bind Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) +(\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v u))) +(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v)))) (\lambda +(x0: TList).(\lambda (x1: nat).(\lambda (H5: (eq T t (THeads (Flat Appl) x0 +(TLRef x1)))).(\lambda (_: (nfs2 c x0)).(\lambda (H7: (nf2 c (TLRef +x1))).(let H8 \def (eq_ind T t (\lambda (t0: T).(ty3 g c t0 (THead (Bind +Abst) w u))) H (THeads (Flat Appl) x0 (TLRef x1)) H5) in (eq_ind_r T (THeads +(Flat Appl) x0 (TLRef x1)) (\lambda (t0: T).(ex4_2 T T (\lambda (v: +T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) w v)))) (\lambda (_: +T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g +(CHead c (Bind Abst) w) v u))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c +(Bind Abst) w) v))))) (let H9 \def H2 in ((let H10 \def H8 in (unintro T u +(\lambda (t0: T).((ty3 g c (THeads (Flat Appl) x0 (TLRef x1)) (THead (Bind +Abst) w t0)) \to ((ty3_nf2_inv_abst_premise c w t0) \to (ex4_2 T T (\lambda +(v: T).(\lambda (_: T).(eq T (THeads (Flat Appl) x0 (TLRef x1)) (THead (Bind +Abst) w v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c w w0))) (\lambda (v: +T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) w) v t0))) (\lambda (v: +T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) w) v))))))) (unintro T w +(\lambda (t0: T).(\forall (x: T).((ty3 g c (THeads (Flat Appl) x0 (TLRef x1)) +(THead (Bind Abst) t0 x)) \to ((ty3_nf2_inv_abst_premise c t0 x) \to (ex4_2 T +T (\lambda (v: T).(\lambda (_: T).(eq T (THeads (Flat Appl) x0 (TLRef x1)) +(THead (Bind Abst) t0 v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c t0 +w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) t0) v x))) +(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) t0) v)))))))) +(TList_ind (\lambda (t0: TList).(\forall (x: T).(\forall (x2: T).((ty3 g c +(THeads (Flat Appl) t0 (TLRef x1)) (THead (Bind Abst) x x2)) \to +((ty3_nf2_inv_abst_premise c x x2) \to (ex4_2 T T (\lambda (v: T).(\lambda +(_: T).(eq T (THeads (Flat Appl) t0 (TLRef x1)) (THead (Bind Abst) x v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) x) v))))))))) (\lambda (x: T).(\lambda (x2: +T).(\lambda (H11: (ty3 g c (TLRef x1) (THead (Bind Abst) x x2))).(\lambda +(H12: (ty3_nf2_inv_abst_premise c x x2)).(or_ind (ex3_3 C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c (lift (S x1) O t0) (THead (Bind +Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl x1 c +(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: +T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(pc3 c (lift (S x1) O u0) (THead (Bind Abst) x x2))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (_: T).(getl x1 c (CHead e (Bind Abst) u0))))) +(\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex4_2 +T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef x1) (THead (Bind Abst) x +v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: +T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: +T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v)))) (\lambda (H13: (ex3_3 C +T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c (lift (S x1) O +t0) (THead (Bind Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda +(_: T).(getl x1 c (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0)))))).(ex3_3_ind C T T (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(pc3 c (lift (S x1) O t0) (THead (Bind +Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl x1 c +(CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: +T).(ty3 g e u0 t0)))) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef +x1) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x +w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) +(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v)))) (\lambda +(x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c (lift (S x1) O +x5) (THead (Bind Abst) x x2))).(\lambda (H15: (getl x1 c (CHead x3 (Bind +Abbr) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(nf2_gen_lref c x3 x4 x1 H15 H7 +(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef x1) (THead (Bind +Abst) x v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: +T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: +T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v))))))))))) H13)) (\lambda +(H13: (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c +(lift (S x1) O u0) (THead (Bind Abst) x x2))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (_: T).(getl x1 c (CHead e (Bind Abst) u0))))) (\lambda (e: +C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))).(ex3_3_ind C T T +(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c (lift (S x1) O u0) +(THead (Bind Abst) x x2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: +T).(getl x1 c (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: +T).(\lambda (t0: T).(ty3 g e u0 t0)))) (ex4_2 T T (\lambda (v: T).(\lambda +(_: T).(eq T (TLRef x1) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda +(w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c +(Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind +Abst) x) v)))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda +(H14: (pc3 c (lift (S x1) O x4) (THead (Bind Abst) x x2))).(\lambda (H15: +(getl x1 c (CHead x3 (Bind Abst) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let +H_x0 \def (H12 x3 x4 x1 H15 TNil H14) in (let H17 \def H_x0 in (False_ind +(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (TLRef x1) (THead (Bind +Abst) x v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: +T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: +T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x) v)))) H17))))))))) H13)) +(ty3_gen_lref g c (THead (Bind Abst) x x2) x1 H11)))))) (\lambda (t0: +T).(\lambda (t1: TList).(\lambda (H11: ((\forall (x: T).(\forall (x2: +T).((ty3 g c (THeads (Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x x2)) \to +((ty3_nf2_inv_abst_premise c x x2) \to (ex4_2 T T (\lambda (v: T).(\lambda +(_: T).(eq T (THeads (Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) x) v)))))))))).(\lambda (x: T).(\lambda (x2: +T).(\lambda (H12: (ty3 g c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 +(TLRef x1))) (THead (Bind Abst) x x2))).(\lambda (H13: +(ty3_nf2_inv_abst_premise c x x2)).(ex3_2_ind T T (\lambda (u0: T).(\lambda +(t2: T).(pc3 c (THead (Flat Appl) t0 (THead (Bind Abst) u0 t2)) (THead (Bind +Abst) x x2)))) (\lambda (u0: T).(\lambda (t2: T).(ty3 g c (THeads (Flat Appl) +t1 (TLRef x1)) (THead (Bind Abst) u0 t2)))) (\lambda (u0: T).(\lambda (_: +T).(ty3 g c t0 u0))) (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead +(Flat Appl) t0 (THeads (Flat Appl) t1 (TLRef x1))) (THead (Bind Abst) x v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) x) v)))) (\lambda (x3: T).(\lambda (x4: +T).(\lambda (H14: (pc3 c (THead (Flat Appl) t0 (THead (Bind Abst) x3 x4)) +(THead (Bind Abst) x x2))).(\lambda (H15: (ty3 g c (THeads (Flat Appl) t1 +(TLRef x1)) (THead (Bind Abst) x3 x4))).(\lambda (_: (ty3 g c t0 x3)).(let +H_y \def (ty3_nf2_gen__ty3_nf2_inv_abst_aux c x x2 H13 t0 x3 x4 H14) in (let +H_x0 \def (H11 x3 x4 H15 H_y) in (let H17 \def H_x0 in (ex4_2_ind T T +(\lambda (v: T).(\lambda (_: T).(eq T (THeads (Flat Appl) t1 (TLRef x1)) +(THead (Bind Abst) x3 v)))) (\lambda (_: T).(\lambda (w0: T).(ty3 g c x3 +w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) x3) v x4))) +(\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind Abst) x3) v))) (ex4_2 T T +(\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (THeads (Flat +Appl) t1 (TLRef x1))) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda +(w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c +(Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind +Abst) x) v)))) (\lambda (x5: T).(\lambda (x6: T).(\lambda (H18: (eq T (THeads +(Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x3 x5))).(\lambda (_: (ty3 g c +x3 x6)).(\lambda (_: (ty3 g (CHead c (Bind Abst) x3) x5 x4)).(\lambda (_: +(nf2 (CHead c (Bind Abst) x3) x5)).(TList_ind (\lambda (t2: TList).((eq T +(THeads (Flat Appl) t2 (TLRef x1)) (THead (Bind Abst) x3 x5)) \to (ex4_2 T T +(\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (THeads (Flat +Appl) t2 (TLRef x1))) (THead (Bind Abst) x v)))) (\lambda (_: T).(\lambda +(w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda (_: T).(ty3 g (CHead c +(Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: T).(nf2 (CHead c (Bind +Abst) x) v)))))) (\lambda (H22: (eq T (THeads (Flat Appl) TNil (TLRef x1)) +(THead (Bind Abst) x3 x5))).(let H23 \def (eq_ind T (TLRef x1) (\lambda (ee: +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x3 x5) H22) in +(False_ind (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat +Appl) t0 (THeads (Flat Appl) TNil (TLRef x1))) (THead (Bind Abst) x v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) x) v)))) H23))) (\lambda (t2: T).(\lambda (t3: +TList).(\lambda (_: (((eq T (THeads (Flat Appl) t3 (TLRef x1)) (THead (Bind +Abst) x3 x5)) \to (ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead +(Flat Appl) t0 (THeads (Flat Appl) t3 (TLRef x1))) (THead (Bind Abst) x v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) x) v))))))).(\lambda (H22: (eq T (THeads (Flat +Appl) (TCons t2 t3) (TLRef x1)) (THead (Bind Abst) x3 x5))).(let H23 \def +(eq_ind T (THead (Flat Appl) t2 (THeads (Flat Appl) t3 (TLRef x1))) (\lambda +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +False | (THead k _ _) \Rightarrow (match k with [(Bind _) \Rightarrow False | +(Flat _) \Rightarrow True])])) I (THead (Bind Abst) x3 x5) H22) in (False_ind +(ex4_2 T T (\lambda (v: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 +(THeads (Flat Appl) (TCons t2 t3) (TLRef x1))) (THead (Bind Abst) x v)))) +(\lambda (_: T).(\lambda (w0: T).(ty3 g c x w0))) (\lambda (v: T).(\lambda +(_: T).(ty3 g (CHead c (Bind Abst) x) v x2))) (\lambda (v: T).(\lambda (_: +T).(nf2 (CHead c (Bind Abst) x) v)))) H23)))))) t1 H18))))))) H17))))))))) +(ty3_gen_appl g c t0 (THeads (Flat Appl) t1 (TLRef x1)) (THead (Bind Abst) x +x2) H12))))))))) x0)) H10)) H9)) t H5))))))) H4)) H3))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3.ma new file mode 100644 index 000000000..6a6279fab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3.ma @@ -0,0 +1,676 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/csubt/ty3.ma". + +include "basic_1A/ty3/subst1.ma". + +include "basic_1A/ty3/fsubst0.ma". + +include "basic_1A/pc3/pc1.ma". + +include "basic_1A/pc3/wcpr0.ma". + +include "basic_1A/pc1/props.ma". + +lemma ty3_sred_wcpr0_pr0: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 +t1 t) \to (\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t2: T).((pr0 t1 t2) +\to (ty3 g c2 t2 t))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda +(H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda +(t2: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t3: T).((pr0 t0 t3) \to +(ty3 g c2 t3 t2)))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t0: +T).(\lambda (_: (ty3 g c t2 t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c +c2) \to (\forall (t3: T).((pr0 t2 t3) \to (ty3 g c2 t3 t0))))))).(\lambda (u: +T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (c2: +C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 u t4) \to (ty3 g c2 t4 +t3))))))).(\lambda (H4: (pc3 c t3 t2)).(\lambda (c2: C).(\lambda (H5: (wcpr0 +c c2)).(\lambda (t4: T).(\lambda (H6: (pr0 u t4)).(ty3_conv g c2 t2 t0 (H1 c2 +H5 t2 (pr0_refl t2)) t4 t3 (H3 c2 H5 t4 H6) (pc3_wcpr0 c c2 H5 t3 t2 +H4)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (c2: +C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort m) +t2)).(eq_ind_r T (TSort m) (\lambda (t0: T).(ty3 g c2 t0 (TSort (next g m)))) +(ty3_sort g c2 m) t2 (pr0_gen_sort t2 m H1)))))))) (\lambda (n: nat).(\lambda +(c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind +Abbr) u))).(\lambda (t0: T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: +((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g +c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: +T).(\lambda (H4: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t3: +T).(ty3 g c2 t3 (lift (S n) O t0))) (ex3_2_ind C T (\lambda (e2: C).(\lambda +(u2: T).(getl n c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 +(TLRef n) (lift (S n) O t0)) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: +(getl n c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda +(H7: (pr0 u x1)).(ty3_abbr g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7))))))) +(wcpr0_getl c c2 H3 n d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 n +H4)))))))))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda +(u: T).(\lambda (H0: (getl n c (CHead d (Bind Abst) u))).(\lambda (t0: +T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) +\to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: +C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef n) +t2)).(eq_ind_r T (TLRef n) (\lambda (t3: T).(ty3 g c2 t3 (lift (S n) O u))) +(ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl n c2 (CHead e2 (Bind +Abst) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 (TLRef n) (lift (S n) O u)) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl n c2 (CHead x0 (Bind +Abst) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(ty3_conv g +c2 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g x0 u t0 (H2 x0 H6 u +(pr0_refl u)) c2 O (S n) (getl_drop Abst c2 x0 x1 n H5)) (TLRef n) (lift (S +n) O x1) (ty3_abst g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7)) (pc3_lift c2 x0 (S n) +O (getl_drop Abst c2 x0 x1 n H5) x1 u (pc3_pr2_x x0 x1 u (pr2_free x0 u x1 +H7))))))))) (wcpr0_getl c c2 H3 n d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 n +H4)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (t0: T).(\lambda +(_: (ty3 g c u t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to +(\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (b: +B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: (ty3 g (CHead c (Bind b) +u) t2 t3)).(\lambda (H3: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) +\to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3))))))).(\lambda (c2: +C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t4: T).(\lambda (H5: (pr0 (THead +(Bind b) u t2) t4)).(let H6 \def (match H5 with [(pr0_refl t5) \Rightarrow +(\lambda (H6: (eq T t5 (THead (Bind b) u t2))).(\lambda (H7: (eq T t5 +t4)).(eq_ind T (THead (Bind b) u t2) (\lambda (t6: T).((eq T t6 t4) \to (ty3 +g c2 t4 (THead (Bind b) u t3)))) (\lambda (H8: (eq T (THead (Bind b) u t2) +t4)).(eq_ind T (THead (Bind b) u t2) (\lambda (t6: T).(ty3 g c2 t6 (THead +(Bind b) u t3))) (ty3_bind g c2 u t0 (H1 c2 H4 u (pr0_refl u)) b t2 t3 (H3 +(CHead c2 (Bind b) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind b)) t2 +(pr0_refl t2))) t4 H8)) t5 (sym_eq T t5 (THead (Bind b) u t2) H6) H7))) | +(pr0_comp u1 u2 H6 t5 t6 H7 k) \Rightarrow (\lambda (H8: (eq T (THead k u1 +t5) (THead (Bind b) u t2))).(\lambda (H9: (eq T (THead k u2 t6) t4)).((let +H10 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t5 +| (TLRef _) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t5) +(THead (Bind b) u t2) H8) in ((let H11 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | +(THead _ t7 _) \Rightarrow t7])) (THead k u1 t5) (THead (Bind b) u t2) H8) in +((let H12 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) +(THead k u1 t5) (THead (Bind b) u t2) H8) in (eq_ind K (Bind b) (\lambda (k0: +K).((eq T u1 u) \to ((eq T t5 t2) \to ((eq T (THead k0 u2 t6) t4) \to ((pr0 +u1 u2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))))) +(\lambda (H13: (eq T u1 u)).(eq_ind T u (\lambda (t7: T).((eq T t5 t2) \to +((eq T (THead (Bind b) u2 t6) t4) \to ((pr0 t7 u2) \to ((pr0 t5 t6) \to (ty3 +g c2 t4 (THead (Bind b) u t3))))))) (\lambda (H14: (eq T t5 t2)).(eq_ind T t2 +(\lambda (t7: T).((eq T (THead (Bind b) u2 t6) t4) \to ((pr0 u u2) \to ((pr0 +t7 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))) (\lambda (H15: (eq T +(THead (Bind b) u2 t6) t4)).(eq_ind T (THead (Bind b) u2 t6) (\lambda (t7: +T).((pr0 u u2) \to ((pr0 t2 t6) \to (ty3 g c2 t7 (THead (Bind b) u t3))))) +(\lambda (H16: (pr0 u u2)).(\lambda (H17: (pr0 t2 t6)).(ex_ind T (\lambda +(t7: T).(ty3 g (CHead c2 (Bind b) u) t3 t7)) (ty3 g c2 (THead (Bind b) u2 t6) +(THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H18: (ty3 g (CHead c2 (Bind +b) u) t3 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c2 (Bind b) u2) t3 t7)) +(ty3 g c2 (THead (Bind b) u2 t6) (THead (Bind b) u t3)) (\lambda (x0: +T).(\lambda (_: (ty3 g (CHead c2 (Bind b) u2) t3 x0)).(ty3_conv g c2 (THead +(Bind b) u t3) (THead (Bind b) u x) (ty3_bind g c2 u t0 (H1 c2 H4 u (pr0_refl +u)) b t3 x H18) (THead (Bind b) u2 t6) (THead (Bind b) u2 t3) (ty3_bind g c2 +u2 t0 (H1 c2 H4 u2 H16) b t6 t3 (H3 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 +H4 u u2 H16 (Bind b)) t6 H17)) (pc3_pr2_x c2 (THead (Bind b) u2 t3) (THead +(Bind b) u t3) (pr2_head_1 c2 u u2 (pr2_free c2 u u2 H16) (Bind b) t3))))) +(ty3_correct g (CHead c2 (Bind b) u2) t6 t3 (H3 (CHead c2 (Bind b) u2) +(wcpr0_comp c c2 H4 u u2 H16 (Bind b)) t6 H17))))) (ty3_correct g (CHead c2 +(Bind b) u) t2 t3 (H3 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H4 u u (pr0_refl +u) (Bind b)) t2 (pr0_refl t2)))))) t4 H15)) t5 (sym_eq T t5 t2 H14))) u1 +(sym_eq T u1 u H13))) k (sym_eq K k (Bind b) H12))) H11)) H10)) H9 H6 H7))) | +(pr0_beta u0 v1 v2 H6 t5 t6 H7) \Rightarrow (\lambda (H8: (eq T (THead (Flat +Appl) v1 (THead (Bind Abst) u0 t5)) (THead (Bind b) u t2))).(\lambda (H9: (eq +T (THead (Bind Abbr) v2 t6) t4)).((let H10 \def (eq_ind T (THead (Flat Appl) +v1 (THead (Bind Abst) u0 t5)) (\lambda (e: T).(match e with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind b) u t2) H8) in (False_ind ((eq T (THead (Bind Abbr) v2 t6) t4) +\to ((pr0 v1 v2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3))))) +H10)) H9 H6 H7))) | (pr0_upsilon b0 H6 v1 v2 H7 u1 u2 H8 t5 t6 H9) +\Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 +t5)) (THead (Bind b) u t2))).(\lambda (H11: (eq T (THead (Bind b0) u2 (THead +(Flat Appl) (lift (S O) O v2) t6)) t4)).((let H12 \def (eq_ind T (THead (Flat +Appl) v1 (THead (Bind b0) u1 t5)) (\lambda (e: T).(match e with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind b) u t2) H10) in (False_ind ((eq T (THead (Bind b0) u2 (THead +(Flat Appl) (lift (S O) O v2) t6)) t4) \to ((not (eq B b0 Abst)) \to ((pr0 v1 +v2) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u +t3))))))) H12)) H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t5 t6 H7 w H8) +\Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t5) (THead (Bind b) u +t2))).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t4)).((let H11 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t5 | (TLRef +_) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) (THead (Bind Abbr) u1 +t5) (THead (Bind b) u t2) H9) in ((let H12 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | +(THead _ t7 _) \Rightarrow t7])) (THead (Bind Abbr) u1 t5) (THead (Bind b) u +t2) H9) in ((let H13 \def (f_equal T B (\lambda (e: T).(match e with [(TSort +_) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow +(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) +(THead (Bind Abbr) u1 t5) (THead (Bind b) u t2) H9) in (eq_ind B Abbr +(\lambda (b0: B).((eq T u1 u) \to ((eq T t5 t2) \to ((eq T (THead (Bind Abbr) +u2 w) t4) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ty3 +g c2 t4 (THead (Bind b0) u t3))))))))) (\lambda (H14: (eq T u1 u)).(eq_ind T +u (\lambda (t7: T).((eq T t5 t2) \to ((eq T (THead (Bind Abbr) u2 w) t4) \to +((pr0 t7 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ty3 g c2 t4 (THead +(Bind Abbr) u t3)))))))) (\lambda (H15: (eq T t5 t2)).(eq_ind T t2 (\lambda +(t7: T).((eq T (THead (Bind Abbr) u2 w) t4) \to ((pr0 u u2) \to ((pr0 t7 t6) +\to ((subst0 O u2 t6 w) \to (ty3 g c2 t4 (THead (Bind Abbr) u t3))))))) +(\lambda (H16: (eq T (THead (Bind Abbr) u2 w) t4)).(eq_ind T (THead (Bind +Abbr) u2 w) (\lambda (t7: T).((pr0 u u2) \to ((pr0 t2 t6) \to ((subst0 O u2 +t6 w) \to (ty3 g c2 t7 (THead (Bind Abbr) u t3)))))) (\lambda (H17: (pr0 u +u2)).(\lambda (H18: (pr0 t2 t6)).(\lambda (H19: (subst0 O u2 t6 w)).(let H20 +\def (eq_ind_r B b (\lambda (b0: B).(\forall (c3: C).((wcpr0 (CHead c (Bind +b0) u) c3) \to (\forall (t7: T).((pr0 t2 t7) \to (ty3 g c3 t7 t3)))))) H3 +Abbr H13) in (let H21 \def (eq_ind_r B b (\lambda (b0: B).(ty3 g (CHead c +(Bind b0) u) t2 t3)) H2 Abbr H13) in (ex_ind T (\lambda (t7: T).(ty3 g (CHead +c2 (Bind Abbr) u) t3 t7)) (ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind +Abbr) u t3)) (\lambda (x: T).(\lambda (H22: (ty3 g (CHead c2 (Bind Abbr) u) +t3 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c2 (Bind Abbr) u2) t3 t7)) +(ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u t3)) (\lambda (x0: +T).(\lambda (_: (ty3 g (CHead c2 (Bind Abbr) u2) t3 x0)).(ty3_conv g c2 +(THead (Bind Abbr) u t3) (THead (Bind Abbr) u x) (ty3_bind g c2 u t0 (H1 c2 +H4 u (pr0_refl u)) Abbr t3 x H22) (THead (Bind Abbr) u2 w) (THead (Bind Abbr) +u2 t3) (ty3_bind g c2 u2 t0 (H1 c2 H4 u2 H17) Abbr w t3 (ty3_subst0 g (CHead +c2 (Bind Abbr) u2) t6 t3 (H20 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H4 u +u2 H17 (Bind Abbr)) t6 H18) c2 u2 O (getl_refl Abbr c2 u2) w H19)) (pc3_pr2_x +c2 (THead (Bind Abbr) u2 t3) (THead (Bind Abbr) u t3) (pr2_head_1 c2 u u2 +(pr2_free c2 u u2 H17) (Bind Abbr) t3))))) (ty3_correct g (CHead c2 (Bind +Abbr) u2) t6 t3 (H20 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H4 u u2 H17 +(Bind Abbr)) t6 H18))))) (ty3_correct g (CHead c2 (Bind Abbr) u) t2 t3 (H20 +(CHead c2 (Bind Abbr) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind Abbr)) t2 +(pr0_refl t2))))))))) t4 H16)) t5 (sym_eq T t5 t2 H15))) u1 (sym_eq T u1 u +H14))) b H13)) H12)) H11)) H10 H6 H7 H8))) | (pr0_zeta b0 H6 t5 t6 H7 u0) +\Rightarrow (\lambda (H8: (eq T (THead (Bind b0) u0 (lift (S O) O t5)) (THead +(Bind b) u t2))).(\lambda (H9: (eq T t6 t4)).((let H10 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow (lref_map (\lambda (x: +nat).(plus x (S O))) O t5) | (TLRef _) \Rightarrow (lref_map (\lambda (x: +nat).(plus x (S O))) O t5) | (THead _ _ t7) \Rightarrow t7])) (THead (Bind +b0) u0 (lift (S O) O t5)) (THead (Bind b) u t2) H8) in ((let H11 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef +_) \Rightarrow u0 | (THead _ t7 _) \Rightarrow t7])) (THead (Bind b0) u0 +(lift (S O) O t5)) (THead (Bind b) u t2) H8) in ((let H12 \def (f_equal T B +(\lambda (e: T).(match e with [(TSort _) \Rightarrow b0 | (TLRef _) +\Rightarrow b0 | (THead k _ _) \Rightarrow (match k with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) +O t5)) (THead (Bind b) u t2) H8) in (eq_ind B b (\lambda (b1: B).((eq T u0 u) +\to ((eq T (lift (S O) O t5) t2) \to ((eq T t6 t4) \to ((not (eq B b1 Abst)) +\to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))))) (\lambda (H13: +(eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t5) t2) \to +((eq T t6 t4) \to ((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ty3 g c2 t4 +(THead (Bind b) u t3))))))) (\lambda (H14: (eq T (lift (S O) O t5) +t2)).(eq_ind T (lift (S O) O t5) (\lambda (_: T).((eq T t6 t4) \to ((not (eq +B b Abst)) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Bind b) u t3)))))) +(\lambda (H15: (eq T t6 t4)).(eq_ind T t4 (\lambda (t7: T).((not (eq B b +Abst)) \to ((pr0 t5 t7) \to (ty3 g c2 t4 (THead (Bind b) u t3))))) (\lambda +(H16: (not (eq B b Abst))).(\lambda (H17: (pr0 t5 t4)).(let H18 \def +(eq_ind_r T t2 (\lambda (t7: T).(\forall (c3: C).((wcpr0 (CHead c (Bind b) u) +c3) \to (\forall (t8: T).((pr0 t7 t8) \to (ty3 g c3 t8 t3)))))) H3 (lift (S +O) O t5) H14) in (let H19 \def (eq_ind_r T t2 (\lambda (t7: T).(ty3 g (CHead +c (Bind b) u) t7 t3)) H2 (lift (S O) O t5) H14) in (ex_ind T (\lambda (t7: +T).(ty3 g (CHead c2 (Bind b) u) t3 t7)) (ty3 g c2 t4 (THead (Bind b) u t3)) +(\lambda (x: T).(\lambda (H20: (ty3 g (CHead c2 (Bind b) u) t3 x)).(B_ind +(\lambda (b1: B).((not (eq B b1 Abst)) \to ((ty3 g (CHead c2 (Bind b1) u) t3 +x) \to ((ty3 g (CHead c2 (Bind b1) u) (lift (S O) O t4) t3) \to (ty3 g c2 t4 +(THead (Bind b1) u t3)))))) (\lambda (H21: (not (eq B Abbr Abst))).(\lambda +(H22: (ty3 g (CHead c2 (Bind Abbr) u) t3 x)).(\lambda (H23: (ty3 g (CHead c2 +(Bind Abbr) u) (lift (S O) O t4) t3)).(let H24 \def (ty3_gen_cabbr g (CHead +c2 (Bind Abbr) u) (lift (S O) O t4) t3 H23 c2 u O (getl_refl Abbr c2 u) +(CHead c2 (Bind Abbr) u) (csubst1_refl O u (CHead c2 (Bind Abbr) u)) c2 +(drop_drop (Bind Abbr) O c2 c2 (drop_refl c2) u)) in (ex3_2_ind T T (\lambda +(y1: T).(\lambda (_: T).(subst1 O u (lift (S O) O t4) (lift (S O) O y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 O u t3 (lift (S O) O y2)))) (\lambda +(y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) (ty3 g c2 t4 (THead (Bind Abbr) u +t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H25: (subst1 O u (lift (S O) +O t4) (lift (S O) O x0))).(\lambda (H26: (subst1 O u t3 (lift (S O) O +x1))).(\lambda (H27: (ty3 g c2 x0 x1)).(let H28 \def (eq_ind T x0 (\lambda +(t7: T).(ty3 g c2 t7 x1)) H27 t4 (lift_inj x0 t4 (S O) O (subst1_gen_lift_eq +t4 u (lift (S O) O x0) (S O) O O (le_O_n O) (eq_ind_r nat (plus (S O) O) +(\lambda (n: nat).(lt O n)) (le_n (plus (S O) O)) (plus O (S O)) (plus_sym O +(S O))) H25))) in (ty3_conv g c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) +u x) (ty3_bind g c2 u t0 (H1 c2 H4 u (pr0_refl u)) Abbr t3 x H22) t4 x1 H28 +(pc3_pr3_x c2 x1 (THead (Bind Abbr) u t3) (pr3_t (THead (Bind Abbr) u (lift +(S O) O x1)) (THead (Bind Abbr) u t3) c2 (pr3_pr2 c2 (THead (Bind Abbr) u t3) +(THead (Bind Abbr) u (lift (S O) O x1)) (pr2_free c2 (THead (Bind Abbr) u t3) +(THead (Bind Abbr) u (lift (S O) O x1)) (pr0_delta1 u u (pr0_refl u) t3 t3 +(pr0_refl t3) (lift (S O) O x1) H26))) x1 (pr3_pr2 c2 (THead (Bind Abbr) u +(lift (S O) O x1)) x1 (pr2_free c2 (THead (Bind Abbr) u (lift (S O) O x1)) x1 +(pr0_zeta Abbr H21 x1 x1 (pr0_refl x1) u)))))))))))) H24))))) (\lambda (H21: +(not (eq B Abst Abst))).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) t3 +x)).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) (lift (S O) O t4) t3)).(let +H24 \def (match (H21 (refl_equal B Abst)) in False with []) in H24)))) +(\lambda (H21: (not (eq B Void Abst))).(\lambda (H22: (ty3 g (CHead c2 (Bind +Void) u) t3 x)).(\lambda (H23: (ty3 g (CHead c2 (Bind Void) u) (lift (S O) O +t4) t3)).(let H24 \def (ty3_gen_cvoid g (CHead c2 (Bind Void) u) (lift (S O) +O t4) t3 H23 c2 u O (getl_refl Void c2 u) c2 (drop_drop (Bind Void) O c2 c2 +(drop_refl c2) u)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T +(lift (S O) O t4) (lift (S O) O y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T +t3 (lift (S O) O y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) +(ty3 g c2 t4 (THead (Bind Void) u t3)) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H25: (eq T (lift (S O) O t4) (lift (S O) O x0))).(\lambda (H26: +(eq T t3 (lift (S O) O x1))).(\lambda (H27: (ty3 g c2 x0 x1)).(let H28 \def +(eq_ind T t3 (\lambda (t7: T).(ty3 g (CHead c2 (Bind Void) u) t7 x)) H22 +(lift (S O) O x1) H26) in (eq_ind_r T (lift (S O) O x1) (\lambda (t7: T).(ty3 +g c2 t4 (THead (Bind Void) u t7))) (let H29 \def (eq_ind_r T x0 (\lambda (t7: +T).(ty3 g c2 t7 x1)) H27 t4 (lift_inj t4 x0 (S O) O H25)) in (ty3_conv g c2 +(THead (Bind Void) u (lift (S O) O x1)) (THead (Bind Void) u x) (ty3_bind g +c2 u t0 (H1 c2 H4 u (pr0_refl u)) Void (lift (S O) O x1) x H28) t4 x1 H29 +(pc3_s c2 x1 (THead (Bind Void) u (lift (S O) O x1)) (pc3_pr2_r c2 (THead +(Bind Void) u (lift (S O) O x1)) x1 (pr2_free c2 (THead (Bind Void) u (lift +(S O) O x1)) x1 (pr0_zeta Void H21 x1 x1 (pr0_refl x1) u)))))) t3 H26))))))) +H24))))) b H16 H20 (H18 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H4 u u +(pr0_refl u) (Bind b)) (lift (S O) O t4) (pr0_lift t5 t4 H17 (S O) O))))) +(ty3_correct g (CHead c2 (Bind b) u) (lift (S O) O t4) t3 (H18 (CHead c2 +(Bind b) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind b)) (lift (S O) O t4) +(pr0_lift t5 t4 H17 (S O) O)))))))) t6 (sym_eq T t6 t4 H15))) t2 H14)) u0 +(sym_eq T u0 u H13))) b0 (sym_eq B b0 b H12))) H11)) H10)) H9 H6 H7))) | +(pr0_tau t5 t6 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 +t5) (THead (Bind b) u t2))).(\lambda (H8: (eq T t6 t4)).((let H9 \def (eq_ind +T (THead (Flat Cast) u0 t5) (\lambda (e: T).(match e with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I +(THead (Bind b) u t2) H7) in (False_ind ((eq T t6 t4) \to ((pr0 t5 t6) \to +(ty3 g c2 t4 (THead (Bind b) u t3)))) H9)) H8 H6)))]) in (H6 (refl_equal T +(THead (Bind b) u t2)) (refl_equal T t4))))))))))))))))) (\lambda (c: +C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c w u)).(\lambda (H1: +((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 w t2) \to (ty3 g +c2 t2 u))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (H2: (ty3 g c v +(THead (Bind Abst) u t0))).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to +(\forall (t2: T).((pr0 v t2) \to (ty3 g c2 t2 (THead (Bind Abst) u +t0)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: +T).(\lambda (H5: (pr0 (THead (Flat Appl) w v) t2)).(let H6 \def (match H5 +with [(pr0_refl t3) \Rightarrow (\lambda (H6: (eq T t3 (THead (Flat Appl) w +v))).(\lambda (H7: (eq T t3 t2)).(eq_ind T (THead (Flat Appl) w v) (\lambda +(t4: T).((eq T t4 t2) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind +Abst) u t0))))) (\lambda (H8: (eq T (THead (Flat Appl) w v) t2)).(eq_ind T +(THead (Flat Appl) w v) (\lambda (t4: T).(ty3 g c2 t4 (THead (Flat Appl) w +(THead (Bind Abst) u t0)))) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) v t0 +(H3 c2 H4 v (pr0_refl v))) t2 H8)) t3 (sym_eq T t3 (THead (Flat Appl) w v) +H6) H7))) | (pr0_comp u1 u2 H6 t3 t4 H7 k) \Rightarrow (\lambda (H8: (eq T +(THead k u1 t3) (THead (Flat Appl) w v))).(\lambda (H9: (eq T (THead k u2 t4) +t2)).((let H10 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t5) \Rightarrow t5])) +(THead k u1 t3) (THead (Flat Appl) w v) H8) in ((let H11 \def (f_equal T T +(\lambda (e: T).(match e with [(TSort _) \Rightarrow u1 | (TLRef _) +\Rightarrow u1 | (THead _ t5 _) \Rightarrow t5])) (THead k u1 t3) (THead +(Flat Appl) w v) H8) in ((let H12 \def (f_equal T K (\lambda (e: T).(match e +with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k u1 t3) (THead (Flat Appl) w v) H8) in (eq_ind K +(Flat Appl) (\lambda (k0: K).((eq T u1 w) \to ((eq T t3 v) \to ((eq T (THead +k0 u2 t4) t2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat +Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H13: (eq T u1 w)).(eq_ind +T w (\lambda (t5: T).((eq T t3 v) \to ((eq T (THead (Flat Appl) u2 t4) t2) +\to ((pr0 t5 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w +(THead (Bind Abst) u t0)))))))) (\lambda (H14: (eq T t3 v)).(eq_ind T v +(\lambda (t5: T).((eq T (THead (Flat Appl) u2 t4) t2) \to ((pr0 w u2) \to +((pr0 t5 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u +t0))))))) (\lambda (H15: (eq T (THead (Flat Appl) u2 t4) t2)).(eq_ind T +(THead (Flat Appl) u2 t4) (\lambda (t5: T).((pr0 w u2) \to ((pr0 v t4) \to +(ty3 g c2 t5 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) (\lambda +(H16: (pr0 w u2)).(\lambda (H17: (pr0 v t4)).(ex_ind T (\lambda (t5: T).(ty3 +g c2 (THead (Bind Abst) u t0) t5)) (ty3 g c2 (THead (Flat Appl) u2 t4) (THead +(Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H18: (ty3 +g c2 (THead (Bind Abst) u t0) x)).(ex3_2_ind T T (\lambda (t5: T).(\lambda +(_: T).(pc3 c2 (THead (Bind Abst) u t5) x))) (\lambda (_: T).(\lambda (t6: +T).(ty3 g c2 u t6))) (\lambda (t5: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind +Abst) u) t0 t5))) (ty3 g c2 (THead (Flat Appl) u2 t4) (THead (Flat Appl) w +(THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: +(pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H20: (ty3 g c2 u x1)).(\lambda +(H21: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(ty3_conv g c2 (THead (Flat +Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u +x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 +(ty3_bind g c2 u x1 H20 Abst t0 x0 H21)) (THead (Flat Appl) u2 t4) (THead +(Flat Appl) u2 (THead (Bind Abst) u t0)) (ty3_appl g c2 u2 u (H1 c2 H4 u2 +H16) t4 t0 (H3 c2 H4 t4 H17)) (pc3_pr2_x c2 (THead (Flat Appl) u2 (THead +(Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pr2_head_1 +c2 w u2 (pr2_free c2 w u2 H16) (Flat Appl) (THead (Bind Abst) u t0))))))))) +(ty3_gen_bind g Abst c2 u t0 x H18)))) (ty3_correct g c2 v (THead (Bind Abst) +u t0) (H3 c2 H4 v (pr0_refl v)))))) t2 H15)) t3 (sym_eq T t3 v H14))) u1 +(sym_eq T u1 w H13))) k (sym_eq K k (Flat Appl) H12))) H11)) H10)) H9 H6 +H7))) | (pr0_beta u0 v1 v2 H6 t3 t4 H7) \Rightarrow (\lambda (H8: (eq T +(THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) w +v))).(\lambda (H9: (eq T (THead (Bind Abbr) v2 t4) t2)).((let H10 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow (THead +(Bind Abst) u0 t3) | (TLRef _) \Rightarrow (THead (Bind Abst) u0 t3) | (THead +_ _ t5) \Rightarrow t5])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) +(THead (Flat Appl) w v) H8) in ((let H11 \def (f_equal T T (\lambda (e: +T).(match e with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | +(THead _ t5 _) \Rightarrow t5])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 +t3)) (THead (Flat Appl) w v) H8) in (eq_ind T w (\lambda (t5: T).((eq T +(THead (Bind Abst) u0 t3) v) \to ((eq T (THead (Bind Abbr) v2 t4) t2) \to +((pr0 t5 v2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead +(Bind Abst) u t0)))))))) (\lambda (H12: (eq T (THead (Bind Abst) u0 t3) +v)).(eq_ind T (THead (Bind Abst) u0 t3) (\lambda (_: T).((eq T (THead (Bind +Abbr) v2 t4) t2) \to ((pr0 w v2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead +(Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (H13: (eq T (THead +(Bind Abbr) v2 t4) t2)).(eq_ind T (THead (Bind Abbr) v2 t4) (\lambda (t5: +T).((pr0 w v2) \to ((pr0 t3 t4) \to (ty3 g c2 t5 (THead (Flat Appl) w (THead +(Bind Abst) u t0)))))) (\lambda (H14: (pr0 w v2)).(\lambda (H15: (pr0 t3 +t4)).(let H16 \def (eq_ind_r T v (\lambda (t5: T).(\forall (c3: C).((wcpr0 c +c3) \to (\forall (t6: T).((pr0 t5 t6) \to (ty3 g c3 t6 (THead (Bind Abst) u +t0))))))) H3 (THead (Bind Abst) u0 t3) H12) in (let H17 \def (eq_ind_r T v +(\lambda (t5: T).(ty3 g c t5 (THead (Bind Abst) u t0))) H2 (THead (Bind Abst) +u0 t3) H12) in (ex_ind T (\lambda (t5: T).(ty3 g c2 (THead (Bind Abst) u t0) +t5)) (ty3 g c2 (THead (Bind Abbr) v2 t4) (THead (Flat Appl) w (THead (Bind +Abst) u t0))) (\lambda (x: T).(\lambda (H18: (ty3 g c2 (THead (Bind Abst) u +t0) x)).(ex3_2_ind T T (\lambda (t5: T).(\lambda (_: T).(pc3 c2 (THead (Bind +Abst) u t5) x))) (\lambda (_: T).(\lambda (t6: T).(ty3 g c2 u t6))) (\lambda +(t5: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t5))) (ty3 g c2 +(THead (Bind Abbr) v2 t4) (THead (Flat Appl) w (THead (Bind Abst) u t0))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u +x0) x)).(\lambda (H20: (ty3 g c2 u x1)).(\lambda (H21: (ty3 g (CHead c2 (Bind +Abst) u) t0 x0)).(ex3_2_ind T T (\lambda (t5: T).(\lambda (_: T).(pc3 c2 +(THead (Bind Abst) u0 t5) (THead (Bind Abst) u t0)))) (\lambda (_: +T).(\lambda (t6: T).(ty3 g c2 u0 t6))) (\lambda (t5: T).(\lambda (_: T).(ty3 +g (CHead c2 (Bind Abst) u0) t4 t5))) (ty3 g c2 (THead (Bind Abbr) v2 t4) +(THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x2: T).(\lambda +(x3: T).(\lambda (H22: (pc3 c2 (THead (Bind Abst) u0 x2) (THead (Bind Abst) u +t0))).(\lambda (H23: (ty3 g c2 u0 x3)).(\lambda (H24: (ty3 g (CHead c2 (Bind +Abst) u0) t4 x2)).(land_ind (pc3 c2 u0 u) (\forall (b: B).(\forall (u1: +T).(pc3 (CHead c2 (Bind b) u1) x2 t0))) (ty3 g c2 (THead (Bind Abbr) v2 t4) +(THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H25: (pc3 c2 u0 +u)).(\lambda (H26: ((\forall (b: B).(\forall (u1: T).(pc3 (CHead c2 (Bind b) +u1) x2 t0))))).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) +(THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w +(pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H20 Abst t0 x0 +H21)) (THead (Bind Abbr) v2 t4) (THead (Bind Abbr) v2 x2) (ty3_bind g c2 v2 u +(H1 c2 H4 v2 H14) Abbr t4 x2 (csubt_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x3 +H23 v2 u (H1 c2 H4 v2 H14) (pc3_s c2 u u0 H25)) t4 x2 H24)) (pc3_t (THead +(Bind Abbr) v2 t0) c2 (THead (Bind Abbr) v2 x2) (pc3_head_2 c2 v2 x2 t0 (Bind +Abbr) (H26 Abbr v2)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) +(pc3_pr2_x c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind +Abst) u t0)) (pr2_free c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) +(THead (Bind Abbr) v2 t0) (pr0_beta u w v2 H14 t0 t0 (pr0_refl t0)))))))) +(pc3_gen_abst c2 u0 u x2 t0 H22))))))) (ty3_gen_bind g Abst c2 u0 t4 (THead +(Bind Abst) u t0) (H16 c2 H4 (THead (Bind Abst) u0 t4) (pr0_comp u0 u0 +(pr0_refl u0) t3 t4 H15 (Bind Abst)))))))))) (ty3_gen_bind g Abst c2 u t0 x +H18)))) (ty3_correct g c2 (THead (Bind Abst) u0 t3) (THead (Bind Abst) u t0) +(H16 c2 H4 (THead (Bind Abst) u0 t3) (pr0_refl (THead (Bind Abst) u0 +t3))))))))) t2 H13)) v H12)) v1 (sym_eq T v1 w H11))) H10)) H9 H6 H7))) | +(pr0_upsilon b H6 v1 v2 H7 u1 u2 H8 t3 t4 H9) \Rightarrow (\lambda (H10: (eq +T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) w +v))).(\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O +v2) t4)) t2)).((let H12 \def (f_equal T T (\lambda (e: T).(match e with +[(TSort _) \Rightarrow (THead (Bind b) u1 t3) | (TLRef _) \Rightarrow (THead +(Bind b) u1 t3) | (THead _ _ t5) \Rightarrow t5])) (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (THead (Flat Appl) w v) H10) in ((let H13 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow v1 | (TLRef +_) \Rightarrow v1 | (THead _ t5 _) \Rightarrow t5])) (THead (Flat Appl) v1 +(THead (Bind b) u1 t3)) (THead (Flat Appl) w v) H10) in (eq_ind T w (\lambda +(t5: T).((eq T (THead (Bind b) u1 t3) v) \to ((eq T (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) t2) \to ((not (eq B b Abst)) \to ((pr0 t5 +v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w +(THead (Bind Abst) u t0)))))))))) (\lambda (H14: (eq T (THead (Bind b) u1 t3) +v)).(eq_ind T (THead (Bind b) u1 t3) (\lambda (_: T).((eq T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2) \to ((not (eq B b Abst)) \to +((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat +Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H15: (eq T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2)).(eq_ind T (THead (Bind b) +u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (\lambda (t5: T).((not (eq B b +Abst)) \to ((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ty3 g c2 t5 +(THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H16: (not (eq +B b Abst))).(\lambda (H17: (pr0 w v2)).(\lambda (H18: (pr0 u1 u2)).(\lambda +(H19: (pr0 t3 t4)).(let H20 \def (eq_ind_r T v (\lambda (t5: T).(\forall (c3: +C).((wcpr0 c c3) \to (\forall (t6: T).((pr0 t5 t6) \to (ty3 g c3 t6 (THead +(Bind Abst) u t0))))))) H3 (THead (Bind b) u1 t3) H14) in (let H21 \def +(eq_ind_r T v (\lambda (t5: T).(ty3 g c t5 (THead (Bind Abst) u t0))) H2 +(THead (Bind b) u1 t3) H14) in (ex_ind T (\lambda (t5: T).(ty3 g c2 (THead +(Bind Abst) u t0) t5)) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift +(S O) O v2) t4)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: +T).(\lambda (H22: (ty3 g c2 (THead (Bind Abst) u t0) x)).(let H23 \def H22 in +(ex3_2_ind T T (\lambda (t5: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u +t5) x))) (\lambda (_: T).(\lambda (t6: T).(ty3 g c2 u t6))) (\lambda (t5: +T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t5))) (ty3 g c2 (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (THead (Flat Appl) w +(THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: +(pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H25: (ty3 g c2 u x1)).(\lambda +(H26: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(ex3_2_ind T T (\lambda (t5: +T).(\lambda (_: T).(pc3 c2 (THead (Bind b) u2 t5) (THead (Bind Abst) u t0)))) +(\lambda (_: T).(\lambda (t6: T).(ty3 g c2 u2 t6))) (\lambda (t5: T).(\lambda +(_: T).(ty3 g (CHead c2 (Bind b) u2) t4 t5))) (ty3 g c2 (THead (Bind b) u2 +(THead (Flat Appl) (lift (S O) O v2) t4)) (THead (Flat Appl) w (THead (Bind +Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H27: (pc3 c2 (THead +(Bind b) u2 x2) (THead (Bind Abst) u t0))).(\lambda (H28: (ty3 g c2 u2 +x3)).(\lambda (H29: (ty3 g (CHead c2 (Bind b) u2) t4 x2)).(let H30 \def +(eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t5: T).(pc3 +(CHead c2 (Bind b) u2) x2 t5)) (pc3_gen_not_abst b H16 c2 x2 t0 u2 u H27) +(THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u +t0 (S O) O)) in (let H31 \def (eq_ind T (lift (S O) O (THead (Bind Abst) u +t0)) (\lambda (t5: T).(ty3 g (CHead c2 (Bind b) u2) t5 (lift (S O) O x))) +(ty3_lift g c2 (THead (Bind Abst) u t0) x H22 (CHead c2 (Bind b) u2) O (S O) +(drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) (THead (Bind Abst) (lift (S +O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)) in (ex3_2_ind T +T (\lambda (t5: T).(\lambda (_: T).(pc3 (CHead c2 (Bind b) u2) (THead (Bind +Abst) (lift (S O) O u) t5) (lift (S O) O x)))) (\lambda (_: T).(\lambda (t6: +T).(ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) t6))) (\lambda (t5: +T).(\lambda (_: T).(ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S +O) O u)) (lift (S O) (S O) t0) t5))) (ty3 g c2 (THead (Bind b) u2 (THead +(Flat Appl) (lift (S O) O v2) t4)) (THead (Flat Appl) w (THead (Bind Abst) u +t0))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 (CHead c2 (Bind b) +u2) (THead (Bind Abst) (lift (S O) O u) x4) (lift (S O) O x))).(\lambda (H33: +(ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) x5)).(\lambda (H34: (ty3 g +(CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) (lift (S O) (S O) +t0) x4)).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead +(Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w +(pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H25 Abst t0 x0 +H26)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (THead +(Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S +O) O u) (lift (S O) (S O) t0)))) (ty3_bind g c2 u2 x3 H28 b (THead (Flat +Appl) (lift (S O) O v2) t4) (THead (Flat Appl) (lift (S O) O v2) (THead (Bind +Abst) (lift (S O) O u) (lift (S O) (S O) t0))) (ty3_appl g (CHead c2 (Bind b) +u2) (lift (S O) O v2) (lift (S O) O u) (ty3_lift g c2 v2 u (H1 c2 H4 v2 H17) +(CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) +u2)) t4 (lift (S O) (S O) t0) (ty3_conv g (CHead c2 (Bind b) u2) (THead (Bind +Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (THead (Bind Abst) (lift (S O) +O u) x4) (ty3_bind g (CHead c2 (Bind b) u2) (lift (S O) O u) x5 H33 Abst +(lift (S O) (S O) t0) x4 H34) t4 x2 H29 H30))) (eq_ind T (lift (S O) O (THead +(Bind Abst) u t0)) (\lambda (t5: T).(pc3 c2 (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t5)) (THead (Flat Appl) w (THead (Bind Abst) u t0)))) +(pc3_pc1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) +O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) +(pc1_pr0_u2 (THead (Flat Appl) v2 (THead (Bind b) u2 (lift (S O) O (THead +(Bind Abst) u t0)))) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) +(lift (S O) O (THead (Bind Abst) u t0)))) (pr0_upsilon b H16 v2 v2 (pr0_refl +v2) u2 u2 (pr0_refl u2) (lift (S O) O (THead (Bind Abst) u t0)) (lift (S O) O +(THead (Bind Abst) u t0)) (pr0_refl (lift (S O) O (THead (Bind Abst) u t0)))) +(THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_head v2 w (pc1_pr0_x v2 w +H17) (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0))) (THead (Bind +Abst) u t0) (pc1_pr0_r (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u +t0))) (THead (Bind Abst) u t0) (pr0_zeta b H16 (THead (Bind Abst) u t0) +(THead (Bind Abst) u t0) (pr0_refl (THead (Bind Abst) u t0)) u2)) (Flat +Appl))) c2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) +(lift_bind Abst u t0 (S O) O)))))))) (ty3_gen_bind g Abst (CHead c2 (Bind b) +u2) (lift (S O) O u) (lift (S O) (S O) t0) (lift (S O) O x) H31))))))))) +(ty3_gen_bind g b c2 u2 t4 (THead (Bind Abst) u t0) (H20 c2 H4 (THead (Bind +b) u2 t4) (pr0_comp u1 u2 H18 t3 t4 H19 (Bind b)))))))))) (ty3_gen_bind g +Abst c2 u t0 x H23))))) (ty3_correct g c2 (THead (Bind b) u2 t4) (THead (Bind +Abst) u t0) (H20 c2 H4 (THead (Bind b) u2 t4) (pr0_comp u1 u2 H18 t3 t4 H19 +(Bind b))))))))))) t2 H15)) v H14)) v1 (sym_eq T v1 w H13))) H12)) H11 H6 H7 +H8 H9))) | (pr0_delta u1 u2 H6 t3 t4 H7 w0 H8) \Rightarrow (\lambda (H9: (eq +T (THead (Bind Abbr) u1 t3) (THead (Flat Appl) w v))).(\lambda (H10: (eq T +(THead (Bind Abbr) u2 w0) t2)).((let H11 \def (eq_ind T (THead (Bind Abbr) u1 +t3) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) +H9) in (False_ind ((eq T (THead (Bind Abbr) u2 w0) t2) \to ((pr0 u1 u2) \to +((pr0 t3 t4) \to ((subst0 O u2 t4 w0) \to (ty3 g c2 t2 (THead (Flat Appl) w +(THead (Bind Abst) u t0))))))) H11)) H10 H6 H7 H8))) | (pr0_zeta b H6 t3 t4 +H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Bind b) u0 (lift (S O) O t3)) +(THead (Flat Appl) w v))).(\lambda (H9: (eq T t4 t2)).((let H10 \def (eq_ind +T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda (e: T).(match e with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat Appl) w v) H8) in (False_ind ((eq T t4 t2) \to +((not (eq B b Abst)) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) w +(THead (Bind Abst) u t0)))))) H10)) H9 H6 H7))) | (pr0_tau t3 t4 H6 u0) +\Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Appl) +w v))).(\lambda (H8: (eq T t4 t2)).((let H9 \def (eq_ind T (THead (Flat Cast) +u0 t3) (\lambda (e: T).(match e with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _) +\Rightarrow False | (Flat f) \Rightarrow (match f with [Appl \Rightarrow +False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H7) in +(False_ind ((eq T t4 t2) \to ((pr0 t3 t4) \to (ty3 g c2 t2 (THead (Flat Appl) +w (THead (Bind Abst) u t0))))) H9)) H8 H6)))]) in (H6 (refl_equal T (THead +(Flat Appl) w v)) (refl_equal T t2)))))))))))))))) (\lambda (c: C).(\lambda +(t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t2 t3)).(\lambda (H1: +((\forall (c2: C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g +c2 t4 t3))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c t3 t0)).(\lambda (H3: +((\forall (c2: C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 t3 t4) \to (ty3 g +c2 t4 t0))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t4: +T).(\lambda (H5: (pr0 (THead (Flat Cast) t3 t2) t4)).(let H6 \def (match H5 +with [(pr0_refl t5) \Rightarrow (\lambda (H6: (eq T t5 (THead (Flat Cast) t3 +t2))).(\lambda (H7: (eq T t5 t4)).(eq_ind T (THead (Flat Cast) t3 t2) +(\lambda (t6: T).((eq T t6 t4) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3)))) +(\lambda (H8: (eq T (THead (Flat Cast) t3 t2) t4)).(eq_ind T (THead (Flat +Cast) t3 t2) (\lambda (t6: T).(ty3 g c2 t6 (THead (Flat Cast) t0 t3))) +(ty3_cast g c2 t2 t3 (H1 c2 H4 t2 (pr0_refl t2)) t0 (H3 c2 H4 t3 (pr0_refl +t3))) t4 H8)) t5 (sym_eq T t5 (THead (Flat Cast) t3 t2) H6) H7))) | (pr0_comp +u1 u2 H6 t5 t6 H7 k) \Rightarrow (\lambda (H8: (eq T (THead k u1 t5) (THead +(Flat Cast) t3 t2))).(\lambda (H9: (eq T (THead k u2 t6) t4)).((let H10 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t5 | (TLRef +_) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) (THead k u1 t5) (THead +(Flat Cast) t3 t2) H8) in ((let H11 \def (f_equal T T (\lambda (e: T).(match +e with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t7 _) +\Rightarrow t7])) (THead k u1 t5) (THead (Flat Cast) t3 t2) H8) in ((let H12 +\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k | +(TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k u1 t5) +(THead (Flat Cast) t3 t2) H8) in (eq_ind K (Flat Cast) (\lambda (k0: K).((eq +T u1 t3) \to ((eq T t5 t2) \to ((eq T (THead k0 u2 t6) t4) \to ((pr0 u1 u2) +\to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3)))))))) (\lambda +(H13: (eq T u1 t3)).(eq_ind T t3 (\lambda (t7: T).((eq T t5 t2) \to ((eq T +(THead (Flat Cast) u2 t6) t4) \to ((pr0 t7 u2) \to ((pr0 t5 t6) \to (ty3 g c2 +t4 (THead (Flat Cast) t0 t3))))))) (\lambda (H14: (eq T t5 t2)).(eq_ind T t2 +(\lambda (t7: T).((eq T (THead (Flat Cast) u2 t6) t4) \to ((pr0 t3 u2) \to +((pr0 t7 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3)))))) (\lambda (H15: +(eq T (THead (Flat Cast) u2 t6) t4)).(eq_ind T (THead (Flat Cast) u2 t6) +(\lambda (t7: T).((pr0 t3 u2) \to ((pr0 t2 t6) \to (ty3 g c2 t7 (THead (Flat +Cast) t0 t3))))) (\lambda (H16: (pr0 t3 u2)).(\lambda (H17: (pr0 t2 +t6)).(ex_ind T (\lambda (t7: T).(ty3 g c2 t0 t7)) (ty3 g c2 (THead (Flat +Cast) u2 t6) (THead (Flat Cast) t0 t3)) (\lambda (x: T).(\lambda (H18: (ty3 g +c2 t0 x)).(ty3_conv g c2 (THead (Flat Cast) t0 t3) (THead (Flat Cast) x t0) +(ty3_cast g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3)) x H18) (THead (Flat Cast) u2 +t6) (THead (Flat Cast) t0 u2) (ty3_cast g c2 t6 u2 (ty3_conv g c2 u2 t0 (H3 +c2 H4 u2 H16) t6 t3 (H1 c2 H4 t6 H17) (pc3_pr2_r c2 t3 u2 (pr2_free c2 t3 u2 +H16))) t0 (H3 c2 H4 u2 H16)) (pc3_s c2 (THead (Flat Cast) t0 u2) (THead (Flat +Cast) t0 t3) (pc3_pr2_r c2 (THead (Flat Cast) t0 t3) (THead (Flat Cast) t0 +u2) (pr2_thin_dx c2 t3 u2 (pr2_free c2 t3 u2 H16) t0 Cast)))))) (ty3_correct +g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3)))))) t4 H15)) t5 (sym_eq T t5 t2 H14))) +u1 (sym_eq T u1 t3 H13))) k (sym_eq K k (Flat Cast) H12))) H11)) H10)) H9 H6 +H7))) | (pr0_beta u v1 v2 H6 t5 t6 H7) \Rightarrow (\lambda (H8: (eq T (THead +(Flat Appl) v1 (THead (Bind Abst) u t5)) (THead (Flat Cast) t3 t2))).(\lambda +(H9: (eq T (THead (Bind Abbr) v2 t6) t4)).((let H10 \def (eq_ind T (THead +(Flat Appl) v1 (THead (Bind Abst) u t5)) (\lambda (e: T).(match e with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow +(match f with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead +(Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Bind Abbr) v2 t6) t4) \to +((pr0 v1 v2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3))))) +H10)) H9 H6 H7))) | (pr0_upsilon b H6 v1 v2 H7 u1 u2 H8 t5 t6 H9) \Rightarrow +(\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t5)) (THead +(Flat Cast) t3 t2))).(\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat +Appl) (lift (S O) O v2) t6)) t4)).((let H12 \def (eq_ind T (THead (Flat Appl) +v1 (THead (Bind b) u1 t5)) (\lambda (e: T).(match e with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f +with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat +Cast) t3 t2) H10) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) +(lift (S O) O v2) t6)) t4) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to +((pr0 u1 u2) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 +t3))))))) H12)) H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t5 t6 H7 w H8) +\Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t5) (THead (Flat Cast) +t3 t2))).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t4)).((let H11 \def +(eq_ind T (THead (Bind Abbr) u1 t5) (\lambda (e: T).(match e with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I +(THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (THead (Bind Abbr) u2 w) +t4) \to ((pr0 u1 u2) \to ((pr0 t5 t6) \to ((subst0 O u2 t6 w) \to (ty3 g c2 +t4 (THead (Flat Cast) t0 t3)))))) H11)) H10 H6 H7 H8))) | (pr0_zeta b H6 t5 +t6 H7 u) \Rightarrow (\lambda (H8: (eq T (THead (Bind b) u (lift (S O) O t5)) +(THead (Flat Cast) t3 t2))).(\lambda (H9: (eq T t6 t4)).((let H10 \def +(eq_ind T (THead (Bind b) u (lift (S O) O t5)) (\lambda (e: T).(match e with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) +\Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T t6 t4) \to +((not (eq B b Abst)) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 +t3))))) H10)) H9 H6 H7))) | (pr0_tau t5 t6 H6 u) \Rightarrow (\lambda (H7: +(eq T (THead (Flat Cast) u t5) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq +T t6 t4)).((let H9 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t5 | (TLRef _) \Rightarrow t5 | (THead _ _ t7) \Rightarrow t7])) +(THead (Flat Cast) u t5) (THead (Flat Cast) t3 t2) H7) in ((let H10 \def +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u | (TLRef +_) \Rightarrow u | (THead _ t7 _) \Rightarrow t7])) (THead (Flat Cast) u t5) +(THead (Flat Cast) t3 t2) H7) in (eq_ind T t3 (\lambda (_: T).((eq T t5 t2) +\to ((eq T t6 t4) \to ((pr0 t5 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 +t3)))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t7: T).((eq T t6 +t4) \to ((pr0 t7 t6) \to (ty3 g c2 t4 (THead (Flat Cast) t0 t3))))) (\lambda +(H12: (eq T t6 t4)).(eq_ind T t4 (\lambda (t7: T).((pr0 t2 t7) \to (ty3 g c2 +t4 (THead (Flat Cast) t0 t3)))) (\lambda (H13: (pr0 t2 t4)).(ex_ind T +(\lambda (t7: T).(ty3 g c2 t0 t7)) (ty3 g c2 t4 (THead (Flat Cast) t0 t3)) +(\lambda (x: T).(\lambda (H14: (ty3 g c2 t0 x)).(ty3_conv g c2 (THead (Flat +Cast) t0 t3) (THead (Flat Cast) x t0) (ty3_cast g c2 t3 t0 (H3 c2 H4 t3 +(pr0_refl t3)) x H14) t4 t3 (H1 c2 H4 t4 H13) (pc3_pr2_x c2 t3 (THead (Flat +Cast) t0 t3) (pr2_free c2 (THead (Flat Cast) t0 t3) t3 (pr0_tau t3 t3 +(pr0_refl t3) t0)))))) (ty3_correct g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3))))) +t6 (sym_eq T t6 t4 H12))) t5 (sym_eq T t5 t2 H11))) u (sym_eq T u t3 H10))) +H9)) H8 H6)))]) in (H6 (refl_equal T (THead (Flat Cast) t3 t2)) (refl_equal T +t4))))))))))))))) c1 t1 t H))))). + +lemma ty3_sred_pr0: + \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (g: G).(\forall +(c: C).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr0 t1 t2)).(\lambda (g: +G).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (ty3 g c t1 +t)).(ty3_sred_wcpr0_pr0 g c t1 t H0 c (wcpr0_refl c) t2 H))))))). + +lemma ty3_sred_pr1: + \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (g: G).(\forall +(c: C).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr1 t1 t2)).(pr1_ind (\lambda +(t: T).(\lambda (t0: T).(\forall (g: G).(\forall (c: C).(\forall (t3: +T).((ty3 g c t t3) \to (ty3 g c t0 t3))))))) (\lambda (t: T).(\lambda (g: +G).(\lambda (c: C).(\lambda (t0: T).(\lambda (H0: (ty3 g c t t0)).H0))))) +(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t4 t3)).(\lambda (t5: +T).(\lambda (_: (pr1 t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (c: +C).(\forall (t: T).((ty3 g c t3 t) \to (ty3 g c t5 t))))))).(\lambda (g: +G).(\lambda (c: C).(\lambda (t: T).(\lambda (H3: (ty3 g c t4 t)).(H2 g c t +(ty3_sred_pr0 t4 t3 H0 g c t H3)))))))))))) t1 t2 H))). + +lemma ty3_sred_pr2: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall +(g: G).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 +t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (g: +G).(\forall (t3: T).((ty3 g c0 t t3) \to (ty3 g c0 t0 t3))))))) (\lambda (c0: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (g: +G).(\lambda (t: T).(\lambda (H1: (ty3 g c0 t3 t)).(ty3_sred_wcpr0_pr0 g c0 t3 +t H1 c0 (wcpr0_refl c0) t4 H0)))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind +Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 +t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (g: +G).(\lambda (t0: T).(\lambda (H3: (ty3 g c0 t3 t0)).(ty3_subst0 g c0 t4 t0 +(ty3_sred_wcpr0_pr0 g c0 t3 t0 H3 c0 (wcpr0_refl c0) t4 H1) d u i H0 t +H2)))))))))))))) c t1 t2 H)))). + +lemma ty3_sred_pr3: + \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall +(g: G).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) +\def + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr3 c t1 +t2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (g: G).(\forall +(t3: T).((ty3 g c t t3) \to (ty3 g c t0 t3)))))) (\lambda (t: T).(\lambda (g: +G).(\lambda (t0: T).(\lambda (H0: (ty3 g c t t0)).H0)))) (\lambda (t3: +T).(\lambda (t4: T).(\lambda (H0: (pr2 c t4 t3)).(\lambda (t5: T).(\lambda +(_: (pr3 c t3 t5)).(\lambda (H2: ((\forall (g: G).(\forall (t: T).((ty3 g c +t3 t) \to (ty3 g c t5 t)))))).(\lambda (g: G).(\lambda (t: T).(\lambda (H3: +(ty3 g c t4 t)).(H2 g t (ty3_sred_pr2 c t4 t3 H0 g t H3))))))))))) t1 t2 +H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3_props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3_props.ma new file mode 100644 index 000000000..f12ad3934 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/pr3_props.ma @@ -0,0 +1,492 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/pr3.ma". + +lemma ty3_cred_pr2: + \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (v2: T).((pr2 c v1 +v2) \to (\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c +(Bind b) v1) t1 t2) \to (ty3 g (CHead c (Bind b) v2) t1 t2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda +(H: (pr2 c v1 v2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).(\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c0 (Bind +b) t) t1 t2) \to (ty3 g (CHead c0 (Bind b) t0) t1 t2)))))))) (\lambda (c0: +C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr0 t1 t2)).(\lambda (b: +B).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (ty3 g (CHead c0 (Bind b) +t1) t0 t3)).(ty3_sred_wcpr0_pr0 g (CHead c0 (Bind b) t1) t0 t3 H1 (CHead c0 +(Bind b) t2) (wcpr0_comp c0 c0 (wcpr0_refl c0) t1 t2 H0 (Bind b)) t0 +(pr0_refl t0)))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) +u))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H1: (pr0 t1 t2)).(\lambda +(t: T).(\lambda (H2: (subst0 i u t2 t)).(\lambda (b: B).(\lambda (t0: +T).(\lambda (t3: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b) t1) t0 +t3)).(ty3_csubst0 g (CHead c0 (Bind b) t2) t0 t3 (ty3_sred_wcpr0_pr0 g (CHead +c0 (Bind b) t1) t0 t3 H3 (CHead c0 (Bind b) t2) (wcpr0_comp c0 c0 (wcpr0_refl +c0) t1 t2 H1 (Bind b)) t0 (pr0_refl t0)) d u (S i) (getl_clear_bind b (CHead +c0 (Bind b) t2) c0 t2 (clear_bind b c0 t2) (CHead d (Bind Abbr) u) i H0) +(CHead c0 (Bind b) t) (csubst0_snd_bind b i u t2 t H2 c0)))))))))))))))) c v1 +v2 H))))). + +lemma ty3_cred_pr3: + \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (v2: T).((pr3 c v1 +v2) \to (\forall (b: B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c +(Bind b) v1) t1 t2) \to (ty3 g (CHead c (Bind b) v2) t1 t2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda +(H: (pr3 c v1 v2)).(pr3_ind c (\lambda (t: T).(\lambda (t0: T).(\forall (b: +B).(\forall (t1: T).(\forall (t2: T).((ty3 g (CHead c (Bind b) t) t1 t2) \to +(ty3 g (CHead c (Bind b) t0) t1 t2))))))) (\lambda (t: T).(\lambda (b: +B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (ty3 g (CHead c (Bind b) +t) t1 t2)).H0))))) (\lambda (t2: T).(\lambda (t1: T).(\lambda (H0: (pr2 c t1 +t2)).(\lambda (t3: T).(\lambda (_: (pr3 c t2 t3)).(\lambda (H2: ((\forall (b: +B).(\forall (t4: T).(\forall (t5: T).((ty3 g (CHead c (Bind b) t2) t4 t5) \to +(ty3 g (CHead c (Bind b) t3) t4 t5))))))).(\lambda (b: B).(\lambda (t0: +T).(\lambda (t4: T).(\lambda (H3: (ty3 g (CHead c (Bind b) t1) t0 t4)).(H2 b +t0 t4 (ty3_cred_pr2 g c t1 t2 H0 b t0 t4 H3)))))))))))) v1 v2 H))))). + +lemma ty3_gen_lift: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: +nat).(\forall (d: nat).((ty3 g c (lift h d t1) x) \to (\forall (e: C).((drop +h d c e) \to (ex2 T (\lambda (t2: T).(pc3 c (lift h d t2) x)) (\lambda (t2: +T).(ty3 g e t1 t2))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (ty3 g c (lift h d t1) x)).(insert_eq T +(lift h d t1) (\lambda (t: T).(ty3 g c t x)) (\lambda (_: T).(\forall (e: +C).((drop h d c e) \to (ex2 T (\lambda (t2: T).(pc3 c (lift h d t2) x)) +(\lambda (t2: T).(ty3 g e t1 t2)))))) (\lambda (y: T).(\lambda (H0: (ty3 g c +y x)).(unintro nat d (\lambda (n: nat).((eq T y (lift h n t1)) \to (\forall +(e: C).((drop h n c e) \to (ex2 T (\lambda (t2: T).(pc3 c (lift h n t2) x)) +(\lambda (t2: T).(ty3 g e t1 t2))))))) (unintro T t1 (\lambda (t: T).(\forall +(x0: nat).((eq T y (lift h x0 t)) \to (\forall (e: C).((drop h x0 c e) \to +(ex2 T (\lambda (t2: T).(pc3 c (lift h x0 t2) x)) (\lambda (t2: T).(ty3 g e t +t2)))))))) (ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).(\forall (x0: T).(\forall (x1: nat).((eq T t (lift h x1 x0)) \to (\forall +(e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) +t0)) (\lambda (t2: T).(ty3 g e x0 t2))))))))))) (\lambda (c0: C).(\lambda +(t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: ((\forall +(x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to (\forall (e: +C).((drop h x1 c0 e) \to (ex2 T (\lambda (t3: T).(pc3 c0 (lift h x1 t3) t)) +(\lambda (t3: T).(ty3 g e x0 t3)))))))))).(\lambda (u: T).(\lambda (t3: +T).(\lambda (H3: (ty3 g c0 u t3)).(\lambda (H4: ((\forall (x0: T).(\forall +(x1: nat).((eq T u (lift h x1 x0)) \to (\forall (e: C).((drop h x1 c0 e) \to +(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) t3)) (\lambda (t4: T).(ty3 g e +x0 t4)))))))))).(\lambda (H5: (pc3 c0 t3 t2)).(\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H6: (eq T u (lift h x1 x0))).(\lambda (e: C).(\lambda (H7: +(drop h x1 c0 e)).(let H8 \def (eq_ind T u (\lambda (t0: T).(\forall (x2: +T).(\forall (x3: nat).((eq T t0 (lift h x3 x2)) \to (\forall (e0: C).((drop h +x3 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x3 t4) t3)) (\lambda +(t4: T).(ty3 g e0 x2 t4))))))))) H4 (lift h x1 x0) H6) in (let H9 \def +(eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 t3)) H3 (lift h x1 x0) H6) in (let +H10 \def (H8 x0 x1 (refl_equal T (lift h x1 x0)) e H7) in (ex2_ind T (\lambda +(t4: T).(pc3 c0 (lift h x1 t4) t3)) (\lambda (t4: T).(ty3 g e x0 t4)) (ex2 T +(\lambda (t4: T).(pc3 c0 (lift h x1 t4) t2)) (\lambda (t4: T).(ty3 g e x0 +t4))) (\lambda (x2: T).(\lambda (H11: (pc3 c0 (lift h x1 x2) t3)).(\lambda +(H12: (ty3 g e x0 x2)).(ex_intro2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) +t2)) (\lambda (t4: T).(ty3 g e x0 t4)) x2 (pc3_t t3 c0 (lift h x1 x2) H11 t2 +H5) H12)))) H10))))))))))))))))))) (\lambda (c0: C).(\lambda (m: +nat).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H1: (eq T (TSort m) (lift +h x1 x0))).(\lambda (e: C).(\lambda (_: (drop h x1 c0 e)).(eq_ind_r T (TSort +m) (\lambda (t: T).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (TSort +(next g m)))) (\lambda (t2: T).(ty3 g e t t2)))) (ex_intro2 T (\lambda (t2: +T).(pc3 c0 (lift h x1 t2) (TSort (next g m)))) (\lambda (t2: T).(ty3 g e +(TSort m) t2)) (TSort (next g m)) (eq_ind_r T (TSort (next g m)) (\lambda (t: +T).(pc3 c0 t (TSort (next g m)))) (pc3_refl c0 (TSort (next g m))) (lift h x1 +(TSort (next g m))) (lift_sort (next g m) h x1)) (ty3_sort g e m)) x0 +(lift_gen_sort h x1 m x0 H1))))))))) (\lambda (n: nat).(\lambda (c0: +C).(\lambda (d0: C).(\lambda (u: T).(\lambda (H1: (getl n c0 (CHead d0 (Bind +Abbr) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d0 u t)).(\lambda (H3: +((\forall (x0: T).(\forall (x1: nat).((eq T u (lift h x1 x0)) \to (\forall +(e: C).((drop h x1 d0 e) \to (ex2 T (\lambda (t2: T).(pc3 d0 (lift h x1 t2) +t)) (\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H4: (eq T (TLRef n) (lift h x1 x0))).(\lambda (e: C).(\lambda +(H5: (drop h x1 c0 e)).(let H_x \def (lift_gen_lref x0 x1 h n H4) in (let H6 +\def H_x in (or_ind (land (lt n x1) (eq T x0 (TLRef n))) (land (le (plus x1 +h) n) (eq T x0 (TLRef (minus n h)))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h +x1 t2) (lift (S n) O t))) (\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (H7: +(land (lt n x1) (eq T x0 (TLRef n)))).(land_ind (lt n x1) (eq T x0 (TLRef n)) +(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda +(t2: T).(ty3 g e x0 t2))) (\lambda (H8: (lt n x1)).(\lambda (H9: (eq T x0 +(TLRef n))).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ex2 T (\lambda (t2: +T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: T).(ty3 g e t0 +t2)))) (let H10 \def (eq_ind nat x1 (\lambda (n0: nat).(drop h n0 c0 e)) H5 +(S (plus n (minus x1 (S n)))) (lt_plus_minus n x1 H8)) in (ex3_2_ind T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x1 (S n)) v)))) +(\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind Abbr) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h (minus x1 (S n)) d0 e0))) (ex2 T +(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: +T).(ty3 g e (TLRef n) t2))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H11: +(eq T u (lift h (minus x1 (S n)) x2))).(\lambda (H12: (getl n e (CHead x3 +(Bind Abbr) x2))).(\lambda (H13: (drop h (minus x1 (S n)) d0 x3)).(let H14 +\def (eq_ind T u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T +t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 d0 e0) \to (ex2 T +(\lambda (t2: T).(pc3 d0 (lift h x5 t2) t)) (\lambda (t2: T).(ty3 g e0 x4 +t2))))))))) H3 (lift h (minus x1 (S n)) x2) H11) in (let H15 \def (eq_ind T u +(\lambda (t0: T).(ty3 g d0 t0 t)) H2 (lift h (minus x1 (S n)) x2) H11) in +(let H16 \def (H14 x2 (minus x1 (S n)) (refl_equal T (lift h (minus x1 (S n)) +x2)) x3 H13) in (ex2_ind T (\lambda (t2: T).(pc3 d0 (lift h (minus x1 (S n)) +t2) t)) (\lambda (t2: T).(ty3 g x3 x2 t2)) (ex2 T (\lambda (t2: T).(pc3 c0 +(lift h x1 t2) (lift (S n) O t))) (\lambda (t2: T).(ty3 g e (TLRef n) t2))) +(\lambda (x4: T).(\lambda (H17: (pc3 d0 (lift h (minus x1 (S n)) x4) +t)).(\lambda (H18: (ty3 g x3 x2 x4)).(eq_ind_r nat (plus (S n) (minus x1 (S +n))) (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h n0 t2) (lift +(S n) O t))) (\lambda (t2: T).(ty3 g e (TLRef n) t2)))) (ex_intro2 T (\lambda +(t2: T).(pc3 c0 (lift h (plus (S n) (minus x1 (S n))) t2) (lift (S n) O t))) +(\lambda (t2: T).(ty3 g e (TLRef n) t2)) (lift (S n) O x4) (eq_ind_r T (lift +(S n) O (lift h (minus x1 (S n)) x4)) (\lambda (t0: T).(pc3 c0 t0 (lift (S n) +O t))) (pc3_lift c0 d0 (S n) O (getl_drop Abbr c0 d0 u n H1) (lift h (minus +x1 (S n)) x4) t H17) (lift h (plus (S n) (minus x1 (S n))) (lift (S n) O x4)) +(lift_d x4 h (S n) (minus x1 (S n)) O (le_O_n (minus x1 (S n))))) (ty3_abbr g +n e x3 x2 H12 x4 H18)) x1 (le_plus_minus (S n) x1 H8))))) H16))))))))) +(getl_drop_conf_lt Abbr c0 d0 u n H1 e h (minus x1 (S n)) H10))) x0 H9))) +H7)) (\lambda (H7: (land (le (plus x1 h) n) (eq T x0 (TLRef (minus n +h))))).(land_ind (le (plus x1 h) n) (eq T x0 (TLRef (minus n h))) (ex2 T +(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: +T).(ty3 g e x0 t2))) (\lambda (H8: (le (plus x1 h) n)).(\lambda (H9: (eq T x0 +(TLRef (minus n h)))).(eq_ind_r T (TLRef (minus n h)) (\lambda (t0: T).(ex2 T +(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t))) (\lambda (t2: +T).(ty3 g e t0 t2)))) (ex_intro2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) +(lift (S n) O t))) (\lambda (t2: T).(ty3 g e (TLRef (minus n h)) t2)) (lift +(S (minus n h)) O t) (eq_ind_r T (lift (plus h (S (minus n h))) O t) (\lambda +(t0: T).(pc3 c0 t0 (lift (S n) O t))) (eq_ind nat (S (plus h (minus n h))) +(\lambda (n0: nat).(pc3 c0 (lift n0 O t) (lift (S n) O t))) (eq_ind nat n +(\lambda (n0: nat).(pc3 c0 (lift (S n0) O t) (lift (S n) O t))) (pc3_refl c0 +(lift (S n) O t)) (plus h (minus n h)) (le_plus_minus h n (le_trans h (plus +x1 h) n (le_plus_r x1 h) H8))) (plus h (S (minus n h))) (plus_n_Sm h (minus n +h))) (lift h x1 (lift (S (minus n h)) O t)) (lift_free t (S (minus n h)) h O +x1 (le_trans x1 (S (minus n h)) (plus O (S (minus n h))) (le_S_minus x1 h n +H8) (le_plus_r O (S (minus n h)))) (le_O_n x1))) (ty3_abbr g (minus n h) e d0 +u (getl_drop_conf_ge n (CHead d0 (Bind Abbr) u) c0 H1 e h x1 H5 H8) t H2)) x0 +H9))) H7)) H6)))))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda +(d0: C).(\lambda (u: T).(\lambda (H1: (getl n c0 (CHead d0 (Bind Abst) +u))).(\lambda (t: T).(\lambda (H2: (ty3 g d0 u t)).(\lambda (H3: ((\forall +(x0: T).(\forall (x1: nat).((eq T u (lift h x1 x0)) \to (\forall (e: +C).((drop h x1 d0 e) \to (ex2 T (\lambda (t2: T).(pc3 d0 (lift h x1 t2) t)) +(\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H4: (eq T (TLRef n) (lift h x1 x0))).(\lambda (e: C).(\lambda +(H5: (drop h x1 c0 e)).(let H_x \def (lift_gen_lref x0 x1 h n H4) in (let H6 +\def H_x in (or_ind (land (lt n x1) (eq T x0 (TLRef n))) (land (le (plus x1 +h) n) (eq T x0 (TLRef (minus n h)))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h +x1 t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (H7: +(land (lt n x1) (eq T x0 (TLRef n)))).(land_ind (lt n x1) (eq T x0 (TLRef n)) +(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda +(t2: T).(ty3 g e x0 t2))) (\lambda (H8: (lt n x1)).(\lambda (H9: (eq T x0 +(TLRef n))).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ex2 T (\lambda (t2: +T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e t0 +t2)))) (let H10 \def (eq_ind nat x1 (\lambda (n0: nat).(drop h n0 c0 e)) H5 +(S (plus n (minus x1 (S n)))) (lt_plus_minus n x1 H8)) in (ex3_2_ind T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus x1 (S n)) v)))) +(\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind Abst) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h (minus x1 (S n)) d0 e0))) (ex2 T +(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda (t2: +T).(ty3 g e (TLRef n) t2))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H11: +(eq T u (lift h (minus x1 (S n)) x2))).(\lambda (H12: (getl n e (CHead x3 +(Bind Abst) x2))).(\lambda (H13: (drop h (minus x1 (S n)) d0 x3)).(let H14 +\def (eq_ind T u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T +t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 d0 e0) \to (ex2 T +(\lambda (t2: T).(pc3 d0 (lift h x5 t2) t)) (\lambda (t2: T).(ty3 g e0 x4 +t2))))))))) H3 (lift h (minus x1 (S n)) x2) H11) in (let H15 \def (eq_ind T u +(\lambda (t0: T).(ty3 g d0 t0 t)) H2 (lift h (minus x1 (S n)) x2) H11) in +(eq_ind_r T (lift h (minus x1 (S n)) x2) (\lambda (t0: T).(ex2 T (\lambda +(t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O t0))) (\lambda (t2: T).(ty3 g e +(TLRef n) t2)))) (let H16 \def (H14 x2 (minus x1 (S n)) (refl_equal T (lift h +(minus x1 (S n)) x2)) x3 H13) in (ex2_ind T (\lambda (t2: T).(pc3 d0 (lift h +(minus x1 (S n)) t2) t)) (\lambda (t2: T).(ty3 g x3 x2 t2)) (ex2 T (\lambda +(t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O (lift h (minus x1 (S n)) x2)))) +(\lambda (t2: T).(ty3 g e (TLRef n) t2))) (\lambda (x4: T).(\lambda (_: (pc3 +d0 (lift h (minus x1 (S n)) x4) t)).(\lambda (H18: (ty3 g x3 x2 +x4)).(eq_ind_r nat (plus (S n) (minus x1 (S n))) (\lambda (n0: nat).(ex2 T +(\lambda (t2: T).(pc3 c0 (lift h n0 t2) (lift (S n) O (lift h (minus n0 (S +n)) x2)))) (\lambda (t2: T).(ty3 g e (TLRef n) t2)))) (ex_intro2 T (\lambda +(t2: T).(pc3 c0 (lift h (plus (S n) (minus x1 (S n))) t2) (lift (S n) O (lift +h (minus (plus (S n) (minus x1 (S n))) (S n)) x2)))) (\lambda (t2: T).(ty3 g +e (TLRef n) t2)) (lift (S n) O x2) (eq_ind_r T (lift (S n) O (lift h (minus +x1 (S n)) x2)) (\lambda (t0: T).(pc3 c0 t0 (lift (S n) O (lift h (minus (plus +(S n) (minus x1 (S n))) (S n)) x2)))) (eq_ind nat x1 (\lambda (n0: nat).(pc3 +c0 (lift (S n) O (lift h (minus x1 (S n)) x2)) (lift (S n) O (lift h (minus +n0 (S n)) x2)))) (pc3_refl c0 (lift (S n) O (lift h (minus x1 (S n)) x2))) +(plus (S n) (minus x1 (S n))) (le_plus_minus (S n) x1 H8)) (lift h (plus (S +n) (minus x1 (S n))) (lift (S n) O x2)) (lift_d x2 h (S n) (minus x1 (S n)) O +(le_O_n (minus x1 (S n))))) (ty3_abst g n e x3 x2 H12 x4 H18)) x1 +(le_plus_minus (S n) x1 H8))))) H16)) u H11)))))))) (getl_drop_conf_lt Abst +c0 d0 u n H1 e h (minus x1 (S n)) H10))) x0 H9))) H7)) (\lambda (H7: (land +(le (plus x1 h) n) (eq T x0 (TLRef (minus n h))))).(land_ind (le (plus x1 h) +n) (eq T x0 (TLRef (minus n h))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 +t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (H8: (le +(plus x1 h) n)).(\lambda (H9: (eq T x0 (TLRef (minus n h)))).(eq_ind_r T +(TLRef (minus n h)) (\lambda (t0: T).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h +x1 t2) (lift (S n) O u))) (\lambda (t2: T).(ty3 g e t0 t2)))) (ex_intro2 T +(\lambda (t2: T).(pc3 c0 (lift h x1 t2) (lift (S n) O u))) (\lambda (t2: +T).(ty3 g e (TLRef (minus n h)) t2)) (lift (S (minus n h)) O u) (eq_ind_r T +(lift (plus h (S (minus n h))) O u) (\lambda (t0: T).(pc3 c0 t0 (lift (S n) O +u))) (eq_ind nat (S (plus h (minus n h))) (\lambda (n0: nat).(pc3 c0 (lift n0 +O u) (lift (S n) O u))) (eq_ind nat n (\lambda (n0: nat).(pc3 c0 (lift (S n0) +O u) (lift (S n) O u))) (pc3_refl c0 (lift (S n) O u)) (plus h (minus n h)) +(le_plus_minus h n (le_trans h (plus x1 h) n (le_plus_r x1 h) H8))) (plus h +(S (minus n h))) (plus_n_Sm h (minus n h))) (lift h x1 (lift (S (minus n h)) +O u)) (lift_free u (S (minus n h)) h O x1 (le_trans x1 (S (minus n h)) (plus +O (S (minus n h))) (le_S_minus x1 h n H8) (le_plus_r O (S (minus n h)))) +(le_O_n x1))) (ty3_abst g (minus n h) e d0 u (getl_drop_conf_ge n (CHead d0 +(Bind Abst) u) c0 H1 e h x1 H5 H8) t H2)) x0 H9))) H7)) H6)))))))))))))))) +(\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H1: (ty3 g c0 u +t)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T u (lift h x1 +x0)) \to (\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 +c0 (lift h x1 t2) t)) (\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (b: +B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b) +u) t2 t3)).(\lambda (H4: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift +h x1 x0)) \to (\forall (e: C).((drop h x1 (CHead c0 (Bind b) u) e) \to (ex2 T +(\lambda (t4: T).(pc3 (CHead c0 (Bind b) u) (lift h x1 t4) t3)) (\lambda (t4: +T).(ty3 g e x0 t4)))))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: +(eq T (THead (Bind b) u t2) (lift h x1 x0))).(\lambda (e: C).(\lambda (H6: +(drop h x1 c0 e)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 +(THead (Bind b) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T u (lift h x1 +y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (S x1) z)))) (ex2 T +(\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) u t3))) (\lambda (t4: +T).(ty3 g e x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T x0 +(THead (Bind b) x2 x3))).(\lambda (H8: (eq T u (lift h x1 x2))).(\lambda (H9: +(eq T t2 (lift h (S x1) x3))).(eq_ind_r T (THead (Bind b) x2 x3) (\lambda +(t0: T).(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) u +t3))) (\lambda (t4: T).(ty3 g e t0 t4)))) (let H10 \def (eq_ind T t2 (\lambda +(t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T t0 (lift h x5 x4)) \to +(\forall (e0: C).((drop h x5 (CHead c0 (Bind b) u) e0) \to (ex2 T (\lambda +(t4: T).(pc3 (CHead c0 (Bind b) u) (lift h x5 t4) t3)) (\lambda (t4: T).(ty3 +g e0 x4 t4))))))))) H4 (lift h (S x1) x3) H9) in (let H11 \def (eq_ind T t2 +(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t0 t3)) H3 (lift h (S x1) x3) +H9) in (let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g (CHead c0 (Bind b) +t0) (lift h (S x1) x3) t3)) H11 (lift h x1 x2) H8) in (let H13 \def (eq_ind T +u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: nat).((eq T (lift h (S x1) +x3) (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 (CHead c0 (Bind b) t0) +e0) \to (ex2 T (\lambda (t4: T).(pc3 (CHead c0 (Bind b) t0) (lift h x5 t4) +t3)) (\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H10 (lift h x1 x2) H8) in (let +H14 \def (eq_ind T u (\lambda (t0: T).(\forall (x4: T).(\forall (x5: +nat).((eq T t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 c0 e0) \to +(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x5 t4) t)) (\lambda (t4: T).(ty3 g e0 +x4 t4))))))))) H2 (lift h x1 x2) H8) in (let H15 \def (eq_ind T u (\lambda +(t0: T).(ty3 g c0 t0 t)) H1 (lift h x1 x2) H8) in (eq_ind_r T (lift h x1 x2) +(\lambda (t0: T).(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind +b) t0 t3))) (\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4)))) (let H16 +\def (H14 x2 x1 (refl_equal T (lift h x1 x2)) e H6) in (ex2_ind T (\lambda +(t4: T).(pc3 c0 (lift h x1 t4) t)) (\lambda (t4: T).(ty3 g e x2 t4)) (ex2 T +(\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) (lift h x1 x2) t3))) +(\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4))) (\lambda (x4: +T).(\lambda (_: (pc3 c0 (lift h x1 x4) t)).(\lambda (H18: (ty3 g e x2 +x4)).(let H19 \def (H13 x3 (S x1) (refl_equal T (lift h (S x1) x3)) (CHead e +(Bind b) x2) (drop_skip_bind h x1 c0 e H6 b x2)) in (ex2_ind T (\lambda (t4: +T).(pc3 (CHead c0 (Bind b) (lift h x1 x2)) (lift h (S x1) t4) t3)) (\lambda +(t4: T).(ty3 g (CHead e (Bind b) x2) x3 t4)) (ex2 T (\lambda (t4: T).(pc3 c0 +(lift h x1 t4) (THead (Bind b) (lift h x1 x2) t3))) (\lambda (t4: T).(ty3 g e +(THead (Bind b) x2 x3) t4))) (\lambda (x5: T).(\lambda (H20: (pc3 (CHead c0 +(Bind b) (lift h x1 x2)) (lift h (S x1) x5) t3)).(\lambda (H21: (ty3 g (CHead +e (Bind b) x2) x3 x5)).(ex_ind T (\lambda (t0: T).(ty3 g (CHead e (Bind b) +x2) x5 t0)) (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) +(lift h x1 x2) t3))) (\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4))) +(\lambda (x6: T).(\lambda (_: (ty3 g (CHead e (Bind b) x2) x5 x6)).(ex_intro2 +T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Bind b) (lift h x1 x2) +t3))) (\lambda (t4: T).(ty3 g e (THead (Bind b) x2 x3) t4)) (THead (Bind b) +x2 x5) (eq_ind_r T (THead (Bind b) (lift h x1 x2) (lift h (S x1) x5)) +(\lambda (t0: T).(pc3 c0 t0 (THead (Bind b) (lift h x1 x2) t3))) (pc3_head_2 +c0 (lift h x1 x2) (lift h (S x1) x5) t3 (Bind b) H20) (lift h x1 (THead (Bind +b) x2 x5)) (lift_bind b x2 x5 h x1)) (ty3_bind g e x2 x4 H18 b x3 x5 H21)))) +(ty3_correct g (CHead e (Bind b) x2) x3 x5 H21))))) H19))))) H16)) u +H8))))))) x0 H7)))))) (lift_gen_bind b u t2 x0 h x1 H5))))))))))))))))) +(\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (H1: (ty3 g c0 w +u)).(\lambda (H2: ((\forall (x0: T).(\forall (x1: nat).((eq T w (lift h x1 +x0)) \to (\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 +c0 (lift h x1 t2) u)) (\lambda (t2: T).(ty3 g e x0 t2)))))))))).(\lambda (v: +T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 v (THead (Bind Abst) u +t))).(\lambda (H4: ((\forall (x0: T).(\forall (x1: nat).((eq T v (lift h x1 +x0)) \to (\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t2: T).(pc3 +c0 (lift h x1 t2) (THead (Bind Abst) u t))) (\lambda (t2: T).(ty3 g e x0 +t2)))))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq T (THead +(Flat Appl) w v) (lift h x1 x0))).(\lambda (e: C).(\lambda (H6: (drop h x1 c0 +e)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 (THead (Flat +Appl) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T w (lift h x1 y0)))) +(\lambda (_: T).(\lambda (z: T).(eq T v (lift h x1 z)))) (ex2 T (\lambda (t2: +T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) w (THead (Bind Abst) u t)))) +(\lambda (t2: T).(ty3 g e x0 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda +(H7: (eq T x0 (THead (Flat Appl) x2 x3))).(\lambda (H8: (eq T w (lift h x1 +x2))).(\lambda (H9: (eq T v (lift h x1 x3))).(eq_ind_r T (THead (Flat Appl) +x2 x3) (\lambda (t0: T).(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (THead +(Flat Appl) w (THead (Bind Abst) u t)))) (\lambda (t2: T).(ty3 g e t0 t2)))) +(let H10 \def (eq_ind T v (\lambda (t0: T).(\forall (x4: T).(\forall (x5: +nat).((eq T t0 (lift h x5 x4)) \to (\forall (e0: C).((drop h x5 c0 e0) \to +(ex2 T (\lambda (t2: T).(pc3 c0 (lift h x5 t2) (THead (Bind Abst) u t))) +(\lambda (t2: T).(ty3 g e0 x4 t2))))))))) H4 (lift h x1 x3) H9) in (let H11 +\def (eq_ind T v (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H3 +(lift h x1 x3) H9) in (let H12 \def (eq_ind T w (\lambda (t0: T).(\forall +(x4: T).(\forall (x5: nat).((eq T t0 (lift h x5 x4)) \to (\forall (e0: +C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x5 t2) u)) +(\lambda (t2: T).(ty3 g e0 x4 t2))))))))) H2 (lift h x1 x2) H8) in (let H13 +\def (eq_ind T w (\lambda (t0: T).(ty3 g c0 t0 u)) H1 (lift h x1 x2) H8) in +(eq_ind_r T (lift h x1 x2) (\lambda (t0: T).(ex2 T (\lambda (t2: T).(pc3 c0 +(lift h x1 t2) (THead (Flat Appl) t0 (THead (Bind Abst) u t)))) (\lambda (t2: +T).(ty3 g e (THead (Flat Appl) x2 x3) t2)))) (let H14 \def (H12 x2 x1 +(refl_equal T (lift h x1 x2)) e H6) in (ex2_ind T (\lambda (t2: T).(pc3 c0 +(lift h x1 t2) u)) (\lambda (t2: T).(ty3 g e x2 t2)) (ex2 T (\lambda (t2: +T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind +Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) +(\lambda (x4: T).(\lambda (H15: (pc3 c0 (lift h x1 x4) u)).(\lambda (H16: +(ty3 g e x2 x4)).(let H17 \def (H10 x3 x1 (refl_equal T (lift h x1 x3)) e H6) +in (ex2_ind T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (THead (Bind Abst) u +t))) (\lambda (t2: T).(ty3 g e x3 t2)) (ex2 T (\lambda (t2: T).(pc3 c0 (lift +h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind Abst) u t)))) +(\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) (\lambda (x5: +T).(\lambda (H18: (pc3 c0 (lift h x1 x5) (THead (Bind Abst) u t))).(\lambda +(H19: (ty3 g e x3 x5)).(ex3_2_ind T T (\lambda (u1: T).(\lambda (t2: T).(pr3 +e x5 (THead (Bind Abst) u1 t2)))) (\lambda (u1: T).(\lambda (_: T).(pr3 c0 u +(lift h x1 u1)))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall +(u0: T).(pr3 (CHead c0 (Bind b) u0) t (lift h (S x1) t2)))))) (ex2 T (\lambda +(t2: T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind +Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) +(\lambda (x6: T).(\lambda (x7: T).(\lambda (H20: (pr3 e x5 (THead (Bind Abst) +x6 x7))).(\lambda (H21: (pr3 c0 u (lift h x1 x6))).(\lambda (H22: ((\forall +(b: B).(\forall (u0: T).(pr3 (CHead c0 (Bind b) u0) t (lift h (S x1) +x7)))))).(ex_ind T (\lambda (t0: T).(ty3 g e x5 t0)) (ex2 T (\lambda (t2: +T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind +Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) +(\lambda (x8: T).(\lambda (H23: (ty3 g e x5 x8)).(let H_y \def (ty3_sred_pr3 +e x5 (THead (Bind Abst) x6 x7) H20 g x8 H23) in (ex3_2_ind T T (\lambda (t2: +T).(\lambda (_: T).(pc3 e (THead (Bind Abst) x6 t2) x8))) (\lambda (_: +T).(\lambda (t0: T).(ty3 g e x6 t0))) (\lambda (t2: T).(\lambda (_: T).(ty3 g +(CHead e (Bind Abst) x6) x7 t2))) (ex2 T (\lambda (t2: T).(pc3 c0 (lift h x1 +t2) (THead (Flat Appl) (lift h x1 x2) (THead (Bind Abst) u t)))) (\lambda +(t2: T).(ty3 g e (THead (Flat Appl) x2 x3) t2))) (\lambda (x9: T).(\lambda +(x10: T).(\lambda (_: (pc3 e (THead (Bind Abst) x6 x9) x8)).(\lambda (H25: +(ty3 g e x6 x10)).(\lambda (H26: (ty3 g (CHead e (Bind Abst) x6) x7 +x9)).(ex_intro2 T (\lambda (t2: T).(pc3 c0 (lift h x1 t2) (THead (Flat Appl) +(lift h x1 x2) (THead (Bind Abst) u t)))) (\lambda (t2: T).(ty3 g e (THead +(Flat Appl) x2 x3) t2)) (THead (Flat Appl) x2 (THead (Bind Abst) x6 x7)) +(eq_ind_r T (THead (Flat Appl) (lift h x1 x2) (lift h x1 (THead (Bind Abst) +x6 x7))) (\lambda (t0: T).(pc3 c0 t0 (THead (Flat Appl) (lift h x1 x2) (THead +(Bind Abst) u t)))) (pc3_thin_dx c0 (lift h x1 (THead (Bind Abst) x6 x7)) +(THead (Bind Abst) u t) (eq_ind_r T (THead (Bind Abst) (lift h x1 x6) (lift h +(S x1) x7)) (\lambda (t0: T).(pc3 c0 t0 (THead (Bind Abst) u t))) +(pc3_head_21 c0 (lift h x1 x6) u (pc3_pr3_x c0 (lift h x1 x6) u H21) (Bind +Abst) (lift h (S x1) x7) t (pc3_pr3_x (CHead c0 (Bind Abst) (lift h x1 x6)) +(lift h (S x1) x7) t (H22 Abst (lift h x1 x6)))) (lift h x1 (THead (Bind +Abst) x6 x7)) (lift_bind Abst x6 x7 h x1)) (lift h x1 x2) Appl) (lift h x1 +(THead (Flat Appl) x2 (THead (Bind Abst) x6 x7))) (lift_flat Appl x2 (THead +(Bind Abst) x6 x7) h x1)) (ty3_appl g e x2 x6 (ty3_conv g e x6 x10 H25 x2 x4 +H16 (pc3_gen_lift c0 x4 x6 h x1 (pc3_t u c0 (lift h x1 x4) H15 (lift h x1 x6) +(pc3_pr3_r c0 u (lift h x1 x6) H21)) e H6)) x3 x7 (ty3_conv g e (THead (Bind +Abst) x6 x7) (THead (Bind Abst) x6 x9) (ty3_bind g e x6 x10 H25 Abst x7 x9 +H26) x3 x5 H19 (pc3_pr3_r e x5 (THead (Bind Abst) x6 x7) H20))))))))) +(ty3_gen_bind g Abst e x6 x7 x8 H_y))))) (ty3_correct g e x3 x5 H19))))))) +(pc3_gen_lift_abst c0 x5 t u h x1 H18 e H6))))) H17))))) H14)) w H8))))) x0 +H7)))))) (lift_gen_flat Appl w v x0 h x1 H5)))))))))))))))) (\lambda (c0: +C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (ty3 g c0 t2 t3)).(\lambda +(H2: ((\forall (x0: T).(\forall (x1: nat).((eq T t2 (lift h x1 x0)) \to +(\forall (e: C).((drop h x1 c0 e) \to (ex2 T (\lambda (t4: T).(pc3 c0 (lift h +x1 t4) t3)) (\lambda (t4: T).(ty3 g e x0 t4)))))))))).(\lambda (t0: +T).(\lambda (H3: (ty3 g c0 t3 t0)).(\lambda (H4: ((\forall (x0: T).(\forall +(x1: nat).((eq T t3 (lift h x1 x0)) \to (\forall (e: C).((drop h x1 c0 e) \to +(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) t0)) (\lambda (t4: T).(ty3 g e +x0 t4)))))))))).(\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq T +(THead (Flat Cast) t3 t2) (lift h x1 x0))).(\lambda (e: C).(\lambda (H6: +(drop h x1 c0 e)).(ex3_2_ind T T (\lambda (y0: T).(\lambda (z: T).(eq T x0 +(THead (Flat Cast) y0 z)))) (\lambda (y0: T).(\lambda (_: T).(eq T t3 (lift h +x1 y0)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h x1 z)))) (ex2 T +(\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Flat Cast) t0 t3))) (\lambda +(t4: T).(ty3 g e x0 t4))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq +T x0 (THead (Flat Cast) x2 x3))).(\lambda (H8: (eq T t3 (lift h x1 +x2))).(\lambda (H9: (eq T t2 (lift h x1 x3))).(eq_ind_r T (THead (Flat Cast) +x2 x3) (\lambda (t: T).(ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead +(Flat Cast) t0 t3))) (\lambda (t4: T).(ty3 g e t t4)))) (let H10 \def (eq_ind +T t3 (\lambda (t: T).(\forall (x4: T).(\forall (x5: nat).((eq T t (lift h x5 +x4)) \to (\forall (e0: C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 +c0 (lift h x5 t4) t0)) (\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H4 (lift h +x1 x2) H8) in (let H11 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t t0)) H3 +(lift h x1 x2) H8) in (let H12 \def (eq_ind T t3 (\lambda (t: T).(\forall +(x4: T).(\forall (x5: nat).((eq T t2 (lift h x5 x4)) \to (\forall (e0: +C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x5 t4) t)) +(\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H2 (lift h x1 x2) H8) in (let H13 +\def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t2 t)) H1 (lift h x1 x2) H8) in +(eq_ind_r T (lift h x1 x2) (\lambda (t: T).(ex2 T (\lambda (t4: T).(pc3 c0 +(lift h x1 t4) (THead (Flat Cast) t0 t))) (\lambda (t4: T).(ty3 g e (THead +(Flat Cast) x2 x3) t4)))) (let H14 \def (eq_ind T t2 (\lambda (t: T).(ty3 g +c0 t (lift h x1 x2))) H13 (lift h x1 x3) H9) in (let H15 \def (eq_ind T t2 +(\lambda (t: T).(\forall (x4: T).(\forall (x5: nat).((eq T t (lift h x5 x4)) +\to (\forall (e0: C).((drop h x5 c0 e0) \to (ex2 T (\lambda (t4: T).(pc3 c0 +(lift h x5 t4) (lift h x1 x2))) (\lambda (t4: T).(ty3 g e0 x4 t4))))))))) H12 +(lift h x1 x3) H9) in (let H16 \def (H15 x3 x1 (refl_equal T (lift h x1 x3)) +e H6) in (ex2_ind T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (lift h x1 x2))) +(\lambda (t4: T).(ty3 g e x3 t4)) (ex2 T (\lambda (t4: T).(pc3 c0 (lift h x1 +t4) (THead (Flat Cast) t0 (lift h x1 x2)))) (\lambda (t4: T).(ty3 g e (THead +(Flat Cast) x2 x3) t4))) (\lambda (x4: T).(\lambda (H17: (pc3 c0 (lift h x1 +x4) (lift h x1 x2))).(\lambda (H18: (ty3 g e x3 x4)).(let H19 \def (H10 x2 x1 +(refl_equal T (lift h x1 x2)) e H6) in (ex2_ind T (\lambda (t4: T).(pc3 c0 +(lift h x1 t4) t0)) (\lambda (t4: T).(ty3 g e x2 t4)) (ex2 T (\lambda (t4: +T).(pc3 c0 (lift h x1 t4) (THead (Flat Cast) t0 (lift h x1 x2)))) (\lambda +(t4: T).(ty3 g e (THead (Flat Cast) x2 x3) t4))) (\lambda (x5: T).(\lambda +(H20: (pc3 c0 (lift h x1 x5) t0)).(\lambda (H21: (ty3 g e x2 x5)).(ex_intro2 +T (\lambda (t4: T).(pc3 c0 (lift h x1 t4) (THead (Flat Cast) t0 (lift h x1 +x2)))) (\lambda (t4: T).(ty3 g e (THead (Flat Cast) x2 x3) t4)) (THead (Flat +Cast) x5 x2) (eq_ind_r T (THead (Flat Cast) (lift h x1 x5) (lift h x1 x2)) +(\lambda (t: T).(pc3 c0 t (THead (Flat Cast) t0 (lift h x1 x2)))) (pc3_head_1 +c0 (lift h x1 x5) t0 H20 (Flat Cast) (lift h x1 x2)) (lift h x1 (THead (Flat +Cast) x5 x2)) (lift_flat Cast x5 x2 h x1)) (ty3_cast g e x3 x2 (ty3_conv g e +x2 x5 H21 x3 x4 H18 (pc3_gen_lift c0 x4 x2 h x1 H17 e H6)) x5 H21))))) +H19))))) H16)))) t3 H8))))) x0 H7)))))) (lift_gen_flat Cast t3 t2 x0 h x1 +H5))))))))))))))) c y x H0))))) H))))))). + +lemma ty3_tred: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u +t1) \to (\forall (t2: T).((pr3 c t1 t2) \to (ty3 g c u t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: +(ty3 g c u t1)).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).(ex_ind T +(\lambda (t: T).(ty3 g c t1 t)) (ty3 g c u t2) (\lambda (x: T).(\lambda (H1: +(ty3 g c t1 x)).(let H_y \def (ty3_sred_pr3 c t1 t2 H0 g x H1) in (ty3_conv g +c t2 x H_y u t1 H (pc3_pr3_r c t1 t2 H0))))) (ty3_correct g c u t1 H)))))))). + +theorem ty3_sconv_pc3: + \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c +u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to ((pc3 c u1 +u2) \to (pc3 c t1 t2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda +(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c +u2 t2)).(\lambda (H1: (pc3 c u1 u2)).(let H2 \def H1 in (ex2_ind T (\lambda +(t: T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c u2 t)) (pc3 c t1 t2) (\lambda (x: +T).(\lambda (H3: (pr3 c u1 x)).(\lambda (H4: (pr3 c u2 x)).(let H_y \def +(ty3_sred_pr3 c u2 x H4 g t2 H0) in (let H_y0 \def (ty3_sred_pr3 c u1 x H3 g +t1 H) in (ty3_unique g c x t1 H_y0 t2 H_y)))))) H2)))))))))). + +lemma ty3_sred_back: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t0: T).((ty3 g c +t1 t0) \to (\forall (t2: T).((pr3 c t1 t2) \to (\forall (t: T).((ty3 g c t2 +t) \to (ty3 g c t1 t))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t0: T).(\lambda +(H: (ty3 g c t1 t0)).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).(\lambda +(t: T).(\lambda (H1: (ty3 g c t2 t)).(ex_ind T (\lambda (t3: T).(ty3 g c t +t3)) (ty3 g c t1 t) (\lambda (x: T).(\lambda (H2: (ty3 g c t x)).(ty3_conv g +c t x H2 t1 t0 H (ty3_unique g c t2 t0 (ty3_sred_pr3 c t1 t2 H0 g t0 H) t +H1)))) (ty3_correct g c t2 t H1)))))))))). + +theorem ty3_sconv: + \forall (g: G).(\forall (c: C).(\forall (u1: T).(\forall (t1: T).((ty3 g c +u1 t1) \to (\forall (u2: T).(\forall (t2: T).((ty3 g c u2 t2) \to ((pc3 c u1 +u2) \to (ty3 g c u1 t2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda +(H: (ty3 g c u1 t1)).(\lambda (u2: T).(\lambda (t2: T).(\lambda (H0: (ty3 g c +u2 t2)).(\lambda (H1: (pc3 c u1 u2)).(let H2 \def H1 in (ex2_ind T (\lambda +(t: T).(pr3 c u1 t)) (\lambda (t: T).(pr3 c u2 t)) (ty3 g c u1 t2) (\lambda +(x: T).(\lambda (H3: (pr3 c u1 x)).(\lambda (H4: (pr3 c u2 x)).(ty3_sred_back +g c u1 t1 H x H3 t2 (ty3_sred_pr3 c u2 x H4 g t2 H0))))) H2)))))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/props.ma new file mode 100644 index 000000000..c5743094b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/props.ma @@ -0,0 +1,669 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/fwd.ma". + +include "basic_1A/pc3/fwd.ma". + +lemma ty3_lift: + \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((ty3 g e +t1 t2) \to (\forall (c: C).(\forall (d: nat).(\forall (h: nat).((drop h d c +e) \to (ty3 g c (lift h d t1) (lift h d t2)))))))))) +\def + \lambda (g: G).(\lambda (e: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g e t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda (t0: +T).(\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) \to +(ty3 g c0 (lift h d t) (lift h d t0))))))))) (\lambda (c: C).(\lambda (t0: +T).(\lambda (t: T).(\lambda (_: (ty3 g c t0 t)).(\lambda (H1: ((\forall (c0: +C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h +d t0) (lift h d t)))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 +g c u t3)).(\lambda (H3: ((\forall (c0: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c0 c) \to (ty3 g c0 (lift h d u) (lift h d +t3)))))))).(\lambda (H4: (pc3 c t3 t0)).(\lambda (c0: C).(\lambda (d: +nat).(\lambda (h: nat).(\lambda (H5: (drop h d c0 c)).(ty3_conv g c0 (lift h +d t0) (lift h d t) (H1 c0 d h H5) (lift h d u) (lift h d t3) (H3 c0 d h H5) +(pc3_lift c0 c h d H5 t3 t0 H4)))))))))))))))) (\lambda (c: C).(\lambda (m: +nat).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (_: (drop +h d c0 c)).(eq_ind_r T (TSort m) (\lambda (t: T).(ty3 g c0 t (lift h d (TSort +(next g m))))) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(ty3 g c0 +(TSort m) t)) (ty3_sort g c0 m) (lift h d (TSort (next g m))) (lift_sort +(next g m) h d)) (lift h d (TSort m)) (lift_sort m h d)))))))) (\lambda (n: +nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c +(CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u +t)).(\lambda (H2: ((\forall (c0: C).(\forall (d0: nat).(\forall (h: +nat).((drop h d0 c0 d) \to (ty3 g c0 (lift h d0 u) (lift h d0 +t)))))))).(\lambda (c0: C).(\lambda (d0: nat).(\lambda (h: nat).(\lambda (H3: +(drop h d0 c0 c)).(lt_le_e n d0 (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 +(lift (S n) O t))) (\lambda (H4: (lt n d0)).(let H5 \def (drop_getl_trans_le +n d0 (le_S_n n d0 (le_S_n (S n) (S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) +d0 H4)))) c0 c h H3 (CHead d (Bind Abbr) u) H0) in (ex3_2_ind C C (\lambda +(e0: C).(\lambda (_: C).(drop n O c0 e0))) (\lambda (e0: C).(\lambda (e1: +C).(drop h (minus d0 n) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 +(CHead d (Bind Abbr) u)))) (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 (lift +(S n) O t))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop n O c0 +x0)).(\lambda (H7: (drop h (minus d0 n) x0 x1)).(\lambda (H8: (clear x1 +(CHead d (Bind Abbr) u))).(let H9 \def (eq_ind nat (minus d0 n) (\lambda (n0: +nat).(drop h n0 x0 x1)) H7 (S (minus d0 (S n))) (minus_x_Sy d0 n H4)) in (let +H10 \def (drop_clear_S x1 x0 h (minus d0 (S n)) H9 Abbr d u H8) in (ex2_ind C +(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d0 (S n)) +u)))) (\lambda (c1: C).(drop h (minus d0 (S n)) c1 d)) (ty3 g c0 (lift h d0 +(TLRef n)) (lift h d0 (lift (S n) O t))) (\lambda (x: C).(\lambda (H11: +(clear x0 (CHead x (Bind Abbr) (lift h (minus d0 (S n)) u)))).(\lambda (H12: +(drop h (minus d0 (S n)) x d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ty3 g +c0 t0 (lift h d0 (lift (S n) O t)))) (eq_ind nat (plus (S n) (minus d0 (S +n))) (\lambda (n0: nat).(ty3 g c0 (TLRef n) (lift h n0 (lift (S n) O t)))) +(eq_ind_r T (lift (S n) O (lift h (minus d0 (S n)) t)) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (eq_ind nat d0 (\lambda (_: nat).(ty3 g c0 (TLRef n) +(lift (S n) O (lift h (minus d0 (S n)) t)))) (ty3_abbr g n c0 x (lift h +(minus d0 (S n)) u) (getl_intro n c0 (CHead x (Bind Abbr) (lift h (minus d0 +(S n)) u)) x0 H6 H11) (lift h (minus d0 (S n)) t) (H2 x (minus d0 (S n)) h +H12)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H4)) (lift h +(plus (S n) (minus d0 (S n))) (lift (S n) O t)) (lift_d t h (S n) (minus d0 +(S n)) O (le_O_n (minus d0 (S n))))) d0 (le_plus_minus_r (S n) d0 H4)) (lift +h d0 (TLRef n)) (lift_lref_lt n h d0 H4))))) H10)))))))) H5))) (\lambda (H4: +(le d0 n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(ty3 g c0 t0 (lift +h d0 (lift (S n) O t)))) (eq_ind nat (S n) (\lambda (_: nat).(ty3 g c0 (TLRef +(plus n h)) (lift h d0 (lift (S n) O t)))) (eq_ind_r T (lift (plus h (S n)) O +t) (\lambda (t0: T).(ty3 g c0 (TLRef (plus n h)) t0)) (eq_ind_r nat (plus (S +n) h) (\lambda (n0: nat).(ty3 g c0 (TLRef (plus n h)) (lift n0 O t))) +(ty3_abbr g (plus n h) c0 d u (drop_getl_trans_ge n c0 c d0 h H3 (CHead d +(Bind Abbr) u) H0 H4) t H1) (plus h (S n)) (plus_sym h (S n))) (lift h d0 +(lift (S n) O t)) (lift_free t (S n) h O d0 (le_S_n d0 (S n) (le_S (S d0) (S +n) (le_n_S d0 n H4))) (le_O_n d0))) (plus n (S O)) (eq_ind_r nat (plus (S O) +n) (\lambda (n0: nat).(eq nat (S n) n0)) (le_antisym (S n) (plus (S O) n) +(le_n (plus (S O) n)) (le_n (S n))) (plus n (S O)) (plus_sym n (S O)))) (lift +h d0 (TLRef n)) (lift_lref_ge n h d0 H4)))))))))))))))) (\lambda (n: +nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c +(CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u +t)).(\lambda (H2: ((\forall (c0: C).(\forall (d0: nat).(\forall (h: +nat).((drop h d0 c0 d) \to (ty3 g c0 (lift h d0 u) (lift h d0 +t)))))))).(\lambda (c0: C).(\lambda (d0: nat).(\lambda (h: nat).(\lambda (H3: +(drop h d0 c0 c)).(lt_le_e n d0 (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 +(lift (S n) O u))) (\lambda (H4: (lt n d0)).(let H5 \def (drop_getl_trans_le +n d0 (le_S_n n d0 (le_S_n (S n) (S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) +d0 H4)))) c0 c h H3 (CHead d (Bind Abst) u) H0) in (ex3_2_ind C C (\lambda +(e0: C).(\lambda (_: C).(drop n O c0 e0))) (\lambda (e0: C).(\lambda (e1: +C).(drop h (minus d0 n) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 +(CHead d (Bind Abst) u)))) (ty3 g c0 (lift h d0 (TLRef n)) (lift h d0 (lift +(S n) O u))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H6: (drop n O c0 +x0)).(\lambda (H7: (drop h (minus d0 n) x0 x1)).(\lambda (H8: (clear x1 +(CHead d (Bind Abst) u))).(let H9 \def (eq_ind nat (minus d0 n) (\lambda (n0: +nat).(drop h n0 x0 x1)) H7 (S (minus d0 (S n))) (minus_x_Sy d0 n H4)) in (let +H10 \def (drop_clear_S x1 x0 h (minus d0 (S n)) H9 Abst d u H8) in (ex2_ind C +(\lambda (c1: C).(clear x0 (CHead c1 (Bind Abst) (lift h (minus d0 (S n)) +u)))) (\lambda (c1: C).(drop h (minus d0 (S n)) c1 d)) (ty3 g c0 (lift h d0 +(TLRef n)) (lift h d0 (lift (S n) O u))) (\lambda (x: C).(\lambda (H11: +(clear x0 (CHead x (Bind Abst) (lift h (minus d0 (S n)) u)))).(\lambda (H12: +(drop h (minus d0 (S n)) x d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(ty3 g +c0 t0 (lift h d0 (lift (S n) O u)))) (eq_ind nat (plus (S n) (minus d0 (S +n))) (\lambda (n0: nat).(ty3 g c0 (TLRef n) (lift h n0 (lift (S n) O u)))) +(eq_ind_r T (lift (S n) O (lift h (minus d0 (S n)) u)) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (eq_ind nat d0 (\lambda (_: nat).(ty3 g c0 (TLRef n) +(lift (S n) O (lift h (minus d0 (S n)) u)))) (ty3_abst g n c0 x (lift h +(minus d0 (S n)) u) (getl_intro n c0 (CHead x (Bind Abst) (lift h (minus d0 +(S n)) u)) x0 H6 H11) (lift h (minus d0 (S n)) t) (H2 x (minus d0 (S n)) h +H12)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H4)) (lift h +(plus (S n) (minus d0 (S n))) (lift (S n) O u)) (lift_d u h (S n) (minus d0 +(S n)) O (le_O_n (minus d0 (S n))))) d0 (le_plus_minus_r (S n) d0 H4)) (lift +h d0 (TLRef n)) (lift_lref_lt n h d0 H4))))) H10)))))))) H5))) (\lambda (H4: +(le d0 n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(ty3 g c0 t0 (lift +h d0 (lift (S n) O u)))) (eq_ind nat (S n) (\lambda (_: nat).(ty3 g c0 (TLRef +(plus n h)) (lift h d0 (lift (S n) O u)))) (eq_ind_r T (lift (plus h (S n)) O +u) (\lambda (t0: T).(ty3 g c0 (TLRef (plus n h)) t0)) (eq_ind_r nat (plus (S +n) h) (\lambda (n0: nat).(ty3 g c0 (TLRef (plus n h)) (lift n0 O u))) +(ty3_abst g (plus n h) c0 d u (drop_getl_trans_ge n c0 c d0 h H3 (CHead d +(Bind Abst) u) H0 H4) t H1) (plus h (S n)) (plus_sym h (S n))) (lift h d0 +(lift (S n) O u)) (lift_free u (S n) h O d0 (le_S_n d0 (S n) (le_S (S d0) (S +n) (le_n_S d0 n H4))) (le_O_n d0))) (plus n (S O)) (eq_ind_r nat (plus (S O) +n) (\lambda (n0: nat).(eq nat (S n) n0)) (le_antisym (S n) (plus (S O) n) +(le_n (plus (S O) n)) (le_n (S n))) (plus n (S O)) (plus_sym n (S O)))) (lift +h d0 (TLRef n)) (lift_lref_ge n h d0 H4)))))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c u t)).(\lambda (H1: +((\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) \to +(ty3 g c0 (lift h d u) (lift h d t)))))))).(\lambda (b: B).(\lambda (t0: +T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t0 t3)).(\lambda +(H3: ((\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 +(CHead c (Bind b) u)) \to (ty3 g c0 (lift h d t0) (lift h d +t3)))))))).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H4: +(drop h d c0 c)).(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s (Bind b) +d) t0)) (\lambda (t4: T).(ty3 g c0 t4 (lift h d (THead (Bind b) u t3)))) +(eq_ind_r T (THead (Bind b) (lift h d u) (lift h (s (Bind b) d) t3)) (\lambda +(t4: T).(ty3 g c0 (THead (Bind b) (lift h d u) (lift h (s (Bind b) d) t0)) +t4)) (ty3_bind g c0 (lift h d u) (lift h d t) (H1 c0 d h H4) b (lift h (S d) +t0) (lift h (S d) t3) (H3 (CHead c0 (Bind b) (lift h d u)) (S d) h +(drop_skip_bind h d c0 c H4 b u))) (lift h d (THead (Bind b) u t3)) +(lift_head (Bind b) u t3 h d)) (lift h d (THead (Bind b) u t0)) (lift_head +(Bind b) u t0 h d)))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda +(u: T).(\lambda (_: (ty3 g c w u)).(\lambda (H1: ((\forall (c0: C).(\forall +(d: nat).(\forall (h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h d w) (lift +h d u)))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead +(Bind Abst) u t))).(\lambda (H3: ((\forall (c0: C).(\forall (d: nat).(\forall +(h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h d v) (lift h d (THead (Bind +Abst) u t))))))))).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: +nat).(\lambda (H4: (drop h d c0 c)).(eq_ind_r T (THead (Flat Appl) (lift h d +w) (lift h (s (Flat Appl) d) v)) (\lambda (t0: T).(ty3 g c0 t0 (lift h d +(THead (Flat Appl) w (THead (Bind Abst) u t))))) (eq_ind_r T (THead (Flat +Appl) (lift h d w) (lift h (s (Flat Appl) d) (THead (Bind Abst) u t))) +(\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) (lift h d w) (lift h (s (Flat +Appl) d) v)) t0)) (eq_ind_r T (THead (Bind Abst) (lift h (s (Flat Appl) d) u) +(lift h (s (Bind Abst) (s (Flat Appl) d)) t)) (\lambda (t0: T).(ty3 g c0 +(THead (Flat Appl) (lift h d w) (lift h (s (Flat Appl) d) v)) (THead (Flat +Appl) (lift h d w) t0))) (ty3_appl g c0 (lift h d w) (lift h d u) (H1 c0 d h +H4) (lift h d v) (lift h (S d) t) (eq_ind T (lift h d (THead (Bind Abst) u +t)) (\lambda (t0: T).(ty3 g c0 (lift h d v) t0)) (H3 c0 d h H4) (THead (Bind +Abst) (lift h d u) (lift h (S d) t)) (lift_bind Abst u t h d))) (lift h (s +(Flat Appl) d) (THead (Bind Abst) u t)) (lift_head (Bind Abst) u t h (s (Flat +Appl) d))) (lift h d (THead (Flat Appl) w (THead (Bind Abst) u t))) +(lift_head (Flat Appl) w (THead (Bind Abst) u t) h d)) (lift h d (THead (Flat +Appl) w v)) (lift_head (Flat Appl) w v h d))))))))))))))) (\lambda (c: +C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t0 t3)).(\lambda +(H1: ((\forall (c0: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 c) +\to (ty3 g c0 (lift h d t0) (lift h d t3)))))))).(\lambda (t4: T).(\lambda +(_: (ty3 g c t3 t4)).(\lambda (H3: ((\forall (c0: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c0 c) \to (ty3 g c0 (lift h d t3) (lift h d +t4)))))))).(\lambda (c0: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H4: +(drop h d c0 c)).(eq_ind_r T (THead (Flat Cast) (lift h d t3) (lift h (s +(Flat Cast) d) t0)) (\lambda (t: T).(ty3 g c0 t (lift h d (THead (Flat Cast) +t4 t3)))) (eq_ind_r T (THead (Flat Cast) (lift h d t4) (lift h (s (Flat Cast) +d) t3)) (\lambda (t: T).(ty3 g c0 (THead (Flat Cast) (lift h d t3) (lift h (s +(Flat Cast) d) t0)) t)) (ty3_cast g c0 (lift h (s (Flat Cast) d) t0) (lift h +(s (Flat Cast) d) t3) (H1 c0 (s (Flat Cast) d) h H4) (lift h d t4) (H3 c0 d h +H4)) (lift h d (THead (Flat Cast) t4 t3)) (lift_head (Flat Cast) t4 t3 h d)) +(lift h d (THead (Flat Cast) t3 t0)) (lift_head (Flat Cast) t3 t0 h +d)))))))))))))) e t1 t2 H))))). + +lemma ty3_correct: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c +t1 t2) \to (ex T (\lambda (t: T).(ty3 g c t2 t))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda +(t0: T).(ex T (\lambda (t3: T).(ty3 g c0 t0 t3)))))) (\lambda (c0: +C).(\lambda (t0: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 t0 t)).(\lambda +(_: (ex T (\lambda (t3: T).(ty3 g c0 t t3)))).(\lambda (u: T).(\lambda (t3: +T).(\lambda (_: (ty3 g c0 u t3)).(\lambda (_: (ex T (\lambda (t4: T).(ty3 g +c0 t3 t4)))).(\lambda (_: (pc3 c0 t3 t0)).(ex_intro T (\lambda (t4: T).(ty3 g +c0 t0 t4)) t H0))))))))))) (\lambda (c0: C).(\lambda (m: nat).(ex_intro T +(\lambda (t: T).(ty3 g c0 (TSort (next g m)) t)) (TSort (next g (next g m))) +(ty3_sort g c0 (next g m))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) +u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex T (\lambda +(t0: T).(ty3 g d t t0)))).(let H3 \def H2 in (ex_ind T (\lambda (t0: T).(ty3 +g d t t0)) (ex T (\lambda (t0: T).(ty3 g c0 (lift (S n) O t) t0))) (\lambda +(x: T).(\lambda (H4: (ty3 g d t x)).(ex_intro T (\lambda (t0: T).(ty3 g c0 +(lift (S n) O t) t0)) (lift (S n) O x) (ty3_lift g d t x H4 c0 O (S n) +(getl_drop Abbr c0 d u n H0))))) H3)))))))))) (\lambda (n: nat).(\lambda (c0: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind +Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (_: (ex T +(\lambda (t0: T).(ty3 g d t t0)))).(ex_intro T (\lambda (t0: T).(ty3 g c0 +(lift (S n) O u) t0)) (lift (S n) O t) (ty3_lift g d u t H1 c0 O (S n) +(getl_drop Abst c0 d u n H0))))))))))) (\lambda (c0: C).(\lambda (u: +T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u t)).(\lambda (_: (ex T (\lambda +(t0: T).(ty3 g c0 t t0)))).(\lambda (b: B).(\lambda (t0: T).(\lambda (t3: +T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t0 t3)).(\lambda (H3: (ex T +(\lambda (t4: T).(ty3 g (CHead c0 (Bind b) u) t3 t4)))).(let H4 \def H3 in +(ex_ind T (\lambda (t4: T).(ty3 g (CHead c0 (Bind b) u) t3 t4)) (ex T +(\lambda (t4: T).(ty3 g c0 (THead (Bind b) u t3) t4))) (\lambda (x: +T).(\lambda (H5: (ty3 g (CHead c0 (Bind b) u) t3 x)).(ex_intro T (\lambda +(t4: T).(ty3 g c0 (THead (Bind b) u t3) t4)) (THead (Bind b) u x) (ty3_bind g +c0 u t H0 b t3 x H5)))) H4)))))))))))) (\lambda (c0: C).(\lambda (w: +T).(\lambda (u: T).(\lambda (H0: (ty3 g c0 w u)).(\lambda (H1: (ex T (\lambda +(t: T).(ty3 g c0 u t)))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g +c0 v (THead (Bind Abst) u t))).(\lambda (H3: (ex T (\lambda (t0: T).(ty3 g c0 +(THead (Bind Abst) u t) t0)))).(let H4 \def H1 in (ex_ind T (\lambda (t0: +T).(ty3 g c0 u t0)) (ex T (\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) w +(THead (Bind Abst) u t)) t0))) (\lambda (x: T).(\lambda (_: (ty3 g c0 u +x)).(let H6 \def H3 in (ex_ind T (\lambda (t0: T).(ty3 g c0 (THead (Bind +Abst) u t) t0)) (ex T (\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) w (THead +(Bind Abst) u t)) t0))) (\lambda (x0: T).(\lambda (H7: (ty3 g c0 (THead (Bind +Abst) u t) x0)).(ex3_2_ind T T (\lambda (t3: T).(\lambda (_: T).(pc3 c0 +(THead (Bind Abst) u t3) x0))) (\lambda (_: T).(\lambda (t0: T).(ty3 g c0 u +t0))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind Abst) u) t +t3))) (ex T (\lambda (t0: T).(ty3 g c0 (THead (Flat Appl) w (THead (Bind +Abst) u t)) t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c0 +(THead (Bind Abst) u x1) x0)).(\lambda (H9: (ty3 g c0 u x2)).(\lambda (H10: +(ty3 g (CHead c0 (Bind Abst) u) t x1)).(ex_intro T (\lambda (t0: T).(ty3 g c0 +(THead (Flat Appl) w (THead (Bind Abst) u t)) t0)) (THead (Flat Appl) w +(THead (Bind Abst) u x1)) (ty3_appl g c0 w u H0 (THead (Bind Abst) u t) x1 +(ty3_bind g c0 u x2 H9 Abst t x1 H10)))))))) (ty3_gen_bind g Abst c0 u t x0 +H7)))) H6)))) H4))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: +T).(\lambda (_: (ty3 g c0 t0 t3)).(\lambda (_: (ex T (\lambda (t: T).(ty3 g +c0 t3 t)))).(\lambda (t4: T).(\lambda (H2: (ty3 g c0 t3 t4)).(\lambda (H3: +(ex T (\lambda (t: T).(ty3 g c0 t4 t)))).(let H4 \def H3 in (ex_ind T +(\lambda (t: T).(ty3 g c0 t4 t)) (ex T (\lambda (t: T).(ty3 g c0 (THead (Flat +Cast) t4 t3) t))) (\lambda (x: T).(\lambda (H5: (ty3 g c0 t4 x)).(ex_intro T +(\lambda (t: T).(ty3 g c0 (THead (Flat Cast) t4 t3) t)) (THead (Flat Cast) x +t4) (ty3_cast g c0 t3 t4 H2 x H5)))) H4)))))))))) c t1 t2 H))))). + +theorem ty3_unique: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u +t1) \to (\forall (t2: T).((ty3 g c u t2) \to (pc3 c t1 t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: +(ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: +T).(\forall (t2: T).((ty3 g c0 t t2) \to (pc3 c0 t0 t2)))))) (\lambda (c0: +C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda +(_: ((\forall (t3: T).((ty3 g c0 t2 t3) \to (pc3 c0 t t3))))).(\lambda (u0: +T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 u0 t0)).(\lambda (H3: ((\forall +(t3: T).((ty3 g c0 u0 t3) \to (pc3 c0 t0 t3))))).(\lambda (H4: (pc3 c0 t0 +t2)).(\lambda (t3: T).(\lambda (H5: (ty3 g c0 u0 t3)).(pc3_t t0 c0 t2 (pc3_s +c0 t2 t0 H4) t3 (H3 t3 H5)))))))))))))) (\lambda (c0: C).(\lambda (m: +nat).(\lambda (t2: T).(\lambda (H0: (ty3 g c0 (TSort m) t2)).(ty3_gen_sort g +c0 t2 m H0))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda +(u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: +T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall (t2: T).((ty3 g d u0 +t2) \to (pc3 d t t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) +t2)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: +T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) +(\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 +(lift (S n) O t) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: +T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda +(u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: +C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))))).(ex3_3_ind C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) +t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g +e u1 t0)))) (pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O x2) t2)).(\lambda +(H6: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 +x2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: C).(getl n +c0 c1)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n +H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: +C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) +(CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d +(Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | (CHead +_ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) +(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in +(\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t0: +T).(getl n c0 (CHead x0 (Bind Abbr) t0))) H8 u0 H10) in (let H13 \def +(eq_ind_r T x1 (\lambda (t0: T).(ty3 g x0 t0 x2)) H7 u0 H10) in (let H14 \def +(eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 (Bind Abbr) u0))) H12 d +H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c1: C).(ty3 g c1 u0 x2)) H13 d +H11) in (pc3_t (lift (S n) O x2) c0 (lift (S n) O t) (pc3_lift c0 d (S n) O +(getl_drop Abbr c0 d u0 n H14) t x2 (H2 x2 H15)) t2 H5))))))) H9))))))))) +H4)) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (t0: T).(ty3 g e u1 t0)))))).(ex3_3_ind C T T (\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) +u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) +(pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (_: (pc3 c0 (lift (S n) O x1) t2)).(\lambda (H6: (getl n c0 +(CHead x0 (Bind Abst) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 \def +(eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead +x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 +(Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u0) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d +(Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind (pc3 c0 +(lift (S n) O t) t2) H9))))))))) H4)) (ty3_gen_lref g c0 t2 n H3)))))))))))) +(\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda +(H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (_: (ty3 +g d u0 t)).(\lambda (_: ((\forall (t2: T).((ty3 g d u0 t2) \to (pc3 d t +t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) t2)).(or_ind +(ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift +(S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n +c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda +(t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda +(u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: +C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 (lift (S n) +O u0) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda +(t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: +C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))))).(ex3_3_ind C T T +(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) +t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g +e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (x2: T).(\lambda (_: (pc3 c0 (lift (S n) O x2) t2)).(\lambda (H6: +(getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 +\def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c1: C).(getl n c0 c1)) H0 +(CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead +x0 (Bind Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u0) +(\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) +\Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr +\Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat +_) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d +(Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (pc3 c0 +(lift (S n) O u0) t2) H9))))))))) H4)) (\lambda (H4: (ex3_3 C T T (\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) +(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind +Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 +t0)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O +x1) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: +(ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda +(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d +(Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (f_equal +C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) +\Rightarrow c1])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) +(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in +((let H10 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abst) u0) +(CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead +x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def +(eq_ind_r T x1 (\lambda (t0: T).(getl n c0 (CHead x0 (Bind Abst) t0))) H8 u0 +H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t0: T).(ty3 g x0 t0 x2)) H7 u0 +H10) in (let H14 \def (eq_ind_r T x1 (\lambda (t0: T).(pc3 c0 (lift (S n) O +t0) t2)) H5 u0 H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c1: C).(getl n +c0 (CHead c1 (Bind Abst) u0))) H12 d H11) in (let H16 \def (eq_ind_r C x0 +(\lambda (c1: C).(ty3 g c1 u0 x2)) H13 d H11) in H14))))))) H9))))))))) H4)) +(ty3_gen_lref g c0 t2 n H3)))))))))))) (\lambda (c0: C).(\lambda (u0: +T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u0 t)).(\lambda (_: ((\forall (t2: +T).((ty3 g c0 u0 t2) \to (pc3 c0 t t2))))).(\lambda (b: B).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t0 +t2)).(\lambda (H3: ((\forall (t3: T).((ty3 g (CHead c0 (Bind b) u0) t0 t3) +\to (pc3 (CHead c0 (Bind b) u0) t2 t3))))).(\lambda (t3: T).(\lambda (H4: +(ty3 g c0 (THead (Bind b) u0 t0) t3)).(ex3_2_ind T T (\lambda (t4: +T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u0 t4) t3))) (\lambda (_: +T).(\lambda (t5: T).(ty3 g c0 u0 t5))) (\lambda (t4: T).(\lambda (_: T).(ty3 +g (CHead c0 (Bind b) u0) t0 t4))) (pc3 c0 (THead (Bind b) u0 t2) t3) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H5: (pc3 c0 (THead (Bind b) u0 x0) +t3)).(\lambda (_: (ty3 g c0 u0 x1)).(\lambda (H7: (ty3 g (CHead c0 (Bind b) +u0) t0 x0)).(pc3_t (THead (Bind b) u0 x0) c0 (THead (Bind b) u0 t2) +(pc3_head_2 c0 u0 t2 x0 (Bind b) (H3 x0 H7)) t3 H5)))))) (ty3_gen_bind g b c0 +u0 t0 t3 H4)))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: +T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((ty3 g c0 w +t2) \to (pc3 c0 u0 t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 +g c0 v (THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((ty3 g c0 +v t2) \to (pc3 c0 (THead (Bind Abst) u0 t) t2))))).(\lambda (t2: T).(\lambda +(H4: (ty3 g c0 (THead (Flat Appl) w v) t2)).(ex3_2_ind T T (\lambda (u1: +T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u1 t0)) +t2))) (\lambda (u1: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u1 +t0)))) (\lambda (u1: T).(\lambda (_: T).(ty3 g c0 w u1))) (pc3 c0 (THead +(Flat Appl) w (THead (Bind Abst) u0 t)) t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H5: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) +t2)).(\lambda (H6: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 +g c0 w x0)).(pc3_t (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) c0 (THead +(Flat Appl) w (THead (Bind Abst) u0 t)) (pc3_thin_dx c0 (THead (Bind Abst) u0 +t) (THead (Bind Abst) x0 x1) (H3 (THead (Bind Abst) x0 x1) H6) w Appl) t2 +H5)))))) (ty3_gen_appl g c0 w v t2 H4))))))))))))) (\lambda (c0: C).(\lambda +(t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: +((\forall (t3: T).((ty3 g c0 t0 t3) \to (pc3 c0 t2 t3))))).(\lambda (t3: +T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (H3: ((\forall (t4: T).((ty3 g c0 +t2 t4) \to (pc3 c0 t3 t4))))).(\lambda (t4: T).(\lambda (H4: (ty3 g c0 (THead +(Flat Cast) t2 t0) t4)).(ex3_ind T (\lambda (t5: T).(pc3 c0 (THead (Flat +Cast) t5 t2) t4)) (\lambda (_: T).(ty3 g c0 t0 t2)) (\lambda (t5: T).(ty3 g +c0 t2 t5)) (pc3 c0 (THead (Flat Cast) t3 t2) t4) (\lambda (x0: T).(\lambda +(H5: (pc3 c0 (THead (Flat Cast) x0 t2) t4)).(\lambda (_: (ty3 g c0 t0 +t2)).(\lambda (H7: (ty3 g c0 t2 x0)).(pc3_t (THead (Flat Cast) x0 t2) c0 +(THead (Flat Cast) t3 t2) (pc3_head_1 c0 t3 x0 (H3 x0 H7) (Flat Cast) t2) t4 +H5))))) (ty3_gen_cast g c0 t0 t2 t4 H4)))))))))))) c u t1 H))))). + +lemma ty3_gen_abst_abst: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall +(t2: T).((ty3 g c (THead (Bind Abst) u t1) (THead (Bind Abst) u t2)) \to (ex2 +T (\lambda (w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) +u) t1 t2)))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (H: (ty3 g c (THead (Bind Abst) u t1) (THead (Bind Abst) u +t2))).(ex_ind T (\lambda (t: T).(ty3 g c (THead (Bind Abst) u t2) t)) (ex2 T +(\lambda (w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) +t1 t2))) (\lambda (x: T).(\lambda (H0: (ty3 g c (THead (Bind Abst) u t2) +x)).(ex3_2_ind T T (\lambda (t3: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) +u t3) x))) (\lambda (_: T).(\lambda (t: T).(ty3 g c u t))) (\lambda (t3: +T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t2 t3))) (ex2 T (\lambda +(w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t1 t2))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c (THead (Bind Abst) u +x0) x)).(\lambda (_: (ty3 g c u x1)).(\lambda (H3: (ty3 g (CHead c (Bind +Abst) u) t2 x0)).(ex3_2_ind T T (\lambda (t3: T).(\lambda (_: T).(pc3 c +(THead (Bind Abst) u t3) (THead (Bind Abst) u t2)))) (\lambda (_: T).(\lambda +(t: T).(ty3 g c u t))) (\lambda (t3: T).(\lambda (_: T).(ty3 g (CHead c (Bind +Abst) u) t1 t3))) (ex2 T (\lambda (w: T).(ty3 g c u w)) (\lambda (_: T).(ty3 +g (CHead c (Bind Abst) u) t1 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda +(H4: (pc3 c (THead (Bind Abst) u x2) (THead (Bind Abst) u t2))).(\lambda (H5: +(ty3 g c u x3)).(\lambda (H6: (ty3 g (CHead c (Bind Abst) u) t1 x2)).(let H_y +\def (pc3_gen_abst_shift c u x2 t2 H4) in (ex_intro2 T (\lambda (w: T).(ty3 g +c u w)) (\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t1 t2)) x3 H5 +(ty3_conv g (CHead c (Bind Abst) u) t2 x0 H3 t1 x2 H6 H_y)))))))) +(ty3_gen_bind g Abst c u t1 (THead (Bind Abst) u t2) H))))))) (ty3_gen_bind g +Abst c u t2 x H0)))) (ty3_correct g c (THead (Bind Abst) u t1) (THead (Bind +Abst) u t2) H))))))). + +lemma ty3_typecheck: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (v: T).((ty3 g c t +v) \to (ex T (\lambda (u: T).(ty3 g c (THead (Flat Cast) v t) u))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (v: T).(\lambda (H: +(ty3 g c t v)).(ex_ind T (\lambda (t0: T).(ty3 g c v t0)) (ex T (\lambda (u: +T).(ty3 g c (THead (Flat Cast) v t) u))) (\lambda (x: T).(\lambda (H0: (ty3 g +c v x)).(ex_intro T (\lambda (u: T).(ty3 g c (THead (Flat Cast) v t) u)) +(THead (Flat Cast) x v) (ty3_cast g c t v H x H0)))) (ty3_correct g c t v +H)))))). + +lemma ty3_getl_subst0: + \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t +u) \to (\forall (v0: T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 t +t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c (CHead d +(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: +(ty3 g c t u)).(ty3_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: +T).(\forall (v0: T).(\forall (t2: T).(\forall (i: nat).((subst0 i v0 t0 t2) +\to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d +(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda +(c0: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 +t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: +nat).((subst0 i v0 t2 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (u0: T).(\lambda (t1: T).(\lambda (_: (ty3 g c0 u0 +t1)).(\lambda (H3: ((\forall (v0: T).(\forall (t3: T).(\forall (i: +nat).((subst0 i v0 u0 t3) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (_: (pc3 c0 t1 t2)).(\lambda (v0: T).(\lambda (t3: +T).(\lambda (i: nat).(\lambda (H5: (subst0 i v0 u0 t3)).(\lambda (b: +B).(\lambda (d: C).(\lambda (v: T).(\lambda (H6: (getl i c0 (CHead d (Bind b) +v))).(H3 v0 t3 i H5 b d v H6))))))))))))))))))) (\lambda (c0: C).(\lambda (m: +nat).(\lambda (v0: T).(\lambda (t0: T).(\lambda (i: nat).(\lambda (H0: +(subst0 i v0 (TSort m) t0)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: +T).(\lambda (_: (getl i c0 (CHead d (Bind b) v))).(subst0_gen_sort v0 t0 i m +H0 (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda (n: +nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n +c0 (CHead d (Bind Abbr) u0))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u0 +t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: +nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v: +T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v +w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda +(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda +(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(land_ind (eq nat n +i) (eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) +(\lambda (H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 +\def (eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) +H4 n H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: +C).(getl n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind +Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in (let H9 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) +\Rightarrow c1])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v) (getl_mono +c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in ((let H10 \def +(f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow Abbr | +(CHead _ k _) \Rightarrow (match k with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v) +(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in +((let H11 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2])) (CHead d (Bind Abbr) u0) +(CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 +(Bind b) v) H7)) in (\lambda (H12: (eq B Abbr b)).(\lambda (H13: (eq C d +d0)).(let H14 \def (eq_ind_r T v (\lambda (t2: T).(getl n c0 (CHead d0 (Bind +b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda (t2: T).(ex T (\lambda (w: +T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0 (\lambda (c1: C).(getl n +c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C d (\lambda (c1: C).(ex T +(\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def (eq_ind_r B b (\lambda (b0: +B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abbr H12) in (ex_intro T (\lambda +(w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v H11))))) H10)) H9)))))) +(subst0_gen_lref v0 t1 i n H3)))))))))))))))))) (\lambda (n: nat).(\lambda +(c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d +(Bind Abst) u0))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u0 t0)).(\lambda +(_: ((\forall (v0: T).(\forall (t1: T).(\forall (i: nat).((subst0 i v0 u0 t1) +\to (\forall (b: B).(\forall (d0: C).(\forall (v: T).((getl i d (CHead d0 +(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v w))))))))))))).(\lambda +(v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (H3: (subst0 i v0 (TLRef +n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda (v: T).(\lambda (H4: (getl +i c0 (CHead d0 (Bind b) v))).(land_ind (eq nat n i) (eq T t1 (lift (S n) O +v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda (H5: (eq nat n +i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def (eq_ind_r nat i +(\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n H5) in (let H8 +\def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c1: C).(getl n c0 c1)) H0 +(CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 +(Bind b) v) H7)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind +Abst) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 +(CHead d0 (Bind b) v) H7)) in ((let H10 \def (f_equal C B (\lambda (e: +C).(match e with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow +(match k with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) +(CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind +Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in ((let H11 \def (f_equal C T +(\lambda (e: C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) +\Rightarrow t2])) (CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) (getl_mono +c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: +(eq B Abst b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v +(\lambda (t2: T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T +u0 (\lambda (t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def +(eq_ind_r C d0 (\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d +H13) in (eq_ind C d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) +(let H16 \def (eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) +u0))) H15 Abst H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 +H13)) v H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n +H3)))))))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t0: +T).(\lambda (_: (ty3 g c0 u0 t0)).(\lambda (H1: ((\forall (v0: T).(\forall +(t1: T).(\forall (i: nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall +(d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda +(w: T).(ty3 g d v w))))))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t1 t2)).(\lambda (H3: +((\forall (v0: T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t1 t3) \to +(\forall (b0: B).(\forall (d: C).(\forall (v: T).((getl i (CHead c0 (Bind b) +u0) (CHead d (Bind b0) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (v0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda +(H4: (subst0 i v0 (THead (Bind b) u0 t1) t3)).(\lambda (b0: B).(\lambda (d: +C).(\lambda (v: T).(\lambda (H5: (getl i c0 (CHead d (Bind b0) v))).(or3_ind +(ex2 T (\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: +T).(subst0 i v0 u0 u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Bind b) u0 +t4))) (\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex3_2 T T (\lambda +(u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: +T).(subst0 (s (Bind b) i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) +(\lambda (H6: (ex2 T (\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) +(\lambda (u2: T).(subst0 i v0 u0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 +(THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i v0 u0 u2)) (ex T (\lambda +(w: T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b) +x t1))).(\lambda (H8: (subst0 i v0 u0 x)).(H1 v0 x i H8 b0 d v H5)))) H6)) +(\lambda (H6: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) +(\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4)))).(ex2_ind T (\lambda (t4: +T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4: T).(subst0 (s (Bind b) i) +v0 t1 t4)) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: +(eq T t3 (THead (Bind b) u0 x))).(\lambda (H8: (subst0 (s (Bind b) i) v0 t1 +x)).(H3 v0 x (S i) H8 b0 d v (getl_head (Bind b) i c0 (CHead d (Bind b0) v) +H5 u0))))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Bind b) +i) v0 t1 t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 +(THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 u0 +u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex +T (\lambda (w: T).(ty3 g d v w))) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(_: (eq T t3 (THead (Bind b) x0 x1))).(\lambda (H8: (subst0 i v0 u0 +x0)).(\lambda (_: (subst0 (s (Bind b) i) v0 t1 x1)).(H1 v0 x0 i H8 b0 d v +H5)))))) H6)) (subst0_gen_head (Bind b) v0 u0 t1 t3 i H4)))))))))))))))))))) +(\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w +u0)).(\lambda (H1: ((\forall (v0: T).(\forall (t0: T).(\forall (i: +nat).((subst0 i v0 w t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w0: T).(ty3 g d v +w0))))))))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 v +(THead (Bind Abst) u0 t0))).(\lambda (H3: ((\forall (v0: T).(\forall (t1: +T).(\forall (i: nat).((subst0 i v0 v t1) \to (\forall (b: B).(\forall (d: +C).(\forall (v1: T).((getl i c0 (CHead d (Bind b) v1)) \to (ex T (\lambda +(w0: T).(ty3 g d v1 w0))))))))))))).(\lambda (v0: T).(\lambda (t1: +T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat Appl) w v) +t1)).(\lambda (b: B).(\lambda (d: C).(\lambda (v1: T).(\lambda (H5: (getl i +c0 (CHead d (Bind b) v1))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t1 (THead +(Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w u2))) (ex2 T (\lambda +(t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat +Appl) i) v0 v t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t1 +(THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w +u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2)))) +(ex T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (H6: (ex2 T (\lambda (u2: +T).(eq T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w +u2)))).(ex2_ind T (\lambda (u2: T).(eq T t1 (THead (Flat Appl) u2 v))) +(\lambda (u2: T).(subst0 i v0 w u2)) (ex T (\lambda (w0: T).(ty3 g d v1 w0))) +(\lambda (x: T).(\lambda (_: (eq T t1 (THead (Flat Appl) x v))).(\lambda (H8: +(subst0 i v0 w x)).(H1 v0 x i H8 b d v1 H5)))) H6)) (\lambda (H6: (ex2 T +(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 +(s (Flat Appl) i) v0 v t2)))).(ex2_ind T (\lambda (t2: T).(eq T t1 (THead +(Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2)) (ex +T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (x: T).(\lambda (_: (eq T t1 +(THead (Flat Appl) w x))).(\lambda (H8: (subst0 (s (Flat Appl) i) v0 v +x)).(H3 v0 x (s (Flat Appl) i) H8 b d v1 H5)))) H6)) (\lambda (H6: (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))))).(ex3_2_ind T T +(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2)))) +(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))) (ex T (\lambda (w0: +T).(ty3 g d v1 w0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t1 +(THead (Flat Appl) x0 x1))).(\lambda (_: (subst0 i v0 w x0)).(\lambda (H9: +(subst0 (s (Flat Appl) i) v0 v x1)).(H3 v0 x1 (s (Flat Appl) i) H9 b d v1 +H5)))))) H6)) (subst0_gen_head (Flat Appl) v0 w v t1 i H4))))))))))))))))))) +(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 +t2)).(\lambda (H1: ((\forall (v0: T).(\forall (t0: T).(\forall (i: +nat).((subst0 i v0 t1 t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: +T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v +w))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (H3: +((\forall (v0: T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t2 t3) \to +(\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) +v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda (v0: +T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat +Cast) t2 t1) t3)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: T).(\lambda +(H5: (getl i c0 (CHead d (Bind b) v))).(or3_ind (ex2 T (\lambda (u2: T).(eq T +t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2))) (ex2 T +(\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: +T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda +(t4: T).(eq T t3 (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i v0 t2 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat +Cast) i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6: +(ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: +T).(subst0 i v0 t2 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat +Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2)) (ex T (\lambda (w: +T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Flat Cast) x +t1))).(\lambda (H8: (subst0 i v0 t2 x)).(H3 v0 x i H8 b d v H5)))) H6)) +(\lambda (H6: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) +(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4)))).(ex2_ind T (\lambda +(t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: T).(subst0 (s +(Flat Cast) i) v0 t1 t4)) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (x: +T).(\lambda (_: (eq T t3 (THead (Flat Cast) t2 x))).(\lambda (H8: (subst0 (s +(Flat Cast) i) v0 t1 x)).(H1 v0 x (s (Flat Cast) i) H8 b d v H5)))) H6)) +(\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) +(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 +t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead +(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2))) +(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex T +(\lambda (w: T).(ty3 g d v w))) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(_: (eq T t3 (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i v0 t2 +x0)).(\lambda (_: (subst0 (s (Flat Cast) i) v0 t1 x1)).(H3 v0 x0 i H8 b d v +H5)))))) H6)) (subst0_gen_head (Flat Cast) v0 t2 t1 t3 i H4)))))))))))))))))) +c t u H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/sty0.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/sty0.ma new file mode 100644 index 000000000..13831436d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/sty0.ma @@ -0,0 +1,230 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/pr3_props.ma". + +include "basic_1A/sty0/fwd.ma". + +lemma ty3_sty0: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u +t1) \to (\forall (t2: T).((sty0 g c u t2) \to (ty3 g c u t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: +(ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (_: +T).(\forall (t2: T).((sty0 g c0 t t2) \to (ty3 g c0 t t2)))))) (\lambda (c0: +C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda +(_: ((\forall (t3: T).((sty0 g c0 t2 t3) \to (ty3 g c0 t2 t3))))).(\lambda +(u0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c0 u0 t3)).(\lambda (H3: +((\forall (t4: T).((sty0 g c0 u0 t4) \to (ty3 g c0 u0 t4))))).(\lambda (_: +(pc3 c0 t3 t2)).(\lambda (t0: T).(\lambda (H5: (sty0 g c0 u0 t0)).(H3 t0 +H5))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (t2: T).(\lambda +(H0: (sty0 g c0 (TSort m) t2)).(let H_y \def (sty0_gen_sort g c0 t2 m H0) in +(let H1 \def (f_equal T T (\lambda (e: T).e) t2 (TSort (next g m)) H_y) in +(eq_ind_r T (TSort (next g m)) (\lambda (t: T).(ty3 g c0 (TSort m) t)) +(ty3_sort g c0 m) t2 H1))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda +(d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) +u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall +(t2: T).((sty0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda +(H3: (sty0 g c0 (TLRef n) t2)).(let H_x \def (sty0_gen_lref g c0 t2 n H3) in +(let H4 \def H_x in (or_ind (ex3_3 C T T (\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: +C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0)))))) (ex3_3 C +T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g +e u1 t0)))) (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift +(S n) O u1)))))) (ty3 g c0 (TLRef n) t2) (\lambda (H5: (ex3_3 C T T (\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O +t0))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0))))) (ty3 g c0 (TLRef n) t2) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 +(CHead x0 (Bind Abbr) x1))).(\lambda (H7: (sty0 g x0 x1 x2)).(\lambda (H8: +(eq T t2 (lift (S n) O x2))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 +(lift (S n) O x2) H8) in (eq_ind_r T (lift (S n) O x2) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda +(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d +(Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H11 \def (f_equal +C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) +\Rightarrow c1])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) +(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in +((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abbr) u0) +(CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead +x0 (Bind Abbr) x1) H6)) in (\lambda (H13: (eq C d x0)).(let H14 \def +(eq_ind_r T x1 (\lambda (t0: T).(getl n c0 (CHead x0 (Bind Abbr) t0))) H10 u0 +H12) in (let H15 \def (eq_ind_r T x1 (\lambda (t0: T).(sty0 g x0 t0 x2)) H7 +u0 H12) in (let H16 \def (eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 +(Bind Abbr) u0))) H14 d H13) in (let H17 \def (eq_ind_r C x0 (\lambda (c1: +C).(sty0 g c1 u0 x2)) H15 d H13) in (ty3_abbr g n c0 d u0 H16 x2 (H2 x2 +H17)))))))) H11))) t2 H9)))))))) H5)) (\lambda (H5: (ex3_3 C T T (\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) +(\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) +(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift (S n) O +u1))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq T t2 (lift (S n) O u1))))) (ty3 g c0 (TLRef n) t2) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 +(CHead x0 (Bind Abst) x1))).(\lambda (_: (sty0 g x0 x1 x2)).(\lambda (H8: (eq +T t2 (lift (S n) O x1))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 +(lift (S n) O x1) H8) in (eq_ind_r T (lift (S n) O x1) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda +(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d +(Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H11 \def (eq_ind +C (CHead d (Bind Abbr) u0) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind +Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) +x1) H6)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O x1)) H11))) t2 +H9)))))))) H5)) H4))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda +(d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) +u0))).(\lambda (t: T).(\lambda (H1: (ty3 g d u0 t)).(\lambda (_: ((\forall +(t2: T).((sty0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda +(H3: (sty0 g c0 (TLRef n) t2)).(let H_x \def (sty0_gen_lref g c0 t2 n H3) in +(let H4 \def H_x in (or_ind (ex3_3 C T T (\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: +C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0)))))) (ex3_3 C +T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e +(Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g +e u1 t0)))) (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift +(S n) O u1)))))) (ty3 g c0 (TLRef n) t2) (\lambda (H5: (ex3_3 C T T (\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) +u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O +t0))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0))))) (ty3 g c0 (TLRef n) t2) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 +(CHead x0 (Bind Abbr) x1))).(\lambda (_: (sty0 g x0 x1 x2)).(\lambda (H8: (eq +T t2 (lift (S n) O x2))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 +(lift (S n) O x2) H8) in (eq_ind_r T (lift (S n) O x2) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda +(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d +(Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H11 \def (eq_ind +C (CHead d (Bind Abst) u0) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind +Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) +x1) H6)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O x2)) H11))) t2 +H9)))))))) H5)) (\lambda (H5: (ex3_3 C T T (\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: +C).(\lambda (u1: T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift (S n) O +u1))))))).(ex3_3_ind C T T (\lambda (e: C).(\lambda (u1: T).(\lambda (_: +T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: +T).(\lambda (t0: T).(sty0 g e u1 t0)))) (\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq T t2 (lift (S n) O u1))))) (ty3 g c0 (TLRef n) t2) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 +(CHead x0 (Bind Abst) x1))).(\lambda (H7: (sty0 g x0 x1 x2)).(\lambda (H8: +(eq T t2 (lift (S n) O x1))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 +(lift (S n) O x1) H8) in (eq_ind_r T (lift (S n) O x1) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda +(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d +(Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H11 \def (f_equal +C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow d | (CHead c1 _ _) +\Rightarrow c1])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) +(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in +((let H12 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) (CHead d (Bind Abst) u0) +(CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead +x0 (Bind Abst) x1) H6)) in (\lambda (H13: (eq C d x0)).(let H14 \def +(eq_ind_r T x1 (\lambda (t0: T).(getl n c0 (CHead x0 (Bind Abst) t0))) H10 u0 +H12) in (let H15 \def (eq_ind_r T x1 (\lambda (t0: T).(sty0 g x0 t0 x2)) H7 +u0 H12) in (eq_ind T u0 (\lambda (t0: T).(ty3 g c0 (TLRef n) (lift (S n) O +t0))) (let H16 \def (eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 +(Bind Abst) u0))) H14 d H13) in (let H17 \def (eq_ind_r C x0 (\lambda (c1: +C).(sty0 g c1 u0 x2)) H15 d H13) in (ty3_abst g n c0 d u0 H16 t H1))) x1 +H12))))) H11))) t2 H9)))))))) H5)) H4))))))))))))) (\lambda (c0: C).(\lambda +(u0: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u0 t)).(\lambda (_: ((\forall +(t2: T).((sty0 g c0 u0 t2) \to (ty3 g c0 u0 t2))))).(\lambda (b: B).(\lambda +(t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t2 +t3)).(\lambda (H3: ((\forall (t4: T).((sty0 g (CHead c0 (Bind b) u0) t2 t4) +\to (ty3 g (CHead c0 (Bind b) u0) t2 t4))))).(\lambda (t0: T).(\lambda (H4: +(sty0 g c0 (THead (Bind b) u0 t2) t0)).(let H_x \def (sty0_gen_bind g b c0 u0 +t2 t0 H4) in (let H5 \def H_x in (ex2_ind T (\lambda (t4: T).(sty0 g (CHead +c0 (Bind b) u0) t2 t4)) (\lambda (t4: T).(eq T t0 (THead (Bind b) u0 t4))) +(ty3 g c0 (THead (Bind b) u0 t2) t0) (\lambda (x: T).(\lambda (H6: (sty0 g +(CHead c0 (Bind b) u0) t2 x)).(\lambda (H7: (eq T t0 (THead (Bind b) u0 +x))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u0 x) +H7) in (eq_ind_r T (THead (Bind b) u0 x) (\lambda (t4: T).(ty3 g c0 (THead +(Bind b) u0 t2) t4)) (ty3_bind g c0 u0 t H0 b t2 x (H3 x H6)) t0 H8))))) +H5))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda +(H0: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((sty0 g c0 w t2) \to +(ty3 g c0 w t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v +(THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((sty0 g c0 v t2) +\to (ty3 g c0 v t2))))).(\lambda (t2: T).(\lambda (H4: (sty0 g c0 (THead +(Flat Appl) w v) t2)).(let H_x \def (sty0_gen_appl g c0 w v t2 H4) in (let H5 +\def H_x in (ex2_ind T (\lambda (t3: T).(sty0 g c0 v t3)) (\lambda (t3: +T).(eq T t2 (THead (Flat Appl) w t3))) (ty3 g c0 (THead (Flat Appl) w v) t2) +(\lambda (x: T).(\lambda (H6: (sty0 g c0 v x)).(\lambda (H7: (eq T t2 (THead +(Flat Appl) w x))).(let H8 \def (f_equal T T (\lambda (e: T).e) t2 (THead +(Flat Appl) w x) H7) in (eq_ind_r T (THead (Flat Appl) w x) (\lambda (t0: +T).(ty3 g c0 (THead (Flat Appl) w v) t0)) (let H_y \def (H3 x H6) in (let H9 +\def (ty3_unique g c0 v x H_y (THead (Bind Abst) u0 t) H2) in (ex_ind T +(\lambda (t0: T).(ty3 g c0 x t0)) (ty3 g c0 (THead (Flat Appl) w v) (THead +(Flat Appl) w x)) (\lambda (x0: T).(\lambda (H10: (ty3 g c0 x x0)).(ex_ind T +(\lambda (t0: T).(ty3 g c0 u0 t0)) (ty3 g c0 (THead (Flat Appl) w v) (THead +(Flat Appl) w x)) (\lambda (x1: T).(\lambda (_: (ty3 g c0 u0 x1)).(ex_ind T +(\lambda (t0: T).(ty3 g c0 (THead (Bind Abst) u0 t) t0)) (ty3 g c0 (THead +(Flat Appl) w v) (THead (Flat Appl) w x)) (\lambda (x2: T).(\lambda (H12: +(ty3 g c0 (THead (Bind Abst) u0 t) x2)).(ex3_2_ind T T (\lambda (t3: +T).(\lambda (_: T).(pc3 c0 (THead (Bind Abst) u0 t3) x2))) (\lambda (_: +T).(\lambda (t0: T).(ty3 g c0 u0 t0))) (\lambda (t3: T).(\lambda (_: T).(ty3 +g (CHead c0 (Bind Abst) u0) t t3))) (ty3 g c0 (THead (Flat Appl) w v) (THead +(Flat Appl) w x)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c0 +(THead (Bind Abst) u0 x3) x2)).(\lambda (H14: (ty3 g c0 u0 x4)).(\lambda +(H15: (ty3 g (CHead c0 (Bind Abst) u0) t x3)).(ty3_conv g c0 (THead (Flat +Appl) w x) (THead (Flat Appl) w (THead (Bind Abst) u0 x3)) (ty3_appl g c0 w +u0 H0 x x3 (ty3_sconv g c0 x x0 H10 (THead (Bind Abst) u0 t) (THead (Bind +Abst) u0 x3) (ty3_bind g c0 u0 x4 H14 Abst t x3 H15) H9)) (THead (Flat Appl) +w v) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (ty3_appl g c0 w u0 H0 v +t H2) (pc3_thin_dx c0 (THead (Bind Abst) u0 t) x (ty3_unique g c0 v (THead +(Bind Abst) u0 t) H2 x H_y) w Appl))))))) (ty3_gen_bind g Abst c0 u0 t x2 +H12)))) (ty3_correct g c0 v (THead (Bind Abst) u0 t) H2)))) (ty3_correct g c0 +w u0 H0)))) (ty3_correct g c0 v x H_y)))) t2 H8))))) H5)))))))))))))) +(\lambda (c0: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (ty3 g c0 t2 +t3)).(\lambda (H1: ((\forall (t4: T).((sty0 g c0 t2 t4) \to (ty3 g c0 t2 +t4))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t3 t0)).(\lambda (H3: +((\forall (t4: T).((sty0 g c0 t3 t4) \to (ty3 g c0 t3 t4))))).(\lambda (t4: +T).(\lambda (H4: (sty0 g c0 (THead (Flat Cast) t3 t2) t4)).(let H_x \def +(sty0_gen_cast g c0 t3 t2 t4 H4) in (let H5 \def H_x in (ex3_2_ind T T +(\lambda (v2: T).(\lambda (_: T).(sty0 g c0 t3 v2))) (\lambda (_: T).(\lambda +(t5: T).(sty0 g c0 t2 t5))) (\lambda (v2: T).(\lambda (t5: T).(eq T t4 (THead +(Flat Cast) v2 t5)))) (ty3 g c0 (THead (Flat Cast) t3 t2) t4) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H6: (sty0 g c0 t3 x0)).(\lambda (H7: (sty0 g c0 +t2 x1)).(\lambda (H8: (eq T t4 (THead (Flat Cast) x0 x1))).(let H9 \def +(f_equal T T (\lambda (e: T).e) t4 (THead (Flat Cast) x0 x1) H8) in (eq_ind_r +T (THead (Flat Cast) x0 x1) (\lambda (t: T).(ty3 g c0 (THead (Flat Cast) t3 +t2) t)) (let H_y \def (H1 x1 H7) in (let H_y0 \def (H3 x0 H6) in (let H10 +\def (ty3_unique g c0 t2 x1 H_y t3 H0) in (ex_ind T (\lambda (t: T).(ty3 g c0 +x0 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) x0 x1)) +(\lambda (x: T).(\lambda (H11: (ty3 g c0 x0 x)).(ex_ind T (\lambda (t: +T).(ty3 g c0 x1 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) x0 +x1)) (\lambda (x2: T).(\lambda (H12: (ty3 g c0 x1 x2)).(ty3_conv g c0 (THead +(Flat Cast) x0 x1) (THead (Flat Cast) x x0) (ty3_cast g c0 x1 x0 (ty3_sconv g +c0 x1 x2 H12 t3 x0 H_y0 H10) x H11) (THead (Flat Cast) t3 t2) (THead (Flat +Cast) x0 t3) (ty3_cast g c0 t2 t3 H0 x0 H_y0) (pc3_thin_dx c0 t3 x1 +(ty3_unique g c0 t2 t3 H0 x1 H_y) x0 Cast)))) (ty3_correct g c0 t2 x1 H_y)))) +(ty3_correct g c0 t3 x0 H_y0))))) t4 H9))))))) H5))))))))))))) c u t1 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/ty3/subst1.ma b/matita/matita/contribs/lambdadelta/basic_1A/ty3/subst1.ma new file mode 100644 index 000000000..bc80f9973 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/ty3/subst1.ma @@ -0,0 +1,1095 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/props.ma". + +include "basic_1A/pc3/subst1.ma". + +include "basic_1A/getl/getl.ma". + +lemma ty3_gen_cabbr: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c +t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c +(CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c a0) \to +(\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d u t1 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u t2 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2)))))))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda +(t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead +e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: +C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: +T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: C).(\forall (u: +T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: +C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T +T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d u t (lift (S O) d y2)))) (\lambda +(y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (u: +T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: ((\forall (e: +C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) +\to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d +a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S +O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2)))))))))))))).(\lambda (H4: (pc3 c0 t4 t3)).(\lambda (e: C).(\lambda (u0: +T).(\lambda (d: nat).(\lambda (H5: (getl d c0 (CHead e (Bind Abbr) +u0))).(\lambda (a0: C).(\lambda (H6: (csubst1 d u0 c0 a0)).(\lambda (a: +C).(\lambda (H7: (drop (S O) d a0 a)).(let H8 \def (H3 e u0 d H5 a0 H6 a H7) +in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) +d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda +(_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H9: (subst1 d u0 u (lift (S O) d x0))).(\lambda (H10: (subst1 d +u0 t4 (lift (S O) d x1))).(\lambda (H11: (ty3 g a x0 x1)).(let H12 \def (H1 e +u0 d H5 a0 H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift +(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: +T).(\lambda (x3: T).(\lambda (H13: (subst1 d u0 t3 (lift (S O) d +x2))).(\lambda (_: (subst1 d u0 t (lift (S O) d x3))).(\lambda (H15: (ty3 g a +x2 x3)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u +(lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift +(S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 H9 +H13 (ty3_conv g a x2 x3 H15 x0 x1 H11 (pc3_gen_cabbr c0 t4 t3 H4 e u0 d H5 a0 +H6 a H7 x1 H10 x2 H13)))))))) H12))))))) H8)))))))))))))))))))) (\lambda (c0: +C).(\lambda (m: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (d: +nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: +C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) +d a0 a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (TSort +m) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u (TSort +(next g m)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2))) (TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: +T).(subst1 d u (TSort m) t)) (subst1_refl d u (TSort m)) (lift (S O) d (TSort +m)) (lift_sort m (S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: +T).(subst1 d u (TSort (next g m)) t)) (subst1_refl d u (TSort (next g m))) +(lift (S O) d (TSort (next g m))) (lift_sort (next g m) (S O) d)) (ty3_sort g +a m)))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda +(u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: +T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: +T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: +C).((csubst1 d0 u0 d a0) \to (\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: +C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e +(Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 +a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S +O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) +(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) +(\lambda (H6: (lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n0: +nat).(getl n0 (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0))) +(getl_conf_le d0 (CHead e (Bind Abbr) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 +(le_S_n n d0 (le_S_n (S n) (S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 +H6))))) (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda +(e2: C).(csubst1 (minus d0 n) u0 (CHead d (Bind Abbr) u) e2)) (\lambda (e2: +C).(getl n a0 e2)) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 +(TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 +u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: +T).(ty3 g a y1 y2)))) (\lambda (x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 +(CHead d (Bind Abbr) u) x)).(\lambda (H9: (getl n a0 x)).(let H10 \def +(eq_ind nat (minus d0 n) (\lambda (n0: nat).(csubst1 n0 u0 (CHead d (Bind +Abbr) u) x)) H8 (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (let H11 \def +(csubst1_gen_head (Bind Abbr) d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T +C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 (Bind Abbr) u2)))) +(\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda +(_: T).(\lambda (c2: C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift +(S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda +(x0: T).(\lambda (x1: C).(\lambda (H12: (eq C x (CHead x1 (Bind Abbr) +x0))).(\lambda (H13: (subst1 (minus d0 (S n)) u0 u x0)).(\lambda (H14: +(csubst1 (minus d0 (S n)) u0 d x1)).(let H15 \def (eq_ind C x (\lambda (c1: +C).(getl n a0 c1)) H9 (CHead x1 (Bind Abbr) x0) H12) in (let H16 \def (eq_ind +nat d0 (\lambda (n0: nat).(drop (S O) n0 a0 a)) H5 (S (plus n (minus d0 (S +n)))) (lt_plus_minus n d0 H6)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: +C).(eq T x0 (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: +C).(getl n a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: +C).(drop (S O) (minus d0 (S n)) x1 e0))) (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda +(y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: +C).(\lambda (H17: (eq T x0 (lift (S O) (minus d0 (S n)) x2))).(\lambda (H18: +(getl n a (CHead x3 (Bind Abbr) x2))).(\lambda (H19: (drop (S O) (minus d0 (S +n)) x1 x3)).(let H20 \def (eq_ind T x0 (\lambda (t0: T).(subst1 (minus d0 (S +n)) u0 u t0)) H13 (lift (S O) (minus d0 (S n)) x2) H17) in (let H21 \def (H2 +e u0 (minus d0 (S n)) (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) u +(minus d0 (S n)) H7) x1 H14 x3 H19) in (ex3_2_ind T T (\lambda (y1: +T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) +y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (minus d0 (S n)) u0 t (lift +(S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x3 y1 +y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) +(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S +n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H22: (subst1 (minus d0 (S +n)) u0 u (lift (S O) (minus d0 (S n)) x4))).(\lambda (H23: (subst1 (minus d0 +(S n)) u0 t (lift (S O) (minus d0 (S n)) x5))).(\lambda (H24: (ty3 g x3 x4 +x5)).(let H25 \def (eq_ind T x4 (\lambda (t0: T).(ty3 g x3 t0 x5)) H24 x2 +(subst1_confluence_lift u x4 u0 (minus d0 (S n)) H22 x2 H20)) in (eq_ind_r +nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (S +n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda +(y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) (lift (S O) +n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro +T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) +u0 (lift (S n) O t) (lift (S O) (plus (S n) (minus d0 (S n))) y2)))) (\lambda +(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x5) +(eq_ind_r T (TLRef n) (\lambda (t0: T).(subst1 d0 u0 (TLRef n) t0)) +(subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) +d0 H6)) (eq_ind_r T (lift (S n) O (lift (S O) (minus d0 (S n)) x5)) (\lambda +(t0: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) t0)) +(subst1_lift_ge t (lift (S O) (minus d0 (S n)) x5) u0 (minus d0 (S n)) (S n) +H23 O (le_O_n (minus d0 (S n)))) (lift (S O) (plus (S n) (minus d0 (S n))) +(lift (S n) O x5)) (lift_d x5 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus +d0 (S n))))) (ty3_abbr g n a x3 x2 H18 x5 H25)) d0 (le_plus_minus (S n) d0 +H6)) d0 (le_plus_minus_sym (S n) d0 H6)))))))) H21)))))))) (getl_drop_conf_lt +Abbr a0 x1 x0 n H15 a (S O) (minus d0 (S n)) H16))))))))) H11)))))) +(csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0)))) (\lambda +(H6: (eq nat n d0)).(let H7 \def (eq_ind_r nat d0 (\lambda (n0: nat).(drop (S +O) n0 a0 a)) H5 n H6) in (let H8 \def (eq_ind_r nat d0 (\lambda (n0: +nat).(csubst1 n0 u0 c0 a0)) H4 n H6) in (let H9 \def (eq_ind_r nat d0 +(\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Abbr) u0))) H3 n H6) in (eq_ind +nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 +n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C (CHead d +(Bind Abbr) u) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind Abbr) u0) +(getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in +(let H11 \def (f_equal C C (\lambda (e0: C).(match e0 with [(CSort _) +\Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u) +(CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e +(Bind Abbr) u0) H9)) in ((let H12 \def (f_equal C T (\lambda (e0: C).(match +e0 with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d +(Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) +n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H13: (eq C d e)).(let H14 +\def (eq_ind_r T u0 (\lambda (t0: T).(getl n c0 (CHead e (Bind Abbr) t0))) +H10 u H12) in (let H15 \def (eq_ind_r T u0 (\lambda (t0: T).(csubst1 n t0 c0 +a0)) H8 u H12) in (eq_ind T u (\lambda (t0: T).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 n t0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 n t0 (lift (S n) O t) (lift (S O) n y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (eq_ind_r +C e (\lambda (c1: C).(getl n c0 (CHead c1 (Bind Abbr) u))) H14 d H13) in +(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 n u (TLRef n) (lift +(S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n u (lift (S n) O t) +(lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) +(lift n O u) (lift n O t) (subst1_single n u (TLRef n) (lift (S O) n (lift n +O u)) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(subst0 n u +(TLRef n) t0)) (subst0_lref u n) (lift (S O) n (lift n O u)) (lift_free u n +(S O) O n (le_plus_r O n) (le_O_n n)))) (eq_ind_r T (lift (plus (S O) n) O t) +(\lambda (t0: T).(subst1 n u (lift (S n) O t) t0)) (subst1_refl n u (lift (S +n) O t)) (lift (S O) n (lift n O t)) (lift_free t n (S O) O n (le_plus_r O n) +(le_O_n n))) (ty3_lift g d u t H1 a O n (getl_conf_ge_drop Abbr a0 d u n +(csubst1_getl_ge n n (le_n n) c0 a0 u H15 (CHead d (Bind Abbr) u) H16) a +H7)))) u0 H12))))) H11))) d0 H6))))) (\lambda (H6: (lt d0 n)).(eq_ind_r nat +(S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda +(_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) +(minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda +(y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) +(S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 +d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) (lift +(S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O +t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) +(TLRef (minus n (S O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) +(S O))) (\lambda (t0: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) +t0)) (subst1_refl d0 u0 (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 +(TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus +d0 n H6))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(subst1 d0 +u0 (lift (S n) O t) t0)) (subst1_refl d0 u0 (lift (S n) O t)) (lift (S O) d0 +(lift n O t)) (lift_free t n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) +(plus O n) H6)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: +nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O t))) (ty3_abbr g (minus n (S +O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abbr) u) a0 (csubst1_getl_ge d0 +n (le_S_n d0 n (le_S_n (S d0) (S n) (le_S (S (S d0)) (S n) (le_n_S (S d0) n +H6)))) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) d0 H5 (eq_ind_r nat +(plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_sym d0 +(S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus +(S O) (minus n (S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n +(S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n +(le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (n: +nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n +c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u +t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl +d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d0 u0 d a0) \to +(\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda +(u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) +u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: +C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda +(y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) +d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H6: +(lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n0: nat).(getl n0 +(CHead d (Bind Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le d0 (CHead e +(Bind Abbr) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S_n (S n) +(S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 H6))))) (S (minus d0 (S n))) +(minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 n) u0 +(CHead d (Bind Abst) u) e2)) (\lambda (e2: C).(getl n a0 e2)) (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift +(S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda +(x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 (CHead d (Bind Abst) u) +x)).(\lambda (H9: (getl n a0 x)).(let H10 \def (eq_ind nat (minus d0 n) +(\lambda (n0: nat).(csubst1 n0 u0 (CHead d (Bind Abst) u) x)) H8 (S (minus d0 +(S n))) (minus_x_Sy d0 n H6)) in (let H11 \def (csubst1_gen_head (Bind Abst) +d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T C (\lambda (u2: T).(\lambda +(c2: C).(eq C x (CHead c2 (Bind Abst) u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda (_: T).(\lambda (c2: +C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda +(y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: +C).(\lambda (H12: (eq C x (CHead x1 (Bind Abst) x0))).(\lambda (H13: (subst1 +(minus d0 (S n)) u0 u x0)).(\lambda (H14: (csubst1 (minus d0 (S n)) u0 d +x1)).(let H15 \def (eq_ind C x (\lambda (c1: C).(getl n a0 c1)) H9 (CHead x1 +(Bind Abst) x0) H12) in (let H16 \def (eq_ind nat d0 (\lambda (n0: nat).(drop +(S O) n0 a0 a)) H5 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H6)) in +(ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x0 (lift (S O) (minus d0 +(S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) x1 e0))) +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S +O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) +(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) +(\lambda (x2: T).(\lambda (x3: C).(\lambda (H17: (eq T x0 (lift (S O) (minus +d0 (S n)) x2))).(\lambda (H18: (getl n a (CHead x3 (Bind Abst) x2))).(\lambda +(H19: (drop (S O) (minus d0 (S n)) x1 x3)).(let H20 \def (eq_ind T x0 +(\lambda (t0: T).(subst1 (minus d0 (S n)) u0 u t0)) H13 (lift (S O) (minus d0 +(S n)) x2) H17) in (let H21 \def (H2 e u0 (minus d0 (S n)) (getl_gen_S (Bind +Abst) d (CHead e (Bind Abbr) u0) u (minus d0 (S n)) H7) x1 H14 x3 H19) in +(ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u +(lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 +(minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g x3 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda +(y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: +T).(\lambda (H22: (subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) +x4))).(\lambda (_: (subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) +x5))).(\lambda (H24: (ty3 g x3 x4 x5)).(let H25 \def (eq_ind T x4 (\lambda +(t0: T).(ty3 g x3 t0 x5)) H24 x2 (subst1_confluence_lift u x4 u0 (minus d0 (S +n)) H22 x2 H20)) in (eq_ind_r nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: +nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) +(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S +n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2))))) (eq_ind_r nat (plus (S n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) +u0 (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: +T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda +(y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) (lift (S O) +(plus (S n) (minus d0 (S n))) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g +a y1 y2))) (TLRef n) (lift (S n) O x2) (eq_ind_r T (TLRef n) (\lambda (t0: +T).(subst1 d0 u0 (TLRef n) t0)) (subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 +(TLRef n)) (lift_lref_lt n (S O) d0 H6)) (eq_ind_r T (lift (S n) O (lift (S +O) (minus d0 (S n)) x2)) (\lambda (t0: T).(subst1 (plus (minus d0 (S n)) (S +n)) u0 (lift (S n) O u) t0)) (subst1_lift_ge u (lift (S O) (minus d0 (S n)) +x2) u0 (minus d0 (S n)) (S n) H20 O (le_O_n (minus d0 (S n)))) (lift (S O) +(plus (S n) (minus d0 (S n))) (lift (S n) O x2)) (lift_d x2 (S O) (S n) +(minus d0 (S n)) O (le_O_n (minus d0 (S n))))) (ty3_abst g n a x3 x2 H18 x5 +H25)) d0 (le_plus_minus (S n) d0 H6)) d0 (le_plus_minus_sym (S n) d0 +H6)))))))) H21)))))))) (getl_drop_conf_lt Abst a0 x1 x0 n H15 a (S O) (minus +d0 (S n)) H16))))))))) H11)))))) (csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead +d (Bind Abst) u) H0)))) (\lambda (H6: (eq nat n d0)).(let H7 \def (eq_ind_r +nat d0 (\lambda (n0: nat).(drop (S O) n0 a0 a)) H5 n H6) in (let H8 \def +(eq_ind_r nat d0 (\lambda (n0: nat).(csubst1 n0 u0 c0 a0)) H4 n H6) in (let +H9 \def (eq_ind_r nat d0 (\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Abbr) +u0))) H3 n H6) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O u) (lift (S O) n0 y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C +(CHead d (Bind Abst) u) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind +Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) +H9)) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: +C).(match ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow +(match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow False | +Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow +False])])) I (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n +H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 n u0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 n u0 (lift (S n) O u) (lift (S O) n y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H11))) d0 H6))))) +(\lambda (H6: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda +(n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef +n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 +(lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: +nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) +(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S +n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift +(S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) +(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus +(minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O u) +(eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(subst1 d0 +u0 (TLRef (plus (minus n (S O)) (S O))) t0)) (subst1_refl d0 u0 (TLRef (plus +(minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) +(lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H6))) (eq_ind_r T +(lift (plus (S O) n) O u) (\lambda (t0: T).(subst1 d0 u0 (lift (S n) O u) +t0)) (subst1_refl d0 u0 (lift (S n) O u)) (lift (S O) d0 (lift n O u)) +(lift_free u n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H6)) +(le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a +(TLRef (minus n (S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u +(getl_drop_conf_ge n (CHead d (Bind Abst) u) a0 (csubst1_getl_ge d0 n (le_S_n +d0 n (le_S_n (S d0) (S n) (le_S (S (S d0)) (S n) (le_n_S (S d0) n H6)))) c0 +a0 u0 H4 (CHead d (Bind Abst) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) +d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_sym d0 (S O)))) t +H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus (S O) (minus +n (S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) +(refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n +(le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (c0: +C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (H1: +((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e +(Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: +C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2)))))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: ((\forall +(e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) +(CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 (CHead c0 (Bind +b) u) a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda +(y1: T).(\lambda (_: T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda +(u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) +u0))).(\lambda (a0: C).(\lambda (H5: (csubst1 d u0 c0 a0)).(\lambda (a: +C).(\lambda (H6: (drop (S O) d a0 a)).(let H7 \def (H1 e u0 d H4 a0 H5 a H6) +in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) +d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S +O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u0 u (lift (S O) d +x0))).(\lambda (_: (subst1 d u0 t (lift (S O) d x1))).(\lambda (H10: (ty3 g a +x0 x1)).(let H11 \def (H3 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind +Abbr) u0) H4 u) (CHead a0 (Bind b) (lift (S O) d x0)) (csubst1_bind b d u0 u +(lift (S O) d x0) H8 c0 a0 H5) (CHead a (Bind b) x0) (drop_skip_bind (S O) d +a0 a H6 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (S +d) u0 t3 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (S +d) u0 t4 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g +(CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: +T).(\lambda (x3: T).(\lambda (H12: (subst1 (S d) u0 t3 (lift (S O) (S d) +x2))).(\lambda (H13: (subst1 (S d) u0 t4 (lift (S O) (S d) x3))).(\lambda +(H14: (ty3 g (CHead a (Bind b) x0) x2 x3)).(ex3_2_intro T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S +O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Bind +b) x0 x2) (THead (Bind b) x0 x3) (eq_ind_r T (THead (Bind b) (lift (S O) d +x0) (lift (S O) (S d) x2)) (\lambda (t0: T).(subst1 d u0 (THead (Bind b) u +t3) t0)) (subst1_head u0 u (lift (S O) d x0) d H8 (Bind b) t3 (lift (S O) (S +d) x2) H12) (lift (S O) d (THead (Bind b) x0 x2)) (lift_bind b x0 x2 (S O) +d)) (eq_ind_r T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) +(\lambda (t0: T).(subst1 d u0 (THead (Bind b) u t4) t0)) (subst1_head u0 u +(lift (S O) d x0) d H8 (Bind b) t4 (lift (S O) (S d) x3) H13) (lift (S O) d +(THead (Bind b) x0 x3)) (lift_bind b x0 x3 (S O) d)) (ty3_bind g a x0 x1 H10 +b x2 x3 H14))))))) H11))))))) H7)))))))))))))))))))) (\lambda (c0: +C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: +((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e +(Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: +C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u0 w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u0 u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2)))))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g +c0 v (THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: +T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: +C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 v (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind Abst) u t) (lift +(S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda +(H4: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H5: +(csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S O) d a0 a)).(let +H7 \def (H3 e u0 d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d u0 v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u +t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u0 v (lift (S O) d +x0))).(\lambda (H9: (subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d +x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (H1 e u0 d H4 a0 H5 a H6) +in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 w (lift (S O) +d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 u (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead +(Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (subst1 d u0 w +(lift (S O) d x2))).(\lambda (H13: (subst1 d u0 u (lift (S O) d +x3))).(\lambda (H14: (ty3 g a x2 x3)).(let H_x \def (subst1_gen_head (Bind +Abst) u0 u t (lift (S O) d x1) d H9) in (let H15 \def H_x in (ex3_2_ind T T +(\lambda (u2: T).(\lambda (t3: T).(eq T (lift (S O) d x1) (THead (Bind Abst) +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 d u0 u u2))) (\lambda (_: +T).(\lambda (t3: T).(subst1 (S d) u0 t t3))) (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead +(Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H16: (eq T (lift (S +O) d x1) (THead (Bind Abst) x4 x5))).(\lambda (H17: (subst1 d u0 u +x4)).(\lambda (H18: (subst1 (S d) u0 t x5)).(let H19 \def (sym_eq T (lift (S +O) d x1) (THead (Bind Abst) x4 x5) H16) in (ex3_2_ind T T (\lambda (y: +T).(\lambda (z: T).(eq T x1 (THead (Bind Abst) y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T x4 (lift (S O) d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T x5 (lift (S O) (S d) z)))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u +t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) +(\lambda (x6: T).(\lambda (x7: T).(\lambda (H20: (eq T x1 (THead (Bind Abst) +x6 x7))).(\lambda (H21: (eq T x4 (lift (S O) d x6))).(\lambda (H22: (eq T x5 +(lift (S O) (S d) x7))).(let H23 \def (eq_ind T x5 (\lambda (t0: T).(subst1 +(S d) u0 t t0)) H18 (lift (S O) (S d) x7) H22) in (let H24 \def (eq_ind T x4 +(\lambda (t0: T).(subst1 d u0 u t0)) H17 (lift (S O) d x6) H21) in (let H25 +\def (eq_ind T x1 (\lambda (t0: T).(ty3 g a x0 t0)) H10 (THead (Bind Abst) x6 +x7) H20) in (let H26 \def (eq_ind T x6 (\lambda (t0: T).(ty3 g a x0 (THead +(Bind Abst) t0 x7))) H25 x3 (subst1_confluence_lift u x6 u0 d H24 x3 H13)) in +(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat +Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 +(THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda +(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x2 x0) (THead +(Flat Appl) x2 (THead (Bind Abst) x3 x7)) (eq_ind_r T (THead (Flat Appl) +(lift (S O) d x2) (lift (S O) d x0)) (\lambda (t0: T).(subst1 d u0 (THead +(Flat Appl) w v) t0)) (subst1_head u0 w (lift (S O) d x2) d H12 (Flat Appl) v +(lift (S O) d x0) H8) (lift (S O) d (THead (Flat Appl) x2 x0)) (lift_flat +Appl x2 x0 (S O) d)) (eq_ind_r T (THead (Flat Appl) (lift (S O) d x2) (lift +(S O) d (THead (Bind Abst) x3 x7))) (\lambda (t0: T).(subst1 d u0 (THead +(Flat Appl) w (THead (Bind Abst) u t)) t0)) (subst1_head u0 w (lift (S O) d +x2) d H12 (Flat Appl) (THead (Bind Abst) u t) (lift (S O) d (THead (Bind +Abst) x3 x7)) (eq_ind_r T (THead (Bind Abst) (lift (S O) d x3) (lift (S O) (S +d) x7)) (\lambda (t0: T).(subst1 (s (Flat Appl) d) u0 (THead (Bind Abst) u t) +t0)) (subst1_head u0 u (lift (S O) d x3) (s (Flat Appl) d) H13 (Bind Abst) t +(lift (S O) (S d) x7) H23) (lift (S O) d (THead (Bind Abst) x3 x7)) +(lift_bind Abst x3 x7 (S O) d))) (lift (S O) d (THead (Flat Appl) x2 (THead +(Bind Abst) x3 x7))) (lift_flat Appl x2 (THead (Bind Abst) x3 x7) (S O) d)) +(ty3_appl g a x2 x3 H14 x0 x7 H26))))))))))) (lift_gen_bind Abst x4 x5 x1 (S +O) d H19)))))))) H15)))))))) H11))))))) H7))))))))))))))))))) (\lambda (c0: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda +(H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e +(Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: +C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2)))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t4 +t0)).(\lambda (H3: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl +d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to +(\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: +nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: +C).(\lambda (H5: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S +O) d a0 a)).(let H7 \def (H3 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda +(y1: T).(\lambda (_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda +(_: T).(\lambda (y2: T).(subst1 d u (THead (Flat Cast) t0 t4) (lift (S O) d +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H8: (subst1 d u t4 (lift (S O) d x0))).(\lambda +(H9: (subst1 d u t0 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let +H11 \def (H1 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda +(_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead +(Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(subst1 d u (THead (Flat Cast) t0 t4) (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: +T).(\lambda (H12: (subst1 d u t3 (lift (S O) d x2))).(\lambda (H13: (subst1 d +u t4 (lift (S O) d x3))).(\lambda (H14: (ty3 g a x2 x3)).(let H15 \def +(eq_ind T x3 (\lambda (t: T).(ty3 g a x2 t)) H14 x0 (subst1_confluence_lift +t4 x3 u d H13 x0 H8)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: +T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(subst1 d u (THead (Flat Cast) t0 t4) (lift (S O) d +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) +x0 x2) (THead (Flat Cast) x1 x0) (eq_ind_r T (THead (Flat Cast) (lift (S O) d +x0) (lift (S O) d x2)) (\lambda (t: T).(subst1 d u (THead (Flat Cast) t4 t3) +t)) (subst1_head u t4 (lift (S O) d x0) d H8 (Flat Cast) t3 (lift (S O) d x2) +H12) (lift (S O) d (THead (Flat Cast) x0 x2)) (lift_flat Cast x0 x2 (S O) d)) +(eq_ind_r T (THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) (\lambda +(t: T).(subst1 d u (THead (Flat Cast) t0 t4) t)) (subst1_head u t0 (lift (S +O) d x1) d H9 (Flat Cast) t4 (lift (S O) d x0) H8) (lift (S O) d (THead (Flat +Cast) x1 x0)) (lift_flat Cast x1 x0 (S O) d)) (ty3_cast g a x2 x0 H15 x1 +H10)))))))) H11))))))) H7)))))))))))))))))) c t1 t2 H))))). + +lemma ty3_gen_cvoid: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c +t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c +(CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c a) \to (ex3_2 T +T (\lambda (y1: T).(\lambda (_: T).(eq T t1 (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t2 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2)))))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda +(t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead +e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2))))))))))))) (\lambda (c0: C).(\lambda (t3: +T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: +C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to +(\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t +(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2)))))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (H2: (ty3 g c0 u +t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl +d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (H4: (pc3 c0 t4 +t3)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H5: (getl d +c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H6: (drop (S O) d c0 +a)).(let H7 \def (H3 e u0 d H5 a H6) in (ex3_2_ind T T (\lambda (y1: +T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H8: (eq T u (lift (S O) d x0))).(\lambda (H9: +(eq T t4 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def +(eq_ind T t4 (\lambda (t0: T).(pc3 c0 t0 t3)) H4 (lift (S O) d x1) H9) in +(let H12 \def (eq_ind T t4 (\lambda (t0: T).(ty3 g c0 u t0)) H2 (lift (S O) d +x1) H9) in (let H13 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 (lift (S +O) d x1))) H12 (lift (S O) d x0) H8) in (eq_ind_r T (lift (S O) d x0) +(\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift +(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H1 e u0 +d H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift +(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: +(eq T t3 (lift (S O) d x2))).(\lambda (H16: (eq T t (lift (S O) d +x3))).(\lambda (H17: (ty3 g a x2 x3)).(let H18 \def (eq_ind T t (\lambda (t0: +T).(ty3 g c0 t3 t0)) H0 (lift (S O) d x3) H16) in (let H19 \def (eq_ind T t3 +(\lambda (t0: T).(ty3 g c0 t0 (lift (S O) d x3))) H18 (lift (S O) d x2) H15) +in (let H20 \def (eq_ind T t3 (\lambda (t0: T).(pc3 c0 (lift (S O) d x1) t0)) +H11 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda (t0: +T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift +(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T +(\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 (refl_equal T (lift +(S O) d x0)) (refl_equal T (lift (S O) d x2)) (ty3_conv g a x2 x3 H17 x0 x1 +H10 (pc3_gen_lift c0 x1 x2 (S O) d H20 a H6))) t3 H15))))))))) H14)) u +H8))))))))) H7)))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda +(e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e +(Bind Void) u))).(\lambda (a: C).(\lambda (_: (drop (S O) d c0 +a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TSort m) (lift +(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (TSort (next g m)) +(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) +(TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: T).(eq T +(TSort m) t)) (refl_equal T (TSort m)) (lift (S O) d (TSort m)) (lift_sort m +(S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(eq T (TSort (next g +m)) t)) (refl_equal T (TSort (next g m))) (lift (S O) d (TSort (next g m))) +(lift_sort (next g m) (S O) d)) (ty3_sort g a m)))))))))) (\lambda (n: +nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n +c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u +t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl +d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: +T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) +u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt +n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n0: nat).(getl n0 +(CHead d (Bind Abbr) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e +(Bind Void) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 (le_S_n n d0 (le_S_n (S n) +(S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 H5))))) (S (minus d0 (S n))) +(minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n0: nat).(drop +(S O) n0 c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in +(ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 +(S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abbr) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: +T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) +x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abbr) x0))).(\lambda (H10: +(drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: +T).(\forall (e0: C).(\forall (u1: T).(\forall (d1: nat).((getl d1 d (CHead e0 +(Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d1 d a0) \to (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d1 y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t (lift (S O) d1 y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a0 y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in +(let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) +(minus d0 (S n)) x0) H8) in (let H13 \def (H11 e u0 (minus d0 (S n)) +(getl_gen_S (Bind Abbr) d (CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 +H10) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) +(minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g x1 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: +T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: +(eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) +x2))).(\lambda (H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda +(H16: (ty3 g x1 x2 x3)).(let H17 \def (eq_ind T t (\lambda (t0: T).(ty3 g d +(lift (S O) (minus d0 (S n)) x0) t0)) H12 (lift (S O) (minus d0 (S n)) x3) +H15) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x3) (\lambda (t0: T).(ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t0) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H18 \def +(eq_ind_r T x2 (\lambda (t0: T).(ty3 g x1 t0 x3)) H16 x0 (lift_inj x0 x2 (S +O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S +n))) (lift (S n) O x3)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: +T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x3)) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T +(\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x3)) +(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) +(TLRef n) (lift (S n) O x3) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T +(TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) +(lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O +x3))) (ty3_abbr g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) +(le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x3)) +(lift_d x3 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))) t +H15))))))) H13))))))))) (getl_drop_conf_lt Abbr c0 d u n H0 a (S O) (minus d0 +(S n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 +(\lambda (n0: nat).(drop (S O) n0 c0 a)) H4 n H5) in (let H7 \def (eq_ind_r +nat d0 (\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Void) u0))) H3 n H5) in +(eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq +T (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: +T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) +(\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind Void) u0) (getl_mono c0 +(CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def +(eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow True | Abst \Rightarrow False | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind +Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) +H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef +n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O +t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) +H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S +O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T +(TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift +(S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus +(minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda +(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: +T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S +O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda +(t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef +(plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) +(lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T +(lift (plus (S O) n) O t) (\lambda (t0: T).(eq T (lift (S n) O t) t0)) +(refl_equal T (lift (S n) O t)) (lift (S O) d0 (lift n O t)) (lift_free t n +(S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) +(eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n +(S O))) (lift n0 O t))) (ty3_abbr g (minus n (S O)) a d u (getl_drop_conf_ge +n (CHead d (Bind Abbr) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) +(\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_sym d0 (S O)))) t H1) +n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n +(S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) +(refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n +(le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (n: +nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n +c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u +t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl +d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: +T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) +u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt +n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n0: nat).(getl n0 +(CHead d (Bind Abst) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e +(Bind Void) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S_n (S n) +(S d0) (le_S (S (S n)) (S d0) (le_n_S (S n) d0 H5))))) (S (minus d0 (S n))) +(minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n0: nat).(drop +(S O) n0 c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in +(ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 +(S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: +T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) +x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abst) x0))).(\lambda (H10: +(drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: +T).(\forall (e0: C).(\forall (u1: T).(\forall (d1: nat).((getl d1 d (CHead e0 +(Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d1 d a0) \to (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d1 y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t (lift (S O) d1 y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a0 y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in +(let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) +(minus d0 (S n)) x0) H8) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x0) +(\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) +(lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O +t0) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2))))) (let H13 \def (H11 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abst) d +(CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 H10) in (ex3_2_ind T T +(\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (minus d0 (S n)) x0) (lift +(S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift +(S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x1 y1 +y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) +d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O (lift (S O) +(minus d0 (S n)) x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: +T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T +(lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) x2))).(\lambda +(H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda (H16: (ty3 g x1 x2 +x3)).(let H17 \def (eq_ind T t (\lambda (t0: T).(ty3 g d (lift (S O) (minus +d0 (S n)) x0) t0)) H12 (lift (S O) (minus d0 (S n)) x3) H15) in (let H18 \def +(eq_ind_r T x2 (\lambda (t0: T).(ty3 g x1 t0 x3)) H16 x0 (lift_inj x0 x2 (S +O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S +n))) (lift (S n) O x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: +T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x0)) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T +(\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x0)) +(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) +(TLRef n) (lift (S n) O x0) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T +(TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) +(lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O +x0))) (ty3_abst g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) +(le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x0)) +(lift_d x0 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))))))))) +H13)) u H8)))))))) (getl_drop_conf_lt Abst c0 d u n H0 a (S O) (minus d0 (S +n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 +(\lambda (n0: nat).(drop (S O) n0 c0 a)) H4 n H5) in (let H7 \def (eq_ind_r +nat d0 (\lambda (n0: nat).(getl n0 c0 (CHead e (Bind Void) u0))) H3 n H5) in +(eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq +T (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: +T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abst) u) +(\lambda (c1: C).(getl n c0 c1)) H0 (CHead e (Bind Void) u0) (getl_mono c0 +(CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def +(eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee with [(CSort _) +\Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind b) +\Rightarrow (match b with [Abbr \Rightarrow False | Abst \Rightarrow True | +Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind +Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) +H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef +n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O +u) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) +H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S +O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T +(TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift +(S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus +(minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda +(y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: +T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S +O))) (lift n O u) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda +(t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef +(plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) +(lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T +(lift (plus (S O) n) O u) (\lambda (t0: T).(eq T (lift (S n) O u) t0)) +(refl_equal T (lift (S n) O u)) (lift (S O) d0 (lift n O u)) (lift_free u n +(S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) +(eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n +(S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u (getl_drop_conf_ge +n (CHead d (Bind Abst) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) +(\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_sym d0 (S O)))) t H1) +n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n +(S O))) (plus_sym (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) +(refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n +(le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (c0: +C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u t)).(\lambda +(H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e +(Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda +(t4: T).(\lambda (H2: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: +((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind +b) u) (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d (CHead c0 +(Bind b) u) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift +(S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: +C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind +Void) u0))).(\lambda (a: C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def +(H1 e u0 d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T +u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) u t3) (lift (S O) d +y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) u t4) (lift (S +O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H7: (eq T u (lift (S O) d x0))).(\lambda +(H8: (eq T t (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def +(eq_ind T t (\lambda (t0: T).(ty3 g c0 u t0)) H0 (lift (S O) d x1) H8) in +(let H11 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 t0 (lift (S O) d x1))) +H10 (lift (S O) d x0) H7) in (let H12 \def (eq_ind T u (\lambda (t0: +T).(\forall (e0: C).(\forall (u1: T).(\forall (d0: nat).((getl d0 (CHead c0 +(Bind b) t0) (CHead e0 (Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d0 +(CHead c0 (Bind b) t0) a0) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(eq T t3 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 +(lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a0 y1 +y2))))))))))) H3 (lift (S O) d x0) H7) in (let H13 \def (eq_ind T u (\lambda +(t0: T).(ty3 g (CHead c0 (Bind b) t0) t3 t4)) H2 (lift (S O) d x0) H7) in +(eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (THead (Bind b) t0 t3) (lift (S O) d y1)))) (\lambda +(_: T).(\lambda (y2: T).(eq T (THead (Bind b) t0 t4) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H12 e u0 +(S d) (getl_head (Bind b) d c0 (CHead e (Bind Void) u0) H4 (lift (S O) d x0)) +(CHead a (Bind b) x0) (drop_skip_bind (S O) d c0 a H5 b x0)) in (ex3_2_ind T +T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) (S d) y1)))) (\lambda +(_: T).(\lambda (y2: T).(eq T t4 (lift (S O) (S d) y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda +(y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t3) (lift (S +O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S +O) d x0) t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S +O) (S d) x2))).(\lambda (H16: (eq T t4 (lift (S O) (S d) x3))).(\lambda (H17: +(ty3 g (CHead a (Bind b) x0) x2 x3)).(eq_ind_r T (lift (S O) (S d) x3) +(\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead +(Bind b) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda +(y2: T).(eq T (THead (Bind b) (lift (S O) d x0) t0) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r T (lift (S O) +(S d) x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T +(THead (Bind b) (lift (S O) d x0) t0) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) +x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind +b) (lift (S O) d x0) (lift (S O) (S d) x2)) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) +x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) +(THead (Bind b) x0 x2) (THead (Bind b) x0 x3) (sym_eq T (lift (S O) d (THead +(Bind b) x0 x2)) (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) +(lift_bind b x0 x2 (S O) d)) (sym_eq T (lift (S O) d (THead (Bind b) x0 x3)) +(THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift_bind b x0 x3 +(S O) d)) (ty3_bind g a x0 x1 H9 b x2 x3 H17)) t3 H15) t4 H16)))))) H14)) u +H7)))))))))) H6)))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda +(u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: ((\forall (e: C).(\forall +(u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall +(a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T u +(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2)))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v +(THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: +T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: +C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T +v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind +Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda +(H4: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H5: +(drop (S O) d c0 a)).(let H6 \def (H3 e u0 d H4 a H5) in (ex3_2_ind T T +(\lambda (y1: T).(\lambda (_: T).(eq T v (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (THead (Bind Abst) u t) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (THead (Flat Appl) w v) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind +Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T v (lift (S O) +d x0))).(\lambda (H8: (eq T (THead (Bind Abst) u t) (lift (S O) d +x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def (eq_ind T v (\lambda (t0: +T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H2 (lift (S O) d x0) H7) in +(eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (THead (Flat Appl) w t0) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind +Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a +y1 y2))))) (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x1 (THead +(Bind Abst) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift (S O) d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift (S O) (S d) z)))) (ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d +x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat +Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: +T).(\lambda (H11: (eq T x1 (THead (Bind Abst) x2 x3))).(\lambda (H12: (eq T u +(lift (S O) d x2))).(\lambda (H13: (eq T t (lift (S O) (S d) x3))).(let H14 +\def (eq_ind T x1 (\lambda (t0: T).(ty3 g a x0 t0)) H9 (THead (Bind Abst) x2 +x3) H11) in (eq_ind_r T (lift (S O) (S d) x3) (\lambda (t0: T).(ex3_2 T T +(\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d +x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat +Appl) w (THead (Bind Abst) u t0)) (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H15 \def (eq_ind T u (\lambda +(t0: T).(\forall (e0: C).(\forall (u1: T).(\forall (d0: nat).((getl d0 c0 +(CHead e0 (Bind Void) u1)) \to (\forall (a0: C).((drop (S O) d0 c0 a0) \to +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d0 y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a0 y1 y2))))))))))) H1 (lift (S O) d x2) H12) in +(eq_ind_r T (lift (S O) d x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) +d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead +(Bind Abst) t0 (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (H15 e u0 d H4 a H5) in +(ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) +d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead +(Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: +T).(\lambda (x5: T).(\lambda (H17: (eq T w (lift (S O) d x4))).(\lambda (H18: +(eq T (lift (S O) d x2) (lift (S O) d x5))).(\lambda (H19: (ty3 g a x4 +x5)).(eq_ind_r T (lift (S O) d x4) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (lift (S O) d x0)) (lift (S O) +d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) t0 (THead +(Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H20 \def (eq_ind_r +T x5 (\lambda (t0: T).(ty3 g a x4 t0)) H19 x2 (lift_inj x2 x5 (S O) d H18)) +in (eq_ind T (lift (S O) d (THead (Bind Abst) x2 x3)) (\lambda (t0: T).(ex3_2 +T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) (lift (S O) d +x4) (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(eq T (THead (Flat Appl) (lift (S O) d x4) t0) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d +(THead (Flat Appl) x4 x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T t0 (lift (S O) d y1)))) (\lambda (_: T).(\lambda +(y2: T).(eq T (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d (THead (Bind +Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g +a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) +x2 x3))) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T +(lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: +T).(eq T (lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d (THead (Flat Appl) x4 +(THead (Bind Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x4 x0) (THead (Flat Appl) x4 +(THead (Bind Abst) x2 x3)) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 +x0))) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 +x3)))) (ty3_appl g a x4 x2 H20 x0 x3 H14)) (THead (Flat Appl) (lift (S O) d +x4) (lift (S O) d (THead (Bind Abst) x2 x3))) (lift_flat Appl x4 (THead (Bind +Abst) x2 x3) (S O) d)) (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d +x0)) (lift_flat Appl x4 x0 (S O) d)) (THead (Bind Abst) (lift (S O) d x2) +(lift (S O) (S d) x3)) (lift_bind Abst x2 x3 (S O) d))) w H17)))))) H16)) u +H12)) t H13))))))) (lift_gen_bind Abst u t x1 (S O) d H8)) v H7))))))) +H6))))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: +T).(\lambda (H0: (ty3 g c0 t3 t4)).(\lambda (H1: ((\forall (e: C).(\forall +(u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall +(a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 +(lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 +y2)))))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c0 t4 t0)).(\lambda (H3: +((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind +Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda +(y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda +(y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda +(d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Void) u))).(\lambda (a: +C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def (H3 e u d H4 a H5) in +(ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: +T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda +(_: T).(eq T (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (THead (Flat Cast) t0 t4) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H7: (eq T t4 (lift (S O) d x0))).(\lambda (H8: +(eq T t0 (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def +(eq_ind T t0 (\lambda (t: T).(ty3 g c0 t4 t)) H2 (lift (S O) d x1) H8) in +(eq_ind_r T (lift (S O) d x1) (\lambda (t: T).(ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Cast) t t4) (lift (S O) d +y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H11 \def +(eq_ind T t4 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H10 (lift (S O) +d x0) H7) in (let H12 \def (eq_ind T t4 (\lambda (t: T).(\forall (e0: +C).(\forall (u0: T).(\forall (d0: nat).((getl d0 c0 (CHead e0 (Bind Void) +u0)) \to (\forall (a0: C).((drop (S O) d0 c0 a0) \to (ex3_2 T T (\lambda (y1: +T).(\lambda (_: T).(eq T t3 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda +(y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 +g a0 y1 y2))))))))))) H1 (lift (S O) d x0) H7) in (let H13 \def (eq_ind T t4 +(\lambda (t: T).(ty3 g c0 t3 t)) H0 (lift (S O) d x0) H7) in (eq_ind_r T +(lift (S O) d x0) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: +T).(eq T (THead (Flat Cast) t t3) (lift (S O) d y1)))) (\lambda (_: +T).(\lambda (y2: T).(eq T (THead (Flat Cast) (lift (S O) d x1) t) (lift (S O) +d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def +(H12 e u d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T +t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d +x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) +(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) (lift (S +O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T +(THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: +T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S O) d x2))).(\lambda +(H16: (eq T (lift (S O) d x0) (lift (S O) d x3))).(\lambda (H17: (ty3 g a x2 +x3)).(let H18 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t (lift (S O) d +x0))) H13 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda +(t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) +(lift (S O) d x0) t) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: +T).(eq T (THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) (lift (S O) +d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H19 \def +(eq_ind_r T x3 (\lambda (t: T).(ty3 g a x2 t)) H17 x0 (lift_inj x0 x3 (S O) d +H16)) in (eq_ind T (lift (S O) d (THead (Flat Cast) x0 x2)) (\lambda (t: +T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) +(\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Cast) (lift (S O) d x1) +(lift (S O) d x0)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: +T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Cast) x1 x0)) +(\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) +d (THead (Flat Cast) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda +(y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g +a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S +O) d (THead (Flat Cast) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda +(y2: T).(eq T (lift (S O) d (THead (Flat Cast) x1 x0)) (lift (S O) d y2)))) +(\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) x0 x2) +(THead (Flat Cast) x1 x0) (refl_equal T (lift (S O) d (THead (Flat Cast) x0 +x2))) (refl_equal T (lift (S O) d (THead (Flat Cast) x1 x0))) (ty3_cast g a +x2 x0 H19 x1 H9)) (THead (Flat Cast) (lift (S O) d x1) (lift (S O) d x0)) +(lift_flat Cast x1 x0 (S O) d)) (THead (Flat Cast) (lift (S O) d x0) (lift (S +O) d x2)) (lift_flat Cast x0 x2 (S O) d))) t3 H15))))))) H14)) t4 H7)))) t0 +H8))))))) H6)))))))))))))))) c t1 t2 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/defs.ma new file mode 100644 index 000000000..c7dafeb5a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/defs.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/pr0/defs.ma". + +include "basic_1A/C/defs.ma". + +inductive wcpr0: C \to (C \to Prop) \def +| wcpr0_refl: \forall (c: C).(wcpr0 c c) +| wcpr0_comp: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall +(u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (k: K).(wcpr0 (CHead c1 k +u1) (CHead c2 k u2)))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/fwd.ma new file mode 100644 index 000000000..bcdd0eefe --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/fwd.ma @@ -0,0 +1,105 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/wcpr0/defs.ma". + +implied rec lemma wcpr0_ind (P: (C \to (C \to Prop))) (f: (\forall (c: C).(P +c c))) (f0: (\forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to ((P c1 c2) +\to (\forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (k: K).(P +(CHead c1 k u1) (CHead c2 k u2))))))))))) (c: C) (c0: C) (w: wcpr0 c c0) on +w: P c c0 \def match w with [(wcpr0_refl c1) \Rightarrow (f c1) | (wcpr0_comp +c1 c2 w0 u1 u2 p k) \Rightarrow (f0 c1 c2 w0 ((wcpr0_ind P f f0) c1 c2 w0) u1 +u2 p k)]. + +lemma wcpr0_gen_sort: + \forall (x: C).(\forall (n: nat).((wcpr0 (CSort n) x) \to (eq C x (CSort +n)))) +\def + \lambda (x: C).(\lambda (n: nat).(\lambda (H: (wcpr0 (CSort n) +x)).(insert_eq C (CSort n) (\lambda (c: C).(wcpr0 c x)) (\lambda (c: C).(eq C +x c)) (\lambda (y: C).(\lambda (H0: (wcpr0 y x)).(wcpr0_ind (\lambda (c: +C).(\lambda (c0: C).((eq C c (CSort n)) \to (eq C c0 c)))) (\lambda (c: +C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: +C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(eq C c0 c0)) +(refl_equal C (CSort n)) c H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda +(_: (wcpr0 c1 c2)).(\lambda (_: (((eq C c1 (CSort n)) \to (eq C c2 +c1)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda +(k: K).(\lambda (H4: (eq C (CHead c1 k u1) (CSort n))).(let H5 \def (eq_ind C +(CHead c1 k u1) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow False +| (CHead _ _ _) \Rightarrow True])) I (CSort n) H4) in (False_ind (eq C +(CHead c2 k u2) (CHead c1 k u1)) H5))))))))))) y x H0))) H))). + +lemma wcpr0_gen_head: + \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).((wcpr0 +(CHead c1 k u1) x) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: +C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: +T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))) +\def + \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda +(H: (wcpr0 (CHead c1 k u1) x)).(insert_eq C (CHead c1 k u1) (\lambda (c: +C).(wcpr0 c x)) (\lambda (c: C).(or (eq C x c) (ex3_2 C T (\lambda (c2: +C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: +T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))) (\lambda +(y: C).(\lambda (H0: (wcpr0 y x)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: +C).((eq C c (CHead c1 k u1)) \to (or (eq C c0 c) (ex3_2 C T (\lambda (c2: +C).(\lambda (u2: T).(eq C c0 (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: +T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))))) +(\lambda (c: C).(\lambda (H1: (eq C c (CHead c1 k u1))).(let H2 \def (f_equal +C C (\lambda (e: C).e) c (CHead c1 k u1) H1) in (eq_ind_r C (CHead c1 k u1) +(\lambda (c0: C).(or (eq C c0 c0) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: +T).(eq C c0 (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 +c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))) (or_introl (eq C +(CHead c1 k u1) (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: +T).(eq C (CHead c1 k u1) (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: +T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))) +(refl_equal C (CHead c1 k u1))) c H2)))) (\lambda (c0: C).(\lambda (c2: +C).(\lambda (H1: (wcpr0 c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 k u1)) \to +(or (eq C c2 c0) (ex3_2 C T (\lambda (c3: C).(\lambda (u2: T).(eq C c2 (CHead +c3 k u2)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u1 u2)))))))).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (H3: (pr0 u0 u2)).(\lambda (k0: K).(\lambda (H4: (eq C (CHead c0 +k0 u0) (CHead c1 k u1))).(let H5 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 +u0) (CHead c1 k u1) H4) in ((let H6 \def (f_equal C K (\lambda (e: C).(match +e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 +k0 u0) (CHead c1 k u1) H4) in ((let H7 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) +(CHead c0 k0 u0) (CHead c1 k u1) H4) in (\lambda (H8: (eq K k0 k)).(\lambda +(H9: (eq C c0 c1)).(eq_ind_r K k (\lambda (k1: K).(or (eq C (CHead c2 k1 u2) +(CHead c0 k1 u0)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead +c2 k1 u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))) (let H10 \def (eq_ind T u0 +(\lambda (t: T).(pr0 t u2)) H3 u1 H7) in (eq_ind_r T u1 (\lambda (t: T).(or +(eq C (CHead c2 k u2) (CHead c0 k t)) (ex3_2 C T (\lambda (c3: C).(\lambda +(u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda +(_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))) (let +H11 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 k u1)) \to (or (eq C +c2 c) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C c2 (CHead c3 k +u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u1 u3))))))) H2 c1 H9) in (let H12 \def (eq_ind C c0 +(\lambda (c: C).(wcpr0 c c2)) H1 c1 H9) in (eq_ind_r C c1 (\lambda (c: C).(or +(eq C (CHead c2 k u2) (CHead c k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda +(u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda +(_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))) +(or_intror (eq C (CHead c2 k u2) (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: +C).(\lambda (u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: +C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 +u3)))) (ex3_2_intro C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead c2 k +u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c2 u2 (refl_equal C (CHead c2 +k u2)) H12 H10)) c0 H9))) u0 H7)) k0 H8)))) H6)) H5))))))))))) y x H0))) +H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/getl.ma new file mode 100644 index 000000000..c9f09e78e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wcpr0/getl.ma @@ -0,0 +1,448 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/wcpr0/fwd.ma". + +include "basic_1A/getl/props.ma". + +lemma wcpr0_drop: + \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (h: +nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c1 (CHead +e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c2 +(CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda +(_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall +(u1: T).(\forall (k: K).((drop h O c (CHead e1 k u1)) \to (ex3_2 C T (\lambda +(e2: C).(\lambda (u2: T).(drop h O c0 (CHead e2 k u2)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 +u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda +(u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k +u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead +e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl +u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 +c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: +T).(\forall (k: K).((drop h O c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda +(e2: C).(\lambda (u2: T).(drop h O c4 (CHead e2 k u2)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 +u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 +u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall +(e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 k u1) (CHead +e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead +c4 k u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) +(\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: +C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c3 k u1) +(CHead e1 k0 u0))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 k u1) +(CHead e1 k0 u0) (drop_gen_refl (CHead c3 k u1) (CHead e1 k0 u0) H3)) in +((let H5 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) +\Rightarrow k | (CHead _ k1 _) \Rightarrow k1])) (CHead c3 k u1) (CHead e1 k0 +u0) (drop_gen_refl (CHead c3 k u1) (CHead e1 k0 u0) H3)) in ((let H6 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u1 | (CHead +_ _ t) \Rightarrow t])) (CHead c3 k u1) (CHead e1 k0 u0) (drop_gen_refl +(CHead c3 k u1) (CHead e1 k0 u0) H3)) in (\lambda (H7: (eq K k k0)).(\lambda +(H8: (eq C c3 e1)).(eq_ind K k (\lambda (k1: K).(ex3_2 C T (\lambda (e2: +C).(\lambda (u3: T).(drop O O (CHead c4 k u2) (CHead e2 k1 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u0 u3))))) (eq_ind T u1 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda +(u3: T).(drop O O (CHead c4 k u2) (CHead e2 k u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 t +u3))))) (eq_ind C c3 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda +(u3: T).(drop O O (CHead c4 k u2) (CHead e2 k u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 c e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 +u3))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead +c4 k u2) (CHead e2 k u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c3 e2))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c4 u2 (drop_refl (CHead c4 k +u2)) H0 H2) e1 H8) u0 H6) k0 H7)))) H5)) H4)))))) (K_ind (\lambda (k0: +K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k1: +K).((drop n O (CHead c3 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(drop n O (CHead c4 k0 u2) (CHead e2 k1 u4)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 +u3 u4))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop +(S n) O (CHead c3 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(drop (S n) O (CHead c4 k0 u2) (CHead e2 k1 u4)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda +(u4: T).(pr0 u3 u4))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: +((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 +(Bind b) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: +T).(drop n O (CHead c4 (Bind b) u2) (CHead e2 k0 u4)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 +u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(drop (S n) O (CHead c3 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 +u0 k0 (drop_gen_drop (Bind b) c3 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T +(\lambda (e2: C).(\lambda (u3: T).(drop n O c4 (CHead e2 k0 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c4 +(Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 +e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H6: (drop n O c4 (CHead x0 k0 x1))).(\lambda +(H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: +C).(\lambda (u3: T).(drop (S n) O (CHead c4 (Bind b) u2) (CHead e2 k0 u3)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda +(u3: T).(pr0 u0 u3))) x0 x1 (drop_drop (Bind b) n c4 (CHead x0 k0 x1) H6 u2) +H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: +((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 +(Flat f) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: +T).(drop n O (CHead c4 (Flat f) u2) (CHead e2 k0 u4)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 +u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(drop (S n) O (CHead c3 (Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 (S +n) e1 u0 k0 (drop_gen_drop (Flat f) c3 (CHead e1 k0 u0) u1 n H4)) in +(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c4 (CHead e2 +k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(drop (S n) O (CHead c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 +u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (drop (S n) O c4 +(CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 +x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead +c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 +e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (drop_drop +(Flat f) n c4 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) k) h)))))))))) +c1 c2 H))). + +lemma wcpr0_drop_back: + \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (h: +nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c1 (CHead +e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c2 +(CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda +(_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall +(u1: T).(\forall (k: K).((drop h O c0 (CHead e1 k u1)) \to (ex3_2 C T +(\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 +u2 u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda +(u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k +u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead +e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl +u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 +c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: +T).(\forall (k: K).((drop h O c4 (CHead e1 k u1)) \to (ex3_2 C T (\lambda +(e2: C).(\lambda (u2: T).(drop h O c3 (CHead e2 k u2)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 +u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 +u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall +(e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c4 k u2) (CHead +e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead +c3 k u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) +(\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: +C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c4 k u2) +(CHead e1 k0 u0))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with +[(CSort _) \Rightarrow c4 | (CHead c _ _) \Rightarrow c])) (CHead c4 k u2) +(CHead e1 k0 u0) (drop_gen_refl (CHead c4 k u2) (CHead e1 k0 u0) H3)) in +((let H5 \def (f_equal C K (\lambda (e: C).(match e with [(CSort _) +\Rightarrow k | (CHead _ k1 _) \Rightarrow k1])) (CHead c4 k u2) (CHead e1 k0 +u0) (drop_gen_refl (CHead c4 k u2) (CHead e1 k0 u0) H3)) in ((let H6 \def +(f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u2 | (CHead +_ _ t) \Rightarrow t])) (CHead c4 k u2) (CHead e1 k0 u0) (drop_gen_refl +(CHead c4 k u2) (CHead e1 k0 u0) H3)) in (\lambda (H7: (eq K k k0)).(\lambda +(H8: (eq C c4 e1)).(eq_ind K k (\lambda (k1: K).(ex3_2 C T (\lambda (e2: +C).(\lambda (u3: T).(drop O O (CHead c3 k u1) (CHead e2 k1 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u3 u0))))) (eq_ind T u2 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda +(u3: T).(drop O O (CHead c3 k u1) (CHead e2 k u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 +t))))) (eq_ind C c4 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(drop O O (CHead c3 k u1) (CHead e2 k u3)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 e2 c))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))))) +(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u1) +(CHead e2 k u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c4))) (\lambda +(_: C).(\lambda (u3: T).(pr0 u3 u2))) c3 u1 (drop_refl (CHead c3 k u1)) H0 +H2) e1 H8) u0 H6) k0 H7)))) H5)) H4)))))) (K_ind (\lambda (k0: K).(\forall +(n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop n O +(CHead c4 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda +(u4: T).(drop n O (CHead c3 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 +u3))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop (S +n) O (CHead c4 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(drop (S n) O (CHead c3 k0 u1) (CHead e2 k1 u4)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda +(u4: T).(pr0 u4 u3))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: +((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c4 +(Bind b) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: +T).(drop n O (CHead c3 (Bind b) u1) (CHead e2 k0 u4)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 +u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(drop (S n) O (CHead c4 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 +u0 k0 (drop_gen_drop (Bind b) c4 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T +(\lambda (e2: C).(\lambda (u3: T).(drop n O c3 (CHead e2 k0 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 +(Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 +e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H6: (drop n O c3 (CHead x0 k0 x1))).(\lambda +(H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: +C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Bind b) u1) (CHead e2 k0 u3)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda +(u3: T).(pr0 u3 u0))) x0 x1 (drop_drop (Bind b) n c3 (CHead x0 k0 x1) H6 u1) +H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: +((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c4 +(Flat f) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: +T).(drop n O (CHead c3 (Flat f) u1) (CHead e2 k0 u4)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 +u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(drop (S n) O (CHead c4 (Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 (S +n) e1 u0 k0 (drop_gen_drop (Flat f) c4 (CHead e1 k0 u0) u2 n H4)) in +(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c3 (CHead e2 +k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(drop (S n) O (CHead c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 +u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (drop (S n) O c3 +(CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 +u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead +c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 +e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (drop_drop +(Flat f) n c3 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) k) h)))))))))) +c2 c1 H))). + +lemma wcpr0_getl: + \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (h: +nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c1 (CHead e1 +k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c2 (CHead e2 +k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u1 u2))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall +(u1: T).(\forall (k: K).((getl h c (CHead e1 k u1)) \to (ex3_2 C T (\lambda +(e2: C).(\lambda (u2: T).(getl h c0 (CHead e2 k u2)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 +u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda +(u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k +u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 +k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl +u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 +c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: +T).(\forall (k: K).((getl h c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u2: T).(getl h c4 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda +(_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 +u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 +u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall +(e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c3 k u1) (CHead e1 +k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c4 k +u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) +(\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: +C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c3 k u1) +(CHead e1 k0 u0))).(K_ind (\lambda (k1: K).((clear (CHead c3 k1 u1) (CHead e1 +k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 k1 +u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))))) (\lambda (b: B).(\lambda +(H4: (clear (CHead c3 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (f_equal C +C (\lambda (e: C).(match e with [(CSort _) \Rightarrow e1 | (CHead c _ _) +\Rightarrow c])) (CHead e1 k0 u0) (CHead c3 (Bind b) u1) (clear_gen_bind b c3 +(CHead e1 k0 u0) u1 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match +e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead e1 +k0 u0) (CHead c3 (Bind b) u1) (clear_gen_bind b c3 (CHead e1 k0 u0) u1 H4)) +in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c3 +(Bind b) u1) (clear_gen_bind b c3 (CHead e1 k0 u0) u1 H4)) in (\lambda (H8: +(eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c3)).(eq_ind_r K (Bind b) (\lambda +(k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind +b) u2) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))))) (eq_ind_r T u1 (\lambda (t: +T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind b) +u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 +e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 t u3))))) (eq_ind_r C c3 (\lambda +(c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind +b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c +e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))) (ex3_2_intro C T +(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Bind b) u2) (CHead e2 +(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c3 e2))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u1 u3))) c4 u2 (getl_refl b c4 u2) H0 H2) e1 H9) u0 +H7) k0 H8)))) H6)) H5)))) (\lambda (f: F).(\lambda (H4: (clear (CHead c3 +(Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c3 +(CHead e1 k0 u0) c3 (drop_refl c3) (clear_gen_flat f c3 (CHead e1 k0 u0) u1 +H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c4 (CHead +e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(getl O (CHead c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 +u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c4 (CHead x0 +k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro +C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c4 (Flat f) u2) (CHead +e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_flat c4 (CHead x0 k0 x1) O H6 f +u2) H7 H8)))))) H5)))) k (getl_gen_O (CHead c3 k u1) (CHead e1 k0 u0) +H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: +C).(\forall (u3: T).(\forall (k1: K).((getl n (CHead c3 k0 u1) (CHead e1 k1 +u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c4 k0 +u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) +(\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) \to (\forall (e1: +C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c3 k0 u1) (CHead e1 +k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead +c4 k0 u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 +e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))))) (\lambda (b: +B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall +(k0: K).((getl n (CHead c3 (Bind b) u1) (CHead e1 k0 u3)) \to (ex3_2 C T +(\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c4 (Bind b) u2) (CHead e2 k0 +u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u4: T).(pr0 u3 u4)))))))))).(\lambda (e1: C).(\lambda (u0: +T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c3 (Bind b) u1) (CHead +e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c3 (CHead e1 k0 +u0) u1 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c4 +(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda +(_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda +(u3: T).(getl (S n) (CHead c4 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 +u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c4 (CHead x0 +k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro +C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c4 (Bind b) u2) +(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda +(_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Bind b) n c4 (CHead +x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: +nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl +n (CHead c3 (Flat f) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(getl n (CHead c4 (Flat f) u2) (CHead e2 k0 u4)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda +(u4: T).(pr0 u3 u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: +K).(\lambda (H4: (getl (S n) (CHead c3 (Flat f) u1) (CHead e1 k0 u0))).(let +H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c3 (CHead e1 k0 u0) u1 n H4)) +in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c4 (CHead e2 +k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(getl (S n) (CHead c4 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 +u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c4 (CHead +x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 +x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c4 +(Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 +e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Flat +f) n c4 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) k) h)))))))))) c1 c2 +H))). + +lemma wcpr0_getl_back: + \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (h: +nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c1 (CHead e1 +k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c2 (CHead e2 +k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u2 u1))))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall +(u1: T).(\forall (k: K).((getl h c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda +(e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 +u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda +(u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k +u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 +k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl +u1)))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wcpr0 c3 +c4)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: +T).(\forall (k: K).((getl h c4 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u2: T).(getl h c3 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda +(_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 +u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 +u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall +(e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c4 k u2) (CHead e1 +k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k +u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) +(\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: +C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c4 k u2) +(CHead e1 k0 u0))).(K_ind (\lambda (k1: K).((clear (CHead c4 k1 u2) (CHead e1 +k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 k1 +u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))))) (\lambda (b: B).(\lambda +(H4: (clear (CHead c4 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (f_equal C +C (\lambda (e: C).(match e with [(CSort _) \Rightarrow e1 | (CHead c _ _) +\Rightarrow c])) (CHead e1 k0 u0) (CHead c4 (Bind b) u2) (clear_gen_bind b c4 +(CHead e1 k0 u0) u2 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match +e with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead e1 +k0 u0) (CHead c4 (Bind b) u2) (clear_gen_bind b c4 (CHead e1 k0 u0) u2 H4)) +in ((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c4 +(Bind b) u2) (clear_gen_bind b c4 (CHead e1 k0 u0) u2 H4)) in (\lambda (H8: +(eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c4)).(eq_ind_r K (Bind b) (\lambda +(k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind +b) u1) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))))) (eq_ind_r T u2 (\lambda (t: +T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) +u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 +e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 t))))) (eq_ind_r C c4 (\lambda +(c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind +b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 +c))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))))) (ex3_2_intro C T +(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u1) (CHead e2 +(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c4))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u3 u2))) c3 u1 (getl_refl b c3 u1) H0 H2) e1 H9) u0 +H7) k0 H8)))) H6)) H5)))) (\lambda (f: F).(\lambda (H4: (clear (CHead c4 +(Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c4 +(CHead e1 k0 u0) c4 (drop_refl c4) (clear_gen_flat f c4 (CHead e1 k0 u0) u2 +H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c3 (CHead +e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(getl O (CHead c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 +u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c3 (CHead x0 +k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro +C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) u1) (CHead +e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_flat c3 (CHead x0 k0 x1) O H6 f +u1) H7 H8)))))) H5)))) k (getl_gen_O (CHead c4 k u2) (CHead e1 k0 u0) +H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: +C).(\forall (u3: T).(\forall (k1: K).((getl n (CHead c4 k0 u2) (CHead e1 k1 +u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k0 +u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) +(\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) \to (\forall (e1: +C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c4 k0 u2) (CHead e1 +k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead +c3 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 +e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))))) (\lambda (b: +B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall +(k0: K).((getl n (CHead c4 (Bind b) u2) (CHead e1 k0 u3)) \to (ex3_2 C T +(\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 (Bind b) u1) (CHead e2 k0 +u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u4: T).(pr0 u4 u3)))))))))).(\lambda (e1: C).(\lambda (u0: +T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c4 (Bind b) u2) (CHead +e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c4 (CHead e1 k0 +u0) u2 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c3 +(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda +(_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda +(u3: T).(getl (S n) (CHead c3 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 +u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c3 (CHead x0 +k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro +C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u1) +(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda +(_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Bind b) n c3 (CHead +x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: +nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl +n (CHead c4 (Flat f) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(getl n (CHead c3 (Flat f) u1) (CHead e2 k0 u4)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda +(u4: T).(pr0 u4 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: +K).(\lambda (H4: (getl (S n) (CHead c4 (Flat f) u2) (CHead e1 k0 u0))).(let +H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c4 (CHead e1 k0 u0) u2 n H4)) +in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c3 (CHead e2 +k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: +C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(getl (S n) (CHead c3 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 +u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c3 (CHead +x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 +u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 +(Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 +e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Flat +f) n c3 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) k) h)))))))))) c2 c1 +H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wf3/clear.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/clear.ma new file mode 100644 index 000000000..09abc1f78 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/clear.ma @@ -0,0 +1,87 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/wf3/fwd.ma". + +include "basic_1A/clear/fwd.ma". + +lemma wf3_clear_conf: + \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (g: G).(\forall +(c2: C).((wf3 g c1 c2) \to (wf3 g c c2)))))) +\def + \lambda (c1: C).(\lambda (c: C).(\lambda (H: (clear c1 c)).(clear_ind +(\lambda (c0: C).(\lambda (c2: C).(\forall (g: G).(\forall (c3: C).((wf3 g c0 +c3) \to (wf3 g c2 c3)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: +T).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) +c2)).H0)))))) (\lambda (e: C).(\lambda (c0: C).(\lambda (_: (clear e +c0)).(\lambda (H1: ((\forall (g: G).(\forall (c2: C).((wf3 g e c2) \to (wf3 g +c0 c2)))))).(\lambda (f: F).(\lambda (u: T).(\lambda (g: G).(\lambda (c2: +C).(\lambda (H2: (wf3 g (CHead e (Flat f) u) c2)).(let H_y \def +(wf3_gen_flat1 g e c2 u f H2) in (H1 g c2 H_y))))))))))) c1 c H))). + +lemma clear_wf3_trans: + \forall (c1: C).(\forall (d1: C).((clear c1 d1) \to (\forall (g: G).(\forall +(d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda +(c2: C).(clear c2 d2)))))))) +\def + \lambda (c1: C).(\lambda (d1: C).(\lambda (H: (clear c1 d1)).(clear_ind +(\lambda (c: C).(\lambda (c0: C).(\forall (g: G).(\forall (d2: C).((wf3 g c0 +d2) \to (ex2 C (\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(clear c2 +d2)))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (g: +G).(\lambda (d2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) d2)).(let H_x +\def (wf3_gen_bind1 g e d2 u b H0) in (let H1 \def H_x in (or_ind (ex3_2 C T +(\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda +(c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g +e u w)))) (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) +(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) +\to False)))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) +(\lambda (c2: C).(clear c2 d2))) (\lambda (H2: (ex3_2 C T (\lambda (c2: +C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda (c2: +C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g e u +w))))).(ex3_2_ind C T (\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 +(Bind b) u)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: +C).(\lambda (w: T).(ty3 g e u w))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e +(Bind b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H3: (eq C d2 (CHead x0 (Bind b) u))).(\lambda (H4: (wf3 g e +x0)).(\lambda (H5: (ty3 g e u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda +(c: C).(ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: +C).(clear c2 c)))) (ex_intro2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) +c2)) (\lambda (c2: C).(clear c2 (CHead x0 (Bind b) u))) (CHead x0 (Bind b) u) +(wf3_bind g e x0 H4 u x1 H5 b) (clear_bind b x0 u)) d2 H3)))))) H2)) (\lambda +(H2: (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O)))) +(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w) +\to False))))).(ex3_ind C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) +(TSort O)))) (\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: +T).((ty3 g e u w) \to False))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind +b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda (H3: +(eq C d2 (CHead x0 (Bind Void) (TSort O)))).(\lambda (H4: (wf3 g e +x0)).(\lambda (H5: ((\forall (w: T).((ty3 g e u w) \to False)))).(eq_ind_r C +(CHead x0 (Bind Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (c2: C).(wf3 +g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 c)))) (ex_intro2 C +(\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 +(CHead x0 (Bind Void) (TSort O)))) (CHead x0 (Bind Void) (TSort O)) (wf3_void +g e x0 H4 u H5 b) (clear_bind Void x0 (TSort O))) d2 H3))))) H2)) H1))))))))) +(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1: +((\forall (g: G).(\forall (d2: C).((wf3 g c d2) \to (ex2 C (\lambda (c2: +C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)))))))).(\lambda (f: +F).(\lambda (u: T).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g c +d2)).(let H_x \def (H1 g d2 H2) in (let H3 \def H_x in (ex2_ind C (\lambda +(c2: C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)) (ex2 C (\lambda (c2: +C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda +(x: C).(\lambda (H4: (wf3 g e x)).(\lambda (H5: (clear x d2)).(ex_intro2 C +(\lambda (c2: C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 +d2)) x (wf3_flat g e x H4 u f) H5)))) H3)))))))))))) c1 d1 H))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wf3/defs.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/defs.ma new file mode 100644 index 000000000..263f236df --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/defs.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/ty3/defs.ma". + +inductive wf3 (g: G): C \to (C \to Prop) \def +| wf3_sort: \forall (m: nat).(wf3 g (CSort m) (CSort m)) +| wf3_bind: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: +T).(\forall (t: T).((ty3 g c1 u t) \to (\forall (b: B).(wf3 g (CHead c1 (Bind +b) u) (CHead c2 (Bind b) u)))))))) +| wf3_void: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: +T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(wf3 g +(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)))))))) +| wf3_flat: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: +T).(\forall (f: F).(wf3 g (CHead c1 (Flat f) u) c2))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wf3/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/fwd.ma new file mode 100644 index 000000000..972e33fbb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/fwd.ma @@ -0,0 +1,377 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/wf3/defs.ma". + +implied rec lemma wf3_ind (g: G) (P: (C \to (C \to Prop))) (f: (\forall (m: +nat).(P (CSort m) (CSort m)))) (f0: (\forall (c1: C).(\forall (c2: C).((wf3 g +c1 c2) \to ((P c1 c2) \to (\forall (u: T).(\forall (t: T).((ty3 g c1 u t) \to +(\forall (b: B).(P (CHead c1 (Bind b) u) (CHead c2 (Bind b) u))))))))))) (f1: +(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to ((P c1 c2) \to (\forall +(u: T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(P +(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O))))))))))) (f2: (\forall +(c1: C).(\forall (c2: C).((wf3 g c1 c2) \to ((P c1 c2) \to (\forall (u: +T).(\forall (f2: F).(P (CHead c1 (Flat f2) u) c2)))))))) (c: C) (c0: C) (w: +wf3 g c c0) on w: P c c0 \def match w with [(wf3_sort m) \Rightarrow (f m) | +(wf3_bind c1 c2 w0 u t t0 b) \Rightarrow (f0 c1 c2 w0 ((wf3_ind g P f f0 f1 +f2) c1 c2 w0) u t t0 b) | (wf3_void c1 c2 w0 u f3 b) \Rightarrow (f1 c1 c2 w0 +((wf3_ind g P f f0 f1 f2) c1 c2 w0) u f3 b) | (wf3_flat c1 c2 w0 u f3) +\Rightarrow (f2 c1 c2 w0 ((wf3_ind g P f f0 f1 f2) c1 c2 w0) u f3)]. + +lemma wf3_gen_sort1: + \forall (g: G).(\forall (x: C).(\forall (m: nat).((wf3 g (CSort m) x) \to +(eq C x (CSort m))))) +\def + \lambda (g: G).(\lambda (x: C).(\lambda (m: nat).(\lambda (H: (wf3 g (CSort +m) x)).(insert_eq C (CSort m) (\lambda (c: C).(wf3 g c x)) (\lambda (c: +C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda +(c: C).(\lambda (c0: C).((eq C c (CSort m)) \to (eq C c0 c)))) (\lambda (m0: +nat).(\lambda (H1: (eq C (CSort m0) (CSort m))).(let H2 \def (f_equal C nat +(\lambda (e: C).(match e with [(CSort n) \Rightarrow n | (CHead _ _ _) +\Rightarrow m0])) (CSort m0) (CSort m) H1) in (eq_ind_r nat m (\lambda (n: +nat).(eq C (CSort n) (CSort n))) (refl_equal C (CSort m)) m0 H2)))) (\lambda +(c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1 c2)).(\lambda (_: (((eq C c1 +(CSort m)) \to (eq C c2 c1)))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: +(ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) +(CSort m))).(let H5 \def (eq_ind C (CHead c1 (Bind b) u) (\lambda (ee: +C).(match ee with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow +True])) I (CSort m) H4) in (False_ind (eq C (CHead c2 (Bind b) u) (CHead c1 +(Bind b) u)) H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: +(wf3 g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 +c1)))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u t) \to +False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CSort +m))).(let H5 \def (eq_ind C (CHead c1 (Bind b) u) (\lambda (ee: C).(match ee +with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I +(CSort m) H4) in (False_ind (eq C (CHead c2 (Bind Void) (TSort O)) (CHead c1 +(Bind b) u)) H5)))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 +g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u: +T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 (Flat f) u) (CSort m))).(let +H4 \def (eq_ind C (CHead c1 (Flat f) u) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort m) +H3) in (False_ind (eq C c2 (CHead c1 (Flat f) u)) H4))))))))) y x H0))) H)))). + +lemma wf3_gen_bind1: + \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (b: +B).((wf3 g (CHead c1 (Bind b) v) x) \to (or (ex3_2 C T (\lambda (c2: +C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda +(_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 +C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2: +C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to +False)))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (b: +B).(\lambda (H: (wf3 g (CHead c1 (Bind b) v) x)).(insert_eq C (CHead c1 (Bind +b) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(or (ex3_2 C T (\lambda +(c2: C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: +C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 +v w)))) (ex3 C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) +(\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v +w) \to False)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g +(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead c1 (Bind b) v)) \to (or +(ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C c0 (CHead c2 (Bind b) v)))) +(\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C c0 (CHead c2 (Bind Void) +(TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: +T).((ty3 g c1 v w) \to False)))))))) (\lambda (m: nat).(\lambda (H1: (eq C +(CSort m) (CHead c1 (Bind b) v))).(let H2 \def (eq_ind C (CSort m) (\lambda +(ee: C).(match ee with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead c1 (Bind b) v) H1) in (False_ind (or (ex3_2 C T +(\lambda (c2: C).(\lambda (_: T).(eq C (CSort m) (CHead c2 (Bind b) v)))) +(\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C (CSort m) (CHead c2 (Bind +Void) (TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall +(w: T).((ty3 g c1 v w) \to False))))) H2)))) (\lambda (c0: C).(\lambda (c2: +C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Bind b) +v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 +(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead +c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: +C).(\forall (w: T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda +(t: T).(\lambda (H3: (ty3 g c0 u t)).(\lambda (b0: B).(\lambda (H4: (eq C +(CHead c0 (Bind b0) u) (CHead c1 (Bind b) v))).(let H5 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) +\Rightarrow c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H6 +\def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 | +(CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) +\Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let +H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t0) \Rightarrow t0])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) +H4) in (\lambda (H8: (eq B b0 b)).(\lambda (H9: (eq C c0 c1)).(eq_ind_r B b +(\lambda (b1: B).(or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead +c2 (Bind b1) u) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: +T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C +(\lambda (c3: C).(eq C (CHead c2 (Bind b1) u) (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g +c1 v w) \to False)))))) (let H10 \def (eq_ind T u (\lambda (t0: T).(ty3 g c0 +t0 t)) H3 v H7) in (eq_ind_r T v (\lambda (t0: T).(or (ex3_2 C T (\lambda +(c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) t0) (CHead c3 (Bind b) v)))) +(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) t0) +(CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda +(_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))))) (let H11 \def (eq_ind +C c0 (\lambda (c: C).(ty3 g c v t)) H10 c1 H9) in (let H12 \def (eq_ind C c0 +(\lambda (c: C).((eq C c (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda +(c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 +v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) +(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v +w) \to False))))))) H2 c1 H9) in (let H13 \def (eq_ind C c0 (\lambda (c: +C).(wf3 g c c2)) H1 c1 H9) in (or_introl (ex3_2 C T (\lambda (c3: C).(\lambda +(_: T).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind b) v)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 +v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind +Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall +(w: T).((ty3 g c1 v w) \to False)))) (ex3_2_intro C T (\lambda (c3: +C).(\lambda (_: T).(eq C (CHead c2 (Bind b) v) (CHead c3 (Bind b) v)))) +(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w))) c2 t (refl_equal C (CHead c2 (Bind b) v)) H13 H11))))) u +H7)) b0 H8)))) H6)) H5))))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda +(H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Bind b) v)) \to (or +(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) +(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) +(TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: +T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda (H3: ((\forall +(t: T).((ty3 g c0 u t) \to False)))).(\lambda (b0: B).(\lambda (H4: (eq C +(CHead c0 (Bind b0) u) (CHead c1 (Bind b) v))).(let H5 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c0 | (CHead c _ _) +\Rightarrow c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H6 +\def (f_equal C B (\lambda (e: C).(match e with [(CSort _) \Rightarrow b0 | +(CHead _ k _) \Rightarrow (match k with [(Bind b1) \Rightarrow b1 | (Flat _) +\Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let +H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) \Rightarrow u | +(CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) +H4) in (\lambda (_: (eq B b0 b)).(\lambda (H9: (eq C c0 c1)).(let H10 \def +(eq_ind T u (\lambda (t: T).(\forall (t0: T).((ty3 g c0 t t0) \to False))) H3 +v H7) in (let H11 \def (eq_ind C c0 (\lambda (c: C).(\forall (t: T).((ty3 g c +v t) \to False))) H10 c1 H9) in (let H12 \def (eq_ind C c0 (\lambda (c: +C).((eq C c (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3: +C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 +v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) +(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v +w) \to False))))))) H2 c1 H9) in (let H13 \def (eq_ind C c0 (\lambda (c: +C).(wf3 g c c2)) H1 c1 H9) in (or_intror (ex3_2 C T (\lambda (c3: C).(\lambda +(_: T).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind b) v)))) +(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: +T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind Void) +(TSort O)) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) +(\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))) (ex3_intro C +(\lambda (c3: C).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind Void) +(TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: +T).((ty3 g c1 v w) \to False))) c2 (refl_equal C (CHead c2 (Bind Void) (TSort +O))) H13 H11))))))))) H6)) H5)))))))))) (\lambda (c0: C).(\lambda (c2: +C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Bind b) v)) +\to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind +b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead +c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: +C).(\forall (w: T).((ty3 g c1 v w) \to False)))))))).(\lambda (u: T).(\lambda +(f: F).(\lambda (H3: (eq C (CHead c0 (Flat f) u) (CHead c1 (Bind b) v))).(let +H4 \def (eq_ind C (CHead c0 (Flat f) u) (\lambda (ee: C).(match ee with +[(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind +_) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead c1 (Bind b) v) +H3) in (False_ind (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 +(CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) +(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq +C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) +(\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))))) H4))))))))) y +x H0))) H)))))). + +lemma wf3_gen_flat1: + \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (f: +F).((wf3 g (CHead c1 (Flat f) v) x) \to (wf3 g c1 x)))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (f: +F).(\lambda (H: (wf3 g (CHead c1 (Flat f) v) x)).(insert_eq C (CHead c1 (Flat +f) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(wf3 g c1 x)) (\lambda (y: +C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda (c: C).(\lambda (c0: +C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c0)))) (\lambda (m: +nat).(\lambda (H1: (eq C (CSort m) (CHead c1 (Flat f) v))).(let H2 \def +(eq_ind C (CSort m) (\lambda (ee: C).(match ee with [(CSort _) \Rightarrow +True | (CHead _ _ _) \Rightarrow False])) I (CHead c1 (Flat f) v) H1) in +(False_ind (wf3 g c1 (CSort m)) H2)))) (\lambda (c0: C).(\lambda (c2: +C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Flat f) v)) +\to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u +t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) (CHead c1 (Flat +f) v))).(let H5 \def (eq_ind C (CHead c0 (Bind b) u) (\lambda (ee: C).(match +ee with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k +with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead c1 +(Flat f) v) H4) in (False_ind (wf3 g c1 (CHead c2 (Bind b) u)) H5))))))))))) +(\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: +(((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u: +T).(\lambda (_: ((\forall (t: T).((ty3 g c0 u t) \to False)))).(\lambda (b: +B).(\lambda (H4: (eq C (CHead c0 (Bind b) u) (CHead c1 (Flat f) v))).(let H5 +\def (eq_ind C (CHead c0 (Bind b) u) (\lambda (ee: C).(match ee with [(CSort +_) \Rightarrow False | (CHead _ k _) \Rightarrow (match k with [(Bind _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead c1 (Flat f) v) +H4) in (False_ind (wf3 g c1 (CHead c2 (Bind Void) (TSort O))) H5)))))))))) +(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: +(((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u: +T).(\lambda (f0: F).(\lambda (H3: (eq C (CHead c0 (Flat f0) u) (CHead c1 +(Flat f) v))).(let H4 \def (f_equal C C (\lambda (e: C).(match e with [(CSort +_) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Flat f0) u) +(CHead c1 (Flat f) v) H3) in ((let H5 \def (f_equal C F (\lambda (e: +C).(match e with [(CSort _) \Rightarrow f0 | (CHead _ k _) \Rightarrow (match +k with [(Bind _) \Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead c0 +(Flat f0) u) (CHead c1 (Flat f) v) H3) in ((let H6 \def (f_equal C T (\lambda +(e: C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow +t])) (CHead c0 (Flat f0) u) (CHead c1 (Flat f) v) H3) in (\lambda (_: (eq F +f0 f)).(\lambda (H8: (eq C c0 c1)).(let H9 \def (eq_ind C c0 (\lambda (c: +C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c2))) H2 c1 H8) in (let H10 +\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H8) in H10))))) H5)) +H4))))))))) y x H0))) H)))))). + +lemma wf3_gen_head2: + \forall (g: G).(\forall (x: C).(\forall (c: C).(\forall (v: T).(\forall (k: +K).((wf3 g x (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))))) +\def + \lambda (g: G).(\lambda (x: C).(\lambda (c: C).(\lambda (v: T).(\lambda (k: +K).(\lambda (H: (wf3 g x (CHead c k v))).(insert_eq C (CHead c k v) (\lambda +(c0: C).(wf3 g x c0)) (\lambda (_: C).(ex B (\lambda (b: B).(eq K k (Bind +b))))) (\lambda (y: C).(\lambda (H0: (wf3 g x y)).(wf3_ind g (\lambda (_: +C).(\lambda (c1: C).((eq C c1 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K +k (Bind b))))))) (\lambda (m: nat).(\lambda (H1: (eq C (CSort m) (CHead c k +v))).(let H2 \def (eq_ind C (CSort m) (\lambda (ee: C).(match ee with [(CSort +_) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c k v) H1) +in (False_ind (ex B (\lambda (b: B).(eq K k (Bind b)))) H2)))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2 +(CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (u: +T).(\lambda (t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda +(H4: (eq C (CHead c2 (Bind b) u) (CHead c k v))).(let H5 \def (f_equal C C +(\lambda (e: C).(match e with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in ((let H6 \def +(f_equal C K (\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind b) | +(CHead _ k0 _) \Rightarrow k0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in +((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u) (CHead +c k v) H4) in (\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c2 +c)).(let H10 \def (eq_ind T u (\lambda (t0: T).(ty3 g c1 t0 t)) H3 v H7) in +(let H11 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex +B (\lambda (b0: B).(eq K k (Bind b0)))))) H2 c H9) in (let H12 \def (eq_ind C +c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let H13 \def (eq_ind_r K k +(\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B (\lambda (b0: B).(eq K k0 +(Bind b0)))))) H11 (Bind b) H8) in (eq_ind K (Bind b) (\lambda (k0: K).(ex B +(\lambda (b0: B).(eq K k0 (Bind b0))))) (ex_intro B (\lambda (b0: B).(eq K +(Bind b) (Bind b0))) b (refl_equal K (Bind b))) k H8)))))))) H6)) +H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 +c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K +k (Bind b))))))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u +t) \to False)))).(\lambda (_: B).(\lambda (H4: (eq C (CHead c2 (Bind Void) +(TSort O)) (CHead c k v))).(let H5 \def (f_equal C C (\lambda (e: C).(match e +with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 +(Bind Void) (TSort O)) (CHead c k v) H4) in ((let H6 \def (f_equal C K +(\lambda (e: C).(match e with [(CSort _) \Rightarrow (Bind Void) | (CHead _ +k0 _) \Rightarrow k0])) (CHead c2 (Bind Void) (TSort O)) (CHead c k v) H4) in +((let H7 \def (f_equal C T (\lambda (e: C).(match e with [(CSort _) +\Rightarrow (TSort O) | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind Void) +(TSort O)) (CHead c k v) H4) in (\lambda (H8: (eq K (Bind Void) k)).(\lambda +(H9: (eq C c2 c)).(let H10 \def (eq_ind C c2 (\lambda (c0: C).((eq C c0 +(CHead c k v)) \to (ex B (\lambda (b0: B).(eq K k (Bind b0)))))) H2 c H9) in +(let H11 \def (eq_ind C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let +H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B +(\lambda (b0: B).(eq K k0 (Bind b0)))))) H10 (Bind Void) H8) in (eq_ind K +(Bind Void) (\lambda (k0: K).(ex B (\lambda (b0: B).(eq K k0 (Bind b0))))) +(let H13 \def (eq_ind_r T v (\lambda (t: T).((eq C c (CHead c (Bind Void) t)) +\to (ex B (\lambda (b0: B).(eq K (Bind Void) (Bind b0)))))) H12 (TSort O) H7) +in (ex_intro B (\lambda (b0: B).(eq K (Bind Void) (Bind b0))) Void +(refl_equal K (Bind Void)))) k H8))))))) H6)) H5)))))))))) (\lambda (c1: +C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2 +(CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (_: +T).(\lambda (_: F).(\lambda (H3: (eq C c2 (CHead c k v))).(let H4 \def +(f_equal C C (\lambda (e: C).e) c2 (CHead c k v) H3) in (let H5 \def (eq_ind +C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b: B).(eq +K k (Bind b)))))) H2 (CHead c k v) H4) in (let H6 \def (eq_ind C c2 (\lambda +(c0: C).(wf3 g c1 c0)) H1 (CHead c k v) H4) in (H5 (refl_equal C (CHead c k +v))))))))))))) x y H0))) H)))))). + +theorem wf3_mono: + \forall (g: G).(\forall (c: C).(\forall (c1: C).((wf3 g c c1) \to (\forall +(c2: C).((wf3 g c c2) \to (eq C c1 c2)))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (c1: C).(\lambda (H: (wf3 g c +c1)).(wf3_ind g (\lambda (c0: C).(\lambda (c2: C).(\forall (c3: C).((wf3 g c0 +c3) \to (eq C c2 c3))))) (\lambda (m: nat).(\lambda (c2: C).(\lambda (H0: +(wf3 g (CSort m) c2)).(let H_y \def (wf3_gen_sort1 g c2 m H0) in (eq_ind_r C +(CSort m) (\lambda (c0: C).(eq C (CSort m) c0)) (refl_equal C (CSort m)) c2 +H_y))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 +c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 +c4))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c2 u +t)).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g (CHead c2 (Bind b) +u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in (let H4 \def H_x in +(or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind +b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq C c0 (CHead +c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: +C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 (Bind b) u) +c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead +c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda +(_: C).(\lambda (w: T).(ty3 g c2 u w))))).(ex3_2_ind C T (\lambda (c4: +C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: +C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 +u w))) (eq C (CHead c3 (Bind b) u) c0) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H6: (eq C c0 (CHead x0 (Bind b) u))).(\lambda (H7: (wf3 g c2 +x0)).(\lambda (_: (ty3 g c2 u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda +(c4: C).(eq C (CHead c3 (Bind b) u) c4)) (f_equal3 C K T C CHead c3 x0 (Bind +b) (Bind b) u u (H1 x0 H7) (refl_equal K (Bind b)) (refl_equal T u)) c0 +H6)))))) H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind +Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall +(w: T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 +(CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda +(_: C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind b) +u) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) (TSort +O)))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: ((\forall (w: T).((ty3 g c2 u +w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c4: +C).(eq C (CHead c3 (Bind b) u) c4)) (let H_x0 \def (H8 t H2) in (let H9 \def +H_x0 in (False_ind (eq C (CHead c3 (Bind b) u) (CHead x0 (Bind Void) (TSort +O))) H9))) c0 H6))))) H5)) H4))))))))))))) (\lambda (c2: C).(\lambda (c3: +C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) +\to (eq C c3 c4))))).(\lambda (u: T).(\lambda (H2: ((\forall (t: T).((ty3 g +c2 u t) \to False)))).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g +(CHead c2 (Bind b) u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in +(let H4 \def H_x in (or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C +c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) +(\lambda (_: C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq +C c0 (CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) +(\lambda (_: C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 +(Bind Void) (TSort O)) c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda +(_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: +T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 u +w))))).(ex3_2_ind C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 +(Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: +C).(\lambda (w: T).(ty3 g c2 u w))) (eq C (CHead c3 (Bind Void) (TSort O)) +c0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c0 (CHead x0 (Bind +b) u))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: (ty3 g c2 u x1)).(eq_ind_r +C (CHead x0 (Bind b) u) (\lambda (c4: C).(eq C (CHead c3 (Bind Void) (TSort +O)) c4)) (let H_x0 \def (H2 x1 H8) in (let H9 \def H_x0 in (False_ind (eq C +(CHead c3 (Bind Void) (TSort O)) (CHead x0 (Bind b) u)) H9))) c0 H6)))))) +H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind Void) +(TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall (w: +T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 (CHead +c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: +C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind Void) +(TSort O)) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) +(TSort O)))).(\lambda (H7: (wf3 g c2 x0)).(\lambda (_: ((\forall (w: T).((ty3 +g c2 u w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda +(c4: C).(eq C (CHead c3 (Bind Void) (TSort O)) c4)) (f_equal3 C K T C CHead +c3 x0 (Bind Void) (Bind Void) (TSort O) (TSort O) (H1 x0 H7) (refl_equal K +(Bind Void)) (refl_equal T (TSort O))) c0 H6))))) H5)) H4)))))))))))) +(\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: +((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 c4))))).(\lambda (u: +T).(\lambda (f: F).(\lambda (c0: C).(\lambda (H2: (wf3 g (CHead c2 (Flat f) +u) c0)).(let H_y \def (wf3_gen_flat1 g c2 c0 u f H2) in (H1 c0 H_y)))))))))) +c c1 H)))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wf3/getl.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/getl.ma new file mode 100644 index 000000000..3b49f4c96 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/getl.ma @@ -0,0 +1,199 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/wf3/clear.ma". + +include "basic_1A/ty3/dec.ma". + +lemma wf3_getl_conf: + \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall +(v: T).((getl i c1 (CHead d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: +C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2))))))))))))) +\def + \lambda (b: B).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: +C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 (Bind b) v)) \to +(\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g +d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind b) v))) +(\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda (c1: C).(\lambda (d1: +C).(\lambda (v: T).(\lambda (H: (getl O c1 (CHead d1 (Bind b) v))).(\lambda +(g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda (w: T).(\lambda +(H1: (ty3 g d1 v w)).(let H_y \def (wf3_clear_conf c1 (CHead d1 (Bind b) v) +(getl_gen_O c1 (CHead d1 (Bind b) v) H) g c2 H0) in (let H_x \def +(wf3_gen_bind1 g d1 c2 v b H_y) in (let H2 \def H_x in (or_ind (ex3_2 C T +(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda +(c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 +g d1 v w0)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 +g d1 v w0) \to False)))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind +b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H3: (ex3_2 C T (\lambda +(c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g d1 +v w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 +(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: +C).(\lambda (w0: T).(ty3 g d1 v w0))) (ex2 C (\lambda (d2: C).(getl O c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind b) v))).(\lambda +(H5: (wf3 g d1 x0)).(\lambda (_: (ty3 g d1 v x1)).(eq_ind_r C (CHead x0 (Bind +b) v) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) +v))) (\lambda (d2: C).(wf3 g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(getl O +(CHead x0 (Bind b) v) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) +x0 (getl_refl b x0 v) H5) c2 H4)))))) H3)) (\lambda (H3: (ex3 C (\lambda (c3: +C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g d1 +c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g d1 v w0) \to +False))))).(ex3_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort +O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3 +g d1 v w0) \to False))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind b) +v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: C).(\lambda (H4: (eq C c2 +(CHead x0 (Bind Void) (TSort O)))).(\lambda (_: (wf3 g d1 x0)).(\lambda (H6: +((\forall (w0: T).((ty3 g d1 v w0) \to False)))).(eq_ind_r C (CHead x0 (Bind +Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 +(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H6 w H1) in +(let H7 \def H_x0 in (False_ind (ex2 C (\lambda (d2: C).(getl O (CHead x0 +(Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2))) H7))) c2 H4))))) H3)) H2))))))))))))) (\lambda (n: nat).(\lambda (H: +((\forall (c1: C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 +(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall +(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind +b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))))).(\lambda (c1: C).(C_ind +(\lambda (c: C).(\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead d1 +(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to (\forall +(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 +(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))) (\lambda (n0: +nat).(\lambda (d1: C).(\lambda (v: T).(\lambda (H0: (getl (S n) (CSort n0) +(CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (wf3 g +(CSort n0) c2)).(\lambda (w: T).(\lambda (_: (ty3 g d1 v w)).(getl_gen_sort +n0 (S n) (CHead d1 (Bind b) v) H0 (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda +(c: C).(\lambda (H0: ((\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead +d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to +(\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))).(\lambda +(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (v: T).(\lambda (H1: (getl +(S n) (CHead c k t) (CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: +C).(\lambda (H2: (wf3 g (CHead c k t) c2)).(\lambda (w: T).(\lambda (H3: (ty3 +g d1 v w)).(K_ind (\lambda (k0: K).((wf3 g (CHead c k0 t) c2) \to ((getl (r +k0 n) c (CHead d1 (Bind b) v)) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))) (\lambda (b0: +B).(\lambda (H4: (wf3 g (CHead c (Bind b0) t) c2)).(\lambda (H5: (getl (r +(Bind b0) n) c (CHead d1 (Bind b) v))).(let H_x \def (wf3_gen_bind1 g c c2 t +b0 H4) in (let H6 \def H_x in (or_ind (ex3_2 C T (\lambda (c3: C).(\lambda +(_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: C).(\lambda (_: +T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t w0)))) (ex3 C +(\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: +C).(wf3 g c c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to +False)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) +(\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H7: (ex3_2 C T (\lambda (c3: +C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: +C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t +w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 +(Bind b0) t)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: +C).(\lambda (w0: T).(ty3 g c t w0))) (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H8: (eq C c2 (CHead x0 (Bind b0) t))).(\lambda +(H9: (wf3 g c x0)).(\lambda (_: (ty3 g c t x1)).(eq_ind_r C (CHead x0 (Bind +b0) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 +(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g +x0 H9 w H3) in (let H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 +(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: +C).(getl (S n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: +C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind +b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S +n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2)) x (getl_head (Bind b0) n x0 (CHead x (Bind b) v) H12 t) H13)))) H11))) +c2 H8)))))) H7)) (\lambda (H7: (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 +(Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) (\lambda (_: +C).(\forall (w0: T).((ty3 g c t w0) \to False))))).(ex3_ind C (\lambda (c3: +C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) +(\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to False))) (ex2 C (\lambda +(d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 +d2))) (\lambda (x0: C).(\lambda (H8: (eq C c2 (CHead x0 (Bind Void) (TSort +O)))).(\lambda (H9: (wf3 g c x0)).(\lambda (_: ((\forall (w0: T).((ty3 g c t +w0) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c0: +C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 (Bind b) v))) (\lambda +(d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g x0 H9 w H3) in (let +H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 (CHead d2 (Bind b) +v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) +(CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: +C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind +b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S +n) (CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: +C).(wf3 g d1 d2)) x (getl_head (Bind Void) n x0 (CHead x (Bind b) v) H12 +(TSort O)) H13)))) H11))) c2 H8))))) H7)) H6)))))) (\lambda (f: F).(\lambda +(H4: (wf3 g (CHead c (Flat f) t) c2)).(\lambda (H5: (getl (r (Flat f) n) c +(CHead d1 (Bind b) v))).(let H_y \def (wf3_gen_flat1 g c c2 t f H4) in (H0 d1 +v H5 g c2 H_y w H3))))) k H2 (getl_gen_S k c (CHead d1 (Bind b) v) t n +H1)))))))))))))) c1)))) i)). + +lemma getl_wf3_trans: + \forall (i: nat).(\forall (c1: C).(\forall (d1: C).((getl i c1 d1) \to +(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: +C).(wf3 g c1 c2)) (\lambda (c2: C).(getl i c2 d2))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: +C).((getl n c1 d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to +(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 +d2)))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (H: (getl O c1 +d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H0: (wf3 g d1 d2)).(let H_x +\def (clear_wf3_trans c1 d1 (getl_gen_O c1 d1 H) g d2 H0) in (let H1 \def H_x +in (ex2_ind C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(clear c2 d2)) +(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 d2))) +(\lambda (x: C).(\lambda (H2: (wf3 g c1 x)).(\lambda (H3: (clear x +d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 +d2)) x H2 (getl_intro O x d2 x (drop_refl x) H3))))) H1))))))))) (\lambda (n: +nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).((getl n c1 d1) \to +(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: +C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 d2))))))))))).(\lambda (c1: +C).(C_ind (\lambda (c: C).(\forall (d1: C).((getl (S n) c d1) \to (\forall +(g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c +c2)) (\lambda (c2: C).(getl (S n) c2 d2))))))))) (\lambda (n0: nat).(\lambda +(d1: C).(\lambda (H0: (getl (S n) (CSort n0) d1)).(\lambda (g: G).(\lambda +(d2: C).(\lambda (_: (wf3 g d1 d2)).(getl_gen_sort n0 (S n) d1 H0 (ex2 C +(\lambda (c2: C).(wf3 g (CSort n0) c2)) (\lambda (c2: C).(getl (S n) c2 +d2)))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).((getl (S n) c +d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda +(c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)))))))))).(\lambda +(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (H1: (getl (S n) (CHead c k +t) d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g d1 d2)).(K_ind +(\lambda (k0: K).((getl (r k0 n) c d1) \to (ex2 C (\lambda (c2: C).(wf3 g +(CHead c k0 t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))))) (\lambda (b: +B).(\lambda (H3: (getl (r (Bind b) n) c d1)).(let H_x \def (H c d1 H3 g d2 +H2) in (let H4 \def H_x in (ex2_ind C (\lambda (c2: C).(wf3 g c c2)) (\lambda +(c2: C).(getl n c2 d2)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) +c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 +g c x)).(\lambda (H6: (getl n x d2)).(let H_x0 \def (ty3_inference g c t) in +(let H7 \def H_x0 in (or_ind (ex T (\lambda (t2: T).(ty3 g c t t2))) (\forall +(t2: T).((ty3 g c t t2) \to False)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c +(Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (H8: (ex T +(\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 g c t t2)) +(ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda (c2: +C).(getl (S n) c2 d2))) (\lambda (x0: T).(\lambda (H9: (ty3 g c t +x0)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda +(c2: C).(getl (S n) c2 d2)) (CHead x (Bind b) t) (wf3_bind g c x H5 t x0 H9 +b) (getl_head (Bind b) n x d2 H6 t)))) H8)) (\lambda (H8: ((\forall (t2: +T).((ty3 g c t t2) \to False)))).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead +c (Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (CHead x (Bind Void) +(TSort O)) (wf3_void g c x H5 t H8 b) (getl_head (Bind Void) n x d2 H6 (TSort +O)))) H7)))))) H4))))) (\lambda (f: F).(\lambda (H3: (getl (r (Flat f) n) c +d1)).(let H_x \def (H0 d1 H3 g d2 H2) in (let H4 \def H_x in (ex2_ind C +(\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (ex2 C +(\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) (\lambda (c2: C).(getl (S +n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 g c x)).(\lambda (H6: (getl (S +n) x d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) +(\lambda (c2: C).(getl (S n) c2 d2)) x (wf3_flat g c x H5 t f) H6)))) H4))))) +k (getl_gen_S k c d1 t n H1))))))))))) c1)))) i). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wf3/props.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/props.ma new file mode 100644 index 000000000..a79898ab3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/props.ma @@ -0,0 +1,153 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/wf3/ty3.ma". + +include "basic_1A/app/defs.ma". + +lemma wf3_total: + \forall (g: G).(\forall (c1: C).(ex C (\lambda (c2: C).(wf3 g c1 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(ex C (\lambda (c2: +C).(wf3 g c c2)))) (\lambda (n: nat).(ex_intro C (\lambda (c2: C).(wf3 g +(CSort n) c2)) (CSort n) (wf3_sort g n))) (\lambda (c: C).(\lambda (H: (ex C +(\lambda (c2: C).(wf3 g c c2)))).(\lambda (k: K).(\lambda (t: T).(let H0 \def +H in (ex_ind C (\lambda (c2: C).(wf3 g c c2)) (ex C (\lambda (c2: C).(wf3 g +(CHead c k t) c2))) (\lambda (x: C).(\lambda (H1: (wf3 g c x)).(K_ind +(\lambda (k0: K).(ex C (\lambda (c2: C).(wf3 g (CHead c k0 t) c2)))) (\lambda +(b: B).(let H_x \def (ty3_inference g c t) in (let H2 \def H_x in (or_ind (ex +T (\lambda (t2: T).(ty3 g c t t2))) (\forall (t2: T).((ty3 g c t t2) \to +False)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda +(H3: (ex T (\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 +g c t t2)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda +(x0: T).(\lambda (H4: (ty3 g c t x0)).(ex_intro C (\lambda (c2: C).(wf3 g +(CHead c (Bind b) t) c2)) (CHead x (Bind b) t) (wf3_bind g c x H1 t x0 H4 +b)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c t t2) \to +False)))).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) +(CHead x (Bind Void) (TSort O)) (wf3_void g c x H1 t H3 b))) H2)))) (\lambda +(f: F).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) x +(wf3_flat g c x H1 t f))) k))) H0)))))) c1)). + +lemma ty3_shift1: + \forall (g: G).(\forall (c: C).((wf3 g c c) \to (\forall (t1: T).(\forall +(t2: T).((ty3 g c t1 t2) \to (ty3 g (CSort (cbk c)) (app1 c t1) (app1 c +t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (H: (wf3 g c c)).(insert_eq C c +(\lambda (c0: C).(wf3 g c0 c)) (\lambda (c0: C).(\forall (t1: T).(\forall +(t2: T).((ty3 g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 +t2)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y c)).(wf3_ind g (\lambda (c0: +C).(\lambda (c1: C).((eq C c0 c1) \to (\forall (t1: T).(\forall (t2: T).((ty3 +g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 t2)))))))) +(\lambda (m: nat).(\lambda (_: (eq C (CSort m) (CSort m))).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H2: (ty3 g (CSort m) t1 t2)).H2))))) (\lambda +(c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C +c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (ty3 g +(CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u: T).(\lambda +(t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C +(CHead c1 (Bind b) u) (CHead c2 (Bind b) u))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H5: (ty3 g (CHead c1 (Bind b) u) t1 t2)).(let H6 \def (f_equal C +C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c1 (Bind b) u) (CHead c2 (Bind b) u) H4) in (let H7 +\def (eq_ind_r C c2 (\lambda (c0: C).((eq C c1 c0) \to (\forall (t3: +T).(\forall (t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort (cbk c1)) (app1 c1 +t3) (app1 c1 t4))))))) H2 c1 H6) in (let H8 \def (eq_ind_r C c2 (\lambda (c0: +C).(wf3 g c1 c0)) H1 c1 H6) in (ex_ind T (\lambda (t0: T).(ty3 g (CHead c1 +(Bind b) u) t2 t0)) (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Bind b) u t1)) +(app1 c1 (THead (Bind b) u t2))) (\lambda (x: T).(\lambda (_: (ty3 g (CHead +c1 (Bind b) u) t2 x)).(H7 (refl_equal C c1) (THead (Bind b) u t1) (THead +(Bind b) u t2) (ty3_bind g c1 u t H3 b t1 t2 H5)))) (ty3_correct g (CHead c1 +(Bind b) u) t1 t2 H5))))))))))))))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c1 c2) \to (\forall +(t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (ty3 g (CSort (cbk c1)) (app1 +c1 t1) (app1 c1 t2)))))))).(\lambda (u: T).(\lambda (H3: ((\forall (t: +T).((ty3 g c1 u t) \to False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead +c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)))).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (H5: (ty3 g (CHead c1 (Bind b) u) t1 t2)).(let H6 \def +(f_equal C C (\lambda (e: C).(match e with [(CSort _) \Rightarrow c1 | (CHead +c0 _ _) \Rightarrow c0])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort +O)) H4) in ((let H7 \def (f_equal C B (\lambda (e: C).(match e with [(CSort +_) \Rightarrow b | (CHead _ k _) \Rightarrow (match k with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 +(Bind Void) (TSort O)) H4) in ((let H8 \def (f_equal C T (\lambda (e: +C).(match e with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) +(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) H4) in (\lambda (H9: +(eq B b Void)).(\lambda (H10: (eq C c1 c2)).(let H11 \def (eq_ind B b +(\lambda (b0: B).(ty3 g (CHead c1 (Bind b0) u) t1 t2)) H5 Void H9) in +(eq_ind_r B Void (\lambda (b0: B).(ty3 g (CSort (cbk (CHead c1 (Bind b0) u))) +(app1 (CHead c1 (Bind b0) u) t1) (app1 (CHead c1 (Bind b0) u) t2))) (let H12 +\def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) t) t1 t2)) H11 +(TSort O) H8) in (let H13 \def (eq_ind T u (\lambda (t: T).(\forall (t0: +T).((ty3 g c1 t t0) \to False))) H3 (TSort O) H8) in (eq_ind_r T (TSort O) +(\lambda (t: T).(ty3 g (CSort (cbk (CHead c1 (Bind Void) t))) (app1 (CHead c1 +(Bind Void) t) t1) (app1 (CHead c1 (Bind Void) t) t2))) (let H14 \def +(eq_ind_r C c2 (\lambda (c0: C).((eq C c1 c0) \to (\forall (t3: T).(\forall +(t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1 +t4))))))) H2 c1 H10) in (let H15 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g +c1 c0)) H1 c1 H10) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) +(TSort O)) t2 t)) (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Bind Void) (TSort +O) t1)) (app1 c1 (THead (Bind Void) (TSort O) t2))) (\lambda (x: T).(\lambda +(_: (ty3 g (CHead c1 (Bind Void) (TSort O)) t2 x)).(H14 (refl_equal C c1) +(THead (Bind Void) (TSort O) t1) (THead (Bind Void) (TSort O) t2) (ty3_bind g +c1 (TSort O) (TSort (next g O)) (ty3_sort g c1 O) Void t1 t2 H12)))) +(ty3_correct g (CHead c1 (Bind Void) (TSort O)) t1 t2 H12)))) u H8))) b +H9))))) H7)) H6))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: +(wf3 g c1 c2)).(\lambda (H2: (((eq C c1 c2) \to (\forall (t1: T).(\forall +(t2: T).((ty3 g c1 t1 t2) \to (ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1 +t2)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 +(Flat f) u) c2)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead +c1 (Flat f) u) t1 t2)).(let H5 \def (f_equal C C (\lambda (e: C).e) (CHead c1 +(Flat f) u) c2 H3) in (let H6 \def (eq_ind_r C c2 (\lambda (c0: C).((eq C c1 +c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort +(cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 (CHead c1 (Flat f) u) H5) in +(let H7 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 (CHead c1 +(Flat f) u) H5) in (let H_x \def (wf3_gen_head2 g c1 c1 u (Flat f) H7) in +(let H8 \def H_x in (ex_ind B (\lambda (b: B).(eq K (Flat f) (Bind b))) (ty3 +g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u t1)) (app1 c1 (THead (Flat f) u +t2))) (\lambda (x: B).(\lambda (H9: (eq K (Flat f) (Bind x))).(let H10 \def +(eq_ind K (Flat f) (\lambda (ee: K).(match ee with [(Bind _) \Rightarrow +False | (Flat _) \Rightarrow True])) I (Bind x) H9) in (False_ind (ty3 g +(CSort (cbk c1)) (app1 c1 (THead (Flat f) u t1)) (app1 c1 (THead (Flat f) u +t2))) H10)))) H8)))))))))))))))) y c H0))) H))). + +lemma wf3_idem: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (wf3 g +c2 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wf3 g c1 +c2)).(wf3_ind g (\lambda (_: C).(\lambda (c0: C).(wf3 g c0 c0))) (\lambda (m: +nat).(wf3_sort g m)) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wf3 g +c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (t: T).(\lambda +(H2: (ty3 g c3 u t)).(\lambda (b: B).(wf3_bind g c4 c4 H1 u t (wf3_ty3_conf g +c3 u t H2 c4 H0) b))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: +(wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (_: +((\forall (t: T).((ty3 g c3 u t) \to False)))).(\lambda (_: B).(wf3_bind g c4 +c4 H1 (TSort O) (TSort (next g O)) (ty3_sort g c4 O) Void)))))))) (\lambda +(c3: C).(\lambda (c4: C).(\lambda (_: (wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 +c4)).(\lambda (_: T).(\lambda (_: F).H1)))))) c1 c2 H)))). + +lemma wf3_ty3: + \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (u: T).((ty3 g c1 t +u) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t +u))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H: +(ty3 g c1 t u)).(let H_x \def (wf3_total g c1) in (let H0 \def H_x in (ex_ind +C (\lambda (c2: C).(wf3 g c1 c2)) (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) +(\lambda (c2: C).(ty3 g c2 t u))) (\lambda (x: C).(\lambda (H1: (wf3 g c1 +x)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t +u)) x H1 (wf3_ty3_conf g c1 t u H x H1)))) H0))))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_1A/wf3/ty3.ma b/matita/matita/contribs/lambdadelta/basic_1A/wf3/ty3.ma new file mode 100644 index 000000000..00239346c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_1A/wf3/ty3.ma @@ -0,0 +1,126 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "basic_1A/wf3/getl.ma". + +lemma wf3_pr2_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 +t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 +u) \to (pr2 c2 t1 t2))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pr2 c1 t1 t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0: +T).(\forall (c2: C).((wf3 g c c2) \to (\forall (u: T).((ty3 g c t u) \to (pr2 +c2 t t0)))))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(H0: (pr0 t3 t4)).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(\lambda (u: +T).(\lambda (_: (ty3 g c t3 u)).(pr2_free c2 t3 t4 H0))))))))) (\lambda (c: +C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c +(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: +(pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c2: +C).(\lambda (H3: (wf3 g c c2)).(\lambda (u0: T).(\lambda (H4: (ty3 g c t3 +u0)).(let H_y \def (ty3_sred_pr0 t3 t4 H1 g c u0 H4) in (let H_x \def +(ty3_getl_subst0 g c t4 u0 H_y u t i H2 Abbr d u H0) in (let H5 \def H_x in +(ex_ind T (\lambda (w: T).(ty3 g d u w)) (pr2 c2 t3 t) (\lambda (x: +T).(\lambda (H6: (ty3 g d u x)).(let H_x0 \def (wf3_getl_conf Abbr i c d u H0 +g c2 H3 x H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(wf3 g d d2)) (pr2 c2 t3 t) +(\lambda (x0: C).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(\lambda +(_: (wf3 g d x0)).(pr2_delta c2 x0 u i H8 t3 t4 H1 t H2)))) H7))))) +H5)))))))))))))))))) c1 t1 t2 H))))). + +lemma wf3_pr3_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr3 c1 +t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1 +u) \to (pr3 c2 t1 t2))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pr3 c1 t1 t2)).(pr3_ind c1 (\lambda (t: T).(\lambda (t0: T).(\forall +(c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t u) \to (pr3 c2 t +t0))))))) (\lambda (t: T).(\lambda (c2: C).(\lambda (_: (wf3 g c1 +c2)).(\lambda (u: T).(\lambda (_: (ty3 g c1 t u)).(pr3_refl c2 t)))))) +(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr2 c1 t4 t3)).(\lambda (t5: +T).(\lambda (_: (pr3 c1 t3 t5)).(\lambda (H2: ((\forall (c2: C).((wf3 g c1 +c2) \to (\forall (u: T).((ty3 g c1 t3 u) \to (pr3 c2 t3 t5))))))).(\lambda +(c2: C).(\lambda (H3: (wf3 g c1 c2)).(\lambda (u: T).(\lambda (H4: (ty3 g c1 +t4 u)).(pr3_sing c2 t3 t4 (wf3_pr2_conf g c1 t4 t3 H0 c2 H3 u H4) t5 (H2 c2 +H3 u (ty3_sred_pr2 c1 t4 t3 H0 g u H4))))))))))))) t1 t2 H))))). + +lemma wf3_pc3_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1 +t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u1: T).((ty3 g c1 t1 +u1) \to (\forall (u2: T).((ty3 g c1 t2 u2) \to (pc3 c2 t1 t2))))))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (pc3 c1 t1 t2)).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda +(u1: T).(\lambda (H1: (ty3 g c1 t1 u1)).(\lambda (u2: T).(\lambda (H2: (ty3 g +c1 t2 u2)).(let H3 \def H in (ex2_ind T (\lambda (t: T).(pr3 c1 t1 t)) +(\lambda (t: T).(pr3 c1 t2 t)) (pc3 c2 t1 t2) (\lambda (x: T).(\lambda (H4: +(pr3 c1 t1 x)).(\lambda (H5: (pr3 c1 t2 x)).(pc3_pr3_t c2 t1 x (wf3_pr3_conf +g c1 t1 x H4 c2 H0 u1 H1) t2 (wf3_pr3_conf g c1 t2 x H5 c2 H0 u2 H2))))) +H3)))))))))))). + +lemma wf3_ty3_conf: + \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 +t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (ty3 g c2 t1 t2))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (ty3 g c1 t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda +(t0: T).(\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t t0)))))) (\lambda (c: +C).(\lambda (t3: T).(\lambda (t: T).(\lambda (H0: (ty3 g c t3 t)).(\lambda +(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t))))).(\lambda (u: +T).(\lambda (t4: T).(\lambda (H2: (ty3 g c u t4)).(\lambda (H3: ((\forall +(c2: C).((wf3 g c c2) \to (ty3 g c2 u t4))))).(\lambda (H4: (pc3 c t4 +t3)).(\lambda (c2: C).(\lambda (H5: (wf3 g c c2)).(ex_ind T (\lambda (t0: +T).(ty3 g c t4 t0)) (ty3 g c2 u t3) (\lambda (x: T).(\lambda (H6: (ty3 g c t4 +x)).(ty3_conv g c2 t3 t (H1 c2 H5) u t4 (H3 c2 H5) (wf3_pc3_conf g c t4 t3 H4 +c2 H5 x H6 t H0)))) (ty3_correct g c u t4 H2)))))))))))))) (\lambda (c: +C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(ty3_sort g +c2 m))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda +(H1: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g +c2 u t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def +(wf3_getl_conf Abbr n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind +C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x: +C).(\lambda (H5: (getl n c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (wf3 g d +x)).(ty3_abbr g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (n: +nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c +(CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u +t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g c2 u +t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def +(wf3_getl_conf Abst n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind +C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x: +C).(\lambda (H5: (getl n c2 (CHead x (Bind Abst) u))).(\lambda (H6: (wf3 g d +x)).(ty3_abst g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c u t)).(\lambda (H1: +((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 u t))))).(\lambda (b: +B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) +t3 t4)).(\lambda (H3: ((\forall (c2: C).((wf3 g (CHead c (Bind b) u) c2) \to +(ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c c2)).(ty3_bind g +c2 u t (H1 c2 H4) b t3 t4 (H3 (CHead c2 (Bind b) u) (wf3_bind g c c2 H4 u t +H0 b))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda +(_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g +c2 w u))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead +(Bind Abst) u t))).(\lambda (H3: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g +c2 v (THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c +c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c: +C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c t3 t4)).(\lambda +(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t4))))).(\lambda (t0: +T).(\lambda (_: (ty3 g c t4 t0)).(\lambda (H3: ((\forall (c2: C).((wf3 g c +c2) \to (ty3 g c2 t4 t0))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c +c2)).(ty3_cast g c2 t3 t4 (H1 c2 H4) t0 (H3 c2 H4)))))))))))) c1 t1 t2 H))))). + diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre.ma new file mode 100644 index 000000000..99be99cf7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predeval_4.ma". +include "basic_2A/computation/cprs.ma". +include "basic_2A/computation/csx.ma". + +(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS *************) + +definition cpre: relation4 genv lenv term term ≝ + λG,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 ∧ ⦃G, L⦄ ⊢ ➡ 𝐍⦃T2⦄. + +interpretation "evaluation for context-sensitive parallel reduction (term)" + 'PRedEval G L T1 T2 = (cpre G L T1 T2). + +(* Basic properties *********************************************************) + +(* Basic_1: was just: nf2_sn3 *) +lemma csx_cpre: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡* 𝐍⦃T2⦄. +#h #g #G #L #T1 #H @(csx_ind … H) -T1 +#T1 #_ #IHT1 elim (cnr_dec G L T1) /3 width=3 by ex_intro, conj/ +* #T #H1T1 #H2T1 elim (IHT1 … H2T1) -IHT1 -H2T1 /2 width=2 by cpr_cpx/ +#T2 * /4 width=3 by cprs_strap2, ex_intro, conj/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre_cpre.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre_cpre.ma new file mode 100644 index 000000000..672c9b0c5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpre_cpre.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cprs_cprs.ma". +include "basic_2A/computation/cpre.ma". + +(* EVALUATION FOR CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS *************) + +(* Main properties *********************************************************) + +(* Basic_1: was: nf2_pr3_confluence *) +theorem cpre_mono: ∀G,L,T,T1. ⦃G, L⦄ ⊢ T ➡* 𝐍⦃T1⦄ → ∀T2. ⦃G, L⦄ ⊢ T ➡* 𝐍⦃T2⦄ → T1 = T2. +#G #L #T #T1 * #H1T1 #H2T1 #T2 * #H1T2 #H2T2 +elim (cprs_conf … H1T1 … H1T2) -T #T #HT1 +>(cprs_inv_cnr1 … HT1 H2T1) -T1 #HT2 +>(cprs_inv_cnr1 … HT2 H2T2) -T2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs.ma new file mode 100644 index 000000000..8d71a75c4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs.ma @@ -0,0 +1,144 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predstar_4.ma". +include "basic_2A/reduction/cnr.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Basic_1: includes: pr1_pr0 *) +definition cprs: relation4 genv lenv term term ≝ + λG. LTC … (cpr G). + +interpretation "context-sensitive parallel computation (term)" + 'PRedStar G L T1 T2 = (cprs G L T1 T2). + +(* Basic eliminators ********************************************************) + +lemma cprs_ind: ∀G,L,T1. ∀R:predicate term. R T1 → + (∀T,T2. ⦃G, L⦄ ⊢ T1 ➡* T → ⦃G, L⦄ ⊢ T ➡ T2 → R T → R T2) → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → R T2. +#G #L #T1 #R #HT1 #IHT1 #T2 #HT12 +@(TC_star_ind … HT1 IHT1 … HT12) // +qed-. + +lemma cprs_ind_dx: ∀G,L,T2. ∀R:predicate term. R T2 → + (∀T1,T. ⦃G, L⦄ ⊢ T1 ➡ T → ⦃G, L⦄ ⊢ T ➡* T2 → R T → R T1) → + ∀T1. ⦃G, L⦄ ⊢ T1 ➡* T2 → R T1. +#G #L #T2 #R #HT2 #IHT2 #T1 #HT12 +@(TC_star_ind_dx … HT2 IHT2 … HT12) // +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: pr3_pr2 *) +lemma cpr_cprs: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +/2 width=1 by inj/ qed. + +(* Basic_1: was: pr3_refl *) +lemma cprs_refl: ∀G,L,T. ⦃G, L⦄ ⊢ T ➡* T. +/2 width=1 by cpr_cprs/ qed. + +lemma cprs_strap1: ∀G,L,T1,T,T2. + ⦃G, L⦄ ⊢ T1 ➡* T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +normalize /2 width=3 by step/ qed-. + +(* Basic_1: was: pr3_step *) +lemma cprs_strap2: ∀G,L,T1,T,T2. + ⦃G, L⦄ ⊢ T1 ➡ T → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +normalize /2 width=3 by TC_strap/ qed-. + +lemma lsubr_cprs_trans: ∀G. lsub_trans … (cprs G) lsubr. +/3 width=5 by lsubr_cpr_trans, LTC_lsub_trans/ +qed-. + +(* Basic_1: was: pr3_pr1 *) +lemma tprs_cprs: ∀G,L,T1,T2. ⦃G, ⋆⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡* T2. +/2 width=3 by lsubr_cprs_trans/ qed. + +lemma cprs_bind_dx: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡* T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T1 ➡* ⓑ{a,I}V2. T2. +#G #L #V1 #V2 #HV12 #I #T1 #T2 #HT12 #a @(cprs_ind_dx … HT12) -T1 +/3 width=3 by cprs_strap2, cpr_cprs, cpr_pair_sn, cpr_bind/ qed. + +(* Basic_1: was only: pr3_thin_dx *) +lemma cprs_flat_dx: ∀I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2. +#I #G #L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind … HT12) -T2 +/3 width=5 by cprs_strap1, cpr_flat, cpr_cprs, cpr_pair_sn/ +qed. + +lemma cprs_flat_sn: ∀I,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ∀V1,V2. ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2. +#I #G #L #T1 #T2 #HT12 #V1 #V2 #H @(cprs_ind … H) -V2 +/3 width=3 by cprs_strap1, cpr_cprs, cpr_pair_sn, cpr_flat/ +qed. + +lemma cprs_zeta: ∀G,L,V,T1,T,T2. ⬆[0, 1] T2 ≡ T → + ⦃G, L.ⓓV⦄ ⊢ T1 ➡* T → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡* T2. +#G #L #V #T1 #T #T2 #HT2 #H @(cprs_ind_dx … H) -T1 +/3 width=3 by cprs_strap2, cpr_cprs, cpr_bind, cpr_zeta/ +qed. + +lemma cprs_eps: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ∀V. ⦃G, L⦄ ⊢ ⓝV.T1 ➡* T2. +#G #L #T1 #T2 #H @(cprs_ind … H) -T2 +/3 width=3 by cprs_strap1, cpr_cprs, cpr_eps/ +qed. + +lemma cprs_beta_dx: ∀a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V2 → ⦃G, L⦄ ⊢ W1 ➡ W2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2. +#a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 * -T2 +/4 width=7 by cprs_strap1, cpr_cprs, cprs_bind_dx, cprs_flat_dx, cpr_beta/ +qed. + +lemma cprs_theta_dx: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V → ⬆[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ W1 ➡ W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2 +/4 width=9 by cprs_strap1, cpr_cprs, cprs_bind_dx, cprs_flat_dx, cpr_theta/ +qed. + +(* Basic inversion lemmas ***************************************************) + +(* Basic_1: was: pr3_gen_sort *) +lemma cprs_inv_sort1: ∀G,L,U2,k. ⦃G, L⦄ ⊢ ⋆k ➡* U2 → U2 = ⋆k. +#G #L #U2 #k #H @(cprs_ind … H) -U2 // +#U2 #U #_ #HU2 #IHU2 destruct +>(cpr_inv_sort1 … HU2) -HU2 // +qed-. + +(* Basic_1: was: pr3_gen_cast *) +lemma cprs_inv_cast1: ∀G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡* U2 → ⦃G, L⦄ ⊢ T1 ➡* U2 ∨ + ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡* W2 & ⦃G, L⦄ ⊢ T1 ➡* T2 & U2 = ⓝW2.T2. +#G #L #W1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_intror/ +#U2 #U #_ #HU2 * /3 width=3 by cprs_strap1, or_introl/ * +#W #T #HW1 #HT1 #H destruct +elim (cpr_inv_cast1 … HU2) -HU2 /3 width=3 by cprs_strap1, or_introl/ * +#W2 #T2 #HW2 #HT2 #H destruct /4 width=5 by cprs_strap1, ex3_2_intro, or_intror/ +qed-. + +(* Basic_1: was: nf2_pr3_unfold *) +lemma cprs_inv_cnr1: ∀G,L,T,U. ⦃G, L⦄ ⊢ T ➡* U → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → T = U. +#G #L #T #U #H @(cprs_ind_dx … H) -T // +#T0 #T #H1T0 #_ #IHT #H2T0 +lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1 by/ +qed-. + +(* Basic_1: removed theorems 13: + pr1_head_1 pr1_head_2 pr1_comp + clear_pr3_trans pr3_cflat pr3_gen_bind + pr3_head_1 pr3_head_2 pr3_head_21 pr3_head_12 + pr3_iso_appl_bind pr3_iso_appls_appl_bind pr3_iso_appls_bind +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_cprs.ma new file mode 100644 index 000000000..79500576b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_cprs.ma @@ -0,0 +1,155 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpr_lpr.ma". +include "basic_2A/computation/cprs_lift.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: pr3_t *) +(* Basic_1: includes: pr1_t *) +theorem cprs_trans: ∀G,L. Transitive … (cprs G L). +normalize /2 width=3 by trans_TC/ qed-. + +(* Basic_1: was: pr3_confluence *) +(* Basic_1: includes: pr1_confluence *) +theorem cprs_conf: ∀G,L. confluent2 … (cprs G L) (cprs G L). +normalize /3 width=3 by cpr_conf, TC_confluent2/ qed-. + +theorem cprs_bind: ∀a,I,G,L,V1,V2,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +#a #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cprs_ind … H) -V2 +/3 width=5 by cprs_trans, cprs_bind_dx/ +qed. + +(* Basic_1: was: pr3_flat *) +theorem cprs_flat: ∀I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ➡* ⓕ{I}V2.T2. +#I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cprs_ind … H) -V2 +/3 width=3 by cprs_flat_dx, cprs_strap1, cpr_pair_sn/ +qed. + +theorem cprs_beta_rc: ∀a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2. +#a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HT12 #H @(cprs_ind … H) -W2 /2 width=1 by cprs_beta_dx/ +#W #W2 #_ #HW2 #IHW1 (**) (* fulla uto too slow 14s *) +@(cprs_trans … IHW1) -IHW1 /3 width=1 by cprs_flat_dx, cprs_bind/ +qed. + +theorem cprs_beta: ∀a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L⦄ ⊢ V1 ➡* V2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡* ⓓ{a}ⓝW2.V2.T2. +#a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HT12 #HW12 #H @(cprs_ind … H) -V2 /2 width=1 by cprs_beta_rc/ +#V #V2 #_ #HV2 #IHV1 +@(cprs_trans … IHV1) -IHV1 /3 width=1 by cprs_flat_sn, cprs_bind/ +qed. + +theorem cprs_theta_rc: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡ V → ⬆[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cprs_ind … H) -W2 +/3 width=5 by cprs_trans, cprs_theta_dx, cprs_bind_dx/ +qed. + +theorem cprs_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + ⬆[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 → + ⦃G, L⦄ ⊢ V1 ➡* V → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2. +#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(cprs_ind_dx … H) -V1 +/3 width=3 by cprs_trans, cprs_theta_rc, cprs_flat_dx/ +qed. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was pr3_gen_appl *) +lemma cprs_inv_appl1: ∀G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡* U2 → + ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L⦄ ⊢ T1 ➡* T2 & + U2 = ⓐV2. T2 + | ∃∃a,W,T. ⦃G, L⦄ ⊢ T1 ➡* ⓛ{a}W.T & + ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V1.T ➡* U2 + | ∃∃a,V0,V2,V,T. ⦃G, L⦄ ⊢ V1 ➡* V0 & ⬆[0,1] V0 ≡ V2 & + ⦃G, L⦄ ⊢ T1 ➡* ⓓ{a}V.T & + ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡* U2. +#G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by or3_intro0, ex3_2_intro/ +#U #U2 #_ #HU2 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpr_inv_appl1 … HU2) -HU2 * + [ #V2 #T2 #HV02 #HT02 #H destruct /4 width=5 by cprs_strap1, or3_intro0, ex3_2_intro/ + | #a #V2 #W #W2 #T #T2 #HV02 #HW2 #HT2 #H1 #H2 destruct + lapply (cprs_strap1 … HV10 … HV02) -V0 #HV12 + lapply (lsubr_cpr_trans … HT2 (L.ⓓⓝW.V1) ?) -HT2 + /5 width=5 by cprs_bind, cprs_flat_dx, cpr_cprs, lsubr_beta, ex2_3_intro, or3_intro1/ + | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HV2 #HW02 #HT2 #H1 #H2 destruct + /5 width=10 by cprs_flat_sn, cprs_bind_dx, cprs_strap1, ex4_5_intro, or3_intro2/ + ] +| /4 width=9 by cprs_strap1, or3_intro1, ex2_3_intro/ +| /4 width=11 by cprs_strap1, or3_intro2, ex4_5_intro/ +] +qed-. + +(* Properties concerning sn parallel reduction on local environments ********) + +(* Basic_1: was just: pr3_pr2_pr2_t *) +(* Basic_1: includes: pr3_pr0_pr2_t *) +lemma lpr_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lpr G). +#G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2 +[ /2 width=3 by/ +| #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12 + elim (lpr_drop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H + elim (lpr_inv_pair2 … H) -H #K1 #V1 #HK12 #HV10 #H destruct + /4 width=6 by cprs_strap2, cprs_delta/ +|3,7: /4 width=1 by lpr_pair, cprs_bind, cprs_beta/ +|4,6: /3 width=1 by cprs_flat, cprs_eps/ +|5,8: /4 width=3 by lpr_pair, cprs_zeta, cprs_theta, cprs_strap1/ +] +qed-. + +lemma cpr_bind2: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡ T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +/4 width=5 by lpr_cpr_trans, cprs_bind_dx, lpr_pair/ qed. + +(* Advanced properties ******************************************************) + +(* Basic_1: was only: pr3_pr2_pr3_t pr3_wcpr0_t *) +lemma lpr_cprs_trans: ∀G. s_rs_transitive … (cpr G) (λ_. lpr G). +#G @s_r_trans_LTC1 /2 width=3 by lpr_cpr_trans/ (**) (* full auto fails *) +qed-. + +(* Basic_1: was: pr3_strip *) +(* Basic_1: includes: pr1_strip *) +lemma cprs_strip: ∀G,L. confluent2 … (cprs G L) (cpr G L). +normalize /4 width=3 by cpr_conf, TC_strip1/ qed-. + +lemma cprs_lpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #H @(cprs_ind … H) -T1 /2 width=3 by ex2_intro/ +#T #T1 #_ #HT1 #IHT0 #L1 #HL01 elim (IHT0 … HL01) +#T2 #HT2 #HT02 elim (lpr_cpr_conf_dx … HT1 … HL01) -L0 +#T3 #HT3 #HT13 elim (cprs_strip … HT2 … HT3) -T +/4 width=5 by cprs_strap2, cprs_strap1, ex2_intro/ +qed-. + +lemma cprs_lpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 elim (cprs_lpr_conf_dx … HT01 … HL01) -HT01 +/3 width=3 by lpr_cprs_trans, ex2_intro/ +qed-. + +lemma cprs_bind2_dx: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡* T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +/4 width=5 by lpr_cprs_trans, cprs_bind_dx, lpr_pair/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_lift.ma new file mode 100644 index 000000000..635f1e237 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cprs_lift.ma @@ -0,0 +1,60 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr_lift.ma". +include "basic_2A/computation/cprs.ma". + +(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************) + +(* Advanced properties ******************************************************) + +(* Note: apparently this was missing in basic_1 *) +lemma cprs_delta: ∀G,L,K,V,V2,i. + ⬇[i] L ≡ K.ⓓV → ⦃G, K⦄ ⊢ V ➡* V2 → + ∀W2. ⬆[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡* W2. +#G #L #K #V #V2 #i #HLK #H elim H -V2 [ /3 width=6 by cpr_cprs, cpr_delta/ ] +#V1 #V2 #_ #HV12 #IHV1 #W2 #HVW2 +lapply (drop_fwd_drop2 … HLK) -HLK #HLK +elim (lift_total V1 0 (i+1)) /4 width=12 by cpr_lift, cprs_strap1/ +qed. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was: pr3_gen_lref *) +lemma cprs_inv_lref1: ∀G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡* T2 → + T2 = #i ∨ + ∃∃K,V1,T1. ⬇[i] L ≡ K.ⓓV1 & ⦃G, K⦄ ⊢ V1 ➡* T1 & + ⬆[0, i + 1] T1 ≡ T2. +#G #L #T2 #i #H @(cprs_ind … H) -T2 /2 width=1 by or_introl/ +#T #T2 #_ #HT2 * +[ #H destruct + elim (cpr_inv_lref1 … HT2) -HT2 /2 width=1 by or_introl/ + * /4 width=6 by cpr_cprs, ex3_3_intro, or_intror/ +| * #K #V1 #T1 #HLK #HVT1 #HT1 + lapply (drop_fwd_drop2 … HLK) #H0LK + elim (cpr_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T + /4 width=6 by cprs_strap1, ex3_3_intro, or_intror/ +] +qed-. + +(* Relocation properties ****************************************************) + +(* Basic_1: was: pr3_lift *) +lemma cprs_lift: ∀G. d_liftable (cprs G). +/3 width=10 by d_liftable_LTC, cpr_lift/ qed. + +(* Basic_1: was: pr3_gen_lift *) +lemma cprs_inv_lift1: ∀G. d_deliftable_sn (cprs G). +/3 width=6 by d_deliftable_sn_LTC, cpr_inv_lift1/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxe.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxe.ma new file mode 100644 index 000000000..1bec07a92 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxe.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predeval_6.ma". +include "basic_2A/computation/cpxs.ma". +include "basic_2A/computation/csx.ma". + +(* EVALUATION FOR CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION ON TERMS ****) + +definition cpxe: ∀h. sd h → relation4 genv lenv term term ≝ + λh,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 ∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T2⦄. + +interpretation "evaluation for context-sensitive extended parallel reduction (term)" + 'PRedEval h g G L T1 T2 = (cpxe h g G L T1 T2). + +(* Basic properties *********************************************************) + +lemma csx_cpxe: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → ∃T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] 𝐍⦃T2⦄. +#h #g #G #L #T1 #H @(csx_ind … H) -T1 +#T1 #_ #IHT1 elim (cnx_dec h g G L T1) /3 width=3 by ex_intro, conj/ +* #T #H1T1 #H2T1 elim (IHT1 … H1T1 H2T1) -IHT1 -H2T1 +#T2 * /4 width=3 by cpxs_strap2, ex_intro, conj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs.ma new file mode 100644 index 000000000..173808baa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs.ma @@ -0,0 +1,181 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predstar_6.ma". +include "basic_2A/reduction/cnx.ma". +include "basic_2A/computation/cprs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +definition cpxs: ∀h. sd h → relation4 genv lenv term term ≝ + λh,g,G. LTC … (cpx h g G). + +interpretation "extended context-sensitive parallel computation (term)" + 'PRedStar h g G L T1 T2 = (cpxs h g G L T1 T2). + +(* Basic eliminators ********************************************************) + +lemma cpxs_ind: ∀h,g,G,L,T1. ∀R:predicate term. R T1 → + (∀T,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T → ⦃G, L⦄ ⊢ T ➡[h, g] T2 → R T → R T2) → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → R T2. +#h #g #L #G #T1 #R #HT1 #IHT1 #T2 #HT12 +@(TC_star_ind … HT1 IHT1 … HT12) // +qed-. + +lemma cpxs_ind_dx: ∀h,g,G,L,T2. ∀R:predicate term. R T2 → + (∀T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T → ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → R T → R T1) → + ∀T1. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → R T1. +#h #g #G #L #T2 #R #HT2 #IHT2 #T1 #HT12 +@(TC_star_ind_dx … HT2 IHT2 … HT12) // +qed-. + +(* Basic properties *********************************************************) + +lemma cpxs_refl: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ➡*[h, g] T. +/2 width=1 by inj/ qed. + +lemma cpx_cpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +/2 width=1 by inj/ qed. + +lemma cpxs_strap1: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T → + ∀T2. ⦃G, L⦄ ⊢ T ➡[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +normalize /2 width=3 by step/ qed. + +lemma cpxs_strap2: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T → + ∀T2. ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +normalize /2 width=3 by TC_strap/ qed. + +lemma lsubr_cpxs_trans: ∀h,g,G. lsub_trans … (cpxs h g G) lsubr. +/3 width=5 by lsubr_cpx_trans, LTC_lsub_trans/ +qed-. + +lemma cprs_cpxs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #H @(cprs_ind … H) -T2 /3 width=3 by cpxs_strap1, cpr_cpx/ +qed. + +lemma cpxs_sort: ∀h,g,G,L,k,d1. deg h g k d1 → + ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] ⋆((next h)^d2 k). +#h #g #G #L #k #d1 #Hkd1 #d2 @(nat_ind_plus … d2) -d2 /2 width=1 by cpx_cpxs/ +#d2 #IHd2 #Hd21 >iter_SO +@(cpxs_strap1 … (⋆(iter d2 ℕ (next h) k))) +[ /3 width=3 by lt_to_le/ +| @(cpx_st … (d1-d2-1)) iter_SO // + ] +] +qed-. + +lemma cpxs_inv_cast1: ∀h,g,G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ➡*[h, g] U2 → + ∨∨ ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 & ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 & U2 = ⓝW2.T2 + | ⦃G, L⦄ ⊢ T1 ➡*[h, g] U2 + | ⦃G, L⦄ ⊢ W1 ➡*[h, g] U2. +#h #g #G #L #W1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by or3_intro0, ex3_2_intro/ +#U2 #U #_ #HU2 * /3 width=3 by cpxs_strap1, or3_intro1, or3_intro2/ * +#W #T #HW1 #HT1 #H destruct +elim (cpx_inv_cast1 … HU2) -HU2 /3 width=3 by cpxs_strap1, or3_intro1, or3_intro2/ * +#W2 #T2 #HW2 #HT2 #H destruct +lapply (cpxs_strap1 … HW1 … HW2) -W +lapply (cpxs_strap1 … HT1 … HT2) -T /3 width=5 by or3_intro0, ex3_2_intro/ +qed-. + +lemma cpxs_inv_cnx1: ∀h,g,G,L,T,U. ⦃G, L⦄ ⊢ T ➡*[h, g] U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → T = U. +#h #g #G #L #T #U #H @(cpxs_ind_dx … H) -T // +#T0 #T #H1T0 #_ #IHT #H2T0 +lapply (H2T0 … H1T0) -H1T0 #H destruct /2 width=1 by/ +qed-. + +lemma cpxs_neq_inv_step_sn: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → + ∃∃T. ⦃G, L⦄ ⊢ T1 ➡[h, g] T & T1 = T → ⊥ & ⦃G, L⦄ ⊢ T ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1 +[ #H elim H -H // +| #T1 #T #H1 #H2 #IH2 #H12 elim (eq_term_dec T1 T) #H destruct + [ -H1 -H2 /3 width=1 by/ + | -IH2 /3 width=4 by ex3_intro/ (**) (* auto fails without clear *) + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_aaa.ma new file mode 100644 index 000000000..f753b2816 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_aaa.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_aaa.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Properties about atomic arity assignment on terms ************************) + +lemma cpxs_aaa_conf: ∀h,g,G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +#h #g #G #L #T1 #A #HT1 #T2 #HT12 +@(TC_Conf3 … HT1 ? HT12) -A -T1 -T2 /2 width=5 by cpx_aaa_conf/ +qed-. + +lemma cprs_aaa_conf: ∀G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +/3 width=5 by cpxs_aaa_conf, cprs_cpxs/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_cpxs.ma new file mode 100644 index 000000000..61002527e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_cpxs.ma @@ -0,0 +1,187 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_drop.ma". +include "basic_2A/computation/cpxs_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Main properties **********************************************************) + +theorem cpxs_trans: ∀h,g,G,L. Transitive … (cpxs h g G L). +normalize /2 width=3 by trans_TC/ qed-. + +theorem cpxs_bind: ∀h,g,a,I,G,L,V1,V2,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡*[h, g] T2 → + ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +#h #g #a #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cpxs_ind … H) -V2 +/3 width=5 by cpxs_trans, cpxs_bind_dx/ +qed. + +theorem cpxs_flat: ∀h,g,I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → + ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ➡*[h, g] ⓕ{I}V2.T2. +#h #g #I #G #L #V1 #V2 #T1 #T2 #HT12 #H @(cpxs_ind … H) -V2 +/3 width=5 by cpxs_trans, cpxs_flat_dx/ +qed. + +theorem cpxs_beta_rc: ∀h,g,a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 → ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡*[h, g] ⓓ{a}ⓝW2.V2.T2. +#h #g #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HV12 #HT12 #H @(cpxs_ind … H) -W2 +/4 width=5 by cpxs_trans, cpxs_beta_dx, cpxs_bind_dx, cpx_pair_sn/ +qed. + +theorem cpxs_beta: ∀h,g,a,G,L,V1,V2,W1,W2,T1,T2. + ⦃G, L.ⓛW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓛ{a}W1.T1 ➡*[h, g] ⓓ{a}ⓝW2.V2.T2. +#h #g #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #HT12 #HW12 #H @(cpxs_ind … H) -V2 +/4 width=5 by cpxs_trans, cpxs_beta_rc, cpxs_bind_dx, cpx_flat/ +qed. + +theorem cpxs_theta_rc: ∀h,g,a,G,L,V1,V,V2,W1,W2,T1,T2. + ⦃G, L⦄ ⊢ V1 ➡[h, g] V → ⬆[0, 1] V ≡ V2 → + ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → + ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h, g] ⓓ{a}W2.ⓐV2.T2. +#h #g #a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cpxs_ind … H) -W2 +/3 width=5 by cpxs_trans, cpxs_theta_dx, cpxs_bind_dx/ +qed. + +theorem cpxs_theta: ∀h,g,a,G,L,V1,V,V2,W1,W2,T1,T2. + ⬆[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 → + ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ V1 ➡*[h, g] V → + ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h, g] ⓓ{a}W2.ⓐV2.T2. +#h #g #a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(TC_ind_dx … V1 H) -V1 +/3 width=5 by cpxs_trans, cpxs_theta_rc, cpxs_flat_dx/ +qed. + +(* Advanced inversion lemmas ************************************************) + +lemma cpxs_inv_appl1: ∀h,g,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓐV1.T1 ➡*[h, g] U2 → + ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 & + U2 = ⓐV2. T2 + | ∃∃a,W,T. ⦃G, L⦄ ⊢ T1 ➡*[h, g] ⓛ{a}W.T & ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V1.T ➡*[h, g] U2 + | ∃∃a,V0,V2,V,T. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V0 & ⬆[0,1] V0 ≡ V2 & + ⦃G, L⦄ ⊢ T1 ➡*[h, g] ⓓ{a}V.T & ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, g] U2. +#h #g #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 [ /3 width=5 by or3_intro0, ex3_2_intro/ ] +#U #U2 #_ #HU2 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpx_inv_appl1 … HU2) -HU2 * + [ #V2 #T2 #HV02 #HT02 #H destruct /4 width=5 by cpxs_strap1, or3_intro0, ex3_2_intro/ + | #a #V2 #W #W2 #T #T2 #HV02 #HW2 #HT2 #H1 #H2 destruct + lapply (cpxs_strap1 … HV10 … HV02) -V0 #HV12 + lapply (lsubr_cpx_trans … HT2 (L.ⓓⓝW.V1) ?) -HT2 + /5 width=5 by cpxs_bind, cpxs_flat_dx, cpx_cpxs, lsubr_beta, ex2_3_intro, or3_intro1/ + | #a #V #V2 #W0 #W2 #T #T2 #HV0 #HV2 #HW02 #HT2 #H1 #H2 destruct + /5 width=10 by cpxs_flat_sn, cpxs_bind_dx, cpxs_strap1, ex4_5_intro, or3_intro2/ + ] +| /4 width=9 by cpxs_strap1, or3_intro1, ex2_3_intro/ +| /4 width=11 by cpxs_strap1, or3_intro2, ex4_5_intro/ +] +qed-. + +(* Properties on sn extended parallel reduction for local environments ******) + +lemma lpx_cpx_trans: ∀h,g,G. s_r_transitive … (cpx h g G) (λ_.lpx h g G). +#h #g #G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2 +[ /2 width=3 by/ +| /3 width=2 by cpx_cpxs, cpx_st/ +| #I #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12 + elim (lpx_drop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H + elim (lpx_inv_pair2 … H) -H #K1 #V1 #HK12 #HV10 #H destruct + /4 width=7 by cpxs_delta, cpxs_strap2/ +|4,9: /4 width=1 by cpxs_beta, cpxs_bind, lpx_pair/ +|5,7,8: /3 width=1 by cpxs_flat, cpxs_ct, cpxs_eps/ +| /4 width=3 by cpxs_zeta, lpx_pair/ +| /4 width=3 by cpxs_theta, cpxs_strap1, lpx_pair/ +] +qed-. + +lemma cpx_bind2: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡[h, g] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +/4 width=5 by lpx_cpx_trans, cpxs_bind_dx, lpx_pair/ qed. + +(* Advanced properties ******************************************************) + +lemma lpx_cpxs_trans: ∀h,g,G. s_rs_transitive … (cpx h g G) (λ_.lpx h g G). +#h #g #G @s_r_trans_LTC1 /2 width=3 by lpx_cpx_trans/ (**) (* full auto fails *) +qed-. + +lemma cpxs_bind2_dx: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +/4 width=5 by lpx_cpxs_trans, cpxs_bind_dx, lpx_pair/ qed. + +(* Properties on supclosure *************************************************) + +lemma fqu_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #V1 #V2 #HV12 #_ elim (lift_total V2 0 1) + #U2 #HVU2 @(ex3_intro … U2) + [1,3: /3 width=7 by fqu_drop, cpxs_delta, drop_pair, drop_drop/ + | #H destruct /2 width=7 by lift_inv_lref2_be/ + ] +| #I #G #L #V1 #T #V2 #HV12 #H @(ex3_intro … (②{I}V2.T)) + [1,3: /2 width=4 by fqu_pair_sn, cpxs_pair_sn/ + | #H0 destruct /2 width=1 by/ + ] +| #a #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓑ{a,I}V.T2)) + [1,3: /2 width=4 by fqu_bind_dx, cpxs_bind/ + | #H0 destruct /2 width=1 by/ + ] +| #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓕ{I}V.T2)) + [1,3: /2 width=4 by fqu_flat_dx, cpxs_flat/ + | #H0 destruct /2 width=1 by/ + ] +| #G #L #K #T1 #U1 #m #HLK #HTU1 #T2 #HT12 #H elim (lift_total T2 0 (m+1)) + #U2 #HTU2 @(ex3_intro … U2) + [1,3: /2 width=10 by cpxs_lift, fqu_drop/ + | #H0 destruct /3 width=5 by lift_inj/ +] +qed-. + +lemma fquq_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fquq_inv_gen … H12) -H12 +[ #H12 elim (fqu_cpxs_trans_neq … H12 … HTU2 H) -T2 + /3 width=4 by fqu_fquq, ex3_intro/ +| * #HG #HL #HT destruct /3 width=4 by ex3_intro/ +] +qed-. + +lemma fqup_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 +[ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_neq … H12 … HTU2 H) -T2 + /3 width=4 by fqu_fqup, ex3_intro/ +| #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2 + #U1 #HTU1 #H #H12 elim (fqu_cpxs_trans_neq … H1 … HTU1 H) -T1 + /3 width=8 by fqup_strap2, ex3_intro/ +] +qed-. + +lemma fqus_cpxs_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_gen … H12) -H12 +[ #H12 elim (fqup_cpxs_trans_neq … H12 … HTU2 H) -T2 + /3 width=4 by fqup_fqus, ex3_intro/ +| * #HG #HL #HT destruct /3 width=4 by ex3_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lift.ma new file mode 100644 index 000000000..cf538d2c5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lift.ma @@ -0,0 +1,124 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_fqus.ma". +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Advanced properties ******************************************************) + +lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i. + ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 → + ∀W2. ⬆[0, i+1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2. +#h #g #I #G #L #K #V #V2 #i #HLK #H elim H -V2 +[ /3 width=9 by cpx_cpxs, cpx_delta/ +| #V1 lapply (drop_fwd_drop2 … HLK) -HLK + elim (lift_total V1 0 (i+1)) /4 width=12 by cpx_lift, cpxs_strap1/ +] +qed. + +lemma lstas_cpxs: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → + ∀d1. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #d2 #H elim H -G -L -T1 -T2 -d2 // +[ /3 width=3 by cpxs_sort, da_inv_sort/ +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #d1 #H #Hd21 + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpxs_delta/ +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #d1 #H #Hd21 + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct + #HV1 #H destruct lapply (le_plus_to_le_r … Hd21) -Hd21 + /3 width=7 by cpxs_delta/ +| /4 width=3 by cpxs_bind_dx, da_inv_bind/ +| /4 width=3 by cpxs_flat_dx, da_inv_flat/ +| /4 width=3 by cpxs_eps, da_inv_flat/ +] +qed. + +(* Advanced inversion lemmas ************************************************) + +lemma cpxs_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 → + T2 = #i ∨ + ∃∃I,K,V1,T1. ⬇[i] L ≡ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ➡*[h, g] T1 & + ⬆[0, i+1] T1 ≡ T2. +#h #g #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/ +#T #T2 #_ #HT2 * +[ #H destruct + elim (cpx_inv_lref1 … HT2) -HT2 /2 width=1 by or_introl/ + * /4 width=7 by cpx_cpxs, ex3_4_intro, or_intror/ +| * #I #K #V1 #T1 #HLK #HVT1 #HT1 + lapply (drop_fwd_drop2 … HLK) #H0LK + elim (cpx_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T + /4 width=7 by cpxs_strap1, ex3_4_intro, or_intror/ +] +qed-. + +(* Relocation properties ****************************************************) + +lemma cpxs_lift: ∀h,g,G. d_liftable (cpxs h g G). +/3 width=10 by cpx_lift, cpxs_strap1, d_liftable_LTC/ qed. + +lemma cpxs_inv_lift1: ∀h,g,G. d_deliftable_sn (cpxs h g G). +/3 width=6 by d_deliftable_sn_LTC, cpx_inv_lift1/ +qed-. + +(* Properties on supclosure *************************************************) + +lemma fqu_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqu_cpx_trans … HT1 … HT2) -T +#T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ +qed-. + +lemma fquq_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_cpxs_trans … HTU2 … HT12) /3 width=3 by fqu_fquq, ex2_intro/ +| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma fquq_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2,d1. ⦃G2, L2⦄ ⊢ T2 •*[h, d1] U2 → + ∀d2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] d2 → d1 ≤ d2 → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +/3 width=5 by fquq_cpxs_trans, lstas_cpxs/ qed-. + +lemma fqup_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/ +#T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqup_cpx_trans … HT1 … HT2) -T +#U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/ +qed-. + +lemma fqus_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 → + ∀T1. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T2 #U2 #HTU2 #T1 #H elim (fqus_inv_gen … H) -H +[ #HT12 elim (fqup_cpxs_trans … HTU2 … HT12) /3 width=3 by fqup_fqus, ex2_intro/ +| * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma fqus_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀U2,d1. ⦃G2, L2⦄ ⊢ T2 •*[h, d1] U2 → + ∀d2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] d2 → d1 ≤ d2 → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄. +/3 width=6 by fqus_cpxs_trans, lstas_cpxs/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lleq.ma new file mode 100644 index 000000000..610f8842a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lleq.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lleq.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_cpxs_trans: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L1. L1 ≡[T1, 0] L2 → ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L2 #T1 #T2 #H @(cpxs_ind_dx … H) -T1 +/4 width=6 by cpx_lleq_conf_dx, lleq_cpx_trans, cpxs_strap2/ +qed-. + +lemma cpxs_lleq_conf: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L1. L2 ≡[T1, 0] L1 → ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2. +/3 width=3 by lleq_cpxs_trans, lleq_sym/ qed-. + +lemma cpxs_lleq_conf_dx: ∀h,g,G,L2,T1,T2. ⦃G, L2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L1. L1 ≡[T1, 0] L2 → L1 ≡[T2, 0] L2. +#h #g #G #L2 #T1 #T2 #H @(cpxs_ind … H) -T2 /3 width=6 by cpx_lleq_conf_dx/ +qed-. + +lemma cpxs_lleq_conf_sn: ∀h,g,G,L1,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡*[h, g] T2 → + ∀L2. L1 ≡[T1, 0] L2 → L1 ≡[T2, 0] L2. +/4 width=6 by cpxs_lleq_conf_dx, lleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lreq.ma new file mode 100644 index 000000000..025cfdc2f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_lreq.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lreq.ma". +include "basic_2A/computation/cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Properties on equivalence for local environments *************************) + +lemma lreq_cpxs_trans: ∀h,g,G. lsub_trans … (cpxs h g G) (lreq 0 (∞)). +/3 width=5 by lreq_cpx_trans, LTC_lsub_trans/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts.ma new file mode 100644 index 000000000..afe33affd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts.ma @@ -0,0 +1,107 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts.ma". +include "basic_2A/computation/lpxs_cpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Forward lemmas involving same top term structure *************************) + +lemma cpxs_fwd_cnx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ∀U. ⦃G, L⦄ ⊢ T ➡*[h, g] U → T ≂ U. +#h #g #G #L #T #HT #U #H +>(cpxs_inv_cnx1 … H HT) -G -L -T // +qed-. + +lemma cpxs_fwd_sort: ∀h,g,G,L,U,k. ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] U → + ⋆k ≂ U ∨ ⦃G, L⦄ ⊢ ⋆(next h k) ➡*[h, g] U. +#h #g #G #L #U #k #H +elim (cpxs_inv_sort1 … H) -H #n #d generalize in match k; -k @(nat_ind_plus … n) -n +[ #k #_ #H -d destruct /2 width=1 by or_introl/ +| #n #IHn #k >plus_plus_comm_23 #Hnd #H destruct + lapply (deg_next_SO … Hnd) -Hnd #Hnd + elim (IHn … Hnd) -IHn + [ #H lapply (tsts_inv_atom1 … H) -H #H >H -H /2 width=1 by or_intror/ + | generalize in match Hnd; -Hnd @(nat_ind_plus … n) -n + /4 width=3 by cpxs_strap2, cpx_st, or_intror/ + | >iter_SO >iter_n_Sm // + ] +] +qed-. + +(* Basic_1: was just: pr3_iso_beta *) +lemma cpxs_fwd_beta: ∀h,g,a,G,L,V,W,T,U. ⦃G, L⦄ ⊢ ⓐV.ⓛ{a}W.T ➡*[h, g] U → + ⓐV.ⓛ{a}W.T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V.T ➡*[h, g] U. +#h #g #a #G #L #V #W #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W0 #T0 #HT0 #HU + elim (cpxs_inv_abst1 … HT0) -HT0 #W1 #T1 #HW1 #HT1 #H destruct + lapply (lsubr_cpxs_trans … HT1 (L.ⓓⓝW.V) ?) -HT1 + /5 width=3 by cpxs_trans, cpxs_bind, cpxs_pair_sn, lsubr_beta, or_intror/ +| #b #V1 #V2 #V0 #T1 #_ #_ #HT1 #_ + elim (cpxs_inv_abst1 … HT1) -HT1 #W2 #T2 #_ #_ #H destruct +] +qed-. + +(* Note: probably this is an inversion lemma *) +lemma cpxs_fwd_delta: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[0, i + 1] V1 ≡ V2 → + ∀U. ⦃G, L⦄ ⊢ #i ➡*[h, g] U → + #i ≂ U ∨ ⦃G, L⦄ ⊢ V2 ➡*[h, g] U. +#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #U #H +elim (cpxs_inv_lref1 … H) -H /2 width=1 by or_introl/ +* #I0 #K0 #V0 #U0 #HLK0 #HVU0 #HU0 +lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct +/4 width=10 by cpxs_lift, drop_fwd_drop2, or_intror/ +qed-. + +lemma cpxs_fwd_theta: ∀h,g,a,G,L,V1,V,T,U. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}V.T ➡*[h, g] U → + ∀V2. ⬆[0, 1] V1 ≡ V2 → ⓐV1.ⓓ{a}V.T ≂ U ∨ + ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, g] U. +#h #g #a #G #L #V1 #V #T #U #H #V2 #HV12 +elim (cpxs_inv_appl1 … H) -H * +[ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W #T0 #HT0 #HU + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ #V3 #T3 #_ #_ #H destruct + | #X #HT2 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #W2 #T2 #HW2 #HT02 #H destruct + @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *) + @(cpxs_trans … (+ⓓV.ⓐV2.ⓛ{b}W2.T2)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T + @(cpxs_strap2 … (ⓐV1.ⓛ{b}W.T0)) [2: /2 width=1 by cpxs_beta_dx/ ] + /4 width=7 by cpx_zeta, lift_bind, lift_flat/ + ] +| #b #V3 #V4 #V0 #T0 #HV13 #HV34 #HT0 #HU + @or_intror @(cpxs_trans … HU) -U (**) (* explicit constructor *) + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ #V5 #T5 #HV5 #HT5 #H destruct + lapply (cpxs_lift … HV13 (L.ⓓV) … HV12 … HV34) -V1 -V3 + /3 width=2 by cpxs_flat, cpxs_bind, drop_drop/ + | #X #HT1 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #V5 #T5 #HV05 #HT05 #H destruct + lapply (cpxs_lift … HV13 (L.ⓓV0) … HV12 … HV34) -V3 /2 width=2 by drop_drop/ #HV24 + @(cpxs_trans … (+ⓓV.ⓐV2.ⓓ{b}V5.T5)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T + @(cpxs_strap2 … (ⓐV1.ⓓ{b}V0.T0)) [ /4 width=7 by cpx_zeta, lift_bind, lift_flat/ ] -V -V5 -T5 + @(cpxs_strap2 … (ⓓ{b}V0.ⓐV2.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpr_cpx, cpr_theta/ + ] +] +qed-. + +lemma cpxs_fwd_cast: ∀h,g,G,L,W,T,U. ⦃G, L⦄ ⊢ ⓝW.T ➡*[h, g] U → + ∨∨ ⓝW. T ≂ U | ⦃G, L⦄ ⊢ T ➡*[h, g] U | ⦃G, L⦄ ⊢ W ➡*[h, g] U. +#h #g #G #L #W #T #U #H +elim (cpxs_inv_cast1 … H) -H /2 width=1 by or3_intro1, or3_intro2/ * +#W0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or3_intro0/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts_vector.ma new file mode 100644 index 000000000..70a66b9ab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/cpxs_tsts_vector.ma @@ -0,0 +1,190 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts_vector.ma". +include "basic_2A/substitution/lift_vector.ma". +include "basic_2A/computation/cpxs_tsts.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************) + +(* Vector form of forward lemmas involving same top term structure **********) + +(* Basic_1: was just: nf2_iso_appls_lref *) +lemma cpxs_fwd_cnx_vector: ∀h,g,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → + ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, g] U → ⒶVs.T ≂ U. +#h #g #G #L #T #H1T #H2T #Vs elim Vs -Vs [ @(cpxs_fwd_cnx … H2T) ] (**) (* /2 width=3 by cpxs_fwd_cnx/ does not work *) +#V #Vs #IHVs #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair/ +| #a #W0 #T0 #HT0 #HU + lapply (IHVs … HT0) -IHVs -HT0 #HT0 + elim (tsts_inv_bind_applv_simple … HT0) // +| #a #V1 #V2 #V0 #T0 #HV1 #HV12 #HT0 #HU + lapply (IHVs … HT0) -IHVs -HT0 #HT0 + elim (tsts_inv_bind_applv_simple … HT0) // +] +qed-. + +lemma cpxs_fwd_sort_vector: ∀h,g,G,L,k,Vs,U. ⦃G, L⦄ ⊢ ⒶVs.⋆k ➡*[h, g] U → + ⒶVs.⋆k ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.⋆(next h k) ➡*[h, g] U. +#h #g #G #L #k #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_sort/ +#V #Vs #IHVs #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #a #W1 #T1 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{a}W1.T1)) /3 width=1 by cpxs_flat_dx, cpr_cpx, cpr_beta/ + ] +| #a #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV1.ⓓ{a}V3.T1)) /3 width=3 by cpxs_flat, cpr_cpx, cpr_theta/ + ] +] +qed-. + + +(* Basic_1: was just: pr3_iso_appls_beta *) +lemma cpxs_fwd_beta_vector: ∀h,g,a,G,L,Vs,V,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓐV.ⓛ{a}W.T ➡*[h, g] U → + ⒶVs. ⓐV. ⓛ{a}W. T ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.ⓓ{a}ⓝW.V.T ➡*[h, g] U. +#h #g #a #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_beta/ +#V0 #Vs #IHVs #V #W #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W1 #T1 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓛ{b}W1.T1)) /3 width=1 by cpxs_flat_dx, cpr_cpx, cpr_beta/ + ] +| #b #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU + elim (IHVs … HT1) -IHVs -HT1 #HT1 + [ elim (tsts_inv_bind_applv_simple … HT1) // + | @or_intror (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV1.ⓓ{b}V3.T1)) /3 width=3 by cpxs_flat, cpr_cpx, cpr_theta/ + ] +] +qed-. + +lemma cpxs_fwd_delta_vector: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[0, i + 1] V1 ≡ V2 → + ∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.#i ➡*[h, g] U → + ⒶVs.#i ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.V2 ➡*[h, g] U. +#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta/ +#V #Vs #IHVs #U #H -K -V1 +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W0 #T0 #HT0 #HU + elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or_intror -i (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{b}W0.T0)) /3 width=1 by cpxs_flat_dx, cpr_cpx, cpr_beta/ + ] +| #b #V0 #V1 #V3 #T0 #HV0 #HV01 #HT0 #HU + elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or_intror -i (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓓ{b}V3.T0)) /3 width=3 by cpxs_flat, cpr_cpx, cpr_theta/ + ] +] +qed-. + +(* Basic_1: was just: pr3_iso_appls_abbr *) +lemma cpxs_fwd_theta_vector: ∀h,g,G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → + ∀a,V,T,U. ⦃G, L⦄ ⊢ ⒶV1s.ⓓ{a}V.T ➡*[h, g] U → + ⒶV1s. ⓓ{a}V. T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}V.ⒶV2s.T ➡*[h, g] U. +#h #g #G #L #V1s #V2s * -V1s -V2s /3 width=1 by or_intror/ +#V1s #V2s #V1a #V2a #HV12a #HV12s #a +generalize in match HV12a; -HV12a +generalize in match V2a; -V2a +generalize in match V1a; -V1a +elim HV12s -V1s -V2s /2 width=1 by cpxs_fwd_theta/ +#V1s #V2s #V1b #V2b #HV12b #_ #IHV12s #V1a #V2a #HV12a #V #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHV12s -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or_introl/ +| #b #W0 #T0 #HT0 #HU + elim (IHV12s … HV12b … HT0) -IHV12s -HT0 #HT0 + [ -HV12a -HV12b -HU + elim (tsts_inv_pair1 … HT0) #V1 #T1 #H destruct + | @or_intror -V1s (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ -HV12a -HV12b #V1 #T1 #_ #_ #H destruct + | -V1b #X #HT1 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct + @(cpxs_trans … (+ⓓV.ⓐV2a.ⓛ{b}W1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2s + @(cpxs_strap2 … (ⓐV1a.ⓛ{b}W0.T0)) + /4 width=7 by cpxs_beta_dx, cpx_zeta, lift_bind, lift_flat/ + ] + ] +| #b #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU + elim (IHV12s … HV12b … HT0) -HV12b -IHV12s -HT0 #HT0 + [ -HV12a -HV10a -HV0a -HU + elim (tsts_inv_pair1 … HT0) #V1 #T1 #H destruct + | @or_intror -V1s -V1b (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + elim (cpxs_inv_abbr1 … HT0) -HT0 * + [ #V1 #T1 #HV1 #HT1 #H destruct + lapply (cpxs_lift … HV10a (L.ⓓV) (Ⓕ) … HV12a … HV0a) -V1a -V0a [ /2 width=1 by drop_drop/ ] #HV2a + @(cpxs_trans … (ⓓ{a}V.ⓐV2a.T1)) /3 width=1 by cpxs_bind, cpxs_pair_sn, cpxs_flat_dx, cpxs_bind_dx/ + | #X #HT1 #H #H0 destruct + elim (lift_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct + lapply (cpxs_lift … HV10a (L.ⓓV0) (Ⓕ) … HV12a … HV0a) -V0a [ /2 width=1 by drop_drop/ ] #HV2a + @(cpxs_trans … (+ⓓV.ⓐV2a.ⓓ{b}V1.T1)) [ /3 width=1 by cpxs_flat_dx, cpxs_bind_dx/ ] -T -V2b -V2s + @(cpxs_strap2 … (ⓐV1a.ⓓ{b}V0.T0)) [ /4 width=7 by cpx_zeta, lift_bind, lift_flat/ ] -V -V1 -T1 + @(cpxs_strap2 … (ⓓ{b}V0.ⓐV2a.T0)) /3 width=3 by cpxs_pair_sn, cpxs_bind_dx, cpr_cpx, cpr_theta/ + ] + ] +] +qed-. + +(* Basic_1: was just: pr3_iso_appls_cast *) +lemma cpxs_fwd_cast_vector: ∀h,g,G,L,Vs,W,T,U. ⦃G, L⦄ ⊢ ⒶVs.ⓝW.T ➡*[h, g] U → + ∨∨ ⒶVs. ⓝW. T ≂ U + | ⦃G, L⦄ ⊢ ⒶVs.T ➡*[h, g] U + | ⦃G, L⦄ ⊢ ⒶVs.W ➡*[h, g] U. +#h #g #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/ +#V #Vs #IHVs #W #T #U #H +elim (cpxs_inv_appl1 … H) -H * +[ -IHVs #V0 #T0 #_ #_ #H destruct /2 width=1 by tsts_pair, or3_intro0/ +| #b #W0 #T0 #HT0 #HU elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or3_intro1 -W (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{b}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/ + | @or3_intro2 -T (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV.ⓛ{b}W0.T0)) /2 width=1 by cpxs_flat_dx, cpx_beta/ + ] +| #b #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU + elim (IHVs … HT0) -IHVs -HT0 #HT0 + [ elim (tsts_inv_bind_applv_simple … HT0) // + | @or3_intro1 -W (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓓ{b}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/ + | @or3_intro2 -T (**) (* explicit constructor *) + @(cpxs_trans … HU) -U + @(cpxs_strap1 … (ⓐV0.ⓓ{b}V2.T0)) /2 width=3 by cpxs_flat, cpx_theta/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx.ma new file mode 100644 index 000000000..b77127d50 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx.ma @@ -0,0 +1,133 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/sn_5.ma". +include "basic_2A/reduction/cnx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +definition csx: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L. SN … (cpx h g G L) (eq …). + +interpretation + "context-sensitive extended strong normalization (term)" + 'SN h g G L T = (csx h g G L T). + +(* Basic eliminators ********************************************************) + +lemma csx_ind: ∀h,g,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → + R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R T. +#h #g #G #L #R #H0 #T1 #H elim H -T1 +/5 width=1 by SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was just: sn3_pr2_intro *) +lemma csx_intro: ∀h,g,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] T2) → + ⦃G, L⦄ ⊢ ⬊*[h, g] T1. +/4 width=1 by SN_intro/ qed. + +lemma csx_cpx_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12 +elim (eq_term_dec T1 T2) #HT12 destruct /3 width=4 by/ +qed-. + +(* Basic_1: was just: sn3_nf2 *) +lemma cnx_csx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +/2 width=1 by NF_to_SN/ qed. + +lemma csx_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ⬊*[h, g] ⋆k. +#h #g #G #L #k elim (deg_total h g k) +#d generalize in match k; -k @(nat_ind_plus … d) -d /3 width=6 by cnx_csx, cnx_sort/ +#d #IHd #k #Hkd lapply (deg_next_SO … Hkd) -Hkd +#Hkd @csx_intro #X #H #HX elim (cpx_inv_sort1 … H) -H +[ #H destruct elim HX // +| -HX * #d0 #_ #H destruct -d0 /2 width=1 by/ +] +qed. + +(* Basic_1: was just: sn3_cast *) +lemma csx_cast: ∀h,g,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, g] W → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓝW.T. +#h #g #G #L #W #HW @(csx_ind … HW) -W #W #HW #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT +@csx_intro #X #H1 #H2 +elim (cpx_inv_cast1 … H1) -H1 +[ * #W0 #T0 #HLW0 #HLT0 #H destruct + elim (eq_false_inv_tpair_sn … H2) -H2 + [ /3 width=3 by csx_cpx_trans/ + | -HLW0 * #H destruct /3 width=1 by/ + ] +|2,3: /3 width=3 by csx_cpx_trans/ +] +qed. + +(* Basic forward lemmas *****************************************************) + +fact csx_fwd_pair_sn_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → + ∀I,V,T. U = ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] V. +#h #g #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct +@csx_intro #V2 #HLV2 #HV2 +@(IH (②{I}V2.T)) -IH /2 width=3 by cpx_pair_sn/ -HLV2 +#H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was just: sn3_gen_head *) +lemma csx_fwd_pair_sn: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ②{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] V. +/2 width=5 by csx_fwd_pair_sn_aux/ qed-. + +fact csx_fwd_bind_dx_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → + ∀a,I,V,T. U = ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #U #H elim H -H #U0 #_ #IH #a #I #V #T #H destruct +@csx_intro #T2 #HLT2 #HT2 +@(IH (ⓑ{a,I}V.T2)) -IH /2 width=3 by cpx_bind/ -HLT2 +#H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was just: sn3_gen_bind *) +lemma csx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓑ{a,I}V.T → ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +/2 width=4 by csx_fwd_bind_dx_aux/ qed-. + +fact csx_fwd_flat_dx_aux: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → + ∀I,V,T. U = ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct +@csx_intro #T2 #HLT2 #HT2 +@(IH (ⓕ{I}V.T2)) -IH /2 width=3 by cpx_flat/ -HLT2 +#H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was just: sn3_gen_flat *) +lemma csx_fwd_flat_dx: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓕ{I}V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +/2 width=5 by csx_fwd_flat_dx_aux/ qed-. + +lemma csx_fwd_bind: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓑ{a,I}V.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] V ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ⬊*[h, g] T. +/3 width=3 by csx_fwd_pair_sn, csx_fwd_bind_dx, conj/ qed-. + +lemma csx_fwd_flat: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓕ{I}V.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] V ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] T. +/3 width=3 by csx_fwd_pair_sn, csx_fwd_flat_dx, conj/ qed-. + +(* Basic_1: removed theorems 14: + sn3_cdelta + sn3_gen_cflat sn3_cflat sn3_cpr3_trans sn3_shift sn3_change + sn3_appl_cast sn3_appl_beta sn3_appl_lref sn3_appl_abbr + sn3_appl_appls sn3_bind sn3_appl_bind sn3_appls_bind +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_aaa.ma new file mode 100644 index 000000000..7330de619 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_aaa.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/gcp_aaa.ma". +include "basic_2A/computation/cpxs_aaa.ma". +include "basic_2A/computation/csx_tsts_vector.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Main properties on atomic arity assignment *******************************) + +theorem aaa_csx: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #A #H +@(gcr_aaa … (csx_gcp h g) (csx_gcr h g) … H) +qed. + +(* Advanced eliminators *****************************************************) + +fact aaa_ind_csx_aux: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. +#h #g #G #L #A #R #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/ +qed-. + +lemma aaa_ind_csx: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ T ⁝ A → R T. +/5 width=9 by aaa_ind_csx_aux, aaa_csx/ qed-. + +fact aaa_ind_csx_alt_aux: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ T ⁝ A → R T. +#h #g #G #L #A #R #IH #T #H @(csx_ind_alt … H) -T /4 width=5 by cpxs_aaa_conf/ +qed-. + +lemma aaa_ind_csx_alt: ∀h,g,G,L,A. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ T1 ⁝ A → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ T ⁝ A → R T. +/5 width=9 by aaa_ind_csx_alt_aux, aaa_csx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_alt.ma new file mode 100644 index 000000000..396dc0ee1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_alt.ma @@ -0,0 +1,107 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/snalt_5.ma". +include "basic_2A/computation/cpxs.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* alternative definition of csx *) +definition csxa: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L. SN … (cpxs h g G L) (eq …). + +interpretation + "context-sensitive extended strong normalization (term) alternative" + 'SNAlt h g G L T = (csxa h g G L T). + +(* Basic eliminators ********************************************************) + +lemma csxa_ind: ∀h,g,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T → R T. +#h #g #G #L #R #H0 #T1 #H elim H -T1 /5 width=1 by SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma csx_intro_cpxs: ∀h,g,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] T2) → + ⦃G, L⦄ ⊢ ⬊*[h, g] T1. +/4 width=1 by cpx_cpxs, csx_intro/ qed. + +(* Basic_1: was just: sn3_intro *) +lemma csxa_intro: ∀h,g,G,L,T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2) → + ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +/4 width=1 by SN_intro/ qed. + +fact csxa_intro_aux: ∀h,g,G,L,T1. ( + ∀T,T2. ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → T1 = T → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2 + ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +/4 width=3 by csxa_intro/ qed-. + +(* Basic_1: was just: sn3_pr3_trans (old version) *) +lemma csxa_cpxs_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2. +#h #g #G #L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12 +@csxa_intro #T #HLT2 #HT2 +elim (eq_term_dec T1 T2) #HT12 +[ -IHT1 -HLT12 destruct /3 width=1 by/ +| -HT1 -HT2 /3 width=4 by/ +qed. + +(* Basic_1: was just: sn3_pr2_intro (old version) *) +lemma csxa_intro_cpx: ∀h,g,G,L,T1. ( + ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T2 + ) → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T1. +#h #g #G #L #T1 #H +@csxa_intro_aux #T #T2 #H @(cpxs_ind_dx … H) -T +[ -H #H destruct #H + elim H // +| #T0 #T #HLT1 #HLT2 #IHT #HT10 #HT12 destruct + elim (eq_term_dec T0 T) #HT0 + [ -HLT1 -HLT2 -H /3 width=1 by/ + | -IHT -HT12 /4 width=3 by csxa_cpxs_trans/ + ] +] +qed. + +(* Main properties **********************************************************) + +theorem csx_csxa: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T. +#h #g #G #L #T #H @(csx_ind … H) -T /4 width=1 by csxa_intro_cpx/ +qed. + +theorem csxa_csx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #H @(csxa_ind … H) -T /4 width=1 by cpx_cpxs, csx_intro/ +qed. + +(* Basic_1: was just: sn3_pr3_trans *) +lemma csx_cpxs_trans: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L #T1 #HT1 #T2 #H @(cpxs_ind … H) -T2 /2 width=3 by csx_cpx_trans/ +qed-. + +(* Main eliminators *********************************************************) + +lemma csx_ind_alt: ∀h,g,G,L. ∀R:predicate term. + (∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 = T2 → ⊥) → R T2) → R T1 + ) → + ∀T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R T. +#h #g #G #L #R #H0 #T1 #H @(csxa_ind … (csx_csxa … H)) -T1 /4 width=1 by csxa_csx/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_fpbs.ma new file mode 100644 index 000000000..0d2f18aa3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_fpbs.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs.ma". +include "basic_2A/computation/csx_lleq.ma". +include "basic_2A/computation/csx_lpx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Advanced properties ******************************************************) + +lemma csx_fpb_conf: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * +/2 width=5 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_lleq_conf/ +qed-. + +lemma csx_fpbs_conf: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #L1 #T1 #HT1 #G2 #L2 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 +/2 width=5 by csx_fpb_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lift.ma new file mode 100644 index 000000000..6bda54375 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lift.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cnx_lift.ma". +include "basic_2A/computation/gcp.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Relocation properties ****************************************************) + +(* Basic_1: was just: sn3_lift *) +lemma csx_lift: ∀h,g,G,L2,L1,T1,s,l,m. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⬇[s, l, m] L2 ≡ L1 → ⬆[l, m] T1 ≡ T2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L2 #L1 #T1 #s #l #m #H elim H -T1 #T1 #_ #IHT1 #T2 #HL21 #HT12 +@csx_intro #T #HLT2 #HT2 +elim (cpx_inv_lift1 … HLT2 … HL21 … HT12) -HLT2 #T0 #HT0 #HLT10 +@(IHT1 … HLT10) // -L1 -L2 #H destruct +>(lift_mono … HT0 … HT12) in HT2; -T1 /2 width=1 by/ +qed. + +(* Basic_1: was just: sn3_gen_lift *) +lemma csx_inv_lift: ∀h,g,G,L2,L1,T1,s,l,m. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀T2. ⬇[s, l, m] L1 ≡ L2 → ⬆[l, m] T2 ≡ T1 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G #L2 #L1 #T1 #s #l #m #H elim H -T1 #T1 #_ #IHT1 #T2 #HL12 #HT21 +@csx_intro #T #HLT2 #HT2 +elim (lift_total T l m) #T0 #HT0 +lapply (cpx_lift … HLT2 … HL12 … HT21 … HT0) -HLT2 #HLT10 +@(IHT1 … HLT10) // -L1 -L2 #H destruct +>(lift_inj … HT0 … HT21) in HT2; -T1 /2 width=1 by/ +qed. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was: sn3_gen_def *) +lemma csx_inv_lref_bind: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → + ⦃G, L⦄ ⊢ ⬊*[h, g] #i → ⦃G, K⦄ ⊢ ⬊*[h, g] V. +#h #g #I #G #L #K #V #i #HLK #Hi +elim (lift_total V 0 (i+1)) +/4 width=9 by csx_inv_lift, csx_cpx_trans, cpx_delta, drop_fwd_drop2/ +qed-. + +(* Advanced properties ******************************************************) + +(* Basic_1: was just: sn3_abbr *) +lemma csx_lref_bind: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ ⬊*[h, g] V → ⦃G, L⦄ ⊢ ⬊*[h, g] #i. +#h #g #I #G #L #K #V #i #HLK #HV +@csx_intro #X #H #Hi +elim (cpx_inv_lref1 … H) -H +[ #H destruct elim Hi // +| -Hi * #I0 #K0 #V0 #V1 #HLK0 #HV01 #HV1 + lapply (drop_mono … HLK0 … HLK) -HLK #H destruct + /3 width=8 by csx_lift, csx_cpx_trans, drop_fwd_drop2/ +] +qed. + +lemma csx_appl_simple: ∀h,g,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → ∀T1. + (∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T2) → + 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T1. +#h #g #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #IHT1 #HT1 +@csx_intro #X #H1 #H2 +elim (cpx_inv_appl1_simple … H1) // -H1 +#V0 #T0 #HLV0 #HLT10 #H destruct +elim (eq_false_inv_tpair_dx … H2) -H2 +[ -IHV -HT1 /4 width=3 by csx_cpx_trans, cpx_pair_sn/ +| -HLT10 * #H #HV0 destruct + @IHV /4 width=3 by csx_cpx_trans, cpx_pair_sn/ (**) (* full auto 17s *) +] +qed. + +lemma csx_fqu_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/2 width=8 by csx_inv_lref_bind, csx_inv_lift, csx_fwd_flat_dx, csx_fwd_bind_dx, csx_fwd_pair_sn/ +qed-. + +lemma csx_fquq_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fquq_inv_gen … H12) -H12 +[ /2 width=5 by csx_fqu_conf/ +| * #HG #HL #HT destruct // +] +qed-. + +lemma csx_fqup_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by csx_fqu_conf/ +qed-. + +lemma csx_fqus_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → ⦃G2, L2⦄ ⊢ ⬊*[h, g] T2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H12 #H elim (fqus_inv_gen … H12) -H12 +[ /2 width=5 by csx_fqup_conf/ +| * #HG #HL #HT destruct // +] +qed-. + +(* Main properties **********************************************************) + +theorem csx_gcp: ∀h,g. gcp (cpx h g) (eq …) (csx h g). +#h #g @mk_gcp +[ normalize /3 width=13 by cnx_lift/ +| #G #L elim (deg_total h g 0) /3 width=8 by cnx_sort_iter, ex_intro/ +| /2 width=8 by csx_lift/ +| /2 width=3 by csx_fwd_flat_dx/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lleq.ma new file mode 100644 index 000000000..6e23a716e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lleq.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lleq.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma csx_lleq_conf: ∀h,g,G,L1,T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → + ∀L2. L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L1 #T #H @(csx_ind … H) -T +/4 width=6 by csx_intro, cpx_lleq_conf_dx, lleq_cpx_trans/ +qed-. + +lemma csx_lleq_trans: ∀h,g,G,L1,L2,T. + L1 ≡[T, 0] L2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T → ⦃G, L1⦄ ⊢ ⬊*[h, g] T. +/3 width=3 by csx_lleq_conf, lleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpx.ma new file mode 100644 index 000000000..72e0bc13b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpx.ma @@ -0,0 +1,138 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts_tsts.ma". +include "basic_2A/computation/cpxs_cpxs.ma". +include "basic_2A/computation/csx_alt.ma". +include "basic_2A/computation/csx_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Advanced properties ******************************************************) + +lemma csx_lpx_conf: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → + ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L1 #L2 #HL12 #T #H @(csx_ind_alt … H) -T +/4 width=3 by csx_intro, lpx_cpx_trans/ +qed-. + +lemma csx_abst: ∀h,g,a,G,L,W. ⦃G, L⦄ ⊢ ⬊*[h, g] W → + ∀T. ⦃G, L.ⓛW⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓛ{a}W.T. +#h #g #a #G #L #W #HW @(csx_ind … HW) -W #W #_ #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT +@csx_intro #X #H1 #H2 +elim (cpx_inv_abst1 … H1) -H1 +#W0 #T0 #HLW0 #HLT0 #H destruct +elim (eq_false_inv_tpair_sn … H2) -H2 +[ -IHT #H lapply (csx_cpx_trans … HLT0) // -HT + #HT0 lapply (csx_lpx_conf … (L.ⓛW0) … HT0) -HT0 /3 width=1 by lpx_pair/ +| -IHW -HLW0 -HT * #H destruct /3 width=1 by/ +] +qed. + +lemma csx_abbr: ∀h,g,a,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → + ∀T. ⦃G, L.ⓓV⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V. T. +#h #g #a #G #L #V #HV elim HV -V #V #_ #IHV #T #HT @(csx_ind_alt … HT) -T #T #HT #IHT +@csx_intro #X #H1 #H2 +elim (cpx_inv_abbr1 … H1) -H1 * +[ #V1 #T1 #HLV1 #HLT1 #H destruct + elim (eq_false_inv_tpair_sn … H2) -H2 + [ /4 width=5 by csx_cpx_trans, csx_lpx_conf, lpx_pair/ + | -IHV -HLV1 * #H destruct /3 width=1 by cpx_cpxs/ + ] +| -IHV -IHT -H2 + /3 width=8 by csx_cpx_trans, csx_inv_lift, drop_drop/ +] +qed. + +fact csx_appl_beta_aux: ∀h,g,a,G,L,U1. ⦃G, L⦄ ⊢ ⬊*[h, g] U1 → + ∀V,W,T1. U1 = ⓓ{a}ⓝW.V.T1 → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.ⓛ{a}W.T1. +#h #g #a #G #L #X #H @(csx_ind … H) -X +#X #HT1 #IHT1 #V #W #T1 #H1 destruct +@csx_intro #X #H1 #H2 +elim (cpx_inv_appl1 … H1) -H1 * +[ -HT1 #V0 #Y #HLV0 #H #H0 destruct + elim (cpx_inv_abst1 … H) -H #W0 #T0 #HLW0 #HLT0 #H destruct + @IHT1 -IHT1 [4: // | skip |3: #H destruct /2 width=1 by/ ] -H2 + lapply (lsubr_cpx_trans … HLT0 (L.ⓓⓝW.V) ?) -HLT0 /3 width=1 by cpx_bind, cpx_flat, lsubr_beta/ +| -IHT1 -H2 #b #V0 #W0 #W2 #T0 #T2 #HLV0 #HLW02 #HLT02 #H1 #H3 destruct + lapply (lsubr_cpx_trans … HLT02 (L.ⓓⓝW0.V) ?) -HLT02 + /4 width=5 by csx_cpx_trans, cpx_bind, cpx_flat, lsubr_beta/ +| -HT1 -IHT1 -H2 #b #V0 #V1 #W0 #W1 #T0 #T3 #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: sn3_beta *) +lemma csx_appl_beta: ∀h,g,a,G,L,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}ⓝW.V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.ⓛ{a}W.T. +/2 width=3 by csx_appl_beta_aux/ qed. + +fact csx_appl_theta_aux: ∀h,g,a,G,L,U. ⦃G, L⦄ ⊢ ⬊*[h, g] U → ∀V1,V2. ⬆[0, 1] V1 ≡ V2 → + ∀V,T. U = ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T. +#h #g #a #G #L #X #H @(csx_ind_alt … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct +lapply (csx_fwd_pair_sn … HVT) #HV +lapply (csx_fwd_bind_dx … HVT) -HVT #HVT +@csx_intro #X #HL #H +elim (cpx_inv_appl1 … HL) -HL * +[ -HV #V0 #Y #HLV10 #HL #H0 destruct + elim (cpx_inv_abbr1 … HL) -HL * + [ #V3 #T3 #HV3 #HLT3 #H0 destruct + elim (lift_total V0 0 1) #V4 #HV04 + elim (eq_term_dec (ⓓ{a}V.ⓐV2.T) (ⓓ{a}V3.ⓐV4.T3)) + [ -IHVT #H0 destruct + elim (eq_false_inv_tpair_sn … H) -H + [ -HLV10 -HV3 -HLT3 -HVT + >(lift_inj … HV12 … HV04) -V4 + #H elim H // + | * #_ #H elim H // + ] + | -H -HVT #H + lapply (cpx_lift … HLV10 (L.ⓓV) (Ⓕ) … HV12 … HV04) -HLV10 -HV12 /2 width=1 by drop_drop/ #HV24 + @(IHVT … H … HV04) -IHVT /4 width=1 by cpx_cpxs, cpx_bind, cpx_flat/ + ] + | -H -IHVT #T0 #HLT0 #HT0 #H0 destruct + lapply (csx_cpx_trans … HVT (ⓐV2.T0) ?) /2 width=1 by cpx_flat/ -T #HVT0 + lapply (csx_inv_lift … L … (Ⓕ) … 1 HVT0 ? ? ?) -HVT0 + /3 width=5 by csx_cpx_trans, cpx_pair_sn, drop_drop, lift_flat/ + ] +| -HV -HV12 -HVT -IHVT -H #b #V0 #W0 #W1 #T0 #T1 #_ #_ #_ #H destruct +| -IHVT -H #b #V0 #V3 #W0 #W1 #T0 #T1 #HLV10 #HV03 #HLW01 #HLT01 #H1 #H2 destruct + lapply (cpx_lift … HLV10 (L. ⓓW0) … HV12 … HV03) -HLV10 -HV12 -HV03 /2 width=2 by drop_drop/ #HLV23 + @csx_abbr /2 width=3 by csx_cpx_trans/ -HV + @(csx_lpx_conf … (L.ⓓW0)) /2 width=1 by lpx_pair/ -W1 + /4 width=5 by csx_cpxs_trans, cpx_cpxs, cpx_flat/ +] +qed-. + +lemma csx_appl_theta: ∀h,g,a,V1,V2. ⬆[0, 1] V1 ≡ V2 → + ∀G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T. +/2 width=5 by csx_appl_theta_aux/ qed. + +(* Basic_1: was just: sn3_appl_appl *) +lemma csx_appl_simple_tsts: ∀h,g,G,L,V. ⦃G, L⦄ ⊢ ⬊*[h, g] V → ∀T1. ⦃G, L⦄ ⊢ ⬊*[h, g] T1 → + (∀T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → (T1 ≂ T2 → ⊥) → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T2) → + 𝐒⦃T1⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.T1. +#h #g #G #L #V #H @(csx_ind … H) -V #V #_ #IHV #T1 #H @(csx_ind … H) -T1 #T1 #H1T1 #IHT1 #H2T1 #H3T1 +@csx_intro #X #HL #H +elim (cpx_inv_appl1_simple … HL) -HL // +#V0 #T0 #HLV0 #HLT10 #H0 destruct +elim (eq_false_inv_tpair_sn … H) -H +[ -IHT1 #HV0 + @(csx_cpx_trans … (ⓐV0.T1)) /2 width=1 by cpx_flat/ -HLT10 + @IHV -IHV /4 width=3 by csx_cpx_trans, cpx_pair_sn/ +| -IHV -H1T1 -HLV0 * #H #H1T10 destruct + elim (tsts_dec T1 T0) #H2T10 + [ @IHT1 -IHT1 /4 width=3 by cpxs_strap2, cpxs_strap1, tsts_canc_sn, simple_tsts_repl_dx/ + | -IHT1 -H3T1 -H1T10 /3 width=1 by cpx_cpxs/ + ] +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpxs.ma new file mode 100644 index 000000000..4128a4e08 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_lpxs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/csx_lpx.ma". +include "basic_2A/computation/lpxs.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERMS ********************) + +(* Properties on sn extended parallel computation for local environments ****) + +lemma csx_lpxs_conf: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + ∀T. ⦃G, L1⦄ ⊢ ⬊*[h, g] T → ⦃G, L2⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L1 #L2 #H @(lpxs_ind … H) -L2 /3 by lpxs_strap1, csx_lpx_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_tsts_vector.ma new file mode 100644 index 000000000..51345fb0f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_tsts_vector.ma @@ -0,0 +1,128 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/gcp_cr.ma". +include "basic_2A/computation/cpxs_tsts_vector.ma". +include "basic_2A/computation/csx_lpx.ma". +include "basic_2A/computation/csx_vector.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERM VECTORS *************) + +(* Advanced properties ******************************************************) + +(* Basic_1: was just: sn3_appls_lref *) +lemma csx_applv_cnx: ∀h,g,G,L,T. 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → + ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Vs → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.T. +#h #g #G #L #T #H1T #H2T #Vs elim Vs -Vs [ #_ @(cnx_csx … H2T) ] (**) (* /2 width=1/ does not work *) +#V #Vs #IHV #H +elim (csxv_inv_cons … H) -H #HV #HVs +@csx_appl_simple_tsts /2 width=1 by applv_simple/ -IHV -HV -HVs +#X #H #H0 +lapply (cpxs_fwd_cnx_vector … H) -H // -H1T -H2T #H +elim (H0) -H0 // +qed. + +lemma csx_applv_sort: ∀h,g,G,L,k,Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Vs → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.⋆k. +#h #g #G #L #k elim (deg_total h g k) +#d generalize in match k; -k @(nat_ind_plus … d) -d [ /3 width=6 by csx_applv_cnx, cnx_sort, simple_atom/ ] +#d #IHd #k #Hkd lapply (deg_next_SO … Hkd) -Hkd +#Hkd #Vs elim Vs -Vs /2 width=1 by/ +#V #Vs #IHVs #HVVs +elim (csxv_inv_cons … HVVs) #HV #HVs +@csx_appl_simple_tsts /2 width=1 by applv_simple, simple_atom/ -IHVs -HV -HVs +#X #H #H0 +elim (cpxs_fwd_sort_vector … H) -H #H +[ elim H0 -H0 // +| -H0 @(csx_cpxs_trans … (Ⓐ(V@Vs).⋆(next h k))) /2 width=1 by cpxs_flat_dx/ +] +qed. + +(* Basic_1: was just: sn3_appls_beta *) +lemma csx_applv_beta: ∀h,g,a,G,L,Vs,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.ⓓ{a}ⓝW.V.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs. ⓐV.ⓛ{a}W.T. +#h #g #a #G #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/ +#V0 #Vs #IHV #V #W #T #H1T +lapply (csx_fwd_pair_sn … H1T) #HV0 +lapply (csx_fwd_flat_dx … H1T) #H2T +@csx_appl_simple_tsts /2 width=1 by applv_simple, simple_flat/ -IHV -HV0 -H2T +#X #H #H0 +elim (cpxs_fwd_beta_vector … H) -H #H +[ -H1T elim H0 -H0 // +| -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +] +qed. + +lemma csx_applv_delta: ∀h,g,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[0, i + 1] V1 ≡ V2 → + ∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.V2) → ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.#i). +#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs +[ /4 width=12 by csx_inv_lift, csx_lref_bind, drop_fwd_drop2/ +| #V #Vs #IHV #H1T + lapply (csx_fwd_pair_sn … H1T) #HV + lapply (csx_fwd_flat_dx … H1T) #H2T + @csx_appl_simple_tsts /2 width=1 by applv_simple, simple_atom/ -IHV -HV -H2T + #X #H #H0 + elim (cpxs_fwd_delta_vector … HLK … HV12 … H) -HLK -HV12 -H #H + [ -H1T elim H0 -H0 // + | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ + ] +] +qed. + +(* Basic_1: was just: sn3_appls_abbr *) +lemma csx_applv_theta: ∀h,g,a,G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → + ∀V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⒶV2s.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶV1s.ⓓ{a}V.T. +#h #g #a #G #L #V1s #V2s * -V1s -V2s /2 width=1 by/ +#V1s #V2s #V1 #V2 #HV12 #H +generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1 +elim H -V1s -V2s /2 width=3 by csx_appl_theta/ +#V1s #V2s #V1 #V2 #HV12 #HV12s #IHV12s #W1 #W2 #HW12 #V #T #H +lapply (csx_appl_theta … HW12 … H) -H -HW12 #H +lapply (csx_fwd_pair_sn … H) #HW1 +lapply (csx_fwd_flat_dx … H) #H1 +@csx_appl_simple_tsts /2 width=3 by simple_flat/ -IHV12s -HW1 -H1 #X #H1 #H2 +elim (cpxs_fwd_theta_vector … (V2@V2s) … H1) -H1 /2 width=1 by liftv_cons/ -HV12s -HV12 +[ -H #H elim H2 -H2 // +| -H2 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +] +qed. + +(* Basic_1: was just: sn3_appls_cast *) +lemma csx_applv_cast: ∀h,g,G,L,Vs,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.W → ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] ⒶVs.ⓝW.T. +#h #g #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/ +#V #Vs #IHV #W #T #H1W #H1T +lapply (csx_fwd_pair_sn … H1W) #HV +lapply (csx_fwd_flat_dx … H1W) #H2W +lapply (csx_fwd_flat_dx … H1T) #H2T +@csx_appl_simple_tsts /2 width=1 by applv_simple, simple_flat/ -IHV -HV -H2W -H2T +#X #H #H0 +elim (cpxs_fwd_cast_vector … H) -H #H +[ -H1W -H1T elim H0 -H0 // +| -H1W -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +| -H1T -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/ +] +qed. + +theorem csx_gcr: ∀h,g. gcr (cpx h g) (eq …) (csx h g) (csx h g). +#h #g @mk_gcr // +[ /3 width=1 by csx_applv_cnx/ +|2,3,6: /2 width=1 by csx_applv_beta, csx_applv_sort, csx_applv_cast/ +| /2 width=7 by csx_applv_delta/ +| #G #L #V1s #V2s #HV12s #a #V #T #H #HV + @(csx_applv_theta … HV12s) -HV12s + @csx_abbr // +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_vector.ma new file mode 100644 index 000000000..b45bc8b5e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/csx_vector.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/term_vector.ma". +include "basic_2A/computation/csx.ma". + +(* CONTEXT-SENSITIVE EXTENDED STRONGLY NORMALIZING TERM VECTORS *************) + +definition csxv: ∀h. sd h → relation3 genv lenv (list term) ≝ + λh,g,G,L. all … (csx h g G L). + +interpretation + "context-sensitive strong normalization (term vector)" + 'SN h g G L Ts = (csxv h g G L Ts). + +(* Basic inversion lemmas ***************************************************) + +lemma csxv_inv_cons: ∀h,g,G,L,T,Ts. ⦃G, L⦄ ⊢ ⬊*[h, g] T @ Ts → + ⦃G, L⦄ ⊢ ⬊*[h, g] T ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] Ts. +normalize // qed-. + +(* Basic forward lemmas *****************************************************) + +lemma csx_fwd_applv: ∀h,g,G,L,T,Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] Ⓐ Vs.T → + ⦃G, L⦄ ⊢ ⬊*[h, g] Vs ∧ ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #Vs elim Vs -Vs /2 width=1 by conj/ +#V #Vs #IHVs #HVs +lapply (csx_fwd_pair_sn … HVs) #HV +lapply (csx_fwd_flat_dx … HVs) -HVs #HVs +elim (IHVs HVs) -IHVs -HVs /3 width=1 by conj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg.ma new file mode 100644 index 000000000..0fc277169 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazybtpredstarproper_8.ma". +include "basic_2A/reduction/fpb.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +definition fpbg: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g,G1,L1,T1,G2,L2,T2. + ∃∃G,L,T. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G, L, T⦄ & ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄. + +interpretation "'qrst' proper parallel computation (closure)" + 'LazyBTPRedStarProper h g G1 L1 T1 G2 L2 T2 = (fpbg h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fpb_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +/2 width=5 by ex2_3_intro/ qed. + +lemma fpbg_fpbq_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 * +/3 width=9 by fpbs_strap1, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fleq.ma new file mode 100644 index 000000000..a4f2708a0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fleq.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fleq_fleq.ma". +include "basic_2A/reduction/fpbq_alt.ma". +include "basic_2A/computation/fpbg.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +(* Properties on lazy equivalence for closures ******************************) + +lemma fpbg_fleq_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbg_fpbq_trans, fleq_fpbq/ qed-. + +lemma fleq_fpbg_trans: ∀h,g,G,G2,L,L2,T,T2. ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≡[0] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1 +elim (fleq_fpb_trans … H1 … H0) -G -L -T +/4 width=9 by fpbs_strap2, fleq_fpbq, ex2_3_intro/ +qed-. + +(* alternative definition of fpbs *******************************************) + +lemma fleq_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by lleq_fpbs/ +qed. + +lemma fpbg_fwd_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ >≡[h,g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * +/3 width=5 by fpbs_strap2, fpb_fpbq/ +qed-. + +lemma fpbs_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ ∨ + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 +[ /2 width=1 by or_introl/ +| #G #G2 #L #L2 #T #T2 #_ #H2 * #H1 @(fpbq_ind_alt … H2) -H2 #H2 + [ /3 width=5 by fleq_trans, or_introl/ + | elim (fleq_fpb_trans … H1 … H2) -G -L -T + /4 width=5 by ex2_3_intro, or_intror, fleq_fpbs/ + | /3 width=5 by fpbg_fleq_trans, or_intror/ + | /4 width=5 by fpbg_fpbq_trans, fpb_fpbq, or_intror/ + ] +] +qed-. + +(* Advanced properties of "qrst" parallel computation on closures ***********) + +lemma fpbs_fpb_trans: ∀h,g,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≥[h, g] ⦃F2, K2, T2⦄ → + ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, g] ⦃G2, L2, U2⦄ → + ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, g] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≥[h, g] ⦃G2, L2, U2⦄. +#h #g #F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_fpbg … H) -H +[ #H12 #G2 #L2 #U2 #H2 elim (fleq_fpb_trans … H12 … H2) -F2 -K2 -T2 + /3 width=5 by fleq_fpbs, ex2_3_intro/ +| * #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #H9 + @(ex2_3_intro … H4) -H4 /3 width=5 by fpbs_strap1, fpb_fpbq/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbg.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbg.ma new file mode 100644 index 000000000..9387b5f08 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbg.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbg_fpbs.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +(* Main properties **********************************************************) + +theorem fpbg_trans: ∀h,g. tri_transitive … (fpbg h g). +/3 width=5 by fpbg_fpbs_trans, fpbg_fwd_fpbs/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbs.ma new file mode 100644 index 000000000..366819fd1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_fpbs.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lpxs_lleq.ma". +include "basic_2A/computation/fpbs_lift.ma". +include "basic_2A/computation/fpbg_fleq.ma". + +(* "QRST" PROPER PARALLEL COMPUTATION FOR CLOSURES **************************) + +(* Properties on "qrst" parallel reduction on closures **********************) + +lemma fpb_fpbg_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ≻[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbg_fwd_fpbs, ex2_3_intro/ qed-. + +lemma fpbq_fpbg_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fpbq_ind_alt … H1) -H1 +/2 width=5 by fleq_fpbg_trans, fpb_fpbg_trans/ +qed-. + +(* Properties on "qrst" parallel compuutation on closures *******************) + +lemma fpbs_fpbg_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ >≡[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #L1 #L #T1 #T #H @(fpbs_ind … H) -G -L -T /3 width=5 by fpbq_fpbg_trans/ +qed-. + +(* Note: this is used in the closure proof *) +lemma fpbg_fpbs_trans: ∀h,g,G,G2,L,L2,T,T2. ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G #G2 #L #L2 #T #T2 #H @(fpbs_ind_dx … H) -G -L -T /3 width=5 by fpbg_fpbq_trans/ +qed-. + +(* Note: this is used in the closure proof *) +lemma fqup_fpbg: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqup_inv_step_sn … H) -H +/3 width=5 by fqus_fpbs, fpb_fqu, ex2_3_intro/ +qed. + +lemma cpxs_fpbg: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → + (T1 = T2 → ⊥) → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +#h #g #G #L #T1 #T2 #H #H0 elim (cpxs_neq_inv_step_sn … H … H0) -H -H0 +/4 width=5 by cpxs_fpbs, fpb_cpx, ex2_3_intro/ +qed. + +lemma lstas_fpbg: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → (T1 = T2 → ⊥) → + ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +/3 width=5 by lstas_cpxs, cpxs_fpbg/ qed. + +lemma lpxs_fpbg: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + (L1 ≡[T, 0] L2 → ⊥) → ⦃G, L1, T⦄ >≡[h, g] ⦃G, L2, T⦄. +#h #g #G #L1 #L2 #T #H #H0 elim (lpxs_nlleq_inv_step_sn … H … H0) -H -H0 +/4 width=5 by fpb_lpx, lpxs_lleq_fpbs, ex2_3_intro/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_lift.ma new file mode 100644 index 000000000..aa27d1f90 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbg_lift.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/fpb_lift.ma". +include "basic_2A/computation/fpbg.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Advanced properties ******************************************************) + +lemma sta_fpbg: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄. +/4 width=2 by fpb_fpbg, sta_fpb/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs.ma new file mode 100644 index 000000000..e72a56c3e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs.ma @@ -0,0 +1,161 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredstar_8.ma". +include "basic_2A/multiple/fqus.ma". +include "basic_2A/reduction/fpbq.ma". +include "basic_2A/computation/cpxs.ma". +include "basic_2A/computation/lpxs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +definition fpbs: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g. tri_TC … (fpbq h g). + +interpretation "'qrst' parallel computation (closure)" + 'BTPRedStar h g G1 L1 T1 G2 L2 T2 = (fpbs h g G1 L1 T1 G2 L2 T2). + +(* Basic eliminators ********************************************************) + +lemma fpbs_ind: ∀h,g,G1,L1,T1. ∀R:relation3 genv lenv term. R G1 L1 T1 → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2. +/3 width=8 by tri_TC_star_ind/ qed-. + +lemma fpbs_ind_dx: ∀h,g,G2,L2,T2. ∀R:relation3 genv lenv term. R G2 L2 T2 → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → R G1 L1 T1. +/3 width=8 by tri_TC_star_ind_dx/ qed-. + +(* Basic properties *********************************************************) + +lemma fpbs_refl: ∀h,g. tri_reflexive … (fpbs h g). +/2 width=1 by tri_inj/ qed. + +lemma fpbq_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fpbs_strap1: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ≽[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed-. + +lemma fpbs_strap2: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed-. + +lemma fqup_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/4 width=5 by fqu_fquq, fpbq_fquq, tri_step/ +qed. + +lemma fqus_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 +/3 width=5 by fpbq_fquq, tri_step/ +qed. + +lemma cpxs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +#h #g #G #L #T1 #T2 #H @(cpxs_ind … H) -T2 +/3 width=5 by fpbq_cpx, fpbs_strap1/ +qed. + +lemma lpxs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +#h #g #G #L1 #L2 #T #H @(lpxs_ind … H) -L2 +/3 width=5 by fpbq_lpx, fpbs_strap1/ +qed. + +lemma lleq_fpbs: ∀h,g,G,L1,L2,T. L1 ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=1 by fpbq_fpbs, fpbq_lleq/ qed. + +lemma cprs_fpbs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +/3 width=1 by cprs_cpxs, cpxs_fpbs/ qed. + +lemma lprs_fpbs: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=1 by lprs_lpxs, lpxs_fpbs/ qed. + +lemma fpbs_fqus_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind … H) -G2 -L2 -T2 +/3 width=5 by fpbs_strap1, fpbq_fquq/ +qed-. + +lemma fpbs_fqup_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_fqus_trans, fqup_fqus/ qed-. + +lemma fpbs_cpxs_trans: ∀h,g,G1,G,L1,L,T1,T,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L⦄ ⊢ T ➡*[h, g] T2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +#h #g #G1 #G #L1 #L #T1 #T #T2 #H1 #H @(cpxs_ind … H) -T2 +/3 width=5 by fpbs_strap1, fpbq_cpx/ +qed-. + +lemma fpbs_lpxs_trans: ∀h,g,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + ⦃G, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L2, T⦄. +#h #g #G1 #G #L1 #L #L2 #T1 #T #H1 #H @(lpxs_ind … H) -L2 +/3 width=5 by fpbs_strap1, fpbq_lpx/ +qed-. + +lemma fpbs_lleq_trans: ∀h,g,G1,G,L1,L,L2,T1,T. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L, T⦄ → + L ≡[T, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=5 by fpbs_strap1, fpbq_lleq/ qed-. + +lemma fqus_fpbs_trans: ∀h,g,G1,G,G2,L1,L,L2,T1,T,T2. ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H @(fqus_ind_dx … H) -G1 -L1 -T1 +/3 width=5 by fpbs_strap2, fpbq_fquq/ +qed-. + +lemma cpxs_fpbs_trans: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1, T⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T #T2 #H1 #H @(cpxs_ind_dx … H) -T1 +/3 width=5 by fpbs_strap2, fpbq_cpx/ +qed-. + +lemma lpxs_fpbs_trans: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ ➡*[h, g] L → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L #L2 #T1 #T2 #H1 #H @(lpxs_ind_dx … H) -L1 +/3 width=5 by fpbs_strap2, fpbq_lpx/ +qed-. + +lemma lleq_fpbs_trans: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + L1 ≡[T1, 0] L → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_strap2, fpbq_lleq/ qed-. + +lemma cpxs_fqus_fpbs: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → + ⦃G1, L1, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_fqus_trans, cpxs_fpbs/ qed. + +lemma cpxs_fqup_fpbs: ∀h,g,G1,G2,L1,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → + ⦃G1, L1, T⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by fpbs_fqup_trans, cpxs_fpbs/ qed. + +lemma fqus_lpxs_fpbs: ∀h,g,G1,G2,L1,L,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L, T2⦄ → + ⦃G2, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=3 by fpbs_lpxs_trans, fqus_fpbs/ qed. + +lemma cpxs_fqus_lpxs_fpbs: ∀h,g,G1,G2,L1,L,L2,T1,T,T2. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → + ⦃G1, L1, T⦄ ⊐* ⦃G2, L, T2⦄ → ⦃G2, L⦄ ⊢ ➡*[h, g] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=5 by cpxs_fqus_fpbs, fpbs_lpxs_trans/ qed. + +lemma lpxs_lleq_fpbs: ∀h,g,G,L1,L,L2,T. ⦃G, L1⦄ ⊢ ➡*[h, g] L → + L ≡[T, 0] L2 → ⦃G, L1, T⦄ ≥[h, g] ⦃G, L2, T⦄. +/3 width=3 by lpxs_fpbs_trans, lleq_fpbs/ qed. + +(* Note: this is used in the closure proof *) +lemma cpr_lpr_fpbs: ∀h,g,G,L1,L2,T1,T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, T2⦄. +/4 width=5 by fpbs_strap1, fpbq_fpbs, lpr_fpbq, cpr_fpbq/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_aaa.ma new file mode 100644 index 000000000..58d34248e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_aaa.ma @@ -0,0 +1,27 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/fpbq_aaa.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma fpbs_aaa_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2 /2 width=2 by ex_intro/ +#G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A +/2 width=8 by fpbq_aaa_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_alt.ma new file mode 100644 index 000000000..872928d5a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_alt.ma @@ -0,0 +1,82 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredstaralt_8.ma". +include "basic_2A/multiple/lleq_fqus.ma". +include "basic_2A/computation/cpxs_lleq.ma". +include "basic_2A/computation/lpxs_lleq.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QREST" PARALLEL COMPUTATION FOR CLOSURES ********************************) + +(* Note: alternative definition of fpbs *) +definition fpbsa: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g,G1,L1,T1,G2,L2,T2. + ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T & + ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ & + ⦃G2, L0⦄ ⊢ ➡*[h, g] L & L ≡[T2, 0] L2. + +interpretation "'big tree' parallel computation (closure) alternative" + 'BTPRedStarAlt h g G1 L1 T1 G2 L2 T2 = (fpbsa h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fpb_fpbsa_trans: ∀h,g,G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G, L, T⦄ → + ∀G2,L2,T2. ⦃G, L, T⦄ ≥≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G #L1 #L #T1 #T * -G -L -T [ #G #L #T #HG1 | #T #HT1 | #L #HL1 | #L #HL1 ] +#G2 #L2 #T2 * #L00 #L0 #T0 #HT0 #HG2 #HL00 #HL02 +[ elim (fquq_cpxs_trans … HT0 … HG1) -T + /3 width=7 by fqus_strap2, ex4_3_intro/ +| /3 width=7 by cpxs_strap2, ex4_3_intro/ +| lapply (lpx_cpxs_trans … HT0 … HL1) -HT0 #HT10 + elim (lpx_fqus_trans … HG2 … HL1) -L + /3 width=7 by lpxs_strap2, cpxs_trans, ex4_3_intro/ +| lapply (lleq_cpxs_trans … HT0 … HL1) -HT0 #HT0 + lapply (cpxs_lleq_conf_sn … HT0 … HL1) -HL1 #HL1 + elim (lleq_fqus_trans … HG2 … HL1) -L #K00 #HG12 #HKL00 + elim (lleq_lpxs_trans … HL00 … HKL00) -L00 + /3 width=9 by lleq_trans, ex4_3_intro/ +] +qed-. + +(* Main properties **********************************************************) + +theorem fpbs_fpbsa: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1 +/2 width=7 by fpb_fpbsa_trans, ex4_3_intro/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem fpbsa_inv_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≥≥[h, g] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * +/3 width=5 by cpxs_fqus_lpxs_fpbs, fpbs_strap1, fpbq_lleq/ +qed-. + +(* Advanced properties ******************************************************) + +lemma fpbs_intro_alt: ∀h,g,G1,G2,L1,L0,L,L2,T1,T,T2. + ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T → ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ → + ⦃G2, L0⦄ ⊢ ➡*[h, g] L → L ≡[T2, 0] L2 → ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ . +/3 width=7 by fpbsa_inv_fpbs, ex4_3_intro/ qed. + +(* Advanced inversion lemmas *************************************************) + +lemma fpbs_inv_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∃∃L0,L,T. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] T & + ⦃G1, L1, T⦄ ⊐* ⦃G2, L0, T2⦄ & + ⦃G2, L0⦄ ⊢ ➡*[h, g] L & L ≡[T2, 0] L2. +/2 width=1 by fpbs_fpbsa/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpb.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpb.ma new file mode 100644 index 000000000..634c21ae3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpb.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/fpbq_alt.ma". +include "basic_2A/computation/fpbs_alt.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Properties on extended context-sensitive parallel computation for terms **) + +lemma fpbs_cpx_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, g] U2 → (T2 = U2 → ⊥) → + ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ≥[h, g] ⦃G2, L2, U2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2 elim (fpbs_inv_alt … H) -H +#L00 #L0 #T0 #HT10 #H10 #HL00 #HL02 lapply (lleq_cpx_trans … HTU2 … HL02) -HTU2 +#HTU2 lapply (cpx_lleq_conf_sn … HTU2 … HL02) -HL02 +#HL02 lapply (lpxs_cpx_trans … HTU2 … HL00) -HTU2 +#HTU2 elim (fqus_cpxs_trans_neq … H10 … HTU2 HnTU2) -H10 -HTU2 -HnTU2 +#U0 #HTU0 #HnTU0 #HU02 elim (eq_term_dec T1 T0) #HnT10 destruct +[ -HT10 elim (cpxs_neq_inv_step_sn … HTU0 HnTU0) -HTU0 -HnTU0 +| -HnTU0 elim (cpxs_neq_inv_step_sn … HT10 HnT10) -HT10 -HnT10 +] +/4 width=10 by fpbs_intro_alt, cpxs_trans, ex3_intro/ +qed-. + +(* Properties on "rst" proper parallel reduction on closures ****************) + +lemma fpb_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄. +/3 width=1 by fpbq_fpbs, fpb_fpbq/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpbs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpbs.ma new file mode 100644 index 000000000..1f9a65437 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_fpbs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Main properties **********************************************************) + +theorem fpbs_trans: ∀h,g. tri_transitive … (fpbs h g). +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_lift.ma new file mode 100644 index 000000000..4b538ed1d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fpbs_lift.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cpxs_lift.ma". +include "basic_2A/computation/fpbs.ma". + +(* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************) + +(* Advanced properties ******************************************************) + +lemma lstas_fpbs: ∀h,g,G,L,T1,T2,d2. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → + ∀d1. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → ⦃G, L, T1⦄ ≥[h, g] ⦃G, L, T2⦄. +/3 width=5 by cpxs_fpbs, lstas_cpxs/ qed. + +lemma sta_fpbs: ∀h,g,G,L,T,U,d. + ⦃G, L⦄ ⊢ T ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T •*[h, 1] U → + ⦃G, L, T⦄ ≥[h, g] ⦃G, L, U⦄. +/2 width=5 by lstas_fpbs/ qed. + +(* Note: this is used in the closure proof *) +lemma cpr_lpr_sta_fpbs: ∀h,g,G,L1,L2,T1,T2,U2,d2. + ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L2⦄ ⊢ T2 ▪[h, g] d2+1 → ⦃G, L2⦄ ⊢ T2 •*[h, 1] U2 → + ⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, U2⦄. +/4 width=5 by fpbs_strap1, cpr_lpr_fpbs, sta_cpx, fpbq_cpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb.ma new file mode 100644 index 000000000..3425fd95d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb.ma @@ -0,0 +1,47 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btsn_5.ma". +include "basic_2A/reduction/fpb.ma". +include "basic_2A/computation/csx.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +inductive fsb (h) (g): relation3 genv lenv term ≝ +| fsb_intro: ∀G1,L1,T1. ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → fsb h g G2 L2 T2 + ) → fsb h g G1 L1 T1 +. + +interpretation + "'qrst' strong normalization (closure)" + 'BTSN h g G L T = (fsb h g G L T). + +(* Basic eliminators ********************************************************) + +lemma fsb_ind_alt: ∀h,g. ∀R: relation3 …. ( + ∀G1,L1,T1. ⦥[h,g] ⦃G1, L1, T1⦄ → ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2 + ) → R G1 L1 T1 + ) → + ∀G,L,T. ⦥[h, g] ⦃G, L, T⦄ → R G L T. +#h #g #R #IH #G #L #T #H elim H -G -L -T +/4 width=1 by fsb_intro/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma fsb_inv_csx: ∀h,g,G,L,T. ⦥[h, g] ⦃G, L, T⦄ → ⦃G, L⦄ ⊢ ⬊*[h, g] T. +#h #g #G #L #T #H elim H -G -L -T /5 width=1 by csx_intro, fpb_cpx/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_aaa.ma new file mode 100644 index 000000000..ff566e3ab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_aaa.ma @@ -0,0 +1,71 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs_aaa.ma". +include "basic_2A/computation/csx_aaa.ma". +include "basic_2A/computation/fsb_csx.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +(* Main properties **********************************************************) + +(* Note: this is the "big tree" theorem ("RST" version) *) +theorem aaa_fsb: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥[h, g] ⦃G, L, T⦄. +/3 width=2 by aaa_csx, csx_fsb/ qed. + +(* Note: this is the "big tree" theorem ("QRST" version) *) +theorem aaa_fsba: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦥⦥[h, g] ⦃G, L, T⦄. +/3 width=2 by fsb_fsba, aaa_fsb/ qed. + +(* Advanced eliminators on atomica arity assignment for terms ***************) + +fact aaa_ind_fpb_aux: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +#h #g #R #IH #G #L #T #H @(csx_ind_fpb … H) -G -L -T +#G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH // +#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h g … G2 … L2 … T2 … HTA1) -A1 +/2 width=2 by fpb_fpbs/ +qed-. + +lemma aaa_ind_fpb: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +/4 width=4 by aaa_ind_fpb_aux, aaa_csx/ qed-. + +fact aaa_ind_fpbg_aux: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +#h #g #R #IH #G #L #T #H @(csx_ind_fpbg … H) -G -L -T +#G1 #L1 #T1 #H1 #IH1 #A1 #HTA1 @IH -IH // +#G2 #L2 #T2 #H12 elim (fpbs_aaa_conf h g … G2 … L2 … T2 … HTA1) -A1 +/2 width=2 by fpbg_fwd_fpbs/ +qed-. + +lemma aaa_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1,A. ⦃G1, L1⦄ ⊢ T1 ⁝ A → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → R G L T. +/4 width=4 by aaa_ind_fpbg_aux, aaa_csx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_alt.ma new file mode 100644 index 000000000..e483e093a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_alt.ma @@ -0,0 +1,82 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btsnalt_5.ma". +include "basic_2A/computation/fpbg_fpbs.ma". +include "basic_2A/computation/fsb.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +(* Note: alternative definition of fsb *) +inductive fsba (h) (g): relation3 genv lenv term ≝ +| fsba_intro: ∀G1,L1,T1. ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → fsba h g G2 L2 T2 + ) → fsba h g G1 L1 T1. + +interpretation + "'big tree' strong normalization (closure) alternative" + 'BTSNAlt h g G L T = (fsba h g G L T). + +(* Basic eliminators ********************************************************) + +lemma fsba_ind_alt: ∀h,g. ∀R: relation3 …. ( + ∀G1,L1,T1. ⦥⦥[h,g] ⦃G1, L1, T1⦄ → ( + ∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2 + ) → R G1 L1 T1 + ) → + ∀G,L,T. ⦥⦥[h, g] ⦃G, L, T⦄ → R G L T. +#h #g #R #IH #G #L #T #H elim H -G -L -T +/4 width=1 by fsba_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma fsba_fpbs_trans: ∀h,g,G1,L1,T1. ⦥⦥[h, g] ⦃G1, L1, T1⦄ → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥⦥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #L1 #T1 #H @(fsba_ind_alt … H) -G1 -L1 -T1 +/4 width=5 by fsba_intro, fpbs_fpbg_trans/ +qed-. + +(* Main properties **********************************************************) + +theorem fsb_fsba: ∀h,g,G,L,T. ⦥[h, g] ⦃G, L, T⦄ → ⦥⦥[h, g] ⦃G, L, T⦄. +#h #g #G #L #T #H @(fsb_ind_alt … H) -G -L -T +#G1 #L1 #T1 #_ #IH @fsba_intro +#G2 #L2 #T2 * /3 width=5 by fsba_fpbs_trans/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem fsba_inv_fsb: ∀h,g,G,L,T. ⦥⦥[h, g] ⦃G, L, T⦄ → ⦥[h, g] ⦃G, L, T⦄. +#h #g #G #L #T #H @(fsba_ind_alt … H) -G -L -T +/4 width=1 by fsb_intro, fpb_fpbg/ +qed-. + +(* Advanced properties ******************************************************) + +lemma fsb_fpbs_trans: ∀h,g,G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥[h, g] ⦃G2, L2, T2⦄. +/4 width=5 by fsba_inv_fsb, fsb_fsba, fsba_fpbs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma fsb_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G1,L1,T1. ⦥[h, g] ⦃G1, L1, T1⦄ → R G1 L1 T1. +#h #g #R #IH #G1 #L1 #T1 #H @(fsba_ind_alt h g … G1 L1 T1) +/3 width=1 by fsba_inv_fsb, fsb_fsba/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_csx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_csx.ma new file mode 100644 index 000000000..074b53e93 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/fsb_csx.ma @@ -0,0 +1,70 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbs_fpb.ma". +include "basic_2A/computation/fpbs_fpbs.ma". +include "basic_2A/computation/csx_fpbs.ma". +include "basic_2A/computation/lsx_csx.ma". +include "basic_2A/computation/fsb_alt.ma". + +(* "QRST" STRONGLY NORMALIZING CLOSURES *************************************) + +(* Advanced propreties on context-sensitive extended normalizing terms ******) + +lemma csx_fsb_fpbs: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦥[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #L1 #T1 #H @(csx_ind … H) -T1 +#T1 #HT1 #IHc #G2 #L2 #T2 @(fqup_wf_ind … G2 L2 T2) -G2 -L2 -T2 +#G0 #L0 #T0 #IHu #H10 lapply (csx_fpbs_conf … H10) // -HT1 +#HT0 generalize in match IHu; -IHu generalize in match H10; -H10 +@(lsx_ind … (csx_lsx … HT0 0)) -L0 +#L0 #_ #IHd #H10 #IHu @fsb_intro +#G2 #L2 #T2 * -G2 -L2 -T2 [ -IHd -IHc | -IHu -IHd | ] +[ /4 width=5 by fpbs_fqup_trans, fqu_fqup/ +| #T2 #HT02 #HnT02 elim (fpbs_cpx_trans_neq … H10 … HT02 HnT02) -T0 + /3 width=4 by/ +| #L2 #HL02 #HnL02 @(IHd … HL02 HnL02) -IHd -HnL02 [ -IHu -IHc | ] + [ /3 width=3 by fpbs_lpxs_trans, lpx_lpxs/ + | #G3 #L3 #T3 #H03 #_ elim (lpx_fqup_trans … H03 … HL02) -L2 + #L4 #T4 elim (eq_term_dec T0 T4) [ -IHc | -IHu ] + [ #H destruct /5 width=5 by fsb_fpbs_trans, lpxs_fpbs, fpbs_fqup_trans, lpx_lpxs/ + | #HnT04 #HT04 #H04 #HL43 elim (cpxs_neq_inv_step_sn … HT04 HnT04) -HT04 -HnT04 + #T2 #HT02 #HnT02 #HT24 elim (fpbs_cpx_trans_neq … H10 … HT02 HnT02) -T0 + lapply (fpbs_intro_alt … G3 … L4 … L3 L3 … T3 … HT24 ? ? ?) -HT24 + /3 width=8 by fpbs_trans, lpx_lpxs, fqup_fqus/ (**) (* full auto too slow *) + ] + ] +] +qed. + +lemma csx_fsb: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦥[h, g] ⦃G, L, T⦄. +/2 width=5 by csx_fsb_fpbs/ qed. + +(* Advanced eliminators *****************************************************) + +lemma csx_ind_fpb: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T. +/4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-. + +lemma csx_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term. + (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 → + (∀G2,L2,T2. ⦃G1, L1, T1⦄ >≡[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → + ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T. +/4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp.ma new file mode 100644 index 000000000..2a217b515 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/genv.ma". +include "basic_2A/multiple/drops.ma". + +(* GENERIC COMPUTATION PROPERTIES *******************************************) + +definition nf ≝ λRR:relation4 genv lenv term term. λRS:relation term. + λG,L,T. NF … (RR G L) RS T. + +definition candidate: Type[0] ≝ relation3 genv lenv term. + +definition CP0 ≝ λRR:relation4 genv lenv term term. λRS:relation term. + ∀G. d_liftable1 (nf RR RS G) (Ⓕ). + +definition CP1 ≝ λRR:relation4 genv lenv term term. λRS:relation term. + ∀G,L. ∃k. NF … (RR G L) RS (⋆k). + +definition CP2 ≝ λRP:candidate. ∀G. d_liftable1 (RP G) (Ⓕ). + +definition CP3 ≝ λRP:candidate. + ∀G,L,T,k. RP G L (ⓐ⋆k.T) → RP G L T. + +(* requirements for generic computation properties *) +record gcp (RR:relation4 genv lenv term term) (RS:relation term) (RP:candidate) : Prop ≝ +{ cp0: CP0 RR RS; + cp1: CP1 RR RS; + cp2: CP2 RP; + cp3: CP3 RP +}. + +(* Basic properties *********************************************************) + +(* Basic_1: was: nf2_lift1 *) +lemma gcp0_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀G. d_liftables1 (nf RR RS G) (Ⓕ). +#RR #RS #RP #H #G @d1_liftable_liftables @(cp0 … H) +qed. + +lemma gcp2_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀G. d_liftables1 (RP G) (Ⓕ). +#RR #RS #RP #H #G @d1_liftable_liftables @(cp2 … H) +qed. + +(* Basic_1: was only: sns3_lifts1 *) +lemma gcp2_lifts_all: ∀RR,RS,RP. gcp RR RS RP → ∀G. d_liftables1_all (RP G) (Ⓕ). +#RR #RS #RP #H #G @d1_liftables_liftables_all /2 width=7 by gcp2_lifts/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_aaa.ma new file mode 100644 index 000000000..1bbe0d510 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_aaa.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lifts_lifts.ma". +include "basic_2A/multiple/drops_drops.ma". +include "basic_2A/static/aaa_lifts.ma". +include "basic_2A/static/aaa_aaa.ma". +include "basic_2A/computation/lsubc_drops.ma". + +(* GENERIC COMPUTATION PROPERTIES *******************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: sc3_arity_csubc *) +theorem acr_aaa_csubc_lifts: ∀RR,RS,RP. + gcp RR RS RP → gcr RR RS RP RP → + ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L0,cs. ⬇*[Ⓕ, cs] L0 ≡ L1 → + ∀T0. ⬆*[cs] T ≡ T0 → ∀L2. G ⊢ L2 ⫃[RP] L0 → + ⦃G, L2, T0⦄ ϵ[RP] 〚A〛. +#RR #RS #RP #H1RP #H2RP #G #L1 #T #A #H elim H -G -L1 -T -A +[ #G #L #k #L0 #cs #HL0 #X #H #L2 #HL20 + >(lifts_inv_sort1 … H) -H + lapply (acr_gcr … H1RP H2RP (⓪)) #HAtom + lapply (s4 … HAtom G L2 (◊)) /2 width=1 by/ +| #I #G #L1 #K1 #V1 #B #i #HLK1 #HKV1B #IHB #L0 #cs #HL01 #X #H #L2 #HL20 + lapply (acr_gcr … H1RP H2RP B) #HB + elim (lifts_inv_lref1 … H) -H #i1 #Hi1 #H destruct + lapply (drop_fwd_drop2 … HLK1) #HK1b + elim (drops_drop_trans … HL01 … HLK1) #X #cs1 #i0 #HL0 #H #Hi0 #Hcs1 + >(at_mono … Hi1 … Hi0) -i1 + elim (drops_inv_skip2 … Hcs1 … H) -cs1 #K0 #V0 #cs0 #Hcs0 #HK01 #HV10 #H destruct + elim (lsubc_drop_O1_trans … HL20 … HL0) -HL0 #X #HLK2 #H + elim (lsubc_inv_pair2 … H) -H * + [ #K2 #HK20 #H destruct + elim (lift_total V0 0 (i0 +1)) #V #HV0 + elim (lifts_lift_trans … Hi0 … Hcs0 … HV10 … HV0) -HV10 #V2 #HV12 #HV2 + lapply (s5 … HB ? G ? ? (◊) … HV0 HLK2) /3 width=7 by drops_cons, lifts_cons/ (* Note: uses IHB HL20 V2 HV0 *) + | -HLK1 -IHB -HL01 -HL20 -HK1b -Hi0 -Hcs0 + #K2 #V2 #A2 #HKV2A #H1KV0A #H2KV0A #_ #H1 #H2 destruct + lapply (drop_fwd_drop2 … HLK2) #HLK2b + lapply (aaa_lifts … HK01 … HV10 HKV1B) -HKV1B -HK01 -HV10 #HKV0B + lapply (aaa_mono … H2KV0A … HKV0B) #H destruct -H2KV0A -HKV0B + elim (lift_total V0 0 (i0 +1)) #V3 #HV03 + elim (lift_total V2 0 (i0 +1)) #V #HV2 + lapply (s5 … HB ? G ? ? (◊) … (ⓝV3.V) … HLK2) /2 width=1 by lift_flat/ + lapply (s7 … HB G L2 (◊)) /3 width=7 by gcr_lift/ + ] +| #a #G #L #V #T #B #A #_ #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL20 + elim (lifts_inv_bind1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct + lapply (acr_gcr … H1RP H2RP A) #HA + lapply (acr_gcr … H1RP H2RP B) #HB + lapply (s1 … HB) -HB #HB + lapply (s6 … HA G L2 (◊) (◊)) /4 width=5 by lsubc_pair, drops_skip, liftv_nil/ +| #a #G #L #W #T #B #A #HLWB #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL02 + elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct + @(acr_abst … H1RP H2RP) /2 width=5 by/ + #L3 #V3 #W3 #T3 #cs3 #HL32 #HW03 #HT03 #H1B #H2B + elim (drops_lsubc_trans … H1RP … HL32 … HL02) -L2 #L2 #HL32 #HL20 + lapply (aaa_lifts … L2 W3 … (cs @@ cs3) … HLWB) -HLWB /2 width=4 by drops_trans, lifts_trans/ #HLW2B + @(IHA (L2. ⓛW3) … (cs + 1 @@ cs3 + 1)) -IHA + /3 width=5 by lsubc_beta, drops_trans, drops_skip, lifts_trans/ +| #G #L #V #T #B #A #_ #_ #IHB #IHA #L0 #cs #HL0 #X #H #L2 #HL20 + elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct + /3 width=10 by drops_nil, lifts_nil/ +| #G #L #V #T #A #_ #_ #IH1A #IH2A #L0 #cs #HL0 #X #H #L2 #HL20 + elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct + lapply (acr_gcr … H1RP H2RP A) #HA + lapply (s7 … HA G L2 (◊)) /3 width=5 by/ +] +qed. + +(* Basic_1: was: sc3_arity *) +lemma acr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ⦃G, L, T⦄ ϵ[RP] 〚A〛. +/2 width=8 by drops_nil, lifts_nil, acr_aaa_csubc_lifts/ qed. + +lemma gcr_aaa: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → RP G L T. +#RR #RS #RP #H1RP #H2RP #G #L #T #A #HT +lapply (acr_gcr … H1RP H2RP A) #HA +@(s1 … HA) /2 width=4 by acr_aaa/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_cr.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_cr.ma new file mode 100644 index 000000000..a35bc63d2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/gcp_cr.ma @@ -0,0 +1,169 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/ineint_5.ma". +include "basic_2A/grammar/aarity.ma". +include "basic_2A/multiple/mr2_mr2.ma". +include "basic_2A/multiple/lifts_lift_vector.ma". +include "basic_2A/multiple/drops_drop.ma". +include "basic_2A/computation/gcp.ma". + +(* GENERIC COMPUTATION PROPERTIES *******************************************) + +(* Note: this is Girard's CR1 *) +definition S1 ≝ λRP,C:candidate. + ∀G,L,T. C G L T → RP G L T. + +(* Note: this is Tait's iii, or Girard's CR4 *) +definition S2 ≝ λRR:relation4 genv lenv term term. λRS:relation term. λRP,C:candidate. + ∀G,L,Vs. all … (RP G L) Vs → + ∀T. 𝐒⦃T⦄ → NF … (RR G L) RS T → C G L (ⒶVs.T). + +(* Note: this generalizes Tait's ii *) +definition S3 ≝ λC:candidate. + ∀a,G,L,Vs,V,T,W. + C G L (ⒶVs.ⓓ{a}ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ{a}W.T). + +definition S4 ≝ λRP,C:candidate. + ∀G,L,Vs. all … (RP G L) Vs → ∀k. C G L (ⒶVs.⋆k). + +definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i. + C G L (ⒶVs.V2) → ⬆[0, i+1] V1 ≡ V2 → + ⬇[i] L ≡ K.ⓑ{I}V1 → C G L (ⒶVs.#i). + +definition S6 ≝ λRP,C:candidate. + ∀G,L,V1s,V2s. ⬆[0, 1] V1s ≡ V2s → + ∀a,V,T. C G (L.ⓓV) (ⒶV2s.T) → RP G L V → C G L (ⒶV1s.ⓓ{a}V.T). + +definition S7 ≝ λC:candidate. + ∀G,L,Vs,T,W. C G L (ⒶVs.T) → C G L (ⒶVs.W) → C G L (ⒶVs.ⓝW.T). + +(* requirements for the generic reducibility candidate *) +record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate) : Prop ≝ +{ s1: S1 RP C; + s2: S2 RR RS RP C; + s3: S3 C; + s4: S4 RP C; + s5: S5 C; + s6: S6 RP C; + s7: S7 C +}. + +(* the functional construction for candidates *) +definition cfun: candidate → candidate → candidate ≝ + λC1,C2,G,K,T. ∀L,W,U,cs. + ⬇*[Ⓕ, cs] L ≡ K → ⬆*[cs] T ≡ U → C1 G L W → C2 G L (ⓐW.U). + +(* the reducibility candidate associated to an atomic arity *) +let rec acr (RP:candidate) (A:aarity) on A: candidate ≝ +match A with +[ AAtom ⇒ RP +| APair B A ⇒ cfun (acr RP B) (acr RP A) +]. + +interpretation + "candidate of reducibility of an atomic arity (abstract)" + 'InEInt RP G L T A = (acr RP A G L T). + +(* Basic properties *********************************************************) + +(* Basic 1: was: sc3_lift *) +lemma gcr_lift: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. d_liftable1 (acr RP A G) (Ⓕ). +#RR #RS #RP #H #A elim A -A +/3 width=8 by cp2, drops_cons, lifts_cons/ +qed. + +(* Basic_1: was: sc3_lift1 *) +lemma gcr_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. d_liftables1 (acr RP A G) (Ⓕ). +#RR #RS #RP #H #A #G @d1_liftable_liftables /2 width=7 by gcr_lift/ +qed. + +(* Basic_1: was: + sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast +*) +lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀A. gcr RR RS RP (acr RP A). +#RR #RS #RP #H1RP #H2RP #A elim A -A // +#B #A #IHB #IHA @mk_gcr +[ #G #L #T #H + elim (cp1 … H1RP G L) #k #HK + lapply (H L (⋆k) T (◊) ? ? ?) -H // + [ lapply (s2 … IHB G L (◊) … HK) // + | /3 width=6 by s1, cp3/ + ] +| #G #L #Vs #HVs #T #H1T #H2T #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct + lapply (s1 … IHB … HB) #HV0 + @(s2 … IHA … (V0 @ V0s)) + /3 width=14 by gcp2_lifts_all, gcp2_lifts, gcp0_lifts, lifts_simple_dx, conj/ +| #a #G #L #Vs #U #T #W #HA #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_flat1 … HY) -HY #U0 #X #HU0 #HX #H destruct + elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct + @(s3 … IHA … (V0 @ V0s)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/ +| #G #L #Vs #HVs #k #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + >(lifts_inv_sort1 … HY) -Y + lapply (s1 … IHB … HB) #HV0 + @(s4 … IHA … (V0 @ V0s)) /3 width=7 by gcp2_lifts_all, conj/ +| #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_lref1 … HY) -HY #i0 #Hi0 #H destruct + elim (drops_drop_trans … HL0 … HLK) #X #cs0 #i1 #HL02 #H #Hi1 #Hcs0 + >(at_mono … Hi1 … Hi0) in HL02; -i1 #HL02 + elim (drops_inv_skip2 … Hcs0 … H) -H -cs0 #L2 #W1 #cs0 #Hcs0 #HLK #HVW1 #H destruct + elim (lift_total W1 0 (i0 + 1)) #W2 #HW12 + elim (lifts_lift_trans … Hcs0 … HVW1 … HW12) // -Hcs0 -Hi0 #V3 #HV13 #HVW2 + >(lift_mono … HV13 … HV12) in HVW2; -V3 #HVW2 + @(s5 … IHA … (V0 @ V0s) … HW12 HL02) /3 width=5 by lifts_applv/ +| #G #L #V1s #V2s #HV12s #a #V #T #HA #HV #L0 #V10 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V10s #Y #HV10s #HY #H destruct + elim (lifts_inv_bind1 … HY) -HY #V0 #T0 #HV0 #HT0 #H destruct + elim (lift_total V10 0 1) #V20 #HV120 + elim (liftv_total 0 1 V10s) #V20s #HV120s + @(s6 … IHA … (V10 @ V10s) (V20 @ V20s)) /3 width=7 by gcp2_lifts, liftv_cons/ + @(HA … (cs + 1)) /2 width=2 by drops_skip/ + [ @lifts_applv // + elim (liftsv_liftv_trans_le … HV10s … HV120s) -V10s #V10s #HV10s #HV120s + >(liftv_mono … HV12s … HV10s) -V1s // + | @(gcr_lift … H1RP … HB … HV120) /2 width=2 by drop_drop/ + ] +| #G #L #Vs #T #W #HA #HW #L0 #V0 #X #cs #HL0 #H #HB + elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct + elim (lifts_inv_flat1 … HY) -HY #W0 #T0 #HW0 #HT0 #H destruct + @(s7 … IHA … (V0 @ V0s)) /3 width=5 by lifts_applv/ +] +qed. + +lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀a,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → ( + ∀L0,V0,W0,T0,cs. ⬇*[Ⓕ, cs] L0 ≡ L → ⬆*[cs] W ≡ W0 → ⬆*[cs + 1] T ≡ T0 → + ⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛 + ) → + ⦃G, L, ⓛ{a}W.T⦄ ϵ[RP] 〚②B.A〛. +#RR #RS #RP #H1RP #H2RP #a #G #L #W #T #A #B #HW #HA #L0 #V0 #X #cs #HL0 #H #HB +lapply (acr_gcr … H1RP H2RP A) #HCA +lapply (acr_gcr … H1RP H2RP B) #HCB +elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct +lapply (gcr_lifts … H1RP … HL0 … HW0 HW) -HW #HW0 +lapply (s3 … HCA … a G L0 (◊)) #H @H -H +lapply (s6 … HCA G L0 (◊) (◊) ?) // #H @H -H +[ @(HA … HL0) // +| lapply (s1 … HCB) -HCB #HCB + lapply (s7 … H2RP G L0 (◊)) /3 width=1 by/ +] +qed. + +(* Basic_1: removed theorems 2: sc3_arity_gen sc3_repl *) +(* Basic_1: removed local theorems 1: sc3_sn3_abst *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx.ma new file mode 100644 index 000000000..c77910134 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx.ma @@ -0,0 +1,77 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/cosn_5.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY CONORMALIZING LOCAL ENVIRONMENTS ********************) + +inductive lcosx (h) (g) (G): relation2 ynat lenv ≝ +| lcosx_sort: ∀l. lcosx h g G l (⋆) +| lcosx_skip: ∀I,L,T. lcosx h g G 0 L → lcosx h g G 0 (L.ⓑ{I}T) +| lcosx_pair: ∀I,L,T,l. G ⊢ ⬊*[h, g, T, l] L → + lcosx h g G l L → lcosx h g G (⫯l) (L.ⓑ{I}T) +. + +interpretation + "sn extended strong conormalization (local environment)" + 'CoSN h g l G L = (lcosx h g G l L). + +(* Basic properties *********************************************************) + +lemma lcosx_O: ∀h,g,G,L. G ⊢ ~⬊*[h, g, 0] L. +#h #g #G #L elim L /2 width=1 by lcosx_skip/ +qed. + +lemma lcosx_drop_trans_lt: ∀h,g,G,L,l. G ⊢ ~⬊*[h, g, l] L → + ∀I,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → i < l → + G ⊢ ~⬊*[h, g, ⫰(l-i)] K ∧ G ⊢ ⬊*[h, g, V, ⫰(l-i)] K. +#h #g #G #L #l #H elim H -L -l +[ #l #J #K #V #i #H elim (drop_inv_atom1 … H) -H #H destruct +| #I #L #T #_ #_ #J #K #V #i #_ #H elim (ylt_yle_false … H) -H // +| #I #L #T #l #HT #HL #IHL #J #K #V #i #H #Hil + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK destruct + [ >ypred_succ /2 width=1 by conj/ + | lapply (ylt_pred … Hil ?) -Hil /2 width=1 by ylt_inj/ >ypred_succ #Hil + elim (IHL … HLK ?) -IHL -HLK yminus_SO2 // + <(ypred_succ l) in ⊢ (%→%→?); >yminus_pred /2 width=1 by ylt_inj, conj/ + ] +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lcosx_inv_succ_aux: ∀h,g,G,L,x. G ⊢ ~⬊*[h, g, x] L → ∀l. x = ⫯l → + L = ⋆ ∨ + ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, g, l] K & + G ⊢ ⬊*[h, g, V, l] K. +#h #g #G #L #l * -L -l /2 width=1 by or_introl/ +[ #I #L #T #_ #x #H elim (ysucc_inv_O_sn … H) +| #I #L #T #l #HT #HL #x #H <(ysucc_inj … H) -x + /3 width=6 by ex3_3_intro, or_intror/ +] +qed-. + +lemma lcosx_inv_succ: ∀h,g,G,L,l. G ⊢ ~⬊*[h, g, ⫯l] L → L = ⋆ ∨ + ∃∃I,K,V. L = K.ⓑ{I}V & G ⊢ ~⬊*[h, g, l] K & + G ⊢ ⬊*[h, g, V, l] K. +/2 width=3 by lcosx_inv_succ_aux/ qed-. + +lemma lcosx_inv_pair: ∀h,g,I,G,L,T,l. G ⊢ ~⬊*[h, g, ⫯l] L.ⓑ{I}T → + G ⊢ ~⬊*[h, g, l] L ∧ G ⊢ ⬊*[h, g, T, l] L. +#h #g #I #G #L #T #l #H elim (lcosx_inv_succ … H) -H +[ #H destruct +| * #Z #Y #X #H destruct /2 width=1 by conj/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx_cpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx_cpx.ma new file mode 100644 index 000000000..47de7c8bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lcosx_cpx.ma @@ -0,0 +1,67 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_max.ma". +include "basic_2A/computation/lsx_drop.ma". +include "basic_2A/computation/lsx_lpx.ma". +include "basic_2A/computation/lsx_lpxs.ma". +include "basic_2A/computation/lcosx.ma". + +(* SN EXTENDED STRONGLY CONORMALIZING LOCAL ENVIRONMENTS ********************) + +(* Properties on extended context-sensitive parallel reduction for term *****) + +lemma lsx_cpx_trans_lcosx: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → + ∀l. G ⊢ ~⬊*[h, g, l] L → + G ⊢ ⬊*[h, g, T1, l] L → G ⊢ ⬊*[h, g, T2, l] L. +#h #g #G #L #T1 #T2 #H elim H -G -L -T1 -T2 // +[ #I #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #l #HL #H + elim (ylt_split i l) #Hli [ -H | -HL ] + [ <(ymax_pre_sn l (⫯i)) /2 width=1 by ylt_fwd_le_succ/ + elim (lcosx_drop_trans_lt … HL … HLK) // -HL -Hli + lapply (drop_fwd_drop2 … HLK) -HLK /3 width=7 by lsx_lift_ge/ + | lapply (lsx_fwd_lref_be … H … HLK) // -H -Hli + lapply (drop_fwd_drop2 … HLK) -HLK + /4 width=10 by lsx_ge, lsx_lift_le/ + ] +| #a #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #l #HL #H + elim (lsx_inv_bind … H) -H #HV1 #HT1 + @lsx_bind /2 width=2 by/ (**) (* explicit constructor *) + @(lsx_lreq_conf … (L.ⓑ{I}V1)) /3 width=1 by lcosx_pair, lreq_succ/ +| #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H /3 width=1 by lsx_flat/ +| #G #L #V #U1 #U2 #T2 #_ #HTU2 #IHU12 #l #HL #H + elim (lsx_inv_bind … H) -H + /4 width=9 by lcosx_pair, lsx_inv_lift_ge, drop_drop/ +| #G #L #V #T1 #T2 #_ #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H /2 width=1 by/ +| #G #L #V1 #V2 #T #_ #IHV12 #l #HL #H + elim (lsx_inv_flat … H) -H /2 width=1 by/ +| #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H #HV1 #H + elim (lsx_inv_bind … H) -H #HW1 #HT1 + @lsx_bind /3 width=1 by lsx_flat/ (**) (* explicit constructor *) + @(lsx_lreq_conf … (L.ⓛW1)) /3 width=1 by lcosx_pair, lreq_succ/ +| #a #G #L #V1 #V2 #U2 #W1 #W2 #T1 #T2 #_ #HVU2 #_ #_ #IHV12 #IHW12 #IHT12 #l #HL #H + elim (lsx_inv_flat … H) -H #HV1 #H + elim (lsx_inv_bind … H) -H #HW1 #HT1 + @lsx_bind /2 width=1 by/ (**) (* explicit constructor *) + @lsx_flat [ /3 width=7 by lsx_lift_ge, drop_drop/ ] + @(lsx_lreq_conf … (L.ⓓW1)) /3 width=1 by lcosx_pair, lreq_succ/ +] +qed-. + +lemma lsx_cpx_trans_O: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → + G ⊢ ⬊*[h, g, T1, 0] L → G ⊢ ⬊*[h, g, T2, 0] L. +/2 width=3 by lsx_cpx_trans_lcosx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs.ma new file mode 100644 index 000000000..c529d58d0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs.ma @@ -0,0 +1,71 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsnstar_3.ma". +include "basic_2A/substitution/lpx_sn_tc.ma". +include "basic_2A/reduction/lpr.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +definition lprs: relation3 genv lenv lenv ≝ + λG. TC … (lpr G). + +interpretation "parallel computation (local environment, sn variant)" + 'PRedSnStar G L1 L2 = (lprs G L1 L2). + +(* Basic eliminators ********************************************************) + +lemma lprs_ind: ∀G,L1. ∀R:predicate lenv. R L1 → + (∀L,L2. ⦃G, L1⦄ ⊢ ➡* L → ⦃G, L⦄ ⊢ ➡ L2 → R L → R L2) → + ∀L2. ⦃G, L1⦄ ⊢ ➡* L2 → R L2. +#G #L1 #R #HL1 #IHL1 #L2 #HL12 +@(TC_star_ind … HL1 IHL1 … HL12) // +qed-. + +lemma lprs_ind_dx: ∀G,L2. ∀R:predicate lenv. R L2 → + (∀L1,L. ⦃G, L1⦄ ⊢ ➡ L → ⦃G, L⦄ ⊢ ➡* L2 → R L → R L1) → + ∀L1. ⦃G, L1⦄ ⊢ ➡* L2 → R L1. +#G #L2 #R #HL2 #IHL2 #L1 #HL12 +@(TC_star_ind_dx … HL2 IHL2 … HL12) // +qed-. + +(* Basic properties *********************************************************) + +lemma lpr_lprs: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡* L2. +/2 width=1 by inj/ qed. + +lemma lprs_refl: ∀G,L. ⦃G, L⦄ ⊢ ➡* L. +/2 width=1 by lpr_lprs/ qed. + +lemma lprs_strap1: ∀G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡* L → ⦃G, L⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡* L2. +/2 width=3 by step/ qed-. + +lemma lprs_strap2: ∀G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡ L → ⦃G, L⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡* L2. +/2 width=3 by TC_strap/ qed-. + +lemma lprs_pair_refl: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡* L2.ⓑ{I}V. +/2 width=1 by TC_lpx_sn_pair_refl/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma lprs_inv_atom1: ∀G,L2. ⦃G, ⋆⦄ ⊢ ➡* L2 → L2 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom1/ qed-. + +lemma lprs_inv_atom2: ∀G,L1. ⦃G, L1⦄ ⊢ ➡* ⋆ → L1 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom2/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lprs_fwd_length: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → |L1| = |L2|. +/2 width=2 by TC_lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_cprs.ma new file mode 100644 index 000000000..a96eaa23a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_cprs.ma @@ -0,0 +1,142 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cprs_cprs.ma". +include "basic_2A/computation/lprs.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +(* Advanced properties ******************************************************) + +lemma lprs_pair: ∀I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ➡* V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡* L2.ⓑ{I}V2. +/2 width=1 by TC_lpx_sn_pair/ qed. + +(* Advanced inversion lemmas ************************************************) + +lemma lprs_inv_pair1: ∀I,G,K1,L2,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡* L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡* K2 & ⦃G, K1⦄ ⊢ V1 ➡* V2 & + L2 = K2.ⓑ{I}V2. +/3 width=3 by TC_lpx_sn_inv_pair1, lpr_cprs_trans/ qed-. + +lemma lprs_inv_pair2: ∀I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡* K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡* K2 & ⦃G, K1⦄ ⊢ V1 ➡* V2 & + L1 = K1.ⓑ{I}V1. +/3 width=3 by TC_lpx_sn_inv_pair2, lpr_cprs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma lprs_ind_alt: ∀G. ∀R:relation lenv. + R (⋆) (⋆) → ( + ∀I,K1,K2,V1,V2. + ⦃G, K1⦄ ⊢ ➡* K2 → ⦃G, K1⦄ ⊢ V1 ➡* V2 → + R K1 K2 → R (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) + ) → + ∀L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → R L1 L2. +/3 width=4 by TC_lpx_sn_ind, lpr_cprs_trans/ qed-. + +(* Properties on context-sensitive parallel computation for terms ***********) + +lemma lprs_cpr_trans: ∀G. s_r_transitive … (cpr G) (λ_. lprs G). +/3 width=5 by s_r_trans_LTC2, lpr_cprs_trans/ qed-. + +(* Basic_1: was just: pr3_pr3_pr3_t *) +(* Note: alternative proof /3 width=5 by s_r_trans_LTC1, lprs_cpr_trans/ *) +lemma lprs_cprs_trans: ∀G. s_rs_transitive … (cpr G) (λ_. lprs G). +#G @s_r_to_s_rs_trans @s_r_trans_LTC2 +@s_rs_trans_TC1 /2 width=3 by lpr_cprs_trans/ (**) (* full auto too slow *) +qed-. + +lemma lprs_cprs_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #HT01 #L1 #H @(lprs_ind … H) -L1 /2 width=3 by ex2_intro/ +#L #L1 #_ #HL1 * #T #HT1 #HT0 -L0 +elim (cprs_lpr_conf_dx … HT1 … HL1) -HT1 #T2 #HT2 +elim (cprs_lpr_conf_dx … HT0 … HL1) -L #T3 #HT3 +elim (cprs_conf … HT2 … HT3) -T +/3 width=5 by cprs_trans, ex2_intro/ +qed-. + +lemma lprs_cpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +/3 width=3 by lprs_cprs_conf_dx, cpr_cprs/ qed-. + +(* Note: this can be proved on its own using lprs_ind_dx *) +lemma lprs_cprs_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡* T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 +elim (lprs_cprs_conf_dx … HT01 … HL01) -HT01 +/3 width=3 by lprs_cprs_trans, ex2_intro/ +qed-. + +lemma lprs_cpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → + ∀L1. ⦃G, L0⦄ ⊢ ➡* L1 → + ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡* T & ⦃G, L1⦄ ⊢ T0 ➡* T. +/3 width=3 by lprs_cprs_conf_sn, cpr_cprs/ qed-. + +lemma cprs_bind2: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡* V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡* T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡* ⓑ{a,I}V2.T2. +/4 width=5 by lprs_cprs_trans, lprs_pair, cprs_bind/ qed. + +(* Inversion lemmas on context-sensitive parallel computation for terms *****) + +(* Basic_1: was: pr3_gen_abst *) +lemma cprs_inv_abst1: ∀a,G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* U2 → + ∃∃W2,T2. ⦃G, L⦄ ⊢ W1 ➡* W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2 & + U2 = ⓛ{a}W2.T2. +#a #G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /2 width=5 by ex3_2_intro/ +#U0 #U2 #_ #HU02 * #V0 #T0 #HV10 #HT10 #H destruct +elim (cpr_inv_abst1 … HU02) -HU02 #V2 #T2 #HV02 #HT02 #H destruct +lapply (lprs_cpr_trans … HT02 (L.ⓛV1) ?) +/3 width=5 by lprs_pair, cprs_trans, cprs_strap1, ex3_2_intro/ +qed-. + +lemma cprs_inv_abst: ∀a,G,L,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2 → + ⦃G, L⦄ ⊢ W1 ➡* W2 ∧ ⦃G, L.ⓛW1⦄ ⊢ T1 ➡* T2. +#a #G #L #W1 #W2 #T1 #T2 #H elim (cprs_inv_abst1 … H) -H +#W #T #HW1 #HT1 #H destruct /2 width=1 by conj/ +qed-. + +(* Basic_1: was pr3_gen_abbr *) +lemma cprs_inv_abbr1: ∀a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{a}V1.T1 ➡* U2 → ( + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡* T2 & + U2 = ⓓ{a}V2.T2 + ) ∨ + ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡* T2 & ⬆[0, 1] U2 ≡ T2 & a = true. +#a #G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/ +#U0 #U2 #_ #HU02 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpr_inv_abbr1 … HU02) -HU02 * + [ #V2 #T2 #HV02 #HT02 #H destruct + lapply (lprs_cpr_trans … HT02 (L.ⓓV1) ?) + /4 width=5 by lprs_pair, cprs_trans, cprs_strap1, ex3_2_intro, or_introl/ + | #T2 #HT02 #HUT2 + lapply (lprs_cpr_trans … HT02 (L.ⓓV1) ?) -HT02 + /4 width=3 by lprs_pair, cprs_trans, ex3_intro, or_intror/ + ] +| #U1 #HTU1 #HU01 elim (lift_total U2 0 1) + #U #HU2 lapply (cpr_lift … HU02 (L.ⓓV1) … HU01 … HU2) -U0 + /4 width=3 by cprs_strap1, drop_drop, ex3_intro, or_intror/ +] +qed-. + +(* More advanced properties *************************************************) + +lemma lprs_pair2: ∀I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ➡* V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡* L2.ⓑ{I}V2. +/3 width=3 by lprs_pair, lprs_cprs_trans/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_drop.ma new file mode 100644 index 000000000..66465b6bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_drop.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpr_drop.ma". +include "basic_2A/computation/lprs.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +(* Properties on local environment slicing ***********************************) + +lemma lprs_drop_conf: ∀G. dropable_sn (lprs G). +/3 width=3 by dropable_sn_TC, lpr_drop_conf/ qed-. + +lemma drop_lprs_trans: ∀G. dedropable_sn (lprs G). +/3 width=3 by dedropable_sn_TC, drop_lpr_trans/ qed-. + +lemma lprs_drop_trans_O1: ∀G. dropable_dx (lprs G). +/3 width=3 by dropable_dx_TC, lpr_drop_trans_O1/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_lprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_lprs.ma new file mode 100644 index 000000000..cf5a6136b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lprs_lprs.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpr_lpr.ma". +include "basic_2A/computation/lprs.ma". + +(* SN PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ****************************) + +(* Advanced properties ******************************************************) + +lemma lprs_strip: ∀G. confluent2 … (lprs G) (lpr G). +/3 width=3 by TC_strip1, lpr_conf/ qed-. + +(* Main properties **********************************************************) + +theorem lprs_conf: ∀G. confluent2 … (lprs G) (lprs G). +/3 width=3 by TC_confluent2, lpr_conf/ qed-. + +theorem lprs_trans: ∀G. Transitive … (lprs G). +/2 width=3 by trans_TC/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma new file mode 100644 index 000000000..3aca39a0d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsnstar_5.ma". +include "basic_2A/reduction/lpx.ma". +include "basic_2A/computation/lprs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +definition lpxs: ∀h. sd h → relation3 genv lenv lenv ≝ + λh,g,G. TC … (lpx h g G). + +interpretation "extended parallel computation (local environment, sn variant)" + 'PRedSnStar h g G L1 L2 = (lpxs h g G L1 L2). + +(* Basic eliminators ********************************************************) + +lemma lpxs_ind: ∀h,g,G,L1. ∀R:predicate lenv. R L1 → + (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → R L → R L2) → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L2. +#h #g #G #L1 #R #HL1 #IHL1 #L2 #HL12 +@(TC_star_ind … HL1 IHL1 … HL12) // +qed-. + +lemma lpxs_ind_dx: ∀h,g,G,L2. ∀R:predicate lenv. R L2 → + (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → R L → R L1) → + ∀L1. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L1. +#h #g #G #L2 #R #HL2 #IHL2 #L1 #HL12 +@(TC_star_ind_dx … HL2 IHL2 … HL12) // +qed-. + +(* Basic properties *********************************************************) + +lemma lprs_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/3 width=3 by lpr_lpx, monotonic_TC/ qed. + +lemma lpx_lpxs: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/2 width=1 by inj/ qed. + +lemma lpxs_refl: ∀h,g,G,L. ⦃G, L⦄ ⊢ ➡*[h, g] L. +/2 width=1 by lprs_lpxs/ qed. + +lemma lpxs_strap1: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L → ⦃G, L⦄ ⊢ ➡[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/2 width=3 by step/ qed. + +lemma lpxs_strap2: ∀h,g,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L → ⦃G, L⦄ ⊢ ➡*[h, g] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2. +/2 width=3 by TC_strap/ qed. + +lemma lpxs_pair_refl: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V. +/2 width=1 by TC_lpx_sn_pair_refl/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma lpxs_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡*[h, g] L2 → L2 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom1/ qed-. + +lemma lpxs_inv_atom2: ∀h,g,G,L1. ⦃G, L1⦄ ⊢ ➡*[h, g] ⋆ → L1 = ⋆. +/2 width=2 by TC_lpx_sn_inv_atom2/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lpxs_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → |L1| = |L2|. +/2 width=2 by TC_lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_aaa.ma new file mode 100644 index 000000000..682e6d723 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_aaa.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_aaa.ma". +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Properties about atomic arity assignment on terms ************************) + +lemma lpxs_aaa_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +#h #g #G #L1 #T #A #HT #L2 #HL12 +@(TC_Conf3 … (λL,A. ⦃G, L⦄ ⊢ T ⁝ A) … HT ? HL12) /2 width=5 by lpx_aaa_conf/ +qed-. + +lemma lprs_aaa_conf: ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → + ∀L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +/3 width=5 by lprs_lpxs, lpxs_aaa_conf/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_cpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_cpxs.ma new file mode 100644 index 000000000..c4ba7ccf0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_cpxs.ma @@ -0,0 +1,161 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cpxs_cpxs.ma". +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Advanced properties ******************************************************) + +lemma lpxs_pair: ∀h,g,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + ∀V1,V2. ⦃G, L1⦄ ⊢ V1 ➡*[h, g] V2 → + ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V2. +/2 width=1 by TC_lpx_sn_pair/ qed. + +(* Advanced inversion lemmas ************************************************) + +lemma lpxs_inv_pair1: ∀h,g,I,G,K1,L2,V1. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡*[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 & L2 = K2.ⓑ{I}V2. +/3 width=3 by TC_lpx_sn_inv_pair1, lpx_cpxs_trans/ qed-. + +lemma lpxs_inv_pair2: ∀h,g,I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡*[h, g] K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡*[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 & L1 = K1.ⓑ{I}V1. +/3 width=3 by TC_lpx_sn_inv_pair2, lpx_cpxs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma lpxs_ind_alt: ∀h,g,G. ∀R:relation lenv. + R (⋆) (⋆) → ( + ∀I,K1,K2,V1,V2. + ⦃G, K1⦄ ⊢ ➡*[h, g] K2 → ⦃G, K1⦄ ⊢ V1 ➡*[h, g] V2 → + R K1 K2 → R (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) + ) → + ∀L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → R L1 L2. +/3 width=4 by TC_lpx_sn_ind, lpx_cpxs_trans/ qed-. + +(* Properties on context-sensitive extended parallel computation for terms **) + +lemma lpxs_cpx_trans: ∀h,g,G. s_r_transitive … (cpx h g G) (λ_.lpxs h g G). +/3 width=5 by s_r_trans_LTC2, lpx_cpxs_trans/ qed-. + +(* Note: alternative proof: /3 width=5 by s_r_trans_TC1, lpxs_cpx_trans/ *) +lemma lpxs_cpxs_trans: ∀h,g,G. s_rs_transitive … (cpx h g G) (λ_.lpxs h g G). +#h #g #G @s_r_to_s_rs_trans @s_r_trans_LTC2 +@s_rs_trans_TC1 /2 width=3 by lpx_cpxs_trans/ (**) (* full auto too slow *) +qed-. + +lemma cpxs_bind2: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ➡*[h, g] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2. +/4 width=5 by lpxs_cpxs_trans, lpxs_pair, cpxs_bind/ qed. + +(* Inversion lemmas on context-sensitive ext parallel computation for terms *) + +lemma cpxs_inv_abst1: ∀h,g,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 ➡*[h, g] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ➡*[h, g] T2 & + U2 = ⓛ{a}V2.T2. +#h #g #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /2 width=5 by ex3_2_intro/ +#U0 #U2 #_ #HU02 * #V0 #T0 #HV10 #HT10 #H destruct +elim (cpx_inv_abst1 … HU02) -HU02 #V2 #T2 #HV02 #HT02 #H destruct +lapply (lpxs_cpx_trans … HT02 (L.ⓛV1) ?) +/3 width=5 by lpxs_pair, cpxs_trans, cpxs_strap1, ex3_2_intro/ +qed-. + +lemma cpxs_inv_abbr1: ∀h,g,a,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{a}V1.T1 ➡*[h, g] U2 → ( + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, g] T2 & + U2 = ⓓ{a}V2.T2 + ) ∨ + ∃∃T2. ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, g] T2 & ⬆[0, 1] U2 ≡ T2 & a = true. +#h #g #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/ +#U0 #U2 #_ #HU02 * * +[ #V0 #T0 #HV10 #HT10 #H destruct + elim (cpx_inv_abbr1 … HU02) -HU02 * + [ #V2 #T2 #HV02 #HT02 #H destruct + lapply (lpxs_cpx_trans … HT02 (L.ⓓV1) ?) + /4 width=5 by lpxs_pair, cpxs_trans, cpxs_strap1, ex3_2_intro, or_introl/ + | #T2 #HT02 #HUT2 + lapply (lpxs_cpx_trans … HT02 (L.ⓓV1) ?) -HT02 + /4 width=3 by lpxs_pair, cpxs_trans, ex3_intro, or_intror/ + ] +| #U1 #HTU1 #HU01 + elim (lift_total U2 0 1) #U #HU2 + /6 width=12 by cpxs_strap1, cpx_lift, drop_drop, ex3_intro, or_intror/ +] +qed-. + +(* More advanced properties *************************************************) + +lemma lpxs_pair2: ∀h,g,I,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + ∀V1,V2. ⦃G, L2⦄ ⊢ V1 ➡*[h, g] V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ➡*[h, g] L2.ⓑ{I}V2. +/3 width=3 by lpxs_pair, lpxs_cpxs_trans/ qed. + +(* Properties on supclosure *************************************************) + +lemma lpx_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[ #G2 #L2 #T2 #H12 #K1 #HKL1 elim (lpx_fqu_trans … H12 … HKL1) -L1 + /3 width=5 by cpx_cpxs, fqu_fqup, ex3_2_intro/ +| #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 + #L0 #T0 #HT10 #HT0 #HL0 elim (lpx_fqu_trans … H2 … HL0) -L + #L #T3 #HT3 #HT32 #HL2 elim (fqup_cpx_trans … HT0 … HT3) -T + /3 width=7 by cpxs_strap1, fqup_strap1, ex3_2_intro/ +] +qed-. + +lemma lpx_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 [ /2 width=5 by ex3_2_intro/ ] +#G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 +#L0 #T0 #HT10 #HT0 #HL0 elim (lpx_fquq_trans … H2 … HL0) -L +#L #T3 #HT3 #HT32 #HL2 elim (fqus_cpx_trans … HT0 … HT3) -T +/3 width=7 by cpxs_strap1, fqus_strap1, ex3_2_intro/ +qed-. + +lemma lpxs_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 +[ /2 width=5 by ex3_2_intro/ +| #K1 #K #HK1 #_ * #L #T #HT1 #HT2 #HL2 -HT12 + lapply (lpx_cpxs_trans … HT1 … HK1) -HT1 + elim (lpx_fquq_trans … HT2 … HK1) -K + /3 width=7 by lpxs_strap2, cpxs_strap1, ex3_2_intro/ +] +qed-. + +lemma lpxs_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #HT12 #K1 #H @(lpxs_ind_dx … H) -K1 +[ /2 width=5 by ex3_2_intro/ +| #K1 #K #HK1 #_ * #L #T #HT1 #HT2 #HL2 -HT12 + lapply (lpx_cpxs_trans … HT1 … HK1) -HT1 + elim (lpx_fqup_trans … HT2 … HK1) -K + /3 width=7 by lpxs_strap2, cpxs_trans, ex3_2_intro/ +] +qed-. + +lemma lpxs_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡*[h, g] T & ⦃G1, K1, T⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 /2 width=5 by ex3_2_intro/ +#G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1 +#L0 #T0 #HT10 #HT0 #HL0 elim (lpxs_fquq_trans … H2 … HL0) -L +#L #T3 #HT3 #HT32 #HL2 elim (fqus_cpxs_trans … HT3 … HT0) -T +/3 width=7 by cpxs_trans, fqus_strap1, ex3_2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_drop.ma new file mode 100644 index 000000000..0382fb632 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_drop.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/lpx_drop.ma". +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Properties on local environment slicing ***********************************) + +lemma lpxs_drop_conf: ∀h,g,G. dropable_sn (lpxs h g G). +/3 width=3 by dropable_sn_TC, lpx_drop_conf/ qed-. + +lemma drop_lpxs_trans: ∀h,g,G. dedropable_sn (lpxs h g G). +/3 width=3 by dedropable_sn_TC, drop_lpx_trans/ qed-. + +lemma lpxs_drop_trans_O1: ∀h,g,G. dropable_dx (lpxs h g G). +/3 width=3 by dropable_dx_TC, lpx_drop_trans_O1/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lleq.ma new file mode 100644 index 000000000..064ae9002 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lleq.ma @@ -0,0 +1,141 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/reduction/lpx_lleq.ma". +include "basic_2A/computation/cpxs_lreq.ma". +include "basic_2A/computation/lpxs_drop.ma". +include "basic_2A/computation/lpxs_cpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ******************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_lpxs_trans: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡*[h, g] K2 → + ∀L1,T,l. L1 ≡[T, l] L2 → + ∃∃K1. ⦃G, L1⦄ ⊢ ➡*[h, g] K1 & K1 ≡[T, l] K2. +#h #g #G #L2 #K2 #H @(lpxs_ind … H) -K2 /2 width=3 by ex2_intro/ +#K #K2 #_ #HK2 #IH #L1 #T #l #HT elim (IH … HT) -L2 +#L #HL1 #HT elim (lleq_lpx_trans … HK2 … HT) -K +/3 width=3 by lpxs_strap1, ex2_intro/ +qed-. + +lemma lpxs_nlleq_inv_step_sn: ∀h,g,G,L1,L2,T,l. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → + ∃∃L,L0. ⦃G, L1⦄ ⊢ ➡[h, g] L & L1 ≡[T, l] L → ⊥ & ⦃G, L⦄ ⊢ ➡*[h, g] L0 & L0 ≡[T, l] L2. +#h #g #G #L1 #L2 #T #l #H @(lpxs_ind_dx … H) -L1 +[ #H elim H -H // +| #L1 #L #H1 #H2 #IH2 #H12 elim (lleq_dec T L1 L l) #H + [ -H1 -H2 elim IH2 -IH2 /3 width=3 by lleq_trans/ -H12 + #L0 #L3 #H1 #H2 #H3 #H4 lapply (lleq_nlleq_trans … H … H2) -H2 + #H2 elim (lleq_lpx_trans … H1 … H) -L + #L #H1 #H lapply (nlleq_lleq_div … H … H2) -H2 + #H2 elim (lleq_lpxs_trans … H3 … H) -L0 + /3 width=8 by lleq_trans, ex4_2_intro/ + | -H12 -IH2 /3 width=6 by ex4_2_intro/ + ] +] +qed-. + +lemma lpxs_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G1 #L1 #V1 #X #H1 #H2 elim (lpxs_inv_pair2 … H1) -H1 + #K0 #V0 #H1KL1 #_ #H destruct + elim (lleq_inv_lref_ge_dx … H2 ? I L1 V1) -H2 // + #K1 #H #H2KL1 lapply (drop_inv_O2 … H) -H #H destruct + /2 width=4 by fqu_lref_O, ex3_intro/ +| * [ #a ] #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H + [ elim (lleq_inv_bind … H) + | elim (lleq_inv_flat … H) + ] -H /2 width=4 by fqu_pair_sn, ex3_intro/ +| #a #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_bind_O … H) -H + /3 width=4 by lpxs_pair, fqu_bind_dx, ex3_intro/ +| #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_flat … H) -H + /2 width=4 by fqu_flat_dx, ex3_intro/ +| #G1 #L1 #L #T1 #U1 #m #HL1 #HTU1 #K1 #H1KL1 #H2KL1 + elim (drop_O1_le (Ⓕ) (m+1) K1) + [ #K #HK1 lapply (lleq_inv_lift_le … H2KL1 … HK1 HL1 … HTU1 ?) -H2KL1 // + #H2KL elim (lpxs_drop_trans_O1 … H1KL1 … HL1) -L1 + #K0 #HK10 #H1KL lapply (drop_mono … HK10 … HK1) -HK10 #H destruct + /3 width=4 by fqu_drop, ex3_intro/ + | lapply (drop_fwd_length_le2 … HL1) -L -T1 -g + lapply (lleq_fwd_length … H2KL1) // + ] +] +qed-. + +lemma lpxs_lleq_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fquq_inv_gen … H) -H +[ #H elim (lpxs_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fquq, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +lemma lpxs_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[ #G2 #L2 #T2 #H #K1 #H1KL1 #H2KL1 elim (lpxs_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fqup, ex3_intro/ +| #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #K1 #H1KL1 #H2KL1 elim (IHT1 … H2KL1) // -L1 + #K #HT1 #H1KL #H2KL elim (lpxs_lleq_fqu_trans … HT2 … H1KL H2KL) -L + /3 width=5 by fqup_strap1, ex3_intro/ +] +qed-. + +lemma lpxs_lleq_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fqus_inv_gen … H) -H +[ #H elim (lpxs_lleq_fqup_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqup_fqus, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +fact lreq_lpxs_trans_lleq_aux: ∀h,g,G,L1,L0,l,m. L1 ⩬[l, m] L0 → m = ∞ → + ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, g] L2 → + ∃∃L. L ⩬[l, m] L2 & ⦃G, L1⦄ ⊢ ➡*[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +#h #g #G #L1 #L0 #l #m #H elim H -L1 -L0 -l -m +[ #l #m #_ #L2 #H >(lpxs_inv_atom1 … H) -H + /3 width=5 by ex3_intro, conj/ +| #I1 #I0 #L1 #L0 #V1 #V0 #_ #_ #Hm destruct +| #I #L1 #L0 #V1 #m #HL10 #IHL10 #Hm #Y #H + elim (lpxs_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + lapply (ysucc_inv_Y_dx … Hm) -Hm #Hm + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I}V2)) /3 width=3 by lpxs_pair, lreq_cpxs_trans, lreq_pair/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_pair_O_Y/ +| #I1 #I0 #L1 #L0 #V1 #V0 #l #m #HL10 #IHL10 #Hm #Y #H + elim (lpxs_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I1}V1)) /3 width=1 by lpxs_pair, lreq_succ/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_succ/ +] +qed-. + +lemma lreq_lpxs_trans_lleq: ∀h,g,G,L1,L0,l. L1 ⩬[l, ∞] L0 → + ∀L2. ⦃G, L0⦄ ⊢ ➡*[h, g] L2 → + ∃∃L. L ⩬[l, ∞] L2 & ⦃G, L1⦄ ⊢ ➡*[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +/2 width=1 by lreq_lpxs_trans_lleq_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lpxs.ma new file mode 100644 index 000000000..09ddcfeba --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lpxs_lpxs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lpxs.ma". + +(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************) + +(* Main properties **********************************************************) + +theorem lpxs_trans: ∀h,g,G. Transitive … (lpxs h g G). +/2 width=3 by trans_TC/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc.ma new file mode 100644 index 000000000..a0bb73d7a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc.ma @@ -0,0 +1,114 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqc_4.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/static/aaa.ma". +include "basic_2A/computation/gcp_cr.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +inductive lsubc (RP) (G): relation lenv ≝ +| lsubc_atom: lsubc RP G (⋆) (⋆) +| lsubc_pair: ∀I,L1,L2,V. lsubc RP G L1 L2 → lsubc RP G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubc_beta: ∀L1,L2,V,W,A. ⦃G, L1, V⦄ ϵ[RP] 〚A〛 → ⦃G, L1, W⦄ ϵ[RP] 〚A〛 → ⦃G, L2⦄ ⊢ W ⁝ A → + lsubc RP G L1 L2 → lsubc RP G (L1. ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (generic reducibility)" + 'LRSubEqC RP G L1 L2 = (lsubc RP G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsubc_inv_atom1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 = ⋆ → L2 = ⋆. +#RP #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: csubc_gen_sort_r *) +lemma lsubc_inv_atom1: ∀RP,G,L2. G ⊢ ⋆ ⫃[RP] L2 → L2 = ⋆. +/2 width=5 by lsubc_inv_atom1_aux/ qed-. + +fact lsubc_inv_pair1_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L2 = K2. ⓛW & X = ⓝW.V & I = Abbr. +#RP #G #L1 #L2 * -L1 -L2 +[ #I #K1 #V #H destruct +| #J #L1 #L2 #V #HL12 #I #K1 #W #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K1 #V #H destruct /3 width=10 by ex7_4_intro, or_intror/ +] +qed-. + +(* Basic_1: was: csubc_gen_head_r *) +lemma lsubc_inv_pair1: ∀RP,I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃[RP] L2 → + (∃∃K2. G ⊢ K1 ⫃[RP] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,V,W,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L2 = K2.ⓛW & X = ⓝW.V & I = Abbr. +/2 width=3 by lsubc_inv_pair1_aux/ qed-. + +fact lsubc_inv_atom2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L2 = ⋆ → L1 = ⋆. +#RP #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #V #W #A #_ #_ #_ #_ #H destruct +] +qed-. + +(* Basic_1: was just: csubc_gen_sort_l *) +lemma lsubc_inv_atom2: ∀RP,G,L1. G ⊢ L1 ⫃[RP] ⋆ → L1 = ⋆. +/2 width=5 by lsubc_inv_atom2_aux/ qed-. + +fact lsubc_inv_pair2_aux: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀I,K2,W. L2 = K2.ⓑ{I} W → + (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1. ⓑ{I} W) ∨ + ∃∃K1,V,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L1 = K1.ⓓⓝW.V & I = Abst. +#RP #G #L1 #L2 * -L1 -L2 +[ #I #K2 #W #H destruct +| #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #V1 #W2 #A #HV1 #H1W2 #H2W2 #HL12 #I #K2 #W #H destruct /3 width=8 by ex6_3_intro, or_intror/ +] +qed-. + +(* Basic_1: was just: csubc_gen_head_l *) +lemma lsubc_inv_pair2: ∀RP,I,G,L1,K2,W. G ⊢ L1 ⫃[RP] K2.ⓑ{I} W → + (∃∃K1. G ⊢ K1 ⫃[RP] K2 & L1 = K1.ⓑ{I} W) ∨ + ∃∃K1,V,A. ⦃G, K1, V⦄ ϵ[RP] 〚A〛 & ⦃G, K1, W⦄ ϵ[RP] 〚A〛 & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃[RP] K2 & + L1 = K1.ⓓⓝW.V & I = Abst. +/2 width=3 by lsubc_inv_pair2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubc_fwd_lsubr: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → L1 ⫃ L2. +#RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was just: csubc_refl *) +lemma lsubc_refl: ∀RP,G,L. G ⊢ L ⫃[RP] L. +#RP #G #L elim L -L /2 width=1 by lsubc_pair/ +qed. + +(* Basic_1: removed theorems 3: + csubc_clear_conf csubc_getl_conf csubc_csuba +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drop.ma new file mode 100644 index 000000000..2eb945da9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drop.ma @@ -0,0 +1,70 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_lift.ma". +include "basic_2A/computation/lsubc.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* Properties concerning basic local environment slicing ********************) + +(* Basic_1: was: csubc_drop_conf_O *) +(* Note: the constant 0 can not be generalized *) +lemma lsubc_drop_O1_trans: ∀RP,G,L1,L2. G ⊢ L1 ⫃[RP] L2 → ∀K2,s,m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. ⬇[s, 0, m] L1 ≡ K1 & G ⊢ K1 ⫃[RP] K2. +#RP #G #L1 #L2 #H elim H -L1 -L2 +[ #X #s #m #H elim (drop_inv_atom1 … H) -H /4 width=3 by drop_atom, ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #X #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #H destruct + [ elim (IHL12 L2 s 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H + /3 width=3 by lsubc_pair, drop_pair, ex2_intro/ + | elim (IHL12 … H) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #V #W #A #HV #H1W #H2W #_ #IHL12 #X #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #H destruct + [ elim (IHL12 L2 s 0) -IHL12 // #X #H <(drop_inv_O2 … H) -H + /3 width=8 by lsubc_beta, drop_pair, ex2_intro/ + | elim (IHL12 … H) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Basic_1: was: csubc_drop_conf_rev *) +lemma drop_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → + ∀G,L1,K1,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → + ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇[Ⓕ, l, m] L2 ≡ K2. +#RR #RS #RP #Hgcp #G #L1 #K1 #l #m #H elim H -L1 -K1 -l -m +[ #l #m #Hm #X #H elim (lsubc_inv_atom1 … H) -H + >Hm /2 width=3 by ex2_intro/ +| #L1 #I #V1 #X #H + elim (lsubc_inv_pair1 … H) -H * + [ #K1 #HLK1 #H destruct /3 width=3 by lsubc_pair, drop_pair, ex2_intro/ + | #K1 #V #W1 #A #HV1 #H1W1 #H2W1 #HLK1 #H1 #H2 #H3 destruct + /3 width=4 by lsubc_beta, drop_pair, ex2_intro/ + ] +| #I #L1 #K1 #V1 #m #_ #IHLK1 #K2 #HK12 + elim (IHLK1 … HK12) -K1 /3 width=5 by lsubc_pair, drop_drop, ex2_intro/ +| #I #L1 #K1 #V1 #V2 #l #m #HLK1 #HV21 #IHLK1 #X #H + elim (lsubc_inv_pair1 … H) -H * + [ #K2 #HK12 #H destruct + elim (IHLK1 … HK12) -K1 /3 width=5 by lsubc_pair, drop_skip, ex2_intro/ + | #K2 #V #W2 #A #HV2 #H1W2 #H2W2 #HK12 #H1 #H2 #H3 destruct + elim (lift_inv_flat1 … HV21) -HV21 #W3 #V3 #HW23 #HV3 #H destruct + elim (IHLK1 … HK12) #K #HL1K #HK2 + lapply (gcr_lift … Hgcp … HV2 … HLK1 … HV3) -HV2 + lapply (gcr_lift … Hgcp … H1W2 … HLK1 … HW23) -H1W2 + /4 width=11 by lsubc_beta, aaa_lift, drop_skip, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drops.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drops.ma new file mode 100644 index 000000000..41c348151 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_drops.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lsubc_drop.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* Properties concerning generic local environment slicing ******************) + +(* Basic_1: was: csubc_drop1_conf_rev *) +lemma drops_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP → + ∀G,L1,K1,cs. ⬇*[Ⓕ, cs] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 → + ∃∃L2. G ⊢ L1 ⫃[RP] L2 & ⬇*[Ⓕ, cs] L2 ≡ K2. +#RR #RS #RP #Hgcp #G #L1 #K1 #cs #H elim H -L1 -K1 -cs +[ /2 width=3 by drops_nil, ex2_intro/ +| #L1 #L #K1 #cs #l #m #_ #HLK1 #IHL #K2 #HK12 + elim (drop_lsubc_trans … Hgcp … HLK1 … HK12) -Hgcp -K1 #K #HLK #HK2 + elim (IHL … HLK) -IHL -HLK /3 width=5 by drops_cons, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_lsuba.ma new file mode 100644 index 000000000..00a6d4d2b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsubc_lsuba.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsuba.ma". +include "basic_2A/computation/gcp_aaa.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR GENERIC REDUCIBILITY ********************) + +(* properties concerning lenv refinement for atomic arity assignment ********) + +lemma lsuba_lsubc: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP → + ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → G ⊢ L1 ⫃[RP] L2. +#RR #RS #RP #H1RP #H2RP #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubc_pair/ +#L1 #L2 #W #V #A #H elim (aaa_inv_cast … H) -H /3 width=4 by acr_aaa, lsubc_beta/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx.ma new file mode 100644 index 000000000..4f2afb775 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/sn_6.ma". +include "basic_2A/multiple/lleq.ma". +include "basic_2A/reduction/lpx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +definition lsx: ∀h. sd h → relation4 ynat term genv lenv ≝ + λh,g,l,T,G. SN … (lpx h g G) (lleq l T). + +interpretation + "extended strong normalization (local environment)" + 'SN h g l T G L = (lsx h g T l G L). + +(* Basic eliminators ********************************************************) + +lemma lsx_ind: ∀h,g,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊*[h, g, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → + R L1 + ) → + ∀L. G ⊢ ⬊*[h, g, T, l] L → R L. +#h #g #G #T #l #R #H0 #L1 #H elim H -L1 +/5 width=1 by lleq_sym, SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsx_intro: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, g, T, l] L2) → + G ⊢ ⬊*[h, g, T, l] L1. +/5 width=1 by lleq_sym, SN_intro/ qed. + +lemma lsx_atom: ∀h,g,G,T,l. G ⊢ ⬊*[h, g, T, l] ⋆. +#h #g #G #T #l @lsx_intro +#X #H #HT lapply (lpx_inv_atom1 … H) -H +#H destruct elim HT -HT // +qed. + +lemma lsx_sort: ∀h,g,G,L,l,k. G ⊢ ⬊*[h, g, ⋆k, l] L. +#h #g #G #L1 #l #k @lsx_intro +#L2 #HL12 #H elim H -H +/3 width=4 by lpx_fwd_length, lleq_sort/ +qed. + +lemma lsx_gref: ∀h,g,G,L,l,p. G ⊢ ⬊*[h, g, §p, l] L. +#h #g #G #L1 #l #p @lsx_intro +#L2 #HL12 #H elim H -H +/3 width=4 by lpx_fwd_length, lleq_gref/ +qed. + +lemma lsx_ge_up: ∀h,g,G,L,T,U,lt,l,m. lt ≤ yinj l + yinj m → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → G ⊢ ⬊*[h, g, U, l] L. +#h #g #G #L #T #U #lt #l #m #Hltlm #HTU #H @(lsx_ind … H) -L +/5 width=7 by lsx_intro, lleq_ge_up/ +qed-. + +lemma lsx_ge: ∀h,g,G,L,T,l1,l2. l1 ≤ l2 → + G ⊢ ⬊*[h, g, T, l1] L → G ⊢ ⬊*[h, g, T, l2] L. +#h #g #G #L #T #l1 #l2 #Hl12 #H @(lsx_ind … H) -L +/5 width=7 by lsx_intro, lleq_ge/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsx_fwd_bind_sn: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L. +#h #g #a #I #G #L #V #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#L2 #HL12 #HV @IHL1 /3 width=4 by lleq_fwd_bind_sn/ +qed-. + +lemma lsx_fwd_flat_sn: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L. +#h #g #I #G #L #V #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#L2 #HL12 #HV @IHL1 /3 width=3 by lleq_fwd_flat_sn/ +qed-. + +lemma lsx_fwd_flat_dx: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, g, T, l] L. +#h #g #I #G #L #V #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#L2 #HL12 #HV @IHL1 /3 width=3 by lleq_fwd_flat_dx/ +qed-. + +lemma lsx_fwd_pair_sn: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ②{I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L. +#h #g * /2 width=4 by lsx_fwd_bind_sn, lsx_fwd_flat_sn/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma lsx_inv_flat: ∀h,g,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L ∧ G ⊢ ⬊*[h, g, T, l] L. +/3 width=3 by lsx_fwd_flat_sn, lsx_fwd_flat_dx, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_alt.ma new file mode 100644 index 000000000..9468bedf2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_alt.ma @@ -0,0 +1,115 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/snalt_6.ma". +include "basic_2A/computation/lpxs_lleq.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* alternative definition of lsx *) +definition lsxa: ∀h. sd h → relation4 ynat term genv lenv ≝ + λh,g,l,T,G. SN … (lpxs h g G) (lleq l T). + +interpretation + "extended strong normalization (local environment) alternative" + 'SNAlt h g l T G L = (lsxa h g T l G L). + +(* Basic eliminators ********************************************************) + +lemma lsxa_ind: ∀h,g,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊⬊*[h, g, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → + R L1 + ) → + ∀L. G ⊢ ⬊⬊*[h, g, T, l] L → R L. +#h #g #G #T #l #R #H0 #L1 #H elim H -L1 +/5 width=1 by lleq_sym, SN_intro/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsxa_intro: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → + G ⊢ ⬊⬊*[h, g, T, l] L1. +/5 width=1 by lleq_sym, SN_intro/ qed. + +fact lsxa_intro_aux: ∀h,g,G,L1,T,l. + (∀L,L2. ⦃G, L⦄ ⊢ ➡*[h, g] L2 → L1 ≡[T, l] L → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → + G ⊢ ⬊⬊*[h, g, T, l] L1. +/4 width=3 by lsxa_intro/ qed-. + +lemma lsxa_lleq_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊⬊*[h, g, T, l] L1 → + ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsxa_ind … H) -L1 +#L1 #_ #IHL1 #L2 #HL12 @lsxa_intro +#K2 #HLK2 #HnLK2 elim (lleq_lpxs_trans … HLK2 … HL12) -HLK2 +/5 width=4 by lleq_canc_sn, lleq_trans/ +qed-. + +lemma lsxa_lpxs_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊⬊*[h, g, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → G ⊢ ⬊⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsxa_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 +elim (lleq_dec T L1 L2 l) /3 width=4 by lsxa_lleq_trans/ +qed-. + +lemma lsxa_intro_lpx: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊⬊*[h, g, T, l] L2) → + G ⊢ ⬊⬊*[h, g, T, l] L1. +#h #g #G #L1 #T #l #IH @lsxa_intro_aux +#L #L2 #H @(lpxs_ind_dx … H) -L +[ #H destruct #H elim H // +| #L0 #L elim (lleq_dec T L1 L l) /3 width=1 by/ + #HnT #HL0 #HL2 #_ #HT #_ elim (lleq_lpx_trans … HL0 … HT) -L0 + #L0 #HL10 #HL0 @(lsxa_lpxs_trans … HL2) -HL2 + /5 width=3 by lsxa_lleq_trans, lleq_trans/ +] +qed-. + +(* Main properties **********************************************************) + +theorem lsx_lsxa: ∀h,g,G,L,T,l. G ⊢ ⬊*[h, g, T, l] L → G ⊢ ⬊⬊*[h, g, T, l] L. +#h #g #G #L #T #l #H @(lsx_ind … H) -L +/4 width=1 by lsxa_intro_lpx/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem lsxa_inv_lsx: ∀h,g,G,L,T,l. G ⊢ ⬊⬊*[h, g, T, l] L → G ⊢ ⬊*[h, g, T, l] L. +#h #g #G #L #T #l #H @(lsxa_ind … H) -L +/4 width=1 by lsx_intro, lpx_lpxs/ +qed-. + +(* Advanced properties ******************************************************) + +lemma lsx_intro_alt: ∀h,g,G,L1,T,l. + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → G ⊢ ⬊*[h, g, T, l] L2) → + G ⊢ ⬊*[h, g, T, l] L1. +/6 width=1 by lsxa_inv_lsx, lsx_lsxa, lsxa_intro/ qed. + +lemma lsx_lpxs_trans: ∀h,g,G,L1,T,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → G ⊢ ⬊*[h, g, T, l] L2. +/4 width=3 by lsxa_inv_lsx, lsx_lsxa, lsxa_lpxs_trans/ qed-. + +(* Advanced eliminators *****************************************************) + +lemma lsx_ind_alt: ∀h,g,G,T,l. ∀R:predicate lenv. + (∀L1. G ⊢ ⬊*[h, g, T, l] L1 → + (∀L2. ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → (L1 ≡[T, l] L2 → ⊥) → R L2) → + R L1 + ) → + ∀L. G ⊢ ⬊*[h, g, T, l] L → R L. +#h #g #G #T #l #R #IH #L #H @(lsxa_ind h g G T l … L) +/4 width=1 by lsxa_inv_lsx, lsx_lsxa/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_csx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_csx.ma new file mode 100644 index 000000000..1d1966974 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_csx.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/csx_lpxs.ma". +include "basic_2A/computation/lcosx_cpx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +lemma lsx_lref_be_lpxs: ∀h,g,I,G,K1,V,i,l. l ≤ yinj i → ⦃G, K1⦄ ⊢ ⬊*[h, g] V → + ∀K2. G ⊢ ⬊*[h, g, V, 0] K2 → ⦃G, K1⦄ ⊢ ➡*[h, g] K2 → + ∀L2. ⬇[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, l] L2. +#h #g #I #G #K1 #V #i #l #Hli #H @(csx_ind_alt … H) -V +#V0 #_ #IHV0 #K2 #H @(lsx_ind … H) -K2 +#K0 #HK0 #IHK0 #HK10 #L0 #HLK0 @lsx_intro +#L2 #HL02 #HnL02 elim (lpx_drop_conf … HLK0 … HL02) -HL02 +#Y #H #HLK2 elim (lpx_inv_pair1 … H) -H +#K2 #V2 #HK02 #HV02 #H destruct +elim (eq_term_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnL02 -HLK0 ] +[ /4 width=8 by lpxs_strap1, lleq_lref/ +| @(IHV0 … HnV02 … HLK2) -IHV0 -HnV02 -HLK2 + /3 width=4 by lsx_cpx_trans_O, lsx_lpx_trans, lpxs_cpx_trans, lpxs_strap1/ (**) (* full auto too slow *) +] +qed. + +lemma lsx_lref_be: ∀h,g,I,G,K,V,i,l. l ≤ yinj i → ⦃G, K⦄ ⊢ ⬊*[h, g] V → + G ⊢ ⬊*[h, g, V, 0] K → + ∀L. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, l] L. +/2 width=8 by lsx_lref_be_lpxs/ qed. + +(* Main properties **********************************************************) + +theorem csx_lsx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ∀l. G ⊢ ⬊*[h, g, T, l] L. +#h #g #G #L #T @(fqup_wf_ind_eq … G L T) -G -L -T +#Z #Y #X #IH #G #L * * // +[ #i #HG #HL #HT #H #l destruct + elim (lt_or_ge i (|L|)) /2 width=1 by lsx_lref_free/ + elim (ylt_split i l) /2 width=1 by lsx_lref_skip/ + #Hli #Hi elim (drop_O1_lt (Ⓕ) … Hi) -Hi + #I #K #V #HLK lapply (csx_inv_lref_bind … HLK … H) -H + /4 width=6 by lsx_lref_be, fqup_lref/ +| #a #I #V #T #HG #HL #HT #H #l destruct + elim (csx_fwd_bind … H) -H /3 width=1 by lsx_bind/ +| #I #V #T #HG #HL #HT #H #l destruct + elim (csx_fwd_flat … H) -H /3 width=1 by lsx_flat/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_drop.ma new file mode 100644 index 000000000..8c02ca9ce --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_drop.ma @@ -0,0 +1,96 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_drop.ma". +include "basic_2A/reduction/lpx_drop.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +lemma lsx_lref_free: ∀h,g,G,L,l,i. |L| ≤ i → G ⊢ ⬊*[h, g, #i, l] L. +#h #g #G #L1 #l #i #HL1 @lsx_intro +#L2 #HL12 #H elim H -H +/4 width=6 by lpx_fwd_length, lleq_free, le_repl_sn_conf_aux/ +qed. + +lemma lsx_lref_skip: ∀h,g,G,L,l,i. yinj i < l → G ⊢ ⬊*[h, g, #i, l] L. +#h #g #G #L1 #l #i #HL1 @lsx_intro +#L2 #HL12 #H elim H -H +/3 width=4 by lpx_fwd_length, lleq_skip/ +qed. + +(* Advanced forward lemmas **************************************************) + +lemma lsx_fwd_lref_be: ∀h,g,I,G,L,l,i. l ≤ yinj i → G ⊢ ⬊*[h, g, #i, l] L → + ∀K,V. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, V, 0] K. +#h #g #I #G #L #l #i #Hli #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #V #HLK1 @lsx_intro +#K2 #HK12 #HnK12 lapply (drop_fwd_drop2 … HLK1) +#H2LK1 elim (drop_lpx_trans … H2LK1 … HK12) -H2LK1 -HK12 +#L2 #HL12 #H2LK2 #H elim (lreq_drop_conf_be … H … HLK1) -H /2 width=1 by ylt_inj/ +#Y #_ #HLK2 lapply (drop_fwd_drop2 … HLK2) +#HY lapply (drop_mono … HY … H2LK2) -HY -H2LK2 #H destruct +/4 width=10 by lleq_inv_lref_ge/ +qed-. + +(* Properties on relocation *************************************************) + +lemma lsx_lift_le: ∀h,g,G,K,T,U,lt,l,m. lt ≤ yinj l → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, T, lt] K → + ∀L. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, U, lt] L. +#h #g #G #K #T #U #lt #l #m #Hltl #HTU #H @(lsx_ind … H) -K +#K1 #_ #IHK1 #L1 #HLK1 @lsx_intro +#L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12 +/4 width=10 by lleq_lift_le/ +qed-. + +lemma lsx_lift_ge: ∀h,g,G,K,T,U,lt,l,m. yinj l ≤ lt → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, T, lt] K → + ∀L. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, U, lt + m] L. +#h #g #G #K #T #U #lt #l #m #Hllt #HTU #H @(lsx_ind … H) -K +#K1 #_ #IHK1 #L1 #HLK1 @lsx_intro +#L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12 +/4 width=9 by lleq_lift_ge/ +qed-. + +(* Inversion lemmas on relocation *******************************************) + +lemma lsx_inv_lift_le: ∀h,g,G,L,T,U,lt,l,m. lt ≤ yinj l → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → + ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, lt] K. +#h #g #G #L #T #U #lt #l #m #Hltl #HTU #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro +#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 +/4 width=10 by lleq_inv_lift_le/ +qed-. + +lemma lsx_inv_lift_be: ∀h,g,G,L,T,U,lt,l,m. yinj l ≤ lt → lt ≤ l + m → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → + ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, l] K. +#h #g #G #L #T #U #lt #l #m #Hllt #Hltlm #HTU #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro +#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 +/4 width=11 by lleq_inv_lift_be/ +qed-. + +lemma lsx_inv_lift_ge: ∀h,g,G,L,T,U,lt,l,m. yinj l + yinj m ≤ lt → + ⬆[l, m] T ≡ U → G ⊢ ⬊*[h, g, U, lt] L → + ∀K. ⬇[Ⓕ, l, m] L ≡ K → G ⊢ ⬊*[h, g, T, lt-m] K. +#h #g #G #L #T #U #lt #l #m #Hlmlt #HTU #H @(lsx_ind … H) -L +#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro +#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12 +/4 width=9 by lleq_inv_lift_ge/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma new file mode 100644 index 000000000..a50714b20 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpx.ma @@ -0,0 +1,63 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/reduction/lpx_lleq.ma". +include "basic_2A/computation/lsx.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +lemma lsx_lleq_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. L1 ≡[T, l] L2 → G ⊢ ⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsx_ind … H) -L1 +#L1 #_ #IHL1 #L2 #HL12 @lsx_intro +#K2 #HLK2 #HnLK2 elim (lleq_lpx_trans … HLK2 … HL12) -HLK2 +/5 width=4 by lleq_canc_sn, lleq_trans/ +qed-. + +lemma lsx_lpx_trans: ∀h,g,T,G,L1,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → G ⊢ ⬊*[h, g, T, l] L2. +#h #g #T #G #L1 #l #H @(lsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12 +elim (lleq_dec T L1 L2 l) /3 width=4 by lsx_lleq_trans/ +qed-. + +lemma lsx_lreq_conf: ∀h,g,G,L1,T,l. G ⊢ ⬊*[h, g, T, l] L1 → + ∀L2. L1 ⩬[l, ∞] L2 → G ⊢ ⬊*[h, g, T, l] L2. +#h #g #G #L1 #T #l #H @(lsx_ind … H) -L1 +#L1 #_ #IHL1 #L2 #HL12 @lsx_intro +#L3 #HL23 #HnL23 elim (lreq_lpx_trans_lleq … HL12 … HL23) -HL12 -HL23 +#L0 #HL03 #HL10 #H elim (H T) -H /4 width=4 by/ +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma lsx_fwd_bind_dx: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L → + G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V. +#h #g #a #I #G #L #V1 #T #l #H @(lsx_ind … H) -L +#L1 #_ #IHL1 @lsx_intro +#Y #H #HT elim (lpx_inv_pair1 … H) -H +#L2 #V2 #HL12 #_ #H destruct +@(lsx_lreq_conf … (L2.ⓑ{I}V1)) /2 width=1 by lreq_succ/ +@IHL1 // #H @HT -IHL1 -HL12 -HT +@(lleq_lreq_trans … (L2.ⓑ{I}V1)) +/2 width=2 by lleq_fwd_bind_dx, lreq_succ/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lsx_inv_bind: ∀h,g,a,I,G,L,V,T,l. G ⊢ ⬊*[h, g, ⓑ{a, I}V.T, l] L → + G ⊢ ⬊*[h, g, V, l] L ∧ G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V. +/3 width=4 by lsx_fwd_bind_sn, lsx_fwd_bind_dx, conj/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpxs.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpxs.ma new file mode 100644 index 000000000..d77771eec --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/lsx_lpxs.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/lpxs_lpxs.ma". +include "basic_2A/computation/lsx_alt.ma". + +(* SN EXTENDED STRONGLY NORMALIZING LOCAL ENVIRONMENTS **********************) + +(* Advanced properties ******************************************************) + +fact lsx_bind_lpxs_aux: ∀h,g,a,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → + ∀Y,T. G ⊢ ⬊*[h, g, T, ⫯l] Y → + ∀L2. Y = L2.ⓑ{I}V → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L2. +#h #g #a #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 +#L1 #HL1 #IHL1 #Y #T #H @(lsx_ind_alt … H) -Y +#Y #HY #IHY #L2 #H #HL12 destruct @lsx_intro_alt +#L0 #HL20 lapply (lpxs_trans … HL12 … HL20) +#HL10 #H elim (nlleq_inv_bind … H) -H [ -HL1 -IHY | -HY -IHL1 ] +[ #HnV elim (lleq_dec V L1 L2 l) + [ #HV @(IHL1 … L0) /3 width=5 by lsx_lpxs_trans, lpxs_pair, lleq_canc_sn/ (**) (* full auto too slow *) + | -HnV -HL10 /4 width=5 by lsx_lpxs_trans, lpxs_pair/ + ] +| /3 width=4 by lpxs_pair/ +] +qed-. + +lemma lsx_bind: ∀h,g,a,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L → + ∀T. G ⊢ ⬊*[h, g, T, ⫯l] L.ⓑ{I}V → + G ⊢ ⬊*[h, g, ⓑ{a,I}V.T, l] L. +/2 width=3 by lsx_bind_lpxs_aux/ qed. + +lemma lsx_flat_lpxs: ∀h,g,I,G,L1,V,l. G ⊢ ⬊*[h, g, V, l] L1 → + ∀L2,T. G ⊢ ⬊*[h, g, T, l] L2 → ⦃G, L1⦄ ⊢ ➡*[h, g] L2 → + G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L2. +#h #g #I #G #L1 #V #l #H @(lsx_ind_alt … H) -L1 +#L1 #HL1 #IHL1 #L2 #T #H @(lsx_ind_alt … H) -L2 +#L2 #HL2 #IHL2 #HL12 @lsx_intro_alt +#L0 #HL20 lapply (lpxs_trans … HL12 … HL20) +#HL10 #H elim (nlleq_inv_flat … H) -H [ -HL1 -IHL2 | -HL2 -IHL1 ] +[ #HnV elim (lleq_dec V L1 L2 l) + [ #HV @(IHL1 … L0) /3 width=3 by lsx_lpxs_trans, lleq_canc_sn/ (**) (* full auto too slow: 47s *) + | -HnV -HL10 /3 width=4 by lsx_lpxs_trans/ + ] +| /3 width=1 by/ +] +qed-. + +lemma lsx_flat: ∀h,g,I,G,L,V,l. G ⊢ ⬊*[h, g, V, l] L → + ∀T. G ⊢ ⬊*[h, g, T, l] L → G ⊢ ⬊*[h, g, ⓕ{I}V.T, l] L. +/2 width=3 by lsx_flat_lpxs/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds.ma new file mode 100644 index 000000000..f26ee0989 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds.ma @@ -0,0 +1,48 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/dpredstar_7.ma". +include "basic_2A/static/da.ma". +include "basic_2A/computation/cprs.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +definition scpds: ∀h. sd h → nat → relation4 genv lenv term term ≝ + λh,g,d2,G,L,T1,T2. + ∃∃T,d1. d2 ≤ d1 & ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 & ⦃G, L⦄ ⊢ T1 •*[h, d2] T & ⦃G, L⦄ ⊢ T ➡* T2. + +interpretation "stratified decomposed parallel computation (term)" + 'DPRedStar h g d G L T1 T2 = (scpds h g d G L T1 T2). + +(* Basic properties *********************************************************) + +lemma sta_cprs_scpds: ∀h,g,G,L,T1,T,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T → + ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 1] T2. +/2 width=6 by ex4_2_intro/ qed. + +lemma lstas_scpds: ∀h,g,G,L,T1,T2,d1. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → + ∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d2] T2. +/2 width=6 by ex4_2_intro/ qed. + +lemma scpds_strap1: ∀h,g,G,L,T1,T,T2,d. + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2. +#h #g #G #L #T1 #T #T2 #d * /3 width=8 by cprs_strap1, ex4_2_intro/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma scpds_fwd_cprs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2 → + ⦃G, L⦄ ⊢ T1 ➡* T2. +#h #g #G #L #T1 #T2 * /3 width=3 by cprs_strap2, lstas_cpr/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_aaa.ma new file mode 100644 index 000000000..3c325744a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_aaa.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas_aaa.ma". +include "basic_2A/computation/cpxs_aaa.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma scpds_aaa_conf: ∀h,g,G,L,d. Conf3 … (aaa G L) (scpds h g d G L). +#h #g #G #L #d #A #T #HT #U * /3 width=6 by lstas_aaa_conf, cprs_aaa_conf/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_lift.ma new file mode 100644 index 000000000..29e09ca25 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_lift.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_lift.ma". +include "basic_2A/unfold/lstas_lift.ma". +include "basic_2A/computation/cprs_lift.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +(* Relocation properties ****************************************************) + +lemma scpds_lift: ∀h,g,G,d. d_liftable (scpds h g d G). +#h #g #G #d2 #K #T1 #T2 * #T #d1 #Hd21 #Hd1 #HT1 #HT2 #L #s #l #m +elim (lift_total T l m) +/3 width=15 by cprs_lift, da_lift, lstas_lift, ex4_2_intro/ +qed. + +lemma scpds_inv_lift1: ∀h,g,G,d. d_deliftable_sn (scpds h g d G). +#h #g #G #d2 #L #U1 #U2 * #U #d1 #Hd21 #Hd1 #HU1 #HU2 #K #s #l #m #HLK #T1 #HTU1 +lapply (da_inv_lift … Hd1 … HLK … HTU1) -Hd1 #Hd1 +elim (lstas_inv_lift1 … HU1 … HLK … HTU1) -U1 #T #HTU #HT1 +elim (cprs_inv_lift1 … HU2 … HLK … HTU) -U -L +/3 width=8 by ex4_2_intro, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_scpds.ma b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_scpds.ma new file mode 100644 index 000000000..29abce7c3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/computation/scpds_scpds.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas_da.ma". +include "basic_2A/computation/lprs_cprs.ma". +include "basic_2A/computation/cpxs_cpxs.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************) + +(* Advanced properties ******************************************************) + +lemma scpds_strap2: ∀h,g,G,L,T1,T,T2,d1,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d1+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] T2 → + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d+1] T2. +#h #g #G #L #T1 #T #T2 #d1 #d #Hd1 #HT1 * +#T0 #d0 #Hd0 #HTd0 #HT0 #HT02 +lapply (lstas_da_conf … HT1 … Hd1) commutative_plus +/3 width=6 by le_S_S, ex4_2_intro/ +qed. + +lemma scpds_cprs_trans: ∀h,g,G,L,T1,T,T2,d. + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2. +#h #g #G #L #T1 #T #T2 #d * /3 width=8 by cprs_trans, ex4_2_intro/ +qed-. + +lemma lstas_scpds_trans: ∀h,g,G,L,T1,T,T2,d1,d2,d. + d2 ≤ d1 → ⦃G, L⦄ ⊢ T1 ▪[h, g] d1 → + ⦃G, L⦄ ⊢ T1 •*[h, d2] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d2+d] T2. +#h #g #G #L #T1 #T #T2 #d1 #d2 #d #Hd21 #HTd1 #HT1 * #T0 #d0 #Hd0 #HTd0 #HT0 #HT02 +lapply (lstas_da_conf … HT1 … HTd1) #HTd12 +lapply (da_mono … HTd12 … HTd0) -HTd12 -HTd0 #H destruct +lapply (le_minus_to_plus_r … Hd21 Hd0) -Hd21 -Hd0 +/3 width=7 by lstas_trans, ex4_2_intro/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma scpds_inv_abst1: ∀h,g,a,G,L,V1,T1,U2,d. ⦃G, L⦄ ⊢ ⓛ{a}V1.T1 •*➡*[h, g, d] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 •*➡*[h, g, d] T2 & + U2 = ⓛ{a}V2.T2. +#h #g #a #G #L #V1 #T1 #U2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 +lapply (da_inv_bind … Hd1) -Hd1 #Hd1 +elim (lstas_inv_bind1 … H1) -H1 #U #HTU1 #H destruct +elim (cprs_inv_abst1 … H2) -H2 #V2 #T2 #HV12 #HUT2 #H destruct +/3 width=6 by ex4_2_intro, ex3_2_intro/ +qed-. + +lemma scpds_inv_abbr_abst: ∀h,g,a1,a2,G,L,V1,W2,T1,T2,d. ⦃G, L⦄ ⊢ ⓓ{a1}V1.T1 •*➡*[h, g, d] ⓛ{a2}W2.T2 → + ∃∃T. ⦃G, L.ⓓV1⦄ ⊢ T1 •*➡*[h, g, d] T & ⬆[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true. +#h #g #a1 #a2 #G #L #V1 #W2 #T1 #T2 #d2 * #X #d1 #Hd21 #Hd1 #H1 #H2 +lapply (da_inv_bind … Hd1) -Hd1 #Hd1 +elim (lstas_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct +elim (cprs_inv_abbr1 … H2) -H2 * +[ #V2 #U2 #HV12 #HU12 #H destruct +| /3 width=6 by ex4_2_intro, ex3_intro/ +] +qed-. + +lemma scpds_inv_lstas_eq: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2 → + ∀T. ⦃G, L⦄ ⊢ T1 •*[h, d] T → ⦃G, L⦄ ⊢ T ➡* T2. +#h #g #G #L #T1 #T2 #d2 * +#T0 #d1 #_ #_ #HT10 #HT02 #T #HT1 +lapply (lstas_mono … HT10 … HT1) #H destruct // +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma scpds_fwd_cpxs: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d] T2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2. +#h #g #G #L #T1 #T2 #d * /3 width=5 by cpxs_trans, lstas_cpxs, cprs_cpxs/ +qed-. + +(* Main properties **********************************************************) + +theorem scpds_conf_eq: ∀h,g,G,L,T0,T1,d. ⦃G, L⦄ ⊢ T0 •*➡*[h, g, d] T1 → + ∀T2. ⦃G, L⦄ ⊢ T0 •*➡*[h, g, d] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ➡* T & ⦃G, L⦄ ⊢ T2 ➡* T. +#h #g #G #L #T0 #T1 #d0 * #U1 #d1 #_ #_ #H1 #HUT1 #T2 * #U2 #d2 #_ #_ #H2 #HUT2 -d1 -d2 +lapply (lstas_mono … H1 … H2) #H destruct -h -d0 /2 width=3 by cprs_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc.ma b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc.ma new file mode 100644 index 000000000..a1bb87e6d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/pconv_4.ma". +include "basic_2A/reduction/cpr.ma". + +(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************) + +definition cpc: relation4 genv lenv term term ≝ + λG,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 ∨ ⦃G, L⦄ ⊢ T2 ➡ T1. + +interpretation + "context-sensitive parallel conversion (term)" + 'PConv G L T1 T2 = (cpc G L T1 T2). + +(* Basic properties *********************************************************) + +lemma cpc_refl: ∀G,L. reflexive … (cpc G L). +/2 width=1 by or_intror/ qed. + +lemma cpc_sym: ∀G,L. symmetric … (cpc L G). +#G #L #T1 #T2 * /2 width=1 by or_introl, or_intror/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cpc_fwd_cpr: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬌ T2 → ∃∃T. ⦃G, L⦄ ⊢ T1 ➡ T & ⦃G, L⦄ ⊢ T2 ➡ T. +#G #L #T1 #T2 * /2 width=3 by ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc_cpc.ma b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc_cpc.ma new file mode 100644 index 000000000..3fe972a4b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/conversion/cpc_cpc.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/conversion/cpc.ma". + +(* CONTEXT-SENSITIVE PARALLEL CONVERSION ON TERMS ***************************) + +(* Main properties **********************************************************) + +theorem cpc_conf: ∀G,L,T0,T1,T2. ⦃G, L⦄ ⊢ T0 ⬌ T1 → ⦃G, L⦄ ⊢ T0 ⬌ T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ⬌ T & ⦃G, L⦄ ⊢ T2 ⬌ T. +/3 width=3 by cpc_sym, ex2_intro/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv.ma new file mode 100644 index 000000000..b2fb883ff --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv.ma @@ -0,0 +1,161 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqv_5.ma". +include "basic_2A/dynamic/shnv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Note: this is not transitive *) +inductive lsubsv (h) (g) (G): relation lenv ≝ +| lsubsv_atom: lsubsv h g G (⋆) (⋆) +| lsubsv_pair: ∀I,L1,L2,V. lsubsv h g G L1 L2 → + lsubsv h g G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubsv_beta: ∀L1,L2,W,V,d1. ⦃G, L1⦄ ⊢ ⓝW.V ¡[h, g, d1] → ⦃G, L2⦄ ⊢ W ¡[h, g] → + ⦃G, L1⦄ ⊢ V ▪[h, g] d1+1 → ⦃G, L2⦄ ⊢ W ▪[h, g] d1 → + lsubsv h g G L1 L2 → lsubsv h g G (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (stratified native validity)" + 'LRSubEqV h g G L1 L2 = (lsubsv h g G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsubsv_inv_atom1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → L1 = ⋆ → L2 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d1 #_ #_ #_ #_ #_ #H destruct +] +qed-. + +lemma lsubsv_inv_atom1: ∀h,g,G,L2. G ⊢ ⋆ ⫃¡[h, g] L2 → L2 = ⋆. +/2 width=6 by lsubsv_inv_atom1_aux/ qed-. + +fact lsubsv_inv_pair1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃¡[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K1 #X #H destruct +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #HL12 #J #K1 #X #H destruct /3 width=11 by or_intror, ex8_4_intro/ +] +qed-. + +lemma lsubsv_inv_pair1: ∀h,g,I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃¡[h, g] L2 → + (∃∃K2. G ⊢ K1 ⫃¡[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +/2 width=3 by lsubsv_inv_pair1_aux/ qed-. + +fact lsubsv_inv_atom2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → L2 = ⋆ → L1 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d1 #_ #_ #_ #_ #_ #H destruct +] +qed-. + +lemma lsubsv_inv_atom2: ∀h,g,G,L1. G ⊢ L1 ⫃¡[h, g] ⋆ → L1 = ⋆. +/2 width=6 by lsubsv_inv_atom2_aux/ qed-. + +fact lsubsv_inv_pair2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀I,K2,W. L2 = K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃¡[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & I = Abst & L1 = K1.ⓓⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K2 #U #H destruct +| #I #L1 #L2 #V #HL12 #J #K2 #U #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #HL12 #J #K2 #U #H destruct /3 width=8 by or_intror, ex7_3_intro/ +] +qed-. + +lemma lsubsv_inv_pair2: ∀h,g,I,G,L1,K2,W. G ⊢ L1 ⫃¡[h, g] K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃¡[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d1. ⦃G, K1⦄ ⊢ ⓝW.V ¡[h, g, d1] & ⦃G, K2⦄ ⊢ W ¡[h, g] & + ⦃G, K1⦄ ⊢ V ▪[h, g] d1+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d1 & + G ⊢ K1 ⫃¡[h, g] K2 & I = Abst & L1 = K1.ⓓⓝW.V. +/2 width=3 by lsubsv_inv_pair2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubsv_fwd_lsubr: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → L1 ⫃ L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsubsv_refl: ∀h,g,G,L. G ⊢ L ⫃¡[h, g] L. +#h #g #G #L elim L -L /2 width=1 by lsubsv_pair/ +qed. + +lemma lsubsv_cprs_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ➡* T2 → ⦃G, L1⦄ ⊢ T1 ➡* T2. +/3 width=6 by lsubsv_fwd_lsubr, lsubr_cprs_trans/ +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubsv_drop_O1_conf: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀K1,s,m. ⬇[s, 0, m] L1 ≡ K1 → + ∃∃K2. G ⊢ K1 ⫃¡[h, g] K2 & ⬇[s, 0, m] L2 ≡ K2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubsv_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=4 by lsubsv_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubsv_drop_O1_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀K2,s, m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. G ⊢ K1 ⫃¡[h, g] K2 & ⬇[s, 0, m] L1 ≡ K1. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubsv_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d1 #HWV #HW #HVd1 #HWd1 #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=4 by lsubsv_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_cpcs.ma new file mode 100644 index 000000000..0d0e80a75 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_cpcs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/equivalence/cpcs_cpcs.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties on context-sensitive parallel equivalence for terms ***********) + +lemma lsubsv_cpcs_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌* T2 → ⦃G, L1⦄ ⊢ T1 ⬌* T2. +/3 width=6 by lsubsv_fwd_lsubr, lsubr_cpcs_trans/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lstas.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lstas.ma new file mode 100644 index 000000000..5837ff293 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lstas.ma @@ -0,0 +1,98 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/equivalence/scpes_cpcs.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties on nat-iterated static type assignment ************************) + +lemma lsubsv_lstas_trans: ∀h,g,G,L2,T,U2,d2. ⦃G, L2⦄ ⊢ T •*[h, d2] U2 → + ∀d1. d2 ≤ d1 → ⦃G, L2⦄ ⊢ T ▪[h, g] d1 → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → + ∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, d2] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2. +#h #g #G #L2 #T #U #d2 #H elim H -G -L2 -T -U -d2 +[ /2 width=3 by ex2_intro/ +| #G #L2 #K2 #V #W #U #i #d2 #HLK2 #_ #HWU #IHVW #d1 #Hd21 #Hd1 #L1 #HL12 + elim (da_inv_lref … Hd1) -Hd1 * #K0 #V0 [| #d0 ] #HK0 #HV0 + lapply (drop_mono … HK0 … HLK2) -HK0 #H destruct + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -HWU -IHVW -HLK1 ] + [ #HK12 #H destruct + elim (IHVW … Hd21 HV0 … HK12) -K2 -d1 #T #HVT #HTW + lapply (drop_fwd_drop2 … HLK1) #H + elim (lift_total T 0 (i+1)) + /3 width=12 by lstas_ldef, cpcs_lift, ex2_intro/ + | #V0 #d0 #_ #_ #_ #_ #_ #H destruct + ] +| #G #L2 #K2 #V #W #i #HLK2 #_ #IHVW #d1 #_ #Hd1 #L1 #HL12 + elim (da_inv_lref … Hd1) -Hd1 * #K0 #V0 [| #d0 ] #HK0 #HV0 [| #H1 ] + lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct + elim (IHVW … HV0 … HK12) -K2 /3 width=5 by lstas_zero, ex2_intro/ + | #V1 #d1 #_ #_ #HV1 #HV #HK12 #_ #H destruct + lapply (da_mono … HV0 … HV) -HV #H destruct + elim (da_lstas … HV1 0) -HV1 #W1 #HVW1 #_ + elim (lift_total W1 0 (i+1)) #U1 #HWU1 + elim (IHVW … HV0 … HK12) -K2 // #X #HVX #_ -W + @(ex2_intro … U1) /3 width=6 by lstas_cast, lstas_ldef/ (**) (* full auto too slow *) + @cpcs_cprs_sn @(cprs_delta … HLK1 … HWU1) + /4 width=2 by cprs_strap1, cpr_cprs, lstas_cpr, cpr_eps/ + ] +| #G #L2 #K2 #V #W #U #i #d2 #HLK2 #_ #HWU #IHVW #d1 #Hd21 #Hd1 #L1 #HL12 + elim (da_inv_lref … Hd1) -Hd1 * #K0 #V0 [| #d0 ] #HK0 #HV0 [| #H1 ] + lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct + lapply (le_plus_to_le_r … Hd21) -Hd21 #Hd21 + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct + elim (IHVW … Hd21 HV0 … HK12) -K2 -Hd21 #X + lapply (drop_fwd_drop2 … HLK1) + elim (lift_total X 0 (i+1)) + /3 width=12 by lstas_succ, cpcs_lift, ex2_intro/ + | #V1 #d1 #H0 #_ #HV1 #HV #HK12 #_ #H destruct + lapply (da_mono … HV0 … HV) -HV #H destruct + elim (shnv_inv_cast … H0) -H0 #_ #_ #H + lapply (H … Hd21) -H #HVV1 + elim (IHVW … Hd21 HV0 … HK12) -K2 -Hd21 #X #HVX #HXW + elim (da_lstas … HV1 (d2+1)) -HV1 #X1 #HVX1 #_ + lapply (scpes_inv_lstas_eq … HVV1 … HVX … HVX1) -HVV1 -HVX #HXX1 + lapply (cpcs_canc_sn … HXX1 … HXW) -X + elim (lift_total X1 0 (i+1)) + lapply (drop_fwd_drop2 … HLK1) + /4 width=12 by cpcs_lift, lstas_cast, lstas_ldef, ex2_intro/ + ] +| #a #I #G #L2 #V2 #T2 #U2 #d1 #_ #IHTU2 #d2 #Hd12 #Hd2 #L1 #HL12 + lapply (da_inv_bind … Hd2) -Hd2 #Hd2 + elim (IHTU2 … Hd2 (L1.ⓑ{I}V2) …) + /3 width=3 by lsubsv_pair, lstas_bind, cpcs_bind_dx, ex2_intro/ +| #G #L2 #V2 #T2 #U2 #d1 #_ #IHTU2 #d2 #Hd12 #Hd2 #L1 #HL12 + lapply (da_inv_flat … Hd2) -Hd2 #Hd2 + elim (IHTU2 … Hd2 … HL12) -L2 + /3 width=5 by lstas_appl, cpcs_flat, ex2_intro/ +| #G #L2 #W2 #T2 #U2 #d1 #_ #IHTU2 #d2 #Hd12 #Hd2 #L1 #HL12 + lapply (da_inv_flat … Hd2) -Hd2 #Hd2 + elim (IHTU2 … Hd2 … HL12) -L2 + /3 width=3 by lstas_cast, ex2_intro/ +] +qed-. + +lemma lsubsv_sta_trans: ∀h,g,G,L2,T,U2. ⦃G, L2⦄ ⊢ T •*[h, 1] U2 → + ∀d. ⦃G, L2⦄ ⊢ T ▪[h, g] d+1 → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → + ∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, 1] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2. +/2 width=7 by lsubsv_lstas_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsuba.ma new file mode 100644 index 000000000..c157c756e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsuba.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/equivalence/scpes_aaa.ma". +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Forward lemmas on lenv refinement for atomic arity assignment ************) + +lemma lsubsv_fwd_lsuba: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → G ⊢ L1 ⫃⁝ L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsuba_pair/ +#L1 #L2 #W #V #d1 #H #_ #_ #_ #_ #IHL12 +elim (shnv_inv_cast … H) -H #HW #HV #H +lapply (H 0 ?) // -d1 #HWV +elim (snv_fwd_aaa … HW) -HW #B #HW +elim (snv_fwd_aaa … HV) -HV #A #HV +lapply (scpes_aaa_mono … HWV … HW … HV) #H destruct +/4 width=5 by lsuba_aaa_conf, lsuba_beta, aaa_cast/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsubd.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsubd.ma new file mode 100644 index 000000000..a7d356199 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_lsubd.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd.ma". +include "basic_2A/dynamic/lsubsv.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Forward lemmas on lenv refinement for degree assignment ******************) + +lemma lsubsv_fwd_lsubd: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 → G ⊢ L1 ⫃▪[h, g] L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=3 by lsubd_pair, lsubd_beta/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_scpds.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_scpds.ma new file mode 100644 index 000000000..c079da445 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_scpds.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd_da.ma". +include "basic_2A/dynamic/lsubsv_lsubd.ma". +include "basic_2A/dynamic/lsubsv_lstas.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties on decomposed extended parallel computation on terms **********) + +lemma lsubsv_scpds_trans: ∀h,g,G,L2,T1,T2,d. ⦃G, L2⦄ ⊢ T1 •*➡*[h, g, d] T2 → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 •*➡*[h, g, d] T & ⦃G, L1⦄ ⊢ T2 ➡* T. +#h #g #G #L2 #T1 #T2 #d2 * #T #d1 #Hd21 #Hd1 #HT1 #HT2 #L1 #HL12 +lapply (lsubsv_cprs_trans … HL12 … HT2) -HT2 #HT2 +elim (lsubsv_lstas_trans … HT1 … Hd1 … HL12) // #T0 #HT10 #HT0 +lapply (cpcs_cprs_strap1 … HT0 … HT2) -T #HT02 +elim (cpcs_inv_cprs … HT02) -HT02 +/5 width=5 by lsubsv_fwd_lsubd, lsubd_da_trans, ex4_2_intro, ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_snv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_snv.ma new file mode 100644 index 000000000..d7be376b3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/lsubsv_snv.ma @@ -0,0 +1,44 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/lsubsv_scpds.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************) + +(* Properties concerning stratified native validity *************************) + +lemma lsubsv_snv_trans: ∀h,g,G,L2,T. ⦃G, L2⦄ ⊢ T ¡[h, g] → + ∀L1. G ⊢ L1 ⫃¡[h, g] L2 → ⦃G, L1⦄ ⊢ T ¡[h, g]. +#h #g #G #L2 #T #H elim H -G -L2 -T // +[ #I #G #L2 #K2 #V #i #HLK2 #_ #IHV #L1 #HL12 + elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsubsv_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct /3 width=5 by snv_lref/ + | #W #d #HVW #_ #_ #_ #_ #H1 #H2 destruct -IHV + /3 width=6 by shnv_inv_snv, snv_lref/ + ] +| #a #I #G #L2 #V #T #_ #_ #IHV #IHT #L1 #HL12 destruct + /4 width=1 by snv_bind, lsubsv_pair/ +| #a #G #L2 #V #W0 #T #U0 #d #_ #_ #HVW0 #HTU0 #IHV #IHT #L1 #HL12 + elim (lsubsv_scpds_trans … HVW0 … HL12) -HVW0 #V0 #HV0 #HWV0 + elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0 #X #HT0 #H + elim (cprs_inv_abst1 … H) -H #W #T0 #HW0 #_ #H destruct + elim (cprs_conf … HWV0 … HW0) -W0 + /4 width=10 by snv_appl, scpds_cprs_trans, cprs_bind/ +| #G #L2 #U #T #U0 #_ #_ #HU0 #HTU0 #IHU #IHT #L1 #HL12 + elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0 #X0 #HTX0 #H1 + elim (lsubsv_scpds_trans … HU0 … HL12) -HU0 #X #HUX #H2 + elim (cprs_conf … H1 … H2) -U0 /3 width=5 by snv_cast, scpds_cprs_trans/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/shnv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/shnv.ma new file mode 100644 index 000000000..1c0bf77b5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/shnv.ma @@ -0,0 +1,55 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/nativevalid_6.ma". +include "basic_2A/equivalence/scpes.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED HIGHER NATIVE VALIDITY FOR TERMS ******************************) + +inductive shnv (h) (g) (d1) (G) (L): predicate term ≝ +| shnv_cast: ∀U,T. ⦃G, L⦄ ⊢ U ¡[h, g] → ⦃G, L⦄ ⊢ T ¡[h, g] → + (∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, d2, d2+1] T) → + shnv h g d1 G L (ⓝU.T) +. + +interpretation "stratified higher native validity (term)" + 'NativeValid h g d G L T = (shnv h g d G L T). + +(* Basic inversion lemmas ***************************************************) + +fact shnv_inv_cast_aux: ∀h,g,G,L,X,d1. ⦃G, L⦄ ⊢ X ¡[h, g, d1] → ∀U,T. X = ⓝU.T → + ∧∧ ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] + & (∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, d2, d2+1] T). +#h #g #G #L #X #d1 * -X +#U #T #HU #HT #HUT #U1 #T1 #H destruct /3 width=1 by and3_intro/ +qed-. + +lemma shnv_inv_cast: ∀h,g,G,L,U,T,d1. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, d1] → + ∧∧ ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] + & (∀d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ U •*⬌*[h, g, d2, d2+1] T). +/2 width=3 by shnv_inv_cast_aux/ qed-. + +lemma shnv_inv_snv: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ¡[h, g, d] → ⦃G, L⦄ ⊢ T ¡[h, g]. +#h #g #G #L #T #d * -T +#U #T #HU #HT #HUT elim (HUT 0) -HUT /2 width=3 by snv_cast/ +qed-. + +(* Basic properties *********************************************************) + +lemma snv_shnv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, 0]. +#h #g #G #L #U #T #H elim (snv_inv_cast … H) -H +#U0 #HU #HT #HU0 #HTU0 @shnv_cast // -HU -HT +#d #H <(le_n_O_to_eq … H) -d /2 width=3 by scpds_div/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv.ma new file mode 100644 index 000000000..0e420b1e1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv.ma @@ -0,0 +1,111 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/nativevalid_5.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* activate genv *) +inductive snv (h) (g): relation3 genv lenv term ≝ +| snv_sort: ∀G,L,k. snv h g G L (⋆k) +| snv_lref: ∀I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → snv h g G K V → snv h g G L (#i) +| snv_bind: ∀a,I,G,L,V,T. snv h g G L V → snv h g G (L.ⓑ{I}V) T → snv h g G L (ⓑ{a,I}V.T) +| snv_appl: ∀a,G,L,V,W0,T,U0,d. snv h g G L V → snv h g G L T → + ⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, d] ⓛ{a}W0.U0 → snv h g G L (ⓐV.T) +| snv_cast: ∀G,L,U,T,U0. snv h g G L U → snv h g G L T → + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0 → snv h g G L (ⓝU.T) +. + +interpretation "stratified native validity (term)" + 'NativeValid h g G L T = (snv h g G L T). + +(* Basic inversion lemmas ***************************************************) + +fact snv_inv_lref_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀i. X = #i → + ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g]. +#h #g #G #L #X * -G -L -X +[ #G #L #k #i #H destruct +| #I #G #L #K #V #i0 #HLK #HV #i #H destruct /2 width=5 by ex2_3_intro/ +| #a #I #G #L #V #T #_ #_ #i #H destruct +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #i #H destruct +| #G #L #U #T #U0 #_ #_ #_ #_ #i #H destruct +] +qed-. + +lemma snv_inv_lref: ∀h,g,G,L,i. ⦃G, L⦄ ⊢ #i ¡[h, g] → + ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g]. +/2 width=3 by snv_inv_lref_aux/ qed-. + +fact snv_inv_gref_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀p. X = §p → ⊥. +#h #g #G #L #X * -G -L -X +[ #G #L #k #p #H destruct +| #I #G #L #K #V #i #_ #_ #p #H destruct +| #a #I #G #L #V #T #_ #_ #p #H destruct +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #p #H destruct +| #G #L #U #T #U0 #_ #_ #_ #_ #p #H destruct +] +qed-. + +lemma snv_inv_gref: ∀h,g,G,L,p. ⦃G, L⦄ ⊢ §p ¡[h, g] → ⊥. +/2 width=8 by snv_inv_gref_aux/ qed-. + +fact snv_inv_bind_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀a,I,V,T. X = ⓑ{a,I}V.T → + ⦃G, L⦄ ⊢ V ¡[h, g] ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ T ¡[h, g]. +#h #g #G #L #X * -G -L -X +[ #G #L #k #b #Z #X1 #X2 #H destruct +| #I #G #L #K #V #i #_ #_ #b #Z #X1 #X2 #H destruct +| #a #I #G #L #V #T #HV #HT #b #Z #X1 #X2 #H destruct /2 width=1 by conj/ +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #b #Z #X1 #X2 #H destruct +| #G #L #U #T #U0 #_ #_ #_ #_ #b #Z #X1 #X2 #H destruct +] +qed-. + +lemma snv_inv_bind: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ⓑ{a,I}V.T ¡[h, g] → + ⦃G, L⦄ ⊢ V ¡[h, g] ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ T ¡[h, g]. +/2 width=4 by snv_inv_bind_aux/ qed-. + +fact snv_inv_appl_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀V,T. X = ⓐV.T → + ∃∃a,W0,U0,d. ⦃G, L⦄ ⊢ V ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, d] ⓛ{a}W0.U0. +#h #g #G #L #X * -L -X +[ #G #L #k #X1 #X2 #H destruct +| #I #G #L #K #V #i #_ #_ #X1 #X2 #H destruct +| #a #I #G #L #V #T #_ #_ #X1 #X2 #H destruct +| #a #G #L #V #W0 #T #U0 #d #HV #HT #HVW0 #HTU0 #X1 #X2 #H destruct /2 width=6 by ex4_4_intro/ +| #G #L #U #T #U0 #_ #_ #_ #_ #X1 #X2 #H destruct +] +qed-. + +lemma snv_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ⓐV.T ¡[h, g] → + ∃∃a,W0,U0,d. ⦃G, L⦄ ⊢ V ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, d] ⓛ{a}W0.U0. +/2 width=3 by snv_inv_appl_aux/ qed-. + +fact snv_inv_cast_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀U,T. X = ⓝU.T → + ∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. +#h #g #G #L #X * -G -L -X +[ #G #L #k #X1 #X2 #H destruct +| #I #G #L #K #V #i #_ #_ #X1 #X2 #H destruct +| #a #I #G #L #V #T #_ #_ #X1 #X2 #H destruct +| #a #G #L #V #W0 #T #U0 #d #_ #_ #_ #_ #X1 #X2 #H destruct +| #G #L #U #T #U0 #HV #HT #HU0 #HTU0 #X1 #X2 #H destruct /2 width=3 by ex4_intro/ +] +qed-. + +lemma snv_inv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → + ∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] & + ⦃G, L⦄ ⊢ U •*➡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0. +/2 width=3 by snv_inv_cast_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_aaa.ma new file mode 100644 index 000000000..8c8144b8b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_aaa.ma @@ -0,0 +1,50 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_aaa.ma". +include "basic_2A/computation/scpds_aaa.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Forward lemmas on atomic arity assignment for terms **********************) + +lemma snv_fwd_aaa: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃A. ⦃G, L⦄ ⊢ T ⁝ A. +#h #g #G #L #T #H elim H -G -L -T +[ /2 width=2 by aaa_sort, ex_intro/ +| #I #G #L #K #V #i #HLK #_ * /3 width=6 by aaa_lref, ex_intro/ +| #a * #G #L #V #T #_ #_ * #B #HV * #A #HA /3 width=2 by aaa_abbr, aaa_abst, ex_intro/ +| #a #G #L #V #W0 #T #U0 #d #_ #_ #HVW0 #HTU0 * #B #HV * #X #HT + lapply (scpds_aaa_conf … HV … HVW0) -HVW0 #HW0 + lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H + elim (aaa_inv_abst … H) -H #B0 #A #H1 #HU #H2 destruct + lapply (aaa_mono … H1 … HW0) -W0 #H destruct /3 width=4 by aaa_appl, ex_intro/ +| #G #L #U #T #U0 #_ #_ #HU0 #HTU0 * #B #HU * #A #HT + lapply (scpds_aaa_conf … HU … HU0) -HU0 #HU0 + lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H + lapply (aaa_mono … H … HU0) -U0 #H destruct /3 width=3 by aaa_cast, ex_intro/ +] +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma snv_fwd_da: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃d. ⦃G, L⦄ ⊢ T ▪[h, g] d. +#h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_da/ +qed-. + +lemma snv_fwd_lstas: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → + ∀d. ∃U. ⦃G, L⦄ ⊢ T •*[h, d] U. +#h #g #G #L #T #H #d elim (snv_fwd_aaa … H) -H +#A #HT elim (aaa_lstas h … HT d) -HT /2 width=2 by ex_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_da_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_da_lpr.ma new file mode 100644 index 000000000..2c2ecce85 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_da_lpr.ma @@ -0,0 +1,92 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd_da.ma". +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/snv_scpes.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on degree assignment for terms ********************************) + +fact da_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_da_cpr_lpr h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #_ #_ #_ #_ #d #H2 #X3 #H3 #L2 #_ -IH3 -IH2 -IH1 + lapply (da_inv_sort … H2) -H2 + lapply (cpr_inv_sort1 … H3) -H3 #H destruct /2 width=1 by da_sort/ +| #i #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct -IH3 -IH2 + elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #H #HX0 + elim (da_inv_lref … H2) -H2 * #K1 [ #V1 | #W1 #d1 ] #HLK1 [ #HV1 | #HW1 #H ] destruct + lapply (drop_mono … H … HLK1) -H #H destruct + elim (cpr_inv_lref1 … H3) -H3 + [1,3: #H destruct + lapply (fqup_lref … G1 … HLK1) + elim (lpr_drop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct + /4 width=10 by da_ldef, da_ldec, fqup_fpbg/ + |2,4: * #K0 #V0 #W0 #H #HVW0 #HW0 + lapply (drop_mono … H … HLK1) -H #H destruct + lapply (fqup_lref … G1 … HLK1) + elim (lpr_drop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #_ #H destruct + lapply (drop_fwd_drop2 … HLK2) -V2 + /4 width=8 by da_lift, fqup_fpbg/ + ] +| #p #_ #_ #HT0 #H1 destruct -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct -IH2 + elim (snv_inv_bind … H1) -H1 #_ #HT1 + lapply (da_inv_bind … H2) -H2 + elim (cpr_inv_bind1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct + /4 width=9 by da_bind, fqup_fpbg, lpr_pair/ + | #T2 #HT12 #HT2 #H1 #H2 destruct + /4 width=11 by da_inv_lift, fqup_fpbg, lpr_pair, drop_drop/ + ] +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct + elim (snv_inv_appl … H1) -H1 #b1 #W1 #U1 #d1 #HV1 #HT1 #HVW1 #HTU1 + lapply (da_inv_flat … H2) -H2 #Hd + elim (cpr_inv_appl1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct -IH3 -IH2 /4 width=7 by da_flat, fqup_fpbg/ + | #b #V2 #W #W2 #U #U2 #HV12 #HW2 #HU2 #H1 #H2 destruct + elim (snv_inv_bind … HT1) -HT1 #HW #HU + lapply (da_inv_bind … Hd) -Hd #Hd + elim (scpds_inv_abst1 … HTU1) -HTU1 #W3 #U3 #HW3 #_ #H destruct -U3 -d1 + elim (snv_fwd_da … HV1) #d1 #Hd1 + elim (snv_fwd_da … HW) #d0 #Hd0 + lapply (cprs_scpds_div … HW3 … Hd0 … 1 HVW1) -W3 #H + elim (da_scpes_aux … IH3 IH2 IH1 … Hd0 … Hd1 … H) -IH3 -IH2 -H /2 width=1 by fqup_fpbg/ #_ #H1 + (plus_minus_m_m d1 1) in Hd1; // -H1 #Hd1 + lapply (IH1 … HV1 … Hd1 … HV12 … HL12) -HV1 -Hd1 -HV12 [ /2 by fqup_fpbg/ ] + lapply (IH1 … Hd0 … HW2 … HL12) -Hd0 /2 width=1 by fqup_fpbg/ -HW + lapply (IH1 … HU … Hd … HU2 (L2.ⓛW2) ?) -IH1 -HU -Hd -HU2 [1,2: /2 by fqup_fpbg, lpr_pair/ ] -HL12 -HW2 + /4 width=6 by da_bind, lsubd_da_trans, lsubd_beta/ + | #b #V0 #V2 #W #W2 #U #U2 #HV10 #HV02 #HW2 #HU2 #H1 #H2 destruct -IH3 -IH2 -b1 -V0 -W1 -U1 -d1 -HV1 + elim (snv_inv_bind … HT1) -HT1 #_ + lapply (da_inv_bind … Hd) -Hd + /5 width=9 by da_bind, da_flat, fqup_fpbg, lpr_pair/ + ] +| #W1 #T1 #HG0 #HL0 #HT0 #H1 #d #H2 #X3 #H3 #L2 #HL12 destruct -IH3 -IH2 + elim (snv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1 + lapply (da_inv_flat … H2) -H2 #Hd + elim (cpr_inv_cast1 … H3) -H3 + [ * #W2 #T2 #HW12 #HT12 #H destruct /4 width=7 by da_flat, fqup_fpbg/ + | /3 width=7 by fqup_fpbg/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_fsb.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_fsb.ma new file mode 100644 index 000000000..41ff4103f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_fsb.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fsb_aaa.ma". +include "basic_2A/dynamic/snv_aaa.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* forward lemmas on "qrst" strongly normalizing closures *********************) + +lemma snv_fwd_fsb: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ⦥[h, g] ⦃G, L, T⦄. +#h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_fsb/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lift.ma new file mode 100644 index 000000000..469484be8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lift.ma @@ -0,0 +1,117 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/computation/scpds_lift.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Relocation properties ****************************************************) + +lemma snv_lift: ∀h,g,G,K,T. ⦃G, K⦄ ⊢ T ¡[h, g] → ∀L,s,l,m. ⬇[s, l, m] L ≡ K → + ∀U. ⬆[l, m] T ≡ U → ⦃G, L⦄ ⊢ U ¡[h, g]. +#h #g #G #K #T #H elim H -G -K -T +[ #G #K #k #L #s #l #m #_ #X #H + >(lift_inv_sort1 … H) -X -K -l -m // +| #I #G #K #K0 #V #i #HK0 #_ #IHV #L #s #l #m #HLK #X #H + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (drop_trans_le … HLK … HK0) -K /2 width=2 by lt_to_le/ #X #HL0 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #L0 #W #HLK0 #HVW #H destruct + /3 width=9 by snv_lref/ + | lapply (drop_trans_ge … HLK … HK0 ?) -K + /3 width=9 by snv_lref, drop_inv_gen/ + ] +| #a #I #G #K #V #T #_ #_ #IHV #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct + /4 width=5 by snv_bind, drop_skip/ +| #a #G #K #V #W0 #T #U0 #d #_ #_ #HVW0 #HTU0 #IHV #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct + elim (lift_total W0 l m) + elim (lift_total U0 (l+1) m) + /4 width=17 by snv_appl, scpds_lift, lift_bind/ +| #G #K #V #T #U0 #_ #_ #HVU0 #HTU0 #IHV #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct + elim (lift_total U0 l m) + /3 width=12 by snv_cast, scpds_lift/ +] +qed. + +lemma snv_inv_lift: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ U ¡[h, g] → ∀K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ T ¡[h, g]. +#h #g #G #L #U #H elim H -G -L -U +[ #G #L #k #K #s #l #m #_ #X #H + >(lift_inv_sort2 … H) -X -L -l -m // +| #I #G #L #L0 #W #i #HL0 #_ #IHW #K #s #l #m #HLK #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct + [ elim (drop_conf_le … HLK … HL0) -L /2 width=2 by lt_to_le/ #X #HK0 #H + elim (drop_inv_skip1 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K0 #V #HLK0 #HVW #H destruct + /3 width=12 by snv_lref/ + | lapply (drop_conf_ge … HLK … HL0 ?) -L /3 width=9 by snv_lref/ + ] +| #a #I #G #L #W #U #_ #_ #IHW #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct + /4 width=5 by snv_bind, drop_skip/ +| #a #G #L #W #W1 #U #U1 #d #_ #_ #HW1 #HU1 #IHW #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct + elim (scpds_inv_lift1 … HW1 … HLK … HVW) -HW1 #W0 #HW01 #HVW0 + elim (scpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #H #HTU0 + elim (lift_inv_bind2 … H) -H #Y #U0 #HY #HU01 #H destruct + lapply (lift_inj … HY … HW01) -HY #H destruct + /3 width=6 by snv_appl/ +| #G #L #W #U #U1 #_ #_ #HWU1 #HU1 #IHW #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct + elim (scpds_inv_lift1 … HWU1 … HLK … HVW) -HWU1 #U0 #HU01 #HVU0 + elim (scpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #HX #HTU0 + lapply (lift_inj … HX … HU01) -HX #H destruct + /3 width=5 by snv_cast/ +] +qed-. + +(* Properties on subclosure *************************************************) + +lemma snv_fqu_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I1 #G1 #L1 #V1 #H + elim (snv_inv_lref … H) -H #I2 #L2 #V2 #H #HV2 + lapply (drop_inv_O2 … H) -H #H destruct // +|2: * +|5,6: /3 width=8 by snv_inv_lift/ +] +[1,3: #a #I #G1 #L1 #V1 #T1 #H elim (snv_inv_bind … H) -H // +|2,4: * #G1 #L1 #V1 #T1 #H + [1,3: elim (snv_inv_appl … H) -H // + |2,4: elim (snv_inv_cast … H) -H // + ] +] +qed-. + +lemma snv_fquq_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fquq_inv_gen … H) -H [|*] +/2 width=5 by snv_fqu_conf/ +qed-. + +lemma snv_fqup_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by fqup_strap1, snv_fqu_conf/ +qed-. + +lemma snv_fqus_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_gen … H) -H [|*] +/2 width=5 by snv_fqup_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lpr.ma new file mode 100644 index 000000000..78f7e59f8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lpr.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv_lift.ma". +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/snv_scpes.ma". +include "basic_2A/dynamic/lsubsv_snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on context-free parallel reduction for local environments *****) + +fact snv_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_snv_cpr_lpr h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #_ destruct -IH4 -IH3 -IH2 -IH1 -H1 + >(cpr_inv_sort1 … H2) -X // +| #i #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_lref … H1) -H1 #I #K1 #V1 #HLK1 #HV1 + elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct + lapply (fqup_lref … G1 … HLK1) #HKL + elim (cpr_inv_lref1 … H2) -H2 + [ #H destruct -HLK1 /4 width=10 by fqup_fpbg, snv_lref/ + | * #K0 #V0 #W0 #H #HVW0 #W0 -HV12 + lapply (drop_mono … H … HLK1) -HLK1 -H #H destruct + lapply (drop_fwd_drop2 … HLK2) -HLK2 /4 width=8 by fqup_fpbg, snv_lift/ + ] +| #p #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_bind … H1) -H1 #HV1 #HT1 + elim (cpr_inv_bind1 … H2) -H2 * + [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=8 by fqup_fpbg, snv_bind, lpr_pair/ + | #T2 #HT12 #HXT2 #H1 #H2 destruct -HV1 + /4 width=10 by fqup_fpbg, snv_inv_lift, lpr_pair, drop_drop/ + ] +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct + elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1 + elim (cpr_inv_appl1 … H2) -H2 * + [ #V2 #T2 #HV12 #HT12 #H destruct -IH4 + lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 + lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ #HT2 + elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 -HV12 #XV #HVW2 #HXV + elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -HTU1 -HT12 #X #HTU2 #H + elim (cprs_inv_abst1 … H) -H #XW #U2 #HXW #_ #H destruct -IH1 -IH3 -IH2 -L1 + elim (cprs_conf … HXV … HXW) -W1 #W2 #HXV #HXW + lapply (scpds_cprs_trans … HVW2 … HXV) -XV + lapply (scpds_cprs_trans … (ⓛ{a}W2.U2) … HTU2 ?) + /2 width=7 by snv_appl, cprs_bind/ + | #b #V2 #W10 #W20 #T10 #T20 #HV12 #HW120 #HT120 #H1 #H2 destruct + elim (snv_inv_bind … HT1) -HT1 #HW10 #HT10 + elim (scpds_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30 -d0 + elim (snv_fwd_da … HV1) #d #HV1d + elim (snv_fwd_da … HW10) #d0 #HW10d + lapply (cprs_scpds_div … HW130 … HW10d … 1 HVW1) -W30 #HVW10 + elim (da_scpes_aux … IH4 IH1 IH2 … HW10d … HV1d … HVW10) /2 width=1 by fqup_fpbg/ + #_ #Hd (plus_minus_m_m d 1) in HV1d; // -Hd #HV1d + lapply (scpes_cpr_lpr_aux … IH2 IH3 … HVW10 … HW120 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW10 #HVW20 + lapply (IH2 … HV1d … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HV1d #HV2d + lapply (IH2 … HW10d … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10d #HW20d + lapply (IH1 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 + lapply (IH1 … HW120 … HL12) /2 width=1 by fqup_fpbg/ -HW10 #HW20 + lapply (IH1 … HT10 … HT120 … (L2.ⓛW20) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -HT10 #HT20 + @snv_bind /2 width=1 by snv_cast_scpes/ + @(lsubsv_snv_trans … HT20) -HT20 + @(lsubsv_beta … (d-1)) // + @shnv_cast [1,2: // ] #d0 #Hd0 + lapply (scpes_le_aux … IH4 IH1 IH2 IH3 … HW20d … HV2d … d0 … HVW20) -IH4 -IH3 -IH2 -IH1 -HW20d -HV2d -HVW20 + /3 width=5 by fpbg_fpbs_trans, fqup_fpbg, cpr_lpr_fpbs, le_S_S/ + | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -IH4 + elim (snv_inv_bind … HT1) -HT1 #HW0 #HT0 + elim (scpds_inv_abbr_abst … HTU1) -HTU1 #X #HTU0 #HX #H destruct + elim (lift_inv_bind1 … HX) -HX #W3 #U3 #HW13 #_ #H destruct + elim (scpds_cpr_lpr_aux … IH2 IH3 … HVW1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ -HVW1 #XV #HXV0 #HXVW1 + elim (scpds_cpr_lpr_aux … IH2 IH3 … HTU0 … HT02 (L2.ⓓW2)) /2 width=1 by fqup_fpbg, lpr_pair/ -HTU0 #X #HXT2 #H + elim (cprs_inv_abst1 … H) -H #W #U2 #HW3 #_ #H destruct -U3 + lapply (IH1 … HW02 … HL12) /2 width=1 by fqup_fpbg/ #HW2 + lapply (IH1 … HV10 … HL12) /2 width=1 by fqup_fpbg/ #HV0 + lapply (IH1 … HT02 (L2.ⓓW2) ?) /2 width=1 by fqup_fpbg, lpr_pair/ -L1 #HT2 + lapply (snv_lift … HV0 (L2.ⓓW2) (Ⓕ) … HV02) /2 width=1 by drop_drop/ -HV0 #HV2 + elim (lift_total XV 0 1) #XW #HXVW + lapply (scpds_lift … HXV0 (L2.ⓓW2) (Ⓕ) … HV02 … HXVW) /2 width=1 by drop_drop/ -V0 #HXWV2 + lapply (cprs_lift … HXVW1 (L2.ⓓW2) (Ⓕ) … HW13 … HXVW) /2 width=1 by drop_drop/ -W1 -XV #HXW3 + elim (cprs_conf … HXW3 … HW3) -W3 #W3 #HXW3 #HW3 + lapply (scpds_cprs_trans … HXWV2 … HXW3) -XW + lapply (scpds_cprs_trans … (ⓛ{a}W3.U2) … HXT2 ?) /2 width=1 by cprs_bind/ -W + /3 width=6 by snv_appl, snv_bind/ + ] +| #W1 #T1 #HG0 #HL0 #HT0 #H1 #X #H2 #L2 #HL12 destruct -IH4 + elim (snv_inv_cast … H1) -H1 #U1 #HW1 #HT1 #HWU1 #HTU1 + elim (cpr_inv_cast1 … H2) -H2 + [ * #W2 #T2 #HW12 #HT12 #H destruct + elim (snv_fwd_da … HW1) #d #HW1d + lapply (scpds_div … HWU1 … HTU1) -U1 -d #HWT1 + lapply (scpes_cpr_lpr_aux … IH2 IH3 … HWT1 … HW12 … HT12 … HL12) /2 width=1 by fqup_fpbg/ + lapply (IH1 … HW12 … HL12) /2 width=1 by fqup_fpbg/ + lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -L1 + /2 width=1 by snv_cast_scpes/ + | #H -IH3 -IH2 -HW1 -U1 + lapply (IH1 … H … HL12) /2 width=1 by fqup_fpbg/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas.ma new file mode 100644 index 000000000..a60439d16 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv_lift.ma". +include "basic_2A/dynamic/snv_scpes.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on nat-iterated stratified static type assignment for terms ***) + +fact snv_lstas_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_snv_lstas h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #HG0 #HL0 #HT0 #_ #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1 + >(lstas_inv_sort1 … H2) -X // +| #i #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #T #H2 destruct -IH4 -IH3 -IH2 + elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HLK0 #HX0 + elim (da_inv_lref … Hd1) -Hd1 * #K1 [ #V1 | #W1 #d0 ] #HLK1 [ #Hd1 | #Hd0 #H ] + lapply (drop_mono … HLK0 … HLK1) -HLK0 #H0 destruct + elim (lstas_inv_lref1 … H2) -H2 * #K #Y #X [3,6: #d ] #HLK #HYX [1,2: #HXT #H0 |3,5: #HXT |4,6: #H1 #H2 ] + lapply (drop_mono … HLK … HLK1) -HLK #H destruct + [ lapply (le_plus_to_le_r … Hd21) -Hd21 #Hd21 |3: -Hd21 ] + lapply (fqup_lref … G1 … HLK1) #H + lapply (drop_fwd_drop2 … HLK1) /4 width=8 by snv_lift, snv_lref, fqup_fpbg/ +| #p #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 + elim (snv_inv_bind … H1) -H1 #HV1 #HT1 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … H2) -H2 #U1 #HTU1 #H destruct /4 width=8 by fqup_fpbg, snv_bind/ +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct + elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1 + lapply (da_inv_flat … Hd1) -Hd1 #Hd1 + elim (lstas_inv_appl1 … H2) -H2 #T0 #HT10 #H destruct + lapply (IH1 … HT1 … Hd1 … HT10) /2 width=1 by fqup_fpbg/ #HT0 + lapply (lstas_scpds_aux … IH1 IH4 IH3 IH2 … Hd1 … HT10 … HTU1) -IH4 -IH3 -IH2 -IH1 /2 width=1 by fqup_fpbg/ -T1 -d1 #H + elim (scpes_inv_abst2 … H) -H /3 width=6 by snv_appl, scpds_cprs_trans/ +| #U1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X #H2 destruct -IH4 -IH3 -IH2 + elim (snv_inv_cast … H1) -H1 + lapply (da_inv_flat … Hd1) -Hd1 + lapply (lstas_inv_cast1 … H2) -H2 /3 width=8 by fqup_fpbg/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas_lpr.ma new file mode 100644 index 000000000..401234263 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_lstas_lpr.ma @@ -0,0 +1,139 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv_aaa.ma". +include "basic_2A/dynamic/snv_scpes.ma". +include "basic_2A/dynamic/lsubsv_lstas.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Properties on sn parallel reduction for local environments ***************) + +fact lstas_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_lstas_cpr_lpr h g G1 L1 T1. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ] +[ #k #_ #_ #_ #_ #d1 #d2 #_ #_ #X2 #H2 #X3 #H3 #L2 #_ -IH4 -IH3 -IH2 -IH1 + >(lstas_inv_sort1 … H2) -X2 + >(cpr_inv_sort1 … H3) -X3 /2 width=3 by ex2_intro/ +| #i #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 + elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HK0 #HX0 + elim (da_inv_lref … Hd1) -Hd1 * #K1 [ #V1 | #W1 #d ] #HLK1 [ #HVd1 | #HWd1 #H destruct ] + lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct + elim (lstas_inv_lref1 … H2) -H2 * #K0 #V0 #X0 [3,6: #d0 ] #HK0 #HVX0 [1,2: #HX02 #H |3,5: #HX02 |4,6: #H1 #H2 ] destruct + lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct + [ lapply (le_plus_to_le_r … Hd21) -Hd21 #Hd21 |3: -Hd21 ] + lapply (fqup_lref … G1 … HLK1) #HKV1 + elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2 + elim (lpr_inv_pair1 … H) -H #K2 [ #W2 | #W2 | #V2 ] #HK12 [ #HW12 | #HW12 | #HV12 ] #H destruct + lapply (drop_fwd_drop2 … HLK2) #H2 + elim (cpr_inv_lref1 … H3) -H3 + [1,3,5: #H destruct -HLK1 + |2,4,6: * #K #V #X #H #HVX #HX3 + lapply (drop_mono … H … HLK1) -H -HLK1 #H destruct + ] + [ lapply (IH2 … HWd1 … HW12 … HK12) /2 width=1 by fqup_fpbg/ -IH2 #H + elim (da_lstas … H d0) -H + elim (IH1 … HWd1 … HVX0 … HW12 … HK12) -IH1 -HVX0 /2 width=1 by fqup_fpbg/ #V2 #HWV2 #HV2 + elim (lift_total V2 0 (i+1)) + /3 width=12 by cpcs_lift, lstas_succ, ex2_intro/ + | elim (IH1 … HWd1 … HVX0 … HW12 … HK12) -IH1 -HVX0 + /3 width=5 by fqup_fpbg, lstas_zero, ex2_intro/ + | elim (IH1 … HVd1 … HVX0 … HV12 … HK12) -IH1 -HVd1 -HVX0 -HV12 -HK12 -IH2 /2 width=1 by fqup_fpbg/ #W2 #HVW2 #HW02 + elim (lift_total W2 0 (i+1)) + /4 width=12 by cpcs_lift, lstas_ldef, ex2_intro/ + | elim (IH1 … HVd1 … HVX0 … HVX … HK12) -IH1 -HVd1 -HVX0 -HVX -HK12 -IH2 -V2 /2 width=1 by fqup_fpbg/ -d1 #W2 #HXW2 #HW02 + elim (lift_total W2 0 (i+1)) + /3 width=12 by cpcs_lift, lstas_lift, ex2_intro/ + ] +| #p #_ #_ #HT0 #H1 destruct -IH4 -IH3 -IH2 -IH1 + elim (snv_inv_gref … H1) +| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_bind … H1) -H1 #_ #HT1 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … H2) -H2 #U1 #HTU1 #H destruct + elim (cpr_inv_bind1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct + elim (IH1 … Hd1 … HTU1 … HT12 (L2.ⓑ{I}V2)) -IH1 -Hd1 -HTU1 -HT12 /2 width=1 by fqup_fpbg, lpr_pair/ -T1 + /4 width=5 by cpcs_bind2, lpr_cpr_conf, lstas_bind, ex2_intro/ + | #T3 #HT13 #HXT3 #H1 #H2 destruct + elim (IH1 … Hd1 … HTU1 … HT13 (L2.ⓓV1)) -IH1 -Hd1 -HTU1 -HT13 /2 width=1 by fqup_fpbg, lpr_pair/ -T1 -HL12 #U3 #HTU3 #HU13 + elim (lstas_inv_lift1 … HTU3 L2 … HXT3) -T3 + /5 width=8 by cpcs_cpr_strap1, cpcs_bind1, cpr_zeta, drop_drop, ex2_intro/ + ] +| #V1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct + elim (snv_inv_appl … H1) -H1 #a #W1 #U1 #d0 #HV1 #HT1 #HVW1 #HTU1 + lapply (da_inv_flat … Hd1) -Hd1 #Hd1 + elim (lstas_inv_appl1 … H2) -H2 #X #HT1U #H destruct + elim (cpr_inv_appl1 … H3) -H3 * + [ #V2 #T2 #HV12 #HT12 #H destruct -a -d0 -W1 -U1 -HV1 -IH4 -IH3 -IH2 + elim (IH1 … Hd1 … HT1U … HT12 … HL12) -IH1 -Hd1 -HT1U + /4 width=5 by fqup_fpbg, cpcs_flat, lpr_cpr_conf, lstas_appl, ex2_intro/ + | #b #V2 #W2 #W3 #T2 #T3 #HV12 #HW23 #HT23 #H1 #H2 destruct + elim (snv_inv_bind … HT1) -HT1 #HW2 #HT2 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … HT1U) -HT1U #U #HT2U #H destruct + elim (scpds_inv_abst1 … HTU1) -HTU1 #W0 #U0 #HW20 #_ #H destruct -U0 -d0 + elim (snv_fwd_da … HW2) #d0 #HW2d + lapply (cprs_scpds_div … HW20 … HW2d … HVW1) -W0 #H21 + elim (snv_fwd_da … HV1) #d #HV1d + elim (da_scpes_aux … IH4 IH3 IH2 … HW2d … HV1d … H21) /2 width=1 by fqup_fpbg/ #_ #H + (plus_minus_m_m d 1) in HV1d; // -H #HV1d + lapply (scpes_cpr_lpr_aux … IH2 IH1 … H21 … HW23 … HV12 … HL12) -H21 /2 width=1 by fqup_fpbg/ #H32 + lapply (IH3 … HW23 … HL12) /2 width=1 by fqup_fpbg/ #HW3 + lapply (IH3 … HV12 … HL12) /2 width=1 by fqup_fpbg/ #HV2 + lapply (IH2 … HW2d … HW23 … HL12) /2 width=1 by fqup_fpbg/ -HW2 -HW2d #HW3d + lapply (IH2 … HV1d … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HV1 -HV1d #HV2d + elim (IH1 … Hd1 … HT2U … HT23 (L2.ⓛW3)) -HT2U /2 width=1 by fqup_fpbg, lpr_pair/ #U3 #HTU3 #HU23 + elim (lsubsv_lstas_trans … g … HTU3 … Hd21 … (L2.ⓓⓝW3.V2)) -HTU3 + [ #U4 #HT3U4 #HU43 -IH1 -IH2 -IH3 -IH4 -d -d1 -HW3 -HV2 -HT2 + @(ex2_intro … (ⓓ{b}ⓝW3.V2.U4)) /2 width=1 by lstas_bind/ -HT3U4 + @(cpcs_canc_dx … (ⓓ{b}ⓝW3.V2.U3)) /2 width=1 by cpcs_bind_dx/ -HU43 + @(cpcs_cpr_strap1 … (ⓐV2.ⓛ{b}W3.U3)) /2 width=1 by cpr_beta/ + /4 width=3 by cpcs_flat, cpcs_bind2, lpr_cpr_conf/ + | -U3 + @(lsubsv_beta … (d-1)) /3 width=7 by fqup_fpbg/ + @shnv_cast [1,2: // ] #d0 #Hd0 + lapply (scpes_le_aux … IH4 IH3 IH2 IH1 … HW3d … HV2d … d0 … H32) -IH4 -IH3 -IH2 -IH1 -HW3d -HV2d -H32 + /3 width=5 by fpbg_fpbs_trans, fqup_fpbg, cpr_lpr_fpbs, le_S_S/ + | -IH1 -IH3 -IH4 /3 width=9 by fqup_fpbg, lpr_pair/ + ] + | #b #V0 #V2 #W0 #W2 #T0 #T2 #HV10 #HV02 #HW02 #HT02 #H1 #H2 destruct -a -d0 -W1 -HV1 -IH4 -IH3 -IH2 + elim (snv_inv_bind … HT1) -HT1 #_ #HT0 + lapply (da_inv_bind … Hd1) -Hd1 #Hd1 + elim (lstas_inv_bind1 … HT1U) -HT1U #U0 #HTU0 #H destruct + elim (IH1 … Hd1 … HTU0 … HT02 (L2.ⓓW2)) -IH1 -Hd1 -HTU0 /2 width=1 by fqup_fpbg, lpr_pair/ -T0 #U2 #HTU2 #HU02 + lapply (lpr_cpr_conf … HL12 … HV10) -HV10 #HV10 + lapply (lpr_cpr_conf … HL12 … HW02) -L1 #HW02 + lapply (cpcs_bind2 b … HW02 … HU02) -HW02 -HU02 #HU02 + lapply (cpcs_flat … HV10 … HU02 Appl) -HV10 -HU02 #HU02 + lapply (cpcs_cpr_strap1 … HU02 (ⓓ{b}W2.ⓐV2.U2) ?) + /4 width=3 by lstas_appl, lstas_bind, cpr_theta, ex2_intro/ + ] +| #W1 #T1 #HG0 #HL0 #HT0 #H1 #d1 #d2 #Hd21 #Hd1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2 + elim (snv_inv_cast … H1) -H1 #U1 #_ #HT1 #_ #_ -U1 + lapply (da_inv_flat … Hd1) -Hd1 #Hd1 + lapply (lstas_inv_cast1 … H2) -H2 #HTU1 + elim (cpr_inv_cast1 … H3) -H3 + [ * #U2 #T2 #_ #HT12 #H destruct + elim (IH1 … Hd1 … HTU1 … HT12 … HL12) -IH1 -Hd1 -HTU1 -HL12 + /3 width=3 by fqup_fpbg, lstas_cast, ex2_intro/ + | #HT1X3 elim (IH1 … Hd1 … HTU1 … HT1X3 … HL12) -IH1 -Hd1 -HTU1 -HL12 + /2 width=3 by fqup_fpbg, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_preserve.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_preserve.ma new file mode 100644 index 000000000..829e0016d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_preserve.ma @@ -0,0 +1,94 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fsb_aaa.ma". +include "basic_2A/dynamic/snv_da_lpr.ma". +include "basic_2A/dynamic/snv_lstas.ma". +include "basic_2A/dynamic/snv_lstas_lpr.ma". +include "basic_2A/dynamic/snv_lpr.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Main preservation properties *********************************************) + +lemma snv_preserve: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → + ∧∧ IH_da_cpr_lpr h g G L T + & IH_snv_cpr_lpr h g G L T + & IH_snv_lstas h g G L T + & IH_lstas_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_fwd_aaa … HT) -HT +#A #HT @(aaa_ind_fpbg h g … HT) -G -L -T -A +#G #L #T #A #_ #IH -A @and4_intro +[ letin aux ≝ da_cpr_lpr_aux | letin aux ≝ snv_cpr_lpr_aux +| letin aux ≝ snv_lstas_aux | letin aux ≝ lstas_cpr_lpr_aux +] +@(aux … G L T) // #G0 #L0 #T0 #H elim (IH … H) -IH -H // +qed-. + +theorem da_cpr_lpr: ∀h,g,G,L,T. IH_da_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=1 by/ +qed-. + +theorem snv_cpr_lpr: ∀h,g,G,L,T. IH_snv_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=1 by/ +qed-. + +theorem snv_lstas: ∀h,g,G,L,T. IH_snv_lstas h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=5 by/ +qed-. + +theorem lstas_cpr_lpr: ∀h,g,G,L,T. IH_lstas_cpr_lpr h g G L T. +#h #g #G #L #T #HT elim (snv_preserve … HT) /2 width=3 by/ +qed-. + +(* Advanced preservation properties *****************************************) + +lemma snv_cprs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G #L1 #T1 #HT1 #T2 #H +@(cprs_ind … H) -T2 /3 width=5 by snv_cpr_lpr/ +qed-. + +lemma da_cprs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. +#h #g #G #L1 #T1 #HT1 #d #Hd #T2 #H +@(cprs_ind … H) -T2 /3 width=6 by snv_cprs_lpr, da_cpr_lpr/ +qed-. + +lemma lstas_cprs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d2] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*[h, d2] U2 & ⦃G, L2⦄ ⊢ U1 ⬌* U2. +#h #g #G #L1 #T1 #HT1 #d1 #d2 #Hd21 #Hd1 #U1 #HTU1 #T2 #H +@(cprs_ind … H) -T2 [ /2 width=10 by lstas_cpr_lpr/ ] +#T #T2 #HT1T #HTT2 #IHT1 #L2 #HL12 +elim (IHT1 L1) // -IHT1 #U #HTU #HU1 +elim (lstas_cpr_lpr … g … Hd21 … HTU … HTT2 … HL12) -HTU -HTT2 +[2,3: /2 width=7 by snv_cprs_lpr, da_cprs_lpr/ ] -T1 -T -d1 +/4 width=5 by lpr_cpcs_conf, cpcs_trans, ex2_intro/ +qed-. + +lemma lstas_cpcs_lpr: ∀h,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d,d1. d ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T2 ¡[h, g] → + ∀d2. d ≤ d2 → ⦃G, L1⦄ ⊢ T2 ▪[h, g] d2 → ∀U2. ⦃G, L1⦄ ⊢ T2 •*[h, d] U2 → + ⦃G, L1⦄ ⊢ T1 ⬌* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ U1 ⬌* U2. +#h #g #G #L1 #T1 #HT1 #d #d1 #Hd1 #HTd1 #U1 #HTU1 #T2 #HT2 #d2 #Hd2 #HTd2 #U2 #HTU2 #H #L2 #HL12 +elim (cpcs_inv_cprs … H) -H #T #H1 #H2 +elim (lstas_cprs_lpr … HT1 … Hd1 HTd1 … HTU1 … H1 … HL12) -T1 #W1 #H1 #HUW1 +elim (lstas_cprs_lpr … HT2 … Hd2 HTd2 … HTU2 … H2 … HL12) -T2 #W2 #H2 #HUW2 +lapply (lstas_mono … H1 … H2) -h -T -d #H destruct /2 width=3 by cpcs_canc_dx/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_scpes.ma b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_scpes.ma new file mode 100644 index 000000000..40f8b7b04 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/dynamic/snv_scpes.ma @@ -0,0 +1,198 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbg_fpbs.ma". +include "basic_2A/equivalence/scpes_cpcs.ma". +include "basic_2A/equivalence/scpes_scpes.ma". +include "basic_2A/dynamic/snv.ma". + +(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************) + +(* Inductive premises for the preservation results **************************) + +definition IH_snv_cpr_lpr: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ¡[h, g]. + +definition IH_da_cpr_lpr: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. + +definition IH_lstas_cpr_lpr: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L1,T1. ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d2] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*[h, d2] U2 & ⦃G, L2⦄ ⊢ U1 ⬌* U2. + +definition IH_snv_lstas: ∀h:sh. sd h → relation3 genv lenv term ≝ + λh,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T ▪[h, g] d1 → + ∀U. ⦃G, L⦄ ⊢ T •*[h, d2] U → ⦃G, L⦄ ⊢ U ¡[h, g]. + +(* Properties for the preservation results **********************************) + +fact snv_cprs_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ¡[h, g]. +#h #g #G0 #L0 #T0 #IH #G #L1 #T1 #HLT0 #HT1 #T2 #H +@(cprs_ind … H) -T2 /4 width=6 by fpbg_fpbs_trans, cprs_fpbs/ +qed-. + +fact da_cprs_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. +#h #g #G0 #L0 #T0 #IH2 #IH1 #G #L1 #T1 #HLT0 #HT1 #d #Hd #T2 #H +@(cprs_ind … H) -T2 /4 width=10 by snv_cprs_lpr_aux, fpbg_fpbs_trans, cprs_fpbs/ +qed-. + +fact da_scpds_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀T2,d2. ⦃G, L1⦄ ⊢ T1 •*➡*[h, g, d2] T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + d2 ≤ d1 ∧ ⦃G, L2⦄ ⊢ T2 ▪[h, g] d1-d2. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G #L1 #T1 #HLT0 #HT1 #d1 #Hd1 #T2 #d2 * #T #d0 #Hd20 #H #HT1 #HT2 #L2 #HL12 +lapply (da_mono … H … Hd1) -H #H destruct +lapply (lstas_da_conf … HT1 … Hd1) #Hd12 +lapply (da_cprs_lpr_aux … IH2 IH1 … Hd12 … HT2 … HL12) -IH2 -IH1 -HT2 -HL12 +/3 width=8 by fpbg_fpbs_trans, lstas_fpbs, conj/ +qed-. + +fact da_scpes_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + ∀G,L,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T1⦄ → ⦃G, L⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T2⦄ → ⦃G, L⦄ ⊢ T2 ¡[h, g] → + ∀d11. ⦃G, L⦄ ⊢ T1 ▪[h, g] d11 → ∀d12. ⦃G, L⦄ ⊢ T2 ▪[h, g] d12 → + ∀d21,d22. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d21, d22] T2 → + ∧∧ d21 ≤ d11 & d22 ≤ d12 & d11 - d21 = d12 - d22. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G #L #T1 #HLT01 #HT1 #T2 #HLT02 #HT2 #d11 #Hd11 #d12 #Hd12 #d21 #d22 * #T #HT1 #HT2 +elim (da_scpds_lpr_aux … IH3 IH2 IH1 … Hd11 … HT1 … L) -Hd11 -HT1 // +elim (da_scpds_lpr_aux … IH3 IH2 IH1 … Hd12 … HT2 … L) -Hd12 -HT2 // +/3 width=7 by da_mono, and3_intro/ +qed-. + +fact lstas_cprs_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀d1,d2. d2 ≤ d1 → ⦃G, L1⦄ ⊢ T1 ▪[h, g] d1 → + ∀U1. ⦃G, L1⦄ ⊢ T1 •*[h, d2] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*[h, d2] U2 & ⦃G, L2⦄ ⊢ U1 ⬌* U2. +#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G #L1 #T1 #H01 #HT1 #d1 #d2 #Hd21 #Hd1 #U1 #HTU1 #T2 #H +@(cprs_ind … H) -T2 [ /2 width=10 by/ ] +#T #T2 #HT1T #HTT2 #IHT1 #L2 #HL12 +elim (IHT1 L1) // -IHT1 #U #HTU #HU1 +elim (IH1 … Hd21 … HTU … HTT2 … HL12) -IH1 -HTU -HTT2 +[2: /3 width=12 by da_cprs_lpr_aux/ +|3: /3 width=10 by snv_cprs_lpr_aux/ +|4: /3 width=5 by fpbg_fpbs_trans, cprs_fpbs/ +] -G0 -L0 -T0 -T1 -T -d1 +/4 width=5 by lpr_cpcs_conf, cpcs_trans, ex2_intro/ +qed-. + +fact scpds_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀U1,d. ⦃G, L1⦄ ⊢ T1 •*➡*[h, g, d] U1 → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∃∃U2. ⦃G, L2⦄ ⊢ T2 •*➡*[h, g, d] U2 & ⦃G, L2⦄ ⊢ U1 ➡* U2. +#h #g #G0 #L0 #T0 #IH2 #IH1 #G #L1 #T1 #H01 #HT1 #U1 #d2 * #W1 #d1 #Hd21 #HTd1 #HTW1 #HWU1 #T2 #HT12 #L2 #HL12 +elim (IH1 … H01 … HTW1 … HT12 … HL12) -IH1 // #W2 #HTW2 #HW12 +lapply (IH2 … H01 … HTd1 … HT12 … HL12) -L0 -T0 // -T1 +lapply (lpr_cprs_conf … HL12 … HWU1) -L1 #HWU1 +lapply (cpcs_canc_sn … HW12 HWU1) -W1 #H +elim (cpcs_inv_cprs … H) -H /3 width=6 by ex4_2_intro, ex2_intro/ +qed-. + +fact scpes_cpr_lpr_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T1⦄ → ⦃G, L1⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L1, T2⦄ → ⦃G, L1⦄ ⊢ T2 ¡[h, g] → + ∀d1,d2. ⦃G, L1⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ∀U1. ⦃G, L1⦄ ⊢ T1 ➡ U1 → ∀U2. ⦃G, L1⦄ ⊢ T2 ➡ U2 → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ⦃G, L2⦄ ⊢ U1 •*⬌*[h, g, d1, d2] U2. +#h #g #G0 #L0 #T0 #IH2 #IH1 #G #L1 #T1 #H01 #HT1 #T2 #HT02 #HT2 #d1 #d2 * #T0 #HT10 #HT20 #U1 #HTU1 #U2 #HTU2 #L2 #HL12 +elim (scpds_cpr_lpr_aux … IH2 IH1 … HT10 … HTU1 … HL12) -HT10 -HTU1 // #X1 #HUX1 #H1 +elim (scpds_cpr_lpr_aux … IH2 IH1 … HT20 … HTU2 … HL12) -HT20 -HTU2 // #X2 #HUX2 #H2 +elim (cprs_conf … H1 … H2) -T0 +/3 width=5 by scpds_div, scpds_cprs_trans/ +qed-. + +fact lstas_scpds_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L,T. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T⦄ → ⦃G, L⦄ ⊢ T ¡[h, g] → + ∀d,d1. d1 ≤ d → ⦃G, L⦄ ⊢ T ▪[h, g] d → ∀T1. ⦃G, L⦄ ⊢ T •*[h, d1] T1 → + ∀T2,d2. ⦃G, L⦄ ⊢ T •*➡*[h, g, d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d2-d1, d1-d2] T2. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T #H0 #HT #d #d1 #Hd1 #HTd #T1 #HT1 #T2 #d2 * #X #d0 #Hd20 #H #HTX #HXT2 +lapply (da_mono … H … HTd) -H #H destruct +lapply (lstas_da_conf … HT1 … HTd) #HTd1 +lapply (lstas_da_conf … HTX … HTd) #HXd +lapply (da_cprs_lpr_aux … IH3 IH2 … HXd … HXT2 L ?) +[1,2,3: /3 width=8 by fpbg_fpbs_trans, lstas_fpbs/ ] #HTd2 +elim (le_or_ge d1 d2) #Hd12 >(eq_minus_O … Hd12) +[ elim (da_lstas … HTd2 0) #X2 #HTX2 #_ -IH4 -IH3 -IH2 -IH1 -H0 -HT -HTd -HXd + /5 width=6 by lstas_scpds, scpds_div, cprs_strap1, lstas_cpr, lstas_conf_le, monotonic_le_minus_l, ex4_2_intro/ +| elim (da_lstas … HTd1 0) #X1 #HTX1 #_ + lapply (lstas_conf_le … HTX … HT1) // #HXT1 -HT1 + elim (lstas_cprs_lpr_aux … IH3 IH2 IH1 … HXd … HXT1 … HXT2 L) -IH3 -IH2 -IH1 -HXd -HXT1 -HXT2 + /4 width=8 by cpcs_scpes, cpcs_cpr_conf, fpbg_fpbs_trans, lstas_fpbs, lstas_cpr, monotonic_le_minus_l/ +] +qed-. + +fact scpes_le_aux: ∀h,g,G0,L0,T0. + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_lstas h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) → + (∀G1,L1,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G1, L1, T1⦄ → IH_lstas_cpr_lpr h g G1 L1 T1) → + ∀G,L,T1. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T1⦄ → ⦃G, L⦄ ⊢ T1 ¡[h, g] → + ∀T2. ⦃G0, L0, T0⦄ >≡[h, g] ⦃G, L, T2⦄ → ⦃G, L⦄ ⊢ T2 ¡[h, g] → + ∀d11. ⦃G, L⦄ ⊢ T1 ▪[h, g] d11 → ∀d12. ⦃G, L⦄ ⊢ T2 ▪[h, g] d12 → + ∀d21,d22,d. d21 + d ≤ d11 → d22 + d ≤ d12 → + ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d21, d22] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d21+d, d22+d] T2. +#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T1 #H01 #HT1 #T2 #H02 #HT2 #d11 #Hd11 #Hd12 #Hd12 #d21 #d22 #d #H1 #H2 * #T0 #HT10 #HT20 +elim (da_lstas … Hd11 (d21+d)) #X1 #HTX1 #_ +elim (da_lstas … Hd12 (d22+d)) #X2 #HTX2 #_ +lapply (lstas_scpds_aux … IH4 IH3 IH2 IH1 … Hd11 … HTX1 … HT10) -HT10 +[1,2,3: // | >eq_minus_O [2: // ] eq_minus_O [2: // ] (cprs_inv_sort1 … H1) -T #H2 +lapply (cprs_inv_sort1 … H2) -L #H destruct // +qed-. + +lemma cpcs_inv_abst1: ∀a,G,L,W1,T1,T. ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ⬌* T → + ∃∃W2,T2. ⦃G, L⦄ ⊢ T ➡* ⓛ{a}W2.T2 & ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2. +#a #G #L #W1 #T1 #T #H +elim (cpcs_inv_cprs … H) -H #X #H1 #H2 +elim (cprs_inv_abst1 … H1) -H1 #W2 #T2 #HW12 #HT12 #H destruct +/3 width=6 by cprs_bind, ex2_2_intro/ +qed-. + +lemma cpcs_inv_abst2: ∀a,G,L,W1,T1,T. ⦃G, L⦄ ⊢ T ⬌* ⓛ{a}W1.T1 → + ∃∃W2,T2. ⦃G, L⦄ ⊢ T ➡* ⓛ{a}W2.T2 & ⦃G, L⦄ ⊢ ⓛ{a}W1.T1 ➡* ⓛ{a}W2.T2. +/3 width=1 by cpcs_inv_abst1, cpcs_sym/ qed-. + +(* Basic_1: was: pc3_gen_sort_abst *) +lemma cpcs_inv_sort_abst: ∀a,G,L,W,T,k. ⦃G, L⦄ ⊢ ⋆k ⬌* ⓛ{a}W.T → ⊥. +#a #G #L #W #T #k #H +elim (cpcs_inv_cprs … H) -H #X #H1 +>(cprs_inv_sort1 … H1) -X #H2 +elim (cprs_inv_abst1 … H2) -H2 #W0 #T0 #_ #_ #H destruct +qed-. + +(* Basic_1: was: pc3_gen_lift *) +lemma cpcs_inv_lift: ∀G,L,K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T1,U1. ⬆[l, m] T1 ≡ U1 → ∀T2,U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, L⦄ ⊢ U1 ⬌* U2 → ⦃G, K⦄ ⊢ T1 ⬌* T2. +#G #L #K #s #l #m #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HU12 +elim (cpcs_inv_cprs … HU12) -HU12 #U #HU1 #HU2 +elim (cprs_inv_lift1 … HU1 … HLK … HTU1) -U1 #T #HTU #HT1 +elim (cprs_inv_lift1 … HU2 … HLK … HTU2) -L -U2 #X #HXU +>(lift_inj … HXU … HTU) -X -U -l -m /2 width=3 by cprs_div/ +qed-. + +(* Advanced properties ******************************************************) + +lemma lpr_cpcs_trans: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌* T2 → ⦃G, L1⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H +/4 width=5 by cprs_div, lpr_cprs_trans/ +qed-. + +lemma lprs_cpcs_trans: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀T1,T2. ⦃G, L2⦄ ⊢ T1 ⬌* T2 → ⦃G, L1⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H +/4 width=5 by cprs_div, lprs_cprs_trans/ +qed-. + +lemma cpr_cprs_conf_cpcs: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ➡* T1 → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T #T1 #T2 #HT1 #HT2 elim (cprs_strip … HT1 … HT2) -HT1 -HT2 +/2 width=3 by cpr_cprs_div/ +qed-. + +lemma cprs_cpr_conf_cpcs: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ➡* T1 → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T2 ⬌* T1. +#G #L #T #T1 #T2 #HT1 #HT2 elim (cprs_strip … HT1 … HT2) -HT1 -HT2 +/2 width=3 by cprs_cpr_div/ +qed-. + +lemma cprs_conf_cpcs: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ➡* T1 → ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T #T1 #T2 #HT1 #HT2 elim (cprs_conf … HT1 … HT2) -HT1 -HT2 +/2 width=3 by cprs_div/ +qed-. + +lemma lprs_cprs_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #HT12 elim (lprs_cprs_conf_dx … HT12 … HL12) -L1 +/2 width=3 by cprs_div/ +qed-. + +(* Basic_1: was: pc3_wcpr0_t *) +(* Basic_1: note: pc3_wcpr0_t should be renamed *) +(* Note: alternative proof /3 width=5 by lprs_cprs_conf, lpr_lprs/ *) +lemma lpr_cprs_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡* T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #HT12 elim (cprs_lpr_conf_dx … HT12 … HL12) -L1 +/2 width=3 by cprs_div/ +qed-. + +(* Basic_1: was only: pc3_pr0_pr2_t *) +(* Basic_1: note: pc3_pr0_pr2_t should be renamed *) +lemma lpr_cpr_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +/3 width=5 by lpr_cprs_conf, cpr_cprs/ qed-. + +(* Basic_1: was only: pc3_thin_dx *) +lemma cpcs_flat: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬌* V2 → ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌* T2 → + ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬌* ⓕ{I}V2.T2. +#G #L #V1 #V2 #HV12 #T1 #T2 #HT12 +elim (cpcs_inv_cprs … HV12) -HV12 +elim (cpcs_inv_cprs … HT12) -HT12 +/3 width=5 by cprs_flat, cprs_div/ +qed. + +lemma cpcs_flat_dx_cpr_rev: ∀G,L,V1,V2. ⦃G, L⦄ ⊢ V2 ➡ V1 → ∀T1,T2. ⦃G, L⦄ ⊢ T1 ⬌* T2 → + ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ⬌* ⓕ{I}V2.T2. +/3 width=1 by cpr_cpcs_sn, cpcs_flat/ qed. + +lemma cpcs_bind_dx: ∀a,I,G,L,V,T1,T2. ⦃G, L.ⓑ{I}V⦄ ⊢ T1 ⬌* T2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V.T1 ⬌* ⓑ{a,I}V.T2. +#a #I #G #L #V #T1 #T2 #HT12 elim (cpcs_inv_cprs … HT12) -HT12 +/3 width=5 by cprs_div, cprs_bind/ +qed. + +lemma cpcs_bind_sn: ∀a,I,G,L,V1,V2,T. ⦃G, L⦄ ⊢ V1 ⬌* V2 → ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T ⬌* ⓑ{a,I}V2. T. +#a #I #G #L #V1 #V2 #T #HV12 elim (cpcs_inv_cprs … HV12) -HV12 +/3 width=5 by cprs_div, cprs_bind/ +qed. + +lemma lsubr_cpcs_trans: ∀G,L1,T1,T2. ⦃G, L1⦄ ⊢ T1 ⬌* T2 → + ∀L2. L2 ⫃ L1 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #T1 #T2 #HT12 elim (cpcs_inv_cprs … HT12) -HT12 +/3 width=5 by cprs_div, lsubr_cprs_trans/ +qed-. + +(* Basic_1: was: pc3_lift *) +lemma cpcs_lift: ∀G,L,K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T1,U1. ⬆[l, m] T1 ≡ U1 → ∀T2,U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, K⦄ ⊢ T1 ⬌* T2 → ⦃G, L⦄ ⊢ U1 ⬌* U2. +#G #L #K #s #l #m #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HT12 +elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2 +elim (lift_total T l m) /3 width=12 by cprs_div, cprs_lift/ +qed. + +lemma cpcs_strip: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T ⬌* T1 → ∀T2. ⦃G, L⦄ ⊢ T ⬌ T2 → + ∃∃T0. ⦃G, L⦄ ⊢ T1 ⬌ T0 & ⦃G, L⦄ ⊢ T2 ⬌* T0. +#G #L #T1 #T @TC_strip1 /2 width=3 by cpc_conf/ qed-. + +(* More inversion lemmas ****************************************************) + +(* Note: there must be a proof suitable for llpr *) +lemma cpcs_inv_abst_sn: ∀a1,a2,G,L,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 → + ∧∧ ⦃G, L⦄ ⊢ W1 ⬌* W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ⬌* T2 & a1 = a2. +#a1 #a2 #G #L #W1 #W2 #T1 #T2 #H +elim (cpcs_inv_cprs … H) -H #T #H1 #H2 +elim (cprs_inv_abst1 … H1) -H1 #W0 #T0 #HW10 #HT10 #H destruct +elim (cprs_inv_abst1 … H2) -H2 #W #T #HW2 #HT2 #H destruct +lapply (lprs_cprs_conf … (L.ⓛW) … HT2) /2 width=1 by lprs_pair/ -HT2 #HT2 +lapply (lprs_cpcs_trans … (L.ⓛW1) … HT2) /2 width=1 by lprs_pair/ -HT2 #HT2 +/4 width=3 by and3_intro, cprs_div, cpcs_cprs_div, cpcs_sym/ +qed-. + +lemma cpcs_inv_abst_dx: ∀a1,a2,G,L,W1,W2,T1,T2. ⦃G, L⦄ ⊢ ⓛ{a1}W1.T1 ⬌* ⓛ{a2}W2.T2 → + ∧∧ ⦃G, L⦄ ⊢ W1 ⬌* W2 & ⦃G, L.ⓛW2⦄ ⊢ T1 ⬌* T2 & a1 = a2. +#a1 #a2 #G #L #W1 #W2 #T1 #T2 #HT12 lapply (cpcs_sym … HT12) -HT12 +#HT12 elim (cpcs_inv_abst_sn … HT12) -HT12 /3 width=1 by cpcs_sym, and3_intro/ +qed-. + +(* Main properties **********************************************************) + +(* Basic_1: was pc3_t *) +theorem cpcs_trans: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌* T → ∀T2. ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 @(trans_TC … HT1) qed-. + +theorem cpcs_canc_sn: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T ⬌* T1 → ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=3 by cpcs_trans, cpcs_sym/ qed-. + +theorem cpcs_canc_dx: ∀G,L,T,T1,T2. ⦃G, L⦄ ⊢ T1 ⬌* T → ⦃G, L⦄ ⊢ T2 ⬌* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=3 by cpcs_trans, cpcs_sym/ qed-. + +lemma cpcs_bind1: ∀a,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬌* V2 → + ∀T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬌* T2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T1 ⬌* ⓑ{a,I}V2. T2. +/3 width=3 by cpcs_trans, cpcs_bind_sn, cpcs_bind_dx/ qed. + +lemma cpcs_bind2: ∀a,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬌* V2 → + ∀T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬌* T2 → + ⦃G, L⦄ ⊢ ⓑ{a,I}V1. T1 ⬌* ⓑ{a,I}V2. T2. +/3 width=3 by cpcs_trans, cpcs_bind_sn, cpcs_bind_dx/ qed. + +(* Basic_1: was: pc3_wcpr0 *) +lemma lpr_cpcs_conf: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → + ∀T1,T2. ⦃G, L1⦄ ⊢ T1 ⬌* T2 → ⦃G, L2⦄ ⊢ T1 ⬌* T2. +#G #L1 #L2 #HL12 #T1 #T2 #H elim (cpcs_inv_cprs … H) -H +/3 width=5 by cpcs_canc_dx, lpr_cprs_conf/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cprs.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cprs.ma new file mode 100644 index 000000000..d66896b64 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/cpcs_cprs.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/cprs.ma". +include "basic_2A/equivalence/cpcs.ma". + +(* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************) + +(* Properties about context sensitive computation on terms ******************) + +(* Basic_1: was: pc3_pr3_r *) +lemma cpcs_cprs_dx: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T2 #H @(cprs_ind … H) -T2 +/3 width=3 by cpcs_cpr_strap1, cpcs_strap1, cpc_cpcs/ +qed. + +(* Basic_1: was: pc3_pr3_x *) +lemma cpcs_cprs_sn: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T2 ➡* T1 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T2 #H @(cprs_ind_dx … H) -T2 +/3 width=3 by cpcs_cpr_div, cpcs_strap1, cpcs_cprs_dx/ +qed. + +lemma cpcs_cprs_strap1: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌* T → ∀T2. ⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 #H @(cprs_ind … H) -T2 /2 width=3 by cpcs_cpr_strap1/ +qed-. + +lemma cpcs_cprs_strap2: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → ∀T2. ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #H #T2 #HT2 @(cprs_ind_dx … H) -T1 /2 width=3 by cpcs_cpr_strap2/ +qed-. + +lemma cpcs_cprs_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌* T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 /2 width=3 by cpcs_cpr_div/ +qed-. + +(* Basic_1: was: pc3_pr3_conf *) +lemma cpcs_cprs_conf: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T ➡* T1 → ∀T2. ⦃G, L⦄ ⊢ T ⬌* T2 → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #H #T2 #HT2 @(cprs_ind … H) -T1 /2 width=3 by cpcs_cpr_conf/ +qed-. + +(* Basic_1: was: pc3_pr3_t *) +(* Basic_1: note: pc3_pr3_t should be renamed *) +lemma cprs_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +#G #L #T1 #T #HT1 #T2 #H @(cprs_ind_dx … H) -T2 +/2 width=3 by cpcs_cpr_div, cpcs_cprs_dx/ +qed. + +lemma cprs_cpr_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡ T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=5 by cpr_cprs, cprs_div/ qed-. + +lemma cpr_cprs_div: ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡ T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡* T → ⦃G, L⦄ ⊢ T1 ⬌* T2. +/3 width=3 by cpr_cprs, cprs_div/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes.ma new file mode 100644 index 000000000..111eef91d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes.ma @@ -0,0 +1,37 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/dpconvstar_8.ma". +include "basic_2A/computation/scpds.ma". + +(* STRATIFIED DECOMPOSED PARALLEL EQUIVALENCE FOR TERMS *********************) + +definition scpes: ∀h. sd h → nat → nat → relation4 genv lenv term term ≝ + λh,g,d1,d2,G,L,T1,T2. + ∃∃T. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d1] T & ⦃G, L⦄ ⊢ T2 •*➡*[h, g, d2] T. + +interpretation "stratified decomposed parallel equivalence (term)" + 'DPConvStar h g d1 d2 G L T1 T2 = (scpes h g d1 d2 G L T1 T2). + +(* Basic properties *********************************************************) + +lemma scpds_div: ∀h,g,G,L,T1,T2,T,d1,d2. + ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d1] T → ⦃G, L⦄ ⊢ T2 •*➡*[h, g, d2] T → + ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +/2 width=3 by ex2_intro/ qed. + +lemma scpes_sym: ∀h,g,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ⦃G, L⦄ ⊢ T2 •*⬌*[h, g, d2, d1] T1. +#h #g #G #L #T1 #T2 #L1 #d2 * /2 width=3 by scpds_div/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_aaa.ma new file mode 100644 index 000000000..3034f5b0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_aaa.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/scpds_aaa.ma". +include "basic_2A/equivalence/scpes.ma". + +(* DECOMPOSED EXTENDED PARALLEL EQUIVALENCE FOR TERMS ***********************) + +(* Main inversion lemmas about atomic arity assignment on terms *************) + +theorem scpes_aaa_mono: ∀h,g,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ∀A1. ⦃G, L⦄ ⊢ T1 ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T2 ⁝ A2 → + A1 = A2. +#h #g #G #L #T1 #T2 #d1 #d2 * #T #HT1 #HT2 #A1 #HA1 #A2 #HA2 +lapply (scpds_aaa_conf … HA1 … HT1) -T1 #HA1 +lapply (scpds_aaa_conf … HA2 … HT2) -T2 #HA2 +lapply (aaa_mono … HA1 … HA2) -L -T // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_cpcs.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_cpcs.ma new file mode 100644 index 000000000..4e3af3cca --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_cpcs.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/scpds_scpds.ma". +include "basic_2A/equivalence/cpcs_cpcs.ma". +include "basic_2A/equivalence/scpes.ma". + +(* STRATIFIED DECOMPOSED PARALLEL EQUIVALENCE FOR TERMS *********************) + +(* Inversion lemmas on parallel equivalence for terms ***********************) + +lemma scpes_inv_lstas_eq: ∀h,g,G,L,T1,T2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2 → + ∀U1. ⦃G, L⦄ ⊢ T1 •*[h, d1] U1 → + ∀U2. ⦃G, L⦄ ⊢ T2 •*[h, d2] U2 → ⦃G, L⦄ ⊢ U1 ⬌* U2. +#h #g #G #L #T1 #T2 #d1 #d2 * #T #HT1 #HT2 #U1 #HTU1 #U2 #HTU2 +/3 width=8 by scpds_inv_lstas_eq, cprs_div/ +qed-. + +(* Properties on parallel equivalence for terms *****************************) + +lemma cpcs_scpes: ∀h,g,G,L,T1,d11. ⦃G, L⦄ ⊢ T1 ▪[h, g] d11 → + ∀U1,d12. d12 ≤ d11 → ⦃G, L⦄ ⊢ T1 •*[h, d12] U1 → + ∀T2,d21. ⦃G, L⦄ ⊢ T2 ▪[h, g] d21 → + ∀U2,d22. d22 ≤ d21 → ⦃G, L⦄ ⊢ T2 •*[h, d22] U2 → + ⦃G, L⦄ ⊢ U1 ⬌* U2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d12, d22] T2. +#h #g #G #L #T1 #d11 #HT1 #U1 #d12 #Hd121 #HTU1 #T2 #d21 #HT2 #U2 #d22 #Hd221 #HTU2 #HU12 +elim (cpcs_inv_cprs … HU12) -HU12 /3 width=6 by scpds_div, ex4_2_intro/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_scpes.ma b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_scpes.ma new file mode 100644 index 000000000..c48ddd05f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/equivalence/scpes_scpes.ma @@ -0,0 +1,69 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/scpds_scpds.ma". +include "basic_2A/equivalence/scpes.ma". + +(* STRATIFIED DECOMPOSED PARALLEL EQUIVALENCE FOR TERMS *********************) + +(* Advanced inversion lemmas ************************************************) + +lemma scpes_inv_abst2: ∀h,g,a,G,L,T1,T2,W2,d1,d2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] ⓛ{a}W2.T2 → + ∃∃W,T. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, d1] ⓛ{a}W.T & ⦃G, L⦄ ⊢ W2 ➡* W & + ⦃G, L.ⓛW2⦄ ⊢ T2 •*➡*[h, g, d2] T. +#h #g #a #G #L #T1 #T2 #W2 #d1 #d2 * #T0 #HT10 #H +elim (scpds_inv_abst1 … H) -H #W #T #HW2 #HT2 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +(* Advanced properties ******************************************************) + +lemma scpes_refl: ∀h,g,G,L,T,d1,d2. d2 ≤ d1 → ⦃G, L⦄ ⊢ T ▪[h, g] d1 → + ⦃G, L⦄ ⊢ T •*⬌*[h, g, d2, d2] T. +#h #g #G #L #T #d1 #d2 #Hd21 #Hd1 +elim (da_lstas … Hd1 … d2) #U #HTU #_ +/3 width=3 by scpds_div, lstas_scpds/ +qed. + +lemma lstas_scpes_trans: ∀h,g,G,L,T1,d0,d1. ⦃G, L⦄ ⊢ T1 ▪[h, g] d0 → d1 ≤ d0 → + ∀T. ⦃G, L⦄ ⊢ T1 •*[h, d1] T → + ∀T2,d,d2. ⦃G, L⦄ ⊢ T •*⬌*[h,g,d,d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h,g,d1+d,d2] T2. +#h #g #G #L #T1 #d0 #d1 #Hd0 #Hd10 #T #HT1 #T2 #d #d2 * +/3 width=3 by scpds_div, lstas_scpds_trans/ qed-. + +(* Properties on parallel computation for terms *****************************) + +lemma cprs_scpds_div: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T → + ∀d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d → + ∀T2,d2. ⦃G, L⦄ ⊢ T2 •*➡*[h, g, d2] T → + ⦃G, L⦄⊢ T1 •*⬌*[h, g, 0, d2] T2. +#h #g #G #L #T1 #T #HT1 #d #Hd elim (da_lstas … Hd 0) +#X1 #HTX1 #_ elim (cprs_strip … HT1 X1) -HT1 +/3 width=5 by scpds_strap1, scpds_div, lstas_cpr, ex4_2_intro/ +qed. + +(* Main properties **********************************************************) + +theorem scpes_trans: ∀h,g,G,L,T1,T,d1,d. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d] T → + ∀T2,d2. ⦃G, L⦄ ⊢ T •*⬌*[h, g, d, d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +#h #g #G #L #T1 #T #d1 #d * #X1 #HT1X1 #HTX1 #T2 #d2 * #X2 #HTX2 #HT2X2 +elim (scpds_conf_eq … HTX1 … HTX2) -T -d /3 width=5 by scpds_cprs_trans, scpds_div/ +qed-. + +theorem scpes_canc_sn: ∀h,g,G,L,T,T1,d,d1. ⦃G, L⦄ ⊢ T •*⬌*[h, g, d, d1] T1 → + ∀T2,d2. ⦃G, L⦄ ⊢ T •*⬌*[h, g, d, d2] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +/3 width=4 by scpes_trans, scpes_sym/ qed-. + +theorem scpes_canc_dx: ∀h,g,G,L,T1,T,d1,d. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d] T → + ∀T2,d2. ⦃G, L⦄ ⊢ T2 •*⬌*[h, g, d2, d] T → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, d1, d2] T2. +/3 width=4 by scpes_trans, scpes_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_cpr_omega.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_cpr_omega.ma new file mode 100644 index 000000000..5ddc266e1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_cpr_omega.ma @@ -0,0 +1,43 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr.ma". + +(* EXAMPLES *****************************************************************) + +(* A reduction cycle in two steps: the term Omega ***************************) + +definition Delta: term → term ≝ λW. +ⓛW.ⓐ#0.#0. + +definition Omega1: term → term ≝ λW. ⓐ(Delta W).(Delta W). + +definition Omega2: term → term ≝ λW. +ⓓⓝW.(Delta W).ⓐ#0.#0. + +(* Basic properties *********************************************************) + +lemma Delta_lift: ∀W1,W2,l,m. ⬆[l, m] W1 ≡ W2 → + ⬆[l, m] (Delta W1) ≡ (Delta W2). +/4 width=1 by lift_flat, lift_bind, lift_lref_lt/ qed. + +(* Main properties **********************************************************) + +theorem cpr_Omega_12: ∀G,L,W. ⦃G, L⦄ ⊢ Omega1 W ➡ Omega2 W. +/2 width=1 by cpr_beta/ qed. + +theorem cpr_Omega_21: ∀G,L,W. ⦃G, L⦄ ⊢ Omega2 W ➡ Omega1 W. +#G #L #W1 elim (lift_total W1 0 1) #W2 #HW12 +@(cpr_zeta … (Omega1 W2)) /3 width=1 by Delta_lift, lift_flat/ +@cpr_flat @(cpr_delta … (Delta W1) ? 0) +[3,5,8,10: /2 width=2 by Delta_lift/ |4,9: /2 width=1 by cpr_eps/ |*: skip ] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_fpbg_refl.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_fpbg_refl.ma new file mode 100644 index 000000000..3d8d971a6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_fpbg_refl.ma @@ -0,0 +1,54 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/computation/fpbg_fpbs.ma". + +(* EXAMPLES *****************************************************************) + +(* Reflexivity of proper qrst-computation: the term ApplOmega ***************) + +definition ApplDelta: term → nat → term ≝ λW,k. +ⓛW.ⓐ⋆k.ⓐ#0.#0. + +definition ApplOmega1: term → nat → term ≝ λW,k. ⓐ(ApplDelta W k).(ApplDelta W k). + +definition ApplOmega2: term → nat → term ≝ λW,k. +ⓓⓝW.(ApplDelta W k).ⓐ⋆k.ⓐ#0.#0. + +definition ApplOmega3: term → nat → term ≝ λW,k. ⓐ⋆k.(ApplOmega1 W k). + +(* Basic properties *********************************************************) + +lemma ApplDelta_lift: ∀W1,W2,k,l,m. ⬆[l, m] W1 ≡ W2 → + ⬆[l, m] (ApplDelta W1 k) ≡ (ApplDelta W2 k). +/5 width=1 by lift_flat, lift_bind, lift_lref_lt/ qed. + +lemma cpr_ApplOmega_12: ∀G,L,W,k. ⦃G, L⦄ ⊢ ApplOmega1 W k ➡ ApplOmega2 W k. +/2 width=1 by cpr_beta/ qed. + +lemma cpr_ApplOmega_23: ∀G,L,W,k. ⦃G, L⦄ ⊢ ApplOmega2 W k ➡ ApplOmega3 W k. +#G #L #W1 #k elim (lift_total W1 0 1) #W2 #HW12 +@(cpr_zeta … (ApplOmega3 W2 k)) /4 width=1 by ApplDelta_lift, lift_flat/ +@cpr_flat // @cpr_flat @(cpr_delta … (ApplDelta W1 k) ? 0) +[3,5,8,10: /2 width=2 by ApplDelta_lift/ |4,9: /2 width=1 by cpr_eps/ |*: skip ] +qed. + +lemma cpxs_ApplOmega_13: ∀h,g,G,L,W,k. ⦃G, L⦄ ⊢ ApplOmega1 W k ➡*[h,g] ApplOmega3 W k. +/4 width=3 by cpxs_strap1, cpr_cpx/ qed. + +lemma fqup_ApplOmega_13: ∀G,L,W,k. ⦃G, L, ApplOmega3 W k⦄ ⊐+ ⦃G, L, ApplOmega1 W k⦄. +/2 width=1 by/ qed. + +(* Main properties **********************************************************) + +theorem fpbg_refl: ∀h,g,G,L,W,k. ⦃G, L, ApplOmega1 W k⦄ >≡[h,g] ⦃G, L, ApplOmega1 W k⦄. +/3 width=5 by fpbs_fpbg_trans, fqup_fpbg, cpxs_fpbs/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_snv_eta.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_snv_eta.ma new file mode 100644 index 000000000..65abf6352 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_snv_eta.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/dynamic/snv.ma". + +(* EXAMPLES *****************************************************************) + +(* Extended validy (basic?_2) vs. restricted validity (basic_1) *************) + +(* extended validity of a closure, last arg of snv_appl > 1 *) +lemma snv_extended: ∀h,g,a,G,L,k. ⦃G, L.ⓛ⋆k.ⓛⓛ{a}⋆k.⋆k.ⓛ#0⦄ ⊢ ⓐ#2.#0 ¡[h, g]. +#h #g #a #G #L #k elim (deg_total h g k) +#d #Hd @(snv_appl … a … (⋆k) … (⋆k) (0+1+1)) +[ /4 width=5 by snv_lref, drop_drop_lt/ +| /4 width=13 by snv_bind, snv_lref/ +| /5 width=6 by lstas_scpds, lstas_succ, da_ldec, da_sort, drop_drop_lt/ +| @(lstas_scpds … (d+1+1)) + /5 width=11 by lstas_bind, lstas_succ, da_bind, da_ldec, da_sort, lift_bind/ +] +qed. + +(* restricted validity of the η-expanded closure, last arg of snv_appl = 1 **) +lemma snv_restricted: ∀h,g,a,G,L,k. ⦃G, L.ⓛ⋆k.ⓛⓛ{a}⋆k.⋆k.ⓛⓛ{a}⋆k.ⓐ#0.#1⦄ ⊢ ⓐ#2.#0 ¡[h, g]. +#h #g #a #G #L #k elim (deg_total h g k) +#d #Hd @(snv_appl … a … (⋆k) … (ⓐ#0.#2) (0+1)) +[ /4 width=5 by snv_lref, drop_drop_lt/ +| @snv_lref [4: // |1,2,3: skip ] + @snv_bind // + @(snv_appl … a … (⋆k) … (⋆k) (0+1)) + [ @snv_lref [4: // |1,2,3: skip ] // + | @snv_lref [4: /2 width=1 by drop_drop_lt/ |1,2,3: skip ] @snv_bind // + | @(lstas_scpds … (d+1)) /3 width=6 by da_sort, da_ldec, lstas_succ/ + | @(lstas_scpds … (d+1)) /3 width=8 by lstas_succ, lstas_bind, drop_drop, lift_bind/ + @da_ldec [3: /2 width=1 by drop_drop_lt/ |1,2: skip ] /3 width=1 by da_sort, da_bind/ + ] +| /5 width=6 by lstas_scpds, lstas_succ, da_ldec, da_sort, drop_drop_lt/ +| @(lstas_scpds … (d+1+1)) // + [ @da_ldec [3: // |1,2: skip ] + @da_bind @da_flat @da_ldec [3: /2 width=1 by drop_drop_lt/ |1,2: skip ] + /3 width=1 by da_sort, da_bind/ + | @lstas_succ [4: // |1,2: skip ] + [2: @lstas_bind | skip ] + [2: @lstas_appl | skip ] + [2: @lstas_zero + [4: /2 width=1 by drop_drop_lt/ |5: /2 width=2 by lstas_bind/ |*: skip ] + |1: skip ] + /4 width=2 by lift_flat, lift_bind, lift_lref_ge_minus, lift_lref_lt/ + ] +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_sta_ldec.ma b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_sta_ldec.ma new file mode 100644 index 000000000..c680c74eb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/examples/ex_sta_ldec.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas.ma". + +(* EXAMPLES *****************************************************************) + +(* Static type assignment (iterated vs primitive): the declared variable ****) + +(* basic_1: we have "L.ⓛⓝ⋆k1.⋆k2⦄ ⊢ #0 • ⓝ⋆k1.⋆k2". *) +theorem sta_ldec: ∀h,G,L,k1,k2. ⦃G, L.ⓛⓝ⋆k1.⋆k2⦄ ⊢ #0 •*[h, 1] ⋆k2. +/3 width=6 by lstas_sort, lstas_succ, lstas_cast, drop_pair/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/aarity.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/aarity.ma new file mode 100644 index 000000000..b980bc16a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/aarity.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES + * Initial invocation: - Patience on me to gain peace and perfection! - + *) + +include "ground_2A/lib/star.ma". +include "basic_2A/notation/constructors/item0_0.ma". +include "basic_2A/notation/constructors/snitem2_2.ma". + +(* ATOMIC ARITY *************************************************************) + +inductive aarity: Type[0] ≝ + | AAtom: aarity (* atomic aarity construction *) + | APair: aarity → aarity → aarity (* binary aarity construction *) +. + +interpretation "atomic arity construction (atomic)" + 'Item0 = AAtom. + +interpretation "atomic arity construction (binary)" + 'SnItem2 A1 A2 = (APair A1 A2). + +(* Basic inversion lemmas ***************************************************) + +fact destruct_apair_apair_aux: ∀A1,A2,B1,B2. ②B1.A1 = ②B2.A2 → B1 = B2 ∧ A1 = A2. +#A1 #A2 #B1 #B2 #H destruct /2 width=1 by conj/ +qed-. + +lemma discr_apair_xy_x: ∀A,B. ②B. A = B → ⊥. +#A #B elim B -B +[ #H destruct +| #Y #X #IHY #_ #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +lemma discr_tpair_xy_y: ∀B,A. ②B. A = A → ⊥. +#B #A elim A -A +[ #H destruct +| #Y #X #_ #IHX #H elim (destruct_apair_apair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +(* Basic properties *********************************************************) + +lemma eq_aarity_dec: ∀A1,A2:aarity. Decidable (A1 = A2). +#A1 elim A1 -A1 +[ #A2 elim A2 -A2 /2 width=1 by or_introl/ + #B2 #A2 #_ #_ @or_intror #H destruct +| #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2 + [ -IHB1 -IHA1 @or_intror #H destruct + | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1 + [ #H destruct elim (IHA1 A2) -IHA1 + [ #H destruct /2 width=1 by or_introl/ + | #HA12 @or_intror #H destruct /2 width=1 by/ + ] + | -IHA1 #HB12 @or_intror #H destruct /2 width=1 by/ + ] + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_restricted_weight.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_restricted_weight.ma new file mode 100644 index 000000000..49fd20d8d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_restricted_weight.ma @@ -0,0 +1,51 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/functions/weight_2.ma". +include "basic_2A/grammar/lenv_weight.ma". + +(* WEIGHT OF A RESTRICTED CLOSURE *******************************************) + +definition rfw: lenv → term → ? ≝ λL,T. ♯{L} + ♯{T}. + +interpretation "weight (restricted closure)" 'Weight L T = (rfw L T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: flt_shift *) +lemma rfw_shift: ∀a,I,K,V,T. ♯{K.ⓑ{I}V, T} < ♯{K, ⓑ{a,I}V.T}. +normalize // +qed. + +lemma rfw_tpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?%%); // +qed. + +lemma rfw_tpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?%%); // +qed. + +lemma rfw_lpair_sn: ∀I,L,V,T. ♯{L, V} < ♯{L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +lemma rfw_lpair_dx: ∀I,L,V,T. ♯{L, T} < ♯{L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +(* Basic_1: removed theorems 7: + flt_thead_sx flt_thead_dx flt_trans + flt_arith0 flt_arith1 flt_arith2 flt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_weight.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_weight.ma new file mode 100644 index 000000000..72631a761 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/cl_weight.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/functions/weight_3.ma". +include "basic_2A/grammar/lenv_weight.ma". +include "basic_2A/grammar/genv.ma". + +(* WEIGHT OF A CLOSURE ******************************************************) + +(* activate genv *) +definition fw: genv → lenv → term → ? ≝ λG,L,T. ♯{L} + ♯{T}. + +interpretation "weight (closure)" 'Weight G L T = (fw G L T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: flt_shift *) +lemma fw_shift: ∀a,I,G,K,V,T. ♯{G, K.ⓑ{I}V, T} < ♯{G, K, ⓑ{a,I}V.T}. +normalize // +qed. + +lemma fw_tpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?→?%%); // +qed. + +lemma fw_tpair_dx: ∀I,G,L,V,T. ♯{G, L, T} < ♯{G, L, ②{I}V.T}. +normalize in ⊢ (?→?→?→?→?→?%%); // +qed. + +lemma fw_lpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L.ⓑ{I}V, T}. +normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/ +qed. + +(* Basic_1: removed theorems 7: + flt_thead_sx flt_thead_dx flt_trans + flt_arith0 flt_arith1 flt_arith2 flt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/genv.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/genv.ma new file mode 100644 index 000000000..235b741bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/genv.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/lib/list.ma". +include "basic_2A/notation/constructors/star_0.ma". +include "basic_2A/notation/constructors/dxbind2_3.ma". +include "basic_2A/notation/constructors/dxabbr_2.ma". +include "basic_2A/notation/constructors/dxabst_2.ma". +include "basic_2A/grammar/term.ma". + +(* GLOBAL ENVIRONMENTS ******************************************************) + +(* global environments *) +definition genv ≝ list2 bind2 term. + +interpretation "sort (global environment)" + 'Star = (nil2 bind2 term). + +interpretation "global environment binding construction (binary)" + 'DxBind2 L I T = (cons2 bind2 term I T L). + +interpretation "abbreviation (global environment)" + 'DxAbbr L T = (cons2 bind2 term Abbr T L). + +interpretation "abstraction (global environment)" + 'DxAbst L T = (cons2 bind2 term Abst T L). + +(* Basic properties *********************************************************) + +axiom eq_genv_dec: ∀G1,G2:genv. Decidable (G1 = G2). diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/item.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/item.ma new file mode 100644 index 000000000..88d5cf57a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/item.ma @@ -0,0 +1,88 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/lib/bool.ma". +include "ground_2A/lib/arith.ma". + +(* ITEMS ********************************************************************) + +(* atomic items *) +inductive item0: Type[0] ≝ + | Sort: nat → item0 (* sort: starting at 0 *) + | LRef: nat → item0 (* reference by index: starting at 0 *) + | GRef: nat → item0 (* reference by position: starting at 0 *) +. + +(* binary binding items *) +inductive bind2: Type[0] ≝ + | Abbr: bind2 (* abbreviation *) + | Abst: bind2 (* abstraction *) +. + +(* binary non-binding items *) +inductive flat2: Type[0] ≝ + | Appl: flat2 (* application *) + | Cast: flat2 (* explicit type annotation *) +. + +(* binary items *) +inductive item2: Type[0] ≝ + | Bind2: bool → bind2 → item2 (* polarized binding item *) + | Flat2: flat2 → item2 (* non-binding item *) +. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_sort_sort_aux: ∀k1,k2. Sort k1 = Sort k2 → k1 = k2. +#k1 #k2 #H destruct // +qed-. + +(* Basic properties *********************************************************) + +lemma eq_item0_dec: ∀I1,I2:item0. Decidable (I1 = I2). +* #i1 * #i2 [2,3,4,6,7,8: @or_intror #H destruct ] +elim (eq_nat_dec i1 i2) /2 width=1 by or_introl/ +#Hni12 @or_intror #H destruct /2 width=1 by/ +qed-. + +(* Basic_1: was: bind_dec *) +lemma eq_bind2_dec: ∀I1,I2:bind2. Decidable (I1 = I2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. + +(* Basic_1: was: flat_dec *) +lemma eq_flat2_dec: ∀I1,I2:flat2. Decidable (I1 = I2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. + +(* Basic_1: was: kind_dec *) +lemma eq_item2_dec: ∀I1,I2:item2. Decidable (I1 = I2). +* [ #a1 ] #I1 * [1,3: #a2 ] #I2 +[2,3: @or_intror #H destruct +| elim (eq_bool_dec a1 a2) #Ha + [ elim (eq_bind2_dec I1 I2) /2 width=1 by or_introl/ #HI ] + @or_intror #H destruct /2 width=1 by/ +| elim (eq_flat2_dec I1 I2) /2 width=1 by or_introl/ #HI + @or_intror #H destruct /2 width=1 by/ +] +qed-. + +(* Basic_1: removed theorems 21: + s_S s_plus s_plus_sym s_minus minus_s_s s_le s_lt s_inj s_inc + s_arith0 s_arith1 + r_S r_plus r_plus_sym r_minus r_dis s_r r_arith0 r_arith1 + not_abbr_abst bind_dec_not +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv.ma new file mode 100644 index 000000000..5de603568 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/constructors/star_0.ma". +include "basic_2A/notation/constructors/dxbind2_3.ma". +include "basic_2A/notation/constructors/dxabbr_2.ma". +include "basic_2A/notation/constructors/dxabst_2.ma". +include "basic_2A/grammar/term.ma". + +(* LOCAL ENVIRONMENTS *******************************************************) + +(* local environments *) +inductive lenv: Type[0] ≝ +| LAtom: lenv (* empty *) +| LPair: lenv → bind2 → term → lenv (* binary binding construction *) +. + +interpretation "sort (local environment)" + 'Star = LAtom. + +interpretation "local environment binding construction (binary)" + 'DxBind2 L I T = (LPair L I T). + +interpretation "abbreviation (local environment)" + 'DxAbbr L T = (LPair L Abbr T). + +interpretation "abstraction (local environment)" + 'DxAbst L T = (LPair L Abst T). + +(* Basic properties *********************************************************) + +lemma eq_lenv_dec: ∀L1,L2:lenv. Decidable (L1 = L2). +#L1 elim L1 -L1 [| #L1 #I1 #V1 #IHL1 ] * [2,4: #L2 #I2 #V2 ] +[1,4: @or_intror #H destruct +| elim (eq_bind2_dec I1 I2) #HI + [ elim (eq_term_dec V1 V2) #HV + [ elim (IHL1 L2) -IHL1 /2 width=1 by or_introl/ #HL ] + ] + @or_intror #H destruct /2 width=1 by/ +| /2 width=1 by or_introl/ +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_lpair_lpair_aux: ∀I1,I2,L1,L2,V1,V2. L1.ⓑ{I1}V1 = L2.ⓑ{I2}V2 → + ∧∧L1 = L2 & I1 = I2 & V1 = V2. +#I1 #I2 #L1 #L2 #V1 #V2 #H destruct /2 width=1 by and3_intro/ +qed-. + +lemma discr_lpair_x_xy: ∀I,V,L. L = L.ⓑ{I}V → ⊥. +#I #V #L elim L -L +[ #H destruct +| #L #J #W #IHL #H + elim (destruct_lpair_lpair_aux … H) -H #H1 #H2 #H3 destruct /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_append.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_append.ma new file mode 100644 index 000000000..25273f9f2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_append.ma @@ -0,0 +1,131 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/notation/functions/append_2.ma". +include "basic_2A/notation/functions/snbind2_3.ma". +include "basic_2A/notation/functions/snabbr_2.ma". +include "basic_2A/notation/functions/snabst_2.ma". +include "basic_2A/grammar/lenv_length.ma". + +(* LOCAL ENVIRONMENTS *******************************************************) + +let rec append L K on K ≝ match K with +[ LAtom ⇒ L +| LPair K I V ⇒ (append L K). ⓑ{I} V +]. + +interpretation "append (local environment)" 'Append L1 L2 = (append L1 L2). + +interpretation "local environment tail binding construction (binary)" + 'SnBind2 I T L = (append (LPair LAtom I T) L). + +interpretation "tail abbreviation (local environment)" + 'SnAbbr T L = (append (LPair LAtom Abbr T) L). + +interpretation "tail abstraction (local environment)" + 'SnAbst L T = (append (LPair LAtom Abst T) L). + +definition d_appendable_sn: predicate (lenv→relation term) ≝ λR. + ∀K,T1,T2. R K T1 T2 → ∀L. R (L @@ K) T1 T2. + +(* Basic properties *********************************************************) + +lemma append_atom_sn: ∀L. ⋆ @@ L = L. +#L elim L -L normalize // +qed. + +lemma append_assoc: associative … append. +#L1 #L2 #L3 elim L3 -L3 normalize // +qed. + +lemma append_length: ∀L1,L2. |L1 @@ L2| = |L1| + |L2|. +#L1 #L2 elim L2 -L2 normalize // +qed. + +lemma ltail_length: ∀I,L,V. |ⓑ{I}V.L| = |L| + 1. +#I #L #V >append_length // +qed. + +(* Basic_1: was just: chead_ctail *) +lemma lpair_ltail: ∀L,I,V. ∃∃J,K,W. L.ⓑ{I}V = ⓑ{J}W.K & |L| = |K|. +#L elim L -L /2 width=5 by ex2_3_intro/ +#L #Z #X #IHL #I #V elim (IHL Z X) -IHL +#J #K #W #H #_ >H -H >ltail_length +@(ex2_3_intro … J (K.ⓑ{I}V) W) // +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma append_inj_sn: ∀K1,K2,L1,L2. L1 @@ K1 = L2 @@ K2 → |K1| = |K2| → + L1 = L2 ∧ K1 = K2. +#K1 elim K1 -K1 +[ * normalize /2 width=1 by conj/ + #K2 #I2 #V2 #L1 #L2 #_ append_length in H2; #H + elim (plus_xySz_x_false … H) +| #K1 #I1 #V1 #IH * normalize + [ #L1 #L2 #H1 #H2 destruct + normalize in H2; >append_length in H2; #H + elim (plus_xySz_x_false … (sym_eq … H)) + | #K2 #I2 #V2 #L1 #L2 #H1 #H2 + elim (destruct_lpair_lpair_aux … H1) -H1 #H1 #H3 #H4 destruct (**) (* destruct lemma needed *) + elim (IH … H1) -IH -H1 /2 width=1 by conj/ + ] +] +qed-. + +lemma append_inv_refl_dx: ∀L,K. L @@ K = L → K = ⋆. +#L #K #H elim (append_inj_dx … (⋆) … H) // +qed-. + +lemma append_inv_pair_dx: ∀I,L,K,V. L @@ K = L.ⓑ{I}V → K = ⋆.ⓑ{I}V. +#I #L #K #V #H elim (append_inj_dx … (⋆.ⓑ{I}V) … H) // +qed-. + +lemma length_inv_pos_dx_ltail: ∀L,l. |L| = l + 1 → + ∃∃I,K,V. |K| = l & L = ⓑ{I}V.K. +#Y #l #H elim (length_inv_pos_dx … H) -H #I #L #V #Hl #HLK destruct +elim (lpair_ltail L I V) /2 width=5 by ex2_3_intro/ +qed-. + +lemma length_inv_pos_sn_ltail: ∀L,l. l + 1 = |L| → + ∃∃I,K,V. l = |K| & L = ⓑ{I}V.K. +#Y #l #H elim (length_inv_pos_sn … H) -H #I #L #V #Hl #HLK destruct +elim (lpair_ltail L I V) /2 width=5 by ex2_3_intro/ +qed-. + +(* Basic eliminators ********************************************************) + +(* Basic_1: was: c_tail_ind *) +lemma lenv_ind_alt: ∀R:predicate lenv. + R (⋆) → (∀I,L,T. R L → R (ⓑ{I}T.L)) → + ∀L. R L. +#R #IH1 #IH2 #L @(f_ind … length … L) -L #x #IHx * // -IH1 +#L #I #V normalize #H destruct elim (lpair_ltail L I V) /3 width=1 by/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_length.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_length.ma new file mode 100644 index 000000000..cefc9b049 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/lenv_length.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/lenv.ma". + +(* LENGTH OF A LOCAL ENVIRONMENT ********************************************) + +let rec length L ≝ match L with +[ LAtom ⇒ 0 +| LPair L _ _ ⇒ length L + 1 +]. + +interpretation "length (local environment)" 'card L = (length L). + +(* Basic inversion lemmas ***************************************************) + +lemma length_inv_zero_dx: ∀L. |L| = 0 → L = ⋆. +* // #L #I #V normalize ypred_succ /3 width=1 by lreq_pair/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #IHL12 #m #H + lapply (lreq_inv_succ … H ?) -H // >yplus_succ2 >ypred_succ /3 width=1 by lreq_succ/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term.ma new file mode 100644 index 000000000..7dfa16305 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term.ma @@ -0,0 +1,153 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/constructors/item0_1.ma". +include "basic_2A/notation/constructors/snitem2_3.ma". +include "basic_2A/notation/constructors/snbind2_4.ma". +include "basic_2A/notation/constructors/snbind2pos_3.ma". +include "basic_2A/notation/constructors/snbind2neg_3.ma". +include "basic_2A/notation/constructors/snflat2_3.ma". +include "basic_2A/notation/constructors/star_1.ma". +include "basic_2A/notation/constructors/lref_1.ma". +include "basic_2A/notation/constructors/gref_1.ma". +include "basic_2A/notation/constructors/snabbr_3.ma". +include "basic_2A/notation/constructors/snabbrpos_2.ma". +include "basic_2A/notation/constructors/snabbrneg_2.ma". +include "basic_2A/notation/constructors/snabst_3.ma". +include "basic_2A/notation/constructors/snabstpos_2.ma". +include "basic_2A/notation/constructors/snabstneg_2.ma". +include "basic_2A/notation/constructors/snappl_2.ma". +include "basic_2A/notation/constructors/sncast_2.ma". +include "basic_2A/grammar/item.ma". + +(* TERMS ********************************************************************) + +(* terms *) +inductive term: Type[0] ≝ + | TAtom: item0 → term (* atomic item construction *) + | TPair: item2 → term → term → term (* binary item construction *) +. + +interpretation "term construction (atomic)" + 'Item0 I = (TAtom I). + +interpretation "term construction (binary)" + 'SnItem2 I T1 T2 = (TPair I T1 T2). + +interpretation "term binding construction (binary)" + 'SnBind2 a I T1 T2 = (TPair (Bind2 a I) T1 T2). + +interpretation "term positive binding construction (binary)" + 'SnBind2Pos I T1 T2 = (TPair (Bind2 true I) T1 T2). + +interpretation "term negative binding construction (binary)" + 'SnBind2Neg I T1 T2 = (TPair (Bind2 false I) T1 T2). + +interpretation "term flat construction (binary)" + 'SnFlat2 I T1 T2 = (TPair (Flat2 I) T1 T2). + +interpretation "sort (term)" + 'Star k = (TAtom (Sort k)). + +interpretation "local reference (term)" + 'LRef i = (TAtom (LRef i)). + +interpretation "global reference (term)" + 'GRef p = (TAtom (GRef p)). + +interpretation "abbreviation (term)" + 'SnAbbr a T1 T2 = (TPair (Bind2 a Abbr) T1 T2). + +interpretation "positive abbreviation (term)" + 'SnAbbrPos T1 T2 = (TPair (Bind2 true Abbr) T1 T2). + +interpretation "negative abbreviation (term)" + 'SnAbbrNeg T1 T2 = (TPair (Bind2 false Abbr) T1 T2). + +interpretation "abstraction (term)" + 'SnAbst a T1 T2 = (TPair (Bind2 a Abst) T1 T2). + +interpretation "positive abstraction (term)" + 'SnAbstPos T1 T2 = (TPair (Bind2 true Abst) T1 T2). + +interpretation "negative abstraction (term)" + 'SnAbstNeg T1 T2 = (TPair (Bind2 false Abst) T1 T2). + +interpretation "application (term)" + 'SnAppl T1 T2 = (TPair (Flat2 Appl) T1 T2). + +interpretation "native type annotation (term)" + 'SnCast T1 T2 = (TPair (Flat2 Cast) T1 T2). + +(* Basic properties *********************************************************) + +(* Basic_1: was: term_dec *) +lemma eq_term_dec: ∀T1,T2:term. Decidable (T1 = T2). +#T1 elim T1 -T1 #I1 [| #V1 #T1 #IHV1 #IHT1 ] * #I2 [2,4: #V2 #T2 ] +[1,4: @or_intror #H destruct +| elim (eq_item2_dec I1 I2) #HI + [ elim (IHV1 V2) -IHV1 #HV + [ elim (IHT1 T2) -IHT1 /2 width=1 by or_introl/ #HT ] + ] + @or_intror #H destruct /2 width=1 by/ +| elim (eq_item0_dec I1 I2) /2 width=1 by or_introl/ #HI + @or_intror #H destruct /2 width=1 by/ +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact destruct_tatom_tatom_aux: ∀I1,I2. ⓪{I1} = ⓪{I2} → I1 = I2. +#I1 #I2 #H destruct // +qed-. + +fact destruct_tpair_tpair_aux: ∀I1,I2,T1,T2,V1,V2. ②{I1}T1.V1 = ②{I2}T2.V2 → + ∧∧T1 = T2 & I1 = I2 & V1 = V2. +#I1 #I2 #T1 #T2 #V1 #V2 #H destruct /2 width=1 by and3_intro/ +qed-. + +lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → ⊥. +#I #T #V elim V -V +[ #J #H destruct +| #J #W #U #IHW #_ #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +(* Basic_1: was: thead_x_y_y *) +lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → ⊥. +#I #V #T elim T -T +[ #J #H destruct +| #J #W #U #_ #IHU #H elim (destruct_tpair_tpair_aux … H) -H /2 width=1 by/ (**) (* destruct lemma needed *) +] +qed-. + +lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2. + (②{I} V1. T1 = ②{I} V2. T2 → ⊥) → + (V1 = V2 → ⊥) ∨ (V1 = V2 ∧ (T1 = T2 → ⊥)). +#I #V1 #T1 #V2 #T2 #H +elim (eq_term_dec V1 V2) /3 width=1 by or_introl/ #HV12 destruct +@or_intror @conj // #HT12 destruct /2 width=1 by/ +qed-. + +lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2. + (②{I} V1. T1 = ②{I} V2. T2 → ⊥) → + (T1 = T2 → ⊥) ∨ (T1 = T2 ∧ (V1 = V2 → ⊥)). +#I #V1 #T1 #V2 #T2 #H +elim (eq_term_dec T1 T2) /3 width=1 by or_introl/ #HT12 destruct +@or_intror @conj // #HT12 destruct /2 width=1 by/ +qed-. + +(* Basic_1: removed theorems 3: + not_void_abst not_abbr_void not_abst_void +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_simple.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_simple.ma new file mode 100644 index 000000000..434aea6cc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_simple.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/simple_1.ma". +include "basic_2A/grammar/term.ma". + +(* SIMPLE (NEUTRAL) TERMS ***************************************************) + +inductive simple: predicate term ≝ + | simple_atom: ∀I. simple (⓪{I}) + | simple_flat: ∀I,V,T. simple (ⓕ{I} V. T) +. + +interpretation "simple (term)" 'Simple T = (simple T). + +(* Basic inversion lemmas ***************************************************) + +fact simple_inv_bind_aux: ∀T. 𝐒⦃T⦄ → ∀a,J,W,U. T = ⓑ{a,J} W. U → ⊥. +#T * -T +[ #I #a #J #W #U #H destruct +| #I #V #T #a #J #W #U #H destruct +] +qed. + +lemma simple_inv_bind: ∀a,I,V,T. 𝐒⦃ⓑ{a,I} V. T⦄ → ⊥. +/2 width=7 by simple_inv_bind_aux/ qed-. + +lemma simple_inv_pair: ∀I,V,T. 𝐒⦃②{I}V.T⦄ → ∃J. I = Flat2 J. +* /2 width=2 by ex_intro/ #a #I #V #T #H +elim (simple_inv_bind … H) +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_vector.ma new file mode 100644 index 000000000..f6b163371 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_vector.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/lib/list.ma". +include "basic_2A/notation/functions/snapplvector_2.ma". +include "basic_2A/grammar/term_simple.ma". + +(* TERMS ********************************************************************) + +let rec applv Vs T on Vs ≝ + match Vs with + [ nil ⇒ T + | cons hd tl ⇒ ⓐhd. (applv tl T) + ]. + +interpretation "application to vector (term)" + 'SnApplVector Vs T = (applv Vs T). + +(* properties concerning simple terms ***************************************) + +lemma applv_simple: ∀T,Vs. 𝐒⦃T⦄ → 𝐒⦃ⒶVs.T⦄. +#T * // +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_weight.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_weight.ma new file mode 100644 index 000000000..0bedc4ee0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/term_weight.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/functions/weight_1.ma". +include "basic_2A/grammar/term.ma". + +(* WEIGHT OF A TERM *********************************************************) + +let rec tw T ≝ match T with +[ TAtom _ ⇒ 1 +| TPair _ V T ⇒ tw V + tw T + 1 +]. + +interpretation "weight (term)" 'Weight T = (tw T). + +(* Basic properties *********************************************************) + +(* Basic_1: was: tweight_lt *) +lemma tw_pos: ∀T. 1 ≤ ♯{T}. +#T elim T -T // +qed. + +(* Basic_1: removed theorems 11: + wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O + weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind +*) +(* Basic_1: removed local theorems 1: q_ind *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts.ma new file mode 100644 index 000000000..80311fe76 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts.ma @@ -0,0 +1,108 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/topiso_2.ma". +include "basic_2A/grammar/term_simple.ma". + +(* SAME TOP TERM STRUCTURE **************************************************) + +inductive tsts: relation term ≝ + | tsts_atom: ∀I. tsts (⓪{I}) (⓪{I}) + | tsts_pair: ∀I,V1,V2,T1,T2. tsts (②{I}V1.T1) (②{I}V2.T2) +. + +interpretation "same top structure (term)" 'TopIso T1 T2 = (tsts T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact tsts_inv_atom1_aux: ∀T1,T2. T1 ≂ T2 → ∀I. T1 = ⓪{I} → T2 = ⓪{I}. +#T1 #T2 * -T1 -T2 // +#J #V1 #V2 #T1 #T2 #I #H destruct +qed-. + +(* Basic_1: was: iso_gen_sort iso_gen_lref *) +lemma tsts_inv_atom1: ∀I,T2. ⓪{I} ≂ T2 → T2 = ⓪{I}. +/2 width=3 by tsts_inv_atom1_aux/ qed-. + +fact tsts_inv_pair1_aux: ∀T1,T2. T1 ≂ T2 → ∀I,W1,U1. T1 = ②{I}W1.U1 → + ∃∃W2,U2. T2 = ②{I}W2. U2. +#T1 #T2 * -T1 -T2 +[ #J #I #W1 #U1 #H destruct +| #J #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/ +] +qed-. + +(* Basic_1: was: iso_gen_head *) +lemma tsts_inv_pair1: ∀I,W1,U1,T2. ②{I}W1.U1 ≂ T2 → + ∃∃W2,U2. T2 = ②{I}W2. U2. +/2 width=5 by tsts_inv_pair1_aux/ qed-. + +fact tsts_inv_atom2_aux: ∀T1,T2. T1 ≂ T2 → ∀I. T2 = ⓪{I} → T1 = ⓪{I}. +#T1 #T2 * -T1 -T2 // +#J #V1 #V2 #T1 #T2 #I #H destruct +qed-. + +lemma tsts_inv_atom2: ∀I,T1. T1 ≂ ⓪{I} → T1 = ⓪{I}. +/2 width=3 by tsts_inv_atom2_aux/ qed-. + +fact tsts_inv_pair2_aux: ∀T1,T2. T1 ≂ T2 → ∀I,W2,U2. T2 = ②{I}W2.U2 → + ∃∃W1,U1. T1 = ②{I}W1.U1. +#T1 #T2 * -T1 -T2 +[ #J #I #W2 #U2 #H destruct +| #J #V1 #V2 #T1 #T2 #I #W2 #U2 #H destruct /2 width=3 by ex1_2_intro/ +] +qed-. + +lemma tsts_inv_pair2: ∀I,T1,W2,U2. T1 ≂ ②{I}W2.U2 → + ∃∃W1,U1. T1 = ②{I}W1.U1. +/2 width=5 by tsts_inv_pair2_aux/ qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: iso_refl *) +lemma tsts_refl: reflexive … tsts. +#T elim T -T // +qed. + +lemma tsts_sym: symmetric … tsts. +#T1 #T2 #H elim H -T1 -T2 // +qed-. + +lemma tsts_dec: ∀T1,T2. Decidable (T1 ≂ T2). +* #I1 [2: #V1 #T1 ] * #I2 [2,4: #V2 #T2 ] +[ elim (eq_item2_dec I1 I2) #HI12 + [ destruct /2 width=1 by tsts_pair, or_introl/ + | @or_intror #H + elim (tsts_inv_pair1 … H) -H #V #T #H destruct /2 width=1 by/ + ] +| @or_intror #H + lapply (tsts_inv_atom1 … H) -H #H destruct +| @or_intror #H + lapply (tsts_inv_atom2 … H) -H #H destruct +| elim (eq_item0_dec I1 I2) #HI12 + [ destruct /2 width=1 by or_introl/ + | @or_intror #H + lapply (tsts_inv_atom2 … H) -H #H destruct /2 width=1 by/ + ] +] +qed. + +lemma simple_tsts_repl_dx: ∀T1,T2. T1 ≂ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. +#T1 #T2 * -T1 -T2 // +#I #V1 #V2 #T1 #T2 #H +elim (simple_inv_pair … H) -H #J #H destruct // +qed-. + +lemma simple_tsts_repl_sn: ∀T1,T2. T1 ≂ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. +/3 width=3 by simple_tsts_repl_dx, tsts_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_tsts.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_tsts.ma new file mode 100644 index 000000000..50f829171 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_tsts.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/tsts.ma". + +(* SAME TOP TERM STRUCTURE **************************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: iso_trans *) +theorem tsts_trans: Transitive … tsts. +#T1 #T * -T1 -T // +#I #V1 #V #T1 #T #X #H +elim (tsts_inv_pair1 … H) -H #V2 #T2 #H destruct // +qed-. + +theorem tsts_canc_sn: ∀T,T1. T ≂ T1 → ∀T2. T ≂ T2 → T1 ≂ T2. +/3 width=3 by tsts_trans, tsts_sym/ qed-. + +theorem tsts_canc_dx: ∀T1,T. T1 ≂ T → ∀T2. T2 ≂ T → T1 ≂ T2. +/3 width=3 by tsts_trans, tsts_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_vector.ma new file mode 100644 index 000000000..c53a56dd6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/grammar/tsts_vector.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/term_vector.ma". +include "basic_2A/grammar/tsts.ma". + +(* SAME TOP TERM STRUCTURE **************************************************) + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *) +lemma tsts_inv_bind_applv_simple: ∀a,I,Vs,V2,T1,T2. ⒶVs.T1 ≂ ⓑ{a,I} V2. T2 → + 𝐒⦃T1⦄ → ⊥. +#a #I #Vs #V2 #T1 #T2 #H +elim (tsts_inv_pair2 … H) -H #V0 #T0 +elim Vs -Vs normalize +[ #H destruct #H /2 width=5 by simple_inv_bind/ +| #V #Vs #_ #H destruct +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys.ma new file mode 100644 index 000000000..6f3f953f9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys.ma @@ -0,0 +1,166 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/psubststar_6.ma". +include "basic_2A/substitution/cpy.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +definition cpys: ynat → ynat → relation4 genv lenv term term ≝ + λl,m,G. LTC … (cpy l m G). + +interpretation "context-sensitive extended multiple substritution (term)" + 'PSubstStar G L T1 l m T2 = (cpys l m G L T1 T2). + +(* Basic eliminators ********************************************************) + +lemma cpys_ind: ∀G,L,T1,l,m. ∀R:predicate term. R T1 → + (∀T,T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T → ⦃G, L⦄ ⊢ T ▶[l, m] T2 → R T → R T2) → + ∀T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R T2. +#G #L #T1 #l #m #R #HT1 #IHT1 #T2 #HT12 +@(TC_star_ind … HT1 IHT1 … HT12) // +qed-. + +lemma cpys_ind_dx: ∀G,L,T2,l,m. ∀R:predicate term. R T2 → + (∀T1,T. ⦃G, L⦄ ⊢ T1 ▶[l, m] T → ⦃G, L⦄ ⊢ T ▶*[l, m] T2 → R T → R T1) → + ∀T1. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R T1. +#G #L #T2 #l #m #R #HT2 #IHT2 #T1 #HT12 +@(TC_star_ind_dx … HT2 IHT2 … HT12) // +qed-. + +(* Basic properties *********************************************************) + +lemma cpy_cpys: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +/2 width=1 by inj/ qed. + +lemma cpys_strap1: ∀G,L,T1,T,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T → ⦃G, L⦄ ⊢ T ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +normalize /2 width=3 by step/ qed-. + +lemma cpys_strap2: ∀G,L,T1,T,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶[l, m] T → ⦃G, L⦄ ⊢ T ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +normalize /2 width=3 by TC_strap/ qed-. + +lemma lsuby_cpys_trans: ∀G,l,m. lsub_trans … (cpys l m G) (lsuby l m). +/3 width=5 by lsuby_cpy_trans, LTC_lsub_trans/ +qed-. + +lemma cpys_refl: ∀G,L,l,m. reflexive … (cpys l m G L). +/2 width=1 by cpy_cpys/ qed. + +lemma cpys_bind: ∀G,L,V1,V2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ∀I,T1,T2. ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯l, m] T2 → + ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[l, m] ⓑ{a,I}V2.T2. +#G #L #V1 #V2 #l #m #HV12 @(cpys_ind … HV12) -V2 +[ #I #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_bind/ +| /3 width=5 by cpys_strap1, cpy_bind/ +] +qed. + +lemma cpys_flat: ∀G,L,V1,V2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ∀T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → + ∀I. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[l, m] ⓕ{I}V2.T2. +#G #L #V1 #V2 #l #m #HV12 @(cpys_ind … HV12) -V2 +[ #T1 #T2 #HT12 @(cpys_ind … HT12) -T2 /3 width=5 by cpys_strap1, cpy_flat/ +| /3 width=5 by cpys_strap1, cpy_flat/ +qed. + +lemma cpys_weak: ∀G,L,T1,T2,l1,m1. ⦃G, L⦄ ⊢ T1 ▶*[l1, m1] T2 → + ∀l2,m2. l2 ≤ l1 → l1 + m1 ≤ l2 + m2 → + ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T2. +#G #L #T1 #T2 #l1 #m1 #H #l1 #l2 #Hl21 #Hlm12 @(cpys_ind … H) -T2 +/3 width=7 by cpys_strap1, cpy_weak/ +qed-. + +lemma cpys_weak_top: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, |L| - l] T2. +#G #L #T1 #T2 #l #m #H @(cpys_ind … H) -T2 +/3 width=4 by cpys_strap1, cpy_weak_top/ +qed-. + +lemma cpys_weak_full: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[0, |L|] T2. +#G #L #T1 #T2 #l #m #H @(cpys_ind … H) -T2 +/3 width=5 by cpys_strap1, cpy_weak_full/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cpys_fwd_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀T1,l,m. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → l + m ≤ lt + mt → + ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶*[l+m, lt+mt-(l+m)] U2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #T1 #l #m #HTU1 #Hllt #Hlmlmt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HU1 #HTU + elim (cpy_fwd_up … HU2 … HTU) -HU2 -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_fwd_tw: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ♯{T1} ≤ ♯{T2}. +#G #L #T1 #T2 #l #m #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 lapply (cpy_fwd_tw … HT2) -HT2 +/2 width=3 by transitive_le/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +(* Note: this can be derived from cpys_inv_atom1 *) +lemma cpys_inv_sort1: ∀G,L,T2,k,l,m. ⦃G, L⦄ ⊢ ⋆k ▶*[l, m] T2 → T2 = ⋆k. +#G #L #T2 #k #l #m #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 destruct +>(cpy_inv_sort1 … HT2) -HT2 // +qed-. + +(* Note: this can be derived from cpys_inv_atom1 *) +lemma cpys_inv_gref1: ∀G,L,T2,p,l,m. ⦃G, L⦄ ⊢ §p ▶*[l, m] T2 → T2 = §p. +#G #L #T2 #p #l #m #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 destruct +>(cpy_inv_gref1 … HT2) -HT2 // +qed-. + +lemma cpys_inv_bind1: ∀a,I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ▶*[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 & + ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯l, m] T2 & + U2 = ⓑ{a,I}V2.T2. +#a #I #G #L #V1 #T1 #U2 #l #m #H @(cpys_ind … H) -U2 +[ /2 width=5 by ex3_2_intro/ +| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct + elim (cpy_inv_bind1 … HU2) -HU2 #V2 #T2 #HV2 #HT2 #H + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V1) ?) -HT2 + /3 width=5 by cpys_strap1, lsuby_succ, ex3_2_intro/ +] +qed-. + +lemma cpys_inv_flat1: ∀I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓕ{I}V1.T1 ▶*[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 & ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 & + U2 = ⓕ{I}V2.T2. +#I #G #L #V1 #T1 #U2 #l #m #H @(cpys_ind … H) -U2 +[ /2 width=5 by ex3_2_intro/ +| #U #U2 #_ #HU2 * #V #T #HV1 #HT1 #H destruct + elim (cpy_inv_flat1 … HU2) -HU2 + /3 width=5 by cpys_strap1, ex3_2_intro/ +] +qed-. + +lemma cpys_inv_refl_O2: ∀G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▶*[l, 0] T2 → T1 = T2. +#G #L #T1 #T2 #l #H @(cpys_ind … H) -T2 // +#T #T2 #_ #HT2 #IHT1 <(cpy_inv_refl_O2 … HT2) -HT2 // +qed-. + +lemma cpys_inv_lift1_eq: ∀G,L,U1,U2. ∀l,m:nat. + ⦃G, L⦄ ⊢ U1 ▶*[l, m] U2 → ∀T1. ⬆[l, m] T1 ≡ U1 → U1 = U2. +#G #L #U1 #U2 #l #m #H #T1 #HTU1 @(cpys_ind … H) -U2 +/2 width=7 by cpy_inv_lift1_eq/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_alt.ma new file mode 100644 index 000000000..7d1274a91 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_alt.ma @@ -0,0 +1,102 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/psubststaralt_6.ma". +include "basic_2A/multiple/cpys_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +(* alternative definition of cpys *) +inductive cpysa: ynat → ynat → relation4 genv lenv term term ≝ +| cpysa_atom : ∀I,G,L,l,m. cpysa l m G L (⓪{I}) (⓪{I}) +| cpysa_subst: ∀I,G,L,K,V1,V2,W2,i,l,m. l ≤ yinj i → i < l+m → + ⬇[i] L ≡ K.ⓑ{I}V1 → cpysa 0 (⫰(l+m-i)) G K V1 V2 → + ⬆[0, i+1] V2 ≡ W2 → cpysa l m G L (#i) W2 +| cpysa_bind : ∀a,I,G,L,V1,V2,T1,T2,l,m. + cpysa l m G L V1 V2 → cpysa (⫯l) m G (L.ⓑ{I}V1) T1 T2 → + cpysa l m G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) +| cpysa_flat : ∀I,G,L,V1,V2,T1,T2,l,m. + cpysa l m G L V1 V2 → cpysa l m G L T1 T2 → + cpysa l m G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) +. + +interpretation + "context-sensitive extended multiple substritution (term) alternative" + 'PSubstStarAlt G L T1 l m T2 = (cpysa l m G L T1 T2). + +(* Basic properties *********************************************************) + +lemma lsuby_cpysa_trans: ∀G,l,m. lsub_trans … (cpysa l m G) (lsuby l m). +#G #l #m #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -l -m +[ // +| #I #G #L1 #K1 #V1 #V2 #W2 #i #l #m #Hli #Hilm #HLK1 #_ #HVW2 #IHV12 #L2 #HL12 + elim (lsuby_drop_trans_be … HL12 … HLK1) -HL12 -HLK1 /3 width=7 by cpysa_subst/ +| /4 width=1 by lsuby_succ, cpysa_bind/ +| /3 width=1 by cpysa_flat/ +] +qed-. + +lemma cpysa_refl: ∀G,T,L,l,m. ⦃G, L⦄ ⊢ T ▶▶*[l, m] T. +#G #T elim T -T // +#I elim I -I /2 width=1 by cpysa_bind, cpysa_flat/ +qed. + +lemma cpysa_cpy_trans: ∀G,L,T1,T,l,m. ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T → + ∀T2. ⦃G, L⦄ ⊢ T ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T2. +#G #L #T1 #T #l #m #H elim H -G -L -T1 -T -l -m +[ #I #G #L #l #m #X #H + elim (cpy_inv_atom1 … H) -H // * /2 width=7 by cpysa_subst/ +| #I #G #L #K #V1 #V2 #W2 #i #l #m #Hli #Hilm #HLK #_ #HVW2 #IHV12 #T2 #H + lapply (drop_fwd_drop2 … HLK) #H0LK + lapply (cpy_weak … H 0 (l+m) ? ?) -H // #H + elim (cpy_inv_lift1_be … H … H0LK … HVW2) -H -H0LK -HVW2 + /3 width=7 by cpysa_subst, ylt_fwd_le_succ/ +| #a #I #G #L #V1 #V #T1 #T #l #m #_ #_ #IHV1 #IHT1 #X #H + elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct + /5 width=5 by cpysa_bind, lsuby_cpy_trans, lsuby_succ/ +| #I #G #L #V1 #V #T1 #T #l #m #_ #_ #IHV1 #IHT1 #X #H + elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV2 #HT2 #H destruct /3 width=1 by cpysa_flat/ +] +qed-. + +lemma cpys_cpysa: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T2. +/3 width=8 by cpysa_cpy_trans, cpys_ind/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma cpysa_inv_cpys: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶▶*[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +/2 width=7 by cpys_subst, cpys_flat, cpys_bind, cpy_cpys/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma cpys_ind_alt: ∀R:ynat→ynat→relation4 genv lenv term term. + (∀I,G,L,l,m. R l m G L (⓪{I}) (⓪{I})) → + (∀I,G,L,K,V1,V2,W2,i,l,m. l ≤ yinj i → i < l + m → + ⬇[i] L ≡ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(l+m-i)] V2 → + ⬆[O, i+1] V2 ≡ W2 → R O (⫰(l+m-i)) G K V1 V2 → R l m G L (#i) W2 + ) → + (∀a,I,G,L,V1,V2,T1,T2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯l, m] T2 → R l m G L V1 V2 → + R (⫯l) m G (L.ⓑ{I}V1) T1 T2 → R l m G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) + ) → + (∀I,G,L,V1,V2,T1,T2,l,m. ⦃G, L⦄ ⊢ V1 ▶*[l, m] V2 → + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R l m G L V1 V2 → + R l m G L T1 T2 → R l m G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) + ) → + ∀l,m,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → R l m G L T1 T2. +#R #H1 #H2 #H3 #H4 #l #m #G #L #T1 #T2 #H elim (cpys_cpysa … H) -G -L -T1 -T2 -l -m +/3 width=8 by cpysa_inv_cpys/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_cpys.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_cpys.ma new file mode 100644 index 000000000..a01999d3f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_cpys.ma @@ -0,0 +1,117 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/cpy_cpy.ma". +include "basic_2A/multiple/cpys_alt.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +(* Advanced inversion lemmas ************************************************) + +lemma cpys_inv_SO2: ∀G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▶*[l, 1] T2 → ⦃G, L⦄ ⊢ T1 ▶[l, 1] T2. +#G #L #T1 #T2 #l #H @(cpys_ind … H) -T2 /2 width=3 by cpy_trans_ge/ +qed-. + +(* Advanced properties ******************************************************) + +lemma cpys_strip_eq: ∀G,L,T0,T1,l1,m1. ⦃G, L⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_eq, TC_strip1/ qed-. + +lemma cpys_strip_neq: ∀G,L1,T0,T1,l1,m1. ⦃G, L1⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀L2,T2,l2,m2. ⦃G, L2⦄ ⊢ T0 ▶[l2, m2] T2 → + (l1 + m1 ≤ l2 ∨ l2 + m2 ≤ l1) → + ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L1⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_neq, TC_strip1/ qed-. + +lemma cpys_strap1_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶*[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T ▶*[l1, m1] T2. +normalize /3 width=3 by cpy_trans_down, TC_strap1/ qed. + +lemma cpys_strap2_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶*[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L⦄ ⊢ T ▶[l1, m1] T2. +normalize /3 width=3 by cpy_trans_down, TC_strap2/ qed-. + +lemma cpys_split_up: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2 → + ∀i. l ≤ i → i ≤ l + m → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l, i - l] T & ⦃G, L⦄ ⊢ T ▶*[i, l + m - i] T2. +#G #L #T1 #T2 #l #m #H #i #Hli #Hilm @(cpys_ind … H) -T2 +[ /2 width=3 by ex2_intro/ +| #T #T2 #_ #HT12 * #T3 #HT13 #HT3 + elim (cpy_split_up … HT12 … Hilm) -HT12 -Hilm #T0 #HT0 #HT02 + elim (cpys_strap1_down … HT3 … HT0) -T /3 width=5 by cpys_strap1, ex2_intro/ + >ymax_pre_sn_comm // +] +qed-. + +lemma cpys_inv_lift1_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → lt ≤ yinj l + m → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[l, lt + mt - (yinj l + m)] T2 & + ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hllt #Hltlm #Hlmlmt +elim (cpys_split_up … HU12 (l + m)) -HU12 // -Hlmlmt #U #HU1 #HU2 +lapply (cpys_weak … HU1 l m ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hllt -Hltlm #HU1 +lapply (cpys_inv_lift1_eq … HU1 … HTU1) -HU1 #HU1 destruct +elim (cpys_inv_lift1_ge … HU2 … HLK … HTU1) -HU2 -HLK -HTU1 // +>yplus_minus_inj /2 width=3 by ex2_intro/ +qed-. + +(* Main properties **********************************************************) + +theorem cpys_conf_eq: ∀G,L,T0,T1,l1,m1. ⦃G, L⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶*[l2, m2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_eq, TC_confluent2/ qed-. + +theorem cpys_conf_neq: ∀G,L1,T0,T1,l1,m1. ⦃G, L1⦄ ⊢ T0 ▶*[l1, m1] T1 → + ∀L2,T2,l2,m2. ⦃G, L2⦄ ⊢ T0 ▶*[l2, m2] T2 → + (l1 + m1 ≤ l2 ∨ l2 + m2 ≤ l1) → + ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L1⦄ ⊢ T2 ▶*[l1, m1] T. +normalize /3 width=3 by cpy_conf_neq, TC_confluent2/ qed-. + +theorem cpys_trans_eq: ∀G,L,T1,T,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T → ⦃G, L⦄ ⊢ T ▶*[l, m] T2 → + ⦃G, L⦄ ⊢ T1 ▶*[l, m] T2. +normalize /2 width=3 by trans_TC/ qed-. + +theorem cpys_trans_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶*[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶*[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶*[l2, m2] T & ⦃G, L⦄ ⊢ T ▶*[l1, m1] T2. +normalize /3 width=3 by cpy_trans_down, TC_transitive2/ qed-. + +theorem cpys_antisym_eq: ∀G,L1,T1,T2,l,m. ⦃G, L1⦄ ⊢ T1 ▶*[l, m] T2 → + ∀L2. ⦃G, L2⦄ ⊢ T2 ▶*[l, m] T1 → T1 = T2. +#G #L1 #T1 #T2 #l #m #H @(cpys_ind_alt … H) -G -L1 -T1 -T2 // +[ #I1 #G #L1 #K1 #V1 #V2 #W2 #i #l #m #Hli #Hilm #_ #_ #HVW2 #_ #L2 #HW2 + elim (lt_or_ge (|L2|) (i+1)) #Hi [ -Hli -Hilm | ] + [ lapply (cpys_weak_full … HW2) -HW2 #HW2 + lapply (cpys_weak … HW2 0 (i+1) ? ?) -HW2 // + [ >yplus_O1 >yplus_O1 /3 width=1 by ylt_fwd_le, ylt_inj/ ] -Hi + #HW2 >(cpys_inv_lift1_eq … HW2) -HW2 // + | elim (drop_O1_le (Ⓕ) … Hi) -Hi #K2 #HLK2 + elim (cpys_inv_lift1_ge_up … HW2 … HLK2 … HVW2 ? ? ?) -HW2 -HLK2 -HVW2 + /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ -Hli -Hilm + #X #_ #H elim (lift_inv_lref2_be … H) -H // + ] +| #a #I #G #L1 #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_bind1 … H) -H + #V #T #HV2 #HT2 #H destruct + lapply (IHV12 … HV2) #H destruct -IHV12 -HV2 /3 width=2 by eq_f2/ +| #I #G #L1 #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #L2 #H elim (cpys_inv_flat1 … H) -H + #V #T #HV2 #HT2 #H destruct /3 width=2 by eq_f2/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_lift.ma new file mode 100644 index 000000000..d3f292a7f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/cpys_lift.ma @@ -0,0 +1,226 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/cpy_lift.ma". +include "basic_2A/multiple/cpys.ma". + +(* CONTEXT-SENSITIVE EXTENDED MULTIPLE SUBSTITUTION FOR TERMS ***************) + +(* Advanced properties ******************************************************) + +lemma cpys_subst: ∀I,G,L,K,V,U1,i,l,m. + l ≤ yinj i → i < l + m → + ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ⫰(l+m-i)] U1 → + ∀U2. ⬆[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[l, m] U2. +#I #G #L #K #V #U1 #i #l #m #Hli #Hilm #HLK #H @(cpys_ind … H) -U1 +[ /3 width=5 by cpy_cpys, cpy_subst/ +| #U #U1 #_ #HU1 #IHU #U2 #HU12 + elim (lift_total U 0 (i+1)) #U0 #HU0 + lapply (IHU … HU0) -IHU #H + lapply (drop_fwd_drop2 … HLK) -HLK #HLK + lapply (cpy_lift_ge … HU1 … HLK HU0 HU12 ?) -HU1 -HLK -HU0 -HU12 // #HU02 + lapply (cpy_weak … HU02 l m ? ?) -HU02 + [2,3: /2 width=3 by cpys_strap1, yle_succ_dx/ ] + >yplus_O1 ymax_pre_sn_comm /2 width=1 by ylt_fwd_le_succ/ +] +qed. + +lemma cpys_subst_Y2: ∀I,G,L,K,V,U1,i,l. + l ≤ yinj i → + ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ∞] U1 → + ∀U2. ⬆[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[l, ∞] U2. +#I #G #L #K #V #U1 #i #l #Hli #HLK #HVU1 #U2 #HU12 +@(cpys_subst … HLK … HU12) >yminus_Y_inj // +qed. + +(* Advanced inversion lemmas *************************************************) + +lemma cpys_inv_atom1: ∀I,G,L,T2,l,m. ⦃G, L⦄ ⊢ ⓪{I} ▶*[l, m] T2 → + T2 = ⓪{I} ∨ + ∃∃J,K,V1,V2,i. l ≤ yinj i & i < l + m & + ⬇[i] L ≡ K.ⓑ{J}V1 & + ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(l+m-i)] V2 & + ⬆[O, i+1] V2 ≡ T2 & + I = LRef i. +#I #G #L #T2 #l #m #H @(cpys_ind … H) -T2 +[ /2 width=1 by or_introl/ +| #T #T2 #_ #HT2 * + [ #H destruct + elim (cpy_inv_atom1 … HT2) -HT2 [ /2 width=1 by or_introl/ | * /3 width=11 by ex6_5_intro, or_intror/ ] + | * #J #K #V1 #V #i #Hli #Hilm #HLK #HV1 #HVT #HI + lapply (drop_fwd_drop2 … HLK) #H + elim (cpy_inv_lift1_ge_up … HT2 … H … HVT) -HT2 -H -HVT + [2,3,4: /2 width=1 by ylt_fwd_le_succ, yle_succ_dx/ ] + /4 width=11 by cpys_strap1, ex6_5_intro, or_intror/ + ] +] +qed-. + +lemma cpys_inv_lref1: ∀G,L,T2,i,l,m. ⦃G, L⦄ ⊢ #i ▶*[l, m] T2 → + T2 = #i ∨ + ∃∃I,K,V1,V2. l ≤ i & i < l + m & + ⬇[i] L ≡ K.ⓑ{I}V1 & + ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(l+m-i)] V2 & + ⬆[O, i+1] V2 ≡ T2. +#G #L #T2 #i #l #m #H elim (cpys_inv_atom1 … H) -H /2 width=1 by or_introl/ +* #I #K #V1 #V2 #j #Hlj #Hjlm #HLK #HV12 #HVT2 #H destruct /3 width=7 by ex5_4_intro, or_intror/ +qed-. + +lemma cpys_inv_lref1_Y2: ∀G,L,T2,i,l. ⦃G, L⦄ ⊢ #i ▶*[l, ∞] T2 → + T2 = #i ∨ + ∃∃I,K,V1,V2. l ≤ i & ⬇[i] L ≡ K.ⓑ{I}V1 & + ⦃G, K⦄ ⊢ V1 ▶*[0, ∞] V2 & ⬆[O, i+1] V2 ≡ T2. +#G #L #T2 #i #l #H elim (cpys_inv_lref1 … H) -H /2 width=1 by or_introl/ +* >yminus_Y_inj /3 width=7 by or_intror, ex4_4_intro/ +qed-. + +lemma cpys_inv_lref1_drop: ∀G,L,T2,i,l,m. ⦃G, L⦄ ⊢ #i ▶*[l, m] T2 → + ∀I,K,V1. ⬇[i] L ≡ K.ⓑ{I}V1 → + ∀V2. ⬆[O, i+1] V2 ≡ T2 → + ∧∧ ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(l+m-i)] V2 + & l ≤ i + & i < l + m. +#G #L #T2 #i #l #m #H #I #K #V1 #HLK #V2 #HVT2 elim (cpys_inv_lref1 … H) -H +[ #H destruct elim (lift_inv_lref2_be … HVT2) -HVT2 -HLK // +| * #Z #Y #X1 #X2 #Hli #Hilm #HLY #HX12 #HXT2 + lapply (lift_inj … HXT2 … HVT2) -T2 #H destruct + lapply (drop_mono … HLY … HLK) -L #H destruct + /2 width=1 by and3_intro/ +] +qed-. + +(* Properties on relocation *************************************************) + +lemma cpys_lift_le: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 → + ∀L,U1,s,l,m. lt + mt ≤ yinj l → ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ∀U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2. +#G #K #T1 #T2 #lt #mt #H #L #U1 #s #l #m #Hlmtl #HLK #HTU1 @(cpys_ind … H) -T2 +[ #U2 #H >(lift_mono … HTU1 … H) -H // +| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2 + elim (lift_total T l m) #U #HTU + lapply (IHT … HTU) -IHT #HU1 + lapply (cpy_lift_le … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/ +] +qed-. + +lemma cpys_lift_be: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 → + ∀L,U1,s,l,m. lt ≤ yinj l → l ≤ lt + mt → + ⬇[s, l, m] L ≡ K → ⬆[l, m] T1 ≡ U1 → + ∀U2. ⬆[l, m] T2 ≡ U2 → ⦃G, L⦄ ⊢ U1 ▶*[lt, mt + m] U2. +#G #K #T1 #T2 #lt #mt #H #L #U1 #s #l #m #Hltl #Hllmt #HLK #HTU1 @(cpys_ind … H) -T2 +[ #U2 #H >(lift_mono … HTU1 … H) -H // +| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2 + elim (lift_total T l m) #U #HTU + lapply (IHT … HTU) -IHT #HU1 + lapply (cpy_lift_be … HT2 … HLK HTU HTU2 ? ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/ +] +qed-. + +lemma cpys_lift_ge: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 → + ∀L,U1,s,l,m. yinj l ≤ lt → ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ∀U2. ⬆[l, m] T2 ≡ U2 → + ⦃G, L⦄ ⊢ U1 ▶*[lt+m, mt] U2. +#G #K #T1 #T2 #lt #mt #H #L #U1 #s #l #m #Hllt #HLK #HTU1 @(cpys_ind … H) -T2 +[ #U2 #H >(lift_mono … HTU1 … H) -H // +| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2 + elim (lift_total T l m) #U #HTU + lapply (IHT … HTU) -IHT #HU1 + lapply (cpy_lift_ge … HT2 … HLK HTU HTU2 ?) -HT2 -HLK -HTU -HTU2 /2 width=3 by cpys_strap1/ +] +qed-. + +(* Inversion lemmas for relocation ******************************************) + +lemma cpys_inv_lift1_le: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt + mt ≤ l → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hlmtl @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_le … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_be: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, mt - m] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hlmlmt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_be … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_ge: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + yinj l + m ≤ lt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt - m, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hlmlt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_ge … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +(* Advanced inversion lemmas on relocation **********************************) + +lemma cpys_inv_lift1_ge_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → lt ≤ yinj l + m → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[l, lt + mt - (yinj l + m)] T2 & + ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hllt #Hltlm #Hlmlmt @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_ge_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_be_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, l - lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hlmtlm @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_be_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_le_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶*[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → l ≤ lt + mt → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[lt, l - lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hllmt #Hlmtlm @(cpys_ind … H) -U2 +[ /2 width=3 by ex2_intro/ +| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU + elim (cpy_inv_lift1_le_up … HU2 … HLK … HTU) -HU2 -HLK -HTU /3 width=3 by cpys_strap1, ex2_intro/ +] +qed-. + +lemma cpys_inv_lift1_subst: ∀G,L,W1,W2,l,m. ⦃G, L⦄ ⊢ W1 ▶*[l, m] W2 → + ∀K,V1,i. ⬇[i+1] L ≡ K → ⬆[O, i+1] V1 ≡ W1 → + l ≤ yinj i → i < l + m → + ∃∃V2. ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(l+m-i)] V2 & ⬆[O, i+1] V2 ≡ W2. +#G #L #W1 #W2 #l #m #HW12 #K #V1 #i #HLK #HVW1 #Hli #Hilm +elim (cpys_inv_lift1_ge_up … HW12 … HLK … HVW1 ? ? ?) // +>yplus_O1 yplus_SO2 +[ >yminus_succ2 /2 width=3 by ex2_intro/ +| /2 width=1 by ylt_fwd_le_succ1/ +| /2 width=3 by yle_trans/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops.ma new file mode 100644 index 000000000..a86afce84 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops.ma @@ -0,0 +1,122 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rdropstar_3.ma". +include "basic_2A/notation/relations/rdropstar_4.ma". +include "basic_2A/substitution/drop.ma". +include "basic_2A/multiple/mr2_minus.ma". +include "basic_2A/multiple/lifts_vector.ma". + +(* ITERATED LOCAL ENVIRONMENT SLICING ***************************************) + +inductive drops (s:bool): list2 nat nat → relation lenv ≝ +| drops_nil : ∀L. drops s (◊) L L +| drops_cons: ∀L1,L,L2,cs,l,m. + drops s cs L1 L → ⬇[s, l, m] L ≡ L2 → drops s ({l, m} @ cs) L1 L2 +. + +interpretation "iterated slicing (local environment) abstract" + 'RDropStar s cs T1 T2 = (drops s cs T1 T2). +(* +interpretation "iterated slicing (local environment) general" + 'RDropStar des T1 T2 = (drops true des T1 T2). +*) + +definition d_liftable1: relation2 lenv term → predicate bool ≝ + λR,s. ∀K,T. R K T → ∀L,l,m. ⬇[s, l, m] L ≡ K → + ∀U. ⬆[l, m] T ≡ U → R L U. + +definition d_liftables1: relation2 lenv term → predicate bool ≝ + λR,s. ∀L,K,cs. ⬇*[s, cs] L ≡ K → + ∀T,U. ⬆*[cs] T ≡ U → R K T → R L U. + +definition d_liftables1_all: relation2 lenv term → predicate bool ≝ + λR,s. ∀L,K,cs. ⬇*[s, cs] L ≡ K → + ∀Ts,Us. ⬆*[cs] Ts ≡ Us → + all … (R K) Ts → all … (R L) Us. + +(* Basic inversion lemmas ***************************************************) + +fact drops_inv_nil_aux: ∀L1,L2,s,cs. ⬇*[s, cs] L1 ≡ L2 → cs = ◊ → L1 = L2. +#L1 #L2 #s #cs * -L1 -L2 -cs // +#L1 #L #L2 #l #m #cs #_ #_ #H destruct +qed-. + +(* Basic_1: was: drop1_gen_pnil *) +lemma drops_inv_nil: ∀L1,L2,s. ⬇*[s, ◊] L1 ≡ L2 → L1 = L2. +/2 width=4 by drops_inv_nil_aux/ qed-. + +fact drops_inv_cons_aux: ∀L1,L2,s,cs. ⬇*[s, cs] L1 ≡ L2 → + ∀l,m,tl. cs = {l, m} @ tl → + ∃∃L. ⬇*[s, tl] L1 ≡ L & ⬇[s, l, m] L ≡ L2. +#L1 #L2 #s #cs * -L1 -L2 -cs +[ #L #l #m #tl #H destruct +| #L1 #L #L2 #cs #l #m #HT1 #HT2 #l0 #m0 #tl #H destruct + /2 width=3 by ex2_intro/ +] +qed-. + +(* Basic_1: was: drop1_gen_pcons *) +lemma drops_inv_cons: ∀L1,L2,s,l,m,cs. ⬇*[s, {l, m} @ cs] L1 ≡ L2 → + ∃∃L. ⬇*[s, cs] L1 ≡ L & ⬇[s, l, m] L ≡ L2. +/2 width=3 by drops_inv_cons_aux/ qed-. + +lemma drops_inv_skip2: ∀I,s,cs,cs2,i. cs ▭ i ≡ cs2 → + ∀L1,K2,V2. ⬇*[s, cs2] L1 ≡ K2. ⓑ{I} V2 → + ∃∃K1,V1,cs1. cs + 1 ▭ i + 1 ≡ cs1 + 1 & + ⬇*[s, cs1] K1 ≡ K2 & + ⬆*[cs1] V2 ≡ V1 & + L1 = K1. ⓑ{I} V1. +#I #s #cs #cs2 #i #H elim H -cs -cs2 -i +[ #i #L1 #K2 #V2 #H + >(drops_inv_nil … H) -L1 /2 width=7 by lifts_nil, minuss_nil, ex4_3_intro, drops_nil/ +| #cs #cs2 #l #m #i #Hil #_ #IHcs2 #L1 #K2 #V2 #H + elim (drops_inv_cons … H) -H #L #HL1 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ #K #V >minus_plus #HK2 #HV2 #H destruct + elim (IHcs2 … HL1) -IHcs2 -HL1 #K1 #V1 #cs1 #Hcs1 #HK1 #HV1 #X destruct + @(ex4_3_intro … K1 V1 … ) // [3,4: /2 width=7 by lifts_cons, drops_cons/ | skip ] + normalize >plus_minus /3 width=1 by minuss_lt, lt_minus_to_plus/ (**) (* explicit constructors *) +| #cs #cs2 #l #m #i #Hil #_ #IHcs2 #L1 #K2 #V2 #H + elim (IHcs2 … H) -IHcs2 -H #K1 #V1 #cs1 #Hcs1 #HK1 #HV1 #X destruct + /4 width=7 by minuss_ge, ex4_3_intro, le_S_S/ +] +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: drop1_skip_bind *) +lemma drops_skip: ∀L1,L2,s,cs. ⬇*[s, cs] L1 ≡ L2 → ∀V1,V2. ⬆*[cs] V2 ≡ V1 → + ∀I. ⬇*[s, cs + 1] L1.ⓑ{I}V1 ≡ L2.ⓑ{I}V2. +#L1 #L2 #s #cs #H elim H -L1 -L2 -cs +[ #L #V1 #V2 #HV12 #I + >(lifts_inv_nil … HV12) -HV12 // +| #L1 #L #L2 #cs #l #m #_ #HL2 #IHL #V1 #V2 #H #I + elim (lifts_inv_cons … H) -H /3 width=5 by drop_skip, drops_cons/ +]. +qed. + +lemma d1_liftable_liftables: ∀R,s. d_liftable1 R s → d_liftables1 R s. +#R #s #HR #L #K #cs #H elim H -L -K -cs +[ #L #T #U #H #HT <(lifts_inv_nil … H) -H // +| #L1 #L #L2 #cs #l #m #_ #HL2 #IHL #T2 #T1 #H #HLT2 + elim (lifts_inv_cons … H) -H /3 width=10 by/ +] +qed. + +lemma d1_liftables_liftables_all: ∀R,s. d_liftables1 R s → d_liftables1_all R s. +#R #s #HR #L #K #cs #HLK #Ts #Us #H elim H -Ts -Us normalize // +#Ts #Us #T #U #HTU #_ #IHTUs * /3 width=7 by conj/ +qed. + +(* Basic_1: removed theorems 1: drop1_getl_trans *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drop.ma new file mode 100644 index 000000000..2e938ac75 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drop.ma @@ -0,0 +1,35 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/multiple/drops.ma". + +(* ITERATED LOCAL ENVIRONMENT SLICING ***************************************) + +(* Properties concerning basic local environment slicing ********************) + +lemma drops_drop_trans: ∀L1,L,cs. ⬇*[Ⓕ, cs] L1 ≡ L → ∀L2,i. ⬇[i] L ≡ L2 → + ∃∃L0,cs0,i0. ⬇[i0] L1 ≡ L0 & ⬇*[Ⓕ, cs0] L0 ≡ L2 & + @⦃i, cs⦄ ≡ i0 & cs ▭ i ≡ cs0. +#L1 #L #cs #H elim H -L1 -L -cs +[ /2 width=7 by drops_nil, minuss_nil, at_nil, ex4_3_intro/ +| #L1 #L0 #L #cs #l #m #_ #HL0 #IHL0 #L2 #i #HL2 + elim (lt_or_ge i l) #Hil + [ elim (drop_trans_le … HL0 … HL2) -L /2 width=2 by lt_to_le/ + #L #HL0 #HL2 elim (IHL0 … HL0) -L0 /3 width=7 by drops_cons, minuss_lt, at_lt, ex4_3_intro/ + | lapply (drop_trans_ge … HL0 … HL2 ?) -L // #HL02 + elim (IHL0 … HL02) -L0 /3 width=7 by minuss_ge, at_ge, ex4_3_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drops.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drops.ma new file mode 100644 index 000000000..03473dc91 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/drops_drops.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/drops_drop.ma". + +(* ITERATED LOCAL ENVIRONMENT SLICING ***************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: drop1_trans *) +theorem drops_trans: ∀L,L2,s,cs2. ⬇*[s, cs2] L ≡ L2 → ∀L1,cs1. ⬇*[s, cs1] L1 ≡ L → + ⬇*[s, cs2 @@ cs1] L1 ≡ L2. +#L #L2 #s #cs2 #H elim H -L -L2 -cs2 /3 width=3 by drops_cons/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq.ma new file mode 100644 index 000000000..cea4b650e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq.ma @@ -0,0 +1,43 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazyeq_7.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR CLOSURES ********************************************) + +inductive fleq (l) (G) (L1) (T): relation3 genv lenv term ≝ +| fleq_intro: ∀L2. L1 ≡[T, l] L2 → fleq l G L1 T G L2 T +. + +interpretation + "lazy equivalence (closure)" + 'LazyEq l G1 L1 T1 G2 L2 T2 = (fleq l G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fleq_refl: ∀l. tri_reflexive … (fleq l). +/2 width=1 by fleq_intro/ qed. + +lemma fleq_sym: ∀l. tri_symmetric … (fleq l). +#l #G1 #L1 #T1 #G2 #L2 #T2 * /3 width=1 by fleq_intro, lleq_sym/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma fleq_inv_gen: ∀G1,G2,L1,L2,T1,T2,l. ⦃G1, L1, T1⦄ ≡[l] ⦃G2, L2, T2⦄ → + ∧∧ G1 = G2 & L1 ≡[T1, l] L2 & T1 = T2. +#G1 #G2 #L1 #L2 #T1 #T2 #l * -G2 -L2 -T2 /2 width=1 by and3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq_fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq_fleq.ma new file mode 100644 index 000000000..de886f6a4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fleq_fleq.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/multiple/fleq.ma". + +(* LAZY EQUIVALENCE FOR CLOSURES *******************************************) + +(* Main properties **********************************************************) + +theorem fleq_trans: ∀l. tri_transitive … (fleq l). +#l #G1 #G #L1 #L #T1 #T * -G -L -T +#L #HT1 #G2 #L2 #T2 * -G2 -L2 -T2 +/3 width=3 by lleq_trans, fleq_intro/ +qed-. + +theorem fleq_canc_sn: ∀G,G1,G2,L,L1,L2,T,T1,T2,l. + ⦃G, L, T⦄ ≡[l] ⦃G1, L1, T1⦄→ ⦃G, L, T⦄ ≡[l] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≡[l] ⦃G2, L2, T2⦄. +/3 width=5 by fleq_trans, fleq_sym/ qed-. + +theorem fleq_canc_dx: ∀G1,G2,G,L1,L2,L,T1,T2,T,l. + ⦃G1, L1, T1⦄ ≡[l] ⦃G, L, T⦄ → ⦃G2, L2, T2⦄ ≡[l] ⦃G, L, T⦄ → ⦃G1, L1, T1⦄ ≡[l] ⦃G2, L2, T2⦄. +/3 width=5 by fleq_trans, fleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup.ma new file mode 100644 index 000000000..764ba3866 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermplus_6.ma". +include "basic_2A/substitution/fqu.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +definition fqup: tri_relation genv lenv term ≝ tri_TC … fqu. + +interpretation "plus-iterated structural successor (closure)" + 'SupTermPlus G1 L1 T1 G2 L2 T2 = (fqup G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fqu_fqup: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fqup_strap1: ∀G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ⊐+ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed. + +lemma fqup_strap2: ∀G1,G,G2,L1,L,L2,T1,T,T2. + ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed. + +lemma fqup_drop: ∀G1,G2,L1,K1,K2,T1,T2,U1,m. ⬇[m] L1 ≡ K1 → ⬆[0, m] T1 ≡ U1 → + ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+ ⦃G2, K2, T2⦄. +#G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 #m #HLK1 #HTU1 #HT12 elim (eq_or_gt … m) #H destruct +[ >(drop_inv_O2 … HLK1) -L1 <(lift_inv_O2 … HTU1) -U1 // +| /3 width=5 by fqup_strap2, fqu_drop_lt/ +] +qed-. + +lemma fqup_lref: ∀I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+ ⦃G, K, V⦄. +/3 width=6 by fqu_lref_O, fqu_fqup, lift_lref_ge, fqup_drop/ qed. + +lemma fqup_pair_sn: ∀I,G,L,V,T. ⦃G, L, ②{I}V.T⦄ ⊐+ ⦃G, L, V⦄. +/2 width=1 by fqu_pair_sn, fqu_fqup/ qed. + +lemma fqup_bind_dx: ∀a,I,G,L,V,T. ⦃G, L, ⓑ{a,I}V.T⦄ ⊐+ ⦃G, L.ⓑ{I}V, T⦄. +/2 width=1 by fqu_bind_dx, fqu_fqup/ qed. + +lemma fqup_flat_dx: ∀I,G,L,V,T. ⦃G, L, ⓕ{I}V.T⦄ ⊐+ ⦃G, L, T⦄. +/2 width=1 by fqu_flat_dx, fqu_fqup/ qed. + +lemma fqup_flat_dx_pair_sn: ∀I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.②{I2}V2.T⦄ ⊐+ ⦃G, L, V2⦄. +/2 width=5 by fqu_pair_sn, fqup_strap1/ qed. + +lemma fqup_bind_dx_flat_dx: ∀a,G,I1,I2,L,V1,V2,T. ⦃G, L, ⓑ{a,I1}V1.ⓕ{I2}V2.T⦄ ⊐+ ⦃G, L.ⓑ{I1}V1, T⦄. +/2 width=5 by fqu_flat_dx, fqup_strap1/ qed. + +lemma fqup_flat_dx_bind_dx: ∀a,I1,I2,G,L,V1,V2,T. ⦃G, L, ⓕ{I1}V1.ⓑ{a,I2}V2.T⦄ ⊐+ ⦃G, L.ⓑ{I2}V2, T⦄. +/2 width=5 by fqu_bind_dx, fqup_strap1/ qed. + +(* Basic eliminators ********************************************************) + +lemma fqup_ind: ∀G1,L1,T1. ∀R:relation3 …. + (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐ ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2. +#G1 #L1 #T1 #R #IH1 #IH2 #G2 #L2 #T2 #H +@(tri_TC_ind … IH1 IH2 G2 L2 T2 H) +qed-. + +lemma fqup_ind_dx: ∀G2,L2,T2. ∀R:relation3 …. + (∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → R G1 L1 T1) → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G1 L1 T1. +#G2 #L2 #T2 #R #IH1 #IH2 #G1 #L1 #T1 #H +@(tri_TC_ind_dx … IH1 IH2 G1 L1 T1 H) +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma fqup_fwd_fw: ∀G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=3 by fqu_fwd_fw, transitive_lt/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fqup_wf_ind: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=1 by fqup_fwd_fw/ +qed-. + +lemma fqup_wf_ind_eq: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + ∀G2,L2,T2. G1 = G2 → L1 = L2 → T1 = T2 → R G2 L2 T2 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=7 by fqup_fwd_fw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup_fqup.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup_fqup.ma new file mode 100644 index 000000000..642126fee --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqup_fqup.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqup.ma". + +(* PLUS-ITERATED SUPCLOSURE *************************************************) + +(* Main properties **********************************************************) + +theorem fqup_trans: tri_transitive … fqup. +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus.ma new file mode 100644 index 000000000..d99b4b971 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus.ma @@ -0,0 +1,83 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermstar_6.ma". +include "basic_2A/substitution/fquq.ma". +include "basic_2A/multiple/fqup.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +definition fqus: tri_relation genv lenv term ≝ tri_TC … fquq. + +interpretation "star-iterated structural successor (closure)" + 'SupTermStar G1 L1 T1 G2 L2 T2 = (fqus G1 L1 T1 G2 L2 T2). + +(* Basic eliminators ********************************************************) + +lemma fqus_ind: ∀G1,L1,T1. ∀R:relation3 …. R G1 L1 T1 → + (∀G,G2,L,L2,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐⸮ ⦃G2, L2, T2⦄ → R G L T → R G2 L2 T2) → + ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → R G2 L2 T2. +#G1 #L1 #T1 #R #IH1 #IH2 #G2 #L2 #T2 #H +@(tri_TC_star_ind … IH1 IH2 G2 L2 T2 H) // +qed-. + +lemma fqus_ind_dx: ∀G2,L2,T2. ∀R:relation3 …. R G2 L2 T2 → + (∀G1,G,L1,L,T1,T. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → R G L T → R G1 L1 T1) → + ∀G1,L1,T1. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → R G1 L1 T1. +#G2 #L2 #T2 #R #IH1 #IH2 #G1 #L1 #T1 #H +@(tri_TC_star_ind_dx … IH1 IH2 G1 L1 T1 H) // +qed-. + +(* Basic properties *********************************************************) + +lemma fqus_refl: tri_reflexive … fqus. +/2 width=1 by tri_inj/ qed. + +lemma fquq_fqus: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +/2 width=1 by tri_inj/ qed. + +lemma fqus_strap1: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +/2 width=5 by tri_step/ qed-. + +lemma fqus_strap2: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +/2 width=5 by tri_TC_strap/ qed-. + +lemma fqus_drop: ∀G1,G2,K1,K2,T1,T2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ → + ∀L1,U1,m. ⬇[m] L1 ≡ K1 → ⬆[0, m] T1 ≡ U1 → + ⦃G1, L1, U1⦄ ⊐* ⦃G2, K2, T2⦄. +#G1 #G2 #K1 #K2 #T1 #T2 #H @(fqus_ind … H) -G2 -K2 -T2 +/3 width=5 by fqus_strap1, fquq_fqus, fquq_drop/ +qed-. + +lemma fqup_fqus: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +/3 width=5 by fqus_strap1, fquq_fqus, fqu_fquq/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma fqus_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -L2 -T2 +/3 width=3 by fquq_fwd_fw, transitive_le/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma fqup_inv_step_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∃∃G,L,T. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ & ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1 /2 width=5 by ex2_3_intro/ +#G1 #G #L1 #L #T1 #T #H1 #_ * /4 width=9 by fqus_strap2, fqu_fquq, ex2_3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_alt.ma new file mode 100644 index 000000000..e9f707d1f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_alt.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/fquq_alt.ma". +include "basic_2A/multiple/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Advanced inversion lemmas ************************************************) + +lemma fqus_inv_gen: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqus_ind … H) -G2 -L2 -T2 // +#G #G2 #L #L2 #T #T2 #_ #H2 * elim (fquq_inv_gen … H2) -H2 +[ /3 width=5 by fqup_strap1, or_introl/ +| * #HG #HL #HT destruct /2 width=1 by or_introl/ +| #H2 * #HG #HL #HT destruct /3 width=1 by fqu_fqup, or_introl/ +| * #H1G #H1L #H1T * #H2G #H2L #H2T destruct /2 width=1 by or_intror/ +] +qed-. + +(* Advanced properties ******************************************************) + +lemma fqus_strap1_fqu: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_gen … H1) -H1 +[ /2 width=5 by fqup_strap1/ +| * #HG #HL #HT destruct /2 width=1 by fqu_fqup/ +] +qed-. + +lemma fqus_strap2_fqu: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 elim (fqus_inv_gen … H2) -H2 +[ /2 width=5 by fqup_strap2/ +| * #HG #HL #HT destruct /2 width=1 by fqu_fqup/ +] +qed-. + +lemma fqus_fqup_trans: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G, L, T⦄ → ⦃G, L, T⦄ ⊐+ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 #H2 @(fqup_ind … H2) -H2 -G2 -L2 -T2 +/2 width=5 by fqus_strap1_fqu, fqup_strap1/ +qed-. + +lemma fqup_fqus_trans: ∀G1,G,G2,L1,L,L2,T1,T,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G, L, T⦄ → + ⦃G, L, T⦄ ⊐* ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄. +#G1 #G #G2 #L1 #L #L2 #T1 #T #T2 #H1 @(fqup_ind_dx … H1) -H1 -G1 -L1 -T1 +/3 width=5 by fqus_strap2_fqu, fqup_strap2/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_fqus.ma new file mode 100644 index 000000000..b14bd7548 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/fqus_fqus.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus.ma". + +(* STAR-ITERATED SUPCLOSURE *************************************************) + +(* Main properties **********************************************************) + +theorem fqus_trans: tri_transitive … fqus. +/2 width=5 by tri_TC_transitive/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees.ma new file mode 100644 index 000000000..7a26437f6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees.ma @@ -0,0 +1,163 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". +include "basic_2A/notation/relations/freestar_4.ma". +include "basic_2A/substitution/lift_neg.ma". +include "basic_2A/substitution/drop.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +inductive frees: relation4 ynat lenv term nat ≝ +| frees_eq: ∀L,U,l,i. (∀T. ⬆[i, 1] T ≡ U → ⊥) → frees l L U i +| frees_be: ∀I,L,K,U,W,l,i,j. l ≤ yinj j → j < i → + (∀T. ⬆[j, 1] T ≡ U → ⊥) → ⬇[j]L ≡ K.ⓑ{I}W → + frees 0 K W (i-j-1) → frees l L U i. + +interpretation + "context-sensitive free variables (term)" + 'FreeStar L i l U = (frees l L U i). + +definition frees_trans: predicate (relation3 lenv term term) ≝ + λR. ∀L,U1,U2,i. R L U1 U2 → L ⊢ i ϵ 𝐅*[0]⦃U2⦄ → L ⊢ i ϵ 𝐅*[0]⦃U1⦄. + +(* Basic inversion lemmas ***************************************************) + +lemma frees_inv: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → + (∀T. ⬆[i, 1] T ≡ U → ⊥) ∨ + ∃∃I,K,W,j. l ≤ yinj j & j < i & (∀T. ⬆[j, 1] T ≡ U → ⊥) & + ⬇[j]L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄. +#L #U #l #i * -L -U -l -i /4 width=9 by ex5_4_intro, or_intror, or_introl/ +qed-. + +lemma frees_inv_sort: ∀L,l,i,k. L ⊢ i ϵ 𝐅*[l]⦃⋆k⦄ → ⊥. +#L #l #i #k #H elim (frees_inv … H) -H [|*] /2 width=2 by/ +qed-. + +lemma frees_inv_gref: ∀L,l,i,p. L ⊢ i ϵ 𝐅*[l]⦃§p⦄ → ⊥. +#L #l #i #p #H elim (frees_inv … H) -H [|*] /2 width=2 by/ +qed-. + +lemma frees_inv_lref: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → + j = i ∨ + ∃∃I,K,W. l ≤ yinj j & j < i & ⬇[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄. +#L #l #x #i #H elim (frees_inv … H) -H +[ /4 width=2 by nlift_inv_lref_be_SO, or_introl/ +| * #I #K #W #j #Hlj #Hji #Hnx #HLK #HW + >(nlift_inv_lref_be_SO … Hnx) -x /3 width=5 by ex4_3_intro, or_intror/ +] +qed-. + +lemma frees_inv_lref_free: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → |L| ≤ j → j = i. +#L #l #j #i #H #Hj elim (frees_inv_lref … H) -H // +* #I #K #W #_ #_ #HLK lapply (drop_fwd_length_lt2 … HLK) -I +#H elim (lt_refl_false j) /2 width=3 by lt_to_le_to_lt/ +qed-. + +lemma frees_inv_lref_skip: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → yinj j < l → j = i. +#L #l #j #i #H #Hjl elim (frees_inv_lref … H) -H // +* #I #K #W #Hlj elim (ylt_yle_false … Hlj) -Hlj // +qed-. + +lemma frees_inv_lref_ge: ∀L,l,j,i. L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → i ≤ j → j = i. +#L #l #j #i #H #Hij elim (frees_inv_lref … H) -H // +* #I #K #W #_ #Hji elim (lt_refl_false j) -I -L -K -W -l /2 width=3 by lt_to_le_to_lt/ +qed-. + +lemma frees_inv_lref_lt: ∀L,l,j,i.L ⊢ i ϵ 𝐅*[l]⦃#j⦄ → j < i → + ∃∃I,K,W. l ≤ yinj j & ⬇[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄. +#L #l #j #i #H #Hji elim (frees_inv_lref … H) -H +[ #H elim (lt_refl_false j) // +| * /2 width=5 by ex3_3_intro/ +] +qed-. + +lemma frees_inv_bind: ∀a,I,L,W,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃ⓑ{a,I}W.U⦄ → + L ⊢ i ϵ 𝐅*[l]⦃W⦄ ∨ L.ⓑ{I}W ⊢ i+1 ϵ 𝐅*[⫯l]⦃U⦄ . +#a #J #L #V #U #l #i #H elim (frees_inv … H) -H +[ #HnX elim (nlift_inv_bind … HnX) -HnX + /4 width=2 by frees_eq, or_intror, or_introl/ +| * #I #K #W #j #Hlj #Hji #HnX #HLK #HW elim (nlift_inv_bind … HnX) -HnX + [ /4 width=9 by frees_be, or_introl/ + | #HnT @or_intror @(frees_be … HnT) -HnT + [4,5,6: /2 width=1 by drop_drop, yle_succ, lt_minus_to_plus/ + |7: >minus_plus_plus_l // + |*: skip + ] + ] +] +qed-. + +lemma frees_inv_flat: ∀I,L,W,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃ⓕ{I}W.U⦄ → + L ⊢ i ϵ 𝐅*[l]⦃W⦄ ∨ L ⊢ i ϵ 𝐅*[l]⦃U⦄ . +#J #L #V #U #l #i #H elim (frees_inv … H) -H +[ #HnX elim (nlift_inv_flat … HnX) -HnX + /4 width=2 by frees_eq, or_intror, or_introl/ +| * #I #K #W #j #Hlj #Hji #HnX #HLK #HW elim (nlift_inv_flat … HnX) -HnX + /4 width=9 by frees_be, or_intror, or_introl/ +] +qed-. + +(* Basic properties *********************************************************) + +lemma frees_lref_eq: ∀L,l,i. L ⊢ i ϵ 𝐅*[l]⦃#i⦄. +/3 width=7 by frees_eq, lift_inv_lref2_be/ qed. + +lemma frees_lref_be: ∀I,L,K,W,l,i,j. l ≤ yinj j → j < i → ⬇[j]L ≡ K.ⓑ{I}W → + K ⊢ i-j-1 ϵ 𝐅*[0]⦃W⦄ → L ⊢ i ϵ 𝐅*[l]⦃#j⦄. +/3 width=9 by frees_be, lift_inv_lref2_be/ qed. + +lemma frees_bind_sn: ∀a,I,L,W,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃W⦄ → + L ⊢ i ϵ 𝐅*[l]⦃ⓑ{a,I}W.U⦄. +#a #I #L #W #U #l #i #H elim (frees_inv … H) -H [|*] +/4 width=9 by frees_be, frees_eq, nlift_bind_sn/ +qed. + +lemma frees_bind_dx: ∀a,I,L,W,U,l,i. L.ⓑ{I}W ⊢ i+1 ϵ 𝐅*[⫯l]⦃U⦄ → + L ⊢ i ϵ 𝐅*[l]⦃ⓑ{a,I}W.U⦄. +#a #J #L #V #U #l #i #H elim (frees_inv … H) -H +[ /4 width=9 by frees_eq, nlift_bind_dx/ +| * #I #K #W #j #Hlj #Hji #HnU #HLK #HW + elim (yle_inv_succ1 … Hlj) -Hlj (plus_minus_m_m j 1) in HnU; // (minus_plus_m_m (|K2|) 1) >H0 -H0 /2 width=1 by monotonic_le_minus_l2/ +] +qed. + +(* Inversion lemmas on append for local environments ************************) + +fact frees_inv_append_aux: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → ∀L1,L2. L = L1 @@ L2 → + i ≤ |L2| → L2 ⊢ i ϵ 𝐅*[l]⦃U⦄. +#L #U #l #i #H elim H -L -U -l -i /3 width=2 by frees_eq/ +#Z #L #Y #U #X #l #i #j #Hlj #Hji #HnU #HLY #_ #IHW #L1 #L2 #H #Hi destruct +elim (drop_O1_lt (Ⓕ) L2 j) [2: -Z -Y -L1 -X -U -l /2 width=3 by lt_to_le_to_lt/ ] +#I #K2 #W #HLK2 lapply (drop_fwd_length_minus2 … HLK2) normalize #H0 +lapply (drop_O1_inv_append1_le … HLY … HLK2) -HLY +[ -Z -I -Y -K2 -L1 -X -U -W -l /3 width=3 by lt_to_le, lt_to_le_to_lt/ +| normalize #H destruct + @(frees_be … HnU HLK2) -HnU -HLK2 // @IHW -IHW // + >(minus_plus_m_m (|K2|) 1) >H0 -H0 /2 width=1 by monotonic_le_minus_l2/ +] +qed-. + +lemma frees_inv_append: ∀L1,L2,U,l,i. L1 @@ L2 ⊢ i ϵ 𝐅*[l]⦃U⦄ → + i ≤ |L2| → L2 ⊢ i ϵ 𝐅*[l]⦃U⦄. +/2 width=4 by frees_inv_append_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lift.ma new file mode 100644 index 000000000..8a4fe4092 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lift.ma @@ -0,0 +1,160 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/multiple/frees.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +(* Advanced properties ******************************************************) + +lemma frees_dec: ∀L,U,l,i. Decidable (frees l L U i). +#L #U @(f2_ind … rfw … L U) -L -U +#x #IH #L * * +[ -IH /3 width=5 by frees_inv_sort, or_intror/ +| #j #Hx #l #i elim (lt_or_eq_or_gt i j) #Hji + [ -x @or_intror #H elim (lt_refl_false i) + lapply (frees_inv_lref_ge … H ?) -L -l /2 width=1 by lt_to_le/ + | -x /2 width=1 by or_introl/ + | elim (ylt_split j l) #Hli + [ -x @or_intror #H elim (lt_refl_false i) + lapply (frees_inv_lref_skip … H ?) -L // + | elim (lt_or_ge j (|L|)) #Hj + [ elim (drop_O1_lt (Ⓕ) L j) // -Hj #I #K #W #HLK destruct + elim (IH K W … 0 (i-j-1)) -IH [1,3: /3 width=5 by frees_lref_be, drop_fwd_rfw, or_introl/ ] #HnW + @or_intror #H elim (frees_inv_lref_lt … H) // #Z #Y #X #_ #HLY -l + lapply (drop_mono … HLY … HLK) -L #H destruct /2 width=1 by/ + | -x @or_intror #H elim (lt_refl_false i) + lapply (frees_inv_lref_free … H ?) -l // + ] + ] + ] +| -IH /3 width=5 by frees_inv_gref, or_intror/ +| #a #I #W #U #Hx #l #i destruct + elim (IH L W … l i) [1,3: /3 width=1 by frees_bind_sn, or_introl/ ] #HnW + elim (IH (L.ⓑ{I}W) U … (⫯l) (i+1)) -IH [1,3: /3 width=1 by frees_bind_dx, or_introl/ ] #HnU + @or_intror #H elim (frees_inv_bind … H) -H /2 width=1 by/ +| #I #W #U #Hx #l #i destruct + elim (IH L W … l i) [1,3: /3 width=1 by frees_flat_sn, or_introl/ ] #HnW + elim (IH L U … l i) -IH [1,3: /3 width=1 by frees_flat_dx, or_introl/ ] #HnU + @or_intror #H elim (frees_inv_flat … H) -H /2 width=1 by/ +] +qed-. + +lemma frees_S: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[yinj l]⦃U⦄ → ∀I,K,W. ⬇[l] L ≡ K.ⓑ{I}W → + (K ⊢ i-l-1 ϵ 𝐅*[0]⦃W⦄ → ⊥) → L ⊢ i ϵ 𝐅*[⫯l]⦃U⦄. +#L #U #l #i #H elim (frees_inv … H) -H /3 width=2 by frees_eq/ +* #I #K #W #j #Hlj #Hji #HnU #HLK #HW #I0 #K0 #W0 #HLK0 #HnW0 +lapply (yle_inv_inj … Hlj) -Hlj #Hlj +elim (le_to_or_lt_eq … Hlj) -Hlj +[ -I0 -K0 -W0 /3 width=9 by frees_be, yle_inj/ +| -Hji -HnU #H destruct + lapply (drop_mono … HLK0 … HLK) #H destruct -I + elim HnW0 -L -U -HnW0 // +] +qed. + +(* Note: lemma 1250 *) +lemma frees_bind_dx_O: ∀a,I,L,W,U,i. L.ⓑ{I}W ⊢ i+1 ϵ 𝐅*[0]⦃U⦄ → + L ⊢ i ϵ 𝐅*[0]⦃ⓑ{a,I}W.U⦄. +#a #I #L #W #U #i #HU elim (frees_dec L W 0 i) +/4 width=5 by frees_S, frees_bind_dx, frees_bind_sn/ +qed. + +(* Properties on relocation *************************************************) + +lemma frees_lift_ge: ∀K,T,l,i. K ⊢ i ϵ𝐅*[l]⦃T⦄ → + ∀L,s,l0,m0. ⬇[s, l0, m0] L ≡ K → + ∀U. ⬆[l0, m0] T ≡ U → l0 ≤ i → + L ⊢ i+m0 ϵ 𝐅*[l]⦃U⦄. +#K #T #l #i #H elim H -K -T -l -i +[ #K #T #l #i #HnT #L #s #l0 #m0 #_ #U #HTU #Hl0i -K -s + @frees_eq #X #HXU elim (lift_div_le … HTU … HXU) -U /2 width=2 by/ +| #I #K #K0 #T #V #l #i #j #Hlj #Hji #HnT #HK0 #HV #IHV #L #s #l0 #m0 #HLK #U #HTU #Hl0i + elim (lt_or_ge j l0) #H1 + [ elim (drop_trans_lt … HLK … HK0) // -K #L0 #W #HL0 #HLK0 #HVW + @(frees_be … HL0) -HL0 -HV + /3 width=3 by lt_plus_to_minus_r, lt_to_le_to_lt/ + [ #X #HXU >(plus_minus_m_m l0 1) in HTU; /2 width=2 by ltn_to_ltO/ #HTU + elim (lift_div_le … HXU … HTU ?) -U /2 width=2 by monotonic_pred/ + | >minus_plus commutative_plus -HLK0 #HLK0 + @(frees_be … HLK0) -HLK0 -IHV + /2 width=1 by yle_plus_dx1_trans, lt_minus_to_plus/ + #X #HXU elim (lift_div_le … HTU … HXU) -U /2 width=2 by/ + ] +] +qed. + +(* Inversion lemmas on relocation *******************************************) + +lemma frees_inv_lift_be: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀K,s,l0,m0. ⬇[s, l0, m0+1] L ≡ K → + ∀T. ⬆[l0, m0+1] T ≡ U → l0 ≤ i → i ≤ l0 + m0 → ⊥. +#L #U #l #i #H elim H -L -U -l -i +[ #L #U #l #i #HnU #K #s #l0 #m0 #_ #T #HTU #Hl0i #Hilm0 + elim (lift_split … HTU i m0) -HTU /2 width=2 by/ +| #I #L #K0 #U #W #l #i #j #Hli #Hij #HnU #HLK0 #_ #IHW #K #s #l0 #m0 #HLK #T #HTU #Hl0i #Hilm0 + elim (lt_or_ge j l0) #H1 + [ elim (drop_conf_lt … HLK … HLK0) -L // #L0 #V #H #HKL0 #HVW + @(IHW … HKL0 … HVW) + [ /2 width=1 by monotonic_le_minus_l2/ + | >minus_plus >minus_plus >plus_minus /2 width=1 by monotonic_le_minus_l/ + ] + | elim (lift_split … HTU j m0) -HTU /3 width=3 by lt_to_le_to_lt, lt_to_le/ + ] +] +qed-. + +lemma frees_inv_lift_ge: ∀L,U,l,i. L ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀K,s,l0,m0. ⬇[s, l0, m0] L ≡ K → + ∀T. ⬆[l0, m0] T ≡ U → l0 + m0 ≤ i → + K ⊢ i-m0 ϵ𝐅*[l-yinj m0]⦃T⦄. +#L #U #l #i #H elim H -L -U -l -i +[ #L #U #l #i #HnU #K #s #l0 #m0 #HLK #T #HTU #Hlm0i -L -s + elim (le_inv_plus_l … Hlm0i) -Hlm0i #Hl0im0 #Hm0i @frees_eq #X #HXT -K + elim (lift_trans_le … HXT … HTU) -T // minus_plus >minus_plus >plus_minus /2 width=1 by monotonic_le_minus_l/ + ] + | elim (lt_or_ge j (l0+m0)) [ >commutative_plus |] #H2 + [ -L -I -W lapply (lt_plus_to_minus ???? H2) // -H2 #H2 + elim (lift_split … HTU j (m0-1)) -HTU // + [ >minus_minus_associative /2 width=2 by ltn_to_ltO/ commutative_plus /3 width=1 by le_minus_to_plus, monotonic_pred/ + ] + | lapply (drop_conf_ge … HLK … HLK0 ?) // -L #HK0 + elim (le_inv_plus_l … H2) -H2 #H2 #Hm0j + @(frees_be … HK0) + [ /2 width=1 by monotonic_yle_minus_dx/ + | /2 width=1 by monotonic_lt_minus_l/ + | #X #HXT elim (lift_trans_le … HXT … HTU) -T // arith_b1 /2 width=5 by/ + ] + ] + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lreq.ma new file mode 100644 index 000000000..c2f4be016 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/frees_lreq.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_lreq.ma". +include "basic_2A/multiple/frees.ma". + +(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************) + +(* Properties on equivalence for local environments *************************) + +lemma lreq_frees_trans: ∀L2,U,l,i. L2 ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀L1. L1 ⩬[l, ∞] L2 → L1 ⊢ i ϵ 𝐅*[l]⦃U⦄. +#L2 #U #l #i #H elim H -L2 -U -l -i /3 width=2 by frees_eq/ +#I2 #L2 #K2 #U #W2 #l #i #j #Hlj #Hji #HnU #HLK2 #_ #IHW2 #L1 #HL12 +elim (lreq_drop_trans_be … HL12 … HLK2) -L2 // >yminus_Y_inj #K1 #HK12 #HLK1 +lapply (lreq_inv_O_Y … HK12) -HK12 #H destruct /3 width=9 by frees_be/ +qed-. + +lemma frees_lreq_conf: ∀L1,U,l,i. L1 ⊢ i ϵ 𝐅*[l]⦃U⦄ → + ∀L2. L1 ⩬[l, ∞] L2 → L2 ⊢ i ϵ 𝐅*[l]⦃U⦄. +/3 width=3 by lreq_sym, lreq_frees_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts.ma new file mode 100644 index 000000000..407a8d810 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts.ma @@ -0,0 +1,150 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rliftstar_3.ma". +include "basic_2A/substitution/lift.ma". +include "basic_2A/multiple/mr2_plus.ma". + +(* GENERIC TERM RELOCATION **************************************************) + +inductive lifts: list2 nat nat → relation term ≝ +| lifts_nil : ∀T. lifts (◊) T T +| lifts_cons: ∀T1,T,T2,cs,l,m. + ⬆[l,m] T1 ≡ T → lifts cs T T2 → lifts ({l, m} @ cs) T1 T2 +. + +interpretation "generic relocation (term)" + 'RLiftStar cs T1 T2 = (lifts cs T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact lifts_inv_nil_aux: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → cs = ◊ → T1 = T2. +#T1 #T2 #cs * -T1 -T2 -cs // +#T1 #T #T2 #l #m #cs #_ #_ #H destruct +qed-. + +lemma lifts_inv_nil: ∀T1,T2. ⬆*[◊] T1 ≡ T2 → T1 = T2. +/2 width=3 by lifts_inv_nil_aux/ qed-. + +fact lifts_inv_cons_aux: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → + ∀l,m,tl. cs = {l, m} @ tl → + ∃∃T. ⬆[l, m] T1 ≡ T & ⬆*[tl] T ≡ T2. +#T1 #T2 #cs * -T1 -T2 -cs +[ #T #l #m #tl #H destruct +| #T1 #T #T2 #cs #l #m #HT1 #HT2 #l0 #m0 #tl #H destruct + /2 width=3 by ex2_intro/ +qed-. + +lemma lifts_inv_cons: ∀T1,T2,l,m,cs. ⬆*[{l, m} @ cs] T1 ≡ T2 → + ∃∃T. ⬆[l, m] T1 ≡ T & ⬆*[cs] T ≡ T2. +/2 width=3 by lifts_inv_cons_aux/ qed-. + +(* Basic_1: was: lift1_sort *) +lemma lifts_inv_sort1: ∀T2,k,cs. ⬆*[cs] ⋆k ≡ T2 → T2 = ⋆k. +#T2 #k #cs elim cs -cs +[ #H <(lifts_inv_nil … H) -H // +| #l #m #cs #IH #H + elim (lifts_inv_cons … H) -H #X #H + >(lift_inv_sort1 … H) -H /2 width=1 by/ +] +qed-. + +(* Basic_1: was: lift1_lref *) +lemma lifts_inv_lref1: ∀T2,cs,i1. ⬆*[cs] #i1 ≡ T2 → + ∃∃i2. @⦃i1, cs⦄ ≡ i2 & T2 = #i2. +#T2 #cs elim cs -cs +[ #i1 #H <(lifts_inv_nil … H) -H /2 width=3 by at_nil, ex2_intro/ +| #l #m #cs #IH #i1 #H + elim (lifts_inv_cons … H) -H #X #H1 #H2 + elim (lift_inv_lref1 … H1) -H1 * #Hli1 #H destruct + elim (IH … H2) -IH -H2 /3 width=3 by at_lt, at_ge, ex2_intro/ +] +qed-. + +lemma lifts_inv_gref1: ∀T2,p,cs. ⬆*[cs] §p ≡ T2 → T2 = §p. +#T2 #p #cs elim cs -cs +[ #H <(lifts_inv_nil … H) -H // +| #l #m #cs #IH #H + elim (lifts_inv_cons … H) -H #X #H + >(lift_inv_gref1 … H) -H /2 width=1 by/ +] +qed-. + +(* Basic_1: was: lift1_bind *) +lemma lifts_inv_bind1: ∀a,I,T2,cs,V1,U1. ⬆*[cs] ⓑ{a,I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆*[cs] V1 ≡ V2 & ⬆*[cs + 1] U1 ≡ U2 & + T2 = ⓑ{a,I} V2. U2. +#a #I #T2 #cs elim cs -cs +[ #V1 #U1 #H + <(lifts_inv_nil … H) -H /2 width=5 by ex3_2_intro, lifts_nil/ +| #l #m #cs #IHcs #V1 #U1 #H + elim (lifts_inv_cons … H) -H #X #H #HT2 + elim (lift_inv_bind1 … H) -H #V #U #HV1 #HU1 #H destruct + elim (IHcs … HT2) -IHcs -HT2 #V2 #U2 #HV2 #HU2 #H destruct + /3 width=5 by ex3_2_intro, lifts_cons/ +] +qed-. + +(* Basic_1: was: lift1_flat *) +lemma lifts_inv_flat1: ∀I,T2,cs,V1,U1. ⬆*[cs] ⓕ{I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆*[cs] V1 ≡ V2 & ⬆*[cs] U1 ≡ U2 & + T2 = ⓕ{I} V2. U2. +#I #T2 #cs elim cs -cs +[ #V1 #U1 #H + <(lifts_inv_nil … H) -H /2 width=5 by ex3_2_intro, lifts_nil/ +| #l #m #cs #IHcs #V1 #U1 #H + elim (lifts_inv_cons … H) -H #X #H #HT2 + elim (lift_inv_flat1 … H) -H #V #U #HV1 #HU1 #H destruct + elim (IHcs … HT2) -IHcs -HT2 #V2 #U2 #HV2 #HU2 #H destruct + /3 width=5 by ex3_2_intro, lifts_cons/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lifts_simple_dx: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄. +#T1 #T2 #cs #H elim H -T1 -T2 -cs /3 width=5 by lift_simple_dx/ +qed-. + +lemma lifts_simple_sn: ∀T1,T2,cs. ⬆*[cs] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄. +#T1 #T2 #cs #H elim H -T1 -T2 -cs /3 width=5 by lift_simple_sn/ +qed-. + +(* Basic properties *********************************************************) + +lemma lifts_bind: ∀a,I,T2,V1,V2,cs. ⬆*[cs] V1 ≡ V2 → + ∀T1. ⬆*[cs + 1] T1 ≡ T2 → + ⬆*[cs] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2. +#a #I #T2 #V1 #V2 #cs #H elim H -V1 -V2 -cs +[ #V #T1 #H >(lifts_inv_nil … H) -H // +| #V1 #V #V2 #cs #l #m #HV1 #_ #IHV #T1 #H + elim (lifts_inv_cons … H) -H /3 width=3 by lift_bind, lifts_cons/ +] +qed. + +lemma lifts_flat: ∀I,T2,V1,V2,cs. ⬆*[cs] V1 ≡ V2 → + ∀T1. ⬆*[cs] T1 ≡ T2 → + ⬆*[cs] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2. +#I #T2 #V1 #V2 #cs #H elim H -V1 -V2 -cs +[ #V #T1 #H >(lifts_inv_nil … H) -H // +| #V1 #V #V2 #cs #l #m #HV1 #_ #IHV #T1 #H + elim (lifts_inv_cons … H) -H /3 width=3 by lift_flat, lifts_cons/ +] +qed. + +lemma lifts_total: ∀cs,T1. ∃T2. ⬆*[cs] T1 ≡ T2. +#cs elim cs -cs /2 width=2 by lifts_nil, ex_intro/ +#l #m #cs #IH #T1 elim (lift_total T1 l m) +#T #HT1 elim (IH T) -IH /3 width=4 by lifts_cons, ex_intro/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift.ma new file mode 100644 index 000000000..52f1a6395 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lift.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/multiple/mr2_minus.ma". +include "basic_2A/multiple/lifts.ma". + +(* GENERIC TERM RELOCATION **************************************************) + +(* Properties concerning basic term relocation ******************************) + +(* Basic_1: was: lift1_xhg (right to left) *) +lemma lifts_lift_trans_le: ∀T1,T,cs. ⬆*[cs] T1 ≡ T → ∀T2. ⬆[0, 1] T ≡ T2 → + ∃∃T0. ⬆[0, 1] T1 ≡ T0 & ⬆*[cs + 1] T0 ≡ T2. +#T1 #T #cs #H elim H -T1 -T -cs +[ /2 width=3 by lifts_nil, ex2_intro/ +| #T1 #T3 #T #cs #l #m #HT13 #_ #IHT13 #T2 #HT2 + elim (IHT13 … HT2) -T #T #HT3 #HT2 + elim (lift_trans_le … HT13 … HT3) -T3 /3 width=5 by lifts_cons, ex2_intro/ +] +qed-. + +(* Basic_1: was: lift1_free (right to left) *) +lemma lifts_lift_trans: ∀cs,i,i0. @⦃i, cs⦄ ≡ i0 → + ∀cs0. cs + 1 ▭ i + 1 ≡ cs0 + 1 → + ∀T1,T0. ⬆*[cs0] T1 ≡ T0 → + ∀T2. ⬆[O, i0 + 1] T0 ≡ T2 → + ∃∃T. ⬆[0, i + 1] T1 ≡ T & ⬆*[cs] T ≡ T2. +#cs elim cs -cs normalize +[ #i #x #H1 #cs0 #H2 #T1 #T0 #HT10 #T2 + <(at_inv_nil … H1) -x #HT02 + lapply (minuss_inv_nil1 … H2) -H2 #H + >(pluss_inv_nil2 … H) in HT10; -cs0 #H + >(lifts_inv_nil … H) -T1 /2 width=3 by lifts_nil, ex2_intro/ +| #l #m #cs #IHcs #i #i0 #H1 #cs0 #H2 #T1 #T0 #HT10 #T2 #HT02 + elim (at_inv_cons … H1) -H1 * #Hil #Hi0 + [ elim (minuss_inv_cons1_lt … H2) -H2 [2: /2 width=1 by lt_minus_to_plus/ ] #cs1 #Hcs1 minus_plus #HT1 #HT0 + elim (IHcs … Hi0 … Hcs1 … HT0 … HT02) -IHcs -Hi0 -Hcs1 -T0 #T0 #HT0 #HT02 + elim (lift_trans_le … HT1 … HT0) -T /2 width=1 by/ #T #HT1 commutative_plus in Hi0; #Hi0 + lapply (minuss_inv_cons1_ge … H2 ?) -H2 [ /2 width=1 by le_S_S/ ] (liftv_inv_nil1 … H) -T1s /2 width=3 by liftsv_nil, liftv_nil, ex2_intro/ +| #T1s #Ts #T1 #T #HT1 #_ #IHT1s #X #H + elim (liftv_inv_cons1 … H) -H #T2 #T2s #HT2 #HT2s #H destruct + elim (IHT1s … HT2s) -Ts #Ts #HT1s #HT2s + elim (lifts_lift_trans_le … HT1 … HT2) -T /3 width=5 by liftsv_cons, liftv_cons, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lifts.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lifts.ma new file mode 100644 index 000000000..5d27e9d10 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_lifts.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lifts_lift.ma". + +(* GENERIC RELOCATION *******************************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: lift1_lift1 (left to right) *) +theorem lifts_trans: ∀T1,T,cs1. ⬆*[cs1] T1 ≡ T → ∀T2:term. ∀cs2. ⬆*[cs2] T ≡ T2 → + ⬆*[cs1 @@ cs2] T1 ≡ T2. +#T1 #T #cs1 #H elim H -T1 -T -cs1 /3 width=3 by lifts_cons/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma new file mode 100644 index 000000000..5d7cc9885 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_vector.ma". +include "basic_2A/multiple/lifts.ma". + +(* GENERIC TERM VECTOR RELOCATION *******************************************) + +inductive liftsv (cs:list2 nat nat) : relation (list term) ≝ +| liftsv_nil : liftsv cs (◊) (◊) +| liftsv_cons: ∀T1s,T2s,T1,T2. + ⬆*[cs] T1 ≡ T2 → liftsv cs T1s T2s → + liftsv cs (T1 @ T1s) (T2 @ T2s) +. + +interpretation "generic relocation (vector)" + 'RLiftStar cs T1s T2s = (liftsv cs T1s T2s). + +(* Basic inversion lemmas ***************************************************) + +(* Basic_1: was: lifts1_flat (left to right) *) +lemma lifts_inv_applv1: ∀V1s,U1,T2,cs. ⬆*[cs] Ⓐ V1s. U1 ≡ T2 → + ∃∃V2s,U2. ⬆*[cs] V1s ≡ V2s & ⬆*[cs] U1 ≡ U2 & + T2 = Ⓐ V2s. U2. +#V1s elim V1s -V1s normalize +[ #T1 #T2 #cs #HT12 + @ex3_2_intro [3,4: // |1,2: skip | // ] (**) (* explicit constructor *) +| #V1 #V1s #IHV1s #T1 #X #cs #H + elim (lifts_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct + elim (IHV1s … HY) -IHV1s -HY #V2s #T2 #HV12s #HT12 #H destruct + @(ex3_2_intro) [4: // |3: /2 width=2 by liftsv_cons/ |1,2: skip | // ] (**) (* explicit constructor *) +] +qed-. + +(* Basic properties *********************************************************) + +(* Basic_1: was: lifts1_flat (right to left) *) +lemma lifts_applv: ∀V1s,V2s,cs. ⬆*[cs] V1s ≡ V2s → + ∀T1,T2. ⬆*[cs] T1 ≡ T2 → + ⬆*[cs] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2. +#V1s #V2s #cs #H elim H -V1s -V2s /3 width=1 by lifts_flat/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq.ma new file mode 100644 index 000000000..f8c737dc5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq.ma @@ -0,0 +1,160 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazyeq_4.ma". +include "basic_2A/multiple/llpx_sn.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +definition ceq: relation3 lenv term term ≝ λL,T1,T2. T1 = T2. + +definition lleq: relation4 ynat term lenv lenv ≝ llpx_sn ceq. + +interpretation + "lazy equivalence (local environment)" + 'LazyEq T l L1 L2 = (lleq l T L1 L2). + +definition lleq_transitive: predicate (relation3 lenv term term) ≝ + λR. ∀L2,T1,T2. R L2 T1 T2 → ∀L1. L1 ≡[T1, 0] L2 → R L1 T1 T2. + +(* Basic inversion lemmas ***************************************************) + +lemma lleq_ind: ∀R:relation4 ynat term lenv lenv. ( + ∀L1,L2,l,k. |L1| = |L2| → R l (⋆k) L1 L2 + ) → ( + ∀L1,L2,l,i. |L1| = |L2| → yinj i < l → R l (#i) L1 L2 + ) → ( + ∀I,L1,L2,K1,K2,V,l,i. l ≤ yinj i → + ⬇[i] L1 ≡ K1.ⓑ{I}V → ⬇[i] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, yinj O] K2 → R (yinj O) V K1 K2 → R l (#i) L1 L2 + ) → ( + ∀L1,L2,l,i. |L1| = |L2| → |L1| ≤ i → |L2| ≤ i → R l (#i) L1 L2 + ) → ( + ∀L1,L2,l,p. |L1| = |L2| → R l (§p) L1 L2 + ) → ( + ∀a,I,L1,L2,V,T,l. + L1 ≡[V, l]L2 → L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V → + R l V L1 L2 → R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V) → R l (ⓑ{a,I}V.T) L1 L2 + ) → ( + ∀I,L1,L2,V,T,l. + L1 ≡[V, l]L2 → L1 ≡[T, l] L2 → + R l V L1 L2 → R l T L1 L2 → R l (ⓕ{I}V.T) L1 L2 + ) → + ∀l,T,L1,L2. L1 ≡[T, l] L2 → R l T L1 L2. +#R #H1 #H2 #H3 #H4 #H5 #H6 #H7 #l #T #L1 #L2 #H elim H -L1 -L2 -T -l /2 width=8 by/ +qed-. + +lemma lleq_inv_bind: ∀a,I,L1,L2,V,T,l. L1 ≡[ⓑ{a,I}V.T, l] L2 → + L1 ≡[V, l] L2 ∧ L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_inv_bind/ qed-. + +lemma lleq_inv_flat: ∀I,L1,L2,V,T,l. L1 ≡[ⓕ{I}V.T, l] L2 → + L1 ≡[V, l] L2 ∧ L1 ≡[T, l] L2. +/2 width=2 by llpx_sn_inv_flat/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lleq_fwd_length: ∀L1,L2,T,l. L1 ≡[T, l] L2 → |L1| = |L2|. +/2 width=4 by llpx_sn_fwd_length/ qed-. + +lemma lleq_fwd_lref: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → + ∨∨ |L1| ≤ i ∧ |L2| ≤ i + | yinj i < l + | ∃∃I,K1,K2,V. ⬇[i] L1 ≡ K1.ⓑ{I}V & + ⬇[i] L2 ≡ K2.ⓑ{I}V & + K1 ≡[V, yinj 0] K2 & l ≤ yinj i. +#L1 #L2 #l #i #H elim (llpx_sn_fwd_lref … H) /2 width=1 by or3_intro0, or3_intro1/ +* /3 width=7 by or3_intro2, ex4_4_intro/ +qed-. + +lemma lleq_fwd_drop_sn: ∀L1,L2,T,l. L1 ≡[l, T] L2 → ∀K1,i. ⬇[i] L1 ≡ K1 → + ∃K2. ⬇[i] L2 ≡ K2. +/2 width=7 by llpx_sn_fwd_drop_sn/ qed-. + +lemma lleq_fwd_drop_dx: ∀L1,L2,T,l. L1 ≡[l, T] L2 → ∀K2,i. ⬇[i] L2 ≡ K2 → + ∃K1. ⬇[i] L1 ≡ K1. +/2 width=7 by llpx_sn_fwd_drop_dx/ qed-. + +lemma lleq_fwd_bind_sn: ∀a,I,L1,L2,V,T,l. + L1 ≡[ⓑ{a,I}V.T, l] L2 → L1 ≡[V, l] L2. +/2 width=4 by llpx_sn_fwd_bind_sn/ qed-. + +lemma lleq_fwd_bind_dx: ∀a,I,L1,L2,V,T,l. + L1 ≡[ⓑ{a,I}V.T, l] L2 → L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_fwd_bind_dx/ qed-. + +lemma lleq_fwd_flat_sn: ∀I,L1,L2,V,T,l. + L1 ≡[ⓕ{I}V.T, l] L2 → L1 ≡[V, l] L2. +/2 width=3 by llpx_sn_fwd_flat_sn/ qed-. + +lemma lleq_fwd_flat_dx: ∀I,L1,L2,V,T,l. + L1 ≡[ⓕ{I}V.T, l] L2 → L1 ≡[T, l] L2. +/2 width=3 by llpx_sn_fwd_flat_dx/ qed-. + +(* Basic properties *********************************************************) + +lemma lleq_sort: ∀L1,L2,l,k. |L1| = |L2| → L1 ≡[⋆k, l] L2. +/2 width=1 by llpx_sn_sort/ qed. + +lemma lleq_skip: ∀L1,L2,l,i. yinj i < l → |L1| = |L2| → L1 ≡[#i, l] L2. +/2 width=1 by llpx_sn_skip/ qed. + +lemma lleq_lref: ∀I,L1,L2,K1,K2,V,l,i. l ≤ yinj i → + ⬇[i] L1 ≡ K1.ⓑ{I}V → ⬇[i] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, 0] K2 → L1 ≡[#i, l] L2. +/2 width=9 by llpx_sn_lref/ qed. + +lemma lleq_free: ∀L1,L2,l,i. |L1| ≤ i → |L2| ≤ i → |L1| = |L2| → L1 ≡[#i, l] L2. +/2 width=1 by llpx_sn_free/ qed. + +lemma lleq_gref: ∀L1,L2,l,p. |L1| = |L2| → L1 ≡[§p, l] L2. +/2 width=1 by llpx_sn_gref/ qed. + +lemma lleq_bind: ∀a,I,L1,L2,V,T,l. + L1 ≡[V, l] L2 → L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V → + L1 ≡[ⓑ{a,I}V.T, l] L2. +/2 width=1 by llpx_sn_bind/ qed. + +lemma lleq_flat: ∀I,L1,L2,V,T,l. + L1 ≡[V, l] L2 → L1 ≡[T, l] L2 → L1 ≡[ⓕ{I}V.T, l] L2. +/2 width=1 by llpx_sn_flat/ qed. + +lemma lleq_refl: ∀l,T. reflexive … (lleq l T). +/2 width=1 by llpx_sn_refl/ qed. + +lemma lleq_Y: ∀L1,L2,T. |L1| = |L2| → L1 ≡[T, ∞] L2. +/2 width=1 by llpx_sn_Y/ qed. + +lemma lleq_sym: ∀l,T. symmetric … (lleq l T). +#l #T #L1 #L2 #H @(lleq_ind … H) -l -T -L1 -L2 +/2 width=7 by lleq_sort, lleq_skip, lleq_lref, lleq_free, lleq_gref, lleq_bind, lleq_flat/ +qed-. + +lemma lleq_ge_up: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀T,l,m. ⬆[l, m] T ≡ U → + lt ≤ l + m → L1 ≡[U, l] L2. +/2 width=6 by llpx_sn_ge_up/ qed-. + +lemma lleq_ge: ∀L1,L2,T,l1. L1 ≡[T, l1] L2 → ∀l2. l1 ≤ l2 → L1 ≡[T, l2] L2. +/2 width=3 by llpx_sn_ge/ qed-. + +lemma lleq_bind_O: ∀a,I,L1,L2,V,T. L1 ≡[V, 0] L2 → L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V → + L1 ≡[ⓑ{a,I}V.T, 0] L2. +/2 width=1 by llpx_sn_bind_O/ qed-. + +(* Advanceded properties on lazy pointwise extensions ************************) + +lemma llpx_sn_lrefl: ∀R. (∀L. reflexive … (R L)) → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → llpx_sn R l T L1 L2. +/2 width=3 by llpx_sn_co/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt.ma new file mode 100644 index 000000000..97061d9b5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_alt.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Alternative definition (not recursive) ***********************************) + +theorem lleq_intro_alt: ∀L1,L2,T,l. |L1| = |L2| → + (∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ V1 = V2 + ) → L1 ≡[T, l] L2. +#L1 #L2 #T #l #HL12 #IH @llpx_sn_alt_inv_llpx_sn @conj // -HL12 +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +@(IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 // +qed. + +theorem lleq_inv_alt: ∀L1,L2,T,l. L1 ≡[T, l] L2 → + |L1| = |L2| ∧ + ∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ V1 = V2. +#L1 #L2 #T #l #H elim (llpx_sn_llpx_sn_alt … H) -H +#HL12 #IH @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +@(IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt_rec.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt_rec.ma new file mode 100644 index 000000000..92a5ce66b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_alt_rec.ma @@ -0,0 +1,54 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_alt_rec.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Alternative definition (recursive) ***************************************) + +theorem lleq_intro_alt_r: ∀L1,L2,T,l. |L1| = |L2| → + (∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → (∀U. ⬆[i, 1] U ≡ T → ⊥) → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2 + ) → L1 ≡[T, l] L2. +#L1 #L2 #T #l #HL12 #IH @llpx_sn_intro_alt_r // -HL12 +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /2 width=1 by and3_intro/ +qed. + +theorem lleq_ind_alt_r: ∀S:relation4 ynat term lenv lenv. + (∀L1,L2,T,l. |L1| = |L2| → ( + ∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → (∀U. ⬆[i, 1] U ≡ T → ⊥) → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2 & S 0 V1 K1 K2 + ) → S l T L1 L2) → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → S l T L1 L2. +#S #IH1 #L1 #L2 #T #l #H @(llpx_sn_ind_alt_r … H) -L1 -L2 -T -l +#L1 #L2 #T #l #HL12 #IH2 @IH1 -IH1 // -HL12 +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +elim (IH2 … HnT HLK1 HLK2) -IH2 -HnT -HLK1 -HLK2 /2 width=1 by and4_intro/ +qed-. + +theorem lleq_inv_alt_r: ∀L1,L2,T,l. L1 ≡[T, l] L2 → + |L1| = |L2| ∧ + ∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → (∀U. ⬆[i, 1] U ≡ T → ⊥) → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2. +#L1 #L2 #T #l #H elim (llpx_sn_inv_alt_r … H) -H +#HL12 #IH @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hil #HnT #HLK1 #HLK2 +elim (IH … HnT HLK1 HLK2) -IH -HnT -HLK1 -HLK2 /2 width=1 by and3_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_drop.ma new file mode 100644 index 000000000..5bf3ddfc6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_drop.ma @@ -0,0 +1,150 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_drop.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Advanced properties ******************************************************) + +lemma lleq_bind_repl_O: ∀I,L1,L2,V,T. L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V → + ∀J,W. L1 ≡[W, 0] L2 → L1.ⓑ{J}W ≡[T, 0] L2.ⓑ{J}W. +/2 width=7 by llpx_sn_bind_repl_O/ qed-. + +lemma lleq_dec: ∀T,L1,L2,l. Decidable (L1 ≡[T, l] L2). +/3 width=1 by llpx_sn_dec, eq_term_dec/ qed-. + +lemma lleq_llpx_sn_trans: ∀R. lleq_transitive R → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → + ∀L. llpx_sn R l T L2 L → llpx_sn R l T L1 L. +#R #HR #L1 #L2 #T #l #H @(lleq_ind … H) -L1 -L2 -T -l +[1,2,5: /4 width=6 by llpx_sn_fwd_length, llpx_sn_gref, llpx_sn_skip, llpx_sn_sort, trans_eq/ +|4: /4 width=6 by llpx_sn_fwd_length, llpx_sn_free, le_repl_sn_conf_aux, trans_eq/ +| #I #L1 #L2 #K1 #K2 #V #l #i #Hli #HLK1 #HLK2 #HK12 #IHK12 #L #H elim (llpx_sn_inv_lref_ge_sn … H … HLK2) -H -HLK2 + /3 width=11 by llpx_sn_lref/ +| #a #I #L1 #L2 #V #T #l #_ #_ #IHV #IHT #L #H elim (llpx_sn_inv_bind … H) -H + /3 width=1 by llpx_sn_bind/ +| #I #L1 #L2 #V #T #l #_ #_ #IHV #IHT #L #H elim (llpx_sn_inv_flat … H) -H + /3 width=1 by llpx_sn_flat/ +] +qed-. + +lemma lleq_llpx_sn_conf: ∀R. lleq_transitive R → + ∀L1,L2,T,l. L1 ≡[T, l] L2 → + ∀L. llpx_sn R l T L1 L → llpx_sn R l T L2 L. +/3 width=3 by lleq_llpx_sn_trans, lleq_sym/ qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lleq_inv_lref_ge_dx: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I,K2,V. ⬇[i] L2 ≡ K2.ⓑ{I}V → + ∃∃K1. ⬇[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2. +#L1 #L2 #l #i #H #Hli #I #K2 #V #HLK2 elim (llpx_sn_inv_lref_ge_dx … H … HLK2) -L2 +/2 width=3 by ex2_intro/ +qed-. + +lemma lleq_inv_lref_ge_sn: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I,K1,V. ⬇[i] L1 ≡ K1.ⓑ{I}V → + ∃∃K2. ⬇[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2. +#L1 #L2 #l #i #H #Hli #I1 #K1 #V #HLK1 elim (llpx_sn_inv_lref_ge_sn … H … HLK1) -L1 +/2 width=3 by ex2_intro/ +qed-. + +lemma lleq_inv_lref_ge_bi: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I1,I2,K1,K2,V1,V2. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + ∧∧ I1 = I2 & K1 ≡[V1, 0] K2 & V1 = V2. +/2 width=8 by llpx_sn_inv_lref_ge_bi/ qed-. + +lemma lleq_inv_lref_ge: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → l ≤ i → + ∀I,K1,K2,V. ⬇[i] L1 ≡ K1.ⓑ{I}V → ⬇[i] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, 0] K2. +#L1 #L2 #l #i #HL12 #Hli #I #K1 #K2 #V #HLK1 #HLK2 +elim (lleq_inv_lref_ge_bi … HL12 … HLK1 HLK2) // +qed-. + +lemma lleq_inv_S: ∀L1,L2,T,l. L1 ≡[T, l+1] L2 → + ∀I,K1,K2,V. ⬇[l] L1 ≡ K1.ⓑ{I}V → ⬇[l] L2 ≡ K2.ⓑ{I}V → + K1 ≡[V, 0] K2 → L1 ≡[T, l] L2. +/2 width=9 by llpx_sn_inv_S/ qed-. + +lemma lleq_inv_bind_O: ∀a,I,L1,L2,V,T. L1 ≡[ⓑ{a,I}V.T, 0] L2 → + L1 ≡[V, 0] L2 ∧ L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_inv_bind_O/ qed-. + +(* Advanced forward lemmas **************************************************) + +lemma lleq_fwd_lref_dx: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → + ∀I,K2,V. ⬇[i] L2 ≡ K2.ⓑ{I}V → + i < l ∨ + ∃∃K1. ⬇[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2 & l ≤ i. +#L1 #L2 #l #i #H #I #K2 #V #HLK2 elim (llpx_sn_fwd_lref_dx … H … HLK2) -L2 +[ | * ] /3 width=3 by ex3_intro, or_intror, or_introl/ +qed-. + +lemma lleq_fwd_lref_sn: ∀L1,L2,l,i. L1 ≡[#i, l] L2 → + ∀I,K1,V. ⬇[i] L1 ≡ K1.ⓑ{I}V → + i < l ∨ + ∃∃K2. ⬇[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2 & l ≤ i. +#L1 #L2 #l #i #H #I #K1 #V #HLK1 elim (llpx_sn_fwd_lref_sn … H … HLK1) -L1 +[ | * ] /3 width=3 by ex3_intro, or_intror, or_introl/ +qed-. + +lemma lleq_fwd_bind_O_dx: ∀a,I,L1,L2,V,T. L1 ≡[ⓑ{a,I}V.T, 0] L2 → + L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V. +/2 width=2 by llpx_sn_fwd_bind_O_dx/ qed-. + +(* Properties on relocation *************************************************) + +lemma lleq_lift_le: ∀K1,K2,T,lt. K1 ≡[T, lt] K2 → + ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀U. ⬆[l, m] T ≡ U → lt ≤ l → L1 ≡[U, lt] L2. +/3 width=10 by llpx_sn_lift_le, lift_mono/ qed-. + +lemma lleq_lift_ge: ∀K1,K2,T,lt. K1 ≡[T, lt] K2 → + ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀U. ⬆[l, m] T ≡ U → l ≤ lt → L1 ≡[U, lt+m] L2. +/2 width=9 by llpx_sn_lift_ge/ qed-. + +(* Inversion lemmas on relocation *******************************************) + +lemma lleq_inv_lift_le: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → lt ≤ l → K1 ≡[T, lt] K2. +/3 width=10 by llpx_sn_inv_lift_le, ex2_intro/ qed-. + +lemma lleq_inv_lift_be: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → l ≤ lt → lt ≤ yinj l + m → K1 ≡[T, l] K2. +/2 width=11 by llpx_sn_inv_lift_be/ qed-. + +lemma lleq_inv_lift_ge: ∀L1,L2,U,lt. L1 ≡[U, lt] L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → yinj l + m ≤ lt → K1 ≡[T, lt-m] K2. +/2 width=9 by llpx_sn_inv_lift_ge/ qed-. + +(* Inversion lemmas on negated lazy quivalence for local environments *******) + +lemma nlleq_inv_bind: ∀a,I,L1,L2,V,T,l. (L1 ≡[ⓑ{a,I}V.T, l] L2 → ⊥) → + (L1 ≡[V, l] L2 → ⊥) ∨ (L1.ⓑ{I}V ≡[T, ⫯l] L2.ⓑ{I}V → ⊥). +/3 width=2 by nllpx_sn_inv_bind, eq_term_dec/ qed-. + +lemma nlleq_inv_flat: ∀I,L1,L2,V,T,l. (L1 ≡[ⓕ{I}V.T, l] L2 → ⊥) → + (L1 ≡[V, l] L2 → ⊥) ∨ (L1 ≡[T, l] L2 → ⊥). +/3 width=2 by nllpx_sn_inv_flat, eq_term_dec/ qed-. + +lemma nlleq_inv_bind_O: ∀a,I,L1,L2,V,T. (L1 ≡[ⓑ{a,I}V.T, 0] L2 → ⊥) → + (L1 ≡[V, 0] L2 → ⊥) ∨ (L1.ⓑ{I}V ≡[T, 0] L2.ⓑ{I}V → ⊥). +/3 width=2 by nllpx_sn_inv_bind_O, eq_term_dec/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_fqus.ma new file mode 100644 index 000000000..55c2dbcd0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_fqus.ma @@ -0,0 +1,75 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/multiple/lleq_drop.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Properties on supclosure *************************************************) + +lemma lleq_fqu_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐ ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐ ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U +[ #I #G #L2 #V #L1 #H elim (lleq_inv_lref_ge_dx … H … I L2 V) -H // + #K1 #H1 #H2 lapply (drop_inv_O2 … H1) -H1 + #H destruct /2 width=3 by fqu_lref_O, ex2_intro/ +| * [ #a ] #I #G #L2 #V #T #L1 #H + [ elim (lleq_inv_bind … H) + | elim (lleq_inv_flat … H) + ] -H + /2 width=3 by fqu_pair_sn, ex2_intro/ +| #a #I #G #L2 #V #T #L1 #H elim (lleq_inv_bind_O … H) -H + #H3 #H4 /2 width=3 by fqu_bind_dx, ex2_intro/ +| #I #G #L2 #V #T #L1 #H elim (lleq_inv_flat … H) -H + /2 width=3 by fqu_flat_dx, ex2_intro/ +| #G #L2 #K2 #T #U #m #HLK2 #HTU #L1 #HL12 + elim (drop_O1_le (Ⓕ) (m+1) L1) + [ /3 width=12 by fqu_drop, lleq_inv_lift_le, ex2_intro/ + | lapply (drop_fwd_length_le2 … HLK2) -K2 + lapply (lleq_fwd_length … HL12) -T -U // + ] +] +qed-. + +lemma lleq_fquq_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐⸮ ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐⸮ ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fquq_inv_gen … H) -H +[ #H elim (lleq_fqu_trans … H … HL12) -L2 /3 width=3 by fqu_fquq, ex2_intro/ +| * #HG #HL #HT destruct /2 width=3 by ex2_intro/ +] +qed-. + +lemma lleq_fqup_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐+ ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐+ ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U +[ #G2 #K2 #U #HTU #L1 #HL12 elim (lleq_fqu_trans … HTU … HL12) -L2 + /3 width=3 by fqu_fqup, ex2_intro/ +| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12 elim (IHTU … HL12) -L2 + #K1 #HTU #HK1 elim (lleq_fqu_trans … HU2 … HK1) -K + /3 width=5 by fqup_strap1, ex2_intro/ +] +qed-. + +lemma lleq_fqus_trans: ∀G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐* ⦃G2, K2, U⦄ → + ∀L1. L1 ≡[T, 0] L2 → + ∃∃K1. ⦃G1, L1, T⦄ ⊐* ⦃G2, K1, U⦄ & K1 ≡[U, 0] K2. +#G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_gen … H) -H +[ #H elim (lleq_fqup_trans … H … HL12) -L2 /3 width=3 by fqup_fqus, ex2_intro/ +| * #HG #HL #HT destruct /2 width=3 by ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lleq.ma new file mode 100644 index 000000000..e1de9148e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lleq.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_drop.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Main properties **********************************************************) + +theorem lleq_trans: ∀l,T. Transitive … (lleq l T). +/2 width=3 by lleq_llpx_sn_trans/ qed-. + +theorem lleq_canc_sn: ∀L,L1,L2,T,l. L ≡[l, T] L1→ L ≡[l, T] L2 → L1 ≡[l, T] L2. +/3 width=3 by lleq_trans, lleq_sym/ qed-. + +theorem lleq_canc_dx: ∀L1,L2,L,T,l. L1 ≡[l, T] L → L2 ≡[l, T] L → L1 ≡[l, T] L2. +/3 width=3 by lleq_trans, lleq_sym/ qed-. + +(* Advanced properies on negated lazy equivalence *****************************) + +(* Note: for use in auto, works with /4 width=8/ so lleq_canc_sn is preferred *) +lemma lleq_nlleq_trans: ∀l,T,L1,L. L1 ≡[T, l] L → + ∀L2. (L ≡[T, l] L2 → ⊥) → (L1 ≡[T, l] L2 → ⊥). +/3 width=3 by lleq_canc_sn/ qed-. + +lemma nlleq_lleq_div: ∀l,T,L2,L. L2 ≡[T, l] L → + ∀L1. (L1 ≡[T, l] L → ⊥) → (L1 ≡[T, l] L2 → ⊥). +/3 width=3 by lleq_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_llor.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_llor.ma new file mode 100644 index 000000000..665a3a16b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_llor.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llor.ma". +include "basic_2A/multiple/llpx_sn_frees.ma". +include "basic_2A/multiple/lleq_alt.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Properties on pointwise union for local environments **********************) + +lemma llpx_sn_llor_dx: ∀R. (s_r_confluent1 … R (llpx_sn R 0)) → (frees_trans R) → + ∀L1,L2,T,l. llpx_sn R l T L1 L2 → ∀L. L1 ⋓[T, l] L2 ≡ L → L2 ≡[T, l] L. +#R #H1R #H2R #L1 #L2 #T #l #H1 #L #H2 +lapply (llpx_sn_frees_trans … H1R H2R … H1) -H1R -H2R #HR +elim (llpx_sn_llpx_sn_alt … H1) -H1 #HL12 #IH1 +elim H2 -H2 #_ #HL1 #IH2 +@lleq_intro_alt // #I2 #I #K2 #K #V2 #V #i #Hi #HnT #HLK2 #HLK +lapply (drop_fwd_length_lt2 … HLK) #HiL +elim (drop_O1_lt (Ⓕ) L1 i) // -HiL #I1 #K1 #V1 #HLK1 +elim (IH1 … HLK1 HLK2) -IH1 /2 width=1 by/ #H #_ destruct +elim (IH2 … HLK1 HLK2 HLK) -IH2 -HLK1 -HLK2 -HLK * /2 width=1 by conj/ #H +[ elim (ylt_yle_false … H) -H // +| elim H -H /2 width=1 by/ +] +qed. + +lemma llpx_sn_llor_dx_sym: ∀R. (s_r_confluent1 … R (llpx_sn R 0)) → (frees_trans R) → + ∀L1,L2,T,l. llpx_sn R l T L1 L2 → ∀L. L1 ⋓[T, l] L2 ≡ L → L ≡[T, l] L2. +/3 width=6 by llpx_sn_llor_dx, lleq_sym/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lreq.ma new file mode 100644 index 000000000..155c51572 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/lleq_lreq.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_lreq.ma". +include "basic_2A/multiple/lleq.ma". + +(* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************) + +(* Properties on equivalence for local environments *************************) + +lemma lreq_lleq_trans: ∀L2,L,T,l. L2 ≡[T, l] L → + ∀L1. L1 ⩬[l, ∞] L2 → L1 ≡[T, l] L. +/2 width=3 by lreq_llpx_sn_trans/ qed-. + +lemma lleq_lreq_trans: ∀L,L1,T,l. L ≡[T, l] L1 → + ∀L2. L1 ⩬[l, ∞] L2 → L ≡[T, l] L2. +/2 width=3 by llpx_sn_lreq_trans/ qed-. + +lemma lleq_lreq_repl: ∀L1,L2,T,l. L1 ≡[T, l] L2 → ∀K1. K1 ⩬[l, ∞] L1 → + ∀K2. L2 ⩬[l, ∞] K2 → K1 ≡[T, l] K2. +/2 width=5 by llpx_sn_lreq_repl/ qed-. + +lemma lleq_bind_repl_SO: ∀I1,I2,L1,L2,V1,V2,T. L1.ⓑ{I1}V1 ≡[T, 0] L2.ⓑ{I2}V2 → + ∀J1,J2,W1,W2. L1.ⓑ{J1}W1 ≡[T, 1] L2.ⓑ{J2}W2. +/2 width=5 by llpx_sn_bind_repl_SO/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor.ma new file mode 100644 index 000000000..32634999c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lazyor_5.ma". +include "basic_2A/multiple/frees.ma". + +(* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************) + +definition llor: ynat → relation4 term lenv lenv lenv ≝ λl,T,L2,L1,L. + ∧∧ |L1| = |L2| & |L1| = |L| + & (∀I1,I2,I,K1,K2,K,V1,V2,V,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → ⬇[i] L ≡ K.ⓑ{I}V → ∨∨ + (∧∧ yinj i < l & I1 = I & V1 = V) | + (∧∧ (L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → ⊥) & I1 = I & V1 = V) | + (∧∧ l ≤ yinj i & L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ & I2 = I & V2 = V) + ). + +interpretation + "lazy union (local environment)" + 'LazyOr L1 T l L2 L = (llor l T L2 L1 L). + +(* Basic properties *********************************************************) + +(* Note: this can be proved by llor_skip *) +lemma llor_atom: ∀T,l. ⋆ ⋓[T, l] ⋆ ≡ ⋆. +#T #l @and3_intro // +#I1 #I2 #I #K1 #K2 #K #V1 #V2 #V #i #HLK1 +elim (drop_inv_atom1 … HLK1) -HLK1 #H destruct +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_alt.ma new file mode 100644 index 000000000..ffea81440 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_alt.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees_append.ma". +include "basic_2A/multiple/llor.ma". + +(* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************) + +(* Alternative definition ***************************************************) + +lemma llor_tail_frees: ∀L1,L2,L,U,l. L1 ⋓[U, l] L2 ≡ L → l ≤ yinj (|L1|) → + ∀I1,W1. ⓑ{I1}W1.L1 ⊢ |L1| ϵ 𝐅*[l]⦃U⦄ → + ∀I2,W2. ⓑ{I1}W1.L1 ⋓[U, l] ⓑ{I2}W2.L2 ≡ ⓑ{I2}W2.L. +#L1 #L2 #L #U #l * #HL12 #HL1 #IH #Hl #I1 #W1 #HU #I2 #W2 +@and3_intro [1,2: >ltail_length /2 width=1 by le_S_S/ ] +#J1 #J2 #J #K1 #K2 #K #V1 #V2 #V #i #HLK1 #HLK2 #HLK +lapply (drop_fwd_length_lt2 … HLK1) >ltail_length #H +lapply (lt_plus_SO_to_le … H) -H #H +elim (le_to_or_lt_eq … H) -H #H +[ elim (drop_O1_lt (Ⓕ) … H) #Z1 #Y1 #X1 #HLY1 + elim (drop_O1_lt (Ⓕ) L2 i) // #Z2 #Y2 #X2 #HLY2 + elim (drop_O1_lt (Ⓕ) L i) // #Z #Y #X #HLY + lapply (drop_O1_inv_append1_le … HLK1 … HLY1) /2 width=1 by lt_to_le/ -HLK1 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK2 … HLY2) /2 width=1 by lt_to_le/ -HLK2 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … HLY) /2 width=1 by lt_to_le/ -HLK normalize #H destruct + elim (IH … HLY1 HLY2 HLY) -IH -HLY1 -HLY2 -HLY * + [ /3 width=1 by and3_intro, or3_intro0/ + | /6 width=2 by frees_inv_append, lt_to_le, or3_intro1, and3_intro/ + | /5 width=1 by frees_append, lt_to_le, or3_intro2, and4_intro/ + ] +| -IH -HLK1 destruct + lapply (drop_O1_inv_append1_le … HLK2 … (⋆) ?) // -HLK2 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … (⋆) ?) // -HLK normalize #H destruct + /3 width=1 by or3_intro2, and4_intro/ +] +qed. + +lemma llor_tail_cofrees: ∀L1,L2,L,U,l. L1 ⋓[U, l] L2 ≡ L → + ∀I1,W1. (ⓑ{I1}W1.L1 ⊢ |L1| ϵ 𝐅*[l]⦃U⦄ → ⊥) → + ∀I2,W2. ⓑ{I1}W1.L1 ⋓[U, l] ⓑ{I2}W2.L2 ≡ ⓑ{I1}W1.L. +#L1 #L2 #L #U #l * #HL12 #HL1 #IH #I1 #W1 #HU #I2 #W2 +@and3_intro [1,2: >ltail_length /2 width=1 by le_S_S/ ] +#J1 #J2 #J #K1 #K2 #K #V1 #V2 #V #i #HLK1 #HLK2 #HLK +lapply (drop_fwd_length_lt2 … HLK1) >ltail_length #H +lapply (lt_plus_SO_to_le … H) -H #H +elim (le_to_or_lt_eq … H) -H #H +[ elim (drop_O1_lt (Ⓕ) … H) #Z1 #Y1 #X1 #HLY1 + elim (drop_O1_lt (Ⓕ) L2 i) // #Z2 #Y2 #X2 #HLY2 + elim (drop_O1_lt (Ⓕ) L i) // #Z #Y #X #HLY + lapply (drop_O1_inv_append1_le … HLK1 … HLY1) /2 width=1 by lt_to_le/ -HLK1 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK2 … HLY2) /2 width=1 by lt_to_le/ -HLK2 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … HLY) /2 width=1 by lt_to_le/ -HLK normalize #H destruct + elim (IH … HLY1 HLY2 HLY) -IH -HLY1 -HLY2 -HLY * + [ /3 width=1 by and3_intro, or3_intro0/ + | /6 width=2 by frees_inv_append, lt_to_le, or3_intro1, and3_intro/ + | /5 width=1 by frees_append, lt_to_le, or3_intro2, and4_intro/ + ] +| -IH -HLK2 destruct + lapply (drop_O1_inv_append1_le … HLK1 … (⋆) ?) // -HLK1 normalize #H destruct + lapply (drop_O1_inv_append1_le … HLK … (⋆) ?) // -HLK normalize #H destruct + /4 width=1 by or3_intro1, and3_intro/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_drop.ma new file mode 100644 index 000000000..8d0de6ff8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llor_drop.ma @@ -0,0 +1,45 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees_lift.ma". +include "basic_2A/multiple/llor_alt.ma". + +(* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************) + +(* Advanced properties ******************************************************) + +lemma llor_skip: ∀L1,L2,U,l. |L1| = |L2| → yinj (|L1|) ≤ l → L1 ⋓[U, l] L2 ≡ L1. +#L1 #L2 #U #l #HL12 #Hl @and3_intro // -HL12 +#I1 #I2 #I #K1 #K2 #K #W1 #W2 #W #i #HLK1 #_ #HLK -L2 -K2 +lapply (drop_mono … HLK … HLK1) -HLK #H destruct +lapply (drop_fwd_length_lt2 … HLK1) -K1 +/5 width=3 by ylt_yle_trans, ylt_inj, or3_intro0, and3_intro/ +qed. + +(* Note: lemma 1400 concludes the "big tree" theorem *) +lemma llor_total: ∀L1,L2,T,l. |L1| = |L2| → ∃L. L1 ⋓[T, l] L2 ≡ L. +#L1 @(lenv_ind_alt … L1) -L1 +[ #L2 #T #l #H >(length_inv_zero_sn … H) -L2 /2 width=2 by ex_intro/ +| #I1 #L1 #V1 #IHL1 #Y #T #l >ltail_length #H + elim (length_inv_pos_sn_ltail … H) -H #I2 #L2 #V2 #HL12 #H destruct + elim (ylt_split l (|ⓑ{I1}V1.L1|)) + [ elim (frees_dec (ⓑ{I1}V1.L1) T l (|L1|)) #HnU + elim (IHL1 L2 T l) // -IHL1 -HL12 + [ #L #HL12 >ltail_length /4 width=2 by llor_tail_frees, ylt_fwd_succ2, ex_intro/ + | /4 width=2 by llor_tail_cofrees, ex_intro/ + ] + | -IHL1 /4 width=2 by llor_skip, plus_minus_m_m, ex_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn.ma new file mode 100644 index 000000000..9eb82fa14 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn.ma @@ -0,0 +1,209 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". +include "basic_2A/substitution/drop.ma". + +(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****) + +inductive llpx_sn (R:relation3 lenv term term): relation4 ynat term lenv lenv ≝ +| llpx_sn_sort: ∀L1,L2,l,k. |L1| = |L2| → llpx_sn R l (⋆k) L1 L2 +| llpx_sn_skip: ∀L1,L2,l,i. |L1| = |L2| → yinj i < l → llpx_sn R l (#i) L1 L2 +| llpx_sn_lref: ∀I,L1,L2,K1,K2,V1,V2,l,i. l ≤ yinj i → + ⬇[i] L1 ≡ K1.ⓑ{I}V1 → ⬇[i] L2 ≡ K2.ⓑ{I}V2 → + llpx_sn R (yinj 0) V1 K1 K2 → R K1 V1 V2 → llpx_sn R l (#i) L1 L2 +| llpx_sn_free: ∀L1,L2,l,i. |L1| ≤ i → |L2| ≤ i → |L1| = |L2| → llpx_sn R l (#i) L1 L2 +| llpx_sn_gref: ∀L1,L2,l,p. |L1| = |L2| → llpx_sn R l (§p) L1 L2 +| llpx_sn_bind: ∀a,I,L1,L2,V,T,l. + llpx_sn R l V L1 L2 → llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V) → + llpx_sn R l (ⓑ{a,I}V.T) L1 L2 +| llpx_sn_flat: ∀I,L1,L2,V,T,l. + llpx_sn R l V L1 L2 → llpx_sn R l T L1 L2 → llpx_sn R l (ⓕ{I}V.T) L1 L2 +. + +(* Basic inversion lemmas ***************************************************) + +fact llpx_sn_inv_bind_aux: ∀R,L1,L2,X,l. llpx_sn R l X L1 L2 → + ∀a,I,V,T. X = ⓑ{a,I}V.T → + llpx_sn R l V L1 L2 ∧ llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V). +#R #L1 #L2 #X #l * -L1 -L2 -X -l +[ #L1 #L2 #l #k #_ #b #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #b #J #W #U #H destruct +| #I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #_ #_ #_ #_ #_ #b #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #_ #b #J #W #U #H destruct +| #L1 #L2 #l #p #_ #b #J #W #U #H destruct +| #a #I #L1 #L2 #V #T #l #HV #HT #b #J #W #U #H destruct /2 width=1 by conj/ +| #I #L1 #L2 #V #T #l #_ #_ #b #J #W #U #H destruct +] +qed-. + +lemma llpx_sn_inv_bind: ∀R,a,I,L1,L2,V,T,l. llpx_sn R l (ⓑ{a,I}V.T) L1 L2 → + llpx_sn R l V L1 L2 ∧ llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V). +/2 width=4 by llpx_sn_inv_bind_aux/ qed-. + +fact llpx_sn_inv_flat_aux: ∀R,L1,L2,X,l. llpx_sn R l X L1 L2 → + ∀I,V,T. X = ⓕ{I}V.T → + llpx_sn R l V L1 L2 ∧ llpx_sn R l T L1 L2. +#R #L1 #L2 #X #l * -L1 -L2 -X -l +[ #L1 #L2 #l #k #_ #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #J #W #U #H destruct +| #I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #_ #_ #_ #_ #_ #J #W #U #H destruct +| #L1 #L2 #l #i #_ #_ #_ #J #W #U #H destruct +| #L1 #L2 #l #p #_ #J #W #U #H destruct +| #a #I #L1 #L2 #V #T #l #_ #_ #J #W #U #H destruct +| #I #L1 #L2 #V #T #l #HV #HT #J #W #U #H destruct /2 width=1 by conj/ +] +qed-. + +lemma llpx_sn_inv_flat: ∀R,I,L1,L2,V,T,l. llpx_sn R l (ⓕ{I}V.T) L1 L2 → + llpx_sn R l V L1 L2 ∧ llpx_sn R l T L1 L2. +/2 width=4 by llpx_sn_inv_flat_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma llpx_sn_fwd_length: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → |L1| = |L2|. +#R #L1 #L2 #T #l #H elim H -L1 -L2 -T -l // +#I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #_ #HLK1 #HLK2 #_ #_ #HK12 +lapply (drop_fwd_length … HLK1) -HLK1 +lapply (drop_fwd_length … HLK2) -HLK2 +normalize // +qed-. + +lemma llpx_sn_fwd_drop_sn: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → + ∀K1,i. ⬇[i] L1 ≡ K1 → ∃K2. ⬇[i] L2 ≡ K2. +#R #L1 #L2 #T #l #H #K1 #i #HLK1 lapply (llpx_sn_fwd_length … H) -H +#HL12 lapply (drop_fwd_length_le2 … HLK1) -HLK1 /2 width=1 by drop_O1_le/ +qed-. + +lemma llpx_sn_fwd_drop_dx: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → + ∀K2,i. ⬇[i] L2 ≡ K2 → ∃K1. ⬇[i] L1 ≡ K1. +#R #L1 #L2 #T #l #H #K2 #i #HLK2 lapply (llpx_sn_fwd_length … H) -H +#HL12 lapply (drop_fwd_length_le2 … HLK2) -HLK2 /2 width=1 by drop_O1_le/ +qed-. + +fact llpx_sn_fwd_lref_aux: ∀R,L1,L2,X,l. llpx_sn R l X L1 L2 → ∀i. X = #i → + ∨∨ |L1| ≤ i ∧ |L2| ≤ i + | yinj i < l + | ∃∃I,K1,K2,V1,V2. ⬇[i] L1 ≡ K1.ⓑ{I}V1 & + ⬇[i] L2 ≡ K2.ⓑ{I}V2 & + llpx_sn R (yinj 0) V1 K1 K2 & + R K1 V1 V2 & l ≤ yinj i. +#R #L1 #L2 #X #l * -L1 -L2 -X -l +[ #L1 #L2 #l #k #_ #j #H destruct +| #L1 #L2 #l #i #_ #Hil #j #H destruct /2 width=1 by or3_intro1/ +| #I #L1 #L2 #K1 #K2 #V1 #V2 #l #i #Hli #HLK1 #HLK2 #HK12 #HV12 #j #H destruct + /3 width=9 by or3_intro2, ex5_5_intro/ +| #L1 #L2 #l #i #HL1 #HL2 #_ #j #H destruct /3 width=1 by or3_intro0, conj/ +| #L1 #L2 #l #p #_ #j #H destruct +| #a #I #L1 #L2 #V #T #l #_ #_ #j #H destruct +| #I #L1 #L2 #V #T #l #_ #_ #j #H destruct +] +qed-. + +lemma llpx_sn_fwd_lref: ∀R,L1,L2,l,i. llpx_sn R l (#i) L1 L2 → + ∨∨ |L1| ≤ i ∧ |L2| ≤ i + | yinj i < l + | ∃∃I,K1,K2,V1,V2. ⬇[i] L1 ≡ K1.ⓑ{I}V1 & + ⬇[i] L2 ≡ K2.ⓑ{I}V2 & + llpx_sn R (yinj 0) V1 K1 K2 & + R K1 V1 V2 & l ≤ yinj i. +/2 width=3 by llpx_sn_fwd_lref_aux/ qed-. + +lemma llpx_sn_fwd_bind_sn: ∀R,a,I,L1,L2,V,T,l. llpx_sn R l (ⓑ{a,I}V.T) L1 L2 → + llpx_sn R l V L1 L2. +#R #a #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_bind … H) -H // +qed-. + +lemma llpx_sn_fwd_bind_dx: ∀R,a,I,L1,L2,V,T,l. llpx_sn R l (ⓑ{a,I}V.T) L1 L2 → + llpx_sn R (⫯l) T (L1.ⓑ{I}V) (L2.ⓑ{I}V). +#R #a #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_bind … H) -H // +qed-. + +lemma llpx_sn_fwd_flat_sn: ∀R,I,L1,L2,V,T,l. llpx_sn R l (ⓕ{I}V.T) L1 L2 → + llpx_sn R l V L1 L2. +#R #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_flat … H) -H // +qed-. + +lemma llpx_sn_fwd_flat_dx: ∀R,I,L1,L2,V,T,l. llpx_sn R l (ⓕ{I}V.T) L1 L2 → + llpx_sn R l T L1 L2. +#R #I #L1 #L2 #V #T #l #H elim (llpx_sn_inv_flat … H) -H // +qed-. + +lemma llpx_sn_fwd_pair_sn: ∀R,I,L1,L2,V,T,l. llpx_sn R l (②{I}V.T) L1 L2 → + llpx_sn R l V L1 L2. +#R * /2 width=4 by llpx_sn_fwd_flat_sn, llpx_sn_fwd_bind_sn/ +qed-. + +(* Basic properties *********************************************************) + +lemma llpx_sn_refl: ∀R. (∀L. reflexive … (R L)) → ∀T,L,l. llpx_sn R l T L L. +#R #HR #T #L @(f2_ind … rfw … L T) -L -T +#x #IH #L * * /3 width=1 by llpx_sn_sort, llpx_sn_gref, llpx_sn_bind, llpx_sn_flat/ +#i #Hx elim (lt_or_ge i (|L|)) /2 width=1 by llpx_sn_free/ +#HiL #l elim (ylt_split i l) /2 width=1 by llpx_sn_skip/ +elim (drop_O1_lt … HiL) -HiL destruct /4 width=9 by llpx_sn_lref, drop_fwd_rfw/ +qed-. + +lemma llpx_sn_Y: ∀R,T,L1,L2. |L1| = |L2| → llpx_sn R (∞) T L1 L2. +#R #T #L1 @(f2_ind … rfw … L1 T) -L1 -T +#x #IH #L1 * * /3 width=1 by llpx_sn_sort, llpx_sn_skip, llpx_sn_gref, llpx_sn_flat/ +#a #I #V1 #T1 #Hx #L2 #HL12 +@llpx_sn_bind /2 width=1 by/ (**) (* explicit constructor *) +@IH -IH // normalize /2 width=1 by eq_f2/ +qed-. + +lemma llpx_sn_ge_up: ∀R,L1,L2,U,lt. llpx_sn R lt U L1 L2 → ∀T,l,m. ⬆[l, m] T ≡ U → + lt ≤ l + m → llpx_sn R l U L1 L2. +#R #L1 #L2 #U #lt #H elim H -L1 -L2 -U -lt +[ #L1 #L2 #lt #k #HL12 #X #l #m #H #_ >(lift_inv_sort2 … H) -H /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #lt #i #HL12 #Hilt #X #l #m #H #Hltlm + elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=1 by llpx_sn_skip, ylt_inj/ -HL12 + elim (ylt_yle_false … Hilt) -Hilt + @(yle_trans … Hltlm) /2 width=1 by yle_inj/ (**) (* full auto too slow 11s *) +| #I #L1 #L2 #K1 #K2 #W1 #W2 #lt #i #Hlti #HLK1 #HLK2 #HW1 #HW12 #_ #X #l #m #H #_ + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ lapply (llpx_sn_fwd_length … HW1) -HW1 #HK12 + lapply (drop_fwd_length … HLK1) lapply (drop_fwd_length … HLK2) + normalize in ⊢ (%→%→?); -I -W1 -W2 -lt /3 width=1 by llpx_sn_skip, ylt_inj/ + | /4 width=9 by llpx_sn_lref, yle_inj, le_plus_b/ + ] +| /2 width=1 by llpx_sn_free/ +| #L1 #L2 #lt #p #HL12 #X #l #m #H #_ >(lift_inv_gref2 … H) -H /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #lt #_ #_ #IHV #IHT #X #l #m #H #Hltlm destruct + elim (lift_inv_bind2 … H) -H #V #T #HVW >commutative_plus #HTU #H destruct + @(llpx_sn_bind) /2 width=4 by/ (**) (* full auto fails *) + @(IHT … HTU) /2 width=1 by yle_succ/ +| #I #L1 #L2 #W #U #lt #_ #_ #IHV #IHT #X #l #m #H #Hltlm destruct + elim (lift_inv_flat2 … H) -H #HVW #HTU #H destruct + /3 width=4 by llpx_sn_flat/ +] +qed-. + +(**) (* the minor premise comes first *) +lemma llpx_sn_ge: ∀R,L1,L2,T,l1,l2. l1 ≤ l2 → + llpx_sn R l1 T L1 L2 → llpx_sn R l2 T L1 L2. +#R #L1 #L2 #T #l1 #l2 * -l1 -l2 (**) (* destructed yle *) +/3 width=6 by llpx_sn_ge_up, llpx_sn_Y, llpx_sn_fwd_length, yle_inj/ +qed-. + +lemma llpx_sn_bind_O: ∀R,a,I,L1,L2,V,T. llpx_sn R 0 V L1 L2 → + llpx_sn R 0 T (L1.ⓑ{I}V) (L2.ⓑ{I}V) → + llpx_sn R 0 (ⓑ{a,I}V.T) L1 L2. +/3 width=3 by llpx_sn_ge, llpx_sn_bind/ qed-. + +lemma llpx_sn_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) → + ∀L1,L2,T,l. llpx_sn R1 l T L1 L2 → llpx_sn R2 l T L1 L2. +#R1 #R2 #HR12 #L1 #L2 #T #l #H elim H -L1 -L2 -T -l +/3 width=9 by llpx_sn_sort, llpx_sn_skip, llpx_sn_lref, llpx_sn_free, llpx_sn_gref, llpx_sn_bind, llpx_sn_flat/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt.ma new file mode 100644 index 000000000..5a2116ddd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_alt.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees.ma". +include "basic_2A/multiple/llpx_sn_alt_rec.ma". + +(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****) + +(* alternative definition of llpx_sn (not recursive) *) +definition llpx_sn_alt: relation3 lenv term term → relation4 ynat term lenv lenv ≝ + λR,l,T,L1,L2. |L1| = |L2| ∧ + (∀I1,I2,K1,K2,V1,V2,i. l ≤ yinj i → L1 ⊢ i ϵ 𝐅*[l]⦃T⦄ → + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2 + ). + +(* Main properties **********************************************************) + +theorem llpx_sn_llpx_sn_alt: ∀R,T,L1,L2,l. llpx_sn R l T L1 L2 → llpx_sn_alt R l T L1 L2. +#R #U #L1 @(f2_ind … rfw … L1 U) -L1 -U +#x #IHx #L1 #U #Hx #L2 #l #H elim (llpx_sn_inv_alt_r … H) -H +#HL12 #IHU @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #Hli #H #HLK1 #HLK2 elim (frees_inv … H) -H +[ -x #HnU elim (IHU … HnU HLK1 HLK2) -IHU -HnU -HLK1 -HLK2 /2 width=1 by conj/ +| * #J1 #K10 #W10 #j #Hlj #Hji #HnU #HLK10 #HnW10 destruct + lapply (drop_fwd_drop2 … HLK10) #H + lapply (drop_conf_ge … H … HLK1 ?) -H /2 width=1 by lt_to_le/ (minus_plus_m_m j (i+1)) in ⊢ (%→?); >commutative_plus (lift_inv_sort1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_sort/ +| #K1 #K2 #l0 #i #HK12 #Hil0 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hli #H destruct + [ lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_skip/ + | elim (ylt_yle_false … Hil0) -L1 -L2 -K1 -K2 -m -Hil0 + /3 width=3 by yle_trans, yle_inj/ + ] +| #I #K1 #K2 #K11 #K22 #V1 #V2 #l0 #i #Hil0 #HK11 #HK22 #HK12 #HV12 #IHK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hli #H destruct [ -HK12 | -IHK12 ] + [ elim (drop_trans_lt … HLK1 … HK11) // -K1 + elim (drop_trans_lt … HLK2 … HK22) // -Hli -K2 + /3 width=18 by llpx_sn_lref/ + | lapply (drop_trans_ge_comm … HLK1 … HK11 ?) // -K1 + lapply (drop_trans_ge_comm … HLK2 … HK22 ?) // -Hli -Hl0 -K2 + /3 width=9 by llpx_sn_lref, yle_plus_dx1_trans/ + ] +| #K1 #K2 #l0 #i #HK1 #HK2 #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hil #H destruct + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -HK12 + [ /3 width=7 by llpx_sn_free, drop_fwd_be/ + | lapply (drop_fwd_length … HLK1) -HLK1 #HLK1 + lapply (drop_fwd_length … HLK2) -HLK2 #HLK2 + @llpx_sn_free [ >HLK1 | >HLK2 ] -Hil -HLK1 -HLK2 /2 width=1 by monotonic_le_plus_r/ (**) (* explicit constructor *) + ] +| #K1 #K2 #l0 #p #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l -m + /2 width=1 by llpx_sn_gref/ +| #a #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_bind1 … H) -H + #W #U #HVW #HTU #H destruct /4 width=6 by llpx_sn_bind, drop_skip, yle_succ/ +| #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_flat1 … H) -H + #W #U #HVW #HTU #H destruct /3 width=6 by llpx_sn_flat/ +] +qed-. + +lemma llpx_sn_lift_ge: ∀R,K1,K2,T,l0. llpx_sn R l0 T K1 K2 → + ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀U. ⬆[l, m] T ≡ U → l ≤ l0 → llpx_sn R (l0+m) U L1 L2. +#R #K1 #K2 #T #l0 #H elim H -K1 -K2 -T -l0 +[ #K1 #K2 #l0 #k #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_sort1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_sort/ +| #K1 #K2 #l0 #i #HK12 #Hil0 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ elim (lift_inv_lref1 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 + [ /3 width=3 by llpx_sn_skip, ylt_plus_dx2_trans/ + | /3 width=3 by llpx_sn_skip, monotonic_ylt_plus_dx/ + ] +| #I #K1 #K2 #K11 #K22 #V1 #V2 #l0 #i #Hil0 #HK11 #HK22 #HK12 #HV12 #_ #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hil #H destruct + [ elim (ylt_yle_false … Hil0) -I -L1 -L2 -K1 -K2 -K11 -K22 -V1 -V2 -m -Hil0 + /3 width=3 by ylt_yle_trans, ylt_inj/ + | lapply (drop_trans_ge_comm … HLK1 … HK11 ?) // -K1 + lapply (drop_trans_ge_comm … HLK2 … HK22 ?) // -Hil -Hl0 -K2 + /3 width=9 by llpx_sn_lref, monotonic_yle_plus_dx/ + ] +| #K1 #K2 #l0 #i #HK1 #HK2 #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref1 … H) -H + * #Hil #H destruct + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -HK12 + [ /3 width=7 by llpx_sn_free, drop_fwd_be/ + | lapply (drop_fwd_length … HLK1) -HLK1 #HLK1 + lapply (drop_fwd_length … HLK2) -HLK2 #HLK2 + @llpx_sn_free [ >HLK1 | >HLK2 ] -Hil -HLK1 -HLK2 /2 width=1 by monotonic_le_plus_r/ (**) (* explicit constructor *) + ] +| #K1 #K2 #l0 #p #HK12 #L1 #L2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref1 … H) -X + lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -l + /2 width=1 by llpx_sn_gref/ +| #a #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_bind1 … H) -H + #W #U #HVW #HTU #H destruct /4 width=5 by llpx_sn_bind, drop_skip, yle_succ/ +| #I #K1 #K2 #V #T #l0 #_ #_ #IHV #IHT #L1 #L2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_flat1 … H) -H + #W #U #HVW #HTU #H destruct /3 width=5 by llpx_sn_flat/ +] +qed-. + +(* Inversion lemmas on relocation *******************************************) + +lemma llpx_sn_inv_lift_le: ∀R. d_deliftable_sn R → + ∀L1,L2,U,l0. llpx_sn R l0 U L1 L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → l0 ≤ l → llpx_sn R l0 T K1 K2. +#R #HR #L1 #L2 #U #l0 #H elim H -L1 -L2 -U -l0 +[ #L1 #L2 #l0 #k #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_sort2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l -m + /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #l0 #i #HL12 #Hil0 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 + [ /2 width=1 by llpx_sn_skip/ + | /3 width=3 by llpx_sn_skip, yle_ylt_trans/ + ] +| #I #L1 #L2 #K11 #K22 #W1 #W2 #l0 #i #Hil0 #HLK11 #HLK22 #HK12 #HW12 #IHK12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref2 … H) -H + * #Hil #H destruct [ -HK12 | -IHK12 ] + [ elim (drop_conf_lt … HLK1 … HLK11) // -L1 #L1 #V1 #HKL1 #HKL11 #HVW1 + elim (drop_conf_lt … HLK2 … HLK22) // -Hil -L2 #L2 #V2 #HKL2 #HKL22 #HVW2 + elim (HR … HW12 … HKL11 … HVW1) -HR #V0 #HV0 #HV12 + lapply (lift_inj … HV0 … HVW2) -HV0 -HVW2 #H destruct + /3 width=10 by llpx_sn_lref/ + | lapply (drop_conf_ge … HLK1 … HLK11 ?) // -L1 + lapply (drop_conf_ge … HLK2 … HLK22 ?) // -L2 -Hil0 + elim (le_inv_plus_l … Hil) -Hil /4 width=9 by llpx_sn_lref, yle_trans, yle_inj/ (**) (* slow *) + ] +| #L1 #L2 #l0 #i #HL1 #HL2 #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) + [ lapply (drop_fwd_length_le4 … HLK1) -HLK1 + lapply (drop_fwd_length_le4 … HLK2) -HLK2 + #HKL2 #HKL1 #HK12 @llpx_sn_free // /2 width=3 by transitive_le/ (**) (* full auto too slow *) + | lapply (drop_fwd_length … HLK1) -HLK1 #H >H in HL1; -H + lapply (drop_fwd_length … HLK2) -HLK2 #H >H in HL2; -H + /3 width=1 by llpx_sn_free, le_plus_to_minus_r/ + ] +| #L1 #L2 #l0 #p #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l -m + /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_bind2 … H) -H + #V #T #HVW #HTU #H destruct /4 width=6 by llpx_sn_bind, drop_skip, yle_succ/ +| #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 elim (lift_inv_flat2 … H) -H + #V #T #HVW #HTU #H destruct /3 width=6 by llpx_sn_flat/ +] +qed-. + +lemma llpx_sn_inv_lift_be: ∀R,L1,L2,U,l0. llpx_sn R l0 U L1 L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → l ≤ l0 → l0 ≤ yinj l + m → llpx_sn R l T K1 K2. +#R #L1 #L2 #U #l0 #H elim H -L1 -L2 -U -l0 +[ #L1 #L2 #l0 #k #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ #_ >(lift_inv_sort2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l0 -m + /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #l0 #i #HL12 #Hil0 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_lref2 … H) -H + * #Hil #H destruct + [ lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 + -Hil0 /3 width=1 by llpx_sn_skip, ylt_inj/ + | elim (ylt_yle_false … Hil0) -L1 -L2 -Hl0 -Hil0 + /3 width=3 by yle_trans, yle_inj/ (**) (* slow *) + ] +| #I #L1 #L2 #K11 #K22 #W1 #W2 #l0 #i #Hil0 #HLK11 #HLK22 #HK12 #HW12 #_ #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_lref2 … H) -H + * #Hil #H destruct + [ elim (ylt_yle_false … Hil0) -I -L1 -L2 -K11 -K22 -W1 -W2 -Hl0m -Hil0 + /3 width=3 by ylt_yle_trans, ylt_inj/ + | lapply (drop_conf_ge … HLK1 … HLK11 ?) // -L1 + lapply (drop_conf_ge … HLK2 … HLK22 ?) // -L2 -Hil0 -Hl0 -Hl0m + elim (le_inv_plus_l … Hil) -Hil /3 width=9 by llpx_sn_lref, yle_inj/ + ] +| #L1 #L2 #l0 #i #HL1 #HL2 #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) + [ lapply (drop_fwd_length_le4 … HLK1) -HLK1 + lapply (drop_fwd_length_le4 … HLK2) -HLK2 + #HKL2 #HKL1 #HK12 @llpx_sn_free // /2 width=3 by transitive_le/ (**) (* full auto too slow *) + | lapply (drop_fwd_length … HLK1) -HLK1 #H >H in HL1; -H + lapply (drop_fwd_length … HLK2) -HLK2 #H >H in HL2; -H + /3 width=1 by llpx_sn_free, le_plus_to_minus_r/ + ] +| #L1 #L2 #l0 #p #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ #_ >(lift_inv_gref2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l0 -m + /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_bind2 … H) -H + >commutative_plus #V #T #HVW #HTU #H destruct + @llpx_sn_bind [ /2 width=5 by/ ] -IHW (**) (* explicit constructor *) + @(IHU … HTU) -IHU -HTU /2 width=1 by drop_skip, yle_succ/ +| #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hl0 #Hl0m elim (lift_inv_flat2 … H) -H + #V #T #HVW #HTU #H destruct /3 width=6 by llpx_sn_flat/ +] +qed-. + +lemma llpx_sn_inv_lift_ge: ∀R,L1,L2,U,l0. llpx_sn R l0 U L1 L2 → + ∀K1,K2,l,m. ⬇[Ⓕ, l, m] L1 ≡ K1 → ⬇[Ⓕ, l, m] L2 ≡ K2 → + ∀T. ⬆[l, m] T ≡ U → yinj l + m ≤ l0 → llpx_sn R (l0-m) T K1 K2. +#R #L1 #L2 #U #l0 #H elim H -L1 -L2 -U -l0 +[ #L1 #L2 #l0 #k #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_sort2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l + /2 width=1 by llpx_sn_sort/ +| #L1 #L2 #l0 #i #HL12 #Hil0 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_lref2 … H) -H + * #Hil #H destruct [ -Hil0 | -Hlml0 ] + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 + [ /4 width=3 by llpx_sn_skip, yle_plus1_to_minus_inj2, ylt_yle_trans, ylt_inj/ + | elim (le_inv_plus_l … Hil) -Hil #_ + /4 width=1 by llpx_sn_skip, monotonic_ylt_minus_dx, yle_inj/ + ] +| #I #L1 #L2 #K11 #K22 #W1 #W2 #l0 #i #Hil0 #HLK11 #HLK22 #HK12 #HW12 #_ #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_lref2 … H) -H + * #Hil #H destruct + [ elim (ylt_yle_false … Hil0) -I -L1 -L2 -K11 -K22 -W1 -W2 -Hil0 + /3 width=3 by yle_fwd_plus_sn1, ylt_yle_trans, ylt_inj/ + | lapply (drop_conf_ge … HLK1 … HLK11 ?) // -L1 + lapply (drop_conf_ge … HLK2 … HLK22 ?) // -L2 -Hlml0 -Hil + /3 width=9 by llpx_sn_lref, monotonic_yle_minus_dx/ + ] +| #L1 #L2 #l0 #i #HL1 #HL2 #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_lref2 … H) -H + * #_ #H destruct + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) + [ lapply (drop_fwd_length_le4 … HLK1) -HLK1 + lapply (drop_fwd_length_le4 … HLK2) -HLK2 + #HKL2 #HKL1 #HK12 @llpx_sn_free // /2 width=3 by transitive_le/ (**) (* full auto too slow *) + | lapply (drop_fwd_length … HLK1) -HLK1 #H >H in HL1; -H + lapply (drop_fwd_length … HLK2) -HLK2 #H >H in HL2; -H + /3 width=1 by llpx_sn_free, le_plus_to_minus_r/ + ] +| #L1 #L2 #l0 #p #HL12 #K1 #K2 #l #m #HLK1 #HLK2 #X #H #_ >(lift_inv_gref2 … H) -X + lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -l + /2 width=1 by llpx_sn_gref/ +| #a #I #L1 #L2 #W #U #l0 #_ #_ #IHW #IHU #K1 #K2 #l #m #HLK1 #HLK2 #X #H #Hlml0 elim (lift_inv_bind2 … H) -H + #V #T #HVW #HTU #H destruct + @llpx_sn_bind [ /2 width=5 by/ ] -IHW (**) (* explicit constructor *) + yminus_Y_inj #K1 #HK12 #HLK1 + lapply (lreq_inv_O_Y … HK12) -HK12 #H destruct /2 width=9 by llpx_sn_lref/ +| /4 width=5 by llpx_sn_free, lreq_fwd_length, le_repl_sn_trans_aux, trans_eq/ +| /4 width=1 by llpx_sn_bind, lreq_succ/ +] +qed-. + +lemma llpx_sn_lreq_trans: ∀R,L,L1,T,l. llpx_sn R l T L L1 → + ∀L2. L1 ⩬[l, ∞] L2 → llpx_sn R l T L L2. +#R #L #L1 #T #l #H elim H -L -L1 -T -l +/4 width=5 by llpx_sn_flat, llpx_sn_gref, llpx_sn_skip, llpx_sn_sort, lreq_fwd_length, trans_eq/ +[ #I #L #L1 #K #K1 #V #V1 #l #i #Hli #HLK #HLK1 #HK1 #HV1 #_ #L2 #HL12 + elim (lreq_drop_conf_be … HL12 … HLK1) -L1 // >yminus_Y_inj #K2 #HK12 #HLK2 + lapply (lreq_inv_O_Y … HK12) -HK12 #H destruct /2 width=9 by llpx_sn_lref/ +| /4 width=5 by llpx_sn_free, lreq_fwd_length, le_repl_sn_conf_aux, trans_eq/ +| /4 width=1 by llpx_sn_bind, lreq_succ/ +] +qed-. + +lemma llpx_sn_lreq_repl: ∀R,L1,L2,T,l. llpx_sn R l T L1 L2 → ∀K1. K1 ⩬[l, ∞] L1 → + ∀K2. L2 ⩬[l, ∞] K2 → llpx_sn R l T K1 K2. +/3 width=4 by llpx_sn_lreq_trans, lreq_llpx_sn_trans/ qed-. + +lemma llpx_sn_bind_repl_SO: ∀R,I1,I2,L1,L2,V1,V2,T. llpx_sn R 0 T (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) → + ∀J1,J2,W1,W2. llpx_sn R 1 T (L1.ⓑ{J1}W1) (L2.ⓑ{J2}W2). +#R #I1 #I2 #L1 #L2 #V1 #V2 #T #HT #J1 #J2 #W1 #W2 lapply (llpx_sn_ge R … 1 … HT) -HT +/3 width=7 by llpx_sn_lreq_repl, lreq_succ/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_tc.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_tc.ma new file mode 100644 index 000000000..97e058039 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/llpx_sn_tc.ma @@ -0,0 +1,26 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llpx_sn_drop.ma". + +(* LAZY SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS ****) + +(* Properties about transitive closure **************************************) + +lemma llpx_sn_TC_pair_dx: ∀R. (∀L. reflexive … (R L)) → + ∀I,L,V1,V2,T. LTC … R L V1 V2 → + LTC … (llpx_sn R 0) T (L.ⓑ{I}V1) (L.ⓑ{I}V2). +#R #HR #I #L #V1 #V2 #T #H @(TC_star_ind … V2 H) -V2 +/4 width=9 by llpx_sn_bind_repl_O, llpx_sn_refl, step, inj/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2.ma new file mode 100644 index 000000000..34f1691de --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rat_3.ma". +include "basic_2A/grammar/term_vector.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +inductive at: list2 nat nat → relation nat ≝ +| at_nil: ∀i. at (◊) i i +| at_lt : ∀cs,l,m,i1,i2. i1 < l → + at cs i1 i2 → at ({l, m} @ cs) i1 i2 +| at_ge : ∀cs,l,m,i1,i2. l ≤ i1 → + at cs (i1 + m) i2 → at ({l, m} @ cs) i1 i2 +. + +interpretation "application (multiple relocation with pairs)" + 'RAt i1 cs i2 = (at cs i1 i2). + +(* Basic inversion lemmas ***************************************************) + +fact at_inv_nil_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → cs = ◊ → i1 = i2. +#cs #i1 #i2 * -cs -i1 -i2 +[ // +| #cs #l #m #i1 #i2 #_ #_ #H destruct +| #cs #l #m #i1 #i2 #_ #_ #H destruct +] +qed-. + +lemma at_inv_nil: ∀i1,i2. @⦃i1, ◊⦄ ≡ i2 → i1 = i2. +/2 width=3 by at_inv_nil_aux/ qed-. + +fact at_inv_cons_aux: ∀cs,i1,i2. @⦃i1, cs⦄ ≡ i2 → + ∀l,m,cs0. cs = {l, m} @ cs0 → + i1 < l ∧ @⦃i1, cs0⦄ ≡ i2 ∨ + l ≤ i1 ∧ @⦃i1 + m, cs0⦄ ≡ i2. +#cs #i1 #i2 * -cs -i1 -i2 +[ #i #l #m #cs #H destruct +| #cs1 #l1 #m1 #i1 #i2 #Hil1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/ +| #cs1 #l1 #m1 #i1 #i2 #Hli1 #Hi12 #l2 #m2 #cs2 #H destruct /3 width=1 by or_intror, conj/ +] +qed-. + +lemma at_inv_cons: ∀cs,l,m,i1,i2. @⦃i1, {l, m} @ cs⦄ ≡ i2 → + i1 < l ∧ @⦃i1, cs⦄ ≡ i2 ∨ + l ≤ i1 ∧ @⦃i1 + m, cs⦄ ≡ i2. +/2 width=3 by at_inv_cons_aux/ qed-. + +lemma at_inv_cons_lt: ∀cs,l,m,i1,i2. @⦃i1, {l, m} @ cs⦄ ≡ i2 → + i1 < l → @⦃i1, cs⦄ ≡ i2. +#cs #l #m #i1 #m2 #H +elim (at_inv_cons … H) -H * // #Hli1 #_ #Hi1l +lapply (le_to_lt_to_lt … Hli1 Hi1l) -Hli1 -Hi1l #Hl +elim (lt_refl_false … Hl) +qed-. + +lemma at_inv_cons_ge: ∀cs,l,m,i1,i2. @⦃i1, {l, m} @ cs⦄ ≡ i2 → + l ≤ i1 → @⦃i1 + m, cs⦄ ≡ i2. +#cs #l #m #i1 #m2 #H +elim (at_inv_cons … H) -H * // #Hi1l #_ #Hli1 +lapply (le_to_lt_to_lt … Hli1 Hi1l) -Hli1 -Hi1l #Hl +elim (lt_refl_false … Hl) +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_minus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_minus.ma new file mode 100644 index 000000000..8eb1a5550 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_minus.ma @@ -0,0 +1,76 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rminus_3.ma". +include "basic_2A/multiple/mr2.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +inductive minuss: nat → relation (list2 nat nat) ≝ +| minuss_nil: ∀i. minuss i (◊) (◊) +| minuss_lt : ∀cs1,cs2,l,m,i. i < l → minuss i cs1 cs2 → + minuss i ({l, m} @ cs1) ({l - i, m} @ cs2) +| minuss_ge : ∀cs1,cs2,l,m,i. l ≤ i → minuss (m + i) cs1 cs2 → + minuss i ({l, m} @ cs1) cs2 +. + +interpretation "minus (multiple relocation with pairs)" + 'RMinus cs1 i cs2 = (minuss i cs1 cs2). + +(* Basic inversion lemmas ***************************************************) + +fact minuss_inv_nil1_aux: ∀cs1,cs2,i. cs1 ▭ i ≡ cs2 → cs1 = ◊ → cs2 = ◊. +#cs1 #cs2 #i * -cs1 -cs2 -i +[ // +| #cs1 #cs2 #l #m #i #_ #_ #H destruct +| #cs1 #cs2 #l #m #i #_ #_ #H destruct +] +qed-. + +lemma minuss_inv_nil1: ∀cs2,i. ◊ ▭ i ≡ cs2 → cs2 = ◊. +/2 width=4 by minuss_inv_nil1_aux/ qed-. + +fact minuss_inv_cons1_aux: ∀cs1,cs2,i. cs1 ▭ i ≡ cs2 → + ∀l,m,cs. cs1 = {l, m} @ cs → + l ≤ i ∧ cs ▭ m + i ≡ cs2 ∨ + ∃∃cs0. i < l & cs ▭ i ≡ cs0 & + cs2 = {l - i, m} @ cs0. +#cs1 #cs2 #i * -cs1 -cs2 -i +[ #i #l #m #cs #H destruct +| #cs1 #cs #l1 #m1 #i1 #Hil1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=3 by ex3_intro, or_intror/ +| #cs1 #cs #l1 #m1 #i1 #Hli1 #Hcs #l2 #m2 #cs2 #H destruct /3 width=1 by or_introl, conj/ +] +qed-. + +lemma minuss_inv_cons1: ∀cs1,cs2,l,m,i. {l, m} @ cs1 ▭ i ≡ cs2 → + l ≤ i ∧ cs1 ▭ m + i ≡ cs2 ∨ + ∃∃cs. i < l & cs1 ▭ i ≡ cs & + cs2 = {l - i, m} @ cs. +/2 width=3 by minuss_inv_cons1_aux/ qed-. + +lemma minuss_inv_cons1_ge: ∀cs1,cs2,l,m,i. {l, m} @ cs1 ▭ i ≡ cs2 → + l ≤ i → cs1 ▭ m + i ≡ cs2. +#cs1 #cs2 #l #m #i #H +elim (minuss_inv_cons1 … H) -H * // #cs #Hil #_ #_ #Hli +lapply (lt_to_le_to_lt … Hil Hli) -Hil -Hli #Hi +elim (lt_refl_false … Hi) +qed-. + +lemma minuss_inv_cons1_lt: ∀cs1,cs2,l,m,i. {l, m} @ cs1 ▭ i ≡ cs2 → + i < l → + ∃∃cs. cs1 ▭ i ≡ cs & cs2 = {l - i, m} @ cs. +#cs1 #cs2 #l #m #i #H elim (minuss_inv_cons1 … H) -H * /2 width=3 by ex2_intro/ +#Hli #_ #Hil lapply (lt_to_le_to_lt … Hil Hli) -Hil -Hli +#Hi elim (lt_refl_false … Hi) +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_mr2.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_mr2.ma new file mode 100644 index 000000000..20702f6a6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_mr2.ma @@ -0,0 +1,29 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/mr2.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +(* Main properties **********************************************************) + +theorem at_mono: ∀cs,i,i1. @⦃i, cs⦄ ≡ i1 → ∀i2. @⦃i, cs⦄ ≡ i2 → i1 = i2. +#cs #i #i1 #H elim H -cs -i -i1 +[ #i #x #H <(at_inv_nil … H) -x // +| #cs #l #m #i #i1 #Hil #_ #IHi1 #x #H + lapply (at_inv_cons_lt … H Hil) -H -Hil /2 width=1 by/ +| #cs #l #m #i #i1 #Hli #_ #IHi1 #x #H + lapply (at_inv_cons_ge … H Hli) -H -Hli /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_plus.ma b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_plus.ma new file mode 100644 index 000000000..fe66fa1bc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/multiple/mr2_plus.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/mr2.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +let rec pluss (cs:list2 nat nat) (i:nat) on cs ≝ match cs with +[ nil2 ⇒ ◊ +| cons2 l m cs ⇒ {l + i, m} @ pluss cs i +]. + +interpretation "plus (multiple relocation with pairs)" + 'plus x y = (pluss x y). + +(* Basic inversion lemmas ***************************************************) + +lemma pluss_inv_nil2: ∀i,cs. cs + i = ◊ → cs = ◊. +#i * // normalize +#l #m #cs #H destruct +qed. + +lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = {l, m} @ cs2 → + ∃∃cs1. cs1 + i = cs2 & cs = {l - i, m} @ cs1. +#i #l #m #cs2 * normalize +[ #H destruct +| #l1 #m1 #cs1 #H destruct /2 width=3 by ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabbr_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabbr_2.ma new file mode 100644 index 000000000..afd2f1892 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabbr_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 . break ⓓ T2 )" + left associative with precedence 48 + for @{ 'DxAbbr $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabst_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabst_2.ma new file mode 100644 index 000000000..43e324eae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxabst_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 . break ⓛ T2 )" + left associative with precedence 49 + for @{ 'DxAbst $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxbind2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxbind2_3.ma new file mode 100644 index 000000000..bbded1eab --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/dxbind2_3.ma @@ -0,0 +1,23 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation > "hvbox( T . break ②{ term 46 I } break term 47 T1 )" + non associative with precedence 46 + for @{ 'DxBind2 $T $I $T1 }. + +notation "hvbox( T . break ⓑ { term 46 I } break term 48 T1 )" + non associative with precedence 47 + for @{ 'DxBind2 $T $I $T1 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/gref_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/gref_1.ma new file mode 100644 index 000000000..d22748809 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/gref_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( § term 90 p )" + non associative with precedence 55 + for @{ 'GRef $p }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_0.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_0.ma new file mode 100644 index 000000000..b6e471d3d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "⓪" + non associative with precedence 55 + for @{ 'Item0 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_1.ma new file mode 100644 index 000000000..2c9e41aef --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/item0_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓪ { term 46 I } )" + non associative with precedence 55 + for @{ 'Item0 $I }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/lref_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/lref_1.ma new file mode 100644 index 000000000..ebab03c01 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/lref_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( # term 90 i )" + non associative with precedence 55 + for @{ 'LRef $i }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbr_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbr_3.ma new file mode 100644 index 000000000..44116053b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbr_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓓ { term 46 a } break term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbr $a $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrneg_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrneg_2.ma new file mode 100644 index 000000000..13786d9bc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrneg_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓓ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbrNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrpos_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrpos_2.ma new file mode 100644 index 000000000..ae76f1958 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabbrpos_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓓ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbbrPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabst_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabst_3.ma new file mode 100644 index 000000000..8ba34495d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabst_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓛ { term 46 a } break term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbst $a $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstneg_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstneg_2.ma new file mode 100644 index 000000000..277b58b11 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstneg_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓛ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbstNeg $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstpos_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstpos_2.ma new file mode 100644 index 000000000..9e22bc7ac --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snabstpos_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓛ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAbstPos $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snappl_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snappl_2.ma new file mode 100644 index 000000000..c1acadba2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snappl_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓐ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnAppl $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2_4.ma new file mode 100644 index 000000000..ceae73562 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓑ { term 46 a , break term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2 $a $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2neg_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2neg_3.ma new file mode 100644 index 000000000..428fe734d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2neg_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( - ⓑ { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2Neg $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2pos_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2pos_3.ma new file mode 100644 index 000000000..b89b95822 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snbind2pos_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( + ⓑ { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnBind2Pos $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/sncast_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/sncast_2.ma new file mode 100644 index 000000000..55565d099 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/sncast_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓝ term 55 T1 . break term 55 T2 )" + non associative with precedence 55 + for @{ 'SnCast $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snflat2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snflat2_3.ma new file mode 100644 index 000000000..ef0bdb8cb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snflat2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓕ { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnFlat2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_2.ma new file mode 100644 index 000000000..82044eae6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ② term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnItem2 $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_3.ma new file mode 100644 index 000000000..9fdf70bf2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/snitem2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ② { term 46 I } break term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnItem2 $I $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_0.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_0.ma new file mode 100644 index 000000000..8cf6da569 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "⋆" + non associative with precedence 46 + for @{ 'Star }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_1.ma new file mode 100644 index 000000000..6307ed9e9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/constructors/star_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⋆ term 90 k )" + non associative with precedence 55 + for @{ 'Star $k }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabbr_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabbr_2.ma new file mode 100644 index 000000000..4051c2085 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabbr_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓓ term 55 T . break term 55 L )" + non associative with precedence 55 + for @{ 'SnAbbr $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabst_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabst_2.ma new file mode 100644 index 000000000..838bd007f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snabst_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓛ term 55 T . break term 55 L )" + non associative with precedence 55 + for @{ 'SnAbst $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snapplvector_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snapplvector_2.ma new file mode 100644 index 000000000..e59520265 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snapplvector_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( Ⓐ term 55 T1 . break term 55 T )" + non associative with precedence 55 + for @{ 'SnApplVector $T1 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snbind2_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snbind2_3.ma new file mode 100644 index 000000000..fa44f2928 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/snbind2_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⓑ { term 46 I } break term 55 T . break term 55 L )" + non associative with precedence 55 + for @{ 'SnBind2 $I $T $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_1.ma new file mode 100644 index 000000000..31b4fe655 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 x } )" + non associative with precedence 90 + for @{ 'Weight $x }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_2.ma new file mode 100644 index 000000000..a2b9b474b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 L , break term 46 T } )" + non associative with precedence 90 + for @{ 'Weight $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_3.ma new file mode 100644 index 000000000..42b3c60ec --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/functions/weight_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ♯ { term 46 G , break term 46 L , break term 46 T } )" + non associative with precedence 90 + for @{ 'Weight $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/notation.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/notation.ma new file mode 100644 index 000000000..0996c7cdb --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/notation.ma @@ -0,0 +1,47 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃G, L⦄ ⊢ break ⌘ ⦃ term 46 T ⦄ ≡ break term 46 k )" + non associative with precedence 45 + for @{ 'ICM $L $T $k }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T ÷ break term 46 A )" + non associative with precedence 45 + for @{ 'BinaryArity $h $L $T $A }. + +notation "hvbox( h ⊢ break term 46 L1 ÷ ⫃ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqB $h $L1 $L2 }. + +notation "hvbox( L1 ⊢ ⬌ break term 46 L2 )" + non associative with precedence 45 + for @{ 'PConvSn $L1 $L2 }. + +notation "hvbox( L1 ⊢ ⬌* break term 46 L2 )" + non associative with precedence 45 + for @{ 'PConvSnStar $L1 $L2 }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : break term 46 T2 )" + non associative with precedence 45 + for @{ 'NativeType $h $L $T1 $T2 }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : : break term 46 T2 )" + non associative with precedence 45 + for @{ 'NativeTypeAlt $h $L $T1 $T2 }. + +notation "hvbox( ⦃ term 46 h , break term 46 L ⦄ ⊢ break term 46 T1 : * break term 46 T2 )" + non associative with precedence 45 + for @{ 'NativeTypeStar $h $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/atomicarity_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/atomicarity_4.ma new file mode 100644 index 000000000..e6a1b0924 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/atomicarity_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃term 46 G, break term 46 L⦄ ⊢ break term 46 T ⁝ break term 46 A )" + non associative with precedence 45 + for @{ 'AtomicArity $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpred_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpred_8.ma new file mode 100644 index 000000000..80e40a157 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpred_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≽ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRed $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredalt_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredalt_8.ma new file mode 100644 index 000000000..c3f111a0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredalt_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≽ ≽ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedAlt $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredproper_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredproper_8.ma new file mode 100644 index 000000000..bb6d3d1af --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredproper_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≻ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedProper $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstar_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstar_8.ma new file mode 100644 index 000000000..3943a33fd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstar_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≥ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedStar $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstaralt_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstaralt_8.ma new file mode 100644 index 000000000..227a666f2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btpredstaralt_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≥ ≥ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'BTPRedStarAlt $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsn_5.ma new file mode 100644 index 000000000..207ba13bf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦥ [ term 46 h, break term 46 g ] break ⦃ term 46 G, break term 46 L, break term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'BTSN $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsnalt_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsnalt_5.ma new file mode 100644 index 000000000..7c6d69120 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/btsnalt_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦥ ⦥ [ term 46 h, break term 46 g ] break ⦃ term 46 G, break term 46 L, break term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'BTSNAlt $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/cosn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/cosn_5.ma new file mode 100644 index 000000000..be4f9a4a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/cosn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ ~ ⬊ * break [ term 46 h , break term 46 g , break term 46 l ] break term 46 L )" + non associative with precedence 45 + for @{ 'CoSN $h $g $l $G $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/degree_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/degree_6.ma new file mode 100644 index 000000000..7602a6544 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/degree_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T ▪ break [ term 46 h , break term 46 g ] break term 46 d )" + non associative with precedence 45 + for @{ 'Degree $h $g $G $L $T $d }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpconvstar_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpconvstar_8.ma new file mode 100644 index 000000000..9aa3568af --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpconvstar_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 • * ⬌ * break [ term 46 h , break term 46 g , break term 46 n1 , break term 46 n2 ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'DPConvStar $h $g $n1 $n2 $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpredstar_7.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpredstar_7.ma new file mode 100644 index 000000000..c5f55aed8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/dpredstar_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 • * ➡ * break [ term 46 h , break term 46 g , break term 46 n ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'DPRedStar $h $g $n $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/freestar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/freestar_4.ma new file mode 100644 index 000000000..e46480639 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/freestar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L ⊢ break term 46 i ϵ 𝐅 * [ break term 46 l ] ⦃ break term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'FreeStar $L $i $l $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/ineint_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/ineint_5.ma new file mode 100644 index 000000000..83f23ef23 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/ineint_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L, break term 46 T ⦄ ϵ break [ term 46 R ] break 〚term 46 A 〛 )" + non associative with precedence 45 + for @{ 'InEInt $R $G $L $T $A }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazybtpredstarproper_8.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazybtpredstarproper_8.ma new file mode 100644 index 000000000..e56e02e46 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazybtpredstarproper_8.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ >≡ break [ term 46 h, break term 46 g ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'LazyBTPRedStarProper $h $g $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_4.ma new file mode 100644 index 000000000..a6b02b3cc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ≡ break [ term 46 T , break term 46 l ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LazyEq $T $l $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_7.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_7.ma new file mode 100644 index 000000000..79a79e2c0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyeq_7.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ≡ break [ term 46 l ] break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'LazyEq $l $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyor_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyor_5.ma new file mode 100644 index 000000000..6479c1f71 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lazyor_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⋓ break [ term 46 T , break term 46 l ] break term 46 L2 ≡ break term 46 L )" + non associative with precedence 45 + for @{ 'LazyOr $L1 $T $l $L2 $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeq_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeq_4.ma new file mode 100644 index 000000000..994e6b22b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeq_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 break ⊆ [ term 46 l , break term 46 m ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEq $L1 $l $m $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqa_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqa_3.ma new file mode 100644 index 000000000..c3b74a96a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqa_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ ⁝ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqA $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_2.ma new file mode 100644 index 000000000..3a6e5eded --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⫃ break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqC $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_4.ma new file mode 100644 index 000000000..823d6bebf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqc_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ break [ term 46 R ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqC $R $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqd_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqd_5.ma new file mode 100644 index 000000000..d90e35183 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqd_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ ▪ break [ term 46 h, break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqD $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqv_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqv_5.ma new file mode 100644 index 000000000..f6595e14d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/lrsubeqv_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ break term 46 L1 ⫃ ¡ break [ term 46 h, break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'LRSubEqV $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/midiso_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/midiso_4.ma new file mode 100644 index 000000000..dc380d849 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/midiso_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( L1 ⩬ break [ term 46 l , break term 46 m ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'MidIso $l $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_5.ma new file mode 100644 index 000000000..d6426f6c1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T ¡ break [ term 46 h, break term 46 g ] )" + non associative with precedence 45 + for @{ 'NativeValid $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_6.ma new file mode 100644 index 000000000..449fe1452 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/nativevalid_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T ¡ break [ term 46 h , break term 46 g , break term 46 d ] )" + non associative with precedence 45 + for @{ 'NativeValid $h $g $d $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconv_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconv_4.ma new file mode 100644 index 000000000..a7563d0c0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconv_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ⬌ break term 46 T2 )" + non associative with precedence 45 + for @{ 'PConv $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconvstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconvstar_4.ma new file mode 100644 index 000000000..f263e5d06 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pconvstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ⬌* break term 46 T2 )" + non associative with precedence 45 + for @{ 'PConvStar $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_4.ma new file mode 100644 index 000000000..397ac935f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 ➡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRed $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_6.ma new file mode 100644 index 000000000..1a423e465 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/pred_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ break [ term 46 h , break term 46 g ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRed $h $g $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_4.ma new file mode 100644 index 000000000..e26cfe6d3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break 𝐍 ⦃ term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'PRedEval $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_6.ma new file mode 100644 index 000000000..8360d142a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predeval_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 h , break term 46 g ] break 𝐍 ⦃ term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'PRedEval $h $g $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_3.ma new file mode 100644 index 000000000..a8806a1c7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ ➡ 𝐍 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNormal $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_5.ma new file mode 100644 index 000000000..d1e001d85 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednormal_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] 𝐍 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNormal $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_3.ma new file mode 100644 index 000000000..4ad7cbc72 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ ➡ 𝐈 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNotReducible $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_5.ma new file mode 100644 index 000000000..cb33d31e2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/prednotreducible_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] 𝐈 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedNotReducible $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_3.ma new file mode 100644 index 000000000..5d84a363d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ ➡ 𝐑 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedReducible $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_5.ma new file mode 100644 index 000000000..82ded9c03 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predreducible_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] 𝐑 break ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'PRedReducible $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_3.ma new file mode 100644 index 000000000..d06064a29 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L1 ⦄ ⊢ ➡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSn $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_5.ma new file mode 100644 index 000000000..206566071 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡ break [ term 46 h , break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSn $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_3.ma new file mode 100644 index 000000000..2bcf32665 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L1 ⦄ ⊢ ➡* break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSnStar $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_5.ma new file mode 100644 index 000000000..aef4f2707 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predsnstar_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ➡ * break [ term 46 h , break term 46 g ] break term 46 L2 )" + non associative with precedence 45 + for @{ 'PRedSnStar $h $g $G $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_4.ma new file mode 100644 index 000000000..24984270d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , term 46 L ⦄ ⊢ break term 46 T1 ➡ * break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRedStar $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_6.ma new file mode 100644 index 000000000..54ac66647 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/predstar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ break term 46 T1 ➡ * break [ term 46 h , break term 46 g ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PRedStar $h $g $G $L $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubst_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubst_6.ma new file mode 100644 index 000000000..e35f7ca23 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubst_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ [ term 46 l , break term 46 m ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PSubst $G $L $T1 $l $m $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststar_6.ma new file mode 100644 index 000000000..2dd1f2d6e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ * [ term 46 l , break term 46 m ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PSubstStar $G $L $T1 $l $m $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststaralt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststaralt_6.ma new file mode 100644 index 000000000..97227dccf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/psubststaralt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 break ▶ ▶ * [ term 46 l , break term 46 m ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'PSubstStarAlt $G $L $T1 $l $m $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rat_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rat_3.ma new file mode 100644 index 000000000..a63dc95f2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rat_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( @ ⦃ term 46 T1 , break term 46 f ⦄ ≡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'RAt $T1 $f $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_3.ma new file mode 100644 index 000000000..a761d47c6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ [ term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDrop $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_4.ma new file mode 100644 index 000000000..2345f0684 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ [ term 46 l , break term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDrop $l $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_5.ma new file mode 100644 index 000000000..d8c06726e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdrop_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ [ term 46 s , break term 46 l , break term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDrop $s $l $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_3.ma new file mode 100644 index 000000000..8a6f2f4c1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ * [ term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDropStar $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_4.ma new file mode 100644 index 000000000..291de4c0e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rdropstar_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬇ * [ term 46 s , break term 46 m ] break term 46 L1 ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'RDropStar $s $m $L1 $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rlift_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rlift_4.ma new file mode 100644 index 000000000..e2a03284e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rlift_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬆ [ term 46 l , break term 46 m ] break term 46 T1 ≡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'RLift $l $m $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rliftstar_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rliftstar_3.ma new file mode 100644 index 000000000..af4de47ba --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rliftstar_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⬆ * [ term 46 m ] break term 46 T1 ≡ break term 46 T2 )" + non associative with precedence 45 + for @{ 'RLiftStar $m $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rminus_3.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rminus_3.ma new file mode 100644 index 000000000..c896a982f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/rminus_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 ▭ break term 46 T2 ≡ break term 46 T )" + non associative with precedence 45 + for @{ 'RMinus $T1 $T2 $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/simple_1.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/simple_1.ma new file mode 100644 index 000000000..0acfb4ef7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/simple_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( 𝐒 ⦃ term 46 T ⦄ )" + non associative with precedence 45 + for @{ 'Simple $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_5.ma new file mode 100644 index 000000000..bfc7d0cb0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬊ * break [ term 46 h , break term 46 g ] break term 46 T )" + non associative with precedence 45 + for @{ 'SN $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_6.ma new file mode 100644 index 000000000..c402cdc8a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/sn_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ ⬊ * break [ term 46 h , break term 46 g , break term 46 T , break term 46 l ] break term 46 L )" + non associative with precedence 45 + for @{ 'SN $h $g $T $l $G $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_5.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_5.ma new file mode 100644 index 000000000..13fed06c7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_5.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L ⦄ ⊢ ⬊ ⬊ * break [ term 46 h , break term 46 g ] break term 46 T )" + non associative with precedence 45 + for @{ 'SNAlt $h $g $G $L $T }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_6.ma new file mode 100644 index 000000000..4beb9fdcf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/snalt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( G ⊢ ⬊ ⬊ * break [ term 46 h , break term 46 g , break term 46 T , break term 46 l ] break term 46 L )" + non associative with precedence 45 + for @{ 'SNAlt $h $g $T $l $G $L }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/statictypestar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/statictypestar_6.ma new file mode 100644 index 000000000..b7d6a71e0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/statictypestar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G , break term 46 L ⦄ ⊢ break term 46 T1 •* break [ term 46 h , break term 46 n ] break term 46 T2 )" + non associative with precedence 45 + for @{ 'StaticTypeStar $h $G $L $n $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/supterm_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/supterm_6.ma new file mode 100644 index 000000000..1300f0fa5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/supterm_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐ break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTerm $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermopt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermopt_6.ma new file mode 100644 index 000000000..8ed1123b4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermopt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⸮ break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermOpt $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermoptalt_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermoptalt_6.ma new file mode 100644 index 000000000..7748c1836 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermoptalt_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, break term 46 L1, break term 46 T1 ⦄ ⊐⊐⸮ break ⦃ term 46 G2, break term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermOptAlt $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermplus_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermplus_6.ma new file mode 100644 index 000000000..533b88cdf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermplus_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ + break ⦃ term 46 G2, term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermPlus $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermstar_6.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermstar_6.ma new file mode 100644 index 000000000..f2abfc20f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/suptermstar_6.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G1, term 46 L1, break term 46 T1 ⦄ ⊐ * break ⦃ term 46 G2, term 46 L2 , break term 46 T2 ⦄ )" + non associative with precedence 45 + for @{ 'SupTermStar $G1 $L1 $T1 $G2 $L2 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/topiso_2.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/topiso_2.ma new file mode 100644 index 000000000..059b4372b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/topiso_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( T1 ≂ break term 46 T2 )" + non associative with precedence 45 + for @{ 'TopIso $T1 $T2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/unfold_4.ma b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/unfold_4.ma new file mode 100644 index 000000000..3381c5632 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/notation/relations/unfold_4.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************) + +notation "hvbox( ⦃ term 46 G, break term 46 L1 ⦄ ⊢ ⧫ * break term 46 T ≡ break term 46 L2 )" + non associative with precedence 45 + for @{ 'Unfold $G $L1 $T $L2 }. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir.ma new file mode 100644 index 000000000..6868ce39a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir.ma @@ -0,0 +1,79 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/prednotreducible_3.ma". +include "basic_2A/reduction/crr.ma". + +(* IRREDUCIBLE TERMS FOR CONTEXT-SENSITIVE REDUCTION ************************) + +definition cir: relation3 genv lenv term ≝ λG,L,T. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → ⊥. + +interpretation "irreducibility for context-sensitive reduction (term)" + 'PRedNotReducible G L T = (cir G L T). + +(* Basic inversion lemmas ***************************************************) + +lemma cir_inv_delta: ∀G,L,K,V,i. ⬇[i] L ≡ K.ⓓV → ⦃G, L⦄ ⊢ ➡ 𝐈⦃#i⦄ → ⊥. +/3 width=3 by crr_delta/ qed-. + +lemma cir_inv_ri2: ∀I,G,L,V,T. ri2 I → ⦃G, L⦄ ⊢ ➡ 𝐈⦃②{I}V.T⦄ → ⊥. +/3 width=1 by crr_ri2/ qed-. + +lemma cir_inv_ib2: ∀a,I,G,L,V,T. ib2 a I → ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓑ{a,I}V.T⦄ → + ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ➡ 𝐈⦃T⦄. +/4 width=1 by crr_ib2_sn, crr_ib2_dx, conj/ qed-. + +lemma cir_inv_bind: ∀a,I,G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓑ{a,I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ & ⦃G, L.ⓑ{I}V⦄ ⊢ ➡ 𝐈⦃T⦄ & ib2 a I. +#a * [ elim a -a ] +#G #L #V #T #H [ elim H -H /3 width=1 by crr_ri2, or_introl/ ] +elim (cir_inv_ib2 … H) -H /3 width=1 by and3_intro, or_introl/ +qed-. + +lemma cir_inv_appl: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓐV.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ & 𝐒⦃T⦄. +#G #L #V #T #HVT @and3_intro /3 width=1 by crr_appl_sn, crr_appl_dx/ +generalize in match HVT; -HVT elim T -T // +* // #a * #U #T #_ #_ #H elim H -H /2 width=1 by crr_beta, crr_theta/ +qed-. + +lemma cir_inv_flat: ∀I,G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓕ{I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ & 𝐒⦃T⦄ & I = Appl. +* #G #L #V #T #H +[ elim (cir_inv_appl … H) -H /2 width=1 by and4_intro/ +| elim (cir_inv_ri2 … H) -H // +] +qed-. + +(* Basic properties *********************************************************) + +lemma cir_sort: ∀G,L,k. ⦃G, L⦄ ⊢ ➡ 𝐈⦃⋆k⦄. +/2 width=4 by crr_inv_sort/ qed. + +lemma cir_gref: ∀G,L,p. ⦃G, L⦄ ⊢ ➡ 𝐈⦃§p⦄. +/2 width=4 by crr_inv_gref/ qed. + +lemma tir_atom: ∀G,I. ⦃G, ⋆⦄ ⊢ ➡ 𝐈⦃⓪{I}⦄. +/2 width=3 by trr_inv_atom/ qed. + +lemma cir_ib2: ∀a,I,G,L,V,T. + ib2 a I → ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ → ⦃G, L.ⓑ{I}V⦄ ⊢ ➡ 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓑ{a,I}V.T⦄. +#a #I #G #L #V #T #HI #HV #HT #H +elim (crr_inv_ib2 … HI H) -HI -H /2 width=1 by/ +qed. + +lemma cir_appl: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃V⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ → 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃ⓐV.T⦄. +#G #L #V #T #HV #HT #H1 #H2 +elim (crr_inv_appl … H2) -H2 /2 width=1 by/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir_lift.ma new file mode 100644 index 000000000..672cf11b0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cir_lift.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/crr_lift.ma". +include "basic_2A/reduction/cir.ma". + +(* IRREDUCIBLE TERMS FOR CONTEXT-SENSITIVE REDUCTION ************************) + +(* Properties on relocation *************************************************) + +lemma cir_lift: ∀G,K,T. ⦃G, K⦄ ⊢ ➡ 𝐈⦃T⦄ → ∀L,s,l,m. ⬇[s, l, m] L ≡ K → + ∀U. ⬆[l, m] T ≡ U → ⦃G, L⦄ ⊢ ➡ 𝐈⦃U⦄. +/3 width=8 by crr_inv_lift/ qed. + +lemma cir_inv_lift: ∀G,L,U. ⦃G, L⦄ ⊢ ➡ 𝐈⦃U⦄ → ∀K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ ➡ 𝐈⦃T⦄. +/3 width=8 by crr_lift/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cix.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cix.ma new file mode 100644 index 000000000..bcce8ae40 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cix.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/prednotreducible_5.ma". +include "basic_2A/reduction/cir.ma". +include "basic_2A/reduction/crx.ma". + +(* IRREDUCIBLE TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ***************) + +definition cix: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → ⊥. + +interpretation "irreducibility for context-sensitive extended reduction (term)" + 'PRedNotReducible h g G L T = (cix h g G L T). + +(* Basic inversion lemmas ***************************************************) + +lemma cix_inv_sort: ∀h,g,G,L,k,d. deg h g k (d+1) → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃⋆k⦄ → ⊥. +/3 width=2 by crx_sort/ qed-. + +lemma cix_inv_delta: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃#i⦄ → ⊥. +/3 width=4 by crx_delta/ qed-. + +lemma cix_inv_ri2: ∀h,g,I,G,L,V,T. ri2 I → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃②{I}V.T⦄ → ⊥. +/3 width=1 by crx_ri2/ qed-. + +lemma cix_inv_ib2: ∀h,g,a,I,G,L,V,T. ib2 a I → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓑ{a,I}V.T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ ∧ ⦃G, L.ⓑ{I}V⦄ ⊢ ➡[h, g] 𝐈⦃T⦄. +/4 width=1 by crx_ib2_sn, crx_ib2_dx, conj/ qed-. + +lemma cix_inv_bind: ∀h,g,a,I,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓑ{a,I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ & ⦃G, L.ⓑ{I}V⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ & ib2 a I. +#h #g #a * [ elim a -a ] +#G #L #V #T #H [ elim H -H /3 width=1 by crx_ri2, or_introl/ ] +elim (cix_inv_ib2 … H) -H /3 width=1 by and3_intro, or_introl/ +qed-. + +lemma cix_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓐV.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ & 𝐒⦃T⦄. +#h #g #G #L #V #T #HVT @and3_intro /3 width=1 by crx_appl_sn, crx_appl_dx/ +generalize in match HVT; -HVT elim T -T // +* // #a * #U #T #_ #_ #H elim H -H /2 width=1 by crx_beta, crx_theta/ +qed-. + +lemma cix_inv_flat: ∀h,g,I,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃ⓕ{I}V.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃V⦄ & ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ & 𝐒⦃T⦄ & I = Appl. +#h #g * #G #L #V #T #H +[ elim (cix_inv_appl … H) -H /2 width=1 by and4_intro/ +| elim (cix_inv_ri2 … H) -H // +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cix_inv_cir: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄. +/3 width=1 by crr_crx/ qed-. + +(* Basic properties *********************************************************) + +lemma cix_sort: ∀h,g,G,L,k. deg h g k 0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃⋆k⦄. +#h #g #G #L #k #Hk #H elim (crx_inv_sort … H) -L #d #Hkd +lapply (deg_mono … Hk Hkd) -h -k (cpr_inv_sort1 … H) // +qed. + +lemma cnr_lref_free: ∀G,L,i. |L| ≤ i → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄. +#G #L #i #Hi #X #H elim (cpr_inv_lref1 … H) -H // * +#K #V1 #V2 #HLK lapply (drop_fwd_length_lt2 … HLK) -HLK +#H elim (lt_refl_false i) /2 width=3 by lt_to_le_to_lt/ +qed. + +(* Basic_1: was only: nf2_csort_lref *) +lemma cnr_lref_atom: ∀G,L,i. ⬇[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄. +#G #L #i #HL @cnr_lref_free >(drop_fwd_length … HL) -HL // +qed. + +(* Basic_1: was: nf2_abst *) +lemma cnr_abst: ∀a,G,L,W,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃W⦄ → ⦃G, L.ⓛW⦄ ⊢ ➡ 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓛ{a}W.T⦄. +#a #G #L #W #T #HW #HT #X #H +elim (cpr_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct +>(HW … HW0) -W0 >(HT … HT0) -T0 // +qed. + +(* Basic_1: was only: nf2_appl_lref *) +lemma cnr_appl_simple: ∀G,L,V,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃V⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃ⓐV.T⦄. +#G #L #V #T #HV #HT #HS #X #H +elim (cpr_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct +>(HV … HV0) -V0 >(HT … HT0) -T0 // +qed. + +(* Basic_1: was: nf2_dec *) +axiom cnr_dec: ∀G,L,T1. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T1⦄ ∨ + ∃∃T2. ⦃G, L⦄ ⊢ T1 ➡ T2 & (T1 = T2 → ⊥). + +(* Basic_1: removed theorems 1: nf2_abst_shift *) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_cir.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_cir.ma new file mode 100644 index 000000000..786611f54 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_cir.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr_cir.ma". +include "basic_2A/reduction/cnr_crr.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************) + +(* Main properties on irreducibility ****************************************) + +theorem cir_cnr: ∀G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄. +/2 width=4 by cpr_fwd_cir/ qed. + +(* Main inversion lemmas on irreducibility **********************************) + +theorem cnr_inv_cir: ∀G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐈⦃T⦄. +/2 width=5 by cnr_inv_crr/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_crr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_crr.ma new file mode 100644 index 000000000..e8b5dfb4b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_crr.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/crr.ma". +include "basic_2A/reduction/cnr.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************) + +(* Advanced inversion lemmas on reducibility ********************************) + +(* Note: this property is unusual *) +lemma cnr_inv_crr: ∀G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → ⊥. +#G #L #T #H elim H -L -T +[ #L #K #V #i #HLK #H + elim (cnr_inv_delta … HLK H) +| #L #V #T #_ #IHV #H + elim (cnr_inv_appl … H) -H /2 width=1 by/ +| #L #V #T #_ #IHT #H + elim (cnr_inv_appl … H) -H /2 width=1 by/ +| #I #L #V #T * #H1 #H2 destruct + [ elim (cnr_inv_zeta … H2) + | elim (cnr_inv_eps … H2) + ] +|5,6: #a * [ elim a ] #L #V #T * #H1 #_ #IH #H2 destruct + [1,3: elim (cnr_inv_abbr … H2) -H2 /2 width=1 by/ + |*: elim (cnr_inv_abst … H2) -H2 /2 width=1 by/ + ] +| #a #L #V #W #T #H + elim (cnr_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +| #a #L #V #W #T #H + elim (cnr_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma new file mode 100644 index 000000000..4ff641f4f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpr_lift.ma". +include "basic_2A/reduction/cnr.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************) + +(* Advanced properties ******************************************************) + +(* Basic_1: was: nf2_lref_abst *) +lemma cnr_lref_abst: ∀G,L,K,V,i. ⬇[i] L ≡ K. ⓛV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄. +#G #L #K #V #i #HLK #X #H +elim (cpr_inv_lref1 … H) -H // * +#K0 #V1 #V2 #HLK0 #_ #_ +lapply (drop_mono … HLK … HLK0) -L #H destruct +qed. + +(* Relocation properties ****************************************************) + +(* Basic_1: was: nf2_lift *) +lemma cnr_lift: ∀G,L0,L,T,T0,s,l,m. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ → + ⬇[s, l, m] L0 ≡ L → ⬆[l, m] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄. +#G #L0 #L #T #T0 #s #l #m #HLT #HL0 #HT0 #X #H +elim (cpr_inv_lift1 … H … HL0 … HT0) -L0 #T1 #HT10 #HT1 +<(HLT … HT1) in HT0; -L #HT0 +>(lift_mono … HT10 … HT0) -T1 -X // +qed. + +(* Note: this was missing in basic_1 *) +lemma cnr_inv_lift: ∀G,L0,L,T,T0,s,l,m. ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄ → + ⬇[s, l, m] L0 ≡ L → ⬆[l, m] T ≡ T0 → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄. +#G #L0 #L #T #T0 #s #l #m #HLT0 #HL0 #HT0 #X #H +elim (lift_total X l m) #X0 #HX0 +lapply (cpr_lift … H … HL0 … HT0 … HX0) -L #HTX0 +>(HLT0 … HTX0) in HX0; -L0 -X0 #H +>(lift_inj … H … HT0) -T0 -X -s -l -m // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx.ma new file mode 100644 index 000000000..e754c0a1f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx.ma @@ -0,0 +1,136 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/prednormal_5.ma". +include "basic_2A/reduction/cnr.ma". +include "basic_2A/reduction/cpx.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ********************) + +definition cnx: ∀h. sd h → relation3 genv lenv term ≝ + λh,g,G,L. NF … (cpx h g G L) (eq …). + +interpretation + "normality for context-sensitive extended reduction (term)" + 'PRedNormal h g L T = (cnx h g L T). + +(* Basic inversion lemmas ***************************************************) + +lemma cnx_inv_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆k⦄ → deg h g k 0. +#h #g #G #L #k #H elim (deg_total h g k) +#d @(nat_ind_plus … d) -d // #d #_ #Hkd +lapply (H (⋆(next h k)) ?) -H /2 width=2 by cpx_st/ -L -d #H +lapply (destruct_tatom_tatom_aux … H) -H #H (**) (* destruct lemma needed *) +lapply (destruct_sort_sort_aux … H) -H #H (**) (* destruct lemma needed *) +lapply (next_lt h k) >H -H #H elim (lt_refl_false … H) +qed-. + +lemma cnx_inv_delta: ∀h,g,I,G,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄ → ⊥. +#h #g #I #G #L #K #V #i #HLK #H +elim (lift_total V 0 (i+1)) #W #HVW +lapply (H W ?) -H [ /3 width=7 by cpx_delta/ ] -HLK #H destruct +elim (lift_inv_lref2_be … HVW) -HVW // +qed-. + +lemma cnx_inv_abst: ∀h,g,a,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓛ{a}V.T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ ∧ ⦃G, L.ⓛV⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +#h #g #a #G #L #V1 #T1 #HVT1 @conj +[ #V2 #HV2 lapply (HVT1 (ⓛ{a}V2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2 #H destruct // +| #T2 #HT2 lapply (HVT1 (ⓛ{a}V1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2 #H destruct // +] +qed-. + +lemma cnx_inv_abbr: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃-ⓓV.T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ ∧ ⦃G, L.ⓓV⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +#h #g #G #L #V1 #T1 #HVT1 @conj +[ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2 #H destruct // +| #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2 #H destruct // +] +qed-. + +lemma cnx_inv_zeta: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃+ⓓV.T⦄ → ⊥. +#h #g #G #L #V #T #H elim (is_lift_dec T 0 1) +[ * #U #HTU + lapply (H U ?) -H /2 width=3 by cpx_zeta/ #H destruct + elim (lift_inv_pair_xy_y … HTU) +| #HT + elim (cpr_delift G(⋆) V T (⋆.ⓓV) 0) // #T2 #T1 #HT2 #HT12 + lapply (H (+ⓓV.T2) ?) -H /5 width=1 by cpr_cpx, tpr_cpr, cpr_bind/ -HT2 + #H destruct /3 width=2 by ex_intro/ +] +qed-. + +lemma cnx_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓐV.T⦄ → + ∧∧ ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ & ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ & 𝐒⦃T⦄. +#h #g #G #L #V1 #T1 #HVT1 @and3_intro +[ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpx_pair_sn/ -HV2 #H destruct // +| #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpx_flat/ -HT2 #H destruct // +| generalize in match HVT1; -HVT1 elim T1 -T1 * // #a * #W1 #U1 #_ #_ #H + [ elim (lift_total V1 0 1) #V2 #HV12 + lapply (H (ⓓ{a}W1.ⓐV2.U1) ?) -H /3 width=3 by cpr_cpx, cpr_theta/ -HV12 #H destruct + | lapply (H (ⓓ{a}ⓝW1.V1.U1) ?) -H /3 width=1 by cpr_cpx, cpr_beta/ #H destruct + ] +] +qed-. + +lemma cnx_inv_eps: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓝV.T⦄ → ⊥. +#h #g #G #L #V #T #H lapply (H T ?) -H +/2 width=4 by cpx_eps, discr_tpair_xy_y/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cnx_fwd_cnr: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄. +#h #g #G #L #T #H #U #HTU +@H /2 width=1 by cpr_cpx/ (**) (* auto fails because a δ-expansion gets in the way *) +qed-. + +(* Basic properties *********************************************************) + +lemma cnx_sort: ∀h,g,G,L,k. deg h g k 0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆k⦄. +#h #g #G #L #k #Hk #X #H elim (cpx_inv_sort1 … H) -H // * #d #Hkd #_ +lapply (deg_mono … Hkd Hk) -h -L (drop_fwd_length … HL) -HL // +qed. + +lemma cnx_abst: ∀h,g,a,G,L,W,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃W⦄ → ⦃G, L.ⓛW⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓛ{a}W.T⦄. +#h #g #a #G #L #W #T #HW #HT #X #H +elim (cpx_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct +>(HW … HW0) -W0 >(HT … HT0) -T0 // +qed. + +lemma cnx_appl_simple: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃V⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → 𝐒⦃T⦄ → + ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓐV.T⦄. +#h #g #G #L #V #T #HV #HT #HS #X #H +elim (cpx_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct +>(HV … HV0) -V0 >(HT … HT0) -T0 // +qed. + +axiom cnx_dec: ∀h,g,G,L,T1. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T1⦄ ∨ + ∃∃T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 & (T1 = T2 → ⊥). diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_cix.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_cix.ma new file mode 100644 index 000000000..40f69e006 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_cix.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_cix.ma". +include "basic_2A/reduction/cnx_crx.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ********************) + +(* Main properties on irreducibility ****************************************) + +theorem cix_cnx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +/2 width=6 by cpx_fwd_cix/ qed. + +(* Main inversion lemmas on irreducibility **********************************) + +theorem cnx_inv_cix: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃T⦄. +/2 width=7 by cnx_inv_crx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_crx.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_crx.ma new file mode 100644 index 000000000..2be5d0d63 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cnx_crx.ma @@ -0,0 +1,49 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/crx.ma". +include "basic_2A/reduction/cnx.ma". + +(* NORMAL TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ********************) + +(* Advanced inversion lemmas on reducibility ********************************) + +(* Note: this property is unusual *) +lemma cnx_inv_crx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ → ⊥. +#h #g #G #L #T #H elim H -L -T +[ #L #k #d #Hkd #H + lapply (cnx_inv_sort … H) -H #H + lapply (deg_mono … H Hkd) -h -L -k (lift_mono … HT10 … HT0) -T1 -X // +qed. + +lemma cnx_inv_lift: ∀h,g,G,L0,L,T,T0,s,l,m. ⦃G, L0⦄ ⊢ ➡[h, g] 𝐍⦃T0⦄ → ⬇[s, l, m] L0 ≡ L → + ⬆[l, m] T ≡ T0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄. +#h #g #G #L0 #L #T #T0 #s #l #m #HLT0 #HL0 #HT0 #X #H +elim (lift_total X l m) #X0 #HX0 +lapply (cpx_lift … H … HL0 … HT0 … HX0) -L #HTX0 +>(HLT0 … HTX0) in HX0; -L0 -X0 #H +>(lift_inj … H … HT0) -T0 -X -l -m // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr.ma new file mode 100644 index 000000000..d79fba9fd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr.ma @@ -0,0 +1,309 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/pred_4.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/unfold/lstas.ma". + +(* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************) + +(* activate genv *) +(* Basic_1: includes: pr0_delta1 pr2_delta1 pr2_thin_dx *) +(* Note: cpr_flat: does not hold in basic_1 *) +inductive cpr: relation4 genv lenv term term ≝ +| cpr_atom : ∀I,G,L. cpr G L (⓪{I}) (⓪{I}) +| cpr_delta: ∀G,L,K,V,V2,W2,i. + ⬇[i] L ≡ K. ⓓV → cpr G K V V2 → + ⬆[0, i + 1] V2 ≡ W2 → cpr G L (#i) W2 +| cpr_bind : ∀a,I,G,L,V1,V2,T1,T2. + cpr G L V1 V2 → cpr G (L.ⓑ{I}V1) T1 T2 → + cpr G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) +| cpr_flat : ∀I,G,L,V1,V2,T1,T2. + cpr G L V1 V2 → cpr G L T1 T2 → + cpr G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) +| cpr_zeta : ∀G,L,V,T1,T,T2. cpr G (L.ⓓV) T1 T → + ⬆[0, 1] T2 ≡ T → cpr G L (+ⓓV.T1) T2 +| cpr_eps : ∀G,L,V,T1,T2. cpr G L T1 T2 → cpr G L (ⓝV.T1) T2 +| cpr_beta : ∀a,G,L,V1,V2,W1,W2,T1,T2. + cpr G L V1 V2 → cpr G L W1 W2 → cpr G (L.ⓛW1) T1 T2 → + cpr G L (ⓐV1.ⓛ{a}W1.T1) (ⓓ{a}ⓝW2.V2.T2) +| cpr_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2. + cpr G L V1 V → ⬆[0, 1] V ≡ V2 → cpr G L W1 W2 → cpr G (L.ⓓW1) T1 T2 → + cpr G L (ⓐV1.ⓓ{a}W1.T1) (ⓓ{a}W2.ⓐV2.T2) +. + +interpretation "context-sensitive parallel reduction (term)" + 'PRed G L T1 T2 = (cpr G L T1 T2). + +(* Basic properties *********************************************************) + +lemma lsubr_cpr_trans: ∀G. lsub_trans … (cpr G) lsubr. +#G #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 +[ // +| #G #L1 #K1 #V1 #V2 #W2 #i #HLK1 #_ #HVW2 #IHV12 #L2 #HL12 + elim (lsubr_fwd_drop2_abbr … HL12 … HLK1) -L1 * + /3 width=6 by cpr_delta/ +|3,7: /4 width=1 by lsubr_pair, cpr_bind, cpr_beta/ +|4,6: /3 width=1 by cpr_flat, cpr_eps/ +|5,8: /4 width=3 by lsubr_pair, cpr_zeta, cpr_theta/ +] +qed-. + +(* Basic_1: was by definition: pr2_free *) +lemma tpr_cpr: ∀G,T1,T2. ⦃G, ⋆⦄ ⊢ T1 ➡ T2 → ∀L. ⦃G, L⦄ ⊢ T1 ➡ T2. +#G #T1 #T2 #HT12 #L +lapply (lsubr_cpr_trans … HT12 L ?) // +qed. + +(* Basic_1: includes by definition: pr0_refl *) +lemma cpr_refl: ∀G,T,L. ⦃G, L⦄ ⊢ T ➡ T. +#G #T elim T -T // * /2 width=1 by cpr_bind, cpr_flat/ +qed. + +(* Basic_1: was: pr2_head_1 *) +lemma cpr_pair_sn: ∀I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡ V2 → + ∀T. ⦃G, L⦄ ⊢ ②{I}V1.T ➡ ②{I}V2.T. +* /2 width=1 by cpr_bind, cpr_flat/ qed. + +lemma cpr_delift: ∀G,K,V,T1,L,l. ⬇[l] L ≡ (K.ⓓV) → + ∃∃T2,T. ⦃G, L⦄ ⊢ T1 ➡ T2 & ⬆[l, 1] T ≡ T2. +#G #K #V #T1 elim T1 -T1 +[ * /2 width=4 by cpr_atom, lift_sort, lift_gref, ex2_2_intro/ + #i #L #l #HLK elim (lt_or_eq_or_gt i l) + #Hil [1,3: /3 width=4 by cpr_atom, lift_lref_ge_minus, lift_lref_lt, ex2_2_intro/ ] + destruct + elim (lift_total V 0 (i+1)) #W #HVW + elim (lift_split … HVW i i) /3 width=6 by cpr_delta, ex2_2_intro/ +| * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #l #HLK + elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2 + [ elim (IHU1 (L. ⓑ{I}W1) (l+1)) -IHU1 /3 width=9 by drop_drop, cpr_bind, lift_bind, ex2_2_intro/ + | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8 by cpr_flat, lift_flat, ex2_2_intro/ + ] +] +qed-. + +fact lstas_cpr_aux: ∀h,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, d] T2 → + d = 0 → ⦃G, L⦄ ⊢ T1 ➡ T2. +#h #G #L #T1 #T2 #d #H elim H -G -L -T1 -T2 -d +/3 width=1 by cpr_eps, cpr_flat, cpr_bind/ +[ #G #L #d #k #H0 destruct normalize // +| #G #L #K #V1 #V2 #W2 #i #d #HLK #_ #HVW2 #IHV12 #H destruct + /3 width=6 by cpr_delta/ +| #G #L #K #V1 #V2 #W2 #i #d #_ #_ #_ #_ IHV1 -IHV1 // -HV1 >IHT1 -IHT1 // + | elim (cir_inv_ri2 … H) /2 width=1 by/ + ] +| #G #L #V1 #T1 #T #T2 #_ #_ #_ #H + elim (cir_inv_ri2 … H) /2 width=1 by or_introl/ +| #G #L #V1 #T1 #T2 #_ #_ #H + elim (cir_inv_ri2 … H) /2 width=1 by/ +| #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H + elim (cir_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +| #a #G #L #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H + elim (cir_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_lift.ma new file mode 100644 index 000000000..4a89afa30 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpr_lift.ma @@ -0,0 +1,110 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/reduction/cpr.ma". + +(* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************) + +(* Relocation properties ****************************************************) + +(* Basic_1: includes: pr0_lift pr2_lift *) +lemma cpr_lift: ∀G. d_liftable (cpr G). +#G #K #T1 #T2 #H elim H -G -K -T1 -T2 +[ #I #G #K #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_mono … H1 … H2) -H1 -H2 // +| #G #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #s #l #m #HLK #U1 #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K // -Hil /3 width=6 by cpr_delta, drop_inv_gen/ + ] +| #a #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /4 width=6 by cpr_bind, drop_skip/ +| #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6 by cpr_flat/ +| #G #K #V #T1 #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_bind1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct + elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=6 by cpr_zeta, drop_skip/ +| #G #K #V #T1 #T2 #_ #IHT12 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpr_eps/ +| #a #G #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #X #T3 #HX #HT23 #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #W3 #V3 #HW23 #HV23 #HX destruct /4 width=6 by cpr_beta, drop_skip/ +| #a #G #K #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #W3 #X #HW23 #HX #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #V3 #T3 #HV3 #HT23 #HX destruct + elim (lift_trans_ge … HV2 … HV3) -V2 /4 width=6 by cpr_theta, drop_skip/ +] +qed. + +(* Basic_1: includes: pr0_gen_lift pr2_gen_lift *) +lemma cpr_inv_lift1: ∀G. d_deliftable_sn (cpr G). +#G #L #U1 #U2 #H elim H -G -L -U1 -U2 +[ * #i #G #L #K #s #l #m #_ #T1 #H + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #G #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #s #l #m #HLK #T1 #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HLK … HLV) -L // #L #U #HKL #HLV #HUV + elim (IHV2 … HLV … HUV) -V #U2 #HUV2 #HU2 + elim (lift_trans_le … HUV2 … HVW2) -V2 // >minus_plus plus_minus // IHV1 -IHV1 // -HV1 >IHT1 -IHT1 // + | elim (cix_inv_ri2 … H) /2 width=1 by/ + ] +| #G #L #V1 #T1 #T #T2 #_ #_ #_ #H + elim (cix_inv_ri2 … H) /2 width=1 by or_introl/ +| #G #L #V1 #T1 #T2 #_ #_ #H + elim (cix_inv_ri2 … H) /2 width=1 by/ +| #G #L #V1 #V2 #T #_ #_ #H + elim (cix_inv_ri2 … H) /2 width=1 by/ +| #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H + elim (cix_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +| #a #G #L #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H + elim (cix_inv_appl … H) -H #_ #_ #H + elim (simple_inv_bind … H) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma new file mode 100644 index 000000000..6cc63f40d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/cpx_lift.ma @@ -0,0 +1,264 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/static/da.ma". +include "basic_2A/reduction/cpx.ma". + +(* CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION FOR TERMS ******************) + +(* Advanced properties ******************************************************) + +fact sta_cpx_aux: ∀h,g,G,L,T1,T2,d2,d1. ⦃G, L⦄ ⊢ T1 •*[h, d2] T2 → d2 = 1 → + ⦃G, L⦄ ⊢ T1 ▪[h, g] d1+1 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2. +#h #g #G #L #T1 #T2 #d2 #d1 #H elim H -G -L -T1 -T2 -d2 +[ #G #L #d2 #k #H0 destruct normalize + /3 width=4 by cpx_st, da_inv_sort/ +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #_ #HVW2 #IHV12 #H0 #H destruct + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpx_delta/ +| #G #L #K #V1 #V2 #i #_ #_ #_ #H destruct +| #G #L #K #V1 #V2 #W2 #i #d2 #HLK #HV12 #HVW2 #_ #H0 #H + lapply (discr_plus_xy_y … H0) -H0 #H0 destruct + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct + /4 width=7 by cpx_delta, cpr_cpx, lstas_cpr/ +| /4 width=2 by cpx_bind, da_inv_bind/ +| /4 width=3 by cpx_flat, da_inv_flat/ +| /4 width=3 by cpx_eps, da_inv_flat/ +] +qed-. + +lemma sta_cpx: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → + ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 ➡[h, g] T2. +/2 width=3 by sta_cpx_aux/ qed. + +(* Relocation properties ****************************************************) + +lemma cpx_lift: ∀h,g,G. d_liftable (cpx h g G). +#h #g #G #K #T1 #T2 #H elim H -G -K -T1 -T2 +[ #I #G #K #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_mono … H1 … H2) -H1 -H2 // +| #G #K #k #d #Hkd #L #s #l #m #_ #U1 #H1 #U2 #H2 + >(lift_inv_sort1 … H1) -U1 + >(lift_inv_sort1 … H2) -U2 /2 width=2 by cpx_st/ +| #I #G #K #KV #V #V2 #W2 #i #HKV #HV2 #HVW2 #IHV2 #L #s #l #m #HLK #U1 #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HVW2 … HWU2) -W2 // plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K /3 width=7 by cpx_delta, drop_inv_gen/ + ] +| #a #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /4 width=6 by cpx_bind, drop_skip/ +| #I #G #K #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L #s #l #m #HLK #U1 #H1 #U2 #H2 + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 destruct + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct /3 width=6 by cpx_flat/ +| #G #K #V #T1 #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_bind1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct + elim (lift_conf_O1 … HTU2 … HT2) -T2 /4 width=6 by cpx_zeta, drop_skip/ +| #G #K #V #T1 #T2 #_ #IHT12 #L #s #l #m #HLK #U1 #H #U2 #HTU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_eps/ +| #G #K #V1 #V2 #T #_ #IHV12 #L #s #l #m #HLK #U1 #H #U2 #HVU2 + elim (lift_inv_flat1 … H) -H #VV1 #TT1 #HVV1 #HTT1 #H destruct /3 width=6 by cpx_ct/ +| #a #G #K #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #X #T3 #HX #HT23 #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #W3 #V3 #HW23 #HV23 #HX destruct /4 width=6 by cpx_beta, drop_skip/ +| #a #G #K #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV1 #IHW12 #IHT12 #L #s #l #m #HLK #X1 #HX1 #X2 #HX2 + elim (lift_inv_flat1 … HX1) -HX1 #V0 #X #HV10 #HX #HX1 destruct + elim (lift_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT10 #HX destruct + elim (lift_inv_bind1 … HX2) -HX2 #W3 #X #HW23 #HX #HX2 destruct + elim (lift_inv_flat1 … HX) -HX #V3 #T3 #HV3 #HT23 #HX destruct + elim (lift_trans_ge … HV2 … HV3) -V2 /4 width=6 by cpx_theta, drop_skip/ +] +qed. + +lemma cpx_inv_lift1: ∀h,g,G. d_deliftable_sn (cpx h g G). +#h #g #G #L #U1 #U2 #H elim H -G -L -U1 -U2 +[ * #i #G #L #K #s #l #m #_ #T1 #H + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by cpx_atom, lift_sort, ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by cpx_atom, lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by cpx_atom, lift_gref, ex2_intro/ + ] +| #G #L #k #d #Hkd #K #s #l #m #_ #T1 #H + lapply (lift_inv_sort2 … H) -H #H destruct /3 width=3 by cpx_st, lift_sort, ex2_intro/ +| #I #G #L #LV #V #V2 #W2 #i #HLV #HV2 #HVW2 #IHV2 #K #s #l #m #HLK #T1 #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HLK … HLV) -L // #L #U #HKL #HLV #HUV + elim (IHV2 … HLV … HUV) -V #U2 #HUV2 #HU2 + elim (lift_trans_le … HUV2 … HVW2) -V2 // >minus_plus plus_minus // (lift_inv_sort1 … H) -X /2 width=2 by crx_sort/ +| #I #K #K0 #V #i #HK0 #L #s #l #m #HLK #X #H + elim (lift_inv_lref1 … H) -H * #Hil #H destruct + [ elim (drop_trans_lt … HLK … HK0) -K /2 width=4 by crx_delta/ + | lapply (drop_trans_ge … HLK … HK0 ?) -K /3 width=5 by crx_delta, drop_inv_gen/ + ] +| #K #V #T #_ #IHV #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crx_appl_sn/ +| #K #V #T #_ #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_flat1 … H) -H #W #U #_ #HTU #H destruct /3 width=5 by crx_appl_dx/ +| #I #K #V #T #HI #L #s #l #m #_ #X #H + elim (lift_fwd_pair1 … H) -H #W #U #_ #H destruct /2 width=1 by crx_ri2/ +| #a #I #K #V #T #HI #_ #IHV #L #s #l #m #HLK #X #H + elim (lift_inv_bind1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crx_ib2_sn/ +| #a #I #K #V #T #HI #_ #IHT #L #s #l #m #HLK #X #H + elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct /4 width=5 by crx_ib2_dx, drop_skip/ +| #a #K #V #V0 #T #L #s #l #m #_ #X #H + elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct + elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crx_beta/ +| #a #K #V #V0 #T #L #s #l #m #_ #X #H + elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct + elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crx_theta/ +] +qed. + +lemma crx_inv_lift: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃U⦄ → ∀K,s,l,m. ⬇[s, l, m] L ≡ K → + ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ ➡[h, g] 𝐑⦃T⦄. +#h #g #G #L #U #H elim H -L -U +[ #L #k #d #Hkd #K #s #l #m #_ #X #H + >(lift_inv_sort2 … H) -X /2 width=2 by crx_sort/ +| #I #L #L0 #W #i #HK0 #K #s #l #m #HLK #X #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HLK … HK0) -L /2 width=4 by crx_delta/ + | lapply (drop_conf_ge … HLK … HK0 ?) -L /2 width=4 by crx_delta/ + ] +| #L #W #U #_ #IHW #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crx_appl_sn/ +| #L #W #U #_ #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_flat2 … H) -H #V #T #_ #HTU #H destruct /3 width=5 by crx_appl_dx/ +| #I #L #W #U #HI #K #s #l #m #_ #X #H + elim (lift_fwd_pair2 … H) -H #V #T #_ #H destruct /2 width=1 by crx_ri2/ +| #a #I #L #W #U #HI #_ #IHW #K #s #l #m #HLK #X #H + elim (lift_inv_bind2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crx_ib2_sn/ +| #a #I #L #W #U #HI #_ #IHU #K #s #l #m #HLK #X #H + elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct /4 width=5 by crx_ib2_dx, drop_skip/ +| #a #L #W #W0 #U #K #s #l #m #_ #X #H + elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct + elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crx_beta/ +| #a #L #W #W0 #U #K #s #l #m #_ #X #H + elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct + elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crx_theta/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb.ma new file mode 100644 index 000000000..d95512bf4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredproper_8.ma". +include "basic_2A/substitution/fqu.ma". +include "basic_2A/multiple/lleq.ma". +include "basic_2A/reduction/lpx.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +inductive fpb (h) (g) (G1) (L1) (T1): relation3 genv lenv term ≝ +| fpb_fqu: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → fpb h g G1 L1 T1 G2 L2 T2 +| fpb_cpx: ∀T2. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T2 → (T1 = T2 → ⊥) → fpb h g G1 L1 T1 G1 L1 T2 +| fpb_lpx: ∀L2. ⦃G1, L1⦄ ⊢ ➡[h, g] L2 → (L1 ≡[T1, 0] L2 → ⊥) → fpb h g G1 L1 T1 G1 L2 T1 +. + +interpretation + "'rst' proper parallel reduction (closure)" + 'BTPRedProper h g G1 L1 T1 G2 L2 T2 = (fpb h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma cpr_fpb: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → (T1 = T2 → ⊥) → + ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄. +/3 width=1 by fpb_cpx, cpr_cpx/ qed. + +lemma lpr_fpb: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡ L2 → (L1 ≡[T, 0] L2 → ⊥) → + ⦃G, L1, T⦄ ≻[h, g] ⦃G, L2, T⦄. +/3 width=1 by fpb_lpx, lpr_lpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_fleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_fleq.ma new file mode 100644 index 000000000..ec8c00125 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_fleq.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fleq.ma". +include "basic_2A/reduction/fpb_lleq.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +(* Properties on lazy equivalence for closures ******************************) + +lemma fleq_fpb_trans: ∀h,g,F1,F2,K1,K2,T1,T2. ⦃F1, K1, T1⦄ ≡[0] ⦃F2, K2, T2⦄ → + ∀G2,L2,U2. ⦃F2, K2, T2⦄ ≻[h, g] ⦃G2, L2, U2⦄ → + ∃∃G1,L1,U1. ⦃F1, K1, T1⦄ ≻[h, g] ⦃G1, L1, U1⦄ & ⦃G1, L1, U1⦄ ≡[0] ⦃G2, L2, U2⦄. +#h #g #F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2 +#K2 #HK12 #G2 #L2 #U2 #H12 elim (lleq_fpb_trans … HK12 … H12) -K2 +/3 width=5 by fleq_intro, ex2_3_intro/ +qed-. + +(* Inversion lemmas on lazy equivalence for closures ************************) + +lemma fpb_inv_fleq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⊥. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +[ #G2 #L2 #T2 #H12 #H elim (fleq_inv_gen … H) -H + /3 width=8 by lleq_fwd_length, fqu_inv_eq/ +| #T2 #_ #HnT #H elim (fleq_inv_gen … H) -H /2 width=1 by/ +| #L2 #_ #HnL #H elim (fleq_inv_gen … H) -H /2 width=1 by/ +] +qed-. + diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lift.ma new file mode 100644 index 000000000..fa4af73a5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lift.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/unfold/lstas_da.ma". +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/reduction/fpb.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +(* Advanced properties ******************************************************) + +lemma sta_fpb: ∀h,g,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → + ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄. +#h #g #G #L #T1 #T2 #d #HT1 #HT12 elim (eq_term_dec T1 T2) +/3 width=2 by fpb_cpx, sta_cpx/ #H destruct +elim (lstas_inv_refl_pos h G L T2 0) // +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lleq.ma new file mode 100644 index 000000000..f2756f3be --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpb_lleq.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_fqus.ma". +include "basic_2A/multiple/lleq_lleq.ma". +include "basic_2A/reduction/lpx_lleq.ma". +include "basic_2A/reduction/fpb.ma". + +(* "RST" PROPER PARALLEL COMPUTATION FOR CLOSURES ***************************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_fpb_trans: ∀h,g,F,K1,K2,T. K1 ≡[T, 0] K2 → + ∀G,L2,U. ⦃F, K2, T⦄ ≻[h, g] ⦃G, L2, U⦄ → + ∃∃L1. ⦃F, K1, T⦄ ≻[h, g] ⦃G, L1, U⦄ & L1 ≡[U, 0] L2. +#h #g #F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U +[ #G #L2 #U #H2 elim (lleq_fqu_trans … H2 … HT) -K2 + /3 width=3 by fpb_fqu, ex2_intro/ +| /4 width=10 by fpb_cpx, cpx_lleq_conf_sn, lleq_cpx_trans, ex2_intro/ +| #L2 #HKL2 #HnKL2 elim (lleq_lpx_trans … HKL2 … HT) -HKL2 + /6 width=3 by fpb_lpx, lleq_canc_sn, ex2_intro/ (* 2 lleq_canc_sn *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq.ma new file mode 100644 index 000000000..e1d0d39dc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpred_8.ma". +include "basic_2A/substitution/fquq.ma". +include "basic_2A/multiple/lleq.ma". +include "basic_2A/reduction/lpx.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +inductive fpbq (h) (g) (G1) (L1) (T1): relation3 genv lenv term ≝ +| fpbq_fquq: ∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → fpbq h g G1 L1 T1 G2 L2 T2 +| fpbq_cpx : ∀T2. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T2 → fpbq h g G1 L1 T1 G1 L1 T2 +| fpbq_lpx : ∀L2. ⦃G1, L1⦄ ⊢ ➡[h, g] L2 → fpbq h g G1 L1 T1 G1 L2 T1 +| fpbq_lleq: ∀L2. L1 ≡[T1, 0] L2 → fpbq h g G1 L1 T1 G1 L2 T1 +. + +interpretation + "'qrst' parallel reduction (closure)" + 'BTPRed h g G1 L1 T1 G2 L2 T2 = (fpbq h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fpbq_refl: ∀h,g. tri_reflexive … (fpbq h g). +/2 width=1 by fpbq_cpx/ qed. + +lemma cpr_fpbq: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L, T1⦄ ≽[h, g] ⦃G, L, T2⦄. +/3 width=1 by fpbq_cpx, cpr_cpx/ qed. + +lemma lpr_fpbq: ∀h,g,G,L1,L2,T. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1, T⦄ ≽[h, g] ⦃G, L2, T⦄. +/3 width=1 by fpbq_lpx, lpr_lpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_aaa.ma new file mode 100644 index 000000000..c4619f5d7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_aaa.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_fqus.ma". +include "basic_2A/static/aaa_lleq.ma". +include "basic_2A/reduction/lpx_aaa.ma". +include "basic_2A/reduction/fpbq.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma fpbq_aaa_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/3 width=6 by aaa_lleq_conf, lpx_aaa_conf, cpx_aaa_conf, aaa_fquq_conf, ex_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_alt.ma new file mode 100644 index 000000000..e2e1ebbf8 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_alt.ma @@ -0,0 +1,86 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/btpredalt_8.ma". +include "basic_2A/reduction/fpb_fleq.ma". +include "basic_2A/reduction/fpbq.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +(* alternative definition of fpbq *) +definition fpbqa: ∀h. sd h → tri_relation genv lenv term ≝ + λh,g,G1,L1,T1,G2,L2,T2. + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ ∨ ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄. + +interpretation + "'qrst' parallel reduction (closure) alternative" + 'BTPRedAlt h g G1 L1 T1 G2 L2 T2 = (fpbqa h g G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fleq_fpbq: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by fpbq_lleq/ +qed. + +lemma fpb_fpbq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +/3 width=1 by fpbq_fquq, fpbq_cpx, fpbq_lpx, fqu_fquq/ +qed. + +(* Main properties **********************************************************) + +theorem fpbq_fpbqa: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 +[ #G2 #L2 #T2 #H elim (fquq_inv_gen … H) -H + [ /3 width=1 by fpb_fqu, or_intror/ + | * #H1 #H2 #H3 destruct /2 width=1 by or_introl/ + ] +| #T2 #HT12 elim (eq_term_dec T1 T2) + #HnT12 destruct /4 width=1 by fpb_cpx, or_intror, or_introl/ +| #L2 #HL12 elim (lleq_dec … T1 L1 L2 0) + /4 width=1 by fpb_lpx, fleq_intro, or_intror, or_introl/ +| /3 width=1 by fleq_intro, or_introl/ +] +qed. + +theorem fpbqa_inv_fpbq: ∀h,g,G1,G2,L1,L2,T1,T2. + ⦃G1, L1, T1⦄ ≽≽[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 * /2 width=1 by fleq_fpbq, fpb_fpbq/ +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fpbq_ind_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ∀R:Prop. + (⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → R) → + (⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R) → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → R. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #R #HI1 #HI2 #H elim (fpbq_fpbqa … H) /2 width=1 by/ +qed-. + +(* aternative definition of fpb *********************************************) + +lemma fpb_fpbq_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ ∧ (⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⊥). +/3 width=10 by fpb_fpbq, fpb_inv_fleq, conj/ qed. + +lemma fpbq_inv_fpb_alt: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≽[h, g] ⦃G2, L2, T2⦄ → + (⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ → ⊥) → ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #H0 @(fpbq_ind_alt … H) -H // +#H elim H0 -H0 // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_lift.ma new file mode 100644 index 000000000..bb93ef27e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/fpbq_lift.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/reduction/fpbq.ma". + +(* "QRST" PARALLEL REDUCTION FOR CLOSURES ***********************************) + +(* Advanced properties ******************************************************) + +lemma sta_fpbq: ∀h,g,G,L,T1,T2,d. + ⦃G, L⦄ ⊢ T1 ▪[h, g] d+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → + ⦃G, L, T1⦄ ≽[h, g] ⦃G, L, T2⦄. +/3 width=4 by fpbq_cpx, sta_cpx/ qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr.ma new file mode 100644 index 000000000..5901ee5c0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr.ma @@ -0,0 +1,61 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsn_3.ma". +include "basic_2A/substitution/lpx_sn.ma". +include "basic_2A/reduction/cpr.ma". + +(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************) + +definition lpr: relation3 genv lenv lenv ≝ λG. lpx_sn (cpr G). + +interpretation "parallel reduction (local environment, sn variant)" + 'PRedSn G L1 L2 = (lpr G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +(* Basic_1: includes: wcpr0_gen_sort *) +lemma lpr_inv_atom1: ∀G,L2. ⦃G, ⋆⦄ ⊢ ➡ L2 → L2 = ⋆. +/2 width=4 by lpx_sn_inv_atom1_aux/ qed-. + +(* Basic_1: includes: wcpr0_gen_head *) +lemma lpr_inv_pair1: ∀I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L2 = K2.ⓑ{I}V2. +/2 width=3 by lpx_sn_inv_pair1_aux/ qed-. + +lemma lpr_inv_atom2: ∀G,L1. ⦃G, L1⦄ ⊢ ➡ ⋆ → L1 = ⋆. +/2 width=4 by lpx_sn_inv_atom2_aux/ qed-. + +lemma lpr_inv_pair2: ∀I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡ K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡ K2 & ⦃G, K1⦄ ⊢ V1 ➡ V2 & L1 = K1. ⓑ{I} V1. +/2 width=3 by lpx_sn_inv_pair2_aux/ qed-. + +(* Basic properties *********************************************************) + +(* Note: lemma 250 *) +lemma lpr_refl: ∀G,L. ⦃G, L⦄ ⊢ ➡ L. +/2 width=1 by lpx_sn_refl/ qed. + +lemma lpr_pair: ∀I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡ K2 → ⦃G, K1⦄ ⊢ V1 ➡ V2 → + ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡ K2.ⓑ{I}V2. +/2 width=1 by lpx_sn_pair/ qed. + +(* Basic forward lemmas *****************************************************) + +lemma lpr_fwd_length: ∀G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → |L1| = |L2|. +/2 width=2 by lpx_sn_fwd_length/ qed-. + +(* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back + pr0_subst1_back +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_drop.ma new file mode 100644 index 000000000..4f515f432 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_drop.ma @@ -0,0 +1,96 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn_drop.ma". +include "basic_2A/substitution/fquq_alt.ma". +include "basic_2A/reduction/cpr_lift.ma". +include "basic_2A/reduction/lpr.ma". + +(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************) + +(* Properties on local environment slicing ***********************************) + +(* Basic_1: includes: wcpr0_drop *) +lemma lpr_drop_conf: ∀G. dropable_sn (lpr G). +/3 width=6 by lpx_sn_deliftable_dropable, cpr_inv_lift1/ qed-. + +(* Basic_1: includes: wcpr0_drop_back *) +lemma drop_lpr_trans: ∀G. dedropable_sn (lpr G). +/3 width=10 by lpx_sn_liftable_dedropable, cpr_lift/ qed-. + +lemma lpr_drop_trans_O1: ∀G. dropable_dx (lpr G). +/2 width=3 by lpx_sn_dropable/ qed-. + +(* Properties on context-sensitive parallel reduction for terms *************) + +lemma fqu_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/ +#G #L #K #U #T #m #HLK #HUT #U2 #HU2 +elim (lift_total U2 0 (m+1)) #T2 #HUT2 +lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/ +qed-. + +lemma fquq_cpr_trans_dx: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_cpr_trans_dx … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma fqu_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpr_pair, cpr_pair_sn, cpr_atom, cpr_bind, cpr_flat, ex3_2_intro/ +#G #L #K #U #T #m #HLK #HUT #U2 #HU2 +elim (lift_total U2 0 (m+1)) #T2 #HUT2 +lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9 by fqu_drop, ex3_2_intro/ +qed-. + +lemma fquq_cpr_trans_sn: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡ U2 → + ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡ L & ⦃G1, L1⦄ ⊢ T1 ➡ U1 & ⦃G1, L, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_cpr_trans_sn … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma fqu_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpr_pair, ex3_2_intro/ +[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpr_inv_pair1 … H) -H + #K2 #W2 #HLK2 #HVW2 #H destruct + /3 width=5 by fqu_fquq, cpr_pair_sn, fqu_bind_dx, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #K2 #HK12 + elim (drop_lpr_trans … HLK1 … HK12) -HK12 + /3 width=7 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma fquq_lpr_trans: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡ K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡ K1 & ⦃G1, L1⦄ ⊢ T1 ➡ T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_lpr_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_lpr.ma new file mode 100644 index 000000000..9fbe5eeb5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpr_lpr.ma @@ -0,0 +1,357 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn_lpx_sn.ma". +include "basic_2A/multiple/fqup.ma". +include "basic_2A/reduction/lpr_drop.ma". + +(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************) + +(* Main properties on context-sensitive parallel reduction for terms ********) + +fact cpr_conf_lpr_atom_atom: + ∀I,G,L1,L2. ∃∃T. ⦃G, L1⦄ ⊢ ⓪{I} ➡ T & ⦃G, L2⦄ ⊢ ⓪{I} ➡ T. +/2 width=3 by cpr_atom, ex2_intro/ qed-. + +fact cpr_conf_lpr_atom_delta: + ∀G,L0,i. ( + ∀L,T. ⦃G, L0, #i⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀K0,V0. ⬇[i] L0 ≡ K0.ⓓV0 → + ∀V2. ⦃G, K0⦄ ⊢ V0 ➡ V2 → ∀T2. ⬆[O, i + 1] V2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ #i ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02 +elim (lpr_drop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1 +elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct +elim (lpr_drop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2 +elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct +lapply (drop_fwd_drop2 … HLK2) -W2 #HLK2 +lapply (fqup_lref … G … HLK0) -HLK0 #HLK0 +elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2 +elim (lift_total V 0 (i+1)) +/3 width=12 by cpr_lift, cpr_delta, ex2_intro/ +qed-. + +(* Basic_1: includes: pr0_delta_delta pr2_delta_delta *) +fact cpr_conf_lpr_delta_delta: + ∀G,L0,i. ( + ∀L,T. ⦃G, L0, #i⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀K0,V0. ⬇[i] L0 ≡ K0.ⓓV0 → + ∀V1. ⦃G, K0⦄ ⊢ V0 ➡ V1 → ∀T1. ⬆[O, i + 1] V1 ≡ T1 → + ∀KX,VX. ⬇[i] L0 ≡ KX.ⓓVX → + ∀V2. ⦃G, KX⦄ ⊢ VX ➡ V2 → ∀T2. ⬆[O, i + 1] V2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1 +#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02 +lapply (drop_mono … H … HLK0) -H #H destruct +elim (lpr_drop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1 +elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct +lapply (drop_fwd_drop2 … HLK1) -W1 #HLK1 +elim (lpr_drop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2 +elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct +lapply (drop_fwd_drop2 … HLK2) -W2 #HLK2 +lapply (fqup_lref … G … HLK0) -HLK0 #HLK0 +elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2 +elim (lift_total V 0 (i+1)) /3 width=12 by cpr_lift, ex2_intro/ +qed-. + +fact cpr_conf_lpr_bind_bind: + ∀a,I,G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓑ{a,I}V0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0.ⓑ{I}V0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓑ{a,I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓑ{a,I}V2.T2 ➡ T. +#a #I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01 +#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) // +elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH +/3 width=5 by lpr_pair, cpr_bind, ex2_intro/ +qed-. + +fact cpr_conf_lpr_bind_zeta: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 → + ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⬆[O, 1] X2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ +ⓓV1.T1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T. +#G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01 +#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -V0 -T0 #T #HT1 #HT2 +elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /3 width=3 by cpr_zeta, drop_drop, ex2_intro/ +qed-. + +fact cpr_conf_lpr_zeta_zeta: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, +ⓓV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 → ∀X1. ⬆[O, 1] X1 ≡ T1 → + ∀T2. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T2 → ∀X2. ⬆[O, 1] X2 ≡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ X1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T. +#G #L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1 +#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 /2 width=1 by lpr_pair/ -L0 -T0 #T #HT1 #HT2 +elim (cpr_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=2 by drop_drop/ #T1 #HT1 #HXT1 +elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=2 by drop_drop/ #T2 #HT2 #HXT2 +lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3 by ex2_intro/ +qed-. + +fact cpr_conf_lpr_flat_flat: + ∀I,G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓕ{I}V0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓕ{I}V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓕ{I}V2.T2 ➡ T. +#I #G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01 +#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) // +elim (IH … HT01 … HT02 … HL01 … HL02) /3 width=5 by cpr_flat, ex2_intro/ +qed-. + +fact cpr_conf_lpr_flat_eps: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓝV1.T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #V0 #T0 #IH #V1 #T1 #HT01 +#T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3 by cpr_eps, ex2_intro/ +qed-. + +fact cpr_conf_lpr_eps_eps: + ∀G,L0,V0,T0. ( + ∀L,T. ⦃G, L0, ⓝV0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀T2. ⦃G, L0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T. +#G #L0 #V0 #T0 #IH #T1 #HT01 +#T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3 by ex2_intro/ +qed-. + +fact cpr_conf_lpr_flat_beta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓛ{a}W0.T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H +#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (cpr_inv_abst1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ #W #HW1 #HW2 +elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2 +lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_beta/ (**) (* full auto not tried *) +/4 width=5 by cpr_bind, cpr_flat, cpr_beta, ex2_intro/ +qed-. + +(* Basic-1: includes: + pr0_cong_upsilon_refl pr0_cong_upsilon_zeta + pr0_cong_upsilon_cong pr0_cong_upsilon_delta +*) +fact cpr_conf_lpr_flat_theta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓓ{a}W0.T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⬆[O, 1] V2 ≡ U2 → + ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H +#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (lift_total V 0 1) #U #HVU +lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by drop_drop/ #HU2 +elim (cpr_inv_abbr1 … H) -H * +[ #W1 #T1 #HW01 #HT01 #H destruct + elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ + elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 + /4 width=7 by cpr_bind, cpr_flat, cpr_theta, ex2_intro/ +| #T1 #HT01 #HXT1 #H destruct + elim (IH … HT01 … HT02 (L1.ⓓW2) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2 + elim (cpr_inv_lift1 … HT1 L1 … HXT1) -HXT1 + /4 width=9 by cpr_flat, cpr_zeta, drop_drop, lift_flat, ex2_intro/ +] +qed-. + +fact cpr_conf_lpr_beta_beta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓛ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓛW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}ⓝW1.V1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}ⓝW2.V2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #W1 #HW01 #T1 #HT01 +#V2 #HV02 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ #W #HW1 #HW2 +elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 #T #HT1 #HT2 +lapply (lsubr_cpr_trans … HT1 (L1.ⓓⓝW1.V1) ?) -HT1 /2 width=1 by lsubr_beta/ +lapply (lsubr_cpr_trans … HT2 (L2.ⓓⓝW2.V2) ?) -HT2 /2 width=1 by lsubr_beta/ +/4 width=5 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *) +qed-. + +(* Basic_1: was: pr0_upsilon_upsilon *) +fact cpr_conf_lpr_theta_theta: + ∀a,G,L0,V0,W0,T0. ( + ∀L,T. ⦃G, L0, ⓐV0.ⓓ{a}W0.T0⦄ ⊐+ ⦃G, L, T⦄ → + ∀T1. ⦃G, L⦄ ⊢ T ➡ T1 → ∀T2. ⦃G, L⦄ ⊢ T ➡ T2 → + ∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 → + ∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0 + ) → + ∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀U1. ⬆[O, 1] V1 ≡ U1 → + ∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T1 → + ∀V2. ⦃G, L0⦄ ⊢ V0 ➡ V2 → ∀U2. ⬆[O, 1] V2 ≡ U2 → + ∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 → + ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 → + ∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}W1.ⓐU1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T. +#a #G #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01 +#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02 +elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1 by/ #V #HV1 #HV2 +elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1 by/ +elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1 by lpr_pair/ -L0 -V0 -W0 -T0 +elim (lift_total V 0 1) #U #HVU +lapply (cpr_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=2 by drop_drop/ +lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=2 by drop_drop/ +/4 width=7 by cpr_bind, cpr_flat, ex2_intro/ (**) (* full auto not tried *) +qed-. + +theorem cpr_conf_lpr: ∀G. lpx_sn_confluent (cpr G) (cpr G). +#G #L0 #T0 @(fqup_wf_ind_eq … G L0 T0) -G -L0 -T0 #G #L #T #IH #G0 #L0 * [| * ] +[ #I0 #HG #HL #HT #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct + elim (cpr_inv_atom1 … H1) -H1 + elim (cpr_inv_atom1 … H2) -H2 + [ #H2 #H1 destruct + /2 width=1 by cpr_conf_lpr_atom_atom/ + | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct + /3 width=10 by cpr_conf_lpr_atom_delta/ + | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct + /4 width=10 by ex2_commute, cpr_conf_lpr_atom_delta/ + | * #X #Y #V2 #z #H #HV02 #HVT2 #H2 + * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct + /3 width=17 by cpr_conf_lpr_delta_delta/ + ] +| #a #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct + elim (cpr_inv_bind1 … H1) -H1 * + [ #V1 #T1 #HV01 #HT01 #H1 + | #T1 #HT01 #HXT1 #H11 #H12 + ] + elim (cpr_inv_bind1 … H2) -H2 * + [1,3: #V2 #T2 #HV02 #HT02 #H2 + |2,4: #T2 #HT02 #HXT2 #H21 #H22 + ] destruct + [ /3 width=10 by cpr_conf_lpr_bind_bind/ + | /4 width=11 by ex2_commute, cpr_conf_lpr_bind_zeta/ + | /3 width=11 by cpr_conf_lpr_bind_zeta/ + | /3 width=12 by cpr_conf_lpr_zeta_zeta/ + ] +| #I #V0 #T0 #HG #HL #HT #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct + elim (cpr_inv_flat1 … H1) -H1 * + [ #V1 #T1 #HV01 #HT01 #H1 + | #HX1 #H1 + | #a1 #V1 #Y1 #W1 #Z1 #T1 #HV01 #HYW1 #HZT1 #H11 #H12 #H13 + | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13 + ] + elim (cpr_inv_flat1 … H2) -H2 * + [1,5,9,13: #V2 #T2 #HV02 #HT02 #H2 + |2,6,10,14: #HX2 #H2 + |3,7,11,15: #a2 #V2 #Y2 #W2 #Z2 #T2 #HV02 #HYW2 #HZT2 #H21 #H22 #H23 + |4,8,12,16: #a2 #V2 #U2 #Y2 #W2 #Z2 #T2 #HV02 #HVU2 #HYW2 #HZT2 #H21 #H22 #H23 + ] destruct + [ /3 width=10 by cpr_conf_lpr_flat_flat/ + | /4 width=8 by ex2_commute, cpr_conf_lpr_flat_eps/ + | /4 width=12 by ex2_commute, cpr_conf_lpr_flat_beta/ + | /4 width=14 by ex2_commute, cpr_conf_lpr_flat_theta/ + | /3 width=8 by cpr_conf_lpr_flat_eps/ + | /3 width=7 by cpr_conf_lpr_eps_eps/ + | /3 width=12 by cpr_conf_lpr_flat_beta/ + | /3 width=13 by cpr_conf_lpr_beta_beta/ + | /3 width=14 by cpr_conf_lpr_flat_theta/ + | /3 width=17 by cpr_conf_lpr_theta_theta/ + ] +] +qed-. + +(* Basic_1: includes: pr0_confluence pr2_confluence *) +theorem cpr_conf: ∀G,L. confluent … (cpr G L). +/2 width=6 by cpr_conf_lpr/ qed-. + +(* Properties on context-sensitive parallel reduction for terms *************) + +lemma lpr_cpr_conf_dx: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L1⦄ ⊢ T1 ➡ T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 +elim (cpr_conf_lpr … HT01 T0 … HL01 … HL01) /2 width=3 by ex2_intro/ +qed-. + +lemma lpr_cpr_conf_sn: ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡ T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → + ∃∃T. ⦃G, L1⦄ ⊢ T0 ➡ T & ⦃G, L0⦄ ⊢ T1 ➡ T. +#G #L0 #T0 #T1 #HT01 #L1 #HL01 +elim (cpr_conf_lpr … HT01 T0 … L0 … HL01) /2 width=3 by ex2_intro/ +qed-. + +(* Main properties **********************************************************) + +theorem lpr_conf: ∀G. confluent … (lpr G). +/3 width=6 by lpx_sn_conf, cpr_conf_lpr/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx.ma new file mode 100644 index 000000000..5b93217da --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx.ma @@ -0,0 +1,65 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/predsn_5.ma". +include "basic_2A/reduction/lpr.ma". +include "basic_2A/reduction/cpx.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +definition lpx: ∀h. sd h → relation3 genv lenv lenv ≝ + λh,g,G. lpx_sn (cpx h g G). + +interpretation "extended parallel reduction (local environment, sn variant)" + 'PRedSn h g G L1 L2 = (lpx h g G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +lemma lpx_inv_atom1: ∀h,g,G,L2. ⦃G, ⋆⦄ ⊢ ➡[h, g] L2 → L2 = ⋆. +/2 width=4 by lpx_sn_inv_atom1_aux/ qed-. + +lemma lpx_inv_pair1: ∀h,g,I,G,K1,V1,L2. ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] L2 → + ∃∃K2,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 & + L2 = K2. ⓑ{I} V2. +/2 width=3 by lpx_sn_inv_pair1_aux/ qed-. + +lemma lpx_inv_atom2: ∀h,g,G,L1. ⦃G, L1⦄ ⊢ ➡[h, g] ⋆ → L1 = ⋆. +/2 width=4 by lpx_sn_inv_atom2_aux/ qed-. + +lemma lpx_inv_pair2: ∀h,g,I,G,L1,K2,V2. ⦃G, L1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2 → + ∃∃K1,V1. ⦃G, K1⦄ ⊢ ➡[h, g] K2 & ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 & + L1 = K1. ⓑ{I} V1. +/2 width=3 by lpx_sn_inv_pair2_aux/ qed-. + +lemma lpx_inv_pair: ∀h,g,I1,I2,G,L1,L2,V1,V2. ⦃G, L1.ⓑ{I1}V1⦄ ⊢ ➡[h, g] L2.ⓑ{I2}V2 → + ∧∧ ⦃G, L1⦄ ⊢ ➡[h, g] L2 & ⦃G, L1⦄ ⊢ V1 ➡[h, g] V2 & I1 = I2. +/2 width=1 by lpx_sn_inv_pair/ qed-. + +(* Basic properties *********************************************************) + +lemma lpx_refl: ∀h,g,G,L. ⦃G, L⦄ ⊢ ➡[h, g] L. +/2 width=1 by lpx_sn_refl/ qed. + +lemma lpx_pair: ∀h,g,I,G,K1,K2,V1,V2. ⦃G, K1⦄ ⊢ ➡[h, g] K2 → ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 → + ⦃G, K1.ⓑ{I}V1⦄ ⊢ ➡[h, g] K2.ⓑ{I}V2. +/2 width=1 by lpx_sn_pair/ qed. + +lemma lpr_lpx: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L1⦄ ⊢ ➡[h, g] L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /3 width=1 by lpx_pair, cpr_cpx/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma lpx_fwd_length: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → |L1| = |L2|. +/2 width=2 by lpx_sn_fwd_length/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_aaa.ma new file mode 100644 index 000000000..58387c36f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_aaa.ma @@ -0,0 +1,83 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_lift.ma". +include "basic_2A/static/lsuba_aaa.ma". +include "basic_2A/reduction/lpx_drop.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on atomic arity assignment for terms **************************) + +(* Note: lemma 500 *) +lemma cpx_lpx_aaa_conf: ∀h,g,G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → + ∀T2. ⦃G, L1⦄ ⊢ T1 ➡[h, g] T2 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T2 ⁝ A. +#h #g #G #L1 #T1 #A #H elim H -G -L1 -T1 -A +[ #g #L1 #k #X #H + elim (cpx_inv_sort1 … H) -H // * // +| #I #G #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12 + elim (cpx_inv_lref1 … H) -H + [ #H destruct + elim (lpx_drop_conf … HLK1 … HL12) -L1 #X #H #HLK2 + elim (lpx_inv_pair1 … H) -H + #K2 #V2 #HK12 #HV12 #H destruct /3 width=6 by aaa_lref/ + | * #J #Y #Z #V2 #H #HV12 #HV2 + lapply (drop_mono … H … HLK1) -H #H destruct + elim (lpx_drop_conf … HLK1 … HL12) -L1 #Z #H #HLK2 + elim (lpx_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct + /3 width=8 by aaa_lift, drop_fwd_drop2/ + ] +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_abbr1 … H) -H * + [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=2 by lpx_pair, aaa_abbr/ + | #T2 #HT12 #HT2 #H destruct -IHV1 + /4 width=8 by lpx_pair, aaa_inv_lift, drop_drop/ + ] +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /4 width=1 by lpx_pair, aaa_abst/ +| #G #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_appl1 … H) -H * + [ #V2 #T2 #HV12 #HT12 #H destruct /3 width=3 by aaa_appl/ + | #b #V2 #W1 #W2 #U1 #U2 #HV12 #HW12 #HU12 #H1 #H2 destruct + lapply (IHV1 … HV12 … HL12) -IHV1 -HV12 #HV2 + lapply (IHT1 (ⓛ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H + elim (aaa_inv_abst … H) -H #B0 #A0 #HW1 #HU2 #H destruct + /5 width=6 by lsuba_aaa_trans, lsuba_beta, aaa_abbr, aaa_cast/ + | #b #V #V2 #W1 #W2 #U1 #U2 #HV1 #HV2 #HW12 #HU12 #H1 #H2 destruct + lapply (aaa_lift G L2 … B … (L2.ⓓW2) … HV2) -HV2 /2 width=2 by drop_drop/ #HV2 + lapply (IHT1 (ⓓ{b}W2.U2) … HL12) -IHT1 /2 width=1 by cpx_bind/ -L1 #H + elim (aaa_inv_abbr … H) -H /3 width=3 by aaa_abbr, aaa_appl/ + ] +| #G #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12 + elim (cpx_inv_cast1 … H) -H + [ * #V2 #T2 #HV12 #HT12 #H destruct /3 width=1 by aaa_cast/ + | -IHV1 /2 width=1 by/ + | -IHT1 /2 width=1 by/ + ] +] +qed-. + +lemma cpx_aaa_conf: ∀h,g,G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +/2 width=7 by cpx_lpx_aaa_conf/ qed-. + +lemma lpx_aaa_conf: ∀h,g,G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +/2 width=7 by cpx_lpx_aaa_conf/ qed-. + +lemma cpr_aaa_conf: ∀G,L,T1,A. ⦃G, L⦄ ⊢ T1 ⁝ A → ∀T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ T2 ⁝ A. +/3 width=5 by cpx_aaa_conf, cpr_cpx/ qed-. + +lemma lpr_aaa_conf: ∀G,L1,T,A. ⦃G, L1⦄ ⊢ T ⁝ A → ∀L2. ⦃G, L1⦄ ⊢ ➡ L2 → ⦃G, L2⦄ ⊢ T ⁝ A. +/3 width=5 by lpx_aaa_conf, lpr_lpx/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_drop.ma new file mode 100644 index 000000000..6509da528 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_drop.ma @@ -0,0 +1,78 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn_drop.ma". +include "basic_2A/reduction/cpx_lift.ma". +include "basic_2A/reduction/lpx.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on local environment slicing ***********************************) + +lemma lpx_drop_conf: ∀h,g,G. dropable_sn (lpx h g G). +/3 width=6 by lpx_sn_deliftable_dropable, cpx_inv_lift1/ qed-. + +lemma drop_lpx_trans: ∀h,g,G. dedropable_sn (lpx h g G). +/3 width=10 by lpx_sn_liftable_dedropable, cpx_lift/ qed-. + +lemma lpx_drop_trans_O1: ∀h,g,G. dropable_dx (lpx h g G). +/2 width=3 by lpx_sn_dropable/ qed-. + +(* Properties on supclosure *************************************************) + +lemma fqu_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=5 by fqu_lref_O, fqu_pair_sn, fqu_flat_dx, lpx_pair, ex3_2_intro/ +[ #a #I #G2 #L2 #V2 #T2 #X #H elim (lpx_inv_pair1 … H) -H + #K2 #W2 #HLK2 #HVW2 #H destruct + /3 width=5 by cpx_pair_sn, fqu_bind_dx, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #K2 #HK12 + elim (drop_lpx_trans … HLK1 … HK12) -HK12 + /3 width=7 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma fquq_lpx_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K2. ⦃G2, L2⦄ ⊢ ➡[h, g] K2 → + ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h, g] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 elim (fquq_inv_gen … H) -H +[ #HT12 elim (fqu_lpx_trans … HT12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lpx_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/3 width=7 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, lpx_pair, ex3_2_intro/ +[ #I #G1 #L1 #V1 #X #H elim (lpx_inv_pair2 … H) -H + #K1 #W1 #HKL1 #HWV1 #H destruct elim (lift_total V1 0 1) + /4 width=7 by cpx_delta, fqu_drop, drop_drop, ex3_2_intro/ +| #G #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #L0 #HL01 + elim (lpx_drop_trans_O1 … HL01 … HLK1) -L1 + /3 width=5 by fqu_drop, ex3_2_intro/ +] +qed-. + +lemma lpx_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → + ∃∃K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[h, g] T & ⦃G1, K1, T⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 elim (fquq_inv_gen … H) -H +[ #HT12 elim (lpx_fqu_trans … HT12 … HKL1) /3 width=5 by fqu_fquq, ex3_2_intro/ +| * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_frees.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_frees.ma new file mode 100644 index 000000000..6a187d416 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_frees.ma @@ -0,0 +1,88 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/frees_lreq.ma". +include "basic_2A/multiple/frees_lift.ma". +include "basic_2A/reduction/lpx_drop.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on context-sensitive free variables ***************************) + +lemma lpx_cpx_frees_trans: ∀h,g,G,L1,U1,U2. ⦃G, L1⦄ ⊢ U1 ➡[h, g] U2 → + ∀L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → + ∀i. L2 ⊢ i ϵ 𝐅*[0]⦃U2⦄ → L1 ⊢ i ϵ 𝐅*[0]⦃U1⦄. +#h #g #G #L1 #U1 @(fqup_wf_ind_eq … G L1 U1) -G -L1 -U1 +#G0 #L0 #U0 #IH #G #L1 * * +[ -IH #k #HG #HL #HU #U2 #H1 #L2 #_ #i #H2 elim (cpx_inv_sort1 … H1) -H1 + [| * #d #_ ] #H destruct elim (frees_inv_sort … H2) +| #j #HG #HL #HU #U2 #H1 #L2 #HL12 #i #H2 elim (cpx_inv_lref1 … H1) -H1 + [ #H destruct elim (frees_inv_lref … H2) -H2 // + * #I #K2 #W2 #Hj #Hji #HLK2 #HW2 + elim (lpx_drop_trans_O1 … HL12 … HLK2) -HL12 #Y #HLK1 #H + elim (lpx_inv_pair2 … H) -H #K1 #W1 #HK12 #HW12 #H destruct + /4 width=11 by frees_lref_be, fqup_lref/ + | * #I #K1 #W1 #W0 #HLK1 #HW10 #HW0U2 + lapply (drop_fwd_drop2 … HLK1) #H0 + elim (lpx_drop_conf … H0 … HL12) -H0 -HL12 #K2 #HK12 #HLK2 + elim (lt_or_ge i (j+1)) #Hji + [ -IH elim (frees_inv_lift_be … H2 … HLK2 … HW0U2) /2 width=1 by monotonic_pred/ + | lapply (frees_inv_lift_ge … H2 … HLK2 … HW0U2 ?) -L2 -U2 // (cpx_inv_gref1 … H1) -H1 destruct + #L2 #_ #i #H2 elim (frees_inv_gref … H2) +| #a #I #W1 #U1 #HG #HL #HU #X #HX #L2 #HL12 #i #Hi destruct + elim (cpx_inv_bind1 … HX) -HX * + [ #W2 #U2 #HW12 #HU12 #H destruct + elim (frees_inv_bind_O … Hi) -Hi + /4 width=7 by frees_bind_dx_O, frees_bind_sn, lpx_pair/ + | #U2 #HU12 #HXU2 #H1 #H2 destruct + lapply (frees_lift_ge … Hi (L2.ⓓW1) (Ⓕ) … HXU2 ?) + /4 width=7 by frees_bind_dx_O, lpx_pair, drop_drop/ + ] +| #I #W1 #X1 #HG #HL #HU #X2 #HX2 #L2 #HL12 #i #Hi destruct + elim (cpx_inv_flat1 … HX2) -HX2 * + [ #W2 #U2 #HW12 #HU12 #H destruct + elim (frees_inv_flat … Hi) -Hi /3 width=7 by frees_flat_dx, frees_flat_sn/ + | #HU12 #H destruct /3 width=7 by frees_flat_dx/ + | #HW12 #H destruct /3 width=7 by frees_flat_sn/ + | #b #W2 #V1 #V2 #U1 #U2 #HW12 #HV12 #HU12 #H1 #H2 #H3 destruct + elim (frees_inv_bind … Hi) -Hi #Hi + [ elim (frees_inv_flat … Hi) -Hi + /4 width=7 by frees_flat_dx, frees_flat_sn, frees_bind_sn/ + | lapply (lreq_frees_trans … Hi (L2.ⓛV2) ?) /2 width=1 by lreq_succ/ -Hi #HU2 + lapply (frees_weak … HU2 0 ?) -HU2 + /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/ + ] + | #b #W2 #W0 #V1 #V2 #U1 #U2 #HW12 #HW20 #HV12 #HU12 #H1 #H2 #H3 destruct + elim (frees_inv_bind_O … Hi) -Hi #Hi + [ /4 width=7 by frees_flat_dx, frees_bind_sn/ + | elim (frees_inv_flat … Hi) -Hi + [ #HW0 lapply (frees_inv_lift_ge … HW0 L2 (Ⓕ) … HW20 ?) -W0 + /3 width=7 by frees_flat_sn, drop_drop/ + | /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/ + ] + ] + ] +] +qed-. + +lemma cpx_frees_trans: ∀h,g,G. frees_trans (cpx h g G). +/2 width=8 by lpx_cpx_frees_trans/ qed-. + +lemma lpx_frees_trans: ∀h,g,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, g] L2 → + ∀U,i. L2 ⊢ i ϵ 𝐅*[0]⦃U⦄ → L1 ⊢ i ϵ 𝐅*[0]⦃U⦄. +/2 width=8 by lpx_cpx_frees_trans/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_lleq.ma new file mode 100644 index 000000000..0563baecc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/reduction/lpx_lleq.ma @@ -0,0 +1,136 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/llor_drop.ma". +include "basic_2A/multiple/llpx_sn_llor.ma". +include "basic_2A/multiple/llpx_sn_lpx_sn.ma". +include "basic_2A/multiple/lleq_lreq.ma". +include "basic_2A/multiple/lleq_llor.ma". +include "basic_2A/reduction/cpx_lreq.ma". +include "basic_2A/reduction/cpx_lleq.ma". +include "basic_2A/reduction/lpx_frees.ma". + +(* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************) + +(* Properties on lazy equivalence for local environments ********************) + +(* Note: contains a proof of llpx_cpx_conf *) +lemma lleq_lpx_trans: ∀h,g,G,L2,K2. ⦃G, L2⦄ ⊢ ➡[h, g] K2 → + ∀L1,T,l. L1 ≡[T, l] L2 → + ∃∃K1. ⦃G, L1⦄ ⊢ ➡[h, g] K1 & K1 ≡[T, l] K2. +#h #g #G #L2 #K2 #HLK2 #L1 #T #l #HL12 +lapply (lpx_fwd_length … HLK2) #H1 +lapply (lleq_fwd_length … HL12) #H2 +lapply (lpx_sn_llpx_sn … T … l HLK2) // -HLK2 #H +lapply (lleq_llpx_sn_trans … HL12 … H) /2 width=3 by lleq_cpx_trans/ -HL12 -H #H +elim (llor_total L1 K2 T l) // -H1 -H2 #K1 #HLK1 +lapply (llpx_sn_llor_dx_sym … H … HLK1) +[ /2 width=6 by cpx_frees_trans/ +| /3 width=10 by cpx_llpx_sn_conf, cpx_inv_lift1, cpx_lift/ +| /3 width=5 by llpx_sn_llor_fwd_sn, ex2_intro/ +] +qed-. + +lemma lpx_lleq_fqu_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G1 #L1 #V1 #X #H1 #H2 elim (lpx_inv_pair2 … H1) -H1 + #K0 #V0 #H1KL1 #_ #H destruct + elim (lleq_inv_lref_ge_dx … H2 ? I L1 V1) -H2 // + #K1 #H #H2KL1 lapply (drop_inv_O2 … H) -H #H destruct + /2 width=4 by fqu_lref_O, ex3_intro/ +| * [ #a ] #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H + [ elim (lleq_inv_bind … H) + | elim (lleq_inv_flat … H) + ] -H /2 width=4 by fqu_pair_sn, ex3_intro/ +| #a #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_bind_O … H) -H + /3 width=4 by lpx_pair, fqu_bind_dx, ex3_intro/ +| #I #G1 #L1 #V1 #T1 #K1 #HLK1 #H elim (lleq_inv_flat … H) -H + /2 width=4 by fqu_flat_dx, ex3_intro/ +| #G1 #L1 #L #T1 #U1 #m #HL1 #HTU1 #K1 #H1KL1 #H2KL1 + elim (drop_O1_le (Ⓕ) (m+1) K1) + [ #K #HK1 lapply (lleq_inv_lift_le … H2KL1 … HK1 HL1 … HTU1 ?) -H2KL1 // + #H2KL elim (lpx_drop_trans_O1 … H1KL1 … HL1) -L1 + #K0 #HK10 #H1KL lapply (drop_mono … HK10 … HK1) -HK10 #H destruct + /3 width=4 by fqu_drop, ex3_intro/ + | lapply (drop_fwd_length_le2 … HL1) -L -T1 -g + lapply (lleq_fwd_length … H2KL1) // + ] +] +qed-. + +lemma lpx_lleq_fquq_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐⸮ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fquq_inv_gen … H) -H +[ #H elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fquq, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +lemma lpx_lleq_fqup_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[ #G2 #L2 #T2 #H #K1 #H1KL1 #H2KL1 elim (lpx_lleq_fqu_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqu_fqup, ex3_intro/ +| #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #K1 #H1KL1 #H2KL1 elim (IHT1 … H2KL1) // -L1 + #K #HT1 #H1KL #H2KL elim (lpx_lleq_fqu_trans … HT2 … H1KL H2KL) -L + /3 width=5 by fqup_strap1, ex3_intro/ +] +qed-. + +lemma lpx_lleq_fqus_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀K1. ⦃G1, K1⦄ ⊢ ➡[h, g] L1 → K1 ≡[T1, 0] L1 → + ∃∃K2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h, g] L2 & K2 ≡[T2, 0] L2. +#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #H1KL1 #H2KL1 +elim (fqus_inv_gen … H) -H +[ #H elim (lpx_lleq_fqup_trans … H … H1KL1 H2KL1) -L1 + /3 width=4 by fqup_fqus, ex3_intro/ +| * #HG #HL #HT destruct /2 width=4 by ex3_intro/ +] +qed-. + +fact lreq_lpx_trans_lleq_aux: ∀h,g,G,L1,L0,l,m. L1 ⩬[l, m] L0 → m = ∞ → + ∀L2. ⦃G, L0⦄ ⊢ ➡[h, g] L2 → + ∃∃L. L ⩬[l, m] L2 & ⦃G, L1⦄ ⊢ ➡[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +#h #g #G #L1 #L0 #l #m #H elim H -L1 -L0 -l -m +[ #l #m #_ #L2 #H >(lpx_inv_atom1 … H) -H + /3 width=5 by ex3_intro, conj/ +| #I1 #I0 #L1 #L0 #V1 #V0 #_ #_ #Hm destruct +| #I #L1 #L0 #V1 #m #HL10 #IHL10 #Hm #Y #H + elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + lapply (ysucc_inv_Y_dx … Hm) -Hm #Hm + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I}V2)) /3 width=3 by lpx_pair, lreq_cpx_trans, lreq_pair/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_pair_O_Y/ +| #I1 #I0 #L1 #L0 #V1 #V0 #l #m #HL10 #IHL10 #Hm #Y #H + elim (lpx_inv_pair1 … H) -H #L2 #V2 #HL02 #HV02 #H destruct + elim (IHL10 … HL02) // -IHL10 -HL02 #L #HL2 #HL1 #IH + @(ex3_intro … (L.ⓑ{I1}V1)) /3 width=1 by lpx_pair, lreq_succ/ + #T elim (IH T) #HL0dx #HL0sn + @conj #H @(lleq_lreq_repl … H) -H /3 width=1 by lreq_sym, lreq_succ/ +] +qed-. + +lemma lreq_lpx_trans_lleq: ∀h,g,G,L1,L0,l. L1 ⩬[l, ∞] L0 → + ∀L2. ⦃G, L0⦄ ⊢ ➡[h, g] L2 → + ∃∃L. L ⩬[l, ∞] L2 & ⦃G, L1⦄ ⊢ ➡[h, g] L & + (∀T. L0 ≡[T, l] L2 ↔ L1 ≡[T, l] L). +/2 width=1 by lreq_lpx_trans_lleq_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa.ma new file mode 100644 index 000000000..28701420a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa.ma @@ -0,0 +1,145 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/atomicarity_4.ma". +include "basic_2A/grammar/aarity.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/drop.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* activate genv *) +inductive aaa: relation4 genv lenv term aarity ≝ +| aaa_sort: ∀G,L,k. aaa G L (⋆k) (⓪) +| aaa_lref: ∀I,G,L,K,V,B,i. ⬇[i] L ≡ K. ⓑ{I}V → aaa G K V B → aaa G L (#i) B +| aaa_abbr: ∀a,G,L,V,T,B,A. + aaa G L V B → aaa G (L.ⓓV) T A → aaa G L (ⓓ{a}V.T) A +| aaa_abst: ∀a,G,L,V,T,B,A. + aaa G L V B → aaa G (L.ⓛV) T A → aaa G L (ⓛ{a}V.T) (②B.A) +| aaa_appl: ∀G,L,V,T,B,A. aaa G L V B → aaa G L T (②B.A) → aaa G L (ⓐV.T) A +| aaa_cast: ∀G,L,V,T,A. aaa G L V A → aaa G L T A → aaa G L (ⓝV.T) A +. + +interpretation "atomic arity assignment (term)" + 'AtomicArity G L T A = (aaa G L T A). + +(* Basic inversion lemmas ***************************************************) + +fact aaa_inv_sort_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀k. T = ⋆k → A = ⓪. +#G #L #T #A * -G -L -T -A +[ // +| #I #G #L #K #V #B #i #_ #_ #k #H destruct +| #a #G #L #V #T #B #A #_ #_ #k #H destruct +| #a #G #L #V #T #B #A #_ #_ #k #H destruct +| #G #L #V #T #B #A #_ #_ #k #H destruct +| #G #L #V #T #A #_ #_ #k #H destruct +] +qed-. + +lemma aaa_inv_sort: ∀G,L,A,k. ⦃G, L⦄ ⊢ ⋆k ⁝ A → A = ⓪. +/2 width=6 by aaa_inv_sort_aux/ qed-. + +fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀i. T = #i → + ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #i #H destruct +| #I #G #L #K #V #B #j #HLK #HB #i #H destruct /2 width=5 by ex2_3_intro/ +| #a #G #L #V #T #B #A #_ #_ #i #H destruct +| #a #G #L #V #T #B #A #_ #_ #i #H destruct +| #G #L #V #T #B #A #_ #_ #i #H destruct +| #G #L #V #T #A #_ #_ #i #H destruct +] +qed-. + +lemma aaa_inv_lref: ∀G,L,A,i. ⦃G, L⦄ ⊢ #i ⁝ A → + ∃∃I,K,V. ⬇[i] L ≡ K. ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A. +/2 width=3 by aaa_inv_lref_aux/ qed-. + +fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p. T = §p → ⊥. +#G #L #T #A * -G -L -T -A +[ #G #L #k #q #H destruct +| #I #G #L #K #V #B #i #HLK #HB #q #H destruct +| #a #G #L #V #T #B #A #_ #_ #q #H destruct +| #a #G #L #V #T #B #A #_ #_ #q #H destruct +| #G #L #V #T #B #A #_ #_ #q #H destruct +| #G #L #V #T #A #_ #_ #q #H destruct +] +qed-. + +lemma aaa_inv_gref: ∀G,L,A,p. ⦃G, L⦄ ⊢ §p ⁝ A → ⊥. +/2 width=7 by aaa_inv_gref_aux/ qed-. + +fact aaa_inv_abbr_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀a,W,U. T = ⓓ{a}W. U → + ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L.ⓓW⦄ ⊢ U ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #a #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #a #W #U #H destruct +| #b #G #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=2 by ex2_intro/ +| #b #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #G #L #V #T #A #_ #_ #a #W #U #H destruct +] +qed-. + +lemma aaa_inv_abbr: ∀a,G,L,V,T,A. ⦃G, L⦄ ⊢ ⓓ{a}V. T ⁝ A → + ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L.ⓓV⦄ ⊢ T ⁝ A. +/2 width=4 by aaa_inv_abbr_aux/ qed-. + +fact aaa_inv_abst_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀a,W,U. T = ⓛ{a}W. U → + ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ U ⁝ B2 & A = ②B1.B2. +#G #L #T #A * -G -L -T -A +[ #G #L #k #a #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #a #W #U #H destruct +| #b #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #b #G #L #V #T #B #A #HV #HT #a #W #U #H destruct /2 width=5 by ex3_2_intro/ +| #G #L #V #T #B #A #_ #_ #a #W #U #H destruct +| #G #L #V #T #A #_ #_ #a #W #U #H destruct +] +qed-. + +lemma aaa_inv_abst: ∀a,G,L,W,T,A. ⦃G, L⦄ ⊢ ⓛ{a}W. T ⁝ A → + ∃∃B1,B2. ⦃G, L⦄ ⊢ W ⁝ B1 & ⦃G, L.ⓛW⦄ ⊢ T ⁝ B2 & A = ②B1.B2. +/2 width=4 by aaa_inv_abst_aux/ qed-. + +fact aaa_inv_appl_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓐW.U → + ∃∃B. ⦃G, L⦄ ⊢ W ⁝ B & ⦃G, L⦄ ⊢ U ⁝ ②B.A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #B #A #HV #HT #W #U #H destruct /2 width=3 by ex2_intro/ +| #G #L #V #T #A #_ #_ #W #U #H destruct +] +qed-. + +lemma aaa_inv_appl: ∀G,L,V,T,A. ⦃G, L⦄ ⊢ ⓐV.T ⁝ A → + ∃∃B. ⦃G, L⦄ ⊢ V ⁝ B & ⦃G, L⦄ ⊢ T ⁝ ②B.A. +/2 width=3 by aaa_inv_appl_aux/ qed-. + +fact aaa_inv_cast_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀W,U. T = ⓝW. U → + ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ U ⁝ A. +#G #L #T #A * -G -L -T -A +[ #G #L #k #W #U #H destruct +| #I #G #L #K #V #B #i #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #a #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #B #A #_ #_ #W #U #H destruct +| #G #L #V #T #A #HV #HT #W #U #H destruct /2 width=1 by conj/ +] +qed-. + +lemma aaa_inv_cast: ∀G,L,W,T,A. ⦃G, L⦄ ⊢ ⓝW. T ⁝ A → + ⦃G, L⦄ ⊢ W ⁝ A ∧ ⦃G, L⦄ ⊢ T ⁝ A. +/2 width=3 by aaa_inv_cast_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_aaa.ma new file mode 100644 index 000000000..a47130cc5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_aaa.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Main properties **********************************************************) + +theorem aaa_mono: ∀G,L,T,A1. ⦃G, L⦄ ⊢ T ⁝ A1 → ∀A2. ⦃G, L⦄ ⊢ T ⁝ A2 → A1 = A2. +#G #L #T #A1 #H elim H -G -L -T -A1 +[ #G #L #k #A2 #H + >(aaa_inv_sort … H) -H // +| #I1 #G #L #K1 #V1 #B #i #HLK1 #_ #IHA1 #A2 #H + elim (aaa_inv_lref … H) -H #I2 #K2 #V2 #HLK2 #HA2 + lapply (drop_mono … HLK1 … HLK2) -L #H destruct /2 width=1 by/ +| #a #G #L #V #T #B1 #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_abbr … H) -H /2 width=1 by/ +| #a #G #L #V1 #T1 #B1 #A1 #_ #_ #IHB1 #IHA1 #X #H + elim (aaa_inv_abst … H) -H #B2 #A2 #HB2 #HA2 #H destruct /3 width=1 by eq_f2/ +| #G #L #V1 #T1 #B1 #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_appl … H) -H #B2 #_ #HA2 + lapply (IHA1 … HA2) -L #H destruct // +| #G #L #V #T #A1 #_ #_ #_ #IHA1 #A2 #H + elim (aaa_inv_cast … H) -H /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma new file mode 100644 index 000000000..922c971a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma @@ -0,0 +1,63 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/fqus_alt.ma". +include "basic_2A/static/aaa_lift.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties on supclosure *************************************************) + +lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[ #I #G #L #T #A #H elim (aaa_inv_lref … H) -H + #J #K #V #H #HA lapply (drop_inv_O2 … H) -H + #H destruct /2 width=2 by ex_intro/ +| * [ #a ] * #G #L #V #T #X #H + [ elim (aaa_inv_abbr … H) + | elim (aaa_inv_abst … H) + | elim (aaa_inv_appl … H) + | elim (aaa_inv_cast … H) + ] -H /2 width=2 by ex_intro/ +| #a * #G #L #V #T #X #H + [ elim (aaa_inv_abbr … H) + | elim (aaa_inv_abst … H) + ] -H /2 width=2 by ex_intro/ +| * #G #L #V #T #X #H + [ elim (aaa_inv_appl … H) + | elim (aaa_inv_cast … H) + ] -H /2 width=2 by ex_intro/ +| /3 width=9 by aaa_inv_lift, ex_intro/ +] +qed-. + +lemma aaa_fquq_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim(fquq_inv_gen … H) -H /2 width=6 by aaa_fqu_conf/ +* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ +qed-. + +lemma aaa_fqup_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2 +[2: #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A ] +/2 width=6 by aaa_fqu_conf/ +qed-. + +lemma aaa_fqus_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ → + ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim(fqus_inv_gen … H) -H /2 width=6 by aaa_fqup_conf/ +* #H1 #H2 #H3 destruct /2 width=2 by ex_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lift.ma new file mode 100644 index 000000000..7a05536c1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lift.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties on basic relocation *******************************************) + +lemma aaa_lift: ∀G,L1,T1,A. ⦃G, L1⦄ ⊢ T1 ⁝ A → ∀L2,s,l,m. ⬇[s, l, m] L2 ≡ L1 → + ∀T2. ⬆[l, m] T1 ≡ T2 → ⦃G, L2⦄ ⊢ T2 ⁝ A. +#G #L1 #T1 #A #H elim H -G -L1 -T1 -A +[ #G #L1 #k #L2 #s #l #m #_ #T2 #H + >(lift_inv_sort1 … H) -H // +| #I #G #L1 #K1 #V1 #B #i #HLK1 #_ #IHB #L2 #s #l #m #HL21 #T2 #H + elim (lift_inv_lref1 … H) -H * #Hil #H destruct + [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=9 by aaa_lref/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=9 by aaa_lref, drop_inv_gen/ + ] +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #s #l #m #HL21 #X #H + elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abbr, drop_skip/ +| #a #G #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #s #l #m #HL21 #X #H + elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abst, drop_skip/ +| #G #L1 #V1 #T1 #B #A #_ #_ #IHB #IHA #L2 #s #l #m #HL21 #X #H + elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /3 width=5 by aaa_appl/ +| #G #L1 #V1 #T1 #A #_ #_ #IH1 #IH2 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct + /3 width=5 by aaa_cast/ +] +qed. + +lemma aaa_inv_lift: ∀G,L2,T2,A. ⦃G, L2⦄ ⊢ T2 ⁝ A → ∀L1,s,l,m. ⬇[s, l, m] L2 ≡ L1 → + ∀T1. ⬆[l, m] T1 ≡ T2 → ⦃G, L1⦄ ⊢ T1 ⁝ A. +#G #L2 #T2 #A #H elim H -G -L2 -T2 -A +[ #G #L2 #k #L1 #s #l #m #_ #T1 #H + >(lift_inv_sort2 … H) -H // +| #I #G #L2 #K2 #V2 #B #i #HLK2 #_ #IHB #L1 #s #l #m #HL21 #T1 #H + elim (lift_inv_lref2 … H) -H * #Hil #H destruct + [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=9 by aaa_lref/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /3 width=9 by aaa_lref/ + ] +| #a #G #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abbr, drop_skip/ +| #a #G #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /4 width=5 by aaa_abst, drop_skip/ +| #G #L2 #V2 #T2 #B #A #_ #_ #IHB #IHA #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /3 width=5 by aaa_appl/ +| #G #L2 #V2 #T2 #A #_ #_ #IH1 #IH2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /3 width=5 by aaa_cast/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lifts.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lifts.ma new file mode 100644 index 000000000..0b0873379 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lifts.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/drops.ma". +include "basic_2A/static/aaa_lift.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties concerning generic relocation *********************************) + +lemma aaa_lifts: ∀G,L1,L2,T2,A,s,cs. ⬇*[s, cs] L2 ≡ L1 → ∀T1. ⬆*[cs] T1 ≡ T2 → + ⦃G, L1⦄ ⊢ T1 ⁝ A → ⦃G, L2⦄ ⊢ T2 ⁝ A. +#G #L1 #L2 #T2 #A #s #cs #H elim H -L1 -L2 -cs +[ #L #T1 #H #HT1 + <(lifts_inv_nil … H) -H // +| #L1 #L #L2 #cs #l #m #_ #HL2 #IHL1 #T1 #H #HT1 + elim (lifts_inv_cons … H) -H /3 width=10 by aaa_lift/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lleq.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lleq.ma new file mode 100644 index 000000000..59074270c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/aaa_lleq.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/multiple/lleq_drop.ma". +include "basic_2A/static/aaa.ma". + +(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************) + +(* Properties on lazy equivalence for local environments ********************) + +lemma lleq_aaa_trans: ∀G,L2,T,A. ⦃G, L2⦄ ⊢ T ⁝ A → + ∀L1. L1 ≡[T, 0] L2 → ⦃G, L1⦄ ⊢ T ⁝ A. +#G #L2 #T #A #H elim H -G -L2 -T -A /2 width=1 by aaa_sort/ +[ #I #G #L2 #K2 #V2 #A #i #HLK2 #_ #IHV2 #L1 #H elim (lleq_fwd_lref_dx … H … HLK2) -L2 + [ #H elim (ylt_yle_false … H) // + | * /3 width=5 by aaa_lref/ + ] +| #a #G #L2 #V #T #B #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_bind_O … H) -H + /3 width=2 by aaa_abbr/ +| #a #G #L2 #V #T #B #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_bind_O … H) -H + /3 width=1 by aaa_abst/ +| #G #L2 #V #T #B #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_flat … H) -H + /3 width=3 by aaa_appl/ +| #G #L2 #V #T #A #_ #_ #IHV #IHT #L1 #H elim (lleq_inv_flat … H) -H + /3 width=1 by aaa_cast/ +] +qed-. + +lemma aaa_lleq_conf: ∀G,L2,T,A. ⦃G, L2⦄ ⊢ T ⁝ A → + ∀L1. L2 ≡[T, 0] L1 → ⦃G, L1⦄ ⊢ T ⁝ A. +/3 width=3 by lleq_aaa_trans, lleq_sym/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da.ma new file mode 100644 index 000000000..d08323835 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da.ma @@ -0,0 +1,108 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/degree_6.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/drop.ma". +include "basic_2A/static/sd.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* activate genv *) +inductive da (h:sh) (g:sd h): relation4 genv lenv term nat ≝ +| da_sort: ∀G,L,k,d. deg h g k d → da h g G L (⋆k) d +| da_ldef: ∀G,L,K,V,i,d. ⬇[i] L ≡ K.ⓓV → da h g G K V d → da h g G L (#i) d +| da_ldec: ∀G,L,K,W,i,d. ⬇[i] L ≡ K.ⓛW → da h g G K W d → da h g G L (#i) (d+1) +| da_bind: ∀a,I,G,L,V,T,d. da h g G (L.ⓑ{I}V) T d → da h g G L (ⓑ{a,I}V.T) d +| da_flat: ∀I,G,L,V,T,d. da h g G L T d → da h g G L (ⓕ{I}V.T) d +. + +interpretation "degree assignment (term)" + 'Degree h g G L T d = (da h g G L T d). + +(* Basic inversion lemmas ***************************************************) + +fact da_inv_sort_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → + ∀k0. T = ⋆k0 → deg h g k0 d. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #Hkd #k0 #H destruct // +| #G #L #K #V #i #d #_ #_ #k0 #H destruct +| #G #L #K #W #i #d #_ #_ #k0 #H destruct +| #a #I #G #L #V #T #d #_ #k0 #H destruct +| #I #G #L #V #T #d #_ #k0 #H destruct +] +qed-. + +lemma da_inv_sort: ∀h,g,G,L,k,d. ⦃G, L⦄ ⊢ ⋆k ▪[h, g] d → deg h g k d. +/2 width=5 by da_inv_sort_aux/ qed-. + +fact da_inv_lref_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → ∀j. T = #j → + (∃∃K,V. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] d) ∨ + (∃∃K,W,d0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] d0 & + d = d0 + 1 + ). +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #j #H destruct +| #G #L #K #V #i #d #HLK #HV #j #H destruct /3 width=4 by ex2_2_intro, or_introl/ +| #G #L #K #W #i #d #HLK #HW #j #H destruct /3 width=6 by ex3_3_intro, or_intror/ +| #a #I #G #L #V #T #d #_ #j #H destruct +| #I #G #L #V #T #d #_ #j #H destruct +] +qed-. + +lemma da_inv_lref: ∀h,g,G,L,j,d. ⦃G, L⦄ ⊢ #j ▪[h, g] d → + (∃∃K,V. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] d) ∨ + (∃∃K,W,d0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] d0 & d = d0+1). +/2 width=3 by da_inv_lref_aux/ qed-. + +fact da_inv_gref_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → ∀p0. T = §p0 → ⊥. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #p0 #H destruct +| #G #L #K #V #i #d #_ #_ #p0 #H destruct +| #G #L #K #W #i #d #_ #_ #p0 #H destruct +| #a #I #G #L #V #T #d #_ #p0 #H destruct +| #I #G #L #V #T #d #_ #p0 #H destruct +] +qed-. + +lemma da_inv_gref: ∀h,g,G,L,p,d. ⦃G, L⦄ ⊢ §p ▪[h, g] d → ⊥. +/2 width=9 by da_inv_gref_aux/ qed-. + +fact da_inv_bind_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → + ∀b,J,X,Y. T = ⓑ{b,J}Y.X → ⦃G, L.ⓑ{J}Y⦄ ⊢ X ▪[h, g] d. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #b #J #X #Y #H destruct +| #G #L #K #V #i #d #_ #_ #b #J #X #Y #H destruct +| #G #L #K #W #i #d #_ #_ #b #J #X #Y #H destruct +| #a #I #G #L #V #T #d #HT #b #J #X #Y #H destruct // +| #I #G #L #V #T #d #_ #b #J #X #Y #H destruct +] +qed-. + +lemma da_inv_bind: ∀h,g,b,J,G,L,Y,X,d. ⦃G, L⦄ ⊢ ⓑ{b,J}Y.X ▪[h, g] d → ⦃G, L.ⓑ{J}Y⦄ ⊢ X ▪[h, g] d. +/2 width=4 by da_inv_bind_aux/ qed-. + +fact da_inv_flat_aux: ∀h,g,G,L,T,d. ⦃G, L⦄ ⊢ T ▪[h, g] d → + ∀J,X,Y. T = ⓕ{J}Y.X → ⦃G, L⦄ ⊢ X ▪[h, g] d. +#h #g #G #L #T #d * -G -L -T -d +[ #G #L #k #d #_ #J #X #Y #H destruct +| #G #L #K #V #i #d #_ #_ #J #X #Y #H destruct +| #G #L #K #W #i #d #_ #_ #J #X #Y #H destruct +| #a #I #G #L #V #T #d #_ #J #X #Y #H destruct +| #I #G #L #V #T #d #HT #J #X #Y #H destruct // +] +qed-. + +lemma da_inv_flat: ∀h,g,J,G,L,Y,X,d. ⦃G, L⦄ ⊢ ⓕ{J}Y.X ▪[h, g] d → ⦃G, L⦄ ⊢ X ▪[h, g] d. +/2 width=5 by da_inv_flat_aux/ qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da_aaa.ma new file mode 100644 index 000000000..433a57761 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da_aaa.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_lift.ma". +include "basic_2A/static/da.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* Properties on atomic arity assignment for terms **************************) + +lemma aaa_da: ∀h,g,G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∃d. ⦃G, L⦄ ⊢ T ▪[h, g] d. +#h #g #G #L #T #A #H elim H -G -L -T -A +[ #G #L #k elim (deg_total h g k) /3 width=2 by da_sort, ex_intro/ +| * #G #L #K #V #B #i #HLK #_ * /3 width=5 by da_ldef, da_ldec, ex_intro/ +| #a #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by da_bind, ex_intro/ +| #a #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by da_bind, ex_intro/ +| #G #L #V #T #B #A #_ #_ #_ * /3 width=2 by da_flat, ex_intro/ +| #G #L #W #T #A #_ #_ #_ * /3 width=2 by da_flat, ex_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da_da.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da_da.ma new file mode 100644 index 000000000..ecef4ca6b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da_da.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_lift.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* Main properties **********************************************************) + +theorem da_mono: ∀h,g,G,L,T,d1. ⦃G, L⦄ ⊢ T ▪[h, g] d1 → + ∀d2. ⦃G, L⦄ ⊢ T ▪[h, g] d2 → d1 = d2. +#h #g #G #L #T #d1 #H elim H -G -L -T -d1 +[ #G #L #k #d1 #Hkd1 #d2 #H + lapply (da_inv_sort … H) -G -L #Hkd2 + >(deg_mono … Hkd2 … Hkd1) -h -k -d2 // +| #G #L #K #V #i #d1 #HLK #_ #IHV #d2 #H + elim (da_inv_lref … H) -H * #K0 #V0 [| #d0 ] #HLK0 #HV0 [| #Hd0 ] + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct /2 width=1 by/ +| #G #L #K #W #i #d1 #HLK #_ #IHW #d2 #H + elim (da_inv_lref … H) -H * #K0 #W0 [| #d0 ] #HLK0 #HW0 [| #Hd0 ] + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct /3 width=1 by eq_f/ +| #a #I #G #L #V #T #d1 #_ #IHT #d2 #H + lapply (da_inv_bind … H) -H /2 width=1 by/ +| #I #G #L #V #T #d1 #_ #IHT #d2 #H + lapply (da_inv_flat … H) -H /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/da_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/da_lift.ma new file mode 100644 index 000000000..8721ebdc3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/da_lift.ma @@ -0,0 +1,78 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/static/da.ma". + +(* DEGREE ASSIGNMENT FOR TERMS **********************************************) + +(* Properties on relocation *************************************************) + +lemma da_lift: ∀h,g,G,L1,T1,d. ⦃G, L1⦄ ⊢ T1 ▪[h, g] d → + ∀L2,s,l,m. ⬇[s, l, m] L2 ≡ L1 → ∀T2. ⬆[l, m] T1 ≡ T2 → + ⦃G, L2⦄ ⊢ T2 ▪[h, g] d. +#h #g #G #L1 #T1 #d #H elim H -G -L1 -T1 -d +[ #G #L1 #k #d #Hkd #L2 #s #l #m #_ #X #H + >(lift_inv_sort1 … H) -X /2 width=1 by da_sort/ +| #G #L1 #K1 #V1 #i #d #HLK1 #_ #IHV1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=9 by da_ldef/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=8 by da_ldef, drop_inv_gen/ + ] +| #G #L1 #K1 #W1 #i #d #HLK1 #_ #IHW1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #W2 #HK21 #HW12 #H destruct + /3 width=8 by da_ldec/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=8 by da_ldec, drop_inv_gen/ + ] +| #a #I #G #L1 #V1 #T1 #d #_ #IHT1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_bind1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct + /4 width=5 by da_bind, drop_skip/ +| #I #G #L1 #V1 #T1 #d #_ #IHT1 #L2 #s #l #m #HL21 #X #H + elim (lift_inv_flat1 … H) -H #V2 #T2 #HV12 #HU12 #H destruct + /3 width=5 by da_flat/ +] +qed. + +(* Inversion lemmas on relocation *******************************************) + +lemma da_inv_lift: ∀h,g,G,L2,T2,d. ⦃G, L2⦄ ⊢ T2 ▪[h, g] d → + ∀L1,s,l,m. ⬇[s, l, m] L2 ≡ L1 → ∀T1. ⬆[l, m] T1 ≡ T2 → + ⦃G, L1⦄ ⊢ T1 ▪[h, g] d. +#h #g #G #L2 #T2 #d #H elim H -G -L2 -T2 -d +[ #G #L2 #k #d #Hkd #L1 #s #l #m #_ #X #H + >(lift_inv_sort2 … H) -X /2 width=1 by da_sort/ +| #G #L2 #K2 #V2 #i #d #HLK2 #HV2 #IHV2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HV2 | -IHV2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldef/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldef/ + ] +| #G #L2 #K2 #W2 #i #d #HLK2 #HW2 #IHW2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HW2 | -IHW2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 /3 width=8 by da_ldec/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 /2 width=4 by da_ldec/ + ] +| #a #I #G #L2 #V2 #T2 #d #_ #IHT2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /4 width=5 by da_bind, drop_skip/ +| #I #G #L2 #V2 #T2 #d #_ #IHT2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + /3 width=5 by da_flat/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba.ma new file mode 100644 index 000000000..c22a725d1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba.ma @@ -0,0 +1,144 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqa_3.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/static/aaa.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************) + +inductive lsuba (G:genv): relation lenv ≝ +| lsuba_atom: lsuba G (⋆) (⋆) +| lsuba_pair: ∀I,L1,L2,V. lsuba G L1 L2 → lsuba G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsuba_beta: ∀L1,L2,W,V,A. ⦃G, L1⦄ ⊢ ⓝW.V ⁝ A → ⦃G, L2⦄ ⊢ W ⁝ A → + lsuba G L1 L2 → lsuba G (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (atomic arity assignment)" + 'LRSubEqA G L1 L2 = (lsuba G L1 L2). + +(* Basic inversion lemmas ***************************************************) + +fact lsuba_inv_atom1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 = ⋆ → L2 = ⋆. +#G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #A #_ #_ #_ #H destruct +] +qed-. + +lemma lsuba_inv_atom1: ∀G,L2. G ⊢ ⋆ ⫃⁝ L2 → L2 = ⋆. +/2 width=4 by lsuba_inv_atom1_aux/ qed-. + +fact lsuba_inv_pair1_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃⁝ K2 & I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +#G #L1 #L2 * -L1 -L2 +[ #J #K1 #X #H destruct +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K1 #X #H destruct /3 width=9 by or_intror, ex6_4_intro/ +] +qed-. + +lemma lsuba_inv_pair1: ∀I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃⁝ L2 → + (∃∃K2. G ⊢ K1 ⫃⁝ K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +/2 width=3 by lsuba_inv_pair1_aux/ qed-. + +fact lsuba_inv_atom2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L2 = ⋆ → L1 = ⋆. +#G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #A #_ #_ #_ #H destruct +] +qed-. + +lemma lsubc_inv_atom2: ∀G,L1. G ⊢ L1 ⫃⁝ ⋆ → L1 = ⋆. +/2 width=4 by lsuba_inv_atom2_aux/ qed-. + +fact lsuba_inv_pair2_aux: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀I,K2,W. L2 = K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & + G ⊢ K1 ⫃⁝ K2 & I = Abst & L1 = K1.ⓓⓝW.V. +#G #L1 #L2 * -L1 -L2 +[ #J #K2 #U #H destruct +| #I #L1 #L2 #V #HL12 #J #K2 #U #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #A #HV #HW #HL12 #J #K2 #U #H destruct /3 width=7 by or_intror, ex5_3_intro/ +] +qed-. + +lemma lsuba_inv_pair2: ∀I,G,L1,K2,W. G ⊢ L1 ⫃⁝ K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃⁝ K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,A. ⦃G, K1⦄ ⊢ ⓝW.V ⁝ A & ⦃G, K2⦄ ⊢ W ⁝ A & G ⊢ K1 ⫃⁝ K2 & + I = Abst & L1 = K1.ⓓⓝW.V. +/2 width=3 by lsuba_inv_pair2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsuba_fwd_lsubr: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → L1 ⫃ L2. +#G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic properties *********************************************************) + +lemma lsuba_refl: ∀G,L. G ⊢ L ⫃⁝ L. +#G #L elim L -L /2 width=1 by lsuba_atom, lsuba_pair/ +qed. + +(* Note: the constant 0 cannot be generalized *) +lemma lsuba_drop_O1_conf: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀K1,s,m. ⬇[s, 0, m] L1 ≡ K1 → + ∃∃K2. G ⊢ K1 ⫃⁝ K2 & ⬇[s, 0, m] L2 ≡ K2. +#G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsuba_drop_O1_trans: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀K2,s,m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. G ⊢ K1 ⫃⁝ K2 & ⬇[s, 0, m] L1 ≡ K1. +#G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_aaa.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_aaa.ma new file mode 100644 index 000000000..3a5cd5df5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_aaa.ma @@ -0,0 +1,56 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/aaa_aaa.ma". +include "basic_2A/static/lsuba.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************) + +(* Properties concerning atomic arity assignment ****************************) + +lemma lsuba_aaa_conf: ∀G,L1,V,A. ⦃G, L1⦄ ⊢ V ⁝ A → + ∀L2. G ⊢ L1 ⫃⁝ L2 → ⦃G, L2⦄ ⊢ V ⁝ A. +#G #L1 #V #A #H elim H -G -L1 -V -A +[ // +| #I #G #L1 #K1 #V #A #i #HLK1 #HV #IHV #L2 #HL12 + elim (lsuba_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2 + elim (lsuba_inv_pair1 … H) -H * #K2 + [ #HK12 #H destruct /3 width=5 by aaa_lref/ + | #W0 #V0 #A0 #HV0 #HW0 #_ #H1 #H2 #H3 destruct + lapply (aaa_mono … HV0 … HV) #H destruct -V0 /2 width=5 by aaa_lref/ + ] +| /4 width=2 by lsuba_pair, aaa_abbr/ +| /4 width=1 by lsuba_pair, aaa_abst/ +| /3 width=3 by aaa_appl/ +| /3 width=1 by aaa_cast/ +] +qed-. + +lemma lsuba_aaa_trans: ∀G,L2,V,A. ⦃G, L2⦄ ⊢ V ⁝ A → + ∀L1. G ⊢ L1 ⫃⁝ L2 → ⦃G, L1⦄ ⊢ V ⁝ A. +#G #L2 #V #A #H elim H -G -L2 -V -A +[ // +| #I #G #L2 #K2 #V #A #i #HLK2 #H1V #IHV #L1 #HL12 + elim (lsuba_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsuba_inv_pair2 … H) -H * #K1 + [ #HK12 #H destruct /3 width=5 by aaa_lref/ + | #V0 #A0 #HV0 #H2V #_ #H1 #H2 destruct + lapply (aaa_mono … H2V … H1V) #H destruct -K2 /2 width=5 by aaa_lref/ + ] +| /4 width=2 by lsuba_pair, aaa_abbr/ +| /4 width=1 by lsuba_pair, aaa_abst/ +| /3 width=3 by aaa_appl/ +| /3 width=1 by aaa_cast/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_lsuba.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_lsuba.ma new file mode 100644 index 000000000..40384ad74 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsuba_lsuba.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsuba_aaa.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************) + +(* Main properties **********************************************************) + +theorem lsuba_trans: ∀G,L1,L. G ⊢ L1 ⫃⁝ L → ∀L2. G ⊢ L ⫃⁝ L2 → G ⊢ L1 ⫃⁝ L2. +#G #L1 #L #H elim H -L1 -L +[ #X #H >(lsuba_inv_atom1 … H) -H // +| #I #L1 #L #Y #HL1 #IHL1 #X #H + elim (lsuba_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=1 by lsuba_pair/ + | #W #V #A #HV #HW #HL2 #H1 #H2 #H3 destruct + /3 width=3 by lsuba_beta, lsuba_aaa_trans/ + ] +| #L1 #L #W #V #A #HV #HW #HL1 #IHL1 #X #H + elim (lsuba_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=5 by lsuba_beta, lsuba_aaa_conf/ + | #W0 #V0 #A0 #_ #_ #_ #H destruct + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd.ma new file mode 100644 index 000000000..e3d01c289 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd.ma @@ -0,0 +1,151 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqd_5.ma". +include "basic_2A/static/lsubr.ma". +include "basic_2A/static/da.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR DEGREE ASSIGNMENT ***********************) + +inductive lsubd (h) (g) (G): relation lenv ≝ +| lsubd_atom: lsubd h g G (⋆) (⋆) +| lsubd_pair: ∀I,L1,L2,V. lsubd h g G L1 L2 → + lsubd h g G (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubd_beta: ∀L1,L2,W,V,d. ⦃G, L1⦄ ⊢ V ▪[h, g] d+1 → ⦃G, L2⦄ ⊢ W ▪[h, g] d → + lsubd h g G L1 L2 → lsubd h g G (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (degree assignment)" + 'LRSubEqD h g G L1 L2 = (lsubd h g G L1 L2). + +(* Basic forward lemmas *****************************************************) + +lemma lsubd_fwd_lsubr: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → L1 ⫃ L2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 /2 width=1 by lsubr_pair, lsubr_beta/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lsubd_inv_atom1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → L1 = ⋆ → L2 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d #_ #_ #_ #H destruct +] +qed-. + +lemma lsubd_inv_atom1: ∀h,g,G,L2. G ⊢ ⋆ ⫃▪[h, g] L2 → L2 = ⋆. +/2 width=6 by lsubd_inv_atom1_aux/ qed-. + +fact lsubd_inv_pair1_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀I,K1,X. L1 = K1.ⓑ{I}X → + (∃∃K2. G ⊢ K1 ⫃▪[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K1 #X #H destruct +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d #HV #HW #HL12 #J #K1 #X #H destruct /3 width=9 by ex6_4_intro, or_intror/ +] +qed-. + +lemma lsubd_inv_pair1: ∀h,g,I,G,K1,L2,X. G ⊢ K1.ⓑ{I}X ⫃▪[h, g] L2 → + (∃∃K2. G ⊢ K1 ⫃▪[h, g] K2 & L2 = K2.ⓑ{I}X) ∨ + ∃∃K2,W,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & + I = Abbr & L2 = K2.ⓛW & X = ⓝW.V. +/2 width=3 by lsubd_inv_pair1_aux/ qed-. + +fact lsubd_inv_atom2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → L2 = ⋆ → L1 = ⋆. +#h #g #G #L1 #L2 * -L1 -L2 +[ // +| #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #W #V #d #_ #_ #_ #H destruct +] +qed-. + +lemma lsubd_inv_atom2: ∀h,g,G,L1. G ⊢ L1 ⫃▪[h, g] ⋆ → L1 = ⋆. +/2 width=6 by lsubd_inv_atom2_aux/ qed-. + +fact lsubd_inv_pair2_aux: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀I,K2,W. L2 = K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃▪[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & I = Abst & L1 = K1. ⓓⓝW.V. +#h #g #G #L1 #L2 * -L1 -L2 +[ #J #K2 #U #H destruct +| #I #L1 #L2 #V #HL12 #J #K2 #U #H destruct /3 width=3 by ex2_intro, or_introl/ +| #L1 #L2 #W #V #d #HV #HW #HL12 #J #K2 #U #H destruct /3 width=7 by ex5_3_intro, or_intror/ +] +qed-. + +lemma lsubd_inv_pair2: ∀h,g,I,G,L1,K2,W. G ⊢ L1 ⫃▪[h, g] K2.ⓑ{I}W → + (∃∃K1. G ⊢ K1 ⫃▪[h, g] K2 & L1 = K1.ⓑ{I}W) ∨ + ∃∃K1,V,d. ⦃G, K1⦄ ⊢ V ▪[h, g] d+1 & ⦃G, K2⦄ ⊢ W ▪[h, g] d & + G ⊢ K1 ⫃▪[h, g] K2 & I = Abst & L1 = K1. ⓓⓝW.V. +/2 width=3 by lsubd_inv_pair2_aux/ qed-. + +(* Basic properties *********************************************************) + +lemma lsubd_refl: ∀h,g,G,L. G ⊢ L ⫃▪[h, g] L. +#h #g #G #L elim L -L /2 width=1 by lsubd_pair/ +qed. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubd_drop_O1_conf: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀K1,s,m. ⬇[s, 0, m] L1 ≡ K1 → + ∃∃K2. G ⊢ K1 ⫃▪[h, g] K2 & ⬇[s, 0, m] L2 ≡ K2. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d #HV #HW #_ #IHL12 #K1 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1 + [ destruct + elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: the constant 0 cannot be generalized *) +lemma lsubd_drop_O1_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 → + ∀K2,s,m. ⬇[s, 0, m] L2 ≡ K2 → + ∃∃K1. G ⊢ K1 ⫃▪[h, g] K2 & ⬇[s, 0, m] L1 ≡ K1. +#h #g #G #L1 #L2 #H elim H -L1 -L2 +[ /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_pair, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +| #L1 #L2 #W #V #d #HV #HW #_ #IHL12 #K2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2 + [ destruct + elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H + <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsubd_beta, drop_pair, ex2_intro/ + | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_da.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_da.ma new file mode 100644 index 000000000..45d35516e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_da.ma @@ -0,0 +1,65 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/da_da.ma". +include "basic_2A/static/lsubd.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR DEGREE ASSIGNMENT ***********************) + +(* Properties on degree assignment ******************************************) + +lemma lsubd_da_trans: ∀h,g,G,L2,T,d. ⦃G, L2⦄ ⊢ T ▪[h, g] d → + ∀L1. G ⊢ L1 ⫃▪[h, g] L2 → ⦃G, L1⦄ ⊢ T ▪[h, g] d. +#h #g #G #L2 #T #d #H elim H -G -L2 -T -d +[ /2 width=1 by da_sort/ +| #G #L2 #K2 #V #i #d #HLK2 #_ #IHV #L1 #HL12 + elim (lsubd_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsubd_inv_pair2 … H) -H * #K1 [ | -IHV -HLK1 ] + [ #HK12 #H destruct /3 width=4 by da_ldef/ + | #W #d0 #_ #_ #_ #H destruct + ] +| #G #L2 #K2 #W #i #d #HLK2 #HW #IHW #L1 #HL12 + elim (lsubd_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1 + elim (lsubd_inv_pair2 … H) -H * #K1 [ -HW | -IHW ] + [ #HK12 #H destruct /3 width=4 by da_ldec/ + | #V #d0 #HV #H0W #_ #_ #H destruct + lapply (da_mono … H0W … HW) -H0W -HW #H destruct /3 width=7 by da_ldef, da_flat/ + ] +| /4 width=1 by lsubd_pair, da_bind/ +| /3 width=1 by da_flat/ +] +qed-. + +lemma lsubd_da_conf: ∀h,g,G,L1,T,d. ⦃G, L1⦄ ⊢ T ▪[h, g] d → + ∀L2. G ⊢ L1 ⫃▪[h, g] L2 → ⦃G, L2⦄ ⊢ T ▪[h, g] d. +#h #g #G #L1 #T #d #H elim H -G -L1 -T -d +[ /2 width=1 by da_sort/ +| #G #L1 #K1 #V #i #d #HLK1 #HV #IHV #L2 #HL12 + elim (lsubd_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2 + elim (lsubd_inv_pair1 … H) -H * #K2 [ -HV | -IHV ] + [ #HK12 #H destruct /3 width=4 by da_ldef/ + | #W0 #V0 #d0 #HV0 #HW0 #_ #_ #H1 #H2 destruct + lapply (da_inv_flat … HV) -HV #H0V0 + lapply (da_mono … H0V0 … HV0) -H0V0 -HV0 #H destruct /2 width=4 by da_ldec/ + ] +| #G #L1 #K1 #W #i #d #HLK1 #HW #IHW #L2 #HL12 + elim (lsubd_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2 + elim (lsubd_inv_pair1 … H) -H * #K2 [ -HW | -IHW ] + [ #HK12 #H destruct /3 width=4 by da_ldec/ + | #W0 #V0 #d0 #HV0 #HW0 #_ #H destruct + ] +| /4 width=1 by lsubd_pair, da_bind/ +| /3 width=1 by da_flat/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_lsubd.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_lsubd.ma new file mode 100644 index 000000000..6ff3a9fe9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubd_lsubd.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubd_da.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR DEGREE ASSIGNMENT ***********************) + +(* Main properties **********************************************************) + +theorem lsubd_trans: ∀h,g,G. Transitive … (lsubd h g G). +#h #g #G #L1 #L #H elim H -L1 -L +[ #X #H >(lsubd_inv_atom1 … H) -H // +| #I #L1 #L #Y #HL1 #IHL1 #X #H + elim (lsubd_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=1 by lsubd_pair/ + | #W #V #d #HV #HW #HL2 #H1 #H2 #H3 destruct + /3 width=3 by lsubd_beta, lsubd_da_trans/ + ] +| #L1 #L #W #V #d #HV #HW #HL1 #IHL1 #X #H + elim (lsubd_inv_pair1 … H) -H * #L2 + [ #HL2 #H destruct /3 width=5 by lsubd_beta, lsubd_da_conf/ + | #W0 #V0 #d0 #_ #_ #_ #H destruct + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr.ma new file mode 100644 index 000000000..e176dd90c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr.ma @@ -0,0 +1,107 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/lrsubeqc_2.ma". +include "basic_2A/substitution/drop.ma". + +(* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************) + +inductive lsubr: relation lenv ≝ +| lsubr_atom: ∀L. lsubr L (⋆) +| lsubr_pair: ∀I,L1,L2,V. lsubr L1 L2 → lsubr (L1.ⓑ{I}V) (L2.ⓑ{I}V) +| lsubr_beta: ∀L1,L2,V,W. lsubr L1 L2 → lsubr (L1.ⓓⓝW.V) (L2.ⓛW) +. + +interpretation + "local environment refinement (restricted)" + 'LRSubEqC L1 L2 = (lsubr L1 L2). + +(* Basic properties *********************************************************) + +lemma lsubr_refl: ∀L. L ⫃ L. +#L elim L -L /2 width=1 by lsubr_atom, lsubr_pair/ +qed. + +(* Basic inversion lemmas ***************************************************) + +fact lsubr_inv_atom1_aux: ∀L1,L2. L1 ⫃ L2 → L1 = ⋆ → L2 = ⋆. +#L1 #L2 * -L1 -L2 // +[ #I #L1 #L2 #V #_ #H destruct +| #L1 #L2 #V #W #_ #H destruct +] +qed-. + +lemma lsubr_inv_atom1: ∀L2. ⋆ ⫃ L2 → L2 = ⋆. +/2 width=3 by lsubr_inv_atom1_aux/ qed-. + +fact lsubr_inv_abst1_aux: ∀L1,L2. L1 ⫃ L2 → ∀K1,W. L1 = K1.ⓛW → + L2 = ⋆ ∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW. +#L1 #L2 * -L1 -L2 +[ #L #K1 #W #H destruct /2 width=1 by or_introl/ +| #I #L1 #L2 #V #HL12 #K1 #W #H destruct /3 width=3 by ex2_intro, or_intror/ +| #L1 #L2 #V1 #V2 #_ #K1 #W #H destruct +] +qed-. + +lemma lsubr_inv_abst1: ∀K1,L2,W. K1.ⓛW ⫃ L2 → + L2 = ⋆ ∨ ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓛW. +/2 width=3 by lsubr_inv_abst1_aux/ qed-. + +fact lsubr_inv_abbr2_aux: ∀L1,L2. L1 ⫃ L2 → ∀K2,W. L2 = K2.ⓓW → + ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓW. +#L1 #L2 * -L1 -L2 +[ #L #K2 #W #H destruct +| #I #L1 #L2 #V #HL12 #K2 #W #H destruct /2 width=3 by ex2_intro/ +| #L1 #L2 #V1 #V2 #_ #K2 #W #H destruct +] +qed-. + +lemma lsubr_inv_abbr2: ∀L1,K2,W. L1 ⫃ K2.ⓓW → + ∃∃K1. K1 ⫃ K2 & L1 = K1.ⓓW. +/2 width=3 by lsubr_inv_abbr2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsubr_fwd_length: ∀L1,L2. L1 ⫃ L2 → |L2| ≤ |L1|. +#L1 #L2 #H elim H -L1 -L2 /2 width=1 by monotonic_le_plus_l/ +qed-. + +lemma lsubr_fwd_drop2_pair: ∀L1,L2. L1 ⫃ L2 → + ∀I,K2,W,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓑ{I}W → + (∃∃K1. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓑ{I}W) ∨ + ∃∃K1,V. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst. +#L1 #L2 #H elim H -L1 -L2 +[ #L #I #K2 #W #s #i #H + elim (drop_inv_atom1 … H) -H #H destruct +| #J #L1 #L2 #V #HL12 #IHL12 #I #K2 #W #s #i #H + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ] + [ /3 width=3 by drop_pair, ex2_intro, or_introl/ + | elim (IHL12 … HLK2) -IHL12 -HLK2 * + /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/ + ] +| #L1 #L2 #V1 #V2 #HL12 #IHL12 #I #K2 #W #s #i #H + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ] + [ /3 width=4 by drop_pair, ex3_2_intro, or_intror/ + | elim (IHL12 … HLK2) -IHL12 -HLK2 * + /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/ + ] +] +qed-. + +lemma lsubr_fwd_drop2_abbr: ∀L1,L2. L1 ⫃ L2 → + ∀K2,V,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓓV → + ∃∃K1. K1 ⫃ K2 & ⬇[s, 0, i] L1 ≡ K1.ⓓV. +#L1 #L2 #HL12 #K2 #V #s #i #HLK2 elim (lsubr_fwd_drop2_pair … HL12 … HLK2) -L2 // * +#K1 #W #_ #_ #H destruct +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma new file mode 100644 index 000000000..fbc688aa0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma @@ -0,0 +1,53 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/lsubr.ma". + +(* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************) + +(* Auxiliary inversion lemmas ***********************************************) + +fact lsubr_inv_pair1_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K1,X. L1 = K1.ⓑ{I}X → + ∨∨ L2 = ⋆ + | ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓑ{I}X + | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & + I = Abbr & X = ⓝW.V. +#L1 #L2 * -L1 -L2 +[ #L #J #K1 #X #H destruct /2 width=1 by or3_intro0/ +| #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by or3_intro1, ex2_intro/ +| #L1 #L2 #V #W #HL12 #J #K1 #X #H destruct /3 width=6 by or3_intro2, ex4_3_intro/ +] +qed-. + +lemma lsubr_inv_pair1: ∀I,K1,L2,X. K1.ⓑ{I}X ⫃ L2 → + ∨∨ L2 = ⋆ + | ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓑ{I}X + | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW & + I = Abbr & X = ⓝW.V. +/2 width=3 by lsubr_inv_pair1_aux/ qed-. + +(* Main properties **********************************************************) + +theorem lsubr_trans: Transitive … lsubr. +#L1 #L #H elim H -L1 -L +[ #L1 #X #H + lapply (lsubr_inv_atom1 … H) -H // +| #I #L1 #L #V #_ #IHL1 #X #H + elim (lsubr_inv_pair1 … H) -H // * + #L2 [2: #V2 #W2 ] #HL2 #H1 [ #H2 #H3 ] destruct /3 width=1 by lsubr_pair, lsubr_beta/ +| #L1 #L #V1 #W #_ #IHL1 #X #H + elim (lsubr_inv_abst1 … H) -H // * + #L2 #HL2 #H destruct /3 width=1 by lsubr_beta/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/static/sd.ma b/matita/matita/contribs/lambdadelta/basic_2A/static/sd.ma new file mode 100644 index 000000000..7b0947d02 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/static/sd.ma @@ -0,0 +1,131 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/static/sh.ma". + +(* SORT DEGREE **************************************************************) + +(* sort degree specification *) +record sd (h:sh): Type[0] ≝ { + deg : relation nat; (* degree of the sort *) + deg_total: ∀k. ∃d. deg k d; (* functional relation axioms *) + deg_mono : ∀k,d1,d2. deg k d1 → deg k d2 → d1 = d2; + deg_next : ∀k,d. deg k d → deg (next h k) (d - 1) (* compatibility condition *) +}. + +(* Notable specifications ***************************************************) + +definition deg_O: relation nat ≝ λk,d. d = 0. + +definition sd_O: ∀h. sd h ≝ λh. mk_sd h deg_O …. +/2 width=2 by le_n_O_to_eq, le_n, ex_intro/ defined. + +inductive deg_SO (h:sh) (k:nat) (k0:nat): predicate nat ≝ +| deg_SO_pos : ∀d0. (next h)^d0 k0 = k → deg_SO h k k0 (d0 + 1) +| deg_SO_zero: ((∃d0. (next h)^d0 k0 = k) → ⊥) → deg_SO h k k0 0 +. + +fact deg_SO_inv_pos_aux: ∀h,k,k0,d0. deg_SO h k k0 d0 → ∀d. d0 = d + 1 → + (next h)^d k0 = k. +#h #k #k0 #d0 * -d0 +[ #d0 #Hd0 #d #H + lapply (injective_plus_l … H) -H #H destruct // +| #_ #d0 H -H #H + lapply (transitive_lt … H HK12) -k1 #H1 + lapply (nexts_le h k2 d) #H2 + lapply (le_to_lt_to_lt … H2 H1) -h -d #H + elim (lt_refl_false … H) +] +qed. + +definition sd_SO: ∀h. nat → sd h ≝ λh,k. mk_sd h (deg_SO h k) …. +[ #k0 + lapply (nexts_dec h k0 k) * + [ * /3 width=2 by deg_SO_pos, ex_intro/ | /4 width=2 by deg_SO_zero, ex_intro/ ] +| #K0 #d1 #d2 * [ #d01 ] #H1 * [1,3: #d02 ] #H2 // + [ < H2 in H1; -H2 #H + lapply (nexts_inj … H) -H #H destruct // + | elim H1 /2 width=2 by ex_intro/ + | elim H2 /2 width=2 by ex_intro/ + ] +| #k0 #d0 * + [ #d #H destruct elim d -d normalize + /2 width=1 by deg_SO_gt, deg_SO_pos, next_lt/ + | #H1 @deg_SO_zero * #d #H2 destruct + @H1 -H1 @(ex_intro … (S d)) /2 width=1 by sym_eq/ (**) (* explicit constructor *) + ] +] +defined. + +let rec sd_d (h:sh) (k:nat) (d:nat) on d : sd h ≝ + match d with + [ O ⇒ sd_O h + | S d ⇒ match d with + [ O ⇒ sd_SO h k + | _ ⇒ sd_d h (next h k) d + ] + ]. + +(* Basic inversion lemmas ***************************************************) + +lemma deg_inv_pred: ∀h,g,k,d. deg h g (next h k) (d+1) → deg h g k (d+2). +#h #g #k #d #H1 +elim (deg_total h g k) #d0 #H0 +lapply (deg_next … H0) #H2 +lapply (deg_mono … H1 H2) -H1 -H2 #H +<(associative_plus d 1 1) >H iter_SO #H +lapply (deg_inv_pred … H) -H <(associative_plus d0 1 1) #H +lapply (IHd … H) -IHd -H // +qed-. + +(* Basic properties *********************************************************) + +lemma deg_iter: ∀h,g,k,d1,d2. deg h g k d1 → deg h g ((next h)^d2 k) (d1-d2). +#h #g #k #d1 #d2 @(nat_ind_plus … d2) -d2 [ iter_SO iter_SO +lapply (nexts_le h k d) #H +@(le_to_lt_to_lt … H) // +qed. + +axiom nexts_dec: ∀h,k1,k2. Decidable (∃d. (next h)^d k1 = k2). + +axiom nexts_inj: ∀h,k,d1,d2. (next h)^d1 k = (next h)^d2 k → d1 = d2. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy.ma new file mode 100644 index 000000000..4961f8541 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy.ma @@ -0,0 +1,296 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_max.ma". +include "basic_2A/notation/relations/psubst_6.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/lsuby.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* activate genv *) +inductive cpy: ynat → ynat → relation4 genv lenv term term ≝ +| cpy_atom : ∀I,G,L,l,m. cpy l m G L (⓪{I}) (⓪{I}) +| cpy_subst: ∀I,G,L,K,V,W,i,l,m. l ≤ yinj i → i < l+m → + ⬇[i] L ≡ K.ⓑ{I}V → ⬆[0, i+1] V ≡ W → cpy l m G L (#i) W +| cpy_bind : ∀a,I,G,L,V1,V2,T1,T2,l,m. + cpy l m G L V1 V2 → cpy (⫯l) m G (L.ⓑ{I}V1) T1 T2 → + cpy l m G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2) +| cpy_flat : ∀I,G,L,V1,V2,T1,T2,l,m. + cpy l m G L V1 V2 → cpy l m G L T1 T2 → + cpy l m G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2) +. + +interpretation "context-sensitive extended ordinary substritution (term)" + 'PSubst G L T1 l m T2 = (cpy l m G L T1 T2). + +(* Basic properties *********************************************************) + +lemma lsuby_cpy_trans: ∀G,l,m. lsub_trans … (cpy l m G) (lsuby l m). +#G #l #m #L1 #T1 #T2 #H elim H -G -L1 -T1 -T2 -l -m +[ // +| #I #G #L1 #K1 #V #W #i #l #m #Hli #Hilm #HLK1 #HVW #L2 #HL12 + elim (lsuby_drop_trans_be … HL12 … HLK1) -HL12 -HLK1 /2 width=5 by cpy_subst/ +| /4 width=1 by lsuby_succ, cpy_bind/ +| /3 width=1 by cpy_flat/ +] +qed-. + +lemma cpy_refl: ∀G,T,L,l,m. ⦃G, L⦄ ⊢ T ▶[l, m] T. +#G #T elim T -T // * /2 width=1 by cpy_bind, cpy_flat/ +qed. + +(* Basic_1: was: subst1_ex *) +lemma cpy_full: ∀I,G,K,V,T1,L,l. ⬇[l] L ≡ K.ⓑ{I}V → + ∃∃T2,T. ⦃G, L⦄ ⊢ T1 ▶[l, 1] T2 & ⬆[l, 1] T ≡ T2. +#I #G #K #V #T1 elim T1 -T1 +[ * #i #L #l #HLK + /2 width=4 by lift_sort, lift_gref, ex2_2_intro/ + elim (lt_or_eq_or_gt i l) #Hil + /3 width=4 by lift_lref_ge_minus, lift_lref_lt, ex2_2_intro/ + destruct + elim (lift_total V 0 (i+1)) #W #HVW + elim (lift_split … HVW i i) + /4 width=5 by cpy_subst, ylt_inj, ex2_2_intro/ +| * [ #a ] #J #W1 #U1 #IHW1 #IHU1 #L #l #HLK + elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2 + [ elim (IHU1 (L.ⓑ{J}W1) (l+1)) -IHU1 + /3 width=9 by cpy_bind, drop_drop, lift_bind, ex2_2_intro/ + | elim (IHU1 … HLK) -IHU1 -HLK + /3 width=8 by cpy_flat, lift_flat, ex2_2_intro/ + ] +] +qed-. + +lemma cpy_weak: ∀G,L,T1,T2,l1,m1. ⦃G, L⦄ ⊢ T1 ▶[l1, m1] T2 → + ∀l2,m2. l2 ≤ l1 → l1 + m1 ≤ l2 + m2 → + ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T2. +#G #L #T1 #T2 #l1 #m1 #H elim H -G -L -T1 -T2 -l1 -m1 // +[ /3 width=5 by cpy_subst, ylt_yle_trans, yle_trans/ +| /4 width=3 by cpy_bind, ylt_yle_trans, yle_succ/ +| /3 width=1 by cpy_flat/ +] +qed-. + +lemma cpy_weak_top: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶[l, |L| - l] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m // +[ #I #G #L #K #V #W #i #l #m #Hli #_ #HLK #HVW + lapply (drop_fwd_length_lt2 … HLK) + /4 width=5 by cpy_subst, ylt_yle_trans, ylt_inj/ +| #a #I #G #L #V1 #V2 normalize in match (|L.ⓑ{I}V2|); (**) (* |?| does not work *) + /2 width=1 by cpy_bind/ +| /2 width=1 by cpy_flat/ +] +qed-. + +lemma cpy_weak_full: ∀G,L,T1,T2,l,m. + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ⦃G, L⦄ ⊢ T1 ▶[0, |L|] T2. +#G #L #T1 #T2 #l #m #HT12 +lapply (cpy_weak … HT12 0 (l + m) ? ?) -HT12 +/2 width=2 by cpy_weak_top/ +qed-. + +lemma cpy_split_up: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ∀i. i ≤ l + m → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l, i-l] T & ⦃G, L⦄ ⊢ T ▶[i, l+m-i] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +[ /2 width=3 by ex2_intro/ +| #I #G #L #K #V #W #i #l #m #Hli #Hilm #HLK #HVW #j #Hjlm + elim (ylt_split i j) [ -Hilm -Hjlm | -Hli ] + /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/ +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // #V + elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hilm + >yplus_SO2 >yplus_succ1 #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 + /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/ +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hilm + /3 width=5 by ex2_intro, cpy_flat/ +] +qed-. + +lemma cpy_split_down: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ∀i. i ≤ l + m → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[i, l+m-i] T & ⦃G, L⦄ ⊢ T ▶[l, i-l] T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +[ /2 width=3 by ex2_intro/ +| #I #G #L #K #V #W #i #l #m #Hli #Hilm #HLK #HVW #j #Hjlm + elim (ylt_split i j) [ -Hilm -Hjlm | -Hli ] + /4 width=9 by cpy_subst, ylt_yle_trans, ex2_intro/ +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // #V + elim (IHT12 (i+1)) -IHT12 /2 width=1 by yle_succ/ -Hilm + >yplus_SO2 >yplus_succ1 #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 + /3 width=5 by lsuby_succ, ex2_intro, cpy_bind/ +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #i #Hilm + elim (IHV12 i) -IHV12 // elim (IHT12 i) -IHT12 // -Hilm + /3 width=5 by ex2_intro, cpy_flat/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma cpy_fwd_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀T1,l,m. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → l + m ≤ lt + mt → + ∃∃T2. ⦃G, L⦄ ⊢ U1 ▶[l+m, lt+mt-(l+m)] U2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H elim H -G -L -U1 -U2 -lt -mt +[ * #i #G #L #lt #mt #T1 #l #m #H #_ + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #I #G #L #K #V #W #i #lt #mt #Hlti #Hilmt #HLK #HVW #T1 #l #m #H #Hllt #Hlmlmt + elim (lift_inv_lref2 … H) -H * #Hil #H destruct [ -V -Hilmt -Hlmlmt | -Hlti -Hllt ] + [ elim (ylt_yle_false … Hllt) -Hllt /3 width=3 by yle_ylt_trans, ylt_inj/ + | elim (le_inv_plus_l … Hil) #Hlim #Hmi + elim (lift_split … HVW l (i-m+1) ? ? ?) [2,3,4: /2 width=1 by le_S_S, le_S/ ] -Hlim + #T2 #_ >plus_minus // ymax_pre_sn_comm // (**) (* explicit constructor *) + ] +| #a #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #X #l #m #H #Hllt #Hlmlmt + elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HVW1) -V1 -IHW12 // + elim (IHU12 … HTU1) -T1 -IHU12 /2 width=1 by yle_succ/ + yplus_SO2 >yplus_succ1 >yplus_succ1 + /3 width=2 by cpy_bind, lift_bind, ex2_intro/ +| #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #X #l #m #H #Hllt #Hlmlmt + elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HVW1) -V1 -IHW12 // elim (IHU12 … HTU1) -T1 -IHU12 + /3 width=2 by cpy_flat, lift_flat, ex2_intro/ +] +qed-. + +lemma cpy_fwd_tw: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ♯{T1} ≤ ♯{T2}. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m normalize +/3 width=1 by monotonic_le_plus_l, le_plus/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact cpy_inv_atom1_aux: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → ∀J. T1 = ⓪{J} → + T2 = ⓪{J} ∨ + ∃∃I,K,V,i. l ≤ yinj i & i < l + m & + ⬇[i] L ≡ K.ⓑ{I}V & + ⬆[O, i+1] V ≡ T2 & + J = LRef i. +#G #L #T1 #T2 #l #m * -G -L -T1 -T2 -l -m +[ #I #G #L #l #m #J #H destruct /2 width=1 by or_introl/ +| #I #G #L #K #V #T2 #i #l #m #Hli #Hilm #HLK #HVT2 #J #H destruct /3 width=9 by ex5_4_intro, or_intror/ +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #J #H destruct +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #J #H destruct +] +qed-. + +lemma cpy_inv_atom1: ∀I,G,L,T2,l,m. ⦃G, L⦄ ⊢ ⓪{I} ▶[l, m] T2 → + T2 = ⓪{I} ∨ + ∃∃J,K,V,i. l ≤ yinj i & i < l + m & + ⬇[i] L ≡ K.ⓑ{J}V & + ⬆[O, i+1] V ≡ T2 & + I = LRef i. +/2 width=4 by cpy_inv_atom1_aux/ qed-. + +(* Basic_1: was: subst1_gen_sort *) +lemma cpy_inv_sort1: ∀G,L,T2,k,l,m. ⦃G, L⦄ ⊢ ⋆k ▶[l, m] T2 → T2 = ⋆k. +#G #L #T2 #k #l #m #H +elim (cpy_inv_atom1 … H) -H // +* #I #K #V #i #_ #_ #_ #_ #H destruct +qed-. + +(* Basic_1: was: subst1_gen_lref *) +lemma cpy_inv_lref1: ∀G,L,T2,i,l,m. ⦃G, L⦄ ⊢ #i ▶[l, m] T2 → + T2 = #i ∨ + ∃∃I,K,V. l ≤ i & i < l + m & + ⬇[i] L ≡ K.ⓑ{I}V & + ⬆[O, i+1] V ≡ T2. +#G #L #T2 #i #l #m #H +elim (cpy_inv_atom1 … H) -H /2 width=1 by or_introl/ +* #I #K #V #j #Hlj #Hjlm #HLK #HVT2 #H destruct /3 width=5 by ex4_3_intro, or_intror/ +qed-. + +lemma cpy_inv_gref1: ∀G,L,T2,p,l,m. ⦃G, L⦄ ⊢ §p ▶[l, m] T2 → T2 = §p. +#G #L #T2 #p #l #m #H +elim (cpy_inv_atom1 … H) -H // +* #I #K #V #i #_ #_ #_ #_ #H destruct +qed-. + +fact cpy_inv_bind1_aux: ∀G,L,U1,U2,l,m. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → + ∀a,I,V1,T1. U1 = ⓑ{a,I}V1.T1 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L. ⓑ{I}V1⦄ ⊢ T1 ▶[⫯l, m] T2 & + U2 = ⓑ{a,I}V2.T2. +#G #L #U1 #U2 #l #m * -G -L -U1 -U2 -l -m +[ #I #G #L #l #m #b #J #W1 #U1 #H destruct +| #I #G #L #K #V #W #i #l #m #_ #_ #_ #_ #b #J #W1 #U1 #H destruct +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #HV12 #HT12 #b #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +| #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #b #J #W1 #U1 #H destruct +] +qed-. + +lemma cpy_inv_bind1: ∀a,I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓑ{a,I} V1. T1 ▶[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶[⫯l, m] T2 & + U2 = ⓑ{a,I}V2.T2. +/2 width=3 by cpy_inv_bind1_aux/ qed-. + +fact cpy_inv_flat1_aux: ∀G,L,U1,U2,l,m. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → + ∀I,V1,T1. U1 = ⓕ{I}V1.T1 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 & + U2 = ⓕ{I}V2.T2. +#G #L #U1 #U2 #l #m * -G -L -U1 -U2 -l -m +[ #I #G #L #l #m #J #W1 #U1 #H destruct +| #I #G #L #K #V #W #i #l #m #_ #_ #_ #_ #J #W1 #U1 #H destruct +| #a #I #G #L #V1 #V2 #T1 #T2 #l #m #_ #_ #J #W1 #U1 #H destruct +| #I #G #L #V1 #V2 #T1 #T2 #l #m #HV12 #HT12 #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma cpy_inv_flat1: ∀I,G,L,V1,T1,U2,l,m. ⦃G, L⦄ ⊢ ⓕ{I} V1. T1 ▶[l, m] U2 → + ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ▶[l, m] V2 & + ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 & + U2 = ⓕ{I}V2.T2. +/2 width=3 by cpy_inv_flat1_aux/ qed-. + + +fact cpy_inv_refl_O2_aux: ∀G,L,T1,T2,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T2 → m = 0 → T1 = T2. +#G #L #T1 #T2 #l #m #H elim H -G -L -T1 -T2 -l -m +[ // +| #I #G #L #K #V #W #i #l #m #Hli #Hilm #_ #_ #H destruct + elim (ylt_yle_false … Hli) -Hli // +| /3 width=1 by eq_f2/ +| /3 width=1 by eq_f2/ +] +qed-. + +lemma cpy_inv_refl_O2: ∀G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▶[l, 0] T2 → T1 = T2. +/2 width=6 by cpy_inv_refl_O2_aux/ qed-. + +(* Basic_1: was: subst1_gen_lift_eq *) +lemma cpy_inv_lift1_eq: ∀G,T1,U1,l,m. ⬆[l, m] T1 ≡ U1 → + ∀L,U2. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → U1 = U2. +#G #T1 #U1 #l #m #HTU1 #L #U2 #HU12 elim (cpy_fwd_up … HU12 … HTU1) -HU12 -HTU1 +/2 width=4 by cpy_inv_refl_O2/ +qed-. + +(* Basic_1: removed theorems 25: + subst0_gen_sort subst0_gen_lref subst0_gen_head subst0_gen_lift_lt + subst0_gen_lift_false subst0_gen_lift_ge subst0_refl subst0_trans + subst0_lift_lt subst0_lift_ge subst0_lift_ge_S subst0_lift_ge_s + subst0_subst0 subst0_subst0_back subst0_weight_le subst0_weight_lt + subst0_confluence_neq subst0_confluence_eq subst0_tlt_head + subst0_confluence_lift subst0_tlt + subst1_head subst1_gen_head subst1_lift_S subst1_confluence_lift +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_cpy.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_cpy.ma new file mode 100644 index 000000000..3a8857155 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_cpy.ma @@ -0,0 +1,122 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/cpy_lift.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* Main properties **********************************************************) + +(* Basic_1: was: subst1_confluence_eq *) +theorem cpy_conf_eq: ∀G,L,T0,T1,l1,m1. ⦃G, L⦄ ⊢ T0 ▶[l1, m1] T1 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T2 ▶[l1, m1] T. +#G #L #T0 #T1 #l1 #m1 #H elim H -G -L -T0 -T1 -l1 -m1 +[ /2 width=3 by ex2_intro/ +| #I1 #G #L #K1 #V1 #T1 #i0 #l1 #m1 #Hl1 #Hlm1 #HLK1 #HVT1 #T2 #l2 #m2 #H + elim (cpy_inv_lref1 … H) -H + [ #HX destruct /3 width=7 by cpy_subst, ex2_intro/ + | -Hl1 -Hlm1 * #I2 #K2 #V2 #_ #_ #HLK2 #HVT2 + lapply (drop_mono … HLK1 … HLK2) -HLK1 -HLK2 #H destruct + >(lift_mono … HVT1 … HVT2) -HVT1 -HVT2 /2 width=3 by ex2_intro/ + ] +| #a #I #G #L #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #X #l2 #m2 #HX + elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02) -IHV01 -HV02 #V #HV1 #HV2 + elim (IHT01 … HT02) -T0 #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT1 (L.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/ + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V2) ?) -HT2 + /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/ +| #I #G #L #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #X #l2 #m2 #HX + elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02) -V0 + elim (IHT01 … HT02) -T0 /3 width=5 by cpy_flat, ex2_intro/ +] +qed-. + +(* Basic_1: was: subst1_confluence_neq *) +theorem cpy_conf_neq: ∀G,L1,T0,T1,l1,m1. ⦃G, L1⦄ ⊢ T0 ▶[l1, m1] T1 → + ∀L2,T2,l2,m2. ⦃G, L2⦄ ⊢ T0 ▶[l2, m2] T2 → + (l1 + m1 ≤ l2 ∨ l2 + m2 ≤ l1) → + ∃∃T. ⦃G, L2⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L1⦄ ⊢ T2 ▶[l1, m1] T. +#G #L1 #T0 #T1 #l1 #m1 #H elim H -G -L1 -T0 -T1 -l1 -m1 +[ /2 width=3 by ex2_intro/ +| #I1 #G #L1 #K1 #V1 #T1 #i0 #l1 #m1 #Hl1 #Hlm1 #HLK1 #HVT1 #L2 #T2 #l2 #m2 #H1 #H2 + elim (cpy_inv_lref1 … H1) -H1 + [ #H destruct /3 width=7 by cpy_subst, ex2_intro/ + | -HLK1 -HVT1 * #I2 #K2 #V2 #Hl2 #Hlm2 #_ #_ elim H2 -H2 #Hlml [ -Hl1 -Hlm2 | -Hl2 -Hlm1 ] + [ elim (ylt_yle_false … Hlm1) -Hlm1 /2 width=3 by yle_trans/ + | elim (ylt_yle_false … Hlm2) -Hlm2 /2 width=3 by yle_trans/ + ] + ] +| #a #I #G #L1 #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #L2 #X #l2 #m2 #HX #H + elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02 H) -IHV01 -HV02 #V #HV1 #HV2 + elim (IHT01 … HT02) -T0 + [ -H #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT1 (L2.ⓑ{I}V1) ?) -HT1 /2 width=1 by lsuby_succ/ + lapply (lsuby_cpy_trans … HT2 (L1.ⓑ{I}V2) ?) -HT2 /3 width=5 by cpy_bind, lsuby_succ, ex2_intro/ + | -HV1 -HV2 elim H -H /3 width=1 by yle_succ, or_introl, or_intror/ + ] +| #I #G #L1 #V0 #V1 #T0 #T1 #l1 #m1 #_ #_ #IHV01 #IHT01 #L2 #X #l2 #m2 #HX #H + elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV01 … HV02 H) -V0 + elim (IHT01 … HT02 H) -T0 -H /3 width=5 by cpy_flat, ex2_intro/ +] +qed-. + +(* Note: the constant 1 comes from cpy_subst *) +(* Basic_1: was: subst1_trans *) +theorem cpy_trans_ge: ∀G,L,T1,T0,l,m. ⦃G, L⦄ ⊢ T1 ▶[l, m] T0 → + ∀T2. ⦃G, L⦄ ⊢ T0 ▶[l, 1] T2 → 1 ≤ m → ⦃G, L⦄ ⊢ T1 ▶[l, m] T2. +#G #L #T1 #T0 #l #m #H elim H -G -L -T1 -T0 -l -m +[ #I #G #L #l #m #T2 #H #Hm + elim (cpy_inv_atom1 … H) -H + [ #H destruct // + | * #J #K #V #i #Hl2i #Hilm2 #HLK #HVT2 #H destruct + lapply (ylt_yle_trans … (l+m) … Hilm2) /2 width=5 by cpy_subst, monotonic_yle_plus_dx/ + ] +| #I #G #L #K #V #V2 #i #l #m #Hli #Hilm #HLK #HVW #T2 #HVT2 #Hm + lapply (cpy_weak … HVT2 0 (i+1) ? ?) -HVT2 /3 width=1 by yle_plus_dx2_trans, yle_succ/ + >yplus_inj #HVT2 <(cpy_inv_lift1_eq … HVW … HVT2) -HVT2 /2 width=5 by cpy_subst/ +| #a #I #G #L #V1 #V0 #T1 #T0 #l #m #_ #_ #IHV10 #IHT10 #X #H #Hm + elim (cpy_inv_bind1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct + lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02 + lapply (IHT10 … HT02 Hm) -T0 /3 width=1 by cpy_bind/ +| #I #G #L #V1 #V0 #T1 #T0 #l #m #_ #_ #IHV10 #IHT10 #X #H #Hm + elim (cpy_inv_flat1 … H) -H #V2 #T2 #HV02 #HT02 #H destruct /3 width=1 by cpy_flat/ +] +qed-. + +theorem cpy_trans_down: ∀G,L,T1,T0,l1,m1. ⦃G, L⦄ ⊢ T1 ▶[l1, m1] T0 → + ∀T2,l2,m2. ⦃G, L⦄ ⊢ T0 ▶[l2, m2] T2 → l2 + m2 ≤ l1 → + ∃∃T. ⦃G, L⦄ ⊢ T1 ▶[l2, m2] T & ⦃G, L⦄ ⊢ T ▶[l1, m1] T2. +#G #L #T1 #T0 #l1 #m1 #H elim H -G -L -T1 -T0 -l1 -m1 +[ /2 width=3 by ex2_intro/ +| #I #G #L #K #V #W #i1 #l1 #m1 #Hli1 #Hilm1 #HLK #HVW #T2 #l2 #m2 #HWT2 #Hlm2l1 + lapply (yle_trans … Hlm2l1 … Hli1) -Hlm2l1 #Hlm2i1 + lapply (cpy_weak … HWT2 0 (i1+1) ? ?) -HWT2 /3 width=1 by yle_succ, yle_pred_sn/ -Hlm2i1 + >yplus_inj #HWT2 <(cpy_inv_lift1_eq … HVW … HWT2) -HWT2 /3 width=9 by cpy_subst, ex2_intro/ +| #a #I #G #L #V1 #V0 #T1 #T0 #l1 #m1 #_ #_ #IHV10 #IHT10 #X #l2 #m2 #HX #lm2l1 + elim (cpy_inv_bind1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + lapply (lsuby_cpy_trans … HT02 (L.ⓑ{I}V1) ?) -HT02 /2 width=1 by lsuby_succ/ #HT02 + elim (IHV10 … HV02) -IHV10 -HV02 // #V + elim (IHT10 … HT02) -T0 /2 width=1 by yle_succ/ #T #HT1 #HT2 + lapply (lsuby_cpy_trans … HT2 (L.ⓑ{I}V) ?) -HT2 /3 width=6 by cpy_bind, lsuby_succ, ex2_intro/ +| #I #G #L #V1 #V0 #T1 #T0 #l1 #m1 #_ #_ #IHV10 #IHT10 #X #l2 #m2 #HX #lm2l1 + elim (cpy_inv_flat1 … HX) -HX #V2 #T2 #HV02 #HT02 #HX destruct + elim (IHV10 … HV02) -V0 // + elim (IHT10 … HT02) -T0 /3 width=6 by cpy_flat, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_lift.ma new file mode 100644 index 000000000..a188129b6 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_lift.ma @@ -0,0 +1,249 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_drop.ma". +include "basic_2A/substitution/cpy.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* Properties on relocation *************************************************) + +(* Basic_1: was: subst1_lift_lt *) +lemma cpy_lift_le: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 → + ∀L,U1,U2,s,l,m. ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ⬆[l, m] T2 ≡ U2 → + lt + mt ≤ l → ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2. +#G #K #T1 #T2 #lt #mt #H elim H -G -K -T1 -T2 -lt -mt +[ #I #G #K #lt #mt #L #U1 #U2 #s #l #m #_ #H1 #H2 #_ + >(lift_mono … H1 … H2) -H1 -H2 // +| #I #G #K #KV #V #W #i #lt #mt #Hlti #Hilmt #HKV #HVW #L #U1 #U2 #s #l #m #HLK #H #HWU2 #Hlmtl + lapply (ylt_yle_trans … Hlmtl … Hilmt) -Hlmtl #Hil + lapply (ylt_inv_inj … Hil) -Hil #Hil + lapply (lift_inv_lref1_lt … H … Hil) -H #H destruct + elim (lift_trans_ge … HVW … HWU2) -W // (lift_mono … HVY … HVW) -Y -HVW #H destruct /2 width=5 by cpy_subst/ +| #a #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hlmtl + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /4 width=7 by cpy_bind, drop_skip, yle_succ/ +| #G #I #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hlmtl + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /3 width=7 by cpy_flat/ +] +qed-. + +lemma cpy_lift_be: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 → + ∀L,U1,U2,s,l,m. ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ⬆[l, m] T2 ≡ U2 → + lt ≤ l → l ≤ lt + mt → ⦃G, L⦄ ⊢ U1 ▶[lt, mt + m] U2. +#G #K #T1 #T2 #lt #mt #H elim H -G -K -T1 -T2 -lt -mt +[ #I #G #K #lt #mt #L #U1 #U2 #s #l #m #_ #H1 #H2 #_ #_ + >(lift_mono … H1 … H2) -H1 -H2 // +| #I #G #K #KV #V #W #i #lt #mt #Hlti #Hilmt #HKV #HVW #L #U1 #U2 #s #l #m #HLK #H #HWU2 #Hltl #_ + elim (lift_inv_lref1 … H) -H * #Hil #H destruct + [ -Hltl + lapply (ylt_yle_trans … (lt+mt+m) … Hilmt) // -Hilmt #Hilmtm + elim (lift_trans_ge … HVW … HWU2) -W // (lift_mono … HVY … HVW) -V #H destruct /2 width=5 by cpy_subst/ + | -Hlti + elim (yle_inv_inj2 … Hltl) -Hltl #ltt #Hltl #H destruct + lapply (transitive_le … Hltl Hil) -Hltl #Hlti + lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K // -Hil + /4 width=5 by cpy_subst, drop_inv_gen, monotonic_ylt_plus_dx, yle_plus_dx1_trans, yle_inj/ + ] +| #a #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hltl #Hllmt + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /4 width=7 by cpy_bind, drop_skip, yle_succ/ +| #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hlmtl + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /3 width=7 by cpy_flat/ +] +qed-. + +(* Basic_1: was: subst1_lift_ge *) +lemma cpy_lift_ge: ∀G,K,T1,T2,lt,mt. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 → + ∀L,U1,U2,s,l,m. ⬇[s, l, m] L ≡ K → + ⬆[l, m] T1 ≡ U1 → ⬆[l, m] T2 ≡ U2 → + l ≤ lt → ⦃G, L⦄ ⊢ U1 ▶[lt+m, mt] U2. +#G #K #T1 #T2 #lt #mt #H elim H -G -K -T1 -T2 -lt -mt +[ #I #G #K #lt #mt #L #U1 #U2 #s #l #m #_ #H1 #H2 #_ + >(lift_mono … H1 … H2) -H1 -H2 // +| #I #G #K #KV #V #W #i #lt #mt #Hlti #Hilmt #HKV #HVW #L #U1 #U2 #s #l #m #HLK #H #HWU2 #Hllt + lapply (yle_trans … Hllt … Hlti) -Hllt #Hil + elim (yle_inv_inj2 … Hil) -Hil #ll #Hlli #H0 destruct + lapply (lift_inv_lref1_ge … H … Hlli) -H #H destruct + lapply (lift_trans_be … HVW … HWU2 ? ?) -W /2 width=1 by le_S/ >plus_plus_comm_23 #HVU2 + lapply (drop_trans_ge_comm … HLK … HKV ?) -K // -Hlli + /3 width=5 by cpy_subst, drop_inv_gen, monotonic_ylt_plus_dx, monotonic_yle_plus_dx/ +| #a #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hllt + elim (lift_inv_bind1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_bind1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /4 width=6 by cpy_bind, drop_skip, yle_succ/ +| #I #G #K #V1 #V2 #T1 #T2 #lt #mt #_ #_ #IHV12 #IHT12 #L #U1 #U2 #s #l #m #HLK #H1 #H2 #Hllt + elim (lift_inv_flat1 … H1) -H1 #VV1 #TT1 #HVV1 #HTT1 #H1 + elim (lift_inv_flat1 … H2) -H2 #VV2 #TT2 #HVV2 #HTT2 #H2 destruct + /3 width=6 by cpy_flat/ +] +qed-. + +(* Inversion lemmas on relocation *******************************************) + +(* Basic_1: was: subst1_gen_lift_lt *) +lemma cpy_inv_lift1_le: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt + mt ≤ l → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H elim H -G -L -U1 -U2 -lt -mt +[ * #i #G #L #lt #mt #K #s #l #m #_ #T1 #H #_ + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #I #G #L #KV #V #W #i #lt #mt #Hlti #Hilmt #HLKV #HVW #K #s #l #m #HLK #T1 #H #Hlmtl + lapply (ylt_yle_trans … Hlmtl … Hilmt) -Hlmtl #Hil + lapply (ylt_inv_inj … Hil) -Hil #Hil + lapply (lift_inv_lref2_lt … H … Hil) -H #H destruct + elim (drop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV + elim (lift_trans_le … HUV … HVW) -V // >minus_plus yplus_minus_assoc_inj /2 width=1 by yle_plus1_to_minus_inj2/ ] -Hlmlmt #Hilmtm + elim (drop_conf_lt … HLK … HLKV) -L // #L #U #HKL #_ #HUV + elim (lift_trans_le … HUV … HVW) -V // >minus_plus plus_minus // yplus_minus_assoc_inj /3 width=1 by monotonic_ylt_minus_dx, yle_inj/ + ] +| #a #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #K #s #l #m #HLK #X #H #Hltl #Hlmlmt + elim (lift_inv_bind2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HLK … HVW1) -IHW12 // #V2 #HV12 #HVW2 + elim (IHU12 … HTU1) -U1 + /3 width=6 by cpy_bind, drop_skip, lift_bind, yle_succ, ex2_intro/ +| #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #K #s #l #m #HLK #X #H #Hltl #Hlmlmt + elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HLK … HVW1) -W1 // + elim (IHU12 … HLK … HTU1) -U1 -HLK // + /3 width=5 by cpy_flat, lift_flat, ex2_intro/ +] +qed-. + +(* Basic_1: was: subst1_gen_lift_ge *) +lemma cpy_inv_lift1_ge: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + yinj l + m ≤ lt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt-m, mt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #H elim H -G -L -U1 -U2 -lt -mt +[ * #i #G #L #lt #mt #K #s #l #m #_ #T1 #H #_ + [ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/ + | elim (lift_inv_lref2 … H) -H * #Hil #H destruct /3 width=3 by lift_lref_ge_minus, lift_lref_lt, ex2_intro/ + | lapply (lift_inv_gref2 … H) -H #H destruct /2 width=3 by ex2_intro/ + ] +| #I #G #L #KV #V #W #i #lt #mt #Hlti #Hilmt #HLKV #HVW #K #s #l #m #HLK #T1 #H #Hlmlt + lapply (yle_trans … Hlmlt … Hlti) #Hlmi + elim (yle_inv_plus_inj2 … Hlmlt) -Hlmlt #_ #Hmlt + elim (yle_inv_plus_inj2 … Hlmi) #Hlim #Hmi + lapply (lift_inv_lref2_ge … H ?) -H /2 width=1 by yle_inv_inj/ #H destruct + lapply (drop_conf_ge … HLK … HLKV ?) -L /2 width=1 by yle_inv_inj/ #HKV + elim (lift_split … HVW l (i-m+1)) -HVW [2,3,4: /3 width=1 by yle_inv_inj, le_S_S, le_S/ ] -Hlmi -Hlim + #V0 #HV10 >plus_minus /2 width=1 by yle_inv_inj/ yminus_succ1_inj /3 width=5 by cpy_bind, lift_bind, ex2_intro/ +| #I #G #L #W1 #W2 #U1 #U2 #lt #mt #_ #_ #IHW12 #IHU12 #K #s #l #m #HLK #X #H #Hlmtl + elim (lift_inv_flat2 … H) -H #V1 #T1 #HVW1 #HTU1 #H destruct + elim (IHW12 … HLK … HVW1) -W1 // + elim (IHU12 … HLK … HTU1) -U1 -HLK /3 width=5 by cpy_flat, lift_flat, ex2_intro/ +] +qed-. + +(* Advanced inversion lemmas on relocation ***********************************) + +lemma cpy_inv_lift1_ge_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + l ≤ lt → lt ≤ yinj l + m → yinj l + m ≤ lt + mt → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[l, lt + mt - (yinj l + m)] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hllt #Hltlm #Hlmlmt +elim (cpy_split_up … HU12 (l + m)) -HU12 // -Hlmlmt #U #HU1 #HU2 +lapply (cpy_weak … HU1 l m ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hllt -Hltlm #HU1 +lapply (cpy_inv_lift1_eq … HTU1 … HU1) -HU1 #HU1 destruct +elim (cpy_inv_lift1_ge … HU2 … HLK … HTU1) -U -L /2 width=3 by ex2_intro/ +qed-. + +lemma cpy_inv_lift1_be_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt, l-lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hlmtlm +lapply (cpy_weak … HU12 lt (l+m-lt) ? ?) -HU12 // +[ >ymax_pre_sn_comm /2 width=1 by yle_plus_dx1_trans/ ] -Hlmtlm #HU12 +elim (cpy_inv_lift1_be … HU12 … HLK … HTU1) -U1 -L /2 width=3 by ex2_intro/ +qed-. + +lemma cpy_inv_lift1_le_up: ∀G,L,U1,U2,lt,mt. ⦃G, L⦄ ⊢ U1 ▶[lt, mt] U2 → + ∀K,s,l,m. ⬇[s, l, m] L ≡ K → ∀T1. ⬆[l, m] T1 ≡ U1 → + lt ≤ l → l ≤ lt + mt → lt + mt ≤ yinj l + m → + ∃∃T2. ⦃G, K⦄ ⊢ T1 ▶[lt, l - lt] T2 & ⬆[l, m] T2 ≡ U2. +#G #L #U1 #U2 #lt #mt #HU12 #K #s #l #m #HLK #T1 #HTU1 #Hltl #Hllmt #Hlmtlm +elim (cpy_split_up … HU12 l) -HU12 // #U #HU1 #HU2 +elim (cpy_inv_lift1_le … HU1 … HLK … HTU1) -U1 +[2: >ymax_pre_sn_comm // ] -Hltl #T #HT1 #HTU +lapply (cpy_weak … HU2 l m ? ?) -HU2 // +[ >ymax_pre_sn_comm // ] -Hllmt -Hlmtlm #HU2 +lapply (cpy_inv_lift1_eq … HTU … HU2) -L #H destruct /2 width=3 by ex2_intro/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_nlift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_nlift.ma new file mode 100644 index 000000000..ded7af4f5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/cpy_nlift.ma @@ -0,0 +1,66 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_neg.ma". +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/substitution/cpy.ma". + +(* CONTEXT-SENSITIVE EXTENDED ORDINARY SUBSTITUTION FOR TERMS ***************) + +(* Inversion lemmas on negated relocation ***********************************) + +lemma cpy_fwd_nlift2_ge: ∀G,L,U1,U2,l,m. ⦃G, L⦄ ⊢ U1 ▶[l, m] U2 → + ∀i. l ≤ yinj i → (∀T2. ⬆[i, 1] T2 ≡ U2 → ⊥) → + (∀T1. ⬆[i, 1] T1 ≡ U1 → ⊥) ∨ + ∃∃I,K,W,j. l ≤ yinj j & j < i & ⬇[j]L ≡ K.ⓑ{I}W & + (∀V. ⬆[i-j-1, 1] V ≡ W → ⊥) & (∀T1. ⬆[j, 1] T1 ≡ U1 → ⊥). +#G #L #U1 #U2 #l #m #H elim H -G -L -U1 -U2 -l -m +[ /3 width=2 by or_introl/ +| #I #G #L #K #V #W #j #l #m #Hlj #Hjlm #HLK #HVW #i #Hli #HnW + elim (lt_or_ge j i) #Hij + [ @or_intror @(ex5_4_intro … HLK) // -HLK + [ #X #HXV elim (lift_trans_le … HXV … HVW ?) -V // + #Y #HXY >minus_plus (plus_minus_m_m j 1) in ⊢ (%→?); [2: /3 width=3 by yle_trans, yle_inv_inj/ ] + #HnU1 commutative_plus normalize #H destruct +] +qed-. + +lemma drop_inv_O1_pair1: ∀I,K,L2,V,s,m. ⬇[s, 0, m] K. ⓑ{I} V ≡ L2 → + (m = 0 ∧ L2 = K.ⓑ{I}V) ∨ + (0 < m ∧ ⬇[s, 0, m-1] K ≡ L2). +/2 width=3 by drop_inv_O1_pair1_aux/ qed-. + +lemma drop_inv_pair1: ∀I,K,L2,V,s. ⬇[s, 0, 0] K.ⓑ{I}V ≡ L2 → L2 = K.ⓑ{I}V. +#I #K #L2 #V #s #H +elim (drop_inv_O1_pair1 … H) -H * // #H destruct +elim (lt_refl_false … H) +qed-. + +(* Basic_1: was: drop_gen_drop *) +lemma drop_inv_drop1_lt: ∀I,K,L2,V,s,m. + ⬇[s, 0, m] K.ⓑ{I}V ≡ L2 → 0 < m → ⬇[s, 0, m-1] K ≡ L2. +#I #K #L2 #V #s #m #H #Hm +elim (drop_inv_O1_pair1 … H) -H * // #H destruct +elim (lt_refl_false … Hm) +qed-. + +lemma drop_inv_drop1: ∀I,K,L2,V,s,m. + ⬇[s, 0, m+1] K.ⓑ{I}V ≡ L2 → ⬇[s, 0, m] K ≡ L2. +#I #K #L2 #V #s #m #H lapply (drop_inv_drop1_lt … H ?) -H // +qed-. + +fact drop_inv_skip1_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → 0 < l → + ∀I,K1,V1. L1 = K1.ⓑ{I}V1 → + ∃∃K2,V2. ⬇[s, l-1, m] K1 ≡ K2 & + ⬆[l-1, m] V2 ≡ V1 & + L2 = K2.ⓑ{I}V2. +#L1 #L2 #s #l #m * -L1 -L2 -l -m +[ #l #m #_ #_ #J #K1 #W1 #H destruct +| #I #L #V #H elim (lt_refl_false … H) +| #I #L1 #L2 #V #m #_ #H elim (lt_refl_false … H) +| #I #L1 #L2 #V1 #V2 #l #m #HL12 #HV21 #_ #J #K1 #W1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: was: drop_gen_skip_l *) +lemma drop_inv_skip1: ∀I,K1,V1,L2,s,l,m. ⬇[s, l, m] K1.ⓑ{I}V1 ≡ L2 → 0 < l → + ∃∃K2,V2. ⬇[s, l-1, m] K1 ≡ K2 & + ⬆[l-1, m] V2 ≡ V1 & + L2 = K2.ⓑ{I}V2. +/2 width=3 by drop_inv_skip1_aux/ qed-. + +lemma drop_inv_O1_pair2: ∀I,K,V,s,m,L1. ⬇[s, 0, m] L1 ≡ K.ⓑ{I}V → + (m = 0 ∧ L1 = K.ⓑ{I}V) ∨ + ∃∃I1,K1,V1. ⬇[s, 0, m-1] K1 ≡ K.ⓑ{I}V & L1 = K1.ⓑ{I1}V1 & 0 < m. +#I #K #V #s #m * +[ #H elim (drop_inv_atom1 … H) -H #H destruct +| #L1 #I1 #V1 #H + elim (drop_inv_O1_pair1 … H) -H * + [ #H1 #H2 destruct /3 width=1 by or_introl, conj/ + | /3 width=5 by ex3_3_intro, or_intror/ + ] +] +qed-. + +fact drop_inv_skip2_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → 0 < l → + ∀I,K2,V2. L2 = K2.ⓑ{I}V2 → + ∃∃K1,V1. ⬇[s, l-1, m] K1 ≡ K2 & + ⬆[l-1, m] V2 ≡ V1 & + L1 = K1.ⓑ{I}V1. +#L1 #L2 #s #l #m * -L1 -L2 -l -m +[ #l #m #_ #_ #J #K2 #W2 #H destruct +| #I #L #V #H elim (lt_refl_false … H) +| #I #L1 #L2 #V #m #_ #H elim (lt_refl_false … H) +| #I #L1 #L2 #V1 #V2 #l #m #HL12 #HV21 #_ #J #K2 #W2 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +(* Basic_1: was: drop_gen_skip_r *) +lemma drop_inv_skip2: ∀I,L1,K2,V2,s,l,m. ⬇[s, l, m] L1 ≡ K2.ⓑ{I}V2 → 0 < l → + ∃∃K1,V1. ⬇[s, l-1, m] K1 ≡ K2 & ⬆[l-1, m] V2 ≡ V1 & + L1 = K1.ⓑ{I}V1. +/2 width=3 by drop_inv_skip2_aux/ qed-. + +lemma drop_inv_O1_gt: ∀L,K,m,s. ⬇[s, 0, m] L ≡ K → |L| < m → + s = Ⓣ ∧ K = ⋆. +#L elim L -L [| #L #Z #X #IHL ] #K #m #s #H normalize in ⊢ (?%?→?); #H1m +[ elim (drop_inv_atom1 … H) -H elim s -s /2 width=1 by conj/ + #_ #Hs lapply (Hs ?) // -Hs #H destruct elim (lt_zero_false … H1m) +| elim (drop_inv_O1_pair1 … H) -H * #H2m #HLK destruct + [ elim (lt_zero_false … H1m) + | elim (IHL … HLK) -IHL -HLK /2 width=1 by lt_plus_to_minus_r, conj/ + ] +] +qed-. + +(* Basic properties *********************************************************) + +lemma drop_refl_atom_O2: ∀s,l. ⬇[s, l, O] ⋆ ≡ ⋆. +/2 width=1 by drop_atom/ qed. + +(* Basic_1: was by definition: drop_refl *) +lemma drop_refl: ∀L,l,s. ⬇[s, l, 0] L ≡ L. +#L elim L -L // +#L #I #V #IHL #l #s @(nat_ind_plus … l) -l /2 width=1 by drop_pair, drop_skip/ +qed. + +lemma drop_drop_lt: ∀I,L1,L2,V,s,m. + ⬇[s, 0, m-1] L1 ≡ L2 → 0 < m → ⬇[s, 0, m] L1.ⓑ{I}V ≡ L2. +#I #L1 #L2 #V #s #m #HL12 #Hm >(plus_minus_m_m m 1) /2 width=1 by drop_drop/ +qed. + +lemma drop_skip_lt: ∀I,L1,L2,V1,V2,s,l,m. + ⬇[s, l-1, m] L1 ≡ L2 → ⬆[l-1, m] V2 ≡ V1 → 0 < l → + ⬇[s, l, m] L1. ⓑ{I} V1 ≡ L2.ⓑ{I}V2. +#I #L1 #L2 #V1 #V2 #s #l #m #HL12 #HV21 #Hl >(plus_minus_m_m l 1) /2 width=1 by drop_skip/ +qed. + +lemma drop_O1_le: ∀s,m,L. m ≤ |L| → ∃K. ⬇[s, 0, m] L ≡ K. +#s #m @(nat_ind_plus … m) -m /2 width=2 by ex_intro/ +#m #IHm * +[ #H elim (le_plus_xSy_O_false … H) +| #L #I #V normalize #H elim (IHm L) -IHm /3 width=2 by drop_drop, monotonic_pred, ex_intro/ +] +qed-. + +lemma drop_O1_lt: ∀s,L,m. m < |L| → ∃∃I,K,V. ⬇[s, 0, m] L ≡ K.ⓑ{I}V. +#s #L elim L -L +[ #m #H elim (lt_zero_false … H) +| #L #I #V #IHL #m @(nat_ind_plus … m) -m /2 width=4 by drop_pair, ex1_3_intro/ + #m #_ normalize #H elim (IHL m) -IHL /3 width=4 by drop_drop, lt_plus_to_minus_r, lt_plus_to_lt_l, ex1_3_intro/ +] +qed-. + +lemma drop_O1_pair: ∀L,K,m,s. ⬇[s, 0, m] L ≡ K → m ≤ |L| → ∀I,V. + ∃∃J,W. ⬇[s, 0, m] L.ⓑ{I}V ≡ K.ⓑ{J}W. +#L elim L -L [| #L #Z #X #IHL ] #K #m #s #H normalize #Hm #I #V +[ elim (drop_inv_atom1 … H) -H #H <(le_n_O_to_eq … Hm) -m + #Hs destruct /2 width=3 by ex1_2_intro/ +| elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK destruct /2 width=3 by ex1_2_intro/ + elim (IHL … HLK … Z X) -IHL -HLK + /3 width=3 by drop_drop_lt, le_plus_to_minus, ex1_2_intro/ +] +qed-. + +lemma drop_O1_ge: ∀L,m. |L| ≤ m → ⬇[Ⓣ, 0, m] L ≡ ⋆. +#L elim L -L [ #m #_ @drop_atom #H destruct ] +#L #I #V #IHL #m @(nat_ind_plus … m) -m [ #H elim (le_plus_xSy_O_false … H) ] +normalize /4 width=1 by drop_drop, monotonic_pred/ +qed. + +lemma drop_O1_eq: ∀L,s. ⬇[s, 0, |L|] L ≡ ⋆. +#L elim L -L /2 width=1 by drop_drop, drop_atom/ +qed. + +lemma drop_split: ∀L1,L2,l,m2,s. ⬇[s, l, m2] L1 ≡ L2 → ∀m1. m1 ≤ m2 → + ∃∃L. ⬇[s, l, m2 - m1] L1 ≡ L & ⬇[s, l, m1] L ≡ L2. +#L1 #L2 #l #m2 #s #H elim H -L1 -L2 -l -m2 +[ #l #m2 #Hs #m1 #Hm12 @(ex2_intro … (⋆)) + @drop_atom #H lapply (Hs H) -s #H destruct /2 width=1 by le_n_O_to_eq/ +| #I #L1 #V #m1 #Hm1 lapply (le_n_O_to_eq … Hm1) -Hm1 + #H destruct /2 width=3 by ex2_intro/ +| #I #L1 #L2 #V #m2 #HL12 #IHL12 #m1 @(nat_ind_plus … m1) -m1 + [ /3 width=3 by drop_drop, ex2_intro/ + | -HL12 #m1 #_ #Hm12 lapply (le_plus_to_le_r … Hm12) -Hm12 + #Hm12 elim (IHL12 … Hm12) -IHL12 >minus_plus_plus_l + #L #HL1 #HL2 elim (lt_or_ge (|L1|) (m2-m1)) #H0 + [ elim (drop_inv_O1_gt … HL1 H0) -HL1 #H1 #H2 destruct + elim (drop_inv_atom1 … HL2) -HL2 #H #_ destruct + @(ex2_intro … (⋆)) [ @drop_O1_ge normalize // ] + @drop_atom #H destruct + | elim (drop_O1_pair … HL1 H0 I V) -HL1 -H0 /3 width=5 by drop_drop, ex2_intro/ + ] + ] +| #I #L1 #L2 #V1 #V2 #l #m2 #_ #HV21 #IHL12 #m1 #Hm12 elim (IHL12 … Hm12) -IHL12 + #L #HL1 #HL2 elim (lift_split … HV21 l m1) -HV21 /3 width=5 by drop_skip, ex2_intro/ +] +qed-. + +lemma drop_FT: ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → ⬇[Ⓣ, l, m] L1 ≡ L2. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +/3 width=1 by drop_atom, drop_drop, drop_skip/ +qed. + +lemma drop_gen: ∀L1,L2,s,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → ⬇[s, l, m] L1 ≡ L2. +#L1 #L2 * /2 width=1 by drop_FT/ +qed-. + +lemma drop_T: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → ⬇[Ⓣ, l, m] L1 ≡ L2. +#L1 #L2 * /2 width=1 by drop_FT/ +qed-. + +lemma d_liftable_LTC: ∀R. d_liftable R → d_liftable (LTC … R). +#R #HR #K #T1 #T2 #H elim H -T2 +[ /3 width=10 by inj/ +| #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #HTU1 #U2 #HTU2 + elim (lift_total T l m) /4 width=12 by step/ +] +qed-. + +lemma d_deliftable_sn_LTC: ∀R. d_deliftable_sn R → d_deliftable_sn (LTC … R). +#R #HR #L #U1 #U2 #H elim H -U2 +[ #U2 #HU12 #K #s #l #m #HLK #T1 #HTU1 + elim (HR … HU12 … HLK … HTU1) -HR -L -U1 /3 width=3 by inj, ex2_intro/ +| #U #U2 #_ #HU2 #IHU1 #K #s #l #m #HLK #T1 #HTU1 + elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 + elim (HR … HU2 … HLK … HTU) -HR -L -U /3 width=5 by step, ex2_intro/ +] +qed-. + +lemma dropable_sn_TC: ∀R. dropable_sn R → dropable_sn (TC … R). +#R #HR #L1 #K1 #s #l #m #HLK1 #L2 #H elim H -L2 +[ #L2 #HL12 elim (HR … HLK1 … HL12) -HR -L1 + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 * #K #HK1 #HLK elim (HR … HLK … HL2) -HR -L + /3 width=3 by step, ex2_intro/ +] +qed-. + +lemma dropable_dx_TC: ∀R. dropable_dx R → dropable_dx (TC … R). +#R #HR #L1 #L2 #H elim H -L2 +[ #L2 #HL12 #K2 #s #m #HLK2 elim (HR … HL12 … HLK2) -HR -L2 + /3 width=3 by inj, ex2_intro/ +| #L #L2 #_ #HL2 #IHL1 #K2 #s #m #HLK2 elim (HR … HL2 … HLK2) -HR -L2 + #K #HLK #HK2 elim (IHL1 … HLK) -L + /3 width=5 by step, ex2_intro/ +] +qed-. + +lemma d_deliftable_sn_llstar: ∀R. d_deliftable_sn R → + ∀d. d_deliftable_sn (llstar … R d). +#R #HR #d #L #U1 #U2 #H @(lstar_ind_r … d U2 H) -d -U2 +[ /2 width=3 by lstar_O, ex2_intro/ +| #d #U #U2 #_ #HU2 #IHU1 #K #s #l #m #HLK #T1 #HTU1 + elim (IHU1 … HLK … HTU1) -IHU1 -U1 #T #HTU #HT1 + elim (HR … HU2 … HLK … HTU) -HR -L -U /3 width=5 by lstar_dx, ex2_intro/ +] +qed-. + +(* Basic forward lemmas *****************************************************) + +(* Basic_1: was: drop_S *) +lemma drop_fwd_drop2: ∀L1,I2,K2,V2,s,m. ⬇[s, O, m] L1 ≡ K2. ⓑ{I2} V2 → + ⬇[s, O, m + 1] L1 ≡ K2. +#L1 elim L1 -L1 +[ #I2 #K2 #V2 #s #m #H lapply (drop_inv_atom1 … H) -H * #H destruct +| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #s #m #H + elim (drop_inv_O1_pair1 … H) -H * #Hm #H + [ -IHL1 destruct /2 width=1 by drop_drop/ + | @drop_drop >(plus_minus_m_m m 1) /2 width=3 by/ + ] +] +qed-. + +lemma drop_fwd_length_ge: ∀L1,L2,l,m,s. ⬇[s, l, m] L1 ≡ L2 → |L1| ≤ l → |L2| = |L1|. +#L1 #L2 #l #m #s #H elim H -L1 -L2 -l -m // normalize +[ #I #L1 #L2 #V #m #_ #_ #H elim (le_plus_xSy_O_false … H) +| /4 width=2 by le_plus_to_le_r, eq_f/ +] +qed-. + +lemma drop_fwd_length_le_le: ∀L1,L2,l,m,s. ⬇[s, l, m] L1 ≡ L2 → l ≤ |L1| → m ≤ |L1| - l → |L2| = |L1| - m. +#L1 #L2 #l #m #s #H elim H -L1 -L2 -l -m // normalize +[ /3 width=2 by le_plus_to_le_r/ +| #I #L1 #L2 #V1 #V2 #l #m #_ #_ #IHL12 >minus_plus_plus_l + #Hl #Hm lapply (le_plus_to_le_r … Hl) -Hl + #Hl >IHL12 // -L2 >plus_minus /2 width=3 by transitive_le/ +] +qed-. + +lemma drop_fwd_length_le_ge: ∀L1,L2,l,m,s. ⬇[s, l, m] L1 ≡ L2 → l ≤ |L1| → |L1| - l ≤ m → |L2| = l. +#L1 #L2 #l #m #s #H elim H -L1 -L2 -l -m normalize +[ /2 width=1 by le_n_O_to_eq/ +| #I #L #V #_ (lift_fwd_tw … HV21) -HV21 /2 width=1 by monotonic_le_plus_l/ +] +qed-. + +lemma drop_fwd_lw_lt: ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → 0 < m → ♯{L2} < ♯{L1}. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +[ #l #m #H >H -H // +| #I #L #V #H elim (lt_refl_false … H) +| #I #L1 #L2 #V #m #HL12 #_ #_ + lapply (drop_fwd_lw … HL12) -HL12 #HL12 + @(le_to_lt_to_lt … HL12) -HL12 // +| #I #L1 #L2 #V1 #V2 #l #m #_ #HV21 #IHL12 #H normalize in ⊢ (?%%); -I + >(lift_fwd_tw … HV21) -V2 /3 by lt_minus_to_plus/ +] +qed-. + +lemma drop_fwd_rfw: ∀I,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}. +#I #L #K #V #i #HLK lapply (drop_fwd_lw … HLK) -HLK +normalize in ⊢ (%→?→?%%); /3 width=3 by le_to_lt_to_lt/ +qed-. + +(* Advanced inversion lemmas ************************************************) + +fact drop_inv_O2_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → m = 0 → L1 = L2. +#L1 #L2 #s #l #m #H elim H -L1 -L2 -l -m +[ // +| // +| #I #L1 #L2 #V #m #_ #_ >commutative_plus normalize #H destruct +| #I #L1 #L2 #V1 #V2 #l #m #_ #HV21 #IHL12 #H + >(IHL12 H) -L1 >(lift_inv_O2_aux … HV21 … H) -V2 -l -m // +] +qed-. + +(* Basic_1: was: drop_gen_refl *) +lemma drop_inv_O2: ∀L1,L2,s,l. ⬇[s, l, 0] L1 ≡ L2 → L1 = L2. +/2 width=5 by drop_inv_O2_aux/ qed-. + +lemma drop_inv_length_eq: ∀L1,L2,l,m. ⬇[Ⓕ, l, m] L1 ≡ L2 → |L1| = |L2| → m = 0. +#L1 #L2 #l #m #H #HL12 lapply (drop_fwd_length_minus4 … H) // +qed-. + +lemma drop_inv_refl: ∀L,l,m. ⬇[Ⓕ, l, m] L ≡ L → m = 0. +/2 width=5 by drop_inv_length_eq/ qed-. + +fact drop_inv_FT_aux: ∀L1,L2,s,l,m. ⬇[s, l, m] L1 ≡ L2 → + ∀I,K,V. L2 = K.ⓑ{I}V → s = Ⓣ → l = 0 → + ⬇[Ⓕ, l, m] L1 ≡ K.ⓑ{I}V. +#L1 #L2 #s #l #m #H elim H -L1 -L2 -l -m +[ #l #m #_ #J #K #W #H destruct +| #I #L #V #J #K #W #H destruct // +| #I #L1 #L2 #V #m #_ #IHL12 #J #K #W #H1 #H2 destruct + /3 width=1 by drop_drop/ +| #I #L1 #L2 #V1 #V2 #l #m #_ #_ #_ #J #K #W #_ #_ + commutative_plus normalize #H destruct +| minus_minus_comm /3 width=1 by monotonic_pred/ +] +qed-. + +lemma drop_O1_inv_append1_le: ∀K,L1,L2,s,m. ⬇[s, 0, m] L1 @@ L2 ≡ K → m ≤ |L2| → + ∀K2. ⬇[s, 0, m] L2 ≡ K2 → K = L1 @@ K2. +#K #L1 #L2 elim L2 -L2 normalize +[ #s #m #H1 #H2 #K2 #H3 lapply (le_n_O_to_eq … H2) -H2 + #H2 elim (drop_inv_atom1 … H3) -H3 #H3 #_ destruct + >(drop_inv_O2 … H1) -H1 // +| #L2 #I #V #IHL2 #s #m @(nat_ind_plus … m) -m [ -IHL2 ] + [ #H1 #_ #K2 #H2 + lapply (drop_inv_O2 … H1) -H1 #H1 + lapply (drop_inv_O2 … H2) -H2 #H2 destruct // + | /4 width=7 by drop_inv_drop1, le_plus_to_le_r/ + ] +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_drop.ma new file mode 100644 index 000000000..0ee0f74cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_drop.ma @@ -0,0 +1,208 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/substitution/drop.ma". + +(* BASIC SLICING FOR LOCAL ENVIRONMENTS *************************************) + +(* Main properties **********************************************************) + +(* Basic_1: was: drop_mono *) +theorem drop_mono: ∀L,L1,s1,l,m. ⬇[s1, l, m] L ≡ L1 → + ∀L2,s2. ⬇[s2, l, m] L ≡ L2 → L1 = L2. +#L #L1 #s1 #l #m #H elim H -L -L1 -l -m +[ #l #m #Hm #L2 #s2 #H elim (drop_inv_atom1 … H) -H // +| #I #K #V #L2 #s2 #HL12 <(drop_inv_O2 … HL12) -L2 // +| #I #L #K #V #m #_ #IHLK #L2 #s2 #H + lapply (drop_inv_drop1 … H) -H /2 width=2 by/ +| #I #L #K1 #T #V1 #l #m #_ #HVT1 #IHLK1 #X #s2 #H + elim (drop_inv_skip1 … H) -H // (lift_inj … HVT1 … HVT2) -HVT1 -HVT2 + >(IHLK1 … HLK2) -IHLK1 -HLK2 // +] +qed-. + +(* Basic_1: was: drop_conf_ge *) +theorem drop_conf_ge: ∀L,L1,s1,l1,m1. ⬇[s1, l1, m1] L ≡ L1 → + ∀L2,s2,m2. ⬇[s2, 0, m2] L ≡ L2 → l1 + m1 ≤ m2 → + ⬇[s2, 0, m2 - m1] L1 ≡ L2. +#L #L1 #s1 #l1 #m1 #H elim H -L -L1 -l1 -m1 // +[ #l #m #_ #L2 #s2 #m2 #H #_ elim (drop_inv_atom1 … H) -H + #H #Hm destruct + @drop_atom #H >Hm // (**) (* explicit constructor *) +| #I #L #K #V #m #_ #IHLK #L2 #s2 #m2 #H #Hm2 + lapply (drop_inv_drop1_lt … H ?) -H /2 width=2 by ltn_to_ltO/ #HL2 + minus_minus_comm /3 width=1 by monotonic_pred/ +| #I #L #K #V1 #V2 #l #m #_ #_ #IHLK #L2 #s2 #m2 #H #Hlmm2 + lapply (transitive_le 1 … Hlmm2) // #Hm2 + lapply (drop_inv_drop1_lt … H ?) -H // -Hm2 #HL2 + lapply (transitive_le (1+m) … Hlmm2) // #Hmm2 + @drop_drop_lt >minus_minus_comm /3 width=1 by lt_minus_to_plus_r, monotonic_le_minus_r, monotonic_pred/ (**) (* explicit constructor *) +] +qed. + +(* Note: apparently this was missing in basic_1 *) +theorem drop_conf_be: ∀L0,L1,s1,l1,m1. ⬇[s1, l1, m1] L0 ≡ L1 → + ∀L2,m2. ⬇[m2] L0 ≡ L2 → l1 ≤ m2 → m2 ≤ l1 + m1 → + ∃∃L. ⬇[s1, 0, l1 + m1 - m2] L2 ≡ L & ⬇[l1] L1 ≡ L. +#L0 #L1 #s1 #l1 #m1 #H elim H -L0 -L1 -l1 -m1 +[ #l1 #m1 #Hm1 #L2 #m2 #H #Hl1 #_ elim (drop_inv_atom1 … H) -H #H #Hm2 destruct + >(Hm2 ?) in Hl1; // -Hm2 #Hl1 <(le_n_O_to_eq … Hl1) -l1 + /4 width=3 by drop_atom, ex2_intro/ +| normalize #I #L #V #L2 #m2 #HL2 #_ #Hm2 + lapply (le_n_O_to_eq … Hm2) -Hm2 #H destruct + lapply (drop_inv_O2 … HL2) -HL2 #H destruct /2 width=3 by drop_pair, ex2_intro/ +| normalize #I #L0 #K0 #V1 #m1 #HLK0 #IHLK0 #L2 #m2 #H #_ #Hm21 + lapply (drop_inv_O1_pair1 … H) -H * * #Hm2 #HL20 + [ -IHLK0 -Hm21 destruct plus_plus_comm_23 #_ #_ #IHLK0 #L2 #m2 #H #Hl1m2 #Hm2lm1 + elim (le_inv_plus_l … Hl1m2) #_ #Hm2 + minus_le_minus_minus_comm /3 width=3 by drop_drop_lt, ex2_intro/ + ] +] +qed-. + +(* Note: with "s2", the conclusion parameter is "s1 ∨ s2" *) +(* Basic_1: was: drop_trans_ge *) +theorem drop_trans_ge: ∀L1,L,s1,l1,m1. ⬇[s1, l1, m1] L1 ≡ L → + ∀L2,m2. ⬇[m2] L ≡ L2 → l1 ≤ m2 → ⬇[s1, 0, m1 + m2] L1 ≡ L2. +#L1 #L #s1 #l1 #m1 #H elim H -L1 -L -l1 -m1 +[ #l1 #m1 #Hm1 #L2 #m2 #H #_ elim (drop_inv_atom1 … H) -H + #H #Hm2 destruct /4 width=1 by drop_atom, eq_f2/ +| /2 width=1 by drop_gen/ +| /3 width=1 by drop_drop/ +| #I #L1 #L2 #V1 #V2 #l #m #_ #_ #IHL12 #L #m2 #H #Hlm2 + lapply (lt_to_le_to_lt 0 … Hlm2) // #Hm2 + lapply (lt_to_le_to_lt … (m + m2) Hm2 ?) // #Hmm2 + lapply (drop_inv_drop1_lt … H ?) -H // #HL2 + @drop_drop_lt // >le_plus_minus /3 width=1 by monotonic_pred/ +] +qed. + +(* Basic_1: was: drop_trans_le *) +theorem drop_trans_le: ∀L1,L,s1,l1,m1. ⬇[s1, l1, m1] L1 ≡ L → + ∀L2,s2,m2. ⬇[s2, 0, m2] L ≡ L2 → m2 ≤ l1 → + ∃∃L0. ⬇[s2, 0, m2] L1 ≡ L0 & ⬇[s1, l1 - m2, m1] L0 ≡ L2. +#L1 #L #s1 #l1 #m1 #H elim H -L1 -L -l1 -m1 +[ #l1 #m1 #Hm1 #L2 #s2 #m2 #H #_ elim (drop_inv_atom1 … H) -H + #H #Hm2 destruct /4 width=3 by drop_atom, ex2_intro/ +| #I #K #V #L2 #s2 #m2 #HL2 #H lapply (le_n_O_to_eq … H) -H + #H destruct /2 width=3 by drop_pair, ex2_intro/ +| #I #L1 #L2 #V #m #_ #IHL12 #L #s2 #m2 #HL2 #H lapply (le_n_O_to_eq … H) -H + #H destruct elim (IHL12 … HL2) -IHL12 -HL2 // + #L0 #H #HL0 lapply (drop_inv_O2 … H) -H #H destruct + /3 width=5 by drop_pair, drop_drop, ex2_intro/ +| #I #L1 #L2 #V1 #V2 #l #m #HL12 #HV12 #IHL12 #L #s2 #m2 #H #Hm2l + elim (drop_inv_O1_pair1 … H) -H * + [ -Hm2l -IHL12 #H1 #H2 destruct /3 width=5 by drop_pair, drop_skip, ex2_intro/ + | -HL12 -HV12 #Hm2 #HL2 + elim (IHL12 … HL2) -L2 [ >minus_le_minus_minus_comm // /3 width=3 by drop_drop_lt, ex2_intro/ | /2 width=1 by monotonic_pred/ ] + ] +] +qed-. + +(* Advanced properties ******************************************************) + +lemma d_liftable_llstar: ∀R. d_liftable R → ∀d. d_liftable (llstar … R d). +#R #HR #d #K #T1 #T2 #H @(lstar_ind_r … d T2 H) -d -T2 +[ #L #s #l #m #_ #U1 #HTU1 #U2 #HTU2 -HR -K + >(lift_mono … HTU2 … HTU1) -T1 -U2 -l -m // +| #d #T #T2 #_ #HT2 #IHT1 #L #s #l #m #HLK #U1 #HTU1 #U2 #HTU2 + elim (lift_total T l m) /3 width=12 by lstar_dx/ +] +qed-. + +(* Basic_1: was: drop_conf_lt *) +lemma drop_conf_lt: ∀L,L1,s1,l1,m1. ⬇[s1, l1, m1] L ≡ L1 → + ∀I,K2,V2,s2,m2. ⬇[s2, 0, m2] L ≡ K2.ⓑ{I}V2 → + m2 < l1 → let l ≝ l1 - m2 - 1 in + ∃∃K1,V1. ⬇[s2, 0, m2] L1 ≡ K1.ⓑ{I}V1 & + ⬇[s1, l, m1] K2 ≡ K1 & ⬆[l, m1] V1 ≡ V2. +#L #L1 #s1 #l1 #m1 #H1 #I #K2 #V2 #s2 #m2 #H2 #Hm2l1 +elim (drop_conf_le … H1 … H2) -L /2 width=2 by lt_to_le/ #K #HL1K #HK2 +elim (drop_inv_skip1 … HK2) -HK2 /2 width=1 by lt_plus_to_minus_r/ +#K1 #V1 #HK21 #HV12 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +(* Note: apparently this was missing in basic_1 *) +lemma drop_trans_lt: ∀L1,L,s1,l1,m1. ⬇[s1, l1, m1] L1 ≡ L → + ∀I,L2,V2,s2,m2. ⬇[s2, 0, m2] L ≡ L2.ⓑ{I}V2 → + m2 < l1 → let l ≝ l1 - m2 - 1 in + ∃∃L0,V0. ⬇[s2, 0, m2] L1 ≡ L0.ⓑ{I}V0 & + ⬇[s1, l, m1] L0 ≡ L2 & ⬆[l, m1] V2 ≡ V0. +#L1 #L #s1 #l1 #m1 #HL1 #I #L2 #V2 #s2 #m2 #HL2 #Hl21 +elim (drop_trans_le … HL1 … HL2) -L /2 width=1 by lt_to_le/ #L0 #HL10 #HL02 +elim (drop_inv_skip2 … HL02) -HL02 /2 width=1 by lt_plus_to_minus_r/ #L #V1 #HL2 #HV21 #H destruct /2 width=5 by ex3_2_intro/ +qed-. + +lemma drop_trans_ge_comm: ∀L1,L,L2,s1,l1,m1,m2. + ⬇[s1, l1, m1] L1 ≡ L → ⬇[m2] L ≡ L2 → l1 ≤ m2 → + ⬇[s1, 0, m2 + m1] L1 ≡ L2. +#L1 #L #L2 #s1 #l1 #m1 #m2 +>commutative_plus /2 width=5 by drop_trans_ge/ +qed. + +lemma drop_conf_div: ∀I1,L,K,V1,m1. ⬇[m1] L ≡ K.ⓑ{I1}V1 → + ∀I2,V2,m2. ⬇[m2] L ≡ K.ⓑ{I2}V2 → + ∧∧ m1 = m2 & I1 = I2 & V1 = V2. +#I1 #L #K #V1 #m1 #HLK1 #I2 #V2 #m2 #HLK2 +elim (le_or_ge m1 m2) #Hm +[ lapply (drop_conf_ge … HLK1 … HLK2 ?) +| lapply (drop_conf_ge … HLK2 … HLK1 ?) +] -HLK1 -HLK2 // #HK +lapply (drop_fwd_length_minus2 … HK) #H +elim (discr_minus_x_xy … H) -H +[1,3: normalize H in HK; #HK +lapply (drop_inv_O2 … HK) -HK #H destruct +lapply (inv_eq_minus_O … H) -H /3 width=1 by le_to_le_to_eq, and3_intro/ +qed-. + +(* Advanced forward lemmas **************************************************) + +lemma drop_fwd_be: ∀L,K,s,l,m,i. ⬇[s, l, m] L ≡ K → |K| ≤ i → i < l → |L| ≤ i. +#L #K #s #l #m #i #HLK #HK #Hl elim (lt_or_ge i (|L|)) // +#HL elim (drop_O1_lt (Ⓕ) … HL) #I #K0 #V #HLK0 -HL +elim (drop_conf_lt … HLK … HLK0) // -HLK -HLK0 -Hl +#K1 #V1 #HK1 #_ #_ lapply (drop_fwd_length_lt2 … HK1) -I -K1 -V1 +#H elim (lt_refl_false i) /2 width=3 by lt_to_le_to_lt/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_lreq.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_lreq.ma new file mode 100644 index 000000000..ad39fd7c3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/drop_lreq.ma @@ -0,0 +1,92 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/lreq_lreq.ma". +include "basic_2A/substitution/drop.ma". + +(* BASIC SLICING FOR LOCAL ENVIRONMENTS *************************************) + +definition dedropable_sn: predicate (relation lenv) ≝ + λR. ∀L1,K1,s,l,m. ⬇[s, l, m] L1 ≡ K1 → ∀K2. R K1 K2 → + ∃∃L2. R L1 L2 & ⬇[s, l, m] L2 ≡ K2 & L1 ⩬[l, m] L2. + +(* Properties on equivalence ************************************************) + +lemma lreq_drop_trans_be: ∀L1,L2,l,m. L1 ⩬[l, m] L2 → + ∀I,K2,W,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓑ{I}W → + l ≤ i → i < l + m → + ∃∃K1. K1 ⩬[0, ⫰(l+m-i)] K2 & ⬇[s, 0, i] L1 ≡ K1.ⓑ{I}W. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +[ #l #m #J #K2 #W #s #i #H + elim (drop_inv_atom1 … H) -H #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #_ #J #K2 #W #s #i #_ #_ #H + elim (ylt_yle_false … H) // +| #I #L1 #L2 #V #m #HL12 #IHL12 #J #K2 #W #s #i #H #_ >yplus_O1 + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK1 [ -IHL12 | -HL12 ] + [ #_ destruct >ypred_succ + /2 width=3 by drop_pair, ex2_intro/ + | lapply (ylt_inv_O1 i ?) /2 width=1 by ylt_inj/ + #H yminus_succ yplus_succ1 #H lapply (ylt_inv_succ … H) -H + #Hilm lapply (drop_inv_drop1_lt … HLK2 ?) -HLK2 /2 width=1 by ylt_O/ + #HLK1 elim (IHL12 … HLK1) -IHL12 -HLK1 yminus_SO2 + /4 width=3 by ylt_O, drop_drop_lt, ex2_intro/ +] +qed-. + +lemma lreq_drop_conf_be: ∀L1,L2,l,m. L1 ⩬[l, m] L2 → + ∀I,K1,W,s,i. ⬇[s, 0, i] L1 ≡ K1.ⓑ{I}W → + l ≤ i → i < l + m → + ∃∃K2. K1 ⩬[0, ⫰(l+m-i)] K2 & ⬇[s, 0, i] L2 ≡ K2.ⓑ{I}W. +#L1 #L2 #l #m #HL12 #I #K1 #W #s #i #HLK1 #Hli #Hilm +elim (lreq_drop_trans_be … (lreq_sym … HL12) … HLK1) // -L1 -Hli -Hilm +/3 width=3 by lreq_sym, ex2_intro/ +qed-. + +lemma drop_O1_ex: ∀K2,i,L1. |L1| = |K2| + i → + ∃∃L2. L1 ⩬[0, i] L2 & ⬇[i] L2 ≡ K2. +#K2 #i @(nat_ind_plus … i) -i +[ /3 width=3 by lreq_O2, ex2_intro/ +| #i #IHi #Y #Hi elim (drop_O1_lt (Ⓕ) Y 0) // + #I #L1 #V #H lapply (drop_inv_O2 … H) -H #H destruct + normalize in Hi; elim (IHi L1) -IHi + /3 width=5 by drop_drop, lreq_pair, injective_plus_l, ex2_intro/ +] +qed-. + +lemma dedropable_sn_TC: ∀R. dedropable_sn R → dedropable_sn (TC … R). +#R #HR #L1 #K1 #s #l #m #HLK1 #K2 #H elim H -K2 +[ #K2 #HK12 elim (HR … HLK1 … HK12) -HR -K1 + /3 width=4 by inj, ex3_intro/ +| #K #K2 #_ #HK2 * #L #H1L1 #HLK #H2L1 elim (HR … HLK … HK2) -HR -K + /3 width=6 by lreq_trans, step, ex3_intro/ +] +qed-. + +(* Inversion lemmas on equivalence ******************************************) + +lemma drop_O1_inj: ∀i,L1,L2,K. ⬇[i] L1 ≡ K → ⬇[i] L2 ≡ K → L1 ⩬[i, ∞] L2. +#i @(nat_ind_plus … i) -i +[ #L1 #L2 #K #H <(drop_inv_O2 … H) -K #H <(drop_inv_O2 … H) -L1 // +| #i #IHi * [2: #L1 #I1 #V1 ] * [2,4: #L2 #I2 #V2 ] #K #HLK1 #HLK2 // + lapply (drop_fwd_length … HLK1) + <(drop_fwd_length … HLK2) [ /4 width=5 by drop_inv_drop1, lreq_succ/ ] + normalize (plus_minus_m_m m 1) /2 width=3 by fqu_drop/ +qed. + +lemma fqu_lref_S_lt: ∀I,G,L,V,i. 0 < i → ⦃G, L.ⓑ{I}V, #i⦄ ⊐ ⦃G, L, #(i-1)⦄. +/3 width=3 by fqu_drop, drop_drop, lift_lref_ge_minus/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma fqu_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // +#G #L #K #T #U #m #HLK #HTU +lapply (drop_fwd_lw_lt … HLK ?) -HLK // #HKL +lapply (lift_fwd_tw … HTU) -m #H +normalize in ⊢ (?%%); /2 width=1 by lt_minus_to_plus/ +qed-. + +fact fqu_fwd_length_lref1_aux: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + ∀i. T1 = #i → |L2| < |L1|. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +[1: normalize // +|3: #a +|5: /2 width=4 by drop_fwd_length_lt4/ +] #I #G #L #V #T #j #H destruct +qed-. + +lemma fqu_fwd_length_lref1: ∀G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐ ⦃G2, L2, T2⦄ → |L2| < |L1|. +/2 width=7 by fqu_fwd_length_lref1_aux/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact fqu_inv_eq_aux: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → + G1 = G2 → |L1| = |L2| → T1 = T2 → ⊥. +#G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2 normalize +/2 width=4 by discr_tpair_xy_y, discr_tpair_xy_x, plus_xSy_x_false/ +#G #L #K #T #U #m #HLK #_ #_ #H #_ -G -T -U >(drop_fwd_length … HLK) in H; -L +/2 width=4 by plus_xySz_x_false/ +qed-. + +lemma fqu_inv_eq: ∀G,L1,L2,T. ⦃G, L1, T⦄ ⊐ ⦃G, L2, T⦄ → |L1| = |L2| → ⊥. +#G #L1 #L2 #T #H #H0 @(fqu_inv_eq_aux … H … H0) // (**) (* full auto fails *) +qed-. + +(* Advanced eliminators *****************************************************) + +lemma fqu_wf_ind: ∀R:relation3 …. ( + ∀G1,L1,T1. (∀G2,L2,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → R G2 L2 T2) → + R G1 L1 T1 + ) → ∀G1,L1,T1. R G1 L1 T1. +#R #HR @(f3_ind … fw) #x #IHx #G1 #L1 #T1 #H destruct /4 width=1 by fqu_fwd_fw/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq.ma new file mode 100644 index 000000000..0893a0b91 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq.ma @@ -0,0 +1,64 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermopt_6.ma". +include "basic_2A/substitution/fqu.ma". + +(* OPTIONAL SUPCLOSURE ******************************************************) + +(* activate genv *) +inductive fquq: tri_relation genv lenv term ≝ +| fquq_lref_O : ∀I,G,L,V. fquq G (L.ⓑ{I}V) (#0) G L V +| fquq_pair_sn: ∀I,G,L,V,T. fquq G L (②{I}V.T) G L V +| fquq_bind_dx: ∀a,I,G,L,V,T. fquq G L (ⓑ{a,I}V.T) G (L.ⓑ{I}V) T +| fquq_flat_dx: ∀I,G, L,V,T. fquq G L (ⓕ{I}V.T) G L T +| fquq_drop : ∀G,L,K,T,U,m. + ⬇[m] L ≡ K → ⬆[0, m] T ≡ U → fquq G L U G K T +. + +interpretation + "optional structural successor (closure)" + 'SupTermOpt G1 L1 T1 G2 L2 T2 = (fquq G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fquq_refl: tri_reflexive … fquq. +/2 width=3 by fquq_drop/ qed. + +lemma fqu_fquq: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 /2 width=3 by fquq_drop/ +qed. + +(* Basic forward lemmas *****************************************************) + +lemma fquq_fwd_fw: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} ≤ ♯{G1, L1, T1}. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 /2 width=1 by lt_to_le/ +#G1 #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 +lapply (drop_fwd_lw … HLK1) -HLK1 +lapply (lift_fwd_tw … HTU1) -HTU1 +/2 width=1 by le_plus, le_n/ +qed-. + +fact fquq_fwd_length_lref1_aux: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ∀i. T1 = #i → |L2| ≤ |L1|. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 // +[ #a #I #G #L #V #T #j #H destruct +| #G1 #L1 #K1 #T1 #U1 #m #HLK1 #HTU1 #i #H destruct + /2 width=3 by drop_fwd_length_le4/ +] +qed-. + +lemma fquq_fwd_length_lref1: ∀G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐⸮ ⦃G2, L2, T2⦄ → |L2| ≤ |L1|. +/2 width=7 by fquq_fwd_length_lref1_aux/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma new file mode 100644 index 000000000..57d9332be --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/suptermoptalt_6.ma". +include "basic_2A/substitution/fquq.ma". + +(* OPTIONAL SUPCLOSURE ******************************************************) + +(* alternative definition of fquq *) +definition fquqa: tri_relation genv lenv term ≝ tri_RC … fqu. + +interpretation + "optional structural successor (closure) alternative" + 'SupTermOptAlt G1 L1 T1 G2 L2 T2 = (fquqa G1 L1 T1 G2 L2 T2). + +(* Basic properties *********************************************************) + +lemma fquqa_refl: tri_reflexive … fquqa. +// qed. + +lemma fquqa_drop: ∀G,L,K,T,U,m. + ⬇[m] L ≡ K → ⬆[0, m] T ≡ U → ⦃G, L, U⦄ ⊐⊐⸮ ⦃G, K, T⦄. +#G #L #K #T #U #m #HLK #HTU elim (eq_or_gt m) +/3 width=5 by fqu_drop_lt, or_introl/ #H destruct +>(drop_inv_O2 … HLK) -L >(lift_inv_O2 … HTU) -T // +qed. + +(* Main properties **********************************************************) + +theorem fquq_fquqa: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⊐⸮ ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 +/2 width=3 by fquqa_drop, fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, or_introl/ +qed. + +(* Main inversion properties ************************************************) + +theorem fquqa_inv_fquq: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄. +#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H /2 width=1 by fqu_fquq/ +* #H1 #H2 #H3 destruct // +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma fquq_inv_gen: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → + ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2). +#G1 #G2 #L1 #L2 #T1 #T2 #H elim (fquq_fquqa … H) -H [| * ] +/2 width=1 by or_introl/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget.ma new file mode 100644 index 000000000..b11b0af4c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget.ma @@ -0,0 +1,81 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rdrop_3.ma". +include "basic_2A/grammar/genv.ma". + +(* GLOBAL ENVIRONMENT READING ***********************************************) + +inductive gget (m:nat): relation genv ≝ +| gget_gt: ∀G. |G| ≤ m → gget m G (⋆) +| gget_eq: ∀G. |G| = m + 1 → gget m G G +| gget_lt: ∀I,G1,G2,V. m < |G1| → gget m G1 G2 → gget m (G1. ⓑ{I} V) G2 +. + +interpretation "global reading" + 'RDrop m G1 G2 = (gget m G1 G2). + +(* basic inversion lemmas ***************************************************) + +lemma gget_inv_gt: ∀G1,G2,m. ⬇[m] G1 ≡ G2 → |G1| ≤ m → G2 = ⋆. +#G1 #G2 #m * -G1 -G2 // +[ #G #H >H -H >commutative_plus #H (**) (* lemma needed here *) + lapply (le_plus_to_le_r … 0 H) -H #H + lapply (le_n_O_to_eq … H) -H #H destruct +| #I #G1 #G2 #V #H1 #_ #H2 + lapply (le_to_lt_to_lt … H2 H1) -H2 -H1 normalize in ⊢ (? % ? → ?); >commutative_plus #H + lapply (lt_plus_to_lt_l … 0 H) -H #H + elim (lt_zero_false … H) +] +qed-. + +lemma gget_inv_eq: ∀G1,G2,m. ⬇[m] G1 ≡ G2 → |G1| = m + 1 → G1 = G2. +#G1 #G2 #m * -G1 -G2 // +[ #G #H1 #H2 >H2 in H1; -H2 >commutative_plus #H (**) (* lemma needed here *) + lapply (le_plus_to_le_r … 0 H) -H #H + lapply (le_n_O_to_eq … H) -H #H destruct +| #I #G1 #G2 #V #H1 #_ normalize #H2 + <(injective_plus_l … H2) in H1; -H2 #H + elim (lt_refl_false … H) +] +qed-. + +fact gget_inv_lt_aux: ∀I,G,G1,G2,V,m. ⬇[m] G ≡ G2 → G = G1. ⓑ{I} V → + m < |G1| → ⬇[m] G1 ≡ G2. +#I #G #G1 #G2 #V #m * -G -G2 +[ #G #H1 #H destruct #H2 + lapply (le_to_lt_to_lt … H1 H2) -H1 -H2 normalize in ⊢ (? % ? → ?); >commutative_plus #H + lapply (lt_plus_to_lt_l … 0 H) -H #H + elim (lt_zero_false … H) +| #G #H1 #H2 destruct >(injective_plus_l … H1) -H1 #H + elim (lt_refl_false … H) +| #J #G #G2 #W #_ #HG2 #H destruct // +] +qed-. + +lemma gget_inv_lt: ∀I,G1,G2,V,m. + ⬇[m] G1. ⓑ{I} V ≡ G2 → m < |G1| → ⬇[m] G1 ≡ G2. +/2 width=5 by gget_inv_lt_aux/ qed-. + +(* Basic properties *********************************************************) + +lemma gget_total: ∀m,G1. ∃G2. ⬇[m] G1 ≡ G2. +#m #G1 elim G1 -G1 /3 width=2 by gget_gt, ex_intro/ +#I #V #G1 * #G2 #HG12 +elim (lt_or_eq_or_gt m (|G1|)) #Hm +[ /3 width=2 by gget_lt, ex_intro/ +| destruct /3 width=2 by gget_eq, ex_intro/ +| @ex_intro [2: @gget_gt normalize /2 width=1 by/ | skip ] (**) (* explicit constructor *) +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget_gget.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget_gget.ma new file mode 100644 index 000000000..d8c752eda --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/gget_gget.ma @@ -0,0 +1,40 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/gget.ma". + +(* GLOBAL ENVIRONMENT READING ***********************************************) + +(* Main properties **********************************************************) + +theorem gget_mono: ∀G,G1,m. ⬇[m] G ≡ G1 → ∀G2. ⬇[m] G ≡ G2 → G1 = G2. +#G #G1 #m #H elim H -G -G1 +[ #G #Hm #G2 #H + >(gget_inv_gt … H Hm) -H -Hm // +| #G #Hm #G2 #H + >(gget_inv_eq … H Hm) -H -Hm // +| #I #G #G1 #V #Hm #_ #IHG1 #G2 #H + lapply (gget_inv_lt … H Hm) -H -Hm /2 width=1 by/ +] +qed-. + +lemma gget_dec: ∀G1,G2,m. Decidable (⬇[m] G1 ≡ G2). +#G1 #G2 #m +elim (gget_total m G1) #G #HG1 +elim (eq_genv_dec G G2) #HG2 +[ destruct /2 width=1 by or_introl/ +| @or_intror #HG12 + lapply (gget_mono … HG1 … HG12) -HG1 -HG12 /2 width=1 by/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift.ma new file mode 100644 index 000000000..63e82758a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift.ma @@ -0,0 +1,393 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/rlift_4.ma". +include "basic_2A/grammar/term_weight.ma". +include "basic_2A/grammar/term_simple.ma". + +(* BASIC TERM RELOCATION ****************************************************) + +(* Basic_1: includes: + lift_sort lift_lref_lt lift_lref_ge lift_bind lift_flat +*) +inductive lift: relation4 nat nat term term ≝ +| lift_sort : ∀k,l,m. lift l m (⋆k) (⋆k) +| lift_lref_lt: ∀i,l,m. i < l → lift l m (#i) (#i) +| lift_lref_ge: ∀i,l,m. l ≤ i → lift l m (#i) (#(i + m)) +| lift_gref : ∀p,l,m. lift l m (§p) (§p) +| lift_bind : ∀a,I,V1,V2,T1,T2,l,m. + lift l m V1 V2 → lift (l + 1) m T1 T2 → + lift l m (ⓑ{a,I} V1. T1) (ⓑ{a,I} V2. T2) +| lift_flat : ∀I,V1,V2,T1,T2,l,m. + lift l m V1 V2 → lift l m T1 T2 → + lift l m (ⓕ{I} V1. T1) (ⓕ{I} V2. T2) +. + +interpretation "relocation" 'RLift l m T1 T2 = (lift l m T1 T2). + +(* Basic inversion lemmas ***************************************************) + +fact lift_inv_O2_aux: ∀l,m,T1,T2. ⬆[l, m] T1 ≡ T2 → m = 0 → T1 = T2. +#l #m #T1 #T2 #H elim H -l -m -T1 -T2 /3 width=1 by eq_f2/ +qed-. + +lemma lift_inv_O2: ∀l,T1,T2. ⬆[l, 0] T1 ≡ T2 → T1 = T2. +/2 width=4 by lift_inv_O2_aux/ qed-. + +fact lift_inv_sort1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀k. T1 = ⋆k → T2 = ⋆k. +#l #m #T1 #T2 * -l -m -T1 -T2 // +[ #i #l #m #_ #k #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +] +qed-. + +lemma lift_inv_sort1: ∀l,m,T2,k. ⬆[l,m] ⋆k ≡ T2 → T2 = ⋆k. +/2 width=5 by lift_inv_sort1_aux/ qed-. + +fact lift_inv_lref1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀i. T1 = #i → + (i < l ∧ T2 = #i) ∨ (l ≤ i ∧ T2 = #(i + m)). +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #i #H destruct +| #j #l #m #Hj #i #Hi destruct /3 width=1 by or_introl, conj/ +| #j #l #m #Hj #i #Hi destruct /3 width=1 by or_intror, conj/ +| #p #l #m #i #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #i #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #i #H destruct +] +qed-. + +lemma lift_inv_lref1: ∀l,m,T2,i. ⬆[l,m] #i ≡ T2 → + (i < l ∧ T2 = #i) ∨ (l ≤ i ∧ T2 = #(i + m)). +/2 width=3 by lift_inv_lref1_aux/ qed-. + +lemma lift_inv_lref1_lt: ∀l,m,T2,i. ⬆[l,m] #i ≡ T2 → i < l → T2 = #i. +#l #m #T2 #i #H elim (lift_inv_lref1 … H) -H * // +#Hli #_ #Hil lapply (le_to_lt_to_lt … Hli Hil) -Hli -Hil #Hll +elim (lt_refl_false … Hll) +qed-. + +lemma lift_inv_lref1_ge: ∀l,m,T2,i. ⬆[l,m] #i ≡ T2 → l ≤ i → T2 = #(i + m). +#l #m #T2 #i #H elim (lift_inv_lref1 … H) -H * // +#Hil #_ #Hli lapply (le_to_lt_to_lt … Hli Hil) -Hli -Hil #Hll +elim (lt_refl_false … Hll) +qed-. + +fact lift_inv_gref1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀p. T1 = §p → T2 = §p. +#l #m #T1 #T2 * -l -m -T1 -T2 // +[ #i #l #m #_ #k #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +] +qed-. + +lemma lift_inv_gref1: ∀l,m,T2,p. ⬆[l,m] §p ≡ T2 → T2 = §p. +/2 width=5 by lift_inv_gref1_aux/ qed-. + +fact lift_inv_bind1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → + ∀a,I,V1,U1. T1 = ⓑ{a,I} V1.U1 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l+1,m] U1 ≡ U2 & + T2 = ⓑ{a,I} V2. U2. +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #a #I #V1 #U1 #H destruct +| #i #l #m #_ #a #I #V1 #U1 #H destruct +| #i #l #m #_ #a #I #V1 #U1 #H destruct +| #p #l #m #a #I #V1 #U1 #H destruct +| #b #J #W1 #W2 #T1 #T2 #l #m #HW #HT #a #I #V1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +| #J #W1 #W2 #T1 #T2 #l #m #_ #HT #a #I #V1 #U1 #H destruct +] +qed-. + +lemma lift_inv_bind1: ∀l,m,T2,a,I,V1,U1. ⬆[l,m] ⓑ{a,I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l+1,m] U1 ≡ U2 & + T2 = ⓑ{a,I} V2. U2. +/2 width=3 by lift_inv_bind1_aux/ qed-. + +fact lift_inv_flat1_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → + ∀I,V1,U1. T1 = ⓕ{I} V1.U1 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l,m] U1 ≡ U2 & + T2 = ⓕ{I} V2. U2. +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #I #V1 #U1 #H destruct +| #i #l #m #_ #I #V1 #U1 #H destruct +| #i #l #m #_ #I #V1 #U1 #H destruct +| #p #l #m #I #V1 #U1 #H destruct +| #a #J #W1 #W2 #T1 #T2 #l #m #_ #_ #I #V1 #U1 #H destruct +| #J #W1 #W2 #T1 #T2 #l #m #HW #HT #I #V1 #U1 #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lift_inv_flat1: ∀l,m,T2,I,V1,U1. ⬆[l,m] ⓕ{I} V1. U1 ≡ T2 → + ∃∃V2,U2. ⬆[l,m] V1 ≡ V2 & ⬆[l,m] U1 ≡ U2 & + T2 = ⓕ{I} V2. U2. +/2 width=3 by lift_inv_flat1_aux/ qed-. + +fact lift_inv_sort2_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k. +#l #m #T1 #T2 * -l -m -T1 -T2 // +[ #i #l #m #_ #k #H destruct +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #k #H destruct +] +qed-. + +(* Basic_1: was: lift_gen_sort *) +lemma lift_inv_sort2: ∀l,m,T1,k. ⬆[l,m] T1 ≡ ⋆k → T1 = ⋆k. +/2 width=5 by lift_inv_sort2_aux/ qed-. + +fact lift_inv_lref2_aux: ∀l,m,T1,T2. ⬆[l,m] T1 ≡ T2 → ∀i. T2 = #i → + (i < l ∧ T1 = #i) ∨ (l + m ≤ i ∧ T1 = #(i - m)). +#l #m #T1 #T2 * -l -m -T1 -T2 +[ #k #l #m #i #H destruct +| #j #l #m #Hj #i #Hi destruct /3 width=1 by or_introl, conj/ +| #j #l #m #Hj #i #Hi destruct (plus_minus_m_m i m) in ⊢ (? ? ? ? %); /3 width=2 by lift_lref_ge, le_plus_to_minus_r, le_plus_b/ +qed. + +lemma lift_lref_ge_minus_eq: ∀l,m,i,j. l + m ≤ i → j = i - m → ⬆[l, m] #j ≡ #i. +/2 width=1 by lift_lref_ge_minus/ qed-. + +(* Basic_1: was: lift_r *) +lemma lift_refl: ∀T,l. ⬆[l, 0] T ≡ T. +#T elim T -T +[ * #i // #l elim (lt_or_ge i l) /2 width=1 by lift_lref_lt, lift_lref_ge/ +| * /2 width=1 by lift_bind, lift_flat/ +] +qed. + +lemma lift_total: ∀T1,l,m. ∃T2. ⬆[l,m] T1 ≡ T2. +#T1 elim T1 -T1 +[ * #i /2 width=2 by lift_sort, lift_gref, ex_intro/ + #l #m elim (lt_or_ge i l) /3 width=2 by lift_lref_lt, lift_lref_ge, ex_intro/ +| * [ #a ] #I #V1 #T1 #IHV1 #IHT1 #l #m + elim (IHV1 l m) -IHV1 #V2 #HV12 + [ elim (IHT1 (l+1) m) -IHT1 /3 width=2 by lift_bind, ex_intro/ + | elim (IHT1 l m) -IHT1 /3 width=2 by lift_flat, ex_intro/ + ] +] +qed. + +(* Basic_1: was: lift_free (right to left) *) +lemma lift_split: ∀l1,m2,T1,T2. ⬆[l1, m2] T1 ≡ T2 → + ∀l2,m1. l1 ≤ l2 → l2 ≤ l1 + m1 → m1 ≤ m2 → + ∃∃T. ⬆[l1, m1] T1 ≡ T & ⬆[l2, m2 - m1] T ≡ T2. +#l1 #m2 #T1 #T2 #H elim H -l1 -m2 -T1 -T2 +[ /3 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m2 #Hil1 #l2 #m1 #Hl12 #_ #_ + lapply (lt_to_le_to_lt … Hil1 Hl12) -Hl12 #Hil2 /4 width=3 by lift_lref_lt, ex2_intro/ +| #i #l1 #m2 #Hil1 #l2 #m1 #_ #Hl21 #Hm12 + lapply (transitive_le … (i+m1) Hl21 ?) /2 width=1 by monotonic_le_plus_l/ -Hl21 #Hl21 + >(plus_minus_m_m m2 m1 ?) /3 width=3 by lift_lref_ge, ex2_intro/ +| /3 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V2 #T1 #T2 #l1 #m2 #_ #_ #IHV #IHT #l2 #m1 #Hl12 #Hl21 #Hm12 + elim (IHV … Hl12 Hl21 Hm12) -IHV #V0 #HV0a #HV0b + elim (IHT (l2+1) … ? ? Hm12) /3 width=5 by lift_bind, le_S_S, ex2_intro/ +| #I #V1 #V2 #T1 #T2 #l1 #m2 #_ #_ #IHV #IHT #l2 #m1 #Hl12 #Hl21 #Hm12 + elim (IHV … Hl12 Hl21 Hm12) -IHV #V0 #HV0a #HV0b + elim (IHT l2 … ? ? Hm12) /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +(* Basic_1: was only: dnf_dec2 dnf_dec *) +lemma is_lift_dec: ∀T2,l,m. Decidable (∃T1. ⬆[l,m] T1 ≡ T2). +#T1 elim T1 -T1 +[ * [1,3: /3 width=2 by lift_sort, lift_gref, ex_intro, or_introl/ ] #i #l #m + elim (lt_or_ge i l) #Hli + [ /4 width=3 by lift_lref_lt, ex_intro, or_introl/ + | elim (lt_or_ge i (l + m)) #Hilm + [ @or_intror * #T1 #H elim (lift_inv_lref2_be … H Hli Hilm) + | -Hli /4 width=2 by lift_lref_ge_minus, ex_intro, or_introl/ + ] + ] +| * [ #a ] #I #V2 #T2 #IHV2 #IHT2 #l #m + [ elim (IHV2 l m) -IHV2 + [ * #V1 #HV12 elim (IHT2 (l+1) m) -IHT2 + [ * #T1 #HT12 @or_introl /3 width=2 by lift_bind, ex_intro/ + | -V1 #HT2 @or_intror * #X #H + elim (lift_inv_bind2 … H) -H /3 width=2 by ex_intro/ + ] + | -IHT2 #HV2 @or_intror * #X #H + elim (lift_inv_bind2 … H) -H /3 width=2 by ex_intro/ + ] + | elim (IHV2 l m) -IHV2 + [ * #V1 #HV12 elim (IHT2 l m) -IHT2 + [ * #T1 #HT12 /4 width=2 by lift_flat, ex_intro, or_introl/ + | -V1 #HT2 @or_intror * #X #H + elim (lift_inv_flat2 … H) -H /3 width=2 by ex_intro/ + ] + | -IHT2 #HV2 @or_intror * #X #H + elim (lift_inv_flat2 … H) -H /3 width=2 by ex_intro/ + ] + ] +] +qed. + +(* Basic_1: removed theorems 7: + lift_head lift_gen_head + lift_weight_map lift_weight lift_weight_add lift_weight_add_O + lift_tlt_dx +*) diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift.ma new file mode 100644 index 000000000..bbc747aa7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift.ma @@ -0,0 +1,217 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift.ma". + +(* BASIC TERM RELOCATION ****************************************************) + +(* Main properties ***********************************************************) + +(* Basic_1: was: lift_inj *) +theorem lift_inj: ∀l,m,T1,U. ⬆[l,m] T1 ≡ U → ∀T2. ⬆[l,m] T2 ≡ U → T1 = T2. +#l #m #T1 #U #H elim H -l -m -T1 -U +[ #k #l #m #X #HX + lapply (lift_inv_sort2 … HX) -HX // +| #i #l #m #Hil #X #HX + lapply (lift_inv_lref2_lt … HX ?) -HX // +| #i #l #m #Hli #X #HX + lapply (lift_inv_lref2_ge … HX ?) -HX /2 width=1 by monotonic_le_plus_l/ +| #p #l #m #X #HX + lapply (lift_inv_gref2 … HX) -HX // +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_bind2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_flat2 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +] +qed-. + +(* Basic_1: was: lift_gen_lift *) +theorem lift_div_le: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2 + m1, m2] T2 ≡ T → + l1 ≤ l2 → + ∃∃T0. ⬆[l1, m1] T0 ≡ T2 & ⬆[l2, m2] T0 ≡ T1. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #T2 #Hk #Hl12 + lapply (lift_inv_sort2 … Hk) -Hk #Hk destruct /3 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #Hi #Hl12 + lapply (lt_to_le_to_lt … Hil1 Hl12) -Hl12 #Hil2 + lapply (lift_inv_lref2_lt … Hi ?) -Hi /3 width=3 by lift_lref_lt, lt_plus_to_minus_r, lt_to_le_to_lt, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #Hi #Hl12 + elim (lift_inv_lref2 … Hi) -Hi * #Hil2 #H destruct + [ -Hl12 lapply (lt_plus_to_lt_l … Hil2) -Hil2 #Hil2 /3 width=3 by lift_lref_lt, lift_lref_ge, ex2_intro/ + | -Hil1 >plus_plus_comm_23 in Hil2; #H lapply (le_plus_to_le_r … H) -H #H + elim (le_inv_plus_l … H) -H #Hilm2 #Hm2i + lapply (transitive_le … Hl12 Hilm2) -Hl12 #Hl12 + >le_plus_minus_comm // >(plus_minus_m_m i m2) in ⊢ (? ? ? %); + /4 width=3 by lift_lref_ge, ex2_intro/ + ] +| #p #l1 #m1 #l2 #m2 #T2 #Hk #Hl12 + lapply (lift_inv_gref2 … Hk) -Hk #Hk destruct /3 width=3 by lift_gref, ex2_intro/ +| #a #I #W1 #W #U1 #U #l1 #m1 #_ #_ #IHW #IHU #l2 #m2 #T2 #H #Hl12 + lapply (lift_inv_bind2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct + elim (IHW … HW2) // -IHW -HW2 #W0 #HW2 #HW1 + >plus_plus_comm_23 in HU2; #HU2 elim (IHU … HU2) /3 width=5 by lift_bind, le_S_S, ex2_intro/ +| #I #W1 #W #U1 #U #l1 #m1 #_ #_ #IHW #IHU #l2 #m2 #T2 #H #Hl12 + lapply (lift_inv_flat2 … H) -H * #W2 #U2 #HW2 #HU2 #H destruct + elim (IHW … HW2) // -IHW -HW2 #W0 #HW2 #HW1 + elim (IHU … HU2) /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +(* Note: apparently this was missing in basic_1 *) +theorem lift_div_be: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀m,m2,T2. ⬆[l1 + m, m2] T2 ≡ T → + m ≤ m1 → m1 ≤ m + m2 → + ∃∃T0. ⬆[l1, m] T0 ≡ T2 & ⬆[l1, m + m2 - m1] T0 ≡ T1. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #m #m2 #T2 #H >(lift_inv_sort2 … H) -H /2 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #m #m2 #T2 #H #Hm1 #Hm1m2 + >(lift_inv_lref2_lt … H) -H /3 width=3 by lift_lref_lt, lt_plus_to_minus_r, lt_to_le_to_lt, ex2_intro/ +| #i #l1 #m1 #Hil1 #m #m2 #T2 #H #Hm1 #Hm1m2 + elim (lt_or_ge (i+m1) (l1+m+m2)) #Him1l1m2 + [ elim (lift_inv_lref2_be … H) -H /2 width=1 by le_plus/ + | >(lift_inv_lref2_ge … H ?) -H // + lapply (le_plus_to_minus … Him1l1m2) #Hl1m21i + elim (le_inv_plus_l … Him1l1m2) -Him1l1m2 #Hl1m12 #Hm2im1 + @ex2_intro [2: /2 width=1 by lift_lref_ge_minus/ | skip ] -Hl1m12 + @lift_lref_ge_minus_eq [ >plus_minus_associative // | /2 width=1 by minus_le_minus_minus_comm/ ] + ] +| #p #l1 #m1 #m #m2 #T2 #H >(lift_inv_gref2 … H) -H /2 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V #T1 #T #l1 #m1 #_ #_ #IHV1 #IHT1 #m #m2 #X #H #Hm1 #Hm1m2 + elim (lift_inv_bind2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct + elim (IHV1 … HV2) -V // >plus_plus_comm_23 in HT2; #HT2 + elim (IHT1 … HT2) -T /3 width=5 by lift_bind, ex2_intro/ +| #I #V1 #V #T1 #T #l1 #m1 #_ #_ #IHV1 #IHT1 #m #m2 #X #H #Hm1 #Hm1m2 + elim (lift_inv_flat2 … H) -H #V2 #T2 #HV2 #HT2 #H destruct + elim (IHV1 … HV2) -V // + elim (IHT1 … HT2) -T /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +theorem lift_mono: ∀l,m,T,U1. ⬆[l,m] T ≡ U1 → ∀U2. ⬆[l,m] T ≡ U2 → U1 = U2. +#l #m #T #U1 #H elim H -l -m -T -U1 +[ #k #l #m #X #HX + lapply (lift_inv_sort1 … HX) -HX // +| #i #l #m #Hil #X #HX + lapply (lift_inv_lref1_lt … HX ?) -HX // +| #i #l #m #Hli #X #HX + lapply (lift_inv_lref1_ge … HX ?) -HX // +| #p #l #m #X #HX + lapply (lift_inv_gref1 … HX) -HX // +| #a #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_bind1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +| #I #V1 #V2 #T1 #T2 #l #m #_ #_ #IHV12 #IHT12 #X #HX + elim (lift_inv_flat1 … HX) -HX #V #T #HV1 #HT1 #HX destruct /3 width=1 by eq_f2/ +] +qed-. + +(* Basic_1: was: lift_free (left to right) *) +theorem lift_trans_be: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2, m2] T ≡ T2 → + l1 ≤ l2 → l2 ≤ l1 + m1 → ⬆[l1, m1 + m2] T1 ≡ T2. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #T2 #HT2 #_ #_ + >(lift_inv_sort1 … HT2) -HT2 // +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #HT2 #Hl12 #_ + lapply (lt_to_le_to_lt … Hil1 Hl12) -Hl12 #Hil2 + lapply (lift_inv_lref1_lt … HT2 Hil2) /2 width=1 by lift_lref_lt/ +| #i #l1 #m1 #Hil1 #l2 #m2 #T2 #HT2 #_ #Hl21 + lapply (lift_inv_lref1_ge … HT2 ?) -HT2 + [ @(transitive_le … Hl21 ?) -Hl21 /2 width=1 by monotonic_le_plus_l/ + | -Hl21 /2 width=1 by lift_lref_ge/ + ] +| #p #l1 #m1 #l2 #m2 #T2 #HT2 #_ #_ + >(lift_inv_gref1 … HT2) -HT2 // +| #a #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl12 #Hl21 + elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10 + lapply (IHT12 … HT20 ? ?) /2 width=1 by lift_bind, le_S_S/ (**) (* full auto a bit slow *) +| #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl12 #Hl21 + elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + lapply (IHV12 … HV20 ? ?) // -IHV12 -HV20 #HV10 + lapply (IHT12 … HT20 ? ?) /2 width=1 by lift_flat/ (**) (* full auto a bit slow *) +] +qed. + +(* Basic_1: was: lift_d (right to left) *) +theorem lift_trans_le: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2, m2] T ≡ T2 → l2 ≤ l1 → + ∃∃T0. ⬆[l2, m2] T1 ≡ T0 & ⬆[l1 + m2, m1] T0 ≡ T2. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_sort1 … HX) -HX /2 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #_ + lapply (lt_to_le_to_lt … (l1+m2) Hil1 ?) // #Him2 + elim (lift_inv_lref1 … HX) -HX * #Hil2 #HX destruct /4 width=3 by lift_lref_ge_minus, lift_lref_lt, lt_minus_to_plus, monotonic_le_plus_l, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #Hl21 + lapply (transitive_le … Hl21 Hil1) -Hl21 #Hil2 + lapply (lift_inv_lref1_ge … HX ?) -HX /2 width=3 by transitive_le/ #HX destruct + >plus_plus_comm_23 /4 width=3 by lift_lref_ge_minus, lift_lref_ge, monotonic_le_plus_l, ex2_intro/ +| #p #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_gref1 … HX) -HX /2 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl21 + elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + elim (IHV12 … HV20) -IHV12 -HV20 // + elim (IHT12 … HT20) -IHT12 -HT20 /3 width=5 by lift_bind, le_S_S, ex2_intro/ +| #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hl21 + elim (lift_inv_flat1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + elim (IHV12 … HV20) -IHV12 -HV20 // + elim (IHT12 … HT20) -IHT12 -HT20 /3 width=5 by lift_flat, ex2_intro/ +] +qed. + +(* Basic_1: was: lift_d (left to right) *) +theorem lift_trans_ge: ∀l1,m1,T1,T. ⬆[l1, m1] T1 ≡ T → + ∀l2,m2,T2. ⬆[l2, m2] T ≡ T2 → l1 + m1 ≤ l2 → + ∃∃T0. ⬆[l2 - m1, m2] T1 ≡ T0 & ⬆[l1, m1] T0 ≡ T2. +#l1 #m1 #T1 #T #H elim H -l1 -m1 -T1 -T +[ #k #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_sort1 … HX) -HX /2 width=3 by lift_sort, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #Hlml + lapply (lt_to_le_to_lt … (l1+m1) Hil1 ?) // #Hil1m + lapply (lt_to_le_to_lt … (l2-m1) Hil1 ?) /2 width=1 by le_plus_to_minus_r/ #Hil2m + lapply (lt_to_le_to_lt … Hil1m Hlml) -Hil1m -Hlml #Hil2 + lapply (lift_inv_lref1_lt … HX ?) -HX // #HX destruct /3 width=3 by lift_lref_lt, ex2_intro/ +| #i #l1 #m1 #Hil1 #l2 #m2 #X #HX #_ + elim (lift_inv_lref1 … HX) -HX * #Himl #HX destruct /4 width=3 by lift_lref_lt, lift_lref_ge, monotonic_le_minus_l, lt_plus_to_minus_r, transitive_le, ex2_intro/ +| #p #l1 #m1 #l2 #m2 #X #HX #_ + >(lift_inv_gref1 … HX) -HX /2 width=3 by lift_gref, ex2_intro/ +| #a #I #V1 #V2 #T1 #T2 #l1 #m1 #_ #_ #IHV12 #IHT12 #l2 #m2 #X #HX #Hlml + elim (lift_inv_bind1 … HX) -HX #V0 #T0 #HV20 #HT20 #HX destruct + elim (IHV12 … HV20) -IHV12 -HV20 // + elim (IHT12 … HT20) -IHT12 -HT20 /2 width=1 by le_S_S/ #T + (lift_mono … H … HT1) -T // +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift_vector.ma new file mode 100644 index 000000000..c7e9739df --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_lift_vector.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift_lift.ma". +include "basic_2A/substitution/lift_vector.ma". + +(* BASIC TERM VECTOR RELOCATION *********************************************) + +(* Main properties ***********************************************************) + +theorem liftv_mono: ∀Ts,U1s,l,m. ⬆[l,m] Ts ≡ U1s → + ∀U2s:list term. ⬆[l,m] Ts ≡ U2s → U1s = U2s. +#Ts #U1s #l #m #H elim H -Ts -U1s +[ #U2s #H >(liftv_inv_nil1 … H) -H // +| #Ts #U1s #T #U1 #HTU1 #_ #IHTU1s #X #H destruct + elim (liftv_inv_cons1 … H) -H #U2 #U2s #HTU2 #HTU2s #H destruct + >(lift_mono … HTU1 … HTU2) -T /3 width=1 by eq_f/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_neg.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_neg.ma new file mode 100644 index 000000000..52f8c2823 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_neg.ma @@ -0,0 +1,67 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lift.ma". + +(* BASIC TERM RELOCATION ****************************************************) + +(* Properties on negated basic relocation ***********************************) + +lemma nlift_lref_be_SO: ∀X,i. ⬆[i, 1] X ≡ #i → ⊥. +/2 width=7 by lift_inv_lref2_be/ qed-. + +lemma nlift_bind_sn: ∀W,l,m. (∀V. ⬆[l, m] V ≡ W → ⊥) → + ∀a,I,U. (∀X. ⬆[l, m] X ≡ ⓑ{a,I}W.U → ⊥). +#W #l #m #HW #a #I #U #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/ +qed-. + +lemma nlift_bind_dx: ∀U,l,m. (∀T. ⬆[l+1, m] T ≡ U → ⊥) → + ∀a,I,W. (∀X. ⬆[l, m] X ≡ ⓑ{a,I}W.U → ⊥). +#U #l #m #HU #a #I #W #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/ +qed-. + +lemma nlift_flat_sn: ∀W,l,m. (∀V. ⬆[l, m] V ≡ W → ⊥) → + ∀I,U. (∀X. ⬆[l, m] X ≡ ⓕ{I}W.U → ⊥). +#W #l #m #HW #I #U #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/ +qed-. + +lemma nlift_flat_dx: ∀U,l,m. (∀T. ⬆[l, m] T ≡ U → ⊥) → + ∀I,W. (∀X. ⬆[l, m] X ≡ ⓕ{I}W.U → ⊥). +#U #l #m #HU #I #W #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/ +qed-. + +(* Inversion lemmas on negated basic relocation *****************************) + +lemma nlift_inv_lref_be_SO: ∀i,j. (∀X. ⬆[i, 1] X ≡ #j → ⊥) → j = i. +#i #j elim (lt_or_eq_or_gt i j) // #Hij #H +[ elim (H (#(j-1))) -H /2 width=1 by lift_lref_ge_minus/ +| elim (H (#j)) -H /2 width=1 by lift_lref_lt/ +] +qed-. + +lemma nlift_inv_bind: ∀a,I,W,U,l,m. (∀X. ⬆[l, m] X ≡ ⓑ{a,I}W.U → ⊥) → + (∀V. ⬆[l, m] V ≡ W → ⊥) ∨ (∀T. ⬆[l+1, m] T ≡ U → ⊥). +#a #I #W #U #l #m #H elim (is_lift_dec W l m) +[ * /4 width=2 by lift_bind, or_intror/ +| /4 width=2 by ex_intro, or_introl/ +] +qed-. + +lemma nlift_inv_flat: ∀I,W,U,l,m. (∀X. ⬆[l, m] X ≡ ⓕ{I}W.U → ⊥) → + (∀V. ⬆[l, m] V ≡ W → ⊥) ∨ (∀T. ⬆[l, m] T ≡ U → ⊥). +#I #W #U #l #m #H elim (is_lift_dec W l m) +[ * /4 width=2 by lift_flat, or_intror/ +| /4 width=2 by ex_intro, or_introl/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_vector.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_vector.ma new file mode 100644 index 000000000..cb80a68b3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lift_vector.ma @@ -0,0 +1,62 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/term_vector.ma". +include "basic_2A/substitution/lift.ma". + +(* BASIC TERM VECTOR RELOCATION *********************************************) + +inductive liftv (l,m:nat) : relation (list term) ≝ +| liftv_nil : liftv l m (◊) (◊) +| liftv_cons: ∀T1s,T2s,T1,T2. + ⬆[l, m] T1 ≡ T2 → liftv l m T1s T2s → + liftv l m (T1 @ T1s) (T2 @ T2s) +. + +interpretation "relocation (vector)" 'RLift l m T1s T2s = (liftv l m T1s T2s). + +(* Basic inversion lemmas ***************************************************) + +fact liftv_inv_nil1_aux: ∀T1s,T2s,l,m. ⬆[l, m] T1s ≡ T2s → T1s = ◊ → T2s = ◊. +#T1s #T2s #l #m * -T1s -T2s // +#T1s #T2s #T1 #T2 #_ #_ #H destruct +qed-. + +lemma liftv_inv_nil1: ∀T2s,l,m. ⬆[l, m] ◊ ≡ T2s → T2s = ◊. +/2 width=5 by liftv_inv_nil1_aux/ qed-. + +fact liftv_inv_cons1_aux: ∀T1s,T2s,l,m. ⬆[l, m] T1s ≡ T2s → + ∀U1,U1s. T1s = U1 @ U1s → + ∃∃U2,U2s. ⬆[l, m] U1 ≡ U2 & ⬆[l, m] U1s ≡ U2s & + T2s = U2 @ U2s. +#T1s #T2s #l #m * -T1s -T2s +[ #U1 #U1s #H destruct +| #T1s #T2s #T1 #T2 #HT12 #HT12s #U1 #U1s #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma liftv_inv_cons1: ∀U1,U1s,T2s,l,m. ⬆[l, m] U1 @ U1s ≡ T2s → + ∃∃U2,U2s. ⬆[l, m] U1 ≡ U2 & ⬆[l, m] U1s ≡ U2s & + T2s = U2 @ U2s. +/2 width=3 by liftv_inv_cons1_aux/ qed-. + +(* Basic properties *********************************************************) + +lemma liftv_total: ∀l,m. ∀T1s:list term. ∃T2s. ⬆[l, m] T1s ≡ T2s. +#l #m #T1s elim T1s -T1s +[ /2 width=2 by liftv_nil, ex_intro/ +| #T1 #T1s * #T2s #HT12s + elim (lift_total T1 l m) /3 width=2 by liftv_cons, ex_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn.ma new file mode 100644 index 000000000..18adaacdf --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn.ma @@ -0,0 +1,89 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/grammar/lenv_length.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +inductive lpx_sn (R:relation3 lenv term term): relation lenv ≝ +| lpx_sn_atom: lpx_sn R (⋆) (⋆) +| lpx_sn_pair: ∀I,K1,K2,V1,V2. + lpx_sn R K1 K2 → R K1 V1 V2 → + lpx_sn R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2) +. + +(* Basic properties *********************************************************) + +lemma lpx_sn_refl: ∀R. (∀L. reflexive ? (R L)) → reflexive … (lpx_sn R). +#R #HR #L elim L -L /2 width=1 by lpx_sn_atom, lpx_sn_pair/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lpx_sn_inv_atom1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L1 = ⋆ → L2 = ⋆. +#R #L1 #L2 * -L1 -L2 +[ // +| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct +] +qed-. + +lemma lpx_sn_inv_atom1: ∀R,L2. lpx_sn R (⋆) L2 → L2 = ⋆. +/2 width=4 by lpx_sn_inv_atom1_aux/ qed-. + +fact lpx_sn_inv_pair1_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K1,V1. L1 = K1. ⓑ{I} V1 → + ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +#R #L1 #L2 * -L1 -L2 +[ #J #K1 #V1 #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lpx_sn_inv_pair1: ∀R,I,K1,V1,L2. lpx_sn R (K1. ⓑ{I} V1) L2 → + ∃∃K2,V2. lpx_sn R K1 K2 & R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +/2 width=3 by lpx_sn_inv_pair1_aux/ qed-. + +fact lpx_sn_inv_atom2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → L2 = ⋆ → L1 = ⋆. +#R #L1 #L2 * -L1 -L2 +[ // +| #I #K1 #K2 #V1 #V2 #_ #_ #H destruct +] +qed-. + +lemma lpx_sn_inv_atom2: ∀R,L1. lpx_sn R L1 (⋆) → L1 = ⋆. +/2 width=4 by lpx_sn_inv_atom2_aux/ qed-. + +fact lpx_sn_inv_pair2_aux: ∀R,L1,L2. lpx_sn R L1 L2 → ∀I,K2,V2. L2 = K2. ⓑ{I} V2 → + ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1. +#R #L1 #L2 * -L1 -L2 +[ #J #K2 #V2 #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma lpx_sn_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn R L1 (K2. ⓑ{I} V2) → + ∃∃K1,V1. lpx_sn R K1 K2 & R K1 V1 V2 & L1 = K1. ⓑ{I} V1. +/2 width=3 by lpx_sn_inv_pair2_aux/ qed-. + +lemma lpx_sn_inv_pair: ∀R,I1,I2,L1,L2,V1,V2. + lpx_sn R (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) → + ∧∧ lpx_sn R L1 L2 & R L1 V1 V2 & I1 = I2. +#R #I1 #I2 #L1 #L2 #V1 #V2 #H elim (lpx_sn_inv_pair1 … H) -H +#L0 #V0 #HL10 #HV10 #H destruct /2 width=1 by and3_intro/ +qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lpx_sn_fwd_length: ∀R,L1,L2. lpx_sn R L1 L2 → |L1| = |L2|. +#R #L1 #L2 #H elim H -L1 -L2 normalize // +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_alt.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_alt.ma new file mode 100644 index 000000000..94c112b18 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_alt.ma @@ -0,0 +1,125 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop.ma". +include "basic_2A/substitution/lpx_sn.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +(* alternative definition of lpx_sn *) +definition lpx_sn_alt: relation3 lenv term term → relation lenv ≝ + λR,L1,L2. |L1| = |L2| ∧ + (∀I1,I2,K1,K2,V1,V2,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2 + ). + +(* Basic forward lemmas ******************************************************) + +lemma lpx_sn_alt_fwd_length: ∀R,L1,L2. lpx_sn_alt R L1 L2 → |L1| = |L2|. +#R #L1 #L2 #H elim H // +qed-. + +(* Basic inversion lemmas ***************************************************) + +lemma lpx_sn_alt_inv_atom1: ∀R,L2. lpx_sn_alt R (⋆) L2 → L2 = ⋆. +#R #L2 #H lapply (lpx_sn_alt_fwd_length … H) -H +normalize /2 width=1 by length_inv_zero_sn/ +qed-. + +lemma lpx_sn_alt_inv_pair1: ∀R,I,L2,K1,V1. lpx_sn_alt R (K1.ⓑ{I}V1) L2 → + ∃∃K2,V2. lpx_sn_alt R K1 K2 & R K1 V1 V2 & L2 = K2.ⓑ{I}V2. +#R #I1 #L2 #K1 #V1 #H elim H -H +#H #IH elim (length_inv_pos_sn … H) -H +#I2 #K2 #V2 #HK12 #H destruct +elim (IH I1 I2 K1 K2 V1 V2 0) // +#H #HV12 destruct @(ex3_2_intro … K2 V2) // -HV12 +@conj // -HK12 +#J1 #J2 #L1 #L2 #W1 #W2 #i #HKL1 #HKL2 elim (IH J1 J2 L1 L2 W1 W2 (i+1)) -IH +/2 width=1 by drop_drop, conj/ +qed-. + +lemma lpx_sn_alt_inv_atom2: ∀R,L1. lpx_sn_alt R L1 (⋆) → L1 = ⋆. +#R #L1 #H lapply (lpx_sn_alt_fwd_length … H) -H +normalize /2 width=1 by length_inv_zero_dx/ +qed-. + +lemma lpx_sn_alt_inv_pair2: ∀R,I,L1,K2,V2. lpx_sn_alt R L1 (K2.ⓑ{I}V2) → + ∃∃K1,V1. lpx_sn_alt R K1 K2 & R K1 V1 V2 & L1 = K1.ⓑ{I}V1. +#R #I2 #L1 #K2 #V2 #H elim H -H +#H #IH elim (length_inv_pos_dx … H) -H +#I1 #K1 #V1 #HK12 #H destruct +elim (IH I1 I2 K1 K2 V1 V2 0) // +#H #HV12 destruct @(ex3_2_intro … K1 V1) // -HV12 +@conj // -HK12 +#J1 #J2 #L1 #L2 #W1 #W2 #i #HKL1 #HKL2 elim (IH J1 J2 L1 L2 W1 W2 (i+1)) -IH +/2 width=1 by drop_drop, conj/ +qed-. + +(* Basic properties *********************************************************) + +lemma lpx_sn_alt_atom: ∀R. lpx_sn_alt R (⋆) (⋆). +#R @conj // +#I1 #I2 #K1 #K2 #V1 #V2 #i #HLK1 elim (drop_inv_atom1 … HLK1) -HLK1 +#H destruct +qed. + +lemma lpx_sn_alt_pair: ∀R,I,L1,L2,V1,V2. + lpx_sn_alt R L1 L2 → R L1 V1 V2 → + lpx_sn_alt R (L1.ⓑ{I}V1) (L2.ⓑ{I}V2). +#R #I #L1 #L2 #V1 #V2 #H #HV12 elim H -H +#HL12 #IH @conj normalize // +#I1 #I2 #K1 #K2 #W1 #W2 #i @(nat_ind_plus … i) -i +[ #HLK1 #HLK2 + lapply (drop_inv_O2 … HLK1) -HLK1 #H destruct + lapply (drop_inv_O2 … HLK2) -HLK2 #H destruct + /2 width=1 by conj/ +| -HL12 -HV12 /3 width=6 by drop_inv_drop1/ +] +qed. + +(* Main properties **********************************************************) + +theorem lpx_sn_lpx_sn_alt: ∀R,L1,L2. lpx_sn R L1 L2 → lpx_sn_alt R L1 L2. +#R #L1 #L2 #H elim H -L1 -L2 +/2 width=1 by lpx_sn_alt_atom, lpx_sn_alt_pair/ +qed. + +(* Main inversion lemmas ****************************************************) + +theorem lpx_sn_alt_inv_lpx_sn: ∀R,L1,L2. lpx_sn_alt R L1 L2 → lpx_sn R L1 L2. +#R #L1 elim L1 -L1 +[ #L2 #H lapply (lpx_sn_alt_inv_atom1 … H) -H // +| #L1 #I #V1 #IH #X #H elim (lpx_sn_alt_inv_pair1 … H) -H + #L2 #V2 #HL12 #HV12 #H destruct /3 width=1 by lpx_sn_pair/ +] +qed-. + +(* alternative definition of lpx_sn *****************************************) + +lemma lpx_sn_intro_alt: ∀R,L1,L2. |L1| = |L2| → + (∀I1,I2,K1,K2,V1,V2,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2 + ) → lpx_sn R L1 L2. +/4 width=4 by lpx_sn_alt_inv_lpx_sn, conj/ qed. + +lemma lpx_sn_inv_alt: ∀R,L1,L2. lpx_sn R L1 L2 → + |L1| = |L2| ∧ + ∀I1,I2,K1,K2,V1,V2,i. + ⬇[i] L1 ≡ K1.ⓑ{I1}V1 → ⬇[i] L2 ≡ K2.ⓑ{I2}V2 → + I1 = I2 ∧ R K1 V1 V2. +#R #L1 #L2 #H lapply (lpx_sn_lpx_sn_alt … H) -H +#H elim H -H /3 width=4 by conj/ +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_drop.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_drop.ma new file mode 100644 index 000000000..d97a5d324 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_drop.ma @@ -0,0 +1,104 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/drop_lreq.ma". +include "basic_2A/substitution/lpx_sn.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +(* Properties on dropping ****************************************************) + +lemma lpx_sn_drop_conf: ∀R,L1,L2. lpx_sn R L1 L2 → + ∀I,K1,V1,i. ⬇[i] L1 ≡ K1.ⓑ{I}V1 → + ∃∃K2,V2. ⬇[i] L2 ≡ K2.ⓑ{I}V2 & lpx_sn R K1 K2 & R K1 V1 V2. +#R #L1 #L2 #H elim H -L1 -L2 +[ #I0 #K0 #V0 #i #H elim (drop_inv_atom1 … H) -H #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #IHK12 #I0 #K0 #V0 #i #H elim (drop_inv_O1_pair1 … H) * -H + [ -IHK12 #H1 #H2 destruct /3 width=5 by drop_pair, ex3_2_intro/ + | -HK12 -HV12 #Hi #HK10 elim (IHK12 … HK10) -IHK12 -HK10 + /3 width=5 by drop_drop_lt, ex3_2_intro/ + ] +] +qed-. + +lemma lpx_sn_drop_trans: ∀R,L1,L2. lpx_sn R L1 L2 → + ∀I,K2,V2,i. ⬇[i] L2 ≡ K2.ⓑ{I}V2 → + ∃∃K1,V1. ⬇[i] L1 ≡ K1.ⓑ{I}V1 & lpx_sn R K1 K2 & R K1 V1 V2. +#R #L1 #L2 #H elim H -L1 -L2 +[ #I0 #K0 #V0 #i #H elim (drop_inv_atom1 … H) -H #H destruct +| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #IHK12 #I0 #K0 #V0 #i #H elim (drop_inv_O1_pair1 … H) * -H + [ -IHK12 #H1 #H2 destruct /3 width=5 by drop_pair, ex3_2_intro/ + | -HK12 -HV12 #Hi #HK10 elim (IHK12 … HK10) -IHK12 -HK10 + /3 width=5 by drop_drop_lt, ex3_2_intro/ + ] +] +qed-. + +lemma lpx_sn_deliftable_dropable: ∀R. d_deliftable_sn R → dropable_sn (lpx_sn R). +#R #HR #L1 #K1 #s #l #m #H elim H -L1 -K1 -l -m +[ #l #m #Hm #X #H >(lpx_sn_inv_atom1 … H) -H + /4 width=3 by drop_atom, lpx_sn_atom, ex2_intro/ +| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H + #L2 #V2 #HL12 #HV12 #H destruct + /3 width=5 by drop_pair, lpx_sn_pair, ex2_intro/ +| #I #L1 #K1 #V1 #m #_ #IHLK1 #X #H elim (lpx_sn_inv_pair1 … H) -H + #L2 #V2 #HL12 #HV12 #H destruct + elim (IHLK1 … HL12) -L1 /3 width=3 by drop_drop, ex2_intro/ +| #I #L1 #K1 #V1 #W1 #l #m #HLK1 #HWV1 #IHLK1 #X #H + elim (lpx_sn_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct + elim (HR … HV12 … HLK1 … HWV1) -V1 + elim (IHLK1 … HL12) -L1 /3 width=5 by drop_skip, lpx_sn_pair, ex2_intro/ +] +qed-. + +lemma lpx_sn_liftable_dedropable: ∀R. (∀L. reflexive ? (R L)) → + d_liftable R → dedropable_sn (lpx_sn R). +#R #H1R #H2R #L1 #K1 #s #l #m #H elim H -L1 -K1 -l -m +[ #l #m #Hm #X #H >(lpx_sn_inv_atom1 … H) -H + /4 width=4 by drop_atom, lpx_sn_atom, ex3_intro/ +| #I #K1 #V1 #X #H elim (lpx_sn_inv_pair1 … H) -H + #K2 #V2 #HK12 #HV12 #H destruct + lapply (lpx_sn_fwd_length … HK12) + #H @(ex3_intro … (K2.ⓑ{I}V2)) (**) (* explicit constructor *) + /3 width=1 by lpx_sn_pair, monotonic_le_plus_l/ + @lreq_O2 normalize // +| #I #L1 #K1 #V1 #m #_ #IHLK1 #K2 #HK12 elim (IHLK1 … HK12) -K1 + /3 width=5 by drop_drop, lreq_pair, lpx_sn_pair, ex3_intro/ +| #I #L1 #K1 #V1 #W1 #l #m #HLK1 #HWV1 #IHLK1 #X #H + elim (lpx_sn_inv_pair1 … H) -H #K2 #W2 #HK12 #HW12 #H destruct + elim (lift_total W2 l m) #V2 #HWV2 + lapply (H2R … HW12 … HLK1 … HWV1 … HWV2) -W1 + elim (IHLK1 … HK12) -K1 + /3 width=6 by drop_skip, lreq_succ, lpx_sn_pair, ex3_intro/ +] +qed-. + +fact lpx_sn_dropable_aux: ∀R,L2,K2,s,l,m. ⬇[s, l, m] L2 ≡ K2 → ∀L1. lpx_sn R L1 L2 → + l = 0 → ∃∃K1. ⬇[s, 0, m] L1 ≡ K1 & lpx_sn R K1 K2. +#R #L2 #K2 #s #l #m #H elim H -L2 -K2 -l -m +[ #l #m #Hm #X #H >(lpx_sn_inv_atom2 … H) -H + /4 width=3 by drop_atom, lpx_sn_atom, ex2_intro/ +| #I #K2 #V2 #X #H elim (lpx_sn_inv_pair2 … H) -H + #K1 #V1 #HK12 #HV12 #H destruct + /3 width=5 by drop_pair, lpx_sn_pair, ex2_intro/ +| #I #L2 #K2 #V2 #m #_ #IHLK2 #X #H #_ elim (lpx_sn_inv_pair2 … H) -H + #L1 #V1 #HL12 #HV12 #H destruct + elim (IHLK2 … HL12) -L2 /3 width=3 by drop_drop, ex2_intro/ +| #I #L2 #K2 #V2 #W2 #l #m #_ #_ #_ #L1 #_ + (lpx_sn_inv_atom1 … H1) -X1 + >(lpx_sn_inv_atom1 … H2) -X2 /2 width=3 by lpx_sn_atom, ex2_intro/ +| #L0 #I #V0 #Hx #X1 #H1 #X2 #H2 destruct + elim (lpx_sn_inv_pair1 … H1) -H1 #L1 #V1 #HL01 #HV01 #H destruct + elim (lpx_sn_inv_pair1 … H2) -H2 #L2 #V2 #HL02 #HV02 #H destruct + elim (IH … HL01 … HL02) -IH normalize // #L #HL1 #HL2 + elim (HR12 … HV01 … HV02 … HL01 … HL02) -L0 -V0 /3 width=5 by lpx_sn_pair, ex2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_tc.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_tc.ma new file mode 100644 index 000000000..61bcb500f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lpx_sn_tc.ma @@ -0,0 +1,119 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lpx_sn.ma". + +(* SN POINTWISE EXTENSION OF A CONTEXT-SENSITIVE REALTION FOR TERMS *********) + +(* Properties on transitive_closure *****************************************) + +lemma TC_lpx_sn_pair_refl: ∀R. (∀L. reflexive … (R L)) → + ∀L1,L2. TC … (lpx_sn R) L1 L2 → + ∀I,V. TC … (lpx_sn R) (L1. ⓑ{I} V) (L2. ⓑ{I} V). +#R #HR #L1 #L2 #H @(TC_star_ind … L2 H) -L2 +[ /2 width=1 by lpx_sn_refl/ +| /3 width=1 by TC_reflexive, lpx_sn_refl/ +| /3 width=5 by lpx_sn_pair, step/ +] +qed-. + +lemma TC_lpx_sn_pair: ∀R. (∀L. reflexive … (R L)) → + ∀I,L1,L2. TC … (lpx_sn R) L1 L2 → + ∀V1,V2. LTC … R L1 V1 V2 → + TC … (lpx_sn R) (L1. ⓑ{I} V1) (L2. ⓑ{I} V2). +#R #HR #I #L1 #L2 #HL12 #V1 #V2 #H @(TC_star_ind_dx … V1 H) -V1 // +[ /2 width=1 by TC_lpx_sn_pair_refl/ +| /4 width=3 by TC_strap, lpx_sn_pair, lpx_sn_refl/ +] +qed-. + +lemma lpx_sn_LTC_TC_lpx_sn: ∀R. (∀L. reflexive … (R L)) → + ∀L1,L2. lpx_sn (LTC … R) L1 L2 → + TC … (lpx_sn R) L1 L2. +#R #HR #L1 #L2 #H elim H -L1 -L2 +/2 width=1 by TC_lpx_sn_pair, lpx_sn_atom, inj/ +qed-. + +(* Inversion lemmas on transitive closure ***********************************) + +lemma TC_lpx_sn_inv_atom2: ∀R,L1. TC … (lpx_sn R) L1 (⋆) → L1 = ⋆. +#R #L1 #H @(TC_ind_dx … L1 H) -L1 +[ /2 width=2 by lpx_sn_inv_atom2/ +| #L1 #L #HL1 #_ #IHL2 destruct /2 width=2 by lpx_sn_inv_atom2/ +] +qed-. + +lemma TC_lpx_sn_inv_pair2: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀I,L1,K2,V2. TC … (lpx_sn R) L1 (K2.ⓑ{I}V2) → + ∃∃K1,V1. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L1 = K1. ⓑ{I} V1. +#R #HR #I #L1 #K2 #V2 #H @(TC_ind_dx … L1 H) -L1 +[ #L1 #H elim (lpx_sn_inv_pair2 … H) -H /3 width=5 by inj, ex3_2_intro/ +| #L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct + elim (lpx_sn_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct + lapply (HR … HV2 … HK1) -HR -HV2 /3 width=5 by TC_strap, ex3_2_intro/ +] +qed-. + +lemma TC_lpx_sn_ind: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀S:relation lenv. + S (⋆) (⋆) → ( + ∀I,K1,K2,V1,V2. + TC … (lpx_sn R) K1 K2 → LTC … R K1 V1 V2 → + S K1 K2 → S (K1.ⓑ{I}V1) (K2.ⓑ{I}V2) + ) → + ∀L2,L1. TC … (lpx_sn R) L1 L2 → S L1 L2. +#R #HR #S #IH1 #IH2 #L2 elim L2 -L2 +[ #X #H >(TC_lpx_sn_inv_atom2 … H) -X // +| #L2 #I #V2 #IHL2 #X #H + elim (TC_lpx_sn_inv_pair2 … H) // -H -HR + #L1 #V1 #HL12 #HV12 #H destruct /3 width=1 by/ +] +qed-. + +lemma TC_lpx_sn_inv_atom1: ∀R,L2. TC … (lpx_sn R) (⋆) L2 → L2 = ⋆. +#R #L2 #H elim H -L2 +[ /2 width=2 by lpx_sn_inv_atom1/ +| #L #L2 #_ #HL2 #IHL1 destruct /2 width=2 by lpx_sn_inv_atom1/ +] +qed-. + +fact TC_lpx_sn_inv_pair1_aux: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀L1,L2. TC … (lpx_sn R) L1 L2 → + ∀I,K1,V1. L1 = K1.ⓑ{I}V1 → + ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +#R #HR #L1 #L2 #H @(TC_lpx_sn_ind … H) // -HR -L1 -L2 +[ #J #K #W #H destruct +| #I #L1 #L2 #V1 #V2 #HL12 #HV12 #_ #J #K #W #H destruct /2 width=5 by ex3_2_intro/ +] +qed-. + +lemma TC_lpx_sn_inv_pair1: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀I,K1,L2,V1. TC … (lpx_sn R) (K1.ⓑ{I}V1) L2 → + ∃∃K2,V2. TC … (lpx_sn R) K1 K2 & LTC … R K1 V1 V2 & L2 = K2. ⓑ{I} V2. +/2 width=3 by TC_lpx_sn_inv_pair1_aux/ qed-. + +lemma TC_lpx_sn_inv_lpx_sn_LTC: ∀R. s_rs_transitive … R (λ_. lpx_sn R) → + ∀L1,L2. TC … (lpx_sn R) L1 L2 → + lpx_sn (LTC … R) L1 L2. +/3 width=4 by TC_lpx_sn_ind, lpx_sn_pair/ qed-. + +(* Forward lemmas on transitive closure *************************************) + +lemma TC_lpx_sn_fwd_length: ∀R,L1,L2. TC … (lpx_sn R) L1 L2 → |L1| = |L2|. +#R #L1 #L2 #H elim H -L2 +[ #L2 #HL12 >(lpx_sn_fwd_length … HL12) -HL12 // +| #L #L2 #_ #HL2 #IHL1 + >IHL1 -L1 >(lpx_sn_fwd_length … HL2) -HL2 // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby.ma new file mode 100644 index 000000000..0aab792f9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby.ma @@ -0,0 +1,237 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". +include "basic_2A/notation/relations/lrsubeq_4.ma". +include "basic_2A/substitution/drop.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************) + +inductive lsuby: relation4 ynat ynat lenv lenv ≝ +| lsuby_atom: ∀L,l,m. lsuby l m L (⋆) +| lsuby_zero: ∀I1,I2,L1,L2,V1,V2. + lsuby 0 0 L1 L2 → lsuby 0 0 (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) +| lsuby_pair: ∀I1,I2,L1,L2,V,m. lsuby 0 m L1 L2 → + lsuby 0 (⫯m) (L1.ⓑ{I1}V) (L2.ⓑ{I2}V) +| lsuby_succ: ∀I1,I2,L1,L2,V1,V2,l,m. + lsuby l m L1 L2 → lsuby (⫯l) m (L1.ⓑ{I1}V1) (L2.ⓑ{I2}V2) +. + +interpretation + "local environment refinement (extended substitution)" + 'LRSubEq L1 l m L2 = (lsuby l m L1 L2). + +(* Basic properties *********************************************************) + +lemma lsuby_pair_lt: ∀I1,I2,L1,L2,V,m. L1 ⊆[0, ⫰m] L2 → 0 < m → + L1.ⓑ{I1}V ⊆[0, m] L2.ⓑ{I2}V. +#I1 #I2 #L1 #L2 #V #m #HL12 #Hm <(ylt_inv_O1 … Hm) /2 width=1 by lsuby_pair/ +qed. + +lemma lsuby_succ_lt: ∀I1,I2,L1,L2,V1,V2,l,m. L1 ⊆[⫰l, m] L2 → 0 < l → + L1.ⓑ{I1}V1 ⊆[l, m] L2. ⓑ{I2}V2. +#I1 #I2 #L1 #L2 #V1 #V2 #l #m #HL12 #Hl <(ylt_inv_O1 … Hl) /2 width=1 by lsuby_succ/ +qed. + +lemma lsuby_pair_O_Y: ∀L1,L2. L1 ⊆[0, ∞] L2 → + ∀I1,I2,V. L1.ⓑ{I1}V ⊆[0,∞] L2.ⓑ{I2}V. +#L1 #L2 #HL12 #I1 #I2 #V lapply (lsuby_pair I1 I2 … V … HL12) -HL12 // +qed. + +lemma lsuby_refl: ∀L,l,m. L ⊆[l, m] L. +#L elim L -L // +#L #I #V #IHL #l elim (ynat_cases … l) [| * #x ] +#Hl destruct /2 width=1 by lsuby_succ/ +#m elim (ynat_cases … m) [| * #x ] +#Hm destruct /2 width=1 by lsuby_zero, lsuby_pair/ +qed. + +lemma lsuby_O2: ∀L2,L1,l. |L2| ≤ |L1| → L1 ⊆[l, yinj 0] L2. +#L2 elim L2 -L2 // #L2 #I2 #V2 #IHL2 * normalize +[ #l #H elim (le_plus_xSy_O_false … H) +| #L1 #I1 #V1 #l #H lapply (le_plus_to_le_r … H) -H #HL12 + elim (ynat_cases l) /3 width=1 by lsuby_zero/ + * /3 width=1 by lsuby_succ/ +] +qed. + +lemma lsuby_sym: ∀l,m,L1,L2. L1 ⊆[l, m] L2 → |L1| = |L2| → L2 ⊆[l, m] L1. +#l #m #L1 #L2 #H elim H -l -m -L1 -L2 +[ #L1 #l #m #H >(length_inv_zero_dx … H) -L1 // +| /2 width=1 by lsuby_O2/ +| #I1 #I2 #L1 #L2 #V #m #_ #IHL12 #H lapply (injective_plus_l … H) + /3 width=1 by lsuby_pair/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #IHL12 #H lapply (injective_plus_l … H) + /3 width=1 by lsuby_succ/ +] +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact lsuby_inv_atom1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → L1 = ⋆ → L2 = ⋆. +#L1 #L2 #l #m * -L1 -L2 -l -m // +[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #H destruct +| #I1 #I2 #L1 #L2 #V #m #_ #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #H destruct +] +qed-. + +lemma lsuby_inv_atom1: ∀L2,l,m. ⋆ ⊆[l, m] L2 → L2 = ⋆. +/2 width=5 by lsuby_inv_atom1_aux/ qed-. + +fact lsuby_inv_zero1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → l = 0 → m = 0 → + L2 = ⋆ ∨ + ∃∃J2,K2,W2. K1 ⊆[0, 0] K2 & L2 = K2.ⓑ{J2}W2. +#L1 #L2 #l #m * -L1 -L2 -l -m /2 width=1 by or_introl/ +[ #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J1 #K1 #W1 #H #_ #_ destruct + /3 width=5 by ex2_3_intro, or_intror/ +| #I1 #I2 #L1 #L2 #V #m #_ #J1 #K1 #W1 #_ #_ #H + elim (ysucc_inv_O_dx … H) +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J1 #K1 #W1 #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_zero1: ∀I1,K1,L2,V1. K1.ⓑ{I1}V1 ⊆[0, 0] L2 → + L2 = ⋆ ∨ + ∃∃I2,K2,V2. K1 ⊆[0, 0] K2 & L2 = K2.ⓑ{I2}V2. +/2 width=9 by lsuby_inv_zero1_aux/ qed-. + +fact lsuby_inv_pair1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J1,K1,W. L1 = K1.ⓑ{J1}W → l = 0 → 0 < m → + L2 = ⋆ ∨ + ∃∃J2,K2. K1 ⊆[0, ⫰m] K2 & L2 = K2.ⓑ{J2}W. +#L1 #L2 #l #m * -L1 -L2 -l -m /2 width=1 by or_introl/ +[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W #_ #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #HL12 #J1 #K1 #W #H #_ #_ destruct + /3 width=4 by ex2_2_intro, or_intror/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J1 #K1 #W #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_pair1: ∀I1,K1,L2,V,m. K1.ⓑ{I1}V ⊆[0, m] L2 → 0 < m → + L2 = ⋆ ∨ + ∃∃I2,K2. K1 ⊆[0, ⫰m] K2 & L2 = K2.ⓑ{I2}V. +/2 width=6 by lsuby_inv_pair1_aux/ qed-. + +fact lsuby_inv_succ1_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J1,K1,W1. L1 = K1.ⓑ{J1}W1 → 0 < l → + L2 = ⋆ ∨ + ∃∃J2,K2,W2. K1 ⊆[⫰l, m] K2 & L2 = K2.ⓑ{J2}W2. +#L1 #L2 #l #m * -L1 -L2 -l -m /2 width=1 by or_introl/ +[ #I1 #I2 #L1 #L2 #V1 #V2 #_ #J1 #K1 #W1 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #_ #J1 #K1 #W1 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #HL12 #J1 #K1 #W1 #H #_ destruct + /3 width=5 by ex2_3_intro, or_intror/ +] +qed-. + +lemma lsuby_inv_succ1: ∀I1,K1,L2,V1,l,m. K1.ⓑ{I1}V1 ⊆[l, m] L2 → 0 < l → + L2 = ⋆ ∨ + ∃∃I2,K2,V2. K1 ⊆[⫰l, m] K2 & L2 = K2.ⓑ{I2}V2. +/2 width=5 by lsuby_inv_succ1_aux/ qed-. + +fact lsuby_inv_zero2_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → l = 0 → m = 0 → + ∃∃J1,K1,W1. K1 ⊆[0, 0] K2 & L1 = K1.ⓑ{J1}W1. +#L1 #L2 #l #m * -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W1 #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #HL12 #J2 #K2 #W2 #H #_ #_ destruct + /2 width=5 by ex2_3_intro/ +| #I1 #I2 #L1 #L2 #V #m #_ #J2 #K2 #W2 #_ #_ #H + elim (ysucc_inv_O_dx … H) +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J2 #K2 #W2 #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_zero2: ∀I2,K2,L1,V2. L1 ⊆[0, 0] K2.ⓑ{I2}V2 → + ∃∃I1,K1,V1. K1 ⊆[0, 0] K2 & L1 = K1.ⓑ{I1}V1. +/2 width=9 by lsuby_inv_zero2_aux/ qed-. + +fact lsuby_inv_pair2_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J2,K2,W. L2 = K2.ⓑ{J2}W → l = 0 → 0 < m → + ∃∃J1,K1. K1 ⊆[0, ⫰m] K2 & L1 = K1.ⓑ{J1}W. +#L1 #L2 #l #m * -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W #_ #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #HL12 #J2 #K2 #W #H #_ #_ destruct + /2 width=4 by ex2_2_intro/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #J2 #K2 #W #_ #H + elim (ysucc_inv_O_dx … H) +] +qed-. + +lemma lsuby_inv_pair2: ∀I2,K2,L1,V,m. L1 ⊆[0, m] K2.ⓑ{I2}V → 0 < m → + ∃∃I1,K1. K1 ⊆[0, ⫰m] K2 & L1 = K1.ⓑ{I1}V. +/2 width=6 by lsuby_inv_pair2_aux/ qed-. + +fact lsuby_inv_succ2_aux: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀J2,K2,W2. L2 = K2.ⓑ{J2}W2 → 0 < l → + ∃∃J1,K1,W1. K1 ⊆[⫰l, m] K2 & L1 = K1.ⓑ{J1}W1. +#L1 #L2 #l #m * -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W2 #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #J2 #K2 #W2 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #_ #J2 #K1 #W2 #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #HL12 #J2 #K2 #W2 #H #_ destruct + /2 width=5 by ex2_3_intro/ +] +qed-. + +lemma lsuby_inv_succ2: ∀I2,K2,L1,V2,l,m. L1 ⊆[l, m] K2.ⓑ{I2}V2 → 0 < l → + ∃∃I1,K1,V1. K1 ⊆[⫰l, m] K2 & L1 = K1.ⓑ{I1}V1. +/2 width=5 by lsuby_inv_succ2_aux/ qed-. + +(* Basic forward lemmas *****************************************************) + +lemma lsuby_fwd_length: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → |L2| ≤ |L1|. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m normalize /2 width=1 by le_S_S/ +qed-. + +(* Properties on basic slicing **********************************************) + +lemma lsuby_drop_trans_be: ∀L1,L2,l,m. L1 ⊆[l, m] L2 → + ∀I2,K2,W,s,i. ⬇[s, 0, i] L2 ≡ K2.ⓑ{I2}W → + l ≤ i → i < l + m → + ∃∃I1,K1. K1 ⊆[0, ⫰(l+m-i)] K2 & ⬇[s, 0, i] L1 ≡ K1.ⓑ{I1}W. +#L1 #L2 #l #m #H elim H -L1 -L2 -l -m +[ #L1 #l #m #J2 #K2 #W #s #i #H + elim (drop_inv_atom1 … H) -H #H destruct +| #I1 #I2 #L1 #L2 #V1 #V2 #_ #_ #J2 #K2 #W #s #i #_ #_ #H + elim (ylt_yle_false … H) // +| #I1 #I2 #L1 #L2 #V #m #HL12 #IHL12 #J2 #K2 #W #s #i #H #_ >yplus_O1 + elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK1 [ -IHL12 | -HL12 ] + [ #_ destruct -I2 >ypred_succ + /2 width=4 by drop_pair, ex2_2_intro/ + | lapply (ylt_inv_O1 i ?) /2 width=1 by ylt_inj/ + #H yminus_succ yplus_succ1 #H lapply (ylt_inv_succ … H) -H + #Hilm lapply (drop_inv_drop1_lt … HLK2 ?) -HLK2 /2 width=1 by ylt_O/ + #HLK1 elim (IHL12 … HLK1) -IHL12 -HLK1 yminus_SO2 + /4 width=4 by ylt_O, drop_drop_lt, ex2_2_intro/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby_lsuby.ma b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby_lsuby.ma new file mode 100644 index 000000000..8e45e98c9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/substitution/lsuby_lsuby.ma @@ -0,0 +1,32 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/substitution/lsuby.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR EXTENDED SUBSTITUTION *******************) + +(* Main properties **********************************************************) + +theorem lsuby_trans: ∀l,m. Transitive … (lsuby l m). +#l #m #L1 #L2 #H elim H -L1 -L2 -l -m +[ #L1 #l #m #X #H lapply (lsuby_inv_atom1 … H) -H + #H destruct // +| #I1 #I2 #L1 #L #V1 #V #_ #IHL1 #X #H elim (lsuby_inv_zero1 … H) -H // + * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_zero/ +| #I1 #I2 #L1 #L2 #V #m #_ #IHL1 #X #H elim (lsuby_inv_pair1 … H) -H // + * #I2 #L2 #HL2 #H destruct /3 width=1 by lsuby_pair/ +| #I1 #I2 #L1 #L2 #V1 #V2 #l #m #_ #IHL1 #X #H elim (lsuby_inv_succ1 … H) -H // + * #I2 #L2 #V2 #HL2 #H destruct /3 width=1 by lsuby_succ/ +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas.ma b/matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas.ma new file mode 100644 index 000000000..20cce2f5c --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2A/unfold/lstas.ma @@ -0,0 +1,190 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2A/notation/relations/statictypestar_6.ma". +include "basic_2A/grammar/genv.ma". +include "basic_2A/substitution/drop.ma". +include "basic_2A/static/sh.ma". + +(* NAT-ITERATED STATIC TYPE ASSIGNMENT FOR TERMS ****************************) + +(* activate genv *) +inductive lstas (h): nat → relation4 genv lenv term term ≝ +| lstas_sort: ∀G,L,d,k. lstas h d G L (⋆k) (⋆((next h)^d k)) +| lstas_ldef: ∀G,L,K,V,W,U,i,d. ⬇[i] L ≡ K.ⓓV → lstas h d G K V W → + ⬆[0, i+1] W ≡ U → lstas h d G L (#i) U +| lstas_zero: ∀G,L,K,W,V,i. ⬇[i] L ≡ K.ⓛW → lstas h 0 G K W V → + lstas h 0 G L (#i) (#i) +| lstas_succ: ∀G,L,K,W,V,U,i,d. ⬇[i] L ≡ K.ⓛW → lstas h d G K W V → + ⬆[0, i+1] V ≡ U → lstas h (d+1) G L (#i) U +| lstas_bind: ∀a,I,G,L,V,T,U,d. lstas h d G (L.ⓑ{I}V) T U → + lstas h d G L (ⓑ{a,I}V.T) (ⓑ{a,I}V.U) +| lstas_appl: ∀G,L,V,T,U,d. lstas h d G L T U → lstas h d G L (ⓐV.T) (ⓐV.U) +| lstas_cast: ∀G,L,W,T,U,d. lstas h d G L T U → lstas h d G L (ⓝW.T) U +. + +interpretation "nat-iterated static type assignment (term)" + 'StaticTypeStar h G L d T U = (lstas h d G L T U). + +(* Basic inversion lemmas ***************************************************) + +fact lstas_inv_sort1_aux: ∀h,G,L,T,U,d. ⦃G, L⦄ ⊢ T •*[h, d] U → ∀k0. T = ⋆k0 → + U = ⋆((next h)^d k0). +#h #G #L #T #U #d * -G -L -T -U -d +[ #G #L #d #k #k0 #H destruct // +| #G #L #K #V #W #U #i #d #_ #_ #_ #k0 #H destruct +| #G #L #K #W #V #i #_ #_ #k0 #H destruct +| #G #L #K #W #V #U #i #d #_ #_ #_ #k0 #H destruct +| #a #I #G #L #V #T #U #d #_ #k0 #H destruct +| #G #L #V #T #U #d #_ #k0 #H destruct +| #G #L #W #T #U #d #_ #k0 #H destruct +qed-. + +(* Basic_1: was just: sty0_gen_sort *) +lemma lstas_inv_sort1: ∀h,G,L,X,k,d. ⦃G, L⦄ ⊢ ⋆k •*[h, d] X → X = ⋆((next h)^d k). +/2 width=5 by lstas_inv_sort1_aux/ +qed-. + +fact lstas_inv_lref1_aux: ∀h,G,L,T,U,d. ⦃G, L⦄ ⊢ T •*[h, d] U → ∀j. T = #j → ∨∨ + (∃∃K,V,W. ⬇[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, d] W & + ⬆[0, j+1] W ≡ U + ) | + (∃∃K,W,V. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & + U = #j & d = 0 + ) | + (∃∃K,W,V,d0. ⬇[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, d0] V & + ⬆[0, j+1] V ≡ U & d = d0+1 + ). +#h #G #L #T #U #d * -G -L -T -U -d +[ #G #L #d #k #j #H destruct +| #G #L #K #V #W #U #i #d #HLK #HVW #HWU #j #H destruct /3 width=6 by or3_intro0, ex3_3_intro/ +| #G #L #K #W #V #i #HLK #HWV #j #H destruct /3 width=5 by or3_intro1, ex4_3_intro/ +| #G #L #K #W #V #U #i #d #HLK #HWV #HWU #j #H destruct /3 width=8 by or3_intro2, ex4_4_intro/ +| #a #I #G #L #V #T #U #d #_ #j #H destruct +| #G #L #V #T #U #d #_ #j #H destruct +| #G #L #W #T #U #d #_ #j #H destruct +] +qed-. + +lemma lstas_inv_lref1: ∀h,G,L,X,i,d. ⦃G, L⦄ ⊢ #i •*[h, d] X → ∨∨ + (∃∃K,V,W. ⬇[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, d] W & + ⬆[0, i+1] W ≡ X + ) | + (∃∃K,W,V. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & + X = #i & d = 0 + ) | + (∃∃K,W,V,d0. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, d0] V & + ⬆[0, i+1] V ≡ X & d = d0+1 + ). +/2 width=3 by lstas_inv_lref1_aux/ +qed-. + +lemma lstas_inv_lref1_O: ∀h,G,L,X,i. ⦃G, L⦄ ⊢ #i •*[h, 0] X → + (∃∃K,V,W. ⬇[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, 0] W & + ⬆[0, i+1] W ≡ X + ) ∨ + (∃∃K,W,V. ⬇[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V & + X = #i + ). +#h #G #L #X #i #H elim (lstas_inv_lref1 … H) -H * /3 width=6 by ex3_3_intro, or_introl, or_intror/ +#K #W #V #d #_ #_ #_ (lift_inv_sort1 … H1) -X1 + >(lift_inv_sort1 … H2) -X2 // +| #G #L1 #K1 #V1 #W1 #W #i #d #HLK1 #_ #HW1 #IHVW1 #L2 #s #l #m #HL21 #X #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HW1 … HWU2) -W // #W2 #HW12 #HWU2 + elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=9 by lstas_ldef/ + | lapply (lift_trans_be … HW1 … HWU2 ? ?) -W /2 width=1 by le_S/ #HW1U2 + lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 /3 width=9 by lstas_ldef, drop_inv_gen/ + ] +| #G #L1 #K1 #V1 #W1 #i #HLK1 #_ #IHVW1 #L2 #s #l #m #HL21 #X #H #U2 #HWU2 + >(lift_mono … HWU2 … H) -U2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_total W1 (l-i-1) m) #W2 #HW12 + elim (drop_trans_le … HL21 … HLK1) -L1 /2 width=2 by lt_to_le/ #X #HLK2 #H + elim (drop_inv_skip2 … H) -H /2 width=1 by lt_plus_to_minus_r/ -Hil #K2 #V2 #HK21 #HV12 #H destruct + /3 width=10 by lstas_zero/ + | lapply (drop_trans_ge … HL21 … HLK1 ?) -L1 + /3 width=10 by lstas_zero, drop_inv_gen/ + ] +| #G #L1 #K1 #W1 #V1 #W #i #d #HLK1 #_ #HW1 #IHWV1 #L2 #s #l #m #HL21 #X #H #U2 #HWU2 + elim (lift_inv_lref1 … H) * #Hil #H destruct + [ elim (lift_trans_ge … HW1 … HWU2) -W // (lift_inv_sort2 … H) -X /2 width=3 by lstas_sort, lift_sort, ex2_intro/ +| #G #L2 #K2 #V2 #W2 #W #i #d #HLK2 #HVW2 #HW2 #IHVW2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HVW2 | -IHVW2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 // #K1 #V1 #HLK1 #HK21 #HV12 + elim (IHVW2 … HK21 … HV12) -K2 -V2 #W1 #HW12 #HVW1 + elim (lift_trans_le … HW12 … HW2) -W2 // >minus_plus minus_minus_m_m /3 width=8 by lstas_ldef, le_S, ex2_intro/ + ] +| #G #L2 #K2 #W2 #V2 #i #HLK2 #HWV2 #IHWV2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HWV2 | -IHWV2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 // #K1 #W1 #HLK1 #HK21 #HW12 + elim (IHWV2 … HK21 … HW12) -K2 + /3 width=5 by lstas_zero, lift_lref_lt, ex2_intro/ + | lapply (drop_conf_ge … HL21 … HLK2 ?) -L2 + /3 width=5 by lstas_zero, lift_lref_ge_minus, ex2_intro/ + ] +| #G #L2 #K2 #W2 #V2 #W #i #d #HLK2 #HWV2 #HW2 #IHWV2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_lref2 … H) * #Hil #H destruct [ -HWV2 | -IHWV2 ] + [ elim (drop_conf_lt … HL21 … HLK2) -L2 // #K1 #W1 #HLK1 #HK21 #HW12 + elim (IHWV2 … HK21 … HW12) -K2 #V1 #HV12 #HWV1 + elim (lift_trans_le … HV12 … HW2) -W2 // >minus_plus minus_minus_m_m /3 width=8 by lstas_succ, le_S, ex2_intro/ + ] +| #a #I #G #L2 #V2 #T2 #U2 #d #_ #IHTU2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_bind2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + elim (IHTU2 (L1.ⓑ{I}V1) … HT12) -IHTU2 -HT12 /3 width=5 by lstas_bind, drop_skip, lift_bind, ex2_intro/ +| #G #L2 #V2 #T2 #U2 #d #_ #IHTU2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #V1 #T1 #HV12 #HT12 #H destruct + elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=5 by lstas_appl, lift_flat, ex2_intro/ +| #G #L2 #W2 #T2 #U2 #d #_ #IHTU2 #L1 #s #l #m #HL21 #X #H + elim (lift_inv_flat2 … H) -H #W1 #T1 #_ #HT12 #H destruct + elim (IHTU2 … HL21 … HT12) -L2 -HT12 /3 width=3 by lstas_cast, ex2_intro/ +] +qed-. + +(* Advanced inversion lemmas ************************************************) + +lemma lstas_split_aux: ∀h,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, d] T2 → ∀d1,d2. d = d1 + d2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 •*[h, d1] T & ⦃G, L⦄ ⊢ T •*[h, d2] T2. +#h #G #L #T1 #T2 #d #H elim H -G -L -T1 -T2 -d +[ #G #L #d #k #d1 #d2 #H destruct + >commutative_plus >iter_plus /2 width=3 by lstas_sort, ex2_intro/ +| #G #L #K #V1 #V2 #U2 #i #d #HLK #_ #VU2 #IHV12 #d1 #d2 #H destruct + elim (IHV12 d1 d2) -IHV12 // #V + elim (lift_total V 0 (i+1)) + lapply (drop_fwd_drop2 … HLK) + /3 width=12 by lstas_lift, lstas_ldef, ex2_intro/ +| #G #L #K #W1 #W2 #i #HLK #HW12 #_ #d1 #d2 #H + elim (zero_eq_plus … H) -H #H1 #H2 destruct + /3 width=5 by lstas_zero, ex2_intro/ +| #G #L #K #W1 #W2 #U2 #i #d #HLK #HW12 #HWU2 #IHW12 #d1 @(nat_ind_plus … d1) -d1 + [ #d2 normalize #H destruct + elim (IHW12 0 d) -IHW12 // + lapply (drop_fwd_drop2 … HLK) + /3 width=8 by lstas_succ, lstas_zero, ex2_intro/ + | #d1 #_ #d2 (lstas_inv_sort1 … H) -X + (lstas_inv_sort1 … H) -X // +| #G #L #K #V #V1 #U1 #i #d #HLK #_ #HVU1 #IHV1 #X #H + elim (lstas_inv_lref1 … H) -H * + #K0 #V0 #W0 [3: #d0 ] #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct + #HVW0 #HX lapply (IHV1 … HVW0) -IHV1 -HVW0 #H destruct + /2 width=5 by lift_mono/ +| #G #L #K #W #W1 #i #HLK #_ #_ #X #H + elim (lstas_inv_lref1_O … H) -H * + #K0 #V0 #W0 #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct // +| #G #L #K #W #W1 #U1 #i #d #HLK #_ #HWU1 #IHWV #X #H + elim (lstas_inv_lref1_S … H) -H * #K0 #W0 #V0 #HLK0 + lapply (drop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct + #HW0 #HX lapply (IHWV … HW0) -IHWV -HW0 #H destruct + /2 width=5 by lift_mono/ +| #a #I #G #L #V #T #U1 #d #_ #IHTU1 #X #H + elim (lstas_inv_bind1 … H) -H #U2 #HTU2 #H destruct /3 width=1 by eq_f/ +| #G #L #V #T #U1 #d #_ #IHTU1 #X #H + elim (lstas_inv_appl1 … H) -H #U2 #HTU2 #H destruct /3 width=1 by eq_f/ +| #G #L #W #T #U1 #d #_ #IHTU1 #U2 #H + lapply (lstas_inv_cast1 … H) -H /2 width=1 by/ +] +qed-. + +(* Advanced inversion lemmas ************************************************) + +(* Basic_1: was just: sty0_correct *) +lemma lstas_correct: ∀h,G,L,T1,T,d1. ⦃G, L⦄ ⊢ T1 •*[h, d1] T → + ∀d2. ∃T2. ⦃G, L⦄ ⊢ T •*[h, d2] T2. +#h #G #L #T1 #T #d1 #H elim H -G -L -T1 -T -d1 +[ /2 width=2 by lstas_sort, ex_intro/ +| #G #L #K #V1 #V #U #i #d #HLK #_ #HVU #IHV1 #d2 + elim (IHV1 d2) -IHV1 #V2 + elim (lift_total V2 0 (i+1)) + lapply (drop_fwd_drop2 … HLK) -HLK + /3 width=11 by ex_intro, lstas_lift/ +| #G #L #K #W1 #W #i #HLK #HW1 #IHW1 #d2 + @(nat_ind_plus … d2) -d2 /3 width=5 by lstas_zero, ex_intro/ + #d2 #_ elim (IHW1 d2) -IHW1 #W2 #HW2 + lapply (lstas_trans … HW1 … HW2) -W + elim (lift_total W2 0 (i+1)) + /3 width=7 by lstas_succ, ex_intro/ +| #G #L #K #W1 #W #U #i #d #HLK #_ #HWU #IHW1 #d2 + elim (IHW1 d2) -IHW1 #W2 + elim (lift_total W2 0 (i+1)) + lapply (drop_fwd_drop2 … HLK) -HLK + /3 width=11 by ex_intro, lstas_lift/ +| #a #I #G #L #V #T #U #d #_ #IHTU #d2 + elim (IHTU d2) -IHTU /3 width=2 by lstas_bind, ex_intro/ +| #G #L #V #T #U #d #_ #IHTU #d2 + elim (IHTU d2) -IHTU /3 width=2 by lstas_appl, ex_intro/ +| #G #L #W #T #U #d #_ #IHTU #d2 + elim (IHTU d2) -IHTU /2 width=2 by ex_intro/ +] +qed-. + +(* more main properties *****************************************************) + +theorem lstas_conf_le: ∀h,G,L,T,U1,d1. ⦃G, L⦄ ⊢ T •*[h, d1] U1 → + ∀U2,d2. d1 ≤ d2 → ⦃G, L⦄ ⊢ T •*[h, d2] U2 → + ⦃G, L⦄ ⊢ U1 •*[h, d2-d1] U2. +#h #G #L #T #U1 #d1 #HTU1 #U2 #d2 #Hd12 +>(plus_minus_m_m … Hd12) in ⊢ (%→?); -Hd12 >commutative_plus #H +elim (lstas_split … H) -H #U #HTU +>(lstas_mono … HTU … HTU1) -T // +qed-. + +theorem lstas_conf: ∀h,G,L,T0,T1,d1. ⦃G, L⦄ ⊢ T0 •*[h, d1] T1 → + ∀T2,d2. ⦃G, L⦄ ⊢ T0 •*[h, d2] T2 → + ∃∃T. ⦃G, L⦄ ⊢ T1 •*[h, d2] T & ⦃G, L⦄ ⊢ T2 •*[h, d1] T. +#h #G #L #T0 #T1 #d1 #HT01 #T2 #d2 #HT02 +elim (lstas_lstas … HT01 (d1+d2)) #T #HT0 +lapply (lstas_conf_le … HT01 … HT0) // -HT01 $@ diff --git a/matita/matita/contribs/lambdadelta/bin/a.ml b/matita/matita/contribs/lambdadelta/bin/a.ml new file mode 100644 index 000000000..4f310c873 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/a.ml @@ -0,0 +1,17 @@ +let f = "0123456789abcdef" + +let r, g, b = 1.0, 0.5, 0.0 + +let h = 1. /. 2. + +let mk_h x = x +. (1. -. x) *. h + +let rr, gg, bb = mk_h r, mk_h g, mk_h b + +let mk_f x = + let x = int_of_float x in + print_char f.[x / 16]; print_char f.[x mod 16] + +let _ = + mk_f (rr *. 255.); mk_f (gg *. 255.); mk_f (bb *. 255.); + print_newline () diff --git a/matita/matita/contribs/lambdadelta/bin/hls.ml b/matita/matita/contribs/lambdadelta/bin/hls.ml new file mode 100644 index 000000000..d796a4a66 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/hls.ml @@ -0,0 +1,57 @@ +let cols = + try int_of_string (Sys.getenv "COLUMNS") + with Not_found -> failwith "environment variable COLUMNS not visible" + +let hl = ref [] + +let normal = "\x1B[0m" + +let color = "\x1B[32m" + +let add s = + if s = "" then false else + begin hl := s :: !hl; true end + +let rec read ich = + if Scanf.fscanf ich "%s " add then read ich + +let length l s = max l (String.length s) + +let split s = +try + let i = String.rindex s '.' in + if i = 0 then s, "" else + String.sub s 0 i, String.sub s i (String.length s - i) +with Not_found -> s, "" + +let compare s1 s2 = + let n1, e1 = split s1 in + let n2, e2 = split s2 in + let e = String.compare e1 e2 in + if e = 0 then String.compare n1 n2 else e + +let write l c s = + let pre, post = if List.mem s !hl then color, normal else "", "" in + let spc = String.make (l - String.length s) ' ' in + let bol, ret = + if c = 0 || c = cols then "", l else + if c + l < cols then " ", c + succ l else "\n", l + in + Printf.printf "%s%s%s%s%s" bol pre s post spc; + ret + +let process fname = + let ich = open_in fname in + read ich; close_in ich + +let help = "" + +let main = + Arg.parse [] process help; + let files = Sys.readdir "." in + let l = Array.fold_left length 0 files in + if cols < l then failwith "window too small"; + Array.fast_sort compare files; + let c = Array.fold_left (write l) 0 files in + if 0 < c && c < cols then print_newline (); + diff --git a/matita/matita/contribs/lambdadelta/bin/index/Makefile b/matita/matita/contribs/lambdadelta/bin/index/Makefile new file mode 100644 index 000000000..faf88603f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/index/Makefile @@ -0,0 +1,10 @@ +EXECS = index + +REQUIRES = unix + +include ../Makefile.common + +test: +# @$(MAKE) --no-print-directory -C ../../ www + +.PHONY: test diff --git a/matita/matita/contribs/lambdadelta/bin/index/index.ml b/matita/matita/contribs/lambdadelta/bin/index/index.ml new file mode 100644 index 000000000..9496cc7d2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/index/index.ml @@ -0,0 +1,123 @@ +module KF = Filename +module KP = Printf +module KU = Unix + +type status = { +(* base directory *) + bd: string; +(* input prefix *) + ip: string; +(* output prefix *) + op: string; +(* current path *) + cp: string list +} + +let initial_status = { + bd = ""; ip = ""; op = ""; + cp = []; +} + +let imp_st = ref initial_status + +let i_ext = ".ld.ldw.xml" +let o_ext = ".ld.html" + +let concats l = + List.fold_left KF.concat "" l + +let concat st dname = {st with + ip = KF.concat st.ip dname; op = KF.concat st.op dname; +} + +let normalize dname = + if dname = KF.current_dir_name then "" else dname + +let mk_rlink s_to s_body = + KP.sprintf "%s" s_to s_body + +let out_entry st dname och dirs name = + let iname = concats [st.bd; st.ip; dname; name] in + let stats = KU.lstat iname in + match stats.KU.st_kind with + | KU.S_REG when KF.check_suffix name i_ext -> + let base = KF.chop_suffix name i_ext in + let oname = concats [st.bd; st.op; dname; base^o_ext] in + KP.fprintf och " \n" oname base; + dirs + | KU.S_DIR -> + let oname = concats [st.bd; st.op; dname; name] in + KP.fprintf och " \n" oname name; + name :: dirs + | _ -> + dirs + +let mk_path st och = + let path = String.concat "/" (List.rev st.cp) in + KP.fprintf och " Contents of %s/\n" path + +let list_dir st dname och = + let iname = concats [st.bd; st.ip; dname] in + let dir = Sys.readdir iname in + Array.sort String.compare dir; + KP.fprintf och " \n"; + let dirs = Array.fold_left (out_entry st dname och) [] dir in + KP.fprintf och " \n"; + dirs + +let out_index st dname och = + KP.fprintf och "\n\n"; + KP.fprintf och "\n"; + KP.fprintf och " \n"; + KP.fprintf och " Index\n"; + KP.fprintf och " \n"; + mk_path st och; + KP.fprintf och " \n"; + KP.fprintf och " \n"; + let dirs = list_dir st dname och in + KP.fprintf och " \n"; + KP.fprintf och "
\n"; + KP.fprintf och "
\n"; + dirs + +let rec out_dir st dname = + let s_to, s_body = + if dname = "" + then concats [st.bd; st.op], "ld:" + else concats [st.bd; st.op; dname], dname + in + let st = {st with cp = mk_rlink s_to s_body :: st.cp} in + let oname = concats [st.bd; st.ip; dname; "index.ldw.xml"] in + let och = open_out oname in + let dirs = out_index st dname och in + close_out och; + let map st = out_dir (concat st dname) in + List.iter (map st) dirs + +let help_b = " Set this base directory" +let help_i = " Set this input prefix" +let help_o = " Set this output prefix" +let help = "Usage: index [ -bio | ]*" + +let set_b bd = + imp_st := {!imp_st with bd = normalize bd} + +let set_i ip = + imp_st := {!imp_st with ip = normalize ip} + +let set_o op = + imp_st := {!imp_st with op = normalize op} + +let process dname = + out_dir !imp_st (normalize dname) + +let main = + Arg.parse [ + "-b", Arg.String set_b, help_b; + "-i", Arg.String set_i, help_i; + "-o", Arg.String set_o, help_o; + ] process help diff --git a/matita/matita/contribs/lambdadelta/bin/inline/Makefile b/matita/matita/contribs/lambdadelta/bin/inline/Makefile new file mode 100644 index 000000000..60ad8b773 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/inline/Makefile @@ -0,0 +1,12 @@ +EXECS = inline + +REQUIRES = + +include ../Makefile.common + +test: + @./inline.native -p ../lambdadelta/*/deps.txt > deps.txt + @../matitadep/matitadep.native -c ../lambdadelta/.depend deps.txt > redundant.txt + @./inline.native -i -b ../lambdadelta redundant.txt ../lambdadelta/*/deps.txt + +.PHONY: test diff --git a/matita/matita/contribs/lambdadelta/bin/inline/inline.ml b/matita/matita/contribs/lambdadelta/bin/inline/inline.ml new file mode 100644 index 000000000..905f7ec4d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/inline/inline.ml @@ -0,0 +1,162 @@ +module Deps = Set.Make(String) +module Table = Map.Make(String) + +let opt_map f = function + | None -> None + | Some a -> Some (f a) + +let rec filename_split l s = + let dir, base = Filename.dirname s, Filename.basename s in + if dir = Filename.current_dir_name then base::l else filename_split (base::l) dir + +let filename_concat l = + String.concat Filename.dir_sep l + +let relative s = + match filename_split [] s with + | "cic:" :: "matita" :: "lambdadelta" :: tl -> List.rev tl + | _ -> [] + +let to_string l = + filename_concat (List.rev l) + +let table = ref (Table.empty: Deps.t Table.t) + +let add src dep = + let deps = match Table.find_opt src !table with + | None -> Deps.singleton dep + | Some deps -> Deps.add dep deps + in + table := Table.add src deps !table + +let split_or s = + let map m = Printf.sprintf "or_%u" m in + try Scanf.sscanf s "or%u" map + with Scanf.Scan_failure _ | End_of_file -> "" + +let split_and s = + let map m = Printf.sprintf "and_%u" m in + try Scanf.sscanf s "and%u" map + with Scanf.Scan_failure _ | End_of_file -> "" + +let split_ex s = + let map m n = Printf.sprintf "ex_%u_%u" m n in + try Scanf.sscanf s "ex%u=%u" map + with Scanf.Scan_failure _ | End_of_file -> "" + +let split_ex1 s = + let map m = Printf.sprintf "ex_%u_1" m in + try Scanf.sscanf s "ex%u" map + with Scanf.Scan_failure _ | End_of_file -> "" + +let map_deps s1 s2 = + match relative s2 with + | [b2;"xoa";"xoa";"ground_2"] -> + let r1 = List.tl (relative s1) in + let r1 = to_string r1 in + let b2 = Filename.remove_extension b2 in +(* '_' is accepted (and ignored) within integer literals *) + let b2 = String.concat "=" (String.split_on_char '_' b2) in + let r2 = + let cx = split_ex b2 in + let cy = split_ex1 b2 in + let ca = split_and b2 in + let co = split_or b2 in + if cx <> "" then cx else + if cy <> "" then cy else + if ca <> "" then ca else + if co <> "" then co else + failwith (Printf.sprintf "unrecognized xoa: %S\n" b2) + in + if r1 <> "ground_2/xoa/xoa" then add r1 r2 + | _ -> () + +let reds = ref [] + +let map_reds s1 s2 = + reds := (s1,s2) :: !reds + +let rec read map_deps map_reds ich = + let line = input_line ich in + begin try Scanf.sscanf line "%S: %S" map_deps + with Scanf.Scan_failure _ | End_of_file -> + begin try Scanf.sscanf line "%S: redundant %S" map_reds + with Scanf.Scan_failure _ | End_of_file -> + Printf.eprintf "unknown line: %s.\n" line + end + end; + read map_deps map_reds ich + +let xoadir = ref "ground_2/xoa" + +let print_deps () = + let map_d src dep = + let src = src^".ma" in + let dep = Filename.concat !xoadir (dep^".ma") in + if List.mem (src,dep) !reds then () + else Printf.printf "%S: %S\n" src dep + in + let map_t src deps = + Deps.iter (map_d src) deps + in + Table.iter map_t !table + +let rec copy xn ich och = + if xn = Some 0 then () + else begin + Printf.fprintf och "%s\n" (input_line ich); + copy (opt_map pred xn) ich och + end + +let base_dir = ref "" + +let preamble = ref 14 + +let insert_deps () = + let map_d src dep rdeps = + let dep = Filename.concat !xoadir (dep^".ma") in + if List.mem (src,dep) !reds then rdeps else dep::rdeps + in + let map_r och rdep = + Printf.fprintf och "include %S.\n" rdep; + in + let map_t src deps = + let src = src^".ma" in + let rdeps = Deps.fold (map_d src) deps [] in + if rdeps <> [] then begin + let ma = Filename.concat !base_dir src in + let old = ma^".old" in + Sys.rename ma old; + let och = open_out ma in + let ich = open_in old in + copy (Some !preamble) ich och; + List.iter (map_r och) (List.rev rdeps); + try copy None ich och + with End_of_file -> close_in ich; close_out och + end + in + Table.iter map_t !table + +let process fname = + let ich = open_in fname in + try read map_deps map_reds ich with + | End_of_file -> close_in ich + +let help_b = " Set this base directory (default: current directory)" +let help_i = " Insert the dependences (default: no)" +let help_l = " .ma preamble has theese lines (default: 14)" +let help_p = " Print the dependences to be inserted (default: no)" +let help = "inline [ -ip | -b | -l | ]*" + +let print = ref false +let insert = ref false + +let _ = + Arg.parse [ + "-b", Arg.String ((:=) base_dir), help_b; + "-l", Arg.Int ((:=) preamble), help_l; + "-i", Arg.Set insert, help_i; + "-p", Arg.Set print, help_p; + ] process help; + if !print then print_deps (); + if !insert then insert_deps () diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/Makefile b/matita/matita/contribs/lambdadelta/bin/xhtbl/Makefile new file mode 100644 index 000000000..c56f2d8d7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/Makefile @@ -0,0 +1,10 @@ +EXECS = xhtbl + +REQUIRES = str + +include ../Makefile.common + +test: + @$(MAKE) --no-print-directory -C ../../ www + +.PHONY: test diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/attr.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/attr.ml new file mode 100644 index 000000000..36b3d0003 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/attr.ml @@ -0,0 +1,20 @@ +module L = List + +module T = Table + +(* true for a row specification *) +type 'a atom = 'a * bool * int option * int option + +type 'a atoms = 'a atom list + +let get_attr concat null a y x = + let map y x (c, b, x1, x2) = match b, x1, x2 with + | _ , None, None -> c + | false, None, Some c2 -> if x <= c2 then c else null + | false, Some c1, None -> if x >= c1 then c else null + | false, Some c1, Some c2 -> if x >= c1 && x <= c2 then c else null + | true , None, Some r2 -> if y <= r2 then c else null + | true , Some r1, None -> if y >= r1 then c else null + | true , Some r1, Some r2 -> if y >= r1 && y <= r2 then c else null + in + concat (L.map (map y x) a) diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/fold.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/fold.ml new file mode 100644 index 000000000..752b06d77 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/fold.ml @@ -0,0 +1,25 @@ +module T = Table + +type 'a fold_cb = { + open_table : 'a -> T.table -> 'a; + close_table: 'a -> T.table -> 'a; + map_key : 'a -> T.key -> 'a; + open_line : bool -> 'a -> 'a; + close_line : bool -> 'a -> 'a; + open_entry : bool -> 'a -> 'a; + close_entry: bool -> 'a -> 'a -> 'a; +} + +let map h g f a b = h a (g (f a) b) + +let rec fold_table cb a t = + let a = cb.open_table a t in + let a = fold_entry cb a t.T.te in + cb.close_table a t + +and fold_entry cb a = function + | T.Key k -> cb.map_key a k + | T.Line (r, ts) -> + let a = cb.open_line r a in + let a = List.fold_left (map (cb.close_entry r) (fold_table cb) (cb.open_entry r)) a ts in + cb.close_line r a diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/matrix.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/matrix.ml new file mode 100644 index 000000000..1c65c5004 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/matrix.ml @@ -0,0 +1,63 @@ +module A = Array +module N = Filename + +module T = Table + +type cell = { + ck: T.text list; (* contents *) + cc: T.css; (* css classes *) + cu: T.uri; (* uri *) + cx: T.ext; (* extension *) + cn: T.anchor; (* named anchor *) + cb: T.border; (* border *) +} + +type matrix = { + r: int; (* rows *) + c: int; (* columns *) + m: cell array array; (* matrix *) +} + +let strand a b = if a = "" then b else a + +let empty = { + ck = []; cc = []; cu = ""; cx = ""; cn = ""; cb = T.border false; +} + +let make ts = { + r = ts.T.rf; c = ts.T.cf; + m = A.make_matrix ts.T.rf ts.T.cf empty; +} + +let set_key m y x kl = + m.m.(y).(x) <- {m.m.(y).(x) with ck = kl} + +let set_attrs m y x c u e n = + m.m.(y).(x) <- {m.m.(y).(x) with + cc = c @ m.m.(y).(x).cc; + cu = u ^ m.m.(y).(x).cu; + cx = m.m.(y).(x).cx ^ e; + cn = strand m.m.(y).(x).cn n; + } + +let set_west m y x b = + let c = m.m.(y).(x) in + let cb = {c.cb with T.w = c.cb.T.w || b.T.w} in + m.m.(y).(x) <- {c with cb = cb} + +let set_north m y x b = + let c = m.m.(y).(x) in + let cb = {c.cb with T.n = c.cb.T.n || b.T.n} in + m.m.(y).(x) <- {c with cb = cb} + +let set_east m y x b = + if x < pred m.c then set_west m y (succ x) {b with T.w = b.T.e} else + let c = m.m.(y).(x) in + let cb = {c.cb with T.e = c.cb.T.e || b.T.e} in + m.m.(y).(x) <- {c with cb = cb} + +let set_south m y x b = + if y < pred m.r then set_north m (succ y) x {b with T.n = b.T.s} else + let c = m.m.(y).(x) in + let cb = {c.cb with T.s = c.cb.T.s || b.T.s} in + m.m.(y).(x) <- {c with cb = cb} diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/options.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/options.ml new file mode 100644 index 000000000..21ebec1d9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/options.ml @@ -0,0 +1,39 @@ +let output_dir_default = "" + +let baseuri_default = "" + +let debug_lexer_default = false + +let debug_pass_default = false + +let pass_default = false + +let output_dir = ref output_dir_default + +let baseuri = ref baseuri_default + +let debug_lexer = ref debug_lexer_default + +let d0 = ref debug_pass_default + +let d1 = ref debug_pass_default + +let d2 = ref debug_pass_default + +let e1 = ref debug_pass_default + +let e2 = ref debug_pass_default + +let p0 = ref pass_default + +let p1 = ref pass_default + +let p2 = ref pass_default + +let clear () = + output_dir := output_dir_default; + baseuri := baseuri_default; + debug_lexer := debug_lexer_default; + d0 := debug_pass_default; d1 := debug_pass_default; d2 := debug_pass_default; + e1 := debug_pass_default; e2 := debug_pass_default; + p0 := pass_default; p1 := pass_default; p2 := pass_default diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/pass1.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/pass1.ml new file mode 100644 index 000000000..bedd9619f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/pass1.ml @@ -0,0 +1,88 @@ +module L = List + +module T = Table +module F = Fold + +type status = { + ts: T.size; (* current dimensions *) + tc: T.css; (* current class *) + tu: T.uri; (* current uri *) + tx: T.ext; (* current extension *) +} + +let empty = { + ts = T.no_size; tc = []; tu = ""; tx = "" +} + +let init b ts = + if b then + {ts with T.ri = max_int; T.ci = 0} + else + {ts with T.ri = 0; T.ci = max_int} + +let combine b ts1 ts2 = + if b then + {ts1 with + T.rf = max ts1.T.rf ts2.T.rf; T.ri = min ts1.T.ri ts2.T.ri; + T.cf = ts1.T.cf + ts2.T.cf; T.ci = ts1.T.ci + ts2.T.ci; + } + else + {ts1 with + T.cf = max ts1.T.cf ts2.T.cf; T.ci = min ts1.T.ci ts2.T.ci; + T.rf = ts1.T.rf + ts2.T.rf; T.ri = ts1.T.ri + ts2.T.ri; + } + +let deinit ts = {ts with + T.ri = if ts.T.ri = max_int then 0 else ts.T.ri; + T.ci = if ts.T.ci = max_int then 0 else ts.T.ci; +} + +(****************************************************************************) + +let open_table st t = + t.T.tc <- t.T.tc @ st.tc; t.T.tu <- st.tu ^ t.T.tu; t.T.tx <- st.tx ^ t.T.tx; + {st with tc = t.T.tc; tu = t.T.tu; tx = t.T.tx} + +let close_table st t = + t.T.ts <- st.ts; st + +let map_key st k = + let ts = match k, st.ts.T.p with + | T.Text _ , _ -> + {st.ts with T.rf = 1; T.cf = 1; T.ri = 0; T.ci = 0} + | T.Glue None , _ -> + {st.ts with T.rf = 0; T.cf = 0; T.ri = 1; T.ci = 1} + | T.Glue Some g, Some false -> + {st.ts with T.rf = g; T.cf = 0; T.ri = 0; T.ci = 1} + | T.Glue Some g, Some true -> + {st.ts with T.rf = 0; T.cf = g; T.ri = 1; T.ci = 0} + | T.Glue Some g, None -> + {st.ts with T.rf = g; T.cf = g; T.ri = 0; T.ci = 0} + in + {st with ts = ts} + +let open_line b st = + let ts = init b st.ts in + let ts = {ts with T.rf = 0; T.cf = 0} in + {st with ts = ts} + +let open_entry b st = + let ts = {st.ts with T.p = Some b} in + {st with ts = ts} + +let close_entry b st sst = + {st with ts = combine b st.ts sst.ts} + +let close_line b st = + {st with ts = deinit st.ts} + +let cb = { + F.open_table = open_table; F.close_table = close_table; + F.open_line = open_line; F.close_line = close_line; + F.open_entry = open_entry; F.close_entry = close_entry; + F.map_key = map_key; +} + +let process t = + let st = F.fold_table cb empty t in + st.ts diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/pass2.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/pass2.ml new file mode 100644 index 000000000..549d7654e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/pass2.ml @@ -0,0 +1,139 @@ +module O = Options +module T = Table +module M = Matrix +module F = Fold + +type status = { + ts: T.size; (* current dimensions *) + tm: M.matrix; (* current matrix *) +} + +let initial t m = { + ts = {t.T.ts with T.ri = 0; T.ci = 0}; + tm = m; +} + +let resize b sts tts = + if b then begin (* parent is a row *) + if tts.T.rf < sts.T.rf && tts.T.ri = 0 then + failwith "underful column"; + {tts with T.rf = sts.T.rf; T.cf = tts.T.cf + sts.T.ci * tts.T.ci} + end else begin (* parent is a column *) + if tts.T.cf < sts.T.cf && tts.T.ci = 0 then + failwith "underful row"; + {tts with T.cf = sts.T.cf; T.rf = tts.T.rf + sts.T.ri * tts.T.ri} + end + +let fill b sts tts = + if b then (* parent is a row *) + {sts with T.ri = + let rf, ri = sts.T.rf - tts.T.rf, tts.T.ri in + if ri = 0 then 0 else + if rf mod ri = 0 then rf / ri else + failwith "fracted column" + } + else (* parent is a column *) + {sts with T.ci = + let cf, ci = sts.T.cf - tts.T.cf, tts.T.ci in + if ci = 0 then 0 else + if cf mod ci = 0 then cf / ci else + failwith "fracted row" + } + +let place b sts tts = + if b then (* parent is a row *) + {sts with T.x = sts.T.x + tts.T.cf} + else (* parent is a column *) + {sts with T.y = sts.T.y + tts.T.rf} + +let set_key st t = match t.T.te with + | T.Key (T.Text sl) -> M.set_key st.tm t.T.ts.T.y t.T.ts.T.x sl + | _ -> () + +let set_attrs st t = + let rec aux y x = + if y >= t.T.ts.T.rf then () else + if x >= t.T.ts.T.cf then aux (succ y) 0 else begin + M.set_attrs st.tm (t.T.ts.T.y + y) (t.T.ts.T.x + x) t.T.tc t.T.tu t.T.tx t.T.tn; + aux y (succ x) + end + in + match t.T.te with + | T.Key _ -> aux 0 0 + | _ -> () + +let set_borders st t = + let rec aux_we y = + if y >= t.T.ts.T.rf then () else begin + M.set_west st.tm (t.T.ts.T.y + y) t.T.ts.T.x t.T.tb; + if t.T.ts.T.cf > 0 then + M.set_east st.tm (t.T.ts.T.y + y) (t.T.ts.T.x + pred t.T.ts.T.cf) t.T.tb; + aux_we (succ y) + end + in + let rec aux_ns x = + if x >= t.T.ts.T.cf then () else begin + M.set_north st.tm t.T.ts.T.y (t.T.ts.T.x + x) t.T.tb; + if t.T.ts.T.rf > 0 then + M.set_south st.tm (t.T.ts.T.y + pred t.T.ts.T.rf) (t.T.ts.T.x + x) t.T.tb; + aux_ns (succ x) + end + in + match t.T.te with + | T.Line (true, _) -> aux_we 0; aux_ns 0 + | _ -> () + +let print st t = + if !O.e2 then + Printf.printf "#%u: (%u+%u, %u+%u) - (%u+%u, %u+%u)\n" + t.T.ti + t.T.ts.T.rf t.T.ts.T.ri + t.T.ts.T.cf t.T.ts.T.ci + st.ts.T.rf st.ts.T.ri + st.ts.T.cf st.ts.T.ci + +(****************************************************************************) + +let open_table st t = + print st t; + let ts = match t.T.ts.T.p with + | None -> + let ts = fill false st.ts t.T.ts in + let ts = fill true ts t.T.ts in + t.T.ts <- resize false st.ts t.T.ts; + t.T.ts <- resize true st.ts t.T.ts; + ts + | Some b -> + let ts = fill b st.ts t.T.ts in + t.T.ts <- resize b st.ts t.T.ts; + ts + in + t.T.ts <- {t.T.ts with T.ri = 0; T.ci = 0; T.x = st.ts.T.x; T.y = st.ts.T.y}; + let ts = {ts with T.rf = t.T.ts.T.rf; T.cf = t.T.ts.T.cf} in + let st = {st with ts = ts} in + print st t; st + +let close_table st t = + set_key st t; set_attrs st t; set_borders st t; st + +let map_key st k = st + +let open_line b st = st + +let open_entry b st = st + +let close_entry b st sst = + let ts = place b st.ts sst.ts in + {st with ts = ts} + +let close_line b st = st + +let cb = { + F.open_table = open_table; F.close_table = close_table; + F.open_line = open_line; F.close_line = close_line; + F.open_entry = open_entry; F.close_entry = close_entry; + F.map_key = map_key; +} + +let process t m = + let _ = F.fold_table cb (initial t m) t in () diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/pass3.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/pass3.ml new file mode 100644 index 000000000..d2455a30a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/pass3.ml @@ -0,0 +1,32 @@ +module L = List +module S = String +module V = Array + +module T = Table +module M = Matrix +module A = Attr + +type status = { + m: M.matrix; + c: T.css A.atoms; + u: T.uri A.atoms; + x: T.ext A.atoms; +} + +let initial c u x m = { + m = m; c = c; u = u; x = x +} + +let process_cell st y x c = + M.set_attrs st.m y x + (A.get_attr L.concat [] st.c y x) + (A.get_attr (S.concat "") "" st.u y x) + (A.get_attr (S.concat "") "" st.x y x) + "" + +let process_row st y row = + V.iteri (process_cell st y) row + +let process css uri ext matrix = + let st = initial css uri ext matrix in + V.iteri (process_row st) matrix.M.m diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/table.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/table.ml new file mode 100644 index 000000000..d3ee13bfa --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/table.ml @@ -0,0 +1,70 @@ +type css = string list + +type uri = string + +type ext = string + +type anchor = string + +type absolute = bool + +type size = { + y : int; (* first row *) + x : int; (* first column *) + rf: int; (* finite rows *) + cf: int; (* finite columns *) + ri: int; (* infinite rows *) + ci: int; (* infinite columns *) + p : bool option; (* parent kind *) +} + +type border = { + n: bool; (* north *) + s: bool; (* south *) + e: bool; (* east *) + w: bool; (* west *) +} + +type text = Plain of string + | Link of absolute * string * string + +type key = Text of text list + | Glue of int option + +type table = { + tn: anchor; (* named anchor *) + mutable tc: css; (* css classes *) + mutable tu: uri; (* uri *) + mutable tx: ext; (* uri extension *) + mutable ts: size; (* dimension *) + tb: border; (* border *) + te: entry; (* contents *) + ti: int; (* table identifier *) +} + +and entry = Key of key + | Line of bool * table list (* true for a row *) + +let id = + let current = ref 0 in + fun () -> incr current; !current + +let no_size = { + y = 0; x = 0; rf = 0; cf = 0; ri = 0; ci = 0; p = None; +} + +let border b = { + n = b; s = b; e = b; w = b; +} + +let mk_key k tc tu tx tn = { + ts = no_size; tb = border false; te = Key k; + tc = tc; tu = tu; tx = tx; tn = tn; + ti = id (); +} + +let mk_line b tl tc tu tx tn = { + ts = no_size; tb = border b; te = Line (b, tl); + tc = tc; tu = tu; tx = tx; tn = tn; + ti = id (); +} diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/textLexer.mll b/matita/matita/contribs/lambdadelta/bin/xhtbl/textLexer.mll new file mode 100644 index 000000000..4b06e4c40 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/textLexer.mll @@ -0,0 +1,47 @@ +{ + module S = String + + module O = Options + module TP = TextParser + + let out s = if !O.debug_lexer then prerr_endline s +} + +let SPC = ['\r' '\n' '\t' ' ']+ +let QT = "\"" +let NUM = ['0'-'9']+ + +rule token = parse + | SPC { token lexbuf } + | QT { let s = str lexbuf in + out s; TP.TEXT s } + | NUM as s { out s; TP.NUM (int_of_string s) } + | "(*" { block lexbuf; token lexbuf } + | "{" { out "{"; TP.OC } + | "}" { out "}"; TP.CC } + | "[" { out "["; TP.OB } + | "]" { out "]"; TP.CB } + | "*" { out "*"; TP.SR } + | "^" { out "^"; TP.CF } + | "+" { out "+"; TP.PS } + | "(" { out "("; TP.OP } + | ")" { out ")"; TP.CP } + | "@" { out ")"; TP.AT } + | "space" { out "space"; TP.SPACE } + | "name" { out "name"; TP.NAME } + | "table" { out "table"; TP.TABLE } + | "class" { out "class"; TP.CSS } + | "uri" { out "uri"; TP.URI } + | "ext" { out "ext"; TP.EXT } + | eof { TP.EOF } +and str = parse + | QT { "" } + | "\\\\" { "\\" ^ str lexbuf } + | "\\\"" { "\"" ^ str lexbuf } + | _ as c { S.make 1 c ^ str lexbuf } +and block = parse + | "*)" { () } + | "(*" { block lexbuf; block lexbuf } + | QT { let _ = str lexbuf in + block lexbuf } + | _ { block lexbuf } diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/textParser.mly b/matita/matita/contribs/lambdadelta/bin/xhtbl/textParser.mly new file mode 100644 index 000000000..9072c2b23 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/textParser.mly @@ -0,0 +1,147 @@ +%{ + +module S = Str +module L = List +module T = Table + +let split s = + S.split (S.regexp "[ \r\n\t]+") s + +let mk_css_atom s rs = + let cs = split s in + let map (b, (x1, x2)) = cs, b, x1, x2 in + L.map map rs + +let mk_string_atom s rs = + let map (b, (x1, x2)) = s, b, x1, x2 in + L.map map rs + +%} + +%token NUM +%token TEXT +%token SPACE NAME TABLE CSS URI EXT SR OC CC OB CB PS CF OP CP AT EOF + +%start script +%type <(string * string) list * (string * Table.table * Table.css Attr.atoms * Table.uri Attr.atoms * Table.ext Attr.atoms) list> script + +%% + +space: + | SPACE TEXT TEXT { $2, $3 } +; + +spaces: + | { [] } + | space spaces { $1 :: $2 } +; + +text: + | TEXT { T.Plain $1 } + | AT OP TEXT TEXT CP { T.Link (true, $3, $4) } + | AT AT OP TEXT TEXT CP { T.Link (false, $4, $5) } + | AT TEXT { T.Link (true, $2, $2) } + | AT AT TEXT { T.Link (false, $3, $3) } +; + +texts: + | text { [$1] } + | text PS texts { $1 :: T.Plain " " :: $3 } + | text CF texts { $1 :: $3 } +; + +key: + | texts { T.Text $1 } + | SR { T.Glue None } + | NUM { T.Glue (Some $1) } +; + +css: + | { [] } + | CSS TEXT { split $2 } +; + +uri: + | { "" } + | URI TEXT { $2 } +; + +ext: + | { "" } + | EXT TEXT { $2 } +; + +table: + | css uri ext name key { T.mk_key $5 $1 $2 $3 $4 } + | css uri ext OC tables CC { T.mk_line false $5 $1 $2 $3 "" } + | css uri ext OB tables CB { T.mk_line true $5 $1 $2 $3 "" } +; + +tables: + | { [] } + | table tables { $1 :: $2 } +; + +name: + | { "" } + | NAME TEXT { $2 } +; + +interval: + | NUM { Some $1, Some $1 } + | SR { None, None } + | NUM NUM { Some $1, Some $2 } + | NUM SR { Some $1, None } + | SR NUM { None, Some $2 } + | SR SR { None, None } +; + +range: + | OB interval CB { true, $2 } + | OC interval CC { false, $2 } +; + +ranges: + | { [] } + | range ranges { $1 :: $2 } +; + +catom: + | CSS TEXT ranges { mk_css_atom $2 $3 } +; + +catoms: + | { [] } + | catom catoms { $1 @ $2 } +; + +uatom: + | URI TEXT ranges { mk_string_atom $2 $3 } +; + +uatoms: + | { [] } + | uatom uatoms { $1 @ $2 } +; + +xatom: + | EXT TEXT ranges { mk_string_atom $2 $3 } +; + +xatoms: + | { [] } + | xatom xatoms { $1 @ $2 } +; + +directive: + | name TABLE table catoms uatoms xatoms { $1, $3, $4, $5, $6 } +; + +directives: + | { [] } + | directive directives { $1 :: $2 } +; + +script: + | spaces directives EOF { $1, $2 } +; diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/textUnparser.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/textUnparser.ml new file mode 100644 index 000000000..cf7724cdd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/textUnparser.ml @@ -0,0 +1,101 @@ +module L = List +module P = Printf +module S = String + +module T = Table +module F = Fold + +type status = { + i: int; (* indentation *) + out: string -> unit; (* output function *) +} + +let home = { + i = 0; out = print_string +} + +let indent st = + S.make st.i ' ' + +let add st = {st with i = st.i + 3} + +let sub st = {st with i = st.i - 3} + +let parent = function + | None -> "key" + | Some false -> "col" + | Some true -> "row" + +let size ts = + P.sprintf "(%u, %u); (%u+%u, %u+%u); %s" + ts.T.y ts.T.x ts.T.rf ts.T.ri ts.T.cf ts.T.ci (parent ts.T.p) + +let border tb = + let str = S.make 4 ' ' in + if tb.T.w then str.[0] <- 'W'; + if tb.T.n then str.[1] <- 'N'; + if tb.T.e then str.[2] <- 'E'; + if tb.T.s then str.[3] <- 'S'; + str + +let css tc = + P.sprintf "\"%s\"" (S.concat " " tc) + +let uri tu tx = + P.sprintf "@\"%s\" \"%s\"" tu tx + +let name tn = + P.sprintf "$\"%s\"" tn + + +let text = function + | T.Plain s -> P.sprintf "\"%s\"" s + | T.Link (true, uri, s) -> P.sprintf "@(\"%s\" \"%s\")" uri s + | T.Link (false, uri, s) -> P.sprintf "@@(\"%s\" \"%s\")" uri s + +let key = function + | T.Text sl -> S.concat " ^ " (L.map text sl) + | T.Glue None -> "*" + | T.Glue (Some i) -> P.sprintf "%u" i + +let entry = function + | false -> "column" + | true -> "row" + +(****************************************************************************) + +let open_table st t = + let str = + P.sprintf "%s[{#%u: %s; %s; %s; %s; %s}\n" + (indent st) t.T.ti (size t.T.ts) (border t.T.tb) (css t.T.tc) (uri t.T.tu t.T.tx) (name t.T.tn) + in + st.out str; add st + +let close_table st t = + let st = sub st in + let str = P.sprintf "%s]\n" (indent st) in + st.out str; st + +let map_key st k = + let str = P.sprintf "%s%s\n" (indent st) (key k) in + st.out str; st + +let open_line b st = + let str = P.sprintf "%s%s\n" (indent st) (entry b) in + st.out str; st + +let close_line b st = st + +let open_entry b st = st + +let close_entry b st sst = st + +let cb = { + F.open_table = open_table; F.close_table = close_table; + F.open_line = open_line; F.close_line = close_line; + F.open_entry = open_entry; F.close_entry = close_entry; + F.map_key = map_key; +} + +let debug t = + let _ = F.fold_table cb home t in () diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/xhtbl.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/xhtbl.ml new file mode 100644 index 000000000..6c5f8b01f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/xhtbl.ml @@ -0,0 +1,77 @@ +module A = Arg +module F = Filename +module L = List + +module O = Options +module TP = TextParser +module TL = TextLexer +module TU = TextUnparser +module P1 = Pass1 +module P2 = Pass2 +module P3 = Pass3 +module M = Matrix +module XU = XmlUnparser + +let help = "Usage: xhtbl [ -LX | -O | -d0 | -d1 | -d2 | -e1 | -e2 | -p0 | -p1 | -p2 | ]*" +let help_L = " Output lexer tokens" +let help_O = " Set this output directory" +let help_X = " Clear all options" +let help_b = " Set this base uri for relative links" +let help_d0 = " Output table contents after phase zero (parsing)" +let help_d1 = " Output table contents after phase one (sizing)" +let help_d2 = " Output table contents after phase two (filling)" +let help_e1 = " Disabled" +let help_e2 = " Output debug information during phase two (filling)" +let help_p0 = " Process until phase zero (parsing)" +let help_p1 = " Process until phase one (sizing)" +let help_p2 = " Process until phase two (filling)" + +let hook = "xhtbl" + +let includes, tables = ref [], ref [] + +let process_directive och bname (name, table, css, uri, ext) = + tables := name :: !tables; + if !O.d0 then TU.debug table; + if not !O.p0 then begin + let size = P1.process table in + if !O.d1 then TU.debug table; + if not !O.p1 then begin + let matrix = M.make size in + let _ = P2.process table matrix in + if !O.d2 then TU.debug table; + if not !O.p2 then P3.process css uri ext matrix; + let name = if name = "" then bname else name in + XU.output och name matrix + end + end + +let process_file fname = + let bname = F.chop_extension (F.basename fname) in + let ich = open_in fname in + let lexbuf = Lexing.from_channel ich in + let ns, ds = TP.script TL.token lexbuf in + close_in ich; includes := bname :: !includes; + let ns = ("", "http://www.w3.org/1999/xhtml") :: ns in + let och = XU.open_out bname ns in + L.iter (process_directive och bname) ds; + XU.close_out och + +let main () = + A.parse [ + "-L", A.Set O.debug_lexer, help_L; + "-O", A.String ((:=) O.output_dir), help_O; + "-X", A.Unit O.clear, help_X; + "-b", A.String ((:=) O.baseuri), help_b; + "-d0", A.Set O.d0, help_d0; + "-d1", A.Set O.d1, help_d1; + "-d2", A.Set O.d2, help_d2; + "-e1", A.Set O.e1, help_e1; + "-e2", A.Set O.e2, help_e2; + "-p0", A.Set O.p0, help_p0; + "-p1", A.Set O.p1, help_p1; + "-p2", A.Set O.p2, help_p2; + ] process_file help; + XU.write_hook hook !includes !tables + +let _ = main () diff --git a/matita/matita/contribs/lambdadelta/bin/xhtbl/xmlUnparser.ml b/matita/matita/contribs/lambdadelta/bin/xhtbl/xmlUnparser.ml new file mode 100644 index 000000000..2f29e4bb7 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/bin/xhtbl/xmlUnparser.ml @@ -0,0 +1,104 @@ +module A = Array +module F = Filename +module L = List +module P = Printf +module S = String + +module O = Options +module T = Table +module M = Matrix + +let xhtbl = "xhtbl" + +let i = 0 + +let myself = F.basename (Sys.argv.(0)) + +let msg = P.sprintf "This file was generated by %s, do not edit" myself + +let compose uri ext = + if uri.[pred (S.length uri)] = '/' then uri else + try + let i = S.index uri '#' in + let uri, fragment = S.sub uri 0 i, S.sub uri i (S.length uri - i) in + uri ^ ext ^ fragment + with Not_found -> uri ^ ext + +let border cell = + let str = S.make 4 'n' in + if cell.M.cb.T.n then str.[0] <- 's'; + if cell.M.cb.T.e then str.[1] <- 's'; + if cell.M.cb.T.s then str.[2] <- 's'; + if cell.M.cb.T.w then str.[3] <- 's'; + str :: cell.M.cc + +let text baseuri ext = function + | T.Plain s -> s + | T.Link (true, uri, s) -> P.sprintf "%s" uri s + | T.Link (false, uri, s) -> + let uri = !O.baseuri ^ baseuri ^ compose uri ext in + P.sprintf "%s" uri s + +let name cell = + if cell.M.cn = "" then "" else P.sprintf " id=\"%s\"" cell.M.cn + +let key cell = + if cell.M.ck = [] then "
" else S.concat "" (L.map (text cell.M.cu cell.M.cx) cell.M.ck) + +let ind i = S.make (2 * i) ' ' + +let out_cell och cell = + let cc = xhtbl :: border cell in + P.fprintf och "%s%s\n" + (ind (i+3)) (S.concat " " cc) (name cell) (key cell) + +let out_row och row = + P.fprintf och "%s\n" (ind (i+2)) xhtbl; + A.iter (out_cell och) row; + P.fprintf och "%s\n" (ind (i+2)) + +let out_space och (name, uri) = + let name = if name = "" then name else ":" ^ name in + P.fprintf och " xmlns%s=\"%s\"\n" name uri + +(****************************************************************************) + +let open_out name spaces = + let fname = F.concat !O.output_dir (P.sprintf "%s.xsl" name) in + let spaces = ("xsl", "http://www.w3.org/1999/XSL/Transform") :: spaces in + let och = open_out fname in + P.fprintf och "\n\n"; + P.fprintf och "\n\n" msg; + P.fprintf och "\n\n"; + och + +let output och name matrix = + P.fprintf och "\n" name; + P.fprintf och "%s\n" (ind (i+1)) xhtbl; + A.iter (out_row och) matrix.M.m; + P.fprintf och "%s
\n" (ind (i+1)); + P.fprintf och "
\n\n" + +let close_out och = + P.fprintf och "
\n"; + close_out och + +let map_incs och name = + P.fprintf och "\n" name + +let map_tbls och name = + P.fprintf och "%s\n" (ind (i+2)) name; + P.fprintf och "%s\n" (ind (i+3)) name; + P.fprintf och "%s\n" (ind (i+2)) + +let write_hook name incs tbls = + let och = open_out name [] in + L.iter (map_incs och) incs; + P.fprintf och "\n\n" name; + P.fprintf och "%s\n" (ind (i+1)); + L.iter (map_tbls och) tbls; + P.fprintf och "%s\n" (ind (i+1)); + P.fprintf och "\n\n"; + close_out och diff --git a/matita/matita/contribs/lambdadelta/ground_1/blt/defs.ma b/matita/matita/contribs/lambdadelta/ground_1/blt/defs.ma deleted file mode 100644 index 3b8f8656e..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/blt/defs.ma +++ /dev/null @@ -1,22 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/preamble.ma". - -rec definition blt (m: nat) (n: nat) on n: bool \def match n with [O -\Rightarrow false | (S n0) \Rightarrow (match m with [O \Rightarrow true | (S -m0) \Rightarrow (blt m0 n0)])]. - diff --git a/matita/matita/contribs/lambdadelta/ground_1/blt/props.ma b/matita/matita/contribs/lambdadelta/ground_1/blt/props.ma deleted file mode 100644 index 7a6c3f27a..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/blt/props.ma +++ /dev/null @@ -1,90 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/blt/defs.ma". - -lemma lt_blt: - \forall (x: nat).(\forall (y: nat).((lt y x) \to (eq bool (blt y x) true))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to -(eq bool (blt y n) true)))) (\lambda (y: nat).(\lambda (H: (lt y O)).(let H0 -\def (match H with [le_n \Rightarrow (\lambda (H0: (eq nat (S y) O)).(let H1 -\def (eq_ind nat (S y) (\lambda (e: nat).(match e with [O \Rightarrow False | -(S _) \Rightarrow True])) I O H0) in (False_ind (eq bool (blt y O) true) -H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def -(eq_ind nat (S m) (\lambda (e: nat).(match e with [O \Rightarrow False | (S -_) \Rightarrow True])) I O H1) in (False_ind ((le (S y) m) \to (eq bool (blt -y O) true)) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: -nat).(\lambda (H: ((\forall (y: nat).((lt y n) \to (eq bool (blt y n) -true))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to -(eq bool (blt n0 (S n)) true))) (\lambda (_: (lt O (S n))).(refl_equal bool -true)) (\lambda (n0: nat).(\lambda (_: (((lt n0 (S n)) \to (eq bool (match n0 -with [O \Rightarrow true | (S m) \Rightarrow (blt m n)]) true)))).(\lambda -(H1: (lt (S n0) (S n))).(H n0 (le_S_n (S n0) n H1))))) y)))) x). - -lemma le_bge: - \forall (x: nat).(\forall (y: nat).((le x y) \to (eq bool (blt y x) false))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to -(eq bool (blt y n) false)))) (\lambda (y: nat).(\lambda (_: (le O -y)).(refl_equal bool false))) (\lambda (n: nat).(\lambda (H: ((\forall (y: -nat).((le n y) \to (eq bool (blt y n) false))))).(\lambda (y: nat).(nat_ind -(\lambda (n0: nat).((le (S n) n0) \to (eq bool (blt n0 (S n)) false))) -(\lambda (H0: (le (S n) O)).(let H1 \def (match H0 with [le_n \Rightarrow -(\lambda (H1: (eq nat (S n) O)).(let H2 \def (eq_ind nat (S n) (\lambda (e: -nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) -in (False_ind (eq bool (blt O (S n)) false) H2))) | (le_S m H1) \Rightarrow -(\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: -nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) -in (False_ind ((le (S n) m) \to (eq bool (blt O (S n)) false)) H3)) H1))]) in -(H1 (refl_equal nat O)))) (\lambda (n0: nat).(\lambda (_: (((le (S n) n0) \to -(eq bool (blt n0 (S n)) false)))).(\lambda (H1: (le (S n) (S n0))).(H n0 -(le_S_n n n0 H1))))) y)))) x). - -lemma blt_lt: - \forall (x: nat).(\forall (y: nat).((eq bool (blt y x) true) \to (lt y x))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt -y n) true) \to (lt y n)))) (\lambda (y: nat).(\lambda (H: (eq bool (blt y O) -true)).(let H0 \def (match H with [refl_equal \Rightarrow (\lambda (H0: (eq -bool (blt y O) true)).(let H1 \def (eq_ind bool (blt y O) (\lambda (e: -bool).(match e with [true \Rightarrow False | false \Rightarrow True])) I -true H0) in (False_ind (lt y O) H1)))]) in (H0 (refl_equal bool true))))) -(\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq bool (blt y n) true) -\to (lt y n))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((eq bool (blt -n0 (S n)) true) \to (lt n0 (S n)))) (\lambda (_: (eq bool true true)).(le_S_n -(S O) (S n) (le_n_S (S O) (S n) (le_n_S O n (le_O_n n))))) (\lambda (n0: -nat).(\lambda (_: (((eq bool (match n0 with [O \Rightarrow true | (S m) -\Rightarrow (blt m n)]) true) \to (lt n0 (S n))))).(\lambda (H1: (eq bool -(blt n0 n) true)).(lt_n_S n0 n (H n0 H1))))) y)))) x). - -lemma bge_le: - \forall (x: nat).(\forall (y: nat).((eq bool (blt y x) false) \to (le x y))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt -y n) false) \to (le n y)))) (\lambda (y: nat).(\lambda (_: (eq bool (blt y O) -false)).(le_O_n y))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq -bool (blt y n) false) \to (le n y))))).(\lambda (y: nat).(nat_ind (\lambda -(n0: nat).((eq bool (blt n0 (S n)) false) \to (le (S n) n0))) (\lambda (H0: -(eq bool (blt O (S n)) false)).(let H1 \def (match H0 with [refl_equal -\Rightarrow (\lambda (H1: (eq bool (blt O (S n)) false)).(let H2 \def (eq_ind -bool (blt O (S n)) (\lambda (e: bool).(match e with [true \Rightarrow True | -false \Rightarrow False])) I false H1) in (False_ind (le (S n) O) H2)))]) in -(H1 (refl_equal bool false)))) (\lambda (n0: nat).(\lambda (_: (((eq bool -(blt n0 (S n)) false) \to (le (S n) n0)))).(\lambda (H1: (eq bool (blt (S n0) -(S n)) false)).(le_S_n (S n) (S n0) (le_n_S (S n) (S n0) (le_n_S n n0 (H n0 -H1))))))) y)))) x). - diff --git a/matita/matita/contribs/lambdadelta/ground_1/definitions.ma b/matita/matita/contribs/lambdadelta/ground_1/definitions.ma deleted file mode 100644 index 81a1e38f2..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/definitions.ma +++ /dev/null @@ -1,22 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/types/defs.ma". - -include "ground_1/blt/defs.ma". - -include "ground_1/plist/defs.ma". - diff --git a/matita/matita/contribs/lambdadelta/ground_1/ext/arith.ma b/matita/matita/contribs/lambdadelta/ground_1/ext/arith.ma deleted file mode 100644 index 724a34747..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/ext/arith.ma +++ /dev/null @@ -1,592 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/preamble.ma". - -lemma nat_dec: - \forall (n1: nat).(\forall (n2: nat).(or (eq nat n1 n2) ((eq nat n1 n2) \to -(\forall (P: Prop).P)))) -\def - \lambda (n1: nat).(nat_ind (\lambda (n: nat).(\forall (n2: nat).(or (eq nat -n n2) ((eq nat n n2) \to (\forall (P: Prop).P))))) (\lambda (n2: -nat).(nat_ind (\lambda (n: nat).(or (eq nat O n) ((eq nat O n) \to (\forall -(P: Prop).P)))) (or_introl (eq nat O O) ((eq nat O O) \to (\forall (P: -Prop).P)) (refl_equal nat O)) (\lambda (n: nat).(\lambda (_: (or (eq nat O n) -((eq nat O n) \to (\forall (P: Prop).P)))).(or_intror (eq nat O (S n)) ((eq -nat O (S n)) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat O (S -n))).(\lambda (P: Prop).(let H1 \def (eq_ind nat O (\lambda (ee: nat).(match -ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H0) in -(False_ind P H1))))))) n2)) (\lambda (n: nat).(\lambda (H: ((\forall (n2: -nat).(or (eq nat n n2) ((eq nat n n2) \to (\forall (P: Prop).P)))))).(\lambda -(n2: nat).(nat_ind (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) -n0) \to (\forall (P: Prop).P)))) (or_intror (eq nat (S n) O) ((eq nat (S n) -O) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat (S n) O)).(\lambda (P: -Prop).(let H1 \def (eq_ind nat (S n) (\lambda (ee: nat).(match ee with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind P H1))))) -(\lambda (n0: nat).(\lambda (H0: (or (eq nat (S n) n0) ((eq nat (S n) n0) \to -(\forall (P: Prop).P)))).(or_ind (eq nat n n0) ((eq nat n n0) \to (\forall -(P: Prop).P)) (or (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to (\forall -(P: Prop).P))) (\lambda (H1: (eq nat n n0)).(let H2 \def (eq_ind_r nat n0 -(\lambda (n3: nat).(or (eq nat (S n) n3) ((eq nat (S n) n3) \to (\forall (P: -Prop).P)))) H0 n H1) in (eq_ind nat n (\lambda (n3: nat).(or (eq nat (S n) (S -n3)) ((eq nat (S n) (S n3)) \to (\forall (P: Prop).P)))) (or_introl (eq nat -(S n) (S n)) ((eq nat (S n) (S n)) \to (\forall (P: Prop).P)) (refl_equal nat -(S n))) n0 H1))) (\lambda (H1: (((eq nat n n0) \to (\forall (P: -Prop).P)))).(or_intror (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to -(\forall (P: Prop).P)) (\lambda (H2: (eq nat (S n) (S n0))).(\lambda (P: -Prop).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e with [O -\Rightarrow n | (S n3) \Rightarrow n3])) (S n) (S n0) H2) in (let H4 \def -(eq_ind_r nat n0 (\lambda (n3: nat).((eq nat n n3) \to (\forall (P0: -Prop).P0))) H1 n H3) in (let H5 \def (eq_ind_r nat n0 (\lambda (n3: nat).(or -(eq nat (S n) n3) ((eq nat (S n) n3) \to (\forall (P0: Prop).P0)))) H0 n H3) -in (H4 (refl_equal nat n) P)))))))) (H n0)))) n2)))) n1). - -lemma simpl_plus_r: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((eq nat (plus m n) -(plus p n)) \to (eq nat m p)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (eq nat -(plus m n) (plus p n))).(simpl_plus_l n m p (eq_ind_r nat (plus m n) (\lambda -(n0: nat).(eq nat n0 (plus n p))) (eq_ind_r nat (plus p n) (\lambda (n0: -nat).(eq nat n0 (plus n p))) (plus_sym p n) (plus m n) H) (plus n m) -(plus_sym n m)))))). - -lemma minus_Sx_Sy: - \forall (x: nat).(\forall (y: nat).(eq nat (minus (S x) (S y)) (minus x y))) -\def - \lambda (x: nat).(\lambda (y: nat).(refl_equal nat (minus x y))). - -lemma minus_plus_r: - \forall (m: nat).(\forall (n: nat).(eq nat (minus (plus m n) n) m)) -\def - \lambda (m: nat).(\lambda (n: nat).(eq_ind_r nat (plus n m) (\lambda (n0: -nat).(eq nat (minus n0 n) m)) (minus_plus n m) (plus m n) (plus_sym m n))). - -lemma plus_permute_2_in_3: - \forall (x: nat).(\forall (y: nat).(\forall (z: nat).(eq nat (plus (plus x -y) z) (plus (plus x z) y)))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (z: nat).(eq_ind_r nat (plus x -(plus y z)) (\lambda (n: nat).(eq nat n (plus (plus x z) y))) (eq_ind_r nat -(plus z y) (\lambda (n: nat).(eq nat (plus x n) (plus (plus x z) y))) (eq_ind -nat (plus (plus x z) y) (\lambda (n: nat).(eq nat n (plus (plus x z) y))) -(refl_equal nat (plus (plus x z) y)) (plus x (plus z y)) (plus_assoc_r x z -y)) (plus y z) (plus_sym y z)) (plus (plus x y) z) (plus_assoc_r x y z)))). - -lemma plus_permute_2_in_3_assoc: - \forall (n: nat).(\forall (h: nat).(\forall (k: nat).(eq nat (plus (plus n -h) k) (plus n (plus k h))))) -\def - \lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(eq_ind_r nat (plus -(plus n k) h) (\lambda (n0: nat).(eq nat n0 (plus n (plus k h)))) (eq_ind_r -nat (plus (plus n k) h) (\lambda (n0: nat).(eq nat (plus (plus n k) h) n0)) -(refl_equal nat (plus (plus n k) h)) (plus n (plus k h)) (plus_assoc_l n k -h)) (plus (plus n h) k) (plus_permute_2_in_3 n h k)))). - -lemma plus_O: - \forall (x: nat).(\forall (y: nat).((eq nat (plus x y) O) \to (land (eq nat -x O) (eq nat y O)))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq nat (plus -n y) O) \to (land (eq nat n O) (eq nat y O))))) (\lambda (y: nat).(\lambda -(H: (eq nat (plus O y) O)).(conj (eq nat O O) (eq nat y O) (refl_equal nat O) -H))) (\lambda (n: nat).(\lambda (_: ((\forall (y: nat).((eq nat (plus n y) O) -\to (land (eq nat n O) (eq nat y O)))))).(\lambda (y: nat).(\lambda (H0: (eq -nat (plus (S n) y) O)).(let H1 \def (match H0 with [refl_equal \Rightarrow -(\lambda (H1: (eq nat (plus (S n) y) O)).(let H2 \def (eq_ind nat (plus (S n) -y) (\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H1) in (False_ind (land (eq nat (S n) O) (eq nat y O)) H2)))]) in -(H1 (refl_equal nat O))))))) x). - -lemma minus_Sx_SO: - \forall (x: nat).(eq nat (minus (S x) (S O)) x) -\def - \lambda (x: nat).(eq_ind nat x (\lambda (n: nat).(eq nat n x)) (refl_equal -nat x) (minus x O) (minus_n_O x)). - -lemma nat_dec_neg: - \forall (i: nat).(\forall (j: nat).(or (not (eq nat i j)) (eq nat i j))) -\def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (j: nat).(or (not (eq -nat n j)) (eq nat n j)))) (\lambda (j: nat).(nat_ind (\lambda (n: nat).(or -(not (eq nat O n)) (eq nat O n))) (or_intror (not (eq nat O O)) (eq nat O O) -(refl_equal nat O)) (\lambda (n: nat).(\lambda (_: (or (not (eq nat O n)) (eq -nat O n))).(or_introl (not (eq nat O (S n))) (eq nat O (S n)) (O_S n)))) j)) -(\lambda (n: nat).(\lambda (H: ((\forall (j: nat).(or (not (eq nat n j)) (eq -nat n j))))).(\lambda (j: nat).(nat_ind (\lambda (n0: nat).(or (not (eq nat -(S n) n0)) (eq nat (S n) n0))) (or_introl (not (eq nat (S n) O)) (eq nat (S -n) O) (sym_not_eq nat O (S n) (O_S n))) (\lambda (n0: nat).(\lambda (_: (or -(not (eq nat (S n) n0)) (eq nat (S n) n0))).(or_ind (not (eq nat n n0)) (eq -nat n n0) (or (not (eq nat (S n) (S n0))) (eq nat (S n) (S n0))) (\lambda -(H1: (not (eq nat n n0))).(or_introl (not (eq nat (S n) (S n0))) (eq nat (S -n) (S n0)) (not_eq_S n n0 H1))) (\lambda (H1: (eq nat n n0)).(or_intror (not -(eq nat (S n) (S n0))) (eq nat (S n) (S n0)) (f_equal nat nat S n n0 H1))) (H -n0)))) j)))) i). - -lemma neq_eq_e: - \forall (i: nat).(\forall (j: nat).(\forall (P: Prop).((((not (eq nat i j)) -\to P)) \to ((((eq nat i j) \to P)) \to P)))) -\def - \lambda (i: nat).(\lambda (j: nat).(\lambda (P: Prop).(\lambda (H: (((not -(eq nat i j)) \to P))).(\lambda (H0: (((eq nat i j) \to P))).(let o \def -(nat_dec_neg i j) in (or_ind (not (eq nat i j)) (eq nat i j) P H H0 o)))))). - -lemma le_false: - \forall (m: nat).(\forall (n: nat).(\forall (P: Prop).((le m n) \to ((le (S -n) m) \to P)))) -\def - \lambda (m: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).(\forall (P: -Prop).((le n n0) \to ((le (S n0) n) \to P))))) (\lambda (n: nat).(\lambda (P: -Prop).(\lambda (_: (le O n)).(\lambda (H0: (le (S n) O)).(let H1 \def (match -H0 with [le_n \Rightarrow (\lambda (H1: (eq nat (S n) O)).(let H2 \def -(eq_ind nat (S n) (\lambda (e: nat).(match e with [O \Rightarrow False | (S -_) \Rightarrow True])) I O H1) in (False_ind P H2))) | (le_S m0 H1) -\Rightarrow (\lambda (H2: (eq nat (S m0) O)).((let H3 \def (eq_ind nat (S m0) -(\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H2) in (False_ind ((le (S n) m0) \to P) H3)) H1))]) in (H1 -(refl_equal nat O))))))) (\lambda (n: nat).(\lambda (H: ((\forall (n0: -nat).(\forall (P: Prop).((le n n0) \to ((le (S n0) n) \to P)))))).(\lambda -(n0: nat).(nat_ind (\lambda (n1: nat).(\forall (P: Prop).((le (S n) n1) \to -((le (S n1) (S n)) \to P)))) (\lambda (P: Prop).(\lambda (H0: (le (S n) -O)).(\lambda (_: (le (S O) (S n))).(let H2 \def (match H0 with [le_n -\Rightarrow (\lambda (H2: (eq nat (S n) O)).(let H3 \def (eq_ind nat (S n) -(\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H2) in (False_ind P H3))) | (le_S m0 H2) \Rightarrow (\lambda -(H3: (eq nat (S m0) O)).((let H4 \def (eq_ind nat (S m0) (\lambda (e: -nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) -in (False_ind ((le (S n) m0) \to P) H4)) H2))]) in (H2 (refl_equal nat -O)))))) (\lambda (n1: nat).(\lambda (_: ((\forall (P: Prop).((le (S n) n1) -\to ((le (S n1) (S n)) \to P))))).(\lambda (P: Prop).(\lambda (H1: (le (S n) -(S n1))).(\lambda (H2: (le (S (S n1)) (S n))).(H n1 P (le_S_n n n1 H1) -(le_S_n (S n1) n H2))))))) n0)))) m). - -lemma le_Sx_x: - \forall (x: nat).((le (S x) x) \to (\forall (P: Prop).P)) -\def - \lambda (x: nat).(\lambda (H: (le (S x) x)).(\lambda (P: Prop).(let H0 \def -le_Sn_n in (False_ind P (H0 x H))))). - -lemma le_n_pred: - \forall (n: nat).(\forall (m: nat).((le n m) \to (le (pred n) (pred m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda -(n0: nat).(le (pred n) (pred n0))) (le_n (pred n)) (\lambda (m0: -nat).(\lambda (_: (le n m0)).(\lambda (H1: (le (pred n) (pred m0))).(le_trans -(pred n) (pred m0) m0 H1 (le_pred_n m0))))) m H))). - -lemma minus_le: - \forall (x: nat).(\forall (y: nat).(le (minus x y) x)) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).(le (minus n -y) n))) (\lambda (_: nat).(le_O_n O)) (\lambda (n: nat).(\lambda (H: -((\forall (y: nat).(le (minus n y) n)))).(\lambda (y: nat).(nat_ind (\lambda -(n0: nat).(le (minus (S n) n0) (S n))) (le_n (S n)) (\lambda (n0: -nat).(\lambda (_: (le (match n0 with [O \Rightarrow (S n) | (S l) \Rightarrow -(minus n l)]) (S n))).(le_S (minus n n0) n (H n0)))) y)))) x). - -lemma le_plus_minus_sym: - \forall (n: nat).(\forall (m: nat).((le n m) \to (eq nat m (plus (minus m n) -n)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(eq_ind_r nat -(plus n (minus m n)) (\lambda (n0: nat).(eq nat m n0)) (le_plus_minus n m H) -(plus (minus m n) n) (plus_sym (minus m n) n)))). - -lemma le_minus_minus: - \forall (x: nat).(\forall (y: nat).((le x y) \to (\forall (z: nat).((le y z) -\to (le (minus y x) (minus z x)))))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (le x y)).(\lambda (z: -nat).(\lambda (H0: (le y z)).(simpl_le_plus_l x (minus y x) (minus z x) -(eq_ind_r nat y (\lambda (n: nat).(le n (plus x (minus z x)))) (eq_ind_r nat -z (\lambda (n: nat).(le y n)) H0 (plus x (minus z x)) (le_plus_minus_r x z -(le_trans x y z H H0))) (plus x (minus y x)) (le_plus_minus_r x y H))))))). - -lemma le_minus_plus: - \forall (z: nat).(\forall (x: nat).((le z x) \to (\forall (y: nat).(eq nat -(minus (plus x y) z) (plus (minus x z) y))))) -\def - \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((le n x) \to -(\forall (y: nat).(eq nat (minus (plus x y) n) (plus (minus x n) y)))))) -(\lambda (x: nat).(\lambda (H: (le O x)).(let H0 \def (match H with [le_n -\Rightarrow (\lambda (H0: (eq nat O x)).(eq_ind nat O (\lambda (n: -nat).(\forall (y: nat).(eq nat (minus (plus n y) O) (plus (minus n O) y)))) -(\lambda (y: nat).(sym_eq nat (plus (minus O O) y) (minus (plus O y) O) -(minus_n_O (plus O y)))) x H0)) | (le_S m H0) \Rightarrow (\lambda (H1: (eq -nat (S m) x)).(eq_ind nat (S m) (\lambda (n: nat).((le O m) \to (\forall (y: -nat).(eq nat (minus (plus n y) O) (plus (minus n O) y))))) (\lambda (_: (le O -m)).(\lambda (y: nat).(refl_equal nat (plus (minus (S m) O) y)))) x H1 H0))]) -in (H0 (refl_equal nat x))))) (\lambda (z0: nat).(\lambda (H: ((\forall (x: -nat).((le z0 x) \to (\forall (y: nat).(eq nat (minus (plus x y) z0) (plus -(minus x z0) y))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).((le (S -z0) n) \to (\forall (y: nat).(eq nat (minus (plus n y) (S z0)) (plus (minus n -(S z0)) y))))) (\lambda (H0: (le (S z0) O)).(\lambda (y: nat).(let H1 \def -(match H0 with [le_n \Rightarrow (\lambda (H1: (eq nat (S z0) O)).(let H2 -\def (eq_ind nat (S z0) (\lambda (e: nat).(match e with [O \Rightarrow False -| (S _) \Rightarrow True])) I O H1) in (False_ind (eq nat (minus (plus O y) -(S z0)) (plus (minus O (S z0)) y)) H2))) | (le_S m H1) \Rightarrow (\lambda -(H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: -nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) -in (False_ind ((le (S z0) m) \to (eq nat (minus (plus O y) (S z0)) (plus -(minus O (S z0)) y))) H3)) H1))]) in (H1 (refl_equal nat O))))) (\lambda (n: -nat).(\lambda (_: (((le (S z0) n) \to (\forall (y: nat).(eq nat (minus (plus -n y) (S z0)) (plus (minus n (S z0)) y)))))).(\lambda (H1: (le (S z0) (S -n))).(\lambda (y: nat).(H n (le_S_n z0 n H1) y))))) x)))) z). - -lemma le_minus: - \forall (x: nat).(\forall (z: nat).(\forall (y: nat).((le (plus x y) z) \to -(le x (minus z y))))) -\def - \lambda (x: nat).(\lambda (z: nat).(\lambda (y: nat).(\lambda (H: (le (plus -x y) z)).(eq_ind nat (minus (plus x y) y) (\lambda (n: nat).(le n (minus z -y))) (le_minus_minus y (plus x y) (le_plus_r x y) z H) x (minus_plus_r x -y))))). - -lemma le_trans_plus_r: - \forall (x: nat).(\forall (y: nat).(\forall (z: nat).((le (plus x y) z) \to -(le y z)))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (z: nat).(\lambda (H: (le (plus -x y) z)).(le_trans y (plus x y) z (le_plus_r x y) H)))). - -lemma lt_x_O: - \forall (x: nat).((lt x O) \to (\forall (P: Prop).P)) -\def - \lambda (x: nat).(\lambda (H: (le (S x) O)).(\lambda (P: Prop).(let H_y \def -(le_n_O_eq (S x) H) in (let H0 \def (eq_ind nat O (\lambda (ee: nat).(match -ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) H_y) in -(False_ind P H0))))). - -lemma le_gen_S: - \forall (m: nat).(\forall (x: nat).((le (S m) x) \to (ex2 nat (\lambda (n: -nat).(eq nat x (S n))) (\lambda (n: nat).(le m n))))) -\def - \lambda (m: nat).(\lambda (x: nat).(\lambda (H: (le (S m) x)).(let H0 \def -(match H with [le_n \Rightarrow (\lambda (H0: (eq nat (S m) x)).(eq_ind nat -(S m) (\lambda (n: nat).(ex2 nat (\lambda (n0: nat).(eq nat n (S n0))) -(\lambda (n0: nat).(le m n0)))) (ex_intro2 nat (\lambda (n: nat).(eq nat (S -m) (S n))) (\lambda (n: nat).(le m n)) m (refl_equal nat (S m)) (le_n m)) x -H0)) | (le_S m0 H0) \Rightarrow (\lambda (H1: (eq nat (S m0) x)).(eq_ind nat -(S m0) (\lambda (n: nat).((le (S m) m0) \to (ex2 nat (\lambda (n0: nat).(eq -nat n (S n0))) (\lambda (n0: nat).(le m n0))))) (\lambda (H2: (le (S m) -m0)).(ex_intro2 nat (\lambda (n: nat).(eq nat (S m0) (S n))) (\lambda (n: -nat).(le m n)) m0 (refl_equal nat (S m0)) (le_S_n m m0 (le_S (S m) m0 H2)))) -x H1 H0))]) in (H0 (refl_equal nat x))))). - -lemma lt_x_plus_x_Sy: - \forall (x: nat).(\forall (y: nat).(lt x (plus x (S y)))) -\def - \lambda (x: nat).(\lambda (y: nat).(eq_ind_r nat (plus (S y) x) (\lambda (n: -nat).(lt x n)) (le_S_n (S x) (S (plus y x)) (le_n_S (S x) (S (plus y x)) -(le_n_S x (plus y x) (le_plus_r y x)))) (plus x (S y)) (plus_sym x (S y)))). - -lemma simpl_lt_plus_r: - \forall (p: nat).(\forall (n: nat).(\forall (m: nat).((lt (plus n p) (plus m -p)) \to (lt n m)))) -\def - \lambda (p: nat).(\lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt (plus -n p) (plus m p))).(simpl_lt_plus_l n m p (let H0 \def (eq_ind nat (plus n p) -(\lambda (n0: nat).(lt n0 (plus m p))) H (plus p n) (plus_sym n p)) in (let -H1 \def (eq_ind nat (plus m p) (\lambda (n0: nat).(lt (plus p n) n0)) H0 -(plus p m) (plus_sym m p)) in H1)))))). - -lemma minus_x_Sy: - \forall (x: nat).(\forall (y: nat).((lt y x) \to (eq nat (minus x y) (S -(minus x (S y)))))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to -(eq nat (minus n y) (S (minus n (S y))))))) (\lambda (y: nat).(\lambda (H: -(lt y O)).(let H0 \def (match H with [le_n \Rightarrow (\lambda (H0: (eq nat -(S y) O)).(let H1 \def (eq_ind nat (S y) (\lambda (e: nat).(match e with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq nat -(minus O y) (S (minus O (S y)))) H1))) | (le_S m H0) \Rightarrow (\lambda -(H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: -nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) -in (False_ind ((le (S y) m) \to (eq nat (minus O y) (S (minus O (S y))))) -H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (H: -((\forall (y: nat).((lt y n) \to (eq nat (minus n y) (S (minus n (S -y)))))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to -(eq nat (minus (S n) n0) (S (minus (S n) (S n0)))))) (\lambda (_: (lt O (S -n))).(eq_ind nat n (\lambda (n0: nat).(eq nat (S n) (S n0))) (refl_equal nat -(S n)) (minus n O) (minus_n_O n))) (\lambda (n0: nat).(\lambda (_: (((lt n0 -(S n)) \to (eq nat (minus (S n) n0) (S (minus (S n) (S n0))))))).(\lambda -(H1: (lt (S n0) (S n))).(let H2 \def (le_S_n (S n0) n H1) in (H n0 H2))))) -y)))) x). - -lemma lt_plus_minus: - \forall (x: nat).(\forall (y: nat).((lt x y) \to (eq nat y (S (plus x (minus -y (S x))))))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(le_plus_minus (S -x) y H))). - -lemma lt_plus_minus_r: - \forall (x: nat).(\forall (y: nat).((lt x y) \to (eq nat y (S (plus (minus y -(S x)) x))))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(eq_ind_r nat -(plus x (minus y (S x))) (\lambda (n: nat).(eq nat y (S n))) (lt_plus_minus x -y H) (plus (minus y (S x)) x) (plus_sym (minus y (S x)) x)))). - -lemma minus_x_SO: - \forall (x: nat).((lt O x) \to (eq nat x (S (minus x (S O))))) -\def - \lambda (x: nat).(\lambda (H: (lt O x)).(eq_ind nat (minus x O) (\lambda (n: -nat).(eq nat x n)) (eq_ind nat x (\lambda (n: nat).(eq nat x n)) (refl_equal -nat x) (minus x O) (minus_n_O x)) (S (minus x (S O))) (minus_x_Sy x O H))). - -lemma le_x_pred_y: - \forall (y: nat).(\forall (x: nat).((lt x y) \to (le x (pred y)))) -\def - \lambda (y: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((lt x n) \to -(le x (pred n))))) (\lambda (x: nat).(\lambda (H: (lt x O)).(let H0 \def -(match H with [le_n \Rightarrow (\lambda (H0: (eq nat (S x) O)).(let H1 \def -(eq_ind nat (S x) (\lambda (e: nat).(match e with [O \Rightarrow False | (S -_) \Rightarrow True])) I O H0) in (False_ind (le x O) H1))) | (le_S m H0) -\Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) -(\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H1) in (False_ind ((le (S x) m) \to (le x O)) H2)) H0))]) in (H0 -(refl_equal nat O))))) (\lambda (n: nat).(\lambda (_: ((\forall (x: nat).((lt -x n) \to (le x (pred n)))))).(\lambda (x: nat).(\lambda (H0: (lt x (S -n))).(le_S_n x n H0))))) y). - -lemma lt_le_minus: - \forall (x: nat).(\forall (y: nat).((lt x y) \to (le x (minus y (S O))))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(le_minus x y (S -O) (eq_ind_r nat (plus (S O) x) (\lambda (n: nat).(le n y)) H (plus x (S O)) -(plus_sym x (S O)))))). - -lemma lt_le_e: - \forall (n: nat).(\forall (d: nat).(\forall (P: Prop).((((lt n d) \to P)) -\to ((((le d n) \to P)) \to P)))) -\def - \lambda (n: nat).(\lambda (d: nat).(\lambda (P: Prop).(\lambda (H: (((lt n -d) \to P))).(\lambda (H0: (((le d n) \to P))).(let H1 \def (le_or_lt d n) in -(or_ind (le d n) (lt n d) P H0 H H1)))))). - -lemma lt_eq_e: - \forall (x: nat).(\forall (y: nat).(\forall (P: Prop).((((lt x y) \to P)) -\to ((((eq nat x y) \to P)) \to ((le x y) \to P))))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (P: Prop).(\lambda (H: (((lt x -y) \to P))).(\lambda (H0: (((eq nat x y) \to P))).(\lambda (H1: (le x -y)).(or_ind (lt x y) (eq nat x y) P H H0 (le_lt_or_eq x y H1))))))). - -lemma lt_eq_gt_e: - \forall (x: nat).(\forall (y: nat).(\forall (P: Prop).((((lt x y) \to P)) -\to ((((eq nat x y) \to P)) \to ((((lt y x) \to P)) \to P))))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (P: Prop).(\lambda (H: (((lt x -y) \to P))).(\lambda (H0: (((eq nat x y) \to P))).(\lambda (H1: (((lt y x) -\to P))).(lt_le_e x y P H (\lambda (H2: (le y x)).(lt_eq_e y x P H1 (\lambda -(H3: (eq nat y x)).(H0 (sym_eq nat y x H3))) H2)))))))). - -lemma lt_gen_xS: - \forall (x: nat).(\forall (n: nat).((lt x (S n)) \to (or (eq nat x O) (ex2 -nat (\lambda (m: nat).(eq nat x (S m))) (\lambda (m: nat).(lt m n)))))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((lt n (S -n0)) \to (or (eq nat n O) (ex2 nat (\lambda (m: nat).(eq nat n (S m))) -(\lambda (m: nat).(lt m n0))))))) (\lambda (n: nat).(\lambda (_: (lt O (S -n))).(or_introl (eq nat O O) (ex2 nat (\lambda (m: nat).(eq nat O (S m))) -(\lambda (m: nat).(lt m n))) (refl_equal nat O)))) (\lambda (n: nat).(\lambda -(_: ((\forall (n0: nat).((lt n (S n0)) \to (or (eq nat n O) (ex2 nat (\lambda -(m: nat).(eq nat n (S m))) (\lambda (m: nat).(lt m n0)))))))).(\lambda (n0: -nat).(\lambda (H0: (lt (S n) (S n0))).(or_intror (eq nat (S n) O) (ex2 nat -(\lambda (m: nat).(eq nat (S n) (S m))) (\lambda (m: nat).(lt m n0))) -(ex_intro2 nat (\lambda (m: nat).(eq nat (S n) (S m))) (\lambda (m: nat).(lt -m n0)) n (refl_equal nat (S n)) (le_S_n (S n) n0 H0))))))) x). - -lemma le_lt_false: - \forall (x: nat).(\forall (y: nat).((le x y) \to ((lt y x) \to (\forall (P: -Prop).P)))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (le x y)).(\lambda (H0: (lt -y x)).(\lambda (P: Prop).(False_ind P (le_not_lt x y H H0)))))). - -lemma lt_neq: - \forall (x: nat).(\forall (y: nat).((lt x y) \to (not (eq nat x y)))) -\def - \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(\lambda (H0: (eq -nat x y)).(let H1 \def (eq_ind nat x (\lambda (n: nat).(lt n y)) H y H0) in -(lt_n_n y H1))))). - -lemma arith0: - \forall (h2: nat).(\forall (d2: nat).(\forall (n: nat).((le (plus d2 h2) n) -\to (\forall (h1: nat).(le (plus d2 h1) (minus (plus n h1) h2)))))) -\def - \lambda (h2: nat).(\lambda (d2: nat).(\lambda (n: nat).(\lambda (H: (le -(plus d2 h2) n)).(\lambda (h1: nat).(eq_ind nat (minus (plus h2 (plus d2 h1)) -h2) (\lambda (n0: nat).(le n0 (minus (plus n h1) h2))) (le_minus_minus h2 -(plus h2 (plus d2 h1)) (le_plus_l h2 (plus d2 h1)) (plus n h1) (eq_ind_r nat -(plus (plus h2 d2) h1) (\lambda (n0: nat).(le n0 (plus n h1))) (eq_ind_r nat -(plus d2 h2) (\lambda (n0: nat).(le (plus n0 h1) (plus n h1))) (le_S_n (plus -(plus d2 h2) h1) (plus n h1) (le_n_S (plus (plus d2 h2) h1) (plus n h1) -(le_plus_plus (plus d2 h2) n h1 h1 H (le_n h1)))) (plus h2 d2) (plus_sym h2 -d2)) (plus h2 (plus d2 h1)) (plus_assoc_l h2 d2 h1))) (plus d2 h1) -(minus_plus h2 (plus d2 h1))))))). - -lemma O_minus: - \forall (x: nat).(\forall (y: nat).((le x y) \to (eq nat (minus x y) O))) -\def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to -(eq nat (minus n y) O)))) (\lambda (y: nat).(\lambda (_: (le O -y)).(refl_equal nat O))) (\lambda (x0: nat).(\lambda (H: ((\forall (y: -nat).((le x0 y) \to (eq nat (minus x0 y) O))))).(\lambda (y: nat).(nat_ind -(\lambda (n: nat).((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S -x0) | (S l) \Rightarrow (minus x0 l)]) O))) (\lambda (H0: (le (S x0) -O)).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le x0 -n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H1: (eq nat O (S -x1))).(\lambda (_: (le x0 x1)).(let H3 \def (eq_ind nat O (\lambda (ee: -nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) -H1) in (False_ind (eq nat (S x0) O) H3))))) (le_gen_S x0 O H0))) (\lambda (n: -nat).(\lambda (_: (((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S -x0) | (S l) \Rightarrow (minus x0 l)]) O)))).(\lambda (H1: (le (S x0) (S -n))).(H n (le_S_n x0 n H1))))) y)))) x). - -lemma minus_minus: - \forall (z: nat).(\forall (x: nat).(\forall (y: nat).((le z x) \to ((le z y) -\to ((eq nat (minus x z) (minus y z)) \to (eq nat x y)))))) -\def - \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).(\forall (y: -nat).((le n x) \to ((le n y) \to ((eq nat (minus x n) (minus y n)) \to (eq -nat x y))))))) (\lambda (x: nat).(\lambda (y: nat).(\lambda (_: (le O -x)).(\lambda (_: (le O y)).(\lambda (H1: (eq nat (minus x O) (minus y -O))).(let H2 \def (eq_ind_r nat (minus x O) (\lambda (n: nat).(eq nat n -(minus y O))) H1 x (minus_n_O x)) in (let H3 \def (eq_ind_r nat (minus y O) -(\lambda (n: nat).(eq nat x n)) H2 y (minus_n_O y)) in H3))))))) (\lambda -(z0: nat).(\lambda (IH: ((\forall (x: nat).(\forall (y: nat).((le z0 x) \to -((le z0 y) \to ((eq nat (minus x z0) (minus y z0)) \to (eq nat x -y)))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le -(S z0) n) \to ((le (S z0) y) \to ((eq nat (minus n (S z0)) (minus y (S z0))) -\to (eq nat n y)))))) (\lambda (y: nat).(\lambda (H: (le (S z0) O)).(\lambda -(_: (le (S z0) y)).(\lambda (_: (eq nat (minus O (S z0)) (minus y (S -z0)))).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le -z0 n)) (eq nat O y) (\lambda (x0: nat).(\lambda (H2: (eq nat O (S -x0))).(\lambda (_: (le z0 x0)).(let H4 \def (eq_ind nat O (\lambda (ee: -nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x0) -H2) in (False_ind (eq nat O y) H4))))) (le_gen_S z0 O H)))))) (\lambda (x0: -nat).(\lambda (_: ((\forall (y: nat).((le (S z0) x0) \to ((le (S z0) y) \to -((eq nat (minus x0 (S z0)) (minus y (S z0))) \to (eq nat x0 y))))))).(\lambda -(y: nat).(nat_ind (\lambda (n: nat).((le (S z0) (S x0)) \to ((le (S z0) n) -\to ((eq nat (minus (S x0) (S z0)) (minus n (S z0))) \to (eq nat (S x0) -n))))) (\lambda (H: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) O)).(\lambda -(_: (eq nat (minus (S x0) (S z0)) (minus O (S z0)))).(let H_y \def (le_S_n z0 -x0 H) in (ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: -nat).(le z0 n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H2: (eq nat O -(S x1))).(\lambda (_: (le z0 x1)).(let H4 \def (eq_ind nat O (\lambda (ee: -nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) -H2) in (False_ind (eq nat (S x0) O) H4))))) (le_gen_S z0 O H0)))))) (\lambda -(y0: nat).(\lambda (_: (((le (S z0) (S x0)) \to ((le (S z0) y0) \to ((eq nat -(minus (S x0) (S z0)) (minus y0 (S z0))) \to (eq nat (S x0) y0)))))).(\lambda -(H: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) (S y0))).(\lambda (H1: (eq -nat (minus (S x0) (S z0)) (minus (S y0) (S z0)))).(f_equal nat nat S x0 y0 -(IH x0 y0 (le_S_n z0 x0 H) (le_S_n z0 y0 H0) H1))))))) y)))) x)))) z). - -lemma plus_plus: - \forall (z: nat).(\forall (x1: nat).(\forall (x2: nat).(\forall (y1: -nat).(\forall (y2: nat).((le x1 z) \to ((le x2 z) \to ((eq nat (plus (minus z -x1) y1) (plus (minus z x2) y2)) \to (eq nat (plus x1 y2) (plus x2 y1))))))))) -\def - \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x1: nat).(\forall (x2: -nat).(\forall (y1: nat).(\forall (y2: nat).((le x1 n) \to ((le x2 n) \to ((eq -nat (plus (minus n x1) y1) (plus (minus n x2) y2)) \to (eq nat (plus x1 y2) -(plus x2 y1)))))))))) (\lambda (x1: nat).(\lambda (x2: nat).(\lambda (y1: -nat).(\lambda (y2: nat).(\lambda (H: (le x1 O)).(\lambda (H0: (le x2 -O)).(\lambda (H1: (eq nat y1 y2)).(eq_ind nat y1 (\lambda (n: nat).(eq nat -(plus x1 n) (plus x2 y1))) (let H_y \def (le_n_O_eq x2 H0) in (eq_ind nat O -(\lambda (n: nat).(eq nat (plus x1 y1) (plus n y1))) (let H_y0 \def -(le_n_O_eq x1 H) in (eq_ind nat O (\lambda (n: nat).(eq nat (plus n y1) (plus -O y1))) (refl_equal nat (plus O y1)) x1 H_y0)) x2 H_y)) y2 H1)))))))) -(\lambda (z0: nat).(\lambda (IH: ((\forall (x1: nat).(\forall (x2: -nat).(\forall (y1: nat).(\forall (y2: nat).((le x1 z0) \to ((le x2 z0) \to -((eq nat (plus (minus z0 x1) y1) (plus (minus z0 x2) y2)) \to (eq nat (plus -x1 y2) (plus x2 y1))))))))))).(\lambda (x1: nat).(nat_ind (\lambda (n: -nat).(\forall (x2: nat).(\forall (y1: nat).(\forall (y2: nat).((le n (S z0)) -\to ((le x2 (S z0)) \to ((eq nat (plus (minus (S z0) n) y1) (plus (minus (S -z0) x2) y2)) \to (eq nat (plus n y2) (plus x2 y1))))))))) (\lambda (x2: -nat).(nat_ind (\lambda (n: nat).(\forall (y1: nat).(\forall (y2: nat).((le O -(S z0)) \to ((le n (S z0)) \to ((eq nat (plus (minus (S z0) O) y1) (plus -(minus (S z0) n) y2)) \to (eq nat (plus O y2) (plus n y1)))))))) (\lambda -(y1: nat).(\lambda (y2: nat).(\lambda (_: (le O (S z0))).(\lambda (_: (le O -(S z0))).(\lambda (H1: (eq nat (S (plus z0 y1)) (S (plus z0 y2)))).(let H_y -\def (IH O O) in (let H2 \def (eq_ind_r nat (minus z0 O) (\lambda (n: -nat).(\forall (y3: nat).(\forall (y4: nat).((le O z0) \to ((le O z0) \to ((eq -nat (plus n y3) (plus n y4)) \to (eq nat y4 y3))))))) H_y z0 (minus_n_O z0)) -in (H2 y1 y2 (le_O_n z0) (le_O_n z0) (eq_add_S (plus z0 y1) (plus z0 y2) -H1))))))))) (\lambda (x3: nat).(\lambda (_: ((\forall (y1: nat).(\forall (y2: -nat).((le O (S z0)) \to ((le x3 (S z0)) \to ((eq nat (S (plus z0 y1)) (plus -(match x3 with [O \Rightarrow (S z0) | (S l) \Rightarrow (minus z0 l)]) y2)) -\to (eq nat y2 (plus x3 y1))))))))).(\lambda (y1: nat).(\lambda (y2: -nat).(\lambda (_: (le O (S z0))).(\lambda (H0: (le (S x3) (S z0))).(\lambda -(H1: (eq nat (S (plus z0 y1)) (plus (minus z0 x3) y2))).(let H_y \def (IH O -x3 (S y1)) in (let H2 \def (eq_ind_r nat (minus z0 O) (\lambda (n: -nat).(\forall (y3: nat).((le O z0) \to ((le x3 z0) \to ((eq nat (plus n (S -y1)) (plus (minus z0 x3) y3)) \to (eq nat y3 (plus x3 (S y1)))))))) H_y z0 -(minus_n_O z0)) in (let H3 \def (eq_ind_r nat (plus z0 (S y1)) (\lambda (n: -nat).(\forall (y3: nat).((le O z0) \to ((le x3 z0) \to ((eq nat n (plus -(minus z0 x3) y3)) \to (eq nat y3 (plus x3 (S y1)))))))) H2 (S (plus z0 y1)) -(plus_n_Sm z0 y1)) in (let H4 \def (eq_ind_r nat (plus x3 (S y1)) (\lambda -(n: nat).(\forall (y3: nat).((le O z0) \to ((le x3 z0) \to ((eq nat (S (plus -z0 y1)) (plus (minus z0 x3) y3)) \to (eq nat y3 n)))))) H3 (S (plus x3 y1)) -(plus_n_Sm x3 y1)) in (H4 y2 (le_O_n z0) (le_S_n x3 z0 H0) H1)))))))))))) -x2)) (\lambda (x2: nat).(\lambda (_: ((\forall (x3: nat).(\forall (y1: -nat).(\forall (y2: nat).((le x2 (S z0)) \to ((le x3 (S z0)) \to ((eq nat -(plus (minus (S z0) x2) y1) (plus (minus (S z0) x3) y2)) \to (eq nat (plus x2 -y2) (plus x3 y1)))))))))).(\lambda (x3: nat).(nat_ind (\lambda (n: -nat).(\forall (y1: nat).(\forall (y2: nat).((le (S x2) (S z0)) \to ((le n (S -z0)) \to ((eq nat (plus (minus (S z0) (S x2)) y1) (plus (minus (S z0) n) y2)) -\to (eq nat (plus (S x2) y2) (plus n y1)))))))) (\lambda (y1: nat).(\lambda -(y2: nat).(\lambda (H: (le (S x2) (S z0))).(\lambda (_: (le O (S -z0))).(\lambda (H1: (eq nat (plus (minus z0 x2) y1) (S (plus z0 y2)))).(let -H_y \def (IH x2 O y1 (S y2)) in (let H2 \def (eq_ind_r nat (minus z0 O) -(\lambda (n: nat).((le x2 z0) \to ((le O z0) \to ((eq nat (plus (minus z0 x2) -y1) (plus n (S y2))) \to (eq nat (plus x2 (S y2)) y1))))) H_y z0 (minus_n_O -z0)) in (let H3 \def (eq_ind_r nat (plus z0 (S y2)) (\lambda (n: nat).((le x2 -z0) \to ((le O z0) \to ((eq nat (plus (minus z0 x2) y1) n) \to (eq nat (plus -x2 (S y2)) y1))))) H2 (S (plus z0 y2)) (plus_n_Sm z0 y2)) in (let H4 \def -(eq_ind_r nat (plus x2 (S y2)) (\lambda (n: nat).((le x2 z0) \to ((le O z0) -\to ((eq nat (plus (minus z0 x2) y1) (S (plus z0 y2))) \to (eq nat n y1))))) -H3 (S (plus x2 y2)) (plus_n_Sm x2 y2)) in (H4 (le_S_n x2 z0 H) (le_O_n z0) -H1)))))))))) (\lambda (x4: nat).(\lambda (_: ((\forall (y1: nat).(\forall -(y2: nat).((le (S x2) (S z0)) \to ((le x4 (S z0)) \to ((eq nat (plus (minus -z0 x2) y1) (plus (match x4 with [O \Rightarrow (S z0) | (S l) \Rightarrow -(minus z0 l)]) y2)) \to (eq nat (S (plus x2 y2)) (plus x4 -y1))))))))).(\lambda (y1: nat).(\lambda (y2: nat).(\lambda (H: (le (S x2) (S -z0))).(\lambda (H0: (le (S x4) (S z0))).(\lambda (H1: (eq nat (plus (minus z0 -x2) y1) (plus (minus z0 x4) y2))).(f_equal nat nat S (plus x2 y2) (plus x4 -y1) (IH x2 x4 y1 y2 (le_S_n x2 z0 H) (le_S_n x4 z0 H0) H1))))))))) x3)))) -x1)))) z). - -lemma le_S_minus: - \forall (d: nat).(\forall (h: nat).(\forall (n: nat).((le (plus d h) n) \to -(le d (S (minus n h)))))) -\def - \lambda (d: nat).(\lambda (h: nat).(\lambda (n: nat).(\lambda (H: (le (plus -d h) n)).(let H0 \def (le_trans d (plus d h) n (le_plus_l d h) H) in (let H1 -\def (eq_ind nat n (\lambda (n0: nat).(le d n0)) H0 (plus (minus n h) h) -(le_plus_minus_sym h n (le_trans h (plus d h) n (le_plus_r d h) H))) in (le_S -d (minus n h) (le_minus d n h H))))))). - -lemma lt_x_pred_y: - \forall (x: nat).(\forall (y: nat).((lt x (pred y)) \to (lt (S x) y))) -\def - \lambda (x: nat).(\lambda (y: nat).(nat_ind (\lambda (n: nat).((lt x (pred -n)) \to (lt (S x) n))) (\lambda (H: (lt x O)).(lt_x_O x H (lt (S x) O))) -(\lambda (n: nat).(\lambda (_: (((lt x (pred n)) \to (lt (S x) n)))).(\lambda -(H0: (lt x n)).(lt_n_S x n H0)))) y)). - diff --git a/matita/matita/contribs/lambdadelta/ground_1/ext/tactics.ma b/matita/matita/contribs/lambdadelta/ground_1/ext/tactics.ma deleted file mode 100644 index c2dff1889..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/ext/tactics.ma +++ /dev/null @@ -1,41 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/preamble.ma". - -lemma insert_eq: - \forall (S: Type[0]).(\forall (x: S).(\forall (P: ((S \to Prop))).(\forall -(G: ((S \to Prop))).(((\forall (y: S).((P y) \to ((eq S y x) \to (G y))))) -\to ((P x) \to (G x)))))) -\def - \lambda (S: Type[0]).(\lambda (x: S).(\lambda (P: ((S \to Prop))).(\lambda -(G: ((S \to Prop))).(\lambda (H: ((\forall (y: S).((P y) \to ((eq S y x) \to -(G y)))))).(\lambda (H0: (P x)).(H x H0 (refl_equal S x))))))). - -lemma unintro: - \forall (A: Type[0]).(\forall (a: A).(\forall (P: ((A \to Prop))).(((\forall -(x: A).(P x))) \to (P a)))) -\def - \lambda (A: Type[0]).(\lambda (a: A).(\lambda (P: ((A \to Prop))).(\lambda -(H: ((\forall (x: A).(P x)))).(H a)))). - -lemma xinduction: - \forall (A: Type[0]).(\forall (t: A).(\forall (P: ((A \to Prop))).(((\forall -(x: A).((eq A t x) \to (P x)))) \to (P t)))) -\def - \lambda (A: Type[0]).(\lambda (t: A).(\lambda (P: ((A \to Prop))).(\lambda -(H: ((\forall (x: A).((eq A t x) \to (P x))))).(H t (refl_equal A t))))). - diff --git a/matita/matita/contribs/lambdadelta/ground_1/plist/defs.ma b/matita/matita/contribs/lambdadelta/ground_1/plist/defs.ma deleted file mode 100644 index 13a7bd07a..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/plist/defs.ma +++ /dev/null @@ -1,34 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/preamble.ma". - -inductive PList: Type[0] \def -| PNil: PList -| PCons: nat \to (nat \to (PList \to PList)). - -rec definition PConsTail (hds: PList) on hds: nat \to (nat \to PList) \def -\lambda (h0: nat).(\lambda (d0: nat).(match hds with [PNil \Rightarrow (PCons -h0 d0 PNil) | (PCons h d hds0) \Rightarrow (PCons h d (PConsTail hds0 h0 -d0))])). - -rec definition Ss (hds: PList) on hds: PList \def match hds with [PNil -\Rightarrow PNil | (PCons h d hds0) \Rightarrow (PCons h (S d) (Ss hds0))]. - -rec definition papp (a: PList) on a: PList \to PList \def \lambda (b: -PList).(match a with [PNil \Rightarrow b | (PCons h d a0) \Rightarrow (PCons -h d (papp a0 b))]). - diff --git a/matita/matita/contribs/lambdadelta/ground_1/plist/props.ma b/matita/matita/contribs/lambdadelta/ground_1/plist/props.ma deleted file mode 100644 index f80d0b0e9..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/plist/props.ma +++ /dev/null @@ -1,31 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/plist/defs.ma". - -lemma papp_ss: - \forall (is1: PList).(\forall (is2: PList).(eq PList (papp (Ss is1) (Ss -is2)) (Ss (papp is1 is2)))) -\def - \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (is2: -PList).(eq PList (papp (Ss p) (Ss is2)) (Ss (papp p is2))))) (\lambda (is2: -PList).(refl_equal PList (Ss is2))) (\lambda (n: nat).(\lambda (n0: -nat).(\lambda (p: PList).(\lambda (H: ((\forall (is2: PList).(eq PList (papp -(Ss p) (Ss is2)) (Ss (papp p is2)))))).(\lambda (is2: PList).(eq_ind_r PList -(Ss (papp p is2)) (\lambda (p0: PList).(eq PList (PCons n (S n0) p0) (PCons n -(S n0) (Ss (papp p is2))))) (refl_equal PList (PCons n (S n0) (Ss (papp p -is2)))) (papp (Ss p) (Ss is2)) (H is2))))))) is1). - diff --git a/matita/matita/contribs/lambdadelta/ground_1/preamble.ma b/matita/matita/contribs/lambdadelta/ground_1/preamble.ma deleted file mode 100644 index b19f25444..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/preamble.ma +++ /dev/null @@ -1,15 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "legacy_1/theory.ma". diff --git a/matita/matita/contribs/lambdadelta/ground_1/spare.ma b/matita/matita/contribs/lambdadelta/ground_1/spare.ma deleted file mode 100644 index e3cba9bbc..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/spare.ma +++ /dev/null @@ -1,18 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/theory.ma". - diff --git a/matita/matita/contribs/lambdadelta/ground_1/theory.ma b/matita/matita/contribs/lambdadelta/ground_1/theory.ma deleted file mode 100644 index 2f7065443..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/theory.ma +++ /dev/null @@ -1,28 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/ext/tactics.ma". - -include "ground_1/types/fwd.ma". - -include "ground_1/types/props.ma". - -include "ground_1/ext/arith.ma". - -include "ground_1/blt/props.ma". - -include "ground_1/plist/props.ma". - diff --git a/matita/matita/contribs/lambdadelta/ground_1/types/defs.ma b/matita/matita/contribs/lambdadelta/ground_1/types/defs.ma deleted file mode 100644 index 3a7dadb64..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/types/defs.ma +++ /dev/null @@ -1,174 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/preamble.ma". - -inductive and3 (P0: Prop) (P1: Prop) (P2: Prop): Prop \def -| and3_intro: P0 \to (P1 \to (P2 \to (and3 P0 P1 P2))). - -inductive and4 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop): Prop \def -| and4_intro: P0 \to (P1 \to (P2 \to (P3 \to (and4 P0 P1 P2 P3)))). - -inductive and5 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop) (P4: Prop): Prop -\def -| and5_intro: P0 \to (P1 \to (P2 \to (P3 \to (P4 \to (and5 P0 P1 P2 P3 -P4))))). - -inductive or3 (P0: Prop) (P1: Prop) (P2: Prop): Prop \def -| or3_intro0: P0 \to (or3 P0 P1 P2) -| or3_intro1: P1 \to (or3 P0 P1 P2) -| or3_intro2: P2 \to (or3 P0 P1 P2). - -inductive or4 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop): Prop \def -| or4_intro0: P0 \to (or4 P0 P1 P2 P3) -| or4_intro1: P1 \to (or4 P0 P1 P2 P3) -| or4_intro2: P2 \to (or4 P0 P1 P2 P3) -| or4_intro3: P3 \to (or4 P0 P1 P2 P3). - -inductive or5 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop) (P4: Prop): Prop -\def -| or5_intro0: P0 \to (or5 P0 P1 P2 P3 P4) -| or5_intro1: P1 \to (or5 P0 P1 P2 P3 P4) -| or5_intro2: P2 \to (or5 P0 P1 P2 P3 P4) -| or5_intro3: P3 \to (or5 P0 P1 P2 P3 P4) -| or5_intro4: P4 \to (or5 P0 P1 P2 P3 P4). - -inductive ex3 (A0: Type[0]) (P0: A0 \to Prop) (P1: A0 \to Prop) (P2: A0 \to -Prop): Prop \def -| ex3_intro: \forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to (ex3 A0 -P0 P1 P2)))). - -inductive ex4 (A0: Type[0]) (P0: A0 \to Prop) (P1: A0 \to Prop) (P2: A0 \to -Prop) (P3: A0 \to Prop): Prop \def -| ex4_intro: \forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to ((P3 x0) -\to (ex4 A0 P0 P1 P2 P3))))). - -inductive ex_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)): Prop -\def -| ex_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to (ex_2 A0 A1 -P0))). - -inductive ex2_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)) (P1: -A0 \to (A1 \to Prop)): Prop \def -| ex2_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) -\to (ex2_2 A0 A1 P0 P1)))). - -inductive ex3_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)) (P1: -A0 \to (A1 \to Prop)) (P2: A0 \to (A1 \to Prop)): Prop \def -| ex3_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) -\to ((P2 x0 x1) \to (ex3_2 A0 A1 P0 P1 P2))))). - -inductive ex4_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)) (P1: -A0 \to (A1 \to Prop)) (P2: A0 \to (A1 \to Prop)) (P3: A0 \to (A1 \to Prop)): -Prop \def -| ex4_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) -\to ((P2 x0 x1) \to ((P3 x0 x1) \to (ex4_2 A0 A1 P0 P1 P2 P3)))))). - -inductive ex_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to -(A2 \to Prop))): Prop \def -| ex_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 -x2) \to (ex_3 A0 A1 A2 P0)))). - -inductive ex2_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to -(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))): Prop \def -| ex2_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 -x1 x2) \to ((P1 x0 x1 x2) \to (ex2_3 A0 A1 A2 P0 P1))))). - -inductive ex3_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to -(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))) (P2: A0 \to (A1 \to (A2 -\to Prop))): Prop \def -| ex3_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 -x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to (ex3_3 A0 A1 A2 P0 P1 -P2)))))). - -inductive ex4_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to -(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))) (P2: A0 \to (A1 \to (A2 -\to Prop))) (P3: A0 \to (A1 \to (A2 \to Prop))): Prop \def -| ex4_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 -x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to (ex4_3 A0 -A1 A2 P0 P1 P2 P3))))))). - -inductive ex5_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to -(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))) (P2: A0 \to (A1 \to (A2 -\to Prop))) (P3: A0 \to (A1 \to (A2 \to Prop))) (P4: A0 \to (A1 \to (A2 \to -Prop))): Prop \def -| ex5_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 -x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to ((P4 x0 -x1 x2) \to (ex5_3 A0 A1 A2 P0 P1 P2 P3 P4)))))))). - -inductive ex3_4 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (P0: -A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P1: A0 \to (A1 \to (A2 \to (A3 \to -Prop)))) (P2: A0 \to (A1 \to (A2 \to (A3 \to Prop)))): Prop \def -| ex3_4_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall -(x3: A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to -(ex3_4 A0 A1 A2 A3 P0 P1 P2))))))). - -inductive ex4_4 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (P0: -A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P1: A0 \to (A1 \to (A2 \to (A3 \to -Prop)))) (P2: A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P3: A0 \to (A1 \to (A2 -\to (A3 \to Prop)))): Prop \def -| ex4_4_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall -(x3: A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to -((P3 x0 x1 x2 x3) \to (ex4_4 A0 A1 A2 A3 P0 P1 P2 P3)))))))). - -inductive ex4_5 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: -Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P1: A0 \to -(A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P2: A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to Prop))))) (P3: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))): Prop -\def -| ex4_5_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall -(x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 x1 x2 x3 x4) \to -((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to (ex4_5 A0 A1 A2 A3 A4 P0 P1 -P2 P3))))))))). - -inductive ex5_5 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: -Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P1: A0 \to -(A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P2: A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to Prop))))) (P3: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P4: -A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))): Prop \def -| ex5_5_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall -(x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 x1 x2 x3 x4) \to -((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to ((P4 x0 x1 x2 x3 x4) \to -(ex5_5 A0 A1 A2 A3 A4 P0 P1 P2 P3 P4)))))))))). - -inductive ex6_6 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: -Type[0]) (A5: Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to -Prop)))))) (P1: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) -(P2: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) (P3: A0 \to -(A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) (P4: A0 \to (A1 \to (A2 -\to (A3 \to (A4 \to (A5 \to Prop)))))) (P5: A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to (A5 \to Prop)))))): Prop \def -| ex6_6_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall -(x3: A3).(\forall (x4: A4).(\forall (x5: A5).((P0 x0 x1 x2 x3 x4 x5) \to ((P1 -x0 x1 x2 x3 x4 x5) \to ((P2 x0 x1 x2 x3 x4 x5) \to ((P3 x0 x1 x2 x3 x4 x5) -\to ((P4 x0 x1 x2 x3 x4 x5) \to ((P5 x0 x1 x2 x3 x4 x5) \to (ex6_6 A0 A1 A2 -A3 A4 A5 P0 P1 P2 P3 P4 P5)))))))))))). - -inductive ex6_7 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: -Type[0]) (A5: Type[0]) (A6: Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 -\to (A5 \to (A6 \to Prop))))))) (P1: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -(A5 \to (A6 \to Prop))))))) (P2: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 -\to (A6 \to Prop))))))) (P3: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to -(A6 \to Prop))))))) (P4: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 -\to Prop))))))) (P5: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to -Prop))))))): Prop \def -| ex6_7_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall -(x3: A3).(\forall (x4: A4).(\forall (x5: A5).(\forall (x6: A6).((P0 x0 x1 x2 -x3 x4 x5 x6) \to ((P1 x0 x1 x2 x3 x4 x5 x6) \to ((P2 x0 x1 x2 x3 x4 x5 x6) -\to ((P3 x0 x1 x2 x3 x4 x5 x6) \to ((P4 x0 x1 x2 x3 x4 x5 x6) \to ((P5 x0 x1 -x2 x3 x4 x5 x6) \to (ex6_7 A0 A1 A2 A3 A4 A5 A6 P0 P1 P2 P3 P4 -P5))))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/ground_1/types/fwd.ma b/matita/matita/contribs/lambdadelta/ground_1/types/fwd.ma deleted file mode 100644 index 7cb7c3108..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/types/fwd.ma +++ /dev/null @@ -1,419 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/types/defs.ma". - -implied lemma and3_rect: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P: -Type[0]).(((P0 \to (P1 \to (P2 \to P)))) \to ((and3 P0 P1 P2) \to P))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P: -Type[0]).(\lambda (f: ((P0 \to (P1 \to (P2 \to P))))).(\lambda (a: (and3 P0 -P1 P2)).(match a with [(and3_intro x x0 x1) \Rightarrow (f x x0 x1)])))))). - -implied lemma and3_ind: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P: -Prop).(((P0 \to (P1 \to (P2 \to P)))) \to ((and3 P0 P1 P2) \to P))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P: -Prop).(and3_rect P0 P1 P2 P)))). - -implied lemma and4_rect: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: -Prop).(\forall (P: Type[0]).(((P0 \to (P1 \to (P2 \to (P3 \to P))))) \to -((and4 P0 P1 P2 P3) \to P)))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: -Prop).(\lambda (P: Type[0]).(\lambda (f: ((P0 \to (P1 \to (P2 \to (P3 \to -P)))))).(\lambda (a: (and4 P0 P1 P2 P3)).(match a with [(and4_intro x x0 x1 -x2) \Rightarrow (f x x0 x1 x2)]))))))). - -implied lemma and4_ind: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: -Prop).(\forall (P: Prop).(((P0 \to (P1 \to (P2 \to (P3 \to P))))) \to ((and4 -P0 P1 P2 P3) \to P)))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: -Prop).(\lambda (P: Prop).(and4_rect P0 P1 P2 P3 P))))). - -implied lemma and5_rect: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: -Prop).(\forall (P4: Prop).(\forall (P: Type[0]).(((P0 \to (P1 \to (P2 \to (P3 -\to (P4 \to P)))))) \to ((and5 P0 P1 P2 P3 P4) \to P))))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: -Prop).(\lambda (P4: Prop).(\lambda (P: Type[0]).(\lambda (f: ((P0 \to (P1 \to -(P2 \to (P3 \to (P4 \to P))))))).(\lambda (a: (and5 P0 P1 P2 P3 P4)).(match a -with [(and5_intro x x0 x1 x2 x3) \Rightarrow (f x x0 x1 x2 x3)])))))))). - -implied lemma and5_ind: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: -Prop).(\forall (P4: Prop).(\forall (P: Prop).(((P0 \to (P1 \to (P2 \to (P3 -\to (P4 \to P)))))) \to ((and5 P0 P1 P2 P3 P4) \to P))))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: -Prop).(\lambda (P4: Prop).(\lambda (P: Prop).(and5_rect P0 P1 P2 P3 P4 -P)))))). - -implied lemma or3_ind: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P: -Prop).(((P0 \to P)) \to (((P1 \to P)) \to (((P2 \to P)) \to ((or3 P0 P1 P2) -\to P))))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P: -Prop).(\lambda (f: ((P0 \to P))).(\lambda (f0: ((P1 \to P))).(\lambda (f1: -((P2 \to P))).(\lambda (o: (or3 P0 P1 P2)).(match o with [(or3_intro0 x) -\Rightarrow (f x) | (or3_intro1 x) \Rightarrow (f0 x) | (or3_intro2 x) -\Rightarrow (f1 x)])))))))). - -implied lemma or4_ind: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: -Prop).(\forall (P: Prop).(((P0 \to P)) \to (((P1 \to P)) \to (((P2 \to P)) -\to (((P3 \to P)) \to ((or4 P0 P1 P2 P3) \to P))))))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: -Prop).(\lambda (P: Prop).(\lambda (f: ((P0 \to P))).(\lambda (f0: ((P1 \to -P))).(\lambda (f1: ((P2 \to P))).(\lambda (f2: ((P3 \to P))).(\lambda (o: -(or4 P0 P1 P2 P3)).(match o with [(or4_intro0 x) \Rightarrow (f x) | -(or4_intro1 x) \Rightarrow (f0 x) | (or4_intro2 x) \Rightarrow (f1 x) | -(or4_intro3 x) \Rightarrow (f2 x)])))))))))). - -implied lemma or5_ind: - \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: -Prop).(\forall (P4: Prop).(\forall (P: Prop).(((P0 \to P)) \to (((P1 \to P)) -\to (((P2 \to P)) \to (((P3 \to P)) \to (((P4 \to P)) \to ((or5 P0 P1 P2 P3 -P4) \to P))))))))))) -\def - \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: -Prop).(\lambda (P4: Prop).(\lambda (P: Prop).(\lambda (f: ((P0 \to -P))).(\lambda (f0: ((P1 \to P))).(\lambda (f1: ((P2 \to P))).(\lambda (f2: -((P3 \to P))).(\lambda (f3: ((P4 \to P))).(\lambda (o: (or5 P0 P1 P2 P3 -P4)).(match o with [(or5_intro0 x) \Rightarrow (f x) | (or5_intro1 x) -\Rightarrow (f0 x) | (or5_intro2 x) \Rightarrow (f1 x) | (or5_intro3 x) -\Rightarrow (f2 x) | (or5_intro4 x) \Rightarrow (f3 x)])))))))))))). - -implied lemma ex3_ind: - \forall (A0: Type[0]).(\forall (P0: ((A0 \to Prop))).(\forall (P1: ((A0 \to -Prop))).(\forall (P2: ((A0 \to Prop))).(\forall (P: Prop).(((\forall (x0: -A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to P))))) \to ((ex3 A0 P0 P1 P2) \to -P)))))) -\def - \lambda (A0: Type[0]).(\lambda (P0: ((A0 \to Prop))).(\lambda (P1: ((A0 \to -Prop))).(\lambda (P2: ((A0 \to Prop))).(\lambda (P: Prop).(\lambda (f: -((\forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to P)))))).(\lambda -(e: (ex3 A0 P0 P1 P2)).(match e with [(ex3_intro x x0 x1 x2) \Rightarrow (f x -x0 x1 x2)]))))))). - -implied lemma ex4_ind: - \forall (A0: Type[0]).(\forall (P0: ((A0 \to Prop))).(\forall (P1: ((A0 \to -Prop))).(\forall (P2: ((A0 \to Prop))).(\forall (P3: ((A0 \to -Prop))).(\forall (P: Prop).(((\forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 -x0) \to ((P3 x0) \to P)))))) \to ((ex4 A0 P0 P1 P2 P3) \to P))))))) -\def - \lambda (A0: Type[0]).(\lambda (P0: ((A0 \to Prop))).(\lambda (P1: ((A0 \to -Prop))).(\lambda (P2: ((A0 \to Prop))).(\lambda (P3: ((A0 \to -Prop))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).((P0 x0) \to ((P1 -x0) \to ((P2 x0) \to ((P3 x0) \to P))))))).(\lambda (e: (ex4 A0 P0 P1 P2 -P3)).(match e with [(ex4_intro x x0 x1 x2 x3) \Rightarrow (f x x0 x1 x2 -x3)])))))))). - -implied lemma ex_2_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to -Prop)))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) -\to P)))) \to ((ex_2 A0 A1 P0) \to P))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to -Prop)))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: -A1).((P0 x0 x1) \to P))))).(\lambda (e: (ex_2 A0 A1 P0)).(match e with -[(ex_2_intro x x0 x1) \Rightarrow (f x x0 x1)])))))). - -implied lemma ex2_2_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to -Prop)))).(\forall (P1: ((A0 \to (A1 \to Prop)))).(\forall (P: -Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to -P))))) \to ((ex2_2 A0 A1 P0 P1) \to P)))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to -Prop)))).(\lambda (P1: ((A0 \to (A1 \to Prop)))).(\lambda (P: Prop).(\lambda -(f: ((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to -P)))))).(\lambda (e: (ex2_2 A0 A1 P0 P1)).(match e with [(ex2_2_intro x x0 x1 -x2) \Rightarrow (f x x0 x1 x2)]))))))). - -implied lemma ex3_2_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to -Prop)))).(\forall (P1: ((A0 \to (A1 \to Prop)))).(\forall (P2: ((A0 \to (A1 -\to Prop)))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 -x1) \to ((P1 x0 x1) \to ((P2 x0 x1) \to P)))))) \to ((ex3_2 A0 A1 P0 P1 P2) -\to P))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to -Prop)))).(\lambda (P1: ((A0 \to (A1 \to Prop)))).(\lambda (P2: ((A0 \to (A1 -\to Prop)))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: -A1).((P0 x0 x1) \to ((P1 x0 x1) \to ((P2 x0 x1) \to P))))))).(\lambda (e: -(ex3_2 A0 A1 P0 P1 P2)).(match e with [(ex3_2_intro x x0 x1 x2 x3) -\Rightarrow (f x x0 x1 x2 x3)])))))))). - -implied lemma ex4_2_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to -Prop)))).(\forall (P1: ((A0 \to (A1 \to Prop)))).(\forall (P2: ((A0 \to (A1 -\to Prop)))).(\forall (P3: ((A0 \to (A1 \to Prop)))).(\forall (P: -Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to -((P2 x0 x1) \to ((P3 x0 x1) \to P))))))) \to ((ex4_2 A0 A1 P0 P1 P2 P3) \to -P)))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to -Prop)))).(\lambda (P1: ((A0 \to (A1 \to Prop)))).(\lambda (P2: ((A0 \to (A1 -\to Prop)))).(\lambda (P3: ((A0 \to (A1 \to Prop)))).(\lambda (P: -Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 -x0 x1) \to ((P2 x0 x1) \to ((P3 x0 x1) \to P)))))))).(\lambda (e: (ex4_2 A0 -A1 P0 P1 P2 P3)).(match e with [(ex4_2_intro x x0 x1 x2 x3 x4) \Rightarrow (f -x x0 x1 x2 x3 x4)]))))))))). - -implied lemma ex_3_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P: Prop).(((\forall (x0: -A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to P))))) \to ((ex_3 -A0 A1 A2 P0) \to P)))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P: Prop).(\lambda (f: -((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to -P)))))).(\lambda (e: (ex_3 A0 A1 A2 P0)).(match e with [(ex_3_intro x x0 x1 -x2) \Rightarrow (f x x0 x1 x2)]))))))). - -implied lemma ex2_3_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: -A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to P)))))) \to -((ex2_3 A0 A1 A2 P0 P1) \to P))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall -(x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to -P))))))).(\lambda (e: (ex2_3 A0 A1 A2 P0 P1)).(match e with [(ex2_3_intro x -x0 x1 x2 x3) \Rightarrow (f x x0 x1 x2 x3)])))))))). - -implied lemma ex3_3_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P: -Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) -\to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to P))))))) \to ((ex3_3 A0 A1 A2 P0 P1 -P2) \to P)))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P: -Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: -A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to -P)))))))).(\lambda (e: (ex3_3 A0 A1 A2 P0 P1 P2)).(match e with [(ex3_3_intro -x x0 x1 x2 x3 x4) \Rightarrow (f x x0 x1 x2 x3 x4)]))))))))). - -implied lemma ex4_3_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P3: -((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P: Prop).(((\forall (x0: -A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to -((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to P)))))))) \to ((ex4_3 A0 A1 A2 P0 P1 P2 -P3) \to P))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P3: -((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P: Prop).(\lambda (f: ((\forall -(x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 -x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to P))))))))).(\lambda (e: (ex4_3 -A0 A1 A2 P0 P1 P2 P3)).(match e with [(ex4_3_intro x x0 x1 x2 x3 x4 x5) -\Rightarrow (f x x0 x1 x2 x3 x4 x5)])))))))))). - -implied lemma ex5_3_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P3: -((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P4: ((A0 \to (A1 \to (A2 \to -Prop))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall -(x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 -x2) \to ((P4 x0 x1 x2) \to P))))))))) \to ((ex5_3 A0 A1 A2 P0 P1 P2 P3 P4) -\to P)))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 -\to Prop))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P3: -((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P4: ((A0 \to (A1 \to (A2 \to -Prop))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: -A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) -\to ((P3 x0 x1 x2) \to ((P4 x0 x1 x2) \to P)))))))))).(\lambda (e: (ex5_3 A0 -A1 A2 P0 P1 P2 P3 P4)).(match e with [(ex5_3_intro x x0 x1 x2 x3 x4 x5 x6) -\Rightarrow (f x x0 x1 x2 x3 x4 x5 x6)]))))))))))). - -implied lemma ex3_4_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(A3: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to (A3 \to -Prop)))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall -(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall (P: -Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: -A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to -P)))))))) \to ((ex3_4 A0 A1 A2 A3 P0 P1 P2) \to P))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(A3: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to (A3 \to -Prop)))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda -(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda (P: Prop).(\lambda -(f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: -A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to -P))))))))).(\lambda (e: (ex3_4 A0 A1 A2 A3 P0 P1 P2)).(match e with -[(ex3_4_intro x x0 x1 x2 x3 x4 x5) \Rightarrow (f x x0 x1 x2 x3 x4 -x5)])))))))))). - -implied lemma ex4_4_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(A3: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to (A3 \to -Prop)))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall -(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall (P3: ((A0 \to (A1 -\to (A2 \to (A3 \to Prop)))))).(\forall (P: Prop).(((\forall (x0: -A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).((P0 x0 x1 x2 x3) -\to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to ((P3 x0 x1 x2 x3) \to -P))))))))) \to ((ex4_4 A0 A1 A2 A3 P0 P1 P2 P3) \to P)))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(A3: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to (A3 \to -Prop)))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda -(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda (P3: ((A0 \to (A1 -\to (A2 \to (A3 \to Prop)))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: -A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).((P0 x0 x1 x2 x3) -\to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to ((P3 x0 x1 x2 x3) \to -P)))))))))).(\lambda (e: (ex4_4 A0 A1 A2 A3 P0 P1 P2 P3)).(match e with -[(ex4_4_intro x x0 x1 x2 x3 x4 x5 x6) \Rightarrow (f x x0 x1 x2 x3 x4 x5 -x6)]))))))))))). - -implied lemma ex4_5_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(A3: Type[0]).(\forall (A4: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to -(A3 \to (A4 \to Prop))))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to Prop))))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\forall (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall -(x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 -x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to -P)))))))))) \to ((ex4_5 A0 A1 A2 A3 A4 P0 P1 P2 P3) \to P))))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to -(A3 \to (A4 \to Prop))))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to Prop))))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\lambda (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: -A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 -x4) \to ((P1 x0 x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 -x4) \to P))))))))))).(\lambda (e: (ex4_5 A0 A1 A2 A3 A4 P0 P1 P2 P3)).(match -e with [(ex4_5_intro x x0 x1 x2 x3 x4 x5 x6 x7) \Rightarrow (f x x0 x1 x2 x3 -x4 x5 x6 x7)])))))))))))). - -implied lemma ex5_5_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(A3: Type[0]).(\forall (A4: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to -(A3 \to (A4 \to Prop))))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to Prop))))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\forall (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\forall (P4: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall -(x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 -x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to ((P4 x0 x1 -x2 x3 x4) \to P))))))))))) \to ((ex5_5 A0 A1 A2 A3 A4 P0 P1 P2 P3 P4) \to -P)))))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to -(A3 \to (A4 \to Prop))))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to -(A4 \to Prop))))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\lambda (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\lambda (P4: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to -Prop))))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: -A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 -x4) \to ((P1 x0 x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 -x4) \to ((P4 x0 x1 x2 x3 x4) \to P)))))))))))).(\lambda (e: (ex5_5 A0 A1 A2 -A3 A4 P0 P1 P2 P3 P4)).(match e with [(ex5_5_intro x x0 x1 x2 x3 x4 x5 x6 x7 -x8) \Rightarrow (f x x0 x1 x2 x3 x4 x5 x6 x7 x8)]))))))))))))). - -implied lemma ex6_6_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(A3: Type[0]).(\forall (A4: Type[0]).(\forall (A5: Type[0]).(\forall (P0: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P1: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P2: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P3: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P4: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P5: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P: -Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: -A3).(\forall (x4: A4).(\forall (x5: A5).((P0 x0 x1 x2 x3 x4 x5) \to ((P1 x0 -x1 x2 x3 x4 x5) \to ((P2 x0 x1 x2 x3 x4 x5) \to ((P3 x0 x1 x2 x3 x4 x5) \to -((P4 x0 x1 x2 x3 x4 x5) \to ((P5 x0 x1 x2 x3 x4 x5) \to P))))))))))))) \to -((ex6_6 A0 A1 A2 A3 A4 A5 P0 P1 P2 P3 P4 P5) \to P)))))))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (A5: Type[0]).(\lambda (P0: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P1: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P2: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P3: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P4: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P5: -((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P: -Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: -A2).(\forall (x3: A3).(\forall (x4: A4).(\forall (x5: A5).((P0 x0 x1 x2 x3 x4 -x5) \to ((P1 x0 x1 x2 x3 x4 x5) \to ((P2 x0 x1 x2 x3 x4 x5) \to ((P3 x0 x1 x2 -x3 x4 x5) \to ((P4 x0 x1 x2 x3 x4 x5) \to ((P5 x0 x1 x2 x3 x4 x5) \to -P)))))))))))))).(\lambda (e: (ex6_6 A0 A1 A2 A3 A4 A5 P0 P1 P2 P3 P4 -P5)).(match e with [(ex6_6_intro x x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) -\Rightarrow (f x x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10)]))))))))))))))). - -implied lemma ex6_7_ind: - \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall -(A3: Type[0]).(\forall (A4: Type[0]).(\forall (A5: Type[0]).(\forall (A6: -Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 -\to Prop))))))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 -\to (A6 \to Prop))))))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 -\to (A5 \to (A6 \to Prop))))))))).(\forall (P3: ((A0 \to (A1 \to (A2 \to (A3 -\to (A4 \to (A5 \to (A6 \to Prop))))))))).(\forall (P4: ((A0 \to (A1 \to (A2 -\to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\forall (P5: ((A0 \to (A1 -\to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\forall (P: -Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: -A3).(\forall (x4: A4).(\forall (x5: A5).(\forall (x6: A6).((P0 x0 x1 x2 x3 x4 -x5 x6) \to ((P1 x0 x1 x2 x3 x4 x5 x6) \to ((P2 x0 x1 x2 x3 x4 x5 x6) \to ((P3 -x0 x1 x2 x3 x4 x5 x6) \to ((P4 x0 x1 x2 x3 x4 x5 x6) \to ((P5 x0 x1 x2 x3 x4 -x5 x6) \to P)))))))))))))) \to ((ex6_7 A0 A1 A2 A3 A4 A5 A6 P0 P1 P2 P3 P4 -P5) \to P))))))))))))))) -\def - \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda -(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (A5: Type[0]).(\lambda (A6: -Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 -\to Prop))))))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 -\to (A6 \to Prop))))))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 -\to (A5 \to (A6 \to Prop))))))))).(\lambda (P3: ((A0 \to (A1 \to (A2 \to (A3 -\to (A4 \to (A5 \to (A6 \to Prop))))))))).(\lambda (P4: ((A0 \to (A1 \to (A2 -\to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\lambda (P5: ((A0 \to (A1 -\to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\lambda (P: -Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: -A2).(\forall (x3: A3).(\forall (x4: A4).(\forall (x5: A5).(\forall (x6: -A6).((P0 x0 x1 x2 x3 x4 x5 x6) \to ((P1 x0 x1 x2 x3 x4 x5 x6) \to ((P2 x0 x1 -x2 x3 x4 x5 x6) \to ((P3 x0 x1 x2 x3 x4 x5 x6) \to ((P4 x0 x1 x2 x3 x4 x5 x6) -\to ((P5 x0 x1 x2 x3 x4 x5 x6) \to P))))))))))))))).(\lambda (e: (ex6_7 A0 A1 -A2 A3 A4 A5 A6 P0 P1 P2 P3 P4 P5)).(match e with [(ex6_7_intro x x0 x1 x2 x3 -x4 x5 x6 x7 x8 x9 x10 x11) \Rightarrow (f x x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 -x11)])))))))))))))))). - diff --git a/matita/matita/contribs/lambdadelta/ground_1/types/props.ma b/matita/matita/contribs/lambdadelta/ground_1/types/props.ma deleted file mode 100644 index 79919dc76..000000000 --- a/matita/matita/contribs/lambdadelta/ground_1/types/props.ma +++ /dev/null @@ -1,30 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "ground_1/types/defs.ma". - -lemma ex2_sym: - \forall (A: Type[0]).(\forall (P: ((A \to Prop))).(\forall (Q: ((A \to -Prop))).((ex2 A (\lambda (x: A).(P x)) (\lambda (x: A).(Q x))) \to (ex2 A -(\lambda (x: A).(Q x)) (\lambda (x: A).(P x)))))) -\def - \lambda (A: Type[0]).(\lambda (P: ((A \to Prop))).(\lambda (Q: ((A \to -Prop))).(\lambda (H: (ex2 A (\lambda (x: A).(P x)) (\lambda (x: A).(Q -x)))).(ex2_ind A (\lambda (x: A).(P x)) (\lambda (x: A).(Q x)) (ex2 A -(\lambda (x: A).(Q x)) (\lambda (x: A).(P x))) (\lambda (x: A).(\lambda (H0: -(P x)).(\lambda (H1: (Q x)).(ex_intro2 A (\lambda (x0: A).(Q x0)) (\lambda -(x0: A).(P x0)) x H1 H0)))) H)))). - diff --git a/matita/matita/contribs/lambdadelta/ground_1A/blt/defs.ma b/matita/matita/contribs/lambdadelta/ground_1A/blt/defs.ma new file mode 100644 index 000000000..07fc37400 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/blt/defs.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/preamble.ma". + +rec definition blt (m: nat) (n: nat) on n: bool \def match n with [O +\Rightarrow false | (S n0) \Rightarrow (match m with [O \Rightarrow true | (S +m0) \Rightarrow (blt m0 n0)])]. + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/blt/props.ma b/matita/matita/contribs/lambdadelta/ground_1A/blt/props.ma new file mode 100644 index 000000000..f6094dc97 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/blt/props.ma @@ -0,0 +1,90 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/blt/defs.ma". + +lemma lt_blt: + \forall (x: nat).(\forall (y: nat).((lt y x) \to (eq bool (blt y x) true))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to +(eq bool (blt y n) true)))) (\lambda (y: nat).(\lambda (H: (lt y O)).(let H0 +\def (match H with [le_n \Rightarrow (\lambda (H0: (eq nat (S y) O)).(let H1 +\def (eq_ind nat (S y) (\lambda (e: nat).(match e with [O \Rightarrow False | +(S _) \Rightarrow True])) I O H0) in (False_ind (eq bool (blt y O) true) +H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def +(eq_ind nat (S m) (\lambda (e: nat).(match e with [O \Rightarrow False | (S +_) \Rightarrow True])) I O H1) in (False_ind ((le (S y) m) \to (eq bool (blt +y O) true)) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: +nat).(\lambda (H: ((\forall (y: nat).((lt y n) \to (eq bool (blt y n) +true))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to +(eq bool (blt n0 (S n)) true))) (\lambda (_: (lt O (S n))).(refl_equal bool +true)) (\lambda (n0: nat).(\lambda (_: (((lt n0 (S n)) \to (eq bool (match n0 +with [O \Rightarrow true | (S m) \Rightarrow (blt m n)]) true)))).(\lambda +(H1: (lt (S n0) (S n))).(H n0 (le_S_n (S n0) n H1))))) y)))) x). + +lemma le_bge: + \forall (x: nat).(\forall (y: nat).((le x y) \to (eq bool (blt y x) false))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to +(eq bool (blt y n) false)))) (\lambda (y: nat).(\lambda (_: (le O +y)).(refl_equal bool false))) (\lambda (n: nat).(\lambda (H: ((\forall (y: +nat).((le n y) \to (eq bool (blt y n) false))))).(\lambda (y: nat).(nat_ind +(\lambda (n0: nat).((le (S n) n0) \to (eq bool (blt n0 (S n)) false))) +(\lambda (H0: (le (S n) O)).(let H1 \def (match H0 with [le_n \Rightarrow +(\lambda (H1: (eq nat (S n) O)).(let H2 \def (eq_ind nat (S n) (\lambda (e: +nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) +in (False_ind (eq bool (blt O (S n)) false) H2))) | (le_S m H1) \Rightarrow +(\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: +nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) +in (False_ind ((le (S n) m) \to (eq bool (blt O (S n)) false)) H3)) H1))]) in +(H1 (refl_equal nat O)))) (\lambda (n0: nat).(\lambda (_: (((le (S n) n0) \to +(eq bool (blt n0 (S n)) false)))).(\lambda (H1: (le (S n) (S n0))).(H n0 +(le_S_n n n0 H1))))) y)))) x). + +lemma blt_lt: + \forall (x: nat).(\forall (y: nat).((eq bool (blt y x) true) \to (lt y x))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt +y n) true) \to (lt y n)))) (\lambda (y: nat).(\lambda (H: (eq bool (blt y O) +true)).(let H0 \def (match H with [refl_equal \Rightarrow (\lambda (H0: (eq +bool (blt y O) true)).(let H1 \def (eq_ind bool (blt y O) (\lambda (e: +bool).(match e with [true \Rightarrow False | false \Rightarrow True])) I +true H0) in (False_ind (lt y O) H1)))]) in (H0 (refl_equal bool true))))) +(\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq bool (blt y n) true) +\to (lt y n))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((eq bool (blt +n0 (S n)) true) \to (lt n0 (S n)))) (\lambda (_: (eq bool true true)).(le_S_n +(S O) (S n) (le_n_S (S O) (S n) (le_n_S O n (le_O_n n))))) (\lambda (n0: +nat).(\lambda (_: (((eq bool (match n0 with [O \Rightarrow true | (S m) +\Rightarrow (blt m n)]) true) \to (lt n0 (S n))))).(\lambda (H1: (eq bool +(blt n0 n) true)).(lt_n_S n0 n (H n0 H1))))) y)))) x). + +lemma bge_le: + \forall (x: nat).(\forall (y: nat).((eq bool (blt y x) false) \to (le x y))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt +y n) false) \to (le n y)))) (\lambda (y: nat).(\lambda (_: (eq bool (blt y O) +false)).(le_O_n y))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq +bool (blt y n) false) \to (le n y))))).(\lambda (y: nat).(nat_ind (\lambda +(n0: nat).((eq bool (blt n0 (S n)) false) \to (le (S n) n0))) (\lambda (H0: +(eq bool (blt O (S n)) false)).(let H1 \def (match H0 with [refl_equal +\Rightarrow (\lambda (H1: (eq bool (blt O (S n)) false)).(let H2 \def (eq_ind +bool (blt O (S n)) (\lambda (e: bool).(match e with [true \Rightarrow True | +false \Rightarrow False])) I false H1) in (False_ind (le (S n) O) H2)))]) in +(H1 (refl_equal bool false)))) (\lambda (n0: nat).(\lambda (_: (((eq bool +(blt n0 (S n)) false) \to (le (S n) n0)))).(\lambda (H1: (eq bool (blt (S n0) +(S n)) false)).(le_S_n (S n) (S n0) (le_n_S (S n) (S n0) (le_n_S n n0 (H n0 +H1))))))) y)))) x). + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/definitions.ma b/matita/matita/contribs/lambdadelta/ground_1A/definitions.ma new file mode 100644 index 000000000..639fcd2e2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/definitions.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/types/defs.ma". + +include "ground_1A/blt/defs.ma". + +include "ground_1A/plist/defs.ma". + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/ext/arith.ma b/matita/matita/contribs/lambdadelta/ground_1A/ext/arith.ma new file mode 100644 index 000000000..7bbf6cc24 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/ext/arith.ma @@ -0,0 +1,592 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/preamble.ma". + +lemma nat_dec: + \forall (n1: nat).(\forall (n2: nat).(or (eq nat n1 n2) ((eq nat n1 n2) \to +(\forall (P: Prop).P)))) +\def + \lambda (n1: nat).(nat_ind (\lambda (n: nat).(\forall (n2: nat).(or (eq nat +n n2) ((eq nat n n2) \to (\forall (P: Prop).P))))) (\lambda (n2: +nat).(nat_ind (\lambda (n: nat).(or (eq nat O n) ((eq nat O n) \to (\forall +(P: Prop).P)))) (or_introl (eq nat O O) ((eq nat O O) \to (\forall (P: +Prop).P)) (refl_equal nat O)) (\lambda (n: nat).(\lambda (_: (or (eq nat O n) +((eq nat O n) \to (\forall (P: Prop).P)))).(or_intror (eq nat O (S n)) ((eq +nat O (S n)) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat O (S +n))).(\lambda (P: Prop).(let H1 \def (eq_ind nat O (\lambda (ee: nat).(match +ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H0) in +(False_ind P H1))))))) n2)) (\lambda (n: nat).(\lambda (H: ((\forall (n2: +nat).(or (eq nat n n2) ((eq nat n n2) \to (\forall (P: Prop).P)))))).(\lambda +(n2: nat).(nat_ind (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) +n0) \to (\forall (P: Prop).P)))) (or_intror (eq nat (S n) O) ((eq nat (S n) +O) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat (S n) O)).(\lambda (P: +Prop).(let H1 \def (eq_ind nat (S n) (\lambda (ee: nat).(match ee with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind P H1))))) +(\lambda (n0: nat).(\lambda (H0: (or (eq nat (S n) n0) ((eq nat (S n) n0) \to +(\forall (P: Prop).P)))).(or_ind (eq nat n n0) ((eq nat n n0) \to (\forall +(P: Prop).P)) (or (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to (\forall +(P: Prop).P))) (\lambda (H1: (eq nat n n0)).(let H2 \def (eq_ind_r nat n0 +(\lambda (n3: nat).(or (eq nat (S n) n3) ((eq nat (S n) n3) \to (\forall (P: +Prop).P)))) H0 n H1) in (eq_ind nat n (\lambda (n3: nat).(or (eq nat (S n) (S +n3)) ((eq nat (S n) (S n3)) \to (\forall (P: Prop).P)))) (or_introl (eq nat +(S n) (S n)) ((eq nat (S n) (S n)) \to (\forall (P: Prop).P)) (refl_equal nat +(S n))) n0 H1))) (\lambda (H1: (((eq nat n n0) \to (\forall (P: +Prop).P)))).(or_intror (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to +(\forall (P: Prop).P)) (\lambda (H2: (eq nat (S n) (S n0))).(\lambda (P: +Prop).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e with [O +\Rightarrow n | (S n3) \Rightarrow n3])) (S n) (S n0) H2) in (let H4 \def +(eq_ind_r nat n0 (\lambda (n3: nat).((eq nat n n3) \to (\forall (P0: +Prop).P0))) H1 n H3) in (let H5 \def (eq_ind_r nat n0 (\lambda (n3: nat).(or +(eq nat (S n) n3) ((eq nat (S n) n3) \to (\forall (P0: Prop).P0)))) H0 n H3) +in (H4 (refl_equal nat n) P)))))))) (H n0)))) n2)))) n1). + +lemma simpl_plus_r: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((eq nat (plus m n) +(plus p n)) \to (eq nat m p)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (eq nat +(plus m n) (plus p n))).(simpl_plus_l n m p (eq_ind_r nat (plus m n) (\lambda +(n0: nat).(eq nat n0 (plus n p))) (eq_ind_r nat (plus p n) (\lambda (n0: +nat).(eq nat n0 (plus n p))) (plus_sym p n) (plus m n) H) (plus n m) +(plus_sym n m)))))). + +lemma minus_Sx_Sy: + \forall (x: nat).(\forall (y: nat).(eq nat (minus (S x) (S y)) (minus x y))) +\def + \lambda (x: nat).(\lambda (y: nat).(refl_equal nat (minus x y))). + +lemma minus_plus_r: + \forall (m: nat).(\forall (n: nat).(eq nat (minus (plus m n) n) m)) +\def + \lambda (m: nat).(\lambda (n: nat).(eq_ind_r nat (plus n m) (\lambda (n0: +nat).(eq nat (minus n0 n) m)) (minus_plus n m) (plus m n) (plus_sym m n))). + +lemma plus_permute_2_in_3: + \forall (x: nat).(\forall (y: nat).(\forall (z: nat).(eq nat (plus (plus x +y) z) (plus (plus x z) y)))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (z: nat).(eq_ind_r nat (plus x +(plus y z)) (\lambda (n: nat).(eq nat n (plus (plus x z) y))) (eq_ind_r nat +(plus z y) (\lambda (n: nat).(eq nat (plus x n) (plus (plus x z) y))) (eq_ind +nat (plus (plus x z) y) (\lambda (n: nat).(eq nat n (plus (plus x z) y))) +(refl_equal nat (plus (plus x z) y)) (plus x (plus z y)) (plus_assoc_r x z +y)) (plus y z) (plus_sym y z)) (plus (plus x y) z) (plus_assoc_r x y z)))). + +lemma plus_permute_2_in_3_assoc: + \forall (n: nat).(\forall (h: nat).(\forall (k: nat).(eq nat (plus (plus n +h) k) (plus n (plus k h))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(eq_ind_r nat (plus +(plus n k) h) (\lambda (n0: nat).(eq nat n0 (plus n (plus k h)))) (eq_ind_r +nat (plus (plus n k) h) (\lambda (n0: nat).(eq nat (plus (plus n k) h) n0)) +(refl_equal nat (plus (plus n k) h)) (plus n (plus k h)) (plus_assoc_l n k +h)) (plus (plus n h) k) (plus_permute_2_in_3 n h k)))). + +lemma plus_O: + \forall (x: nat).(\forall (y: nat).((eq nat (plus x y) O) \to (land (eq nat +x O) (eq nat y O)))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq nat (plus +n y) O) \to (land (eq nat n O) (eq nat y O))))) (\lambda (y: nat).(\lambda +(H: (eq nat (plus O y) O)).(conj (eq nat O O) (eq nat y O) (refl_equal nat O) +H))) (\lambda (n: nat).(\lambda (_: ((\forall (y: nat).((eq nat (plus n y) O) +\to (land (eq nat n O) (eq nat y O)))))).(\lambda (y: nat).(\lambda (H0: (eq +nat (plus (S n) y) O)).(let H1 \def (match H0 with [refl_equal \Rightarrow +(\lambda (H1: (eq nat (plus (S n) y) O)).(let H2 \def (eq_ind nat (plus (S n) +y) (\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H1) in (False_ind (land (eq nat (S n) O) (eq nat y O)) H2)))]) in +(H1 (refl_equal nat O))))))) x). + +lemma minus_Sx_SO: + \forall (x: nat).(eq nat (minus (S x) (S O)) x) +\def + \lambda (x: nat).(eq_ind nat x (\lambda (n: nat).(eq nat n x)) (refl_equal +nat x) (minus x O) (minus_n_O x)). + +lemma nat_dec_neg: + \forall (i: nat).(\forall (j: nat).(or (not (eq nat i j)) (eq nat i j))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (j: nat).(or (not (eq +nat n j)) (eq nat n j)))) (\lambda (j: nat).(nat_ind (\lambda (n: nat).(or +(not (eq nat O n)) (eq nat O n))) (or_intror (not (eq nat O O)) (eq nat O O) +(refl_equal nat O)) (\lambda (n: nat).(\lambda (_: (or (not (eq nat O n)) (eq +nat O n))).(or_introl (not (eq nat O (S n))) (eq nat O (S n)) (O_S n)))) j)) +(\lambda (n: nat).(\lambda (H: ((\forall (j: nat).(or (not (eq nat n j)) (eq +nat n j))))).(\lambda (j: nat).(nat_ind (\lambda (n0: nat).(or (not (eq nat +(S n) n0)) (eq nat (S n) n0))) (or_introl (not (eq nat (S n) O)) (eq nat (S +n) O) (sym_not_eq nat O (S n) (O_S n))) (\lambda (n0: nat).(\lambda (_: (or +(not (eq nat (S n) n0)) (eq nat (S n) n0))).(or_ind (not (eq nat n n0)) (eq +nat n n0) (or (not (eq nat (S n) (S n0))) (eq nat (S n) (S n0))) (\lambda +(H1: (not (eq nat n n0))).(or_introl (not (eq nat (S n) (S n0))) (eq nat (S +n) (S n0)) (not_eq_S n n0 H1))) (\lambda (H1: (eq nat n n0)).(or_intror (not +(eq nat (S n) (S n0))) (eq nat (S n) (S n0)) (f_equal nat nat S n n0 H1))) (H +n0)))) j)))) i). + +lemma neq_eq_e: + \forall (i: nat).(\forall (j: nat).(\forall (P: Prop).((((not (eq nat i j)) +\to P)) \to ((((eq nat i j) \to P)) \to P)))) +\def + \lambda (i: nat).(\lambda (j: nat).(\lambda (P: Prop).(\lambda (H: (((not +(eq nat i j)) \to P))).(\lambda (H0: (((eq nat i j) \to P))).(let o \def +(nat_dec_neg i j) in (or_ind (not (eq nat i j)) (eq nat i j) P H H0 o)))))). + +lemma le_false: + \forall (m: nat).(\forall (n: nat).(\forall (P: Prop).((le m n) \to ((le (S +n) m) \to P)))) +\def + \lambda (m: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).(\forall (P: +Prop).((le n n0) \to ((le (S n0) n) \to P))))) (\lambda (n: nat).(\lambda (P: +Prop).(\lambda (_: (le O n)).(\lambda (H0: (le (S n) O)).(let H1 \def (match +H0 with [le_n \Rightarrow (\lambda (H1: (eq nat (S n) O)).(let H2 \def +(eq_ind nat (S n) (\lambda (e: nat).(match e with [O \Rightarrow False | (S +_) \Rightarrow True])) I O H1) in (False_ind P H2))) | (le_S m0 H1) +\Rightarrow (\lambda (H2: (eq nat (S m0) O)).((let H3 \def (eq_ind nat (S m0) +(\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H2) in (False_ind ((le (S n) m0) \to P) H3)) H1))]) in (H1 +(refl_equal nat O))))))) (\lambda (n: nat).(\lambda (H: ((\forall (n0: +nat).(\forall (P: Prop).((le n n0) \to ((le (S n0) n) \to P)))))).(\lambda +(n0: nat).(nat_ind (\lambda (n1: nat).(\forall (P: Prop).((le (S n) n1) \to +((le (S n1) (S n)) \to P)))) (\lambda (P: Prop).(\lambda (H0: (le (S n) +O)).(\lambda (_: (le (S O) (S n))).(let H2 \def (match H0 with [le_n +\Rightarrow (\lambda (H2: (eq nat (S n) O)).(let H3 \def (eq_ind nat (S n) +(\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H2) in (False_ind P H3))) | (le_S m0 H2) \Rightarrow (\lambda +(H3: (eq nat (S m0) O)).((let H4 \def (eq_ind nat (S m0) (\lambda (e: +nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) +in (False_ind ((le (S n) m0) \to P) H4)) H2))]) in (H2 (refl_equal nat +O)))))) (\lambda (n1: nat).(\lambda (_: ((\forall (P: Prop).((le (S n) n1) +\to ((le (S n1) (S n)) \to P))))).(\lambda (P: Prop).(\lambda (H1: (le (S n) +(S n1))).(\lambda (H2: (le (S (S n1)) (S n))).(H n1 P (le_S_n n n1 H1) +(le_S_n (S n1) n H2))))))) n0)))) m). + +lemma le_Sx_x: + \forall (x: nat).((le (S x) x) \to (\forall (P: Prop).P)) +\def + \lambda (x: nat).(\lambda (H: (le (S x) x)).(\lambda (P: Prop).(let H0 \def +le_Sn_n in (False_ind P (H0 x H))))). + +lemma le_n_pred: + \forall (n: nat).(\forall (m: nat).((le n m) \to (le (pred n) (pred m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda +(n0: nat).(le (pred n) (pred n0))) (le_n (pred n)) (\lambda (m0: +nat).(\lambda (_: (le n m0)).(\lambda (H1: (le (pred n) (pred m0))).(le_trans +(pred n) (pred m0) m0 H1 (le_pred_n m0))))) m H))). + +lemma minus_le: + \forall (x: nat).(\forall (y: nat).(le (minus x y) x)) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).(le (minus n +y) n))) (\lambda (_: nat).(le_O_n O)) (\lambda (n: nat).(\lambda (H: +((\forall (y: nat).(le (minus n y) n)))).(\lambda (y: nat).(nat_ind (\lambda +(n0: nat).(le (minus (S n) n0) (S n))) (le_n (S n)) (\lambda (n0: +nat).(\lambda (_: (le (match n0 with [O \Rightarrow (S n) | (S l) \Rightarrow +(minus n l)]) (S n))).(le_S (minus n n0) n (H n0)))) y)))) x). + +lemma le_plus_minus_sym: + \forall (n: nat).(\forall (m: nat).((le n m) \to (eq nat m (plus (minus m n) +n)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(eq_ind_r nat +(plus n (minus m n)) (\lambda (n0: nat).(eq nat m n0)) (le_plus_minus n m H) +(plus (minus m n) n) (plus_sym (minus m n) n)))). + +lemma le_minus_minus: + \forall (x: nat).(\forall (y: nat).((le x y) \to (\forall (z: nat).((le y z) +\to (le (minus y x) (minus z x)))))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (le x y)).(\lambda (z: +nat).(\lambda (H0: (le y z)).(simpl_le_plus_l x (minus y x) (minus z x) +(eq_ind_r nat y (\lambda (n: nat).(le n (plus x (minus z x)))) (eq_ind_r nat +z (\lambda (n: nat).(le y n)) H0 (plus x (minus z x)) (le_plus_minus_r x z +(le_trans x y z H H0))) (plus x (minus y x)) (le_plus_minus_r x y H))))))). + +lemma le_minus_plus: + \forall (z: nat).(\forall (x: nat).((le z x) \to (\forall (y: nat).(eq nat +(minus (plus x y) z) (plus (minus x z) y))))) +\def + \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((le n x) \to +(\forall (y: nat).(eq nat (minus (plus x y) n) (plus (minus x n) y)))))) +(\lambda (x: nat).(\lambda (H: (le O x)).(let H0 \def (match H with [le_n +\Rightarrow (\lambda (H0: (eq nat O x)).(eq_ind nat O (\lambda (n: +nat).(\forall (y: nat).(eq nat (minus (plus n y) O) (plus (minus n O) y)))) +(\lambda (y: nat).(sym_eq nat (plus (minus O O) y) (minus (plus O y) O) +(minus_n_O (plus O y)))) x H0)) | (le_S m H0) \Rightarrow (\lambda (H1: (eq +nat (S m) x)).(eq_ind nat (S m) (\lambda (n: nat).((le O m) \to (\forall (y: +nat).(eq nat (minus (plus n y) O) (plus (minus n O) y))))) (\lambda (_: (le O +m)).(\lambda (y: nat).(refl_equal nat (plus (minus (S m) O) y)))) x H1 H0))]) +in (H0 (refl_equal nat x))))) (\lambda (z0: nat).(\lambda (H: ((\forall (x: +nat).((le z0 x) \to (\forall (y: nat).(eq nat (minus (plus x y) z0) (plus +(minus x z0) y))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).((le (S +z0) n) \to (\forall (y: nat).(eq nat (minus (plus n y) (S z0)) (plus (minus n +(S z0)) y))))) (\lambda (H0: (le (S z0) O)).(\lambda (y: nat).(let H1 \def +(match H0 with [le_n \Rightarrow (\lambda (H1: (eq nat (S z0) O)).(let H2 +\def (eq_ind nat (S z0) (\lambda (e: nat).(match e with [O \Rightarrow False +| (S _) \Rightarrow True])) I O H1) in (False_ind (eq nat (minus (plus O y) +(S z0)) (plus (minus O (S z0)) y)) H2))) | (le_S m H1) \Rightarrow (\lambda +(H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: +nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) +in (False_ind ((le (S z0) m) \to (eq nat (minus (plus O y) (S z0)) (plus +(minus O (S z0)) y))) H3)) H1))]) in (H1 (refl_equal nat O))))) (\lambda (n: +nat).(\lambda (_: (((le (S z0) n) \to (\forall (y: nat).(eq nat (minus (plus +n y) (S z0)) (plus (minus n (S z0)) y)))))).(\lambda (H1: (le (S z0) (S +n))).(\lambda (y: nat).(H n (le_S_n z0 n H1) y))))) x)))) z). + +lemma le_minus: + \forall (x: nat).(\forall (z: nat).(\forall (y: nat).((le (plus x y) z) \to +(le x (minus z y))))) +\def + \lambda (x: nat).(\lambda (z: nat).(\lambda (y: nat).(\lambda (H: (le (plus +x y) z)).(eq_ind nat (minus (plus x y) y) (\lambda (n: nat).(le n (minus z +y))) (le_minus_minus y (plus x y) (le_plus_r x y) z H) x (minus_plus_r x +y))))). + +lemma le_trans_plus_r: + \forall (x: nat).(\forall (y: nat).(\forall (z: nat).((le (plus x y) z) \to +(le y z)))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (z: nat).(\lambda (H: (le (plus +x y) z)).(le_trans y (plus x y) z (le_plus_r x y) H)))). + +lemma lt_x_O: + \forall (x: nat).((lt x O) \to (\forall (P: Prop).P)) +\def + \lambda (x: nat).(\lambda (H: (le (S x) O)).(\lambda (P: Prop).(let H_y \def +(le_n_O_eq (S x) H) in (let H0 \def (eq_ind nat O (\lambda (ee: nat).(match +ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) H_y) in +(False_ind P H0))))). + +lemma le_gen_S: + \forall (m: nat).(\forall (x: nat).((le (S m) x) \to (ex2 nat (\lambda (n: +nat).(eq nat x (S n))) (\lambda (n: nat).(le m n))))) +\def + \lambda (m: nat).(\lambda (x: nat).(\lambda (H: (le (S m) x)).(let H0 \def +(match H with [le_n \Rightarrow (\lambda (H0: (eq nat (S m) x)).(eq_ind nat +(S m) (\lambda (n: nat).(ex2 nat (\lambda (n0: nat).(eq nat n (S n0))) +(\lambda (n0: nat).(le m n0)))) (ex_intro2 nat (\lambda (n: nat).(eq nat (S +m) (S n))) (\lambda (n: nat).(le m n)) m (refl_equal nat (S m)) (le_n m)) x +H0)) | (le_S m0 H0) \Rightarrow (\lambda (H1: (eq nat (S m0) x)).(eq_ind nat +(S m0) (\lambda (n: nat).((le (S m) m0) \to (ex2 nat (\lambda (n0: nat).(eq +nat n (S n0))) (\lambda (n0: nat).(le m n0))))) (\lambda (H2: (le (S m) +m0)).(ex_intro2 nat (\lambda (n: nat).(eq nat (S m0) (S n))) (\lambda (n: +nat).(le m n)) m0 (refl_equal nat (S m0)) (le_S_n m m0 (le_S (S m) m0 H2)))) +x H1 H0))]) in (H0 (refl_equal nat x))))). + +lemma lt_x_plus_x_Sy: + \forall (x: nat).(\forall (y: nat).(lt x (plus x (S y)))) +\def + \lambda (x: nat).(\lambda (y: nat).(eq_ind_r nat (plus (S y) x) (\lambda (n: +nat).(lt x n)) (le_S_n (S x) (S (plus y x)) (le_n_S (S x) (S (plus y x)) +(le_n_S x (plus y x) (le_plus_r y x)))) (plus x (S y)) (plus_sym x (S y)))). + +lemma simpl_lt_plus_r: + \forall (p: nat).(\forall (n: nat).(\forall (m: nat).((lt (plus n p) (plus m +p)) \to (lt n m)))) +\def + \lambda (p: nat).(\lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt (plus +n p) (plus m p))).(simpl_lt_plus_l n m p (let H0 \def (eq_ind nat (plus n p) +(\lambda (n0: nat).(lt n0 (plus m p))) H (plus p n) (plus_sym n p)) in (let +H1 \def (eq_ind nat (plus m p) (\lambda (n0: nat).(lt (plus p n) n0)) H0 +(plus p m) (plus_sym m p)) in H1)))))). + +lemma minus_x_Sy: + \forall (x: nat).(\forall (y: nat).((lt y x) \to (eq nat (minus x y) (S +(minus x (S y)))))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to +(eq nat (minus n y) (S (minus n (S y))))))) (\lambda (y: nat).(\lambda (H: +(lt y O)).(let H0 \def (match H with [le_n \Rightarrow (\lambda (H0: (eq nat +(S y) O)).(let H1 \def (eq_ind nat (S y) (\lambda (e: nat).(match e with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq nat +(minus O y) (S (minus O (S y)))) H1))) | (le_S m H0) \Rightarrow (\lambda +(H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: +nat).(match e with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) +in (False_ind ((le (S y) m) \to (eq nat (minus O y) (S (minus O (S y))))) +H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (H: +((\forall (y: nat).((lt y n) \to (eq nat (minus n y) (S (minus n (S +y)))))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to +(eq nat (minus (S n) n0) (S (minus (S n) (S n0)))))) (\lambda (_: (lt O (S +n))).(eq_ind nat n (\lambda (n0: nat).(eq nat (S n) (S n0))) (refl_equal nat +(S n)) (minus n O) (minus_n_O n))) (\lambda (n0: nat).(\lambda (_: (((lt n0 +(S n)) \to (eq nat (minus (S n) n0) (S (minus (S n) (S n0))))))).(\lambda +(H1: (lt (S n0) (S n))).(let H2 \def (le_S_n (S n0) n H1) in (H n0 H2))))) +y)))) x). + +lemma lt_plus_minus: + \forall (x: nat).(\forall (y: nat).((lt x y) \to (eq nat y (S (plus x (minus +y (S x))))))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(le_plus_minus (S +x) y H))). + +lemma lt_plus_minus_r: + \forall (x: nat).(\forall (y: nat).((lt x y) \to (eq nat y (S (plus (minus y +(S x)) x))))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(eq_ind_r nat +(plus x (minus y (S x))) (\lambda (n: nat).(eq nat y (S n))) (lt_plus_minus x +y H) (plus (minus y (S x)) x) (plus_sym (minus y (S x)) x)))). + +lemma minus_x_SO: + \forall (x: nat).((lt O x) \to (eq nat x (S (minus x (S O))))) +\def + \lambda (x: nat).(\lambda (H: (lt O x)).(eq_ind nat (minus x O) (\lambda (n: +nat).(eq nat x n)) (eq_ind nat x (\lambda (n: nat).(eq nat x n)) (refl_equal +nat x) (minus x O) (minus_n_O x)) (S (minus x (S O))) (minus_x_Sy x O H))). + +lemma le_x_pred_y: + \forall (y: nat).(\forall (x: nat).((lt x y) \to (le x (pred y)))) +\def + \lambda (y: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((lt x n) \to +(le x (pred n))))) (\lambda (x: nat).(\lambda (H: (lt x O)).(let H0 \def +(match H with [le_n \Rightarrow (\lambda (H0: (eq nat (S x) O)).(let H1 \def +(eq_ind nat (S x) (\lambda (e: nat).(match e with [O \Rightarrow False | (S +_) \Rightarrow True])) I O H0) in (False_ind (le x O) H1))) | (le_S m H0) +\Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) +(\lambda (e: nat).(match e with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H1) in (False_ind ((le (S x) m) \to (le x O)) H2)) H0))]) in (H0 +(refl_equal nat O))))) (\lambda (n: nat).(\lambda (_: ((\forall (x: nat).((lt +x n) \to (le x (pred n)))))).(\lambda (x: nat).(\lambda (H0: (lt x (S +n))).(le_S_n x n H0))))) y). + +lemma lt_le_minus: + \forall (x: nat).(\forall (y: nat).((lt x y) \to (le x (minus y (S O))))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(le_minus x y (S +O) (eq_ind_r nat (plus (S O) x) (\lambda (n: nat).(le n y)) H (plus x (S O)) +(plus_sym x (S O)))))). + +lemma lt_le_e: + \forall (n: nat).(\forall (d: nat).(\forall (P: Prop).((((lt n d) \to P)) +\to ((((le d n) \to P)) \to P)))) +\def + \lambda (n: nat).(\lambda (d: nat).(\lambda (P: Prop).(\lambda (H: (((lt n +d) \to P))).(\lambda (H0: (((le d n) \to P))).(let H1 \def (le_or_lt d n) in +(or_ind (le d n) (lt n d) P H0 H H1)))))). + +lemma lt_eq_e: + \forall (x: nat).(\forall (y: nat).(\forall (P: Prop).((((lt x y) \to P)) +\to ((((eq nat x y) \to P)) \to ((le x y) \to P))))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (P: Prop).(\lambda (H: (((lt x +y) \to P))).(\lambda (H0: (((eq nat x y) \to P))).(\lambda (H1: (le x +y)).(or_ind (lt x y) (eq nat x y) P H H0 (le_lt_or_eq x y H1))))))). + +lemma lt_eq_gt_e: + \forall (x: nat).(\forall (y: nat).(\forall (P: Prop).((((lt x y) \to P)) +\to ((((eq nat x y) \to P)) \to ((((lt y x) \to P)) \to P))))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (P: Prop).(\lambda (H: (((lt x +y) \to P))).(\lambda (H0: (((eq nat x y) \to P))).(\lambda (H1: (((lt y x) +\to P))).(lt_le_e x y P H (\lambda (H2: (le y x)).(lt_eq_e y x P H1 (\lambda +(H3: (eq nat y x)).(H0 (sym_eq nat y x H3))) H2)))))))). + +lemma lt_gen_xS: + \forall (x: nat).(\forall (n: nat).((lt x (S n)) \to (or (eq nat x O) (ex2 +nat (\lambda (m: nat).(eq nat x (S m))) (\lambda (m: nat).(lt m n)))))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((lt n (S +n0)) \to (or (eq nat n O) (ex2 nat (\lambda (m: nat).(eq nat n (S m))) +(\lambda (m: nat).(lt m n0))))))) (\lambda (n: nat).(\lambda (_: (lt O (S +n))).(or_introl (eq nat O O) (ex2 nat (\lambda (m: nat).(eq nat O (S m))) +(\lambda (m: nat).(lt m n))) (refl_equal nat O)))) (\lambda (n: nat).(\lambda +(_: ((\forall (n0: nat).((lt n (S n0)) \to (or (eq nat n O) (ex2 nat (\lambda +(m: nat).(eq nat n (S m))) (\lambda (m: nat).(lt m n0)))))))).(\lambda (n0: +nat).(\lambda (H0: (lt (S n) (S n0))).(or_intror (eq nat (S n) O) (ex2 nat +(\lambda (m: nat).(eq nat (S n) (S m))) (\lambda (m: nat).(lt m n0))) +(ex_intro2 nat (\lambda (m: nat).(eq nat (S n) (S m))) (\lambda (m: nat).(lt +m n0)) n (refl_equal nat (S n)) (le_S_n (S n) n0 H0))))))) x). + +lemma le_lt_false: + \forall (x: nat).(\forall (y: nat).((le x y) \to ((lt y x) \to (\forall (P: +Prop).P)))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (le x y)).(\lambda (H0: (lt +y x)).(\lambda (P: Prop).(False_ind P (le_not_lt x y H H0)))))). + +lemma lt_neq: + \forall (x: nat).(\forall (y: nat).((lt x y) \to (not (eq nat x y)))) +\def + \lambda (x: nat).(\lambda (y: nat).(\lambda (H: (lt x y)).(\lambda (H0: (eq +nat x y)).(let H1 \def (eq_ind nat x (\lambda (n: nat).(lt n y)) H y H0) in +(lt_n_n y H1))))). + +lemma arith0: + \forall (h2: nat).(\forall (d2: nat).(\forall (n: nat).((le (plus d2 h2) n) +\to (\forall (h1: nat).(le (plus d2 h1) (minus (plus n h1) h2)))))) +\def + \lambda (h2: nat).(\lambda (d2: nat).(\lambda (n: nat).(\lambda (H: (le +(plus d2 h2) n)).(\lambda (h1: nat).(eq_ind nat (minus (plus h2 (plus d2 h1)) +h2) (\lambda (n0: nat).(le n0 (minus (plus n h1) h2))) (le_minus_minus h2 +(plus h2 (plus d2 h1)) (le_plus_l h2 (plus d2 h1)) (plus n h1) (eq_ind_r nat +(plus (plus h2 d2) h1) (\lambda (n0: nat).(le n0 (plus n h1))) (eq_ind_r nat +(plus d2 h2) (\lambda (n0: nat).(le (plus n0 h1) (plus n h1))) (le_S_n (plus +(plus d2 h2) h1) (plus n h1) (le_n_S (plus (plus d2 h2) h1) (plus n h1) +(le_plus_plus (plus d2 h2) n h1 h1 H (le_n h1)))) (plus h2 d2) (plus_sym h2 +d2)) (plus h2 (plus d2 h1)) (plus_assoc_l h2 d2 h1))) (plus d2 h1) +(minus_plus h2 (plus d2 h1))))))). + +lemma O_minus: + \forall (x: nat).(\forall (y: nat).((le x y) \to (eq nat (minus x y) O))) +\def + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to +(eq nat (minus n y) O)))) (\lambda (y: nat).(\lambda (_: (le O +y)).(refl_equal nat O))) (\lambda (x0: nat).(\lambda (H: ((\forall (y: +nat).((le x0 y) \to (eq nat (minus x0 y) O))))).(\lambda (y: nat).(nat_ind +(\lambda (n: nat).((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S +x0) | (S l) \Rightarrow (minus x0 l)]) O))) (\lambda (H0: (le (S x0) +O)).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le x0 +n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H1: (eq nat O (S +x1))).(\lambda (_: (le x0 x1)).(let H3 \def (eq_ind nat O (\lambda (ee: +nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) +H1) in (False_ind (eq nat (S x0) O) H3))))) (le_gen_S x0 O H0))) (\lambda (n: +nat).(\lambda (_: (((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S +x0) | (S l) \Rightarrow (minus x0 l)]) O)))).(\lambda (H1: (le (S x0) (S +n))).(H n (le_S_n x0 n H1))))) y)))) x). + +lemma minus_minus: + \forall (z: nat).(\forall (x: nat).(\forall (y: nat).((le z x) \to ((le z y) +\to ((eq nat (minus x z) (minus y z)) \to (eq nat x y)))))) +\def + \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).(\forall (y: +nat).((le n x) \to ((le n y) \to ((eq nat (minus x n) (minus y n)) \to (eq +nat x y))))))) (\lambda (x: nat).(\lambda (y: nat).(\lambda (_: (le O +x)).(\lambda (_: (le O y)).(\lambda (H1: (eq nat (minus x O) (minus y +O))).(let H2 \def (eq_ind_r nat (minus x O) (\lambda (n: nat).(eq nat n +(minus y O))) H1 x (minus_n_O x)) in (let H3 \def (eq_ind_r nat (minus y O) +(\lambda (n: nat).(eq nat x n)) H2 y (minus_n_O y)) in H3))))))) (\lambda +(z0: nat).(\lambda (IH: ((\forall (x: nat).(\forall (y: nat).((le z0 x) \to +((le z0 y) \to ((eq nat (minus x z0) (minus y z0)) \to (eq nat x +y)))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le +(S z0) n) \to ((le (S z0) y) \to ((eq nat (minus n (S z0)) (minus y (S z0))) +\to (eq nat n y)))))) (\lambda (y: nat).(\lambda (H: (le (S z0) O)).(\lambda +(_: (le (S z0) y)).(\lambda (_: (eq nat (minus O (S z0)) (minus y (S +z0)))).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le +z0 n)) (eq nat O y) (\lambda (x0: nat).(\lambda (H2: (eq nat O (S +x0))).(\lambda (_: (le z0 x0)).(let H4 \def (eq_ind nat O (\lambda (ee: +nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x0) +H2) in (False_ind (eq nat O y) H4))))) (le_gen_S z0 O H)))))) (\lambda (x0: +nat).(\lambda (_: ((\forall (y: nat).((le (S z0) x0) \to ((le (S z0) y) \to +((eq nat (minus x0 (S z0)) (minus y (S z0))) \to (eq nat x0 y))))))).(\lambda +(y: nat).(nat_ind (\lambda (n: nat).((le (S z0) (S x0)) \to ((le (S z0) n) +\to ((eq nat (minus (S x0) (S z0)) (minus n (S z0))) \to (eq nat (S x0) +n))))) (\lambda (H: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) O)).(\lambda +(_: (eq nat (minus (S x0) (S z0)) (minus O (S z0)))).(let H_y \def (le_S_n z0 +x0 H) in (ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: +nat).(le z0 n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H2: (eq nat O +(S x1))).(\lambda (_: (le z0 x1)).(let H4 \def (eq_ind nat O (\lambda (ee: +nat).(match ee with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) +H2) in (False_ind (eq nat (S x0) O) H4))))) (le_gen_S z0 O H0)))))) (\lambda +(y0: nat).(\lambda (_: (((le (S z0) (S x0)) \to ((le (S z0) y0) \to ((eq nat +(minus (S x0) (S z0)) (minus y0 (S z0))) \to (eq nat (S x0) y0)))))).(\lambda +(H: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) (S y0))).(\lambda (H1: (eq +nat (minus (S x0) (S z0)) (minus (S y0) (S z0)))).(f_equal nat nat S x0 y0 +(IH x0 y0 (le_S_n z0 x0 H) (le_S_n z0 y0 H0) H1))))))) y)))) x)))) z). + +lemma plus_plus: + \forall (z: nat).(\forall (x1: nat).(\forall (x2: nat).(\forall (y1: +nat).(\forall (y2: nat).((le x1 z) \to ((le x2 z) \to ((eq nat (plus (minus z +x1) y1) (plus (minus z x2) y2)) \to (eq nat (plus x1 y2) (plus x2 y1))))))))) +\def + \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x1: nat).(\forall (x2: +nat).(\forall (y1: nat).(\forall (y2: nat).((le x1 n) \to ((le x2 n) \to ((eq +nat (plus (minus n x1) y1) (plus (minus n x2) y2)) \to (eq nat (plus x1 y2) +(plus x2 y1)))))))))) (\lambda (x1: nat).(\lambda (x2: nat).(\lambda (y1: +nat).(\lambda (y2: nat).(\lambda (H: (le x1 O)).(\lambda (H0: (le x2 +O)).(\lambda (H1: (eq nat y1 y2)).(eq_ind nat y1 (\lambda (n: nat).(eq nat +(plus x1 n) (plus x2 y1))) (let H_y \def (le_n_O_eq x2 H0) in (eq_ind nat O +(\lambda (n: nat).(eq nat (plus x1 y1) (plus n y1))) (let H_y0 \def +(le_n_O_eq x1 H) in (eq_ind nat O (\lambda (n: nat).(eq nat (plus n y1) (plus +O y1))) (refl_equal nat (plus O y1)) x1 H_y0)) x2 H_y)) y2 H1)))))))) +(\lambda (z0: nat).(\lambda (IH: ((\forall (x1: nat).(\forall (x2: +nat).(\forall (y1: nat).(\forall (y2: nat).((le x1 z0) \to ((le x2 z0) \to +((eq nat (plus (minus z0 x1) y1) (plus (minus z0 x2) y2)) \to (eq nat (plus +x1 y2) (plus x2 y1))))))))))).(\lambda (x1: nat).(nat_ind (\lambda (n: +nat).(\forall (x2: nat).(\forall (y1: nat).(\forall (y2: nat).((le n (S z0)) +\to ((le x2 (S z0)) \to ((eq nat (plus (minus (S z0) n) y1) (plus (minus (S +z0) x2) y2)) \to (eq nat (plus n y2) (plus x2 y1))))))))) (\lambda (x2: +nat).(nat_ind (\lambda (n: nat).(\forall (y1: nat).(\forall (y2: nat).((le O +(S z0)) \to ((le n (S z0)) \to ((eq nat (plus (minus (S z0) O) y1) (plus +(minus (S z0) n) y2)) \to (eq nat (plus O y2) (plus n y1)))))))) (\lambda +(y1: nat).(\lambda (y2: nat).(\lambda (_: (le O (S z0))).(\lambda (_: (le O +(S z0))).(\lambda (H1: (eq nat (S (plus z0 y1)) (S (plus z0 y2)))).(let H_y +\def (IH O O) in (let H2 \def (eq_ind_r nat (minus z0 O) (\lambda (n: +nat).(\forall (y3: nat).(\forall (y4: nat).((le O z0) \to ((le O z0) \to ((eq +nat (plus n y3) (plus n y4)) \to (eq nat y4 y3))))))) H_y z0 (minus_n_O z0)) +in (H2 y1 y2 (le_O_n z0) (le_O_n z0) (eq_add_S (plus z0 y1) (plus z0 y2) +H1))))))))) (\lambda (x3: nat).(\lambda (_: ((\forall (y1: nat).(\forall (y2: +nat).((le O (S z0)) \to ((le x3 (S z0)) \to ((eq nat (S (plus z0 y1)) (plus +(match x3 with [O \Rightarrow (S z0) | (S l) \Rightarrow (minus z0 l)]) y2)) +\to (eq nat y2 (plus x3 y1))))))))).(\lambda (y1: nat).(\lambda (y2: +nat).(\lambda (_: (le O (S z0))).(\lambda (H0: (le (S x3) (S z0))).(\lambda +(H1: (eq nat (S (plus z0 y1)) (plus (minus z0 x3) y2))).(let H_y \def (IH O +x3 (S y1)) in (let H2 \def (eq_ind_r nat (minus z0 O) (\lambda (n: +nat).(\forall (y3: nat).((le O z0) \to ((le x3 z0) \to ((eq nat (plus n (S +y1)) (plus (minus z0 x3) y3)) \to (eq nat y3 (plus x3 (S y1)))))))) H_y z0 +(minus_n_O z0)) in (let H3 \def (eq_ind_r nat (plus z0 (S y1)) (\lambda (n: +nat).(\forall (y3: nat).((le O z0) \to ((le x3 z0) \to ((eq nat n (plus +(minus z0 x3) y3)) \to (eq nat y3 (plus x3 (S y1)))))))) H2 (S (plus z0 y1)) +(plus_n_Sm z0 y1)) in (let H4 \def (eq_ind_r nat (plus x3 (S y1)) (\lambda +(n: nat).(\forall (y3: nat).((le O z0) \to ((le x3 z0) \to ((eq nat (S (plus +z0 y1)) (plus (minus z0 x3) y3)) \to (eq nat y3 n)))))) H3 (S (plus x3 y1)) +(plus_n_Sm x3 y1)) in (H4 y2 (le_O_n z0) (le_S_n x3 z0 H0) H1)))))))))))) +x2)) (\lambda (x2: nat).(\lambda (_: ((\forall (x3: nat).(\forall (y1: +nat).(\forall (y2: nat).((le x2 (S z0)) \to ((le x3 (S z0)) \to ((eq nat +(plus (minus (S z0) x2) y1) (plus (minus (S z0) x3) y2)) \to (eq nat (plus x2 +y2) (plus x3 y1)))))))))).(\lambda (x3: nat).(nat_ind (\lambda (n: +nat).(\forall (y1: nat).(\forall (y2: nat).((le (S x2) (S z0)) \to ((le n (S +z0)) \to ((eq nat (plus (minus (S z0) (S x2)) y1) (plus (minus (S z0) n) y2)) +\to (eq nat (plus (S x2) y2) (plus n y1)))))))) (\lambda (y1: nat).(\lambda +(y2: nat).(\lambda (H: (le (S x2) (S z0))).(\lambda (_: (le O (S +z0))).(\lambda (H1: (eq nat (plus (minus z0 x2) y1) (S (plus z0 y2)))).(let +H_y \def (IH x2 O y1 (S y2)) in (let H2 \def (eq_ind_r nat (minus z0 O) +(\lambda (n: nat).((le x2 z0) \to ((le O z0) \to ((eq nat (plus (minus z0 x2) +y1) (plus n (S y2))) \to (eq nat (plus x2 (S y2)) y1))))) H_y z0 (minus_n_O +z0)) in (let H3 \def (eq_ind_r nat (plus z0 (S y2)) (\lambda (n: nat).((le x2 +z0) \to ((le O z0) \to ((eq nat (plus (minus z0 x2) y1) n) \to (eq nat (plus +x2 (S y2)) y1))))) H2 (S (plus z0 y2)) (plus_n_Sm z0 y2)) in (let H4 \def +(eq_ind_r nat (plus x2 (S y2)) (\lambda (n: nat).((le x2 z0) \to ((le O z0) +\to ((eq nat (plus (minus z0 x2) y1) (S (plus z0 y2))) \to (eq nat n y1))))) +H3 (S (plus x2 y2)) (plus_n_Sm x2 y2)) in (H4 (le_S_n x2 z0 H) (le_O_n z0) +H1)))))))))) (\lambda (x4: nat).(\lambda (_: ((\forall (y1: nat).(\forall +(y2: nat).((le (S x2) (S z0)) \to ((le x4 (S z0)) \to ((eq nat (plus (minus +z0 x2) y1) (plus (match x4 with [O \Rightarrow (S z0) | (S l) \Rightarrow +(minus z0 l)]) y2)) \to (eq nat (S (plus x2 y2)) (plus x4 +y1))))))))).(\lambda (y1: nat).(\lambda (y2: nat).(\lambda (H: (le (S x2) (S +z0))).(\lambda (H0: (le (S x4) (S z0))).(\lambda (H1: (eq nat (plus (minus z0 +x2) y1) (plus (minus z0 x4) y2))).(f_equal nat nat S (plus x2 y2) (plus x4 +y1) (IH x2 x4 y1 y2 (le_S_n x2 z0 H) (le_S_n x4 z0 H0) H1))))))))) x3)))) +x1)))) z). + +lemma le_S_minus: + \forall (d: nat).(\forall (h: nat).(\forall (n: nat).((le (plus d h) n) \to +(le d (S (minus n h)))))) +\def + \lambda (d: nat).(\lambda (h: nat).(\lambda (n: nat).(\lambda (H: (le (plus +d h) n)).(let H0 \def (le_trans d (plus d h) n (le_plus_l d h) H) in (let H1 +\def (eq_ind nat n (\lambda (n0: nat).(le d n0)) H0 (plus (minus n h) h) +(le_plus_minus_sym h n (le_trans h (plus d h) n (le_plus_r d h) H))) in (le_S +d (minus n h) (le_minus d n h H))))))). + +lemma lt_x_pred_y: + \forall (x: nat).(\forall (y: nat).((lt x (pred y)) \to (lt (S x) y))) +\def + \lambda (x: nat).(\lambda (y: nat).(nat_ind (\lambda (n: nat).((lt x (pred +n)) \to (lt (S x) n))) (\lambda (H: (lt x O)).(lt_x_O x H (lt (S x) O))) +(\lambda (n: nat).(\lambda (_: (((lt x (pred n)) \to (lt (S x) n)))).(\lambda +(H0: (lt x n)).(lt_n_S x n H0)))) y)). + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/ext/tactics.ma b/matita/matita/contribs/lambdadelta/ground_1A/ext/tactics.ma new file mode 100644 index 000000000..06c0c39f0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/ext/tactics.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/preamble.ma". + +lemma insert_eq: + \forall (S: Type[0]).(\forall (x: S).(\forall (P: ((S \to Prop))).(\forall +(G: ((S \to Prop))).(((\forall (y: S).((P y) \to ((eq S y x) \to (G y))))) +\to ((P x) \to (G x)))))) +\def + \lambda (S: Type[0]).(\lambda (x: S).(\lambda (P: ((S \to Prop))).(\lambda +(G: ((S \to Prop))).(\lambda (H: ((\forall (y: S).((P y) \to ((eq S y x) \to +(G y)))))).(\lambda (H0: (P x)).(H x H0 (refl_equal S x))))))). + +lemma unintro: + \forall (A: Type[0]).(\forall (a: A).(\forall (P: ((A \to Prop))).(((\forall +(x: A).(P x))) \to (P a)))) +\def + \lambda (A: Type[0]).(\lambda (a: A).(\lambda (P: ((A \to Prop))).(\lambda +(H: ((\forall (x: A).(P x)))).(H a)))). + +lemma xinduction: + \forall (A: Type[0]).(\forall (t: A).(\forall (P: ((A \to Prop))).(((\forall +(x: A).((eq A t x) \to (P x)))) \to (P t)))) +\def + \lambda (A: Type[0]).(\lambda (t: A).(\lambda (P: ((A \to Prop))).(\lambda +(H: ((\forall (x: A).((eq A t x) \to (P x))))).(H t (refl_equal A t))))). + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/plist/defs.ma b/matita/matita/contribs/lambdadelta/ground_1A/plist/defs.ma new file mode 100644 index 000000000..a13d54f4e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/plist/defs.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/preamble.ma". + +inductive PList: Type[0] \def +| PNil: PList +| PCons: nat \to (nat \to (PList \to PList)). + +rec definition PConsTail (hds: PList) on hds: nat \to (nat \to PList) \def +\lambda (h0: nat).(\lambda (d0: nat).(match hds with [PNil \Rightarrow (PCons +h0 d0 PNil) | (PCons h d hds0) \Rightarrow (PCons h d (PConsTail hds0 h0 +d0))])). + +rec definition Ss (hds: PList) on hds: PList \def match hds with [PNil +\Rightarrow PNil | (PCons h d hds0) \Rightarrow (PCons h (S d) (Ss hds0))]. + +rec definition papp (a: PList) on a: PList \to PList \def \lambda (b: +PList).(match a with [PNil \Rightarrow b | (PCons h d a0) \Rightarrow (PCons +h d (papp a0 b))]). + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/plist/props.ma b/matita/matita/contribs/lambdadelta/ground_1A/plist/props.ma new file mode 100644 index 000000000..9e9c7fe0b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/plist/props.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/plist/defs.ma". + +lemma papp_ss: + \forall (is1: PList).(\forall (is2: PList).(eq PList (papp (Ss is1) (Ss +is2)) (Ss (papp is1 is2)))) +\def + \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (is2: +PList).(eq PList (papp (Ss p) (Ss is2)) (Ss (papp p is2))))) (\lambda (is2: +PList).(refl_equal PList (Ss is2))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (is2: PList).(eq PList (papp +(Ss p) (Ss is2)) (Ss (papp p is2)))))).(\lambda (is2: PList).(eq_ind_r PList +(Ss (papp p is2)) (\lambda (p0: PList).(eq PList (PCons n (S n0) p0) (PCons n +(S n0) (Ss (papp p is2))))) (refl_equal PList (PCons n (S n0) (Ss (papp p +is2)))) (papp (Ss p) (Ss is2)) (H is2))))))) is1). + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/preamble.ma b/matita/matita/contribs/lambdadelta/ground_1A/preamble.ma new file mode 100644 index 000000000..17a034f97 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/preamble.ma @@ -0,0 +1,15 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "legacy_1A/theory.ma". diff --git a/matita/matita/contribs/lambdadelta/ground_1A/spare.ma b/matita/matita/contribs/lambdadelta/ground_1A/spare.ma new file mode 100644 index 000000000..b45fecc9f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/spare.ma @@ -0,0 +1,18 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/theory.ma". + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/theory.ma b/matita/matita/contribs/lambdadelta/ground_1A/theory.ma new file mode 100644 index 000000000..c0c5a7770 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/theory.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/ext/tactics.ma". + +include "ground_1A/types/fwd.ma". + +include "ground_1A/types/props.ma". + +include "ground_1A/ext/arith.ma". + +include "ground_1A/blt/props.ma". + +include "ground_1A/plist/props.ma". + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/types/defs.ma b/matita/matita/contribs/lambdadelta/ground_1A/types/defs.ma new file mode 100644 index 000000000..b9984a61d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/types/defs.ma @@ -0,0 +1,174 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/preamble.ma". + +inductive and3 (P0: Prop) (P1: Prop) (P2: Prop): Prop \def +| and3_intro: P0 \to (P1 \to (P2 \to (and3 P0 P1 P2))). + +inductive and4 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop): Prop \def +| and4_intro: P0 \to (P1 \to (P2 \to (P3 \to (and4 P0 P1 P2 P3)))). + +inductive and5 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop) (P4: Prop): Prop +\def +| and5_intro: P0 \to (P1 \to (P2 \to (P3 \to (P4 \to (and5 P0 P1 P2 P3 +P4))))). + +inductive or3 (P0: Prop) (P1: Prop) (P2: Prop): Prop \def +| or3_intro0: P0 \to (or3 P0 P1 P2) +| or3_intro1: P1 \to (or3 P0 P1 P2) +| or3_intro2: P2 \to (or3 P0 P1 P2). + +inductive or4 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop): Prop \def +| or4_intro0: P0 \to (or4 P0 P1 P2 P3) +| or4_intro1: P1 \to (or4 P0 P1 P2 P3) +| or4_intro2: P2 \to (or4 P0 P1 P2 P3) +| or4_intro3: P3 \to (or4 P0 P1 P2 P3). + +inductive or5 (P0: Prop) (P1: Prop) (P2: Prop) (P3: Prop) (P4: Prop): Prop +\def +| or5_intro0: P0 \to (or5 P0 P1 P2 P3 P4) +| or5_intro1: P1 \to (or5 P0 P1 P2 P3 P4) +| or5_intro2: P2 \to (or5 P0 P1 P2 P3 P4) +| or5_intro3: P3 \to (or5 P0 P1 P2 P3 P4) +| or5_intro4: P4 \to (or5 P0 P1 P2 P3 P4). + +inductive ex3 (A0: Type[0]) (P0: A0 \to Prop) (P1: A0 \to Prop) (P2: A0 \to +Prop): Prop \def +| ex3_intro: \forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to (ex3 A0 +P0 P1 P2)))). + +inductive ex4 (A0: Type[0]) (P0: A0 \to Prop) (P1: A0 \to Prop) (P2: A0 \to +Prop) (P3: A0 \to Prop): Prop \def +| ex4_intro: \forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to ((P3 x0) +\to (ex4 A0 P0 P1 P2 P3))))). + +inductive ex_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)): Prop +\def +| ex_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to (ex_2 A0 A1 +P0))). + +inductive ex2_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)) (P1: +A0 \to (A1 \to Prop)): Prop \def +| ex2_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) +\to (ex2_2 A0 A1 P0 P1)))). + +inductive ex3_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)) (P1: +A0 \to (A1 \to Prop)) (P2: A0 \to (A1 \to Prop)): Prop \def +| ex3_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) +\to ((P2 x0 x1) \to (ex3_2 A0 A1 P0 P1 P2))))). + +inductive ex4_2 (A0: Type[0]) (A1: Type[0]) (P0: A0 \to (A1 \to Prop)) (P1: +A0 \to (A1 \to Prop)) (P2: A0 \to (A1 \to Prop)) (P3: A0 \to (A1 \to Prop)): +Prop \def +| ex4_2_intro: \forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) +\to ((P2 x0 x1) \to ((P3 x0 x1) \to (ex4_2 A0 A1 P0 P1 P2 P3)))))). + +inductive ex_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to +(A2 \to Prop))): Prop \def +| ex_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 +x2) \to (ex_3 A0 A1 A2 P0)))). + +inductive ex2_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to +(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))): Prop \def +| ex2_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 +x1 x2) \to ((P1 x0 x1 x2) \to (ex2_3 A0 A1 A2 P0 P1))))). + +inductive ex3_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to +(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))) (P2: A0 \to (A1 \to (A2 +\to Prop))): Prop \def +| ex3_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 +x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to (ex3_3 A0 A1 A2 P0 P1 +P2)))))). + +inductive ex4_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to +(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))) (P2: A0 \to (A1 \to (A2 +\to Prop))) (P3: A0 \to (A1 \to (A2 \to Prop))): Prop \def +| ex4_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 +x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to (ex4_3 A0 +A1 A2 P0 P1 P2 P3))))))). + +inductive ex5_3 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (P0: A0 \to (A1 \to +(A2 \to Prop))) (P1: A0 \to (A1 \to (A2 \to Prop))) (P2: A0 \to (A1 \to (A2 +\to Prop))) (P3: A0 \to (A1 \to (A2 \to Prop))) (P4: A0 \to (A1 \to (A2 \to +Prop))): Prop \def +| ex5_3_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 +x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to ((P4 x0 +x1 x2) \to (ex5_3 A0 A1 A2 P0 P1 P2 P3 P4)))))))). + +inductive ex3_4 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (P0: +A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P1: A0 \to (A1 \to (A2 \to (A3 \to +Prop)))) (P2: A0 \to (A1 \to (A2 \to (A3 \to Prop)))): Prop \def +| ex3_4_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall +(x3: A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to +(ex3_4 A0 A1 A2 A3 P0 P1 P2))))))). + +inductive ex4_4 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (P0: +A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P1: A0 \to (A1 \to (A2 \to (A3 \to +Prop)))) (P2: A0 \to (A1 \to (A2 \to (A3 \to Prop)))) (P3: A0 \to (A1 \to (A2 +\to (A3 \to Prop)))): Prop \def +| ex4_4_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall +(x3: A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to +((P3 x0 x1 x2 x3) \to (ex4_4 A0 A1 A2 A3 P0 P1 P2 P3)))))))). + +inductive ex4_5 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: +Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P1: A0 \to +(A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P2: A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to Prop))))) (P3: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))): Prop +\def +| ex4_5_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall +(x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 x1 x2 x3 x4) \to +((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to (ex4_5 A0 A1 A2 A3 A4 P0 P1 +P2 P3))))))))). + +inductive ex5_5 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: +Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P1: A0 \to +(A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P2: A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to Prop))))) (P3: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))) (P4: +A0 \to (A1 \to (A2 \to (A3 \to (A4 \to Prop))))): Prop \def +| ex5_5_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall +(x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 x1 x2 x3 x4) \to +((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to ((P4 x0 x1 x2 x3 x4) \to +(ex5_5 A0 A1 A2 A3 A4 P0 P1 P2 P3 P4)))))))))). + +inductive ex6_6 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: +Type[0]) (A5: Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to +Prop)))))) (P1: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) +(P2: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) (P3: A0 \to +(A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))) (P4: A0 \to (A1 \to (A2 +\to (A3 \to (A4 \to (A5 \to Prop)))))) (P5: A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to (A5 \to Prop)))))): Prop \def +| ex6_6_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall +(x3: A3).(\forall (x4: A4).(\forall (x5: A5).((P0 x0 x1 x2 x3 x4 x5) \to ((P1 +x0 x1 x2 x3 x4 x5) \to ((P2 x0 x1 x2 x3 x4 x5) \to ((P3 x0 x1 x2 x3 x4 x5) +\to ((P4 x0 x1 x2 x3 x4 x5) \to ((P5 x0 x1 x2 x3 x4 x5) \to (ex6_6 A0 A1 A2 +A3 A4 A5 P0 P1 P2 P3 P4 P5)))))))))))). + +inductive ex6_7 (A0: Type[0]) (A1: Type[0]) (A2: Type[0]) (A3: Type[0]) (A4: +Type[0]) (A5: Type[0]) (A6: Type[0]) (P0: A0 \to (A1 \to (A2 \to (A3 \to (A4 +\to (A5 \to (A6 \to Prop))))))) (P1: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +(A5 \to (A6 \to Prop))))))) (P2: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 +\to (A6 \to Prop))))))) (P3: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to +(A6 \to Prop))))))) (P4: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 +\to Prop))))))) (P5: A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to +Prop))))))): Prop \def +| ex6_7_intro: \forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall +(x3: A3).(\forall (x4: A4).(\forall (x5: A5).(\forall (x6: A6).((P0 x0 x1 x2 +x3 x4 x5 x6) \to ((P1 x0 x1 x2 x3 x4 x5 x6) \to ((P2 x0 x1 x2 x3 x4 x5 x6) +\to ((P3 x0 x1 x2 x3 x4 x5 x6) \to ((P4 x0 x1 x2 x3 x4 x5 x6) \to ((P5 x0 x1 +x2 x3 x4 x5 x6) \to (ex6_7 A0 A1 A2 A3 A4 A5 A6 P0 P1 P2 P3 P4 +P5))))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/types/fwd.ma b/matita/matita/contribs/lambdadelta/ground_1A/types/fwd.ma new file mode 100644 index 000000000..862e581af --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/types/fwd.ma @@ -0,0 +1,419 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/types/defs.ma". + +implied lemma and3_rect: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P: +Type[0]).(((P0 \to (P1 \to (P2 \to P)))) \to ((and3 P0 P1 P2) \to P))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P: +Type[0]).(\lambda (f: ((P0 \to (P1 \to (P2 \to P))))).(\lambda (a: (and3 P0 +P1 P2)).(match a with [(and3_intro x x0 x1) \Rightarrow (f x x0 x1)])))))). + +implied lemma and3_ind: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P: +Prop).(((P0 \to (P1 \to (P2 \to P)))) \to ((and3 P0 P1 P2) \to P))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P: +Prop).(and3_rect P0 P1 P2 P)))). + +implied lemma and4_rect: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: +Prop).(\forall (P: Type[0]).(((P0 \to (P1 \to (P2 \to (P3 \to P))))) \to +((and4 P0 P1 P2 P3) \to P)))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: +Prop).(\lambda (P: Type[0]).(\lambda (f: ((P0 \to (P1 \to (P2 \to (P3 \to +P)))))).(\lambda (a: (and4 P0 P1 P2 P3)).(match a with [(and4_intro x x0 x1 +x2) \Rightarrow (f x x0 x1 x2)]))))))). + +implied lemma and4_ind: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: +Prop).(\forall (P: Prop).(((P0 \to (P1 \to (P2 \to (P3 \to P))))) \to ((and4 +P0 P1 P2 P3) \to P)))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: +Prop).(\lambda (P: Prop).(and4_rect P0 P1 P2 P3 P))))). + +implied lemma and5_rect: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: +Prop).(\forall (P4: Prop).(\forall (P: Type[0]).(((P0 \to (P1 \to (P2 \to (P3 +\to (P4 \to P)))))) \to ((and5 P0 P1 P2 P3 P4) \to P))))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: +Prop).(\lambda (P4: Prop).(\lambda (P: Type[0]).(\lambda (f: ((P0 \to (P1 \to +(P2 \to (P3 \to (P4 \to P))))))).(\lambda (a: (and5 P0 P1 P2 P3 P4)).(match a +with [(and5_intro x x0 x1 x2 x3) \Rightarrow (f x x0 x1 x2 x3)])))))))). + +implied lemma and5_ind: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: +Prop).(\forall (P4: Prop).(\forall (P: Prop).(((P0 \to (P1 \to (P2 \to (P3 +\to (P4 \to P)))))) \to ((and5 P0 P1 P2 P3 P4) \to P))))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: +Prop).(\lambda (P4: Prop).(\lambda (P: Prop).(and5_rect P0 P1 P2 P3 P4 +P)))))). + +implied lemma or3_ind: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P: +Prop).(((P0 \to P)) \to (((P1 \to P)) \to (((P2 \to P)) \to ((or3 P0 P1 P2) +\to P))))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P: +Prop).(\lambda (f: ((P0 \to P))).(\lambda (f0: ((P1 \to P))).(\lambda (f1: +((P2 \to P))).(\lambda (o: (or3 P0 P1 P2)).(match o with [(or3_intro0 x) +\Rightarrow (f x) | (or3_intro1 x) \Rightarrow (f0 x) | (or3_intro2 x) +\Rightarrow (f1 x)])))))))). + +implied lemma or4_ind: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: +Prop).(\forall (P: Prop).(((P0 \to P)) \to (((P1 \to P)) \to (((P2 \to P)) +\to (((P3 \to P)) \to ((or4 P0 P1 P2 P3) \to P))))))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: +Prop).(\lambda (P: Prop).(\lambda (f: ((P0 \to P))).(\lambda (f0: ((P1 \to +P))).(\lambda (f1: ((P2 \to P))).(\lambda (f2: ((P3 \to P))).(\lambda (o: +(or4 P0 P1 P2 P3)).(match o with [(or4_intro0 x) \Rightarrow (f x) | +(or4_intro1 x) \Rightarrow (f0 x) | (or4_intro2 x) \Rightarrow (f1 x) | +(or4_intro3 x) \Rightarrow (f2 x)])))))))))). + +implied lemma or5_ind: + \forall (P0: Prop).(\forall (P1: Prop).(\forall (P2: Prop).(\forall (P3: +Prop).(\forall (P4: Prop).(\forall (P: Prop).(((P0 \to P)) \to (((P1 \to P)) +\to (((P2 \to P)) \to (((P3 \to P)) \to (((P4 \to P)) \to ((or5 P0 P1 P2 P3 +P4) \to P))))))))))) +\def + \lambda (P0: Prop).(\lambda (P1: Prop).(\lambda (P2: Prop).(\lambda (P3: +Prop).(\lambda (P4: Prop).(\lambda (P: Prop).(\lambda (f: ((P0 \to +P))).(\lambda (f0: ((P1 \to P))).(\lambda (f1: ((P2 \to P))).(\lambda (f2: +((P3 \to P))).(\lambda (f3: ((P4 \to P))).(\lambda (o: (or5 P0 P1 P2 P3 +P4)).(match o with [(or5_intro0 x) \Rightarrow (f x) | (or5_intro1 x) +\Rightarrow (f0 x) | (or5_intro2 x) \Rightarrow (f1 x) | (or5_intro3 x) +\Rightarrow (f2 x) | (or5_intro4 x) \Rightarrow (f3 x)])))))))))))). + +implied lemma ex3_ind: + \forall (A0: Type[0]).(\forall (P0: ((A0 \to Prop))).(\forall (P1: ((A0 \to +Prop))).(\forall (P2: ((A0 \to Prop))).(\forall (P: Prop).(((\forall (x0: +A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to P))))) \to ((ex3 A0 P0 P1 P2) \to +P)))))) +\def + \lambda (A0: Type[0]).(\lambda (P0: ((A0 \to Prop))).(\lambda (P1: ((A0 \to +Prop))).(\lambda (P2: ((A0 \to Prop))).(\lambda (P: Prop).(\lambda (f: +((\forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 x0) \to P)))))).(\lambda +(e: (ex3 A0 P0 P1 P2)).(match e with [(ex3_intro x x0 x1 x2) \Rightarrow (f x +x0 x1 x2)]))))))). + +implied lemma ex4_ind: + \forall (A0: Type[0]).(\forall (P0: ((A0 \to Prop))).(\forall (P1: ((A0 \to +Prop))).(\forall (P2: ((A0 \to Prop))).(\forall (P3: ((A0 \to +Prop))).(\forall (P: Prop).(((\forall (x0: A0).((P0 x0) \to ((P1 x0) \to ((P2 +x0) \to ((P3 x0) \to P)))))) \to ((ex4 A0 P0 P1 P2 P3) \to P))))))) +\def + \lambda (A0: Type[0]).(\lambda (P0: ((A0 \to Prop))).(\lambda (P1: ((A0 \to +Prop))).(\lambda (P2: ((A0 \to Prop))).(\lambda (P3: ((A0 \to +Prop))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).((P0 x0) \to ((P1 +x0) \to ((P2 x0) \to ((P3 x0) \to P))))))).(\lambda (e: (ex4 A0 P0 P1 P2 +P3)).(match e with [(ex4_intro x x0 x1 x2 x3) \Rightarrow (f x x0 x1 x2 +x3)])))))))). + +implied lemma ex_2_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to +Prop)))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) +\to P)))) \to ((ex_2 A0 A1 P0) \to P))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to +Prop)))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: +A1).((P0 x0 x1) \to P))))).(\lambda (e: (ex_2 A0 A1 P0)).(match e with +[(ex_2_intro x x0 x1) \Rightarrow (f x x0 x1)])))))). + +implied lemma ex2_2_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to +Prop)))).(\forall (P1: ((A0 \to (A1 \to Prop)))).(\forall (P: +Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to +P))))) \to ((ex2_2 A0 A1 P0 P1) \to P)))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to +Prop)))).(\lambda (P1: ((A0 \to (A1 \to Prop)))).(\lambda (P: Prop).(\lambda +(f: ((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to +P)))))).(\lambda (e: (ex2_2 A0 A1 P0 P1)).(match e with [(ex2_2_intro x x0 x1 +x2) \Rightarrow (f x x0 x1 x2)]))))))). + +implied lemma ex3_2_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to +Prop)))).(\forall (P1: ((A0 \to (A1 \to Prop)))).(\forall (P2: ((A0 \to (A1 +\to Prop)))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 +x1) \to ((P1 x0 x1) \to ((P2 x0 x1) \to P)))))) \to ((ex3_2 A0 A1 P0 P1 P2) +\to P))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to +Prop)))).(\lambda (P1: ((A0 \to (A1 \to Prop)))).(\lambda (P2: ((A0 \to (A1 +\to Prop)))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: +A1).((P0 x0 x1) \to ((P1 x0 x1) \to ((P2 x0 x1) \to P))))))).(\lambda (e: +(ex3_2 A0 A1 P0 P1 P2)).(match e with [(ex3_2_intro x x0 x1 x2 x3) +\Rightarrow (f x x0 x1 x2 x3)])))))))). + +implied lemma ex4_2_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (P0: ((A0 \to (A1 \to +Prop)))).(\forall (P1: ((A0 \to (A1 \to Prop)))).(\forall (P2: ((A0 \to (A1 +\to Prop)))).(\forall (P3: ((A0 \to (A1 \to Prop)))).(\forall (P: +Prop).(((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 x0 x1) \to +((P2 x0 x1) \to ((P3 x0 x1) \to P))))))) \to ((ex4_2 A0 A1 P0 P1 P2 P3) \to +P)))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (P0: ((A0 \to (A1 \to +Prop)))).(\lambda (P1: ((A0 \to (A1 \to Prop)))).(\lambda (P2: ((A0 \to (A1 +\to Prop)))).(\lambda (P3: ((A0 \to (A1 \to Prop)))).(\lambda (P: +Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).((P0 x0 x1) \to ((P1 +x0 x1) \to ((P2 x0 x1) \to ((P3 x0 x1) \to P)))))))).(\lambda (e: (ex4_2 A0 +A1 P0 P1 P2 P3)).(match e with [(ex4_2_intro x x0 x1 x2 x3 x4) \Rightarrow (f +x x0 x1 x2 x3 x4)]))))))))). + +implied lemma ex_3_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P: Prop).(((\forall (x0: +A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to P))))) \to ((ex_3 +A0 A1 A2 P0) \to P)))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P: Prop).(\lambda (f: +((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to +P)))))).(\lambda (e: (ex_3 A0 A1 A2 P0)).(match e with [(ex_3_intro x x0 x1 +x2) \Rightarrow (f x x0 x1 x2)]))))))). + +implied lemma ex2_3_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: +A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to P)))))) \to +((ex2_3 A0 A1 A2 P0 P1) \to P))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall +(x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to +P))))))).(\lambda (e: (ex2_3 A0 A1 A2 P0 P1)).(match e with [(ex2_3_intro x +x0 x1 x2 x3) \Rightarrow (f x x0 x1 x2 x3)])))))))). + +implied lemma ex3_3_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P: +Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) +\to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to P))))))) \to ((ex3_3 A0 A1 A2 P0 P1 +P2) \to P)))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P: +Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: +A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to +P)))))))).(\lambda (e: (ex3_3 A0 A1 A2 P0 P1 P2)).(match e with [(ex3_3_intro +x x0 x1 x2 x3 x4) \Rightarrow (f x x0 x1 x2 x3 x4)]))))))))). + +implied lemma ex4_3_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P3: +((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P: Prop).(((\forall (x0: +A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to +((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to P)))))))) \to ((ex4_3 A0 A1 A2 P0 P1 P2 +P3) \to P))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P3: +((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P: Prop).(\lambda (f: ((\forall +(x0: A0).(\forall (x1: A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 +x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 x2) \to P))))))))).(\lambda (e: (ex4_3 +A0 A1 A2 P0 P1 P2 P3)).(match e with [(ex4_3_intro x x0 x1 x2 x3 x4 x5) +\Rightarrow (f x x0 x1 x2 x3 x4 x5)])))))))))). + +implied lemma ex5_3_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P3: +((A0 \to (A1 \to (A2 \to Prop))))).(\forall (P4: ((A0 \to (A1 \to (A2 \to +Prop))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall +(x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) \to ((P3 x0 x1 +x2) \to ((P4 x0 x1 x2) \to P))))))))) \to ((ex5_3 A0 A1 A2 P0 P1 P2 P3 P4) +\to P)))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(P0: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P1: ((A0 \to (A1 \to (A2 +\to Prop))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P3: +((A0 \to (A1 \to (A2 \to Prop))))).(\lambda (P4: ((A0 \to (A1 \to (A2 \to +Prop))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: +A1).(\forall (x2: A2).((P0 x0 x1 x2) \to ((P1 x0 x1 x2) \to ((P2 x0 x1 x2) +\to ((P3 x0 x1 x2) \to ((P4 x0 x1 x2) \to P)))))))))).(\lambda (e: (ex5_3 A0 +A1 A2 P0 P1 P2 P3 P4)).(match e with [(ex5_3_intro x x0 x1 x2 x3 x4 x5 x6) +\Rightarrow (f x x0 x1 x2 x3 x4 x5 x6)]))))))))))). + +implied lemma ex3_4_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(A3: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to (A3 \to +Prop)))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall +(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall (P: +Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: +A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to +P)))))))) \to ((ex3_4 A0 A1 A2 A3 P0 P1 P2) \to P))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(A3: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to (A3 \to +Prop)))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda +(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda (P: Prop).(\lambda +(f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: +A3).((P0 x0 x1 x2 x3) \to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to +P))))))))).(\lambda (e: (ex3_4 A0 A1 A2 A3 P0 P1 P2)).(match e with +[(ex3_4_intro x x0 x1 x2 x3 x4 x5) \Rightarrow (f x x0 x1 x2 x3 x4 +x5)])))))))))). + +implied lemma ex4_4_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(A3: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to (A3 \to +Prop)))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall +(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\forall (P3: ((A0 \to (A1 +\to (A2 \to (A3 \to Prop)))))).(\forall (P: Prop).(((\forall (x0: +A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).((P0 x0 x1 x2 x3) +\to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to ((P3 x0 x1 x2 x3) \to +P))))))))) \to ((ex4_4 A0 A1 A2 A3 P0 P1 P2 P3) \to P)))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(A3: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to (A3 \to +Prop)))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda +(P2: ((A0 \to (A1 \to (A2 \to (A3 \to Prop)))))).(\lambda (P3: ((A0 \to (A1 +\to (A2 \to (A3 \to Prop)))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: +A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: A3).((P0 x0 x1 x2 x3) +\to ((P1 x0 x1 x2 x3) \to ((P2 x0 x1 x2 x3) \to ((P3 x0 x1 x2 x3) \to +P)))))))))).(\lambda (e: (ex4_4 A0 A1 A2 A3 P0 P1 P2 P3)).(match e with +[(ex4_4_intro x x0 x1 x2 x3 x4 x5 x6) \Rightarrow (f x x0 x1 x2 x3 x4 x5 +x6)]))))))))))). + +implied lemma ex4_5_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(A3: Type[0]).(\forall (A4: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to +(A3 \to (A4 \to Prop))))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to Prop))))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\forall (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall +(x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 +x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to +P)))))))))) \to ((ex4_5 A0 A1 A2 A3 A4 P0 P1 P2 P3) \to P))))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to +(A3 \to (A4 \to Prop))))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to Prop))))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\lambda (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: +A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 +x4) \to ((P1 x0 x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 +x4) \to P))))))))))).(\lambda (e: (ex4_5 A0 A1 A2 A3 A4 P0 P1 P2 P3)).(match +e with [(ex4_5_intro x x0 x1 x2 x3 x4 x5 x6 x7) \Rightarrow (f x x0 x1 x2 x3 +x4 x5 x6 x7)])))))))))))). + +implied lemma ex5_5_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(A3: Type[0]).(\forall (A4: Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to +(A3 \to (A4 \to Prop))))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to Prop))))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\forall (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\forall (P4: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\forall (P: Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall +(x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 x4) \to ((P1 x0 +x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 x4) \to ((P4 x0 x1 +x2 x3 x4) \to P))))))))))) \to ((ex5_5 A0 A1 A2 A3 A4 P0 P1 P2 P3 P4) \to +P)))))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to +(A3 \to (A4 \to Prop))))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to +(A4 \to Prop))))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\lambda (P3: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\lambda (P4: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to +Prop))))))).(\lambda (P: Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: +A1).(\forall (x2: A2).(\forall (x3: A3).(\forall (x4: A4).((P0 x0 x1 x2 x3 +x4) \to ((P1 x0 x1 x2 x3 x4) \to ((P2 x0 x1 x2 x3 x4) \to ((P3 x0 x1 x2 x3 +x4) \to ((P4 x0 x1 x2 x3 x4) \to P)))))))))))).(\lambda (e: (ex5_5 A0 A1 A2 +A3 A4 P0 P1 P2 P3 P4)).(match e with [(ex5_5_intro x x0 x1 x2 x3 x4 x5 x6 x7 +x8) \Rightarrow (f x x0 x1 x2 x3 x4 x5 x6 x7 x8)]))))))))))))). + +implied lemma ex6_6_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(A3: Type[0]).(\forall (A4: Type[0]).(\forall (A5: Type[0]).(\forall (P0: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P1: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P2: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P3: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P4: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P5: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\forall (P: +Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: +A3).(\forall (x4: A4).(\forall (x5: A5).((P0 x0 x1 x2 x3 x4 x5) \to ((P1 x0 +x1 x2 x3 x4 x5) \to ((P2 x0 x1 x2 x3 x4 x5) \to ((P3 x0 x1 x2 x3 x4 x5) \to +((P4 x0 x1 x2 x3 x4 x5) \to ((P5 x0 x1 x2 x3 x4 x5) \to P))))))))))))) \to +((ex6_6 A0 A1 A2 A3 A4 A5 P0 P1 P2 P3 P4 P5) \to P)))))))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (A5: Type[0]).(\lambda (P0: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P1: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P2: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P3: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P4: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P5: +((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to Prop)))))))).(\lambda (P: +Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: +A2).(\forall (x3: A3).(\forall (x4: A4).(\forall (x5: A5).((P0 x0 x1 x2 x3 x4 +x5) \to ((P1 x0 x1 x2 x3 x4 x5) \to ((P2 x0 x1 x2 x3 x4 x5) \to ((P3 x0 x1 x2 +x3 x4 x5) \to ((P4 x0 x1 x2 x3 x4 x5) \to ((P5 x0 x1 x2 x3 x4 x5) \to +P)))))))))))))).(\lambda (e: (ex6_6 A0 A1 A2 A3 A4 A5 P0 P1 P2 P3 P4 +P5)).(match e with [(ex6_6_intro x x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10) +\Rightarrow (f x x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10)]))))))))))))))). + +implied lemma ex6_7_ind: + \forall (A0: Type[0]).(\forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall +(A3: Type[0]).(\forall (A4: Type[0]).(\forall (A5: Type[0]).(\forall (A6: +Type[0]).(\forall (P0: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 +\to Prop))))))))).(\forall (P1: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 +\to (A6 \to Prop))))))))).(\forall (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 +\to (A5 \to (A6 \to Prop))))))))).(\forall (P3: ((A0 \to (A1 \to (A2 \to (A3 +\to (A4 \to (A5 \to (A6 \to Prop))))))))).(\forall (P4: ((A0 \to (A1 \to (A2 +\to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\forall (P5: ((A0 \to (A1 +\to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\forall (P: +Prop).(((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: A2).(\forall (x3: +A3).(\forall (x4: A4).(\forall (x5: A5).(\forall (x6: A6).((P0 x0 x1 x2 x3 x4 +x5 x6) \to ((P1 x0 x1 x2 x3 x4 x5 x6) \to ((P2 x0 x1 x2 x3 x4 x5 x6) \to ((P3 +x0 x1 x2 x3 x4 x5 x6) \to ((P4 x0 x1 x2 x3 x4 x5 x6) \to ((P5 x0 x1 x2 x3 x4 +x5 x6) \to P)))))))))))))) \to ((ex6_7 A0 A1 A2 A3 A4 A5 A6 P0 P1 P2 P3 P4 +P5) \to P))))))))))))))) +\def + \lambda (A0: Type[0]).(\lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda +(A3: Type[0]).(\lambda (A4: Type[0]).(\lambda (A5: Type[0]).(\lambda (A6: +Type[0]).(\lambda (P0: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 \to (A6 +\to Prop))))))))).(\lambda (P1: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 \to (A5 +\to (A6 \to Prop))))))))).(\lambda (P2: ((A0 \to (A1 \to (A2 \to (A3 \to (A4 +\to (A5 \to (A6 \to Prop))))))))).(\lambda (P3: ((A0 \to (A1 \to (A2 \to (A3 +\to (A4 \to (A5 \to (A6 \to Prop))))))))).(\lambda (P4: ((A0 \to (A1 \to (A2 +\to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\lambda (P5: ((A0 \to (A1 +\to (A2 \to (A3 \to (A4 \to (A5 \to (A6 \to Prop))))))))).(\lambda (P: +Prop).(\lambda (f: ((\forall (x0: A0).(\forall (x1: A1).(\forall (x2: +A2).(\forall (x3: A3).(\forall (x4: A4).(\forall (x5: A5).(\forall (x6: +A6).((P0 x0 x1 x2 x3 x4 x5 x6) \to ((P1 x0 x1 x2 x3 x4 x5 x6) \to ((P2 x0 x1 +x2 x3 x4 x5 x6) \to ((P3 x0 x1 x2 x3 x4 x5 x6) \to ((P4 x0 x1 x2 x3 x4 x5 x6) +\to ((P5 x0 x1 x2 x3 x4 x5 x6) \to P))))))))))))))).(\lambda (e: (ex6_7 A0 A1 +A2 A3 A4 A5 A6 P0 P1 P2 P3 P4 P5)).(match e with [(ex6_7_intro x x0 x1 x2 x3 +x4 x5 x6 x7 x8 x9 x10 x11) \Rightarrow (f x x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 +x11)])))))))))))))))). + diff --git a/matita/matita/contribs/lambdadelta/ground_1A/types/props.ma b/matita/matita/contribs/lambdadelta/ground_1A/types/props.ma new file mode 100644 index 000000000..b8cc67ac4 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_1A/types/props.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "ground_1A/types/defs.ma". + +lemma ex2_sym: + \forall (A: Type[0]).(\forall (P: ((A \to Prop))).(\forall (Q: ((A \to +Prop))).((ex2 A (\lambda (x: A).(P x)) (\lambda (x: A).(Q x))) \to (ex2 A +(\lambda (x: A).(Q x)) (\lambda (x: A).(P x)))))) +\def + \lambda (A: Type[0]).(\lambda (P: ((A \to Prop))).(\lambda (Q: ((A \to +Prop))).(\lambda (H: (ex2 A (\lambda (x: A).(P x)) (\lambda (x: A).(Q +x)))).(ex2_ind A (\lambda (x: A).(P x)) (\lambda (x: A).(Q x)) (ex2 A +(\lambda (x: A).(Q x)) (\lambda (x: A).(P x))) (\lambda (x: A).(\lambda (H0: +(P x)).(\lambda (H1: (Q x)).(ex_intro2 A (\lambda (x0: A).(Q x0)) (\lambda +(x0: A).(P x0)) x H1 H0)))) H)))). + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/arith.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/arith.ma new file mode 100644 index 000000000..0c1a561d5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/arith.ma @@ -0,0 +1,208 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "arithmetics/nat.ma". +include "ground_2A/lib/star.ma". + +(* ARITHMETICAL PROPERTIES **************************************************) + +(* Equations ****************************************************************) + +lemma minus_plus_m_m_commutative: ∀n,m:nat. n = m + n - m. +// qed-. + +(* Note: uses minus_minus_comm, minus_plus_m_m, commutative_plus, plus_minus *) +lemma plus_minus_minus_be: ∀x,y,z. y ≤ z → z ≤ x → (x - z) + (z - y) = x - y. +#x #z #y #Hzy #Hyx >plus_minus // >commutative_plus >plus_minus // +qed-. + +fact plus_minus_minus_be_aux: ∀i,x,y,z. y ≤ z → z ≤ x → i = z - y → x - z + i = x - y. +/2 width=1 by plus_minus_minus_be/ qed-. + +lemma plus_n_2: ∀n. n + 2 = n + 1 + 1. +// qed. + +lemma le_plus_minus: ∀m,n,p. p ≤ n → m + n - p = m + (n - p). +/2 by plus_minus/ qed. + +lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → m + n - p = m - p + n. +/2 by plus_minus/ qed. + +lemma minus_minus_comm3: ∀n,x,y,z. n-x-y-z = n-y-z-x. +// qed. + +lemma arith_b1: ∀a,b,c1. c1 ≤ b → a - c1 - (b - c1) = a - b. +#a #b #c1 #H >minus_minus_comm >minus_le_minus_minus_comm // +qed. + +lemma arith_b2: ∀a,b,c1,c2. c1 + c2 ≤ b → a - c1 - c2 - (b - c1 - c2) = a - b. +#a #b #c1 #c2 #H >minus_plus >minus_plus >minus_plus /2 width=1 by arith_b1/ +qed. + +lemma arith_c1x: ∀x,a,b,c1. x + c1 + a - (b + c1) = x + a - b. +/3 by monotonic_le_minus_l, le_to_le_to_eq, le_n/ qed. + +lemma arith_h1: ∀a1,a2,b,c1. c1 ≤ a1 → c1 ≤ b → + a1 - c1 + a2 - (b - c1) = a1 + a2 - b. +#a1 #a2 #b #c1 #H1 #H2 >plus_minus /2 width=1 by arith_b2/ +qed. + +lemma arith_i: ∀x,y,z. y < x → x+z-y-1 = x-y-1+z. +/2 width=1 by plus_minus/ qed-. + +(* Properties ***************************************************************) + +lemma eq_nat_dec: ∀n1,n2:nat. Decidable (n1 = n2). +#n1 elim n1 -n1 [| #n1 #IHn1 ] * [2,4: #n2 ] +[1,4: @or_intror #H destruct +| elim (IHn1 n2) -IHn1 /3 width=1 by or_intror, or_introl/ +| /2 width=1 by or_introl/ +] +qed-. + +lemma lt_or_eq_or_gt: ∀m,n. ∨∨ m < n | n = m | n < m. +#m #n elim (lt_or_ge m n) /2 width=1 by or3_intro0/ +#H elim H -m /2 width=1 by or3_intro1/ +#m #Hm * /3 width=1 by not_le_to_lt, le_S_S, or3_intro2/ +qed-. + +fact le_repl_sn_conf_aux: ∀x,y,z:nat. x ≤ z → x = y → y ≤ z. +// qed-. + +fact le_repl_sn_trans_aux: ∀x,y,z:nat. x ≤ z → y = x → y ≤ z. +// qed-. + +lemma monotonic_le_minus_l2: ∀x1,x2,y,z. x1 ≤ x2 → x1 - y - z ≤ x2 - y - z. +/3 width=1 by monotonic_le_minus_l/ qed. + +(* Note: this might interfere with nat.ma *) +lemma monotonic_lt_pred: ∀m,n. m < n → O < m → pred m < pred n. +#m #n #Hmn #Hm whd >(S_pred … Hm) +@le_S_S_to_le >S_pred /2 width=3 by transitive_lt/ +qed. + +lemma arith_j: ∀x,y,z. x-y-1 ≤ x-(y-z)-1. +/3 width=1 by monotonic_le_minus_l, monotonic_le_minus_r/ qed. + +lemma arith_k_sn: ∀z,x,y,n. z < x → x+n ≤ y → x-z-1+n ≤ y-z-1. +#z #x #y #n #Hzx #Hxny +>plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ] +>plus_minus [2: /2 width=1 by lt_to_le/ ] +/2 width=1 by monotonic_le_minus_l2/ +qed. + +lemma arith_k_dx: ∀z,x,y,n. z < x → y ≤ x+n → y-z-1 ≤ x-z-1+n. +#z #x #y #n #Hzx #Hyxn +>plus_minus [2: /2 width=1 by monotonic_le_minus_r/ ] +>plus_minus [2: /2 width=1 by lt_to_le/ ] +/2 width=1 by monotonic_le_minus_l2/ +qed. + +(* Inversion & forward lemmas ***********************************************) + +lemma discr_plus_xy_y: ∀x,y. x + y = y → x = 0. +// qed-. + +lemma lt_plus_SO_to_le: ∀x,y. x < y + 1 → x ≤ y. +/2 width=1 by monotonic_pred/ qed-. + +lemma lt_refl_false: ∀n. n < n → ⊥. +#n #H elim (lt_to_not_eq … H) -H /2 width=1 by/ +qed-. + +lemma lt_zero_false: ∀n. n < 0 → ⊥. +#n #H elim (lt_to_not_le … H) -H /2 width=1 by/ +qed-. + +lemma pred_inv_refl: ∀m. pred m = m → m = 0. +* // normalize #m #H elim (lt_refl_false m) // +qed-. + +lemma le_plus_xSy_O_false: ∀x,y. x + S y ≤ 0 → ⊥. +#x #y #H lapply (le_n_O_to_eq … H) -H minus_plus_plus_l +#H lapply (discr_plus_xy_minus_xz … H) -H +#H destruct +qed-. + +lemma zero_eq_plus: ∀x,y. 0 = x + y → 0 = x ∧ 0 = y. +* /2 width=1 by conj/ #x #y normalize #H destruct +qed-. + +(* Iterators ****************************************************************) + +(* Note: see also: lib/arithemetics/bigops.ma *) +let rec iter (n:nat) (B:Type[0]) (op: B → B) (nil: B) ≝ + match n with + [ O ⇒ nil + | S k ⇒ op (iter k B op nil) + ]. + +interpretation "iterated function" 'exp op n = (iter n ? op). + +lemma iter_SO: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^(l+1) b = f (f^l b). +#B #f #b #l >commutative_plus // +qed. + +lemma iter_n_Sm: ∀B:Type[0]. ∀f:B→B. ∀b,l. f^l (f b) = f (f^l b). +#B #f #b #l elim l -l normalize // +qed. + +lemma iter_plus: ∀B:Type[0]. ∀f:B→B. ∀b,l1,l2. f^(l1+l2) b = f^l1 (f^l2 b). +#B #f #b #l1 elim l1 -l1 normalize // +qed. + +(* Trichotomy operator ******************************************************) + +(* Note: this is "if eqb n1 n2 then a2 else if leb n1 n2 then a1 else a3" *) +let rec tri (A:Type[0]) n1 n2 a1 a2 a3 on n1 : A ≝ + match n1 with + [ O ⇒ match n2 with [ O ⇒ a2 | S n2 ⇒ a1 ] + | S n1 ⇒ match n2 with [ O ⇒ a3 | S n2 ⇒ tri A n1 n2 a1 a2 a3 ] + ]. + +lemma tri_lt: ∀A,a1,a2,a3,n2,n1. n1 < n2 → tri A n1 n2 a1 a2 a3 = a1. +#A #a1 #a2 #a3 #n2 elim n2 -n2 +[ #n1 #H elim (lt_zero_false … H) +| #n2 #IH #n1 elim n1 -n1 /3 width=1 by monotonic_lt_pred/ +] +qed. + +lemma tri_eq: ∀A,a1,a2,a3,n. tri A n n a1 a2 a3 = a2. +#A #a1 #a2 #a3 #n elim n -n normalize // +qed. + +lemma tri_gt: ∀A,a1,a2,a3,n1,n2. n2 < n1 → tri A n1 n2 a1 a2 a3 = a3. +#A #a1 #a2 #a3 #n1 elim n1 -n1 +[ #n2 #H elim (lt_zero_false … H) +| #n1 #IH #n2 elim n2 -n2 /3 width=1 by monotonic_lt_pred/ +] +qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/bool.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/bool.ma new file mode 100644 index 000000000..293940b30 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/bool.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basics/bool.ma". +include "ground_2A/lib/star.ma". +include "ground_2A/notation/constructors/no_0.ma". +include "ground_2A/notation/constructors/yes_0.ma". + +(* BOOLEAN PROPERTIES *******************************************************) + +interpretation "boolean false" 'no = false. + +interpretation "boolean true" 'yes = true. + +(* Basic properties *********************************************************) + +lemma orb_false_r: ∀b1,b2:bool. (b1 ∨ b2) = false → b1 = false ∧ b2 = false. +* normalize /2 width=1 by conj/ #b2 #H destruct +qed-. + +lemma commutative_orb: commutative … orb. +* * // qed. + +lemma eq_bool_dec: ∀b1,b2:bool. Decidable (b1 = b2). +* * /2 width=1 by or_introl/ +@or_intror #H destruct +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/list.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/list.ma new file mode 100644 index 000000000..f572a3f58 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/list.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/notation/constructors/nil_0.ma". +include "ground_2A/notation/constructors/cons_2.ma". +include "ground_2A/notation/constructors/cons_3.ma". +include "ground_2A/notation/functions/append_2.ma". +include "ground_2A/lib/arith.ma". + +(* LISTS ********************************************************************) + +inductive list (A:Type[0]) : Type[0] := + | nil : list A + | cons: A → list A → list A. + +interpretation "nil (list)" 'Nil = (nil ?). + +interpretation "cons (list)" 'Cons hd tl = (cons ? hd tl). + +let rec all A (R:predicate A) (l:list A) on l ≝ + match l with + [ nil ⇒ ⊤ + | cons hd tl ⇒ R hd ∧ all A R tl + ]. + +inductive list2 (A1,A2:Type[0]) : Type[0] := + | nil2 : list2 A1 A2 + | cons2: A1 → A2 → list2 A1 A2 → list2 A1 A2. + +interpretation "nil (list of pairs)" 'Nil = (nil2 ? ?). + +interpretation "cons (list of pairs)" 'Cons hd1 hd2 tl = (cons2 ? ? hd1 hd2 tl). + +let rec append2 (A1,A2:Type[0]) (l1,l2:list2 A1 A2) on l1 ≝ match l1 with +[ nil2 ⇒ l2 +| cons2 a1 a2 tl ⇒ {a1, a2} @ append2 A1 A2 tl l2 +]. + +interpretation "append (list of pairs)" + 'Append l1 l2 = (append2 ? ? l1 l2). + +let rec length2 (A1,A2:Type[0]) (l:list2 A1 A2) on l ≝ match l with +[ nil2 ⇒ 0 +| cons2 _ _ l ⇒ length2 A1 A2 l + 1 +]. + +interpretation "length (list of pairs)" + 'card l = (length2 ? ? l). diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/lstar.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/lstar.ma new file mode 100644 index 000000000..ae707f2b9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/lstar.ma @@ -0,0 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "arithmetics/lstar.ma". + +(* PROPERTIES OF NAT-LABELED REFLEXIVE AND TRANSITIVE CLOSURE ***************) + +definition llstar: ∀A:Type[0]. ∀B. (A→relation B) → nat → (A→relation B) ≝ + λA,B,R,l,a. lstar … (R a) l. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/lib/star.ma b/matita/matita/contribs/lambdadelta/ground_2A/lib/star.ma new file mode 100644 index 000000000..0f193f0b1 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/lib/star.ma @@ -0,0 +1,329 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basics/star1.ma". +include "ground_2A/xoa/xoa_props.ma". + +(* PROPERTIES OF RELATIONS **************************************************) + +definition Decidable: Prop → Prop ≝ λR. R ∨ (R → ⊥). + +definition Transitive: ∀A. ∀R: relation A. Prop ≝ λA,R. + ∀a1,a0. R a1 a0 → ∀a2. R a0 a2 → R a1 a2. + +definition confluent2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2. + ∀a0,a1. R1 a0 a1 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & R1 a2 a. + +definition transitive2: ∀A. ∀R1,R2: relation A. Prop ≝ λA,R1,R2. + ∀a1,a0. R1 a1 a0 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & R1 a a2. + +definition bi_confluent: ∀A,B. ∀R: bi_relation A B. Prop ≝ λA,B,R. + ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. R a0 b0 a2 b2 → + ∃∃a,b. R a1 b1 a b & R a2 b2 a b. + +definition LTC: ∀A:Type[0]. ∀B. (A→relation B) → (A→relation B) ≝ + λA,B,R,a. TC … (R a). + +definition lsub_trans: ∀A,B. relation2 (A→relation B) (relation A) ≝ λA,B,R1,R2. + ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 L1 L2 → R1 L1 T1 T2. + +definition s_r_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2. + ∀L2,T1,T2. R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → LTC … R1 L1 T1 T2. + +definition s_rs_transitive: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2. + ∀L2,T1,T2. LTC … R1 L2 T1 T2 → ∀L1. R2 T1 L1 L2 → LTC … R1 L1 T1 T2. + +definition s_r_confluent1: ∀A,B. relation2 (A→relation B) (B→relation A) ≝ λA,B,R1,R2. + ∀L1,T1,T2. R1 L1 T1 T2 → ∀L2. R2 T1 L1 L2 → R2 T2 L1 L2. + +lemma TC_strip1: ∀A,R1,R2. confluent2 A R1 R2 → + ∀a0,a1. TC … R1 a0 a1 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & TC … R1 a2 a. +#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1 +[ #a1 #Ha01 #a2 #Ha02 + elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02 + elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20 + elim (HR12 … Ha1 … Ha0) -HR12 -a /4 width=5 by step, ex2_intro/ +] +qed. + +lemma TC_strip2: ∀A,R1,R2. confluent2 A R1 R2 → + ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a0 a1 → + ∃∃a. TC … R2 a1 a & R1 a2 a. +#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2 +[ #a2 #Ha02 #a1 #Ha01 + elim (HR12 … Ha01 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a2 #_ #Ha2 #IHa0 #a1 #Ha01 + elim (IHa0 … Ha01) -a0 #a0 #Ha10 #Ha0 + elim (HR12 … Ha0 … Ha2) -HR12 -a /4 width=3 by step, ex2_intro/ +] +qed. + +lemma TC_confluent2: ∀A,R1,R2. + confluent2 A R1 R2 → confluent2 A (TC … R1) (TC … R2). +#A #R1 #R2 #HR12 #a0 #a1 #H elim H -a1 +[ #a1 #Ha01 #a2 #Ha02 + elim (TC_strip2 … HR12 … Ha02 … Ha01) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a1 #_ #Ha1 #IHa0 #a2 #Ha02 + elim (IHa0 … Ha02) -a0 #a0 #Ha0 #Ha20 + elim (TC_strip2 … HR12 … Ha0 … Ha1) -HR12 -a /4 width=5 by step, ex2_intro/ +] +qed. + +lemma TC_strap1: ∀A,R1,R2. transitive2 A R1 R2 → + ∀a1,a0. TC … R1 a1 a0 → ∀a2. R2 a0 a2 → + ∃∃a. R2 a1 a & TC … R1 a a2. +#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0 +[ #a0 #Ha10 #a2 #Ha02 + elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a0 #_ #Ha0 #IHa #a2 #Ha02 + elim (HR12 … Ha0 … Ha02) -HR12 -a0 #a0 #Ha0 #Ha02 + elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/ +] +qed. + +lemma TC_strap2: ∀A,R1,R2. transitive2 A R1 R2 → + ∀a0,a2. TC … R2 a0 a2 → ∀a1. R1 a1 a0 → + ∃∃a. TC … R2 a1 a & R1 a a2. +#A #R1 #R2 #HR12 #a0 #a2 #H elim H -a2 +[ #a2 #Ha02 #a1 #Ha10 + elim (HR12 … Ha10 … Ha02) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a2 #_ #Ha02 #IHa #a1 #Ha10 + elim (IHa … Ha10) -a0 #a0 #Ha10 #Ha0 + elim (HR12 … Ha0 … Ha02) -HR12 -a /4 width=3 by step, ex2_intro/ +] +qed. + +lemma TC_transitive2: ∀A,R1,R2. + transitive2 A R1 R2 → transitive2 A (TC … R1) (TC … R2). +#A #R1 #R2 #HR12 #a1 #a0 #H elim H -a0 +[ #a0 #Ha10 #a2 #Ha02 + elim (TC_strap2 … HR12 … Ha02 … Ha10) -HR12 -a0 /3 width=3 by inj, ex2_intro/ +| #a #a0 #_ #Ha0 #IHa #a2 #Ha02 + elim (TC_strap2 … HR12 … Ha02 … Ha0) -HR12 -a0 #a0 #Ha0 #Ha02 + elim (IHa … Ha0) -a /4 width=5 by step, ex2_intro/ +] +qed. + +definition NF: ∀A. relation A → relation A → predicate A ≝ + λA,R,S,a1. ∀a2. R a1 a2 → S a2 a1. + +definition NF_dec: ∀A. relation A → relation A → Prop ≝ + λA,R,S. ∀a1. NF A R S a1 ∨ + ∃∃a2. R … a1 a2 & (S a2 a1 → ⊥). + +inductive SN (A) (R,S:relation A): predicate A ≝ +| SN_intro: ∀a1. (∀a2. R a1 a2 → (S a2 a1 → ⊥) → SN A R S a2) → SN A R S a1 +. + +lemma NF_to_SN: ∀A,R,S,a. NF A R S a → SN A R S a. +#A #R #S #a1 #Ha1 +@SN_intro #a2 #HRa12 #HSa12 +elim HSa12 -HSa12 /2 width=1 by/ +qed. + +lemma SN_to_NF: ∀A,R,S. NF_dec A R S → + ∀a1. SN A R S a1 → + ∃∃a2. star … R a1 a2 & NF A R S a2. +#A #R #S #HRS #a1 #H elim H -a1 +#a1 #_ #IHa1 elim (HRS a1) -HRS /2 width=3 by srefl, ex2_intro/ +* #a0 #Ha10 #Ha01 elim (IHa1 … Ha10 Ha01) -IHa1 -Ha01 /3 width=3 by star_compl, ex2_intro/ +qed-. + +definition NF_sn: ∀A. relation A → relation A → predicate A ≝ + λA,R,S,a2. ∀a1. R a1 a2 → S a2 a1. + +inductive SN_sn (A) (R,S:relation A): predicate A ≝ +| SN_sn_intro: ∀a2. (∀a1. R a1 a2 → (S a2 a1 → ⊥) → SN_sn A R S a1) → SN_sn A R S a2 +. + +lemma NF_to_SN_sn: ∀A,R,S,a. NF_sn A R S a → SN_sn A R S a. +#A #R #S #a2 #Ha2 +@SN_sn_intro #a1 #HRa12 #HSa12 +elim HSa12 -HSa12 /2 width=1 by/ +qed. + +lemma LTC_lsub_trans: ∀A,B,R,S. lsub_trans A B R S → lsub_trans A B (LTC … R) S. +#A #B #R #S #HRS #L2 #T1 #T2 #H elim H -T2 /3 width=3 by inj/ +#T #T2 #_ #HT2 #IHT1 #L1 #HL12 +lapply (HRS … HT2 … HL12) -HRS -HT2 /3 width=3 by step/ +qed-. + +lemma s_r_conf1_LTC1: ∀A,B,S,R. s_r_confluent1 A B S R → s_r_confluent1 A B (LTC … S) R. +#A #B #S #R #HSR #L1 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /3 width=3 by/ +qed-. + +lemma s_r_trans_LTC1: ∀A,B,S,R. s_r_confluent1 A B S R → + s_r_transitive A B S R → s_rs_transitive A B S R. +#A #B #S #R #H1SR #H2SR #L2 #T1 #T2 #H @(TC_ind_dx … T1 H) -T1 /2 width=3 by/ +#T1 #T #HT1 #_ #IHT2 #L1 #HL12 lapply (H2SR … HT1 … HL12) -H2SR -HT1 +/4 width=5 by s_r_conf1_LTC1, trans_TC/ +qed-. + +lemma s_r_trans_LTC2: ∀A,B,S,R. s_rs_transitive A B S R → s_r_transitive A B S (LTC … R). +#A #B #S #R #HSR #L2 #T1 #T2 #HT12 #L1 #H @(TC_ind_dx … L1 H) -L1 /3 width=3 by inj/ +qed-. + +lemma s_r_to_s_rs_trans: ∀A,B,S,R. s_r_transitive A B (LTC … S) R → + s_rs_transitive A B S R. +#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1 +elim (TC_idem … (S L1) … T1 T2) +#_ #H @H @HSR // +qed-. + +lemma s_rs_to_s_r_trans: ∀A,B,S,R. s_rs_transitive A B S R → + s_r_transitive A B (LTC … S) R. +#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1 +elim (TC_idem … (S L1) … T1 T2) +#H #_ @H @HSR // +qed-. + +lemma s_rs_trans_TC1: ∀A,B,S,R. s_rs_transitive A B S R → + s_rs_transitive A B (LTC … S) R. +#A #B #S #R #HSR #L2 #T1 #T2 #HL2 #L1 #HT1 +elim (TC_idem … (S L1) … T1 T2) +elim (TC_idem … (S L2) … T1 T2) +#_ #H1 #H2 #_ @H2 @HSR /3 width=3 by/ +qed-. + +(* relations on unboxed pairs ***********************************************) + +lemma bi_TC_strip: ∀A,B,R. bi_confluent A B R → + ∀a0,a1,b0,b1. R a0 b0 a1 b1 → ∀a2,b2. bi_TC … R a0 b0 a2 b2 → + ∃∃a,b. bi_TC … R a1 b1 a b & R a2 b2 a b. +#A #B #R #HR #a0 #a1 #b0 #b1 #H01 #a2 #b2 #H elim H -a2 -b2 +[ #a2 #b2 #H02 + elim (HR … H01 … H02) -HR -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/ +| #a2 #b2 #a3 #b3 #_ #H23 * #a #b #H1 #H2 + elim (HR … H23 … H2) -HR -a0 -b0 -a2 -b2 /3 width=4 by ex2_2_intro, bi_step/ +] +qed. + +lemma bi_TC_confluent: ∀A,B,R. bi_confluent A B R → + bi_confluent A B (bi_TC … R). +#A #B #R #HR #a0 #a1 #b0 #b1 #H elim H -a1 -b1 +[ #a1 #b1 #H01 #a2 #b2 #H02 + elim (bi_TC_strip … HR … H01 … H02) -a0 -b0 /3 width=4 by ex2_2_intro, bi_inj/ +| #a1 #b1 #a3 #b3 #_ #H13 #IH #a2 #b2 #H02 + elim (IH … H02) -a0 -b0 #a0 #b0 #H10 #H20 + elim (bi_TC_strip … HR … H13 … H10) -a1 -b1 /3 width=7 by ex2_2_intro, bi_step/ +] +qed. + +lemma bi_TC_decomp_r: ∀A,B. ∀R:bi_relation A B. + ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 → + R a1 b1 a2 b2 ∨ + ∃∃a,b. bi_TC … R a1 b1 a b & R a b a2 b2. +#A #B #R #a1 #a2 #b1 #b2 * -a2 -b2 /2 width=1/ /3 width=4 by ex2_2_intro, or_intror/ +qed-. + +lemma bi_TC_decomp_l: ∀A,B. ∀R:bi_relation A B. + ∀a1,a2,b1,b2. bi_TC … R a1 b1 a2 b2 → + R a1 b1 a2 b2 ∨ + ∃∃a,b. R a1 b1 a b & bi_TC … R a b a2 b2. +#A #B #R #a1 #a2 #b1 #b2 #H @(bi_TC_ind_dx … a1 b1 H) -a1 -b1 +[ /2 width=1 by or_introl/ +| #a1 #a #b1 #b #Hab1 #Hab2 #_ /3 width=4 by ex2_2_intro, or_intror/ (**) (* auto fails without #_ *) +] +qed-. + +(* relations on unboxed triples *********************************************) + +definition tri_RC: ∀A,B,C. tri_relation A B C → tri_relation A B C ≝ + λA,B,C,R,a1,b1,c1,a2,b2,c2. R … a1 b1 c1 a2 b2 c2 ∨ + ∧∧ a1 = a2 & b1 = b2 & c1 = c2. + +lemma tri_RC_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_RC … R). +/3 width=1 by and3_intro, or_intror/ qed. + +definition tri_star: ∀A,B,C,R. tri_relation A B C ≝ + λA,B,C,R. tri_RC A B C (tri_TC … R). + +lemma tri_star_tri_reflexive: ∀A,B,C,R. tri_reflexive A B C (tri_star … R). +/2 width=1 by/ qed. + +lemma tri_TC_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2. + tri_TC A B C R a1 b1 c1 a2 b2 c2 → + tri_star A B C R a1 b1 c1 a2 b2 c2. +/2 width=1 by or_introl/ qed. + +lemma tri_R_to_tri_star: ∀A,B,C,R,a1,b1,c1,a2,b2,c2. + R a1 b1 c1 a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2. +/3 width=1 by tri_TC_to_tri_star, tri_inj/ qed. + +lemma tri_star_strap1: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. + tri_star A B C R a1 b1 c1 a b c → + R a b c a2 b2 c2 → tri_star A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 * +[ /3 width=5 by tri_TC_to_tri_star, tri_step/ +| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/ +] +qed. + +lemma tri_star_strap2: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. R a1 b1 c1 a b c → + tri_star A B C R a b c a2 b2 c2 → + tri_star A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H * +[ /3 width=5 by tri_TC_to_tri_star, tri_TC_strap/ +| * #H1 #H2 #H3 destruct /2 width=1 by tri_R_to_tri_star/ +] +qed. + +lemma tri_star_to_tri_TC_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. + tri_star A B C R a1 b1 c1 a b c → + tri_TC A B C R a b c a2 b2 c2 → + tri_TC A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 * +[ /2 width=5 by tri_TC_transitive/ +| * #H1 #H2 #H3 destruct /2 width=1 by/ +] +qed. + +lemma tri_TC_to_tri_star_to_tri_TC: ∀A,B,C,R,a1,a,a2,b1,b,b2,c1,c,c2. + tri_TC A B C R a1 b1 c1 a b c → + tri_star A B C R a b c a2 b2 c2 → + tri_TC A B C R a1 b1 c1 a2 b2 c2. +#A #B #C #R #a1 #a #a2 #b1 #b #b2 #c1 #c #c2 #H * +[ /2 width=5 by tri_TC_transitive/ +| * #H1 #H2 #H3 destruct /2 width=1 by/ +] +qed. + +lemma tri_tansitive_tri_star: ∀A,B,C,R. tri_transitive A B C (tri_star … R). +#A #B #C #R #a1 #a #b1 #b #c1 #c #H #a2 #b2 #c2 * +[ /3 width=5 by tri_star_to_tri_TC_to_tri_TC, tri_TC_to_tri_star/ +| * #H1 #H2 #H3 destruct /2 width=1 by/ +] +qed. + +lemma tri_star_ind: ∀A,B,C,R,a1,b1,c1. ∀P:relation3 A B C. P a1 b1 c1 → + (∀a,a2,b,b2,c,c2. tri_star … R a1 b1 c1 a b c → R a b c a2 b2 c2 → P a b c → P a2 b2 c2) → + ∀a2,b2,c2. tri_star … R a1 b1 c1 a2 b2 c2 → P a2 b2 c2. +#A #B #C #R #a1 #b1 #c1 #P #H #IH #a2 #b2 #c2 * +[ #H12 elim H12 -a2 -b2 -c2 /3 width=6 by tri_TC_to_tri_star/ +| * #H1 #H2 #H3 destruct // +] +qed-. + +lemma tri_star_ind_dx: ∀A,B,C,R,a2,b2,c2. ∀P:relation3 A B C. P a2 b2 c2 → + (∀a1,a,b1,b,c1,c. R a1 b1 c1 a b c → tri_star … R a b c a2 b2 c2 → P a b c → P a1 b1 c1) → + ∀a1,b1,c1. tri_star … R a1 b1 c1 a2 b2 c2 → P a1 b1 c1. +#A #B #C #R #a2 #b2 #c2 #P #H #IH #a1 #b1 #c1 * +[ #H12 @(tri_TC_ind_dx … a1 b1 c1 H12) -a1 -b1 -c1 /3 width=6 by tri_TC_to_tri_star/ +| * #H1 #H2 #H3 destruct // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_2.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_2.ma new file mode 100644 index 000000000..c95c57d8e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( hd @ break tl )" + right associative with precedence 47 + for @{ 'Cons $hd $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_3.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_3.ma new file mode 100644 index 000000000..cfa556e68 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/cons_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( { term 46 hd1 , break term 46 hd2 } @ break term 46 tl )" + non associative with precedence 47 + for @{ 'Cons $hd1 $hd2 $tl }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/infinity_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/infinity_0.ma new file mode 100644 index 000000000..f5c849158 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/infinity_0.ma @@ -0,0 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "∞" + non associative with precedence 55 + for @{ 'Infinity }. + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/nil_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/nil_0.ma new file mode 100644 index 000000000..6ea5151a9 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/nil_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "◊" + non associative with precedence 46 + for @{ 'Nil }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/no_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/no_0.ma new file mode 100644 index 000000000..af692211e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/no_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "Ⓕ" + non associative with precedence 55 + for @{'no}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/yes_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/yes_0.ma new file mode 100644 index 000000000..c321749ae --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/constructors/yes_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "Ⓣ" + non associative with precedence 55 + for @{'yes}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/append_2.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/append_2.ma new file mode 100644 index 000000000..f6d95184b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/append_2.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( l1 @@ break l2 )" + right associative with precedence 47 + for @{ 'Append $l1 $l2 }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/predecessor_1.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/predecessor_1.ma new file mode 100644 index 000000000..cf94d0497 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/predecessor_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( ⫰ term 70 T )" + non associative with precedence 70 + for @{ 'Predecessor $T }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/successor_1.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/successor_1.ma new file mode 100644 index 000000000..05e2c3146 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/functions/successor_1.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "hvbox( ⫯ term 70 T )" + non associative with precedence 70 + for @{ 'Successor $T }. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/false_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/false_0.ma new file mode 100644 index 000000000..b96432510 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/false_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "⊥" + non associative with precedence 19 + for @{'false}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/true_0.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/true_0.ma new file mode 100644 index 000000000..7a9ad4366 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa/true_0.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************) + +notation "⊤" + non associative with precedence 19 + for @{'true}. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa2_notation.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa2_notation.ma new file mode 100644 index 000000000..a7651b7d3 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa2_notation.ma @@ -0,0 +1,16 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa_notation.ma b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa_notation.ma new file mode 100644 index 000000000..6054aa308 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/notation/xoa_notation.ma @@ -0,0 +1,326 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + +(* multiple existental quantifier (1, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) }. + +(* multiple existental quantifier (1, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) }. + +(* multiple existental quantifier (2, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) }. + +(* multiple existental quantifier (2, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) }. + +(* multiple existental quantifier (3, 1) *) + +notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) }. + +notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) }. + +(* multiple existental quantifier (3, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) }. + +(* multiple existental quantifier (3, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) }. + +(* multiple existental quantifier (3, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) }. + +(* multiple existental quantifier (4, 1) *) + +notation > "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.$P0) (λ${ident x0}.$P1) (λ${ident x0}.$P2) (λ${ident x0}.$P3) }. + +notation < "hvbox(∃∃ ident x0 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.$P0) (λ${ident x0}:$T0.$P1) (λ${ident x0}:$T0.$P2) (λ${ident x0}:$T0.$P3) }. + +(* multiple existental quantifier (4, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) }. + +(* multiple existental quantifier (4, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) }. + +(* multiple existental quantifier (4, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) }. + +(* multiple existental quantifier (4, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) }. + +(* multiple existental quantifier (5, 2) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.$P0) (λ${ident x0}.λ${ident x1}.$P1) (λ${ident x0}.λ${ident x1}.$P2) (λ${ident x0}.λ${ident x1}.$P3) (λ${ident x0}.λ${ident x1}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.$P4) }. + +(* multiple existental quantifier (5, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) }. + +(* multiple existental quantifier (5, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) }. + +(* multiple existental quantifier (5, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) }. + +(* multiple existental quantifier (5, 6) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) }. + +(* multiple existental quantifier (6, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) }. + +(* multiple existental quantifier (6, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) }. + +(* multiple existental quantifier (6, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) }. + +(* multiple existental quantifier (6, 6) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.$P5) }. + +(* multiple existental quantifier (6, 7) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) }. + +(* multiple existental quantifier (7, 3) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.$P6) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.$P6) }. + +(* multiple existental quantifier (7, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) }. + +(* multiple existental quantifier (7, 7) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.λ${ident x5}.λ${ident x6}.$P6) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 , ident x5 , ident x6 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.λ${ident x5}:$T5.λ${ident x6}:$T6.$P6) }. + +(* multiple existental quantifier (8, 4) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.$P7) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.$P7) }. + +(* multiple existental quantifier (8, 5) *) + +notation > "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P0) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P1) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P2) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P3) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P4) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P5) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P6) (λ${ident x0}.λ${ident x1}.λ${ident x2}.λ${ident x3}.λ${ident x4}.$P7) }. + +notation < "hvbox(∃∃ ident x0 , ident x1 , ident x2 , ident x3 , ident x4 break . term 19 P0 break & term 19 P1 break & term 19 P2 break & term 19 P3 break & term 19 P4 break & term 19 P5 break & term 19 P6 break & term 19 P7)" + non associative with precedence 20 + for @{ 'Ex (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P0) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P1) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P2) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P3) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P4) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P5) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P6) (λ${ident x0}:$T0.λ${ident x1}:$T1.λ${ident x2}:$T2.λ${ident x3}:$T3.λ${ident x4}:$T4.$P7) }. + +(* multiple disjunction connective (3) *) + +notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2)" + non associative with precedence 30 + for @{ 'Or $P0 $P1 $P2 }. + +(* multiple disjunction connective (4) *) + +notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3)" + non associative with precedence 30 + for @{ 'Or $P0 $P1 $P2 $P3 }. + +(* multiple disjunction connective (5) *) + +notation "hvbox(∨∨ term 29 P0 break | term 29 P1 break | term 29 P2 break | term 29 P3 break | term 29 P4)" + non associative with precedence 30 + for @{ 'Or $P0 $P1 $P2 $P3 $P4 }. + +(* multiple conjunction connective (3) *) + +notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2)" + non associative with precedence 35 + for @{ 'And $P0 $P1 $P2 }. + +(* multiple conjunction connective (4) *) + +notation "hvbox(∧∧ term 34 P0 break & term 34 P1 break & term 34 P2 break & term 34 P3)" + non associative with precedence 35 + for @{ 'And $P0 $P1 $P2 $P3 }. + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa.ma b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa.ma new file mode 100644 index 000000000..27da042cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa.ma @@ -0,0 +1,293 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + +include "basics/pts.ma". + +include "ground_2A/notation/xoa_notation.ma". + +(* multiple existental quantifier (1, 2) *) + +inductive ex1_2 (A0,A1:Type[0]) (P0:A0→A1→Prop) : Prop ≝ + | ex1_2_intro: ∀x0,x1. P0 x0 x1 → ex1_2 ? ? ? +. + +interpretation "multiple existental quantifier (1, 2)" 'Ex P0 = (ex1_2 ? ? P0). + +(* multiple existental quantifier (1, 3) *) + +inductive ex1_3 (A0,A1,A2:Type[0]) (P0:A0→A1→A2→Prop) : Prop ≝ + | ex1_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → ex1_3 ? ? ? ? +. + +interpretation "multiple existental quantifier (1, 3)" 'Ex P0 = (ex1_3 ? ? ? P0). + +(* multiple existental quantifier (2, 2) *) + +inductive ex2_2 (A0,A1:Type[0]) (P0,P1:A0→A1→Prop) : Prop ≝ + | ex2_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → ex2_2 ? ? ? ? +. + +interpretation "multiple existental quantifier (2, 2)" 'Ex P0 P1 = (ex2_2 ? ? P0 P1). + +(* multiple existental quantifier (2, 3) *) + +inductive ex2_3 (A0,A1,A2:Type[0]) (P0,P1:A0→A1→A2→Prop) : Prop ≝ + | ex2_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → ex2_3 ? ? ? ? ? +. + +interpretation "multiple existental quantifier (2, 3)" 'Ex P0 P1 = (ex2_3 ? ? ? P0 P1). + +(* multiple existental quantifier (3, 1) *) + +inductive ex3 (A0:Type[0]) (P0,P1,P2:A0→Prop) : Prop ≝ + | ex3_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → ex3 ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 1)" 'Ex P0 P1 P2 = (ex3 ? P0 P1 P2). + +(* multiple existental quantifier (3, 2) *) + +inductive ex3_2 (A0,A1:Type[0]) (P0,P1,P2:A0→A1→Prop) : Prop ≝ + | ex3_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → ex3_2 ? ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 2)" 'Ex P0 P1 P2 = (ex3_2 ? ? P0 P1 P2). + +(* multiple existental quantifier (3, 3) *) + +inductive ex3_3 (A0,A1,A2:Type[0]) (P0,P1,P2:A0→A1→A2→Prop) : Prop ≝ + | ex3_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → ex3_3 ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 3)" 'Ex P0 P1 P2 = (ex3_3 ? ? ? P0 P1 P2). + +(* multiple existental quantifier (3, 4) *) + +inductive ex3_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2:A0→A1→A2→A3→Prop) : Prop ≝ + | ex3_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → ex3_4 ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (3, 4)" 'Ex P0 P1 P2 = (ex3_4 ? ? ? ? P0 P1 P2). + +(* multiple existental quantifier (4, 1) *) + +inductive ex4 (A0:Type[0]) (P0,P1,P2,P3:A0→Prop) : Prop ≝ + | ex4_intro: ∀x0. P0 x0 → P1 x0 → P2 x0 → P3 x0 → ex4 ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 1)" 'Ex P0 P1 P2 P3 = (ex4 ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 2) *) + +inductive ex4_2 (A0,A1:Type[0]) (P0,P1,P2,P3:A0→A1→Prop) : Prop ≝ + | ex4_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → ex4_2 ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 2)" 'Ex P0 P1 P2 P3 = (ex4_2 ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 3) *) + +inductive ex4_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3:A0→A1→A2→Prop) : Prop ≝ + | ex4_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → ex4_3 ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 3)" 'Ex P0 P1 P2 P3 = (ex4_3 ? ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 4) *) + +inductive ex4_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→Prop) : Prop ≝ + | ex4_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → ex4_4 ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 4)" 'Ex P0 P1 P2 P3 = (ex4_4 ? ? ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (4, 5) *) + +inductive ex4_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex4_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → ex4_5 ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (4, 5)" 'Ex P0 P1 P2 P3 = (ex4_5 ? ? ? ? ? P0 P1 P2 P3). + +(* multiple existental quantifier (5, 2) *) + +inductive ex5_2 (A0,A1:Type[0]) (P0,P1,P2,P3,P4:A0→A1→Prop) : Prop ≝ + | ex5_2_intro: ∀x0,x1. P0 x0 x1 → P1 x0 x1 → P2 x0 x1 → P3 x0 x1 → P4 x0 x1 → ex5_2 ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 2)" 'Ex P0 P1 P2 P3 P4 = (ex5_2 ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 3) *) + +inductive ex5_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→Prop) : Prop ≝ + | ex5_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → ex5_3 ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 3)" 'Ex P0 P1 P2 P3 P4 = (ex5_3 ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 4) *) + +inductive ex5_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→Prop) : Prop ≝ + | ex5_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → ex5_4 ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 4)" 'Ex P0 P1 P2 P3 P4 = (ex5_4 ? ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 5) *) + +inductive ex5_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex5_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → ex5_5 ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 5)" 'Ex P0 P1 P2 P3 P4 = (ex5_5 ? ? ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (5, 6) *) + +inductive ex5_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝ + | ex5_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → ex5_6 ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (5, 6)" 'Ex P0 P1 P2 P3 P4 = (ex5_6 ? ? ? ? ? ? P0 P1 P2 P3 P4). + +(* multiple existental quantifier (6, 3) *) + +inductive ex6_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→Prop) : Prop ≝ + | ex6_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → ex6_3 ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 3)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_3 ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 4) *) + +inductive ex6_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→Prop) : Prop ≝ + | ex6_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → ex6_4 ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 4)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_4 ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 5) *) + +inductive ex6_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex6_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → ex6_5 ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 5)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 6) *) + +inductive ex6_6 (A0,A1,A2,A3,A4,A5:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→Prop) : Prop ≝ + | ex6_6_intro: ∀x0,x1,x2,x3,x4,x5. P0 x0 x1 x2 x3 x4 x5 → P1 x0 x1 x2 x3 x4 x5 → P2 x0 x1 x2 x3 x4 x5 → P3 x0 x1 x2 x3 x4 x5 → P4 x0 x1 x2 x3 x4 x5 → P5 x0 x1 x2 x3 x4 x5 → ex6_6 ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 6)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_6 ? ? ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (6, 7) *) + +inductive ex6_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝ + | ex6_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → ex6_7 ? ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (6, 7)" 'Ex P0 P1 P2 P3 P4 P5 = (ex6_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5). + +(* multiple existental quantifier (7, 3) *) + +inductive ex7_3 (A0,A1,A2:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→Prop) : Prop ≝ + | ex7_3_intro: ∀x0,x1,x2. P0 x0 x1 x2 → P1 x0 x1 x2 → P2 x0 x1 x2 → P3 x0 x1 x2 → P4 x0 x1 x2 → P5 x0 x1 x2 → P6 x0 x1 x2 → ex7_3 ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (7, 3)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_3 ? ? ? P0 P1 P2 P3 P4 P5 P6). + +(* multiple existental quantifier (7, 4) *) + +inductive ex7_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→Prop) : Prop ≝ + | ex7_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → ex7_4 ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (7, 4)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6). + +(* multiple existental quantifier (7, 7) *) + +inductive ex7_7 (A0,A1,A2,A3,A4,A5,A6:Type[0]) (P0,P1,P2,P3,P4,P5,P6:A0→A1→A2→A3→A4→A5→A6→Prop) : Prop ≝ + | ex7_7_intro: ∀x0,x1,x2,x3,x4,x5,x6. P0 x0 x1 x2 x3 x4 x5 x6 → P1 x0 x1 x2 x3 x4 x5 x6 → P2 x0 x1 x2 x3 x4 x5 x6 → P3 x0 x1 x2 x3 x4 x5 x6 → P4 x0 x1 x2 x3 x4 x5 x6 → P5 x0 x1 x2 x3 x4 x5 x6 → P6 x0 x1 x2 x3 x4 x5 x6 → ex7_7 ? ? ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (7, 7)" 'Ex P0 P1 P2 P3 P4 P5 P6 = (ex7_7 ? ? ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6). + +(* multiple existental quantifier (8, 4) *) + +inductive ex8_4 (A0,A1,A2,A3:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→Prop) : Prop ≝ + | ex8_4_intro: ∀x0,x1,x2,x3. P0 x0 x1 x2 x3 → P1 x0 x1 x2 x3 → P2 x0 x1 x2 x3 → P3 x0 x1 x2 x3 → P4 x0 x1 x2 x3 → P5 x0 x1 x2 x3 → P6 x0 x1 x2 x3 → P7 x0 x1 x2 x3 → ex8_4 ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (8, 4)" 'Ex P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_4 ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7). + +(* multiple existental quantifier (8, 5) *) + +inductive ex8_5 (A0,A1,A2,A3,A4:Type[0]) (P0,P1,P2,P3,P4,P5,P6,P7:A0→A1→A2→A3→A4→Prop) : Prop ≝ + | ex8_5_intro: ∀x0,x1,x2,x3,x4. P0 x0 x1 x2 x3 x4 → P1 x0 x1 x2 x3 x4 → P2 x0 x1 x2 x3 x4 → P3 x0 x1 x2 x3 x4 → P4 x0 x1 x2 x3 x4 → P5 x0 x1 x2 x3 x4 → P6 x0 x1 x2 x3 x4 → P7 x0 x1 x2 x3 x4 → ex8_5 ? ? ? ? ? ? ? ? ? ? ? ? ? +. + +interpretation "multiple existental quantifier (8, 5)" 'Ex P0 P1 P2 P3 P4 P5 P6 P7 = (ex8_5 ? ? ? ? ? P0 P1 P2 P3 P4 P5 P6 P7). + +(* multiple disjunction connective (3) *) + +inductive or3 (P0,P1,P2:Prop) : Prop ≝ + | or3_intro0: P0 → or3 ? ? ? + | or3_intro1: P1 → or3 ? ? ? + | or3_intro2: P2 → or3 ? ? ? +. + +interpretation "multiple disjunction connective (3)" 'Or P0 P1 P2 = (or3 P0 P1 P2). + +(* multiple disjunction connective (4) *) + +inductive or4 (P0,P1,P2,P3:Prop) : Prop ≝ + | or4_intro0: P0 → or4 ? ? ? ? + | or4_intro1: P1 → or4 ? ? ? ? + | or4_intro2: P2 → or4 ? ? ? ? + | or4_intro3: P3 → or4 ? ? ? ? +. + +interpretation "multiple disjunction connective (4)" 'Or P0 P1 P2 P3 = (or4 P0 P1 P2 P3). + +(* multiple disjunction connective (5) *) + +inductive or5 (P0,P1,P2,P3,P4:Prop) : Prop ≝ + | or5_intro0: P0 → or5 ? ? ? ? ? + | or5_intro1: P1 → or5 ? ? ? ? ? + | or5_intro2: P2 → or5 ? ? ? ? ? + | or5_intro3: P3 → or5 ? ? ? ? ? + | or5_intro4: P4 → or5 ? ? ? ? ? +. + +interpretation "multiple disjunction connective (5)" 'Or P0 P1 P2 P3 P4 = (or5 P0 P1 P2 P3 P4). + +(* multiple conjunction connective (3) *) + +inductive and3 (P0,P1,P2:Prop) : Prop ≝ + | and3_intro: P0 → P1 → P2 → and3 ? ? ? +. + +interpretation "multiple conjunction connective (3)" 'And P0 P1 P2 = (and3 P0 P1 P2). + +(* multiple conjunction connective (4) *) + +inductive and4 (P0,P1,P2,P3:Prop) : Prop ≝ + | and4_intro: P0 → P1 → P2 → P3 → and4 ? ? ? ? +. + +interpretation "multiple conjunction connective (4)" 'And P0 P1 P2 P3 = (and4 P0 P1 P2 P3). + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa2.ma b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa2.ma new file mode 100644 index 000000000..3975bd4a2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa2.ma @@ -0,0 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was generated by xoa.native: do not edit *********************) + +include "basics/pts.ma". + +include "ground_2A/notation/xoa2_notation.ma". + diff --git a/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa_props.ma b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa_props.ma new file mode 100644 index 000000000..8ab935a9a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/xoa/xoa_props.ma @@ -0,0 +1,22 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basics/logic.ma". +include "ground_2A/notation/xoa/false_0.ma". +include "ground_2A/notation/xoa/true_0.ma". +include "ground_2A/xoa/xoa.ma". + +interpretation "logical false" 'false = False. + +interpretation "logical true" 'true = True. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat.ma new file mode 100644 index 000000000..1d802e296 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "arithmetics/nat.ma". +include "ground_2A/notation/constructors/infinity_0.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* the type of natural numbers with infinity *) +inductive ynat: Type[0] ≝ +| yinj: nat → ynat +| Y : ynat +. + +coercion yinj. + +interpretation "ynat infinity" 'Infinity = Y. + +(* Inversion lemmas *********************************************************) + +lemma yinj_inj: ∀m,n. yinj m = yinj n → m = n. +#m #n #H destruct // +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_le.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_le.ma new file mode 100644 index 000000000..4a8e89e3d --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_le.ma @@ -0,0 +1,136 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_succ.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* order relation *) +inductive yle: relation ynat ≝ +| yle_inj: ∀m,n. m ≤ n → yle m n +| yle_Y : ∀m. yle m (∞) +. + +interpretation "ynat 'less or equal to'" 'leq x y = (yle x y). + +(* Basic inversion lemmas ***************************************************) + +fact yle_inv_inj2_aux: ∀x,y. x ≤ y → ∀n. y = yinj n → + ∃∃m. m ≤ n & x = yinj m. +#x #y * -x -y +[ #x #y #Hxy #n #Hy destruct /2 width=3 by ex2_intro/ +| #x #n #Hy destruct +] +qed-. + +lemma yle_inv_inj2: ∀x,n. x ≤ yinj n → ∃∃m. m ≤ n & x = yinj m. +/2 width=3 by yle_inv_inj2_aux/ qed-. + +lemma yle_inv_inj: ∀m,n. yinj m ≤ yinj n → m ≤ n. +#m #n #H elim (yle_inv_inj2 … H) -H +#x #Hxn #H destruct // +qed-. + +fact yle_inv_O2_aux: ∀m:ynat. ∀x:ynat. m ≤ x → x = 0 → m = 0. +#m #x * -m -x +[ #m #n #Hmn #H destruct /3 width=1 by le_n_O_to_eq, eq_f/ +| #m #H destruct +] +qed-. + +lemma yle_inv_O2: ∀m:ynat. m ≤ 0 → m = 0. +/2 width =3 by yle_inv_O2_aux/ qed-. + +fact yle_inv_Y1_aux: ∀x,n. x ≤ n → x = ∞ → n = ∞. +#x #n * -x -n // +#x #n #_ #H destruct +qed-. + +lemma yle_inv_Y1: ∀n. ∞ ≤ n → n = ∞. +/2 width=3 by yle_inv_Y1_aux/ qed-. + +(* Inversion lemmas on successor ********************************************) + +fact yle_inv_succ1_aux: ∀x,y. x ≤ y → ∀m. x = ⫯m → m ≤ ⫰y ∧ ⫯⫰y = y. +#x #y * -x -y +[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H + #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy + #m #Hnm #H destruct /3 width=1 by yle_inj, conj/ +| #x #y #H destruct /2 width=1 by yle_Y, conj/ +] +qed-. + +lemma yle_inv_succ1: ∀m,y. ⫯m ≤ y → m ≤ ⫰y ∧ ⫯⫰y = y. +/2 width=3 by yle_inv_succ1_aux/ qed-. + +lemma yle_inv_succ: ∀m,n. ⫯m ≤ ⫯n → m ≤ n. +#m #n #H elim (yle_inv_succ1 … H) -H // +qed-. + +(* Basic properties *********************************************************) + +lemma le_O1: ∀n:ynat. 0 ≤ n. +* /2 width=1 by yle_inj/ +qed. + +lemma yle_refl: reflexive … yle. +* /2 width=1 by le_n, yle_inj/ +qed. + +lemma yle_split: ∀x,y:ynat. x ≤ y ∨ y ≤ x. +* /2 width=1 by or_intror/ +#x * /2 width=1 by or_introl/ +#y elim (le_or_ge x y) /3 width=1 by yle_inj, or_introl, or_intror/ +qed-. + +(* Properties on predecessor ************************************************) + +lemma yle_pred_sn: ∀m,n. m ≤ n → ⫰m ≤ n. +#m #n * -m -n /3 width=3 by transitive_le, yle_inj/ +qed. + +lemma yle_refl_pred_sn: ∀x. ⫰x ≤ x. +/2 width=1 by yle_refl, yle_pred_sn/ qed. + +lemma yle_pred: ∀m,n. m ≤ n → ⫰m ≤ ⫰n. +#m #n * -m -n /3 width=1 by yle_inj, monotonic_pred/ +qed. + +(* Properties on successor **************************************************) + +lemma yle_succ: ∀m,n. m ≤ n → ⫯m ≤ ⫯n. +#m #n * -m -n /3 width=1 by yle_inj, le_S_S/ +qed. + +lemma yle_succ_dx: ∀m,n. m ≤ n → m ≤ ⫯n. +#m #n * -m -n /3 width=1 by le_S, yle_inj/ +qed. + +lemma yle_refl_S_dx: ∀x. x ≤ ⫯x. +/2 width=1 by yle_succ_dx/ qed. + +lemma yle_refl_SP_dx: ∀x. x ≤ ⫯⫰x. +* // * // +qed. + +(* Main properties **********************************************************) + +theorem yle_trans: Transitive … yle. +#x #y * -x -y +[ #x #y #Hxy * // + #z #H lapply (yle_inv_inj … H) -H + /3 width=3 by transitive_le, yle_inj/ (**) (* full auto too slow *) +| #x #z #H lapply (yle_inv_Y1 … H) // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_lt.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_lt.ma new file mode 100644 index 000000000..850fae157 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_lt.ma @@ -0,0 +1,182 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_le.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* strict order relation *) +inductive ylt: relation ynat ≝ +| ylt_inj: ∀m,n. m < n → ylt m n +| ylt_Y : ∀m:nat. ylt m (∞) +. + +interpretation "ynat 'less than'" 'lt x y = (ylt x y). + +(* Basic forward lemmas *****************************************************) + +lemma ylt_fwd_gen: ∀x,y. x < y → ∃m. x = yinj m. +#x #y * -x -y /2 width=2 by ex_intro/ +qed-. + +lemma ylt_fwd_le_succ: ∀x,y. x < y → ⫯x ≤ y. +#x #y * -x -y /2 width=1 by yle_inj/ +qed-. + +(* Basic inversion lemmas ***************************************************) + +fact ylt_inv_inj2_aux: ∀x,y. x < y → ∀n. y = yinj n → + ∃∃m. m < n & x = yinj m. +#x #y * -x -y +[ #x #y #Hxy #n #Hy elim (le_inv_S1 … Hxy) -Hxy + #m #Hm #H destruct /3 width=3 by le_S_S, ex2_intro/ +| #x #n #Hy destruct +] +qed-. + +lemma ylt_inv_inj2: ∀x,n. x < yinj n → + ∃∃m. m < n & x = yinj m. +/2 width=3 by ylt_inv_inj2_aux/ qed-. + +lemma ylt_inv_inj: ∀m,n. yinj m < yinj n → m < n. +#m #n #H elim (ylt_inv_inj2 … H) -H +#x #Hx #H destruct // +qed-. + +lemma ylt_inv_Y1: ∀n. ∞ < n → ⊥. +#n #H elim (ylt_fwd_gen … H) -H +#y #H destruct +qed-. + +lemma ylt_inv_O1: ∀n. 0 < n → ⫯⫰n = n. +* // #n #H lapply (ylt_inv_inj … H) -H normalize +/3 width=1 by S_pred, eq_f/ +qed-. + +(* Inversion lemmas on successor ********************************************) + +fact ylt_inv_succ1_aux: ∀x,y. x < y → ∀m. x = ⫯m → m < ⫰y ∧ ⫯⫰y = y. +#x #y * -x -y +[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H + #n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy + #m #Hnm #H destruct /3 width=1 by ylt_inj, conj/ +| #x #y #H elim (ysucc_inv_inj_sn … H) -H + #m #H #_ destruct /2 width=1 by ylt_Y, conj/ +] +qed-. + +lemma ylt_inv_succ1: ∀m,y. ⫯m < y → m < ⫰y ∧ ⫯⫰y = y. +/2 width=3 by ylt_inv_succ1_aux/ qed-. + +lemma ylt_inv_succ: ∀m,n. ⫯m < ⫯n → m < n. +#m #n #H elim (ylt_inv_succ1 … H) -H // +qed-. + +(* Forward lemmas on successor **********************************************) + +fact ylt_fwd_succ2_aux: ∀x,y. x < y → ∀n. y = ⫯n → x ≤ n. +#x #y * -x -y +[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H + #n #H1 #H2 destruct /3 width=1 by yle_inj, le_S_S_to_le/ +| #x #n #H lapply (ysucc_inv_Y_sn … H) -H // +] +qed-. + +lemma ylt_fwd_succ2: ∀m,n. m < ⫯n → m ≤ n. +/2 width=3 by ylt_fwd_succ2_aux/ qed-. + +(* inversion and forward lemmas on yle **************************************) + +lemma ylt_fwd_le_succ1: ∀m,n. m < n → ⫯m ≤ n. +#m #n * -m -n /2 width=1 by yle_inj/ +qed-. + +lemma ylt_fwd_le: ∀m:ynat. ∀n:ynat. m < n → m ≤ n. +#m #n * -m -n /3 width=1 by lt_to_le, yle_inj/ +qed-. + +lemma ylt_yle_false: ∀m:ynat. ∀n:ynat. m < n → n ≤ m → ⊥. +#m #n * -m -n +[ #m #n #Hmn #H lapply (yle_inv_inj … H) -H + #H elim (lt_refl_false n) /2 width=3 by le_to_lt_to_lt/ +| #m #H lapply (yle_inv_Y1 … H) -H + #H destruct +] +qed-. + +(* Basic properties *********************************************************) + +lemma ylt_O: ∀x. ⫯⫰(yinj x) = yinj x → 0 < x. +* /2 width=1 by/ normalize +#H destruct +qed. + +(* Properties on predecessor ************************************************) + +lemma ylt_pred: ∀m,n. m < n → 0 < m → ⫰m < ⫰n. +#m #n * -m -n +/4 width=1 by ylt_inv_inj, ylt_inj, monotonic_lt_pred/ +qed. + +(* Properties on successor **************************************************) + +lemma ylt_O_succ: ∀n. 0 < ⫯n. +* /2 width=1 by ylt_inj/ +qed. + +lemma ylt_succ: ∀m,n. m < n → ⫯m < ⫯n. +#m #n #H elim H -m -n /3 width=1 by ylt_inj, le_S_S/ +qed. + +(* Properties on order ******************************************************) + +lemma yle_split_eq: ∀m:ynat. ∀n:ynat. m ≤ n → m < n ∨ m = n. +#m #n * -m -n +[ #m #n #Hmn elim (le_to_or_lt_eq … Hmn) -Hmn + /3 width=1 by or_introl, ylt_inj/ +| * /2 width=1 by or_introl, ylt_Y/ +] +qed-. + +lemma ylt_split: ∀m,n:ynat. m < n ∨ n ≤ m.. +#m #n elim (yle_split m n) /2 width=1 by or_intror/ +#H elim (yle_split_eq … H) -H /2 width=1 by or_introl, or_intror/ +qed-. + +lemma ylt_yle_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y ≤ z → x < y → x < z. +#x #y #z * -y -z +[ #y #z #Hyz #H elim (ylt_inv_inj2 … H) -H + #m #Hm #H destruct /3 width=3 by ylt_inj, lt_to_le_to_lt/ +| #y * // +] +qed-. + +lemma yle_ylt_trans: ∀x:ynat. ∀y:ynat. ∀z:ynat. y < z → x ≤ y → x < z. +#x #y #z * -y -z +[ #y #z #Hyz #H elim (yle_inv_inj2 … H) -H + #m #Hm #H destruct /3 width=3 by ylt_inj, le_to_lt_to_lt/ +| #y #H elim (yle_inv_inj2 … H) -H // +] +qed-. + +(* Main properties **********************************************************) + +theorem ylt_trans: Transitive … ylt. +#x #y * -x -y +[ #x #y #Hxy * // + #z #H lapply (ylt_inv_inj … H) -H + /3 width=3 by transitive_lt, ylt_inj/ (**) (* full auto too slow *) +| #x #z #H elim (ylt_yle_false … H) // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_max.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_max.ma new file mode 100644 index 000000000..05ce327cd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_max.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +lemma ymax_pre_dx: ∀x,y. x ≤ y → x - y + y = y. +#x #y * -x -y // +#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy // +qed-. + +lemma ymax_pre_sn: ∀x,y. y ≤ x → x - y + y = x. +#x #y * -x -y +[ #x #y #Hxy >yminus_inj /3 width=3 by plus_minus, eq_f/ +| * // +] +qed-. + +lemma ymax_pre_i_dx: ∀y,x. y ≤ x - y + y. +// qed. + +lemma ymax_pre_i_sn: ∀y,x. x ≤ x - y + y. +* // #y * /2 width=1 by yle_inj/ +qed. + +lemma ymax_pre_e: ∀x,z. x ≤ z → ∀y. y ≤ z → x - y + y ≤ z. +#x #z #Hxz #y #Hyz elim (yle_split x y) +[ #Hxy >(ymax_pre_dx … Hxy) -x // +| #Hyx >(ymax_pre_sn … Hyx) -y // +] +qed. + +lemma ymax_pre_dx_comm: ∀x,y. x ≤ y → y + (x - y) = y. +/2 width=1 by ymax_pre_dx/ qed-. + +lemma ymax_pre_sn_comm: ∀x,y. y ≤ x → y + (x - y) = x. +/2 width=1 by ymax_pre_sn/ qed-. + +lemma ymax_pre_i_dx_comm: ∀y,x. y ≤ y + (x - y). +// qed. + +lemma ymax_pre_i_sn_comm: ∀y,x. x ≤ y + (x - y). +/2 width=1 by ymax_pre_i_sn/ qed. + +lemma ymax_pre_e_comm: ∀x,z. x ≤ z → ∀y. y ≤ z → y + (x - y) ≤ z. +/2 width=1 by ymax_pre_e/ qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_min.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_min.ma new file mode 100644 index 000000000..4ec861b95 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_min.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_plus.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +fact ymin_pre_dx_aux: ∀x,y. y ≤ x → x - (x - y) ≤ y. +#x #y * -x -y +[ #x #y #Hxy >yminus_inj + /3 width=4 by yle_inj, monotonic_le_minus_l/ +| * // +] +qed-. + +lemma ymin_pre_sn: ∀x,y. x ≤ y → x - (x - y) = x. +#x #y * -x -y // +#x #y #Hxy >yminus_inj >(eq_minus_O … Hxy) -Hxy // +qed-. + +lemma ymin_pre_i_dx: ∀x,y. x - (x - y) ≤ y. +#x #y elim (yle_split x y) /2 width=1 by ymin_pre_dx_aux/ +#Hxy >(ymin_pre_sn … Hxy) // +qed. + +lemma ymin_pre_i_sn: ∀x,y. x - (x - y) ≤ x. +// qed. + +lemma ymin_pre_dx: ∀x,y. y ≤ yinj x → yinj x - (yinj x - y) = y. +#x #y #H elim (yle_inv_inj2 … H) -H +#z #Hzx #H destruct >yminus_inj +/3 width=4 by minus_le_minus_minus_comm, eq_f/ +qed-. + +lemma ymin_pre_e: ∀z,x. z ≤ yinj x → ∀y. z ≤ y → + z ≤ yinj x - (yinj x - y). +#z #x #Hzx #y #Hzy elim (yle_split x y) +[ #H >(ymin_pre_sn … H) -y // +| #H >(ymin_pre_dx … H) -x // +] +qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_minus.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_minus.ma new file mode 100644 index 000000000..e4763f40e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_minus.ma @@ -0,0 +1,109 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_lt.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* subtraction *) +definition yminus: ynat → ynat → ynat ≝ λx,y. match y with +[ yinj n ⇒ ypred^n x +| Y ⇒ yinj 0 +]. + +interpretation "ynat minus" 'minus x y = (yminus x y). + +(* Basic properties *********************************************************) + +lemma yminus_inj: ∀n,m. yinj m - yinj n = yinj (m - n). +#n elim n -n /2 width=3 by trans_eq/ +qed. + +lemma yminus_Y_inj: ∀n. ∞ - yinj n = ∞. +#n elim n -n // normalize +#n #IHn >IHn // +qed. + +lemma yminus_O1: ∀x:ynat. 0 - x = 0. +* // qed. + +lemma yminus_refl: ∀x:ynat. x - x = 0. +* // qed. + +lemma yminus_minus_comm: ∀y,z,x. x - y - z = x - z - y. +* #y [ * #z [ * // ] ] >yminus_O1 // +qed. + +(* Properties on predecessor ************************************************) + +lemma yminus_SO2: ∀m. m - 1 = ⫰m. +* // +qed. + +lemma yminus_pred: ∀n,m. 0 < m → 0 < n → ⫰m - ⫰n = m - n. +* // #n * +[ #m #Hm #Hn >yminus_inj >yminus_inj + /4 width=1 by ylt_inv_inj, minus_pred_pred, eq_f/ +| >yminus_Y_inj // +] +qed-. + +(* Properties on successor **************************************************) + +lemma yminus_succ: ∀n,m. ⫯m - ⫯n = m - n. +* // #n * [2: >yminus_Y_inj // ] +#m >yminus_inj // +qed. + +lemma yminus_succ1_inj: ∀n:nat. ∀m:ynat. n ≤ m → ⫯m - n = ⫯(m - n). +#n * +[ #m #Hmn >yminus_inj >yminus_inj + /4 width=1 by yle_inv_inj, plus_minus, eq_f/ +| >yminus_Y_inj // +] +qed-. + +lemma yminus_succ2: ∀y,x. x - ⫯y = ⫰(x-y). +* // +qed. + +(* Properties on order ******************************************************) + +lemma yle_minus_sn: ∀n,m. m - n ≤ m. +* // #n * /2 width=1 by yle_inj/ +qed. + +lemma yle_to_minus: ∀m:ynat. ∀n:ynat. m ≤ n → m - n = 0. +#m #n * -m -n /3 width=3 by eq_minus_O, eq_f/ +qed-. + +lemma yminus_to_le: ∀n:ynat. ∀m:ynat. m - n = 0 → m ≤ n. +* // #n * +[ #m >yminus_inj #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *) + /2 width=1 by yle_inj/ +| >yminus_Y_inj #H destruct +] +qed. + +lemma monotonic_yle_minus_dx: ∀x,y. x ≤ y → ∀z. x - z ≤ y - z. +#x #y #Hxy * // +#z elim z -z /3 width=1 by yle_pred/ +qed. + +(* Properties on strict order ***********************************************) + +lemma monotonic_ylt_minus_dx: ∀x,y:ynat. x < y → ∀z:nat. z ≤ x → x - z < y - z. +#x #y * -x -y +/4 width=1 by ylt_inj, yle_inv_inj, monotonic_lt_minus_l/ +qed. diff --git a/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_plus.ma b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_plus.ma new file mode 100644 index 000000000..761fc9965 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2A/ynat/ynat_plus.ma @@ -0,0 +1,203 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2A/ynat/ynat_minus.ma". + +(* NATURAL NUMBERS WITH INFINITY ********************************************) + +(* addition *) +definition yplus: ynat → ynat → ynat ≝ λx,y. match y with +[ yinj n ⇒ ysucc^n x +| Y ⇒ Y +]. + +interpretation "ynat plus" 'plus x y = (yplus x y). + +(* Properties on successor **************************************************) + +lemma yplus_succ2: ∀m,n. m + ⫯n = ⫯(m + n). +#m * // +qed. + +lemma yplus_succ1: ∀m,n. ⫯m + n = ⫯(m + n). +#m * normalize // +qed. + +lemma yplus_succ_swap: ∀m,n. m + ⫯n = ⫯m + n. +// qed. + +lemma yplus_SO2: ∀m. m + 1 = ⫯m. +* // +qed. + +(* Basic properties *********************************************************) + +lemma yplus_inj: ∀n,m. yinj m + yinj n = yinj (m + n). +#n elim n -n [ normalize // ] +#n #IHn #m >(yplus_succ2 ? n) >IHn -IHn +ysucc_iter_Y // +qed. + +lemma yplus_assoc: associative … yplus. +#x #y * // #z cases y -y +[ #y >yplus_inj whd in ⊢ (??%%); yplus_Y1 // +] +qed. + +lemma yplus_O1: ∀n:ynat. 0 + n = n. +#n >yplus_comm // qed. + +(* Basic inversion lemmas ***************************************************) + +lemma yplus_inv_inj: ∀z,y,x. x + y = yinj z → + ∃∃m,n. m + n = z & x = yinj m & y = yinj n. +#z * [2: normalize #x #H destruct ] +#y * [2: >yplus_Y1 #H destruct ] +/3 width=5 by yinj_inj, ex3_2_intro/ +qed-. + +(* Properties on order ******************************************************) + +lemma yle_plus_dx2: ∀n,m. n ≤ m + n. +* // +#n elim n -n // +#n #IHn #m >(yplus_succ2 ? n) @(yle_succ n) // (**) (* full auto fails *) +qed. + +lemma yle_plus_dx1: ∀n,m. m ≤ m + n. +// qed. + +lemma yle_plus_dx1_trans: ∀x,z. z ≤ x → ∀y. z ≤ x + y. +/2 width=3 by yle_trans/ qed. + +lemma yle_plus_dx2_trans: ∀y,z. z ≤ y → ∀x. z ≤ x + y. +/2 width=3 by yle_trans/ qed. + +lemma monotonic_yle_plus_dx: ∀x,y. x ≤ y → ∀z. x + z ≤ y + z. +#x #y #Hxy * // +#z elim z -z /3 width=1 by yle_succ/ +qed. + +lemma monotonic_yle_plus_sn: ∀x,y. x ≤ y → ∀z. z + x ≤ z + y. +/2 width=1 by monotonic_yle_plus_dx/ qed. + +lemma monotonic_yle_plus: ∀x1,y1. x1 ≤ y1 → ∀x2,y2. x2 ≤ y2 → + x1 + x2 ≤ y1 + y2. +/3 width=3 by monotonic_yle_plus_dx, yle_trans/ qed. + +(* Forward lemmas on order **************************************************) + +lemma yle_fwd_plus_sn2: ∀x,y,z. x + y ≤ z → y ≤ z. +/2 width=3 by yle_trans/ qed-. + +lemma yle_fwd_plus_sn1: ∀x,y,z. x + y ≤ z → x ≤ z. +/2 width=3 by yle_trans/ qed-. + +lemma yle_inv_monotonic_plus_dx: ∀x,y:ynat.∀z:nat. x + z ≤ y + z → x ≤ y. +#x #y #z elim z -z /3 width=1 by yle_inv_succ/ +qed-. + +lemma yle_inv_monotonic_plus_sn: ∀x,y:ynat.∀z:nat. z + x ≤ z + y → x ≤ y. +/2 width=2 by yle_inv_monotonic_plus_dx/ qed-. + +lemma yle_fwd_plus_ge: ∀m1,m2:nat. m2 ≤ m1 → ∀n1,n2:ynat. m1 + n1 ≤ m2 + n2 → n1 ≤ n2. +#m1 #m2 #Hm12 #n1 #n2 #H +lapply (monotonic_yle_plus … Hm12 … H) -Hm12 -H +/2 width=2 by yle_inv_monotonic_plus_sn/ +qed-. + +lemma yle_fwd_plus_ge_inj: ∀m1:nat. ∀m2,n1,n2:ynat. m2 ≤ m1 → m1 + n1 ≤ m2 + n2 → n1 ≤ n2. +#m2 #m1 #n1 #n2 #H elim (yle_inv_inj2 … H) -H +#x #H0 #H destruct /3 width=4 by yle_fwd_plus_ge, yle_inj/ +qed-. + +(* Forward lemmas on strict order *******************************************) + +lemma ylt_inv_monotonic_plus_dx: ∀x,y,z. x + z < y + z → x < y. +* [2: #y #z >yplus_comm #H elim (ylt_inv_Y1 … H) ] +#x * // #y * [2: #H elim (ylt_inv_Y1 … H) ] +/4 width=3 by ylt_inv_inj, ylt_inj, lt_plus_to_lt_l/ +qed-. + +(* Properties on strict order ***********************************************) + +lemma ylt_plus_dx1_trans: ∀x,z. z < x → ∀y. z < x + yinj y. +/2 width=3 by ylt_yle_trans/ qed. + +lemma ylt_plus_dx2_trans: ∀y,z. z < y → ∀x. z < yinj x + y. +/2 width=3 by ylt_yle_trans/ qed. + +lemma monotonic_ylt_plus_dx: ∀x,y. x < y → ∀z:nat. x + yinj z < y + yinj z. +#x #y #Hxy #z elim z -z /3 width=1 by ylt_succ/ +qed. + +lemma monotonic_ylt_plus_sn: ∀x,y. x < y → ∀z:nat. yinj z + x < yinj z + y. +/2 width=1 by monotonic_ylt_plus_dx/ qed. + +(* Properties on minus ******************************************************) + +lemma yplus_minus_inj: ∀m:ynat. ∀n:nat. m + n - n = m. +#m #n elim n -n // +#n #IHn >(yplus_succ2 m n) >(yminus_succ … n) // +qed. + +lemma yplus_minus: ∀m,n. m + n - n ≤ m. +#m * // +qed. + +(* Forward lemmas on minus **************************************************) + +lemma yle_plus1_to_minus_inj2: ∀x,z:ynat. ∀y:nat. x + y ≤ z → x ≤ z - y. +/2 width=1 by monotonic_yle_minus_dx/ qed-. + +lemma yle_plus1_to_minus_inj1: ∀x,z:ynat. ∀y:nat. y + x ≤ z → x ≤ z - y. +/2 width=1 by yle_plus1_to_minus_inj2/ qed-. + +lemma yle_plus2_to_minus_inj2: ∀x,y:ynat. ∀z:nat. x ≤ y + z → x - z ≤ y. +/2 width=1 by monotonic_yle_minus_dx/ qed-. + +lemma yle_plus2_to_minus_inj1: ∀x,y:ynat. ∀z:nat. x ≤ z + y → x - z ≤ y. +/2 width=1 by yle_plus2_to_minus_inj2/ qed-. + +lemma yplus_minus_assoc_inj: ∀x:nat. ∀y,z:ynat. x ≤ y → z + (y - x) = z + y - x. +#x * +[ #y * // #z >yminus_inj >yplus_inj >yplus_inj + /4 width=1 by yle_inv_inj, plus_minus, eq_f/ +| >yminus_Y_inj // +] +qed-. + +lemma yplus_minus_comm_inj: ∀y:nat. ∀x,z:ynat. y ≤ x → x + z - y = x - y + z. +#y * // #x * // +#z #Hxy >yplus_inj >yminus_inj IHm // +qed. + +(* Inversion lemmas *********************************************************) + +lemma ysucc_inj: ∀m,n. ⫯m = ⫯n → m = n. +#m #n #H <(ypred_succ m) <(ypred_succ n) // +qed-. + +lemma ysucc_inv_refl: ∀m. ⫯m = m → m = ∞. +* // normalize +#m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *) +#H elim (lt_refl_false m) // +qed-. + +lemma ysucc_inv_inj_sn: ∀m2,n1. yinj m2 = ⫯n1 → + ∃∃m1. n1 = yinj m1 & m2 = S m1. +#m2 * normalize +[ #n1 #H destruct /2 width=3 by ex2_intro/ +| #H destruct +] +qed-. + +lemma ysucc_inv_inj_dx: ∀m2,n1. ⫯n1 = yinj m2 → + ∃∃m1. n1 = yinj m1 & m2 = S m1. +/2 width=1 by ysucc_inv_inj_sn/ qed-. + +lemma ysucc_inv_Y_sn: ∀m. ∞ = ⫯m → m = ∞. +* // normalize +#m #H destruct +qed-. + +lemma ysucc_inv_Y_dx: ∀m. ⫯m = ∞ → m = ∞. +/2 width=1 by ysucc_inv_Y_sn/ qed-. + +lemma ysucc_inv_O_sn: ∀m. yinj 0 = ⫯m → ⊥. (**) (* explicit coercion *) +#m #H elim (ysucc_inv_inj_sn … H) -H +#n #_ #H destruct +qed-. + +lemma ysucc_inv_O_dx: ∀m. ⫯m = 0 → ⊥. +/2 width=2 by ysucc_inv_O_sn/ qed-. diff --git a/matita/matita/contribs/lambdadelta/hls.ml b/matita/matita/contribs/lambdadelta/hls.ml deleted file mode 100644 index d796a4a66..000000000 --- a/matita/matita/contribs/lambdadelta/hls.ml +++ /dev/null @@ -1,57 +0,0 @@ -let cols = - try int_of_string (Sys.getenv "COLUMNS") - with Not_found -> failwith "environment variable COLUMNS not visible" - -let hl = ref [] - -let normal = "\x1B[0m" - -let color = "\x1B[32m" - -let add s = - if s = "" then false else - begin hl := s :: !hl; true end - -let rec read ich = - if Scanf.fscanf ich "%s " add then read ich - -let length l s = max l (String.length s) - -let split s = -try - let i = String.rindex s '.' in - if i = 0 then s, "" else - String.sub s 0 i, String.sub s i (String.length s - i) -with Not_found -> s, "" - -let compare s1 s2 = - let n1, e1 = split s1 in - let n2, e2 = split s2 in - let e = String.compare e1 e2 in - if e = 0 then String.compare n1 n2 else e - -let write l c s = - let pre, post = if List.mem s !hl then color, normal else "", "" in - let spc = String.make (l - String.length s) ' ' in - let bol, ret = - if c = 0 || c = cols then "", l else - if c + l < cols then " ", c + succ l else "\n", l - in - Printf.printf "%s%s%s%s%s" bol pre s post spc; - ret - -let process fname = - let ich = open_in fname in - read ich; close_in ich - -let help = "" - -let main = - Arg.parse [] process help; - let files = Sys.readdir "." in - let l = Array.fold_left length 0 files in - if cols < l then failwith "window too small"; - Array.fast_sort compare files; - let c = Array.fold_left (write l) 0 files in - if 0 < c && c < cols then print_newline (); - diff --git a/matita/matita/contribs/lambdadelta/legacy_1/coq/defs.ma b/matita/matita/contribs/lambdadelta/legacy_1/coq/defs.ma deleted file mode 100644 index 497403d32..000000000 --- a/matita/matita/contribs/lambdadelta/legacy_1/coq/defs.ma +++ /dev/null @@ -1,93 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "legacy_1/preamble.ma". - -inductive eq (A: Type[0]) (x: A): A \to Prop \def -| refl_equal: eq A x x. - -inductive True: Prop \def -| I: True. - -inductive land (A: Prop) (B: Prop): Prop \def -| conj: A \to (B \to (land A B)). - -inductive or (A: Prop) (B: Prop): Prop \def -| or_introl: A \to (or A B) -| or_intror: B \to (or A B). - -inductive ex (A: Type[0]) (P: A \to Prop): Prop \def -| ex_intro: \forall (x: A).((P x) \to (ex A P)). - -inductive ex2 (A: Type[0]) (P: A \to Prop) (Q: A \to Prop): Prop \def -| ex_intro2: \forall (x: A).((P x) \to ((Q x) \to (ex2 A P Q))). - -definition not: - Prop \to Prop -\def - \lambda (A: Prop).(A \to False). - -inductive bool: Type[0] \def -| true: bool -| false: bool. - -inductive nat: Type[0] \def -| O: nat -| S: nat \to nat. - -inductive le (n: nat): nat \to Prop \def -| le_n: le n n -| le_S: \forall (m: nat).((le n m) \to (le n (S m))). - -definition lt: - nat \to (nat \to Prop) -\def - \lambda (n: nat).(\lambda (m: nat).(le (S n) m)). - -definition IsSucc: - nat \to Prop -\def - \lambda (n: nat).(match n with [O \Rightarrow False | (S _) \Rightarrow -True]). - -definition pred: - nat \to nat -\def - \lambda (n: nat).(match n with [O \Rightarrow O | (S u) \Rightarrow u]). - -rec definition plus (n: nat) on n: nat \to nat \def \lambda (m: nat).(match n -with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))]). - -rec definition minus (n: nat) on n: nat \to nat \def \lambda (m: nat).(match -n with [O \Rightarrow O | (S k) \Rightarrow (match m with [O \Rightarrow (S -k) | (S l) \Rightarrow (minus k l)])]). - -inductive Acc (A: Type[0]) (R: A \to (A \to Prop)): A \to Prop \def -| Acc_intro: \forall (x: A).(((\forall (y: A).((R y x) \to (Acc A R y)))) \to -(Acc A R x)). - -definition well_founded: - \forall (A: Type[0]).(((A \to (A \to Prop))) \to Prop) -\def - \lambda (A: Type[0]).(\lambda (R: ((A \to (A \to Prop)))).(\forall (a: -A).(Acc A R a))). - -definition ltof: - \forall (A: Type[0]).(((A \to nat)) \to (A \to (A \to Prop))) -\def - \lambda (A: Type[0]).(\lambda (f: ((A \to nat))).(\lambda (a: A).(\lambda -(b: A).(lt (f a) (f b))))). - diff --git a/matita/matita/contribs/lambdadelta/legacy_1/coq/fwd.ma b/matita/matita/contribs/lambdadelta/legacy_1/coq/fwd.ma deleted file mode 100644 index c11c7d732..000000000 --- a/matita/matita/contribs/lambdadelta/legacy_1/coq/fwd.ma +++ /dev/null @@ -1,94 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "legacy_1/coq/defs.ma". - -implied lemma False_rect: - \forall (P: Type[0]).(False \to P) -\def - \lambda (P: Type[0]).(\lambda (f: False).(match f in False with [])). - -implied lemma False_ind: - \forall (P: Prop).(False \to P) -\def - \lambda (P: Prop).(False_rect P). - -implied lemma land_rect: - \forall (A: Prop).(\forall (B: Prop).(\forall (P: Type[0]).(((A \to (B \to -P))) \to ((land A B) \to P)))) -\def - \lambda (A: Prop).(\lambda (B: Prop).(\lambda (P: Type[0]).(\lambda (f: ((A -\to (B \to P)))).(\lambda (a: (land A B)).(match a with [(conj x x0) -\Rightarrow (f x x0)]))))). - -implied lemma land_ind: - \forall (A: Prop).(\forall (B: Prop).(\forall (P: Prop).(((A \to (B \to P))) -\to ((land A B) \to P)))) -\def - \lambda (A: Prop).(\lambda (B: Prop).(\lambda (P: Prop).(land_rect A B P))). - -implied lemma or_ind: - \forall (A: Prop).(\forall (B: Prop).(\forall (P: Prop).(((A \to P)) \to -(((B \to P)) \to ((or A B) \to P))))) -\def - \lambda (A: Prop).(\lambda (B: Prop).(\lambda (P: Prop).(\lambda (f: ((A \to -P))).(\lambda (f0: ((B \to P))).(\lambda (o: (or A B)).(match o with -[(or_introl x) \Rightarrow (f x) | (or_intror x) \Rightarrow (f0 x)])))))). - -implied lemma ex_ind: - \forall (A: Type[0]).(\forall (P: ((A \to Prop))).(\forall (P0: -Prop).(((\forall (x: A).((P x) \to P0))) \to ((ex A P) \to P0)))) -\def - \lambda (A: Type[0]).(\lambda (P: ((A \to Prop))).(\lambda (P0: -Prop).(\lambda (f: ((\forall (x: A).((P x) \to P0)))).(\lambda (e: (ex A -P)).(match e with [(ex_intro x x0) \Rightarrow (f x x0)]))))). - -implied lemma ex2_ind: - \forall (A: Type[0]).(\forall (P: ((A \to Prop))).(\forall (Q: ((A \to -Prop))).(\forall (P0: Prop).(((\forall (x: A).((P x) \to ((Q x) \to P0)))) -\to ((ex2 A P Q) \to P0))))) -\def - \lambda (A: Type[0]).(\lambda (P: ((A \to Prop))).(\lambda (Q: ((A \to -Prop))).(\lambda (P0: Prop).(\lambda (f: ((\forall (x: A).((P x) \to ((Q x) -\to P0))))).(\lambda (e: (ex2 A P Q)).(match e with [(ex_intro2 x x0 x1) -\Rightarrow (f x x0 x1)])))))). - -implied lemma eq_rect: - \forall (A: Type[0]).(\forall (x: A).(\forall (P: ((A \to Type[0]))).((P x) -\to (\forall (y: A).((eq A x y) \to (P y)))))) -\def - \lambda (A: Type[0]).(\lambda (x: A).(\lambda (P: ((A \to -Type[0]))).(\lambda (f: (P x)).(\lambda (y: A).(\lambda (e: (eq A x -y)).(match e with [refl_equal \Rightarrow f])))))). - -implied lemma eq_ind: - \forall (A: Type[0]).(\forall (x: A).(\forall (P: ((A \to Prop))).((P x) \to -(\forall (y: A).((eq A x y) \to (P y)))))) -\def - \lambda (A: Type[0]).(\lambda (x: A).(\lambda (P: ((A \to Prop))).(eq_rect A -x P))). - -implied rec lemma le_ind (n: nat) (P: (nat \to Prop)) (f: P n) (f0: (\forall -(m: nat).((le n m) \to ((P m) \to (P (S m)))))) (n0: nat) (l: le n n0) on l: -P n0 \def match l with [le_n \Rightarrow f | (le_S m l0) \Rightarrow (f0 m l0 -((le_ind n P f f0) m l0))]. - -implied rec lemma Acc_ind (A: Type[0]) (R: (A \to (A \to Prop))) (P: (A \to -Prop)) (f: (\forall (x: A).(((\forall (y: A).((R y x) \to (Acc A R y)))) \to -(((\forall (y: A).((R y x) \to (P y)))) \to (P x))))) (a: A) (a0: Acc A R a) -on a0: P a \def match a0 with [(Acc_intro x a1) \Rightarrow (f x a1 (\lambda -(y: A).(\lambda (r0: (R y x)).((Acc_ind A R P f) y (a1 y r0)))))]. - diff --git a/matita/matita/contribs/lambdadelta/legacy_1/coq/props.ma b/matita/matita/contribs/lambdadelta/legacy_1/coq/props.ma deleted file mode 100644 index b5069fdf7..000000000 --- a/matita/matita/contribs/lambdadelta/legacy_1/coq/props.ma +++ /dev/null @@ -1,597 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "legacy_1/coq/fwd.ma". - -lemma f_equal: - \forall (A: Type[0]).(\forall (B: Type[0]).(\forall (f: ((A \to -B))).(\forall (x: A).(\forall (y: A).((eq A x y) \to (eq B (f x) (f y))))))) -\def - \lambda (A: Type[0]).(\lambda (B: Type[0]).(\lambda (f: ((A \to -B))).(\lambda (x: A).(\lambda (y: A).(\lambda (H: (eq A x y)).(eq_ind A x -(\lambda (a: A).(eq B (f x) (f a))) (refl_equal B (f x)) y H)))))). - -lemma f_equal2: - \forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall (B: Type[0]).(\forall -(f: ((A1 \to (A2 \to B)))).(\forall (x1: A1).(\forall (y1: A1).(\forall (x2: -A2).(\forall (y2: A2).((eq A1 x1 y1) \to ((eq A2 x2 y2) \to (eq B (f x1 x2) -(f y1 y2))))))))))) -\def - \lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda (B: Type[0]).(\lambda -(f: ((A1 \to (A2 \to B)))).(\lambda (x1: A1).(\lambda (y1: A1).(\lambda (x2: -A2).(\lambda (y2: A2).(\lambda (H: (eq A1 x1 y1)).(eq_ind A1 x1 (\lambda (a: -A1).((eq A2 x2 y2) \to (eq B (f x1 x2) (f a y2)))) (\lambda (H0: (eq A2 x2 -y2)).(eq_ind A2 x2 (\lambda (a: A2).(eq B (f x1 x2) (f x1 a))) (refl_equal B -(f x1 x2)) y2 H0)) y1 H))))))))). - -lemma f_equal3: - \forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall (A3: Type[0]).(\forall -(B: Type[0]).(\forall (f: ((A1 \to (A2 \to (A3 \to B))))).(\forall (x1: -A1).(\forall (y1: A1).(\forall (x2: A2).(\forall (y2: A2).(\forall (x3: -A3).(\forall (y3: A3).((eq A1 x1 y1) \to ((eq A2 x2 y2) \to ((eq A3 x3 y3) -\to (eq B (f x1 x2 x3) (f y1 y2 y3))))))))))))))) -\def - \lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda (A3: Type[0]).(\lambda -(B: Type[0]).(\lambda (f: ((A1 \to (A2 \to (A3 \to B))))).(\lambda (x1: -A1).(\lambda (y1: A1).(\lambda (x2: A2).(\lambda (y2: A2).(\lambda (x3: -A3).(\lambda (y3: A3).(\lambda (H: (eq A1 x1 y1)).(eq_ind A1 x1 (\lambda (a: -A1).((eq A2 x2 y2) \to ((eq A3 x3 y3) \to (eq B (f x1 x2 x3) (f a y2 y3))))) -(\lambda (H0: (eq A2 x2 y2)).(eq_ind A2 x2 (\lambda (a: A2).((eq A3 x3 y3) -\to (eq B (f x1 x2 x3) (f x1 a y3)))) (\lambda (H1: (eq A3 x3 y3)).(eq_ind A3 -x3 (\lambda (a: A3).(eq B (f x1 x2 x3) (f x1 x2 a))) (refl_equal B (f x1 x2 -x3)) y3 H1)) y2 H0)) y1 H)))))))))))). - -lemma sym_eq: - \forall (A: Type[0]).(\forall (x: A).(\forall (y: A).((eq A x y) \to (eq A y -x)))) -\def - \lambda (A: Type[0]).(\lambda (x: A).(\lambda (y: A).(\lambda (H: (eq A x -y)).(eq_ind A x (\lambda (a: A).(eq A a x)) (refl_equal A x) y H)))). - -lemma eq_ind_r: - \forall (A: Type[0]).(\forall (x: A).(\forall (P: ((A \to Prop))).((P x) \to -(\forall (y: A).((eq A y x) \to (P y)))))) -\def - \lambda (A: Type[0]).(\lambda (x: A).(\lambda (P: ((A \to Prop))).(\lambda -(H: (P x)).(\lambda (y: A).(\lambda (H0: (eq A y x)).(match (sym_eq A y x H0) -with [refl_equal \Rightarrow H])))))). - -lemma trans_eq: - \forall (A: Type[0]).(\forall (x: A).(\forall (y: A).(\forall (z: A).((eq A -x y) \to ((eq A y z) \to (eq A x z)))))) -\def - \lambda (A: Type[0]).(\lambda (x: A).(\lambda (y: A).(\lambda (z: -A).(\lambda (H: (eq A x y)).(\lambda (H0: (eq A y z)).(eq_ind A y (\lambda -(a: A).(eq A x a)) H z H0)))))). - -lemma sym_not_eq: - \forall (A: Type[0]).(\forall (x: A).(\forall (y: A).((not (eq A x y)) \to -(not (eq A y x))))) -\def - \lambda (A: Type[0]).(\lambda (x: A).(\lambda (y: A).(\lambda (h1: (not (eq -A x y))).(\lambda (h2: (eq A y x)).(h1 (eq_ind A y (\lambda (a: A).(eq A a -y)) (refl_equal A y) x h2)))))). - -lemma nat_double_ind: - \forall (R: ((nat \to (nat \to Prop)))).(((\forall (n: nat).(R O n))) \to -(((\forall (n: nat).(R (S n) O))) \to (((\forall (n: nat).(\forall (m: -nat).((R n m) \to (R (S n) (S m)))))) \to (\forall (n: nat).(\forall (m: -nat).(R n m)))))) -\def - \lambda (R: ((nat \to (nat \to Prop)))).(\lambda (H: ((\forall (n: nat).(R O -n)))).(\lambda (H0: ((\forall (n: nat).(R (S n) O)))).(\lambda (H1: ((\forall -(n: nat).(\forall (m: nat).((R n m) \to (R (S n) (S m))))))).(\lambda (n: -nat).(nat_ind (\lambda (n0: nat).(\forall (m: nat).(R n0 m))) H (\lambda (n0: -nat).(\lambda (H2: ((\forall (m: nat).(R n0 m)))).(\lambda (m: nat).(nat_ind -(\lambda (n1: nat).(R (S n0) n1)) (H0 n0) (\lambda (n1: nat).(\lambda (_: (R -(S n0) n1)).(H1 n0 n1 (H2 n1)))) m)))) n))))). - -lemma eq_add_S: - \forall (n: nat).(\forall (m: nat).((eq nat (S n) (S m)) \to (eq nat n m))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (eq nat (S n) (S -m))).(f_equal nat nat pred (S n) (S m) H))). - -lemma O_S: - \forall (n: nat).(not (eq nat O (S n))) -\def - \lambda (n: nat).(\lambda (H: (eq nat O (S n))).(eq_ind nat (S n) (\lambda -(n0: nat).(IsSucc n0)) I O (sym_eq nat O (S n) H))). - -lemma not_eq_S: - \forall (n: nat).(\forall (m: nat).((not (eq nat n m)) \to (not (eq nat (S -n) (S m))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (not (eq nat n m))).(\lambda -(H0: (eq nat (S n) (S m))).(H (eq_add_S n m H0))))). - -lemma pred_Sn: - \forall (m: nat).(eq nat m (pred (S m))) -\def - \lambda (m: nat).(refl_equal nat (pred (S m))). - -lemma S_pred: - \forall (n: nat).(\forall (m: nat).((lt m n) \to (eq nat n (S (pred n))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt m n)).(le_ind (S m) -(\lambda (n0: nat).(eq nat n0 (S (pred n0)))) (refl_equal nat (S (pred (S -m)))) (\lambda (m0: nat).(\lambda (_: (le (S m) m0)).(\lambda (_: (eq nat m0 -(S (pred m0)))).(refl_equal nat (S (pred (S m0))))))) n H))). - -lemma le_trans: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to ((le m p) -\to (le n p))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (le n -m)).(\lambda (H0: (le m p)).(le_ind m (\lambda (n0: nat).(le n n0)) H -(\lambda (m0: nat).(\lambda (_: (le m m0)).(\lambda (IHle: (le n m0)).(le_S n -m0 IHle)))) p H0))))). - -lemma le_trans_S: - \forall (n: nat).(\forall (m: nat).((le (S n) m) \to (le n m))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le (S n) m)).(le_trans n (S -n) m (le_S n n (le_n n)) H))). - -lemma le_n_S: - \forall (n: nat).(\forall (m: nat).((le n m) \to (le (S n) (S m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda -(n0: nat).(le (S n) (S n0))) (le_n (S n)) (\lambda (m0: nat).(\lambda (_: (le -n m0)).(\lambda (IHle: (le (S n) (S m0))).(le_S (S n) (S m0) IHle)))) m H))). - -lemma le_O_n: - \forall (n: nat).(le O n) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(le O n0)) (le_n O) (\lambda -(n0: nat).(\lambda (IHn: (le O n0)).(le_S O n0 IHn))) n). - -lemma le_S_n: - \forall (n: nat).(\forall (m: nat).((le (S n) (S m)) \to (le n m))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le (S n) (S m))).(le_ind (S -n) (\lambda (n0: nat).(le (pred (S n)) (pred n0))) (le_n n) (\lambda (m0: -nat).(\lambda (H0: (le (S n) m0)).(\lambda (_: (le n (pred m0))).(le_trans_S -n m0 H0)))) (S m) H))). - -lemma le_Sn_O: - \forall (n: nat).(not (le (S n) O)) -\def - \lambda (n: nat).(\lambda (H: (le (S n) O)).(le_ind (S n) (\lambda (n0: -nat).(IsSucc n0)) I (\lambda (m: nat).(\lambda (_: (le (S n) m)).(\lambda (_: -(IsSucc m)).I))) O H)). - -lemma le_Sn_n: - \forall (n: nat).(not (le (S n) n)) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(not (le (S n0) n0))) (le_Sn_O -O) (\lambda (n0: nat).(\lambda (IHn: (not (le (S n0) n0))).(\lambda (H: (le -(S (S n0)) (S n0))).(IHn (le_S_n (S n0) n0 H))))) n). - -lemma le_antisym: - \forall (n: nat).(\forall (m: nat).((le n m) \to ((le m n) \to (eq nat n -m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (h: (le n m)).(le_ind n (\lambda -(n0: nat).((le n0 n) \to (eq nat n n0))) (\lambda (_: (le n n)).(refl_equal -nat n)) (\lambda (m0: nat).(\lambda (H: (le n m0)).(\lambda (_: (((le m0 n) -\to (eq nat n m0)))).(\lambda (H1: (le (S m0) n)).(False_ind (eq nat n (S -m0)) (let H2 \def (le_trans (S m0) n m0 H1 H) in ((let H3 \def (le_Sn_n m0) -in (\lambda (H4: (le (S m0) m0)).(H3 H4))) H2))))))) m h))). - -lemma le_n_O_eq: - \forall (n: nat).((le n O) \to (eq nat O n)) -\def - \lambda (n: nat).(\lambda (H: (le n O)).(le_antisym O n (le_O_n n) H)). - -lemma le_elim_rel: - \forall (P: ((nat \to (nat \to Prop)))).(((\forall (p: nat).(P O p))) \to -(((\forall (p: nat).(\forall (q: nat).((le p q) \to ((P p q) \to (P (S p) (S -q))))))) \to (\forall (n: nat).(\forall (m: nat).((le n m) \to (P n m)))))) -\def - \lambda (P: ((nat \to (nat \to Prop)))).(\lambda (H: ((\forall (p: nat).(P O -p)))).(\lambda (H0: ((\forall (p: nat).(\forall (q: nat).((le p q) \to ((P p -q) \to (P (S p) (S q)))))))).(\lambda (n: nat).(nat_ind (\lambda (n0: -nat).(\forall (m: nat).((le n0 m) \to (P n0 m)))) (\lambda (m: nat).(\lambda -(_: (le O m)).(H m))) (\lambda (n0: nat).(\lambda (IHn: ((\forall (m: -nat).((le n0 m) \to (P n0 m))))).(\lambda (m: nat).(\lambda (Le: (le (S n0) -m)).(le_ind (S n0) (\lambda (n1: nat).(P (S n0) n1)) (H0 n0 n0 (le_n n0) (IHn -n0 (le_n n0))) (\lambda (m0: nat).(\lambda (H1: (le (S n0) m0)).(\lambda (_: -(P (S n0) m0)).(H0 n0 m0 (le_trans_S n0 m0 H1) (IHn m0 (le_trans_S n0 m0 -H1)))))) m Le))))) n)))). - -lemma lt_n_n: - \forall (n: nat).(not (lt n n)) -\def - le_Sn_n. - -lemma lt_n_S: - \forall (n: nat).(\forall (m: nat).((lt n m) \to (lt (S n) (S m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt n m)).(le_n_S (S n) m -H))). - -lemma lt_n_Sn: - \forall (n: nat).(lt n (S n)) -\def - \lambda (n: nat).(le_n (S n)). - -lemma lt_S_n: - \forall (n: nat).(\forall (m: nat).((lt (S n) (S m)) \to (lt n m))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt (S n) (S m))).(le_S_n (S -n) m H))). - -lemma lt_n_O: - \forall (n: nat).(not (lt n O)) -\def - le_Sn_O. - -lemma lt_trans: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to ((lt m p) -\to (lt n p))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (lt n -m)).(\lambda (H0: (lt m p)).(le_ind (S m) (\lambda (n0: nat).(lt n n0)) (le_S -(S n) m H) (\lambda (m0: nat).(\lambda (_: (le (S m) m0)).(\lambda (IHle: (lt -n m0)).(le_S (S n) m0 IHle)))) p H0))))). - -lemma lt_O_Sn: - \forall (n: nat).(lt O (S n)) -\def - \lambda (n: nat).(le_n_S O n (le_O_n n)). - -lemma lt_le_S: - \forall (n: nat).(\forall (p: nat).((lt n p) \to (le (S n) p))) -\def - \lambda (n: nat).(\lambda (p: nat).(\lambda (H: (lt n p)).H)). - -lemma le_not_lt: - \forall (n: nat).(\forall (m: nat).((le n m) \to (not (lt m n)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda -(n0: nat).(not (lt n0 n))) (lt_n_n n) (\lambda (m0: nat).(\lambda (_: (le n -m0)).(\lambda (IHle: (not (lt m0 n))).(\lambda (H1: (lt (S m0) n)).(IHle -(le_trans_S (S m0) n H1)))))) m H))). - -lemma le_lt_n_Sm: - \forall (n: nat).(\forall (m: nat).((le n m) \to (lt n (S m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_n_S n m H))). - -lemma le_lt_trans: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to ((lt m p) -\to (lt n p))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (le n -m)).(\lambda (H0: (lt m p)).(le_ind (S m) (\lambda (n0: nat).(lt n n0)) -(le_n_S n m H) (\lambda (m0: nat).(\lambda (_: (le (S m) m0)).(\lambda (IHle: -(lt n m0)).(le_S (S n) m0 IHle)))) p H0))))). - -lemma lt_le_trans: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to ((le m p) -\to (lt n p))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (lt n -m)).(\lambda (H0: (le m p)).(le_ind m (\lambda (n0: nat).(lt n n0)) H -(\lambda (m0: nat).(\lambda (_: (le m m0)).(\lambda (IHle: (lt n m0)).(le_S -(S n) m0 IHle)))) p H0))))). - -lemma lt_le_weak: - \forall (n: nat).(\forall (m: nat).((lt n m) \to (le n m))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt n m)).(le_trans_S n m -H))). - -lemma lt_n_Sm_le: - \forall (n: nat).(\forall (m: nat).((lt n (S m)) \to (le n m))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt n (S m))).(le_S_n n m -H))). - -lemma le_lt_or_eq: - \forall (n: nat).(\forall (m: nat).((le n m) \to (or (lt n m) (eq nat n m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda -(n0: nat).(or (lt n n0) (eq nat n n0))) (or_intror (lt n n) (eq nat n n) -(refl_equal nat n)) (\lambda (m0: nat).(\lambda (H0: (le n m0)).(\lambda (_: -(or (lt n m0) (eq nat n m0))).(or_introl (lt n (S m0)) (eq nat n (S m0)) -(le_n_S n m0 H0))))) m H))). - -lemma le_or_lt: - \forall (n: nat).(\forall (m: nat).(or (le n m) (lt m n))) -\def - \lambda (n: nat).(\lambda (m: nat).(nat_double_ind (\lambda (n0: -nat).(\lambda (n1: nat).(or (le n0 n1) (lt n1 n0)))) (\lambda (n0: -nat).(or_introl (le O n0) (lt n0 O) (le_O_n n0))) (\lambda (n0: -nat).(or_intror (le (S n0) O) (lt O (S n0)) (lt_le_S O (S n0) (lt_O_Sn n0)))) -(\lambda (n0: nat).(\lambda (m0: nat).(\lambda (H: (or (le n0 m0) (lt m0 -n0))).(or_ind (le n0 m0) (lt m0 n0) (or (le (S n0) (S m0)) (lt (S m0) (S -n0))) (\lambda (H0: (le n0 m0)).(or_introl (le (S n0) (S m0)) (lt (S m0) (S -n0)) (le_n_S n0 m0 H0))) (\lambda (H0: (lt m0 n0)).(or_intror (le (S n0) (S -m0)) (lt (S m0) (S n0)) (le_n_S (S m0) n0 H0))) H)))) n m)). - -lemma plus_n_O: - \forall (n: nat).(eq nat n (plus n O)) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat n0 (plus n0 O))) -(refl_equal nat O) (\lambda (n0: nat).(\lambda (H: (eq nat n0 (plus n0 -O))).(f_equal nat nat S n0 (plus n0 O) H))) n). - -lemma plus_n_Sm: - \forall (n: nat).(\forall (m: nat).(eq nat (S (plus n m)) (plus n (S m)))) -\def - \lambda (m: nat).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat (S -(plus n0 n)) (plus n0 (S n)))) (refl_equal nat (S n)) (\lambda (n0: -nat).(\lambda (H: (eq nat (S (plus n0 n)) (plus n0 (S n)))).(f_equal nat nat -S (S (plus n0 n)) (plus n0 (S n)) H))) m)). - -lemma plus_sym: - \forall (n: nat).(\forall (m: nat).(eq nat (plus n m) (plus m n))) -\def - \lambda (n: nat).(\lambda (m: nat).(nat_ind (\lambda (n0: nat).(eq nat (plus -n0 m) (plus m n0))) (plus_n_O m) (\lambda (y: nat).(\lambda (H: (eq nat (plus -y m) (plus m y))).(eq_ind nat (S (plus m y)) (\lambda (n0: nat).(eq nat (S -(plus y m)) n0)) (f_equal nat nat S (plus y m) (plus m y) H) (plus m (S y)) -(plus_n_Sm m y)))) n)). - -lemma plus_Snm_nSm: - \forall (n: nat).(\forall (m: nat).(eq nat (plus (S n) m) (plus n (S m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(eq_ind_r nat (plus m n) (\lambda (n0: -nat).(eq nat (S n0) (plus n (S m)))) (eq_ind_r nat (plus (S m) n) (\lambda -(n0: nat).(eq nat (S (plus m n)) n0)) (refl_equal nat (plus (S m) n)) (plus n -(S m)) (plus_sym n (S m))) (plus n m) (plus_sym n m))). - -lemma plus_assoc_l: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(eq nat (plus n (plus m -p)) (plus (plus n m) p)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: -nat).(eq nat (plus n0 (plus m p)) (plus (plus n0 m) p))) (refl_equal nat -(plus m p)) (\lambda (n0: nat).(\lambda (H: (eq nat (plus n0 (plus m p)) -(plus (plus n0 m) p))).(f_equal nat nat S (plus n0 (plus m p)) (plus (plus n0 -m) p) H))) n))). - -lemma plus_assoc_r: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(eq nat (plus (plus n -m) p) (plus n (plus m p))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(sym_eq nat (plus n -(plus m p)) (plus (plus n m) p) (plus_assoc_l n m p)))). - -lemma simpl_plus_l: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((eq nat (plus n m) -(plus n p)) \to (eq nat m p)))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (m: nat).(\forall (p: -nat).((eq nat (plus n0 m) (plus n0 p)) \to (eq nat m p))))) (\lambda (m: -nat).(\lambda (p: nat).(\lambda (H: (eq nat m p)).H))) (\lambda (n0: -nat).(\lambda (IHn: ((\forall (m: nat).(\forall (p: nat).((eq nat (plus n0 m) -(plus n0 p)) \to (eq nat m p)))))).(\lambda (m: nat).(\lambda (p: -nat).(\lambda (H: (eq nat (S (plus n0 m)) (S (plus n0 p)))).(IHn m p (IHn -(plus n0 m) (plus n0 p) (f_equal nat nat (plus n0) (plus n0 m) (plus n0 p) -(eq_add_S (plus n0 m) (plus n0 p) H))))))))) n). - -lemma minus_n_O: - \forall (n: nat).(eq nat n (minus n O)) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat n0 (minus n0 O))) -(refl_equal nat O) (\lambda (n0: nat).(\lambda (_: (eq nat n0 (minus n0 -O))).(refl_equal nat (S n0)))) n). - -lemma minus_n_n: - \forall (n: nat).(eq nat O (minus n n)) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat O (minus n0 n0))) -(refl_equal nat O) (\lambda (n0: nat).(\lambda (IHn: (eq nat O (minus n0 -n0))).IHn)) n). - -lemma minus_Sn_m: - \forall (n: nat).(\forall (m: nat).((le m n) \to (eq nat (S (minus n m)) -(minus (S n) m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (Le: (le m n)).(le_elim_rel -(\lambda (n0: nat).(\lambda (n1: nat).(eq nat (S (minus n1 n0)) (minus (S n1) -n0)))) (\lambda (p: nat).(f_equal nat nat S (minus p O) p (sym_eq nat p -(minus p O) (minus_n_O p)))) (\lambda (p: nat).(\lambda (q: nat).(\lambda (_: -(le p q)).(\lambda (H0: (eq nat (S (minus q p)) (match p with [O \Rightarrow -(S q) | (S l) \Rightarrow (minus q l)]))).H0)))) m n Le))). - -lemma plus_minus: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((eq nat n (plus m p)) -\to (eq nat p (minus n m))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_double_ind -(\lambda (n0: nat).(\lambda (n1: nat).((eq nat n1 (plus n0 p)) \to (eq nat p -(minus n1 n0))))) (\lambda (n0: nat).(\lambda (H: (eq nat n0 p)).(eq_ind nat -n0 (\lambda (n1: nat).(eq nat p n1)) (sym_eq nat n0 p H) (minus n0 O) -(minus_n_O n0)))) (\lambda (n0: nat).(\lambda (H: (eq nat O (S (plus n0 -p)))).(False_ind (eq nat p O) (let H0 \def H in ((let H1 \def (O_S (plus n0 -p)) in (\lambda (H2: (eq nat O (S (plus n0 p)))).(H1 H2))) H0))))) (\lambda -(n0: nat).(\lambda (m0: nat).(\lambda (H: (((eq nat m0 (plus n0 p)) \to (eq -nat p (minus m0 n0))))).(\lambda (H0: (eq nat (S m0) (S (plus n0 p)))).(H -(eq_add_S m0 (plus n0 p) H0)))))) m n))). - -lemma minus_plus: - \forall (n: nat).(\forall (m: nat).(eq nat (minus (plus n m) n) m)) -\def - \lambda (n: nat).(\lambda (m: nat).(sym_eq nat m (minus (plus n m) n) -(plus_minus (plus n m) n m (refl_equal nat (plus n m))))). - -lemma le_pred_n: - \forall (n: nat).(le (pred n) n) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(le (pred n0) n0)) (le_n O) -(\lambda (n0: nat).(\lambda (_: (le (pred n0) n0)).(le_S (pred (S n0)) n0 -(le_n n0)))) n). - -lemma le_plus_l: - \forall (n: nat).(\forall (m: nat).(le n (plus n m))) -\def - \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (m: nat).(le n0 (plus -n0 m)))) (\lambda (m: nat).(le_O_n m)) (\lambda (n0: nat).(\lambda (IHn: -((\forall (m: nat).(le n0 (plus n0 m))))).(\lambda (m: nat).(le_n_S n0 (plus -n0 m) (IHn m))))) n). - -lemma le_plus_r: - \forall (n: nat).(\forall (m: nat).(le m (plus n m))) -\def - \lambda (n: nat).(\lambda (m: nat).(nat_ind (\lambda (n0: nat).(le m (plus -n0 m))) (le_n m) (\lambda (n0: nat).(\lambda (H: (le m (plus n0 m))).(le_S m -(plus n0 m) H))) n)). - -lemma simpl_le_plus_l: - \forall (p: nat).(\forall (n: nat).(\forall (m: nat).((le (plus p n) (plus p -m)) \to (le n m)))) -\def - \lambda (p: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).(\forall (m: -nat).((le (plus n n0) (plus n m)) \to (le n0 m))))) (\lambda (n: -nat).(\lambda (m: nat).(\lambda (H: (le n m)).H))) (\lambda (p0: -nat).(\lambda (IHp: ((\forall (n: nat).(\forall (m: nat).((le (plus p0 n) -(plus p0 m)) \to (le n m)))))).(\lambda (n: nat).(\lambda (m: nat).(\lambda -(H: (le (S (plus p0 n)) (S (plus p0 m)))).(IHp n m (le_S_n (plus p0 n) (plus -p0 m) H))))))) p). - -lemma le_plus_trans: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to (le n -(plus m p))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (le n -m)).(le_trans n m (plus m p) H (le_plus_l m p))))). - -lemma le_reg_l: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to (le (plus -p n) (plus p m))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: -nat).((le n m) \to (le (plus n0 n) (plus n0 m)))) (\lambda (H: (le n m)).H) -(\lambda (p0: nat).(\lambda (IHp: (((le n m) \to (le (plus p0 n) (plus p0 -m))))).(\lambda (H: (le n m)).(le_n_S (plus p0 n) (plus p0 m) (IHp H))))) -p))). - -lemma le_plus_plus: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((le -n m) \to ((le p q) \to (le (plus n p) (plus m q))))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: -nat).(\lambda (H: (le n m)).(\lambda (H0: (le p q)).(le_ind n (\lambda (n0: -nat).(le (plus n p) (plus n0 q))) (le_reg_l p q n H0) (\lambda (m0: -nat).(\lambda (_: (le n m0)).(\lambda (H2: (le (plus n p) (plus m0 q))).(le_S -(plus n p) (plus m0 q) H2)))) m H)))))). - -lemma le_plus_minus: - \forall (n: nat).(\forall (m: nat).((le n m) \to (eq nat m (plus n (minus m -n))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (Le: (le n m)).(le_elim_rel -(\lambda (n0: nat).(\lambda (n1: nat).(eq nat n1 (plus n0 (minus n1 n0))))) -(\lambda (p: nat).(minus_n_O p)) (\lambda (p: nat).(\lambda (q: nat).(\lambda -(_: (le p q)).(\lambda (H0: (eq nat q (plus p (minus q p)))).(f_equal nat nat -S q (plus p (minus q p)) H0))))) n m Le))). - -lemma le_plus_minus_r: - \forall (n: nat).(\forall (m: nat).((le n m) \to (eq nat (plus n (minus m -n)) m))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(sym_eq nat m -(plus n (minus m n)) (le_plus_minus n m H)))). - -lemma simpl_lt_plus_l: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt (plus p n) (plus p -m)) \to (lt n m)))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: -nat).((lt (plus n0 n) (plus n0 m)) \to (lt n m))) (\lambda (H: (lt n m)).H) -(\lambda (p0: nat).(\lambda (IHp: (((lt (plus p0 n) (plus p0 m)) \to (lt n -m)))).(\lambda (H: (lt (S (plus p0 n)) (S (plus p0 m)))).(IHp (le_S_n (S -(plus p0 n)) (plus p0 m) H))))) p))). - -lemma lt_reg_l: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to (lt (plus -p n) (plus p m))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: -nat).((lt n m) \to (lt (plus n0 n) (plus n0 m)))) (\lambda (H: (lt n m)).H) -(\lambda (p0: nat).(\lambda (IHp: (((lt n m) \to (lt (plus p0 n) (plus p0 -m))))).(\lambda (H: (lt n m)).(lt_n_S (plus p0 n) (plus p0 m) (IHp H))))) -p))). - -lemma lt_reg_r: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to (lt (plus -n p) (plus m p))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (lt n -m)).(eq_ind_r nat (plus p n) (\lambda (n0: nat).(lt n0 (plus m p))) (eq_ind_r -nat (plus p m) (\lambda (n0: nat).(lt (plus p n) n0)) (nat_ind (\lambda (n0: -nat).(lt (plus n0 n) (plus n0 m))) H (\lambda (n0: nat).(\lambda (_: (lt -(plus n0 n) (plus n0 m))).(lt_reg_l n m (S n0) H))) p) (plus m p) (plus_sym m -p)) (plus n p) (plus_sym n p))))). - -lemma le_lt_plus_plus: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((le -n m) \to ((lt p q) \to (lt (plus n p) (plus m q))))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: -nat).(\lambda (H: (le n m)).(\lambda (H0: (le (S p) q)).(eq_ind_r nat (plus n -(S p)) (\lambda (n0: nat).(le n0 (plus m q))) (le_plus_plus n m (S p) q H H0) -(plus (S n) p) (plus_Snm_nSm n p))))))). - -lemma lt_le_plus_plus: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((lt -n m) \to ((le p q) \to (lt (plus n p) (plus m q))))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: -nat).(\lambda (H: (le (S n) m)).(\lambda (H0: (le p q)).(le_plus_plus (S n) m -p q H H0)))))). - -lemma lt_plus_plus: - \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((lt -n m) \to ((lt p q) \to (lt (plus n p) (plus m q))))))) -\def - \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: -nat).(\lambda (H: (lt n m)).(\lambda (H0: (lt p q)).(lt_le_plus_plus n m p q -H (lt_le_weak p q H0))))))). - -lemma well_founded_ltof: - \forall (A: Type[0]).(\forall (f: ((A \to nat))).(well_founded A (ltof A f))) -\def - \lambda (A: Type[0]).(\lambda (f: ((A \to nat))).(let H \def (\lambda (n: -nat).(nat_ind (\lambda (n0: nat).(\forall (a: A).((lt (f a) n0) \to (Acc A -(ltof A f) a)))) (\lambda (a: A).(\lambda (H: (lt (f a) O)).(False_ind (Acc A -(ltof A f) a) (let H0 \def H in ((let H1 \def (lt_n_O (f a)) in (\lambda (H2: -(lt (f a) O)).(H1 H2))) H0))))) (\lambda (n0: nat).(\lambda (IHn: ((\forall -(a: A).((lt (f a) n0) \to (Acc A (ltof A f) a))))).(\lambda (a: A).(\lambda -(ltSma: (lt (f a) (S n0))).(Acc_intro A (ltof A f) a (\lambda (b: A).(\lambda -(ltfafb: (lt (f b) (f a))).(IHn b (lt_le_trans (f b) (f a) n0 ltfafb -(lt_n_Sm_le (f a) n0 ltSma)))))))))) n)) in (\lambda (a: A).(H (S (f a)) a -(le_n (S (f a))))))). - -lemma lt_wf: - well_founded nat lt -\def - well_founded_ltof nat (\lambda (m: nat).m). - -lemma lt_wf_ind: - \forall (p: nat).(\forall (P: ((nat \to Prop))).(((\forall (n: -nat).(((\forall (m: nat).((lt m n) \to (P m)))) \to (P n)))) \to (P p))) -\def - \lambda (p: nat).(\lambda (P: ((nat \to Prop))).(\lambda (H: ((\forall (n: -nat).(((\forall (m: nat).((lt m n) \to (P m)))) \to (P n))))).(Acc_ind nat lt -(\lambda (n: nat).(P n)) (\lambda (x: nat).(\lambda (_: ((\forall (y: -nat).((lt y x) \to (Acc nat lt y))))).(\lambda (H1: ((\forall (y: nat).((lt y -x) \to (P y))))).(H x H1)))) p (lt_wf p)))). - diff --git a/matita/matita/contribs/lambdadelta/legacy_1/definitions.ma b/matita/matita/contribs/lambdadelta/legacy_1/definitions.ma deleted file mode 100644 index bcdc2a0a8..000000000 --- a/matita/matita/contribs/lambdadelta/legacy_1/definitions.ma +++ /dev/null @@ -1,18 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "legacy_1/coq/defs.ma". - diff --git a/matita/matita/contribs/lambdadelta/legacy_1/preamble.ma b/matita/matita/contribs/lambdadelta/legacy_1/preamble.ma deleted file mode 100644 index 5466cb15e..000000000 --- a/matita/matita/contribs/lambdadelta/legacy_1/preamble.ma +++ /dev/null @@ -1,17 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "basics/pts.ma". - -inductive False: Prop \def . diff --git a/matita/matita/contribs/lambdadelta/legacy_1/spare.ma b/matita/matita/contribs/lambdadelta/legacy_1/spare.ma deleted file mode 100644 index b276321ed..000000000 --- a/matita/matita/contribs/lambdadelta/legacy_1/spare.ma +++ /dev/null @@ -1,18 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "legacy_1/theory.ma". - diff --git a/matita/matita/contribs/lambdadelta/legacy_1/theory.ma b/matita/matita/contribs/lambdadelta/legacy_1/theory.ma deleted file mode 100644 index 17a1ec960..000000000 --- a/matita/matita/contribs/lambdadelta/legacy_1/theory.ma +++ /dev/null @@ -1,18 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -(* This file was automatically generated: do not edit *********************) - -include "legacy_1/coq/props.ma". - diff --git a/matita/matita/contribs/lambdadelta/legacy_1A/coq/defs.ma b/matita/matita/contribs/lambdadelta/legacy_1A/coq/defs.ma new file mode 100644 index 000000000..0eb631b97 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/legacy_1A/coq/defs.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "legacy_1A/preamble.ma". + +inductive eq (A: Type[0]) (x: A): A \to Prop \def +| refl_equal: eq A x x. + +inductive True: Prop \def +| I: True. + +inductive land (A: Prop) (B: Prop): Prop \def +| conj: A \to (B \to (land A B)). + +inductive or (A: Prop) (B: Prop): Prop \def +| or_introl: A \to (or A B) +| or_intror: B \to (or A B). + +inductive ex (A: Type[0]) (P: A \to Prop): Prop \def +| ex_intro: \forall (x: A).((P x) \to (ex A P)). + +inductive ex2 (A: Type[0]) (P: A \to Prop) (Q: A \to Prop): Prop \def +| ex_intro2: \forall (x: A).((P x) \to ((Q x) \to (ex2 A P Q))). + +definition not: + Prop \to Prop +\def + \lambda (A: Prop).(A \to False). + +inductive bool: Type[0] \def +| true: bool +| false: bool. + +inductive nat: Type[0] \def +| O: nat +| S: nat \to nat. + +inductive le (n: nat): nat \to Prop \def +| le_n: le n n +| le_S: \forall (m: nat).((le n m) \to (le n (S m))). + +definition lt: + nat \to (nat \to Prop) +\def + \lambda (n: nat).(\lambda (m: nat).(le (S n) m)). + +definition IsSucc: + nat \to Prop +\def + \lambda (n: nat).(match n with [O \Rightarrow False | (S _) \Rightarrow +True]). + +definition pred: + nat \to nat +\def + \lambda (n: nat).(match n with [O \Rightarrow O | (S u) \Rightarrow u]). + +rec definition plus (n: nat) on n: nat \to nat \def \lambda (m: nat).(match n +with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))]). + +rec definition minus (n: nat) on n: nat \to nat \def \lambda (m: nat).(match +n with [O \Rightarrow O | (S k) \Rightarrow (match m with [O \Rightarrow (S +k) | (S l) \Rightarrow (minus k l)])]). + +inductive Acc (A: Type[0]) (R: A \to (A \to Prop)): A \to Prop \def +| Acc_intro: \forall (x: A).(((\forall (y: A).((R y x) \to (Acc A R y)))) \to +(Acc A R x)). + +definition well_founded: + \forall (A: Type[0]).(((A \to (A \to Prop))) \to Prop) +\def + \lambda (A: Type[0]).(\lambda (R: ((A \to (A \to Prop)))).(\forall (a: +A).(Acc A R a))). + +definition ltof: + \forall (A: Type[0]).(((A \to nat)) \to (A \to (A \to Prop))) +\def + \lambda (A: Type[0]).(\lambda (f: ((A \to nat))).(\lambda (a: A).(\lambda +(b: A).(lt (f a) (f b))))). + diff --git a/matita/matita/contribs/lambdadelta/legacy_1A/coq/fwd.ma b/matita/matita/contribs/lambdadelta/legacy_1A/coq/fwd.ma new file mode 100644 index 000000000..fbd8a5335 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/legacy_1A/coq/fwd.ma @@ -0,0 +1,94 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "legacy_1A/coq/defs.ma". + +implied lemma False_rect: + \forall (P: Type[0]).(False \to P) +\def + \lambda (P: Type[0]).(\lambda (f: False).(match f in False with [])). + +implied lemma False_ind: + \forall (P: Prop).(False \to P) +\def + \lambda (P: Prop).(False_rect P). + +implied lemma land_rect: + \forall (A: Prop).(\forall (B: Prop).(\forall (P: Type[0]).(((A \to (B \to +P))) \to ((land A B) \to P)))) +\def + \lambda (A: Prop).(\lambda (B: Prop).(\lambda (P: Type[0]).(\lambda (f: ((A +\to (B \to P)))).(\lambda (a: (land A B)).(match a with [(conj x x0) +\Rightarrow (f x x0)]))))). + +implied lemma land_ind: + \forall (A: Prop).(\forall (B: Prop).(\forall (P: Prop).(((A \to (B \to P))) +\to ((land A B) \to P)))) +\def + \lambda (A: Prop).(\lambda (B: Prop).(\lambda (P: Prop).(land_rect A B P))). + +implied lemma or_ind: + \forall (A: Prop).(\forall (B: Prop).(\forall (P: Prop).(((A \to P)) \to +(((B \to P)) \to ((or A B) \to P))))) +\def + \lambda (A: Prop).(\lambda (B: Prop).(\lambda (P: Prop).(\lambda (f: ((A \to +P))).(\lambda (f0: ((B \to P))).(\lambda (o: (or A B)).(match o with +[(or_introl x) \Rightarrow (f x) | (or_intror x) \Rightarrow (f0 x)])))))). + +implied lemma ex_ind: + \forall (A: Type[0]).(\forall (P: ((A \to Prop))).(\forall (P0: +Prop).(((\forall (x: A).((P x) \to P0))) \to ((ex A P) \to P0)))) +\def + \lambda (A: Type[0]).(\lambda (P: ((A \to Prop))).(\lambda (P0: +Prop).(\lambda (f: ((\forall (x: A).((P x) \to P0)))).(\lambda (e: (ex A +P)).(match e with [(ex_intro x x0) \Rightarrow (f x x0)]))))). + +implied lemma ex2_ind: + \forall (A: Type[0]).(\forall (P: ((A \to Prop))).(\forall (Q: ((A \to +Prop))).(\forall (P0: Prop).(((\forall (x: A).((P x) \to ((Q x) \to P0)))) +\to ((ex2 A P Q) \to P0))))) +\def + \lambda (A: Type[0]).(\lambda (P: ((A \to Prop))).(\lambda (Q: ((A \to +Prop))).(\lambda (P0: Prop).(\lambda (f: ((\forall (x: A).((P x) \to ((Q x) +\to P0))))).(\lambda (e: (ex2 A P Q)).(match e with [(ex_intro2 x x0 x1) +\Rightarrow (f x x0 x1)])))))). + +implied lemma eq_rect: + \forall (A: Type[0]).(\forall (x: A).(\forall (P: ((A \to Type[0]))).((P x) +\to (\forall (y: A).((eq A x y) \to (P y)))))) +\def + \lambda (A: Type[0]).(\lambda (x: A).(\lambda (P: ((A \to +Type[0]))).(\lambda (f: (P x)).(\lambda (y: A).(\lambda (e: (eq A x +y)).(match e with [refl_equal \Rightarrow f])))))). + +implied lemma eq_ind: + \forall (A: Type[0]).(\forall (x: A).(\forall (P: ((A \to Prop))).((P x) \to +(\forall (y: A).((eq A x y) \to (P y)))))) +\def + \lambda (A: Type[0]).(\lambda (x: A).(\lambda (P: ((A \to Prop))).(eq_rect A +x P))). + +implied rec lemma le_ind (n: nat) (P: (nat \to Prop)) (f: P n) (f0: (\forall +(m: nat).((le n m) \to ((P m) \to (P (S m)))))) (n0: nat) (l: le n n0) on l: +P n0 \def match l with [le_n \Rightarrow f | (le_S m l0) \Rightarrow (f0 m l0 +((le_ind n P f f0) m l0))]. + +implied rec lemma Acc_ind (A: Type[0]) (R: (A \to (A \to Prop))) (P: (A \to +Prop)) (f: (\forall (x: A).(((\forall (y: A).((R y x) \to (Acc A R y)))) \to +(((\forall (y: A).((R y x) \to (P y)))) \to (P x))))) (a: A) (a0: Acc A R a) +on a0: P a \def match a0 with [(Acc_intro x a1) \Rightarrow (f x a1 (\lambda +(y: A).(\lambda (r0: (R y x)).((Acc_ind A R P f) y (a1 y r0)))))]. + diff --git a/matita/matita/contribs/lambdadelta/legacy_1A/coq/props.ma b/matita/matita/contribs/lambdadelta/legacy_1A/coq/props.ma new file mode 100644 index 000000000..8e169b361 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/legacy_1A/coq/props.ma @@ -0,0 +1,597 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "legacy_1A/coq/fwd.ma". + +lemma f_equal: + \forall (A: Type[0]).(\forall (B: Type[0]).(\forall (f: ((A \to +B))).(\forall (x: A).(\forall (y: A).((eq A x y) \to (eq B (f x) (f y))))))) +\def + \lambda (A: Type[0]).(\lambda (B: Type[0]).(\lambda (f: ((A \to +B))).(\lambda (x: A).(\lambda (y: A).(\lambda (H: (eq A x y)).(eq_ind A x +(\lambda (a: A).(eq B (f x) (f a))) (refl_equal B (f x)) y H)))))). + +lemma f_equal2: + \forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall (B: Type[0]).(\forall +(f: ((A1 \to (A2 \to B)))).(\forall (x1: A1).(\forall (y1: A1).(\forall (x2: +A2).(\forall (y2: A2).((eq A1 x1 y1) \to ((eq A2 x2 y2) \to (eq B (f x1 x2) +(f y1 y2))))))))))) +\def + \lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda (B: Type[0]).(\lambda +(f: ((A1 \to (A2 \to B)))).(\lambda (x1: A1).(\lambda (y1: A1).(\lambda (x2: +A2).(\lambda (y2: A2).(\lambda (H: (eq A1 x1 y1)).(eq_ind A1 x1 (\lambda (a: +A1).((eq A2 x2 y2) \to (eq B (f x1 x2) (f a y2)))) (\lambda (H0: (eq A2 x2 +y2)).(eq_ind A2 x2 (\lambda (a: A2).(eq B (f x1 x2) (f x1 a))) (refl_equal B +(f x1 x2)) y2 H0)) y1 H))))))))). + +lemma f_equal3: + \forall (A1: Type[0]).(\forall (A2: Type[0]).(\forall (A3: Type[0]).(\forall +(B: Type[0]).(\forall (f: ((A1 \to (A2 \to (A3 \to B))))).(\forall (x1: +A1).(\forall (y1: A1).(\forall (x2: A2).(\forall (y2: A2).(\forall (x3: +A3).(\forall (y3: A3).((eq A1 x1 y1) \to ((eq A2 x2 y2) \to ((eq A3 x3 y3) +\to (eq B (f x1 x2 x3) (f y1 y2 y3))))))))))))))) +\def + \lambda (A1: Type[0]).(\lambda (A2: Type[0]).(\lambda (A3: Type[0]).(\lambda +(B: Type[0]).(\lambda (f: ((A1 \to (A2 \to (A3 \to B))))).(\lambda (x1: +A1).(\lambda (y1: A1).(\lambda (x2: A2).(\lambda (y2: A2).(\lambda (x3: +A3).(\lambda (y3: A3).(\lambda (H: (eq A1 x1 y1)).(eq_ind A1 x1 (\lambda (a: +A1).((eq A2 x2 y2) \to ((eq A3 x3 y3) \to (eq B (f x1 x2 x3) (f a y2 y3))))) +(\lambda (H0: (eq A2 x2 y2)).(eq_ind A2 x2 (\lambda (a: A2).((eq A3 x3 y3) +\to (eq B (f x1 x2 x3) (f x1 a y3)))) (\lambda (H1: (eq A3 x3 y3)).(eq_ind A3 +x3 (\lambda (a: A3).(eq B (f x1 x2 x3) (f x1 x2 a))) (refl_equal B (f x1 x2 +x3)) y3 H1)) y2 H0)) y1 H)))))))))))). + +lemma sym_eq: + \forall (A: Type[0]).(\forall (x: A).(\forall (y: A).((eq A x y) \to (eq A y +x)))) +\def + \lambda (A: Type[0]).(\lambda (x: A).(\lambda (y: A).(\lambda (H: (eq A x +y)).(eq_ind A x (\lambda (a: A).(eq A a x)) (refl_equal A x) y H)))). + +lemma eq_ind_r: + \forall (A: Type[0]).(\forall (x: A).(\forall (P: ((A \to Prop))).((P x) \to +(\forall (y: A).((eq A y x) \to (P y)))))) +\def + \lambda (A: Type[0]).(\lambda (x: A).(\lambda (P: ((A \to Prop))).(\lambda +(H: (P x)).(\lambda (y: A).(\lambda (H0: (eq A y x)).(match (sym_eq A y x H0) +with [refl_equal \Rightarrow H])))))). + +lemma trans_eq: + \forall (A: Type[0]).(\forall (x: A).(\forall (y: A).(\forall (z: A).((eq A +x y) \to ((eq A y z) \to (eq A x z)))))) +\def + \lambda (A: Type[0]).(\lambda (x: A).(\lambda (y: A).(\lambda (z: +A).(\lambda (H: (eq A x y)).(\lambda (H0: (eq A y z)).(eq_ind A y (\lambda +(a: A).(eq A x a)) H z H0)))))). + +lemma sym_not_eq: + \forall (A: Type[0]).(\forall (x: A).(\forall (y: A).((not (eq A x y)) \to +(not (eq A y x))))) +\def + \lambda (A: Type[0]).(\lambda (x: A).(\lambda (y: A).(\lambda (h1: (not (eq +A x y))).(\lambda (h2: (eq A y x)).(h1 (eq_ind A y (\lambda (a: A).(eq A a +y)) (refl_equal A y) x h2)))))). + +lemma nat_double_ind: + \forall (R: ((nat \to (nat \to Prop)))).(((\forall (n: nat).(R O n))) \to +(((\forall (n: nat).(R (S n) O))) \to (((\forall (n: nat).(\forall (m: +nat).((R n m) \to (R (S n) (S m)))))) \to (\forall (n: nat).(\forall (m: +nat).(R n m)))))) +\def + \lambda (R: ((nat \to (nat \to Prop)))).(\lambda (H: ((\forall (n: nat).(R O +n)))).(\lambda (H0: ((\forall (n: nat).(R (S n) O)))).(\lambda (H1: ((\forall +(n: nat).(\forall (m: nat).((R n m) \to (R (S n) (S m))))))).(\lambda (n: +nat).(nat_ind (\lambda (n0: nat).(\forall (m: nat).(R n0 m))) H (\lambda (n0: +nat).(\lambda (H2: ((\forall (m: nat).(R n0 m)))).(\lambda (m: nat).(nat_ind +(\lambda (n1: nat).(R (S n0) n1)) (H0 n0) (\lambda (n1: nat).(\lambda (_: (R +(S n0) n1)).(H1 n0 n1 (H2 n1)))) m)))) n))))). + +lemma eq_add_S: + \forall (n: nat).(\forall (m: nat).((eq nat (S n) (S m)) \to (eq nat n m))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (eq nat (S n) (S +m))).(f_equal nat nat pred (S n) (S m) H))). + +lemma O_S: + \forall (n: nat).(not (eq nat O (S n))) +\def + \lambda (n: nat).(\lambda (H: (eq nat O (S n))).(eq_ind nat (S n) (\lambda +(n0: nat).(IsSucc n0)) I O (sym_eq nat O (S n) H))). + +lemma not_eq_S: + \forall (n: nat).(\forall (m: nat).((not (eq nat n m)) \to (not (eq nat (S +n) (S m))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (not (eq nat n m))).(\lambda +(H0: (eq nat (S n) (S m))).(H (eq_add_S n m H0))))). + +lemma pred_Sn: + \forall (m: nat).(eq nat m (pred (S m))) +\def + \lambda (m: nat).(refl_equal nat (pred (S m))). + +lemma S_pred: + \forall (n: nat).(\forall (m: nat).((lt m n) \to (eq nat n (S (pred n))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt m n)).(le_ind (S m) +(\lambda (n0: nat).(eq nat n0 (S (pred n0)))) (refl_equal nat (S (pred (S +m)))) (\lambda (m0: nat).(\lambda (_: (le (S m) m0)).(\lambda (_: (eq nat m0 +(S (pred m0)))).(refl_equal nat (S (pred (S m0))))))) n H))). + +lemma le_trans: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to ((le m p) +\to (le n p))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (le n +m)).(\lambda (H0: (le m p)).(le_ind m (\lambda (n0: nat).(le n n0)) H +(\lambda (m0: nat).(\lambda (_: (le m m0)).(\lambda (IHle: (le n m0)).(le_S n +m0 IHle)))) p H0))))). + +lemma le_trans_S: + \forall (n: nat).(\forall (m: nat).((le (S n) m) \to (le n m))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le (S n) m)).(le_trans n (S +n) m (le_S n n (le_n n)) H))). + +lemma le_n_S: + \forall (n: nat).(\forall (m: nat).((le n m) \to (le (S n) (S m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda +(n0: nat).(le (S n) (S n0))) (le_n (S n)) (\lambda (m0: nat).(\lambda (_: (le +n m0)).(\lambda (IHle: (le (S n) (S m0))).(le_S (S n) (S m0) IHle)))) m H))). + +lemma le_O_n: + \forall (n: nat).(le O n) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(le O n0)) (le_n O) (\lambda +(n0: nat).(\lambda (IHn: (le O n0)).(le_S O n0 IHn))) n). + +lemma le_S_n: + \forall (n: nat).(\forall (m: nat).((le (S n) (S m)) \to (le n m))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le (S n) (S m))).(le_ind (S +n) (\lambda (n0: nat).(le (pred (S n)) (pred n0))) (le_n n) (\lambda (m0: +nat).(\lambda (H0: (le (S n) m0)).(\lambda (_: (le n (pred m0))).(le_trans_S +n m0 H0)))) (S m) H))). + +lemma le_Sn_O: + \forall (n: nat).(not (le (S n) O)) +\def + \lambda (n: nat).(\lambda (H: (le (S n) O)).(le_ind (S n) (\lambda (n0: +nat).(IsSucc n0)) I (\lambda (m: nat).(\lambda (_: (le (S n) m)).(\lambda (_: +(IsSucc m)).I))) O H)). + +lemma le_Sn_n: + \forall (n: nat).(not (le (S n) n)) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(not (le (S n0) n0))) (le_Sn_O +O) (\lambda (n0: nat).(\lambda (IHn: (not (le (S n0) n0))).(\lambda (H: (le +(S (S n0)) (S n0))).(IHn (le_S_n (S n0) n0 H))))) n). + +lemma le_antisym: + \forall (n: nat).(\forall (m: nat).((le n m) \to ((le m n) \to (eq nat n +m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (h: (le n m)).(le_ind n (\lambda +(n0: nat).((le n0 n) \to (eq nat n n0))) (\lambda (_: (le n n)).(refl_equal +nat n)) (\lambda (m0: nat).(\lambda (H: (le n m0)).(\lambda (_: (((le m0 n) +\to (eq nat n m0)))).(\lambda (H1: (le (S m0) n)).(False_ind (eq nat n (S +m0)) (let H2 \def (le_trans (S m0) n m0 H1 H) in ((let H3 \def (le_Sn_n m0) +in (\lambda (H4: (le (S m0) m0)).(H3 H4))) H2))))))) m h))). + +lemma le_n_O_eq: + \forall (n: nat).((le n O) \to (eq nat O n)) +\def + \lambda (n: nat).(\lambda (H: (le n O)).(le_antisym O n (le_O_n n) H)). + +lemma le_elim_rel: + \forall (P: ((nat \to (nat \to Prop)))).(((\forall (p: nat).(P O p))) \to +(((\forall (p: nat).(\forall (q: nat).((le p q) \to ((P p q) \to (P (S p) (S +q))))))) \to (\forall (n: nat).(\forall (m: nat).((le n m) \to (P n m)))))) +\def + \lambda (P: ((nat \to (nat \to Prop)))).(\lambda (H: ((\forall (p: nat).(P O +p)))).(\lambda (H0: ((\forall (p: nat).(\forall (q: nat).((le p q) \to ((P p +q) \to (P (S p) (S q)))))))).(\lambda (n: nat).(nat_ind (\lambda (n0: +nat).(\forall (m: nat).((le n0 m) \to (P n0 m)))) (\lambda (m: nat).(\lambda +(_: (le O m)).(H m))) (\lambda (n0: nat).(\lambda (IHn: ((\forall (m: +nat).((le n0 m) \to (P n0 m))))).(\lambda (m: nat).(\lambda (Le: (le (S n0) +m)).(le_ind (S n0) (\lambda (n1: nat).(P (S n0) n1)) (H0 n0 n0 (le_n n0) (IHn +n0 (le_n n0))) (\lambda (m0: nat).(\lambda (H1: (le (S n0) m0)).(\lambda (_: +(P (S n0) m0)).(H0 n0 m0 (le_trans_S n0 m0 H1) (IHn m0 (le_trans_S n0 m0 +H1)))))) m Le))))) n)))). + +lemma lt_n_n: + \forall (n: nat).(not (lt n n)) +\def + le_Sn_n. + +lemma lt_n_S: + \forall (n: nat).(\forall (m: nat).((lt n m) \to (lt (S n) (S m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt n m)).(le_n_S (S n) m +H))). + +lemma lt_n_Sn: + \forall (n: nat).(lt n (S n)) +\def + \lambda (n: nat).(le_n (S n)). + +lemma lt_S_n: + \forall (n: nat).(\forall (m: nat).((lt (S n) (S m)) \to (lt n m))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt (S n) (S m))).(le_S_n (S +n) m H))). + +lemma lt_n_O: + \forall (n: nat).(not (lt n O)) +\def + le_Sn_O. + +lemma lt_trans: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to ((lt m p) +\to (lt n p))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (lt n +m)).(\lambda (H0: (lt m p)).(le_ind (S m) (\lambda (n0: nat).(lt n n0)) (le_S +(S n) m H) (\lambda (m0: nat).(\lambda (_: (le (S m) m0)).(\lambda (IHle: (lt +n m0)).(le_S (S n) m0 IHle)))) p H0))))). + +lemma lt_O_Sn: + \forall (n: nat).(lt O (S n)) +\def + \lambda (n: nat).(le_n_S O n (le_O_n n)). + +lemma lt_le_S: + \forall (n: nat).(\forall (p: nat).((lt n p) \to (le (S n) p))) +\def + \lambda (n: nat).(\lambda (p: nat).(\lambda (H: (lt n p)).H)). + +lemma le_not_lt: + \forall (n: nat).(\forall (m: nat).((le n m) \to (not (lt m n)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda +(n0: nat).(not (lt n0 n))) (lt_n_n n) (\lambda (m0: nat).(\lambda (_: (le n +m0)).(\lambda (IHle: (not (lt m0 n))).(\lambda (H1: (lt (S m0) n)).(IHle +(le_trans_S (S m0) n H1)))))) m H))). + +lemma le_lt_n_Sm: + \forall (n: nat).(\forall (m: nat).((le n m) \to (lt n (S m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_n_S n m H))). + +lemma le_lt_trans: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to ((lt m p) +\to (lt n p))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (le n +m)).(\lambda (H0: (lt m p)).(le_ind (S m) (\lambda (n0: nat).(lt n n0)) +(le_n_S n m H) (\lambda (m0: nat).(\lambda (_: (le (S m) m0)).(\lambda (IHle: +(lt n m0)).(le_S (S n) m0 IHle)))) p H0))))). + +lemma lt_le_trans: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to ((le m p) +\to (lt n p))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (lt n +m)).(\lambda (H0: (le m p)).(le_ind m (\lambda (n0: nat).(lt n n0)) H +(\lambda (m0: nat).(\lambda (_: (le m m0)).(\lambda (IHle: (lt n m0)).(le_S +(S n) m0 IHle)))) p H0))))). + +lemma lt_le_weak: + \forall (n: nat).(\forall (m: nat).((lt n m) \to (le n m))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt n m)).(le_trans_S n m +H))). + +lemma lt_n_Sm_le: + \forall (n: nat).(\forall (m: nat).((lt n (S m)) \to (le n m))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (lt n (S m))).(le_S_n n m +H))). + +lemma le_lt_or_eq: + \forall (n: nat).(\forall (m: nat).((le n m) \to (or (lt n m) (eq nat n m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(le_ind n (\lambda +(n0: nat).(or (lt n n0) (eq nat n n0))) (or_intror (lt n n) (eq nat n n) +(refl_equal nat n)) (\lambda (m0: nat).(\lambda (H0: (le n m0)).(\lambda (_: +(or (lt n m0) (eq nat n m0))).(or_introl (lt n (S m0)) (eq nat n (S m0)) +(le_n_S n m0 H0))))) m H))). + +lemma le_or_lt: + \forall (n: nat).(\forall (m: nat).(or (le n m) (lt m n))) +\def + \lambda (n: nat).(\lambda (m: nat).(nat_double_ind (\lambda (n0: +nat).(\lambda (n1: nat).(or (le n0 n1) (lt n1 n0)))) (\lambda (n0: +nat).(or_introl (le O n0) (lt n0 O) (le_O_n n0))) (\lambda (n0: +nat).(or_intror (le (S n0) O) (lt O (S n0)) (lt_le_S O (S n0) (lt_O_Sn n0)))) +(\lambda (n0: nat).(\lambda (m0: nat).(\lambda (H: (or (le n0 m0) (lt m0 +n0))).(or_ind (le n0 m0) (lt m0 n0) (or (le (S n0) (S m0)) (lt (S m0) (S +n0))) (\lambda (H0: (le n0 m0)).(or_introl (le (S n0) (S m0)) (lt (S m0) (S +n0)) (le_n_S n0 m0 H0))) (\lambda (H0: (lt m0 n0)).(or_intror (le (S n0) (S +m0)) (lt (S m0) (S n0)) (le_n_S (S m0) n0 H0))) H)))) n m)). + +lemma plus_n_O: + \forall (n: nat).(eq nat n (plus n O)) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat n0 (plus n0 O))) +(refl_equal nat O) (\lambda (n0: nat).(\lambda (H: (eq nat n0 (plus n0 +O))).(f_equal nat nat S n0 (plus n0 O) H))) n). + +lemma plus_n_Sm: + \forall (n: nat).(\forall (m: nat).(eq nat (S (plus n m)) (plus n (S m)))) +\def + \lambda (m: nat).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat (S +(plus n0 n)) (plus n0 (S n)))) (refl_equal nat (S n)) (\lambda (n0: +nat).(\lambda (H: (eq nat (S (plus n0 n)) (plus n0 (S n)))).(f_equal nat nat +S (S (plus n0 n)) (plus n0 (S n)) H))) m)). + +lemma plus_sym: + \forall (n: nat).(\forall (m: nat).(eq nat (plus n m) (plus m n))) +\def + \lambda (n: nat).(\lambda (m: nat).(nat_ind (\lambda (n0: nat).(eq nat (plus +n0 m) (plus m n0))) (plus_n_O m) (\lambda (y: nat).(\lambda (H: (eq nat (plus +y m) (plus m y))).(eq_ind nat (S (plus m y)) (\lambda (n0: nat).(eq nat (S +(plus y m)) n0)) (f_equal nat nat S (plus y m) (plus m y) H) (plus m (S y)) +(plus_n_Sm m y)))) n)). + +lemma plus_Snm_nSm: + \forall (n: nat).(\forall (m: nat).(eq nat (plus (S n) m) (plus n (S m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(eq_ind_r nat (plus m n) (\lambda (n0: +nat).(eq nat (S n0) (plus n (S m)))) (eq_ind_r nat (plus (S m) n) (\lambda +(n0: nat).(eq nat (S (plus m n)) n0)) (refl_equal nat (plus (S m) n)) (plus n +(S m)) (plus_sym n (S m))) (plus n m) (plus_sym n m))). + +lemma plus_assoc_l: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(eq nat (plus n (plus m +p)) (plus (plus n m) p)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: +nat).(eq nat (plus n0 (plus m p)) (plus (plus n0 m) p))) (refl_equal nat +(plus m p)) (\lambda (n0: nat).(\lambda (H: (eq nat (plus n0 (plus m p)) +(plus (plus n0 m) p))).(f_equal nat nat S (plus n0 (plus m p)) (plus (plus n0 +m) p) H))) n))). + +lemma plus_assoc_r: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(eq nat (plus (plus n +m) p) (plus n (plus m p))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(sym_eq nat (plus n +(plus m p)) (plus (plus n m) p) (plus_assoc_l n m p)))). + +lemma simpl_plus_l: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((eq nat (plus n m) +(plus n p)) \to (eq nat m p)))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (m: nat).(\forall (p: +nat).((eq nat (plus n0 m) (plus n0 p)) \to (eq nat m p))))) (\lambda (m: +nat).(\lambda (p: nat).(\lambda (H: (eq nat m p)).H))) (\lambda (n0: +nat).(\lambda (IHn: ((\forall (m: nat).(\forall (p: nat).((eq nat (plus n0 m) +(plus n0 p)) \to (eq nat m p)))))).(\lambda (m: nat).(\lambda (p: +nat).(\lambda (H: (eq nat (S (plus n0 m)) (S (plus n0 p)))).(IHn m p (IHn +(plus n0 m) (plus n0 p) (f_equal nat nat (plus n0) (plus n0 m) (plus n0 p) +(eq_add_S (plus n0 m) (plus n0 p) H))))))))) n). + +lemma minus_n_O: + \forall (n: nat).(eq nat n (minus n O)) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat n0 (minus n0 O))) +(refl_equal nat O) (\lambda (n0: nat).(\lambda (_: (eq nat n0 (minus n0 +O))).(refl_equal nat (S n0)))) n). + +lemma minus_n_n: + \forall (n: nat).(eq nat O (minus n n)) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat O (minus n0 n0))) +(refl_equal nat O) (\lambda (n0: nat).(\lambda (IHn: (eq nat O (minus n0 +n0))).IHn)) n). + +lemma minus_Sn_m: + \forall (n: nat).(\forall (m: nat).((le m n) \to (eq nat (S (minus n m)) +(minus (S n) m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (Le: (le m n)).(le_elim_rel +(\lambda (n0: nat).(\lambda (n1: nat).(eq nat (S (minus n1 n0)) (minus (S n1) +n0)))) (\lambda (p: nat).(f_equal nat nat S (minus p O) p (sym_eq nat p +(minus p O) (minus_n_O p)))) (\lambda (p: nat).(\lambda (q: nat).(\lambda (_: +(le p q)).(\lambda (H0: (eq nat (S (minus q p)) (match p with [O \Rightarrow +(S q) | (S l) \Rightarrow (minus q l)]))).H0)))) m n Le))). + +lemma plus_minus: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((eq nat n (plus m p)) +\to (eq nat p (minus n m))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_double_ind +(\lambda (n0: nat).(\lambda (n1: nat).((eq nat n1 (plus n0 p)) \to (eq nat p +(minus n1 n0))))) (\lambda (n0: nat).(\lambda (H: (eq nat n0 p)).(eq_ind nat +n0 (\lambda (n1: nat).(eq nat p n1)) (sym_eq nat n0 p H) (minus n0 O) +(minus_n_O n0)))) (\lambda (n0: nat).(\lambda (H: (eq nat O (S (plus n0 +p)))).(False_ind (eq nat p O) (let H0 \def H in ((let H1 \def (O_S (plus n0 +p)) in (\lambda (H2: (eq nat O (S (plus n0 p)))).(H1 H2))) H0))))) (\lambda +(n0: nat).(\lambda (m0: nat).(\lambda (H: (((eq nat m0 (plus n0 p)) \to (eq +nat p (minus m0 n0))))).(\lambda (H0: (eq nat (S m0) (S (plus n0 p)))).(H +(eq_add_S m0 (plus n0 p) H0)))))) m n))). + +lemma minus_plus: + \forall (n: nat).(\forall (m: nat).(eq nat (minus (plus n m) n) m)) +\def + \lambda (n: nat).(\lambda (m: nat).(sym_eq nat m (minus (plus n m) n) +(plus_minus (plus n m) n m (refl_equal nat (plus n m))))). + +lemma le_pred_n: + \forall (n: nat).(le (pred n) n) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(le (pred n0) n0)) (le_n O) +(\lambda (n0: nat).(\lambda (_: (le (pred n0) n0)).(le_S (pred (S n0)) n0 +(le_n n0)))) n). + +lemma le_plus_l: + \forall (n: nat).(\forall (m: nat).(le n (plus n m))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (m: nat).(le n0 (plus +n0 m)))) (\lambda (m: nat).(le_O_n m)) (\lambda (n0: nat).(\lambda (IHn: +((\forall (m: nat).(le n0 (plus n0 m))))).(\lambda (m: nat).(le_n_S n0 (plus +n0 m) (IHn m))))) n). + +lemma le_plus_r: + \forall (n: nat).(\forall (m: nat).(le m (plus n m))) +\def + \lambda (n: nat).(\lambda (m: nat).(nat_ind (\lambda (n0: nat).(le m (plus +n0 m))) (le_n m) (\lambda (n0: nat).(\lambda (H: (le m (plus n0 m))).(le_S m +(plus n0 m) H))) n)). + +lemma simpl_le_plus_l: + \forall (p: nat).(\forall (n: nat).(\forall (m: nat).((le (plus p n) (plus p +m)) \to (le n m)))) +\def + \lambda (p: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).(\forall (m: +nat).((le (plus n n0) (plus n m)) \to (le n0 m))))) (\lambda (n: +nat).(\lambda (m: nat).(\lambda (H: (le n m)).H))) (\lambda (p0: +nat).(\lambda (IHp: ((\forall (n: nat).(\forall (m: nat).((le (plus p0 n) +(plus p0 m)) \to (le n m)))))).(\lambda (n: nat).(\lambda (m: nat).(\lambda +(H: (le (S (plus p0 n)) (S (plus p0 m)))).(IHp n m (le_S_n (plus p0 n) (plus +p0 m) H))))))) p). + +lemma le_plus_trans: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to (le n +(plus m p))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (le n +m)).(le_trans n m (plus m p) H (le_plus_l m p))))). + +lemma le_reg_l: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((le n m) \to (le (plus +p n) (plus p m))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: +nat).((le n m) \to (le (plus n0 n) (plus n0 m)))) (\lambda (H: (le n m)).H) +(\lambda (p0: nat).(\lambda (IHp: (((le n m) \to (le (plus p0 n) (plus p0 +m))))).(\lambda (H: (le n m)).(le_n_S (plus p0 n) (plus p0 m) (IHp H))))) +p))). + +lemma le_plus_plus: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((le +n m) \to ((le p q) \to (le (plus n p) (plus m q))))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: +nat).(\lambda (H: (le n m)).(\lambda (H0: (le p q)).(le_ind n (\lambda (n0: +nat).(le (plus n p) (plus n0 q))) (le_reg_l p q n H0) (\lambda (m0: +nat).(\lambda (_: (le n m0)).(\lambda (H2: (le (plus n p) (plus m0 q))).(le_S +(plus n p) (plus m0 q) H2)))) m H)))))). + +lemma le_plus_minus: + \forall (n: nat).(\forall (m: nat).((le n m) \to (eq nat m (plus n (minus m +n))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (Le: (le n m)).(le_elim_rel +(\lambda (n0: nat).(\lambda (n1: nat).(eq nat n1 (plus n0 (minus n1 n0))))) +(\lambda (p: nat).(minus_n_O p)) (\lambda (p: nat).(\lambda (q: nat).(\lambda +(_: (le p q)).(\lambda (H0: (eq nat q (plus p (minus q p)))).(f_equal nat nat +S q (plus p (minus q p)) H0))))) n m Le))). + +lemma le_plus_minus_r: + \forall (n: nat).(\forall (m: nat).((le n m) \to (eq nat (plus n (minus m +n)) m))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (H: (le n m)).(sym_eq nat m +(plus n (minus m n)) (le_plus_minus n m H)))). + +lemma simpl_lt_plus_l: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt (plus p n) (plus p +m)) \to (lt n m)))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: +nat).((lt (plus n0 n) (plus n0 m)) \to (lt n m))) (\lambda (H: (lt n m)).H) +(\lambda (p0: nat).(\lambda (IHp: (((lt (plus p0 n) (plus p0 m)) \to (lt n +m)))).(\lambda (H: (lt (S (plus p0 n)) (S (plus p0 m)))).(IHp (le_S_n (S +(plus p0 n)) (plus p0 m) H))))) p))). + +lemma lt_reg_l: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to (lt (plus +p n) (plus p m))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(nat_ind (\lambda (n0: +nat).((lt n m) \to (lt (plus n0 n) (plus n0 m)))) (\lambda (H: (lt n m)).H) +(\lambda (p0: nat).(\lambda (IHp: (((lt n m) \to (lt (plus p0 n) (plus p0 +m))))).(\lambda (H: (lt n m)).(lt_n_S (plus p0 n) (plus p0 m) (IHp H))))) +p))). + +lemma lt_reg_r: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((lt n m) \to (lt (plus +n p) (plus m p))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (H: (lt n +m)).(eq_ind_r nat (plus p n) (\lambda (n0: nat).(lt n0 (plus m p))) (eq_ind_r +nat (plus p m) (\lambda (n0: nat).(lt (plus p n) n0)) (nat_ind (\lambda (n0: +nat).(lt (plus n0 n) (plus n0 m))) H (\lambda (n0: nat).(\lambda (_: (lt +(plus n0 n) (plus n0 m))).(lt_reg_l n m (S n0) H))) p) (plus m p) (plus_sym m +p)) (plus n p) (plus_sym n p))))). + +lemma le_lt_plus_plus: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((le +n m) \to ((lt p q) \to (lt (plus n p) (plus m q))))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: +nat).(\lambda (H: (le n m)).(\lambda (H0: (le (S p) q)).(eq_ind_r nat (plus n +(S p)) (\lambda (n0: nat).(le n0 (plus m q))) (le_plus_plus n m (S p) q H H0) +(plus (S n) p) (plus_Snm_nSm n p))))))). + +lemma lt_le_plus_plus: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((lt +n m) \to ((le p q) \to (lt (plus n p) (plus m q))))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: +nat).(\lambda (H: (le (S n) m)).(\lambda (H0: (le p q)).(le_plus_plus (S n) m +p q H H0)))))). + +lemma lt_plus_plus: + \forall (n: nat).(\forall (m: nat).(\forall (p: nat).(\forall (q: nat).((lt +n m) \to ((lt p q) \to (lt (plus n p) (plus m q))))))) +\def + \lambda (n: nat).(\lambda (m: nat).(\lambda (p: nat).(\lambda (q: +nat).(\lambda (H: (lt n m)).(\lambda (H0: (lt p q)).(lt_le_plus_plus n m p q +H (lt_le_weak p q H0))))))). + +lemma well_founded_ltof: + \forall (A: Type[0]).(\forall (f: ((A \to nat))).(well_founded A (ltof A f))) +\def + \lambda (A: Type[0]).(\lambda (f: ((A \to nat))).(let H \def (\lambda (n: +nat).(nat_ind (\lambda (n0: nat).(\forall (a: A).((lt (f a) n0) \to (Acc A +(ltof A f) a)))) (\lambda (a: A).(\lambda (H: (lt (f a) O)).(False_ind (Acc A +(ltof A f) a) (let H0 \def H in ((let H1 \def (lt_n_O (f a)) in (\lambda (H2: +(lt (f a) O)).(H1 H2))) H0))))) (\lambda (n0: nat).(\lambda (IHn: ((\forall +(a: A).((lt (f a) n0) \to (Acc A (ltof A f) a))))).(\lambda (a: A).(\lambda +(ltSma: (lt (f a) (S n0))).(Acc_intro A (ltof A f) a (\lambda (b: A).(\lambda +(ltfafb: (lt (f b) (f a))).(IHn b (lt_le_trans (f b) (f a) n0 ltfafb +(lt_n_Sm_le (f a) n0 ltSma)))))))))) n)) in (\lambda (a: A).(H (S (f a)) a +(le_n (S (f a))))))). + +lemma lt_wf: + well_founded nat lt +\def + well_founded_ltof nat (\lambda (m: nat).m). + +lemma lt_wf_ind: + \forall (p: nat).(\forall (P: ((nat \to Prop))).(((\forall (n: +nat).(((\forall (m: nat).((lt m n) \to (P m)))) \to (P n)))) \to (P p))) +\def + \lambda (p: nat).(\lambda (P: ((nat \to Prop))).(\lambda (H: ((\forall (n: +nat).(((\forall (m: nat).((lt m n) \to (P m)))) \to (P n))))).(Acc_ind nat lt +(\lambda (n: nat).(P n)) (\lambda (x: nat).(\lambda (_: ((\forall (y: +nat).((lt y x) \to (Acc nat lt y))))).(\lambda (H1: ((\forall (y: nat).((lt y +x) \to (P y))))).(H x H1)))) p (lt_wf p)))). + diff --git a/matita/matita/contribs/lambdadelta/legacy_1A/definitions.ma b/matita/matita/contribs/lambdadelta/legacy_1A/definitions.ma new file mode 100644 index 000000000..ad3e144d5 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/legacy_1A/definitions.ma @@ -0,0 +1,18 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "legacy_1A/coq/defs.ma". + diff --git a/matita/matita/contribs/lambdadelta/legacy_1A/preamble.ma b/matita/matita/contribs/lambdadelta/legacy_1A/preamble.ma new file mode 100644 index 000000000..5466cb15e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/legacy_1A/preamble.ma @@ -0,0 +1,17 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basics/pts.ma". + +inductive False: Prop \def . diff --git a/matita/matita/contribs/lambdadelta/legacy_1A/spare.ma b/matita/matita/contribs/lambdadelta/legacy_1A/spare.ma new file mode 100644 index 000000000..2bcbf4cbe --- /dev/null +++ b/matita/matita/contribs/lambdadelta/legacy_1A/spare.ma @@ -0,0 +1,18 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "legacy_1A/theory.ma". + diff --git a/matita/matita/contribs/lambdadelta/legacy_1A/theory.ma b/matita/matita/contribs/lambdadelta/legacy_1A/theory.ma new file mode 100644 index 000000000..6d8925145 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/legacy_1A/theory.ma @@ -0,0 +1,18 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "legacy_1A/coq/props.ma". +